Adding Message for Card and list view in Services and Infra
This commit is contained in:
parent
3ffc7a4ee2
commit
ad2cfaabb6
@ -8,7 +8,12 @@ const ProjectCardView = ({ data, currentPage, totalPages, paginate }) => {
|
||||
return (
|
||||
<div className="row page-min-h">
|
||||
{data?.length === 0 && (
|
||||
<p className="text-center text-muted">No projects found.</p>
|
||||
<div
|
||||
className="col-12 d-flex justify-content-center align-items-center"
|
||||
style={{ minHeight: "250px" }}
|
||||
>
|
||||
<p className="text-center text-muted m-0">No Infra projects found.</p>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{data?.map((project) => (
|
||||
|
||||
@ -143,7 +143,8 @@ const ProjectListView = ({ data, currentPage, totalPages, paginate }) => {
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{data?.map((project) => (
|
||||
{data?.length > 0 ? (
|
||||
data?.map((project) => (
|
||||
<tr key={project.id}>
|
||||
{projectColumns.map((col) => (
|
||||
<td
|
||||
@ -158,8 +159,7 @@ const ProjectListView = ({ data, currentPage, totalPages, paginate }) => {
|
||||
</td>
|
||||
))}
|
||||
<td
|
||||
className={`mx-2 ${
|
||||
canManageProject ? "d-sm-table-cell" : "d-none"
|
||||
className={`mx-2 ${canManageProject ? "d-sm-table-cell" : "d-none"
|
||||
}`}
|
||||
>
|
||||
<div className="dropdown z-2">
|
||||
@ -213,7 +213,24 @@ const ProjectListView = ({ data, currentPage, totalPages, paginate }) => {
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
))
|
||||
) : (
|
||||
<tr
|
||||
className="no-hover"
|
||||
style={{
|
||||
pointerEvents: "none",
|
||||
backgroundColor: "transparent",
|
||||
}}
|
||||
>
|
||||
<td
|
||||
colSpan={projectColumns.length + 1}
|
||||
className="text-center align-middle"
|
||||
style={{ height: "300px", borderBottom: "none" }}
|
||||
>
|
||||
No Infra projects available
|
||||
</td>
|
||||
</tr>
|
||||
)}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@ -105,7 +105,8 @@ const ServiceProjectList = ({ data, currentPage, totalPages, paginate, isCore =
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{data?.map((project) => (
|
||||
{data?.length > 0 ? (
|
||||
data.map((project) => (
|
||||
<tr key={project.id}>
|
||||
{projectColumns.map((col) => (
|
||||
<td
|
||||
@ -114,14 +115,11 @@ const ServiceProjectList = ({ data, currentPage, totalPages, paginate, isCore =
|
||||
className={`${col.className} py-5`}
|
||||
style={{ paddingTop: "20px", paddingBottom: "20px" }}
|
||||
>
|
||||
{col.getValue
|
||||
? col.getValue(project)
|
||||
: project[col.key] || "N/A"}
|
||||
{col.getValue ? col.getValue(project) : project[col.key] || "N/A"}
|
||||
</td>
|
||||
))}
|
||||
<td
|
||||
className={`mx-2 ${canManageProject ? "d-sm-table-cell" : "d-none"
|
||||
}`}
|
||||
className={`mx-2 ${canManageProject ? "d-sm-table-cell" : "d-none"}`}
|
||||
>
|
||||
<div className="dropdown z-2">
|
||||
<button
|
||||
@ -145,15 +143,15 @@ const ServiceProjectList = ({ data, currentPage, totalPages, paginate, isCore =
|
||||
aria-label="click to View details"
|
||||
className="dropdown-item"
|
||||
onClick={() => handleViewProject(project)}
|
||||
|
||||
>
|
||||
<i className="bx bx-detail me-2"></i>
|
||||
<span className="align-left">View details</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a className="dropdown-item" onClick={() => handleManage(project)}
|
||||
<a
|
||||
className="dropdown-item"
|
||||
onClick={() => handleManage(project)}
|
||||
>
|
||||
<i className="bx bx-pencil me-2"></i>
|
||||
<span className="align-left">Modify</span>
|
||||
@ -163,8 +161,26 @@ const ServiceProjectList = ({ data, currentPage, totalPages, paginate, isCore =
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
))
|
||||
) : (
|
||||
<tr
|
||||
className="no-hover"
|
||||
style={{
|
||||
pointerEvents: "none",
|
||||
backgroundColor: "transparent",
|
||||
}}
|
||||
>
|
||||
<td
|
||||
colSpan={projectColumns.length + 1}
|
||||
className="text-center align-middle"
|
||||
style={{ height: "300px", borderBottom: "none" }}
|
||||
>
|
||||
No Service projects available
|
||||
</td>
|
||||
</tr>
|
||||
)}
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user