diff --git a/src/i18n/eng.ts b/src/i18n/eng.ts index bd73b2d4..3379ba60 100644 --- a/src/i18n/eng.ts +++ b/src/i18n/eng.ts @@ -161,6 +161,7 @@ export default { documentStatus: 'Document Status', advanceSearch: 'Advance Search', totalPeople: '{meg} people', + price: 'Price {price} Baht', }, menu: { diff --git a/src/i18n/tha.ts b/src/i18n/tha.ts index fabda8d0..180c264c 100644 --- a/src/i18n/tha.ts +++ b/src/i18n/tha.ts @@ -161,6 +161,7 @@ export default { documentStatus: 'สถานะเอกสาร', advanceSearch: 'ค้นหาขั้นสูง', totalPeople: '{meg} คน', + price: 'ราคา {price} บาท', }, menu: { diff --git a/src/utils/string-template.ts b/src/utils/string-template.ts index 7cbbfcdd..ac3c0337 100644 --- a/src/utils/string-template.ts +++ b/src/utils/string-template.ts @@ -74,14 +74,14 @@ const templates = { const employee = v.request.employee; const branch = v.request.quotation.customerBranch; return ( - `${i + 1}. ` + - ` ${v.request.code}_${branch.customer.customerType === 'PERS' ? `${branch.namePrefix}. ${branch.firstNameEN} ${branch.lastNameEN} `.toUpperCase() : branch.registerName}_` + + ` ${i + 1}. ` + + ` ${v.request.code}_${branch.customer.customerType === 'PERS' ? `${branch.namePrefix}. ${branch.firstNameEN} ${branch.lastNameEN} `.toUpperCase() : i18n.global.locale.value == 'tha' ? branch.registerName : branch.registerNameEN}_` + `${employee.namePrefix}. ${employee.firstNameEN} ${employee.lastNameEN} `.toUpperCase() + `${!!v.failedType && v.failedType !== 'other' ? `${i18n.global.t(`taskOrder.${v.failedType}`)}` : !!v.failedComment ? v.failedComment : ''}` ); }); return [ - `- ${item.product.name} ราคา ${price} บาท`, + `- ${item.product.name} ${i18n.global.t('price', { price: price })} `, '', ...list, '',