#8725 - submit_form_onClick #1564

Merged
jsegarra merged 25 commits from 8725_submit_form_onClick into dev 2025-04-08 12:58:52 +00:00
2 changed files with 7 additions and 4 deletions
Showing only changes of commit a01f02e31b - Show all commits

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">