mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 05:10:31 +00:00
feart: optimize cashflow account transactions page.
This commit is contained in:
@@ -33,12 +33,13 @@ function CashFlowAccountsDataTable({
|
||||
// Local storage memorizing columns widths.
|
||||
const [initialColumnsWidths, , handleColumnResizing] =
|
||||
useMemorizedColumnsWidths(TABLES.CASHFLOW_ACCOUNTS);
|
||||
|
||||
return (
|
||||
<DataTable
|
||||
noInitialFetch={true}
|
||||
columns={columns}
|
||||
data={cashflowAccounts}
|
||||
selectionColumn={true}
|
||||
selectionColumn={false}
|
||||
sticky={true}
|
||||
loading={isCashFlowAccountsLoading}
|
||||
headerLoading={isCashFlowAccountsLoading}
|
||||
@@ -47,11 +48,8 @@ function CashFlowAccountsDataTable({
|
||||
expandToggleColumn={2}
|
||||
selectionColumnWidth={45}
|
||||
TableCellRenderer={TableFastCell}
|
||||
TableRowsRenderer={TableVirtualizedListRows}
|
||||
|
||||
TableLoadingRenderer={TableSkeletonRows}
|
||||
// #TableVirtualizedListRows props.
|
||||
vListrowHeight={cashflowTableSize == 'small' ? 40 : 42}
|
||||
vListOverscanRowCount={0}
|
||||
TableHeaderSkeletonRenderer={TableSkeletonHeader}
|
||||
initialColumnsWidths={initialColumnsWidths}
|
||||
onColumnResizing={handleColumnResizing}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import React from 'react';
|
||||
import { isNull } from 'lodash';
|
||||
import styled from 'styled-components';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { BankAccountsList, BankAccount } from '../../../components';
|
||||
import { useCashFlowAccountsContext } from './CashFlowAccountsProvider';
|
||||
|
||||
@@ -23,12 +24,14 @@ function CashflowAccountsSkeleton() {
|
||||
|
||||
function CashflowAccountsGridItems({ accounts }) {
|
||||
return accounts.map((account) => (
|
||||
<BankAccount
|
||||
title={account.name}
|
||||
code={account.code}
|
||||
balance={!isNull(account.amount) ? account.formattedAmount : '-'}
|
||||
type={'cash'}
|
||||
/>
|
||||
<Link to={`/cashflow-accounts/${account.id}/transactions`}>
|
||||
<BankAccount
|
||||
title={account.name}
|
||||
code={account.code}
|
||||
balance={!isNull(account.amount) ? account.formattedAmount : '-'}
|
||||
type={'cash'}
|
||||
/>
|
||||
</Link>
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user