@argusoft/medplat-core 1.0.26 → 1.0.28

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.
Files changed (58) hide show
  1. package/dist/{AccessRights-CupmTG3T.js → AccessRights-CHu27ZOw.js} +220 -217
  2. package/dist/AccessRights-CHu27ZOw.js.map +1 -0
  3. package/dist/{AddEditQueryBuilder-C8ZSkOF0.js → AddEditQueryBuilder-Brdnm6rQ.js} +2 -2
  4. package/dist/{AddEditQueryBuilder-C8ZSkOF0.js.map → AddEditQueryBuilder-Brdnm6rQ.js.map} +1 -1
  5. package/dist/{AddFeatures-CqE3v0BN.js → AddFeatures-C0Z29oSd.js} +2 -2
  6. package/dist/{AddFeatures-CqE3v0BN.js.map → AddFeatures-C0Z29oSd.js.map} +1 -1
  7. package/dist/{AddLabelModal-CB8E8cYG.js → AddLabelModal-DFllBVcd.js} +2 -2
  8. package/dist/{AddLabelModal-CB8E8cYG.js.map → AddLabelModal-DFllBVcd.js.map} +1 -1
  9. package/dist/{AppModal-BKgIwe1h.js → AppModal-CtG2GjD_.js} +2 -2
  10. package/dist/{AppModal-BKgIwe1h.js.map → AppModal-CtG2GjD_.js.map} +1 -1
  11. package/dist/{ChangePasswordModalCore-DTYWRTa-.js → ChangePasswordModalCore-CDxkeIIM.js} +2 -2
  12. package/dist/{ChangePasswordModalCore-DTYWRTa-.js.map → ChangePasswordModalCore-CDxkeIIM.js.map} +1 -1
  13. package/dist/{EventConfigurations-lPcZGpLi.js → EventConfigurations-kNtAj_WM.js} +76 -76
  14. package/dist/EventConfigurations-kNtAj_WM.js.map +1 -0
  15. package/dist/{FeatureMenu-DUZL32RI.js → FeatureMenu-jl7-Tk6y.js} +49 -49
  16. package/dist/FeatureMenu-jl7-Tk6y.js.map +1 -0
  17. package/dist/{ImmunizationConfigurationBase-BevKZx_l.js → ImmunizationConfigurationBase-DZGqwda2.js} +470 -470
  18. package/dist/ImmunizationConfigurationBase-DZGqwda2.js.map +1 -0
  19. package/dist/{ImmunizationConfigurationsList-K2ddBpPJ.js → ImmunizationConfigurationsList-DdSZicTP.js} +72 -73
  20. package/dist/{ImmunizationConfigurationsList-K2ddBpPJ.js.map → ImmunizationConfigurationsList-DdSZicTP.js.map} +1 -1
  21. package/dist/{LanguagesModal-CX3oS8rk.js → LanguagesModal-D6VfaGrl.js} +2 -2
  22. package/dist/{LanguagesModal-CX3oS8rk.js.map → LanguagesModal-D6VfaGrl.js.map} +1 -1
  23. package/dist/{ManageNotification-CSl02Wq7.js → ManageNotification-CaBAOhji.js} +2 -2
  24. package/dist/{ManageNotification-CSl02Wq7.js.map → ManageNotification-CaBAOhji.js.map} +1 -1
  25. package/dist/{ManageRole-B9bs_T00.js → ManageRole-CGYfglpo.js} +2 -2
  26. package/dist/{ManageRole-B9bs_T00.js.map → ManageRole-CGYfglpo.js.map} +1 -1
  27. package/dist/{ManageTranslation-D9IScGhk.js → ManageTranslation-B4C9-lWD.js} +74 -74
  28. package/dist/ManageTranslation-B4C9-lWD.js.map +1 -0
  29. package/dist/{ManageUser-AB3_Vfp_.js → ManageUser-AY1EUDLI.js} +600 -601
  30. package/dist/{ManageUser-AB3_Vfp_.js.map → ManageUser-AY1EUDLI.js.map} +1 -1
  31. package/dist/{NotificationList-D1U1LYnz.js → NotificationList-C3Vb_jKU.js} +73 -73
  32. package/dist/NotificationList-C3Vb_jKU.js.map +1 -0
  33. package/dist/{QueryBuilder-DI0wCJbz.js → QueryBuilder-z7eqfd7D.js} +117 -119
  34. package/dist/QueryBuilder-z7eqfd7D.js.map +1 -0
  35. package/dist/{QueryManagement-CRykYGum.js → QueryManagement-BIhEDKuA.js} +114 -114
  36. package/dist/QueryManagement-BIhEDKuA.js.map +1 -0
  37. package/dist/{RoleManagement-BIiW9uTq.js → RoleManagement-BPl2cE27.js} +99 -99
  38. package/dist/RoleManagement-BPl2cE27.js.map +1 -0
  39. package/dist/{SubMenu-CM_4wNCR.js → SubMenu-DYxAPH2Z.js} +34 -34
  40. package/dist/SubMenu-DYxAPH2Z.js.map +1 -0
  41. package/dist/{UserList-2gGuDgNa.js → UserList-Bc8gYxRL.js} +397 -400
  42. package/dist/UserList-Bc8gYxRL.js.map +1 -0
  43. package/dist/{WidgetList-B7X8Awkg.js → WidgetList-Dw_FmbbE.js} +26 -26
  44. package/dist/WidgetList-Dw_FmbbE.js.map +1 -0
  45. package/dist/index.js +11 -11
  46. package/package.json +1 -1
  47. package/dist/AccessRights-CupmTG3T.js.map +0 -1
  48. package/dist/EventConfigurations-lPcZGpLi.js.map +0 -1
  49. package/dist/FeatureMenu-DUZL32RI.js.map +0 -1
  50. package/dist/ImmunizationConfigurationBase-BevKZx_l.js.map +0 -1
  51. package/dist/ManageTranslation-D9IScGhk.js.map +0 -1
  52. package/dist/NotificationList-D1U1LYnz.js.map +0 -1
  53. package/dist/QueryBuilder-DI0wCJbz.js.map +0 -1
  54. package/dist/QueryManagement-CRykYGum.js.map +0 -1
  55. package/dist/RoleManagement-BIiW9uTq.js.map +0 -1
  56. package/dist/SubMenu-CM_4wNCR.js.map +0 -1
  57. package/dist/UserList-2gGuDgNa.js.map +0 -1
  58. package/dist/WidgetList-B7X8Awkg.js.map +0 -1
@@ -1,192 +1,192 @@
1
- import { jsx as a, jsxs as p, Fragment as ye } from "react/jsx-runtime";
2
- import { useTranslateProvider as nt } from "@/common/languageTranslator/TranslationContext";
3
- import { g as st, t as _t, a as wt, b as We } from "./Users-CsJ08Kjm.js";
4
- import { showToast as T } from "@/common/toaster/toaster.jsx";
5
- import Bt from "@/hooks/usePagination.js";
6
- import { getAssignedFeatures as Lt } from "@/utils/feature.js";
7
- import Xe from "@/views/custom-components/CustomConfirmationModal.jsx";
1
+ import { jsx as a, jsxs as u, Fragment as ge } from "react/jsx-runtime";
2
+ import { useTranslateProvider as st } from "@/common/languageTranslator/TranslationContext";
3
+ import { g as rt, t as wt, a as Bt, b as Xe } from "./Users-CsJ08Kjm.js";
4
+ import { showToast as k } from "@/common/toaster/toaster.jsx";
5
+ import Lt from "@/hooks/usePagination.js";
6
+ import { getAssignedFeatures as Rt } from "@/utils/feature.js";
7
+ import Ze from "@/views/custom-components/CustomConfirmationModal.jsx";
8
8
  import Mt from "@/views/custom-components/CustomizedTable/CustomizedTableV2";
9
- import Rt from "@/views/custom-components/SideOverlay.jsx";
10
- import f from "prop-types";
11
- import { useState as d, useEffect as G, Suspense as $t, lazy as Ht, useRef as Ze, useMemo as Ft, useCallback as Vt } from "react";
12
- import { InputLabel as ke, Switch as jt, Button as Ue, Box as E, Card as Dt, Typography as et, TextField as zt, CircularProgress as tt, Tooltip as Yt } from "@mui/material";
9
+ import $t from "@/views/custom-components/SideOverlay.jsx";
10
+ import p from "prop-types";
11
+ import { useState as c, useEffect as q, Suspense as Ht, lazy as Ft, useRef as et, useMemo as Vt, useCallback as jt } from "react";
12
+ import { InputLabel as Ue, Switch as Dt, Button as Se, Box as E, Card as zt, Typography as tt, TextField as Yt, CircularProgress as at, Tooltip as Gt } from "@mui/material";
13
13
  import _ from "@mui/material/Grid2";
