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

@@ -171,6 +171,9 @@ export class SaleInvoicesController {
'Content-Length': pdfContent.length,
});
res.send(pdfContent);
} else if (acceptHeader.includes(AcceptType.ApplicationTextHtml)) {
const htmlContent = await this.saleInvoiceApplication.saleInvoiceHtml(id);
return { htmlContent };
} else {
return this.saleInvoiceApplication.getSaleInvoice(id);
}
@@ -270,7 +273,7 @@ export class SaleInvoicesController {
return this.saleInvoiceApplication.saleInvoiceHtml(id);
}
@Get(':id/mail-state')
@Get(':id/mail')
@ApiOperation({ summary: 'Retrieves the sale invoice mail state.' })
@ApiResponse({
status: 200,