mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
feat: reset the state once closing categorization aside
This commit is contained in:
@@ -62,6 +62,7 @@ function AccountTransactionsActionsBar({
|
||||
// #withBanking
|
||||
uncategorizedTransationsIdsSelected,
|
||||
excludedTransactionsIdsSelected,
|
||||
openMatchingTransactionAside,
|
||||
|
||||
// #withBankingActions
|
||||
enableMultipleCategorization,
|
||||
@@ -284,19 +285,21 @@ function AccountTransactionsActionsBar({
|
||||
</NavbarGroup>
|
||||
|
||||
<NavbarGroup align={Alignment.RIGHT}>
|
||||
<Tooltip
|
||||
content={
|
||||
'Enables to categorize or matching multiple bank transactions into one transaction.'
|
||||
}
|
||||
position={Position.BOTTOM}
|
||||
minimal
|
||||
>
|
||||
<Switch
|
||||
label={'Multi Select'}
|
||||
inline
|
||||
onChange={handleMultipleCategorizingSwitch}
|
||||
/>
|
||||
</Tooltip>
|
||||
{openMatchingTransactionAside && (
|
||||
<Tooltip
|
||||
content={
|
||||
'Enables to categorize or matching multiple bank transactions into one transaction.'
|
||||
}
|
||||
position={Position.BOTTOM}
|
||||
minimal
|
||||
>
|
||||
<Switch
|
||||
label={'Multi Select'}
|
||||
inline
|
||||
onChange={handleMultipleCategorizingSwitch}
|
||||
/>
|
||||
</Tooltip>
|
||||
)}
|
||||
<NavbarDivider />
|
||||
<Popover
|
||||
minimal={true}
|
||||
@@ -342,9 +345,11 @@ export default compose(
|
||||
({
|
||||
uncategorizedTransationsIdsSelected,
|
||||
excludedTransactionsIdsSelected,
|
||||
openMatchingTransactionAside,
|
||||
}) => ({
|
||||
uncategorizedTransationsIdsSelected,
|
||||
excludedTransactionsIdsSelected,
|
||||
openMatchingTransactionAside,
|
||||
}),
|
||||
),
|
||||
withBankingActions,
|
||||
|
||||
@@ -19,13 +19,26 @@ function CategorizeTransactionAsideRoot({
|
||||
|
||||
// #withBanking
|
||||
selectedUncategorizedTransactionId,
|
||||
resetTransactionsToCategorizeSelected,
|
||||
enableMultipleCategorization,
|
||||
}: CategorizeTransactionAsideProps) {
|
||||
//
|
||||
//
|
||||
useEffect(
|
||||
() => () => {
|
||||
// Close the reconcile matching form.
|
||||
closeReconcileMatchingTransaction();
|
||||
|
||||
// Reset the selected transactions to categorize.
|
||||
resetTransactionsToCategorizeSelected();
|
||||
|
||||
// Disable multi matching.
|
||||
enableMultipleCategorization(false);
|
||||
},
|
||||
[closeReconcileMatchingTransaction],
|
||||
[
|
||||
closeReconcileMatchingTransaction,
|
||||
resetTransactionsToCategorizeSelected,
|
||||
enableMultipleCategorization,
|
||||
],
|
||||
);
|
||||
|
||||
const handleClose = () => {
|
||||
|
||||
Reference in New Issue
Block a user