From f2d945b0c31ad8db26a545c21290c9e79fc2d647 Mon Sep 17 00:00:00 2001 From: Matthieu Date: Tue, 23 Jun 2026 16:04:02 +0200 Subject: [PATCH] fix(directory) : persist contacts/addresses on explicit save instead of on blur Hold contact/address block edits in memory and persist them via explicit saveContacts/saveAddresses on click (with saving guards), matching the task forms. Keep immediate deletion. Minor restyle of blocks and action buttons. --- .../components/CommercialReportTab.vue | 6 +- .../components/DirectoryAddressBlock.vue | 8 +- .../components/DirectoryContactBlock.vue | 8 +- .../composables/useDirectoryDetail.ts | 99 ++++++++++++------- .../pages/directory/clients/[id].vue | 50 +++++++--- .../pages/directory/prospects/[id].vue | 50 +++++++--- 6 files changed, 147 insertions(+), 74 deletions(-) diff --git a/frontend/modules/directory/components/CommercialReportTab.vue b/frontend/modules/directory/components/CommercialReportTab.vue index e29c78c..9374caf 100644 --- a/frontend/modules/directory/components/CommercialReportTab.vue +++ b/frontend/modules/directory/components/CommercialReportTab.vue @@ -1,7 +1,7 @@ @@ -40,13 +49,22 @@ @update:model-value="(v) => onAddressInput(i, v)" @remove="removeAddress(i)" /> - +
+ + +
@@ -76,12 +94,16 @@ const prospectService = useProspectService() const { contacts, addresses, + savingContacts, + savingAddresses, onContactInput, addContact, removeContact, + saveContacts, onAddressInput, addAddress, removeAddress, + saveAddresses, load, } = useDirectoryDetail(owner)