From b5c3def92ba609092dbb0af13cb657a36de848ca Mon Sep 17 00:00:00 2001 From: Ronald Langeveld Date: Tue, 21 Nov 2023 19:31:28 +0700 Subject: [PATCH] Fixed Offers not saving fixed amount discount (#19077) no issue - Offers with a fixed amount wasn't saving due to the type not updating from percent to fixed. --- .../src/components/settings/growth/offers/AddOfferModal.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/admin-x-settings/src/components/settings/growth/offers/AddOfferModal.tsx b/apps/admin-x-settings/src/components/settings/growth/offers/AddOfferModal.tsx index f1287ee335..b03a8a9394 100644 --- a/apps/admin-x-settings/src/components/settings/growth/offers/AddOfferModal.tsx +++ b/apps/admin-x-settings/src/components/settings/growth/offers/AddOfferModal.tsx @@ -98,7 +98,7 @@ const Sidebar: React.FC = ({tierOptions,

Offer details

- { + { handleTypeChange('percent'); }} /> { @@ -320,7 +320,8 @@ const AddOfferModal = () => { const handleAmountTypeChange = (amountType: string) => { updateForm(state => ({ ...state, - amountType: amountType + amountType: amountType, + type: amountType === 'percent' ? 'percent' : 'fixed' || state.type })); };