From 4e553fe88ffb9346bb0175e36a5327e55e3c4660 Mon Sep 17 00:00:00 2001 From: Emily Jablonski <65367387+emilyjablonski@users.noreply.github.com> Date: Mon, 25 Apr 2022 09:37:08 -0600 Subject: [PATCH] fix: cannot update waitlist status to open (#1171) --- .../partners/src/listings/PaperListingForm/UnitsSummaryForm.tsx | 2 +- sites/partners/src/listings/PaperListingForm/index.tsx | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sites/partners/src/listings/PaperListingForm/UnitsSummaryForm.tsx b/sites/partners/src/listings/PaperListingForm/UnitsSummaryForm.tsx index ba7ab36eea..891872b5c2 100644 --- a/sites/partners/src/listings/PaperListingForm/UnitsSummaryForm.tsx +++ b/sites/partners/src/listings/PaperListingForm/UnitsSummaryForm.tsx @@ -107,7 +107,7 @@ const UnitsSummaryForm = ({ // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore:next-line unitType: summary?.unitType?.map((elem) => elem.id ?? elem.toString()), - openWaitListQuestion: summary?.openWaitlist?.toString(), + openWaitListQuestion: summary?.openWaitListQuestion || summary?.openWaitlist?.toString(), }) }, [summaries, reset, currentTempId, setCurrent]) diff --git a/sites/partners/src/listings/PaperListingForm/index.tsx b/sites/partners/src/listings/PaperListingForm/index.tsx index 66fd1b5942..dec19d3adf 100644 --- a/sites/partners/src/listings/PaperListingForm/index.tsx +++ b/sites/partners/src/listings/PaperListingForm/index.tsx @@ -146,6 +146,7 @@ const ListingForm = ({ listing, editMode }: ListingFormProps) => { ...summary, tempId: i + 1, amiLevels: summary?.amiLevels?.map((elem, index) => ({ ...elem, tempId: index + 1 })), + openWaitListQuestion: summary?.openWaitlist?.toString(), })) setUnitsSummaries(tempSummaries) }