Skip to content

Commit

Permalink
Merge pull request #357 from AkshataKatwal16/relese-changes
Browse files Browse the repository at this point in the history
Issue feat:Add  push route after edit password to course-planner for SCTA and CCTA
  • Loading branch information
itsvick authored Nov 27, 2024
2 parents 6237f2b + ce95102 commit c5769c8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/pages/edit-password.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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');
};
Expand Down

0 comments on commit c5769c8

Please sign in to comment.