From 80f189033b14e09ac833309347fe8147aa9e80f0 Mon Sep 17 00:00:00 2001 From: tristan Date: Thu, 4 Jun 2026 09:15:54 +0200 Subject: [PATCH] feat(front) : malio-ui 1.7.4, required/readonly et carrousel onglets sur les ecrans client - bump @malio/layer-ui ^1.7.3 -> ^1.7.4 - required sur les champs obligatoires (categories, distributeur/courtier, banque si virement, RIB si LCR) desormais supportes par les Malio* - consultation/edition : champs passes en readonly (au lieu de disabled) pour les etats sans droit de modification / lecture seule - MalioTabList : carrousel (max 5 onglets visibles, max-width 1100px) en consultation et edition --- .../components/ClientAddressBlock.vue | 9 +-- .../commercial/pages/clients/[id]/edit.vue | 31 +++++---- .../commercial/pages/clients/[id]/index.vue | 20 +++--- .../modules/commercial/pages/clients/new.vue | 29 +++++---- frontend/package-lock.json | 63 +++++++++++-------- frontend/package.json | 2 +- 6 files changed, 90 insertions(+), 64 deletions(-) diff --git a/frontend/modules/commercial/components/ClientAddressBlock.vue b/frontend/modules/commercial/components/ClientAddressBlock.vue index ed5f645..efc9240 100644 --- a/frontend/modules/commercial/components/ClientAddressBlock.vue +++ b/frontend/modules/commercial/components/ClientAddressBlock.vue @@ -44,7 +44,8 @@ :options="categoryOptions" :label="t('commercial.clients.form.address.categories')" :display-tag="true" - :disabled="readonly" + :readonly="readonly" + :required="true" @update:model-value="(v: (string | number)[]) => update('categoryIris', v.map(String))" /> @@ -52,7 +53,7 @@ :model-value="model.country" :options="countryOptions" :label="t('commercial.clients.form.address.country')" - :disabled="readonly" + :readonly="readonly" @update:model-value="(v: string | number | null) => update('country', String(v ?? 'France'))" /> @@ -72,7 +73,7 @@ :model-value="model.city" :options="cityOptions" :label="t('commercial.clients.form.address.city')" - :disabled="readonly" + :readonly="readonly" empty-option-label="" :error="errors?.city" @update:model-value="(v: string | number | null) => update('city', v === null ? null : String(v))" @@ -145,7 +146,7 @@ :options="contactOptions" :label="t('commercial.clients.form.address.contacts')" :display-tag="true" - :disabled="readonly" + :readonly="readonly" @update:model-value="(v: (string | number)[]) => update('contactIris', v.map(String))" /> diff --git a/frontend/modules/commercial/pages/clients/[id]/edit.vue b/frontend/modules/commercial/pages/clients/[id]/edit.vue index 0a2b655..d60bc04 100644 --- a/frontend/modules/commercial/pages/clients/[id]/edit.vue +++ b/frontend/modules/commercial/pages/clients/[id]/edit.vue @@ -35,7 +35,8 @@ :options="mainCategoryOptions" :label="t('commercial.clients.form.main.categories')" :display-tag="true" - :disabled="businessReadonly" + :readonly="businessReadonly" + :required="true" :error="mainErrors.errors.categories" @update:model-value="(v: (string | number)[]) => main.categoryIris = v.map(String)" /> @@ -44,7 +45,7 @@ :options="relationOptions" :label="t('commercial.clients.form.main.relation')" :empty-option-label="t('commercial.clients.form.main.relationNone')" - :disabled="businessReadonly" + :readonly="businessReadonly" @update:model-value="onRelationChange" /> @@ -61,7 +63,8 @@ :model-value="main.distributorIri" :options="distributorOptions" :label="t('commercial.clients.form.main.distributorName')" - :disabled="businessReadonly" + :readonly="businessReadonly" + :required="true" :error="mainErrors.errors.distributor" @update:model-value="(v: string | number | null) => main.distributorIri = v === null ? null : String(v)" /> @@ -83,7 +86,7 @@ - +