From 04c463a7172b433cadc52341b30dc5700e9b0455 Mon Sep 17 00:00:00 2001 From: net Date: Wed, 15 Oct 2025 10:24:07 +0700 Subject: [PATCH] refactor: handle i18n --- .../03_customer-management/TabCustomer.vue | 32 +++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/src/pages/03_customer-management/TabCustomer.vue b/src/pages/03_customer-management/TabCustomer.vue index e658ea92..bbce08f3 100644 --- a/src/pages/03_customer-management/TabCustomer.vue +++ b/src/pages/03_customer-management/TabCustomer.vue @@ -541,7 +541,8 @@ onMounted(async () => {
{{ - props.row.customerType === 'CORP' + props.row.customerType === 'CORP' && + locale === 'tha' ? props.row.branch[0]?.registerName || '-' : optionStore.mapOption( props.row.branch[0].namePrefix, @@ -551,10 +552,24 @@ onMounted(async () => { ' ' + props.row.branch[0]?.lastName || '-' }} + + {{ + props.row.customerType === 'CORP' && + locale === 'eng' + ? props.row.branch[0]?.registerNameEN || '-' + : optionStore.mapOption( + props.row.branch[0].namePrefix, + ) + + ' ' + + props.row.branch[0]?.firstNameEN + + ' ' + + props.row.branch[0]?.lastNameEN || '-' + }}
{{ - props.row.customerType === 'CORP' + props.row.customerType === 'CORP' && + locale === 'tha' ? props.row.branch[0]?.registerNameEN || '-' : capitalizeFirstLetter( props.row.branch[0].namePrefix, @@ -564,6 +579,19 @@ onMounted(async () => { ' ' + props.row.branch[0]?.lastNameEN || '-' }} + + {{ + props.row.customerType === 'CORP' && + locale === 'eng' + ? props.row.branch[0]?.registerName || '-' + : capitalizeFirstLetter( + props.row.branch[0].namePrefix, + ) + + ' ' + + props.row.branch[0]?.firstName + + ' ' + + props.row.branch[0]?.lastName || '-' + }}