mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 04:40:32 +00:00
fix(Account): BIG-296 Issue when creating a new child account from chart of accounts list.
This commit is contained in:
@@ -43,9 +43,7 @@ function AccountFormDialogContent({
|
||||
account,
|
||||
|
||||
accountId,
|
||||
action,
|
||||
parentAccountId,
|
||||
accountType,
|
||||
payload,
|
||||
isNewMode,
|
||||
dialogName,
|
||||
} = useAccountDialogContext();
|
||||
@@ -101,7 +99,6 @@ function AccountFormDialogContent({
|
||||
.catch(handleError);
|
||||
}
|
||||
};
|
||||
|
||||
// Form initial values in create and edit mode.
|
||||
const initialValues = {
|
||||
...defaultInitialValues,
|
||||
@@ -111,11 +108,7 @@ function AccountFormDialogContent({
|
||||
* as well.
|
||||
*/
|
||||
...transformToForm(
|
||||
transformAccountToForm(account, {
|
||||
action,
|
||||
parentAccountId,
|
||||
accountType,
|
||||
}),
|
||||
transformAccountToForm(account, payload),
|
||||
defaultInitialValues,
|
||||
),
|
||||
};
|
||||
@@ -133,7 +126,7 @@ function AccountFormDialogContent({
|
||||
>
|
||||
<AccountDialogFormContent
|
||||
dialogName={dialogName}
|
||||
action={action}
|
||||
action={payload?.action}
|
||||
onClose={handleClose}
|
||||
/>
|
||||
</Formik>
|
||||
|
||||
Reference in New Issue
Block a user