mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-21 15:20:34 +00:00
add: Created attribute formattedPublishedAt to display on Expense Drawer
This commit is contained in:
@@ -16,6 +16,7 @@ export class ExpenseTransfromer extends Transformer {
|
|||||||
'formattedAllocatedCostAmount',
|
'formattedAllocatedCostAmount',
|
||||||
'formattedDate',
|
'formattedDate',
|
||||||
'formattedCreatedAt',
|
'formattedCreatedAt',
|
||||||
|
'formattedPublishedAt',
|
||||||
'categories',
|
'categories',
|
||||||
'attachments',
|
'attachments',
|
||||||
];
|
];
|
||||||
@@ -91,4 +92,13 @@ export class ExpenseTransfromer extends Transformer {
|
|||||||
protected attachments = (expense: IExpense) => {
|
protected attachments = (expense: IExpense) => {
|
||||||
return this.item(expense.attachments, new AttachmentTransformer());
|
return this.item(expense.attachments, new AttachmentTransformer());
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve formatted published at date.
|
||||||
|
* @param {IExpense} expense
|
||||||
|
* @returns {string}
|
||||||
|
*/
|
||||||
|
protected formattedPublishedAt = (expense: IExpense): string => {
|
||||||
|
return this.formatDate(expense.publishedAt);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user