From 80b2fa5ce63f22b938aeaa0bcd419b6ef7885dfd Mon Sep 17 00:00:00 2001 From: Matthieu Date: Wed, 24 Jun 2026 09:34:58 +0200 Subject: [PATCH] feat(directory) : revamp commercial report tab and polish info tab - report tab redesigned as a reverse-chronological timeline with type badges/icons, relative dates and author - add/edit moved to a side drawer; body now uses the rich text editor (MalioInputRichText), displayed read-only as inline prose - delete now asks for confirmation (ConfirmDeleteReportModal) - empty state with CTA and pluralized count - info tab: use v-model, neutral i18n validation key, real admin flag instead of hardcoded true on CommercialReportTab --- .../ui/ConfirmDeleteReportModal.vue | 56 +++ frontend/i18n/locales/fr.json | 13 +- .../components/CommercialReportDrawer.vue | 144 ++++++++ .../components/CommercialReportTab.vue | 318 +++++++++++------- .../pages/directory/clients/[id].vue | 16 +- .../pages/directory/prospects/[id].vue | 23 +- 6 files changed, 424 insertions(+), 146 deletions(-) create mode 100644 frontend/components/ui/ConfirmDeleteReportModal.vue create mode 100644 frontend/modules/directory/components/CommercialReportDrawer.vue diff --git a/frontend/components/ui/ConfirmDeleteReportModal.vue b/frontend/components/ui/ConfirmDeleteReportModal.vue new file mode 100644 index 0000000..7aa6311 --- /dev/null +++ b/frontend/components/ui/ConfirmDeleteReportModal.vue @@ -0,0 +1,56 @@ + + + + + diff --git a/frontend/i18n/locales/fr.json b/frontend/i18n/locales/fr.json index 95ed502..465e449 100644 --- a/frontend/i18n/locales/fr.json +++ b/frontend/i18n/locales/fr.json @@ -948,6 +948,10 @@ "phone": "Téléphone" } }, + "validation": { + "nameRequired": "Le nom est requis.", + "subjectRequired": "L'objet est requis." + }, "clients": { "add": "Ajouter un client", "empty": "Aucun client trouvé." @@ -986,9 +990,16 @@ }, "reports": { "add": "Ajouter un compte-rendu", - "empty": "Aucun compte-rendu.", + "addTitle": "Nouveau compte-rendu", + "editTitle": "Modifier le compte-rendu", + "empty": "Aucun compte-rendu", + "emptyHint": "Consignez vos échanges (appels, rendez-vous, emails) pour garder l'historique de la relation.", + "count": "{n} compte-rendu | {n} comptes-rendus", + "documentsLabel": "Documents", "saved": "Compte-rendu enregistré.", "deleted": "Compte-rendu supprimé.", + "confirmDeleteTitle": "Supprimer ce compte-rendu ?", + "confirmDeleteMessage": "Cette action est irréversible. Les documents joints seront également supprimés.", "fields": { "subject": "Objet", "type": "Type d'échange", diff --git a/frontend/modules/directory/components/CommercialReportDrawer.vue b/frontend/modules/directory/components/CommercialReportDrawer.vue new file mode 100644 index 0000000..57be6f0 --- /dev/null +++ b/frontend/modules/directory/components/CommercialReportDrawer.vue @@ -0,0 +1,144 @@ + + + diff --git a/frontend/modules/directory/components/CommercialReportTab.vue b/frontend/modules/directory/components/CommercialReportTab.vue index 9374caf..c1c778d 100644 --- a/frontend/modules/directory/components/CommercialReportTab.vue +++ b/frontend/modules/directory/components/CommercialReportTab.vue @@ -1,83 +1,141 @@