import React, {useEffect, useState, useCallback, useMemo} from 'react';
import FinancialSheet from 'components/FinancialSheet';
import DataTable from 'components/DataTable';
import Money from 'components/Money';
export default function TrialBalanceSheetTable({
trialBalanceSheetAccounts,
trialBalanceSheetIndex,
onFetchData,
loading,
companyName,
}) {
const [data, setData] = useState([]);
const columns = useMemo(() => [
{
// Build our expander column
id: 'expander', // Make sure it has an ID
className: 'expander',
Header: ({
getToggleAllRowsExpandedProps,
isAllRowsExpanded
}) => (
{isAllRowsExpanded ?
() :
()
}
),
Cell: ({ row }) =>
// Use the row.canExpand and row.getToggleRowExpandedProps prop getter
// to build the toggle for expanding a row
row.canExpand ? (
{row.isExpanded ?
() :
()
}
) : null,
width: 20,
disableResizing: true,
},
{
Header: 'Account Name',
accessor: 'name',
className: "name",
},
{
Header: 'Code',
accessor: 'code',
className: "code",
width: 120,
},
{
Header: 'Credit',
accessor: r => (),
className: 'credit',
width: 120,
},
{
Header: 'Debit',
accessor: r => (),
className: 'debit',
width: 120,
},
{
Header: 'Balance',
accessor: r => (),
className: 'balance',
width: 120,
}
], []);
const handleFetchData = useCallback(() => {
onFetchData && onFetchData();
}, [onFetchData]);
return (
);
}