From add8d91fdf6cffc25041f1613423999266dc9b4d Mon Sep 17 00:00:00 2001 From: Methapon Metanipat Date: Thu, 14 Nov 2024 09:11:30 +0700 Subject: [PATCH] fix: address display --- src/pages/03_customer-management/BranchPage.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/pages/03_customer-management/BranchPage.vue b/src/pages/03_customer-management/BranchPage.vue index e6b357fb..f855e962 100644 --- a/src/pages/03_customer-management/BranchPage.vue +++ b/src/pages/03_customer-management/BranchPage.vue @@ -38,6 +38,7 @@ import { EmployerFormBusiness, EmployerFormContact, } from './components'; +import { formatAddress } from 'src/utils/address'; const flowStore = useFlowStore(); const customerStore = useCustomerStore(); @@ -491,9 +492,10 @@ watch( class="text-left" > {{ - $i18n.locale === 'eng' - ? `${props.row.addressEN || ''} ${props.row.subDistrict?.nameEN || ''} ${props.row.district?.nameEN || ''} ${props.row.province?.nameEN || ''}` - : `${props.row.address || ''} ${props.row.subDistrict?.name || ''} ${props.row.district?.name || ''} ${props.row.province?.name || ''}` + { + ['eng']: formatAddress({ ...props.row, en: true }), + ['tha']: formatAddress({ ...props.row, en: false }), + }[$i18n.locale] }}