mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-21 15:20:34 +00:00
feat: cashflow tranasction date format
This commit is contained in:
@@ -7,7 +7,12 @@ export class CashflowTransactionTransformer extends Transformer {
|
|||||||
* @returns {string[]}
|
* @returns {string[]}
|
||||||
*/
|
*/
|
||||||
public includeAttributes = (): string[] => {
|
public includeAttributes = (): string[] => {
|
||||||
return ['formattedAmount', 'transactionTypeFormatted'];
|
return [
|
||||||
|
'formattedAmount',
|
||||||
|
'transactionTypeFormatted',
|
||||||
|
'formattedDate',
|
||||||
|
'formattedCreatedAt',
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -29,5 +34,23 @@ export class CashflowTransactionTransformer extends Transformer {
|
|||||||
*/
|
*/
|
||||||
protected transactionTypeFormatted = (transaction) => {
|
protected transactionTypeFormatted = (transaction) => {
|
||||||
return this.context.i18n.__(transaction.transactionTypeFormatted);
|
return this.context.i18n.__(transaction.transactionTypeFormatted);
|
||||||
}
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve the formatted transaction date.
|
||||||
|
* @param invoice
|
||||||
|
* @returns {string}
|
||||||
|
*/
|
||||||
|
protected formattedDate = (invoice): string => {
|
||||||
|
return this.formatDate(invoice.date);
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve the formatted created at date.
|
||||||
|
* @param invoice
|
||||||
|
* @returns {string}
|
||||||
|
*/
|
||||||
|
protected formattedCreatedAt = (invoice): string => {
|
||||||
|
return this.formatDate(invoice.createdAt);
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -207,7 +207,7 @@ export default class OrganizationService {
|
|||||||
): IOrganizationBuildDTO {
|
): IOrganizationBuildDTO {
|
||||||
return {
|
return {
|
||||||
...buildDTO,
|
...buildDTO,
|
||||||
dateFormat: defaultTo(buildDTO.dateFormat, 'DD/MM/yyyy'),
|
dateFormat: defaultTo(buildDTO.dateFormat, 'DD MMM yyyy'),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ export default function CashflowTransactionDrawerHeader() {
|
|||||||
</DetailItem>
|
</DetailItem>
|
||||||
|
|
||||||
<DetailItem label={<T id={'date'} />}>
|
<DetailItem label={<T id={'date'} />}>
|
||||||
<FormatDate value={cashflowTransaction.date} />
|
{cashflowTransaction.formatted_date}
|
||||||
</DetailItem>
|
</DetailItem>
|
||||||
|
|
||||||
<DetailItem name={'reference-no'} label={<T id={'reference_no'} />}>
|
<DetailItem name={'reference-no'} label={<T id={'reference_no'} />}>
|
||||||
|
|||||||
Reference in New Issue
Block a user