fix (account): account code.

This commit is contained in:
elforjani3
2021-05-08 19:17:52 +02:00
parent d96b6e6a7c
commit 5d0e7f8c49

View File

@@ -3,6 +3,7 @@ import { Intent, Tag } from '@blueprintjs/core';
import { If, AppToaster } from 'components'; import { If, AppToaster } from 'components';
import { formatMessage } from 'services/intl'; import { formatMessage } from 'services/intl';
import { NormalCell, BalanceCell } from './components'; import { NormalCell, BalanceCell } from './components';
import { isBlank, compose } from 'utils';
/** /**
* Account name accessor. * Account name accessor.
@@ -40,12 +41,12 @@ export const handleDeleteErrors = (errors) => {
} }
}; };
export const AccountCodeAccessor = (row) =>
export const AccountCodeAccessor = (row) => ( !isBlank(row.code) ? (
<Tag minimal={true} round={true} intent={Intent.NONE}> <Tag minimal={true} round={true} intent={Intent.NONE}>
{ row.code } {row.code}
</Tag> </Tag>
); ) : null;
/** /**
* Accounts table columns. * Accounts table columns.
@@ -97,8 +98,8 @@ export const useAccountsTableColumns = () => {
}, },
], ],
[], [],
) );
} };
export const rowClassNames = (row) => ({ export const rowClassNames = (row) => ({
inactive: !row.original.active, inactive: !row.original.active,