Compare commits
3 Commits
main
...
Issues_Jul
| Author | SHA1 | Date | |
|---|---|---|---|
| 34a2753641 | |||
| 2c4cc59c7d | |||
| 1954fe8d79 |
@ -10,7 +10,7 @@ import ProjectRepository from "../../repositories/ProjectRepository";
|
|||||||
import Breadcrumb from "../../components/common/Breadcrumb";
|
import Breadcrumb from "../../components/common/Breadcrumb";
|
||||||
import {useProjectDetails, useProjectInfra, useProjects} from "../../hooks/useProjects";
|
import {useProjectDetails, useProjectInfra, useProjects} from "../../hooks/useProjects";
|
||||||
import {useHasUserPermission} from "../../hooks/useHasUserPermission";
|
import {useHasUserPermission} from "../../hooks/useHasUserPermission";
|
||||||
import {MANAGE_PROJECT_INFRA} from "../../utils/constants";
|
import {APPROVE_TASK, ASSIGN_REPORT_TASK, MANAGE_PROJECT_INFRA} from "../../utils/constants";
|
||||||
import {useDispatch, useSelector} from "react-redux";
|
import {useDispatch, useSelector} from "react-redux";
|
||||||
import {useProfile} from "../../hooks/useProfile";
|
import {useProfile} from "../../hooks/useProfile";
|
||||||
import {refreshData, setProjectId} from "../../slices/localVariablesSlice";
|
import {refreshData, setProjectId} from "../../slices/localVariablesSlice";
|
||||||
@ -27,6 +27,8 @@ const InfraPlanning = () =>
|
|||||||
|
|
||||||
|
|
||||||
const ManageInfra = useHasUserPermission( MANAGE_PROJECT_INFRA )
|
const ManageInfra = useHasUserPermission( MANAGE_PROJECT_INFRA )
|
||||||
|
const ApprovedTaskRights = useHasUserPermission(APPROVE_TASK)
|
||||||
|
const ReportTaskRights = useHasUserPermission(ASSIGN_REPORT_TASK)
|
||||||
const reloadedData = useSelector( ( store ) => store.localVariables.reload )
|
const reloadedData = useSelector( ( store ) => store.localVariables.reload )
|
||||||
|
|
||||||
|
|
||||||
@ -44,7 +46,7 @@ const InfraPlanning = () =>
|
|||||||
<div className="col-md-12 col-lg-12 col-xl-12 order-0 mb-4">
|
<div className="col-md-12 col-lg-12 col-xl-12 order-0 mb-4">
|
||||||
<div className="card">
|
<div className="card">
|
||||||
<div className="card-body" style={{ padding: "0.5rem" }}>
|
<div className="card-body" style={{ padding: "0.5rem" }}>
|
||||||
{ManageInfra ? (
|
{(ApprovedTaskRights || ReportTaskRights) ? (
|
||||||
<div className="align-items-center">
|
<div className="align-items-center">
|
||||||
<div className="row ">
|
<div className="row ">
|
||||||
{isLoading && ( <p>Loading...</p> )}
|
{isLoading && ( <p>Loading...</p> )}
|
||||||
@ -53,7 +55,7 @@ const InfraPlanning = () =>
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div className="text-center">
|
<div className="text-center my-2">
|
||||||
<i className="fa-solid fa-triangle-exclamation fs-5"></i>
|
<i className="fa-solid fa-triangle-exclamation fs-5"></i>
|
||||||
<p>Access Denied: You don't have permission to perform this action. !</p>
|
<p>Access Denied: You don't have permission to perform this action. !</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -281,13 +281,7 @@ const AssignTask = ({ assignData, onClose, setAssigned }) => {
|
|||||||
className="text-muted"
|
className="text-muted"
|
||||||
style={{ fontSize: "11px" }}
|
style={{ fontSize: "11px" }}
|
||||||
>
|
>
|
||||||
{loading ? (
|
{jobRole?.name || "Unknown Role"}
|
||||||
<span className="placeholder-glow">
|
|
||||||
<span className="placeholder col-6"></span>
|
|
||||||
</span>
|
|
||||||
) : (
|
|
||||||
jobRole?.name || "Unknown Role"
|
|
||||||
)}
|
|
||||||
</small>
|
</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -144,7 +144,7 @@ const WorkArea = ({ workArea, floor, forBuilding }) => {
|
|||||||
Today's Planned
|
Today's Planned
|
||||||
</th>
|
</th>
|
||||||
<th className="infra-activity-table-header">Progress</th>
|
<th className="infra-activity-table-header">Progress</th>
|
||||||
{(ManageInfra || ManageAndAssignTak) && (
|
{(ManageInfra || (!projectId && ManageAndAssignTak)) && (
|
||||||
<th className="infra-activity-table-header text-end">
|
<th className="infra-activity-table-header text-end">
|
||||||
<span className="px-2">Actions</span>
|
<span className="px-2">Actions</span>
|
||||||
</th>
|
</th>
|
||||||
@ -165,7 +165,7 @@ const WorkArea = ({ workArea, floor, forBuilding }) => {
|
|||||||
</table>
|
</table>
|
||||||
) : (
|
) : (
|
||||||
<div className="text-center text-muted py-3">
|
<div className="text-center text-muted py-3">
|
||||||
No activities available for this work area.
|
No activities available for this work area !
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user