diff --git a/packages/webapp/src/containers/CashFlow/MoneyInDialog/MoneyInDialogContent.tsx b/packages/webapp/src/containers/CashFlow/MoneyInDialog/MoneyInDialogContent.tsx index 690d720ef..866d19194 100644 --- a/packages/webapp/src/containers/CashFlow/MoneyInDialog/MoneyInDialogContent.tsx +++ b/packages/webapp/src/containers/CashFlow/MoneyInDialog/MoneyInDialogContent.tsx @@ -1,5 +1,4 @@ // @ts-nocheck -import React from 'react'; import { MoneyInDialogProvider } from './MoneyInDialogProvider'; import MoneyInForm from './MoneyInForm'; diff --git a/packages/webapp/src/containers/CashFlow/MoneyInDialog/MoneyInForm.tsx b/packages/webapp/src/containers/CashFlow/MoneyInDialog/MoneyInForm.tsx index 9bdc1f9ed..12f5dc7dd 100644 --- a/packages/webapp/src/containers/CashFlow/MoneyInDialog/MoneyInForm.tsx +++ b/packages/webapp/src/containers/CashFlow/MoneyInDialog/MoneyInForm.tsx @@ -72,7 +72,7 @@ function MoneyInForm({ }; // Handles the form submit. - const handleFormSubmit = (values, { setSubmitting, setErrors }) => { + const handleFormSubmit = (values, { setSubmitting }) => { const form = { ...omit(values, ['currency_code']), publish: true, diff --git a/packages/webapp/src/containers/CashFlow/MoneyOutDialog/MoneyOutForm.tsx b/packages/webapp/src/containers/CashFlow/MoneyOutDialog/MoneyOutForm.tsx index 8f48e07dd..ab21384aa 100644 --- a/packages/webapp/src/containers/CashFlow/MoneyOutDialog/MoneyOutForm.tsx +++ b/packages/webapp/src/containers/CashFlow/MoneyOutDialog/MoneyOutForm.tsx @@ -51,7 +51,6 @@ function MoneyOutForm({ accountId, accountType, createCashflowTransactionMutate, - submitPayload, } = useMoneyOutDialogContext(); // transaction number. diff --git a/packages/webapp/src/containers/CashFlow/_components.tsx b/packages/webapp/src/containers/CashFlow/_components.tsx index 0195b298f..26e08a1b9 100644 --- a/packages/webapp/src/containers/CashFlow/_components.tsx +++ b/packages/webapp/src/containers/CashFlow/_components.tsx @@ -14,6 +14,7 @@ import { useUpdateEffect } from '@/hooks'; import withSettings from '@/containers/Settings/withSettings'; import withDialogActions from '@/containers/Dialog/withDialogActions'; +import { transactionNumber } from '@/utils'; /** * Syncs cashflow auto-increment settings to the form once update. diff --git a/packages/webapp/src/containers/Dialogs/TransactionNumberDialog/TransactionNumberDialogContent.tsx b/packages/webapp/src/containers/Dialogs/TransactionNumberDialog/TransactionNumberDialogContent.tsx index 163857416..ab6c4b341 100644 --- a/packages/webapp/src/containers/Dialogs/TransactionNumberDialog/TransactionNumberDialogContent.tsx +++ b/packages/webapp/src/containers/Dialogs/TransactionNumberDialog/TransactionNumberDialogContent.tsx @@ -9,11 +9,11 @@ import ReferenceNumberForm from '@/containers/JournalNumber/ReferenceNumberForm' import withDialogActions from '@/containers/Dialog/withDialogActions'; import withSettings from '@/containers/Settings/withSettings'; import withSettingsActions from '@/containers/Settings/withSettingsActions'; -import { compose } from '@/utils'; import { transformFormToSettings, transformSettingsToForm, } from '@/containers/JournalNumber/utils'; +import { compose } from '@/utils'; /** * Transaction number dialog content. diff --git a/packages/webapp/src/hooks/query/cashflowAccounts.tsx b/packages/webapp/src/hooks/query/cashflowAccounts.tsx index f91593762..700578c63 100644 --- a/packages/webapp/src/hooks/query/cashflowAccounts.tsx +++ b/packages/webapp/src/hooks/query/cashflowAccounts.tsx @@ -5,6 +5,9 @@ import useApiRequest from '../useRequest'; import t from './types'; const commonInvalidateQueries = (queryClient) => { + // Invalidate settings. + queryClient.invalidateQueries([t.SETTING, t.SETTING_CASHFLOW]); + // Invalidate accounts. queryClient.invalidateQueries(t.ACCOUNTS); queryClient.invalidateQueries(t.ACCOUNT);