refactor: mail templates

This commit is contained in:
Ahmed Bouhuolia
2025-06-08 16:49:03 +02:00
parent 0a57b6e20e
commit 4366bf478a
44 changed files with 1866 additions and 134 deletions

View File

@@ -1,6 +1,4 @@
import {
IPaymentReceivedCreateDTO,
IPaymentReceivedEditDTO,
IPaymentsReceivedFilter,
PaymentReceiveMailOptsDTO,
} from './types/PaymentReceived.types';
@@ -79,7 +77,9 @@ export class PaymentReceivesApplication {
* @param {IPaymentsReceivedFilter} filterDTO
* @returns
*/
public async getPaymentsReceived(filterDTO: Partial<IPaymentsReceivedFilter>) {
public async getPaymentsReceived(
filterDTO: Partial<IPaymentsReceivedFilter>,
) {
return this.getPaymentsReceivedService.getPaymentReceives(filterDTO);
}
@@ -142,6 +142,17 @@ export class PaymentReceivesApplication {
);
}
/**
* Retrieves html content of the given payment receive.
* @param {number} paymentReceivedId
* @returns {Promise<string>}
*/
public getPaymentReceivedHtml(paymentReceivedId: number) {
return this.getPaymentReceivePdfService.getPaymentReceivedHtml(
paymentReceivedId,
);
}
/**
* Retrieves the create/edit initial state of the payment received.
* @returns {Promise<IPaymentReceivedState>}