Navigate to "Projects" Page Should Display Only Message When No Projects Are Assigned.
This commit is contained in:
parent
e26fafeba3
commit
25ff406b87
@ -264,9 +264,14 @@ const ProjectList = () => {
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{listView ? (
|
{listView ? (
|
||||||
|
currentItems.length === 0 ? (
|
||||||
|
<div className="text-center text-muted mt-4">
|
||||||
|
No projects found.
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
<div className="card cursor-pointer">
|
<div className="card cursor-pointer">
|
||||||
<div className="card-body p-2">
|
<div className="card-body p-2">
|
||||||
<div className="table-responsive text-nowrap py-2 " style={{minHeight:"400px"}}>
|
<div className="table-responsive text-nowrap py-2 ">
|
||||||
<table className="table m-3">
|
<table className="table m-3">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@ -293,10 +298,6 @@ const ProjectList = () => {
|
|||||||
id: "b74da4c2-d07e-46f2-9919-e75e49b12731",
|
id: "b74da4c2-d07e-46f2-9919-e75e49b12731",
|
||||||
label: "Active",
|
label: "Active",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
id: "cdad86aa-8a56-4ff4-b633-9c629057dfef",
|
|
||||||
label:"In Progress"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
id: "603e994b-a27f-4e5d-a251-f3d69b0498ba",
|
id: "603e994b-a27f-4e5d-a251-f3d69b0498ba",
|
||||||
label: "On Hold",
|
label: "On Hold",
|
||||||
@ -318,9 +319,7 @@ const ProjectList = () => {
|
|||||||
checked={selectedStatuses.includes(id)}
|
checked={selectedStatuses.includes(id)}
|
||||||
onChange={() => handleStatusChange(id)}
|
onChange={() => handleStatusChange(id)}
|
||||||
/>
|
/>
|
||||||
<label className="form-check-label">
|
<label className="form-check-label">{label}</label>
|
||||||
{label}
|
|
||||||
</label>
|
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
))}
|
))}
|
||||||
@ -328,8 +327,7 @@ const ProjectList = () => {
|
|||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
<th
|
<th
|
||||||
className={`mx-2 ${
|
className={`mx-2 ${HasManageProject ? "d-sm-table-cell" : "d-none"
|
||||||
HasManageProject ? "d-sm-table-cell" : "d-none"
|
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
Action
|
Action
|
||||||
@ -337,26 +335,19 @@ const ProjectList = () => {
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody className="table-border-bottom-0 overflow-auto">
|
<tbody className="table-border-bottom-0 overflow-auto">
|
||||||
{currentItems.length === 0 ? (
|
{currentItems.map((project) => (
|
||||||
<tr className="text-center">
|
|
||||||
<td colSpan="12" rowSpan='12'style={{height:"200px"}} >
|
|
||||||
No projects found
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
) : (
|
|
||||||
currentItems.map((project) => (
|
|
||||||
<ProjectListView
|
<ProjectListView
|
||||||
key={project.id}
|
key={project.id}
|
||||||
projectData={project}
|
projectData={project}
|
||||||
recall={sortingProject}
|
recall={sortingProject}
|
||||||
/>
|
/>
|
||||||
))
|
))}
|
||||||
)}
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>{" "}
|
|
||||||
</div>{" "}
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
) : (
|
) : (
|
||||||
<div className="row">
|
<div className="row">
|
||||||
{currentItems.map((project) => (
|
{currentItems.map((project) => (
|
||||||
@ -369,6 +360,7 @@ const ProjectList = () => {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
||||||
{!loading && totalPages > 1 && (
|
{!loading && totalPages > 1 && (
|
||||||
<nav>
|
<nav>
|
||||||
<ul className="pagination pagination-sm justify-content-end py-2">
|
<ul className="pagination pagination-sm justify-content-end py-2">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user