feat: payment received mail preview

This commit is contained in:
Ahmed Bouhuolia
2024-11-21 14:32:28 +02:00
parent c5c85bdfbe
commit b6f3c0145f
27 changed files with 422 additions and 366 deletions

View File

@@ -20,6 +20,7 @@ import { PaymentReceiveNotifyBySms } from './PaymentReceivedSmsNotify';
import GetPaymentReceivedPdf from './GetPaymentReceivedPdf';
import { SendPaymentReceiveMailNotification } from './PaymentReceivedMailNotification';
import { GetPaymentReceivedState } from './GetPaymentReceivedState';
import { GetPaymentReceivedMailState } from './GetPaymentReceivedMailState';
@Service()
export class PaymentReceivesApplication {
@@ -53,6 +54,9 @@ export class PaymentReceivesApplication {
@Inject()
private getPaymentReceivedStateService: GetPaymentReceivedState;
@Inject()
private getPaymentReceivedMailStateService: GetPaymentReceivedMailState;
/**
* Creates a new payment receive.
* @param {number} tenantId
@@ -204,12 +208,15 @@ export class PaymentReceivesApplication {
/**
* Retrieves the default mail options of the given payment transaction.
* @param {number} tenantId
* @param {number} paymentReceiveId
* @param {number} tenantId - Tenant id.
* @param {number} paymentReceiveId - Payment received id.
* @returns {Promise<void>}
*/
public getPaymentMailOptions(tenantId: number, paymentReceiveId: number) {
return this.paymentMailNotify.getMailOptions(tenantId, paymentReceiveId);
return this.getPaymentReceivedMailStateService.getMailOptions(
tenantId,
paymentReceiveId
);
}
/**