feat: เพิ่ม i18n

This commit is contained in:
Net 2024-06-12 16:21:33 +07:00
parent c69283e1b1
commit 7def527426
3 changed files with 22 additions and 5 deletions

View file

@ -172,4 +172,7 @@ export default {
formDialogTabWork: 'Work ',
formDialogEmployerRanchCode: 'Branch Code',
formTitleCustomer: 'Company {msg}',
formTitleBranch: 'Branch {msg}',
};

View file

@ -171,4 +171,7 @@ export default {
formDialogTabWork: 'ครั้งที่ ',
formDialogEmployerRanchCode: 'รหัสสาขา',
formTitleCustomer: 'บริษัท {msg}',
formTitleBranch: 'สาขา {msg}',
};

View file

@ -212,6 +212,12 @@ const statsCustomerType = ref<CustomerStats>();
const currentCustomerId = ref<string>('');
const dialogInputCustomerBranchForm = ref<boolean>(false);
const currentCustomer = ref<Customer>();
const currentBranch = ref<{ name: string; code: string }>({
name: '',
code: '',
});
const branch = ref<CustomerBranch[]>();
const currentPageCustomer = ref<number>(1);
@ -1282,12 +1288,17 @@ watch(fieldSelectedCustomer, async () => {
@dialog="dialogInputCustomerBranchForm = true"
@viewDetail="
(v) => {
infoDrawerBranch = true;
currentBranchId = v[0].id;
currentBranch = {
name: v[0].name,
code: v[0].code,
};
if (!!currentCustomer && !!v) {
assignFormData({ ...currentCustomer, branch: v });
}
infoDrawerBranch = true;
}
"
v-model:branch="branch"
@ -1875,9 +1886,9 @@ watch(fieldSelectedCustomer, async () => {
<!-- DRAWER INFO ของ นายจาง -->
<DrawerInfo
title="บริษัททดสอบ"
:title="$t('formTitleCustomer', { msg: currentCustomer?.customerName })"
v-model:drawer-open="infoDrawer"
badgeLabel="HQ006"
:badgeLabel="currentCustomer?.code"
badgeClass="app-bg-pers"
:undo="() => undo()"
:isEdit="infoDrawerEdit"
@ -2065,9 +2076,9 @@ watch(fieldSelectedCustomer, async () => {
<!-- DRAWER INFO ของ สาขา -->
<DrawerInfo
title="สาขา"
:title="$t('formTitleBranch', { msg: currentBranch.name })"
v-model:drawer-open="infoDrawerBranch"
badgeLabel="HQ006"
:badgeLabel="currentBranch.code"
badgeClass="app-bg-pers"
:undo="() => undo()"
:isEdit="infoDrawerEdit"