0
0
Fork 0

perf: examples

This commit is contained in:
Javier Segarra 2024-07-16 11:25:28 +02:00
parent bd359d13e4
commit 734f8807ff
4 changed files with 11 additions and 16 deletions

View File

@ -53,12 +53,15 @@ onMounted(async () => {
> >
<template #form-inputs="{ data, validate }"> <template #form-inputs="{ data, validate }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<VnInput :label="t('name')" v-model="data.name" :required="true" /> <VnInput
:label="t('name')"
v-model="data.name"
:rules="validate('bankEntity.name')"
/>
<VnInput <VnInput
ref="bicInputRef" ref="bicInputRef"
:label="t('swift')" :label="t('swift')"
v-model="data.bic" v-model="data.bic"
:required="true"
:rules="validate('bankEntity.bic')" :rules="validate('bankEntity.bic')"
/> />
</VnRow> </VnRow>
@ -71,17 +74,11 @@ onMounted(async () => {
option-value="id" option-value="id"
option-label="name" option-label="name"
hide-selected hide-selected
:required="true"
:rules="validate('bankEntity.countryFk')" :rules="validate('bankEntity.countryFk')"
/> />
</div> </div>
<div v-if="showEntityField" class="col"> <div v-if="showEntityField" class="col">
<VnInput <VnInput :label="t('id')" v-model="data.id" :required="true" />
:label="t('id')"
v-model="data.id"
:required="true"
:rules="validate('city.name')"
/>
</div> </div>
</VnRow> </VnRow>
</template> </template>

View File

@ -56,12 +56,7 @@ const getBankEntities = (data, formData) => {
option-value="id" option-value="id"
v-model="data.payMethod" v-model="data.payMethod"
/> />
<VnInput <VnInput :label="t('Due day')" clearable v-model="data.dueDay" />
:label="t('Due day')"
clearable
v-model="data.dueDay"
:required="true"
/>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">

View File

@ -88,6 +88,7 @@ const redirectToEntryBasicData = (_, { id }) => {
option-label="nickname" option-label="nickname"
hide-selected hide-selected
:required="true" :required="true"
:rules="validate('entry.supplierFk')"
> >
<template #option="scope"> <template #option="scope">
<QItem v-bind="scope.itemProps"> <QItem v-bind="scope.itemProps">

View File

@ -130,7 +130,7 @@ const redirectToTicketList = (_, { id }) => {
:form-initial-data="initialFormState" :form-initial-data="initialFormState"
@on-data-saved="redirectToTicketList" @on-data-saved="redirectToTicketList"
> >
<template #form="{ data }"> <template #form="{ data, validate }">
<VnRow class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <div class="col">
<VnSelect <VnSelect
@ -140,6 +140,7 @@ const redirectToTicketList = (_, { id }) => {
option-value="id" option-value="id"
option-label="name" option-label="name"
hide-selected hide-selected
:required="true"
@update:model-value="(client) => onClientSelected(data)" @update:model-value="(client) => onClientSelected(data)"
> >
<template #option="scope"> <template #option="scope">
@ -190,6 +191,7 @@ const redirectToTicketList = (_, { id }) => {
placeholder="dd-mm-aaa" placeholder="dd-mm-aaa"
:label="t('ticket.create.landed')" :label="t('ticket.create.landed')"
v-model="data.landed" v-model="data.landed"
:rules="validate('ticket.shipped')"
@update:model-value="() => fetchAvailableAgencies(data)" @update:model-value="() => fetchAvailableAgencies(data)"
/> />
</div> </div>