diff --git a/frontend/i18n/locales/fr.json b/frontend/i18n/locales/fr.json index 56e766d..4fe39f8 100644 --- a/frontend/i18n/locales/fr.json +++ b/frontend/i18n/locales/fr.json @@ -441,6 +441,7 @@ "categoryRequired": "Sélectionnez au moins une catégorie." }, "contact": { + "title": "Contact {n}", "lastName": "Nom", "firstName": "Prénom", "jobTitle": "Fonction", @@ -637,6 +638,7 @@ "degraded": "Service d'adresse indisponible : saisie de la ville et de l'adresse en mode libre." }, "contact": { + "title": "Contact {n}", "lastName": "Nom", "firstName": "Prénom", "jobTitle": "Fonction", diff --git a/frontend/modules/commercial/components/ClientContactBlock.vue b/frontend/modules/commercial/components/ClientContactBlock.vue index f2e466f..a2dfa65 100644 --- a/frontend/modules/commercial/components/ClientContactBlock.vue +++ b/frontend/modules/commercial/components/ClientContactBlock.vue @@ -1,84 +1,93 @@ @@ -98,6 +107,8 @@ const props = defineProps<{ title: string /** Affiche l'icone de suppression (1er bloc non supprimable, RG-1.14). */ removable?: boolean + /** Dernier bloc de la liste : supprime le filet de separation bas. */ + last?: boolean /** Bloc en lecture seule (onglet valide). */ readonly?: boolean /** Bloc desactive (champs grises, consultation — distinct de readonly). */ diff --git a/frontend/modules/commercial/components/SupplierContactBlock.vue b/frontend/modules/commercial/components/SupplierContactBlock.vue index 497e3cb..ac0d3c6 100644 --- a/frontend/modules/commercial/components/SupplierContactBlock.vue +++ b/frontend/modules/commercial/components/SupplierContactBlock.vue @@ -1,83 +1,92 @@ @@ -96,6 +105,8 @@ const props = defineProps<{ title: string /** Affiche l'icone de suppression (1er bloc non supprimable, RG-2.13). */ removable?: boolean + /** Dernier bloc de la liste : supprime le filet de separation bas. */ + last?: boolean /** Bloc en lecture seule (onglet valide). */ readonly?: boolean /** Bloc desactive (champs grises, consultation — distinct de readonly). */ diff --git a/frontend/modules/commercial/pages/clients/[id]/edit.vue b/frontend/modules/commercial/pages/clients/[id]/edit.vue index 2ce78f3..1dd766e 100644 --- a/frontend/modules/commercial/pages/clients/[id]/edit.vue +++ b/frontend/modules/commercial/pages/clients/[id]/edit.vue @@ -178,6 +178,7 @@ :model-value="contact" :title="t('commercial.clients.form.contact.title', { n: index + 1 })" :removable="isRowRemovable(contacts, index)" + :last="index === contacts.length - 1" :disabled="businessReadonly" :errors="contactErrors[index]" @update:model-value="(v) => contacts[index] = v" diff --git a/frontend/modules/commercial/pages/clients/[id]/index.vue b/frontend/modules/commercial/pages/clients/[id]/index.vue index c4f1546..72dacdb 100644 --- a/frontend/modules/commercial/pages/clients/[id]/index.vue +++ b/frontend/modules/commercial/pages/clients/[id]/index.vue @@ -156,6 +156,7 @@ :key="contact.id ?? index" :model-value="contact" :title="t('commercial.clients.form.contact.title', { n: index + 1 })" + :last="index === contacts.length - 1" disabled hide-empty /> diff --git a/frontend/modules/commercial/pages/clients/new.vue b/frontend/modules/commercial/pages/clients/new.vue index 9a78628..42349e0 100644 --- a/frontend/modules/commercial/pages/clients/new.vue +++ b/frontend/modules/commercial/pages/clients/new.vue @@ -177,6 +177,7 @@ :model-value="contact" :title="t('commercial.clients.form.contact.title', { n: index + 1 })" :removable="isRowRemovable(contacts, index)" + :last="index === contacts.length - 1" :disabled="isValidated('contact')" :errors="contactErrors[index]" @update:model-value="(v) => contacts[index] = v" diff --git a/frontend/modules/commercial/pages/suppliers/[id]/edit.vue b/frontend/modules/commercial/pages/suppliers/[id]/edit.vue index 71b1de8..0355031 100644 --- a/frontend/modules/commercial/pages/suppliers/[id]/edit.vue +++ b/frontend/modules/commercial/pages/suppliers/[id]/edit.vue @@ -147,6 +147,7 @@ :model-value="contact" :title="t('commercial.suppliers.form.contact.title', { n: index + 1 })" :removable="isRowRemovable(contacts, index)" + :last="index === contacts.length - 1" :disabled="businessReadonly" :errors="contactErrors[index]" @update:model-value="(v) => contacts[index] = v" diff --git a/frontend/modules/commercial/pages/suppliers/[id]/index.vue b/frontend/modules/commercial/pages/suppliers/[id]/index.vue index 7b3dbb2..c431cf2 100644 --- a/frontend/modules/commercial/pages/suppliers/[id]/index.vue +++ b/frontend/modules/commercial/pages/suppliers/[id]/index.vue @@ -137,6 +137,7 @@ :key="contact.id ?? index" :model-value="contact" :title="t('commercial.suppliers.form.contact.title', { n: index + 1 })" + :last="index === contacts.length - 1" disabled hide-empty /> diff --git a/frontend/modules/commercial/pages/suppliers/new.vue b/frontend/modules/commercial/pages/suppliers/new.vue index 996da50..c0249be 100644 --- a/frontend/modules/commercial/pages/suppliers/new.vue +++ b/frontend/modules/commercial/pages/suppliers/new.vue @@ -145,6 +145,7 @@ :model-value="contact" :title="t('commercial.suppliers.form.contact.title', { n: index + 1 })" :removable="isRowRemovable(contacts, index)" + :last="index === contacts.length - 1" :disabled="isValidated('contacts')" :errors="contactErrors[index]" @update:model-value="(v) => contacts[index] = v" diff --git a/frontend/modules/technique/components/ProviderContactBlock.vue b/frontend/modules/technique/components/ProviderContactBlock.vue index 775ae67..d48dc2a 100644 --- a/frontend/modules/technique/components/ProviderContactBlock.vue +++ b/frontend/modules/technique/components/ProviderContactBlock.vue @@ -1,84 +1,93 @@ @@ -93,8 +102,12 @@ const PHONE_MASK = '## ## ## ## ##' const props = defineProps<{ /** Brouillon du contact (v-model). */ modelValue: ProviderContactFormDraft + /** Titre du bloc (ex: « Contact 1 »). */ + title: string /** Affiche l'icone de suppression (1er bloc non supprimable). */ removable?: boolean + /** Dernier bloc de la liste : supprime le filet de separation bas. */ + last?: boolean /** Bloc en lecture seule (onglet valide). */ readonly?: boolean /** Bloc desactive (champs grises, consultation — distinct de readonly). */ diff --git a/frontend/modules/technique/components/__tests__/ProviderContactBlock.spec.ts b/frontend/modules/technique/components/__tests__/ProviderContactBlock.spec.ts index 928a2d7..412fcc9 100644 --- a/frontend/modules/technique/components/__tests__/ProviderContactBlock.spec.ts +++ b/frontend/modules/technique/components/__tests__/ProviderContactBlock.spec.ts @@ -29,6 +29,7 @@ function mountBlock(errors?: Record) { return mount(ProviderContactBlock, { props: { modelValue: emptyProviderContact(), + title: 'Contact 1', ...(errors ? { errors } : {}), }, global: { diff --git a/frontend/modules/technique/pages/providers/[id]/edit.vue b/frontend/modules/technique/pages/providers/[id]/edit.vue index 9eb564a..542296c 100644 --- a/frontend/modules/technique/pages/providers/[id]/edit.vue +++ b/frontend/modules/technique/pages/providers/[id]/edit.vue @@ -72,7 +72,9 @@ v-for="(contact, index) in contacts" :key="index" :model-value="contact" + :title="t('technique.providers.form.contact.title', { n: index + 1 })" :removable="isRowRemovable(contacts, index)" + :last="index === contacts.length - 1" :disabled="businessReadonly" :errors="contactErrors[index]" @update:model-value="(v) => contacts[index] = v" diff --git a/frontend/modules/technique/pages/providers/[id]/index.vue b/frontend/modules/technique/pages/providers/[id]/index.vue index b437385..442030a 100644 --- a/frontend/modules/technique/pages/providers/[id]/index.vue +++ b/frontend/modules/technique/pages/providers/[id]/index.vue @@ -81,6 +81,8 @@ v-for="(contact, index) in contacts" :key="index" :model-value="contact" + :title="t('technique.providers.form.contact.title', { n: index + 1 })" + :last="index === contacts.length - 1" disabled hide-empty /> diff --git a/frontend/modules/technique/pages/providers/new.vue b/frontend/modules/technique/pages/providers/new.vue index 7e66ed4..48385fe 100644 --- a/frontend/modules/technique/pages/providers/new.vue +++ b/frontend/modules/technique/pages/providers/new.vue @@ -73,7 +73,9 @@ v-for="(contact, index) in contacts" :key="index" :model-value="contact" + :title="t('technique.providers.form.contact.title', { n: index + 1 })" :removable="isRowRemovable(contacts, index)" + :last="index === contacts.length - 1" :disabled="isValidated('contact')" :errors="contactErrors[index]" @update:model-value="(v) => contacts[index] = v" diff --git a/frontend/modules/transport/components/CarrierContactBlock.vue b/frontend/modules/transport/components/CarrierContactBlock.vue index 0aba015..f1ce8a4 100644 --- a/frontend/modules/transport/components/CarrierContactBlock.vue +++ b/frontend/modules/transport/components/CarrierContactBlock.vue @@ -1,84 +1,93 @@ @@ -93,8 +102,12 @@ const PHONE_MASK = '## ## ## ## ##' const props = defineProps<{ /** Brouillon du contact (v-model). */ modelValue: CarrierContactFormDraft + /** Titre du bloc (ex: « Contact 1 »). */ + title: string /** Affiche l'icône de suppression (1er bloc non supprimable). */ removable?: boolean + /** Dernier bloc de la liste : supprime le filet de separation bas. */ + last?: boolean /** Bloc en lecture seule (onglet validé). */ readonly?: boolean /** Bloc desactive (champs grises, consultation — distinct de readonly). */ diff --git a/frontend/modules/transport/pages/carriers/[id]/edit.vue b/frontend/modules/transport/pages/carriers/[id]/edit.vue index 786ed73..67fff98 100644 --- a/frontend/modules/transport/pages/carriers/[id]/edit.vue +++ b/frontend/modules/transport/pages/carriers/[id]/edit.vue @@ -160,7 +160,9 @@ v-for="(contact, index) in contacts" :key="index" :model-value="contact" + :title="t('transport.carriers.form.contact.title', { n: index + 1 })" :removable="isRowRemovable(contacts, index)" + :last="index === contacts.length - 1" :errors="contactErrors[index]" @update:model-value="(v) => contacts[index] = v" @remove="askRemoveContact(index)" diff --git a/frontend/modules/transport/pages/carriers/[id]/index.vue b/frontend/modules/transport/pages/carriers/[id]/index.vue index e98f97d..89ae325 100644 --- a/frontend/modules/transport/pages/carriers/[id]/index.vue +++ b/frontend/modules/transport/pages/carriers/[id]/index.vue @@ -136,6 +136,8 @@ v-for="(contact, index) in contacts" :key="index" :model-value="contact" + :title="t('transport.carriers.form.contact.title', { n: index + 1 })" + :last="index === contacts.length - 1" disabled hide-empty /> diff --git a/frontend/modules/transport/pages/carriers/new.vue b/frontend/modules/transport/pages/carriers/new.vue index 42fdfcd..57a5b35 100644 --- a/frontend/modules/transport/pages/carriers/new.vue +++ b/frontend/modules/transport/pages/carriers/new.vue @@ -207,7 +207,9 @@ v-for="(contact, index) in contacts" :key="index" :model-value="contact" + :title="t('transport.carriers.form.contact.title', { n: index + 1 })" :removable="isRowRemovable(contacts, index)" + :last="index === contacts.length - 1" :disabled="isValidated('contacts')" :errors="contactErrors[index]" @update:model-value="(v) => contacts[index] = v"