Changes in Employee list at pagination and at mobile view then scrollbar is shown.

This commit is contained in:
Kartik Sharma 2025-10-14 14:51:57 +05:30 committed by pramod.mahajan
parent 20b508bebc
commit dc4e48ad3b
4 changed files with 129 additions and 130 deletions

View File

@ -29,7 +29,7 @@ const TaskReportList = () => {
const ApprovedTaskRights = useHasUserPermission(APPROVE_TASK); const ApprovedTaskRights = useHasUserPermission(APPROVE_TASK);
const ReportTaskRights = useHasUserPermission(ASSIGN_REPORT_TASK); const ReportTaskRights = useHasUserPermission(ASSIGN_REPORT_TASK);
const { service, openModal, closeModal,filter } = useDailyProgrssContext(); const { service, openModal, closeModal, filter } = useDailyProgrssContext();
const selectedProject = useSelectedProject(); const selectedProject = useSelectedProject();
const { projectNames } = useProjectName(); const { projectNames } = useProjectName();
@ -37,7 +37,7 @@ const TaskReportList = () => {
selectedProject, selectedProject,
ITEMS_PER_PAGE, ITEMS_PER_PAGE,
currentPage, currentPage,
service,filter service, filter
); );
const ProgrssReportColumn = [ const ProgrssReportColumn = [
@ -192,6 +192,7 @@ const TaskReportList = () => {
if (isLoading) return <TaskReportListSkeleton />; if (isLoading) return <TaskReportListSkeleton />;
if (isError) return <div>Loading....</div>; if (isError) return <div>Loading....</div>;
return ( return (
<div>
<div className="mt-2 table-responsive text-nowrap"> <div className="mt-2 table-responsive text-nowrap">
<table className="table"> <table className="table">
<thead> <thead>
@ -287,14 +288,18 @@ const TaskReportList = () => {
))} ))}
</tbody> </tbody>
</table> </table>
{data?.data?.length > 0 && (
</div>
{
data?.data?.length > 0 && (
<Pagination <Pagination
currentPage={currentPage} currentPage={currentPage}
totalPages={data.totalPages} totalPages={data.totalPages}
onPageChange={paginate} onPageChange={paginate}
/> />
)} )
</div> }
</div >
); );
}; };

View File

@ -160,8 +160,7 @@ const ListViewContact = ({ data, Pagination }) => {
</div> </div>
) : ( ) : (
<i <i
className={`bx ${ className={`bx ${isPending && activeContact === row.id
isPending && activeContact === row.id
? "bx-loader-alt bx-spin" ? "bx-loader-alt bx-spin"
: "bx-recycle" : "bx-recycle"
} me-1 text-primary cursor-pointer`} } me-1 text-primary cursor-pointer`}
@ -188,14 +187,14 @@ const ListViewContact = ({ data, Pagination }) => {
)} )}
</tbody> </tbody>
</table> </table>
</div>
</div>
{Pagination && ( {Pagination && (
<div className="d-flex justify-content-start"> <div className="d-flex justify-content-start">
{Pagination} {Pagination}
</div> </div>
)} )}
</div> </div>
</div>
</div>
</> </>
); );
}; };

View File

@ -67,8 +67,7 @@ const ExpenseList = ({ filters, groupBy = "transactionDate", searchText }) => {
key = item.status?.displayName || "Unknown"; key = item.status?.displayName || "Unknown";
break; break;
case "submittedBy": case "submittedBy":
key = `${item.createdBy?.firstName ?? ""} ${ key = `${item.createdBy?.firstName ?? ""} ${item.createdBy?.lastName ?? ""
item.createdBy?.lastName ?? ""
}`.trim(); }`.trim();
break; break;
case "project": case "project":
@ -110,8 +109,7 @@ const ExpenseList = ({ filters, groupBy = "transactionDate", searchText }) => {
label: "Submitted By", label: "Submitted By",
align: "text-start", align: "text-start",
getValue: (e) => getValue: (e) =>
`${e.createdBy?.firstName ?? ""} ${ `${e.createdBy?.firstName ?? ""} ${e.createdBy?.lastName ?? ""
e.createdBy?.lastName ?? ""
}`.trim() || "N/A", }`.trim() || "N/A",
customRender: (e) => ( customRender: (e) => (
<div className="d-flex align-items-center"> <div className="d-flex align-items-center">
@ -122,8 +120,7 @@ const ExpenseList = ({ filters, groupBy = "transactionDate", searchText }) => {
lastName={e.createdBy?.lastName} lastName={e.createdBy?.lastName}
/> />
<span className="text-truncate"> <span className="text-truncate">
{`${e.createdBy?.firstName ?? ""} ${ {`${e.createdBy?.firstName ?? ""} ${e.createdBy?.lastName ?? ""
e.createdBy?.lastName ?? ""
}`.trim() || "N/A"} }`.trim() || "N/A"}
</span> </span>
</div> </div>
@ -152,8 +149,7 @@ const ExpenseList = ({ filters, groupBy = "transactionDate", searchText }) => {
align: "text-center", align: "text-center",
getValue: (e) => ( getValue: (e) => (
<span <span
className={`badge bg-label-${ className={`badge bg-label-${getColorNameFromHex(e?.status?.color) || "secondary"
getColorNameFromHex(e?.status?.color) || "secondary"
}`} }`}
> >
{e.status?.name || "Unknown"} {e.status?.name || "Unknown"}
@ -299,6 +295,8 @@ const ExpenseList = ({ filters, groupBy = "transactionDate", searchText }) => {
)} )}
</tbody> </tbody>
</table> </table>
</div>
</div>
{data?.data?.length > 0 && ( {data?.data?.length > 0 && (
<Pagination <Pagination
currentPage={currentPage} currentPage={currentPage}
@ -307,8 +305,6 @@ const ExpenseList = ({ filters, groupBy = "transactionDate", searchText }) => {
/> />
)} )}
</div> </div>
</div>
</div>
</> </>
); );
}; };

View File

@ -650,7 +650,8 @@ const EmployeeList = () => {
))} ))}
</tbody> </tbody>
</table> </table>
</div>
</div>
{displayData?.length > 0 && ( {displayData?.length > 0 && (
<Pagination <Pagination
currentPage={currentPage} currentPage={currentPage}
@ -659,8 +660,6 @@ const EmployeeList = () => {
/> />
)} )}
</div> </div>
</div>
</div>
) : ( ) : (
<div className="card"> <div className="card">
<div className="text-center"> <div className="text-center">