fix: form employee disable rule validate
This commit is contained in:
parent
70664067e5
commit
60431904ce
5 changed files with 131 additions and 59 deletions
|
|
@ -71,11 +71,11 @@ onMounted(async () => {
|
|||
class="col-3"
|
||||
:options="visaTypeOption"
|
||||
lazy-rules
|
||||
:rules="[
|
||||
/>
|
||||
<!-- :rules="[
|
||||
(val: string) =>
|
||||
!!val || $t('selectValidate') + $t('formDialogInputVisaType'),
|
||||
]"
|
||||
/>
|
||||
]" -->
|
||||
<q-input
|
||||
for="input-visa-no"
|
||||
:dense="dense"
|
||||
|
|
@ -86,11 +86,11 @@ onMounted(async () => {
|
|||
class="col-3"
|
||||
:label="$t('formDialogInputVisaNo')"
|
||||
v-model="visaNumber"
|
||||
:rules="[
|
||||
/>
|
||||
<!-- :rules="[
|
||||
(val: string) =>
|
||||
!!val || $t('inputValidate') + $t('formDialogInputVisaNo'),
|
||||
]"
|
||||
/>
|
||||
]" -->
|
||||
<VueDatePicker
|
||||
id="date-picker-visa-issuance"
|
||||
utc
|
||||
|
|
@ -115,11 +115,11 @@ onMounted(async () => {
|
|||
:readonly="readonly"
|
||||
:borderless="readonly"
|
||||
:model-value="visaIssueDate ? dateFormat(visaIssueDate) : ''"
|
||||
:rules="[
|
||||
>
|
||||
<!-- :rules="[
|
||||
(val: string) =>
|
||||
!!val || $t('selectValidate') + $t('formDialogInputVisaIssuance'),
|
||||
]"
|
||||
>
|
||||
]" -->
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
size="xs"
|
||||
|
|
@ -128,6 +128,15 @@ onMounted(async () => {
|
|||
color="positive"
|
||||
/>
|
||||
</template>
|
||||
<template v-slot:append>
|
||||
<q-icon
|
||||
v-if="visaIssueDate && !readonly"
|
||||
name="mdi-close"
|
||||
class="cursor-pointer"
|
||||
size="xs"
|
||||
@click="visaIssueDate = undefined"
|
||||
/>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</VueDatePicker>
|
||||
|
|
@ -155,11 +164,11 @@ onMounted(async () => {
|
|||
:readonly="readonly"
|
||||
:borderless="readonly"
|
||||
:model-value="visaExpiryDate ? dateFormat(visaExpiryDate) : ''"
|
||||
:rules="[
|
||||
>
|
||||
<!-- :rules="[
|
||||
(val: string) =>
|
||||
!!val || $t('selectValidate') + $t('formDialogInputVisaExpire'),
|
||||
]"
|
||||
>
|
||||
]" -->
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
size="xs"
|
||||
|
|
@ -168,6 +177,15 @@ onMounted(async () => {
|
|||
color="positive"
|
||||
/>
|
||||
</template>
|
||||
<template v-slot:append>
|
||||
<q-icon
|
||||
v-if="visaExpiryDate && !readonly"
|
||||
name="mdi-close"
|
||||
class="cursor-pointer"
|
||||
size="xs"
|
||||
@click="visaExpiryDate = undefined"
|
||||
/>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</VueDatePicker>
|
||||
|
|
@ -181,11 +199,11 @@ onMounted(async () => {
|
|||
class="col-6"
|
||||
:label="$t('formDialogInputVisaPlace')"
|
||||
v-model="visaIssuingPlace"
|
||||
:rules="[
|
||||
/>
|
||||
<!-- :rules="[
|
||||
(val: string) =>
|
||||
!!val || $t('selectValidate') + $t('formDialogInputVisaPlace'),
|
||||
]"
|
||||
/>
|
||||
]" -->
|
||||
<VueDatePicker
|
||||
id="date-picker-visa-until"
|
||||
utc
|
||||
|
|
@ -210,12 +228,12 @@ onMounted(async () => {
|
|||
:readonly="readonly"
|
||||
:borderless="readonly"
|
||||
:model-value="visaStayUntilDate ? dateFormat(visaStayUntilDate) : ''"
|
||||
:rules="[
|
||||
>
|
||||
<!-- :rules="[
|
||||
(val: string) =>
|
||||
!!val ||
|
||||
$t('selectValidate') + $t('formDialogInputVisaStayUntil'),
|
||||
]"
|
||||
>
|
||||
]" -->
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
size="xs"
|
||||
|
|
@ -246,11 +264,11 @@ onMounted(async () => {
|
|||
class="col-6"
|
||||
:label="$t('formDialogInputVisaTM6')"
|
||||
v-model="tm6Number"
|
||||
:rules="[
|
||||
/>
|
||||
<!-- :rules="[
|
||||
(val: string) =>
|
||||
!!val || $t('inputValidate') + $t('formDialogInputVisaTM6'),
|
||||
]"
|
||||
/>
|
||||
]" -->
|
||||
<VueDatePicker
|
||||
id="date-picker-visa-enter"
|
||||
utc
|
||||
|
|
@ -274,11 +292,11 @@ onMounted(async () => {
|
|||
:readonly="readonly"
|
||||
:borderless="readonly"
|
||||
:model-value="entryDate ? dateFormat(entryDate) : ''"
|
||||
:rules="[
|
||||
>
|
||||
<!-- :rules="[
|
||||
(val: string) =>
|
||||
!!val || $t('selectValidate') + $t('formDialogInputVisaEnter'),
|
||||
]"
|
||||
>
|
||||
]" -->
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
size="xs"
|
||||
|
|
@ -287,6 +305,15 @@ onMounted(async () => {
|
|||
color="positive"
|
||||
/>
|
||||
</template>
|
||||
<template v-slot:append>
|
||||
<q-icon
|
||||
v-if="entryDate && !readonly"
|
||||
name="mdi-close"
|
||||
class="cursor-pointer"
|
||||
size="xs"
|
||||
@click="entryDate = undefined"
|
||||
/>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</VueDatePicker>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue