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