mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
feat: disabled button in list component.
This commit is contained in:
@@ -19,7 +19,6 @@ import { CLASSES } from 'common/classes';
|
||||
import {
|
||||
NormalCell,
|
||||
BalanceCell,
|
||||
AccountNameAccessor
|
||||
} from './components';
|
||||
|
||||
import withDashboardActions from 'containers/Dashboard/withDashboardActions';
|
||||
@@ -136,7 +135,7 @@ function AccountsDataTable({
|
||||
{
|
||||
id: 'name',
|
||||
Header: formatMessage({ id: 'account_name' }),
|
||||
accessor: AccountNameAccessor,
|
||||
accessor: 'name',
|
||||
className: 'account_name',
|
||||
width: 220,
|
||||
},
|
||||
|
||||
@@ -54,31 +54,3 @@ export function InactiveSemafro() {
|
||||
</Tooltip>
|
||||
);
|
||||
}
|
||||
|
||||
export function AccountNameAccessor(row) {
|
||||
return (
|
||||
<>
|
||||
<Choose>
|
||||
<Choose.When condition={!!row.description}>
|
||||
<Tooltip
|
||||
className={classNames(
|
||||
Classes.TOOLTIP_INDICATOR,
|
||||
'bp3-popover-wrapper--account-desc',
|
||||
)}
|
||||
content={row.description}
|
||||
position={Position.RIGHT_TOP}
|
||||
hoverOpenDelay={500}
|
||||
>
|
||||
{row.name}
|
||||
</Tooltip>
|
||||
</Choose.When>
|
||||
|
||||
<Choose.Otherwise>{row.name}</Choose.Otherwise>
|
||||
</Choose>
|
||||
|
||||
<If condition={!row.active}>
|
||||
<InactiveSemafro />
|
||||
</If>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user