chore: clean pdf templates code

This commit is contained in:
Ahmed Bouhuolia
2024-09-15 22:55:39 +02:00
parent ef4beaa564
commit 94c08f0b9e
7 changed files with 106 additions and 38 deletions

View File

@@ -18,11 +18,21 @@ export class GetPdfTemplatesTransformer extends Transformer {
return ['createdAtFormatted', 'resourceFormatted'];
};
private createdAtFormatted = (template) => {
/**
* Formats the creation date of the PDF template.
* @param {Object} template
* @returns {string} A formatted string representing the creation date of the template.
*/
protected createdAtFormatted = (template) => {
return this.formatDate(template.createdAt);
};
private resourceFormatted = (template) => {
/**
* Formats the creation date of the PDF template.
* @param {Object} template -
* @returns {string} A formatted string representing the creation date of the template.
*/
protected resourceFormatted = (template) => {
return getTransactionTypeLabel(template.resource);
};
}