From c7013caf121af1739fc1b74bb1632dda07a82148 Mon Sep 17 00:00:00 2001 From: "a.bouhuolia" Date: Wed, 20 Oct 2021 19:04:01 +0200 Subject: [PATCH] feart: optimize cashflow account transactions page. --- src/components/BankAccounts/index.js | 1 + src/config/sidebarMenu.js | 4 - .../AccountTransactionsActionsBar.js | 31 ++- .../AccountTransactionsDataTable.js | 4 +- .../AccountTransactionsDetailsBar.js | 182 ++++++++++++++++++ .../AccountTransactionsList.js | 7 +- .../AccountTransactionsProvider.js | 26 ++- .../AccountTransactions/components.js | 12 +- .../CashFlow/AccountTransactions/utils.js | 13 +- .../CashFlowAccountsDataTable.js | 8 +- .../CashFlowAccounts/CashflowAccountsGrid.js | 15 +- src/lang/en/index.json | 2 +- src/routes/dashboard.js | 2 +- src/static/json/icons.js | 14 +- .../CashFlow/AccountTransactions/List.scss | 8 +- .../pages/CashFlow/CashFlowAccounts/List.scss | 9 +- 16 files changed, 300 insertions(+), 38 deletions(-) create mode 100644 src/containers/CashFlow/AccountTransactions/AccountTransactionsDetailsBar.js diff --git a/src/components/BankAccounts/index.js b/src/components/BankAccounts/index.js index e6ee1b75b..52233c84b 100644 --- a/src/components/BankAccounts/index.js +++ b/src/components/BankAccounts/index.js @@ -187,6 +187,7 @@ export function BankAccount({ type, balance, loading = false, + to }) { return ( diff --git a/src/config/sidebarMenu.js b/src/config/sidebarMenu.js index b110bc863..abfdd544f 100644 --- a/src/config/sidebarMenu.js +++ b/src/config/sidebarMenu.js @@ -189,10 +189,6 @@ export default [ }, ], }, - { - text: , - children: [], - }, { text: , children: [ diff --git a/src/containers/CashFlow/AccountTransactions/AccountTransactionsActionsBar.js b/src/containers/CashFlow/AccountTransactions/AccountTransactionsActionsBar.js index 4615a8cf3..27fab2255 100644 --- a/src/containers/CashFlow/AccountTransactions/AccountTransactionsActionsBar.js +++ b/src/containers/CashFlow/AccountTransactions/AccountTransactionsActionsBar.js @@ -1,5 +1,11 @@ import React from 'react'; -import { Button, NavbarGroup, Classes, NavbarDivider } from '@blueprintjs/core'; +import { + Button, + NavbarGroup, + Classes, + NavbarDivider, + Alignment, +} from '@blueprintjs/core'; import { Icon, DashboardRowsHeightButton, @@ -23,6 +29,7 @@ function AccountTransactionsActionsBar({ // #withSettings cashflowTansactionsTableSize, + // #withSettingsActions addSetting, }) { @@ -32,7 +39,7 @@ function AccountTransactionsActionsBar({ }; const { accountId } = useAccountTransactionsContext(); - //Handle money in form + // Handle money in form const handleMoneyInFormTransaction = (value) => { openDialog('money-in', { account_type: value.type, @@ -40,13 +47,16 @@ function AccountTransactionsActionsBar({ }); }; - //Handle money out form + // Handle money out form const handlMoneyOutFormTransaction = (value) => { openDialog('money-out', { account_type: value.type, account_id: accountId, }); }; + + const handleRefreshBtnClick = () => {}; + return ( @@ -54,13 +64,18 @@ function AccountTransactionsActionsBar({ items={addMoneyIn} onItemSelect={handleMoneyInFormTransaction} text={} + buttonProps={{ + icon: , + }} /> } + buttonProps={{ + icon: , + }} /> -