diff --git a/public/option/option.json b/public/option/option.json index 2d4991aa..7b9f975f 100644 --- a/public/option/option.json +++ b/public/option/option.json @@ -1,5 +1,28 @@ { "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", @@ -1051,6 +1074,29 @@ }, "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": "ปกติ", diff --git a/src/boot/i18n.ts b/src/boot/i18n.ts index 647f3d10..9e2cda0d 100644 --- a/src/boot/i18n.ts +++ b/src/boot/i18n.ts @@ -2,6 +2,7 @@ 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 @@ -26,7 +27,7 @@ export const i18n = createI18n< MessageLanguages, false >({ - locale: 'en-US', + locale: Lang.Thai, legacy: false, messages, }); diff --git a/src/components/02_personnel-management/FormPerson.vue b/src/components/02_personnel-management/FormPerson.vue index 5fa321b6..7773b161 100644 --- a/src/components/02_personnel-management/FormPerson.vue +++ b/src/components/02_personnel-management/FormPerson.vue @@ -196,7 +196,11 @@ watch( class="col" :label="$t('personnel.form.firstName')" v-model="firstName" - :rules="[(val: string) => !!val || $t('form.error.required')]" + :rules=" + employee + ? [] + : [(val: string) => !!val || $t('form.error.required')] + " /> @@ -394,11 +410,15 @@ watch( :readonly="readonly" :label="$t('form.birthDate')" :disabled-dates="disabledAfterToday" - :rules="[ - (val: string) => - !!val || - $t('form.error.selectField', { field: $t('form.birthDate') }), - ]" + :rules=" + employee + ? [] + : [ + (val: string) => + !!val || + $t('form.error.selectField', { field: $t('form.birthDate') }), + ] + " />