From 23a545afa732666c6c52b03b286f37183ee32b17 Mon Sep 17 00:00:00 2001 From: Megha-Dev-19 <100185149+Megha-Dev-19@users.noreply.github.com> Date: Wed, 21 Aug 2024 00:40:23 +0530 Subject: [PATCH] fix the cancel and add_rfp issue --- widget/components/rfps/Editor.jsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/widget/components/rfps/Editor.jsx b/widget/components/rfps/Editor.jsx index 113a700..b606c39 100644 --- a/widget/components/rfps/Editor.jsx +++ b/widget/components/rfps/Editor.jsx @@ -285,6 +285,7 @@ const [rfpIdsArray, setRfpIdsArray] = useState(null); const [isTxnCreated, setCreateTxn] = useState(false); const [oldRfpData, setOldRfpData] = useState(null); const [timeline, setTimeline] = useState(null); +const [isCancelModalOpen, setCancelModal] = useState(false); useEffect(() => { if (!timeline) { @@ -338,7 +339,11 @@ useEffect(() => { setSummary(snapshot.summary); setDescription(snapshot.description); setSubmissionDeadline(getDate(snapshot.submission_deadline)); - setTimeline(parseJSON(snapshot.timeline)); + setTimeline( + Object.keys(parseJSON(snapshot.timeline)) + ? parseJSON(snapshot.timeline) + : { status: RFP_TIMELINE_STATUS.ACCEPTING_SUBMISSIONS }, + ); if (isEditPage) { setConsent({ toc: true, coc: true }); }