feat: i18n register name en
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 5s
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 5s
This commit is contained in:
parent
72b0e89642
commit
db5262da42
2 changed files with 20 additions and 6 deletions
|
|
@ -83,11 +83,16 @@ defineEmits<{
|
|||
<!-- NOTE: custom column will starts with # -->
|
||||
<template v-if="!col.name.startsWith('#')">
|
||||
<span>
|
||||
{{
|
||||
typeof col.field === 'string'
|
||||
? props.row[col.field as keyof Invoice]
|
||||
: col.field(props.row)
|
||||
}}
|
||||
<template v-if="typeof col.field === 'function'">
|
||||
{{
|
||||
typeof col.field(props.row) === 'object'
|
||||
? col.field(props.row)[$i18n.locale]
|
||||
: col.field(props.row)
|
||||
}}
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ props.row[col.field as keyof Invoice] }}
|
||||
</template>
|
||||
</span>
|
||||
</template>
|
||||
<template v-if="col.name === '#order'">
|
||||
|
|
|
|||
|
|
@ -29,7 +29,16 @@ export const columns = [
|
|||
name: 'customer',
|
||||
align: 'center',
|
||||
label: 'general.customer',
|
||||
field: (v: Invoice) => v.quotation.customerBranch.registerName,
|
||||
field: (v: Invoice) =>
|
||||
v.quotation.customerBranch.customer.customerType === 'CORP'
|
||||
? {
|
||||
tha: v.quotation.customerBranch.registerName,
|
||||
eng: v.quotation.customerBranch.registerNameEN,
|
||||
}
|
||||
: {
|
||||
tha: `${v.quotation.customerBranch.firstName || ''} ${v.quotation.customerBranch.lastName || ''}`,
|
||||
eng: `${v.quotation.customerBranch.firstNameEN || ''} ${v.quotation.customerBranch.lastNameEN || ''}`,
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue