diff --git a/frontend/i18n/locales/fr.json b/frontend/i18n/locales/fr.json
index 9c9c74a..95ed502 100644
--- a/frontend/i18n/locales/fr.json
+++ b/frontend/i18n/locales/fr.json
@@ -934,12 +934,20 @@
"directory": {
"title": "Répertoire",
"tabs": {
+ "info": "Informations",
"clients": "Clients",
"prospects": "Prospects",
"contact": "Contact",
"address": "Adresse",
"report": "Rapport"
},
+ "info": {
+ "fields": {
+ "name": "Nom",
+ "email": "Email",
+ "phone": "Téléphone"
+ }
+ },
"clients": {
"add": "Ajouter un client",
"empty": "Aucun client trouvé."
diff --git a/frontend/modules/directory/pages/directory/clients/[id].vue b/frontend/modules/directory/pages/directory/clients/[id].vue
index 6cbe09e..d0b18db 100644
--- a/frontend/modules/directory/pages/directory/clients/[id].vue
+++ b/frontend/modules/directory/pages/directory/clients/[id].vue
@@ -8,6 +8,39 @@
{{ $t('common.loading') }}
+
+
+
+
(null)
const loading = ref(true)
-const activeTab = ref('contact')
+const activeTab = ref('info')
const tabs = [
+ { key: 'info', label: t('directory.tabs.info'), icon: 'mdi:information-outline' },
{ key: 'contact', label: t('directory.tabs.contact'), icon: 'mdi:account-outline' },
{ key: 'address', label: t('directory.tabs.address'), icon: 'mdi:map-marker-outline' },
{ key: 'report', label: t('directory.tabs.report'), icon: 'mdi:file-document-outline' },
]
+// Champs de base de la fiche, édités en mémoire et persistés au clic sur
+// « Enregistrer » (PATCH), comme les onglets Contact/Adresse.
+const info = reactive({ name: '', email: '', phone: '' })
+const infoTouched = reactive({ name: false })
+const savingInfo = ref(false)
+
+async function saveInfo(): Promise {
+ infoTouched.name = true
+ if (!info.name.trim() || savingInfo.value) return
+ savingInfo.value = true
+ try {
+ client.value = await clientService.update(id, {
+ name: info.name.trim(),
+ email: info.email.trim() || null,
+ phone: info.phone.trim() || null,
+ })
+ } finally {
+ savingInfo.value = false
+ }
+}
+
function goBack(): void {
router.push('/directory')
}
onMounted(async () => {
client.value = await clientService.getById(id)
+ info.name = client.value.name ?? ''
+ info.email = client.value.email ?? ''
+ info.phone = client.value.phone ?? ''
await load()
loading.value = false
})
diff --git a/frontend/modules/directory/pages/directory/prospects/[id].vue b/frontend/modules/directory/pages/directory/prospects/[id].vue
index a67fd46..f2604b5 100644
--- a/frontend/modules/directory/pages/directory/prospects/[id].vue
+++ b/frontend/modules/directory/pages/directory/prospects/[id].vue
@@ -8,6 +8,62 @@
{{ $t('common.loading') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+