fix: customer form empty field to '-'
This commit is contained in:
parent
96fe308220
commit
28a5c70c07
5 changed files with 44 additions and 17 deletions
|
|
@ -233,7 +233,10 @@ watch(
|
||||||
class="col-6 col-md-3"
|
class="col-6 col-md-3"
|
||||||
:label="$t('customer.form.headQuarters.telephoneNo')"
|
:label="$t('customer.form.headQuarters.telephoneNo')"
|
||||||
for="input-first-name-en"
|
for="input-first-name-en"
|
||||||
v-model="telephoneNo"
|
:model-value="readonly ? telephoneNo || '-' : telephoneNo"
|
||||||
|
@update:model-value="
|
||||||
|
(v) => (typeof v === 'string' ? (telephoneNo = v) : '')
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<template #prepend>
|
<template #prepend>
|
||||||
<q-icon
|
<q-icon
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,10 @@ const authorizedNameEN = defineModel<string>('authorizedNameEN');
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
class="col-md-6 col-12"
|
class="col-md-6 col-12"
|
||||||
:label="$t('customerBranch.tab.authorized')"
|
:label="$t('customerBranch.tab.authorized')"
|
||||||
v-model="authorizedName"
|
:model-value="readonly ? authorizedName || '-' : authorizedName"
|
||||||
|
@update:model-value="
|
||||||
|
(v) => (typeof v === 'string' ? (authorizedName = v) : '')
|
||||||
|
"
|
||||||
/>
|
/>
|
||||||
<q-input
|
<q-input
|
||||||
:for="`${prefixId}-input-contact-name`"
|
:for="`${prefixId}-input-contact-name`"
|
||||||
|
|
@ -29,7 +32,10 @@ const authorizedNameEN = defineModel<string>('authorizedNameEN');
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
class="col-md-6 col-12"
|
class="col-md-6 col-12"
|
||||||
:label="`${$t('customerBranch.tab.authorized')} (EN)`"
|
:label="`${$t('customerBranch.tab.authorized')} (EN)`"
|
||||||
v-model="authorizedNameEN"
|
:model-value="readonly ? authorizedNameEN || '-' : authorizedNameEN"
|
||||||
|
@update:model-value="
|
||||||
|
(v) => (typeof v === 'string' ? (authorizedNameEN = v) : '')
|
||||||
|
"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -82,10 +82,7 @@ watch(
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="row q-col-gutter-sm">
|
<div class="row q-col-gutter-sm">
|
||||||
<div
|
<div class="col-12 text-weight-bold text-body1 row items-center">
|
||||||
v-if="!hideAction"
|
|
||||||
class="col-12 text-weight-bold text-body1 row items-center"
|
|
||||||
>
|
|
||||||
<q-icon
|
<q-icon
|
||||||
flat
|
flat
|
||||||
size="xs"
|
size="xs"
|
||||||
|
|
@ -193,7 +190,7 @@ watch(
|
||||||
outlined
|
outlined
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
class="col-12 col-md-6"
|
class="col-12 col-md-5"
|
||||||
:label="$t('customer.form.customerName')"
|
:label="$t('customer.form.customerName')"
|
||||||
for="input-first-name"
|
for="input-first-name"
|
||||||
v-model="registerName"
|
v-model="registerName"
|
||||||
|
|
|
||||||
|
|
@ -239,7 +239,10 @@ let jobPositionENFilter = selectFilterOptionRefMod(
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
class="col-md-6 col-12"
|
class="col-md-6 col-12"
|
||||||
:label="$t('customer.form.jobDescription')"
|
:label="$t('customer.form.jobDescription')"
|
||||||
v-model="jobDescription"
|
:model-value="readonly ? jobDescription || '-' : jobDescription"
|
||||||
|
@update:model-value="
|
||||||
|
(v) => (typeof v === 'string' ? (jobDescription = v) : '')
|
||||||
|
"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
|
|
@ -251,7 +254,8 @@ let jobPositionENFilter = selectFilterOptionRefMod(
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
class="col-md-3 col-6"
|
class="col-md-3 col-6"
|
||||||
:label="$t('customer.form.payDay')"
|
:label="$t('customer.form.payDay')"
|
||||||
v-model="payDate"
|
:model-value="readonly ? payDate || '-' : payDate"
|
||||||
|
@update:model-value="(v) => (typeof v === 'string' ? (payDate = v) : '')"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
|
|
@ -263,7 +267,10 @@ let jobPositionENFilter = selectFilterOptionRefMod(
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
class="col-md-3 col-6"
|
class="col-md-3 col-6"
|
||||||
label="Pay day"
|
label="Pay day"
|
||||||
v-model="payDateEN"
|
:model-value="readonly ? payDateEN || '-' : payDateEN"
|
||||||
|
@update:model-value="
|
||||||
|
(v) => (typeof v === 'string' ? (payDateEN = v) : '')
|
||||||
|
"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
|
|
@ -287,7 +294,10 @@ let jobPositionENFilter = selectFilterOptionRefMod(
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
class="col-md-3 col-6"
|
class="col-md-3 col-6"
|
||||||
:label="`${$t('customer.form.payRate')} (Text)`"
|
:label="`${$t('customer.form.payRate')} (Text)`"
|
||||||
v-model="wageRateText"
|
:model-value="readonly ? wageRateText || '-' : wageRateText"
|
||||||
|
@update:model-value="
|
||||||
|
(v) => (typeof v === 'string' ? (wageRateText = v) : '')
|
||||||
|
"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,10 @@ const agent = defineModel<string>('agent');
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
class="col-md-6 col-12"
|
class="col-md-6 col-12"
|
||||||
:label="$t('customer.table.contactName')"
|
:label="$t('customer.table.contactName')"
|
||||||
v-model="contactName"
|
:model-value="readonly ? contactName || '-' : contactName"
|
||||||
|
@update:model-value="
|
||||||
|
(v) => (typeof v === 'string' ? (contactName = v) : '')
|
||||||
|
"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
|
|
@ -43,7 +46,8 @@ const agent = defineModel<string>('agent');
|
||||||
$t('form.error.invalid'),
|
$t('form.error.invalid'),
|
||||||
]
|
]
|
||||||
"
|
"
|
||||||
v-model="email"
|
:model-value="readonly ? email || '-' : email"
|
||||||
|
@update:model-value="(v) => (typeof v === 'string' ? (email = v) : '')"
|
||||||
>
|
>
|
||||||
<template #prepend>
|
<template #prepend>
|
||||||
<q-icon
|
<q-icon
|
||||||
|
|
@ -63,7 +67,10 @@ const agent = defineModel<string>('agent');
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
class="col-md-6 col-12"
|
class="col-md-6 col-12"
|
||||||
:label="$t('form.telephone')"
|
:label="$t('form.telephone')"
|
||||||
v-model="contactTel"
|
:model-value="readonly ? contactTel || '-' : contactTel"
|
||||||
|
@update:model-value="
|
||||||
|
(v) => (typeof v === 'string' ? (contactTel = v) : '')
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<template #prepend>
|
<template #prepend>
|
||||||
<q-icon
|
<q-icon
|
||||||
|
|
@ -84,7 +91,10 @@ const agent = defineModel<string>('agent');
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
class="col-md-6 col-12"
|
class="col-md-6 col-12"
|
||||||
:label="$t('customer.form.headQuarters.telephoneNo')"
|
:label="$t('customer.form.headQuarters.telephoneNo')"
|
||||||
v-model="officeTel"
|
:model-value="readonly ? officeTel || '-' : officeTel"
|
||||||
|
@update:model-value="
|
||||||
|
(v) => (typeof v === 'string' ? (officeTel = v) : '')
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<template #prepend>
|
<template #prepend>
|
||||||
<q-icon
|
<q-icon
|
||||||
|
|
@ -105,7 +115,8 @@ const agent = defineModel<string>('agent');
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
class="col-md-6 col-12"
|
class="col-md-6 col-12"
|
||||||
:label="$t('customer.form.agent')"
|
:label="$t('customer.form.agent')"
|
||||||
v-model="agent"
|
:model-value="readonly ? agent || '-' : agent"
|
||||||
|
@update:model-value="(v) => (typeof v === 'string' ? (agent = v) : '')"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue