Fix : Prevent ability to edit item type after creation.

This commit is contained in:
elforjani3
2020-11-15 12:52:51 +02:00
parent 878b28c346
commit d85d7e85b5

View File

@@ -34,7 +34,7 @@ function ItemFormPrimarySection({
categoriesList, categoriesList,
// #withDashboardActions // #withDashboardActions
changePageSubtitle changePageSubtitle,
}) { }) {
const { formatMessage } = useIntl(); const { formatMessage } = useIntl();
@@ -88,13 +88,14 @@ function ItemFormPrimarySection({
changePageSubtitle(formatMessage({ id: _value })); changePageSubtitle(formatMessage({ id: _value }));
})} })}
selectedValue={value} selectedValue={value}
disabled={value === 'inventory'}
> >
<Radio label={<T id={'service'} />} value="service" /> <Radio label={<T id={'service'} />} value="service" />
<Radio label={<T id={'inventory'} />} value="inventory" />
<Radio <Radio
label={<T id={'non_inventory'} />} label={<T id={'non_inventory'} />}
value="non-inventory" value="non-inventory"
/> />
<Radio label={<T id={'inventory'} />} value="inventory" />
</RadioGroup> </RadioGroup>
</FormGroup> </FormGroup>
)} )}
@@ -179,5 +180,5 @@ export default compose(
withItemCategories(({ categoriesList }) => ({ withItemCategories(({ categoriesList }) => ({
categoriesList, categoriesList,
})), })),
withDashboardActions withDashboardActions,
)(ItemFormPrimarySection); )(ItemFormPrimarySection);