diff --git a/frontend/i18n/locales/fr.json b/frontend/i18n/locales/fr.json
index 9c9c74a..1cc9e5f 100644
--- a/frontend/i18n/locales/fr.json
+++ b/frontend/i18n/locales/fr.json
@@ -24,7 +24,9 @@
"updated": "Client mis à jour avec succès.",
"deleted": "Client supprimé avec succès.",
"addClient": "Ajouter un client",
- "editClient": "Modifier un client"
+ "editClient": "Modifier un client",
+ "deleteConfirmTitle": "Supprimer le client",
+ "deleteConfirmMessage": "Êtes-vous sûr de vouloir supprimer le client « {name} » ? Cette action est irréversible."
},
"projects": {
"title": "Projets",
@@ -908,6 +910,8 @@
"editProspect": "Modifier un prospect",
"convert": "Convertir en client",
"alreadyConverted": "Déjà converti en client",
+ "deleteConfirmTitle": "Supprimer le prospect",
+ "deleteConfirmMessage": "Êtes-vous sûr de vouloir supprimer le prospect « {name} » ? Cette action est irréversible.",
"fields": {
"name": "Nom",
"company": "Société",
diff --git a/frontend/modules/directory/components/ConfirmDeleteModal.vue b/frontend/modules/directory/components/ConfirmDeleteModal.vue
new file mode 100644
index 0000000..983750c
--- /dev/null
+++ b/frontend/modules/directory/components/ConfirmDeleteModal.vue
@@ -0,0 +1,58 @@
+
+
+
+
+
+
+
{{ title }}
+
+ {{ message }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/modules/directory/pages/directory/index.vue b/frontend/modules/directory/pages/directory/index.vue
index 3803d64..e0fe487 100644
--- a/frontend/modules/directory/pages/directory/index.vue
+++ b/frontend/modules/directory/pages/directory/index.vue
@@ -31,6 +31,17 @@
{{ (item as Client).phone ?? '—' }}
+
+
+
+
+
@@ -75,20 +86,23 @@
{{ (item as ProspectRow).phone ?? '—' }}
-
@@ -105,6 +119,13 @@
:prospect="selectedProspect"
@saved="onProspectSaved"
/>
+
+
@@ -139,6 +160,7 @@ const clientColumns = [
{ key: 'name', label: t('prospects.fields.name') },
{ key: 'email', label: t('prospects.fields.email') },
{ key: 'phone', label: t('prospects.fields.phone') },
+ { key: 'actions', label: '' },
]
async function loadClients() {
@@ -225,6 +247,54 @@ async function onProspectSaved() {
await Promise.all([loadProspects(), loadClients()])
}
+// --- Suppression (clients & prospects) ---
+type DeleteTarget =
+ | { type: 'client'; item: Client }
+ | { type: 'prospect'; item: Prospect }
+
+const deleteModalOpen = ref(false)
+const deleteTarget = ref(null)
+
+const deleteModalTitle = computed(() =>
+ deleteTarget.value?.type === 'prospect'
+ ? t('prospects.deleteConfirmTitle')
+ : t('clients.deleteConfirmTitle'),
+)
+
+const deleteModalMessage = computed(() => {
+ if (!deleteTarget.value) return ''
+ const name = deleteTarget.value.item.name
+ return deleteTarget.value.type === 'prospect'
+ ? t('prospects.deleteConfirmMessage', { name })
+ : t('clients.deleteConfirmMessage', { name })
+})
+
+function askDeleteClient(item: Client) {
+ deleteTarget.value = { type: 'client', item }
+ deleteModalOpen.value = true
+}
+
+function askDeleteProspect(item: Prospect) {
+ deleteTarget.value = { type: 'prospect', item }
+ deleteModalOpen.value = true
+}
+
+async function confirmDelete() {
+ const target = deleteTarget.value
+ if (!target) return
+
+ if (target.type === 'client') {
+ await clientService.remove(target.item.id)
+ await loadClients()
+ } else {
+ await prospectService.remove(target.item.id)
+ await loadProspects()
+ }
+
+ deleteModalOpen.value = false
+ deleteTarget.value = null
+}
+
watch(statusFilter, loadProspects)
onMounted(async () => {