From 13266681e2405a7e6f8a591c2689252d31b06563 Mon Sep 17 00:00:00 2001 From: tristan Date: Wed, 3 Jun 2026 16:17:41 +0200 Subject: [PATCH] fix(front) : option vide sur le select Distributeur / Courtier MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sans option vide, une fois une relation selectionnee on ne pouvait plus revenir a « aucune relation ». Ajoute l'option « Aucun » (value null) via empty-option-label sur les ecrans creation et modification ; onRelationChange gere deja le retour a null (reset des FK distributor/broker). --- frontend/i18n/locales/fr.json | 1 + frontend/modules/commercial/pages/clients/[id]/edit.vue | 1 + frontend/modules/commercial/pages/clients/new.vue | 1 + 3 files changed, 3 insertions(+) diff --git a/frontend/i18n/locales/fr.json b/frontend/i18n/locales/fr.json index 6e99ccc..86651f0 100644 --- a/frontend/i18n/locales/fr.json +++ b/frontend/i18n/locales/fr.json @@ -135,6 +135,7 @@ "companyName": "Nom du client (Entreprise)", "categories": "Catégorie", "relation": "Distributeur / Courtier", + "relationNone": "Aucun", "relationDistributor": "Dépend du distributeur", "relationBroker": "Dépend du courtier", "distributorName": "Nom du distributeur", diff --git a/frontend/modules/commercial/pages/clients/[id]/edit.vue b/frontend/modules/commercial/pages/clients/[id]/edit.vue index a109988..23b955f 100644 --- a/frontend/modules/commercial/pages/clients/[id]/edit.vue +++ b/frontend/modules/commercial/pages/clients/[id]/edit.vue @@ -41,6 +41,7 @@ :model-value="main.relationType" :options="relationOptions" :label="t('commercial.clients.form.main.relation')" + :empty-option-label="t('commercial.clients.form.main.relationNone')" :disabled="businessReadonly" @update:model-value="onRelationChange" /> diff --git a/frontend/modules/commercial/pages/clients/new.vue b/frontend/modules/commercial/pages/clients/new.vue index 41b015d..e29da36 100644 --- a/frontend/modules/commercial/pages/clients/new.vue +++ b/frontend/modules/commercial/pages/clients/new.vue @@ -35,6 +35,7 @@ :model-value="main.relationType" :options="relationOptions" :label="t('commercial.clients.form.main.relation')" + :empty-option-label="t('commercial.clients.form.main.relationNone')" :disabled="mainLocked" @update:model-value="onRelationChange" />