diff --git a/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FormulaConfiguration.js b/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FormulaConfiguration.js index 315fb66d361..8850c3032d8 100644 --- a/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FormulaConfiguration.js +++ b/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FormulaConfiguration.js @@ -380,7 +380,7 @@ const FormulaConfiguration = ({ onSelect, category, customProps, formulas: initi className="custom-assumption-checkbox" //key={field.key} mainClassName={"checkboxOptionVariant"} - label={t("Show on Estimation Dashboard")} + label={t("SHOW_ON_ESTIMATION_DASHBOARD")} checked={formula.showOnEstimationDashboard ? true : false} onChange={(event) => handleFormulaChange(formula.output, "showOnEstimationDashboard", { code: !formula.showOnEstimationDashboard }, category) diff --git a/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/UserAccess.js b/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/UserAccess.js index 2da47e08392..56cfc96590b 100644 --- a/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/UserAccess.js +++ b/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/UserAccess.js @@ -59,7 +59,7 @@ function UserAccess({ category, setData, nationalRoles }) { } = Digit.Hooks.microplanv1.usePlanSearchEmployeeWithTagging({ tenantId: tenantId, limit: rowsPerPage, - offset: (currentPage - 1) * 5, + offset: (currentPage - 1) * rowsPerPage, names: searchQuery, body: { PlanEmployeeAssignmentSearchCriteria: { diff --git a/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/UserAccessMgmtTableWrapper.js b/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/UserAccessMgmtTableWrapper.js index d57d683a7d0..72e45ee9b3f 100644 --- a/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/UserAccessMgmtTableWrapper.js +++ b/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/UserAccessMgmtTableWrapper.js @@ -38,7 +38,7 @@ const UserAccessMgmtTableWrapper = ({ role, internalKey, setupCompleted }) => { const { t } = useTranslation(); const tenantId = Digit.ULBService.getCurrentTenantId(); const [currentPage, setCurrentPage] = useState(1); - const [rowsPerPage] = useState(5); + const [rowsPerPage,setRowsPerPage] = useState(5); const [totalRows, setTotalRows] = useState(0); const [showPopUp, setShowPopUp] = useState(false); const [chipPopUpRowId, setChipPopUpRowId] = useState(null); @@ -48,15 +48,17 @@ const UserAccessMgmtTableWrapper = ({ role, internalKey, setupCompleted }) => { const { isLoading, data: planAssignmentData, refetch: refetchPlanSearch } = Digit.Hooks.microplanv1.usePlanSearchEmployeeWithTagging({ tenantId: tenantId, + limit: rowsPerPage, + offset: (currentPage - 1) * rowsPerPage, body: { "PlanEmployeeAssignmentSearchCriteria": { tenantId: tenantId, planConfigurationId: microplanId, //Eg. "653441d7-a2ec-4196-b978-e2619d9e0848" - role: [role] + role: [role], + config:{queryKey:`${microplanId} ${role} ${currentPage}`} }, }, - limit: rowsPerPage, - offset: (currentPage - 1) * 5, + config: { select: (data) => { return { @@ -171,6 +173,13 @@ const UserAccessMgmtTableWrapper = ({ role, internalKey, setupCompleted }) => { const handlePaginationChange = (page) => { setCurrentPage(page); + + }; + + const handleRowsPerPageChange = (newPerPage, page) => { + setRowsPerPage(newPerPage); // Update the rows per page state + setCurrentPage(page); // Optionally reset the current page or maintain it + }; if (isLoading) return ; @@ -218,6 +227,7 @@ const UserAccessMgmtTableWrapper = ({ role, internalKey, setupCompleted }) => { onChangePage={handlePaginationChange} paginationPerPage={rowsPerPage} paginationRowsPerPageOptions={[5, 10, 15, 20]} + onChangeRowsPerPage={handleRowsPerPageChange} /> {/* */} diff --git a/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/hooks/services/searchPlanEmployeeWithTaggingConfig.js b/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/hooks/services/searchPlanEmployeeWithTaggingConfig.js index 2ae96508968..5a142691f58 100644 --- a/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/hooks/services/searchPlanEmployeeWithTaggingConfig.js +++ b/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/hooks/services/searchPlanEmployeeWithTaggingConfig.js @@ -6,12 +6,12 @@ const searchPlanEmployeeWithTaggingConfig = async ({ tenantId, body, limit, offs method: "POST", userService: false, params: { - tenantId: tenantId, - limit: limit, - offset: offset, - sortOrder: sortOrder, + + // sortOrder: sortOrder, }, - body: body, + body:{ + PlanEmployeeAssignmentSearchCriteria:{...body.PlanEmployeeAssignmentSearchCriteria,limit,offset,tenantId} + } }); if (!response) { throw new Error("Employee not found with the given role"); @@ -27,8 +27,6 @@ const searchPlanEmployeeWithTaggingConfig = async ({ tenantId, body, limit, offs userService: false, params: { tenantId: tenantId, - limit: limit, - offset: offset, sortOrder: sortOrder, userServiceUuids: uuids.join(","), names: names diff --git a/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/SummaryScreen.js b/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/SummaryScreen.js index b7e732a437b..04e0ea6538e 100644 --- a/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/SummaryScreen.js +++ b/health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/SummaryScreen.js @@ -31,7 +31,7 @@ const SummaryScreen = ({ props: customProps }) => { sections: [ { type: "DATA", - cardHeader: { value: t("CAMPAIGN_DETAILS"), inlineStyles: { marginTop: 0, fontSize: "1.5rem" } }, + cardHeader: { value: t("CAMPAIGN_DETAILS"), inlineStyles: { marginTop: 0, fontSize: "2rem" } }, values: [ { key: t("CAMPAIGN_TYPE"),