refactor: handle i18n
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 6s

This commit is contained in:
Thanaphon Saengchan 2025-10-15 10:24:07 +07:00
parent 8e65a1c5a2
commit 04c463a717

View file

@ -541,7 +541,8 @@ onMounted(async () => {
<div class="col">
<div class="col">
{{
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 || '-'
}}
</div>
<div class="col app-text-muted">
{{
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 || '-'
}}
</div>
</div>
</div>