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