From ce95102108b2a1554a22009f474339d50ba94370 Mon Sep 17 00:00:00 2001 From: Akshata Katwal Date: Wed, 27 Nov 2024 19:00:35 +0530 Subject: [PATCH] Issue feat:Add push route after edit password to course-planner for SCTA and CCTA --- src/pages/edit-password.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/pages/edit-password.tsx b/src/pages/edit-password.tsx index 77d29404..1134f379 100644 --- a/src/pages/edit-password.tsx +++ b/src/pages/edit-password.tsx @@ -13,6 +13,7 @@ import { showToastMessage } from '@/components/Toastify'; import { telemetryFactory } from '@/utils/telemetry'; import PasswordCreate from '@/components/PasswordCreate'; import CentralizedModal from '@/components/CentralizedModal'; +import { Role } from '@/utils/app.constant'; const EditForgotPassword = () => { const { t } = useTranslation(); @@ -41,6 +42,14 @@ const EditForgotPassword = () => { } }; const handlePrimaryButton = () => { + const storedUserData = JSON.parse( + localStorage.getItem("adminInfo") || "{}" + ); + if(storedUserData?.role === Role.SCTA || storedUserData?.role === Role.CCTA) + { + router.push(`/course-planner`); + + }else router.push(`/centers`); localStorage.setItem('skipResetPassword', 'true'); };