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