UI updation in Attendance Toady's and Regularization tab.
This commit is contained in:
parent
765b4356a6
commit
a9d1ba08dd
@ -113,6 +113,7 @@ const Attendance = ({ getRole, handleModalData, searchTerm, projectId, organizat
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
<div>
|
||||||
<div
|
<div
|
||||||
className="table-responsive text-nowrap h-100"
|
className="table-responsive text-nowrap h-100"
|
||||||
style={{ minHeight: "200px" }} // Ensures fixed height
|
style={{ minHeight: "200px" }} // Ensures fixed height
|
||||||
@ -228,14 +229,7 @@ const Attendance = ({ getRole, handleModalData, searchTerm, projectId, organizat
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
{!loading && finalFilteredData.length > ITEMS_PER_PAGE && (
|
|
||||||
|
|
||||||
<Pagination
|
|
||||||
currentPage={currentPage}
|
|
||||||
totalPages={totalPages}
|
|
||||||
onPageChange={paginate}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<div
|
<div
|
||||||
@ -250,6 +244,14 @@ const Attendance = ({ getRole, handleModalData, searchTerm, projectId, organizat
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
{!loading && finalFilteredData.length > ITEMS_PER_PAGE && (
|
||||||
|
<Pagination
|
||||||
|
currentPage={currentPage}
|
||||||
|
totalPages={totalPages}
|
||||||
|
onPageChange={paginate}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -22,7 +22,7 @@ const Regularization = ({ handleRequest, searchTerm, projectId, organizationId,
|
|||||||
const { regularizes, loading, error, refetch } =
|
const { regularizes, loading, error, refetch } =
|
||||||
useRegularizationRequests(selectedProject, organizationId, IncludeInActive);
|
useRegularizationRequests(selectedProject, organizationId, IncludeInActive);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (regularizes && regularizes.length) {
|
if (regularizes && regularizes.length) {
|
||||||
setregularizedList((prev) => {
|
setregularizedList((prev) => {
|
||||||
const prevIds = prev.map((i) => i.id).join(",");
|
const prevIds = prev.map((i) => i.id).join(",");
|
||||||
@ -33,7 +33,7 @@ useEffect(() => {
|
|||||||
return prev;
|
return prev;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, [regularizes]);
|
}, [regularizes]);
|
||||||
|
|
||||||
|
|
||||||
const sortByName = (a, b) => {
|
const sortByName = (a, b) => {
|
||||||
@ -132,6 +132,7 @@ useEffect(() => {
|
|||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<div>
|
||||||
<div className="table-responsive text-nowrap pb-4" style={{ minHeight: "200px" }}>
|
<div className="table-responsive text-nowrap pb-4" style={{ minHeight: "200px" }}>
|
||||||
{loading ? (
|
{loading ? (
|
||||||
<div className="d-flex justify-content-center align-items-center" style={{ height: "200px" }}>
|
<div className="d-flex justify-content-center align-items-center" style={{ height: "200px" }}>
|
||||||
@ -227,6 +228,7 @@ useEffect(() => {
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
</div>
|
||||||
{!loading && totalPages > 1 && (
|
{!loading && totalPages > 1 && (
|
||||||
<Pagination
|
<Pagination
|
||||||
currentPage={currentPage}
|
currentPage={currentPage}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user