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