mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 06:10:31 +00:00
fix: accounts list
This commit is contained in:
@@ -148,7 +148,7 @@ function AccountsDataTable({
|
||||
{
|
||||
id: 'type',
|
||||
Header: formatMessage({ id: 'type' }),
|
||||
accessor: 'type.label',
|
||||
accessor: 'account_type_label',
|
||||
className: 'type',
|
||||
width: 140,
|
||||
},
|
||||
@@ -156,7 +156,7 @@ function AccountsDataTable({
|
||||
id: 'normal',
|
||||
Header: formatMessage({ id: 'normal' }),
|
||||
Cell: NormalCell,
|
||||
accessor: 'type.normal',
|
||||
accessor: 'account_normal',
|
||||
className: 'normal',
|
||||
width: 65,
|
||||
},
|
||||
|
||||
@@ -8,17 +8,14 @@ import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
import classNames from 'classnames';
|
||||
import { Icon, Money, If, Choose } from 'components';
|
||||
|
||||
export function NormalCell({ cell }) {
|
||||
export function NormalCell({ cell: { value } }) {
|
||||
const { formatMessage } = useIntl();
|
||||
|
||||
const account = cell.row.original;
|
||||
const normal = account?.type?.normal || '';
|
||||
const arrowDirection = normal === 'credit' ? 'down' : 'up';
|
||||
const arrowDirection = value === 'credit' ? 'down' : 'up';
|
||||
|
||||
return (
|
||||
<Tooltip
|
||||
className={Classes.TOOLTIP_INDICATOR}
|
||||
content={formatMessage({ id: normal })}
|
||||
content={formatMessage({ id: value })}
|
||||
position={Position.RIGHT}
|
||||
hoverOpenDelay={100}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user