mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 20:30:33 +00:00
fix: Disable item type inventory in edit mode
This commit is contained in:
@@ -31,7 +31,7 @@ export default function ItemFormPrimarySection() {
|
||||
const nameFieldRef = useRef(null);
|
||||
|
||||
// Formik context.
|
||||
const { values: { itemType } } = useFormikContext();
|
||||
const { values: { type } } = useFormikContext();
|
||||
|
||||
useEffect(() => {
|
||||
// Auto focus item name field once component mount.
|
||||
@@ -87,7 +87,7 @@ export default function ItemFormPrimarySection() {
|
||||
form.setFieldValue('type', _value);
|
||||
})}
|
||||
selectedValue={value}
|
||||
disabled={itemType === 'inventory'}
|
||||
disabled={type === 'inventory'}
|
||||
>
|
||||
<Radio label={<T id={'service'} />} value="service" />
|
||||
<Radio label={<T id={'non_inventory'} />} value="non-inventory" />
|
||||
|
||||
Reference in New Issue
Block a user