fix: refs #8725 customerFiscalData

This commit is contained in:
Javier Segarra 2025-03-05 23:24:11 +01:00
parent 4641adbae3
commit a01f02e31b
2 changed files with 7 additions and 4 deletions

View File

@ -19,7 +19,7 @@ const quasar = useQuasar();
const state = useState();
const stateStore = useStateStore();
const { t } = useI18n();
const { validate } = useValidator();
const { validate, validations } = useValidator();
const { notify } = useNotify();
const route = useRoute();
const myForm = ref(null);
@ -350,6 +350,7 @@ defineExpose({
name="form"
:data="formData"
:validate="validate"
:validations="validations()"
:filter="filter"
/>
<SkeletonForm v-else />

View File

@ -79,7 +79,7 @@ async function acceptPropagate({ isEqualizated }) {
observe-form-changes
@on-data-saved="checkEtChanges"
>
<template #form="{ data, validate }">
<template #form="{ data, validate, validations }">
<VnRow>
<VnInput
:label="t('Social name')"
@ -112,7 +112,7 @@ async function acceptPropagate({ isEqualizated }) {
v-model="data.sageTaxTypeFk"
data-cy="sageTaxTypeFk"
:required="data.isTaxDataChecked"
:rules="[(val) => val !== null || 'Please type your age']"
:rules="[(val) => validations.required(data.isTaxDataChecked, val)]"
/>
<VnSelect
:label="t('Sage transaction type')"
@ -123,7 +123,9 @@ async function acceptPropagate({ isEqualizated }) {
data-cy="sageTransactionTypeFk"
v-model="data.sageTransactionTypeFk"
:required="data.isTaxDataChecked"
:rules="[(val) => val !== null || 'Please type your age']"
:rules="[
(val) => validations.required(data.sageTransactionTypeFk, val),
]"
>
<template #option="scope">
<QItem v-bind="scope.itemProps">