feat(commercial) : onglet adresse — Select « Type d'adresse » + Sites en multiselect, ligne 1 réagencée (ERP-110)
- 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.
This commit is contained in:
@@ -410,6 +410,7 @@ import {
|
||||
type MainFormDraft,
|
||||
} from '~/modules/commercial/utils/clientEdit'
|
||||
import {
|
||||
addressTypeFromFlags,
|
||||
buildClientFormTabKeys,
|
||||
hasAllRequiredAccountingFields,
|
||||
hasAtLeastOneValidContact,
|
||||
@@ -789,7 +790,8 @@ const canValidateAddresses = computed(() =>
|
||||
addresses.value.length > 0
|
||||
&& addresses.value.every((a) => {
|
||||
const filledBillingEmail = a.billingEmail !== null && a.billingEmail.trim() !== ''
|
||||
return a.siteIris.length >= 1
|
||||
return addressTypeFromFlags(a) !== null
|
||||
&& a.siteIris.length >= 1
|
||||
&& a.categoryIris.length >= 1
|
||||
&& (!isBillingEmailRequired(a) || filledBillingEmail)
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user