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