mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
feat: wip journal and general ledger dyanmic columns
This commit is contained in:
@@ -13,7 +13,7 @@ import {
|
||||
} from '@/components';
|
||||
|
||||
import { useGeneralLedgerContext } from './GeneralLedgerProvider';
|
||||
import { useGeneralLedgerTableColumns } from './components';
|
||||
import { useGeneralLedgerTableColumns } from './dynamicColumns';
|
||||
|
||||
/**
|
||||
* General ledger table.
|
||||
@@ -21,7 +21,7 @@ import { useGeneralLedgerTableColumns } from './components';
|
||||
export default function GeneralLedgerTable({ companyName }) {
|
||||
// General ledger context.
|
||||
const {
|
||||
generalLedger: { tableRows, query },
|
||||
generalLedger: { query, table },
|
||||
isLoading,
|
||||
} = useGeneralLedgerContext();
|
||||
|
||||
@@ -30,8 +30,8 @@ export default function GeneralLedgerTable({ companyName }) {
|
||||
|
||||
// Default expanded rows of general ledger table.
|
||||
const expandedRows = useMemo(
|
||||
() => defaultExpanderReducer(tableRows, 1),
|
||||
[tableRows],
|
||||
() => defaultExpanderReducer(table.rows, 1),
|
||||
[table.rows],
|
||||
);
|
||||
|
||||
return (
|
||||
@@ -48,7 +48,7 @@ export default function GeneralLedgerTable({ companyName }) {
|
||||
'this_report_does_not_contain_any_data_between_date_period',
|
||||
)}
|
||||
columns={columns}
|
||||
data={tableRows}
|
||||
data={table.rows}
|
||||
rowClassNames={tableRowTypesToClassnames}
|
||||
expanded={expandedRows}
|
||||
virtualizedRows={true}
|
||||
|
||||
Reference in New Issue
Block a user