From f6a9c0c5f4e27b44846155079060ccc5c05a634b Mon Sep 17 00:00:00 2001 From: Brian Manley Date: Fri, 3 Jan 2025 21:29:46 +0000 Subject: [PATCH 1/2] B-22133 provide flexibility for input --- .../PrimeUIUpdateInternationalFuelSurchargeForm.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/PrimeUI/UpdateServiceItems/PrimeUIUpdateInternationalFuelSurchargeForm.jsx b/src/pages/PrimeUI/UpdateServiceItems/PrimeUIUpdateInternationalFuelSurchargeForm.jsx index a68f99f71dd..ea6e8ea5ea1 100644 --- a/src/pages/PrimeUI/UpdateServiceItems/PrimeUIUpdateInternationalFuelSurchargeForm.jsx +++ b/src/pages/PrimeUI/UpdateServiceItems/PrimeUIUpdateInternationalFuelSurchargeForm.jsx @@ -45,7 +45,7 @@ const PrimeUIUpdateInternationalFuelSurchargeForm = ({ onUpdateServiceItem, move const { eTag, mtoServiceItemID, portCode, reServiceCode } = values; const body = { - portCode, + portCode: portCode.toUpperCase(), reServiceCode, modelType: 'UpdateMTOServiceItemInternationalPortFSC', }; From 0c48d41a9e10453be8af1dedaec651c5bdce468f Mon Sep 17 00:00:00 2001 From: Brian Manley Date: Fri, 3 Jan 2025 21:43:46 +0000 Subject: [PATCH 2/2] B-22133 formik way of doing things --- .../PrimeUIUpdateInternationalFuelSurchargeForm.jsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/pages/PrimeUI/UpdateServiceItems/PrimeUIUpdateInternationalFuelSurchargeForm.jsx b/src/pages/PrimeUI/UpdateServiceItems/PrimeUIUpdateInternationalFuelSurchargeForm.jsx index ea6e8ea5ea1..dc02c9c2423 100644 --- a/src/pages/PrimeUI/UpdateServiceItems/PrimeUIUpdateInternationalFuelSurchargeForm.jsx +++ b/src/pages/PrimeUI/UpdateServiceItems/PrimeUIUpdateInternationalFuelSurchargeForm.jsx @@ -45,7 +45,7 @@ const PrimeUIUpdateInternationalFuelSurchargeForm = ({ onUpdateServiceItem, move const { eTag, mtoServiceItemID, portCode, reServiceCode } = values; const body = { - portCode: portCode.toUpperCase(), + portCode, reServiceCode, modelType: 'UpdateMTOServiceItemInternationalPortFSC', }; @@ -64,7 +64,7 @@ const PrimeUIUpdateInternationalFuelSurchargeForm = ({ onUpdateServiceItem, move .max(4, 'Port Code must be 3-4 characters.'), })} > - {({ handleSubmit }) => ( + {({ handleSubmit, setFieldValue }) => (
@@ -120,6 +120,9 @@ const PrimeUIUpdateInternationalFuelSurchargeForm = ({ onUpdateServiceItem, move labelHint="Required" maxLength="4" isDisabled={serviceItem.status !== SERVICE_ITEM_STATUSES.APPROVED} + onBlur={(e) => { + setFieldValue('portCode', e.target.value.toUpperCase()); + }} />