diff --git a/src/common/tables.js b/src/common/tables.js index 6f0bf1fce..9acd9bd5c 100644 --- a/src/common/tables.js +++ b/src/common/tables.js @@ -12,10 +12,12 @@ export const TABLES = { ACCOUNTS: 'accounts', MANUAL_JOURNALS: 'manual_journal', EXPENSES: 'expenses', + CASHFLOW_ACCOUNTS: 'cashflow_accounts', + CASHFLOW_Transactions: 'cashflow_transactions', }; export const TABLE_SIZE = { COMPACT: 'compact', SMALL: 'small', MEDIUM: 'medium', -} \ No newline at end of file +}; diff --git a/src/containers/CashFlow/CashFlowAccounts/CashFlowAccountsActionsBar.js b/src/containers/CashFlow/CashFlowAccounts/CashFlowAccountsActionsBar.js new file mode 100644 index 000000000..d250f7257 --- /dev/null +++ b/src/containers/CashFlow/CashFlowAccounts/CashFlowAccountsActionsBar.js @@ -0,0 +1,113 @@ +import React from 'react'; +import classNames from 'classnames'; + +import { isEmpty } from 'lodash'; +import { + Button, + NavbarGroup, + Classes, + NavbarDivider, + Alignment, +} from '@blueprintjs/core'; + +import { + Icon, + DashboardRowsHeightButton, + FormattedMessage as T, +} from 'components'; + +import DashboardActionsBar from 'components/Dashboard/DashboardActionsBar'; +import { useCashFlowAccountsContext } from './CashFlowAccountsProvider'; +import withDialogActions from 'containers/Dialog/withDialogActions'; +import withSettings from '../../Settings/withSettings'; +import withSettingsActions from '../../Settings/withSettingsActions'; + +import { compose } from 'utils'; + +/** + * Cash Flow accounts actions bar. + */ +function CashFlowAccountsActionsBar({ + // #withDialogActions + openDialog, + + // #withSettings + cashflowTableSize, + + // #withSettingsActions + addSetting, +}) { + // Handle table row size change. + const handleTableRowSizeChange = (size) => { + addSetting('cashflowAccounts', 'tableSize', size); + }; + + // Handle click a refresh + const handleRefreshBtnClick = () => {}; + + // Handle add bank account. + const handleAddBankAccount = () => { + openDialog('account-form', {}); + }; + + // Handle add cash account. + const handleAddCashAccount = () => { + openDialog('account-form', {}); + }; + + return ( + + +