@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.
Files changed (63) hide show
  1. package/dist/{AccessRights-Bvd5Bm5K.js → AccessRights-CupmTG3T.js} +2 -2
  2. package/dist/{AccessRights-Bvd5Bm5K.js.map → AccessRights-CupmTG3T.js.map} +1 -1
  3. package/dist/{AddEditQueryBuilder-Bcjl5mXE.js → AddEditQueryBuilder-C8ZSkOF0.js} +60 -60
  4. package/dist/AddEditQueryBuilder-C8ZSkOF0.js.map +1 -0
  5. package/dist/{AddFeatures-CE5rBxEG.js → AddFeatures-CiZZZ0GL.js} +2 -2
  6. package/dist/{AddFeatures-CE5rBxEG.js.map → AddFeatures-CiZZZ0GL.js.map} +1 -1
  7. package/dist/{AddRoleDrawer-Bc655LQU.js → AddRoleDrawer-CQdzQZLb.js} +36 -36
  8. package/dist/AddRoleDrawer-CQdzQZLb.js.map +1 -0
  9. package/dist/{ConditionConfig-D2hOAa4n.js → ConditionConfig-C3rF2wXU.js} +2 -2
  10. package/dist/{ConditionConfig-D2hOAa4n.js.map → ConditionConfig-C3rF2wXU.js.map} +1 -1
  11. package/dist/{EventConfigurations-D8juDb29.js → EventConfigurations-BGffjVC7.js} +3 -3
  12. package/dist/{EventConfigurations-D8juDb29.js.map → EventConfigurations-BGffjVC7.js.map} +1 -1
  13. package/dist/{EventsExceptionModal-DsvngLi8.js → EventsExceptionModal-D4Bf1ilS.js} +2 -2
  14. package/dist/{EventsExceptionModal-DsvngLi8.js.map → EventsExceptionModal-D4Bf1ilS.js.map} +1 -1
  15. package/dist/EventsSkeleton-8iiETGcf.js +76 -0
  16. package/dist/EventsSkeleton-8iiETGcf.js.map +1 -0
  17. package/dist/{FeatureMenu-CLX8VNZ-.js → FeatureMenu-DUZL32RI.js} +3 -3
  18. package/dist/{FeatureMenu-CLX8VNZ-.js.map → FeatureMenu-DUZL32RI.js.map} +1 -1
  19. package/dist/Features-CObdzJp_.js +13 -0
  20. package/dist/Features-CObdzJp_.js.map +1 -0
  21. package/dist/{ManageDynamicFeature-i6ARKe36.js → ManageDynamicFeature-BhONvfC_.js} +2 -2
  22. package/dist/{ManageDynamicFeature-i6ARKe36.js.map → ManageDynamicFeature-BhONvfC_.js.map} +1 -1
  23. package/dist/{ManageEventConfiguration-CHugu2vQ.js → ManageEventConfiguration-BntUc_YI.js} +5 -5
  24. package/dist/{ManageEventConfiguration-CHugu2vQ.js.map → ManageEventConfiguration-BntUc_YI.js.map} +1 -1
  25. package/dist/{ManageNotification-BUAvg5Ge.js → ManageNotification-CSl02Wq7.js} +2 -2
  26. package/dist/{ManageNotification-BUAvg5Ge.js.map → ManageNotification-CSl02Wq7.js.map} +1 -1
  27. package/dist/{ManageRole-Cbs9dUhc.js → ManageRole-tdzAiCOE.js} +222 -229
  28. package/dist/ManageRole-tdzAiCOE.js.map +1 -0
  29. package/dist/{MobileTypeEventConfigModal-2w0WQ3WY.js → MobileTypeEventConfigModal-BNjZ8pnq.js} +2 -2
  30. package/dist/{MobileTypeEventConfigModal-2w0WQ3WY.js.map → MobileTypeEventConfigModal-BNjZ8pnq.js.map} +1 -1
  31. package/dist/{NotificationList-CUZSWp2J.js → NotificationList-D1U1LYnz.js} +140 -139
  32. package/dist/NotificationList-D1U1LYnz.js.map +1 -0
  33. package/dist/{OtherTypeEventConfigModal-D1p8M39y.js → OtherTypeEventConfigModal-DiVhWDpG.js} +2 -2
  34. package/dist/{OtherTypeEventConfigModal-D1p8M39y.js.map → OtherTypeEventConfigModal-DiVhWDpG.js.map} +1 -1
  35. package/dist/{QueryBuilder-DXexUIe8.js → QueryBuilder-DI0wCJbz.js} +85 -84
  36. package/dist/QueryBuilder-DI0wCJbz.js.map +1 -0
  37. package/dist/{RoleManagement-BThAL5LO.js → RoleManagement-Cg8-EiVr.js} +83 -82
  38. package/dist/RoleManagement-Cg8-EiVr.js.map +1 -0
  39. package/dist/{ShowFlywayQuery-BkyA6QaA.js → ShowFlywayQuery-tj42YQAS.js} +33 -33
  40. package/dist/ShowFlywayQuery-tj42YQAS.js.map +1 -0
  41. package/dist/{SubMenu-BGznOP2a.js → SubMenu-CM_4wNCR.js} +2 -2
  42. package/dist/{SubMenu-BGznOP2a.js.map → SubMenu-CM_4wNCR.js.map} +1 -1
  43. package/dist/{TypeConfiguration-D-3xNcyd.js → TypeConfiguration-CupQxH9Y.js} +28 -28
  44. package/dist/TypeConfiguration-CupQxH9Y.js.map +1 -0
  45. package/dist/{UserList-D7GL7jvO.js → UserList-BzHsbYel.js} +186 -185
  46. package/dist/UserList-BzHsbYel.js.map +1 -0
  47. package/dist/{WidgetList-B3Sm9weK.js → WidgetList-B7X8Awkg.js} +2 -2
  48. package/dist/{WidgetList-B3Sm9weK.js.map → WidgetList-B7X8Awkg.js.map} +1 -1
  49. package/dist/index.js +9 -9
  50. package/package.json +1 -1
  51. package/dist/AddEditQueryBuilder-Bcjl5mXE.js.map +0 -1
  52. package/dist/AddRoleDrawer-Bc655LQU.js.map +0 -1
  53. package/dist/EventsSkeleton-DCXwwPbb.js +0 -76
  54. package/dist/EventsSkeleton-DCXwwPbb.js.map +0 -1
  55. package/dist/Features-Cpf1PDx0.js +0 -13
  56. package/dist/Features-Cpf1PDx0.js.map +0 -1
  57. package/dist/ManageRole-Cbs9dUhc.js.map +0 -1
  58. package/dist/NotificationList-CUZSWp2J.js.map +0 -1
  59. package/dist/QueryBuilder-DXexUIe8.js.map +0 -1
  60. package/dist/RoleManagement-BThAL5LO.js.map +0 -1
  61. package/dist/ShowFlywayQuery-BkyA6QaA.js.map +0 -1
  62. package/dist/TypeConfiguration-D-3xNcyd.js.map +0 -1
  63. package/dist/UserList-D7GL7jvO.js.map +0 -1
