Issues_July_2W: Project overview widgets #256
@ -93,33 +93,6 @@ const ProjectProgressChart = ({
|
|||||||
<h5 className="mb-1">Project Progress</h5>
|
<h5 className="mb-1">Project Progress</h5>
|
||||||
<p className="card-subtitle">Progress Overview by Project</p>
|
<p className="card-subtitle">Progress Overview by Project</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Right: Checkbox and Project Name */}
|
|
||||||
<div className="d-flex flex-column align-items-start align-items-md-end text-start text-md-end mt-1 mt-md-0">
|
|
||||||
{ShowAllProject == true && (
|
|
||||||
<div className="form-check form-switch mb-1 d-flex align-items-center">
|
|
||||||
<input
|
|
||||||
className="form-check-input"
|
|
||||||
type="checkbox"
|
|
||||||
role="switch"
|
|
||||||
id="showAllEmployees"
|
|
||||||
checked={showAllEmployees}
|
|
||||||
onChange={(e) => setShowAllEmployees(e.target.checked)}
|
|
||||||
/>
|
|
||||||
<label
|
|
||||||
className="form-check-label ms-2"
|
|
||||||
htmlFor="showAllEmployees"
|
|
||||||
>
|
|
||||||
All Projects
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
{!showAllEmployees && selectedProjectName && (
|
|
||||||
<p className="text-muted mb-0 small">
|
|
||||||
<span className="card-subtitle">{selectedProjectName}</span>
|
|
||||||
</p>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Row 2: Time Range Buttons */}
|
{/* Row 2: Time Range Buttons */}
|
||||||
|
@ -32,6 +32,7 @@ const Header = () => {
|
|||||||
let role = roles.find((role) => role.id === joRoleId);
|
let role = roles.find((role) => role.id === joRoleId);
|
||||||
return role ? role.name : "User";
|
return role ? role.name : "User";
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleLogout = (e) => {
|
const handleLogout = (e) => {
|
||||||
e.preventDefault(); // Prevent default anchor behavior (e.g., page reload)
|
e.preventDefault(); // Prevent default anchor behavior (e.g., page reload)
|
||||||
logout();
|
logout();
|
||||||
@ -39,7 +40,6 @@ const Header = () => {
|
|||||||
|
|
||||||
const logout = async () => {
|
const logout = async () => {
|
||||||
try {
|
try {
|
||||||
// Notify server about the logout (optional)
|
|
||||||
let data = {
|
let data = {
|
||||||
refreshToken: localStorage.getItem("refreshToken"),
|
refreshToken: localStorage.getItem("refreshToken"),
|
||||||
};
|
};
|
||||||
@ -54,6 +54,7 @@ const Header = () => {
|
|||||||
window.location.href = "/auth/login";
|
window.location.href = "/auth/login";
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
|
// Even if logout API fails, clear local storage and redirect
|
||||||
localStorage.removeItem("jwtToken");
|
localStorage.removeItem("jwtToken");
|
||||||
localStorage.removeItem("refreshToken");
|
localStorage.removeItem("refreshToken");
|
||||||
localStorage.removeItem("user");
|
localStorage.removeItem("user");
|
||||||
@ -71,39 +72,43 @@ const Header = () => {
|
|||||||
const handleProfilePage = () => {
|
const handleProfilePage = () => {
|
||||||
navigate(`/employee/${profile?.employeeInfo?.id}?for=attendance`);
|
navigate(`/employee/${profile?.employeeInfo?.id}?for=attendance`);
|
||||||
};
|
};
|
||||||
// const { projects, loading: projectLoading } = useProjects();
|
|
||||||
const { projectNames, loading: projectLoading, fetchData } = useProjectName();
|
const { projectNames, loading: projectLoading, fetchData } = useProjectName();
|
||||||
|
|
||||||
const selectedProject = useSelector(
|
const selectedProject = useSelector(
|
||||||
(store) => store.localVariables.projectId
|
(store) => store.localVariables.projectId
|
||||||
);
|
);
|
||||||
|
|
||||||
const selectedProjectName = projectNames?.find(
|
// Determine the display text for the project dropdown
|
||||||
(p) => p?.id === selectedProject
|
|
||||||
)?.name;
|
|
||||||
|
|
||||||
let displayText = "";
|
let displayText = "";
|
||||||
if (selectedProjectName) {
|
if (selectedProject === null) {
|
||||||
displayText = selectedProjectName;
|
displayText = "All Projects";
|
||||||
} else if (projectLoading && selectedProject) {
|
} else if (selectedProject) {
|
||||||
displayText = selectedProject;
|
const selectedProjectObj = projectNames?.find(
|
||||||
|
(p) => p?.id === selectedProject
|
||||||
|
);
|
||||||
|
// Fallback to selectedProject ID if name not found during loading or mismatch
|
||||||
|
displayText = selectedProjectObj ? selectedProjectObj.name : selectedProject;
|
||||||
} else if (projectLoading) {
|
} else if (projectLoading) {
|
||||||
displayText = "Loading...";
|
displayText = "Loading...";
|
||||||
}
|
}
|
||||||
|
|
||||||
const { openChangePassword } = useChangePassword();
|
const { openChangePassword } = useChangePassword();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (
|
if (
|
||||||
projectNames &&
|
projectNames &&
|
||||||
selectedProject !== " " &&
|
projectNames.length > 0 &&
|
||||||
|
selectedProject === undefined &&
|
||||||
!getCachedData("hasReceived")
|
!getCachedData("hasReceived")
|
||||||
) {
|
) {
|
||||||
dispatch(setProjectId(projectNames[0]?.id));
|
dispatch(setProjectId(null)); // Set to null for "All Projects"
|
||||||
}
|
}
|
||||||
}, [projectNames]);
|
}, [projectNames, selectedProject, dispatch]);
|
||||||
|
|
||||||
/** Check if current page id project details page */
|
|
||||||
const isProjectPath = /^\/projects\/[a-f0-9-]{36}$/.test(location.pathname)
|
/** Check if current page is project details page or directory page */
|
||||||
|
const isProjectPath = /^\/projects\/[a-f0-9-]{36}$/.test(location.pathname);
|
||||||
const isDirectoryPath = /^\/directory$/.test(location.pathname);
|
const isDirectoryPath = /^\/directory$/.test(location.pathname);
|
||||||
|
|
||||||
const handler = useCallback(
|
const handler = useCallback(
|
||||||
@ -111,44 +116,34 @@ const Header = () => {
|
|||||||
if (!HasManageProjectPermission) {
|
if (!HasManageProjectPermission) {
|
||||||
await fetchData();
|
await fetchData();
|
||||||
const projectExist = data.projectIds.some(
|
const projectExist = data.projectIds.some(
|
||||||
(item) => item == selectedProject
|
(item) => item === selectedProject
|
||||||
);
|
);
|
||||||
if (projectExist) {
|
if (projectExist) {
|
||||||
cacheData("hasReceived", false);
|
cacheData("hasReceived", false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[fetchData,projectNames,selectedProject]
|
[fetchData, selectedProject, HasManageProjectPermission]
|
||||||
);
|
);
|
||||||
|
|
||||||
// useEffect(() => {
|
|
||||||
// eventBus.on("assign_project_one", handler);
|
|
||||||
// return () => eventBus.off("assign_project_one", handler);
|
|
||||||
// }, [handler]);
|
|
||||||
|
|
||||||
const newProjectHandler = useCallback(
|
const newProjectHandler = useCallback(
|
||||||
async (msg) => {
|
async (msg) => {
|
||||||
|
|
||||||
if (HasManageProjectPermission && msg.keyword === "Create_Project") {
|
if (HasManageProjectPermission && msg.keyword === "Create_Project") {
|
||||||
await fetchData();
|
await fetchData();
|
||||||
} else if (projectNames.some((item) => item.id == msg.response.id)) {
|
} else if (projectNames?.some((item) => item.id === msg.response.id)) {
|
||||||
console.log((projectNames.some((item) => item.id == msg.response.id)))
|
|
||||||
await fetchData();
|
await fetchData();
|
||||||
}
|
}
|
||||||
cacheData("hasReceived", false);
|
cacheData("hasReceived", false);
|
||||||
},
|
},
|
||||||
[HasManageProjectPermission,projectNames]
|
[HasManageProjectPermission, projectNames, fetchData]
|
||||||
);
|
);
|
||||||
|
|
||||||
// useEffect(() => {
|
// Correct way to dispatch an action on mount
|
||||||
// eventBus.on("project", newProjectHandler);
|
useEffect(() => {
|
||||||
// return () => eventBus.off("project", newProjectHandler);
|
dispatch(changeMaster("Job Role"));
|
||||||
// }, [handler]);
|
}, [dispatch]);
|
||||||
|
|
||||||
useDispatch( () =>
|
// Event bus listeners for project changes
|
||||||
{
|
|
||||||
dispatch(changeMaster("Job Role"))
|
|
||||||
},[])
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
eventBus.on("assign_project_one", handler);
|
eventBus.on("assign_project_one", handler);
|
||||||
eventBus.on("project", newProjectHandler);
|
eventBus.on("project", newProjectHandler);
|
||||||
@ -159,7 +154,6 @@ const Header = () => {
|
|||||||
};
|
};
|
||||||
}, [handler, newProjectHandler]);
|
}, [handler, newProjectHandler]);
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<nav
|
<nav
|
||||||
className="layout-navbar container-fluid mb-3 navbar navbar-expand-xl navbar-detached align-items-center bg-navbar-theme"
|
className="layout-navbar container-fluid mb-3 navbar navbar-expand-xl navbar-detached align-items-center bg-navbar-theme"
|
||||||
@ -177,17 +171,16 @@ const Header = () => {
|
|||||||
className="navbar-nav-right d-flex align-items-center justify-content-between"
|
className="navbar-nav-right d-flex align-items-center justify-content-between"
|
||||||
id="navbar-collapse"
|
id="navbar-collapse"
|
||||||
>
|
>
|
||||||
{projectNames?.length > 0 && (
|
{/* Project Selection Dropdown */}
|
||||||
|
{projectNames && ( // Ensure projectNames is not null before rendering dropdown
|
||||||
<div className="align-items-center">
|
<div className="align-items-center">
|
||||||
{(!isProjectPath && !isDirectoryPath) && (
|
{(!isProjectPath && !isDirectoryPath) && (
|
||||||
<>
|
<>
|
||||||
<i
|
<i className="rounded-circle bx bx-building-house bx-sm-lg bx-md me-2"></i>
|
||||||
className="rounded-circle bx bx-building-house bx-sm-lg bx-md"
|
|
||||||
></i>
|
|
||||||
<div className="btn-group">
|
<div className="btn-group">
|
||||||
<button
|
<button
|
||||||
className={`btn btn-sm-sm btn-xl ${
|
className={`btn btn-sm-sm btn-xl ${
|
||||||
projectNames?.length > 1 && "dropdown-toggle"
|
projectNames.length > 0 ? "dropdown-toggle" : ""
|
||||||
} px-1`}
|
} px-1`}
|
||||||
type="button"
|
type="button"
|
||||||
data-bs-toggle="dropdown"
|
data-bs-toggle="dropdown"
|
||||||
@ -196,11 +189,21 @@ const Header = () => {
|
|||||||
{displayText}
|
{displayText}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
{projectNames?.length > 1 && (
|
{/* Render dropdown menu only if there are projects or the "All Projects" option is relevant */}
|
||||||
|
{projectNames.length > 0 && (
|
||||||
<ul
|
<ul
|
||||||
className="dropdown-menu"
|
className="dropdown-menu"
|
||||||
style={{ overflow: "auto", maxHeight: "300px" }}
|
style={{ overflow: "auto", maxHeight: "300px" }}
|
||||||
>
|
>
|
||||||
|
{/* "All Projects" option */}
|
||||||
|
<li>
|
||||||
|
<button
|
||||||
|
className="dropdown-item"
|
||||||
|
onClick={() => dispatch(setProjectId(null))} // Set projectId to null for "All Projects"
|
||||||
|
>
|
||||||
|
All Projects
|
||||||
|
</button>
|
||||||
|
</li>
|
||||||
{[...projectNames]
|
{[...projectNames]
|
||||||
.sort((a, b) => a?.name?.localeCompare(b.name))
|
.sort((a, b) => a?.name?.localeCompare(b.name))
|
||||||
.map((project) => (
|
.map((project) => (
|
||||||
@ -214,7 +217,6 @@ const Header = () => {
|
|||||||
{project?.name}{" "}
|
{project?.name}{" "}
|
||||||
{project?.shortName ? (
|
{project?.shortName ? (
|
||||||
<span className="text-primary fw-semibold ">
|
<span className="text-primary fw-semibold ">
|
||||||
{" "}
|
|
||||||
({project?.shortName})
|
({project?.shortName})
|
||||||
</span>
|
</span>
|
||||||
) : (
|
) : (
|
||||||
@ -230,8 +232,11 @@ const Header = () => {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{/* Display project name on project details or directory pages */}
|
||||||
{isProjectPath && (<span className="fs-5 align-items-center"><i className="rounded-circle bx bx-building-house bx-sm-lg bx-md me-2"></i>{displayText}</span>)}
|
{isProjectPath && (<span className="fs-5 align-items-center"><i className="rounded-circle bx bx-building-house bx-sm-lg bx-md me-2"></i>{displayText}</span>)}
|
||||||
|
|
||||||
|
{/* User Profile and Shortcuts */}
|
||||||
<ul className="navbar-nav flex-row align-items-center ms-md-auto">
|
<ul className="navbar-nav flex-row align-items-center ms-md-auto">
|
||||||
<li className="nav-item dropdown-shortcuts navbar-dropdown dropdown me-2 me-xl-0">
|
<li className="nav-item dropdown-shortcuts navbar-dropdown dropdown me-2 me-xl-0">
|
||||||
<a
|
<a
|
||||||
@ -269,7 +274,6 @@ const Header = () => {
|
|||||||
</span>
|
</span>
|
||||||
Dashboard
|
Dashboard
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<small>User Dashboard</small>
|
<small>User Dashboard</small>
|
||||||
</div>
|
</div>
|
||||||
<div className="dropdown-shortcuts-item col">
|
<div className="dropdown-shortcuts-item col">
|
||||||
@ -282,7 +286,6 @@ const Header = () => {
|
|||||||
</span>
|
</span>
|
||||||
Projects
|
Projects
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<small>Projects List</small>
|
<small>Projects List</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -323,7 +326,6 @@ const Header = () => {
|
|||||||
</span>
|
</span>
|
||||||
Allocate Work
|
Allocate Work
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<small>Work Allocations</small>
|
<small>Work Allocations</small>
|
||||||
</div>
|
</div>
|
||||||
<div className="dropdown-shortcuts-item col">
|
<div className="dropdown-shortcuts-item col">
|
||||||
@ -336,321 +338,12 @@ const Header = () => {
|
|||||||
</span>
|
</span>
|
||||||
Daily Work Log
|
Daily Work Log
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<small>Daily Work Allocations</small>
|
<small>Daily Work Allocations</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
{/* <li className="nav-item dropdown-notifications navbar-dropdown dropdown me-2 me-xl-0">
|
|
||||||
<a
|
|
||||||
className="nav-link dropdown-toggle hide-arrow cursor-pointer"
|
|
||||||
data-bs-toggle="dropdown"
|
|
||||||
data-bs-auto-close="outside"
|
|
||||||
aria-expanded="false"
|
|
||||||
>
|
|
||||||
<span className="position-relative">
|
|
||||||
<i className="icon-base bx bx-bell icon-lg"></i>
|
|
||||||
<span className="badge rounded-pill bg-danger badge-dot badge-notifications border"></span>
|
|
||||||
</span>
|
|
||||||
</a>
|
|
||||||
<ul className="dropdown-menu dropdown-menu-end p-0">
|
|
||||||
<li className="dropdown-menu-header border-bottom">
|
|
||||||
<div className="dropdown-header d-flex align-items-center py-3">
|
|
||||||
<h6 className="mb-0 me-auto">Notification</h6>
|
|
||||||
<div className="d-flex align-items-center h6 mb-0">
|
|
||||||
<span className="badge bg-label-primary me-2">8 New</span>
|
|
||||||
<a
|
|
||||||
href="#"
|
|
||||||
className="dropdown-notifications-all p-2"
|
|
||||||
data-bs-toggle="tooltip"
|
|
||||||
data-bs-placement="top"
|
|
||||||
aria-label="Mark all as read"
|
|
||||||
data-bs-original-title="Mark all as read"
|
|
||||||
>
|
|
||||||
<i className="icon-base bx bx-envelope-open text-heading"></i>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
<li className="dropdown-notifications-list scrollable-container ps">
|
|
||||||
<ul className="list-group list-group-flush">
|
|
||||||
<li className="list-group-item list-group-item-action dropdown-notifications-item">
|
|
||||||
<div className="d-flex">
|
|
||||||
<div className="flex-shrink-0 me-3">
|
|
||||||
<div className="avatar">
|
|
||||||
<img
|
|
||||||
src="../../assets/img/avatars/1.png"
|
|
||||||
alt=""
|
|
||||||
className="rounded-circle"
|
|
||||||
></img>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="flex-grow-1">
|
|
||||||
<h6 className="small mb-0">Congratulation Lettie 🎉</h6>
|
|
||||||
<small className="mb-1 d-block text-body">
|
|
||||||
Won the monthly best seller gold badge
|
|
||||||
</small>
|
|
||||||
<small className="text-body-secondary">1h ago</small>
|
|
||||||
</div>
|
|
||||||
<div className="flex-shrink-0 dropdown-notifications-actions">
|
|
||||||
<a href="#" className="dropdown-notifications-read">
|
|
||||||
<span className="badge badge-dot"></span>
|
|
||||||
</a>
|
|
||||||
<a href="#" className="dropdown-notifications-archive">
|
|
||||||
<span className="icon-base bx bx-x"></span>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
<li className="list-group-item list-group-item-action dropdown-notifications-item">
|
|
||||||
<div className="d-flex">
|
|
||||||
<div className="flex-shrink-0 me-3">
|
|
||||||
<div className="avatar">
|
|
||||||
<span className="avatar-initial rounded-circle bg-label-danger">
|
|
||||||
CF
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="flex-grow-1">
|
|
||||||
<h6 className="small mb-0">Charles Franklin</h6>
|
|
||||||
<small className="mb-1 d-block text-body">
|
|
||||||
Accepted your connection
|
|
||||||
</small>
|
|
||||||
<small className="text-body-secondary">12hr ago</small>
|
|
||||||
</div>
|
|
||||||
<div className="flex-shrink-0 dropdown-notifications-actions">
|
|
||||||
<a href="#" className="dropdown-notifications-read">
|
|
||||||
<span className="badge badge-dot"></span>
|
|
||||||
</a>
|
|
||||||
<a href="#" className="dropdown-notifications-archive">
|
|
||||||
<span className="icon-base bx bx-x"></span>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
<li className="list-group-item list-group-item-action dropdown-notifications-item marked-as-read">
|
|
||||||
<div className="d-flex">
|
|
||||||
<div className="flex-shrink-0 me-3">
|
|
||||||
<div className="avatar">
|
|
||||||
<img
|
|
||||||
src="../../assets/img/avatars/2.png"
|
|
||||||
alt=""
|
|
||||||
className="rounded-circle"
|
|
||||||
></img>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="flex-grow-1">
|
|
||||||
<h6 className="small mb-0">New Message ✉️</h6>
|
|
||||||
<small className="mb-1 d-block text-body">
|
|
||||||
You have new message from Natalie
|
|
||||||
</small>
|
|
||||||
<small className="text-body-secondary">1h ago</small>
|
|
||||||
</div>
|
|
||||||
<div className="flex-shrink-0 dropdown-notifications-actions">
|
|
||||||
<a href="#" className="dropdown-notifications-read">
|
|
||||||
<span className="badge badge-dot"></span>
|
|
||||||
</a>
|
|
||||||
<a href="#" className="dropdown-notifications-archive">
|
|
||||||
<span className="icon-base bx bx-x"></span>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
<li className="list-group-item list-group-item-action dropdown-notifications-item">
|
|
||||||
<div className="d-flex">
|
|
||||||
<div className="flex-shrink-0 me-3">
|
|
||||||
<div className="avatar">
|
|
||||||
<span className="avatar-initial rounded-circle bg-label-success">
|
|
||||||
<i className="icon-base bx bx-cart"></i>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="flex-grow-1">
|
|
||||||
<h6 className="small mb-0">
|
|
||||||
Whoo! You have new order 🛒
|
|
||||||
</h6>
|
|
||||||
<small className="mb-1 d-block text-body">
|
|
||||||
ACME Inc. made new order $1,154
|
|
||||||
</small>
|
|
||||||
<small className="text-body-secondary">1 day ago</small>
|
|
||||||
</div>
|
|
||||||
<div className="flex-shrink-0 dropdown-notifications-actions">
|
|
||||||
<a href="#" className="dropdown-notifications-read">
|
|
||||||
<span className="badge badge-dot"></span>
|
|
||||||
</a>
|
|
||||||
<a href="#" className="dropdown-notifications-archive">
|
|
||||||
<span className="icon-base bx bx-x"></span>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
<li className="list-group-item list-group-item-action dropdown-notifications-item marked-as-read">
|
|
||||||
<div className="d-flex">
|
|
||||||
<div className="flex-shrink-0 me-3">
|
|
||||||
<div className="avatar">
|
|
||||||
<img
|
|
||||||
src="../../assets/img/avatars/9.png"
|
|
||||||
alt=""
|
|
||||||
className="rounded-circle"
|
|
||||||
></img>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="flex-grow-1">
|
|
||||||
<h6 className="small mb-0">
|
|
||||||
Application has been approved 🚀
|
|
||||||
</h6>
|
|
||||||
<small className="mb-1 d-block text-body">
|
|
||||||
Your ABC project application has been approved.
|
|
||||||
</small>
|
|
||||||
<small className="text-body-secondary">
|
|
||||||
2 days ago
|
|
||||||
</small>
|
|
||||||
</div>
|
|
||||||
<div className="flex-shrink-0 dropdown-notifications-actions">
|
|
||||||
<a href="#" className="dropdown-notifications-read">
|
|
||||||
<span className="badge badge-dot"></span>
|
|
||||||
</a>
|
|
||||||
<a href="#" className="dropdown-notifications-archive">
|
|
||||||
<span className="icon-base bx bx-x"></span>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
<li className="list-group-item list-group-item-action dropdown-notifications-item marked-as-read">
|
|
||||||
<div className="d-flex">
|
|
||||||
<div className="flex-shrink-0 me-3">
|
|
||||||
<div className="avatar">
|
|
||||||
<span className="avatar-initial rounded-circle bg-label-success">
|
|
||||||
<i className="icon-base bx bx-pie-chart-alt"></i>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="flex-grow-1">
|
|
||||||
<h6 className="small mb-0">
|
|
||||||
Monthly report is generated
|
|
||||||
</h6>
|
|
||||||
<small className="mb-1 d-block text-body">
|
|
||||||
July monthly financial report is generated{" "}
|
|
||||||
</small>
|
|
||||||
<small className="text-body-secondary">
|
|
||||||
3 days ago
|
|
||||||
</small>
|
|
||||||
</div>
|
|
||||||
<div className="flex-shrink-0 dropdown-notifications-actions">
|
|
||||||
<a href="#" className="dropdown-notifications-read">
|
|
||||||
<span className="badge badge-dot"></span>
|
|
||||||
</a>
|
|
||||||
<a href="#" className="dropdown-notifications-archive">
|
|
||||||
<span className="icon-base bx bx-x"></span>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
<li className="list-group-item list-group-item-action dropdown-notifications-item marked-as-read">
|
|
||||||
<div className="d-flex">
|
|
||||||
<div className="flex-shrink-0 me-3">
|
|
||||||
<div className="avatar">
|
|
||||||
<img
|
|
||||||
src="../../assets/img/avatars/5.png"
|
|
||||||
alt=""
|
|
||||||
className="rounded-circle"
|
|
||||||
></img>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="flex-grow-1">
|
|
||||||
<h6 className="small mb-0">Send connection request</h6>
|
|
||||||
<small className="mb-1 d-block text-body">
|
|
||||||
Peter sent you connection request
|
|
||||||
</small>
|
|
||||||
<small className="text-body-secondary">
|
|
||||||
4 days ago
|
|
||||||
</small>
|
|
||||||
</div>
|
|
||||||
<div className="flex-shrink-0 dropdown-notifications-actions">
|
|
||||||
<a href="#" className="dropdown-notifications-read">
|
|
||||||
<span className="badge badge-dot"></span>
|
|
||||||
</a>
|
|
||||||
<a href="#" className="dropdown-notifications-archive">
|
|
||||||
<span className="icon-base bx bx-x"></span>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
<li className="list-group-item list-group-item-action dropdown-notifications-item">
|
|
||||||
<div className="d-flex">
|
|
||||||
<div className="flex-shrink-0 me-3">
|
|
||||||
<div className="avatar">
|
|
||||||
<img
|
|
||||||
src="../../assets/img/avatars/6.png"
|
|
||||||
alt=""
|
|
||||||
className="rounded-circle"
|
|
||||||
></img>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="flex-grow-1">
|
|
||||||
<h6 className="small mb-0">New message from Jane</h6>
|
|
||||||
<small className="mb-1 d-block text-body">
|
|
||||||
Your have new message from Jane
|
|
||||||
</small>
|
|
||||||
<small className="text-body-secondary">
|
|
||||||
5 days ago
|
|
||||||
</small>
|
|
||||||
</div>
|
|
||||||
<div className="flex-shrink-0 dropdown-notifications-actions">
|
|
||||||
<a href="#" className="dropdown-notifications-read">
|
|
||||||
<span className="badge badge-dot"></span>
|
|
||||||
</a>
|
|
||||||
<a href="#" className="dropdown-notifications-archive">
|
|
||||||
<span className="icon-base bx bx-x"></span>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
<li className="list-group-item list-group-item-action dropdown-notifications-item marked-as-read">
|
|
||||||
<div className="d-flex">
|
|
||||||
<div className="flex-shrink-0 me-3">
|
|
||||||
<div className="avatar">
|
|
||||||
<span className="avatar-initial rounded-circle bg-label-warning">
|
|
||||||
<i className="icon-base bx bx-error"></i>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="flex-grow-1">
|
|
||||||
<h6 className="small mb-0">CPU is running high</h6>
|
|
||||||
<small className="mb-1 d-block text-body">
|
|
||||||
CPU Utilization Percent is currently at 88.63%,
|
|
||||||
</small>
|
|
||||||
<small className="text-body-secondary">
|
|
||||||
5 days ago
|
|
||||||
</small>
|
|
||||||
</div>
|
|
||||||
<div className="flex-shrink-0 dropdown-notifications-actions">
|
|
||||||
<a href="#" className="dropdown-notifications-read">
|
|
||||||
<span className="badge badge-dot"></span>
|
|
||||||
</a>
|
|
||||||
<a href="#" className="dropdown-notifications-archive">
|
|
||||||
<span className="icon-base bx bx-x"></span>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
<li className="border-top">
|
|
||||||
<div className="d-grid p-4">
|
|
||||||
<a className="btn btn-primary btn-sm d-flex" href="#;">
|
|
||||||
<small className="align-middle">
|
|
||||||
View all notifications
|
|
||||||
</small>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</li> */}
|
|
||||||
<li className="nav-item navbar-dropdown dropdown-user dropdown">
|
<li className="nav-item navbar-dropdown dropdown-user dropdown">
|
||||||
<a
|
<a
|
||||||
aria-label="dropdown profile avatar"
|
aria-label="dropdown profile avatar"
|
||||||
@ -709,25 +402,8 @@ const Header = () => {
|
|||||||
<span className="align-middle">Settings</span>
|
<span className="align-middle">Settings</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{/* <li>
|
|
||||||
<a
|
|
||||||
aria-label="go to billing "
|
|
||||||
className="dropdown-item cusor-pointer"
|
|
||||||
>
|
|
||||||
<span className="d-flex align-items-center align-middle">
|
|
||||||
<i className="flex-shrink-0 bx bx-credit-card me-2"></i>
|
|
||||||
<span className="flex-grow-1 align-middle ms-1">
|
|
||||||
Billing
|
|
||||||
</span>
|
|
||||||
<span className="flex-shrink-0 badge badge-center rounded-pill bg-danger w-px-20 h-px-20">
|
|
||||||
4
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
</a>
|
|
||||||
</li> */}
|
|
||||||
<li onClick={openChangePassword}>
|
<li onClick={openChangePassword}>
|
||||||
{" "}
|
{" "}
|
||||||
{/* Use the function from the context */}
|
|
||||||
<a
|
<a
|
||||||
aria-label="go to profile"
|
aria-label="go to profile"
|
||||||
className="dropdown-item cusor-pointer"
|
className="dropdown-item cusor-pointer"
|
||||||
@ -743,7 +419,7 @@ const Header = () => {
|
|||||||
<a
|
<a
|
||||||
aria-label="click to log out"
|
aria-label="click to log out"
|
||||||
className="dropdown-item cusor-pointer"
|
className="dropdown-item cusor-pointer"
|
||||||
href="/logout" // Optional: Add this for accessibility, but it won't actually redirect
|
href="/logout"
|
||||||
onClick={handleLogout}
|
onClick={handleLogout}
|
||||||
>
|
>
|
||||||
<i className="bx bx-power-off me-2"></i>
|
<i className="bx bx-power-off me-2"></i>
|
||||||
|
@ -88,7 +88,7 @@ const ProjectDetails = () => {
|
|||||||
<div className="col-xl-4 col-lg-5 col-md-5 mt-5">
|
<div className="col-xl-4 col-lg-5 col-md-5 mt-5">
|
||||||
<ProjectOverview project={projectId} />
|
<ProjectOverview project={projectId} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
case "teams": {
|
case "teams": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user