refactor: misc
This commit is contained in:
parent
c22e3a4c52
commit
18efaa48b6
10 changed files with 214 additions and 68 deletions
|
|
@ -371,6 +371,7 @@ watch(
|
|||
const today = new Date();
|
||||
const date = parseAndFormatDate(v, locale);
|
||||
birthDate = date && date > today ? today : date;
|
||||
console.log(today);
|
||||
}
|
||||
}
|
||||
"
|
||||
|
|
|
|||
|
|
@ -153,7 +153,14 @@ watch(
|
|||
hide-bottom-space
|
||||
class="col-6"
|
||||
:label="$t('formDialogInputPassportRef')"
|
||||
v-model="previousPassportReference"
|
||||
:model-value="
|
||||
readonly
|
||||
? previousPassportReference || '-'
|
||||
: previousPassportReference
|
||||
"
|
||||
@update:model-value="
|
||||
(v) => (typeof v === 'string' ? (previousPassportReference = v) : '')
|
||||
"
|
||||
/>
|
||||
<q-input
|
||||
lazy-rules="ondemand"
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ watch(
|
|||
size="xs"
|
||||
class="q-pa-sm rounded q-mr-xs"
|
||||
color="info"
|
||||
name="mdi-notebook"
|
||||
name="mdi-notebook-outline"
|
||||
style="background-color: var(--surface-3)"
|
||||
/>
|
||||
{{ $t(`${title}`) }}
|
||||
|
|
@ -107,7 +107,6 @@ watch(
|
|||
hide-selected
|
||||
hide-bottom-space
|
||||
input-debounce="0"
|
||||
v-model="visaType"
|
||||
option-value="value"
|
||||
option-label="label"
|
||||
lazy-rules="ondemand"
|
||||
|
|
@ -119,6 +118,11 @@ watch(
|
|||
:for="`${prefixId}-select-visa-type`"
|
||||
:label="$t('formDialogInputVisaType')"
|
||||
@filter="visaTypeFilter"
|
||||
:model-value="readonly ? visaType || '-' : visaType"
|
||||
@update:model-value="
|
||||
(v) => (typeof v === 'string' ? (visaType = v) : '')
|
||||
"
|
||||
@clear="visaType = ''"
|
||||
>
|
||||
<template v-slot:no-option>
|
||||
<q-item>
|
||||
|
|
@ -141,7 +145,10 @@ watch(
|
|||
hide-bottom-space
|
||||
class="col-4"
|
||||
:label="$t('formDialogInputVisaNo')"
|
||||
v-model="visaNumber"
|
||||
:model-value="readonly ? visaNumber || '-' : visaNumber"
|
||||
@update:model-value="
|
||||
(v) => (typeof v === 'string' ? (visaNumber = v) : '')
|
||||
"
|
||||
/>
|
||||
<!-- :rules="[
|
||||
(val: string) =>
|
||||
|
|
@ -181,7 +188,9 @@ watch(
|
|||
? readonly
|
||||
? dateFormat(visaIssueDate)
|
||||
: dateFormat(visaIssueDate, false, false, true)
|
||||
: undefined
|
||||
: readonly
|
||||
? '-'
|
||||
: undefined
|
||||
"
|
||||
@update:model-value="
|
||||
(v) => {
|
||||
|
|
@ -249,7 +258,9 @@ watch(
|
|||
? readonly
|
||||
? dateFormat(visaExpiryDate)
|
||||
: dateFormat(visaExpiryDate, false, false, true)
|
||||
: undefined
|
||||
: readonly
|
||||
? '-'
|
||||
: undefined
|
||||
"
|
||||
@update:model-value="
|
||||
(v) => {
|
||||
|
|
@ -293,7 +304,10 @@ watch(
|
|||
hide-bottom-space
|
||||
class="col-5"
|
||||
:label="$t('formDialogInputVisaPlace')"
|
||||
v-model="visaIssuingPlace"
|
||||
:model-value="readonly ? visaIssuingPlace || '-' : visaIssuingPlace"
|
||||
@update:model-value="
|
||||
(v) => (typeof v === 'string' ? (visaIssuingPlace = v) : '')
|
||||
"
|
||||
/>
|
||||
<!-- :rules="[
|
||||
(val: string) =>
|
||||
|
|
@ -333,7 +347,9 @@ watch(
|
|||
? readonly
|
||||
? dateFormat(visaStayUntilDate)
|
||||
: dateFormat(visaStayUntilDate, false, false, true)
|
||||
: undefined
|
||||
: readonly
|
||||
? '-'
|
||||
: undefined
|
||||
"
|
||||
@update:model-value="
|
||||
(v) => {
|
||||
|
|
@ -378,7 +394,11 @@ watch(
|
|||
hide-bottom-space
|
||||
class="col-5"
|
||||
:label="$t('formDialogInputVisaTM6')"
|
||||
v-model="tm6Number"
|
||||
:model-value="readonly ? tm6Number || '-' : tm6Number"
|
||||
@update:model-value="
|
||||
(v) => (typeof v === 'string' ? (tm6Number = v) : '')
|
||||
"
|
||||
@clear="tm6Number = ''"
|
||||
/>
|
||||
<!-- :rules="[
|
||||
(val: string) =>
|
||||
|
|
@ -417,7 +437,9 @@ watch(
|
|||
? readonly
|
||||
? dateFormat(entryDate)
|
||||
: dateFormat(entryDate, false, false, true)
|
||||
: undefined
|
||||
: readonly
|
||||
? '-'
|
||||
: undefined
|
||||
"
|
||||
@update:model-value="
|
||||
(v) => {
|
||||
|
|
|
|||
|
|
@ -349,7 +349,7 @@ onMounted(() => {
|
|||
|
||||
<q-input
|
||||
lazy-rules="ondemand"
|
||||
mask="## #### ###### #"
|
||||
:mask="readonly ? '' : '## #### ###### #'"
|
||||
:for="`${prefixId}-input-nrc-no`"
|
||||
:dense="dense"
|
||||
outlined
|
||||
|
|
@ -357,7 +357,8 @@ onMounted(() => {
|
|||
:readonly="readonly"
|
||||
class="col-6"
|
||||
:label="$t('formDialogEmployeeNRCNo')"
|
||||
v-model="nrcNo"
|
||||
:model-value="readonly ? nrcNo || '-' : nrcNo"
|
||||
@update:model-value="(v) => (typeof v === 'string' ? (nrcNo = v) : '')"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -82,7 +82,10 @@ function reset() {
|
|||
</div>
|
||||
<div v-else style="width: 38.8px"></div>
|
||||
|
||||
<div class="col text-weight-bold text-center">
|
||||
<div
|
||||
class="col text-weight-bold text-center ellipsis"
|
||||
style="width: 0px"
|
||||
>
|
||||
<text
|
||||
v-if="badgeLabel"
|
||||
class="badge-label badge text-caption q-px-sm q-mr-sm"
|
||||
|
|
@ -93,7 +96,9 @@ function reset() {
|
|||
<text v-if="category" class="app-text-muted q-mr-sm">
|
||||
{{ category }}
|
||||
</text>
|
||||
{{ title }}
|
||||
<span>
|
||||
{{ title }}
|
||||
</span>
|
||||
|
||||
<text
|
||||
v-if="!!statusBranch"
|
||||
|
|
|
|||
|
|
@ -171,6 +171,7 @@ defineEmits<{
|
|||
@click="$emit('editProfile')"
|
||||
>
|
||||
<q-img
|
||||
v-if="!$slots.img"
|
||||
:src="data.img ?? '/no-profile.png'"
|
||||
style="
|
||||
object-fit: cover;
|
||||
|
|
@ -188,6 +189,7 @@ defineEmits<{
|
|||
</div>
|
||||
</template>
|
||||
</q-img>
|
||||
<slot name="img"></slot>
|
||||
<q-badge
|
||||
class="absolute-bottom-right"
|
||||
style="
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue