feat: update email template
continuous-integration/drone/tag Build is passing
Details
continuous-integration/drone/tag Build is passing
Details
parent
2527437577
commit
457ce30cc1
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
After Width: | Height: | Size: 504 KiB |
|
@ -32,7 +32,6 @@ export class PaymentTransactionHandler
|
|||
const current_data = event.data.data;
|
||||
const data_id = current_data.transaction_id ?? event.data.id;
|
||||
const from_refund = event.data.module == TABLE_NAME.REFUND;
|
||||
console.log('payment handlet', { data_id });
|
||||
|
||||
const payments = await this.paymentService.getManyByOptions({
|
||||
where: {
|
||||
|
@ -106,6 +105,15 @@ export class PaymentTransactionHandler
|
|||
`;
|
||||
})}
|
||||
</ul>`,
|
||||
|
||||
refund_items_data: transaction?.['refund']?.refund_items
|
||||
?.filter((item) => Number(item.qty_refund) > 0)
|
||||
.map((item) => {
|
||||
return {
|
||||
qty_refund: item.qty_refund,
|
||||
item_name: item.transaction_item.item_name,
|
||||
};
|
||||
}),
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ export async function sendEmail(receivers, invoiceType, attachment?) {
|
|||
for (const receiver of receivers) {
|
||||
try {
|
||||
const templateName = getTemplate(receiver.payment_type, invoiceType);
|
||||
const templatePath = `./assets/email-template/${templateName}.html`;
|
||||
const templatePath = `./assets/email-template/redesign/${templateName}.html`;
|
||||
const templateSource = fs.readFileSync(templatePath, 'utf8');
|
||||
|
||||
const template = handlebars.compile(templateSource);
|
||||
|
|
Loading…
Reference in New Issue