From 24b965e0ae051163dc522e532d439d0370878c2d Mon Sep 17 00:00:00 2001 From: elforjani3 Date: Sun, 29 Nov 2020 16:57:51 +0200 Subject: [PATCH] fix: inventory item Type in Edit Mode. --- client/src/containers/Items/ItemForm.js | 2 +- client/src/containers/Items/ItemFormPrimarySection.js | 11 +++-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/client/src/containers/Items/ItemForm.js b/client/src/containers/Items/ItemForm.js index 90b8af793..888a05157 100644 --- a/client/src/containers/Items/ItemForm.js +++ b/client/src/containers/Items/ItemForm.js @@ -232,7 +232,7 @@ function ItemForm({ {({ isSubmitting, handleSubmit }) => (
- +
diff --git a/client/src/containers/Items/ItemFormPrimarySection.js b/client/src/containers/Items/ItemFormPrimarySection.js index ab318e55f..d35bcc4fc 100644 --- a/client/src/containers/Items/ItemFormPrimarySection.js +++ b/client/src/containers/Items/ItemFormPrimarySection.js @@ -38,10 +38,8 @@ function ItemFormPrimarySection({ changePageSubtitle, // #ownProps - itemId, + itemType, }) { - const { formatMessage } = useIntl(); - const isNewMode = !itemId; const itemTypeHintContent = ( <> @@ -91,7 +89,7 @@ function ItemFormPrimarySection({ changePageSubtitle(transitionItemTypeKeyToLabel(_value)); })} selectedValue={value} - disabled={value === 'inventory' && !isNewMode} + disabled={itemType === 'inventory'} > } value="service" /> } value="non-inventory" /> @@ -142,10 +140,7 @@ function ItemFormPrimarySection({ inline={true} intent={inputIntent({ error, touched })} helperText={} - className={classNames( - 'form-group--category', - Classes.FILL, - )} + className={classNames('form-group--category', Classes.FILL)} >