14
- import at from "@/views/custom-components/CustomDropdown";
15
- import { useForm as qt, FormProvider as Gt } from "react-hook-form";
16
- import rt from "@/hooks/useTrackEvent";
17
- import { showToast as Jt } from "@/common/toaster/toaster";
18
- import { useDispatch as it, useSelector as Qt } from "react-redux";
19
- import { setUserDetails as Se } from "@/store/reducers/AuthenticationReducer";
20
- import { useLocation as ct, useNavigate as Kt } from "react-router";
21
- import { U as Pt, a as Wt, b as Xt, c as Zt } from "./UserListSkeleton-BMKANCtW.js";
22
- import ea from "@/common/config/implementationConfig";
23
- import { useTheme as ta, alpha as k } from "@mui/material/styles";
24
- import { execute as aa } from "@/common/services/QueryBuilder";
25
- import { faPen as oa, faBars as la, faFilePdf as ot, faFileExcel as lt, faUsers as na, faCheckCircle as sa, faTimesCircle as ra, faUserShield as ia, faPhone as ca, faHospital as da } from "@fortawesome/free-solid-svg-icons";
14
+ import ot from "@/views/custom-components/CustomDropdown";
15
+ import { useForm as qt, FormProvider as Jt } from "react-hook-form";
16
+ import it from "@/hooks/useTrackEvent";
17
+ import { showToast as Qt } from "@/common/toaster/toaster";
18
+ import { useDispatch as ct, useSelector as Kt } from "react-redux";
19
+ import { setUserDetails as Ae } from "@/store/reducers/AuthenticationReducer";
20
+ import { useLocation as dt, useNavigate as Pt } from "react-router";
21
+ import { U as Wt, a as Xt, b as Zt, c as ea } from "./UserListSkeleton-BMKANCtW.js";
22
+ import ta from "@/common/config/implementationConfig";
23
+ import { useTheme as aa, alpha as T } from "@mui/material/styles";
24
+ import { execute as oa } from "@/common/services/QueryBuilder";
25
+ import { faPen as la, faBars as na, faFilePdf as lt, faFileExcel as nt, faUsers as sa, faCheckCircle as ra, faTimesCircle as ia, faUserShield as ca, faPhone as da, faHospital as ma } from "@fortawesome/free-solid-svg-icons";
26
26
  import { FontAwesomeIcon as V } from "@fortawesome/react-fontawesome";
27
- import { F as ma } from "./FileSaver.min-CN9EpL2h.js";
27
+ import { F as fa } from "./FileSaver.min-CN9EpL2h.js";
28
28
  import { x as P } from "./xlsx.min-D1LFqt_b.js";
