mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 13:50:31 +00:00
fix: item category with item form.
This commit is contained in:
@@ -139,7 +139,7 @@ function ItemFormPrimarySection({
|
||||
categoriesList={categoriesList}
|
||||
selecetedCategoryId={values.category_id}
|
||||
onCategorySelected={(category) => {
|
||||
setFieldValue('item_category_id', category.id);
|
||||
setFieldValue('category_id', category.id);
|
||||
}}
|
||||
popoverProps={{ minimal: true }}
|
||||
/>
|
||||
|
||||
@@ -80,7 +80,7 @@ export default class ItemsCategoriesController extends BaseController {
|
||||
return [
|
||||
check('name').exists().trim().escape(),
|
||||
check('parent_category_id')
|
||||
.optional({ nullable: true, checkFalsy: true })
|
||||
.optional({ nullable: true })
|
||||
.isNumeric()
|
||||
.toInt(),
|
||||
check('description')
|
||||
@@ -88,15 +88,15 @@ export default class ItemsCategoriesController extends BaseController {
|
||||
.trim()
|
||||
.escape(),
|
||||
check('sell_account_id')
|
||||
.optional({ nullable: true, checkFalsy: true })
|
||||
.optional({ nullable: true })
|
||||
.isNumeric()
|
||||
.toInt(),
|
||||
check('cost_account_id')
|
||||
.optional()
|
||||
.optional({ nullable: true })
|
||||
.isNumeric()
|
||||
.toInt(),
|
||||
check('inventory_account_id')
|
||||
.optional()
|
||||
.optional({ nullable: true })
|
||||
.isNumeric()
|
||||
.toInt(),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user