@argusoft/medplat-form-engine 1.0.10 → 1.0.11
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-sgIhYR30-DWNCTLI6.js → AccessRights-sgIhYR30-Dg6B4KJM.js} +20 -20
- package/dist/{AccessRights-sgIhYR30-DWNCTLI6.js.map → AccessRights-sgIhYR30-Dg6B4KJM.js.map} +1 -1
- package/dist/{AddFeatures-BxXCC6ex-1VYoA24R.js → AddFeatures-CkTu7sOI-DQFBCBim.js} +7 -7
- package/dist/{AddFeatures-BxXCC6ex-1VYoA24R.js.map → AddFeatures-CkTu7sOI-DQFBCBim.js.map} +1 -1
- package/dist/{AddLabelModal-DE3ploGD-DWF1SOUp.js → AddLabelModal-DE3ploGD-BV_K8Q7c.js} +45 -45
- package/dist/{AddLabelModal-DE3ploGD-DWF1SOUp.js.map → AddLabelModal-DE3ploGD-BV_K8Q7c.js.map} +1 -1
- package/dist/{AddRoleDrawer-ZK1eejxI-ldfhQqA_.js → AddRoleDrawer-ZK1eejxI-xMb2iVGk.js} +11 -11
- package/dist/{AddRoleDrawer-ZK1eejxI-ldfhQqA_.js.map → AddRoleDrawer-ZK1eejxI-xMb2iVGk.js.map} +1 -1
- package/dist/{AppModal-BgZyfrd--CNvWjWhL.js → AppModal-BgZyfrd--CZPgx1UG.js} +2 -2
- package/dist/{AppModal-BgZyfrd--CNvWjWhL.js.map → AppModal-BgZyfrd--CZPgx1UG.js.map} +1 -1
- package/dist/{ChangePasswordModal-MV7g8tkA-BDA1Pw0i.js → ChangePasswordModal-MV7g8tkA-Duk536Oa.js} +2 -2
- package/dist/{ChangePasswordModal-MV7g8tkA-BDA1Pw0i.js.map → ChangePasswordModal-MV7g8tkA-Duk536Oa.js.map} +1 -1
- package/dist/{FeatureMenu-BYSRoNm0-D2Ak-EDd.js → FeatureMenu-BYSRoNm0-9p5IIVx2.js} +2 -2
- package/dist/{FeatureMenu-BYSRoNm0-D2Ak-EDd.js.map → FeatureMenu-BYSRoNm0-9p5IIVx2.js.map} +1 -1
- package/dist/{ImmunizationConfigurationBase-DZ8EqXlF-CSPs9x_q.js → ImmunizationConfigurationBase-DZ8EqXlF-CdG02LFN.js} +2 -2
- package/dist/{ImmunizationConfigurationBase-DZ8EqXlF-CSPs9x_q.js.map → ImmunizationConfigurationBase-DZ8EqXlF-CdG02LFN.js.map} +1 -1
- package/dist/ImmunizationConfigurationBase-DZ8EqXlF.css +1 -1
- package/dist/{LanguagesModal-rk6IGQwY-Cxw9xctN.js → LanguagesModal-rk6IGQwY-BaAI1s2W.js} +2 -2
- package/dist/{LanguagesModal-rk6IGQwY-Cxw9xctN.js.map → LanguagesModal-rk6IGQwY-BaAI1s2W.js.map} +1 -1
- package/dist/{ManageDynamicFeature-CeeqiS3K-D2Se68tC.js → ManageDynamicFeature-BKkCnQvF-CinU35NS.js} +1013 -1013
- package/dist/ManageDynamicFeature-BKkCnQvF-CinU35NS.js.map +1 -0
- package/dist/{ManageEventConfiguration-BJxS2Su0-yd2dUxgz.js → ManageEventConfiguration-BJxS2Su0-CLP6VZyB.js} +24 -24
- package/dist/{ManageEventConfiguration-BJxS2Su0-yd2dUxgz.js.map → ManageEventConfiguration-BJxS2Su0-CLP6VZyB.js.map} +1 -1
- package/dist/ManageNotification-B4prX-9Z-B4mRuGir.js.map +1 -1
- package/dist/{ManageRole-ByqBmjuc-CApL3DJy.js → ManageRole-CuXmWQyp-ELNs9emF.js} +255 -226
- package/dist/ManageRole-CuXmWQyp-ELNs9emF.js.map +1 -0
- package/dist/{ManageTranslation-BTxvSYKb-CwT975cy.js → ManageTranslation-BTxvSYKb-C2CZwkRN.js} +2 -2
- package/dist/{ManageTranslation-BTxvSYKb-CwT975cy.js.map → ManageTranslation-BTxvSYKb-C2CZwkRN.js.map} +1 -1
- package/dist/{ManageUser-PHiTNyF8-Bddmh2CC.js → ManageUser-PHiTNyF8-D63df1GG.js} +3 -3
- package/dist/{ManageUser-PHiTNyF8-Bddmh2CC.js.map → ManageUser-PHiTNyF8-D63df1GG.js.map} +1 -1
- package/dist/{MedplatFormWrapper-DbdQUpEu.js → MedplatFormWrapper-BNTRYrFO.js} +12 -12
- package/dist/{MedplatFormWrapper-DbdQUpEu.js.map → MedplatFormWrapper-BNTRYrFO.js.map} +1 -1
- package/dist/MedplatFormWrapper.css +1 -0
- package/dist/{QueryManagement-DXA73N2j-Wlk7hKP3.js → QueryManagement-DXA73N2j-s7-8jQY4.js} +2 -2
- package/dist/{QueryManagement-DXA73N2j-Wlk7hKP3.js.map → QueryManagement-DXA73N2j-s7-8jQY4.js.map} +1 -1
- package/dist/{RoleManagement-CLaEJ90J-BW0tG5t9.js → RoleManagement-C0feJCuq-CsxaM0rI.js} +2 -2
- package/dist/{RoleManagement-CLaEJ90J-BW0tG5t9.js.map → RoleManagement-C0feJCuq-CsxaM0rI.js.map} +1 -1
- package/dist/{SubMenu-BHcSNSUF-d-_yEXeN.js → SubMenu-BHcSNSUF-eLmX3DkH.js} +2 -2
- package/dist/{SubMenu-BHcSNSUF-d-_yEXeN.js.map → SubMenu-BHcSNSUF-eLmX3DkH.js.map} +1 -1
- package/dist/{WidgetList-BSApErov-CBYLh0Oh.js → WidgetList-BSApErov-D05f9srr.js} +2 -2
- package/dist/{WidgetList-BSApErov-CBYLh0Oh.js.map → WidgetList-BSApErov-D05f9srr.js.map} +1 -1
- package/dist/{index-CdFr9tGu.js → index-BQKWCEEG.js} +2 -2
- package/dist/{index-CdFr9tGu.js.map → index-BQKWCEEG.js.map} +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/manageImmunization-B4swS745-JldexHrO.js.map +1 -1
- package/package.json +3 -3
- package/dist/ManageDynamicFeature-CeeqiS3K-D2Se68tC.js.map +0 -1
- package/dist/ManageRole-ByqBmjuc-CApL3DJy.js.map +0 -1
|
@@ -1,107 +1,107 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useRef as G, useState as V, useEffect as
|
|
1
|
+
import { jsx as a, jsxs as t, Fragment as D } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as G, useState as V, useEffect as se } from "react";
|
|
3
3
|
import { Modal as de, Box as P, IconButton as ce, FormControl as b, FormGroup as me, Button as K } from "@mui/material";
|
|
4
4
|
import ue from "@/hooks/useTrackEvent";
|
|
5
|
-
import { g as pe, a as he } from "./RoleManagement-
|
|
6
|
-
import { getRoleList as
|
|
7
|
-
import { showToast as
|
|
5
|
+
import { g as pe, a as he } from "./RoleManagement-C0feJCuq-CsxaM0rI.js";
|
|
6
|
+
import { getRoleList as ge, getLocationTypes as ye, execute as F } from "@/common/services/GlobalApis";
|
|
7
|
+
import { showToast as H } from "@/common/toaster/toaster";
|
|
8
8
|
import { useForm as fe } from "react-hook-form";
|
|
9
9
|
import { yupResolver as ve } from "@hookform/resolvers/yup";
|
|
10
10
|
import "@/assets/scss/scrollBar.scss";
|
|
11
|
-
import { FormItem as
|
|
11
|
+
import { FormItem as d } from "@/views/custom-components/FormItem.jsx";
|
|
12
12
|
import * as N from "yup";
|
|
13
|
-
import
|
|
13
|
+
import O from "@/views/custom-components/CustomTextField";
|
|
14
14
|
import be from "@/views/custom-components/CustomDropdown";
|
|
15
15
|
import j from "@/views/custom-components/CustomCheckBox";
|
|
16
|
-
import
|
|
16
|
+
import T from "@/views/custom-components/CustomAutoComplete";
|
|
17
17
|
import { useTranslateProvider as Ne } from "@/common/languageTranslator/TranslationContext";
|
|
18
18
|
import { FontAwesomeIcon as Ie } from "@fortawesome/react-fontawesome";
|
|
19
|
-
import { faXmark as
|
|
20
|
-
import
|
|
21
|
-
import
|
|
19
|
+
import { faXmark as Te } from "@fortawesome/free-solid-svg-icons";
|
|
20
|
+
import g from "@/common/services/util/GeneralUtil";
|
|
21
|
+
import y from "prop-types";
|
|
22
22
|
import Y from "@/views/custom-components/CustomToggleSwitch";
|
|
23
|
-
import { useSelector as
|
|
23
|
+
import { useSelector as xe } from "react-redux";
|
|
24
24
|
import { getUseSkeleton as we } from "@/store/reducers/SkeletonReducer";
|
|
25
|
-
const J = ({ children:
|
|
25
|
+
const J = ({ children: x, isLoading: f }) => !xe(we) || !f ? x : /* @__PURE__ */ t("div", { className: "pt-6 h-[88vh]", children: [
|
|
26
26
|
/* @__PURE__ */ t("div", { className: "px-8 pt-2 pb-4 flex items-center justify-between", children: [
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
-
/* @__PURE__ */
|
|
27
|
+
/* @__PURE__ */ a("div", { className: "bg-gray-300 animate-pulse rounded-md w-32 h-8" }),
|
|
28
|
+
/* @__PURE__ */ a("div", { className: "bg-gray-300 animate-pulse rounded-full w-10 h-10" })
|
|
29
29
|
] }),
|
|
30
30
|
/* @__PURE__ */ t("div", { className: "px-8 pb-8 space-y-6 overflow-y-auto max-h-[80vh]", children: [
|
|
31
|
-
/* @__PURE__ */
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
-
/* @__PURE__ */
|
|
34
|
-
] },
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
-
/* @__PURE__ */
|
|
31
|
+
/* @__PURE__ */ a("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-4", children: [1, 2, 3].map((c) => /* @__PURE__ */ t("div", { className: "space-y-1.5", children: [
|
|
32
|
+
/* @__PURE__ */ a("div", { className: "h-4 bg-gray-300 rounded w-1/3 mb-2 animate-pulse" }),
|
|
33
|
+
/* @__PURE__ */ a("div", { className: "h-10 bg-gray-300 rounded animate-pulse w-full" })
|
|
34
|
+
] }, c)) }),
|
|
35
|
+
/* @__PURE__ */ a("div", { className: "flex items-center gap-6 w-full", children: /* @__PURE__ */ t("div", { className: "w-full", children: [
|
|
36
|
+
/* @__PURE__ */ a("div", { className: "h-4 bg-gray-300 rounded w-1/4 mb-2 animate-pulse" }),
|
|
37
|
+
/* @__PURE__ */ a("div", { className: "h-8 bg-gray-300 rounded-full w-16 animate-pulse" })
|
|
38
38
|
] }) }),
|
|
39
39
|
/* @__PURE__ */ t("div", { className: "space-y-4", children: [
|
|
40
|
-
[1, 2].map((
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
-
/* @__PURE__ */
|
|
43
|
-
] },
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
] },
|
|
48
|
-
[1, 2].map((
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
-
/* @__PURE__ */
|
|
51
|
-
] },
|
|
40
|
+
[1, 2].map((c) => /* @__PURE__ */ t("div", { className: "space-y-1.5", children: [
|
|
41
|
+
/* @__PURE__ */ a("div", { className: "h-4 bg-gray-300 rounded w-1/4 mb-2 animate-pulse" }),
|
|
42
|
+
/* @__PURE__ */ a("div", { className: "h-10 bg-gray-300 rounded animate-pulse w-full" })
|
|
43
|
+
] }, c)),
|
|
44
|
+
/* @__PURE__ */ a("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [1, 2].map((c) => /* @__PURE__ */ t("div", { className: "space-y-1.5", children: [
|
|
45
|
+
/* @__PURE__ */ a("div", { className: "h-4 bg-gray-300 rounded w-1/3 mb-2 animate-pulse" }),
|
|
46
|
+
/* @__PURE__ */ a("div", { className: "h-10 bg-gray-300 rounded animate-pulse w-full" })
|
|
47
|
+
] }, c)) }),
|
|
48
|
+
[1, 2].map((c) => /* @__PURE__ */ t("div", { className: "space-y-1.5", children: [
|
|
49
|
+
/* @__PURE__ */ a("div", { className: "h-4 bg-gray-300 rounded w-1/3 mb-2 animate-pulse" }),
|
|
50
|
+
/* @__PURE__ */ a("div", { className: "h-10 bg-gray-300 rounded animate-pulse w-full" })
|
|
51
|
+
] }, c))
|
|
52
52
|
] }),
|
|
53
53
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-6", children: [
|
|
54
54
|
/* @__PURE__ */ t("div", { className: "w-[60%]", children: [
|
|
55
|
-
/* @__PURE__ */
|
|
56
|
-
/* @__PURE__ */
|
|
55
|
+
/* @__PURE__ */ a("div", { className: "h-4 bg-gray-300 rounded w-1/3 mb-2 animate-pulse" }),
|
|
56
|
+
/* @__PURE__ */ a("div", { className: "h-8 bg-gray-300 rounded-full w-16 animate-pulse" })
|
|
57
57
|
] }),
|
|
58
58
|
/* @__PURE__ */ t("div", { className: "w-[40%] flex items-center gap-2", children: [
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
-
/* @__PURE__ */
|
|
59
|
+
/* @__PURE__ */ a("div", { className: "h-5 w-5 bg-gray-300 rounded animate-pulse" }),
|
|
60
|
+
/* @__PURE__ */ a("div", { className: "h-4 bg-gray-300 rounded w-1/3 animate-pulse" })
|
|
61
61
|
] })
|
|
62
62
|
] }),
|
|
63
63
|
/* @__PURE__ */ t("div", { className: "space-y-2", children: [
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
-
/* @__PURE__ */
|
|
66
|
-
/* @__PURE__ */
|
|
67
|
-
/* @__PURE__ */
|
|
68
|
-
] },
|
|
64
|
+
/* @__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((c) => /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
|
|
66
|
+
/* @__PURE__ */ a("div", { className: "h-5 w-5 bg-gray-300 rounded animate-pulse" }),
|
|
67
|
+
/* @__PURE__ */ a("div", { className: "h-4 w-16 bg-gray-300 rounded animate-pulse" })
|
|
68
|
+
] }, c)) })
|
|
69
69
|
] })
|
|
70
70
|
] }),
|
|
71
71
|
/* @__PURE__ */ t("div", { className: "flex items-center justify-end gap-3 pt-6 px-8 pb-4 border-t border-slate-100", children: [
|
|
72
|
-
/* @__PURE__ */
|
|
73
|
-
/* @__PURE__ */
|
|
72
|
+
/* @__PURE__ */ a("div", { className: "h-9 w-20 bg-gray-300 rounded animate-pulse" }),
|
|
73
|
+
/* @__PURE__ */ a("div", { className: "h-9 w-24 bg-gray-300 rounded animate-pulse" })
|
|
74
74
|
] })
|
|
75
75
|
] });
|
|
76
76
|
J.propTypes = {
|
|
77
|
-
children:
|
|
78
|
-
isLoading:
|
|
77
|
+
children: y.any,
|
|
78
|
+
isLoading: y.any
|
|
79
79
|
};
|
|
80
80
|
const Me = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Re = ({
|
|
81
|
-
selectedId:
|
|
81
|
+
selectedId: x,
|
|
82
82
|
isUpdate: f,
|
|
83
|
-
open:
|
|
83
|
+
open: c,
|
|
84
84
|
setOpen: Q,
|
|
85
85
|
isRoleListModified: X
|
|
86
86
|
}) => {
|
|
87
|
-
const
|
|
87
|
+
const E = G(null), W = G(!1), q = ue(), [m, U] = V({}), [Z, k] = V(!1), ee = N.object().shape({
|
|
88
88
|
name: N.string().required("Enter Role Name"),
|
|
89
89
|
locationTypes: N.array().when("isLocationRequired", {
|
|
90
90
|
is: !0,
|
|
91
|
-
then: (
|
|
92
|
-
otherwise: (
|
|
91
|
+
then: (e) => e.min(1, "Select Location Type").required("Select Location Type"),
|
|
92
|
+
otherwise: (e) => e.notRequired()
|
|
93
93
|
}),
|
|
94
94
|
roleType: N.string().required("Select Role Type"),
|
|
95
|
-
isBankDetailsRequired:
|
|
95
|
+
isBankDetailsRequired: g.isTecho ? N.boolean().notRequired() : N.boolean().nullable().defined("Please Select a Value"),
|
|
96
96
|
healthInfrastructureIds: N.array().when("isHealthInfraMandatory", {
|
|
97
97
|
is: !0,
|
|
98
|
-
then: (
|
|
99
|
-
otherwise: (
|
|
98
|
+
then: (e) => e.min(1, "Select Health Infrastructure Type").required("Select Health Infrastructure Type"),
|
|
99
|
+
otherwise: (e) => e.notRequired()
|
|
100
100
|
})
|
|
101
101
|
}), {
|
|
102
|
-
control:
|
|
102
|
+
control: i,
|
|
103
103
|
handleSubmit: ae,
|
|
104
|
-
formState: { errors:
|
|
104
|
+
formState: { errors: u, isSubmitting: le },
|
|
105
105
|
setValue: p,
|
|
106
106
|
// getValues,
|
|
107
107
|
watch: L,
|
|
@@ -121,6 +121,7 @@ const Me = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Re = ({
|
|
|
121
121
|
isHealthInfraMandatory: !1,
|
|
122
122
|
isGeolocationMandatory: !1,
|
|
123
123
|
roleIds: [],
|
|
124
|
+
canManageRoleIds: [],
|
|
124
125
|
manageByTeamTypeIds: [],
|
|
125
126
|
canSelfManage: !1,
|
|
126
127
|
healthInfrastructureIds: [],
|
|
@@ -142,30 +143,30 @@ const Me = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Re = ({
|
|
|
142
143
|
resolver: ve(ee),
|
|
143
144
|
mode: "onChange",
|
|
144
145
|
shouldUnregister: !1
|
|
145
|
-
}), re = L("isBankDetailsRequired"), $ = L("locationTypes"), { translate: _ } = Ne(),
|
|
146
|
+
}), re = L("isBankDetailsRequired"), $ = L("locationTypes"), { translate: _ } = Ne(), oe = L("isLocationRequired"), ie = L("isHealthInfraMandatory"), z = [
|
|
146
147
|
{ label: "Email", value: "isEmailMandatory" },
|
|
147
|
-
...(
|
|
148
|
+
...(m == null ? void 0 : m.env) !== "chip" ? [{ label: "Aadhar Number", value: "isAadharNumMandatory" }] : [],
|
|
148
149
|
{ label: "Contact Number", value: "isContactNumMandatory" },
|
|
149
|
-
...(
|
|
150
|
+
...(m == null ? void 0 : m.env) !== "chip" ? [{ label: "Convox Id", value: "isConvoxIdMandatory" }] : [],
|
|
150
151
|
{ label: "Last Name", value: "isLastNameMandatory" },
|
|
151
152
|
{ label: "Health Infrastructure", value: "isHealthInfraMandatory" },
|
|
152
153
|
{ label: "GeoLocation", value: "isGeolocationMandatory" },
|
|
153
|
-
...(
|
|
154
|
+
...(m == null ? void 0 : m.env) !== "chip" ? [{ label: "Smag Trained", value: "isSmagTrainedMandatory" }] : [],
|
|
154
155
|
{ label: "Nodal", value: "isNodalMandatory" }
|
|
155
|
-
].filter((
|
|
156
|
+
].filter((e) => g.isTecho ? ![
|
|
156
157
|
"isGeolocationMandatory",
|
|
157
158
|
"isHealthInfraMandatory",
|
|
158
159
|
"isLastNameMandatory",
|
|
159
160
|
"isSmagTrainedMandatory"
|
|
160
|
-
].includes(
|
|
161
|
+
].includes(e.value) : g.isSewaRural || g.isPhmp || g.isImomcare ? e.value !== "isNodalMandatory" : g.isEkavach ? ![
|
|
161
162
|
"isGeolocationMandatory",
|
|
162
163
|
"isHealthInfraMandatory",
|
|
163
164
|
"isLastNameMandatory",
|
|
164
165
|
"isNodalMandatory",
|
|
165
166
|
"isSmagTrainedMandatory"
|
|
166
|
-
].includes(
|
|
167
|
+
].includes(e.value) : !0), B = () => {
|
|
167
168
|
Q(0), te(), q("conversion_event", {
|
|
168
|
-
form:
|
|
169
|
+
form: E.current,
|
|
169
170
|
form_name: "Manage Role",
|
|
170
171
|
submit: W.current
|
|
171
172
|
}), q("button_click", {
|
|
@@ -173,51 +174,53 @@ const Me = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Re = ({
|
|
|
173
174
|
button_type: "cancel",
|
|
174
175
|
button_id: "managerole-close-button"
|
|
175
176
|
});
|
|
176
|
-
},
|
|
177
|
+
}, I = (e, l, v) => {
|
|
177
178
|
p(v, l);
|
|
178
|
-
},
|
|
179
|
+
}, ne = async (e) => {
|
|
179
180
|
var l, v;
|
|
180
181
|
try {
|
|
181
182
|
q("button_click", {
|
|
182
183
|
button_name: f ? "update role button" : "add role button",
|
|
183
184
|
button_type: "submit",
|
|
184
185
|
button_id: "managerole-add-button"
|
|
185
|
-
}), delete
|
|
186
|
+
}), delete e.bankDetailsRequired, delete e.bankDetailsMandatory, 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((r) => r == null ? void 0 : r.id), e.canManageRoleIds = e.canManageRoleIds.map(
|
|
186
187
|
(r) => r == null ? void 0 : r.id
|
|
187
|
-
),
|
|
188
|
+
), e.manageByTeamTypeIds = e.manageByTeamTypeIds.map(
|
|
188
189
|
(r) => r == null ? void 0 : r.id
|
|
189
|
-
),
|
|
190
|
+
), e.healthInfrastructureIds = e.healthInfrastructureIds.map(
|
|
191
|
+
(r) => r == null ? void 0 : r.id
|
|
192
|
+
), e.categoryIds = e.categoryIds.map((r) => r == null ? void 0 : r.id), e.locationTypes = e.isLocationRequired === !0 ? e.locationTypes : [], delete e.isLocationRequired, e.manageByRoleIds = e.roleIds, await he(e), H({
|
|
190
193
|
type: "success",
|
|
191
194
|
message: `Role ${f ? "Updated" : "Added"} Successfully`
|
|
192
195
|
}), W.current = !0, B(), X();
|
|
193
196
|
} catch (r) {
|
|
194
|
-
|
|
197
|
+
H({
|
|
195
198
|
type: "error",
|
|
196
199
|
message: `Role Cannot be added: ${(v = (l = r == null ? void 0 : r.response) == null ? void 0 : l.data) == null ? void 0 : v.message}`
|
|
197
200
|
});
|
|
198
201
|
}
|
|
199
202
|
};
|
|
200
|
-
return
|
|
203
|
+
return se(() => {
|
|
201
204
|
(async () => {
|
|
202
205
|
try {
|
|
203
206
|
k((l) => !l);
|
|
204
|
-
const
|
|
205
|
-
if (
|
|
207
|
+
const e = g.getEnv();
|
|
208
|
+
if (c !== 0) {
|
|
206
209
|
const [l, v, r, S, C] = await Promise.all([
|
|
207
|
-
ye(),
|
|
208
210
|
ge(),
|
|
209
|
-
|
|
211
|
+
ye(),
|
|
212
|
+
F({
|
|
210
213
|
code: "team_all_types_for_roles",
|
|
211
214
|
parameters: {}
|
|
212
215
|
}),
|
|
213
|
-
|
|
216
|
+
F({
|
|
214
217
|
code: "retrieve_field_values_for_form_field",
|
|
215
218
|
parameters: {
|
|
216
219
|
form: "WEB",
|
|
217
220
|
fieldKey: "role_catg"
|
|
218
221
|
}
|
|
219
222
|
}),
|
|
220
|
-
|
|
223
|
+
F({
|
|
221
224
|
code: "retrieve_field_values_for_form_field",
|
|
222
225
|
parameters: {
|
|
223
226
|
form: "WEB",
|
|
@@ -226,81 +229,87 @@ const Me = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Re = ({
|
|
|
226
229
|
})
|
|
227
230
|
]);
|
|
228
231
|
if (U((h) => {
|
|
229
|
-
var
|
|
232
|
+
var w, M, R;
|
|
230
233
|
return {
|
|
231
234
|
...h,
|
|
232
235
|
roles: l.data,
|
|
233
236
|
locationData: v.data,
|
|
234
|
-
manageTeam: (
|
|
235
|
-
category: (
|
|
236
|
-
healthInfraType: (
|
|
237
|
+
manageTeam: (w = r == null ? void 0 : r.data) == null ? void 0 : w.result,
|
|
238
|
+
category: (M = S == null ? void 0 : S.data) == null ? void 0 : M.result,
|
|
239
|
+
healthInfraType: (R = C == null ? void 0 : C.data) == null ? void 0 : R.result
|
|
237
240
|
};
|
|
238
|
-
}),
|
|
239
|
-
const { data: h } = await pe(
|
|
240
|
-
U((
|
|
241
|
+
}), x) {
|
|
242
|
+
const { data: h } = await pe(x);
|
|
243
|
+
U((o) => ({ ...o, roleData: h, env: e })), Object.keys(h).map((o) => p(o, h[o])), p("isBankDetailsRequired", h.isBankDetailsRequired), p("isBankDetailsMandatory", h.isBankDetailsMandatory);
|
|
241
244
|
const {
|
|
242
|
-
manageByTeamTypeIds:
|
|
243
|
-
healthInfrastructureIds:
|
|
244
|
-
roleIds:
|
|
245
|
+
manageByTeamTypeIds: w,
|
|
246
|
+
healthInfrastructureIds: M,
|
|
247
|
+
roleIds: R,
|
|
245
248
|
categoryIds: A
|
|
246
249
|
} = h;
|
|
247
250
|
p(
|
|
248
251
|
"manageByTeamTypeIds",
|
|
249
|
-
|
|
250
|
-
(
|
|
251
|
-
var
|
|
252
|
-
return (
|
|
252
|
+
w ? w.map(
|
|
253
|
+
(o) => {
|
|
254
|
+
var n;
|
|
255
|
+
return (n = r.data.result) == null ? void 0 : n.find((s) => (s == null ? void 0 : s.id) === o);
|
|
253
256
|
}
|
|
254
257
|
) : []
|
|
255
258
|
), p(
|
|
256
259
|
"healthInfrastructureIds",
|
|
257
|
-
|
|
258
|
-
(
|
|
259
|
-
var
|
|
260
|
-
return (
|
|
261
|
-
(
|
|
260
|
+
M ? M.map(
|
|
261
|
+
(o) => {
|
|
262
|
+
var n;
|
|
263
|
+
return (n = C.data.result) == null ? void 0 : n.find(
|
|
264
|
+
(s) => (s == null ? void 0 : s.id) === o
|
|
262
265
|
);
|
|
263
266
|
}
|
|
264
|
-
).filter((
|
|
267
|
+
).filter((o) => o !== void 0) : []
|
|
265
268
|
), p(
|
|
266
269
|
"categoryIds",
|
|
267
270
|
A ? A.map(
|
|
268
|
-
(
|
|
269
|
-
var
|
|
270
|
-
return (
|
|
271
|
+
(o) => {
|
|
272
|
+
var n;
|
|
273
|
+
return (n = S.data.result) == null ? void 0 : n.find((s) => (s == null ? void 0 : s.id) === o);
|
|
271
274
|
}
|
|
272
275
|
) : []
|
|
273
276
|
), p(
|
|
274
277
|
"roleIds",
|
|
275
|
-
|
|
276
|
-
var
|
|
277
|
-
return (
|
|
278
|
-
}).filter((
|
|
278
|
+
R ? R.map((o) => {
|
|
279
|
+
var n;
|
|
280
|
+
return (n = l.data) == null ? void 0 : n.find((s) => (s == null ? void 0 : s.id) === o);
|
|
281
|
+
}).filter((o) => o !== void 0) : []
|
|
282
|
+
), p(
|
|
283
|
+
"canManageRoleIds",
|
|
284
|
+
h.canManageRoleIds ? h.canManageRoleIds.map((o) => {
|
|
285
|
+
var n;
|
|
286
|
+
return (n = l.data) == null ? void 0 : n.find((s) => (s == null ? void 0 : s.id) === o);
|
|
287
|
+
}).filter((o) => o !== void 0) : []
|
|
279
288
|
), h.locationTypes.length > 0 ? p("isLocationRequired", !0) : p("isLocationRequired", !1);
|
|
280
289
|
}
|
|
281
290
|
}
|
|
282
291
|
k((l) => !l);
|
|
283
|
-
} catch (
|
|
284
|
-
|
|
285
|
-
message: `Error in manage role :${
|
|
292
|
+
} catch (e) {
|
|
293
|
+
H({
|
|
294
|
+
message: `Error in manage role :${e == null ? void 0 : e.message}`,
|
|
286
295
|
type: "error"
|
|
287
296
|
}), k((l) => !l);
|
|
288
297
|
}
|
|
289
298
|
})();
|
|
290
|
-
}, [
|
|
299
|
+
}, [x, c]), /* @__PURE__ */ a(
|
|
291
300
|
de,
|
|
292
301
|
{
|
|
293
|
-
open:
|
|
302
|
+
open: c !== 0,
|
|
294
303
|
onClose: B,
|
|
295
304
|
"data-testid": "managerole-modal",
|
|
296
|
-
children: /* @__PURE__ */
|
|
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(
|
|
297
306
|
P,
|
|
298
307
|
{
|
|
299
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",
|
|
300
|
-
sx: { bgcolor: (
|
|
309
|
+
sx: { bgcolor: (e) => e.palette.custom.customBackground },
|
|
301
310
|
children: /* @__PURE__ */ t(J, { isLoading: Z, children: [
|
|
302
311
|
/* @__PURE__ */ t("div", { className: "px-8 pt-8 pb-4 flex items-center justify-between", children: [
|
|
303
|
-
/* @__PURE__ */
|
|
312
|
+
/* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(
|
|
304
313
|
P,
|
|
305
314
|
{
|
|
306
315
|
component: "h2",
|
|
@@ -309,48 +318,48 @@ const Me = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Re = ({
|
|
|
309
318
|
children: f ? "Update Role" : "Add New Role"
|
|
310
319
|
}
|
|
311
320
|
) }),
|
|
312
|
-
/* @__PURE__ */
|
|
321
|
+
/* @__PURE__ */ a(
|
|
313
322
|
ce,
|
|
314
323
|
{
|
|
315
324
|
size: "small",
|
|
316
325
|
onClick: B,
|
|
317
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",
|
|
318
327
|
"data-testid": "managerole-close-icon",
|
|
319
|
-
children: /* @__PURE__ */
|
|
328
|
+
children: /* @__PURE__ */ a(Ie, { icon: Te, size: "lg" })
|
|
320
329
|
}
|
|
321
330
|
)
|
|
322
331
|
] }),
|
|
323
332
|
/* @__PURE__ */ t(
|
|
324
333
|
"form",
|
|
325
334
|
{
|
|
326
|
-
onSubmit: ae(
|
|
327
|
-
ref:
|
|
335
|
+
onSubmit: ae(ne),
|
|
336
|
+
ref: E,
|
|
328
337
|
className: "px-8 pb-8 space-y-6 overflow-y-auto max-h-[80vh]",
|
|
329
338
|
children: [
|
|
330
339
|
/* @__PURE__ */ t("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-4", children: [
|
|
331
|
-
/* @__PURE__ */
|
|
332
|
-
|
|
340
|
+
/* @__PURE__ */ a(b, { variant: "outlined", children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(d, { label: "Role Name", children: /* @__PURE__ */ a(
|
|
341
|
+
O,
|
|
333
342
|
{
|
|
334
343
|
placeholder: "Role Name",
|
|
335
344
|
name: "name",
|
|
336
345
|
id: "name",
|
|
337
|
-
errors:
|
|
338
|
-
control:
|
|
346
|
+
errors: u,
|
|
347
|
+
control: i,
|
|
339
348
|
dataTestId: "managerole-role-name-field"
|
|
340
349
|
}
|
|
341
350
|
) }) }) }),
|
|
342
|
-
/* @__PURE__ */
|
|
343
|
-
|
|
351
|
+
/* @__PURE__ */ a(b, { variant: "outlined", children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(
|
|
352
|
+
d,
|
|
344
353
|
{
|
|
345
354
|
label: "Max Position",
|
|
346
355
|
tooltip: "This is the maximum no of users that can be created at one location of this role type",
|
|
347
|
-
children: /* @__PURE__ */
|
|
348
|
-
|
|
356
|
+
children: /* @__PURE__ */ a(
|
|
357
|
+
O,
|
|
349
358
|
{
|
|
350
359
|
name: "maxPosition",
|
|
351
360
|
id: "maxPosition",
|
|
352
|
-
errors:
|
|
353
|
-
control:
|
|
361
|
+
errors: u,
|
|
362
|
+
control: i,
|
|
354
363
|
rules: {
|
|
355
364
|
maxLength: 3,
|
|
356
365
|
pattern: /^\d{1,3}$/
|
|
@@ -359,8 +368,8 @@ const Me = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Re = ({
|
|
|
359
368
|
maxLength: 3,
|
|
360
369
|
inputMode: "numeric",
|
|
361
370
|
pattern: "[0-9]*",
|
|
362
|
-
onInput: (
|
|
363
|
-
|
|
371
|
+
onInput: (e) => {
|
|
372
|
+
e.target.value = e.target.value.replace(/\D/g, "");
|
|
364
373
|
}
|
|
365
374
|
},
|
|
366
375
|
dataTestId: "managerole-max-position-field"
|
|
@@ -368,13 +377,13 @@ const Me = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Re = ({
|
|
|
368
377
|
)
|
|
369
378
|
}
|
|
370
379
|
) }) }),
|
|
371
|
-
!
|
|
372
|
-
|
|
380
|
+
!g.isTecho && /* @__PURE__ */ a(b, { variant: "outlined", children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(d, { label: "Max Health Infrastructure", children: /* @__PURE__ */ a(
|
|
381
|
+
O,
|
|
373
382
|
{
|
|
374
383
|
name: "maxHealthInfra",
|
|
375
384
|
id: "maxHealthInfra",
|
|
376
|
-
control:
|
|
377
|
-
errors:
|
|
385
|
+
control: i,
|
|
386
|
+
errors: u,
|
|
378
387
|
rules: {
|
|
379
388
|
maxLength: 3,
|
|
380
389
|
pattern: /^\d{1,3}$/
|
|
@@ -383,8 +392,8 @@ const Me = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Re = ({
|
|
|
383
392
|
maxLength: 3,
|
|
384
393
|
inputMode: "numeric",
|
|
385
394
|
pattern: "[0-9]*",
|
|
386
|
-
onInput: (
|
|
387
|
-
|
|
395
|
+
onInput: (e) => {
|
|
396
|
+
e.target.value = e.target.value.replace(
|
|
388
397
|
/\D/g,
|
|
389
398
|
""
|
|
390
399
|
);
|
|
@@ -394,27 +403,27 @@ const Me = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Re = ({
|
|
|
394
403
|
}
|
|
395
404
|
) }) }) })
|
|
396
405
|
] }),
|
|
397
|
-
/* @__PURE__ */
|
|
406
|
+
/* @__PURE__ */ a("div", { className: "flex items-center gap-6 w-full", children: /* @__PURE__ */ a(
|
|
398
407
|
b,
|
|
399
408
|
{
|
|
400
409
|
variant: "outlined",
|
|
401
410
|
className: "flex flex-row items-center w-full ",
|
|
402
|
-
children: /* @__PURE__ */
|
|
403
|
-
|
|
411
|
+
children: /* @__PURE__ */ a(
|
|
412
|
+
d,
|
|
404
413
|
{
|
|
405
414
|
label: "Location Required",
|
|
406
415
|
required: !0,
|
|
407
416
|
direction: "row",
|
|
408
|
-
children: /* @__PURE__ */
|
|
417
|
+
children: /* @__PURE__ */ a(
|
|
409
418
|
Y,
|
|
410
419
|
{
|
|
411
|
-
control:
|
|
420
|
+
control: i,
|
|
412
421
|
name: "isLocationRequired",
|
|
413
422
|
options: [
|
|
414
423
|
{ label: "Yes", value: !0 },
|
|
415
424
|
{ label: "No", value: !1 }
|
|
416
425
|
],
|
|
417
|
-
errors:
|
|
426
|
+
errors: u
|
|
418
427
|
}
|
|
419
428
|
)
|
|
420
429
|
}
|
|
@@ -422,149 +431,169 @@ const Me = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Re = ({
|
|
|
422
431
|
}
|
|
423
432
|
) }),
|
|
424
433
|
/* @__PURE__ */ t("div", { className: "space-y-4", children: [
|
|
425
|
-
(
|
|
426
|
-
|
|
434
|
+
(oe === !0 || le) && /* @__PURE__ */ a(D, { children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(
|
|
435
|
+
d,
|
|
427
436
|
{
|
|
428
437
|
label: "Location",
|
|
429
438
|
required: !0,
|
|
430
439
|
tooltip: "The OU level where users of this role perform their job function",
|
|
431
|
-
children: /* @__PURE__ */
|
|
432
|
-
|
|
440
|
+
children: /* @__PURE__ */ a(
|
|
441
|
+
T,
|
|
433
442
|
{
|
|
434
443
|
id: "locationTypes",
|
|
435
|
-
control:
|
|
444
|
+
control: i,
|
|
436
445
|
name: "locationTypes",
|
|
437
|
-
options:
|
|
446
|
+
options: m.locationData,
|
|
438
447
|
value: $ == null ? void 0 : $.map(
|
|
439
|
-
(
|
|
448
|
+
(e) => {
|
|
440
449
|
var l;
|
|
441
|
-
return (l =
|
|
442
|
-
(v) => v.type === (
|
|
450
|
+
return (l = m.locationData) == null ? void 0 : l.find(
|
|
451
|
+
(v) => v.type === (e == null ? void 0 : e.type)
|
|
443
452
|
);
|
|
444
453
|
}
|
|
445
454
|
),
|
|
446
|
-
errors:
|
|
447
|
-
getOptionLabel: (
|
|
455
|
+
errors: u,
|
|
456
|
+
getOptionLabel: (e) => e == null ? void 0 : e.name,
|
|
448
457
|
dataTestId: "managerole-location-type-select",
|
|
449
458
|
checkEquality: "type",
|
|
450
|
-
onChange: (
|
|
459
|
+
onChange: (e, l) => I(e, l, "locationTypes")
|
|
451
460
|
}
|
|
452
461
|
)
|
|
453
462
|
}
|
|
454
463
|
) }) }),
|
|
455
|
-
/* @__PURE__ */
|
|
456
|
-
|
|
464
|
+
/* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(
|
|
465
|
+
d,
|
|
457
466
|
{
|
|
458
467
|
label: "Can Manage Role",
|
|
459
468
|
tooltip: "Please select the roles that shall be managed by this role",
|
|
460
|
-
children: /* @__PURE__ */
|
|
461
|
-
|
|
469
|
+
children: /* @__PURE__ */ a(
|
|
470
|
+
T,
|
|
462
471
|
{
|
|
463
472
|
name: "roleIds",
|
|
464
473
|
id: "roleIds",
|
|
465
|
-
errors:
|
|
466
|
-
control:
|
|
474
|
+
errors: u,
|
|
475
|
+
control: i,
|
|
467
476
|
dataTestId: "managerole-manage-role-select",
|
|
468
|
-
options:
|
|
469
|
-
onChange: (
|
|
470
|
-
getOptionLabel: (
|
|
477
|
+
options: m.roles,
|
|
478
|
+
onChange: (e, l) => I(e, l, "roleIds"),
|
|
479
|
+
getOptionLabel: (e) => e == null ? void 0 : e.name
|
|
480
|
+
}
|
|
481
|
+
)
|
|
482
|
+
}
|
|
483
|
+
) }),
|
|
484
|
+
/* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(
|
|
485
|
+
d,
|
|
486
|
+
{
|
|
487
|
+
label: "Managed From",
|
|
488
|
+
tooltip: "Please select the roles that can manage this role",
|
|
489
|
+
children: /* @__PURE__ */ a(
|
|
490
|
+
T,
|
|
491
|
+
{
|
|
492
|
+
name: "canManageRoleIds",
|
|
493
|
+
id: "canManageRoleIds",
|
|
494
|
+
errors: u,
|
|
495
|
+
control: i,
|
|
496
|
+
dataTestId: "managerole-managed-by-role-select",
|
|
497
|
+
options: m.roles,
|
|
498
|
+
onChange: (e, l) => I(e, l, "canManageRoleIds"),
|
|
499
|
+
getOptionLabel: (e) => e == null ? void 0 : e.name
|
|
471
500
|
}
|
|
472
501
|
)
|
|
473
502
|
}
|
|
474
503
|
) }),
|
|
475
504
|
/* @__PURE__ */ t("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
476
|
-
/* @__PURE__ */
|
|
477
|
-
|
|
505
|
+
/* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(
|
|
506
|
+
d,
|
|
478
507
|
{
|
|
479
508
|
label: "Role Type",
|
|
480
509
|
tooltip: "Please select Role Type",
|
|
481
510
|
required: !0,
|
|
482
|
-
children: /* @__PURE__ */
|
|
511
|
+
children: /* @__PURE__ */ a(
|
|
483
512
|
be,
|
|
484
513
|
{
|
|
485
|
-
control:
|
|
514
|
+
control: i,
|
|
486
515
|
id: "roleType",
|
|
487
516
|
name: "roleType",
|
|
488
517
|
options: Me,
|
|
489
518
|
displayName: "name",
|
|
490
519
|
optionValue: "name",
|
|
491
|
-
errors:
|
|
520
|
+
errors: u,
|
|
492
521
|
dataTestId: "managerole-role-type-dropdown"
|
|
493
522
|
}
|
|
494
523
|
)
|
|
495
524
|
}
|
|
496
525
|
) }),
|
|
497
|
-
/* @__PURE__ */
|
|
498
|
-
|
|
526
|
+
/* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(
|
|
527
|
+
d,
|
|
499
528
|
{
|
|
500
529
|
label: "Can Manage Team",
|
|
501
530
|
tooltip: "Please select the teams that shall be managed by this role",
|
|
502
|
-
children: /* @__PURE__ */
|
|
503
|
-
|
|
531
|
+
children: /* @__PURE__ */ a(
|
|
532
|
+
T,
|
|
504
533
|
{
|
|
505
|
-
control:
|
|
534
|
+
control: i,
|
|
506
535
|
name: "manageByTeamTypeIds",
|
|
507
536
|
id: "manageByTeamTypeIds",
|
|
508
|
-
errors:
|
|
509
|
-
options:
|
|
537
|
+
errors: u,
|
|
538
|
+
options: m.manageTeam,
|
|
510
539
|
dataTestId: "managerole-manage-team-select",
|
|
511
|
-
onChange: (
|
|
512
|
-
getOptionLabel: (
|
|
540
|
+
onChange: (e, l) => I(e, l, "manageByTeamTypeIds"),
|
|
541
|
+
getOptionLabel: (e) => e == null ? void 0 : e.type
|
|
513
542
|
}
|
|
514
543
|
)
|
|
515
544
|
}
|
|
516
545
|
) })
|
|
517
546
|
] }),
|
|
518
|
-
/* @__PURE__ */
|
|
519
|
-
|
|
547
|
+
/* @__PURE__ */ a("div", { className: "space-y-4", children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(
|
|
548
|
+
d,
|
|
520
549
|
{
|
|
521
550
|
label: "Select Health Infrastructure type",
|
|
522
551
|
tooltip: "Please select the institute to be associated with the role",
|
|
523
|
-
required:
|
|
524
|
-
children: /* @__PURE__ */
|
|
525
|
-
|
|
552
|
+
required: ie,
|
|
553
|
+
children: /* @__PURE__ */ a(
|
|
554
|
+
T,
|
|
526
555
|
{
|
|
527
|
-
options:
|
|
528
|
-
errors:
|
|
556
|
+
options: m.healthInfraType,
|
|
557
|
+
errors: u,
|
|
529
558
|
name: "healthInfrastructureIds",
|
|
530
559
|
id: "healthInfrastructureIds",
|
|
531
560
|
dataTestId: "managerole-health-infrastructure-select",
|
|
532
|
-
control:
|
|
533
|
-
onChange: (
|
|
534
|
-
getOptionLabel: (
|
|
561
|
+
control: i,
|
|
562
|
+
onChange: (e, l) => I(e, l, "healthInfrastructureIds"),
|
|
563
|
+
getOptionLabel: (e) => e == null ? void 0 : e.value
|
|
535
564
|
}
|
|
536
565
|
)
|
|
537
566
|
}
|
|
538
567
|
) }) }),
|
|
539
|
-
!
|
|
540
|
-
|
|
568
|
+
!g.isBahaar && /* @__PURE__ */ a(D, { children: /* @__PURE__ */ a("div", { className: "space-y-4", children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(
|
|
569
|
+
d,
|
|
541
570
|
{
|
|
542
571
|
label: "Category",
|
|
543
572
|
tooltip: "Please select the category to be associated with the role",
|
|
544
|
-
children: /* @__PURE__ */
|
|
545
|
-
|
|
573
|
+
children: /* @__PURE__ */ a(
|
|
574
|
+
T,
|
|
546
575
|
{
|
|
547
576
|
id: "categoryIds",
|
|
548
577
|
name: "categoryIds",
|
|
549
|
-
errors:
|
|
550
|
-
options:
|
|
578
|
+
errors: u,
|
|
579
|
+
options: m.category,
|
|
551
580
|
dataTestId: "managerole-role-category-select",
|
|
552
|
-
control:
|
|
553
|
-
onChange: (
|
|
554
|
-
getOptionLabel: (
|
|
581
|
+
control: i,
|
|
582
|
+
onChange: (e, l) => I(e, l, "categoryIds"),
|
|
583
|
+
getOptionLabel: (e) => e == null ? void 0 : e.value
|
|
555
584
|
}
|
|
556
585
|
)
|
|
557
586
|
}
|
|
558
587
|
) }) }) })
|
|
559
588
|
] }),
|
|
560
589
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-6", children: [
|
|
561
|
-
/* @__PURE__ */
|
|
590
|
+
/* @__PURE__ */ a(
|
|
562
591
|
b,
|
|
563
592
|
{
|
|
564
593
|
variant: "outlined",
|
|
565
594
|
className: "flex flex-row items-center w-[60%] ",
|
|
566
|
-
children: /* @__PURE__ */
|
|
567
|
-
|
|
595
|
+
children: /* @__PURE__ */ a(
|
|
596
|
+
d,
|
|
568
597
|
{
|
|
569
598
|
label: "Bank Details Required",
|
|
570
599
|
tooltip: "Select if bank details are required for this role",
|
|
@@ -572,34 +601,34 @@ const Me = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Re = ({
|
|
|
572
601
|
labelWidth: "50%",
|
|
573
602
|
childrenWidth: "50%",
|
|
574
603
|
direction: "row",
|
|
575
|
-
children: /* @__PURE__ */
|
|
604
|
+
children: /* @__PURE__ */ a(
|
|
576
605
|
Y,
|
|
577
606
|
{
|
|
578
|
-
control:
|
|
607
|
+
control: i,
|
|
579
608
|
name: "isBankDetailsRequired",
|
|
580
609
|
options: [
|
|
581
610
|
{ label: "Yes", value: !0 },
|
|
582
611
|
{ label: "No", value: !1 }
|
|
583
612
|
],
|
|
584
|
-
errors:
|
|
613
|
+
errors: u
|
|
585
614
|
}
|
|
586
615
|
)
|
|
587
616
|
}
|
|
588
617
|
)
|
|
589
618
|
}
|
|
590
619
|
),
|
|
591
|
-
!f && /* @__PURE__ */
|
|
592
|
-
|
|
620
|
+
!f && /* @__PURE__ */ a(D, { children: /* @__PURE__ */ a(b, { variant: "outlined ", className: "w-[40%]", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ a(
|
|
621
|
+
d,
|
|
593
622
|
{
|
|
594
623
|
label: "Self Manage",
|
|
595
624
|
labelWidth: "60%",
|
|
596
625
|
childrenWidth: "40%",
|
|
597
626
|
direction: "row",
|
|
598
|
-
children: /* @__PURE__ */
|
|
627
|
+
children: /* @__PURE__ */ a(
|
|
599
628
|
j,
|
|
600
629
|
{
|
|
601
630
|
name: "canSelfManage",
|
|
602
|
-
control:
|
|
631
|
+
control: i,
|
|
603
632
|
isFullWidth: !1,
|
|
604
633
|
"data-testid": "managerole-self-manage-checkbox"
|
|
605
634
|
}
|
|
@@ -607,33 +636,33 @@ const Me = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Re = ({
|
|
|
607
636
|
}
|
|
608
637
|
) }) }) })
|
|
609
638
|
] }),
|
|
610
|
-
/* @__PURE__ */
|
|
639
|
+
/* @__PURE__ */ a("div", { className: "flex items-center gap-6", children: /* @__PURE__ */ a(
|
|
611
640
|
b,
|
|
612
641
|
{
|
|
613
642
|
variant: "outlined",
|
|
614
643
|
className: "flex flex-col items-start justify-between",
|
|
615
|
-
children: /* @__PURE__ */
|
|
616
|
-
|
|
644
|
+
children: /* @__PURE__ */ a(
|
|
645
|
+
d,
|
|
617
646
|
{
|
|
618
647
|
label: "Mandatory Fields",
|
|
619
648
|
tooltip: "These fields are Mandatory when creating users of this role type",
|
|
620
649
|
children: /* @__PURE__ */ t(me, { row: !0, children: [
|
|
621
|
-
z == null ? void 0 : z.map((
|
|
650
|
+
z == null ? void 0 : z.map((e) => /* @__PURE__ */ a(
|
|
622
651
|
j,
|
|
623
652
|
{
|
|
624
|
-
control:
|
|
625
|
-
name:
|
|
626
|
-
label:
|
|
653
|
+
control: i,
|
|
654
|
+
name: e.value,
|
|
655
|
+
label: e.label,
|
|
627
656
|
isFullWidth: !1,
|
|
628
|
-
"data-testid": `managerole-mandatory-field-${
|
|
657
|
+
"data-testid": `managerole-mandatory-field-${e.value}`
|
|
629
658
|
},
|
|
630
|
-
|
|
659
|
+
e.value
|
|
631
660
|
)),
|
|
632
|
-
re === !0 && /* @__PURE__ */
|
|
661
|
+
re === !0 && /* @__PURE__ */ a(
|
|
633
662
|
j,
|
|
634
663
|
{
|
|
635
664
|
name: "isBankDetailsMandatory",
|
|
636
|
-
control:
|
|
665
|
+
control: i,
|
|
637
666
|
label: "Bank Details",
|
|
638
667
|
isFullWidth: !1,
|
|
639
668
|
"data-testid": "managerole-bank-details-mandatory-checkbox"
|
|
@@ -650,7 +679,7 @@ const Me = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Re = ({
|
|
|
650
679
|
className: "flex items-center justify-end gap-3 pt-6 border-t",
|
|
651
680
|
sx: { borderColor: "divider" },
|
|
652
681
|
children: [
|
|
653
|
-
/* @__PURE__ */
|
|
682
|
+
/* @__PURE__ */ a(
|
|
654
683
|
K,
|
|
655
684
|
{
|
|
656
685
|
variant: "contained",
|
|
@@ -661,7 +690,7 @@ const Me = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Re = ({
|
|
|
661
690
|
children: _("Close")
|
|
662
691
|
}
|
|
663
692
|
),
|
|
664
|
-
/* @__PURE__ */
|
|
693
|
+
/* @__PURE__ */ a(
|
|
665
694
|
K,
|
|
666
695
|
{
|
|
667
696
|
variant: "contained",
|
|
@@ -685,15 +714,15 @@ const Me = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Re = ({
|
|
|
685
714
|
);
|
|
686
715
|
};
|
|
687
716
|
Re.propTypes = {
|
|
688
|
-
isUpdate:
|
|
689
|
-
role:
|
|
690
|
-
onClose:
|
|
691
|
-
open:
|
|
692
|
-
setOpen:
|
|
693
|
-
selectedId:
|
|
694
|
-
isRoleListModified:
|
|
717
|
+
isUpdate: y.bool,
|
|
718
|
+
role: y.object,
|
|
719
|
+
onClose: y.func,
|
|
720
|
+
open: y.bool,
|
|
721
|
+
setOpen: y.func,
|
|
722
|
+
selectedId: y.string,
|
|
723
|
+
isRoleListModified: y.bool
|
|
695
724
|
};
|
|
696
725
|
export {
|
|
697
726
|
Re as default
|
|
698
727
|
};
|
|
699
|
-
//# sourceMappingURL=ManageRole-
|
|
728
|
+
//# sourceMappingURL=ManageRole-CuXmWQyp-ELNs9emF.js.map
|