fix: numeric values formating.

This commit is contained in:
a.bouhuolia
2021-09-14 15:28:02 +02:00
parent 40ff1464c8
commit e1a2fa57db
50 changed files with 492 additions and 420 deletions

View File

@@ -9,12 +9,12 @@ import {
MenuDivider,
Position,
} from '@blueprintjs/core';
import { Money, Choose, Icon, If } from 'components';
import { FormattedMessage as T } from 'components';
import intl from 'react-intl-universal';
import { safeCallback } from 'utils';
import moment from 'moment';
import { FormattedMessage as T, Money, Choose, Icon, If } from 'components';
import { safeCallback } from 'utils';
/**
* Status accessor.
*/
@@ -196,7 +196,7 @@ export function useEstiamtesTableColumns() {
Header: intl.get('amount'),
accessor: AmountAccessor,
width: 140,
className: 'amount',
align: 'right',
clickable: true,
},
{

View File

@@ -11,11 +11,9 @@ import {
Button,
} from '@blueprintjs/core';
import intl from 'react-intl-universal';
import { FormattedMessage as T } from 'components';
import moment from 'moment';
import { Choose, If, Icon } from 'components';
import { Money, AppToaster } from 'components';
import { FormattedMessage as T, AppToaster, Choose, If, Icon } from 'components';
import { formattedAmount, safeCallback, calculateStatus } from 'utils';
export const statusAccessor = (row) => {
@@ -146,17 +144,6 @@ export function ActionsMenu({
);
}
function ActionsCell(props) {
return (
<Popover
content={<ActionsMenu {...props} />}
position={Position.RIGHT_BOTTOM}
>
<Button icon={<Icon icon="more-h-16" iconSize={16} />} />
</Popover>
);
}
/**
* Retrieve invoices table columns.
*/
@@ -196,7 +183,7 @@ export function useInvoicesTableColumns() {
Header: intl.get('balance'),
accessor: 'formatted_amount',
width: 120,
className: 'balance',
align: 'right',
clickable: true,
textOverview: true,
},

View File

@@ -10,6 +10,7 @@ import {
} from '@blueprintjs/core';
import intl from 'react-intl-universal';
import moment from 'moment';
import { Money, Icon } from 'components';
import { safeCallback } from 'utils';
@@ -105,7 +106,7 @@ export function usePaymentReceivesColumns() {
Header: intl.get('amount'),
accessor: AmountAccessor,
width: 120,
className: 'amount',
align: 'right',
clickable: true,
textOverview: true,
},

View File

@@ -11,9 +11,10 @@ import {
Tag,
Button,
} from '@blueprintjs/core';
import moment from 'moment';
import { safeCallback } from 'utils';
import { Choose, Money, Icon, If } from 'components';
import moment from 'moment';
export function ActionsMenu({
payload: { onEdit, onDelete, onClose, onDrawer, onViewDetails, onPrint },
@@ -136,7 +137,7 @@ export function useReceiptsTableColumns() {
Header: intl.get('amount'),
accessor: (r) => <Money amount={r.amount} currency={r.currency_code} />,
width: 140,
className: 'amount',
align: 'right',
clickable: true,
textOverview: true,
},