feat: เพิ่ม id ให้ form
This commit is contained in:
parent
0f8ea447f8
commit
555ece125c
8 changed files with 58 additions and 1 deletions
|
|
@ -26,6 +26,8 @@ const employerBranchCode = defineModel<string>('employerBranchCode');
|
||||||
<div class="col-3 app-text-muted">• {{ $t(`about`) }}</div>
|
<div class="col-3 app-text-muted">• {{ $t(`about`) }}</div>
|
||||||
<div class="col-9 row q-col-gutter-md">
|
<div class="col-9 row q-col-gutter-md">
|
||||||
<q-input
|
<q-input
|
||||||
|
for="input-branchCode"
|
||||||
|
id="input-branchCode"
|
||||||
v-if="typeCustomer === 'PERS'"
|
v-if="typeCustomer === 'PERS'"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="!readonly"
|
:outlined="!readonly"
|
||||||
|
|
@ -38,6 +40,8 @@ const employerBranchCode = defineModel<string>('employerBranchCode');
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
|
for="input-customerName"
|
||||||
|
id="input-customerName"
|
||||||
v-if="typeCustomer === 'PERS'"
|
v-if="typeCustomer === 'PERS'"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="!readonly"
|
:outlined="!readonly"
|
||||||
|
|
@ -51,6 +55,8 @@ const employerBranchCode = defineModel<string>('employerBranchCode');
|
||||||
|
|
||||||
<div class="row q-col-gutter-md">
|
<div class="row q-col-gutter-md">
|
||||||
<q-input
|
<q-input
|
||||||
|
for="input-branchCode"
|
||||||
|
id="input-branchCode"
|
||||||
v-if="typeCustomer === 'CORP'"
|
v-if="typeCustomer === 'CORP'"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="!readonly"
|
:outlined="!readonly"
|
||||||
|
|
@ -62,6 +68,8 @@ const employerBranchCode = defineModel<string>('employerBranchCode');
|
||||||
v-model="branchCode"
|
v-model="branchCode"
|
||||||
/>
|
/>
|
||||||
<q-input
|
<q-input
|
||||||
|
for="input-legalEntityCode"
|
||||||
|
id="input-legalEntityCode"
|
||||||
v-if="typeCustomer === 'CORP'"
|
v-if="typeCustomer === 'CORP'"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="!readonly"
|
:outlined="!readonly"
|
||||||
|
|
@ -74,6 +82,8 @@ const employerBranchCode = defineModel<string>('employerBranchCode');
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
|
for="input-customerEnglishName"
|
||||||
|
id="input-customerEnglishName"
|
||||||
v-if="typeCustomer === 'CORP'"
|
v-if="typeCustomer === 'CORP'"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="!readonly"
|
:outlined="!readonly"
|
||||||
|
|
@ -86,6 +96,8 @@ const employerBranchCode = defineModel<string>('employerBranchCode');
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
|
for="input-customerName"
|
||||||
|
id="input-customerName"
|
||||||
v-if="typeCustomer === 'CORP'"
|
v-if="typeCustomer === 'CORP'"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="!readonly"
|
:outlined="!readonly"
|
||||||
|
|
@ -99,6 +111,8 @@ const employerBranchCode = defineModel<string>('employerBranchCode');
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
|
for="input-taxNo"
|
||||||
|
id="input-taxNo"
|
||||||
v-if="typeCustomer === 'CORP'"
|
v-if="typeCustomer === 'CORP'"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="!readonly"
|
:outlined="!readonly"
|
||||||
|
|
@ -110,6 +124,8 @@ const employerBranchCode = defineModel<string>('employerBranchCode');
|
||||||
v-model="taxNo"
|
v-model="taxNo"
|
||||||
/>
|
/>
|
||||||
<q-input
|
<q-input
|
||||||
|
for="input-registerName"
|
||||||
|
id="input-registerName"
|
||||||
v-if="typeCustomer === 'CORP'"
|
v-if="typeCustomer === 'CORP'"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="!readonly"
|
:outlined="!readonly"
|
||||||
|
|
@ -121,6 +137,8 @@ const employerBranchCode = defineModel<string>('employerBranchCode');
|
||||||
v-model="registerName"
|
v-model="registerName"
|
||||||
/>
|
/>
|
||||||
<q-input
|
<q-input
|
||||||
|
for="input-authorizedCapital"
|
||||||
|
id="input-authorizedCapital"
|
||||||
v-if="typeCustomer === 'CORP'"
|
v-if="typeCustomer === 'CORP'"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="!readonly"
|
:outlined="!readonly"
|
||||||
|
|
@ -132,6 +150,7 @@ const employerBranchCode = defineModel<string>('employerBranchCode');
|
||||||
v-model="authorizedCapital"
|
v-model="authorizedCapital"
|
||||||
/>
|
/>
|
||||||
<VueDatePicker
|
<VueDatePicker
|
||||||
|
id="date-picker-date"
|
||||||
v-if="typeCustomer === 'CORP'"
|
v-if="typeCustomer === 'CORP'"
|
||||||
:teleport="true"
|
:teleport="true"
|
||||||
utc
|
utc
|
||||||
|
|
@ -150,6 +169,7 @@ const employerBranchCode = defineModel<string>('employerBranchCode');
|
||||||
</template>
|
</template>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input
|
<q-input
|
||||||
|
for="input-start-date"
|
||||||
id="input-start-date"
|
id="input-start-date"
|
||||||
:label="$t('registerDate')"
|
:label="$t('registerDate')"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,8 @@ onMounted(async () => {});
|
||||||
</div>
|
</div>
|
||||||
<div v-if="!employee" class="col-9 row q-col-gutter-md">
|
<div v-if="!employee" class="col-9 row q-col-gutter-md">
|
||||||
<q-input
|
<q-input
|
||||||
|
for="input-employer-id"
|
||||||
|
id="input-employer-id"
|
||||||
v-if="typeCustomer === 'PERS'"
|
v-if="typeCustomer === 'PERS'"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="!readonly"
|
:outlined="!readonly"
|
||||||
|
|
@ -56,6 +58,8 @@ onMounted(async () => {});
|
||||||
v-model="employerID"
|
v-model="employerID"
|
||||||
/>
|
/>
|
||||||
<q-input
|
<q-input
|
||||||
|
for="input-tax-no"
|
||||||
|
id="input-tax-no"
|
||||||
v-if="typeCustomer === 'PERS'"
|
v-if="typeCustomer === 'PERS'"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="!readonly"
|
:outlined="!readonly"
|
||||||
|
|
@ -68,6 +72,8 @@ onMounted(async () => {});
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
|
for="input-customer-name"
|
||||||
|
id="input-customer-name"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="!readonly"
|
:outlined="!readonly"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
|
|
@ -78,6 +84,8 @@ onMounted(async () => {});
|
||||||
v-model="customerName"
|
v-model="customerName"
|
||||||
/>
|
/>
|
||||||
<q-input
|
<q-input
|
||||||
|
for="input-customer-name-en"
|
||||||
|
id="input-customer-name-en"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="!readonly"
|
:outlined="!readonly"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,8 @@ const telephone = defineModel<string>('telephone');
|
||||||
<div class="col-3 app-text-muted">• {{ $t(`formDialogTitleContact`) }}</div>
|
<div class="col-3 app-text-muted">• {{ $t(`formDialogTitleContact`) }}</div>
|
||||||
<div class="col-9 row q-col-gutter-md">
|
<div class="col-9 row q-col-gutter-md">
|
||||||
<q-input
|
<q-input
|
||||||
|
for="input-mail"
|
||||||
|
id="input-mail"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="!readonly"
|
:outlined="!readonly"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
|
|
@ -26,6 +28,8 @@ const telephone = defineModel<string>('telephone');
|
||||||
v-model="mail"
|
v-model="mail"
|
||||||
/>
|
/>
|
||||||
<q-input
|
<q-input
|
||||||
|
for="input-telephone"
|
||||||
|
id="input-telephone"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="!readonly"
|
:outlined="!readonly"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,8 @@ defineProps<{
|
||||||
</div>
|
</div>
|
||||||
<div class="col-9 row q-col-gutter-md">
|
<div class="col-9 row q-col-gutter-md">
|
||||||
<q-input
|
<q-input
|
||||||
|
for="input-employment-office"
|
||||||
|
id="input-employment-office"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="!readonly"
|
:outlined="!readonly"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
|
|
@ -72,6 +74,7 @@ defineProps<{
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<q-select
|
<q-select
|
||||||
|
id="select-business-type"
|
||||||
emit-value
|
emit-value
|
||||||
option-value="label"
|
option-value="label"
|
||||||
option-label="label"
|
option-label="label"
|
||||||
|
|
@ -87,6 +90,8 @@ defineProps<{
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
|
for="input-bussiness-type-en"
|
||||||
|
id="input-bussiness-type-en"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="!readonly"
|
:outlined="!readonly"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
|
|
@ -98,6 +103,7 @@ defineProps<{
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<q-select
|
<q-select
|
||||||
|
id="select-job-position"
|
||||||
emit-value
|
emit-value
|
||||||
option-value="label"
|
option-value="label"
|
||||||
option-label="label"
|
option-label="label"
|
||||||
|
|
@ -113,6 +119,8 @@ defineProps<{
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
|
for="input-job-position-en"
|
||||||
|
id="input-job-position-en"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="!readonly"
|
:outlined="!readonly"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
|
|
@ -124,6 +132,8 @@ defineProps<{
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
|
for="input-job-description"
|
||||||
|
id="input-job-description"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="!readonly"
|
:outlined="!readonly"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
|
|
@ -135,6 +145,7 @@ defineProps<{
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<VueDatePicker
|
<VueDatePicker
|
||||||
|
id="date-picker-start-date"
|
||||||
:teleport="true"
|
:teleport="true"
|
||||||
utc
|
utc
|
||||||
autoApply
|
autoApply
|
||||||
|
|
@ -152,6 +163,7 @@ defineProps<{
|
||||||
</template>
|
</template>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input
|
<q-input
|
||||||
|
for="input-start-date"
|
||||||
id="input-start-date"
|
id="input-start-date"
|
||||||
:label="$t('payDay')"
|
:label="$t('payDay')"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
|
|
@ -182,6 +194,8 @@ defineProps<{
|
||||||
</VueDatePicker>
|
</VueDatePicker>
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
|
for="input-pay-rate"
|
||||||
|
id="input-pay-rate"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="!readonly"
|
:outlined="!readonly"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
|
|
@ -193,6 +207,8 @@ defineProps<{
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
|
for="input-sales-person"
|
||||||
|
id="input-sales-person"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="!readonly"
|
:outlined="!readonly"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
|
|
|
||||||
|
|
@ -98,6 +98,7 @@ const tabsList = defineModel<{ name: string; label: string }[]>('tabsList');
|
||||||
indicator-color="transparent"
|
indicator-color="transparent"
|
||||||
>
|
>
|
||||||
<q-tab
|
<q-tab
|
||||||
|
:id="`tab-${tab.label}`"
|
||||||
v-for="tab in tabsList"
|
v-for="tab in tabsList"
|
||||||
v-bind:key="tab.name"
|
v-bind:key="tab.name"
|
||||||
class="content-tab text-capitalize"
|
class="content-tab text-capitalize"
|
||||||
|
|
|
||||||
|
|
@ -91,6 +91,7 @@ defineEmits<{
|
||||||
<q-separator class="col-12 q-my-md" />
|
<q-separator class="col-12 q-my-md" />
|
||||||
<div class="text-left q-pt-md">
|
<div class="text-left q-pt-md">
|
||||||
<q-toggle
|
<q-toggle
|
||||||
|
id="toggle-status"
|
||||||
dense
|
dense
|
||||||
size="md"
|
size="md"
|
||||||
v-model="statusToggle"
|
v-model="statusToggle"
|
||||||
|
|
|
||||||
|
|
@ -66,6 +66,7 @@ function close(index: number) {
|
||||||
<template>
|
<template>
|
||||||
<div class="row no-wrap">
|
<div class="row no-wrap">
|
||||||
<q-btn
|
<q-btn
|
||||||
|
id="btn-add"
|
||||||
class="q-px-lg bordered-b bordered-r app-text-muted"
|
class="q-px-lg bordered-b bordered-r app-text-muted"
|
||||||
flat
|
flat
|
||||||
:color="$q.dark.isActive ? 'primary' : ''"
|
:color="$q.dark.isActive ? 'primary' : ''"
|
||||||
|
|
@ -86,6 +87,7 @@ function close(index: number) {
|
||||||
style="background-color: var(--_body-bg); max-width: 55vw"
|
style="background-color: var(--_body-bg); max-width: 55vw"
|
||||||
>
|
>
|
||||||
<q-tab
|
<q-tab
|
||||||
|
:id="`tab-branch-${index}`"
|
||||||
v-for="(v, index) in customerBranch"
|
v-for="(v, index) in customerBranch"
|
||||||
:key="index"
|
:key="index"
|
||||||
:name="index"
|
:name="index"
|
||||||
|
|
@ -97,7 +99,7 @@ function close(index: number) {
|
||||||
<q-btn
|
<q-btn
|
||||||
round
|
round
|
||||||
flat
|
flat
|
||||||
id="closeDialog"
|
:id="`close-tab-${index}`"
|
||||||
icon="mdi-close"
|
icon="mdi-close"
|
||||||
padding="xs"
|
padding="xs"
|
||||||
color="red"
|
color="red"
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,7 @@ defineEmits<{
|
||||||
@click="$emit('enterCard')"
|
@click="$emit('enterCard')"
|
||||||
>
|
>
|
||||||
<q-btn
|
<q-btn
|
||||||
|
id="btn-dots"
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
padding="sm"
|
padding="sm"
|
||||||
|
|
@ -68,6 +69,7 @@ defineEmits<{
|
||||||
<q-menu class="bordered">
|
<q-menu class="bordered">
|
||||||
<q-list v-close-popup>
|
<q-list v-close-popup>
|
||||||
<q-item
|
<q-item
|
||||||
|
id="btn-view"
|
||||||
clickable
|
clickable
|
||||||
dense
|
dense
|
||||||
class="row q-py-sm"
|
class="row q-py-sm"
|
||||||
|
|
@ -85,6 +87,7 @@ defineEmits<{
|
||||||
</span>
|
</span>
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-item
|
<q-item
|
||||||
|
id="btn-edit"
|
||||||
dense
|
dense
|
||||||
clickable
|
clickable
|
||||||
class="row q-py-sm"
|
class="row q-py-sm"
|
||||||
|
|
@ -103,6 +106,7 @@ defineEmits<{
|
||||||
</span>
|
</span>
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-item
|
<q-item
|
||||||
|
id="btn-delete"
|
||||||
dense
|
dense
|
||||||
clickable
|
clickable
|
||||||
@click="$emit('deleteCard', metadata.id)"
|
@click="$emit('deleteCard', metadata.id)"
|
||||||
|
|
@ -121,6 +125,7 @@ defineEmits<{
|
||||||
<q-item-section class="q-py-sm">
|
<q-item-section class="q-py-sm">
|
||||||
<div class="q-pa-sm surface-2 rounded">
|
<div class="q-pa-sm surface-2 rounded">
|
||||||
<q-toggle
|
<q-toggle
|
||||||
|
id="toggle-status"
|
||||||
dense
|
dense
|
||||||
size="sm"
|
size="sm"
|
||||||
@click="$emit('toggleStatus', metadata.id)"
|
@click="$emit('toggleStatus', metadata.id)"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue