mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 05:40:31 +00:00
feat: document functions
This commit is contained in:
@@ -39,7 +39,6 @@ import { withBanking } from '../withBanking';
|
||||
import { isEmpty } from 'lodash';
|
||||
import {
|
||||
useExcludeUncategorizedTransactions,
|
||||
useUnexcludeUncategorizedTransaction,
|
||||
useUnexcludeUncategorizedTransactions,
|
||||
} from '@/hooks/query/bank-rules';
|
||||
|
||||
@@ -136,7 +135,7 @@ function AccountTransactionsActionsBar({
|
||||
})
|
||||
.then(() => {
|
||||
AppToaster.show({
|
||||
message: 'The selected transactions have been unexcluded.',
|
||||
message: 'The selected excluded transactions have been unexcluded.',
|
||||
intent: Intent.SUCCESS,
|
||||
});
|
||||
})
|
||||
@@ -198,10 +197,9 @@ function AccountTransactionsActionsBar({
|
||||
onClick={handleExcludeUncategorizedBtnClick}
|
||||
className={Classes.MINIMAL}
|
||||
intent={Intent.DANGER}
|
||||
disable={isExcludingLoading}
|
||||
disabled={isExcludingLoading}
|
||||
/>
|
||||
)}
|
||||
|
||||
{!isEmpty(excludedTransactionsIdsSelected) && (
|
||||
<Button
|
||||
icon={<Icon icon="disable" iconSize={16} />}
|
||||
@@ -209,7 +207,7 @@ function AccountTransactionsActionsBar({
|
||||
onClick={handleUnexcludeUncategorizedBtnClick}
|
||||
className={Classes.MINIMAL}
|
||||
intent={Intent.DANGER}
|
||||
disable={isUnexcludingLoading}
|
||||
disabled={isUnexcludingLoading}
|
||||
/>
|
||||
)}
|
||||
</NavbarGroup>
|
||||
|
||||
@@ -39,21 +39,37 @@ const mapDipatchToProps = (dispatch: any): WithBankingActionsProps => ({
|
||||
closeReconcileMatchingTransaction: () =>
|
||||
dispatch(closeReconcileMatchingTransaction()),
|
||||
|
||||
/**
|
||||
* Sets the selected uncategorized transactions.
|
||||
* @param {Array<string | number>} ids
|
||||
*/
|
||||
setUncategorizedTransactionsSelected: (ids: Array<string | number>) =>
|
||||
dispatch(
|
||||
setUncategorizedTransactionsSelected({
|
||||
transactionIds: ids,
|
||||
}),
|
||||
),
|
||||
|
||||
/**
|
||||
* Resets the selected uncategorized transactions.
|
||||
*/
|
||||
resetUncategorizedTransactionsSelected: () =>
|
||||
dispatch(resetUncategorizedTransactionsSelected()),
|
||||
|
||||
/**
|
||||
* Sets excluded selected transactions.
|
||||
* @param {Array<string | number>} ids
|
||||
*/
|
||||
setExcludedTransactionsSelected: (ids: Array<string | number>) =>
|
||||
dispatch(
|
||||
setExcludedTransactionsSelected({
|
||||
ids,
|
||||
}),
|
||||
),
|
||||
|
||||
/**
|
||||
* Resets the excluded selected transactions
|
||||
*/
|
||||
resetExcludedTransactionsSelected: () =>
|
||||
dispatch(resetExcludedTransactionsSelected()),
|
||||
});
|
||||
|
||||
@@ -58,6 +58,11 @@ export const PlaidSlice = createSlice({
|
||||
state.openReconcileMatchingTransaction.pending = 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the selected uncategorized transactions.
|
||||
* @param {StorePlaidState} state
|
||||
* @param {PayloadAction<{ transactionIds: Array<string | number> }>} action
|
||||
*/
|
||||
setUncategorizedTransactionsSelected: (
|
||||
state: StorePlaidState,
|
||||
action: PayloadAction<{ transactionIds: Array<string | number> }>,
|
||||
@@ -65,10 +70,19 @@ export const PlaidSlice = createSlice({
|
||||
state.uncategorizedTransactionsSelected = action.payload.transactionIds;
|
||||
},
|
||||
|
||||
/**
|
||||
* Resets the selected uncategorized transactions.
|
||||
* @param {StorePlaidState} state
|
||||
*/
|
||||
resetUncategorizedTransactionsSelected: (state: StorePlaidState) => {
|
||||
state.uncategorizedTransactionsSelected = [];
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets excluded selected transactions.
|
||||
* @param {StorePlaidState} state
|
||||
* @param {PayloadAction<{ ids: Array<string | number> }>} action
|
||||
*/
|
||||
setExcludedTransactionsSelected: (
|
||||
state: StorePlaidState,
|
||||
action: PayloadAction<{ ids: Array<string | number> }>,
|
||||
@@ -76,6 +90,10 @@ export const PlaidSlice = createSlice({
|
||||
state.excludedTransactionsSelected = action.payload.ids;
|
||||
},
|
||||
|
||||
/**
|
||||
* Resets the excluded selected transactions
|
||||
* @param {StorePlaidState} state
|
||||
*/
|
||||
resetExcludedTransactionsSelected: (state: StorePlaidState) => {
|
||||
state.excludedTransactionsSelected = [];
|
||||
},
|
||||
|
||||
@@ -208,12 +208,16 @@ $dashboard-views-bar-height: 44px;
|
||||
}
|
||||
|
||||
&.#{$ns}-minimal.#{$ns}-intent-danger {
|
||||
color: #c23030;
|
||||
color: rgb(194, 48, 48);
|
||||
|
||||
&:not(.bp4-disabled)
|
||||
&:hover,
|
||||
&:focus {
|
||||
background: rgba(219, 55, 55, 0.1);
|
||||
}
|
||||
&.bp4-disabled{
|
||||
color: rgb(194, 48, 48, 0.6);
|
||||
}
|
||||
}
|
||||
&.#{$ns}-minimal.#{$ns}-intent-success{
|
||||
color: #1c6e42;
|
||||
|
||||
Reference in New Issue
Block a user