@argusoft/medplat-core 1.0.24 → 1.0.26
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/{AddFeatures-CTVs_Gr9.js → AddFeatures-CqE3v0BN.js} +2 -2
- package/dist/{AddFeatures-CTVs_Gr9.js.map → AddFeatures-CqE3v0BN.js.map} +1 -1
- package/dist/AddMenuConfiguration-BSQLl88V.js +6570 -0
- package/dist/AddMenuConfiguration-BSQLl88V.js.map +1 -0
- package/dist/{ChangePasswordModalCore-Czu7OZe6.js → ChangePasswordModalCore-DTYWRTa-.js} +3 -3
- package/dist/{ChangePasswordModalCore-Czu7OZe6.js.map → ChangePasswordModalCore-DTYWRTa-.js.map} +1 -1
- package/dist/{ConditionConfig-BECSbvY2.js → ConditionConfig-DSsgGEXS.js} +2 -2
- package/dist/{ConditionConfig-BECSbvY2.js.map → ConditionConfig-DSsgGEXS.js.map} +1 -1
- package/dist/{ManageEventConfiguration-CBi2KMB1.js → ManageEventConfiguration-DV3I5POA.js} +4 -4
- package/dist/{ManageEventConfiguration-CBi2KMB1.js.map → ManageEventConfiguration-DV3I5POA.js.map} +1 -1
- package/dist/{ManageRole-CZAk-IlM.js → ManageRole-B9bs_T00.js} +116 -116
- package/dist/ManageRole-B9bs_T00.js.map +1 -0
- package/dist/{ManageUser-BnEPFSPT.js → ManageUser-AB3_Vfp_.js} +34 -33
- package/dist/{ManageUser-BnEPFSPT.js.map → ManageUser-AB3_Vfp_.js.map} +1 -1
- package/dist/{MobileTypeEventConfigModal-C34AN-IJ.js → MobileTypeEventConfigModal-BxLympIO.js} +2 -2
- package/dist/{MobileTypeEventConfigModal-C34AN-IJ.js.map → MobileTypeEventConfigModal-BxLympIO.js.map} +1 -1
- package/dist/{OtherTypeEventConfigModal-BYjMFl0-.js → OtherTypeEventConfigModal-BeG1GrUi.js} +3 -2
- package/dist/{OtherTypeEventConfigModal-BYjMFl0-.js.map → OtherTypeEventConfigModal-BeG1GrUi.js.map} +1 -1
- package/dist/{RoleManagement-B9WgZGEj.js → RoleManagement-BIiW9uTq.js} +2 -2
- package/dist/{RoleManagement-B9WgZGEj.js.map → RoleManagement-BIiW9uTq.js.map} +1 -1
- package/dist/{TypeConfiguration-Bs5WkIa2.js → TypeConfiguration-37wp-gsl.js} +2 -2
- package/dist/{TypeConfiguration-Bs5WkIa2.js.map → TypeConfiguration-37wp-gsl.js.map} +1 -1
- package/dist/{UserList-BzHsbYel.js → UserList-2gGuDgNa.js} +38 -37
- package/dist/{UserList-BzHsbYel.js.map → UserList-2gGuDgNa.js.map} +1 -1
- package/dist/{UserListSkeleton-DhIJ5X3y.js → UserListSkeleton-BMKANCtW.js} +57 -93
- package/dist/UserListSkeleton-BMKANCtW.js.map +1 -0
- package/dist/Users-CsJ08Kjm.js +40 -0
- package/dist/Users-CsJ08Kjm.js.map +1 -0
- package/dist/index.js +4 -4
- package/package.json +1 -1
- package/dist/AddMenuConfiguration-m3R8FDhj.js +0 -5570
- package/dist/AddMenuConfiguration-m3R8FDhj.js.map +0 -1
- package/dist/ManageRole-CZAk-IlM.js.map +0 -1
- package/dist/UserListSkeleton-DhIJ5X3y.js.map +0 -1
|
@@ -1,114 +1,119 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as l, jsx as a, Fragment as P } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as X, useState as J, useEffect as he } from "react";
|
|
3
3
|
import { Modal as ge, Box as H, IconButton as fe, FormControl as y, FormGroup as pe, Button as Q } from "@mui/material";
|
|
4
4
|
import ye from "@/hooks/useTrackEvent";
|
|
5
|
-
import { g as be, a as ve, b as we } from "./RoleManagement-
|
|
5
|
+
import { g as be, a as ve, b as we } from "./RoleManagement-BIiW9uTq.js";
|
|
6
6
|
import { getRoleList as Ne, getLocationTypes as Te, execute as O } from "@/common/services/GlobalApis";
|
|
7
|
-
import { showToast as
|
|
7
|
+
import { showToast as j } from "@/common/toaster/toaster";
|
|
8
8
|
import { useForm as Ie } from "react-hook-form";
|
|
9
9
|
import { yupResolver as xe } from "@hookform/resolvers/yup";
|
|
10
10
|
import "@/assets/scss/scrollBar.scss";
|
|
11
11
|
import { FormItem as d } from "@/views/custom-components/FormItem.jsx";
|
|
12
|
-
import * as
|
|
13
|
-
import
|
|
12
|
+
import * as b from "yup";
|
|
13
|
+
import W from "@/views/custom-components/CustomTextField";
|
|
14
14
|
import Z from "@/views/custom-components/CustomDropdown";
|
|
15
15
|
import $ from "@/views/custom-components/CustomCheckBox";
|
|
16
16
|
import x from "@/views/custom-components/CustomAutoComplete";
|
|
17
17
|
import { useTranslateProvider as Re } from "@/common/languageTranslator/TranslationContext";
|
|
18
18
|
import { FontAwesomeIcon as Me } from "@fortawesome/react-fontawesome";
|
|
19
19
|
import { faXmark as Be } from "@fortawesome/free-solid-svg-icons";
|
|
20
|
-
import
|
|
20
|
+
import qe from "@/common/services/util/GeneralUtil";
|
|
21
21
|
import f from "@/common/config/implementationConfig";
|
|
22
|
-
import
|
|
22
|
+
import v from "prop-types";
|
|
23
23
|
import z from "@/views/custom-components/CustomToggleSwitch";
|
|
24
|
-
import { useSelector as
|
|
25
|
-
import { getUseSkeleton as
|
|
26
|
-
const ee = ({ children: N, isLoading: p }) => !
|
|
27
|
-
/* @__PURE__ */
|
|
24
|
+
import { useSelector as Fe } from "react-redux";
|
|
25
|
+
import { getUseSkeleton as Ce } from "@/store/reducers/SkeletonReducer";
|
|
26
|
+
const ee = ({ children: N, isLoading: p }) => !Fe(Ce) || !p ? N : /* @__PURE__ */ l("div", { className: "pt-6 h-[88vh]", children: [
|
|
27
|
+
/* @__PURE__ */ l("div", { className: "px-8 pt-2 pb-4 flex items-center justify-between", children: [
|
|
28
28
|
/* @__PURE__ */ a("div", { className: "bg-gray-300 animate-pulse rounded-md w-32 h-8" }),
|
|
29
29
|
/* @__PURE__ */ a("div", { className: "bg-gray-300 animate-pulse rounded-full w-10 h-10" })
|
|
30
30
|
] }),
|
|
31
|
-
/* @__PURE__ */
|
|
32
|
-
/* @__PURE__ */ a("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-4", children: [1, 2, 3].map((u) => /* @__PURE__ */
|
|
31
|
+
/* @__PURE__ */ l("div", { className: "px-8 pb-8 space-y-6 overflow-y-auto max-h-[80vh]", children: [
|
|
32
|
+
/* @__PURE__ */ a("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-4", children: [1, 2, 3].map((u) => /* @__PURE__ */ l("div", { className: "space-y-1.5", children: [
|
|
33
33
|
/* @__PURE__ */ a("div", { className: "h-4 bg-gray-300 rounded w-1/3 mb-2 animate-pulse" }),
|
|
34
34
|
/* @__PURE__ */ a("div", { className: "h-10 bg-gray-300 rounded animate-pulse w-full" })
|
|
35
35
|
] }, u)) }),
|
|
36
|
-
/* @__PURE__ */ a("div", { className: "flex items-center gap-6 w-full", children: /* @__PURE__ */
|
|
36
|
+
/* @__PURE__ */ a("div", { className: "flex items-center gap-6 w-full", children: /* @__PURE__ */ l("div", { className: "w-full", children: [
|
|
37
37
|
/* @__PURE__ */ a("div", { className: "h-4 bg-gray-300 rounded w-1/4 mb-2 animate-pulse" }),
|
|
38
38
|
/* @__PURE__ */ a("div", { className: "h-8 bg-gray-300 rounded-full w-16 animate-pulse" })
|
|
39
39
|
] }) }),
|
|
40
|
-
/* @__PURE__ */
|
|
41
|
-
[1, 2].map((u) => /* @__PURE__ */
|
|
40
|
+
/* @__PURE__ */ l("div", { className: "space-y-4", children: [
|
|
41
|
+
[1, 2].map((u) => /* @__PURE__ */ l("div", { className: "space-y-1.5", children: [
|
|
42
42
|
/* @__PURE__ */ a("div", { className: "h-4 bg-gray-300 rounded w-1/4 mb-2 animate-pulse" }),
|
|
43
43
|
/* @__PURE__ */ a("div", { className: "h-10 bg-gray-300 rounded animate-pulse w-full" })
|
|
44
44
|
] }, u)),
|
|
45
|
-
/* @__PURE__ */ a("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [1, 2].map((u) => /* @__PURE__ */
|
|
45
|
+
/* @__PURE__ */ a("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [1, 2].map((u) => /* @__PURE__ */ l("div", { className: "space-y-1.5", children: [
|
|
46
46
|
/* @__PURE__ */ a("div", { className: "h-4 bg-gray-300 rounded w-1/3 mb-2 animate-pulse" }),
|
|
47
47
|
/* @__PURE__ */ a("div", { className: "h-10 bg-gray-300 rounded animate-pulse w-full" })
|
|
48
48
|
] }, u)) }),
|
|
49
|
-
[1, 2].map((u) => /* @__PURE__ */
|
|
49
|
+
[1, 2].map((u) => /* @__PURE__ */ l("div", { className: "space-y-1.5", children: [
|
|
50
50
|
/* @__PURE__ */ a("div", { className: "h-4 bg-gray-300 rounded w-1/3 mb-2 animate-pulse" }),
|
|
51
51
|
/* @__PURE__ */ a("div", { className: "h-10 bg-gray-300 rounded animate-pulse w-full" })
|
|
52
52
|
] }, u))
|
|
53
53
|
] }),
|
|
54
|
-
/* @__PURE__ */
|
|
55
|
-
/* @__PURE__ */
|
|
54
|
+
/* @__PURE__ */ l("div", { className: "flex items-center gap-6", children: [
|
|
55
|
+
/* @__PURE__ */ l("div", { className: "w-[60%]", children: [
|
|
56
56
|
/* @__PURE__ */ a("div", { className: "h-4 bg-gray-300 rounded w-1/3 mb-2 animate-pulse" }),
|
|
57
57
|
/* @__PURE__ */ a("div", { className: "h-8 bg-gray-300 rounded-full w-16 animate-pulse" })
|
|
58
58
|
] }),
|
|
59
|
-
/* @__PURE__ */
|
|
59
|
+
/* @__PURE__ */ l("div", { className: "w-[40%] flex items-center gap-2", children: [
|
|
60
60
|
/* @__PURE__ */ a("div", { className: "h-5 w-5 bg-gray-300 rounded animate-pulse" }),
|
|
61
61
|
/* @__PURE__ */ a("div", { className: "h-4 bg-gray-300 rounded w-1/3 animate-pulse" })
|
|
62
62
|
] })
|
|
63
63
|
] }),
|
|
64
|
-
/* @__PURE__ */
|
|
64
|
+
/* @__PURE__ */ l("div", { className: "space-y-2", children: [
|
|
65
65
|
/* @__PURE__ */ a("div", { className: "h-4 bg-gray-300 rounded w-1/4 mb-2 animate-pulse" }),
|
|
66
|
-
/* @__PURE__ */ a("div", { className: "flex flex-wrap gap-4", children: [1, 2, 3, 4].map((u) => /* @__PURE__ */
|
|
66
|
+
/* @__PURE__ */ a("div", { className: "flex flex-wrap gap-4", children: [1, 2, 3, 4].map((u) => /* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: [
|
|
67
67
|
/* @__PURE__ */ a("div", { className: "h-5 w-5 bg-gray-300 rounded animate-pulse" }),
|
|
68
68
|
/* @__PURE__ */ a("div", { className: "h-4 w-16 bg-gray-300 rounded animate-pulse" })
|
|
69
69
|
] }, u)) })
|
|
70
70
|
] })
|
|
71
71
|
] }),
|
|
72
|
-
/* @__PURE__ */
|
|
72
|
+
/* @__PURE__ */ l("div", { className: "flex items-center justify-end gap-3 pt-6 px-8 pb-4 border-t border-slate-100", children: [
|
|
73
73
|
/* @__PURE__ */ a("div", { className: "h-9 w-20 bg-gray-300 rounded animate-pulse" }),
|
|
74
74
|
/* @__PURE__ */ a("div", { className: "h-9 w-24 bg-gray-300 rounded animate-pulse" })
|
|
75
75
|
] })
|
|
76
76
|
] });
|
|
77
77
|
ee.propTypes = {
|
|
78
|
-
children:
|
|
79
|
-
isLoading:
|
|
78
|
+
children: v.any,
|
|
79
|
+
isLoading: v.any
|
|
80
80
|
};
|
|
81
|
-
const
|
|
81
|
+
const ke = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Le = [
|
|
82
82
|
{ label: "Authenticator App", value: "AUTHENTICATOR_APP" }
|
|
83
83
|
], De = ({
|
|
84
84
|
selectedId: N,
|
|
85
85
|
isUpdate: p,
|
|
86
|
-
open:
|
|
86
|
+
open: q,
|
|
87
87
|
setOpen: u,
|
|
88
88
|
isRoleListModified: ae
|
|
89
89
|
}) => {
|
|
90
|
-
const G = X(null), V = X(!1), D = ye(), [w, U] = J({}), [te, S] = J(!1), le =
|
|
91
|
-
name:
|
|
92
|
-
locationTypes:
|
|
90
|
+
const G = X(null), V = X(!1), D = ye(), [w, U] = J({}), [te, S] = J(!1), le = b.object().shape({
|
|
91
|
+
name: b.string().required("Enter Role Name"),
|
|
92
|
+
locationTypes: b.array().when("isLocationRequired", {
|
|
93
93
|
is: !0,
|
|
94
94
|
then: (e) => e.min(1, "Select Location Type").required("Select Location Type"),
|
|
95
95
|
otherwise: (e) => e.notRequired()
|
|
96
96
|
}),
|
|
97
|
-
roleType: f.role.showRoleType ?
|
|
98
|
-
isBankDetailsRequired: f.role.showBankDetailsRequired ?
|
|
99
|
-
healthInfrastructureIds:
|
|
97
|
+
roleType: f.role.showRoleType ? b.string().required("Select Role Type") : b.string().notRequired(),
|
|
98
|
+
isBankDetailsRequired: f.role.showBankDetailsRequired ? b.boolean().nullable().defined("Please Select a Value") : b.boolean().notRequired(),
|
|
99
|
+
healthInfrastructureIds: b.array().when("isHealthInfraMandatory", {
|
|
100
100
|
is: !0,
|
|
101
101
|
then: (e) => e.min(1, "Select Health Infrastructure Type").required("Select Health Infrastructure Type"),
|
|
102
102
|
otherwise: (e) => e.notRequired()
|
|
103
|
+
}),
|
|
104
|
+
twoFactorType: b.string().when("isTwoFactorEnabled", {
|
|
105
|
+
is: !0,
|
|
106
|
+
then: (e) => e.required("Select Authentication Method"),
|
|
107
|
+
otherwise: (e) => e.notRequired().nullable()
|
|
103
108
|
})
|
|
104
109
|
}), {
|
|
105
110
|
control: n,
|
|
106
111
|
handleSubmit: oe,
|
|
107
|
-
formState: { errors: c, isSubmitting:
|
|
112
|
+
formState: { errors: c, isSubmitting: re },
|
|
108
113
|
setValue: h,
|
|
109
114
|
// getValues,
|
|
110
115
|
watch: T,
|
|
111
|
-
reset:
|
|
116
|
+
reset: se
|
|
112
117
|
} = Ie({
|
|
113
118
|
defaultValues: {
|
|
114
119
|
name: "",
|
|
@@ -148,7 +153,7 @@ const Fe = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Le = [
|
|
|
148
153
|
resolver: xe(le),
|
|
149
154
|
mode: "onChange",
|
|
150
155
|
shouldUnregister: !1
|
|
151
|
-
}), ne = T("isBankDetailsRequired"), ie = T("isTwoFactorEnabled"), Y = T("roleType"), de = Y === "WEB" || Y === "BOTH", _ = T("locationTypes"), { translate: E } = Re(), ce = T("isLocationRequired"), me = T("isHealthInfraMandatory"),
|
|
156
|
+
}), ne = T("isBankDetailsRequired"), ie = T("isTwoFactorEnabled"), Y = T("roleType"), de = Y === "WEB" || Y === "BOTH", _ = T("locationTypes"), { translate: E } = Re(), ce = T("isLocationRequired"), me = T("isHealthInfraMandatory"), A = [
|
|
152
157
|
{ label: "Email", value: "isEmailMandatory" },
|
|
153
158
|
{ label: "Aadhar Number", value: "isAadharNumMandatory" },
|
|
154
159
|
{ label: "Contact Number", value: "isContactNumMandatory" },
|
|
@@ -161,8 +166,8 @@ const Fe = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Le = [
|
|
|
161
166
|
].filter((e) => {
|
|
162
167
|
var t;
|
|
163
168
|
return ((t = f.role.mandatoryFieldsToExclude) == null ? void 0 : t.length) > 0 ? !f.role.mandatoryFieldsToExclude.includes(e.value) : !0;
|
|
164
|
-
}),
|
|
165
|
-
u(0),
|
|
169
|
+
}), F = () => {
|
|
170
|
+
u(0), se(), D("conversion_event", {
|
|
166
171
|
form: G.current,
|
|
167
172
|
form_name: "Manage Role",
|
|
168
173
|
submit: V.current
|
|
@@ -180,18 +185,18 @@ const Fe = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Le = [
|
|
|
180
185
|
button_name: p ? "update role button" : "add role button",
|
|
181
186
|
button_type: "submit",
|
|
182
187
|
button_id: "managerole-add-button"
|
|
183
|
-
}), delete e.bankDetailsRequired, delete e.bankDetailsMandatory, e.roleType !== "WEB" && e.roleType !== "BOTH" && (e.isTwoFactorEnabled = !1), e.isTwoFactorEnabled ? e.twoFactorType || (e.twoFactorType = "AUTHENTICATOR_APP") : e.twoFactorType = null, p || (delete e.id, delete e.state, delete e.createdOn, delete e.createdBy, delete e.code, delete e.description, delete e.assignedFeatures, delete e.assignedFeatureList), e.roleIds = e.roleIds.map((
|
|
184
|
-
(
|
|
188
|
+
}), delete e.bankDetailsRequired, delete e.bankDetailsMandatory, e.roleType !== "WEB" && e.roleType !== "BOTH" && (e.isTwoFactorEnabled = !1), e.isTwoFactorEnabled ? e.twoFactorType || (e.twoFactorType = "AUTHENTICATOR_APP") : e.twoFactorType = null, p || (delete e.id, delete e.state, delete e.createdOn, delete e.createdBy, delete e.code, delete e.description, delete e.assignedFeatures, delete e.assignedFeatureList), e.roleIds = e.roleIds.map((o) => o == null ? void 0 : o.id), e.canManageRoleIds = e.canManageRoleIds.map((o) => o == null ? void 0 : o.id), e.manageByTeamTypeIds = e.manageByTeamTypeIds.map(
|
|
189
|
+
(o) => o == null ? void 0 : o.id
|
|
185
190
|
), e.healthInfrastructureIds = e.healthInfrastructureIds.map(
|
|
186
|
-
(
|
|
187
|
-
), e.categoryIds = e.categoryIds.map((
|
|
191
|
+
(o) => o == null ? void 0 : o.id
|
|
192
|
+
), e.categoryIds = e.categoryIds.map((o) => o == null ? void 0 : o.id), e.locationTypes = e.isLocationRequired === !0 ? e.locationTypes : [], delete e.isLocationRequired, e.manageByRoleIds = e.roleIds, p ? await ve(e) : await we(e), j({
|
|
188
193
|
type: "success",
|
|
189
194
|
message: `Role ${p ? "Updated" : "Added"} Successfully`
|
|
190
|
-
}), V.current = !0,
|
|
191
|
-
} catch (
|
|
192
|
-
|
|
195
|
+
}), V.current = !0, F(), ae();
|
|
196
|
+
} catch (o) {
|
|
197
|
+
j({
|
|
193
198
|
type: "error",
|
|
194
|
-
message: `Role Cannot be added: ${(i = (t =
|
|
199
|
+
message: `Role Cannot be added: ${(i = (t = o == null ? void 0 : o.response) == null ? void 0 : t.data) == null ? void 0 : i.message}`
|
|
195
200
|
});
|
|
196
201
|
}
|
|
197
202
|
};
|
|
@@ -199,9 +204,9 @@ const Fe = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Le = [
|
|
|
199
204
|
(async () => {
|
|
200
205
|
try {
|
|
201
206
|
S((i) => !i);
|
|
202
|
-
const t =
|
|
203
|
-
if (
|
|
204
|
-
const [i,
|
|
207
|
+
const t = qe.getEnv();
|
|
208
|
+
if (q !== 0) {
|
|
209
|
+
const [i, o, C, k, L] = await Promise.all([
|
|
205
210
|
Ne(),
|
|
206
211
|
Te(),
|
|
207
212
|
O({
|
|
@@ -228,14 +233,14 @@ const Fe = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Le = [
|
|
|
228
233
|
return {
|
|
229
234
|
...g,
|
|
230
235
|
roles: i.data,
|
|
231
|
-
locationData:
|
|
232
|
-
manageTeam: (R =
|
|
233
|
-
category: (M =
|
|
236
|
+
locationData: o.data,
|
|
237
|
+
manageTeam: (R = C == null ? void 0 : C.data) == null ? void 0 : R.result,
|
|
238
|
+
category: (M = k == null ? void 0 : k.data) == null ? void 0 : M.result,
|
|
234
239
|
healthInfraType: (B = L == null ? void 0 : L.data) == null ? void 0 : B.result
|
|
235
240
|
};
|
|
236
241
|
}), N) {
|
|
237
242
|
const { data: g } = await be(N);
|
|
238
|
-
U((
|
|
243
|
+
U((r) => ({ ...r, roleData: g, env: t })), Object.keys(g).map((r) => h(r, g[r])), h("isBankDetailsRequired", g.isBankDetailsRequired), h("isBankDetailsMandatory", g.isBankDetailsMandatory);
|
|
239
244
|
const {
|
|
240
245
|
manageByTeamTypeIds: R,
|
|
241
246
|
healthInfrastructureIds: M,
|
|
@@ -245,65 +250,65 @@ const Fe = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Le = [
|
|
|
245
250
|
h(
|
|
246
251
|
"manageByTeamTypeIds",
|
|
247
252
|
R ? R.map(
|
|
248
|
-
(
|
|
253
|
+
(r) => {
|
|
249
254
|
var m;
|
|
250
|
-
return (m =
|
|
255
|
+
return (m = C.data.result) == null ? void 0 : m.find((s) => (s == null ? void 0 : s.id) === r);
|
|
251
256
|
}
|
|
252
257
|
) : []
|
|
253
258
|
), h(
|
|
254
259
|
"healthInfrastructureIds",
|
|
255
260
|
M ? M.map(
|
|
256
|
-
(
|
|
261
|
+
(r) => {
|
|
257
262
|
var m;
|
|
258
263
|
return (m = L.data.result) == null ? void 0 : m.find(
|
|
259
|
-
(
|
|
264
|
+
(s) => (s == null ? void 0 : s.id) === r
|
|
260
265
|
);
|
|
261
266
|
}
|
|
262
|
-
).filter((
|
|
267
|
+
).filter((r) => r !== void 0) : []
|
|
263
268
|
), h(
|
|
264
269
|
"categoryIds",
|
|
265
270
|
K ? K.map(
|
|
266
|
-
(
|
|
271
|
+
(r) => {
|
|
267
272
|
var m;
|
|
268
|
-
return (m =
|
|
273
|
+
return (m = k.data.result) == null ? void 0 : m.find((s) => (s == null ? void 0 : s.id) === r);
|
|
269
274
|
}
|
|
270
275
|
) : []
|
|
271
276
|
), h(
|
|
272
277
|
"roleIds",
|
|
273
|
-
B ? B.map((
|
|
278
|
+
B ? B.map((r) => {
|
|
274
279
|
var m;
|
|
275
|
-
return (m = i.data) == null ? void 0 : m.find((
|
|
276
|
-
}).filter((
|
|
280
|
+
return (m = i.data) == null ? void 0 : m.find((s) => (s == null ? void 0 : s.id) === r);
|
|
281
|
+
}).filter((r) => r !== void 0) : []
|
|
277
282
|
), h(
|
|
278
283
|
"canManageRoleIds",
|
|
279
|
-
g.canManageRoleIds ? g.canManageRoleIds.map((
|
|
284
|
+
g.canManageRoleIds ? g.canManageRoleIds.map((r) => {
|
|
280
285
|
var m;
|
|
281
|
-
return (m = i.data) == null ? void 0 : m.find((
|
|
282
|
-
}).filter((
|
|
286
|
+
return (m = i.data) == null ? void 0 : m.find((s) => (s == null ? void 0 : s.id) === r);
|
|
287
|
+
}).filter((r) => r !== void 0) : []
|
|
283
288
|
), g.locationTypes.length > 0 ? h("isLocationRequired", !0) : h("isLocationRequired", !1);
|
|
284
289
|
}
|
|
285
290
|
}
|
|
286
291
|
S((i) => !i);
|
|
287
292
|
} catch (t) {
|
|
288
|
-
|
|
293
|
+
j({
|
|
289
294
|
message: `Error in manage role :${t == null ? void 0 : t.message}`,
|
|
290
295
|
type: "error"
|
|
291
296
|
}), S((i) => !i);
|
|
292
297
|
}
|
|
293
298
|
})();
|
|
294
|
-
}, [N,
|
|
299
|
+
}, [N, q]), /* @__PURE__ */ a(
|
|
295
300
|
ge,
|
|
296
301
|
{
|
|
297
|
-
open:
|
|
298
|
-
onClose:
|
|
302
|
+
open: q !== 0,
|
|
303
|
+
onClose: F,
|
|
299
304
|
"data-testid": "managerole-modal",
|
|
300
305
|
children: /* @__PURE__ */ a("div", { className: "mt-10 fixed inset-0 z-[100] flex items-center justify-center p-4 animate-in fade-in duration-200", children: /* @__PURE__ */ a(
|
|
301
306
|
H,
|
|
302
307
|
{
|
|
303
308
|
className: "w-full max-w-2xl rounded-[2.5rem] shadow-2xl shadow-blue-900/10 overflow-hidden flex flex-col animate-in zoom-in-95 duration-300",
|
|
304
309
|
sx: { bgcolor: (e) => e.palette.custom.customBackground },
|
|
305
|
-
children: /* @__PURE__ */
|
|
306
|
-
/* @__PURE__ */
|
|
310
|
+
children: /* @__PURE__ */ l(ee, { isLoading: te, children: [
|
|
311
|
+
/* @__PURE__ */ l("div", { className: "px-8 pt-8 pb-4 flex items-center justify-between", children: [
|
|
307
312
|
/* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(
|
|
308
313
|
H,
|
|
309
314
|
{
|
|
@@ -317,23 +322,23 @@ const Fe = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Le = [
|
|
|
317
322
|
fe,
|
|
318
323
|
{
|
|
319
324
|
size: "small",
|
|
320
|
-
onClick:
|
|
325
|
+
onClick: F,
|
|
321
326
|
className: "w-10 h-10 rounded-full bg-slate-100 flex items-center justify-center text-slate-400 hover:bg-slate-200 hover:text-slate-600 transition-all",
|
|
322
327
|
"data-testid": "managerole-close-icon",
|
|
323
328
|
children: /* @__PURE__ */ a(Me, { icon: Be, size: "lg" })
|
|
324
329
|
}
|
|
325
330
|
)
|
|
326
331
|
] }),
|
|
327
|
-
/* @__PURE__ */
|
|
332
|
+
/* @__PURE__ */ l(
|
|
328
333
|
"form",
|
|
329
334
|
{
|
|
330
335
|
onSubmit: oe(ue),
|
|
331
336
|
ref: G,
|
|
332
337
|
className: "px-8 pb-8 space-y-6 overflow-y-auto max-h-[80vh]",
|
|
333
338
|
children: [
|
|
334
|
-
/* @__PURE__ */
|
|
339
|
+
/* @__PURE__ */ l("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-4", children: [
|
|
335
340
|
/* @__PURE__ */ a(y, { variant: "outlined", children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(d, { label: "Role Name", children: /* @__PURE__ */ a(
|
|
336
|
-
|
|
341
|
+
W,
|
|
337
342
|
{
|
|
338
343
|
placeholder: "Role Name",
|
|
339
344
|
name: "name",
|
|
@@ -349,7 +354,7 @@ const Fe = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Le = [
|
|
|
349
354
|
label: "Max Position",
|
|
350
355
|
tooltip: "This is the maximum no of users that can be created at one location of this role type",
|
|
351
356
|
children: /* @__PURE__ */ a(
|
|
352
|
-
|
|
357
|
+
W,
|
|
353
358
|
{
|
|
354
359
|
name: "maxPosition",
|
|
355
360
|
id: "maxPosition",
|
|
@@ -373,7 +378,7 @@ const Fe = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Le = [
|
|
|
373
378
|
}
|
|
374
379
|
) }) }),
|
|
375
380
|
f.role.showMaxHealthData && /* @__PURE__ */ a(y, { variant: "outlined", children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(d, { label: "Max Health Infrastructure", children: /* @__PURE__ */ a(
|
|
376
|
-
|
|
381
|
+
W,
|
|
377
382
|
{
|
|
378
383
|
name: "maxHealthInfra",
|
|
379
384
|
id: "maxHealthInfra",
|
|
@@ -425,8 +430,8 @@ const Fe = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Le = [
|
|
|
425
430
|
)
|
|
426
431
|
}
|
|
427
432
|
) }),
|
|
428
|
-
/* @__PURE__ */
|
|
429
|
-
(ce === !0 ||
|
|
433
|
+
/* @__PURE__ */ l("div", { className: "space-y-4", children: [
|
|
434
|
+
(ce === !0 || re) && /* @__PURE__ */ a(P, { children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(
|
|
430
435
|
d,
|
|
431
436
|
{
|
|
432
437
|
label: "Location",
|
|
@@ -496,7 +501,7 @@ const Fe = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Le = [
|
|
|
496
501
|
)
|
|
497
502
|
}
|
|
498
503
|
) }),
|
|
499
|
-
/* @__PURE__ */
|
|
504
|
+
/* @__PURE__ */ l("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
500
505
|
f.role.showRoleType && /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(
|
|
501
506
|
d,
|
|
502
507
|
{
|
|
@@ -509,7 +514,7 @@ const Fe = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Le = [
|
|
|
509
514
|
control: n,
|
|
510
515
|
id: "roleType",
|
|
511
516
|
name: "roleType",
|
|
512
|
-
options:
|
|
517
|
+
options: ke,
|
|
513
518
|
displayName: "name",
|
|
514
519
|
optionValue: "name",
|
|
515
520
|
errors: c,
|
|
@@ -560,7 +565,7 @@ const Fe = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Le = [
|
|
|
560
565
|
)
|
|
561
566
|
}
|
|
562
567
|
) }) }),
|
|
563
|
-
f.role.showCategoryIds && /* @__PURE__ */ a(
|
|
568
|
+
f.role.showCategoryIds && /* @__PURE__ */ a(P, { children: /* @__PURE__ */ a("div", { className: "space-y-4", children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(
|
|
564
569
|
d,
|
|
565
570
|
{
|
|
566
571
|
label: "Category",
|
|
@@ -581,7 +586,7 @@ const Fe = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Le = [
|
|
|
581
586
|
}
|
|
582
587
|
) }) }) })
|
|
583
588
|
] }),
|
|
584
|
-
/* @__PURE__ */
|
|
589
|
+
/* @__PURE__ */ l("div", { className: "flex items-center gap-6", children: [
|
|
585
590
|
f.role.showBankDetailsRequired && /* @__PURE__ */ a(
|
|
586
591
|
y,
|
|
587
592
|
{
|
|
@@ -612,26 +617,20 @@ const Fe = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Le = [
|
|
|
612
617
|
)
|
|
613
618
|
}
|
|
614
619
|
),
|
|
615
|
-
!p && /* @__PURE__ */ a(
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
isFullWidth: !1,
|
|
628
|
-
"data-testid": "managerole-self-manage-checkbox"
|
|
629
|
-
}
|
|
630
|
-
)
|
|
631
|
-
}
|
|
632
|
-
) }) }) })
|
|
620
|
+
!p && /* @__PURE__ */ a(P, { children: /* @__PURE__ */ a(y, { variant: "outlined ", className: "w-[40%]", children: /* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: [
|
|
621
|
+
/* @__PURE__ */ a("label", { className: "text-sm font-medium text-gray-700", children: "Self Manage" }),
|
|
622
|
+
/* @__PURE__ */ a(
|
|
623
|
+
$,
|
|
624
|
+
{
|
|
625
|
+
name: "canSelfManage",
|
|
626
|
+
control: n,
|
|
627
|
+
isFullWidth: !1,
|
|
628
|
+
"data-testid": "managerole-self-manage-checkbox"
|
|
629
|
+
}
|
|
630
|
+
)
|
|
631
|
+
] }) }) })
|
|
633
632
|
] }),
|
|
634
|
-
de && /* @__PURE__ */
|
|
633
|
+
de && /* @__PURE__ */ l("div", { className: "flex items-center gap-6 w-full", children: [
|
|
635
634
|
/* @__PURE__ */ a(
|
|
636
635
|
y,
|
|
637
636
|
{
|
|
@@ -666,6 +665,7 @@ const Fe = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Le = [
|
|
|
666
665
|
{
|
|
667
666
|
label: "Authentication Method",
|
|
668
667
|
tooltip: "Select which authentication method users of this role will use",
|
|
668
|
+
required: !0,
|
|
669
669
|
children: /* @__PURE__ */ a(
|
|
670
670
|
Z,
|
|
671
671
|
{
|
|
@@ -692,8 +692,8 @@ const Fe = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Le = [
|
|
|
692
692
|
{
|
|
693
693
|
label: "Mandatory Fields",
|
|
694
694
|
tooltip: "These fields are Mandatory when creating users of this role type",
|
|
695
|
-
children: /* @__PURE__ */
|
|
696
|
-
|
|
695
|
+
children: /* @__PURE__ */ l(pe, { row: !0, children: [
|
|
696
|
+
A == null ? void 0 : A.map((e) => /* @__PURE__ */ a(
|
|
697
697
|
$,
|
|
698
698
|
{
|
|
699
699
|
control: n,
|
|
@@ -719,7 +719,7 @@ const Fe = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Le = [
|
|
|
719
719
|
)
|
|
720
720
|
}
|
|
721
721
|
) }),
|
|
722
|
-
/* @__PURE__ */
|
|
722
|
+
/* @__PURE__ */ l(
|
|
723
723
|
H,
|
|
724
724
|
{
|
|
725
725
|
className: "flex items-center justify-end gap-3 pt-6 border-t",
|
|
@@ -731,7 +731,7 @@ const Fe = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Le = [
|
|
|
731
731
|
variant: "contained",
|
|
732
732
|
color: "secondary",
|
|
733
733
|
size: "small",
|
|
734
|
-
onClick:
|
|
734
|
+
onClick: F,
|
|
735
735
|
"data-testid": "managerole-close-button",
|
|
736
736
|
children: E("Close")
|
|
737
737
|
}
|
|
@@ -760,15 +760,15 @@ const Fe = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Le = [
|
|
|
760
760
|
);
|
|
761
761
|
};
|
|
762
762
|
De.propTypes = {
|
|
763
|
-
isUpdate:
|
|
764
|
-
role:
|
|
765
|
-
onClose:
|
|
766
|
-
open:
|
|
767
|
-
setOpen:
|
|
768
|
-
selectedId:
|
|
769
|
-
isRoleListModified:
|
|
763
|
+
isUpdate: v.bool,
|
|
764
|
+
role: v.object,
|
|
765
|
+
onClose: v.func,
|
|
766
|
+
open: v.bool,
|
|
767
|
+
setOpen: v.func,
|
|
768
|
+
selectedId: v.string,
|
|
769
|
+
isRoleListModified: v.bool
|
|
770
770
|
};
|
|
771
771
|
export {
|
|
772
772
|
De as default
|
|
773
773
|
};
|
|
774
|
-
//# sourceMappingURL=ManageRole-
|
|
774
|
+
//# sourceMappingURL=ManageRole-B9bs_T00.js.map
|