@argusoft/medplat-core 1.0.19 → 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/{AddRoleDrawer-Bc655LQU.js → AddRoleDrawer-CQdzQZLb.js} +36 -36
- package/dist/AddRoleDrawer-CQdzQZLb.js.map +1 -0
- package/dist/{ConditionConfig-D2hOAa4n.js → ConditionConfig-C3rF2wXU.js} +2 -2
- package/dist/{ConditionConfig-D2hOAa4n.js.map → ConditionConfig-C3rF2wXU.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/{ManageDynamicFeature-i6ARKe36.js → ManageDynamicFeature-BhONvfC_.js} +2 -2
- package/dist/{ManageDynamicFeature-i6ARKe36.js.map → ManageDynamicFeature-BhONvfC_.js.map} +1 -1
- package/dist/{ManageEventConfiguration-CHugu2vQ.js → ManageEventConfiguration-BntUc_YI.js} +5 -5
- package/dist/{ManageEventConfiguration-CHugu2vQ.js.map → ManageEventConfiguration-BntUc_YI.js.map} +1 -1
- 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/{MobileTypeEventConfigModal-2w0WQ3WY.js → MobileTypeEventConfigModal-BNjZ8pnq.js} +2 -2
- package/dist/{MobileTypeEventConfigModal-2w0WQ3WY.js.map → MobileTypeEventConfigModal-BNjZ8pnq.js.map} +1 -1
- package/dist/{NotificationList-CUZSWp2J.js → NotificationList-D1U1LYnz.js} +140 -139
- package/dist/NotificationList-D1U1LYnz.js.map +1 -0
- package/dist/{OtherTypeEventConfigModal-D1p8M39y.js → OtherTypeEventConfigModal-DiVhWDpG.js} +2 -2
- package/dist/{OtherTypeEventConfigModal-D1p8M39y.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/{RoleManagement-BThAL5LO.js → RoleManagement-Cg8-EiVr.js} +83 -82
- package/dist/RoleManagement-Cg8-EiVr.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/{TypeConfiguration-D-3xNcyd.js → TypeConfiguration-CupQxH9Y.js} +28 -28
- package/dist/TypeConfiguration-CupQxH9Y.js.map +1 -0
- package/dist/{UserList-D7GL7jvO.js → UserList-BzHsbYel.js} +186 -185
- package/dist/UserList-BzHsbYel.js.map +1 -0
- package/dist/{WidgetList-B3Sm9weK.js → WidgetList-B7X8Awkg.js} +2 -2
- package/dist/{WidgetList-B3Sm9weK.js.map → WidgetList-B7X8Awkg.js.map} +1 -1
- package/dist/index.js +9 -9
- package/package.json +1 -1
- package/dist/AddEditQueryBuilder-Bcjl5mXE.js.map +0 -1
- package/dist/AddRoleDrawer-Bc655LQU.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/ManageRole-Cbs9dUhc.js.map +0 -1
- package/dist/NotificationList-CUZSWp2J.js.map +0 -1
- package/dist/QueryBuilder-DXexUIe8.js.map +0 -1
- package/dist/RoleManagement-BThAL5LO.js.map +0 -1
- package/dist/ShowFlywayQuery-BkyA6QaA.js.map +0 -1
- package/dist/TypeConfiguration-D-3xNcyd.js.map +0 -1
- package/dist/UserList-D7GL7jvO.js.map +0 -1
|
@@ -1,113 +1,114 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as o, jsx as a, Fragment as A } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as X, useState as J, useEffect as he } from "react";
|
|
3
|
-
import { Modal as ge, Box as
|
|
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
|
|
6
|
-
import { getRoleList as
|
|
5
|
+
import { g as be, a as ve, b as we } from "./RoleManagement-Cg8-EiVr.js";
|
|
6
|
+
import { getRoleList as Ne, getLocationTypes as Te, execute as O } from "@/common/services/GlobalApis";
|
|
7
7
|
import { showToast as W } 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
|
-
import { FormItem as
|
|
12
|
-
import * as
|
|
11
|
+
import { FormItem as d } from "@/views/custom-components/FormItem.jsx";
|
|
12
|
+
import * as v from "yup";
|
|
13
13
|
import j 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
|
-
import { useTranslateProvider as
|
|
18
|
-
import { FontAwesomeIcon as
|
|
17
|
+
import { useTranslateProvider as Re } from "@/common/languageTranslator/TranslationContext";
|
|
18
|
+
import { FontAwesomeIcon as Me } from "@fortawesome/react-fontawesome";
|
|
19
19
|
import { faXmark as Be } from "@fortawesome/free-solid-svg-icons";
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import {
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
import Ce from "@/common/services/util/GeneralUtil";
|
|
21
|
+
import f from "@/common/config/implementationConfig";
|
|
22
|
+
import b from "prop-types";
|
|
23
|
+
import z from "@/views/custom-components/CustomToggleSwitch";
|
|
24
|
+
import { useSelector as ke } from "react-redux";
|
|
25
|
+
import { getUseSkeleton as qe } from "@/store/reducers/SkeletonReducer";
|
|
26
|
+
const ee = ({ children: N, isLoading: p }) => !ke(qe) || !p ? N : /* @__PURE__ */ o("div", { className: "pt-6 h-[88vh]", children: [
|
|
27
|
+
/* @__PURE__ */ o("div", { className: "px-8 pt-2 pb-4 flex items-center justify-between", children: [
|
|
27
28
|
/* @__PURE__ */ a("div", { className: "bg-gray-300 animate-pulse rounded-md w-32 h-8" }),
|
|
28
29
|
/* @__PURE__ */ a("div", { className: "bg-gray-300 animate-pulse rounded-full w-10 h-10" })
|
|
29
30
|
] }),
|
|
30
|
-
/* @__PURE__ */
|
|
31
|
-
/* @__PURE__ */ a("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-4", children: [1, 2, 3].map((
|
|
31
|
+
/* @__PURE__ */ o("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__ */ o("div", { className: "space-y-1.5", children: [
|
|
32
33
|
/* @__PURE__ */ a("div", { className: "h-4 bg-gray-300 rounded w-1/3 mb-2 animate-pulse" }),
|
|
33
34
|
/* @__PURE__ */ a("div", { className: "h-10 bg-gray-300 rounded animate-pulse w-full" })
|
|
34
|
-
] },
|
|
35
|
-
/* @__PURE__ */ a("div", { className: "flex items-center gap-6 w-full", children: /* @__PURE__ */
|
|
35
|
+
] }, u)) }),
|
|
36
|
+
/* @__PURE__ */ a("div", { className: "flex items-center gap-6 w-full", children: /* @__PURE__ */ o("div", { className: "w-full", children: [
|
|
36
37
|
/* @__PURE__ */ a("div", { className: "h-4 bg-gray-300 rounded w-1/4 mb-2 animate-pulse" }),
|
|
37
38
|
/* @__PURE__ */ a("div", { className: "h-8 bg-gray-300 rounded-full w-16 animate-pulse" })
|
|
38
39
|
] }) }),
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
[1, 2].map((
|
|
40
|
+
/* @__PURE__ */ o("div", { className: "space-y-4", children: [
|
|
41
|
+
[1, 2].map((u) => /* @__PURE__ */ o("div", { className: "space-y-1.5", children: [
|
|
41
42
|
/* @__PURE__ */ a("div", { className: "h-4 bg-gray-300 rounded w-1/4 mb-2 animate-pulse" }),
|
|
42
43
|
/* @__PURE__ */ a("div", { className: "h-10 bg-gray-300 rounded animate-pulse w-full" })
|
|
43
|
-
] },
|
|
44
|
-
/* @__PURE__ */ a("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [1, 2].map((
|
|
44
|
+
] }, u)),
|
|
45
|
+
/* @__PURE__ */ a("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [1, 2].map((u) => /* @__PURE__ */ o("div", { className: "space-y-1.5", children: [
|
|
45
46
|
/* @__PURE__ */ a("div", { className: "h-4 bg-gray-300 rounded w-1/3 mb-2 animate-pulse" }),
|
|
46
47
|
/* @__PURE__ */ a("div", { className: "h-10 bg-gray-300 rounded animate-pulse w-full" })
|
|
47
|
-
] },
|
|
48
|
-
[1, 2].map((
|
|
48
|
+
] }, u)) }),
|
|
49
|
+
[1, 2].map((u) => /* @__PURE__ */ o("div", { className: "space-y-1.5", children: [
|
|
49
50
|
/* @__PURE__ */ a("div", { className: "h-4 bg-gray-300 rounded w-1/3 mb-2 animate-pulse" }),
|
|
50
51
|
/* @__PURE__ */ a("div", { className: "h-10 bg-gray-300 rounded animate-pulse w-full" })
|
|
51
|
-
] },
|
|
52
|
+
] }, u))
|
|
52
53
|
] }),
|
|
53
|
-
/* @__PURE__ */
|
|
54
|
-
/* @__PURE__ */
|
|
54
|
+
/* @__PURE__ */ o("div", { className: "flex items-center gap-6", children: [
|
|
55
|
+
/* @__PURE__ */ o("div", { className: "w-[60%]", children: [
|
|
55
56
|
/* @__PURE__ */ a("div", { className: "h-4 bg-gray-300 rounded w-1/3 mb-2 animate-pulse" }),
|
|
56
57
|
/* @__PURE__ */ a("div", { className: "h-8 bg-gray-300 rounded-full w-16 animate-pulse" })
|
|
57
58
|
] }),
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
+
/* @__PURE__ */ o("div", { className: "w-[40%] flex items-center gap-2", children: [
|
|
59
60
|
/* @__PURE__ */ a("div", { className: "h-5 w-5 bg-gray-300 rounded animate-pulse" }),
|
|
60
61
|
/* @__PURE__ */ a("div", { className: "h-4 bg-gray-300 rounded w-1/3 animate-pulse" })
|
|
61
62
|
] })
|
|
62
63
|
] }),
|
|
63
|
-
/* @__PURE__ */
|
|
64
|
+
/* @__PURE__ */ o("div", { className: "space-y-2", children: [
|
|
64
65
|
/* @__PURE__ */ a("div", { className: "h-4 bg-gray-300 rounded w-1/4 mb-2 animate-pulse" }),
|
|
65
|
-
/* @__PURE__ */ a("div", { className: "flex flex-wrap gap-4", children: [1, 2, 3, 4].map((
|
|
66
|
+
/* @__PURE__ */ a("div", { className: "flex flex-wrap gap-4", children: [1, 2, 3, 4].map((u) => /* @__PURE__ */ o("div", { className: "flex items-center gap-2", children: [
|
|
66
67
|
/* @__PURE__ */ a("div", { className: "h-5 w-5 bg-gray-300 rounded animate-pulse" }),
|
|
67
68
|
/* @__PURE__ */ a("div", { className: "h-4 w-16 bg-gray-300 rounded animate-pulse" })
|
|
68
|
-
] },
|
|
69
|
+
] }, u)) })
|
|
69
70
|
] })
|
|
70
71
|
] }),
|
|
71
|
-
/* @__PURE__ */
|
|
72
|
+
/* @__PURE__ */ o("div", { className: "flex items-center justify-end gap-3 pt-6 px-8 pb-4 border-t border-slate-100", children: [
|
|
72
73
|
/* @__PURE__ */ a("div", { className: "h-9 w-20 bg-gray-300 rounded animate-pulse" }),
|
|
73
74
|
/* @__PURE__ */ a("div", { className: "h-9 w-24 bg-gray-300 rounded animate-pulse" })
|
|
74
75
|
] })
|
|
75
76
|
] });
|
|
76
77
|
ee.propTypes = {
|
|
77
|
-
children:
|
|
78
|
-
isLoading:
|
|
78
|
+
children: b.any,
|
|
79
|
+
isLoading: b.any
|
|
79
80
|
};
|
|
80
|
-
const
|
|
81
|
+
const Fe = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Le = [
|
|
81
82
|
{ label: "Authenticator App", value: "AUTHENTICATOR_APP" }
|
|
82
|
-
],
|
|
83
|
-
selectedId:
|
|
84
|
-
isUpdate:
|
|
85
|
-
open:
|
|
86
|
-
setOpen:
|
|
83
|
+
], De = ({
|
|
84
|
+
selectedId: N,
|
|
85
|
+
isUpdate: p,
|
|
86
|
+
open: C,
|
|
87
|
+
setOpen: u,
|
|
87
88
|
isRoleListModified: ae
|
|
88
89
|
}) => {
|
|
89
|
-
const
|
|
90
|
-
name:
|
|
91
|
-
locationTypes:
|
|
90
|
+
const G = X(null), V = X(!1), D = ye(), [w, U] = J({}), [te, S] = J(!1), le = v.object().shape({
|
|
91
|
+
name: v.string().required("Enter Role Name"),
|
|
92
|
+
locationTypes: v.array().when("isLocationRequired", {
|
|
92
93
|
is: !0,
|
|
93
94
|
then: (e) => e.min(1, "Select Location Type").required("Select Location Type"),
|
|
94
95
|
otherwise: (e) => e.notRequired()
|
|
95
96
|
}),
|
|
96
|
-
roleType:
|
|
97
|
-
isBankDetailsRequired:
|
|
98
|
-
healthInfrastructureIds:
|
|
97
|
+
roleType: f.role.showRoleType ? v.string().required("Select Role Type") : v.string().notRequired(),
|
|
98
|
+
isBankDetailsRequired: f.role.showBankDetailsRequired ? v.boolean().nullable().defined("Please Select a Value") : v.boolean().notRequired(),
|
|
99
|
+
healthInfrastructureIds: v.array().when("isHealthInfraMandatory", {
|
|
99
100
|
is: !0,
|
|
100
101
|
then: (e) => e.min(1, "Select Health Infrastructure Type").required("Select Health Infrastructure Type"),
|
|
101
102
|
otherwise: (e) => e.notRequired()
|
|
102
103
|
})
|
|
103
104
|
}), {
|
|
104
|
-
control:
|
|
105
|
-
handleSubmit:
|
|
106
|
-
formState: { errors:
|
|
107
|
-
setValue:
|
|
105
|
+
control: n,
|
|
106
|
+
handleSubmit: oe,
|
|
107
|
+
formState: { errors: c, isSubmitting: se },
|
|
108
|
+
setValue: h,
|
|
108
109
|
// getValues,
|
|
109
|
-
watch:
|
|
110
|
-
reset:
|
|
110
|
+
watch: T,
|
|
111
|
+
reset: re
|
|
111
112
|
} = Ie({
|
|
112
113
|
defaultValues: {
|
|
113
114
|
name: "",
|
|
@@ -147,70 +148,62 @@ const Ce = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Se = [
|
|
|
147
148
|
resolver: xe(le),
|
|
148
149
|
mode: "onChange",
|
|
149
150
|
shouldUnregister: !1
|
|
150
|
-
}),
|
|
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"), P = [
|
|
151
152
|
{ label: "Email", value: "isEmailMandatory" },
|
|
152
|
-
|
|
153
|
+
{ label: "Aadhar Number", value: "isAadharNumMandatory" },
|
|
153
154
|
{ label: "Contact Number", value: "isContactNumMandatory" },
|
|
154
|
-
|
|
155
|
+
{ label: "Convox Id", value: "isConvoxIdMandatory" },
|
|
155
156
|
{ label: "Last Name", value: "isLastNameMandatory" },
|
|
156
157
|
{ label: "Health Infrastructure", value: "isHealthInfraMandatory" },
|
|
157
158
|
{ label: "GeoLocation", value: "isGeolocationMandatory" },
|
|
158
|
-
|
|
159
|
+
{ label: "Smag Trained", value: "isSmagTrainedMandatory" },
|
|
159
160
|
{ label: "Nodal", value: "isNodalMandatory" }
|
|
160
|
-
].filter((e) =>
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
"
|
|
165
|
-
|
|
166
|
-
"isGeolocationMandatory",
|
|
167
|
-
"isHealthInfraMandatory",
|
|
168
|
-
"isLastNameMandatory",
|
|
169
|
-
"isNodalMandatory",
|
|
170
|
-
"isSmagTrainedMandatory"
|
|
171
|
-
].includes(e.value) : !0), k = () => {
|
|
172
|
-
h(0), oe(), F("conversion_event", {
|
|
173
|
-
form: z.current,
|
|
161
|
+
].filter((e) => {
|
|
162
|
+
var t;
|
|
163
|
+
return ((t = f.role.mandatoryFieldsToExclude) == null ? void 0 : t.length) > 0 ? !f.role.mandatoryFieldsToExclude.includes(e.value) : !0;
|
|
164
|
+
}), k = () => {
|
|
165
|
+
u(0), re(), D("conversion_event", {
|
|
166
|
+
form: G.current,
|
|
174
167
|
form_name: "Manage Role",
|
|
175
168
|
submit: V.current
|
|
176
|
-
}),
|
|
169
|
+
}), D("button_click", {
|
|
177
170
|
button_name: "add role close button",
|
|
178
171
|
button_type: "cancel",
|
|
179
172
|
button_id: "managerole-close-button"
|
|
180
173
|
});
|
|
181
|
-
}, I = (e, t,
|
|
182
|
-
|
|
174
|
+
}, I = (e, t, i) => {
|
|
175
|
+
h(i, t);
|
|
183
176
|
}, ue = async (e) => {
|
|
184
|
-
var t,
|
|
177
|
+
var t, i;
|
|
185
178
|
try {
|
|
186
|
-
|
|
187
|
-
button_name:
|
|
179
|
+
D("button_click", {
|
|
180
|
+
button_name: p ? "update role button" : "add role button",
|
|
188
181
|
button_type: "submit",
|
|
189
182
|
button_id: "managerole-add-button"
|
|
190
|
-
}), 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,
|
|
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((l) => l == null ? void 0 : l.id), e.canManageRoleIds = e.canManageRoleIds.map((l) => l == null ? void 0 : l.id), e.manageByTeamTypeIds = e.manageByTeamTypeIds.map(
|
|
191
184
|
(l) => l == null ? void 0 : l.id
|
|
192
185
|
), e.healthInfrastructureIds = e.healthInfrastructureIds.map(
|
|
193
186
|
(l) => l == null ? void 0 : l.id
|
|
194
|
-
), e.categoryIds = e.categoryIds.map((l) => l == null ? void 0 : l.id), e.locationTypes = e.isLocationRequired === !0 ? e.locationTypes : [], delete e.isLocationRequired, e.manageByRoleIds = e.roleIds,
|
|
187
|
+
), e.categoryIds = e.categoryIds.map((l) => l == null ? void 0 : l.id), e.locationTypes = e.isLocationRequired === !0 ? e.locationTypes : [], delete e.isLocationRequired, e.manageByRoleIds = e.roleIds, p ? await ve(e) : await we(e), W({
|
|
195
188
|
type: "success",
|
|
196
|
-
message: `Role ${
|
|
189
|
+
message: `Role ${p ? "Updated" : "Added"} Successfully`
|
|
197
190
|
}), V.current = !0, k(), ae();
|
|
198
191
|
} catch (l) {
|
|
199
192
|
W({
|
|
200
193
|
type: "error",
|
|
201
|
-
message: `Role Cannot be added: ${(
|
|
194
|
+
message: `Role Cannot be added: ${(i = (t = l == null ? void 0 : l.response) == null ? void 0 : t.data) == null ? void 0 : i.message}`
|
|
202
195
|
});
|
|
203
196
|
}
|
|
204
197
|
};
|
|
205
198
|
return he(() => {
|
|
206
199
|
(async () => {
|
|
207
200
|
try {
|
|
208
|
-
|
|
209
|
-
const t =
|
|
210
|
-
if (
|
|
211
|
-
const [
|
|
201
|
+
S((i) => !i);
|
|
202
|
+
const t = Ce.getEnv();
|
|
203
|
+
if (C !== 0) {
|
|
204
|
+
const [i, l, q, F, L] = await Promise.all([
|
|
205
|
+
Ne(),
|
|
212
206
|
Te(),
|
|
213
|
-
we(),
|
|
214
207
|
O({
|
|
215
208
|
code: "team_all_types_for_roles",
|
|
216
209
|
parameters: {}
|
|
@@ -230,128 +223,128 @@ const Ce = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Se = [
|
|
|
230
223
|
}
|
|
231
224
|
})
|
|
232
225
|
]);
|
|
233
|
-
if (U((
|
|
234
|
-
var
|
|
226
|
+
if (U((g) => {
|
|
227
|
+
var R, M, B;
|
|
235
228
|
return {
|
|
236
|
-
...
|
|
237
|
-
roles:
|
|
229
|
+
...g,
|
|
230
|
+
roles: i.data,
|
|
238
231
|
locationData: l.data,
|
|
239
|
-
manageTeam: (
|
|
240
|
-
category: (
|
|
241
|
-
healthInfraType: (B =
|
|
232
|
+
manageTeam: (R = q == null ? void 0 : q.data) == null ? void 0 : R.result,
|
|
233
|
+
category: (M = F == null ? void 0 : F.data) == null ? void 0 : M.result,
|
|
234
|
+
healthInfraType: (B = L == null ? void 0 : L.data) == null ? void 0 : B.result
|
|
242
235
|
};
|
|
243
|
-
}),
|
|
244
|
-
const { data:
|
|
245
|
-
U((
|
|
236
|
+
}), N) {
|
|
237
|
+
const { data: g } = await be(N);
|
|
238
|
+
U((s) => ({ ...s, roleData: g, env: t })), Object.keys(g).map((s) => h(s, g[s])), h("isBankDetailsRequired", g.isBankDetailsRequired), h("isBankDetailsMandatory", g.isBankDetailsMandatory);
|
|
246
239
|
const {
|
|
247
|
-
manageByTeamTypeIds:
|
|
248
|
-
healthInfrastructureIds:
|
|
240
|
+
manageByTeamTypeIds: R,
|
|
241
|
+
healthInfrastructureIds: M,
|
|
249
242
|
roleIds: B,
|
|
250
243
|
categoryIds: K
|
|
251
|
-
} =
|
|
252
|
-
|
|
244
|
+
} = g;
|
|
245
|
+
h(
|
|
253
246
|
"manageByTeamTypeIds",
|
|
254
|
-
|
|
255
|
-
(
|
|
256
|
-
var
|
|
257
|
-
return (
|
|
247
|
+
R ? R.map(
|
|
248
|
+
(s) => {
|
|
249
|
+
var m;
|
|
250
|
+
return (m = q.data.result) == null ? void 0 : m.find((r) => (r == null ? void 0 : r.id) === s);
|
|
258
251
|
}
|
|
259
252
|
) : []
|
|
260
|
-
),
|
|
253
|
+
), h(
|
|
261
254
|
"healthInfrastructureIds",
|
|
262
|
-
|
|
263
|
-
(
|
|
264
|
-
var
|
|
265
|
-
return (
|
|
266
|
-
(
|
|
255
|
+
M ? M.map(
|
|
256
|
+
(s) => {
|
|
257
|
+
var m;
|
|
258
|
+
return (m = L.data.result) == null ? void 0 : m.find(
|
|
259
|
+
(r) => (r == null ? void 0 : r.id) === s
|
|
267
260
|
);
|
|
268
261
|
}
|
|
269
|
-
).filter((
|
|
270
|
-
),
|
|
262
|
+
).filter((s) => s !== void 0) : []
|
|
263
|
+
), h(
|
|
271
264
|
"categoryIds",
|
|
272
265
|
K ? K.map(
|
|
273
|
-
(
|
|
274
|
-
var
|
|
275
|
-
return (
|
|
266
|
+
(s) => {
|
|
267
|
+
var m;
|
|
268
|
+
return (m = F.data.result) == null ? void 0 : m.find((r) => (r == null ? void 0 : r.id) === s);
|
|
276
269
|
}
|
|
277
270
|
) : []
|
|
278
|
-
),
|
|
271
|
+
), h(
|
|
279
272
|
"roleIds",
|
|
280
|
-
B ? B.map((
|
|
281
|
-
var
|
|
282
|
-
return (
|
|
283
|
-
}).filter((
|
|
284
|
-
),
|
|
273
|
+
B ? B.map((s) => {
|
|
274
|
+
var m;
|
|
275
|
+
return (m = i.data) == null ? void 0 : m.find((r) => (r == null ? void 0 : r.id) === s);
|
|
276
|
+
}).filter((s) => s !== void 0) : []
|
|
277
|
+
), h(
|
|
285
278
|
"canManageRoleIds",
|
|
286
|
-
|
|
287
|
-
var
|
|
288
|
-
return (
|
|
289
|
-
}).filter((
|
|
290
|
-
),
|
|
279
|
+
g.canManageRoleIds ? g.canManageRoleIds.map((s) => {
|
|
280
|
+
var m;
|
|
281
|
+
return (m = i.data) == null ? void 0 : m.find((r) => (r == null ? void 0 : r.id) === s);
|
|
282
|
+
}).filter((s) => s !== void 0) : []
|
|
283
|
+
), g.locationTypes.length > 0 ? h("isLocationRequired", !0) : h("isLocationRequired", !1);
|
|
291
284
|
}
|
|
292
285
|
}
|
|
293
|
-
|
|
286
|
+
S((i) => !i);
|
|
294
287
|
} catch (t) {
|
|
295
288
|
W({
|
|
296
289
|
message: `Error in manage role :${t == null ? void 0 : t.message}`,
|
|
297
290
|
type: "error"
|
|
298
|
-
}),
|
|
291
|
+
}), S((i) => !i);
|
|
299
292
|
}
|
|
300
293
|
})();
|
|
301
|
-
}, [
|
|
294
|
+
}, [N, C]), /* @__PURE__ */ a(
|
|
302
295
|
ge,
|
|
303
296
|
{
|
|
304
|
-
open:
|
|
297
|
+
open: C !== 0,
|
|
305
298
|
onClose: k,
|
|
306
299
|
"data-testid": "managerole-modal",
|
|
307
300
|
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(
|
|
308
|
-
|
|
301
|
+
H,
|
|
309
302
|
{
|
|
310
303
|
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",
|
|
311
304
|
sx: { bgcolor: (e) => e.palette.custom.customBackground },
|
|
312
|
-
children: /* @__PURE__ */
|
|
313
|
-
/* @__PURE__ */
|
|
305
|
+
children: /* @__PURE__ */ o(ee, { isLoading: te, children: [
|
|
306
|
+
/* @__PURE__ */ o("div", { className: "px-8 pt-8 pb-4 flex items-center justify-between", children: [
|
|
314
307
|
/* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(
|
|
315
|
-
|
|
308
|
+
H,
|
|
316
309
|
{
|
|
317
310
|
component: "h2",
|
|
318
311
|
className: "text-2xl font-bold text-customBlue",
|
|
319
312
|
sx: { color: "text.primary" },
|
|
320
|
-
children:
|
|
313
|
+
children: p ? "Update Role" : "Add New Role"
|
|
321
314
|
}
|
|
322
315
|
) }),
|
|
323
316
|
/* @__PURE__ */ a(
|
|
324
|
-
|
|
317
|
+
fe,
|
|
325
318
|
{
|
|
326
319
|
size: "small",
|
|
327
320
|
onClick: k,
|
|
328
321
|
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",
|
|
329
322
|
"data-testid": "managerole-close-icon",
|
|
330
|
-
children: /* @__PURE__ */ a(
|
|
323
|
+
children: /* @__PURE__ */ a(Me, { icon: Be, size: "lg" })
|
|
331
324
|
}
|
|
332
325
|
)
|
|
333
326
|
] }),
|
|
334
|
-
/* @__PURE__ */
|
|
327
|
+
/* @__PURE__ */ o(
|
|
335
328
|
"form",
|
|
336
329
|
{
|
|
337
|
-
onSubmit:
|
|
338
|
-
ref:
|
|
330
|
+
onSubmit: oe(ue),
|
|
331
|
+
ref: G,
|
|
339
332
|
className: "px-8 pb-8 space-y-6 overflow-y-auto max-h-[80vh]",
|
|
340
333
|
children: [
|
|
341
|
-
/* @__PURE__ */
|
|
342
|
-
/* @__PURE__ */ a(y, { variant: "outlined", children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(
|
|
334
|
+
/* @__PURE__ */ o("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-4", children: [
|
|
335
|
+
/* @__PURE__ */ a(y, { variant: "outlined", children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(d, { label: "Role Name", children: /* @__PURE__ */ a(
|
|
343
336
|
j,
|
|
344
337
|
{
|
|
345
338
|
placeholder: "Role Name",
|
|
346
339
|
name: "name",
|
|
347
340
|
id: "name",
|
|
348
|
-
errors:
|
|
349
|
-
control:
|
|
341
|
+
errors: c,
|
|
342
|
+
control: n,
|
|
350
343
|
dataTestId: "managerole-role-name-field"
|
|
351
344
|
}
|
|
352
345
|
) }) }) }),
|
|
353
346
|
/* @__PURE__ */ a(y, { variant: "outlined", children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(
|
|
354
|
-
|
|
347
|
+
d,
|
|
355
348
|
{
|
|
356
349
|
label: "Max Position",
|
|
357
350
|
tooltip: "This is the maximum no of users that can be created at one location of this role type",
|
|
@@ -360,8 +353,8 @@ const Ce = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Se = [
|
|
|
360
353
|
{
|
|
361
354
|
name: "maxPosition",
|
|
362
355
|
id: "maxPosition",
|
|
363
|
-
errors:
|
|
364
|
-
control:
|
|
356
|
+
errors: c,
|
|
357
|
+
control: n,
|
|
365
358
|
rules: {
|
|
366
359
|
maxLength: 3,
|
|
367
360
|
pattern: /^\d{1,3}$/
|
|
@@ -379,13 +372,13 @@ const Ce = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Se = [
|
|
|
379
372
|
)
|
|
380
373
|
}
|
|
381
374
|
) }) }),
|
|
382
|
-
|
|
375
|
+
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(
|
|
383
376
|
j,
|
|
384
377
|
{
|
|
385
378
|
name: "maxHealthInfra",
|
|
386
379
|
id: "maxHealthInfra",
|
|
387
|
-
control:
|
|
388
|
-
errors:
|
|
380
|
+
control: n,
|
|
381
|
+
errors: c,
|
|
389
382
|
rules: {
|
|
390
383
|
maxLength: 3,
|
|
391
384
|
pattern: /^\d{1,3}$/
|
|
@@ -411,30 +404,30 @@ const Ce = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Se = [
|
|
|
411
404
|
variant: "outlined",
|
|
412
405
|
className: "flex flex-row items-center w-full ",
|
|
413
406
|
children: /* @__PURE__ */ a(
|
|
414
|
-
|
|
407
|
+
d,
|
|
415
408
|
{
|
|
416
409
|
label: "Location Required",
|
|
417
410
|
required: !0,
|
|
418
411
|
direction: "row",
|
|
419
412
|
children: /* @__PURE__ */ a(
|
|
420
|
-
|
|
413
|
+
z,
|
|
421
414
|
{
|
|
422
|
-
control:
|
|
415
|
+
control: n,
|
|
423
416
|
name: "isLocationRequired",
|
|
424
417
|
options: [
|
|
425
418
|
{ label: "Yes", value: !0 },
|
|
426
419
|
{ label: "No", value: !1 }
|
|
427
420
|
],
|
|
428
|
-
errors:
|
|
421
|
+
errors: c
|
|
429
422
|
}
|
|
430
423
|
)
|
|
431
424
|
}
|
|
432
425
|
)
|
|
433
426
|
}
|
|
434
427
|
) }),
|
|
435
|
-
/* @__PURE__ */
|
|
436
|
-
(ce === !0 ||
|
|
437
|
-
|
|
428
|
+
/* @__PURE__ */ o("div", { className: "space-y-4", children: [
|
|
429
|
+
(ce === !0 || se) && /* @__PURE__ */ a(A, { children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(
|
|
430
|
+
d,
|
|
438
431
|
{
|
|
439
432
|
label: "Location",
|
|
440
433
|
required: !0,
|
|
@@ -443,18 +436,18 @@ const Ce = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Se = [
|
|
|
443
436
|
x,
|
|
444
437
|
{
|
|
445
438
|
id: "locationTypes",
|
|
446
|
-
control:
|
|
439
|
+
control: n,
|
|
447
440
|
name: "locationTypes",
|
|
448
|
-
options:
|
|
449
|
-
value:
|
|
441
|
+
options: w.locationData,
|
|
442
|
+
value: _ == null ? void 0 : _.map(
|
|
450
443
|
(e) => {
|
|
451
444
|
var t;
|
|
452
|
-
return (t =
|
|
453
|
-
(
|
|
445
|
+
return (t = w.locationData) == null ? void 0 : t.find(
|
|
446
|
+
(i) => i.type === (e == null ? void 0 : e.type)
|
|
454
447
|
);
|
|
455
448
|
}
|
|
456
449
|
),
|
|
457
|
-
errors:
|
|
450
|
+
errors: c,
|
|
458
451
|
getOptionLabel: (e) => e == null ? void 0 : e.name,
|
|
459
452
|
dataTestId: "managerole-location-type-select",
|
|
460
453
|
checkEquality: "type",
|
|
@@ -464,7 +457,7 @@ const Ce = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Se = [
|
|
|
464
457
|
}
|
|
465
458
|
) }) }),
|
|
466
459
|
/* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(
|
|
467
|
-
|
|
460
|
+
d,
|
|
468
461
|
{
|
|
469
462
|
label: "Can Manage Role",
|
|
470
463
|
tooltip: "Please select the roles that shall be managed by this role",
|
|
@@ -473,18 +466,18 @@ const Ce = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Se = [
|
|
|
473
466
|
{
|
|
474
467
|
name: "roleIds",
|
|
475
468
|
id: "roleIds",
|
|
476
|
-
errors:
|
|
477
|
-
control:
|
|
469
|
+
errors: c,
|
|
470
|
+
control: n,
|
|
478
471
|
dataTestId: "managerole-manage-role-select",
|
|
479
|
-
options:
|
|
472
|
+
options: w.roles,
|
|
480
473
|
onChange: (e, t) => I(e, t, "roleIds"),
|
|
481
474
|
getOptionLabel: (e) => e == null ? void 0 : e.name
|
|
482
475
|
}
|
|
483
476
|
)
|
|
484
477
|
}
|
|
485
478
|
) }),
|
|
486
|
-
/* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(
|
|
487
|
-
|
|
479
|
+
f.role.showManagedFrom && /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(
|
|
480
|
+
d,
|
|
488
481
|
{
|
|
489
482
|
label: "Managed From",
|
|
490
483
|
tooltip: "Please select the roles that can manage this role",
|
|
@@ -493,19 +486,19 @@ const Ce = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Se = [
|
|
|
493
486
|
{
|
|
494
487
|
name: "canManageRoleIds",
|
|
495
488
|
id: "canManageRoleIds",
|
|
496
|
-
errors:
|
|
497
|
-
control:
|
|
489
|
+
errors: c,
|
|
490
|
+
control: n,
|
|
498
491
|
dataTestId: "managerole-managed-by-role-select",
|
|
499
|
-
options:
|
|
492
|
+
options: w.roles,
|
|
500
493
|
onChange: (e, t) => I(e, t, "canManageRoleIds"),
|
|
501
494
|
getOptionLabel: (e) => e == null ? void 0 : e.name
|
|
502
495
|
}
|
|
503
496
|
)
|
|
504
497
|
}
|
|
505
498
|
) }),
|
|
506
|
-
/* @__PURE__ */
|
|
507
|
-
/* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(
|
|
508
|
-
|
|
499
|
+
/* @__PURE__ */ o("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
500
|
+
f.role.showRoleType && /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(
|
|
501
|
+
d,
|
|
509
502
|
{
|
|
510
503
|
label: "Role Type",
|
|
511
504
|
tooltip: "Please select Role Type",
|
|
@@ -513,31 +506,31 @@ const Ce = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Se = [
|
|
|
513
506
|
children: /* @__PURE__ */ a(
|
|
514
507
|
Z,
|
|
515
508
|
{
|
|
516
|
-
control:
|
|
509
|
+
control: n,
|
|
517
510
|
id: "roleType",
|
|
518
511
|
name: "roleType",
|
|
519
|
-
options:
|
|
512
|
+
options: Fe,
|
|
520
513
|
displayName: "name",
|
|
521
514
|
optionValue: "name",
|
|
522
|
-
errors:
|
|
515
|
+
errors: c,
|
|
523
516
|
dataTestId: "managerole-role-type-dropdown"
|
|
524
517
|
}
|
|
525
518
|
)
|
|
526
519
|
}
|
|
527
520
|
) }),
|
|
528
|
-
/* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(
|
|
529
|
-
|
|
521
|
+
f.role.showCanManageTeam && /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(
|
|
522
|
+
d,
|
|
530
523
|
{
|
|
531
524
|
label: "Can Manage Team",
|
|
532
525
|
tooltip: "Please select the teams that shall be managed by this role",
|
|
533
526
|
children: /* @__PURE__ */ a(
|
|
534
527
|
x,
|
|
535
528
|
{
|
|
536
|
-
control:
|
|
529
|
+
control: n,
|
|
537
530
|
name: "manageByTeamTypeIds",
|
|
538
531
|
id: "manageByTeamTypeIds",
|
|
539
|
-
errors:
|
|
540
|
-
options:
|
|
532
|
+
errors: c,
|
|
533
|
+
options: w.manageTeam,
|
|
541
534
|
dataTestId: "managerole-manage-team-select",
|
|
542
535
|
onChange: (e, t) => I(e, t, "manageByTeamTypeIds"),
|
|
543
536
|
getOptionLabel: (e) => e == null ? void 0 : e.type
|
|
@@ -547,7 +540,7 @@ const Ce = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Se = [
|
|
|
547
540
|
) })
|
|
548
541
|
] }),
|
|
549
542
|
/* @__PURE__ */ a("div", { className: "space-y-4", children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(
|
|
550
|
-
|
|
543
|
+
d,
|
|
551
544
|
{
|
|
552
545
|
label: "Select Health Infrastructure type",
|
|
553
546
|
tooltip: "Please select the institute to be associated with the role",
|
|
@@ -555,20 +548,20 @@ const Ce = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Se = [
|
|
|
555
548
|
children: /* @__PURE__ */ a(
|
|
556
549
|
x,
|
|
557
550
|
{
|
|
558
|
-
options:
|
|
559
|
-
errors:
|
|
551
|
+
options: w.healthInfraType,
|
|
552
|
+
errors: c,
|
|
560
553
|
name: "healthInfrastructureIds",
|
|
561
554
|
id: "healthInfrastructureIds",
|
|
562
555
|
dataTestId: "managerole-health-infrastructure-select",
|
|
563
|
-
control:
|
|
556
|
+
control: n,
|
|
564
557
|
onChange: (e, t) => I(e, t, "healthInfrastructureIds"),
|
|
565
558
|
getOptionLabel: (e) => e == null ? void 0 : e.value
|
|
566
559
|
}
|
|
567
560
|
)
|
|
568
561
|
}
|
|
569
562
|
) }) }),
|
|
570
|
-
|
|
571
|
-
|
|
563
|
+
f.role.showCategoryIds && /* @__PURE__ */ a(A, { children: /* @__PURE__ */ a("div", { className: "space-y-4", children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(
|
|
564
|
+
d,
|
|
572
565
|
{
|
|
573
566
|
label: "Category",
|
|
574
567
|
tooltip: "Please select the category to be associated with the role",
|
|
@@ -577,10 +570,10 @@ const Ce = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Se = [
|
|
|
577
570
|
{
|
|
578
571
|
id: "categoryIds",
|
|
579
572
|
name: "categoryIds",
|
|
580
|
-
errors:
|
|
581
|
-
options:
|
|
573
|
+
errors: c,
|
|
574
|
+
options: w.category,
|
|
582
575
|
dataTestId: "managerole-role-category-select",
|
|
583
|
-
control:
|
|
576
|
+
control: n,
|
|
584
577
|
onChange: (e, t) => I(e, t, "categoryIds"),
|
|
585
578
|
getOptionLabel: (e) => e == null ? void 0 : e.value
|
|
586
579
|
}
|
|
@@ -588,14 +581,14 @@ const Ce = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Se = [
|
|
|
588
581
|
}
|
|
589
582
|
) }) }) })
|
|
590
583
|
] }),
|
|
591
|
-
/* @__PURE__ */
|
|
592
|
-
/* @__PURE__ */ a(
|
|
584
|
+
/* @__PURE__ */ o("div", { className: "flex items-center gap-6", children: [
|
|
585
|
+
f.role.showBankDetailsRequired && /* @__PURE__ */ a(
|
|
593
586
|
y,
|
|
594
587
|
{
|
|
595
588
|
variant: "outlined",
|
|
596
589
|
className: "flex flex-row items-center w-[60%] ",
|
|
597
590
|
children: /* @__PURE__ */ a(
|
|
598
|
-
|
|
591
|
+
d,
|
|
599
592
|
{
|
|
600
593
|
label: "Bank Details Required",
|
|
601
594
|
tooltip: "Select if bank details are required for this role",
|
|
@@ -604,23 +597,23 @@ const Ce = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Se = [
|
|
|
604
597
|
childrenWidth: "50%",
|
|
605
598
|
direction: "row",
|
|
606
599
|
children: /* @__PURE__ */ a(
|
|
607
|
-
|
|
600
|
+
z,
|
|
608
601
|
{
|
|
609
|
-
control:
|
|
602
|
+
control: n,
|
|
610
603
|
name: "isBankDetailsRequired",
|
|
611
604
|
options: [
|
|
612
605
|
{ label: "Yes", value: !0 },
|
|
613
606
|
{ label: "No", value: !1 }
|
|
614
607
|
],
|
|
615
|
-
errors:
|
|
608
|
+
errors: c
|
|
616
609
|
}
|
|
617
610
|
)
|
|
618
611
|
}
|
|
619
612
|
)
|
|
620
613
|
}
|
|
621
614
|
),
|
|
622
|
-
!
|
|
623
|
-
|
|
615
|
+
!p && /* @__PURE__ */ a(A, { children: /* @__PURE__ */ a(y, { variant: "outlined ", className: "w-[40%]", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ a(
|
|
616
|
+
d,
|
|
624
617
|
{
|
|
625
618
|
label: "Self Manage",
|
|
626
619
|
labelWidth: "60%",
|
|
@@ -630,7 +623,7 @@ const Ce = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Se = [
|
|
|
630
623
|
$,
|
|
631
624
|
{
|
|
632
625
|
name: "canSelfManage",
|
|
633
|
-
control:
|
|
626
|
+
control: n,
|
|
634
627
|
isFullWidth: !1,
|
|
635
628
|
"data-testid": "managerole-self-manage-checkbox"
|
|
636
629
|
}
|
|
@@ -638,14 +631,14 @@ const Ce = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Se = [
|
|
|
638
631
|
}
|
|
639
632
|
) }) }) })
|
|
640
633
|
] }),
|
|
641
|
-
de && /* @__PURE__ */
|
|
634
|
+
de && /* @__PURE__ */ o("div", { className: "flex items-center gap-6 w-full", children: [
|
|
642
635
|
/* @__PURE__ */ a(
|
|
643
636
|
y,
|
|
644
637
|
{
|
|
645
638
|
variant: "outlined",
|
|
646
639
|
className: "flex flex-row items-center w-[50%]",
|
|
647
640
|
children: /* @__PURE__ */ a(
|
|
648
|
-
|
|
641
|
+
d,
|
|
649
642
|
{
|
|
650
643
|
label: "Two-Factor Authentication",
|
|
651
644
|
tooltip: "Require users of this role to use a two-factor authentication app",
|
|
@@ -653,15 +646,15 @@ const Ce = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Se = [
|
|
|
653
646
|
childrenWidth: "40%",
|
|
654
647
|
direction: "row",
|
|
655
648
|
children: /* @__PURE__ */ a(
|
|
656
|
-
|
|
649
|
+
z,
|
|
657
650
|
{
|
|
658
|
-
control:
|
|
651
|
+
control: n,
|
|
659
652
|
name: "isTwoFactorEnabled",
|
|
660
653
|
options: [
|
|
661
654
|
{ label: "Yes", value: !0 },
|
|
662
655
|
{ label: "No", value: !1 }
|
|
663
656
|
],
|
|
664
|
-
errors:
|
|
657
|
+
errors: c
|
|
665
658
|
}
|
|
666
659
|
)
|
|
667
660
|
}
|
|
@@ -669,20 +662,20 @@ const Ce = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Se = [
|
|
|
669
662
|
}
|
|
670
663
|
),
|
|
671
664
|
ie === !0 && /* @__PURE__ */ a(y, { variant: "outlined", className: "w-[50%]", children: /* @__PURE__ */ a(
|
|
672
|
-
|
|
665
|
+
d,
|
|
673
666
|
{
|
|
674
667
|
label: "Authentication Method",
|
|
675
668
|
tooltip: "Select which authentication method users of this role will use",
|
|
676
669
|
children: /* @__PURE__ */ a(
|
|
677
670
|
Z,
|
|
678
671
|
{
|
|
679
|
-
control:
|
|
672
|
+
control: n,
|
|
680
673
|
id: "twoFactorType",
|
|
681
674
|
name: "twoFactorType",
|
|
682
|
-
options:
|
|
675
|
+
options: Le,
|
|
683
676
|
displayName: "label",
|
|
684
677
|
optionValue: "value",
|
|
685
|
-
errors:
|
|
678
|
+
errors: c,
|
|
686
679
|
dataTestId: "managerole-two-factor-type-dropdown"
|
|
687
680
|
}
|
|
688
681
|
)
|
|
@@ -695,15 +688,15 @@ const Ce = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Se = [
|
|
|
695
688
|
variant: "outlined",
|
|
696
689
|
className: "flex flex-col items-start justify-between",
|
|
697
690
|
children: /* @__PURE__ */ a(
|
|
698
|
-
|
|
691
|
+
d,
|
|
699
692
|
{
|
|
700
693
|
label: "Mandatory Fields",
|
|
701
694
|
tooltip: "These fields are Mandatory when creating users of this role type",
|
|
702
|
-
children: /* @__PURE__ */
|
|
695
|
+
children: /* @__PURE__ */ o(pe, { row: !0, children: [
|
|
703
696
|
P == null ? void 0 : P.map((e) => /* @__PURE__ */ a(
|
|
704
697
|
$,
|
|
705
698
|
{
|
|
706
|
-
control:
|
|
699
|
+
control: n,
|
|
707
700
|
name: e.value,
|
|
708
701
|
label: e.label,
|
|
709
702
|
isFullWidth: !1,
|
|
@@ -711,11 +704,11 @@ const Ce = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Se = [
|
|
|
711
704
|
},
|
|
712
705
|
e.value
|
|
713
706
|
)),
|
|
714
|
-
|
|
707
|
+
ne === !0 && /* @__PURE__ */ a(
|
|
715
708
|
$,
|
|
716
709
|
{
|
|
717
710
|
name: "isBankDetailsMandatory",
|
|
718
|
-
control:
|
|
711
|
+
control: n,
|
|
719
712
|
label: "Bank Details",
|
|
720
713
|
isFullWidth: !1,
|
|
721
714
|
"data-testid": "managerole-bank-details-mandatory-checkbox"
|
|
@@ -726,8 +719,8 @@ const Ce = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Se = [
|
|
|
726
719
|
)
|
|
727
720
|
}
|
|
728
721
|
) }),
|
|
729
|
-
/* @__PURE__ */
|
|
730
|
-
|
|
722
|
+
/* @__PURE__ */ o(
|
|
723
|
+
H,
|
|
731
724
|
{
|
|
732
725
|
className: "flex items-center justify-end gap-3 pt-6 border-t",
|
|
733
726
|
sx: { borderColor: "divider" },
|
|
@@ -740,7 +733,7 @@ const Ce = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Se = [
|
|
|
740
733
|
size: "small",
|
|
741
734
|
onClick: k,
|
|
742
735
|
"data-testid": "managerole-close-button",
|
|
743
|
-
children:
|
|
736
|
+
children: E("Close")
|
|
744
737
|
}
|
|
745
738
|
),
|
|
746
739
|
/* @__PURE__ */ a(
|
|
@@ -751,7 +744,7 @@ const Ce = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Se = [
|
|
|
751
744
|
size: "small",
|
|
752
745
|
type: "submit",
|
|
753
746
|
"data-testid": "managerole-submit-button",
|
|
754
|
-
children:
|
|
747
|
+
children: p ? `${E("Update Role")}` : `${E("Add Role")}`
|
|
755
748
|
}
|
|
756
749
|
)
|
|
757
750
|
]
|
|
@@ -766,16 +759,16 @@ const Ce = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Se = [
|
|
|
766
759
|
}
|
|
767
760
|
);
|
|
768
761
|
};
|
|
769
|
-
|
|
770
|
-
isUpdate:
|
|
771
|
-
role:
|
|
772
|
-
onClose:
|
|
773
|
-
open:
|
|
774
|
-
setOpen:
|
|
775
|
-
selectedId:
|
|
776
|
-
isRoleListModified:
|
|
762
|
+
De.propTypes = {
|
|
763
|
+
isUpdate: b.bool,
|
|
764
|
+
role: b.object,
|
|
765
|
+
onClose: b.func,
|
|
766
|
+
open: b.bool,
|
|
767
|
+
setOpen: b.func,
|
|
768
|
+
selectedId: b.string,
|
|
769
|
+
isRoleListModified: b.bool
|
|
777
770
|
};
|
|
778
771
|
export {
|
|
779
|
-
|
|
772
|
+
De as default
|
|
780
773
|
};
|
|
781
|
-
//# sourceMappingURL=ManageRole-
|
|
774
|
+
//# sourceMappingURL=ManageRole-tdzAiCOE.js.map
|