From d85d7e85b5e176bca4f21cad31c5281f2f8b91c7 Mon Sep 17 00:00:00 2001 From: elforjani3 Date: Sun, 15 Nov 2020 12:52:51 +0200 Subject: [PATCH] Fix : Prevent ability to edit item type after creation. --- client/src/containers/Items/ItemFormPrimarySection.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/client/src/containers/Items/ItemFormPrimarySection.js b/client/src/containers/Items/ItemFormPrimarySection.js index d34a4d5f2..9479dbfa7 100644 --- a/client/src/containers/Items/ItemFormPrimarySection.js +++ b/client/src/containers/Items/ItemFormPrimarySection.js @@ -34,7 +34,7 @@ function ItemFormPrimarySection({ categoriesList, // #withDashboardActions - changePageSubtitle + changePageSubtitle, }) { const { formatMessage } = useIntl(); @@ -88,13 +88,14 @@ function ItemFormPrimarySection({ changePageSubtitle(formatMessage({ id: _value })); })} selectedValue={value} + disabled={value === 'inventory'} > } value="service" /> - } value="inventory" /> } value="non-inventory" /> + } value="inventory" /> )} @@ -179,5 +180,5 @@ export default compose( withItemCategories(({ categoriesList }) => ({ categoriesList, })), - withDashboardActions + withDashboardActions, )(ItemFormPrimarySection);