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