@argusoft/medplat-form-engine 1.0.14 → 1.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AccessRights-BMRM1u9S-D1Gc0rKI.js +1228 -0
- package/dist/AccessRights-BMRM1u9S-D1Gc0rKI.js.map +1 -0
- package/dist/AddEditQueryBuilder-7JRplV5J-DHgS6TYG.js +313 -0
- package/dist/AddEditQueryBuilder-7JRplV5J-DHgS6TYG.js.map +1 -0
- package/dist/AddEditQueryBuilder-7JRplV5J.css +1 -0
- package/dist/AddFeatures-CkTu7sOI-BGplSFp6.js +212 -0
- package/dist/AddFeatures-CkTu7sOI-BGplSFp6.js.map +1 -0
- package/dist/AddLabelModal-DE3ploGD-OOyaGC02.js +734 -0
- package/dist/AddLabelModal-DE3ploGD-OOyaGC02.js.map +1 -0
- package/dist/AddMenuConfiguration-QWfpcnuP-TAM2c68S.js +5389 -0
- package/dist/AddMenuConfiguration-QWfpcnuP-TAM2c68S.js.map +1 -0
- package/dist/AddMenuConfiguration-QWfpcnuP.css +1 -0
- package/dist/AddRoleDrawer-ZK1eejxI-BM6rfhh5.js +453 -0
- package/dist/AddRoleDrawer-ZK1eejxI-BM6rfhh5.js.map +1 -0
- package/dist/AppModal-BgZyfrd--BO3wW4ma.js +428 -0
- package/dist/AppModal-BgZyfrd--BO3wW4ma.js.map +1 -0
- package/dist/ChangePasswordModalCore-DIe4rzW--CSDVIGsb.js +176 -0
- package/dist/ChangePasswordModalCore-DIe4rzW--CSDVIGsb.js.map +1 -0
- package/dist/ConditionConfig-GDCXIg3C-DuEy85LD.js +395 -0
- package/dist/ConditionConfig-GDCXIg3C-DuEy85LD.js.map +1 -0
- package/dist/ConditionConfig-GDCXIg3C.css +1 -0
- package/dist/EntityManagement-D-x6Qzal-BE01iKNR.js +50 -0
- package/dist/EntityManagement-D-x6Qzal-BE01iKNR.js.map +1 -0
- package/dist/EventConfigurations-jGCJ4LqP-CJBCGp6J.js +384 -0
- package/dist/EventConfigurations-jGCJ4LqP-CJBCGp6J.js.map +1 -0
- package/dist/EventConfigurations-jGCJ4LqP.css +1 -0
- package/dist/EventsExceptionModal-BF6E1Np7-DHT7pQsx.js +200 -0
- package/dist/EventsExceptionModal-BF6E1Np7-DHT7pQsx.js.map +1 -0
- package/dist/EventsSkeleton-BN7_0IGs-BAnd1Vug.js +74 -0
- package/dist/EventsSkeleton-BN7_0IGs-BAnd1Vug.js.map +1 -0
- package/dist/FeatureMenu-Ds6lFg4w-ShGx4okQ.js +249 -0
- package/dist/FeatureMenu-Ds6lFg4w-ShGx4okQ.js.map +1 -0
- package/dist/Features-Cshdl06N-CZ02Tt89.js +12 -0
- package/dist/Features-Cshdl06N-CZ02Tt89.js.map +1 -0
- package/dist/FileSaver.min-CN9EpL2h-N-3OFAd7.js +77 -0
- package/dist/FileSaver.min-CN9EpL2h-N-3OFAd7.js.map +1 -0
- package/dist/FlywayQuery-Cx2sly6g-DdhUw6bN.js +169 -0
- package/dist/FlywayQuery-Cx2sly6g-DdhUw6bN.js.map +1 -0
- package/dist/ImmunizationConfigurationBase-DZ8EqXlF-B2XcYTYJ.js +5162 -0
- package/dist/ImmunizationConfigurationBase-DZ8EqXlF-B2XcYTYJ.js.map +1 -0
- package/dist/ImmunizationConfigurationBase-DZ8EqXlF.css +1 -0
- package/dist/ImmunizationConfigurationsList-CQnxWa09-Bbr0iyGy.js +335 -0
- package/dist/ImmunizationConfigurationsList-CQnxWa09-Bbr0iyGy.js.map +1 -0
- package/dist/ImmunizationSkeleton-D2tdv5k--B7SY-gnr.js +186 -0
- package/dist/ImmunizationSkeleton-D2tdv5k--B7SY-gnr.js.map +1 -0
- package/dist/LanguagesModal-rk6IGQwY-B0Jtpivu.js +394 -0
- package/dist/LanguagesModal-rk6IGQwY-B0Jtpivu.js.map +1 -0
- package/dist/ManageDynamicFeature-C2I7Ho7i-Bbxkpw0S.js +4189 -0
- package/dist/ManageDynamicFeature-C2I7Ho7i-Bbxkpw0S.js.map +1 -0
- package/dist/ManageEventConfiguration-BJxS2Su0-CRATBMym.js +1017 -0
- package/dist/ManageEventConfiguration-BJxS2Su0-CRATBMym.js.map +1 -0
- package/dist/ManageEventConfiguration-BJxS2Su0.css +1 -0
- package/dist/ManageNotification-DMN2szWy-DQvdrfwC.js +6819 -0
- package/dist/ManageNotification-DMN2szWy-DQvdrfwC.js.map +1 -0
- package/dist/ManageRole-CuXmWQyp-Cy15Mlax.js +728 -0
- package/dist/ManageRole-CuXmWQyp-Cy15Mlax.js.map +1 -0
- package/dist/ManageTranslation-BTxvSYKb-CdO4Fk7f.js +616 -0
- package/dist/ManageTranslation-BTxvSYKb-CdO4Fk7f.js.map +1 -0
- package/dist/ManageTranslation-BTxvSYKb.css +1 -0
- package/dist/ManageUser-Dr3ptCYp-CJBp0yVr.js +2179 -0
- package/dist/ManageUser-Dr3ptCYp-CJBp0yVr.js.map +1 -0
- package/dist/ManageUser-Dr3ptCYp.css +1 -0
- package/dist/MedplatFormWrapper-SwW0rdxN.js +52363 -0
- package/dist/MedplatFormWrapper-SwW0rdxN.js.map +1 -0
- package/dist/MedplatFormWrapper.css +1 -0
- package/dist/MobileMenuManagement-BmrO-7MN-xFkU87j6.js +111 -0
- package/dist/MobileMenuManagement-BmrO-7MN-xFkU87j6.js.map +1 -0
- package/dist/MobileTypeEventConfigModal-ChhO_A4f-DfJDqFB9.js +783 -0
- package/dist/MobileTypeEventConfigModal-ChhO_A4f-DfJDqFB9.js.map +1 -0
- package/dist/NewServerManagement-5YcAtF-g-DHV6PFTR.js +1002 -0
- package/dist/NewServerManagement-5YcAtF-g-DHV6PFTR.js.map +1 -0
- package/dist/NotificationFlywayQuery-BY8Zzml_-C7G-28dx.js +244 -0
- package/dist/NotificationFlywayQuery-BY8Zzml_-C7G-28dx.js.map +1 -0
- package/dist/NotificationList-BqibwMaM-D4mMbj4h.js +400 -0
- package/dist/NotificationList-BqibwMaM-D4mMbj4h.js.map +1 -0
- package/dist/OtherTypeEventConfigModal-ZnCGWm9v-D7x0QObl.js +1953 -0
- package/dist/OtherTypeEventConfigModal-ZnCGWm9v-D7x0QObl.js.map +1 -0
- package/dist/QueryBuilder-BPfavHH9-M3wgeHB3.js +378 -0
- package/dist/QueryBuilder-BPfavHH9-M3wgeHB3.js.map +1 -0
- package/dist/QueryBuilder-BPfavHH9.css +1 -0
- package/dist/QueryManagement-DXA73N2j-De9XnBKC.js +671 -0
- package/dist/QueryManagement-DXA73N2j-De9XnBKC.js.map +1 -0
- package/dist/QueryManagement-DXA73N2j.css +1 -0
- package/dist/RoleManagement-C0feJCuq-DIGwGqOD.js +410 -0
- package/dist/RoleManagement-C0feJCuq-DIGwGqOD.js.map +1 -0
- package/dist/SecurityAuditLogList-DHTcOtbx-BSjPID73.js +746 -0
- package/dist/SecurityAuditLogList-DHTcOtbx-BSjPID73.js.map +1 -0
- package/dist/ServerSyncModal-D_oFpv3C-C6c3_3lx.js +836 -0
- package/dist/ServerSyncModal-D_oFpv3C-C6c3_3lx.js.map +1 -0
- package/dist/ShowFlywayQuery-BkyA6QaA-2t9pZjcx.js +130 -0
- package/dist/ShowFlywayQuery-BkyA6QaA-2t9pZjcx.js.map +1 -0
- package/dist/ShowFlywayQuery-DVRCd384-BypXcNWX.js +259 -0
- package/dist/ShowFlywayQuery-DVRCd384-BypXcNWX.js.map +1 -0
- package/dist/ShowQueryHistory-BDN0tzHg-17BxK88Z.js +190 -0
- package/dist/ShowQueryHistory-BDN0tzHg-17BxK88Z.js.map +1 -0
- package/dist/SubMenu-DAfZC9Xi-B0BQYLdI.js +188 -0
- package/dist/SubMenu-DAfZC9Xi-B0BQYLdI.js.map +1 -0
- package/dist/TableDetails-DzREeJkm-B-WEBbQz.js +1508 -0
- package/dist/TableDetails-DzREeJkm-B-WEBbQz.js.map +1 -0
- package/dist/TableList-B9hr05Hs-BIsMbnIV.js +428 -0
- package/dist/TableList-B9hr05Hs-BIsMbnIV.js.map +1 -0
- package/dist/TypeConfiguration-C-lk8Szs-DkvHWHhr.js +117 -0
- package/dist/TypeConfiguration-C-lk8Szs-DkvHWHhr.js.map +1 -0
- package/dist/UserList-S5Q76wO7-Cj5u_K4_.js +1104 -0
- package/dist/UserList-S5Q76wO7-Cj5u_K4_.js.map +1 -0
- package/dist/UserList-S5Q76wO7.css +1 -0
- package/dist/UserListSkeleton-cglK2SaU-B_Tj5gUp.js +184 -0
- package/dist/UserListSkeleton-cglK2SaU-B_Tj5gUp.js.map +1 -0
- package/dist/WidgetList-BSApErov-Z61Kpq4T.js +188 -0
- package/dist/WidgetList-BSApErov-Z61Kpq4T.js.map +1 -0
- package/dist/_commonjsHelpers-B4e78b8K-B9tZyK9c.js +29 -0
- package/dist/_commonjsHelpers-B4e78b8K-B9tZyK9c.js.map +1 -0
- package/dist/dayjs.min-BiUMMz0V.js +285 -0
- package/dist/dayjs.min-BiUMMz0V.js.map +1 -0
- package/dist/default-B6sHblIG.js +11341 -0
- package/dist/default-B6sHblIG.js.map +1 -0
- package/dist/default.css +1 -0
- package/dist/i18next-CTOWN_jH-BKKbdDel.js +1389 -0
- package/dist/i18next-CTOWN_jH-BKKbdDel.js.map +1 -0
- package/dist/index-B4r0wjBD.js +563 -0
- package/dist/index-B4r0wjBD.js.map +1 -0
- package/dist/index-BFznsakV-BsOSEQZI.js +42638 -0
- package/dist/index-BFznsakV-BsOSEQZI.js.map +1 -0
- package/dist/index-DNrIMQFT.js +567 -0
- package/dist/index-DNrIMQFT.js.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.js +3 -52390
- package/dist/index.js.map +1 -1
- package/dist/manageImmunization-B4swS745-JldexHrO.js +1204 -0
- package/dist/manageImmunization-B4swS745-JldexHrO.js.map +1 -0
- package/dist/manageImmunization-B4swS745.css +1 -0
- package/dist/xlsx.min-D1LFqt_b-BGwkpd8r.js +11869 -0
- package/dist/xlsx.min-D1LFqt_b-BGwkpd8r.js.map +1 -0
- package/package.json +1 -4
|
@@ -0,0 +1,1104 @@
|
|
|
1
|
+
import { jsx as l, jsxs as p, Fragment as ge } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslateProvider as lt } from "@/common/languageTranslator/TranslationContext";
|
|
3
|
+
import { L as rt, c as _t, g as Ut, v as Ke, S as Ft, j as $t, f as Rt, p as Bt } from "./UserListSkeleton-cglK2SaU-B_Tj5gUp.js";
|
|
4
|
+
import { showToast as b } from "@/common/toaster/toaster.jsx";
|
|
5
|
+
import Pt from "@/hooks/usePagination.js";
|
|
6
|
+
import { getAssignedFeatures as Mt } from "@/utils/feature.js";
|
|
7
|
+
import Qe from "@/views/custom-components/CustomConfirmationModal.jsx";
|
|
8
|
+
import Ht from "@/views/custom-components/CustomizedTable/CustomizedTableV2";
|
|
9
|
+
import Vt from "@/views/custom-components/SideOverlay.jsx";
|
|
10
|
+
import f from "prop-types";
|
|
11
|
+
import { useState as n, useRef as Dt, useMemo as jt, useEffect as te, useCallback as zt, Suspense as qt, lazy as Yt } from "react";
|
|
12
|
+
import { Box as C, Card as Gt, Typography as We, TextField as Jt, CircularProgress as Xe, Button as Ae, Tooltip as Kt, InputLabel as Se, Switch as Qt } from "@mui/material";
|
|
13
|
+
import A from "@mui/material/Grid2";
|
|
14
|
+
import Ze from "@/views/custom-components/CustomDropdown";
|
|
15
|
+
import { useForm as Wt, FormProvider as Xt } from "react-hook-form";
|
|
16
|
+
import at from "@/hooks/useTrackEvent";
|
|
17
|
+
import { showToast as Zt } from "@/common/toaster/toaster";
|
|
18
|
+
import { useDispatch as ot, useSelector as el } from "react-redux";
|
|
19
|
+
import { setUserDetails as Le } from "@/store/reducers/AuthenticationReducer";
|
|
20
|
+
import { useNavigate as tl, useLocation as nt } from "react-router";
|
|
21
|
+
import ye from "@/common/services/util/GeneralUtil";
|
|
22
|
+
import { useTheme as ll, alpha as N } from "@mui/material/styles";
|
|
23
|
+
import { execute as rl } from "@/common/services/QueryBuilder";
|
|
24
|
+
import { faPen as al, faBars as ol, faFilePdf as et, faFileExcel as tt, faUsers as nl, faCheckCircle as sl, faTimesCircle as il, faUserShield as dl, faPhone as cl, faHospital as ul } from "@fortawesome/free-solid-svg-icons";
|
|
25
|
+
import { FontAwesomeIcon as R } from "@fortawesome/react-fontawesome";
|
|
26
|
+
import { A as ml } from "./FileSaver.min-CN9EpL2h-N-3OFAd7.js";
|
|
27
|
+
import { E as ee } from "./xlsx.min-D1LFqt_b-BGwkpd8r.js";
|
|
28
|
+
import fl from "@/hooks/useDownloadPdf.js";
|
|
29
|
+
import ve from "@/views/custom-components/CustomStatsComponent.jsx";
|
|
30
|
+
import './UserList-S5Q76wO7.css';const pl = Yt(
|
|
31
|
+
() => import("@/views/feature-components/LocationDirective/LocationDirectiveV2")
|
|
32
|
+
), st = ({
|
|
33
|
+
handleOverlayState: le,
|
|
34
|
+
setIsLoading: D,
|
|
35
|
+
isLoading: j,
|
|
36
|
+
setLocationId: re,
|
|
37
|
+
setRoleDetails: ae,
|
|
38
|
+
roleDetails: z,
|
|
39
|
+
status: q,
|
|
40
|
+
setStatus: Y,
|
|
41
|
+
selectedLocation: G,
|
|
42
|
+
setSelectedLocation: be,
|
|
43
|
+
filterRequired: L,
|
|
44
|
+
setUserFilterPreference: ne,
|
|
45
|
+
user: E,
|
|
46
|
+
setFilterRequired: se,
|
|
47
|
+
locationIdRef: ie,
|
|
48
|
+
locations: de,
|
|
49
|
+
setLocations: O,
|
|
50
|
+
setAdminRoleIdsStats: w
|
|
51
|
+
}) => {
|
|
52
|
+
const [U, J] = n([]), ce = at(), { translate: u } = lt(), ue = Wt({ mode: "onChange" }), Ne = ot(), K = nt(), {
|
|
53
|
+
control: a,
|
|
54
|
+
handleSubmit: B,
|
|
55
|
+
formState: { errors: Q },
|
|
56
|
+
getValues: _,
|
|
57
|
+
setValue: v,
|
|
58
|
+
clearErrors: xe
|
|
59
|
+
} = ue, x = async () => {
|
|
60
|
+
var m, P, T, I;
|
|
61
|
+
try {
|
|
62
|
+
const { data: y } = await rt({}, { showLoader: !1 });
|
|
63
|
+
J(y), z != null && z.id && v("roleId", z.id), q && v("status", q), ((m = Object.keys((E == null ? void 0 : E.userFilterPreference) || {})) == null ? void 0 : m.length) > 0 && ((P = K == null ? void 0 : K.state) == null ? void 0 : P.fromManageUser) === !0 && (v("roleId", (T = E == null ? void 0 : E.userFilterPreference) == null ? void 0 : T.roleid), v("status", (I = E == null ? void 0 : E.userFilterPreference) == null ? void 0 : I.status));
|
|
64
|
+
} catch (y) {
|
|
65
|
+
console.error(y);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
te(() => {
|
|
69
|
+
x();
|
|
70
|
+
}, []);
|
|
71
|
+
const me = async () => {
|
|
72
|
+
var m, P;
|
|
73
|
+
try {
|
|
74
|
+
D((F) => !F), w([]), ce("button_click", {
|
|
75
|
+
button_name: "User Filter-filter-button",
|
|
76
|
+
button_type: "filter",
|
|
77
|
+
button_id: "userfilterform-search-button"
|
|
78
|
+
});
|
|
79
|
+
const T = _("status") || "BOTH";
|
|
80
|
+
T && Y(T);
|
|
81
|
+
const I = {
|
|
82
|
+
limit: 50,
|
|
83
|
+
offset: 0,
|
|
84
|
+
order: "asc",
|
|
85
|
+
orderby: "userName",
|
|
86
|
+
status: T
|
|
87
|
+
}, y = (P = (m = G == null ? void 0 : G.finalSelected) == null ? void 0 : m.optionSelected) == null ? void 0 : P.id;
|
|
88
|
+
y ? (I.locationId = y, re(y)) : re(null);
|
|
89
|
+
const M = U.find(
|
|
90
|
+
(F) => F.id === _("roleId")
|
|
91
|
+
);
|
|
92
|
+
M != null && M.id ? (I.roleid = M.id, ae(M)) : ae(null), ne(I), Ne(
|
|
93
|
+
Le({
|
|
94
|
+
...E,
|
|
95
|
+
userFilterPreference: {
|
|
96
|
+
...I,
|
|
97
|
+
filterRequired: L,
|
|
98
|
+
selectedLocation: G
|
|
99
|
+
}
|
|
100
|
+
})
|
|
101
|
+
), ce("filter", {
|
|
102
|
+
filter_type: ["location", "role", "status"],
|
|
103
|
+
...I
|
|
104
|
+
}), D((F) => !F), le();
|
|
105
|
+
} catch (T) {
|
|
106
|
+
Zt({ message: `error : ${T == null ? void 0 : T.message}`, type: "error" }), D((I) => !I);
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
return /* @__PURE__ */ l(Xt, { ...ue, children: /* @__PURE__ */ p(
|
|
110
|
+
A,
|
|
111
|
+
{
|
|
112
|
+
className: "m-[1rem]",
|
|
113
|
+
component: "form",
|
|
114
|
+
onSubmit: (m) => {
|
|
115
|
+
if (Object.keys(Q).length > 0) {
|
|
116
|
+
m.preventDefault();
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
B(me)(m);
|
|
120
|
+
},
|
|
121
|
+
"data-testid": "userfilterform-container-grid",
|
|
122
|
+
noValidate: !0,
|
|
123
|
+
children: [
|
|
124
|
+
/* @__PURE__ */ l(Rt, { isLoading: j, children: /* @__PURE__ */ p(A, { className: "flex items-center", children: [
|
|
125
|
+
/* @__PURE__ */ p(Se, { children: [
|
|
126
|
+
u("Location Filter Required"),
|
|
127
|
+
" :"
|
|
128
|
+
] }),
|
|
129
|
+
/* @__PURE__ */ l(
|
|
130
|
+
Qt,
|
|
131
|
+
{
|
|
132
|
+
defaultChecked: !0,
|
|
133
|
+
checked: L,
|
|
134
|
+
onChange: (m) => {
|
|
135
|
+
se(m.target.checked), m.target.checked || (ie.current = null, xe("level1"));
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
)
|
|
139
|
+
] }) }),
|
|
140
|
+
L === !0 && /* @__PURE__ */ l(qt, { children: /* @__PURE__ */ l(
|
|
141
|
+
pl,
|
|
142
|
+
{
|
|
143
|
+
childForm: !0,
|
|
144
|
+
selectedLocation: G,
|
|
145
|
+
setSelectedLocation: be,
|
|
146
|
+
templateType: "inline",
|
|
147
|
+
disabled: j,
|
|
148
|
+
locations: de,
|
|
149
|
+
setLocations: O,
|
|
150
|
+
fetchAccordingToUserAoi: !!ye.isBahaar
|
|
151
|
+
}
|
|
152
|
+
) }),
|
|
153
|
+
/* @__PURE__ */ l(Bt, { isLoading: j, children: /* @__PURE__ */ p(A, { children: [
|
|
154
|
+
/* @__PURE__ */ l(Se, { "data-testid": "userfilterform-role-label", children: u("Role") }),
|
|
155
|
+
/* @__PURE__ */ l(
|
|
156
|
+
Ze,
|
|
157
|
+
{
|
|
158
|
+
control: a,
|
|
159
|
+
name: "roleId",
|
|
160
|
+
options: U,
|
|
161
|
+
displayName: "name",
|
|
162
|
+
optionValue: "id",
|
|
163
|
+
errors: Q,
|
|
164
|
+
dataTestId: "userfilterform-role-dropdown",
|
|
165
|
+
className: "mb-[0.3125rem]"
|
|
166
|
+
}
|
|
167
|
+
),
|
|
168
|
+
/* @__PURE__ */ l(
|
|
169
|
+
Se,
|
|
170
|
+
{
|
|
171
|
+
className: "mt-2",
|
|
172
|
+
"data-testid": "userfilterform-status-label",
|
|
173
|
+
children: u("Status")
|
|
174
|
+
}
|
|
175
|
+
),
|
|
176
|
+
/* @__PURE__ */ l(
|
|
177
|
+
Ze,
|
|
178
|
+
{
|
|
179
|
+
control: a,
|
|
180
|
+
name: "status",
|
|
181
|
+
defaultValue: "BOTH",
|
|
182
|
+
options: ["ACTIVE", "INACTIVE", "BOTH"],
|
|
183
|
+
errors: Q,
|
|
184
|
+
dataTestId: "userfilterform-status-dropdown"
|
|
185
|
+
}
|
|
186
|
+
),
|
|
187
|
+
/* @__PURE__ */ p(
|
|
188
|
+
A,
|
|
189
|
+
{
|
|
190
|
+
container: !0,
|
|
191
|
+
spacing: 1,
|
|
192
|
+
marginTop: 1,
|
|
193
|
+
justifyContent: "flex-end",
|
|
194
|
+
"data-testid": "userfilterform-buttons-container",
|
|
195
|
+
children: [
|
|
196
|
+
/* @__PURE__ */ l(A, { item: !0, "data-testid": "userfilterform-closebutton-item", children: /* @__PURE__ */ l(
|
|
197
|
+
Ae,
|
|
198
|
+
{
|
|
199
|
+
variant: "contained",
|
|
200
|
+
color: "secondary",
|
|
201
|
+
onClick: () => le(),
|
|
202
|
+
"data-testid": "userfilterform-close-button",
|
|
203
|
+
children: u("Close")
|
|
204
|
+
}
|
|
205
|
+
) }),
|
|
206
|
+
/* @__PURE__ */ l(A, { item: !0, "data-testid": "userfilterform-searchbutton-item", children: /* @__PURE__ */ l(
|
|
207
|
+
Ae,
|
|
208
|
+
{
|
|
209
|
+
variant: "contained",
|
|
210
|
+
type: "submit",
|
|
211
|
+
"data-testid": "userfilterform-search-button",
|
|
212
|
+
children: u("Search")
|
|
213
|
+
}
|
|
214
|
+
) })
|
|
215
|
+
]
|
|
216
|
+
}
|
|
217
|
+
)
|
|
218
|
+
] }) })
|
|
219
|
+
]
|
|
220
|
+
}
|
|
221
|
+
) });
|
|
222
|
+
};
|
|
223
|
+
st.propTypes = {
|
|
224
|
+
handleOverlayState: f.any,
|
|
225
|
+
setUsersData: f.any,
|
|
226
|
+
setIsLoading: f.any,
|
|
227
|
+
isLoading: f.any,
|
|
228
|
+
setLocationId: f.func,
|
|
229
|
+
setRoleDetails: f.func,
|
|
230
|
+
roleDetails: f.any,
|
|
231
|
+
status: f.any,
|
|
232
|
+
setStatus: f.any,
|
|
233
|
+
selectedLocation: f.any,
|
|
234
|
+
setSelectedLocation: f.any,
|
|
235
|
+
filterRequired: f.any,
|
|
236
|
+
setFilterRequired: f.any,
|
|
237
|
+
setUserFilterPreference: f.any,
|
|
238
|
+
user: f.any,
|
|
239
|
+
resetLocationDirective: f.any,
|
|
240
|
+
locationIdRef: f.any,
|
|
241
|
+
setSelectedLocationId: f.any,
|
|
242
|
+
locations: f.any,
|
|
243
|
+
setLocations: f.any,
|
|
244
|
+
setAdminRoleIdsStats: f.any
|
|
245
|
+
};
|
|
246
|
+
function zl() {
|
|
247
|
+
var le, D, j, re, ae, z;
|
|
248
|
+
const q = tl(), Y = at(), [G, be] = n([]), [L, ne] = n([]);
|
|
249
|
+
let E = "#8688ecff", se = "#10b981", ie = "#f43f5e", de = "#f59e0b", O = "#ffffffff";
|
|
250
|
+
const [w, U] = n([]), [J, ce] = n([]), [u, ue] = n(null), [Ne, K] = n(!1), a = ll(), B = a.palette.mode === "dark", [Q, _] = n(0), [v, xe] = n({}), [x, me] = n(null), [m, P] = n(""), [T, I] = n(""), [y, M] = n([]), [F, it] = n(!0), [Ee, dt] = n(!1), [W, ct] = n({
|
|
251
|
+
sortColumn: "userName",
|
|
252
|
+
sortOrder: "asc"
|
|
253
|
+
}), [ut, Oe] = n(!1), _e = 50, { translate: oe } = lt(), [fe, H] = n(!1), [pe, Ue] = n(null), [k, Fe] = n(null), [V, X] = n(null), $ = nt(), $e = ot(), { user: S } = el((e) => e == null ? void 0 : e.Authenticate), [mt, Re] = n(
|
|
254
|
+
((le = S == null ? void 0 : S.userFilterPreference) == null ? void 0 : le.locationId) || null
|
|
255
|
+
), Be = Dt(mt), [ft, Pe] = n(
|
|
256
|
+
((D = $ == null ? void 0 : $.state) == null ? void 0 : D.fromManageUser) === !0 && ((j = S == null ? void 0 : S.userFilterPreference) == null ? void 0 : j.selectedLocation) || {},
|
|
257
|
+
{}
|
|
258
|
+
), [pt, Me] = n(
|
|
259
|
+
((re = $ == null ? void 0 : $.state) == null ? void 0 : re.fromManageUser) === !0 && ((ae = S == null ? void 0 : S.userFilterPreference) == null ? void 0 : ae.filterRequired) || !1
|
|
260
|
+
), [s, Z] = n(
|
|
261
|
+
((z = $ == null ? void 0 : $.state) == null ? void 0 : z.fromManageUser) === !0 && (S == null ? void 0 : S.userFilterPreference) || {}
|
|
262
|
+
), [ht, He] = n(0), [gt, Ve] = n([]), vt = jt(() => y == null ? void 0 : y.map((e, r) => {
|
|
263
|
+
let t = "";
|
|
264
|
+
return e != null && e.title && (t += e.title + " "), e != null && e.firstName && (t += e.firstName + " "), e != null && e.lastName && (t += e.lastName), {
|
|
265
|
+
...e,
|
|
266
|
+
index: r + 1,
|
|
267
|
+
firstName: t.trim()
|
|
268
|
+
};
|
|
269
|
+
}), [y, B]);
|
|
270
|
+
te(() => {
|
|
271
|
+
(async () => {
|
|
272
|
+
var e, r;
|
|
273
|
+
try {
|
|
274
|
+
if (J.length > 0) {
|
|
275
|
+
K(!0);
|
|
276
|
+
const t = await rl({
|
|
277
|
+
code: "GET_USERS_STATS",
|
|
278
|
+
parameters: {
|
|
279
|
+
locationId: (s == null ? void 0 : s.locationId) || pe,
|
|
280
|
+
roleid: (s == null ? void 0 : s.roleid) || (k == null ? void 0 : k.id) || null,
|
|
281
|
+
roleIds: J == null ? void 0 : J.join(",")
|
|
282
|
+
}
|
|
283
|
+
});
|
|
284
|
+
(e = t == null ? void 0 : t.data) != null && e.result && ((r = t == null ? void 0 : t.data) == null ? void 0 : r.result.length) > 0 && ue(t.data.result[0]), K(!1);
|
|
285
|
+
}
|
|
286
|
+
} catch (t) {
|
|
287
|
+
K(!1), console.error("Error fetching user stats:", t);
|
|
288
|
+
}
|
|
289
|
+
})();
|
|
290
|
+
}, [s, J]);
|
|
291
|
+
const Ie = [
|
|
292
|
+
{ field: "Sr. No.", label: "#", align: "left" },
|
|
293
|
+
{
|
|
294
|
+
field: "userName",
|
|
295
|
+
label: "User Identity".toUpperCase(),
|
|
296
|
+
sortable: !0,
|
|
297
|
+
sortOrder: "asc",
|
|
298
|
+
align: "left",
|
|
299
|
+
render: (e) => {
|
|
300
|
+
var r;
|
|
301
|
+
return /* @__PURE__ */ p("div", { className: "flex items-center w-48 gap-4 h-full", children: [
|
|
302
|
+
/* @__PURE__ */ l(
|
|
303
|
+
C,
|
|
304
|
+
{
|
|
305
|
+
className: "w-[15%] h-10 rounded-2xl flex items-center justify-center font-black text-xs shadow-sm transition-transform duration-300 group-hover:scale-110",
|
|
306
|
+
sx: {
|
|
307
|
+
background: `linear-gradient(to bottom right, ${N(a.palette.primary.main, 0.05)}, ${N(a.palette.primary.main, 0.2)})`,
|
|
308
|
+
border: `1px solid ${N(a.palette.primary.main, 0.2)}`,
|
|
309
|
+
color: a.palette.primary.main
|
|
310
|
+
},
|
|
311
|
+
children: (r = e == null ? void 0 : e.firstName) == null ? void 0 : r.split(" ").filter((t) => !["Mr", "Ms", "Mrs"].includes(t)).map((t) => t[0]).join("").toUpperCase()
|
|
312
|
+
}
|
|
313
|
+
),
|
|
314
|
+
/* @__PURE__ */ p("div", { className: "w-[80%] flex flex-col h-full justify-center pt-2", children: [
|
|
315
|
+
/* @__PURE__ */ l(
|
|
316
|
+
C,
|
|
317
|
+
{
|
|
318
|
+
component: "span",
|
|
319
|
+
className: "text-sm font-black leading-tight transition-colors duration-300",
|
|
320
|
+
sx: {
|
|
321
|
+
color: a.palette.text.primary,
|
|
322
|
+
// Dynamic text color
|
|
323
|
+
".group:hover &": {
|
|
324
|
+
color: a.palette.primary.main
|
|
325
|
+
}
|
|
326
|
+
},
|
|
327
|
+
children: e == null ? void 0 : e.firstName
|
|
328
|
+
}
|
|
329
|
+
),
|
|
330
|
+
/* @__PURE__ */ p(
|
|
331
|
+
C,
|
|
332
|
+
{
|
|
333
|
+
component: "span",
|
|
334
|
+
className: "text-md font-bold font-mono flex items-center gap-1.5 transition-colors duration-300",
|
|
335
|
+
sx: {
|
|
336
|
+
color: a.palette.text.secondary
|
|
337
|
+
// Dynamic muted color
|
|
338
|
+
},
|
|
339
|
+
children: [
|
|
340
|
+
/* @__PURE__ */ l(
|
|
341
|
+
C,
|
|
342
|
+
{
|
|
343
|
+
component: "span",
|
|
344
|
+
className: "w-1.5 h-1.5 rounded-full transition-colors duration-300",
|
|
345
|
+
sx: {
|
|
346
|
+
backgroundColor: a.palette.divider
|
|
347
|
+
// Dynamic dot color
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
),
|
|
351
|
+
e == null ? void 0 : e.userName
|
|
352
|
+
]
|
|
353
|
+
}
|
|
354
|
+
)
|
|
355
|
+
] })
|
|
356
|
+
] });
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
field: "contactNumber",
|
|
361
|
+
label: "Phone number".toUpperCase(),
|
|
362
|
+
sortable: !0,
|
|
363
|
+
align: "left",
|
|
364
|
+
sortOrder: "asc",
|
|
365
|
+
render: (e) => /* @__PURE__ */ l("div", { className: "flex items-center w-32 gap-4 h-full", children: /* @__PURE__ */ p("div", { className: "flex items-center text-md tracking-tight", children: [
|
|
366
|
+
/* @__PURE__ */ l(
|
|
367
|
+
C,
|
|
368
|
+
{
|
|
369
|
+
className: "w-7 h-7 rounded-xl flex items-center justify-center mr-2 shadow-sm transition-all duration-300",
|
|
370
|
+
sx: {
|
|
371
|
+
backgroundColor: a.palette.mode === "dark" ? N(a.palette.common.white, 0.05) : "rgb(248, 250, 252)",
|
|
372
|
+
color: a.palette.text.disabled,
|
|
373
|
+
".group:hover &": {
|
|
374
|
+
backgroundColor: a.palette.primary.main,
|
|
375
|
+
color: "white"
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
children: /* @__PURE__ */ l(R, { icon: cl, className: "text-xs" })
|
|
379
|
+
}
|
|
380
|
+
),
|
|
381
|
+
/* @__PURE__ */ l(
|
|
382
|
+
C,
|
|
383
|
+
{
|
|
384
|
+
component: "span",
|
|
385
|
+
className: "transition-colors duration-300",
|
|
386
|
+
sx: {
|
|
387
|
+
color: a.palette.text.primary,
|
|
388
|
+
".group:hover &": {
|
|
389
|
+
color: a.palette.primary.main
|
|
390
|
+
}
|
|
391
|
+
},
|
|
392
|
+
children: (e == null ? void 0 : e.contactNumber) || "N/A"
|
|
393
|
+
}
|
|
394
|
+
)
|
|
395
|
+
] }) })
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
field: "roleName",
|
|
399
|
+
label: "Role Name".toUpperCase(),
|
|
400
|
+
sortable: !0,
|
|
401
|
+
sortOrder: "asc",
|
|
402
|
+
align: "left",
|
|
403
|
+
render: (e) => /* @__PURE__ */ l("div", { className: "flex items-center w-auto h-full", children: /* @__PURE__ */ l("div", { className: "flex flex-col gap-1.5", children: /* @__PURE__ */ l(
|
|
404
|
+
C,
|
|
405
|
+
{
|
|
406
|
+
component: "span",
|
|
407
|
+
className: "px-2.5 rounded-lg text-[0.6rem] font-black uppercase tracking-widest w-fit whitespace-nowrap",
|
|
408
|
+
sx: {
|
|
409
|
+
backgroundColor: N(a.palette.primary.main, 0.1),
|
|
410
|
+
color: a.palette.primary.main,
|
|
411
|
+
border: `1px solid ${N(a.palette.primary.main, 0.2)}`
|
|
412
|
+
},
|
|
413
|
+
children: e == null ? void 0 : e.roleName
|
|
414
|
+
}
|
|
415
|
+
) }) })
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
field: "areaOfIntervention",
|
|
419
|
+
label: "Area of Intervention".toUpperCase(),
|
|
420
|
+
align: "left",
|
|
421
|
+
render: (e) => {
|
|
422
|
+
var r;
|
|
423
|
+
const t = (r = e == null ? void 0 : e.areaOfIntervention) == null ? void 0 : r.replace(
|
|
424
|
+
/<br\s*\/?>/gi,
|
|
425
|
+
", "
|
|
426
|
+
);
|
|
427
|
+
return /* @__PURE__ */ l("div", { className: "flex items-center w-48 h-full", children: /* @__PURE__ */ l("div", { className: "flex flex-col gap-1.5 w-full min-w-0", children: /* @__PURE__ */ l(
|
|
428
|
+
C,
|
|
429
|
+
{
|
|
430
|
+
className: "flex items-center text-md pl-2",
|
|
431
|
+
sx: { color: a.palette.text.primary },
|
|
432
|
+
children: /* @__PURE__ */ l(
|
|
433
|
+
Kt,
|
|
434
|
+
{
|
|
435
|
+
arrow: !0,
|
|
436
|
+
placement: "top",
|
|
437
|
+
title: /* @__PURE__ */ l(
|
|
438
|
+
"span",
|
|
439
|
+
{
|
|
440
|
+
dangerouslySetInnerHTML: {
|
|
441
|
+
__html: (e == null ? void 0 : e.areaOfIntervention) || "N/A"
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
),
|
|
445
|
+
children: /* @__PURE__ */ l(
|
|
446
|
+
"span",
|
|
447
|
+
{
|
|
448
|
+
className: "cursor-default block w-full whitespace-normal break-words",
|
|
449
|
+
dangerouslySetInnerHTML: {
|
|
450
|
+
__html: t || "N/A"
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
)
|
|
454
|
+
}
|
|
455
|
+
)
|
|
456
|
+
}
|
|
457
|
+
) }) });
|
|
458
|
+
}
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
field: "healthFacilityName",
|
|
462
|
+
label: "Health Infrastructure".toUpperCase(),
|
|
463
|
+
align: "left",
|
|
464
|
+
render: (e) => {
|
|
465
|
+
var r;
|
|
466
|
+
return /* @__PURE__ */ p("div", { className: "flex items-center gap-3 h-full", children: [
|
|
467
|
+
/* @__PURE__ */ l(
|
|
468
|
+
C,
|
|
469
|
+
{
|
|
470
|
+
className: "w-8 h-8 rounded-lg flex items-center justify-center transition-all duration-300",
|
|
471
|
+
sx: {
|
|
472
|
+
color: a.palette.text.disabled,
|
|
473
|
+
".group:hover &": {
|
|
474
|
+
color: a.palette.primary.main,
|
|
475
|
+
backgroundColor: N(a.palette.primary.main, 0.1)
|
|
476
|
+
}
|
|
477
|
+
},
|
|
478
|
+
children: /* @__PURE__ */ l(R, { icon: ul })
|
|
479
|
+
}
|
|
480
|
+
),
|
|
481
|
+
/* @__PURE__ */ l(
|
|
482
|
+
C,
|
|
483
|
+
{
|
|
484
|
+
component: "span",
|
|
485
|
+
className: "text-sm transition-colors duration-300",
|
|
486
|
+
sx: {
|
|
487
|
+
color: a.palette.text.secondary,
|
|
488
|
+
".group:hover &": {
|
|
489
|
+
color: a.palette.primary.main
|
|
490
|
+
}
|
|
491
|
+
},
|
|
492
|
+
children: /* @__PURE__ */ l("div", { className: "whitespace-pre-line", children: ((r = e == null ? void 0 : e.healthFacilityName) == null ? void 0 : r.replace(/<br\s*\/?>/gi, `
|
|
493
|
+
`)) || "N/A" })
|
|
494
|
+
}
|
|
495
|
+
)
|
|
496
|
+
] });
|
|
497
|
+
}
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
field: "displayState",
|
|
501
|
+
label: "User Status".toUpperCase(),
|
|
502
|
+
align: "left",
|
|
503
|
+
render: (e) => {
|
|
504
|
+
const r = (e == null ? void 0 : e.displayState) === "ACTIVE";
|
|
505
|
+
return /* @__PURE__ */ l("div", { className: "flex items-center justify-center h-full", children: /* @__PURE__ */ p(
|
|
506
|
+
C,
|
|
507
|
+
{
|
|
508
|
+
className: "inline-flex items-center justify-center rounded-full text-[0.8rem] font-black border transition-all duration-500 shadow-sm px-3 w-auto min-w-[110px]",
|
|
509
|
+
sx: {
|
|
510
|
+
backgroundColor: r ? a.palette.mode === "dark" ? N(a.palette.success.main, 0.15) : "rgb(236, 253, 245)" : a.palette.mode === "dark" ? N(a.palette.error.main, 0.15) : "rgb(254, 242, 242)",
|
|
511
|
+
color: r ? a.palette.mode === "dark" ? a.palette.success.light : "rgb(4, 120, 87)" : a.palette.mode === "dark" ? a.palette.error.light : "rgb(248, 113, 113)",
|
|
512
|
+
borderColor: r ? N(a.palette.success.main, 0.3) : N(a.palette.error.main, 0.3)
|
|
513
|
+
},
|
|
514
|
+
children: [
|
|
515
|
+
/* @__PURE__ */ l(
|
|
516
|
+
"span",
|
|
517
|
+
{
|
|
518
|
+
className: `w-2 h-2 rounded-full mr-2 ${r ? "bg-emerald-500 animate-pulse" : "bg-red-400"}`
|
|
519
|
+
}
|
|
520
|
+
),
|
|
521
|
+
e == null ? void 0 : e.displayState
|
|
522
|
+
]
|
|
523
|
+
}
|
|
524
|
+
) });
|
|
525
|
+
}
|
|
526
|
+
},
|
|
527
|
+
{
|
|
528
|
+
field: "Actions",
|
|
529
|
+
label: "Actions".toUpperCase(),
|
|
530
|
+
align: "left"
|
|
531
|
+
}
|
|
532
|
+
], [yt, De] = n(Ie);
|
|
533
|
+
te(() => {
|
|
534
|
+
De(Ie);
|
|
535
|
+
}, [B]);
|
|
536
|
+
const bt = async () => {
|
|
537
|
+
var e, r, t, d;
|
|
538
|
+
const i = x.displayState !== "ACTIVE";
|
|
539
|
+
try {
|
|
540
|
+
await Ft(x, { is_active: i }), _(0), Oe((c) => !c), b({
|
|
541
|
+
message: "User State Updated Successfully",
|
|
542
|
+
type: "success"
|
|
543
|
+
});
|
|
544
|
+
} catch (c) {
|
|
545
|
+
_(0), Oe((g) => !g);
|
|
546
|
+
const o = (r = (e = c == null ? void 0 : c.response) == null ? void 0 : e.data) == null ? void 0 : r.errorcode, h = ((d = (t = c == null ? void 0 : c.response) == null ? void 0 : t.data) == null ? void 0 : d.message) || (c == null ? void 0 : c.message) || "Something went wrong";
|
|
547
|
+
console.log(o, h), o === 400 ? b({
|
|
548
|
+
message: `${h}`,
|
|
549
|
+
type: "error"
|
|
550
|
+
}) : b({
|
|
551
|
+
message: "Error in Updating User State.",
|
|
552
|
+
type: "error"
|
|
553
|
+
});
|
|
554
|
+
}
|
|
555
|
+
}, Nt = async () => {
|
|
556
|
+
try {
|
|
557
|
+
const e = await $t({
|
|
558
|
+
userId: ye.isTecho ? x == null ? void 0 : x.userId : x == null ? void 0 : x.id
|
|
559
|
+
});
|
|
560
|
+
e && (M((r) => r.map((t) => (t == null ? void 0 : t.userId) === (ye.isTecho ? x == null ? void 0 : x.userId : x == null ? void 0 : x.id) ? { ...t, loginCode: e.data } : t)), b({
|
|
561
|
+
message: `You have successfully generated your login code. Your login code is : ${e.data}`,
|
|
562
|
+
type: "success"
|
|
563
|
+
}));
|
|
564
|
+
} catch (e) {
|
|
565
|
+
b({ message: `${e.response.data.message}`, type: "error" });
|
|
566
|
+
} finally {
|
|
567
|
+
_(0);
|
|
568
|
+
}
|
|
569
|
+
}, xt = (e) => ye.isTecho ? q(`/ui/medplat/manage/user/${e.userId}`) : q(`/ui/medplat/manage/user/${e.id}`), It = zt(
|
|
570
|
+
(e) => [
|
|
571
|
+
(v == null ? void 0 : v["update.manage.users"]) && {
|
|
572
|
+
label: "",
|
|
573
|
+
icon: /* @__PURE__ */ l(R, { icon: al, "data-testid": "userlist-button-edit" }),
|
|
574
|
+
onClick: () => {
|
|
575
|
+
xt(e);
|
|
576
|
+
},
|
|
577
|
+
iconColor: a.palette.secondary.main,
|
|
578
|
+
backgroundColor: N(a.palette.secondary.main, 0.1),
|
|
579
|
+
hoverBackgroundColor: a.palette.secondary.main,
|
|
580
|
+
hoverIconColor: "white",
|
|
581
|
+
borderColor: a.palette.secondary.main,
|
|
582
|
+
rotateIcon: !0
|
|
583
|
+
},
|
|
584
|
+
{
|
|
585
|
+
label: "",
|
|
586
|
+
icon: /* @__PURE__ */ l(R, { icon: ol, "data-testid": "userlist-button-menu" }),
|
|
587
|
+
iconColor: a.palette.primary.main,
|
|
588
|
+
backgroundColor: N(a.palette.primary.main, 0.1),
|
|
589
|
+
hoverBackgroundColor: a.palette.primary.main,
|
|
590
|
+
hoverIconColor: "white",
|
|
591
|
+
borderColor: a.palette.primary.main,
|
|
592
|
+
menuItems: [
|
|
593
|
+
{
|
|
594
|
+
label: oe(
|
|
595
|
+
e.displayState === "ACTIVE" ? "Mark as Inactive" : "Mark as Active"
|
|
596
|
+
),
|
|
597
|
+
onClick: () => {
|
|
598
|
+
_(1), me(e);
|
|
599
|
+
}
|
|
600
|
+
},
|
|
601
|
+
e.displayState === "ACTIVE" && !(e != null && e.loginCode) && {
|
|
602
|
+
label: oe("Generate SOH Code"),
|
|
603
|
+
onClick: () => {
|
|
604
|
+
_(2), me(e);
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
].filter(Boolean)
|
|
608
|
+
}
|
|
609
|
+
].filter(Boolean),
|
|
610
|
+
[v, oe]
|
|
611
|
+
), Ct = async (e) => {
|
|
612
|
+
const r = e.sortOrder === "asc" ? "desc" : "asc";
|
|
613
|
+
De(
|
|
614
|
+
(t) => t.map((d) => d.field === e.field ? { ...d, sortOrder: r } : d)
|
|
615
|
+
), ct({ sortColumn: e.field, sortOrder: r });
|
|
616
|
+
}, je = () => {
|
|
617
|
+
Y("button_click", {
|
|
618
|
+
button_name: "User Filter-open-button",
|
|
619
|
+
button_type: "filter_open",
|
|
620
|
+
button_id: "userlist-overlay-filter"
|
|
621
|
+
}), dt(!Ee);
|
|
622
|
+
};
|
|
623
|
+
te(() => {
|
|
624
|
+
const e = setTimeout(() => {
|
|
625
|
+
I(m);
|
|
626
|
+
}, 1e3);
|
|
627
|
+
return () => clearTimeout(e);
|
|
628
|
+
}, [m]);
|
|
629
|
+
async function wt(e, r) {
|
|
630
|
+
var t;
|
|
631
|
+
try {
|
|
632
|
+
if (v != null && v["view.manage.users"]) {
|
|
633
|
+
r && H((i) => !i);
|
|
634
|
+
const d = await Ke({
|
|
635
|
+
limit: e.limit,
|
|
636
|
+
offset: e.offset,
|
|
637
|
+
locationId: (s == null ? void 0 : s.locationId) || pe,
|
|
638
|
+
order: W.sortOrder,
|
|
639
|
+
orderby: W.sortColumn,
|
|
640
|
+
roleIds: w == null ? void 0 : w.join(","),
|
|
641
|
+
status: s != null && s.status ? s == null ? void 0 : s.status : V || "BOTH",
|
|
642
|
+
...s != null && s.roleid ? { roleid: s == null ? void 0 : s.roleid } : (k == null ? void 0 : k.id) && { roleid: k.id },
|
|
643
|
+
...m && { searchString: m }
|
|
644
|
+
});
|
|
645
|
+
return m !== "" && Y("search_tracking", {
|
|
646
|
+
searchTerm: m,
|
|
647
|
+
results_count: (t = d == null ? void 0 : d.data) == null ? void 0 : t.length,
|
|
648
|
+
search_type: "Page Search"
|
|
649
|
+
}), r && H((i) => !i), d.data;
|
|
650
|
+
}
|
|
651
|
+
} catch (d) {
|
|
652
|
+
b({ message: `error ${d}`, type: "error" }), H((i) => !i);
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
const {
|
|
656
|
+
data: Ce,
|
|
657
|
+
fetchNextPage: Tt,
|
|
658
|
+
hasNextPage: kt
|
|
659
|
+
} = Pt({
|
|
660
|
+
key: [
|
|
661
|
+
"users",
|
|
662
|
+
T,
|
|
663
|
+
W.sortOrder,
|
|
664
|
+
W.sortColumn,
|
|
665
|
+
ut,
|
|
666
|
+
pe,
|
|
667
|
+
k == null ? void 0 : k.id,
|
|
668
|
+
V,
|
|
669
|
+
v,
|
|
670
|
+
w
|
|
671
|
+
],
|
|
672
|
+
queryFn: ({ pageParam: e }) => {
|
|
673
|
+
const r = !(e != null && e.offset) || (e == null ? void 0 : e.offset) === 0;
|
|
674
|
+
return wt(e, r);
|
|
675
|
+
},
|
|
676
|
+
limit: _e
|
|
677
|
+
});
|
|
678
|
+
te(() => {
|
|
679
|
+
(async () => {
|
|
680
|
+
var e;
|
|
681
|
+
try {
|
|
682
|
+
const { data: r } = await rt({}, { showLoader: !1 }), t = r == null ? void 0 : r.filter((c) => {
|
|
683
|
+
var o, h;
|
|
684
|
+
return (h = (o = c == null ? void 0 : c.name) == null ? void 0 : o.toLowerCase()) == null ? void 0 : h.includes("admin");
|
|
685
|
+
}).map((c) => c.id);
|
|
686
|
+
be(t);
|
|
687
|
+
const d = r == null ? void 0 : r.map((c) => c.id);
|
|
688
|
+
ce(d), H(!0);
|
|
689
|
+
const { data: i } = await Mt("techo.manage.users");
|
|
690
|
+
i && xe(JSON.parse(i)), (e = $ == null ? void 0 : $.state) != null && e.fromManageUser || $e(Le({ ...S, userFilterPreference: {} })), H(!1);
|
|
691
|
+
} catch (r) {
|
|
692
|
+
H(!1), console.error("Error loading initial data:", r);
|
|
693
|
+
}
|
|
694
|
+
})();
|
|
695
|
+
}, []), te(() => {
|
|
696
|
+
var e;
|
|
697
|
+
const r = ((e = Ce == null ? void 0 : Ce.pages) == null ? void 0 : e.flat()) || [];
|
|
698
|
+
it(kt), M(r);
|
|
699
|
+
}, [Ce]);
|
|
700
|
+
const ze = async () => {
|
|
701
|
+
try {
|
|
702
|
+
let e = 0, r = [], t = !0;
|
|
703
|
+
for (; t; ) {
|
|
704
|
+
const d = await Ke({
|
|
705
|
+
limit: 5e4,
|
|
706
|
+
offset: e,
|
|
707
|
+
locationId: (s == null ? void 0 : s.locationId) || pe,
|
|
708
|
+
order: W.sortOrder,
|
|
709
|
+
orderby: W.sortColumn,
|
|
710
|
+
roleIds: w == null ? void 0 : w.join(","),
|
|
711
|
+
status: s != null && s.status ? s == null ? void 0 : s.status : V || "BOTH",
|
|
712
|
+
...s != null && s.roleid ? { roleid: s == null ? void 0 : s.roleid } : (k == null ? void 0 : k.id) && { roleid: k.id },
|
|
713
|
+
...m && { searchString: m }
|
|
714
|
+
}), i = (d == null ? void 0 : d.data) || [];
|
|
715
|
+
r = [...r, ...i], i.length < 5e4 ? t = !1 : e += 5e4;
|
|
716
|
+
}
|
|
717
|
+
return r;
|
|
718
|
+
} catch (e) {
|
|
719
|
+
return console.error(e), b({ message: "Error in retriving all Users", type: "error" }), [];
|
|
720
|
+
}
|
|
721
|
+
}, St = async (e) => {
|
|
722
|
+
try {
|
|
723
|
+
const r = /* @__PURE__ */ new Date(), t = r.getMonth() + 1, d = `UserList-${r.getDate()}/${t}/${r.getFullYear().toString().substr(-2)}-${r.getHours()}:${r.getMinutes()}`, i = ee.utils.json_to_sheet(e), c = {
|
|
724
|
+
font: { bold: !0 },
|
|
725
|
+
alignment: { horizontal: "center" }
|
|
726
|
+
};
|
|
727
|
+
if (e.length > 0) {
|
|
728
|
+
const Ge = ee.utils.decode_range(i["!ref"]);
|
|
729
|
+
for (let ke = Ge.s.c; ke <= Ge.e.c; ++ke) {
|
|
730
|
+
const Je = i[ee.utils.encode_cell({ r: 0, c: ke })];
|
|
731
|
+
Je && (Je.s = c);
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
const o = ee.utils.book_new();
|
|
735
|
+
ee.utils.book_append_sheet(o, i, "Sheet1");
|
|
736
|
+
const h = ee.write(o, {
|
|
737
|
+
bookType: "xlsx",
|
|
738
|
+
type: "array"
|
|
739
|
+
}), g = new Blob([h], {
|
|
740
|
+
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
741
|
+
}), he = (g.size / (1024 * 1024)).toFixed(2);
|
|
742
|
+
ml.saveAs(g, `${d}.xlsx`), Y("file_download", {
|
|
743
|
+
file_type: "excel",
|
|
744
|
+
file_name: `${d}.xlsx`,
|
|
745
|
+
file_size: `${he} MB`,
|
|
746
|
+
filter_parameters: {
|
|
747
|
+
taskTypeId: y.id
|
|
748
|
+
},
|
|
749
|
+
download_status: "success"
|
|
750
|
+
});
|
|
751
|
+
} catch (r) {
|
|
752
|
+
console.error("Error generating Excel file:", r), b({ message: "Error generating Excel file", type: "error" });
|
|
753
|
+
}
|
|
754
|
+
}, [qe, we] = n(!1), At = async () => {
|
|
755
|
+
try {
|
|
756
|
+
we(!0);
|
|
757
|
+
let e;
|
|
758
|
+
(L == null ? void 0 : L.length) === 0 ? (e = await ze(), ne(e)) : e = L;
|
|
759
|
+
let r = [];
|
|
760
|
+
e && e.length > 0 && (r = e.map((t, d) => {
|
|
761
|
+
var i;
|
|
762
|
+
let c = "", o;
|
|
763
|
+
t != null && t.title && (c += t.title + " "), t != null && t.firstName && (c += t.firstName + " "), t != null && t.lastName && (c += t.lastName), t != null && t.areaOfIntervention && (o = (i = t == null ? void 0 : t.areaOfIntervention) == null ? void 0 : i.replace(
|
|
764
|
+
/<br\s*\/?>/gi,
|
|
765
|
+
`,
|
|
766
|
+
`
|
|
767
|
+
));
|
|
768
|
+
const h = {
|
|
769
|
+
"No.": d + 1,
|
|
770
|
+
NAME: c || "NA",
|
|
771
|
+
"USER IDENTITY": (t == null ? void 0 : t.userName) || "NA",
|
|
772
|
+
"MOBILE NUMBER": (t == null ? void 0 : t.contactNumber) || "NA",
|
|
773
|
+
"USER ROLE": (t == null ? void 0 : t.roleName) || "NA",
|
|
774
|
+
"AREA OF INTERVENTION": o || "NA",
|
|
775
|
+
"HEALTH INFRASTRUCTURE": (t == null ? void 0 : t.healthFacilityName) || "NA",
|
|
776
|
+
"USER STATUS": (t == null ? void 0 : t.displayState) || "NA"
|
|
777
|
+
};
|
|
778
|
+
return Object.keys(h).forEach((g) => {
|
|
779
|
+
g === "id" ? delete h[g] : h[g] === null ? h[g] = "" : typeof h[g] == "boolean" && (h[g] = h[g] ? "Yes" : "No");
|
|
780
|
+
}), h;
|
|
781
|
+
})), St(r), we(!1);
|
|
782
|
+
} catch (e) {
|
|
783
|
+
we(!1), console.log(e), b({
|
|
784
|
+
message: "Error in downloading excel",
|
|
785
|
+
type: "error"
|
|
786
|
+
});
|
|
787
|
+
}
|
|
788
|
+
}, Lt = fl(), [Ye, Te] = n(!1), Et = async () => {
|
|
789
|
+
try {
|
|
790
|
+
Te(!0);
|
|
791
|
+
let e = [];
|
|
792
|
+
if ((L == null ? void 0 : L.length) === 0 ? (e = await ze(), ne(e)) : e = L, !e || e.length === 0) return;
|
|
793
|
+
let r = [], t = [];
|
|
794
|
+
r.push("NAME"), t.push("name"), Ie.filter(
|
|
795
|
+
(o) => o.field !== "Actions" && o.field !== "index" && o.field !== "Sr. No."
|
|
796
|
+
).forEach((o) => {
|
|
797
|
+
r.push(o.label), t.push(o.field);
|
|
798
|
+
});
|
|
799
|
+
let d = e.map((o) => {
|
|
800
|
+
var h;
|
|
801
|
+
let g = "", he;
|
|
802
|
+
return o != null && o.title && (g += o.title + " "), o != null && o.firstName && (g += o.firstName + " "), o != null && o.lastName && (g += o.lastName), o != null && o.areaOfIntervention && (he = (h = o == null ? void 0 : o.areaOfIntervention) == null ? void 0 : h.replace(
|
|
803
|
+
/<br\s*\/?>/gi,
|
|
804
|
+
`,
|
|
805
|
+
`
|
|
806
|
+
)), {
|
|
807
|
+
...o,
|
|
808
|
+
name: g || "NA",
|
|
809
|
+
areaOfIntervention: he
|
|
810
|
+
};
|
|
811
|
+
});
|
|
812
|
+
const i = /* @__PURE__ */ new Date(), c = i.getMonth() + 1;
|
|
813
|
+
Lt({
|
|
814
|
+
columns: r,
|
|
815
|
+
keys: t,
|
|
816
|
+
data: d,
|
|
817
|
+
fileName: `UserList-${i.getDate()}/${c}/${i.getFullYear().toString().substr(-2)}-${i.getHours()}:${i.getMinutes()}`,
|
|
818
|
+
headerText: "User List",
|
|
819
|
+
footerText: "User List",
|
|
820
|
+
orientation: r.length > 7 ? "landscape" : "portrait"
|
|
821
|
+
}), Te(!1);
|
|
822
|
+
} catch (e) {
|
|
823
|
+
Te(!1), console.error(e);
|
|
824
|
+
}
|
|
825
|
+
}, Ot = () => {
|
|
826
|
+
Ue(null), Fe(null), X("BOTH"), Z({}), Me(!1), Ve([]), U([]), $e(Le({ ...S, userFilterPreference: {} })), Re(null), Pe({}), He((e) => e + 1), Be.current = null, je();
|
|
827
|
+
};
|
|
828
|
+
return !fe && !(v != null && v["view.manage.users"]) ? /* @__PURE__ */ l(C, { className: "flex justify-center items-center w-full h-[80vh]", children: /* @__PURE__ */ l(
|
|
829
|
+
Gt,
|
|
830
|
+
{
|
|
831
|
+
className: "h-80 w-150 flex justify-center items-center",
|
|
832
|
+
"data-testid": "userlist-no-permission",
|
|
833
|
+
children: /* @__PURE__ */ l(We, { variant: "h5", className: "text-customBlue", children: "You dont have permission to view Users" })
|
|
834
|
+
}
|
|
835
|
+
) }) : /* @__PURE__ */ p(A, { className: "w-[98%] mt-4 ", children: [
|
|
836
|
+
/* @__PURE__ */ l(
|
|
837
|
+
Qe,
|
|
838
|
+
{
|
|
839
|
+
open: Q === 1,
|
|
840
|
+
handleClose: () => _(0),
|
|
841
|
+
handleClick: bt,
|
|
842
|
+
title: "CONFIRM ACTION",
|
|
843
|
+
description: "Are you sure you want toggle the state of this user type?",
|
|
844
|
+
dataTestId: "userlist-modal-status-confirmation"
|
|
845
|
+
}
|
|
846
|
+
),
|
|
847
|
+
/* @__PURE__ */ l(
|
|
848
|
+
Qe,
|
|
849
|
+
{
|
|
850
|
+
open: Q === 2,
|
|
851
|
+
handleClose: () => _(0),
|
|
852
|
+
handleClick: Nt,
|
|
853
|
+
title: "CONFIRM ACTION",
|
|
854
|
+
description: "Are you sure you want to Generate SOH code ?",
|
|
855
|
+
dataTestId: "userlist-modal-generate-soh-confirmation"
|
|
856
|
+
}
|
|
857
|
+
),
|
|
858
|
+
/* @__PURE__ */ l(_t, { isLoading: fe, children: /* @__PURE__ */ p(
|
|
859
|
+
A,
|
|
860
|
+
{
|
|
861
|
+
container: !0,
|
|
862
|
+
className: "flex flex-col md:flex-row mb-2 justify-between items-start md:items-center space-y-2 md:space-y-0",
|
|
863
|
+
children: [
|
|
864
|
+
/* @__PURE__ */ l(A, { children: /* @__PURE__ */ l(
|
|
865
|
+
We,
|
|
866
|
+
{
|
|
867
|
+
variant: "body2",
|
|
868
|
+
className: "font-bold font-sans text-lg text-[var(--color-customBlue)] uppercase text-customBlue",
|
|
869
|
+
"data-testid": "notification-list-typography-title",
|
|
870
|
+
children: oe("User List")
|
|
871
|
+
}
|
|
872
|
+
) }),
|
|
873
|
+
/* @__PURE__ */ p(A, { className: "flex flex-col md:flex-row w-full md:w-auto space-y-2 md:space-y-0 md:space-x-3", children: [
|
|
874
|
+
/* @__PURE__ */ l(A, { className: "w-full md:w-auto", children: /* @__PURE__ */ l(
|
|
875
|
+
Jt,
|
|
876
|
+
{
|
|
877
|
+
name: "searchQuery",
|
|
878
|
+
id: "searchQuery",
|
|
879
|
+
className: "w-full md:w-auto",
|
|
880
|
+
placeholder: "Search...",
|
|
881
|
+
size: "small",
|
|
882
|
+
onChange: (e) => {
|
|
883
|
+
var r;
|
|
884
|
+
return P((r = e.target) == null ? void 0 : r.value);
|
|
885
|
+
},
|
|
886
|
+
value: m,
|
|
887
|
+
"data-testid": "userlist-textfield-search",
|
|
888
|
+
sx: {
|
|
889
|
+
"& .MuiInputBase-root": {
|
|
890
|
+
backgroundColor: (e) => e.palette.background.paper
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
) }),
|
|
895
|
+
/* @__PURE__ */ p("div", { className: "flex items-center gap-3 flex-wrap md:flex-nowrap", children: [
|
|
896
|
+
/* @__PURE__ */ p(
|
|
897
|
+
"div",
|
|
898
|
+
{
|
|
899
|
+
className: `flex items-center rounded-2xl p-1 shadow-sm transition-all duration-300 border ${B ? "bg-slate-900 border-slate-800" : "bg-white border-slate-200"}`,
|
|
900
|
+
children: [
|
|
901
|
+
/* @__PURE__ */ l(
|
|
902
|
+
"button",
|
|
903
|
+
{
|
|
904
|
+
disabled: Ye,
|
|
905
|
+
onClick: Et,
|
|
906
|
+
className: `px-4 py-2 rounded-xl transition-all flex items-center gap-2 text-xs font-black uppercase tracking-wider ${B ? "text-slate-400 hover:text-slate-100 hover:bg-slate-800" : "text-slate-600 hover:text-red-600 hover:bg-slate-50"}`,
|
|
907
|
+
children: Ye ? /* @__PURE__ */ p(ge, { children: [
|
|
908
|
+
/* @__PURE__ */ l(Xe, { size: 14, sx: { color: "inherit" } }),
|
|
909
|
+
/* @__PURE__ */ l(R, { icon: et, className: "mr-1" }),
|
|
910
|
+
"Pdf"
|
|
911
|
+
] }) : /* @__PURE__ */ p(ge, { children: [
|
|
912
|
+
/* @__PURE__ */ l(R, { icon: et, className: "mr-1" }),
|
|
913
|
+
"Pdf"
|
|
914
|
+
] })
|
|
915
|
+
}
|
|
916
|
+
),
|
|
917
|
+
/* @__PURE__ */ l(
|
|
918
|
+
"button",
|
|
919
|
+
{
|
|
920
|
+
disabled: qe,
|
|
921
|
+
onClick: () => At(),
|
|
922
|
+
className: `px-4 py-2 rounded-xl transition-all flex items-center gap-2 text-xs font-black uppercase tracking-wider ml-1 ${B ? "bg-slate-800 text-slate-100 hover:bg-slate-700" : "bg-[#243A50] text-white hover:bg-[#1a2b3c]"}`,
|
|
923
|
+
children: qe ? /* @__PURE__ */ p(ge, { children: [
|
|
924
|
+
/* @__PURE__ */ l(Xe, { size: 14, sx: { color: "inherit" } }),
|
|
925
|
+
/* @__PURE__ */ l(R, { icon: tt, className: "mr-1" }),
|
|
926
|
+
"Excel Data"
|
|
927
|
+
] }) : /* @__PURE__ */ p(ge, { children: [
|
|
928
|
+
/* @__PURE__ */ l(R, { icon: tt, className: "mr-1" }),
|
|
929
|
+
"Excel Data"
|
|
930
|
+
] })
|
|
931
|
+
}
|
|
932
|
+
)
|
|
933
|
+
]
|
|
934
|
+
}
|
|
935
|
+
),
|
|
936
|
+
(v == null ? void 0 : v["create.manage.users"]) && /* @__PURE__ */ l(
|
|
937
|
+
Ae,
|
|
938
|
+
{
|
|
939
|
+
variant: "contained",
|
|
940
|
+
className: "w-auto ml-auto",
|
|
941
|
+
onClick: () => {
|
|
942
|
+
Y("button_click", {
|
|
943
|
+
button_name: "add_user",
|
|
944
|
+
button_type: "navigate",
|
|
945
|
+
button_id: "userlist-button-add"
|
|
946
|
+
}), q("/ui/medplat/manage/user");
|
|
947
|
+
},
|
|
948
|
+
size: "small",
|
|
949
|
+
"data-testid": "userlist-button-add",
|
|
950
|
+
children: oe("Add")
|
|
951
|
+
}
|
|
952
|
+
)
|
|
953
|
+
] })
|
|
954
|
+
] })
|
|
955
|
+
]
|
|
956
|
+
}
|
|
957
|
+
) }),
|
|
958
|
+
/* @__PURE__ */ l(Ut, { isLoading: Ne, children: u && /* @__PURE__ */ p("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mt-4 mb-4", children: [
|
|
959
|
+
/* @__PURE__ */ l(
|
|
960
|
+
ve,
|
|
961
|
+
{
|
|
962
|
+
title: "Total Users",
|
|
963
|
+
value: (u == null ? void 0 : u.total_users) || 0,
|
|
964
|
+
icon: nl,
|
|
965
|
+
bottomIndicator: E,
|
|
966
|
+
selected: V === "BOTH" && w.length === 0,
|
|
967
|
+
selectedBgColor: E,
|
|
968
|
+
selectedTitleColor: O,
|
|
969
|
+
selectedValueColor: O,
|
|
970
|
+
onClick: () => {
|
|
971
|
+
(u == null ? void 0 : u.total_users) > 0 ? (U([]), X("BOTH"), Z((e) => ({
|
|
972
|
+
...e,
|
|
973
|
+
status: "BOTH"
|
|
974
|
+
}))) : b({ message: "No users found", type: "warning" });
|
|
975
|
+
}
|
|
976
|
+
}
|
|
977
|
+
),
|
|
978
|
+
/* @__PURE__ */ l(
|
|
979
|
+
ve,
|
|
980
|
+
{
|
|
981
|
+
title: "Active Users",
|
|
982
|
+
value: (u == null ? void 0 : u.active_count) || 0,
|
|
983
|
+
icon: sl,
|
|
984
|
+
bottomIndicator: se,
|
|
985
|
+
selected: V === "ACTIVE" && w.length === 0,
|
|
986
|
+
selectedBgColor: se,
|
|
987
|
+
selectedTitleColor: O,
|
|
988
|
+
selectedValueColor: O,
|
|
989
|
+
onClick: () => {
|
|
990
|
+
(u == null ? void 0 : u.active_count) > 0 ? (U([]), X("ACTIVE"), Z((e) => ({
|
|
991
|
+
...e,
|
|
992
|
+
status: "ACTIVE"
|
|
993
|
+
}))) : b({
|
|
994
|
+
message: "No active users found",
|
|
995
|
+
type: "warning"
|
|
996
|
+
});
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
),
|
|
1000
|
+
/* @__PURE__ */ l(
|
|
1001
|
+
ve,
|
|
1002
|
+
{
|
|
1003
|
+
title: "Inactive Users",
|
|
1004
|
+
value: (u == null ? void 0 : u.inactive_count) || 0,
|
|
1005
|
+
icon: il,
|
|
1006
|
+
bottomIndicator: ie,
|
|
1007
|
+
selected: V === "INACTIVE" && w.length === 0,
|
|
1008
|
+
selectedBgColor: ie,
|
|
1009
|
+
selectedTitleColor: O,
|
|
1010
|
+
selectedValueColor: O,
|
|
1011
|
+
onClick: () => {
|
|
1012
|
+
(u == null ? void 0 : u.inactive_count) > 0 ? (U([]), X("INACTIVE"), Z((e) => ({
|
|
1013
|
+
...e,
|
|
1014
|
+
status: "INACTIVE"
|
|
1015
|
+
}))) : b({
|
|
1016
|
+
message: "No inactive users found",
|
|
1017
|
+
type: "warning"
|
|
1018
|
+
});
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
),
|
|
1022
|
+
/* @__PURE__ */ l(
|
|
1023
|
+
ve,
|
|
1024
|
+
{
|
|
1025
|
+
title: "Admins",
|
|
1026
|
+
value: (u == null ? void 0 : u.admin_role_count) || 0,
|
|
1027
|
+
icon: dl,
|
|
1028
|
+
bottomIndicator: de,
|
|
1029
|
+
selected: w.length > 0,
|
|
1030
|
+
selectedBgColor: de,
|
|
1031
|
+
selectedTitleColor: O,
|
|
1032
|
+
selectedValueColor: O,
|
|
1033
|
+
onClick: () => {
|
|
1034
|
+
(u == null ? void 0 : u.admin_role_count) > 0 ? (X("BOTH"), Z((e) => ({
|
|
1035
|
+
...e,
|
|
1036
|
+
status: "BOTH"
|
|
1037
|
+
})), U(G)) : b({
|
|
1038
|
+
message: "No active users found",
|
|
1039
|
+
type: "warning"
|
|
1040
|
+
});
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1043
|
+
)
|
|
1044
|
+
] }) }),
|
|
1045
|
+
/* @__PURE__ */ l(
|
|
1046
|
+
Ht,
|
|
1047
|
+
{
|
|
1048
|
+
columns: yt,
|
|
1049
|
+
tableData: vt,
|
|
1050
|
+
actions: It,
|
|
1051
|
+
paginationConfig: {
|
|
1052
|
+
pagination: !0,
|
|
1053
|
+
paginationType: "infinite-scroll",
|
|
1054
|
+
rowsPerPageInTable: _e,
|
|
1055
|
+
hasMore: F,
|
|
1056
|
+
loadMore: () => F && Tt({ cancelRefetch: !1 })
|
|
1057
|
+
},
|
|
1058
|
+
styleConfig: { cellStyle: { maxLines: 2 } },
|
|
1059
|
+
isLoading: y ? fe : !0,
|
|
1060
|
+
handleSort: Ct,
|
|
1061
|
+
dataTestId: "userlist-table-customized"
|
|
1062
|
+
}
|
|
1063
|
+
),
|
|
1064
|
+
/* @__PURE__ */ l(
|
|
1065
|
+
Vt,
|
|
1066
|
+
{
|
|
1067
|
+
title: "User Filter",
|
|
1068
|
+
resetButtonLabel: "Reset",
|
|
1069
|
+
onResetClick: Ot,
|
|
1070
|
+
FormBody: st,
|
|
1071
|
+
handleOverlayState: je,
|
|
1072
|
+
overlayOpen: Ee,
|
|
1073
|
+
dataTestId: "userlist-overlay-filter",
|
|
1074
|
+
formProps: {
|
|
1075
|
+
setAdminRoleIdsStats: U,
|
|
1076
|
+
setIsLoading: H,
|
|
1077
|
+
isLoading: fe,
|
|
1078
|
+
setLocationId: Ue,
|
|
1079
|
+
setRoleDetails: Fe,
|
|
1080
|
+
roleDetails: k,
|
|
1081
|
+
status: V,
|
|
1082
|
+
setStatus: X,
|
|
1083
|
+
setSelectedLocation: Pe,
|
|
1084
|
+
selectedLocation: ft,
|
|
1085
|
+
filterRequired: pt,
|
|
1086
|
+
setFilterRequired: Me,
|
|
1087
|
+
setUserFilterPreference: Z,
|
|
1088
|
+
user: S,
|
|
1089
|
+
userFilterPreference: s,
|
|
1090
|
+
locationIdRef: Be,
|
|
1091
|
+
setSelectedLocationId: Re,
|
|
1092
|
+
resetLocationDirective: ht,
|
|
1093
|
+
setResetLocationDirective: He,
|
|
1094
|
+
locations: gt,
|
|
1095
|
+
setLocations: Ve
|
|
1096
|
+
}
|
|
1097
|
+
}
|
|
1098
|
+
)
|
|
1099
|
+
] });
|
|
1100
|
+
}
|
|
1101
|
+
export {
|
|
1102
|
+
zl as default
|
|
1103
|
+
};
|
|
1104
|
+
//# sourceMappingURL=UserList-S5Q76wO7-Cj5u_K4_.js.map
|