diff --git a/src/components/ReassignCenterModal.tsx b/src/components/ReassignCenterModal.tsx index 767ff3a3..1f3c31a1 100644 --- a/src/components/ReassignCenterModal.tsx +++ b/src/components/ReassignCenterModal.tsx @@ -307,6 +307,9 @@ const ReassignCenterModal: React.FC = ({ ), "success" ); + reassignButtonStatus + ? setReassignButtonStatus(false) + : setReassignButtonStatus(true); if( userType === Role.FACILITATORS) { if (selectedDistrict[0] !== districtName) { diff --git a/src/components/layouts/header/Header.tsx b/src/components/layouts/header/Header.tsx index aee58c89..a65683ba 100644 --- a/src/components/layouts/header/Header.tsx +++ b/src/components/layouts/header/Header.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useRef, useState } from "react"; +import React, { useEffect, useRef, useState } from "react"; import FeatherIcon from "feather-icons-react"; import { AppBar, Box, IconButton, Toolbar } from "@mui/material"; import MenuItem from "@mui/material/MenuItem"; @@ -34,6 +34,8 @@ const Header = ({ sx, customClass, toggleMobileSidebar, position }: any) => { ); const [selectedLanguage, setSelectedLanguage] = useState(lang); + const [userRole, setUserRole] = useState(""); + const [academicYearList, setAcademicYearList] = useState([]); const [selectedSessionId, setSelectedSessionId] = useState(""); @@ -62,6 +64,15 @@ const Header = ({ sx, customClass, toggleMobileSidebar, position }: any) => { } }, [setLanguage]); + + + useEffect(() => { + const storedUserData=localStorage.getItem("adminInfo") + if(storedUserData){ + const userData = JSON.parse(storedUserData); + setUserRole(userData.role); + } + }, []); const handleSelectChange = (event: SelectChangeEvent) => { setSelectedSessionId(event.target.value); console.log("selected academic year id", event.target.value); @@ -137,7 +148,9 @@ const Header = ({ sx, customClass, toggleMobileSidebar, position }: any) => { {/* ------------ End Menu icon ------------- */} - + + + {userRole !== Role.CCTA && userRole !== Role.SCTA && userRole!=="" &&( {/* */} {/* */} - + )} + +