mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 14:50:32 +00:00
fix: fields not saving values in item category dialog
This commit is contained in:
@@ -24,7 +24,7 @@ export default function ItemCategoryForm({
|
|||||||
accountsList,
|
accountsList,
|
||||||
categoriesList,
|
categoriesList,
|
||||||
isSubmitting,
|
isSubmitting,
|
||||||
onClose
|
onClose,
|
||||||
}) {
|
}) {
|
||||||
// Filters Item Categories list.
|
// Filters Item Categories list.
|
||||||
const filterItemCategories = useCallback(
|
const filterItemCategories = useCallback(
|
||||||
@@ -74,7 +74,7 @@ export default function ItemCategoryForm({
|
|||||||
</FastField>
|
</FastField>
|
||||||
|
|
||||||
{/* ----------- Parent Category ----------- */}
|
{/* ----------- Parent Category ----------- */}
|
||||||
<FastField name={'parent_account_id'}>
|
<FastField name={'parent_category_id'}>
|
||||||
{({ form, field: { value }, meta: { error, touched } }) => (
|
{({ form, field: { value }, meta: { error, touched } }) => (
|
||||||
<FormGroup
|
<FormGroup
|
||||||
label={<T id={'parent_category'} />}
|
label={<T id={'parent_category'} />}
|
||||||
@@ -107,7 +107,7 @@ export default function ItemCategoryForm({
|
|||||||
</FastField>
|
</FastField>
|
||||||
|
|
||||||
{/* ----------- Description ----------- */}
|
{/* ----------- Description ----------- */}
|
||||||
<FastField name={'description`'}>
|
<FastField name={'description'}>
|
||||||
{({ field, field: { value }, meta: { error, touched } }) => (
|
{({ field, field: { value }, meta: { error, touched } }) => (
|
||||||
<FormGroup
|
<FormGroup
|
||||||
label={<T id={'description'} />}
|
label={<T id={'description'} />}
|
||||||
@@ -138,7 +138,7 @@ export default function ItemCategoryForm({
|
|||||||
<AccountsSelectList
|
<AccountsSelectList
|
||||||
accounts={accountsList}
|
accounts={accountsList}
|
||||||
onAccountSelected={(account) => {
|
onAccountSelected={(account) => {
|
||||||
form.setFieldValue(account.id);
|
form.setFieldValue('cost_account_id', account.id);
|
||||||
}}
|
}}
|
||||||
defaultSelectText={<T id={'select_account'} />}
|
defaultSelectText={<T id={'select_account'} />}
|
||||||
selectedAccountId={value}
|
selectedAccountId={value}
|
||||||
|
|||||||
Reference in New Issue
Block a user