From 5834d7b225f6f0834d836be15d92617419c07978 Mon Sep 17 00:00:00 2001 From: tristan Date: Thu, 4 Jun 2026 15:58:01 +0200 Subject: [PATCH] =?UTF-8?q?feat(commercial)=20:=20onglet=20adresse=20?= =?UTF-8?q?=E2=80=94=20Select=20=C2=AB=20Type=20d'adresse=20=C2=BB=20+=20S?= =?UTF-8?q?ites=20en=20multiselect,=20ligne=201=20r=C3=A9agenc=C3=A9e=20(E?= =?UTF-8?q?RP-110)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Sites Starseed : 3 cases -> multiselect a tags « Sites » (required). - Usage adresse : 3 cases Prospect/Livraison/Facturation -> Select unique « Type d'adresse » (Prospect / Livraison / Facturation / Adresse + Facturation), obligatoire sans option vide, conditionnant le bouton « Valider ». Pur sucre front : le back recoit toujours isProspect/isDelivery/isBilling (aucune RG modifiee), exclusivite Prospect devenue structurelle. - Email de facturation conditionnel (Facturation / Adresse + Facturation) deplace en ligne 1. - Ligne 1 : Type d'adresse | Sites | Contact rattache | Email ; le reste (Categorie, Pays, CP, Ville, Adresse...) en lignes suivantes. - Email : MalioInputText -> MalioInputEmail (lowercase, ERP-101/RG-1.21) sur facturation ET contact. - Helpers front testables addressFlagsFromType / addressTypeFromFlags + gating canValidateAddresses (type obligatoire) dans new.vue / edit.vue. --- frontend/i18n/locales/fr.json | 7 +- .../components/ClientAddressBlock.vue | 143 ++++++++---------- .../components/ClientContactBlock.vue | 1 + .../commercial/pages/clients/[id]/edit.vue | 4 +- .../modules/commercial/pages/clients/new.vue | 7 +- .../utils/__tests__/clientFormRules.spec.ts | 28 ++++ .../commercial/utils/clientFormRules.ts | 39 +++++ 7 files changed, 146 insertions(+), 83 deletions(-) diff --git a/frontend/i18n/locales/fr.json b/frontend/i18n/locales/fr.json index 5744828..cf7bc63 100644 --- a/frontend/i18n/locales/fr.json +++ b/frontend/i18n/locales/fr.json @@ -168,13 +168,18 @@ "prospect": "Prospect", "delivery": "Adresse de livraison", "billing": "Facturation", + "addressType": "Type d'adresse", + "addressTypeProspect": "Prospect", + "addressTypeDelivery": "Livraison", + "addressTypeBilling": "Facturation", + "addressTypeDeliveryBilling": "Adresse + Facturation", "categories": "Catégorie", "country": "Pays", "postalCode": "Code postal", "city": "Ville", "street": "Adresse", "streetComplement": "Adresse complémentaire", - "sites": "Sites Starseed", + "sites": "Sites", "contacts": "Contact(s) rattaché(s)", "billingEmail": "Email de facturation", "remove": "Supprimer l'adresse", diff --git a/frontend/modules/commercial/components/ClientAddressBlock.vue b/frontend/modules/commercial/components/ClientAddressBlock.vue index ee6e08b..1745a4b 100644 --- a/frontend/modules/commercial/components/ClientAddressBlock.vue +++ b/frontend/modules/commercial/components/ClientAddressBlock.vue @@ -10,34 +10,53 @@ @click="$emit('remove')" /> - - + - - - -