feat: filtre utilisateurs analytics, améliorations dashboard + autres modifs
All checks were successful
Deploy Preprod / Build and Deploy to Preprod (push) Successful in 34s

- Multiselect Kirby pour filtrer par utilisateur(s)
- Données de test alignées sur les vrais comptes
- Suppression bloc utilisateurs les plus actifs
- Route get-data supporte le filtre emails
- Améliorations UI filtres (layout dates + users)
- Autres modifs : menu, router, dialog, deploy workflow

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
isUnknown 2026-03-03 11:27:27 +01:00
parent 8a73da920f
commit de104dc7dd
9 changed files with 243 additions and 42 deletions

View file

@ -4,6 +4,7 @@ import { useApiStore } from '../stores/api';
import { usePageStore } from '../stores/page';
import { useUserStore } from '../stores/user';
import { useLocaleStore } from '../stores/locale';
import { useAnalyticsStore } from '../stores/analytics';
const router = createRouter({
history: createWebHistory(),
@ -41,6 +42,65 @@ router.beforeEach(async (to, from, next) => {
}
});
router.afterEach((to) => {
const userStore = useUserStore();
const pageStore = usePageStore();
if (userStore.user) {
const analytics = useAnalyticsStore();
analytics.initSession();
const { pageType, pageName } = getPageInfo(to, pageStore.page);
analytics.trackVisit(to.path, pageType, pageName);
}
});
function getPageInfo(route, page) {
const path = route.path;
if (path === '/' || path === '/en') {
return { pageType: 'home', pageName: 'Accueil' };
}
if (path.includes('/login')) {
return { pageType: 'login', pageName: 'Connexion' };
}
if (path.includes('/account')) {
return { pageType: 'account', pageName: 'Compte' };
}
if (path.includes('/notifications')) {
return { pageType: 'notifications', pageName: 'Notifications' };
}
if (path.includes('/reunions')) {
return { pageType: 'reunions', pageName: 'Réunions' };
}
if (path.includes('/inspirations')) {
return { pageType: 'inspirations', pageName: 'Inspirations' };
}
if (path.includes('/design-to-light')) {
return { pageType: 'design-to-light', pageName: 'Design to Light' };
}
if (path.includes('/client-brief')) {
return { pageType: 'client-brief', pageName: page?.title || 'Brief Client' };
}
if (path.includes('/extended-brief')) {
return { pageType: 'extended-brief', pageName: page?.title || 'Brief Étendu' };
}
if (path.includes('/projects/')) {
return { pageType: 'project', pageName: page?.title || 'Projet' };
}
return { pageType: 'unknown', pageName: path };
}
export function setI18nLocale(i18n) {
router.afterEach(() => {
const localeStore = useLocaleStore();

View file

@ -1,6 +1,7 @@
import { defineStore } from 'pinia';
import { ref, computed, watch } from 'vue';
import { useRoute } from 'vue-router';
import { useAnalyticsStore } from './analytics';
export const useDialogStore = defineStore('dialog', () => {
const content = ref(null);
@ -148,6 +149,19 @@ export const useDialogStore = defineStore('dialog', () => {
}
}
// Analytics tracking pour ouverture de fichiers
watch(openedFile, (newFile) => {
if (newFile) {
const analytics = useAnalyticsStore();
const currentPath = route.path;
analytics.trackVisit(
`${currentPath}#file-${newFile.uuid}`,
'modal-file',
newFile.name || newFile.filename
);
}
});
return {
content,
activeTracks,