@@ -1,113 +1,114 @@
1
- import { jsxs as s, jsx as a, Fragment as H } from "react/jsx-runtime";
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 A, IconButton as pe, FormControl as y, FormGroup as fe, Button as Q } from "@mui/material";
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 Ne } from "./RoleManagement-BThAL5LO.js";
6
- import { getRoleList as Te, getLocationTypes as we, execute as O } from "@/common/services/GlobalApis";
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 c } from "@/views/custom-components/FormItem.jsx";
12
- import * as N from "yup";
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 Me } from "@/common/languageTranslator/TranslationContext";
18
- import { FontAwesomeIcon as Re } from "@fortawesome/react-fontawesome";
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 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
- /* @__PURE__ */ s("div", { className: "px-8 pt-2 pb-4 flex items-center justify-between", children: [
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__ */ s("div", { className: "px-8 pb-8 space-y-6 overflow-y-auto max-h-[80vh]", children: [
31
- /* @__PURE__ */ a("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-4", children: [1, 2, 3].map((h) => /* @__PURE__ */ s("div", { className: "space-y-1.5", children: [
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
- ] }, h)) }),
35
- /* @__PURE__ */ a("div", { className: "flex items-center gap-6 w-full", children: /* @__PURE__ */ s("div", { className: "w-full", children: [
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__ */ s("div", { className: "space-y-4", children: [
40
- [1, 2].map((h) => /* @__PURE__ */ s("div", { className: "space-y-1.5", children: [
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
- ] }, h)),
44
- /* @__PURE__ */ a("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [1, 2].map((h) => /* @__PURE__ */ s("div", { className: "space-y-1.5", children: [
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
- ] }, h)) }),
48
- [1, 2].map((h) => /* @__PURE__ */ s("div", { className: "space-y-1.5", children: [
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
- ] }, h))
52
+ ] }, u))
52
53
  ] }),
53
- /* @__PURE__ */ s("div", { className: "flex items-center gap-6", children: [
54
- /* @__PURE__ */ s("div", { className: "w-[60%]", children: [
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__ */ s("div", { className: "w-[40%] flex items-center gap-2", children: [
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__ */ s("div", { className: "space-y-2", children: [
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((h) => /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
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
- ] }, h)) })
69
+ ] }, u)) })
69
70
  ] })
