feat: display expense formatted amount.

This commit is contained in:
a.bouhuolia
2021-12-21 18:36:45 +02:00
parent a456b9d942
commit dd7b44eb29
4 changed files with 12 additions and 21 deletions

View File

@@ -12,11 +12,13 @@ import {
MenuDivider,
} from '@blueprintjs/core';
import intl from 'react-intl-universal';
import clsx from 'classnames';
import { CLASSES } from 'common/classes';
import { ExpenseAction, AbilitySubject } from '../../../common/abilityOption';
import {
FormatDateCell,
FormattedMessage as T,
Money,
Icon,
If,
Can,
@@ -98,13 +100,6 @@ export function ActionsCell(props) {
);
}
/**
* Total amount accessor.
*/
export function TotalAmountAccessor(row) {
return <Money amount={row.total_amount} currency={row.currency_code} />;
}
/**
* Publish accessor.
*/
@@ -149,11 +144,12 @@ export function useExpensesTableColumns() {
{
id: 'amount',
Header: intl.get('full_amount'),
accessor: TotalAmountAccessor,
accessor: 'formatted_amount',
className: 'amount',
align: 'right',
width: 150,
clickable: true,
className: clsx(CLASSES.FONT_BOLD),
},
{
id: 'payment_account',