From 54cc77fdaf28c9ed74bd48cc628ba9b473e9914c Mon Sep 17 00:00:00 2001 From: Sayali Joshi Date: Tue, 10 Sep 2024 16:13:58 +0530 Subject: [PATCH] [CMG-273], [CMG-290] --- ui/src/components/DestinationStack/Actions/LoadStacks.tsx | 1 + .../Stepper/HorizontalStepper/HorizontalStepper.tsx | 7 ++++++- ui/src/context/app/app.interface.ts | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ui/src/components/DestinationStack/Actions/LoadStacks.tsx b/ui/src/components/DestinationStack/Actions/LoadStacks.tsx index 60a76283..31edfc6b 100644 --- a/ui/src/components/DestinationStack/Actions/LoadStacks.tsx +++ b/ui/src/components/DestinationStack/Actions/LoadStacks.tsx @@ -245,6 +245,7 @@ const LoadStacks = (props: LoadFileFormatProps) => { useEffect(() => { fetchData(); }, []); + return (
diff --git a/ui/src/components/Stepper/HorizontalStepper/HorizontalStepper.tsx b/ui/src/components/Stepper/HorizontalStepper/HorizontalStepper.tsx index 94939b15..4424acf0 100644 --- a/ui/src/components/Stepper/HorizontalStepper/HorizontalStepper.tsx +++ b/ui/src/components/Stepper/HorizontalStepper/HorizontalStepper.tsx @@ -125,7 +125,7 @@ const HorizontalStepper = forwardRef( }); } })); - + const handleTabStep = (idx: number) => { if (newMigrationData?.content_mapping?.isDropDownChanged) { setIsModalOpen(true); @@ -156,6 +156,11 @@ const HorizontalStepper = forwardRef( notificationContent: { text: `Please select a stack to proceed further` }, type: 'warning' }) + } else if (newMigrationData?.destination_stack?.selectedStack?.value !== newMigrationData?.stackDetails?.value) { + return Notification({ + notificationContent: { text: `Please save the stack to proceed further` }, + type: 'warning' + }) } else { setTabStep(idx); diff --git a/ui/src/context/app/app.interface.ts b/ui/src/context/app/app.interface.ts index c54b2ca8..9ece92c5 100644 --- a/ui/src/context/app/app.interface.ts +++ b/ui/src/context/app/app.interface.ts @@ -178,6 +178,7 @@ export interface INewMigration { content_mapping: IContentMapper; test_migration: ITestMigration; isprojectMapped: boolean; + stackDetails: IDropDown; } export interface IMigrationData { @@ -319,6 +320,7 @@ export const DEFAULT_NEW_MIGRATION: INewMigration = { content_mapping: DEFAULT_CONTENT_MAPPER, test_migration: DEFAULT_TEST_MIGRATION, isprojectMapped: false, + stackDetails: DEFAULT_DROPDOWN }; export const DEFAULT_URL_TYPE: IURLType = {