feat(commercial) : 2e email de facturation optionnel sur l'adresse client (ERP-119)
Pendant du telephone secondaire (max 2). Bump @malio/layer-ui 1.7.8 (prop addable du MalioInputEmail). - back : colonne billing_email_secondary (migration + COMMENT + catalogue), propriete ClientAddress (Email + Length), Callback etendu (2e email interdit hors facturation, optionnel sinon), normalisation lowercase au Processor. - front : draft + flag UI hasSecondaryBillingEmail, mappers, payloads, champ MalioInputEmail :addable -> revele un 2e champ ; layout : 2e email qui coule dans la grille et Adresse complementaire sur une colonne. - tests back (2 emails / 2e email hors facturation) et front (payload).
This commit is contained in:
@@ -63,6 +63,7 @@ export interface AddressRead extends HydraRef {
|
||||
street?: string | null
|
||||
streetComplement?: string | null
|
||||
billingEmail?: string | null
|
||||
billingEmailSecondary?: string | null
|
||||
isProspect?: boolean
|
||||
isDelivery?: boolean
|
||||
isBilling?: boolean
|
||||
@@ -222,6 +223,8 @@ export function mapAddressToDraft(address: AddressRead): AddressFormDraft {
|
||||
siteIris: (address.sites ?? []).map(s => s['@id']),
|
||||
contactIris: (address.contacts ?? []).map(c => (typeof c === 'string' ? c : c['@id'])),
|
||||
billingEmail: address.billingEmail ?? null,
|
||||
billingEmailSecondary: address.billingEmailSecondary ?? null,
|
||||
hasSecondaryBillingEmail: (address.billingEmailSecondary ?? null) !== null && address.billingEmailSecondary !== '',
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user