29
- import fa from "@/hooks/useDownloadPdf.js";
30
- import be from "@/views/custom-components/CustomStatsComponent.jsx";
31
- import "@/common/services/util/GeneralUtil.js";
32
- import './UserList.css';const pa = Ht(
29
+ import pa from "@/hooks/useDownloadPdf.js";
30
+ import ye from "@/views/custom-components/CustomStatsComponent.jsx";
31
+ import be from "@/common/services/util/GeneralUtil.js";
32
+ import './UserList.css';const ua = Ft(
33
33
  () => import("@/views/feature-components/LocationDirective/LocationDirectiveV2")
34
- ), dt = ({
34
+ ), mt = ({
35
35
  handleOverlayState: W,
36
- setIsLoading: M,
36
+ setIsLoading: R,
37
37
  isLoading: X,
38
- setLocationId: re,
38
+ setLocationId: se,
39
39
  setRoleDetails: Z,
40
40
  roleDetails: j,
41
41
  status: ee,
42
- setStatus: ie,
43
- selectedLocation: C,
42
+ setStatus: re,
43
+ selectedLocation: N,
44
44
  setSelectedLocation: v,
45
45
  filterRequired: w,
46
46
  setUserFilterPreference: D,
47
47
  user: U,
48
- setFilterRequired: m,
48
+ setFilterRequired: d,
49
49
  locationIdRef: xe,
50
- locations: Ne,
50
+ locations: Ce,
51
51
  setLocations: te,
52
52
  setAdminRoleIdsStats: n
53
53
  }) => {
54
- const [R, ce] = d([]), B = rt(), { translate: y } = nt(), de = qt({ mode: "onChange" }), ae = it(), u = ct(), {
55
- control: oe,
54
+ const [M, ie] = c([]), B = it(), { translate: m } = st(), ce = qt({ mode: "onChange" }), Ne = ct(), h = dt(), {
55
+ control: ae,
56
56
  handleSubmit: O,
57
- formState: { errors: le },
58
- getValues: me,
57
+ formState: { errors: oe },
58
+ getValues: de,
59
59
  setValue: J,
60
60
  clearErrors: $
61
- } = de, fe = async () => {
62
- var I, H, S, g;
61
+ } = ce, me = async () => {
62
+ var I, H, S, y;
63
63
  try {
64
- const { data: L } = await st({}, { showLoader: !1 });
65
- ce(L), j != null && j.id && J("roleId", j.id), ee && J("status", ee), ((I = Object.keys((U == null ? void 0 : U.userFilterPreference) || {})) == null ? void 0 : I.length) > 0 && ((H = u == null ? void 0 : u.state) == null ? void 0 : H.fromManageUser) === !0 && (J("roleId", (S = U == null ? void 0 : U.userFilterPreference) == null ? void 0 : S.roleid), J("status", (g = U == null ? void 0 : U.userFilterPreference) == null ? void 0 : g.status));
64
+ const { data: L } = await rt({}, { showLoader: !1 });
65
+ ie(L), j != null && j.id && J("roleId", j.id), ee && J("status", ee), ((I = Object.keys((U == null ? void 0 : U.userFilterPreference) || {})) == null ? void 0 : I.length) > 0 && ((H = h == null ? void 0 : h.state) == null ? void 0 : H.fromManageUser) === !0 && (J("roleId", (S = U == null ? void 0 : U.userFilterPreference) == null ? void 0 : S.roleid), J("status", (y = U == null ? void 0 : U.userFilterPreference) == null ? void 0 : y.status));
66
66
  } catch (L) {
67
67
  console.error(L);
68
68
  }
69
69
  };
70
- G(() => {
71
- fe();
70
+ q(() => {
71
+ me();
72
72
  }, []);
73
- const pe = async () => {
73
+ const fe = async () => {
74
74
  var I, H;
75
75
  try {
76
- M((F) => !F), n([]), B("button_click", {
76
+ R((F) => !F), n([]), B("button_click", {
77
77
  button_name: "User Filter-filter-button",
78
78
  button_type: "filter",
79
79
  button_id: "userfilterform-search-button"
80
80
  });
81
- const S = me("status") || "BOTH";
82
- S && ie(S);
83
- const g = {
81
+ const S = de("status") || "BOTH";
82
+ S && re(S);
83
+ const y = {
84
84
  limit: 50,
85
85
  offset: 0,
86
86
  order: "asc",
87
87
  orderby: "userName",
88
88
  status: S
89
- }, L = (H = (I = C == null ? void 0 : C.finalSelected) == null ? void 0 : I.optionSelected) == null ? void 0 : H.id;
90
- L ? (g.locationId = L, re(L)) : re(null);
91
- const z = R.find(
92
- (F) => F.id === me("roleId")
89
+ }, L = (H = (I = N == null ? void 0 : N.finalSelected) == null ? void 0 : I.optionSelected) == null ? void 0 : H.id;
90
+ L ? (y.locationId = L, se(L)) : se(null);
91
+ const z = M.find(
92
+ (F) => F.id === de("roleId")
93
93
  );
94
- z != null && z.id ? (g.roleid = z.id, Z(z)) : Z(null), D(g), ae(
95
- Se({
94
+ z != null && z.id ? (y.roleid = z.id, Z(z)) : Z(null), D(y), Ne(
95
+ Ae({
96
96
  ...U,
97
97
  userFilterPreference: {
98
- ...g,
98
+ ...y,
99
99
  filterRequired: w,
100
- selectedLocation: C
100
+ selectedLocation: N
101
101
  }
102
102
  })
103
103
  ), B("filter", {
104
104
  filter_type: ["location", "role", "status"],
105
- ...g
106
- }), M((F) => !F), W();
105
+ ...y
106
+ }), R((F) => !F), W();
107
107
  } catch (S) {
108
- Jt({ message: `error : ${S == null ? void 0 : S.message}`, type: "error" }), M((g) => !g);
108
+ Qt({ message: `error : ${S == null ? void 0 : S.message}`, type: "error" }), R((y) => !y);
109
109
  }
110
110
  };
111
- return /* @__PURE__ */ a(Gt, { ...de, children: /* @__PURE__ */ p(
111
+ return /* @__PURE__ */ a(Jt, { ...ce, children: /* @__PURE__ */ u(
112
112
  _,
113
113
  {
114
114
  className: "m-[1rem]",
115
115
  component: "form",
116
116
  onSubmit: (I) => {
117
- if (Object.keys(le).length > 0) {
117
+ if (Object.keys(oe).length > 0) {
118
118
  I.preventDefault();
119
119
  return;
120
120
  }
121
- O(pe)(I);
121
+ O(fe)(I);
122
122
  },
123
123
  "data-testid": "userfilterform-container-grid",
124
124
  noValidate: !0,
125
125
  children: [
126
- /* @__PURE__ */ a(Pt, { isLoading: X, children: /* @__PURE__ */ p(_, { className: "flex items-center", children: [
127
- /* @__PURE__ */ p(ke, { children: [
128
- y("Location Filter Required"),
126
+ /* @__PURE__ */ a(Wt, { isLoading: X, children: /* @__PURE__ */ u(_, { className: "flex items-center", children: [
127
+ /* @__PURE__ */ u(Ue, { children: [
128
+ m("Location Filter Required"),
129
129
  " :"
130
130
  ] }),
131
131
  /* @__PURE__ */ a(
132
- jt,
132
+ Dt,
133
133
  {
134
134
  defaultChecked: !0,
135
135
  checked: w,
136
136
  onChange: (I) => {
137
- m(I.target.checked), I.target.checked || (xe.current = null, $("level1"));
137
+ d(I.target.checked), I.target.checked || (xe.current = null, $("level1"));
138
138
  }
139
139
  }
140
140
  )
141
141
  ] }) }),
142
- w === !0 && /* @__PURE__ */ a($t, { children: /* @__PURE__ */ a(
143
- pa,
142
+ w === !0 && /* @__PURE__ */ a(Ht, { children: /* @__PURE__ */ a(
143
+ ua,
144
144
  {
145
145
  childForm: !0,
146
- selectedLocation: C,
146
+ selectedLocation: N,
147
147
  setSelectedLocation: v,
148
148
  templateType: "inline",
149
149
  disabled: X,
150
- locations: Ne,
150
+ locations: Ce,
151
151
  setLocations: te,
152
- fetchAccordingToUserAoi: ea.user.filterLocationsByUserAoi
152
+ fetchAccordingToUserAoi: ta.user.filterLocationsByUserAoi
153
153
  }
154
154
  ) }),
155
- /* @__PURE__ */ a(Wt, { isLoading: X, children: /* @__PURE__ */ p(_, { children: [
156
- /* @__PURE__ */ a(ke, { "data-testid": "userfilterform-role-label", children: y("Role") }),
155
+ /* @__PURE__ */ a(Xt, { isLoading: X, children: /* @__PURE__ */ u(_, { children: [
156
+ /* @__PURE__ */ a(Ue, { "data-testid": "userfilterform-role-label", children: m("Role") }),
157
157
  /* @__PURE__ */ a(
158
- at,
158
+ ot,
159
159
  {
160
- control: oe,
160
+ control: ae,
161
161
  name: "roleId",
162
- options: R,
162
+ options: M,
163
163
  displayName: "name",
164
164
  optionValue: "id",
165
- errors: le,
165
+ errors: oe,
166
166
  dataTestId: "userfilterform-role-dropdown",
167
167
  className: "mb-[0.3125rem]"
168
168
  }
169
169
  ),
170
170
  /* @__PURE__ */ a(
171
- ke,
171
+ Ue,
172
172
  {
173
173
  className: "mt-2",
174
174
  "data-testid": "userfilterform-status-label",
175
- children: y("Status")
175
+ children: m("Status")
176
176
  }
177
177
  ),
178
178
  /* @__PURE__ */ a(
179
- at,
179
+ ot,
180
180
  {
181
- control: oe,
181
+ control: ae,
182
182
  name: "status",
183
183
  defaultValue: "BOTH",
184
184
  options: ["ACTIVE", "INACTIVE", "BOTH"],
185
- errors: le,
185
+ errors: oe,
186
186
  dataTestId: "userfilterform-status-dropdown"
187
187
  }
188
188
  ),
189
- /* @__PURE__ */ p(
189
+ /* @__PURE__ */ u(
190
190
  _,
191
191
  {
192
192
  container: !0,
@@ -196,22 +196,22 @@ import './UserList.css';const pa = Ht(
196
196
  "data-testid": "userfilterform-buttons-container",
197
197
  children: [
198
198
  /* @__PURE__ */ a(_, { item: !0, "data-testid": "userfilterform-closebutton-item", children: /* @__PURE__ */ a(
199
- Ue,
199
+ Se,
200
200
  {
201
201
  variant: "contained",
202
202
  color: "secondary",
203
203
  onClick: () => W(),
204
204
  "data-testid": "userfilterform-close-button",
205
- children: y("Close")
205
+ children: m("Close")
206
206
  }
207
207
  ) }),
208
208
  /* @__PURE__ */ a(_, { item: !0, "data-testid": "userfilterform-searchbutton-item", children: /* @__PURE__ */ a(
209
- Ue,
209
+ Se,
210
210
  {
211
211
  variant: "contained",
212
212
  type: "submit",
213
213
  "data-testid": "userfilterform-search-button",
214
- children: y("Search")
214
+ children: m("Search")
215
215
  }
216
216
  ) })
217
217
  ]
@@ -222,68 +222,68 @@ import './UserList.css';const pa = Ht(
222
222
  }
223
223
  ) });
224
224
  };
225
- dt.propTypes = {
226
- handleOverlayState: f.any,
227
- setUsersData: f.any,
228
- setIsLoading: f.any,
229
- isLoading: f.any,
230
- setLocationId: f.func,
231
- setRoleDetails: f.func,
232
- roleDetails: f.any,
233
- status: f.any,
234
- setStatus: f.any,
235
- selectedLocation: f.any,
236
- setSelectedLocation: f.any,
237
- filterRequired: f.any,
238
- setFilterRequired: f.any,
239
- setUserFilterPreference: f.any,
240
- user: f.any,
241
- resetLocationDirective: f.any,
242
- locationIdRef: f.any,
243
- setSelectedLocationId: f.any,
244
- locations: f.any,
245
- setLocations: f.any,
246
- setAdminRoleIdsStats: f.any
225
+ mt.propTypes = {
226
+ handleOverlayState: p.any,
227
+ setUsersData: p.any,
228
+ setIsLoading: p.any,
229
+ isLoading: p.any,
230
+ setLocationId: p.func,
231
+ setRoleDetails: p.func,
232
+ roleDetails: p.any,
233
+ status: p.any,
234
+ setStatus: p.any,
235
+ selectedLocation: p.any,
236
+ setSelectedLocation: p.any,
237
+ filterRequired: p.any,
238
+ setFilterRequired: p.any,
239
+ setUserFilterPreference: p.any,
240
+ user: p.any,
241
+ resetLocationDirective: p.any,
242
+ locationIdRef: p.any,
243
+ setSelectedLocationId: p.any,
244
+ locations: p.any,
245
+ setLocations: p.any,
246
+ setAdminRoleIdsStats: p.any
247
247
  };
248
248
  function qa() {
249
- var ze, Ye, qe, Ge, Je, Qe;
250
- const W = Kt(), M = rt(), [X, re] = d([]);
251
- let Z = "#8688ecff", j = "#10b981", ee = "#f43f5e", ie = "#f59e0b", C = "#ffffffff";
252
- const [v, w] = d([]), [D, U] = d([]), [m, xe] = d(null), [Ne, te] = d(!1), n = ta(), R = n.palette.mode === "dark", [ce, B] = d(0), [y, de] = d({}), ae = Ze(y);
253
- G(() => {
254
- ae.current = y;
255
- }, [y]);
256
- const [u, oe] = d(null), [O, le] = d(""), [me, J] = d(""), [$, fe] = d([]), [pe, I] = d(!0), [H, S] = d(!1), [g, L] = d({
249
+ var Ye, Ge, qe, Je, Qe, Ke;
250
+ const W = Pt(), R = it(), [X, se] = c([]);
251
+ let Z = "#8688ecff", j = "#10b981", ee = "#f43f5e", re = "#f59e0b", N = "#ffffffff";
252
+ const [v, w] = c([]), [D, U] = c([]), [d, xe] = c(null), [Ce, te] = c(!1), n = aa(), M = n.palette.mode === "dark", [ie, B] = c(0), [m, ce] = c(null), Ne = et(m);
253
+ q(() => {
254
+ Ne.current = m;
255
+ }, [m]);
256
+ const [h, ae] = c(null), [O, oe] = c(""), [de, J] = c(""), [$, me] = c([]), [fe, I] = c(!0), [H, S] = c(!1), [y, L] = c({
257
257
  sortColumn: "userName",
258
258
  sortOrder: "asc"
259
- }), [z, F] = d(!1), Ae = 50, { translate: ne } = nt(), [ue, Y] = d(!1), [he, Ee] = d(null), [b, Oe] = d(null), [q, Q] = d(null), A = ct(), _e = it(), { user: x } = Qt((e) => e == null ? void 0 : e.Authenticate), [mt, we] = d(
260
- ((ze = x == null ? void 0 : x.userFilterPreference) == null ? void 0 : ze.locationId) || null
261
- ), Be = Ze(mt), [ft, Le] = d(
262
- ((Ye = A == null ? void 0 : A.state) == null ? void 0 : Ye.fromManageUser) === !0 && ((qe = x == null ? void 0 : x.userFilterPreference) == null ? void 0 : qe.selectedLocation) || {},
259
+ }), [z, F] = c(!1), Ee = 50, { translate: le } = st(), [pe, Y] = c(!1), [ue, Oe] = c(null), [b, _e] = c(null), [G, Q] = c(null), A = dt(), we = ct(), { user: x } = Kt((e) => e == null ? void 0 : e.Authenticate), [ft, Be] = c(
260
+ ((Ye = x == null ? void 0 : x.userFilterPreference) == null ? void 0 : Ye.locationId) || null
261
+ ), Le = et(ft), [pt, Re] = c(
262
+ ((Ge = A == null ? void 0 : A.state) == null ? void 0 : Ge.fromManageUser) === !0 && ((qe = x == null ? void 0 : x.userFilterPreference) == null ? void 0 : qe.selectedLocation) || {},
263
263
  {}
264
- ), [pt, Me] = d(
265
- ((Ge = A == null ? void 0 : A.state) == null ? void 0 : Ge.fromManageUser) === !0 && ((Je = x == null ? void 0 : x.userFilterPreference) == null ? void 0 : Je.filterRequired) || !1
266
- ), [s, K] = d(
267
- ((Qe = A == null ? void 0 : A.state) == null ? void 0 : Qe.fromManageUser) === !0 && (x == null ? void 0 : x.userFilterPreference) || {}
268
- ), [ut, Re] = d(0), [ht, $e] = d([]), gt = Ft(() => $ == null ? void 0 : $.map((e, o) => {
264
+ ), [ut, Me] = c(
265
+ ((Je = A == null ? void 0 : A.state) == null ? void 0 : Je.fromManageUser) === !0 && ((Qe = x == null ? void 0 : x.userFilterPreference) == null ? void 0 : Qe.filterRequired) || !1
266
+ ), [s, K] = c(
267
+ ((Ke = A == null ? void 0 : A.state) == null ? void 0 : Ke.fromManageUser) === !0 && (x == null ? void 0 : x.userFilterPreference) || {}
268
+ ), [ht, $e] = c(0), [gt, He] = c([]), yt = Vt(() => $ == null ? void 0 : $.map((e, o) => {
269
269
  let t = "";
270
270
  return e != null && e.title && (t += e.title + " "), e != null && e.firstName && (t += e.firstName + " "), e != null && e.lastName && (t += e.lastName), {
271
271
  ...e,
272
272
  index: o + 1,
273
273
  firstName: t.trim()
274
274
  };
275
- }), [$, R]);
276
- G(() => {
275
+ }), [$, M]);
276
+ q(() => {
277
277
  (async () => {
278
278
  var o, t;
279
279
  try {
280
280
  if (D.length > 0) {
281
281
  te(!0);
282
- const r = await aa(
282
+ const r = await oa(
283
283
  {
284
284
  code: "GET_USERS_STATS",
285
285
  parameters: {
286
- locationId: (s == null ? void 0 : s.locationId) || he,
286
+ locationId: (s == null ? void 0 : s.locationId) || ue,
287
287
  roleid: (s == null ? void 0 : s.roleid) || (b == null ? void 0 : b.id) || null,
288
288
  roleIds: D == null ? void 0 : D.join(",")
289
289
  }
@@ -297,7 +297,7 @@ function qa() {
297
297
  }
298
298
  })();
299
299
  }, [s, D]);
300
- const Ce = [
300
+ const ve = [
301
301
  { field: "Sr. No.", label: "#", align: "left" },
302
302
  {
303
303
  field: "userName",
@@ -307,20 +307,20 @@ function qa() {
307
307
  align: "left",
308
308
  render: (e) => {
309
309
  var o;
310
- return /* @__PURE__ */ p("div", { className: "flex items-center w-48 gap-4 h-full", children: [
310
+ return /* @__PURE__ */ u("div", { className: "flex items-center w-48 gap-4 h-full", children: [
311
311
  /* @__PURE__ */ a(
312
312
  E,
313
313
  {
314
314
  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",
315
315
  sx: {
316
- background: `linear-gradient(to bottom right, ${k(n.palette.primary.main, 0.05)}, ${k(n.palette.primary.main, 0.2)})`,
317
- border: `1px solid ${k(n.palette.primary.main, 0.2)}`,
316
+ background: `linear-gradient(to bottom right, ${T(n.palette.primary.main, 0.05)}, ${T(n.palette.primary.main, 0.2)})`,
317
+ border: `1px solid ${T(n.palette.primary.main, 0.2)}`,
318
318
  color: n.palette.primary.main
319
319
  },
320
320
  children: (o = e == null ? void 0 : e.firstName) == null ? void 0 : o.split(" ").filter((t) => !["Mr", "Ms", "Mrs"].includes(t)).map((t) => t[0]).join("").toUpperCase()
321
321
  }
322
322
  ),
323
- /* @__PURE__ */ p("div", { className: "w-[80%] flex flex-col h-full justify-center pt-2", children: [
323
+ /* @__PURE__ */ u("div", { className: "w-[80%] flex flex-col h-full justify-center pt-2", children: [
324
324
  /* @__PURE__ */ a(
325
325
  E,
326
326
  {
@@ -336,7 +336,7 @@ function qa() {
336
336
  children: e == null ? void 0 : e.firstName
337
337
  }
338
338
  ),
339
- /* @__PURE__ */ p(
339
+ /* @__PURE__ */ u(
340
340
  E,
341
341
  {
342
342
  component: "span",
@@ -371,20 +371,20 @@ function qa() {
371
371
  sortable: !0,
372
372
  align: "left",
373
373
  sortOrder: "asc",
374
- render: (e) => /* @__PURE__ */ a("div", { className: "flex items-center w-32 gap-4 h-full", children: /* @__PURE__ */ p("div", { className: "flex items-center text-md tracking-tight", children: [
374
+ render: (e) => /* @__PURE__ */ a("div", { className: "flex items-center w-32 gap-4 h-full", children: /* @__PURE__ */ u("div", { className: "flex items-center text-md tracking-tight", children: [
375
375
  /* @__PURE__ */ a(
376
376
  E,
377
377
  {
378
378
  className: "w-7 h-7 rounded-xl flex items-center justify-center mr-2 shadow-sm transition-all duration-300",
379
379
  sx: {
380
- backgroundColor: n.palette.mode === "dark" ? k(n.palette.common.white, 0.05) : "rgb(248, 250, 252)",
380
+ backgroundColor: n.palette.mode === "dark" ? T(n.palette.common.white, 0.05) : "rgb(248, 250, 252)",
381
381
  color: n.palette.text.disabled,
382
382
  ".group:hover &": {
383
383
  backgroundColor: n.palette.primary.main,
384
384
  color: "white"
385
385
  }
386
386
  },
387
- children: /* @__PURE__ */ a(V, { icon: ca, className: "text-xs" })
387
+ children: /* @__PURE__ */ a(V, { icon: da, className: "text-xs" })
388
388
  }
389
389
  ),
390
390
  /* @__PURE__ */ a(
@@ -415,9 +415,9 @@ function qa() {
415
415
  component: "span",
416
416
  className: "px-2.5 rounded-lg text-[0.6rem] font-black uppercase tracking-widest w-fit whitespace-nowrap",
417
417
  sx: {
418
- backgroundColor: k(n.palette.primary.main, 0.1),
418
+ backgroundColor: T(n.palette.primary.main, 0.1),
419
419
  color: n.palette.primary.main,
420
- border: `1px solid ${k(n.palette.primary.main, 0.2)}`
420
+ border: `1px solid ${T(n.palette.primary.main, 0.2)}`
421
421
  },
422
422
  children: e == null ? void 0 : e.roleName
423
423
  }
@@ -439,7 +439,7 @@ function qa() {
439
439
  className: "flex items-center text-md pl-2",
440
440
  sx: { color: n.palette.text.primary },
441
441
  children: /* @__PURE__ */ a(
442
- Yt,
442
+ Gt,
443
443
  {
444
444
  arrow: !0,
445
445
  placement: "top",
@@ -472,7 +472,7 @@ function qa() {
472
472
  align: "left",
473
473
  render: (e) => {
474
474
  var o;
475
- return /* @__PURE__ */ p("div", { className: "flex items-center gap-3 h-full", children: [
475
+ return /* @__PURE__ */ u("div", { className: "flex items-center gap-3 h-full", children: [
476
476
  /* @__PURE__ */ a(
477
477
  E,
478
478
  {
@@ -481,10 +481,10 @@ function qa() {
481
481
  color: n.palette.text.disabled,
482
482
  ".group:hover &": {
483
483
  color: n.palette.primary.main,
484
- backgroundColor: k(n.palette.primary.main, 0.1)
484
+ backgroundColor: T(n.palette.primary.main, 0.1)
485
485
  }
486
486
  },
487
- children: /* @__PURE__ */ a(V, { icon: da })
487
+ children: /* @__PURE__ */ a(V, { icon: ma })
488
488
  }
489
489
  ),
490
490
  /* @__PURE__ */ a(
@@ -511,14 +511,14 @@ function qa() {
511
511
  align: "left",
512
512
  render: (e) => {
513
513
  const o = (e == null ? void 0 : e.displayState) === "ACTIVE";
514
- return /* @__PURE__ */ a("div", { className: "flex items-center justify-center h-full", children: /* @__PURE__ */ p(
514
+ return /* @__PURE__ */ a("div", { className: "flex items-center justify-center h-full", children: /* @__PURE__ */ u(
515
515
  E,
516
516
  {
517
517
  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]",
518
518
  sx: {
519
- backgroundColor: o ? n.palette.mode === "dark" ? k(n.palette.success.main, 0.15) : "rgb(236, 253, 245)" : n.palette.mode === "dark" ? k(n.palette.error.main, 0.15) : "rgb(254, 242, 242)",
519
+ backgroundColor: o ? n.palette.mode === "dark" ? T(n.palette.success.main, 0.15) : "rgb(236, 253, 245)" : n.palette.mode === "dark" ? T(n.palette.error.main, 0.15) : "rgb(254, 242, 242)",
520
520
  color: o ? n.palette.mode === "dark" ? n.palette.success.light : "rgb(4, 120, 87)" : n.palette.mode === "dark" ? n.palette.error.light : "rgb(248, 113, 113)",
521
- borderColor: o ? k(n.palette.success.main, 0.3) : k(n.palette.error.main, 0.3)
521
+ borderColor: o ? T(n.palette.success.main, 0.3) : T(n.palette.error.main, 0.3)
522
522
  },
523
523
  children: [
524
524
  /* @__PURE__ */ a(
@@ -538,240 +538,237 @@ function qa() {
538
538
  label: "Actions".toUpperCase(),
539
539
  align: "left"
540
540
  }
541
- ], [yt, He] = d(Ce);
542
- G(() => {
543
- He(Ce);
544
- }, [R]);
545
- const bt = async () => {
541
+ ], [bt, Fe] = c(ve);
542
+ q(() => {
543
+ Fe(ve);
544
+ }, [M]);
545
+ const xt = async () => {
546
546
  var o, t, r, i;
547
- const e = u.displayState !== "ACTIVE";
547
+ const e = h.displayState !== "ACTIVE";
548
548
  try {
549
- await _t(u, { is_active: e }), B(0), F((c) => !c), T({
549
+ await wt(h, { is_active: e }), B(0), F((f) => !f), k({
550
550
  message: "User State Updated Successfully",
551
551
  type: "success"
552
552
  });
553
- } catch (c) {
554
- B(0), F((h) => !h);
555
- const l = (t = (o = c == null ? void 0 : c.response) == null ? void 0 : o.data) == null ? void 0 : t.errorcode, N = ((i = (r = c == null ? void 0 : c.response) == null ? void 0 : r.data) == null ? void 0 : i.message) || (c == null ? void 0 : c.message) || "Something went wrong";
556
- console.log(l, N), l === 400 ? T({
557
- message: `${N}`,
553
+ } catch (f) {
554
+ B(0), F((g) => !g);
555
+ const l = (t = (o = f == null ? void 0 : f.response) == null ? void 0 : o.data) == null ? void 0 : t.errorcode, C = ((i = (r = f == null ? void 0 : f.response) == null ? void 0 : r.data) == null ? void 0 : i.message) || (f == null ? void 0 : f.message) || "Something went wrong";
556
+ console.log(l, C), l === 400 ? k({
557
+ message: `${C}`,
558
558
  type: "error"
559
- }) : T({
559
+ }) : k({
560
560
  message: "Error in Updating User State.",
561
561
  type: "error"
562
562
  });
563
563
  }
564
- }, xt = async () => {
564
+ }, Ct = async () => {
565
565
  try {
566
- const e = await wt({
567
- userId: (u == null ? void 0 : u.userId) ?? (u == null ? void 0 : u.id)
566
+ const e = await Bt({
567
+ userId: (h == null ? void 0 : h.userId) ?? (h == null ? void 0 : h.id)
568
568
  });
569
- e && (fe((o) => o.map((t) => (t == null ? void 0 : t.userId) === ((u == null ? void 0 : u.userId) ?? (u == null ? void 0 : u.id)) ? { ...t, loginCode: e.data } : t)), T({
569
+ e && (me((o) => o.map((t) => (t == null ? void 0 : t.userId) === ((h == null ? void 0 : h.userId) ?? (h == null ? void 0 : h.id)) ? { ...t, loginCode: e.data } : t)), k({
570
570
  message: `You have successfully generated your login code. Your login code is : ${e.data}`,
571
571
  type: "success"
572
572
  }));
573
573
  } catch (e) {
574
- T({ message: `${e.response.data.message}`, type: "error" });
574
+ k({ message: `${e.response.data.message}`, type: "error" });
575
575
  } finally {
576
576
  B(0);
577
577
  }
578
- }, Nt = (e) => W(`/ui/medplat/manage/user/${(e == null ? void 0 : e.userId) ?? (e == null ? void 0 : e.id)}`), Ct = Vt(
579
- (e) => {
580
- var o;
581
- return [
582
- ((o = ae.current) == null ? void 0 : o["update.manage.users"]) && {
583
- label: "",
584
- icon: /* @__PURE__ */ a(V, { icon: oa, "data-testid": "userlist-button-edit" }),
585
- onClick: () => {
586
- Nt(e);
587
- },
588
- iconColor: n.palette.secondary.main,
589
- backgroundColor: k(n.palette.secondary.main, 0.1),
590
- hoverBackgroundColor: n.palette.secondary.main,
591
- hoverIconColor: "white",
592
- borderColor: n.palette.secondary.main,
593
- rotateIcon: !0
578
+ }, Nt = (e) => W(`/ui/medplat/manage/user/${(e == null ? void 0 : e.userId) ?? (e == null ? void 0 : e.id)}`), vt = jt(
579
+ (e) => [
580
+ be.hasCheckRights(m == null ? void 0 : m["update.manage.users"], void 0, !0) && {
581
+ label: "",
582
+ icon: /* @__PURE__ */ a(V, { icon: la, "data-testid": "userlist-button-edit" }),
583
+ onClick: () => {
584
+ Nt(e);
594
585
  },
595
- {
596
- label: "",
597
- icon: /* @__PURE__ */ a(V, { icon: la, "data-testid": "userlist-button-menu" }),
598
- iconColor: n.palette.primary.main,
599
- backgroundColor: k(n.palette.primary.main, 0.1),
600
- hoverBackgroundColor: n.palette.primary.main,
601
- hoverIconColor: "white",
602
- borderColor: n.palette.primary.main,
603
- menuItems: [
604
- {
605
- label: ne(
606
- e.displayState === "ACTIVE" ? "Mark as Inactive" : "Mark as Active"
607
- ),
608
- onClick: () => {
609
- B(1), oe(e);
610
- }
611
- },
612
- e.displayState === "ACTIVE" && !(e != null && e.loginCode) && {
613
- label: ne("Generate SOH Code"),
614
- onClick: () => {
615
- B(2), oe(e);
616
- }
586
+ iconColor: n.palette.secondary.main,
587
+ backgroundColor: T(n.palette.secondary.main, 0.1),
588
+ hoverBackgroundColor: n.palette.secondary.main,
589
+ hoverIconColor: "white",
590
+ borderColor: n.palette.secondary.main,
591
+ rotateIcon: !0
592
+ },
593
+ {
594
+ label: "",
595
+ icon: /* @__PURE__ */ a(V, { icon: na, "data-testid": "userlist-button-menu" }),
596
+ iconColor: n.palette.primary.main,
597
+ backgroundColor: T(n.palette.primary.main, 0.1),
598
+ hoverBackgroundColor: n.palette.primary.main,
599
+ hoverIconColor: "white",
600
+ borderColor: n.palette.primary.main,
601
+ menuItems: [
602
+ {
603
+ label: le(
604
+ e.displayState === "ACTIVE" ? "Mark as Inactive" : "Mark as Active"
605
+ ),
606
+ onClick: () => {
607
+ B(1), ae(e);
617
608
  }
618
- ].filter(Boolean)
619
- }
620
- ].filter(Boolean);
621
- },
622
- [ne]
623
- ), vt = async (e) => {
609
+ },
610
+ e.displayState === "ACTIVE" && !(e != null && e.loginCode) && {
611
+ label: le("Generate SOH Code"),
612
+ onClick: () => {
613
+ B(2), ae(e);
614
+ }
615
+ }
616
+ ].filter(Boolean)
617
+ }
618
+ ].filter(Boolean),
619
+ [le, m]
620
+ ), It = async (e) => {
624
621
  const o = e.sortOrder === "asc" ? "desc" : "asc";
625
- He(
622
+ Fe(
626
623
  (t) => t.map((r) => r.field === e.field ? { ...r, sortOrder: o } : r)
627
624
  ), L({ sortColumn: e.field, sortOrder: o });
628
- }, Fe = () => {
629
- M("button_click", {
625
+ }, Ve = () => {
626
+ R("button_click", {
630
627
  button_name: "User Filter-open-button",
631
628
  button_type: "filter_open",
632
629
  button_id: "userlist-overlay-filter"
633
630
  }), S(!H);
634
631
  };
635
- G(() => {
632
+ q(() => {
636
633
  const e = setTimeout(() => {
637
634
  J(O);
638
635
  }, 1e3);
639
636
  return () => clearTimeout(e);
640
637
  }, [O]);
641
- async function It(e, o) {
642
- var t, r;
638
+ async function kt(e, o) {
639
+ var t;
643
640
  try {
644
- if ((t = ae.current) != null && t["view.manage.users"]) {
645
- o && Y((c) => !c);
646
- const i = await We({
641
+ if (m === null || be.hasCheckRights(m == null ? void 0 : m["view.manage.users"], void 0, !0)) {
642
+ o && Y((i) => !i);
643
+ const r = await Xe({
647
644
  limit: e.limit,
648
645
  offset: e.offset,
649
- locationId: (s == null ? void 0 : s.locationId) || he,
650
- order: g.sortOrder,
651
- orderby: g.sortColumn,
646
+ locationId: (s == null ? void 0 : s.locationId) || ue,
647
+ order: y.sortOrder,
648
+ orderby: y.sortColumn,
652
649
  roleIds: v == null ? void 0 : v.join(","),
653
- status: s != null && s.status ? s == null ? void 0 : s.status : q || "BOTH",
650
+ status: s != null && s.status ? s == null ? void 0 : s.status : G || "BOTH",
654
651
  ...s != null && s.roleid ? { roleid: s == null ? void 0 : s.roleid } : (b == null ? void 0 : b.id) && { roleid: b.id },
655
652
  ...O && { searchString: O }
656
653
  });
657
- return O !== "" && M("search_tracking", {
654
+ return O !== "" && R("search_tracking", {
658
655
  searchTerm: O,
659
- results_count: (r = i == null ? void 0 : i.data) == null ? void 0 : r.length,
656
+ results_count: (t = r == null ? void 0 : r.data) == null ? void 0 : t.length,
660
657
  search_type: "Page Search"
661
- }), o && Y((c) => !c), i.data;
658
+ }), o && Y((i) => !i), r.data;
662
659
  }
663
- } catch (i) {
664
- T({ message: `error ${i}`, type: "error" }), Y((c) => !c);
660
+ } catch (r) {
661
+ k({ message: `error ${r}`, type: "error" }), Y((i) => !i);
665
662
  }
666
663
  }
667
664
  const {
668
- data: ge,
665
+ data: he,
669
666
  fetchNextPage: Tt,
670
- hasNextPage: kt
671
- } = Bt({
667
+ hasNextPage: Ut
668
+ } = Lt({
672
669
  key: [
673
670
  "users",
674
- me,
675
- g.sortOrder,
676
- g.sortColumn,
671
+ de,
672
+ y.sortOrder,
673
+ y.sortColumn,
677
674
  z,
678
- he,
675
+ ue,
679
676
  b == null ? void 0 : b.id,
680
- q,
681
- y,
677
+ G,
678
+ m,
682
679
  v
683
680
  ],
684
681
  queryFn: ({ pageParam: e }) => {
685
682
  const o = !(e != null && e.offset) || (e == null ? void 0 : e.offset) === 0;
686
- return It(e, o);
683
+ return kt(e, o);
687
684
  },
688
- limit: Ae
685
+ limit: Ee
689
686
  });
690
- G(() => {
687
+ q(() => {
691
688
  (async () => {
692
689
  var o;
693
690
  try {
694
- const { data: t } = await st({}, { showLoader: !1 }), r = t == null ? void 0 : t.filter((l) => {
695
- var N, h;
696
- return (h = (N = l == null ? void 0 : l.name) == null ? void 0 : N.toLowerCase()) == null ? void 0 : h.includes("admin");
691
+ const { data: t } = await rt({}, { showLoader: !1 }), r = t == null ? void 0 : t.filter((l) => {
692
+ var C, g;
693
+ return (g = (C = l == null ? void 0 : l.name) == null ? void 0 : C.toLowerCase()) == null ? void 0 : g.includes("admin");
697
694
  }).map((l) => l.id);
698
- re(r);
695
+ se(r);
699
696
  const i = t == null ? void 0 : t.map((l) => l.id);
700
697
  U(i), Y(!0);
701
- const { data: c } = await Lt("techo.manage.users");
702
- c && de(JSON.parse(c)), (o = A == null ? void 0 : A.state) != null && o.fromManageUser || _e(Se({ ...x, userFilterPreference: {} })), Y(!1);
698
+ const { data: f } = await Rt("techo.manage.users");
699
+ f && ce(JSON.parse(f)), (o = A == null ? void 0 : A.state) != null && o.fromManageUser || we(Ae({ ...x, userFilterPreference: {} })), Y(!1);
703
700
  } catch (t) {
704
701
  Y(!1), console.error("Error loading initial data:", t);
705
702
  }
706
703
  })();
707
- }, []), G(() => {
704
+ }, []), q(() => {
708
705
  var o;
709
- const e = ((o = ge == null ? void 0 : ge.pages) == null ? void 0 : o.flat()) || [];
710
- I(kt), fe(e);
711
- }, [ge]);
712
- const Ve = async () => {
706
+ const e = ((o = he == null ? void 0 : he.pages) == null ? void 0 : o.flat()) || [];
707
+ I(Ut), me(e);
708
+ }, [he]);
709
+ const je = async () => {
713
710
  try {
714
711
  let o = 0, t = [], r = !0;
715
712
  for (; r; ) {
716
- const i = await We({
713
+ const i = await Xe({
717
714
  limit: 5e4,
718
715
  offset: o,
719
- locationId: (s == null ? void 0 : s.locationId) || he,
720
- order: g.sortOrder,
721
- orderby: g.sortColumn,
716
+ locationId: (s == null ? void 0 : s.locationId) || ue,
717
+ order: y.sortOrder,
718
+ orderby: y.sortColumn,
722
719
  roleIds: v == null ? void 0 : v.join(","),
723
- status: s != null && s.status ? s == null ? void 0 : s.status : q || "BOTH",
720
+ status: s != null && s.status ? s == null ? void 0 : s.status : G || "BOTH",
724
721
  ...s != null && s.roleid ? { roleid: s == null ? void 0 : s.roleid } : (b == null ? void 0 : b.id) && { roleid: b.id },
725
722
  ...O && { searchString: O }
726
- }), c = (i == null ? void 0 : i.data) || [];
727
- t = [...t, ...c], c.length < 5e4 ? r = !1 : o += 5e4;
723
+ }), f = (i == null ? void 0 : i.data) || [];
724
+ t = [...t, ...f], f.length < 5e4 ? r = !1 : o += 5e4;
728
725
  }
729
726
  return t;
730
727
  } catch (e) {
731
- return console.error(e), T({ message: "Error in retriving all Users", type: "error" }), [];
728
+ return console.error(e), k({ message: "Error in retriving all Users", type: "error" }), [];
732
729
  }
733
- }, Ut = async (e) => {
730
+ }, St = async (e) => {
734
731
  try {
735
- const o = /* @__PURE__ */ new Date(), t = o.getMonth() + 1, r = `UserList-${o.getDate()}/${t}/${o.getFullYear().toString().substr(-2)}-${o.getHours()}:${o.getMinutes()}`, i = P.utils.json_to_sheet(e), c = {
732
+ const o = /* @__PURE__ */ new Date(), t = o.getMonth() + 1, r = `UserList-${o.getDate()}/${t}/${o.getFullYear().toString().substr(-2)}-${o.getHours()}:${o.getMinutes()}`, i = P.utils.json_to_sheet(e), f = {
736
733
  font: { bold: !0 },
737
734
  alignment: { horizontal: "center" }
738
735
  };
739
736
  if (e.length > 0) {
740
- const se = P.utils.decode_range(i["!ref"]);
741
- for (let Te = se.s.c; Te <= se.e.c; ++Te) {
742
- const Pe = i[P.utils.encode_cell({ r: 0, c: Te })];
743
- Pe && (Pe.s = c);
737
+ const ne = P.utils.decode_range(i["!ref"]);
738
+ for (let Te = ne.s.c; Te <= ne.e.c; ++Te) {
739
+ const We = i[P.utils.encode_cell({ r: 0, c: Te })];
740
+ We && (We.s = f);
744
741
  }
745
742
  }
746
743
  const l = P.utils.book_new();
747
744
  P.utils.book_append_sheet(l, i, "Sheet1");
748
- const N = P.write(l, {
745
+ const C = P.write(l, {
749
746
  bookType: "xlsx",
750
747
  type: "array"
751
- }), h = new Blob([N], {
748
+ }), g = new Blob([C], {
752
749
  type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
753
- }), Ke = (h.size / (1024 * 1024)).toFixed(2);
754
- ma.saveAs(h, `${r}.xlsx`), M("file_download", {
750
+ }), Pe = (g.size / (1024 * 1024)).toFixed(2);
751
+ fa.saveAs(g, `${r}.xlsx`), R("file_download", {
755
752
  file_type: "excel",
756
753
  file_name: `${r}.xlsx`,
757
- file_size: `${Ke} MB`,
754
+ file_size: `${Pe} MB`,
758
755
  filter_parameters: {
759
756
  taskTypeId: $.id
760
757
  },
761
758
  download_status: "success"
762
759
  });
763
760
  } catch (o) {
764
- console.error("Error generating Excel file:", o), T({ message: "Error generating Excel file", type: "error" });
761
+ console.error("Error generating Excel file:", o), k({ message: "Error generating Excel file", type: "error" });
765
762
  }
766
- }, [je, ve] = d(!1), St = async () => {
763
+ }, [De, Ie] = c(!1), At = async () => {
767
764
  try {
768
- ve(!0);
769
- const e = await Ve();
765
+ Ie(!0);
766
+ const e = await je();
770
767
  let o = [];
771
768
  e && e.length > 0 && (o = e.map((t, r) => {
772
- var N;
773
- let i = "", c;
774
- t != null && t.title && (i += t.title + " "), t != null && t.firstName && (i += t.firstName + " "), t != null && t.lastName && (i += t.lastName), t != null && t.areaOfIntervention && (c = (N = t == null ? void 0 : t.areaOfIntervention) == null ? void 0 : N.replace(
769
+ var C;
770
+ let i = "", f;
771
+ t != null && t.title && (i += t.title + " "), t != null && t.firstName && (i += t.firstName + " "), t != null && t.lastName && (i += t.lastName), t != null && t.areaOfIntervention && (f = (C = t == null ? void 0 : t.areaOfIntervention) == null ? void 0 : C.replace(
775
772
  /<br\s*\/?>/gi,
776
773
  `,
777
774
  `
@@ -782,108 +779,108 @@ function qa() {
782
779
  "USER IDENTITY": (t == null ? void 0 : t.userName) || "NA",
783
780
  "MOBILE NUMBER": (t == null ? void 0 : t.contactNumber) || "NA",
784
781
  "USER ROLE": (t == null ? void 0 : t.roleName) || "NA",
785
- "AREA OF INTERVENTION": c || "NA",
782
+ "AREA OF INTERVENTION": f || "NA",
786
783
  "HEALTH INFRASTRUCTURE": (t == null ? void 0 : t.healthFacilityName) || "NA",
787
784
  "USER STATUS": (t == null ? void 0 : t.displayState) || "NA"
788
785
  };
789
- return Object.keys(l).forEach((h) => {
790
- h === "id" ? delete l[h] : l[h] === null ? l[h] = "" : typeof l[h] == "boolean" && (l[h] = l[h] ? "Yes" : "No");
786
+ return Object.keys(l).forEach((g) => {
787
+ g === "id" ? delete l[g] : l[g] === null ? l[g] = "" : typeof l[g] == "boolean" && (l[g] = l[g] ? "Yes" : "No");
791
788
  }), l;
792
- })), Ut(o), ve(!1);
789
+ })), St(o), Ie(!1);
793
790
  } catch (e) {
794
- ve(!1), console.log(e), T({
791
+ Ie(!1), console.log(e), k({
795
792
  message: "Error in downloading excel",
796
793
  type: "error"
797
794
  });
798
795
  }
799
- }, At = fa(), [De, Ie] = d(!1), Et = async () => {
796
+ }, Et = pa(), [ze, ke] = c(!1), Ot = async () => {
800
797
  try {
801
- Ie(!0);
802
- const e = await Ve();
798
+ ke(!0);
799
+ const e = await je();
803
800
  if (!e || e.length === 0) return;
804
801
  let o = [], t = [];
805
- o.push("NAME"), t.push("name"), Ce.filter(
802
+ o.push("NAME"), t.push("name"), ve.filter(
806
803
  (l) => l.field !== "Actions" && l.field !== "index" && l.field !== "Sr. No."
807
804
  ).forEach((l) => {
808
805
  o.push(l.label), t.push(l.field);
809
806
  });
810
807
  let r = e.map((l) => {
811
- var se;
812
- let N = "", h;
813
- return l != null && l.title && (N += l.title + " "), l != null && l.firstName && (N += l.firstName + " "), l != null && l.lastName && (N += l.lastName), l != null && l.areaOfIntervention && (h = (se = l == null ? void 0 : l.areaOfIntervention) == null ? void 0 : se.replace(
808
+ var ne;
809
+ let C = "", g;
810
+ return l != null && l.title && (C += l.title + " "), l != null && l.firstName && (C += l.firstName + " "), l != null && l.lastName && (C += l.lastName), l != null && l.areaOfIntervention && (g = (ne = l == null ? void 0 : l.areaOfIntervention) == null ? void 0 : ne.replace(
814
811
  /<br\s*\/?>/gi,
815
812
  `,
816
813
  `
817
814
  )), {
818
815
  ...l,
819
- name: N || "NA",
820
- areaOfIntervention: h
816
+ name: C || "NA",
817
+ areaOfIntervention: g
821
818
  };
822
819
  });
823
- const i = /* @__PURE__ */ new Date(), c = i.getMonth() + 1;
824
- At({
820
+ const i = /* @__PURE__ */ new Date(), f = i.getMonth() + 1;
821
+ Et({
825
822
  columns: o,
826
823
  keys: t,
827
824
  data: r,
828
- fileName: `UserList-${i.getDate()}/${c}/${i.getFullYear().toString().substr(-2)}-${i.getHours()}:${i.getMinutes()}`,
825
+ fileName: `UserList-${i.getDate()}/${f}/${i.getFullYear().toString().substr(-2)}-${i.getHours()}:${i.getMinutes()}`,
829
826
  headerText: "User List",
830
827
  footerText: "User List",
831
828
  orientation: o.length > 7 ? "landscape" : "portrait"
832
- }), Ie(!1);
829
+ }), ke(!1);
833
830
  } catch (e) {
834
- Ie(!1), console.error(e);
831
+ ke(!1), console.error(e);
835
832
  }
836
- }, Ot = () => {
837
- Ee(null), Oe(null), Q("BOTH"), K({}), Me(!1), $e([]), w([]), _e(Se({ ...x, userFilterPreference: {} })), we(null), Le({}), Re((e) => e + 1), Be.current = null, Fe();
833
+ }, _t = () => {
834
+ Oe(null), _e(null), Q("BOTH"), K({}), Me(!1), He([]), w([]), we(Ae({ ...x, userFilterPreference: {} })), Be(null), Re({}), $e((e) => e + 1), Le.current = null, Ve();
838
835
  };
839
- return !ue && !(y != null && y["view.manage.users"]) ? /* @__PURE__ */ a(E, { className: "flex justify-center items-center w-full h-[80vh]", children: /* @__PURE__ */ a(
840
- Dt,
836
+ return !pe && m !== null && !be.hasCheckRights(m == null ? void 0 : m["view.manage.users"], void 0, !0) ? /* @__PURE__ */ a(E, { className: "flex justify-center items-center w-full h-[80vh]", children: /* @__PURE__ */ a(
837
+ zt,
841
838
  {
842
839
  className: "h-80 w-150 flex justify-center items-center",
843
840
  "data-testid": "userlist-no-permission",
844
- children: /* @__PURE__ */ a(et, { variant: "h5", className: "text-customBlue", children: "You dont have permission to view Users" })
841
+ children: /* @__PURE__ */ a(tt, { variant: "h5", className: "text-customBlue", children: "You dont have permission to view Users" })
845
842
  }
846
- ) }) : /* @__PURE__ */ p(_, { className: "w-[98%] mt-4 ", children: [
843
+ ) }) : /* @__PURE__ */ u(_, { className: "w-[98%] mt-4 ", children: [
847
844
  /* @__PURE__ */ a(
848
- Xe,
845
+ Ze,
849
846
  {
850
- open: ce === 1,
847
+ open: ie === 1,
851
848
  handleClose: () => B(0),
852
- handleClick: bt,
849
+ handleClick: xt,
853
850
  title: "CONFIRM ACTION",
854
851
  description: "Are you sure you want toggle the state of this user type?",
855
852
  dataTestId: "userlist-modal-status-confirmation"
856
853
  }
857
854
  ),
858
855
  /* @__PURE__ */ a(
859
- Xe,
856
+ Ze,
860
857
  {
861
- open: ce === 2,
858
+ open: ie === 2,
862
859
  handleClose: () => B(0),
863
- handleClick: xt,
860
+ handleClick: Ct,
864
861
  title: "CONFIRM ACTION",
865
862
  description: "Are you sure you want to Generate SOH code ?",
866
863
  dataTestId: "userlist-modal-generate-soh-confirmation"
867
864
  }
868
865
  ),
869
- /* @__PURE__ */ a(Xt, { isLoading: ue, children: /* @__PURE__ */ p(
866
+ /* @__PURE__ */ a(Zt, { isLoading: pe, children: /* @__PURE__ */ u(
870
867
  _,
871
868
  {
872
869
  container: !0,
873
870
  className: "flex flex-col md:flex-row mb-2 justify-between items-start md:items-center space-y-2 md:space-y-0",
874
871
  children: [
875
872
  /* @__PURE__ */ a(_, { children: /* @__PURE__ */ a(
876
- et,
873
+ tt,
877
874
  {
878
875
  variant: "body2",
879
876
  className: "font-bold font-sans text-lg text-[var(--color-customBlue)] uppercase text-customBlue",
880
877
  "data-testid": "notification-list-typography-title",
881
- children: ne("User List")
878
+ children: le("User List")
882
879
  }
883
880
  ) }),
884
- /* @__PURE__ */ p(_, { className: "flex flex-col md:flex-row w-full md:w-auto space-y-2 md:space-y-0 md:space-x-3", children: [
881
+ /* @__PURE__ */ u(_, { className: "flex flex-col md:flex-row w-full md:w-auto space-y-2 md:space-y-0 md:space-x-3", children: [
885
882
  /* @__PURE__ */ a(_, { className: "w-full md:w-auto", children: /* @__PURE__ */ a(
886
- zt,
883
+ Yt,
887
884
  {
888
885
  name: "searchQuery",
889
886
  id: "searchQuery",
@@ -892,7 +889,7 @@ function qa() {
892
889
  size: "small",
893
890
  onChange: (e) => {
894
891
  var o;
895
- return le((o = e.target) == null ? void 0 : o.value);
892
+ return oe((o = e.target) == null ? void 0 : o.value);
896
893
  },
897
894
  value: O,
898
895
  "data-testid": "userlist-textfield-search",
@@ -903,24 +900,24 @@ function qa() {
903
900
  }
904
901
  }
905
902
  ) }),
906
- /* @__PURE__ */ p("div", { className: "flex items-center gap-3 flex-wrap md:flex-nowrap", children: [
907
- /* @__PURE__ */ p(
903
+ /* @__PURE__ */ u("div", { className: "flex items-center gap-3 flex-wrap md:flex-nowrap", children: [
904
+ /* @__PURE__ */ u(
908
905
  "div",
909
906
  {
910
- className: `flex items-center rounded-2xl p-1 shadow-sm transition-all duration-300 border ${R ? "bg-slate-900 border-slate-800" : "bg-white border-slate-200"}`,
907
+ className: `flex items-center rounded-2xl p-1 shadow-sm transition-all duration-300 border ${M ? "bg-slate-900 border-slate-800" : "bg-white border-slate-200"}`,
911
908
  children: [
912
909
  /* @__PURE__ */ a(
913
910
  "button",
914
911
  {
915
- disabled: De,
916
- onClick: Et,
917
- className: `px-4 py-2 rounded-xl transition-all flex items-center gap-2 text-xs font-black uppercase tracking-wider ${R ? "text-slate-400 hover:text-slate-100 hover:bg-slate-800" : "text-slate-600 hover:text-red-600 hover:bg-slate-50"}`,
918
- children: De ? /* @__PURE__ */ p(ye, { children: [
919
- /* @__PURE__ */ a(tt, { size: 14, sx: { color: "inherit" } }),
920
- /* @__PURE__ */ a(V, { icon: ot, className: "mr-1" }),
912
+ disabled: ze,
913
+ onClick: Ot,
914
+ className: `px-4 py-2 rounded-xl transition-all flex items-center gap-2 text-xs font-black uppercase tracking-wider ${M ? "text-slate-400 hover:text-slate-100 hover:bg-slate-800" : "text-slate-600 hover:text-red-600 hover:bg-slate-50"}`,
915
+ children: ze ? /* @__PURE__ */ u(ge, { children: [
916
+ /* @__PURE__ */ a(at, { size: 14, sx: { color: "inherit" } }),
917
+ /* @__PURE__ */ a(V, { icon: lt, className: "mr-1" }),
921
918
  "Pdf"
922
- ] }) : /* @__PURE__ */ p(ye, { children: [
923
- /* @__PURE__ */ a(V, { icon: ot, className: "mr-1" }),
919
+ ] }) : /* @__PURE__ */ u(ge, { children: [
920
+ /* @__PURE__ */ a(V, { icon: lt, className: "mr-1" }),
924
921
  "Pdf"
925
922
  ] })
926
923
  }
@@ -928,15 +925,15 @@ function qa() {
928
925
  /* @__PURE__ */ a(
929
926
  "button",
930
927
  {
931
- disabled: je,
932
- onClick: () => St(),
933
- className: `px-4 py-2 rounded-xl transition-all flex items-center gap-2 text-xs font-black uppercase tracking-wider ml-1 ${R ? "bg-slate-800 text-slate-100 hover:bg-slate-700" : "bg-[var(--color-tableHeader)] text-white hover:bg-[var(--color-tableHeader)]"}`,
934
- children: je ? /* @__PURE__ */ p(ye, { children: [
935
- /* @__PURE__ */ a(tt, { size: 14, sx: { color: "inherit" } }),
936
- /* @__PURE__ */ a(V, { icon: lt, className: "mr-1" }),
928
+ disabled: De,
929
+ onClick: () => At(),
930
+ className: `px-4 py-2 rounded-xl transition-all flex items-center gap-2 text-xs font-black uppercase tracking-wider ml-1 ${M ? "bg-slate-800 text-slate-100 hover:bg-slate-700" : "bg-[var(--color-tableHeader)] text-white hover:bg-[var(--color-tableHeader)]"}`,
931
+ children: De ? /* @__PURE__ */ u(ge, { children: [
932
+ /* @__PURE__ */ a(at, { size: 14, sx: { color: "inherit" } }),
933
+ /* @__PURE__ */ a(V, { icon: nt, className: "mr-1" }),
937
934
  "Excel Data"
938
- ] }) : /* @__PURE__ */ p(ye, { children: [
939
- /* @__PURE__ */ a(V, { icon: lt, className: "mr-1" }),
935
+ ] }) : /* @__PURE__ */ u(ge, { children: [
936
+ /* @__PURE__ */ a(V, { icon: nt, className: "mr-1" }),
940
937
  "Excel Data"
941
938
  ] })
942
939
  }
@@ -944,13 +941,13 @@ function qa() {
944
941
  ]
945
942
  }
946
943
  ),
947
- (y == null ? void 0 : y["create.manage.users"]) && /* @__PURE__ */ a(
948
- Ue,
944
+ be.hasCheckRights(m == null ? void 0 : m["create.manage.users"], void 0, !0) && /* @__PURE__ */ a(
945
+ Se,
949
946
  {
950
947
  variant: "contained",
951
948
  className: "w-auto ml-auto",
952
949
  onClick: () => {
953
- M("button_click", {
950
+ R("button_click", {
954
951
  button_name: "add_user",
955
952
  button_type: "navigate",
956
953
  button_id: "userlist-button-add"
@@ -958,7 +955,7 @@ function qa() {
958
955
  },
959
956
  size: "small",
960
957
  "data-testid": "userlist-button-add",
961
- children: ne("Add")
958
+ children: le("Add")
962
959
  }
963
960
  )
964
961
  ] })
@@ -966,42 +963,42 @@ function qa() {
966
963
  ]
967
964
  }
968
965
  ) }),
969
- /* @__PURE__ */ a(Zt, { isLoading: Ne, children: m && /* @__PURE__ */ p("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mt-4 mb-4", children: [
966
+ /* @__PURE__ */ a(ea, { isLoading: Ce, children: d && /* @__PURE__ */ u("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mt-4 mb-4", children: [
970
967
  /* @__PURE__ */ a(
971
- be,
968
+ ye,
972
969
  {
973
970
  title: "Total Users",
974
- value: (m == null ? void 0 : m.total_users) || 0,
975
- icon: na,
971
+ value: (d == null ? void 0 : d.total_users) || 0,
972
+ icon: sa,
976
973
  bottomIndicator: Z,
977
- selected: q === "BOTH" && v.length === 0,
974
+ selected: G === "BOTH" && v.length === 0,
978
975
  selectedBgColor: Z,
979
- selectedTitleColor: C,
980
- selectedValueColor: C,
976
+ selectedTitleColor: N,
977
+ selectedValueColor: N,
981
978
  onClick: () => {
982
- (m == null ? void 0 : m.total_users) > 0 ? (w([]), Q("BOTH"), K((e) => ({
979
+ (d == null ? void 0 : d.total_users) > 0 ? (w([]), Q("BOTH"), K((e) => ({
983
980
  ...e,
984
981
  status: "BOTH"
985
- }))) : T({ message: "No users found", type: "warning" });
982
+ }))) : k({ message: "No users found", type: "warning" });
986
983
  }
987
984
  }
988
985
  ),
989
986
  /* @__PURE__ */ a(
990
- be,
987
+ ye,
991
988
  {
992
989
  title: "Active Users",
993
- value: (m == null ? void 0 : m.active_count) || 0,
994
- icon: sa,
990
+ value: (d == null ? void 0 : d.active_count) || 0,
991
+ icon: ra,
995
992
  bottomIndicator: j,
996
- selected: q === "ACTIVE" && v.length === 0,
993
+ selected: G === "ACTIVE" && v.length === 0,
997
994
  selectedBgColor: j,
998
- selectedTitleColor: C,
999
- selectedValueColor: C,
995
+ selectedTitleColor: N,
996
+ selectedValueColor: N,
1000
997
  onClick: () => {
1001
- (m == null ? void 0 : m.active_count) > 0 ? (w([]), Q("ACTIVE"), K((e) => ({
998
+ (d == null ? void 0 : d.active_count) > 0 ? (w([]), Q("ACTIVE"), K((e) => ({
1002
999
  ...e,
1003
1000
  status: "ACTIVE"
1004
- }))) : T({
1001
+ }))) : k({
1005
1002
  message: "No active users found",
1006
1003
  type: "warning"
1007
1004
  });
@@ -1009,21 +1006,21 @@ function qa() {
1009
1006
  }
1010
1007
  ),
1011
1008
  /* @__PURE__ */ a(
1012
- be,
1009
+ ye,
1013
1010
  {
1014
1011
  title: "Inactive Users",
1015
- value: (m == null ? void 0 : m.inactive_count) || 0,
1016
- icon: ra,
1012
+ value: (d == null ? void 0 : d.inactive_count) || 0,
1013
+ icon: ia,
1017
1014
  bottomIndicator: ee,
1018
- selected: q === "INACTIVE" && v.length === 0,
1015
+ selected: G === "INACTIVE" && v.length === 0,
1019
1016
  selectedBgColor: ee,
1020
- selectedTitleColor: C,
1021
- selectedValueColor: C,
1017
+ selectedTitleColor: N,
1018
+ selectedValueColor: N,
1022
1019
  onClick: () => {
1023
- (m == null ? void 0 : m.inactive_count) > 0 ? (w([]), Q("INACTIVE"), K((e) => ({
1020
+ (d == null ? void 0 : d.inactive_count) > 0 ? (w([]), Q("INACTIVE"), K((e) => ({
1024
1021
  ...e,
1025
1022
  status: "INACTIVE"
1026
- }))) : T({
1023
+ }))) : k({
1027
1024
  message: "No inactive users found",
1028
1025
  type: "warning"
1029
1026
  });
@@ -1031,21 +1028,21 @@ function qa() {
1031
1028
  }
1032
1029
  ),
1033
1030
  /* @__PURE__ */ a(
1034
- be,
1031
+ ye,
1035
1032
  {
1036
1033
  title: "Admins",
1037
- value: (m == null ? void 0 : m.admin_role_count) || 0,
1038
- icon: ia,
1039
- bottomIndicator: ie,
1034
+ value: (d == null ? void 0 : d.admin_role_count) || 0,
1035
+ icon: ca,
1036
+ bottomIndicator: re,
1040
1037
  selected: v.length > 0,
1041
- selectedBgColor: ie,
1042
- selectedTitleColor: C,
1043
- selectedValueColor: C,
1038
+ selectedBgColor: re,
1039
+ selectedTitleColor: N,
1040
+ selectedValueColor: N,
1044
1041
  onClick: () => {
1045
- (m == null ? void 0 : m.admin_role_count) > 0 ? (Q("BOTH"), K((e) => ({
1042
+ (d == null ? void 0 : d.admin_role_count) > 0 ? (Q("BOTH"), K((e) => ({
1046
1043
  ...e,
1047
1044
  status: "BOTH"
1048
- })), w(X)) : T({
1045
+ })), w(X)) : k({
1049
1046
  message: "No active users found",
1050
1047
  type: "warning"
1051
1048
  });
@@ -1056,54 +1053,54 @@ function qa() {
1056
1053
  /* @__PURE__ */ a(
1057
1054
  Mt,
1058
1055
  {
1059
- columns: yt,
1060
- tableData: gt,
1061
- actions: Ct,
1056
+ columns: bt,
1057
+ tableData: yt,
1058
+ actions: vt,
1062
1059
  paginationConfig: {
1063
1060
  pagination: !0,
1064
1061
  paginationType: "infinite-scroll",
1065
- rowsPerPageInTable: Ae,
1066
- hasMore: pe,
1067
- loadMore: () => pe && Tt({ cancelRefetch: !1 })
1062
+ rowsPerPageInTable: Ee,
1063
+ hasMore: fe,
1064
+ loadMore: () => fe && Tt({ cancelRefetch: !1 })
1068
1065
  },
1069
1066
  styleConfig: { cellStyle: { maxLines: 2 } },
1070
- isLoading: $ ? ue : !0,
1071
- handleSort: vt,
1067
+ isLoading: $ ? pe : !0,
1068
+ handleSort: It,
1072
1069
  dataTestId: "userlist-table-customized"
1073
1070
  }
1074
1071
  ),
1075
1072
  /* @__PURE__ */ a(
1076
- Rt,
1073
+ $t,
1077
1074
  {
1078
1075
  title: "User Filter",
1079
1076
  resetButtonLabel: "Reset",
1080
- onResetClick: Ot,
1081
- FormBody: dt,
1082
- handleOverlayState: Fe,
1077
+ onResetClick: _t,
1078
+ FormBody: mt,
1079
+ handleOverlayState: Ve,
1083
1080
  overlayOpen: H,
1084
1081
  dataTestId: "userlist-overlay-filter",
1085
1082
  formProps: {
1086
1083
  setAdminRoleIdsStats: w,
1087
1084
  setIsLoading: Y,
1088
- isLoading: ue,
1089
- setLocationId: Ee,
1090
- setRoleDetails: Oe,
1085
+ isLoading: pe,
1086
+ setLocationId: Oe,
1087
+ setRoleDetails: _e,
1091
1088
  roleDetails: b,
1092
- status: q,
1089
+ status: G,
1093
1090
  setStatus: Q,
1094
- setSelectedLocation: Le,
1095
- selectedLocation: ft,
1096
- filterRequired: pt,
1091
+ setSelectedLocation: Re,
1092
+ selectedLocation: pt,
1093
+ filterRequired: ut,
1097
1094
  setFilterRequired: Me,
1098
1095
  setUserFilterPreference: K,
1099
1096
  user: x,
1100
1097
  userFilterPreference: s,
1101
- locationIdRef: Be,
1102
- setSelectedLocationId: we,
1103
- resetLocationDirective: ut,
1104
- setResetLocationDirective: Re,
1105
- locations: ht,
1106
- setLocations: $e
1098
+ locationIdRef: Le,
1099
+ setSelectedLocationId: Be,
1100
+ resetLocationDirective: ht,
1101
+ setResetLocationDirective: $e,
1102
+ locations: gt,
1103
+ setLocations: He
1107
1104
  }
1108
1105
  }
1109
1106
  )
@@ -1112,4 +1109,4 @@ function qa() {
1112
1109
  export {
1113
1110
  qa as default
1114
1111
  };
1115
- //# sourceMappingURL=UserList-2gGuDgNa.js.map
1112
+ //# sourceMappingURL=UserList-Bc8gYxRL.js.map