mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 20:30:33 +00:00
feat: branding templates table
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
import { Transformer } from '@/lib/Transformer/Transformer';
|
||||
import { getTransactionTypeLabel } from '@/utils/transactions-types';
|
||||
|
||||
export class GetPdfTemplatesTransformer extends Transformer {
|
||||
// Empty transformer with no additional methods or attributes
|
||||
|
||||
/**
|
||||
* Exclude attributes.
|
||||
* @returns {string[]}
|
||||
@@ -10,4 +9,20 @@ export class GetPdfTemplatesTransformer extends Transformer {
|
||||
public excludeAttributes = (): string[] => {
|
||||
return ['attributes'];
|
||||
};
|
||||
|
||||
/**
|
||||
* Includeded attributes.
|
||||
* @returns {string[]}
|
||||
*/
|
||||
public includeAttributes = (): string[] => {
|
||||
return ['createdAtFormatted', 'resourceFormatted'];
|
||||
};
|
||||
|
||||
private createdAtFormatted = (template) => {
|
||||
return this.formatDate(template.createdAt);
|
||||
};
|
||||
|
||||
private resourceFormatted = (template) => {
|
||||
return getTransactionTypeLabel(template.resource);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user