Compare commits
No commits in common. "2511690d547c479df8efdfdaac68a526bd8ff573" and "80f68cd70256eaafe5cb06dd7fc9b1e7fda1954f" have entirely different histories.
2511690d54
...
80f68cd702
10 changed files with 24 additions and 94 deletions
|
|
@ -1,28 +1,5 @@
|
||||||
{
|
{
|
||||||
"eng": {
|
"eng": {
|
||||||
"visaType": [
|
|
||||||
{
|
|
||||||
"label": "Non-LA",
|
|
||||||
"value": "nla"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Non-B",
|
|
||||||
"value": "nb"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "TV.60",
|
|
||||||
"value": "tv60"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Non-TR",
|
|
||||||
"value": "ntr"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "TV.30",
|
|
||||||
"value": "tv30"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
|
|
||||||
"workerStatus": [
|
"workerStatus": [
|
||||||
{
|
{
|
||||||
"label": "Normal",
|
"label": "Normal",
|
||||||
|
|
@ -1074,29 +1051,6 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
"tha": {
|
"tha": {
|
||||||
"visaType": [
|
|
||||||
{
|
|
||||||
"label": "Non-LA",
|
|
||||||
"value": "nla"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Non-B",
|
|
||||||
"value": "nb"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "ผผ.60",
|
|
||||||
"value": "tv60"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Non-TR",
|
|
||||||
"value": "ntr"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "ผผ.30",
|
|
||||||
"value": "tv30"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
|
|
||||||
"workerStatus": [
|
"workerStatus": [
|
||||||
{
|
{
|
||||||
"label": "ปกติ",
|
"label": "ปกติ",
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@ import { defineBoot } from '#q-app/wrappers';
|
||||||
import { createI18n } from 'vue-i18n';
|
import { createI18n } from 'vue-i18n';
|
||||||
|
|
||||||
import messages from 'src/i18n';
|
import messages from 'src/i18n';
|
||||||
import { Lang } from 'src/utils/ui';
|
|
||||||
|
|
||||||
export type MessageLanguages = keyof typeof messages;
|
export type MessageLanguages = keyof typeof messages;
|
||||||
// Type-define 'eng' as the master schema for the resource
|
// Type-define 'eng' as the master schema for the resource
|
||||||
|
|
@ -27,7 +26,7 @@ export const i18n = createI18n<
|
||||||
MessageLanguages,
|
MessageLanguages,
|
||||||
false
|
false
|
||||||
>({
|
>({
|
||||||
locale: Lang.Thai,
|
locale: 'en-US',
|
||||||
legacy: false,
|
legacy: false,
|
||||||
messages,
|
messages,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -196,11 +196,7 @@ watch(
|
||||||
class="col"
|
class="col"
|
||||||
:label="$t('personnel.form.firstName')"
|
:label="$t('personnel.form.firstName')"
|
||||||
v-model="firstName"
|
v-model="firstName"
|
||||||
:rules="
|
:rules="[(val: string) => !!val || $t('form.error.required')]"
|
||||||
employee
|
|
||||||
? []
|
|
||||||
: [(val: string) => !!val || $t('form.error.required')]
|
|
||||||
"
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
|
|
@ -293,22 +289,10 @@ watch(
|
||||||
class="col"
|
class="col"
|
||||||
label="Surname"
|
label="Surname"
|
||||||
v-model="lastNameEN"
|
v-model="lastNameEN"
|
||||||
:rules="
|
:rules="[
|
||||||
employee
|
(val: string) =>
|
||||||
? [
|
!val || /^[A-Za-z\s]+$/.test(val) || $t('form.error.letterOnly'),
|
||||||
(val: string) => !!val || $t('form.error.required'),
|
]"
|
||||||
(val: string) =>
|
|
||||||
!val ||
|
|
||||||
/^[A-Za-z\s]+$/.test(val) ||
|
|
||||||
$t('form.error.letterOnly'),
|
|
||||||
]
|
|
||||||
: [
|
|
||||||
(val: string) =>
|
|
||||||
!val ||
|
|
||||||
/^[A-Za-z\s]+$/.test(val) ||
|
|
||||||
$t('form.error.letterOnly'),
|
|
||||||
]
|
|
||||||
"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -410,15 +394,11 @@ watch(
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
:label="$t('form.birthDate')"
|
:label="$t('form.birthDate')"
|
||||||
:disabled-dates="disabledAfterToday"
|
:disabled-dates="disabledAfterToday"
|
||||||
:rules="
|
:rules="[
|
||||||
employee
|
(val: string) =>
|
||||||
? []
|
!!val ||
|
||||||
: [
|
$t('form.error.selectField', { field: $t('form.birthDate') }),
|
||||||
(val: string) =>
|
]"
|
||||||
!!val ||
|
|
||||||
$t('form.error.selectField', { field: $t('form.birthDate') }),
|
|
||||||
]
|
|
||||||
"
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
|
|
@ -500,6 +480,7 @@ watch(
|
||||||
:hide-dropdown-icon="readonly"
|
:hide-dropdown-icon="readonly"
|
||||||
:for="`${prefixId}-select-gender`"
|
:for="`${prefixId}-select-gender`"
|
||||||
:label="$t('form.gender')"
|
:label="$t('form.gender')"
|
||||||
|
:rules="[(val: string) => !!val || $t('form.error.required')]"
|
||||||
@filter="genderFilter"
|
@filter="genderFilter"
|
||||||
>
|
>
|
||||||
<template v-slot:no-option>
|
<template v-slot:no-option>
|
||||||
|
|
@ -532,6 +513,7 @@ watch(
|
||||||
:hide-dropdown-icon="readonly"
|
:hide-dropdown-icon="readonly"
|
||||||
:for="`${prefixId}-select-nationality`"
|
:for="`${prefixId}-select-nationality`"
|
||||||
:label="$t('general.nationality')"
|
:label="$t('general.nationality')"
|
||||||
|
:rules="[(val: string) => !!val || $t('form.error.required')]"
|
||||||
@filter="nationalityFilter"
|
@filter="nationalityFilter"
|
||||||
>
|
>
|
||||||
<template v-slot:no-option>
|
<template v-slot:no-option>
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,7 @@ const employeeOther = defineModel<EmployeeOtherCreate>('employeeOther');
|
||||||
:readonly="readonly || employeeOther.statusSave"
|
:readonly="readonly || employeeOther.statusSave"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
class="col-md-3 col-6"
|
class="col-md-3 col-6"
|
||||||
:label="$t('general.nativeLanguage', { msg: $t('form.firstName') })"
|
:label="$t('form.firstName')"
|
||||||
:model-value="employeeOther.fatherFirstName"
|
:model-value="employeeOther.fatherFirstName"
|
||||||
@update:model-value="
|
@update:model-value="
|
||||||
(v) =>
|
(v) =>
|
||||||
|
|
@ -122,7 +122,7 @@ const employeeOther = defineModel<EmployeeOtherCreate>('employeeOther');
|
||||||
:readonly="readonly || employeeOther.statusSave"
|
:readonly="readonly || employeeOther.statusSave"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
class="col-md-3 col-6"
|
class="col-md-3 col-6"
|
||||||
:label="$t('general.nativeLanguage', { msg: $t('form.lastName') })"
|
:label="$t('form.lastName')"
|
||||||
:model-value="employeeOther.fatherLastName"
|
:model-value="employeeOther.fatherLastName"
|
||||||
@update:model-value="
|
@update:model-value="
|
||||||
(v) =>
|
(v) =>
|
||||||
|
|
@ -177,7 +177,7 @@ const employeeOther = defineModel<EmployeeOtherCreate>('employeeOther');
|
||||||
:readonly="readonly || employeeOther.statusSave"
|
:readonly="readonly || employeeOther.statusSave"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
class="col-md-3 col-6"
|
class="col-md-3 col-6"
|
||||||
:label="$t('general.nativeLanguage', { msg: $t('form.firstName') })"
|
:label="$t('form.firstName')"
|
||||||
:model-value="employeeOther.motherFirstName"
|
:model-value="employeeOther.motherFirstName"
|
||||||
@update:model-value="
|
@update:model-value="
|
||||||
(v) =>
|
(v) =>
|
||||||
|
|
@ -193,7 +193,7 @@ const employeeOther = defineModel<EmployeeOtherCreate>('employeeOther');
|
||||||
:readonly="readonly || employeeOther.statusSave"
|
:readonly="readonly || employeeOther.statusSave"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
class="col-md-3 col-6"
|
class="col-md-3 col-6"
|
||||||
:label="$t('general.nativeLanguage', { msg: $t('form.lastName') })"
|
:label="$t('form.lastName')"
|
||||||
:model-value="employeeOther.motherLastName"
|
:model-value="employeeOther.motherLastName"
|
||||||
@update:model-value="
|
@update:model-value="
|
||||||
(v) =>
|
(v) =>
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,7 @@ onMounted(() => {
|
||||||
'label',
|
'label',
|
||||||
);
|
);
|
||||||
passportIssuingCountryFilter = selectFilterOptionRefMod(
|
passportIssuingCountryFilter = selectFilterOptionRefMod(
|
||||||
ref(optionStore.rawOption?.eng.nationality),
|
ref(optionStore.globalOption.nationality),
|
||||||
passportIssuingCountryOptions,
|
passportIssuingCountryOptions,
|
||||||
'label',
|
'label',
|
||||||
);
|
);
|
||||||
|
|
@ -121,13 +121,13 @@ onMounted(() => {
|
||||||
);
|
);
|
||||||
|
|
||||||
genderFilter = selectFilterOptionRefMod(
|
genderFilter = selectFilterOptionRefMod(
|
||||||
ref(optionStore.rawOption?.eng.gender),
|
ref(optionStore.globalOption?.gender),
|
||||||
genderOptions,
|
genderOptions,
|
||||||
'label',
|
'label',
|
||||||
);
|
);
|
||||||
|
|
||||||
nationalityFilter = selectFilterOptionRefMod(
|
nationalityFilter = selectFilterOptionRefMod(
|
||||||
ref(optionStore.rawOption?.eng.nationality),
|
ref(optionStore.globalOption?.nationality),
|
||||||
nationalityOptions,
|
nationalityOptions,
|
||||||
'label',
|
'label',
|
||||||
);
|
);
|
||||||
|
|
@ -152,7 +152,7 @@ watch(
|
||||||
);
|
);
|
||||||
|
|
||||||
passportIssuingCountryFilter = selectFilterOptionRefMod(
|
passportIssuingCountryFilter = selectFilterOptionRefMod(
|
||||||
ref(optionStore.rawOption?.eng.nationality),
|
ref(optionStore.globalOption.nationality),
|
||||||
passportIssuingCountryOptions,
|
passportIssuingCountryOptions,
|
||||||
'label',
|
'label',
|
||||||
);
|
);
|
||||||
|
|
@ -164,13 +164,13 @@ watch(
|
||||||
);
|
);
|
||||||
|
|
||||||
genderFilter = selectFilterOptionRefMod(
|
genderFilter = selectFilterOptionRefMod(
|
||||||
ref(optionStore.rawOption?.eng.gender),
|
ref(optionStore.globalOption?.gender),
|
||||||
genderOptions,
|
genderOptions,
|
||||||
'label',
|
'label',
|
||||||
);
|
);
|
||||||
|
|
||||||
nationalityFilter = selectFilterOptionRefMod(
|
nationalityFilter = selectFilterOptionRefMod(
|
||||||
ref(optionStore.rawOption?.eng.nationality),
|
ref(optionStore.globalOption?.nationality),
|
||||||
nationalityOptions,
|
nationalityOptions,
|
||||||
'label',
|
'label',
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ let workerTypeFilter: (
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
visaTypeFilter = selectFilterOptionRefMod(
|
visaTypeFilter = selectFilterOptionRefMod(
|
||||||
ref(optionStore.globalOption?.visaType),
|
ref(optionStore.globalOption?.nationality),
|
||||||
visaTypeOptions,
|
visaTypeOptions,
|
||||||
'label',
|
'label',
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -153,7 +153,6 @@ export default {
|
||||||
tableOfContent: 'Table of Contents',
|
tableOfContent: 'Table of Contents',
|
||||||
draw: 'Draw',
|
draw: 'Draw',
|
||||||
newUpload: 'New Upload',
|
newUpload: 'New Upload',
|
||||||
nativeLanguage: '{msg} Native Language',
|
|
||||||
},
|
},
|
||||||
|
|
||||||
menu: {
|
menu: {
|
||||||
|
|
|
||||||
|
|
@ -153,7 +153,6 @@ export default {
|
||||||
tableOfContent: 'สารบัญ',
|
tableOfContent: 'สารบัญ',
|
||||||
draw: 'วาด',
|
draw: 'วาด',
|
||||||
newUpload: 'อัปโหลดใหม่',
|
newUpload: 'อัปโหลดใหม่',
|
||||||
nativeLanguage: '{msg} ภาษาต้นทาง',
|
|
||||||
},
|
},
|
||||||
|
|
||||||
menu: {
|
menu: {
|
||||||
|
|
|
||||||
|
|
@ -2918,7 +2918,6 @@ const emptyCreateDialog = ref(false);
|
||||||
class="q-mb-xl"
|
class="q-mb-xl"
|
||||||
/>
|
/>
|
||||||
<AddressForm
|
<AddressForm
|
||||||
disabledRule
|
|
||||||
id="form-personal-address"
|
id="form-personal-address"
|
||||||
prefix-id="form-employee"
|
prefix-id="form-employee"
|
||||||
:readonly="!employeeFormState.isEmployeeEdit"
|
:readonly="!employeeFormState.isEmployeeEdit"
|
||||||
|
|
@ -4872,7 +4871,6 @@ const emptyCreateDialog = ref(false);
|
||||||
<AddressForm
|
<AddressForm
|
||||||
id="drawer-form-personal-address"
|
id="drawer-form-personal-address"
|
||||||
employee
|
employee
|
||||||
disabledRule
|
|
||||||
v-model:address="currentFromDataEmployee.address"
|
v-model:address="currentFromDataEmployee.address"
|
||||||
v-model:address-en="currentFromDataEmployee.addressEN"
|
v-model:address-en="currentFromDataEmployee.addressEN"
|
||||||
v-model:moo="currentFromDataEmployee.moo"
|
v-model:moo="currentFromDataEmployee.moo"
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,6 @@ const useOptionStore = defineStore('optionStore', () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
rawOption,
|
|
||||||
globalOption,
|
globalOption,
|
||||||
mapOption,
|
mapOption,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue