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 {useProjectDetails, useProjectInfra, useProjects} from "../../hooks/useProjects";
|
||||
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 {useProfile} from "../../hooks/useProfile";
|
||||
import {refreshData, setProjectId} from "../../slices/localVariablesSlice";
|
||||
@ -27,6 +27,8 @@ const InfraPlanning = () =>
|
||||
|
||||
|
||||
const ManageInfra = useHasUserPermission( MANAGE_PROJECT_INFRA )
|
||||
const ApprovedTaskRights = useHasUserPermission(APPROVE_TASK)
|
||||
const ReportTaskRights = useHasUserPermission(ASSIGN_REPORT_TASK)
|
||||
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="card">
|
||||
<div className="card-body" style={{ padding: "0.5rem" }}>
|
||||
{ManageInfra ? (
|
||||
{(ApprovedTaskRights || ReportTaskRights) ? (
|
||||
<div className="align-items-center">
|
||||
<div className="row ">
|
||||
{isLoading && ( <p>Loading...</p> )}
|
||||
@ -53,7 +55,7 @@ const InfraPlanning = () =>
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
<div className="text-center">
|
||||
<div className="text-center my-2">
|
||||
<i className="fa-solid fa-triangle-exclamation fs-5"></i>
|
||||
<p>Access Denied: You don't have permission to perform this action. !</p>
|
||||
</div>
|
||||
|
||||
@ -281,13 +281,7 @@ const AssignTask = ({ assignData, onClose, setAssigned }) => {
|
||||
className="text-muted"
|
||||
style={{ fontSize: "11px" }}
|
||||
>
|
||||
{loading ? (
|
||||
<span className="placeholder-glow">
|
||||
<span className="placeholder col-6"></span>
|
||||
</span>
|
||||
) : (
|
||||
jobRole?.name || "Unknown Role"
|
||||
)}
|
||||
{jobRole?.name || "Unknown Role"}
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -144,7 +144,7 @@ const WorkArea = ({ workArea, floor, forBuilding }) => {
|
||||
Today's Planned
|
||||
</th>
|
||||
<th className="infra-activity-table-header">Progress</th>
|
||||
{(ManageInfra || ManageAndAssignTak) && (
|
||||
{(ManageInfra || (!projectId && ManageAndAssignTak)) && (
|
||||
<th className="infra-activity-table-header text-end">
|
||||
<span className="px-2">Actions</span>
|
||||
</th>
|
||||
@ -165,7 +165,7 @@ const WorkArea = ({ workArea, floor, forBuilding }) => {
|
||||
</table>
|
||||
) : (
|
||||
<div className="text-center text-muted py-3">
|
||||
No activities available for this work area.
|
||||
No activities available for this work area !
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user