Refactor_Expenses #321
@ -27,6 +27,19 @@ const Header = () => {
|
|||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const HasManageProjectPermission = useHasUserPermission(MANAGE_PROJECT);
|
const HasManageProjectPermission = useHasUserPermission(MANAGE_PROJECT);
|
||||||
|
|
||||||
|
const isDirectoryPath = /^\/directory$/.test(location.pathname);
|
||||||
|
const isProjectPath = /^\/projects$/.test(location.pathname);
|
||||||
|
const isDashboard =
|
||||||
|
/^\/dashboard$/.test(location.pathname) || /^\/$/.test(location.pathname);
|
||||||
|
|
||||||
|
// Define the specific project status IDs you want to filter by
|
||||||
|
const allowedProjectStatusIds = [
|
||||||
|
"603e994b-a27f-4e5d-a251-f3d69b0498ba", // On Hold
|
||||||
|
"cdad86aa-8a56-4ff4-b633-9c629057dfef", // In Progress
|
||||||
|
"ef1c356e-0fe0-42df-a5d3-8daee355492d", // Inactive
|
||||||
|
"b74da4c2-d07e-46f2-9919-e75e49b12731", // Active
|
||||||
|
];
|
||||||
|
|
||||||
const isDirectoryPath = /^\/directory$/.test(location.pathname);
|
const isDirectoryPath = /^\/directory$/.test(location.pathname);
|
||||||
const isProjectPath = /^\/projects$/.test(location.pathname);
|
const isProjectPath = /^\/projects$/.test(location.pathname);
|
||||||
const isDashboard =
|
const isDashboard =
|
||||||
@ -120,7 +133,7 @@ const Header = () => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (
|
if (
|
||||||
projectNames &&
|
projectNames && // Use the original projectNames for initial setting to ensure all are considered for initial state if needed
|
||||||
projectNames.length > 0 &&
|
projectNames.length > 0 &&
|
||||||
selectedProject === undefined &&
|
selectedProject === undefined &&
|
||||||
!getCachedData("hasReceived")
|
!getCachedData("hasReceived")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user