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