feat: remove uncategorized transaction from expenses

This commit is contained in:
Ahmed Bouhuolia
2024-03-07 20:58:44 +02:00
parent b9a00418fa
commit 83fbb7225d
12 changed files with 53 additions and 110 deletions

View File

@@ -1,6 +1,5 @@
// @ts-nocheck
import React, { Suspense } from 'react';
import styled from 'styled-components';
import { Spinner } from '@blueprintjs/core';
import '@/style/pages/CashFlow/AccountTransactions/List.scss';

View File

@@ -1,33 +0,0 @@
// @ts-nocheck
import React, { lazy } from 'react';
import { Drawer, DrawerSuspense } from '@/components';
import withDrawers from '@/containers/Drawer/withDrawers';
import { compose } from '@/utils';
const AccountDrawerContent = lazy(() => import('./AccountDrawerContent'));
/**
* Categorize the uncategorized transaction drawer.
*/
function CategorizeTransactionDrawer({
name,
// #withDrawer
isOpen,
payload: { uncategorizedTranasctionId },
}) {
return (
<Drawer
isOpen={isOpen}
name={name}
style={{ minWidth: '700px', maxWidth: '900px' }}
size={'65%'}
>
<DrawerSuspense>
<AccountDrawerContent name={name} accountId={accountId} />
</DrawerSuspense>
</Drawer>
);
}
export default compose(withDrawers())(AccountDrawer);

View File

@@ -1,7 +1,6 @@
// @ts-nocheck
import { Formik, Form } from 'formik';
import styled from 'styled-components';
import withDialogActions from '@/containers/Dialog/withDialogActions';
import { CreateCategorizeTransactionSchema } from './CategorizeTransactionForm.schema';
import { CategorizeTransactionFormContent } from './CategorizeTransactionFormContent';
import { CategorizeTransactionFormFooter } from './CategorizeTransactionFormFooter';

View File

@@ -2,7 +2,7 @@
import React from 'react';
import styled from 'styled-components';
import { FormGroup } from '@blueprintjs/core';
import { FFormGroup, FSelect, FSuggest } from '@/components';
import { FFormGroup, FSelect, } from '@/components';
import { getAddMoneyInOptions, getAddMoneyOutOptions } from '@/constants';
import { useFormikContext } from 'formik';
import { useCategorizeTransactionBoot } from './CategorizeTransactionBoot';

View File

@@ -213,7 +213,8 @@ export function useRefreshCashflowTransactions() {
}
/**
*
* Retrieves specific uncategorized transaction.
* @param {number} uncategorizedTranasctionId -
*/
export function useUncategorizedTransaction(
uncategorizedTranasctionId: nunber,