@argusoft/medplat-core 1.0.18 → 1.0.20

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