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