70
71
  ] }),
71
- /* @__PURE__ */ s("div", { className: "flex items-center justify-end gap-3 pt-6 px-8 pb-4 border-t border-slate-100", children: [
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: v.any,
78
- isLoading: v.any
78
+ children: b.any,
79
+ isLoading: b.any
79
80
  };
80
- const Ce = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Se = [
81
+ const Fe = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Le = [
81
82
  { label: "Authenticator App", value: "AUTHENTICATOR_APP" }
82
- ], qe = ({
83
- selectedId: T,
84
- isUpdate: f,
85
- open: L,
86
- setOpen: h,
83
+ ], De = ({
84
+ selectedId: N,
85
+ isUpdate: p,
86
+ open: C,
87
+ setOpen: u,
87
88
  isRoleListModified: ae
88
89
  }) => {
89
- const z = X(null), V = X(!1), F = ye(), [i, U] = J({}), [te, _] = J(!1), le = N.object().shape({
90
- name: N.string().required("Enter Role Name"),
91
- locationTypes: N.array().when("isLocationRequired", {
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: N.string().required("Select Role Type"),
97
- isBankDetailsRequired: b.isTecho ? N.boolean().notRequired() : N.boolean().nullable().defined("Please Select a Value"),
98
- healthInfrastructureIds: N.array().when("isHealthInfraMandatory", {
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: r,
105
- handleSubmit: se,
106
- formState: { errors: m, isSubmitting: ne },
107
- setValue: g,
105
+ control: n,
106
+ handleSubmit: oe,
107
+ formState: { errors: c, isSubmitting: se },
108
+ setValue: h,
108
109
  // getValues,
109
- watch: w,
110
- reset: oe
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
- }), 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 = [
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
- ...(i == null ? void 0 : i.env) !== "chip" ? [{ label: "Aadhar Number", value: "isAadharNumMandatory" }] : [],
153
+ { label: "Aadhar Number", value: "isAadharNumMandatory" },
153
154
  { label: "Contact Number", value: "isContactNumMandatory" },
154
- ...(i == null ? void 0 : i.env) !== "chip" ? [{ label: "Convox Id", value: "isConvoxIdMandatory" }] : [],
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
- ...(i == null ? void 0 : i.env) !== "chip" ? [{ label: "Smag Trained", value: "isSmagTrainedMandatory" }] : [],
159
+ { label: "Smag Trained", value: "isSmagTrainedMandatory" },
159
160
  { label: "Nodal", value: "isNodalMandatory" }
160
- ].filter((e) => b.isTecho ? ![
161
- "isGeolocationMandatory",
162
- "isHealthInfraMandatory",
163
- "isLastNameMandatory",
164
- "isSmagTrainedMandatory"
165
- ].includes(e.value) : b.isSewaRural || b.isPhmp || b.isImomcare ? e.value !== "isNodalMandatory" : b.isEkavach ? ![
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
- }), F("button_click", {
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, d) => {
182
- g(d, t);
174
+ }, I = (e, t, i) => {
175
+ h(i, t);
183
176
  }, ue = async (e) => {
184
- var t, d;
177
+ var t, i;
185
178
  try {
186
- F("button_click", {
187
- button_name: f ? "update role button" : "add role button",
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, 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(
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, f ? await ve(e) : await Ne(e), W({
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 ${f ? "Updated" : "Added"} Successfully`
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: ${(d = (t = l == null ? void 0 : l.response) == null ? void 0 : t.data) == null ? void 0 : d.message}`
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
- _((d) => !d);
209
- const t = b.getEnv();
210
- if (L !== 0) {
211
- const [d, l, C, S, q] = await Promise.all([
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((p) => {
234
- var M, R, B;
226
+ if (U((g) => {
227
+ var R, M, B;
235
228
  return {
236
- ...p,
237
- roles: d.data,
229
+ ...g,
230
+ roles: i.data,
238
231
  locationData: l.data,
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
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
- }), 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);
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: M,
248
- healthInfrastructureIds: R,
240
+ manageByTeamTypeIds: R,
241
+ healthInfrastructureIds: M,
249
242
  roleIds: B,
250
243
  categoryIds: K
251
- } = p;
252
- g(
244
+ } = g;
245
+ h(
253
246
  "manageByTeamTypeIds",
254
- M ? M.map(
255
- (n) => {
256
- var u;
257
- return (u = C.data.result) == null ? void 0 : u.find((o) => (o == null ? void 0 : o.id) === n);
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
- ), g(
253
+ ), h(
261
254
  "healthInfrastructureIds",
262
- R ? R.map(
263
- (n) => {
264
- var u;
265
- return (u = q.data.result) == null ? void 0 : u.find(
266
- (o) => (o == null ? void 0 : o.id) === n
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((n) => n !== void 0) : []
270
- ), g(
262
+ ).filter((s) => s !== void 0) : []
263
+ ), h(
271
264
  "categoryIds",
272
265
  K ? K.map(
273
- (n) => {
274
- var u;
275
- return (u = S.data.result) == null ? void 0 : u.find((o) => (o == null ? void 0 : o.id) === n);
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
- ), g(
271
+ ), h(
279
272
  "roleIds",
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);
283
- }).filter((n) => n !== void 0) : []
284
- ), g(
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
- p.canManageRoleIds ? p.canManageRoleIds.map((n) => {
287
- var u;
288
- return (u = d.data) == null ? void 0 : u.find((o) => (o == null ? void 0 : o.id) === n);
289
- }).filter((n) => n !== void 0) : []
290
- ), p.locationTypes.length > 0 ? g("isLocationRequired", !0) : g("isLocationRequired", !1);
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
- _((d) => !d);
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
- }), _((d) => !d);
291
+ }), S((i) => !i);
299
292
  }
300
293
  })();
301
- }, [T, L]), /* @__PURE__ */ a(
294
+ }, [N, C]), /* @__PURE__ */ a(
302
295
  ge,
303
296
  {
304
- open: L !== 0,
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
- A,
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__ */ s(ee, { isLoading: te, children: [
313
- /* @__PURE__ */ s("div", { className: "px-8 pt-8 pb-4 flex items-center justify-between", children: [
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
- A,
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: f ? "Update Role" : "Add New Role"
313
+ children: p ? "Update Role" : "Add New Role"
321
314
  }
322
315
  ) }),
323
316
  /* @__PURE__ */ a(
324
- pe,
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(Re, { icon: Be, size: "lg" })
323
+ children: /* @__PURE__ */ a(Me, { icon: Be, size: "lg" })
331
324
  }
332
325
  )
333
326
  ] }),
334
- /* @__PURE__ */ s(
327
+ /* @__PURE__ */ o(
335
328
  "form",
336
329
  {
337
- onSubmit: se(ue),
338
- ref: z,
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__ */ s("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-4", children: [
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(
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: m,
349
- control: r,
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
- c,
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: m,
364
- control: r,
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
- !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(
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: r,
388
- errors: m,
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
- c,
407
+ d,
415
408
  {
416
409
  label: "Location Required",
417
410
  required: !0,
418
411
  direction: "row",
419
412
  children: /* @__PURE__ */ a(
420
- G,
413
+ z,
421
414
  {
422
- control: r,
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: m
421
+ errors: c
429
422
  }
430
423
  )
431
424
  }
432
425
  )
433
426
  }
434
427
  ) }),
435
- /* @__PURE__ */ s("div", { className: "space-y-4", children: [
436
- (ce === !0 || ne) && /* @__PURE__ */ a(H, { children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(
437
- c,
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: r,
439
+ control: n,
447
440
  name: "locationTypes",
448
- options: i.locationData,
449
- value: E == null ? void 0 : E.map(
441
+ options: w.locationData,
442
+ value: _ == null ? void 0 : _.map(
450
443
  (e) => {
451
444
  var t;
452
- return (t = i.locationData) == null ? void 0 : t.find(
453
- (d) => d.type === (e == null ? void 0 : e.type)
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: m,
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
- c,
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: m,
477
- control: r,
469
+ errors: c,
470
+ control: n,
478
471
  dataTestId: "managerole-manage-role-select",
479
- options: i.roles,
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
- c,
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: m,
497
- control: r,
489
+ errors: c,
490
+ control: n,
498
491
  dataTestId: "managerole-managed-by-role-select",
499
- options: i.roles,
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__ */ s("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
507
- /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(
508
- c,
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: r,
509
+ control: n,
517
510
  id: "roleType",
518
511
  name: "roleType",
519
- options: Ce,
512
+ options: Fe,
520
513
  displayName: "name",
521
514
  optionValue: "name",
522
- errors: m,
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
- c,
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: r,
529
+ control: n,
537
530
  name: "manageByTeamTypeIds",
538
531
  id: "manageByTeamTypeIds",
539
- errors: m,
540
- options: i.manageTeam,
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
- c,
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: i.healthInfraType,
559
- errors: m,
551
+ options: w.healthInfraType,
552
+ errors: c,
560
553
  name: "healthInfrastructureIds",
561
554
  id: "healthInfrastructureIds",
562
555
  dataTestId: "managerole-health-infrastructure-select",
563
- control: r,
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
- !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,
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: m,
581
- options: i.category,
573
+ errors: c,
574
+ options: w.category,
582
575
  dataTestId: "managerole-role-category-select",
583
- control: r,
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__ */ s("div", { className: "flex items-center gap-6", children: [
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
- c,
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
- G,
600
+ z,
608
601
  {
609
- control: r,
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: m
608
+ errors: c
616
609
  }
617
610
  )
618
611
  }
619
612
  )
620
613
  }
621
614
  ),
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,
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: r,
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__ */ s("div", { className: "flex items-center gap-6 w-full", children: [
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
- c,
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
- G,
649
+ z,
657
650
  {
658
- control: r,
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: m
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
- c,
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: r,
672
+ control: n,
680
673
  id: "twoFactorType",
681
674
  name: "twoFactorType",
682
- options: Se,
675
+ options: Le,
683
676
  displayName: "label",
684
677
  optionValue: "value",
685
- errors: m,
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
- c,
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__ */ s(fe, { row: !0, children: [
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: r,
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
- re === !0 && /* @__PURE__ */ a(
707
+ ne === !0 && /* @__PURE__ */ a(
715
708
  $,
716
709
  {
717
710
  name: "isBankDetailsMandatory",
718
- control: r,
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__ */ s(
730
- A,
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: D("Close")
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: f ? `${D("Update Role")}` : `${D("Add Role")}`
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
- 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
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
- qe as default
772
+ De as default
780
773
  };
781
- //# sourceMappingURL=ManageRole-Cbs9dUhc.js.map
774
+ //# sourceMappingURL=ManageRole-tdzAiCOE.js.map