mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
fix: numeric values formating.
This commit is contained in:
@@ -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,
|
||||
},
|
||||
{
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user