Assigned Task Should Be Visible to Normal User Without Showing Assign Button. #240
@ -43,41 +43,29 @@ const InfraPlanning = () =>
|
|||||||
|
|
||||||
},[reloadedData])
|
},[reloadedData])
|
||||||
|
|
||||||
|
// Show only "No Result Found" message if no data is present
|
||||||
|
if (!project_deatilsLoader && projects_Details?.buildings?.length === 0) {
|
||||||
|
return <div className="text-center mt-4 ">No Result Found</div>;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Optionally show loading indicator
|
||||||
|
if (project_deatilsLoader) {
|
||||||
|
return <div className="text-center mt-4 ">Loading...</div>;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<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" }}>
|
||||||
<div className="align-items-center">
|
<div className="row">
|
||||||
{/* <div className="row ">
|
<InfraTable
|
||||||
<div className="col-sm-3 col-8 text-start mb-1">
|
buildings={projects_Details?.buildings}
|
||||||
<select name="DataTables_Table_0_length"
|
projectId={projects_Details?.id}
|
||||||
aria-controls="DataTables_Table_0"
|
/>
|
||||||
className="form-select form-select-sm"
|
|
||||||
value={selectedProject}
|
|
||||||
onChange={(e)=>dispatch(setProjectId(e.target.value))}
|
|
||||||
aria-label=""
|
|
||||||
>
|
|
||||||
{(project_listLoader || projects.length < 0) && <option value="Loading..." disabled>Loading...</option> }
|
|
||||||
|
|
||||||
{!project_listLoader && projects?.map((project)=>(
|
|
||||||
<option key={project.id} value={project.id}>{project.name}</option>
|
|
||||||
))}
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div> */}
|
|
||||||
<div className="row ">
|
|
||||||
{project_deatilsLoader && ( <p>Loading...</p> )}
|
|
||||||
{( !project_deatilsLoader && projects_Details?.buildings.length === 0 ) && ( <p>No Result Found</p> )}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{(!project_deatilsLoader && projects_Details?.buildings?.length > 0) && (<InfraTable buildings={projects_Details?.buildings} projectId={projects_Details.id}/>)}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user