feat: delete uncategorized transactions before deleting bank account

This commit is contained in:
Ahmed Bouhuolia
2024-08-18 19:30:09 +02:00
parent fb8118bea8
commit 2f21107a43
9 changed files with 104 additions and 72 deletions

View File

@@ -208,7 +208,6 @@ function AccountTransactionsActionsBar({
bankAccountId: accountId,
});
};
// Handles uncategorize the categorized transactions in bulk.
const handleUncategorizeCategorizedBulkBtnClick = () => {
openAlert('uncategorize-transactions-bulk', {
@@ -218,9 +217,9 @@ function AccountTransactionsActionsBar({
// Handles the delete account button click.
const handleDeleteAccountClick = () => {
openAlert('account-delete', {
accountId
})
}
accountId,
});
};
return (
<DashboardActionsBar>
@@ -372,9 +371,17 @@ function AccountTransactionsActionsBar({
<MenuDivider />
<If condition={isSyncingOwner && isFeedsActive}>
<MenuItem intent={Intent.DANGER} onClick={handleDisconnectClick} text={'Disconnect'} />
<MenuItem
intent={Intent.DANGER}
onClick={handleDisconnectClick}
text={'Disconnect'}
/>
</If>
<MenuItem intent={Intent.DANGER} onClick={handleDeleteAccountClick} text={'Delete'} />
<MenuItem
intent={Intent.DANGER}
onClick={handleDeleteAccountClick}
text={'Delete'}
/>
</Menu>
}
>

View File

@@ -17,6 +17,7 @@ import { TABLES } from '@/constants/tables';
import withSettings from '@/containers/Settings/withSettings';
import withAlertsActions from '@/containers/Alert/withAlertActions';
import withDrawerActions from '@/containers/Drawer/withDrawerActions';
import { withBankingActions } from '../withBankingActions';
import { useMemorizedColumnsWidths } from '@/hooks';
import { useAccountTransactionsColumns, ActionsMenu } from './components';
@@ -26,7 +27,6 @@ import { useUncategorizeTransaction } from '@/hooks/query';
import { handleCashFlowTransactionType } from './utils';
import { compose } from '@/utils';
import { withBankingActions } from '../withBankingActions';
/**
* Account transactions data table.