diff --git a/src/boot/i18n.ts b/src/boot/i18n.ts index 888f2083..b2c5036c 100644 --- a/src/boot/i18n.ts +++ b/src/boot/i18n.ts @@ -4,8 +4,8 @@ import { createI18n } from 'vue-i18n'; import messages from 'src/i18n'; export type MessageLanguages = keyof typeof messages; -// Type-define 'en-US' as the master schema for the resource -export type MessageSchema = (typeof messages)['en-US']; +// Type-define 'eng' as the master schema for the resource +export type MessageSchema = (typeof messages)['eng']; // See https://vue-i18n.intlify.dev/guide/advanced/typescript.html#global-resource-schema-type-definition /* eslint-disable @typescript-eslint/no-empty-interface */ @@ -23,7 +23,7 @@ declare module 'vue-i18n' { export default boot(({ app }) => { const i18n = createI18n({ - locale: 'th-th', + locale: 'tha', legacy: false, messages, }); diff --git a/src/components/01_branch-management/BranchCard.vue b/src/components/01_branch-management/BranchCard.vue index b44c0a88..0351bad2 100644 --- a/src/components/01_branch-management/BranchCard.vue +++ b/src/components/01_branch-management/BranchCard.vue @@ -86,7 +86,7 @@ defineProps<{ ]" class="branch-card__data" > -
{{ $t(key) }}
+
{{ $t(`branch.card.${key}`) }}
{{ data[key as keyof typeof data] }}
diff --git a/src/components/01_branch-management/FormBank.vue b/src/components/01_branch-management/FormBank.vue index 21ec98ab..a88a4d67 100644 --- a/src/components/01_branch-management/FormBank.vue +++ b/src/components/01_branch-management/FormBank.vue @@ -110,10 +110,10 @@ watch( spaced="lg" /> - {{ `${$t('bankBookNo')} ${i + 1}` }} + {{ `${$t('branch.form.bankAccountNo')} ${i + 1}` }}
- {{ $t('accountStatus') }} + {{ $t('branch.form.bankAccountStatus') }} - {{ $t('noResults') }} + {{ $t('general.noData') }} @@ -203,51 +204,17 @@ watch( - - - {{ $t('noResults') }} + {{ $t('general.noData') }} + + +
diff --git a/src/components/01_branch-management/FormBranchAdmin.vue b/src/components/01_branch-management/FormBranchAdmin.vue index 940a13ae..6d1b7cc7 100644 --- a/src/components/01_branch-management/FormBranchAdmin.vue +++ b/src/components/01_branch-management/FormBranchAdmin.vue @@ -18,12 +18,12 @@ defineProps<{ name="mdi-account-outline" style="background-color: var(--surface-3)" /> - {{ $t(`branchAdminTitle`) }} + {{ $t(`branch.form.group.admin`) }}
diff --git a/src/components/01_branch-management/FormBranchInformation.vue b/src/components/01_branch-management/FormBranchInformation.vue index 33003dce..0a2fd7e5 100644 --- a/src/components/01_branch-management/FormBranchInformation.vue +++ b/src/components/01_branch-management/FormBranchInformation.vue @@ -1,6 +1,4 @@ @@ -17,7 +18,9 @@ defineProps<{ round />
-
{{ $t(label) }}
+
+ {{ $t(label, { ...i18nArgs }) }} +
diff --git a/src/components/DialogForm.vue b/src/components/DialogForm.vue index 6f415533..4199b6a4 100644 --- a/src/components/DialogForm.vue +++ b/src/components/DialogForm.vue @@ -21,6 +21,7 @@ defineProps<{ edit?: boolean; saveAmount?: number; + submitLabel?: string; isEdit?: boolean; tabsList?: { name: string; label: string }[]; @@ -216,6 +217,7 @@ const currentTab = defineModel('currentTab'); id="btn-form-submit" type="submit" solid + :label="submitLabel" :amount="saveAmount" /> diff --git a/src/components/DrawerInfo.vue b/src/components/DrawerInfo.vue index 124f47f7..621ffc47 100644 --- a/src/components/DrawerInfo.vue +++ b/src/components/DrawerInfo.vue @@ -109,8 +109,8 @@ function reset() { > {{ statusBranch === 'INACTIVE' - ? $t('statusINACTIVE') - : $t('statusACTIVE') + ? $t('status.INACTIVE') + : $t('status.ACTIVE') }} diff --git a/src/components/GlobalDialog.vue b/src/components/GlobalDialog.vue index ca4e7f05..c02f59cc 100644 --- a/src/components/GlobalDialog.vue +++ b/src/components/GlobalDialog.vue @@ -72,7 +72,7 @@ defineProps<{ " :class="{ 'full-width': !action }" @click="cancel" - :label="cancelText || $t('cancel')" + :label="cancelText || $t('general.cancel')" v-close-popup /> @@ -83,7 +83,7 @@ defineProps<{ :class="{ 'full-width': !cancel }" v-if="action" @click="action" - :label="actionText || $t('agree')" + :label="actionText || $t('general.ok')" :color="color || 'primary'" v-close-popup /> diff --git a/src/components/GlobalLoading.vue b/src/components/GlobalLoading.vue index 7da9b628..cfdf287d 100644 --- a/src/components/GlobalLoading.vue +++ b/src/components/GlobalLoading.vue @@ -8,7 +8,7 @@ defineProps<{ - {{ $t('loading') }} + {{ $t('general.loading') }} diff --git a/src/components/NoData.vue b/src/components/NoData.vue index 91666481..84bec850 100644 --- a/src/components/NoData.vue +++ b/src/components/NoData.vue @@ -20,10 +20,10 @@ defineProps<{ text ? text : notFound - ? $t('notFound') + ? $t('general.notFound') : useField - ? $t('noField') - : $t('noData') + ? $t('general.noField') + : $t('general.noData') }} diff --git a/src/components/ProfileBanner.vue b/src/components/ProfileBanner.vue index a3dc214d..487fe934 100644 --- a/src/components/ProfileBanner.vue +++ b/src/components/ProfileBanner.vue @@ -21,7 +21,7 @@ defineProps<{ useToggle?: boolean; menu?: { icon: string; color: string; bgColor: string }[]; - tabsList?: { name: string; label: string }[]; + tabsList?: { name: string | number; label: string }[]; }>(); defineEmits<{ @@ -40,7 +40,7 @@ const toggleStatus = defineModel('toggleStatus', { default: 'CREATED', }); -const currentTab = defineModel('currentTab'); +const currentTab = defineModel('currentTab'); const showOverlay = ref(false); @@ -161,7 +161,7 @@ const showOverlay = ref(false); class="upload-overlay absolute-bottom flex items-center justify-center" @click.stop="$emit('edit')" > - {{ $t('editImage') }} + {{ $t('general.editImage') }} @@ -192,7 +192,11 @@ const showOverlay = ref(false); -
+
- {{ $t('viewDetail') }} + {{ $t('general.viewDetail') }} @@ -173,7 +173,7 @@ defineEmits<{ style="color: hsl(var(--cyan-6-hsl))" /> - {{ $t('edit') }} + {{ $t('general.edit') }} - {{ $t('delete') }} + {{ $t('general.delete') }} @@ -214,8 +214,8 @@ defineEmits<{ {{ node.status !== 'INACTIVE' - ? $t('switchOnLabel') - : $t('switchOffLabel') + ? $t('general.open') + : $t('general.close') }}
diff --git a/src/components/button/AddButton.vue b/src/components/button/AddButton.vue index e683e2b9..4a694a75 100644 --- a/src/components/button/AddButton.vue +++ b/src/components/button/AddButton.vue @@ -19,8 +19,8 @@ defineProps<{ v-bind="{ ...$props, ...$attrs }" icon="mdi-plus" color="var(--info-bg)" - :title="iconOnly ? $t('add') : undefined" + :title="iconOnly ? $t('general.add') : undefined" > - {{ $t('add') }} + {{ $t('general.add') }} diff --git a/src/components/button/BackButton.vue b/src/components/button/BackButton.vue index c99c36e4..e82dbcfb 100644 --- a/src/components/button/BackButton.vue +++ b/src/components/button/BackButton.vue @@ -19,8 +19,8 @@ defineProps<{ v-bind="{ ...$props, ...$attrs }" icon="mdi-arrow-left" color="var(--info-bg)" - :title="iconOnly ? $t('back') : undefined" + :title="iconOnly ? $t('general.back') : undefined" > - {{ $t('back') }} + {{ $t('general.back') }} diff --git a/src/components/button/CancelButton.vue b/src/components/button/CancelButton.vue index 3ba79db1..b9982fff 100644 --- a/src/components/button/CancelButton.vue +++ b/src/components/button/CancelButton.vue @@ -19,8 +19,8 @@ defineProps<{ v-bind="{ ...$props, ...$attrs }" icon="mdi-close" color="var(--negative-bg)" - :title="iconOnly ? $t('cancel') : undefined" + :title="iconOnly ? $t('general.cancel') : undefined" > - {{ $t('cancel') }} + {{ $t('general.cancel') }} diff --git a/src/components/button/DeleteButton.vue b/src/components/button/DeleteButton.vue index 80cfdb99..2792959b 100644 --- a/src/components/button/DeleteButton.vue +++ b/src/components/button/DeleteButton.vue @@ -19,8 +19,8 @@ defineProps<{ v-bind="{ ...$props, ...$attrs }" icon="mdi-trash-can-outline" color="var(--negative-bg)" - :title="iconOnly ? $t('delete') : undefined" + :title="iconOnly ? $t('general.delete') : undefined" > - {{ $t('delete') }} + {{ $t('general.delete') }} diff --git a/src/components/button/EditButton.vue b/src/components/button/EditButton.vue index ca249bcb..fb1df5af 100644 --- a/src/components/button/EditButton.vue +++ b/src/components/button/EditButton.vue @@ -19,8 +19,8 @@ defineProps<{ v-bind="{ ...$props, ...$attrs }" icon="mdi-pencil-outline" color="var(--cyan-6-hsl)" - :title="iconOnly ? $t('edit') : undefined" + :title="iconOnly ? $t('general.edit') : undefined" > - {{ $t('edit') }} + {{ $t('general.edit') }} diff --git a/src/components/button/SaveButton.vue b/src/components/button/SaveButton.vue index a36ae6ac..09e0e4d9 100644 --- a/src/components/button/SaveButton.vue +++ b/src/components/button/SaveButton.vue @@ -11,6 +11,8 @@ defineProps<{ disabled?: boolean; dark?: boolean; + label?: string; + amount?: number; }>(); @@ -21,8 +23,9 @@ defineProps<{ v-bind="{ ...$props, ...$attrs }" icon="mdi-content-save-outline" color="207 96% 32%" - :title="iconOnly ? $t('save') : undefined" + :title="iconOnly ? $t('general.save') : undefined" > - {{ $t('save') }} {{ amount && amount > 0 ? `(${amount})` : '' }} + {{ label || $t('general.save') }} + {{ amount && amount > 0 ? `(${amount})` : '' }} diff --git a/src/components/button/UndoButton.vue b/src/components/button/UndoButton.vue index 66da0ed0..b9b18245 100644 --- a/src/components/button/UndoButton.vue +++ b/src/components/button/UndoButton.vue @@ -19,8 +19,8 @@ defineProps<{ v-bind="{ ...$props, ...$attrs }" icon="mdi-arrow-left" color="var(--gray-8-hsl)" - :title="iconOnly ? $t('undo') : undefined" + :title="iconOnly ? $t('general.undo') : undefined" > - {{ $t('undo') }} + {{ $t('general.undo') }} diff --git a/src/components/form/AddressForm.vue b/src/components/form/AddressForm.vue index 735b9415..62869818 100644 --- a/src/components/form/AddressForm.vue +++ b/src/components/form/AddressForm.vue @@ -164,7 +164,7 @@ watch(districtId, fetchSubDistrict); style="background-color: var(--surface-3)" /> - {{ title || $t('formDialogTitlePersonnelAddress') }} + {{ (title && $t(title)) || $t('form.field.address') }}
- {{ $t('formDialogToggleSameAddress') }} + {{ $t('customerEmployee.form.addressSame') }} - {{ $t('formDialogToggleCustomAddress') }} + {{ $t('customerEmployee.form.addressCustom') }}
@@ -201,7 +201,7 @@ watch(districtId, fetchSubDistrict);
- {{ addressTitle || $t('formDialogTitleAddressPure') }} + {{ addressTitle || $t('form.address') }}
@@ -220,8 +220,7 @@ watch(districtId, fetchSubDistrict); ? [] : [ (val) => - (val && val.length > 0) || - $t('formDialogInputAddressValidate'), + (val && val.length > 0) || $t('form.error.required'), ] " /> @@ -234,17 +233,13 @@ watch(districtId, fetchSubDistrict); v-model="address" lazy-rules="ondemand" :dense="dense" - :label="$t('address')" + :label="$t('form.address')" :readonly="readonly || sameWithEmployer" :for="`${prefixId}-${indexId !== undefined ? `input-address-${indexId}` : 'input-address'}`" :rules=" disabledRule ? [] - : [ - (val) => - (val && val.length > 0) || - $t('formDialogInputAddressValidate'), - ] + : [(val) => (val && val.length > 0) || $t('form.error.required')] " /> (val && val.length > 0) || - $t('formDialogInputProvinceValidate'), + $t('form.error.selectField', { + field: $t('form.province'), + }), ] " @filter="provinceFilter" @@ -284,7 +281,7 @@ watch(districtId, fetchSubDistrict); @@ -307,7 +304,7 @@ watch(districtId, fetchSubDistrict); lazy-rules="ondemand" class="col-md-3 col-6" :dense="dense" - :label="$t('district')" + :label="$t('form.district')" :options="districtOptions" :readonly="readonly || sameWithEmployer" :hide-dropdown-icon="readonly || sameWithEmployer" @@ -318,7 +315,9 @@ watch(districtId, fetchSubDistrict); : [ (val) => (val && val.length > 0) || - $t('formDialogInputDistrictValidate'), + $t('form.error.selectField', { + field: $t('form.district'), + }), ] " @filter="districtFilter" @@ -327,7 +326,7 @@ watch(districtId, fetchSubDistrict); @@ -349,7 +348,7 @@ watch(districtId, fetchSubDistrict); class="col-md-3 col-6" v-model="subDistrictId" :dense="dense" - :label="$t('subDistrict')" + :label="$t('form.subDistrict')" :options="subDistrictOptions" :readonly="readonly || sameWithEmployer" :hide-dropdown-icon="readonly || sameWithEmployer" @@ -360,7 +359,9 @@ watch(districtId, fetchSubDistrict); : [ (val) => (val && val.length > 0) || - $t('formDialogInputSubDistrictValidate'), + $t('form.error.selectField', { + field: $t('form.subDistrict'), + }), ] " @update:model-value="(v: string) => selectSubDistrict(v)" @@ -369,7 +370,7 @@ watch(districtId, fetchSubDistrict); @@ -381,7 +382,7 @@ watch(districtId, fetchSubDistrict); outlined :disable="!readonly" readonly - :label="$t('zipCode')" + :label="$t('form.zipCode')" class="col-md-2 col-6" :model-value=" addrOptions.subDistrictOps @@ -393,7 +394,7 @@ watch(districtId, fetchSubDistrict);
- {{ addressTitleEN || $t('formDialogTitleAddressPureEN') }} + {{ addressTitleEN || $t('form.address', { suffix: '(EN)' }) }}
@@ -412,8 +413,7 @@ watch(districtId, fetchSubDistrict); ? [] : [ (val) => - (val && val.length > 0) || - $t('formDialogInputAddressValidate'), + (val && val.length > 0) || $t('form.error.required'), ] " /> @@ -426,17 +426,13 @@ watch(districtId, fetchSubDistrict); :readonly="readonly || sameWithEmployer" outlined hide-bottom-space - :label="$t('address')" + :label="$t('form.address', { suffix: '(EN)' })" class="col-12" v-model="addressEN" :rules=" disabledRule ? [] - : [ - (val) => - (val && val.length > 0) || - $t('formDialogInputAddressValidate'), - ] + : [(val) => (val && val.length > 0) || $t('form.error.required')] " /> (val && val.length > 0) || - $t('formDialogInputProvinceValidate'), + $t('form.error.selectField', { + field: $t('form.province'), + }), ] " @update:model-value="districtId = subDistrictId = zipCode = null" @@ -476,7 +474,7 @@ watch(districtId, fetchSubDistrict); @@ -498,7 +496,7 @@ watch(districtId, fetchSubDistrict); option-label="nameEN" class="col-md-3 col-6" :dense="dense" - :label="$t('district')" + :label="$t('form.district')" :options="districtOptions" :readonly="readonly || sameWithEmployer" :hide-dropdown-icon="readonly || sameWithEmployer" @@ -509,7 +507,9 @@ watch(districtId, fetchSubDistrict); : [ (val) => (val && val.length > 0) || - $t('formDialogInputDistrictValidate'), + $t('form.error.selectField', { + field: $t('form.district'), + }), ] " @update:model-value="subDistrictId = zipCode = null" @@ -518,7 +518,7 @@ watch(districtId, fetchSubDistrict); @@ -540,7 +540,7 @@ watch(districtId, fetchSubDistrict); class="col-md-3 col-6" v-model="subDistrictId" :dense="dense" - :label="$t('subDistrict')" + :label="$t('form.subDistrict')" :options="subDistrictOptions" :readonly="readonly || sameWithEmployer" :hide-dropdown-icon="readonly || sameWithEmployer" @@ -551,7 +551,9 @@ watch(districtId, fetchSubDistrict); : [ (val) => (val && val.length > 0) || - $t('formDialogInputSubDistrictValidate'), + $t('form.error.selectField', { + field: $t('form.subDistrict'), + }), ] " @update:model-value="(v: string) => selectSubDistrict(v)" @@ -560,7 +562,7 @@ watch(districtId, fetchSubDistrict); @@ -574,7 +576,7 @@ watch(districtId, fetchSubDistrict); readonly :disable="!readonly" zip="zip-en" - :label="$t('zipCode')" + :label="$t('form.zipCode')" class="col-md-2 col-6" :model-value=" addrOptions.subDistrictOps diff --git a/src/components/shared/DatePicker.vue b/src/components/shared/DatePicker.vue index 3c3d6dfd..2c03a712 100644 --- a/src/components/shared/DatePicker.vue +++ b/src/components/shared/DatePicker.vue @@ -62,16 +62,16 @@ function valueUpdate(value: string) { :disabled-dates="disabledDates" :teleport="true" :dark="$q.dark.isActive" - :locale="$i18n.locale === 'th-th' ? 'th' : 'en'" + :locale="$i18n.locale === 'tha' ? 'th' : 'en'" :enableTimePicker="false" v-model="model" class="col-2" > @@ -1192,7 +1201,7 @@ const emptyCreateDialog = ref(false); style="color: hsl(var(--green-6-hsl))" /> - {{ $t('viewDetail') }} + {{ $t('general.viewDetail') }} @@ -1218,7 +1227,7 @@ const emptyCreateDialog = ref(false); style="color: hsl(var(--cyan-6-hsl))" /> - {{ $t('edit') }} + {{ $t('general.edit') }} - {{ $t('delete') }} + {{ $t('general.delete') }} @@ -1272,8 +1281,8 @@ const emptyCreateDialog = ref(false); {{ props.row.status !== 'INACTIVE' - ? $t('switchOnLabel') - : $t('switchOffLabel') + ? $t('general.open') + : $t('general.close') }}
@@ -1321,12 +1330,12 @@ const emptyCreateDialog = ref(false); separateEnter history :prefix-id=" - props.row.customerNameEN ?? props.rowIndex + props.row.customerNameEN ?? String(props.rowIndex) " :data="{ code: props.row.code, name: - $i18n.locale === 'en-US' + $i18n.locale === 'eng' ? `${props.row.firstName} ${props.row.lastName} `.trim() : `${props.row.firstNameEN} ${props.row.lastNameEN} `.trim(), img: @@ -1356,8 +1365,8 @@ const emptyCreateDialog = ref(false); }[props.row.customerType as string] || 'CORP', value: $t( props.row.customerType === 'CORP' - ? 'customerLegalEntity' - : 'customerNaturalPerson', + ? 'customer.employerLegalEntity' + : 'customer.employerNaturalPerson', ), }, ]" @@ -1402,7 +1411,7 @@ const emptyCreateDialog = ref(false); style="width: 80px" v-if="$q.screen.gt.sm" > - {{ $t('showing') }} + {{ $t('general.recordPerPage') }}
{{ - $t('recordsPage', { + $t('general.recordsPage', { resultcurrentPage: listCustomer.length, total: statsCustomerType.PERS + statsCustomerType.CORP, }) @@ -1512,7 +1521,7 @@ const emptyCreateDialog = ref(false); style="width: 80px" v-if="$q.screen.gt.sm" > - {{ $t('showing') }} + {{ $t('general.recordPerPage') }}
{{ - $t('recordsPage', { + $t('general.recordsPage', { resultcurrentPage: listEmployee.length, total: employeeStats, }) @@ -1577,16 +1586,8 @@ const emptyCreateDialog = ref(false); > @@ -1595,11 +1596,10 @@ const emptyCreateDialog = ref(false); style="flex-grow: 1" > ({ - name: $t('customer.form.instance', { index: i + 1 }), + name: $t('general.times', { number: i + 1 }), anchor: `form-employee-checkup-${i}`, tab: 'healthCheck', })) || []), ...(currentFromDataEmployee.employeeWork?.map((v, i) => ({ - name: $t('customer.form.instance', { index: i + 1 }), + name: $t('general.times', { number: i + 1 }), anchor: `form-employee-work-history-${i}`, tab: 'workHistory', })) || []), { - name: $t('formDialogTitleFamilyHistory'), + name: $t('customerEmployee.form.group.family'), anchor: 'form-employee-other', tab: 'other', }, @@ -2159,7 +2168,7 @@ const emptyCreateDialog = ref(false); dense outlined separator - :title="$t('formDialogTitleInformation')" + title="form.field.basicInformation" :readonly="!employeeFormState.isEmployeeEdit" :employee-owner-option="employeeStore.ownerOption" v-model:customer-branch="employeeFormState.formDataEmployeeOwner" @@ -2176,7 +2185,7 @@ const emptyCreateDialog = ref(false); outlined employee separator - :title="$t('personalInfo')" + title="customerEmployee.form.group.personalInfo" v-model:open="employeeFormState.dialogModal" v-model:firstName="currentFromDataEmployee.firstName" v-model:lastName="currentFromDataEmployee.lastName" @@ -2210,7 +2219,7 @@ const emptyCreateDialog = ref(false); dense outlined separator - :title="$t('formDialogTitlePassport')" + :title="$t('customerEmployee.form.group.passport')" v-model:passport-type="currentFromDataEmployee.passportType" v-model:passport-number="currentFromDataEmployee.passportNumber" v-model:passport-issue-date=" @@ -2236,7 +2245,7 @@ const emptyCreateDialog = ref(false); id="form-visa" dense outlined - :title="$t(`formDialogTitleVisa`)" + title="customerEmployee.form.group.visa" v-model:visa-type="currentFromDataEmployee.visaType" v-model:visa-number="currentFromDataEmployee.visaNumber" v-model:visa-issue-date="currentFromDataEmployee.visaIssueDate" @@ -2520,7 +2529,7 @@ const emptyCreateDialog = ref(false); ({ - name: $t('customer.form.instance', { index: i + 1 }), + name: $t('general.times', { number: i + 1 }), anchor: `drawer-employee-checkup-${i}`, tab: 'healthCheck', }), ) || []), ...(currentFromDataEmployee.employeeWork?.map((v, i) => ({ - name: $t('customer.form.instance', { index: i + 1 }), + name: $t('general.times', { number: i + 1 }), anchor: `drawer-employee-work-history-${i}`, tab: 'workHistory', })) || []), { - name: $t('formDialogTitleFamilyHistory'), + name: $t('customerEmployee.form.group.family'), anchor: 'drawer-other', tab: 'other', }, @@ -2944,7 +2962,7 @@ const emptyCreateDialog = ref(false); prefix-id="drawer-info-employee" dense outlined - :title="'formDialogTitleInformation'" + title="form.field.basicInformation" :readonly="!employeeFormState.isEmployeeEdit" :employee-owner-option="employeeStore.ownerOption" v-model:customer-branch=" @@ -2965,7 +2983,7 @@ const emptyCreateDialog = ref(false); outlined employee separator - :title="'personalInfo'" + title="customerEmployee.form.group.personalInfo" :readonly="!employeeFormState.isEmployeeEdit" v-model:firstName="currentFromDataEmployee.firstName" v-model:lastName="currentFromDataEmployee.lastName" @@ -2996,7 +3014,7 @@ const emptyCreateDialog = ref(false); dense outlined separator - :title="'formDialogTitlePassport'" + :title="'customerEmployee.form.group.passport'" :readonly="!employeeFormState.isEmployeeEdit" v-model:passport-type="currentFromDataEmployee.passportType" v-model:passport-number="currentFromDataEmployee.passportNumber" @@ -3022,7 +3040,7 @@ const emptyCreateDialog = ref(false); id="drawer-form-visa" dense outlined - :title="`formDialogTitleVisa`" + title="customerEmployee.form.group.visa" :readonly="!employeeFormState.isEmployeeEdit" v-model:visa-type="currentFromDataEmployee.visaType" v-model:visa-number="currentFromDataEmployee.visaNumber" diff --git a/src/pages/03_customer-management/components/employer/EmployerFormBasicInfo.vue b/src/pages/03_customer-management/components/employer/EmployerFormBasicInfo.vue index 9760e5c7..face0557 100644 --- a/src/pages/03_customer-management/components/employer/EmployerFormBasicInfo.vue +++ b/src/pages/03_customer-management/components/employer/EmployerFormBasicInfo.vue @@ -145,7 +145,7 @@ function formatCode(input: string | undefined, type: 'code' | 'number') { name="mdi-office-building-outline" style="background-color: var(--surface-3)" /> - {{ $t('customer.form.group.basicInfo') }} + {{ $t('form.field.basicInformation') }} - {{ $t('noResults') }} + {{ $t('general.noData') }} @@ -244,7 +244,7 @@ function formatCode(input: string | undefined, type: 'code' | 'number') { :readonly="readonly" :options="prefixNameOptions" :for="`${prefixId}-select-prefix-name`" - :label="$t('formDialogInputPrefixName')" + :label="$t('form.prefixName')" @filter="prefixNameFilter" :model-value="readonly ? namePrefix || '-' : namePrefix" @update:model-value=" @@ -263,7 +263,7 @@ function formatCode(input: string | undefined, type: 'code' | 'number') { @@ -364,7 +364,7 @@ function formatCode(input: string | undefined, type: 'code' | 'number') { :options="genderOptions" :hide-dropdown-icon="readonly" :for="`${prefixId}-select-gender`" - :label="$t('formDialogInputGender')" + :label="$t('form.gender')" @filter="genderFilter" :model-value="readonly ? gender || '-' : gender" @update:model-value="(v) => (typeof v === 'string' ? (gender = v) : '')" @@ -379,7 +379,7 @@ function formatCode(input: string | undefined, type: 'code' | 'number') { @@ -394,16 +394,16 @@ function formatCode(input: string | undefined, type: 'code' | 'number') { :disabled-dates="disabledAfterToday" :teleport="true" :dark="$q.dark.isActive" - :locale="$i18n.locale === 'th-th' ? 'th' : 'en'" + :locale="$i18n.locale === 'tha' ? 'th' : 'en'" :enableTimePicker="false" :disabled="readonly" class="col-12 col-md-3" > @@ -162,7 +162,7 @@ let jobPositionFilter = selectFilterOptionRefMod( diff --git a/src/pages/03_customer-management/constant.ts b/src/pages/03_customer-management/constant.ts index fcc90430..bbb62ac1 100644 --- a/src/pages/03_customer-management/constant.ts +++ b/src/pages/03_customer-management/constant.ts @@ -17,56 +17,56 @@ export const columnsEmployee = [ { name: 'orderNumber', align: 'center', - label: 'orderNumber', + label: 'general.orderNumber', field: 'branchNo', }, { name: 'firstName', align: 'left', - label: 'nameEmployee', + label: 'general.name', field: 'firstName', }, { - name: 'formDialogInputAge', + name: 'general.age', align: 'left', - label: 'formDialogInputAge', + label: 'general.age', field: 'dateOfBirth', }, { name: 'formDialogInputNationality', align: 'left', - label: 'formDialogInputNationality', + label: 'general.nationality', field: 'nationality', }, { name: 'formDialogInputPassportNo', align: 'left', - label: 'formDialogInputPassportNo', + label: 'customerEmployee.form.passportNo', field: 'passportNumber', }, { name: 'passportExpiryDate', align: 'left', - label: 'passportExpire', + label: 'customerEmployee.form.passportExpireDate', field: 'passportExpiryDate', }, { name: 'formDialogEmployeeNRCNo', align: 'left', - label: 'formDialogEmployeeNRCNo', + label: 'customerEmployee.form.nrcNo', field: 'nrcNo', }, { name: 'branchLabel', align: 'left', - label: 'branchLabel', + label: 'customerEmployee.branch', field: 'customerBranch', }, diff --git a/src/pages/04_product-service/MainPage.vue b/src/pages/04_product-service/MainPage.vue index 048798f2..c372c9c4 100644 --- a/src/pages/04_product-service/MainPage.vue +++ b/src/pages/04_product-service/MainPage.vue @@ -1,5 +1,5 @@