mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
Merge branch 'feature/Cash-flow' of https://github.com/bigcapitalhq/client into feature/Cash-flow
This commit is contained in:
@@ -16,7 +16,9 @@ import { useMemorizedColumnsWidths } from '../../../hooks';
|
||||
import { useAccountTransactionsColumns, ActionsMenu } from './components';
|
||||
import { useAccountTransactionsContext } from './AccountTransactionsProvider';
|
||||
import { handleCashFlowTransactionType } from './utils';
|
||||
|
||||
import { compose } from 'utils';
|
||||
import { whenRtl, whenLtr } from 'utils/styled-components';
|
||||
|
||||
/**
|
||||
* Account transactions data table.
|
||||
@@ -79,13 +81,7 @@ function AccountTransactionsDataTable({
|
||||
vListOverscanRowCount={0}
|
||||
initialColumnsWidths={initialColumnsWidths}
|
||||
onColumnResizing={handleColumnResizing}
|
||||
noResults={
|
||||
<T
|
||||
id={
|
||||
'cash_flow_there_is_deposit_withdrawal_transactions_on_the_current_account'
|
||||
}
|
||||
/>
|
||||
}
|
||||
noResults={<T id={'cash_flow.account_transactions.no_results'} />}
|
||||
className="table-constrant"
|
||||
payload={{
|
||||
onViewDetails: handleViewDetailCashflowTransaction,
|
||||
@@ -133,10 +129,9 @@ const CashflowTransactionsTable = styled(DashboardConstrantTable)`
|
||||
|
||||
.tbody-inner {
|
||||
.tr .td:not(:first-child) {
|
||||
border-left: 1px solid #e6e6e6;
|
||||
${whenLtr(`border-left: 1px solid #e6e6e6;`)}
|
||||
${whenRtl(`border-right: 1px solid #e6e6e6;`)}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const DashboardRegularTable = styled(DataTable)``;
|
||||
|
||||
@@ -14,6 +14,7 @@ import { curry } from 'lodash/fp';
|
||||
|
||||
import { Icon } from '../../../components';
|
||||
import { useAccountTransactionsContext } from './AccountTransactionsProvider';
|
||||
import { whenRtl, whenLtr } from 'utils/styled-components';
|
||||
|
||||
function AccountSwitchButton() {
|
||||
const { currentAccount } = useAccountTransactionsContext();
|
||||
@@ -62,7 +63,7 @@ function AccountBalanceItem() {
|
||||
|
||||
return (
|
||||
<AccountBalanceItemWrap>
|
||||
Balance in Bigcapital {''}
|
||||
{intl.get('cash_flow_transaction.balance_in_bigcapital')} {''}
|
||||
<AccountBalanceAmount>
|
||||
{currentAccount.formatted_amount}
|
||||
</AccountBalanceAmount>
|
||||
@@ -159,8 +160,9 @@ const AccountSwitchText = styled.div`
|
||||
const AccountBalanceAmount = styled.span`
|
||||
font-weight: 600;
|
||||
display: inline-block;
|
||||
margin-left: 10px;
|
||||
color: rgb(31, 50, 85);
|
||||
${whenLtr(`margin-left: 10px;`)}
|
||||
${whenRtl(`margin-right: 10px;`)}
|
||||
`;
|
||||
|
||||
const AccountSwitchItemName = styled.div`
|
||||
@@ -178,6 +180,7 @@ const AccountSwitchItemUpdatedAt = styled.div`
|
||||
|
||||
const AccountSwitchButtonBase = styled(Button)`
|
||||
.bp3-button-text {
|
||||
margin-right: 5px;
|
||||
${whenLtr(`margin-right: 5px;`)}
|
||||
${whenRtl(`margin-left: 5px;`)}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -45,6 +45,8 @@ export function useAccountTransactionsColumns() {
|
||||
Cell: FormatDateCell,
|
||||
width: 110,
|
||||
className: 'date',
|
||||
clickable: true,
|
||||
textOverview: true,
|
||||
},
|
||||
{
|
||||
id: 'type',
|
||||
@@ -53,6 +55,7 @@ export function useAccountTransactionsColumns() {
|
||||
className: 'type',
|
||||
width: 140,
|
||||
textOverview: true,
|
||||
clickable: true,
|
||||
},
|
||||
{
|
||||
id: 'transaction_number',
|
||||
@@ -60,6 +63,8 @@ export function useAccountTransactionsColumns() {
|
||||
accessor: 'transaction_number',
|
||||
width: 160,
|
||||
className: 'transaction_number',
|
||||
clickable: true,
|
||||
textOverview: true,
|
||||
},
|
||||
{
|
||||
id: 'reference_number',
|
||||
@@ -67,6 +72,8 @@ export function useAccountTransactionsColumns() {
|
||||
accessor: 'reference_number',
|
||||
width: 160,
|
||||
className: 'reference_number',
|
||||
clickable: true,
|
||||
textOverview: true,
|
||||
},
|
||||
{
|
||||
id: 'deposit',
|
||||
@@ -76,6 +83,7 @@ export function useAccountTransactionsColumns() {
|
||||
className: 'deposit',
|
||||
textOverview: true,
|
||||
align: 'right',
|
||||
clickable: true
|
||||
},
|
||||
{
|
||||
id: 'withdrawal',
|
||||
@@ -85,6 +93,7 @@ export function useAccountTransactionsColumns() {
|
||||
width: 150,
|
||||
textOverview: true,
|
||||
align: 'right',
|
||||
clickable: true
|
||||
},
|
||||
{
|
||||
id: 'running_balance',
|
||||
@@ -94,6 +103,7 @@ export function useAccountTransactionsColumns() {
|
||||
width: 150,
|
||||
textOverview: true,
|
||||
align: 'right',
|
||||
clickable: true
|
||||
},
|
||||
{
|
||||
id: 'balance',
|
||||
@@ -102,6 +112,7 @@ export function useAccountTransactionsColumns() {
|
||||
className: 'balance',
|
||||
width: 150,
|
||||
textOverview: true,
|
||||
clickable: true,
|
||||
align: 'right',
|
||||
},
|
||||
],
|
||||
|
||||
@@ -151,7 +151,7 @@ const CashflowBankAccountEnhanced = compose(
|
||||
)(CashflowBankAccount);
|
||||
|
||||
function getUpdatedBeforeText(createdAt) {
|
||||
return ''
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -170,11 +170,7 @@ function CashflowAccountsEmptyState() {
|
||||
return (
|
||||
<AccountsEmptyStateBase>
|
||||
<AccountsEmptyStateTitle>
|
||||
<T
|
||||
id={
|
||||
'cash_flow_there_is_no_cashflow_accounts_with_current_filter_criteria'
|
||||
}
|
||||
/>
|
||||
<T id={'cash_flow.accounts.no_results'} />
|
||||
</AccountsEmptyStateTitle>
|
||||
</AccountsEmptyStateBase>
|
||||
);
|
||||
@@ -260,7 +256,7 @@ function CashflowAccountContextMenu({
|
||||
</MenuItem>
|
||||
|
||||
<MenuItem
|
||||
text={<T id={'cash_flow_money_out'} />}
|
||||
text={<T id={'cash_flow_money_out'} />}
|
||||
icon={<Icon icon={'arrow-upward'} iconSize={16} />}
|
||||
>
|
||||
<CashflowAccountMoneyOutContextMenu onClick={onMoneyOutClick} />
|
||||
|
||||
Reference in New Issue
Block a user