diff --git a/src/modules/configuration/mail/domain/email-template/change-date-information.html b/assets/email-template/change-date-information.html similarity index 100% rename from src/modules/configuration/mail/domain/email-template/change-date-information.html rename to assets/email-template/change-date-information.html diff --git a/src/modules/configuration/mail/domain/email-template/invoice-bank.html b/assets/email-template/invoice-bank.html similarity index 100% rename from src/modules/configuration/mail/domain/email-template/invoice-bank.html rename to assets/email-template/invoice-bank.html diff --git a/src/modules/configuration/mail/domain/email-template/invoice-expired.html b/assets/email-template/invoice-expired.html similarity index 100% rename from src/modules/configuration/mail/domain/email-template/invoice-expired.html rename to assets/email-template/invoice-expired.html diff --git a/src/modules/configuration/mail/domain/email-template/invoice-midtrans.html b/assets/email-template/invoice-midtrans.html similarity index 100% rename from src/modules/configuration/mail/domain/email-template/invoice-midtrans.html rename to assets/email-template/invoice-midtrans.html diff --git a/src/modules/configuration/mail/domain/email-template/payment-confirmation.html b/assets/email-template/payment-confirmation.html similarity index 96% rename from src/modules/configuration/mail/domain/email-template/payment-confirmation.html rename to assets/email-template/payment-confirmation.html index 4fcd182..e9bb48a 100644 --- a/src/modules/configuration/mail/domain/email-template/payment-confirmation.html +++ b/assets/email-template/payment-confirmation.html @@ -1,412 +1,412 @@ - - - - - - - Email Confirmation - - - - - - - - - - -
  -
- - - - - - -
- - - - -
-

Dear,

-

{{customer_name}}

-

{{customer_phone}}

- -

We are excited to inform you that your payment has been successfully received!

-

Attached to this email, you will find your confirmatin receipt

-

Please keep this safe as you will need to show it at the entrance upon your arrival

-

It's your golden ticket to all the fun and excitement awaiting you!

- -
-

Here's a quick recap:

- -

Booking Date: {{booking_date}}

-

Invoice Code: {{invoice_code}}

-

Payment Date: {{payment_date}}

-

Payment Code: {{payment_code}}

-

Payment Via: {{payment_via}}

-

Account No: {{account_no}}

-

On Behalf Of: {{account_name}}

-
- -

If you have any questions or need assistance, feel free to reach out to our support team at

- {{phone_cs}} -
- -

Font forget to bring a smile and your confirmation receipt (attached) for a smooth entry

-

We can't wait to see you and ensure you have an amazing time with us!

- -

- Best Regrads,
- WEplayground -
-
-
-
 
- - + + + + + + + Email Confirmation + + + + + + + + + + +
  +
+ + + + + + +
+ + + + +
+

Dear,

+

{{customer_name}}

+

{{customer_phone}}

+ +

We are excited to inform you that your payment has been successfully received!

+

Attached to this email, you will find your confirmatin receipt

+

Please keep this safe as you will need to show it at the entrance upon your arrival

+

It's your golden ticket to all the fun and excitement awaiting you!

+ +
+

Here's a quick recap:

+ +

Booking Date: {{booking_date}}

+

Invoice Code: {{invoice_code}}

+

Payment Date: {{payment_date}}

+

Payment Code: {{payment_code}}

+

Payment Via: {{payment_via}}

+

Account No: {{account_no}}

+

On Behalf Of: {{account_name}}

+
+ +

If you have any questions or need assistance, feel free to reach out to our support team at

+ {{phone_cs}} +
+ +

Font forget to bring a smile and your confirmation receipt (attached) for a smooth entry

+

We can't wait to see you and ensure you have an amazing time with us!

+ +

+ Best Regrads,
+ WEplayground +
+
+
+
 
+ + \ No newline at end of file diff --git a/src/modules/configuration/mail/domain/email-template/refund-confirmation.html b/assets/email-template/refund-confirmation.html similarity index 100% rename from src/modules/configuration/mail/domain/email-template/refund-confirmation.html rename to assets/email-template/refund-confirmation.html diff --git a/src/modules/configuration/mail/domain/email-template/refund-request.html b/assets/email-template/refund-request.html similarity index 100% rename from src/modules/configuration/mail/domain/email-template/refund-request.html rename to assets/email-template/refund-request.html diff --git a/src/modules/configuration/mail/domain/helpers/send-email.helper.ts b/src/modules/configuration/mail/domain/helpers/send-email.helper.ts index 681e7a6..ad0532a 100644 --- a/src/modules/configuration/mail/domain/helpers/send-email.helper.ts +++ b/src/modules/configuration/mail/domain/helpers/send-email.helper.ts @@ -1,6 +1,5 @@ import * as nodemailer from 'nodemailer'; import * as handlebars from 'handlebars'; -import * as path from 'path'; import * as fs from 'fs'; import { TransactionPaymentType } from 'src/modules/transaction/transaction/constants'; import { InvoiceType } from 'src/modules/configuration/export/constants'; @@ -18,11 +17,7 @@ export async function sendEmail(receivers, invoiceType, attachment?) { for (const receiver of receivers) { try { const templateName = getTemplate(receiver.payment_type, invoiceType); - let templatePath = path.join( - __dirname, - `../email-template/${templateName}.html`, - ); - templatePath = templatePath.replace(/dist/g, 'src'); + const templatePath = `./assets/email-template/${templateName}.html`; const templateSource = fs.readFileSync(templatePath, 'utf8'); const template = handlebars.compile(templateSource);