Changes in Attendance page.

This commit is contained in:
Kartik Sharma 2025-10-14 14:32:45 +05:30 committed by pramod.mahajan
parent 073897156e
commit 05c01d1d34
3 changed files with 66 additions and 107 deletions

View File

@ -223,8 +223,20 @@ const Attendance = ({ getRole, handleModalData, searchTerm, projectId, organizat
)}
</tbody>
</table>
</>
) : (
<div
className="d-flex justify-content-center align-items-center text-muted"
style={{ height: "200px" }}
>
{searchTerm
? "No results found for your search."
: attendanceList.length === 0
? "No employees assigned to the project."
: "No pending records available."}
</div>
)}
</div>
{!loading && finalFilteredData.length > ITEMS_PER_PAGE && (
<nav aria-label="Page ">
<ul className="pagination pagination-sm justify-content-end py-1">
@ -268,20 +280,6 @@ const Attendance = ({ getRole, handleModalData, searchTerm, projectId, organizat
</nav>
)}
</>
) : (
<div
className="d-flex justify-content-center align-items-center text-muted"
style={{ height: "200px" }}
>
{searchTerm
? "No results found for your search."
: attendanceList.length === 0
? "No employees assigned to the project."
: "No pending records available."}
</div>
)}
</div>
</>
);
};

View File

@ -172,15 +172,15 @@ const AttendanceLog = ({ handleModalData, searchTerm, organizationId }) => {
return (
<>
<div
className="dataTables_length text-start py-2 d-flex justify-content-between "
className="dataTables_length text-start py-2 d-flex flex-wrap justify-content-between"
id="DataTables_Table_0_length"
>
<div className="d-flex align-items-center my-0 ">
<div className="d-flex flex-wrap align-items-center my-0 gap-2">
<DateRangePicker
onRangeChange={setDateRange}
defaultStartDate={yesterday}
/>
<div className="form-check form-switch text-start ms-1 ms-md-2 align-items-center mb-0">
<div className="form-check form-switch text-start d-flex align-items-center mb-0">
<input
type="checkbox"
className="form-check-input"
@ -190,10 +190,11 @@ const AttendanceLog = ({ handleModalData, searchTerm, organizationId }) => {
checked={showPending}
onChange={(e) => setShowPending(e.target.checked)}
/>
<label className="form-check-label ms-0">Pending Attendance</label>
<label className="form-check-label ms-2 mb-0">Pending Attendance</label>
</div>
</div>
</div>
<div
className="table-responsive text-nowrap"
style={{ minHeight: "200px" }}

View File

@ -197,46 +197,6 @@ const Regularization = ({
</span>
</div>
)}
{/* {!loading && totalPages > 1 && (
<nav aria-label="Page ">
<ul className="pagination pagination-sm justify-content-end py-1 mt-3">
<li className={`page-item ${currentPage === 1 ? "disabled" : ""}`}>
<button
className="page-link btn-xs"
onClick={() => paginate(currentPage - 1)}
>
&laquo;
</button>
</li>
{[...Array(totalPages)].map((_, index) => (
<li
key={index}
className={`page-item ${currentPage === index + 1 ? "active" : ""
}`}
>
<button
className="page-link "
onClick={() => paginate(index + 1)}
>
{index + 1}
</button>
</li>
))}
<li
className={`page-item ${currentPage === totalPages ? "disabled" : ""
}`}
>
<button
className="page-link "
onClick={() => paginate(currentPage + 1)}
>
&raquo;
</button>
</li>
</ul>
</nav>
)} */}
{totalPages > 0 && (
<Pagination
currentPage={currentPage}