From 3d4fd0b9041a6f94955eaa5ffae03603f5c4ec12 Mon Sep 17 00:00:00 2001 From: Ahmed Bouhuolia Date: Wed, 28 Jun 2023 12:21:22 +0200 Subject: [PATCH] fix(webapp): transaction number duplicated variable name --- .../MoneyInDialog/MoneyInDialogProvider.tsx | 2 +- .../OwnerContributionFormFields.tsx | 30 +++++-------------- .../src/containers/CashFlow/_components.tsx | 4 +-- 3 files changed, 10 insertions(+), 26 deletions(-) diff --git a/packages/webapp/src/containers/CashFlow/MoneyInDialog/MoneyInDialogProvider.tsx b/packages/webapp/src/containers/CashFlow/MoneyInDialog/MoneyInDialogProvider.tsx index 163f87119..20eba8d94 100644 --- a/packages/webapp/src/containers/CashFlow/MoneyInDialog/MoneyInDialogProvider.tsx +++ b/packages/webapp/src/containers/CashFlow/MoneyInDialog/MoneyInDialogProvider.tsx @@ -22,7 +22,7 @@ function MoneyInDialogProvider({ dialogName, ...props }) { - // Holds the selected account id. + // Holds the selected account id of the dialog. const [accountId, setAccountId] = useState(defaultAccountId); // Detarmines whether the feature is enabled. diff --git a/packages/webapp/src/containers/CashFlow/MoneyInDialog/OwnerContribution/OwnerContributionFormFields.tsx b/packages/webapp/src/containers/CashFlow/MoneyInDialog/OwnerContribution/OwnerContributionFormFields.tsx index 520c2d51c..408a72078 100644 --- a/packages/webapp/src/containers/CashFlow/MoneyInDialog/OwnerContribution/OwnerContributionFormFields.tsx +++ b/packages/webapp/src/containers/CashFlow/MoneyInDialog/OwnerContribution/OwnerContributionFormFields.tsx @@ -1,19 +1,16 @@ // @ts-nocheck import React from 'react'; -import { FastField, ErrorMessage, useFormikContext } from 'formik'; +import { FastField, ErrorMessage } from 'formik'; import { FormGroup, Position, ControlGroup } from '@blueprintjs/core'; import classNames from 'classnames'; - +import { DateInput } from '@blueprintjs/datetime'; import { FormattedMessage as T, AccountsSuggestField, InputPrependText, - MoneyInputGroup, FieldRequiredHint, Col, Row, - If, - ExchangeRateMutedField, BranchSelect, BranchSelectButton, FeatureCan, @@ -22,7 +19,6 @@ import { FTextArea, FInputGroup, } from '@/components'; -import { DateInput } from '@blueprintjs/datetime'; import { ACCOUNT_TYPE, CLASSES, Features } from '@/constants'; import { inputIntent, @@ -33,11 +29,11 @@ import { import { useMoneyInDailogContext } from '../MoneyInDialogProvider'; import { useSetPrimaryBranchToForm, - useForeignAccount, BranchRowDivider, } from '../../MoneyInDialog/utils'; import { MoneyInOutTransactionNoField } from '../../_components'; import { useMoneyInFieldsContext } from '../MoneyInFieldsProvider'; +import { MoneyInExchangeRateField } from '../MoneyInExchangeRateField'; /** /** @@ -48,10 +44,6 @@ export default function OwnerContributionFormFields() { const { accounts, branches } = useMoneyInDailogContext(); const { account } = useMoneyInFieldsContext(); - const { values } = useFormikContext(); - - const isForeigAccount = useForeignAccount(); - // Sets the primary branch to form. useSetPrimaryBranchToForm(); @@ -124,17 +116,9 @@ export default function OwnerContributionFormFields() { - - {/*------------ exchange rate -----------*/} - - + {/*------------ Exchange rate -----------*/} + + {/*------------ equity account -----------*/} @@ -171,7 +155,7 @@ export default function OwnerContributionFormFields() { - {/*------------ description -----------*/} + {/*------------ Description -----------*/} }>