Skip to content

Commit

Permalink
fix(webapp): undefined transactionNumber function
Browse files Browse the repository at this point in the history
  • Loading branch information
abouolia committed Jan 20, 2024
1 parent f03d011 commit 8882bc6
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// @ts-nocheck
import React from 'react';
import { MoneyInDialogProvider } from './MoneyInDialogProvider';
import MoneyInForm from './MoneyInForm';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ function MoneyOutForm({
accountId,
accountType,
createCashflowTransactionMutate,
submitPayload,
} = useMoneyOutDialogContext();

// transaction number.
Expand Down
1 change: 1 addition & 0 deletions packages/webapp/src/containers/CashFlow/_components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 3 additions & 0 deletions packages/webapp/src/hooks/query/cashflowAccounts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8882bc6

Please sign in to comment.