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 @@ - +