Navigate to "Projects" Page Should Display Only Message When No Projects Are Assigned.
This commit is contained in:
parent
b1c0773c33
commit
f7e66ce28f
@ -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" style={{ minHeight: "200px" }}>
|
<div className="card-body p-2">
|
||||||
<div className="table-responsive text-nowrap py-2">
|
<div className="table-responsive text-nowrap py-2 ">
|
||||||
<table className="table m-3">
|
<table className="table m-3">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@ -322,47 +327,28 @@ 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
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody className="table-border-bottom-0" style={{ height: "200px" }}>
|
<tbody className="table-border-bottom-0 overflow-auto">
|
||||||
{currentItems.length === 0 ? (
|
{currentItems.map((project) => (
|
||||||
<tr>
|
|
||||||
<td
|
|
||||||
colSpan="12"
|
|
||||||
className="text-center"
|
|
||||||
style={{
|
|
||||||
verticalAlign: "middle",
|
|
||||||
height: "200px",
|
|
||||||
paddingTop: 0,
|
|
||||||
paddingBottom: 0,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<div className="d-flex flex-column justify-content-center align-items-center h-100">
|
|
||||||
<p className="mb-0">No projects found</p>
|
|
||||||
</div>
|
|
||||||
</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) => (
|
||||||
<ProjectCard
|
<ProjectCard
|
||||||
@ -372,7 +358,8 @@ const ProjectList = () => {
|
|||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
||||||
{!loading && totalPages > 1 && (
|
{!loading && totalPages > 1 && (
|
||||||
<nav>
|
<nav>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user