From 4541152b5675ed20ea22201fb3cb78ec791450e5 Mon Sep 17 00:00:00 2001 From: Alec Li Date: Sat, 9 Mar 2024 18:31:58 -0800 Subject: [PATCH] Rework save/submit button logic --- .../coordinator/CreateStage.tsx | 44 +++++++++++++------ 1 file changed, 31 insertions(+), 13 deletions(-) diff --git a/csm_web/frontend/src/components/enrollment_automation/coordinator/CreateStage.tsx b/csm_web/frontend/src/components/enrollment_automation/coordinator/CreateStage.tsx index 7ca7cc80..2d0b74fd 100644 --- a/csm_web/frontend/src/components/enrollment_automation/coordinator/CreateStage.tsx +++ b/csm_web/frontend/src/components/enrollment_automation/coordinator/CreateStage.tsx @@ -622,9 +622,11 @@ export function CreateStage({ profile, initialSlots, nextStage }: CreateStagePro
- + {curCreatedTimes.length > 0 && ( + + )}
); @@ -677,12 +679,12 @@ export function CreateStage({ profile, initialSlots, nextStage }: CreateStagePro
- +
@@ -767,11 +766,30 @@ export function CreateStage({ profile, initialSlots, nextStage }: CreateStagePro
- {edited && You have unsaved changes!} + {edited && curCreatedTimes.length === 0 && ( + + )}
- + {edited || curCreatedTimes.length > 0 ? ( +
+ + Continue + + } + > +
You have unsaved changes!
+
+
+ ) : ( + + )}
{showConfirmModal && slotConfirmModal}