@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.
Files changed (119) hide show
  1. package/dist/AccessRights-Bvd5Bm5K.js +1259 -0
  2. package/dist/AccessRights-Bvd5Bm5K.js.map +1 -0
  3. package/dist/{AddEditQueryBuilder-7JRplV5J.js → AddEditQueryBuilder-Bcjl5mXE.js} +2 -2
  4. package/dist/{AddEditQueryBuilder-7JRplV5J.js.map → AddEditQueryBuilder-Bcjl5mXE.js.map} +1 -1
  5. package/dist/{AddFeatures-CkTu7sOI.js → AddFeatures-CE5rBxEG.js} +2 -2
  6. package/dist/{AddFeatures-CkTu7sOI.js.map → AddFeatures-CE5rBxEG.js.map} +1 -1
  7. package/dist/{AddLabelModal-DE3ploGD.js → AddLabelModal-CB8E8cYG.js} +2 -2
  8. package/dist/{AddLabelModal-DE3ploGD.js.map → AddLabelModal-CB8E8cYG.js.map} +1 -1
  9. package/dist/{AddRoleDrawer-ZK1eejxI.js → AddRoleDrawer-SvntLdRu.js} +44 -43
  10. package/dist/AddRoleDrawer-SvntLdRu.js.map +1 -0
  11. package/dist/{AppModal-BgZyfrd-.js → AppModal-BKgIwe1h.js} +2 -2
  12. package/dist/{AppModal-BgZyfrd-.js.map → AppModal-BKgIwe1h.js.map} +1 -1
  13. package/dist/{ChangePasswordModalCore-DIe4rzW-.js → ChangePasswordModalCore-ClND1mel.js} +67 -62
  14. package/dist/ChangePasswordModalCore-ClND1mel.js.map +1 -0
  15. package/dist/{ConditionConfig-GDCXIg3C.js → ConditionConfig-DB0FqwgG.js} +2 -2
  16. package/dist/{ConditionConfig-GDCXIg3C.js.map → ConditionConfig-DB0FqwgG.js.map} +1 -1
  17. package/dist/{EntityManagement-D-x6Qzal.js → EntityManagement-DQKXnEzz.js} +2 -2
  18. package/dist/{EntityManagement-D-x6Qzal.js.map → EntityManagement-DQKXnEzz.js.map} +1 -1
  19. package/dist/EventConfigurations-DZvSJ5EZ.js +395 -0
  20. package/dist/EventConfigurations-DZvSJ5EZ.js.map +1 -0
  21. package/dist/{EventsExceptionModal-BF6E1Np7.js → EventsExceptionModal-DsvngLi8.js} +2 -2
  22. package/dist/{EventsExceptionModal-BF6E1Np7.js.map → EventsExceptionModal-DsvngLi8.js.map} +1 -1
  23. package/dist/EventsSkeleton-DCXwwPbb.js +76 -0
  24. package/dist/EventsSkeleton-DCXwwPbb.js.map +1 -0
  25. package/dist/FeatureMenu-CLX8VNZ-.js +265 -0
  26. package/dist/FeatureMenu-CLX8VNZ-.js.map +1 -0
  27. package/dist/Features-Cpf1PDx0.js +13 -0
  28. package/dist/Features-Cpf1PDx0.js.map +1 -0
  29. package/dist/FileSaver.min-CN9EpL2h.js.map +1 -1
  30. package/dist/{ImmunizationConfigurationBase-DZ8EqXlF.js → ImmunizationConfigurationBase-VqVvVR57.js} +2095 -1872
  31. package/dist/ImmunizationConfigurationBase-VqVvVR57.js.map +1 -0
  32. package/dist/ImmunizationConfigurationsList-K2ddBpPJ.js +345 -0
  33. package/dist/ImmunizationConfigurationsList-K2ddBpPJ.js.map +1 -0
  34. package/dist/ImmunizationSkeleton-D2tdv5k-.js.map +1 -1
  35. package/dist/{LanguagesModal-rk6IGQwY.js → LanguagesModal-CX3oS8rk.js} +2 -2
  36. package/dist/{LanguagesModal-rk6IGQwY.js.map → LanguagesModal-CX3oS8rk.js.map} +1 -1
  37. package/dist/{ManageDynamicFeature-C2I7Ho7i.js → ManageDynamicFeature-CsIett5x.js} +2 -2
  38. package/dist/{ManageDynamicFeature-C2I7Ho7i.js.map → ManageDynamicFeature-CsIett5x.js.map} +1 -1
  39. package/dist/{ManageEventConfiguration-BJxS2Su0.js → ManageEventConfiguration-0YBDaxOI.js} +60 -60
  40. package/dist/ManageEventConfiguration-0YBDaxOI.js.map +1 -0
  41. package/dist/{ManageNotification-DMN2szWy.js → ManageNotification-BUAvg5Ge.js} +1797 -1705
  42. package/dist/ManageNotification-BUAvg5Ge.js.map +1 -0
  43. package/dist/{ManageRole-CuXmWQyp.js → ManageRole-Cbs9dUhc.js} +244 -191
  44. package/dist/ManageRole-Cbs9dUhc.js.map +1 -0
  45. package/dist/ManageTranslation-D9IScGhk.js +625 -0
  46. package/dist/ManageTranslation-D9IScGhk.js.map +1 -0
  47. package/dist/{ManageUser-Dr3ptCYp.js → ManageUser-eBS0yC5k.js} +754 -748
  48. package/dist/ManageUser-eBS0yC5k.js.map +1 -0
  49. package/dist/{MobileTypeEventConfigModal-ChhO_A4f.js → MobileTypeEventConfigModal-Ltm529jG.js} +2 -2
  50. package/dist/{MobileTypeEventConfigModal-ChhO_A4f.js.map → MobileTypeEventConfigModal-Ltm529jG.js.map} +1 -1
  51. package/dist/NotificationList-CUZSWp2J.js +402 -0
  52. package/dist/NotificationList-CUZSWp2J.js.map +1 -0
  53. package/dist/{OtherTypeEventConfigModal-ZnCGWm9v.js → OtherTypeEventConfigModal-dXt2qDg_.js} +2 -2
  54. package/dist/OtherTypeEventConfigModal-dXt2qDg_.js.map +1 -0
  55. package/dist/{QueryBuilder-BPfavHH9.js → QueryBuilder-DXexUIe8.js} +154 -148
  56. package/dist/QueryBuilder-DXexUIe8.js.map +1 -0
  57. package/dist/QueryManagement-B2y23kus.js +935 -0
  58. package/dist/QueryManagement-B2y23kus.js.map +1 -0
  59. package/dist/RoleManagement-BThAL5LO.js +422 -0
  60. package/dist/RoleManagement-BThAL5LO.js.map +1 -0
  61. package/dist/SubMenu-BGznOP2a.js +191 -0
  62. package/dist/SubMenu-BGznOP2a.js.map +1 -0
  63. package/dist/TableDetails-DztbjsIA.js +2069 -0
  64. package/dist/TableDetails-DztbjsIA.js.map +1 -0
  65. package/dist/TableList-DYwotUDO.js +1425 -0
  66. package/dist/TableList-DYwotUDO.js.map +1 -0
  67. package/dist/{TypeConfiguration-C-lk8Szs.js → TypeConfiguration-DYbBG_hZ.js} +2 -2
  68. package/dist/{TypeConfiguration-C-lk8Szs.js.map → TypeConfiguration-DYbBG_hZ.js.map} +1 -1
  69. package/dist/{UserList-S5Q76wO7.js → UserList-BAeAFeXZ.js} +410 -400
  70. package/dist/UserList-BAeAFeXZ.js.map +1 -0
  71. package/dist/{UserListSkeleton-cglK2SaU.js → UserListSkeleton-DhIJ5X3y.js} +10 -7
  72. package/dist/UserListSkeleton-DhIJ5X3y.js.map +1 -0
  73. package/dist/WidgetList-D-fIf3N2.js +200 -0
  74. package/dist/WidgetList-D-fIf3N2.js.map +1 -0
  75. package/dist/i18next-CTOWN_jH.js.map +1 -1
  76. package/dist/index.css +1 -1
  77. package/dist/index.js +64 -63
  78. package/dist/index.js.map +1 -1
  79. package/dist/xlsx.min-D1LFqt_b.js.map +1 -1
  80. package/package.json +1 -1
  81. package/dist/AccessRights-BMRM1u9S.js +0 -1228
  82. package/dist/AccessRights-BMRM1u9S.js.map +0 -1
  83. package/dist/AddRoleDrawer-ZK1eejxI.js.map +0 -1
  84. package/dist/ChangePasswordModalCore-DIe4rzW-.js.map +0 -1
  85. package/dist/EventConfigurations-jGCJ4LqP.js +0 -384
  86. package/dist/EventConfigurations-jGCJ4LqP.js.map +0 -1
  87. package/dist/EventsSkeleton-BN7_0IGs.js +0 -74
  88. package/dist/EventsSkeleton-BN7_0IGs.js.map +0 -1
  89. package/dist/FeatureMenu-Ds6lFg4w.js +0 -249
  90. package/dist/FeatureMenu-Ds6lFg4w.js.map +0 -1
  91. package/dist/Features-Cshdl06N.js +0 -12
  92. package/dist/Features-Cshdl06N.js.map +0 -1
  93. package/dist/ImmunizationConfigurationBase-DZ8EqXlF.js.map +0 -1
  94. package/dist/ImmunizationConfigurationsList-CQnxWa09.js +0 -335
  95. package/dist/ImmunizationConfigurationsList-CQnxWa09.js.map +0 -1
  96. package/dist/ManageEventConfiguration-BJxS2Su0.js.map +0 -1
  97. package/dist/ManageNotification-DMN2szWy.js.map +0 -1
  98. package/dist/ManageRole-CuXmWQyp.js.map +0 -1
  99. package/dist/ManageTranslation-BTxvSYKb.js +0 -616
  100. package/dist/ManageTranslation-BTxvSYKb.js.map +0 -1
  101. package/dist/ManageUser-Dr3ptCYp.js.map +0 -1
  102. package/dist/NotificationList-BqibwMaM.js +0 -400
  103. package/dist/NotificationList-BqibwMaM.js.map +0 -1
  104. package/dist/OtherTypeEventConfigModal-ZnCGWm9v.js.map +0 -1
  105. package/dist/QueryBuilder-BPfavHH9.js.map +0 -1
  106. package/dist/QueryManagement-DXA73N2j.js +0 -671
  107. package/dist/QueryManagement-DXA73N2j.js.map +0 -1
  108. package/dist/RoleManagement-C0feJCuq.js +0 -410
  109. package/dist/RoleManagement-C0feJCuq.js.map +0 -1
  110. package/dist/SubMenu-DAfZC9Xi.js +0 -188
  111. package/dist/SubMenu-DAfZC9Xi.js.map +0 -1
  112. package/dist/TableDetails-DzREeJkm.js +0 -1508
  113. package/dist/TableDetails-DzREeJkm.js.map +0 -1
  114. package/dist/TableList-B9hr05Hs.js +0 -428
  115. package/dist/TableList-B9hr05Hs.js.map +0 -1
  116. package/dist/UserList-S5Q76wO7.js.map +0 -1
  117. package/dist/UserListSkeleton-cglK2SaU.js.map +0 -1
  118. package/dist/WidgetList-BSApErov.js +0 -188
  119. package/dist/WidgetList-BSApErov.js.map +0 -1
@@ -1,28 +1,28 @@
1
- import { jsxs as s, jsx as a, Fragment as E } from "react/jsx-runtime";
2
- import { useRef as K, useState as Y, useEffect as de } from "react";
3
- import { Modal as ce, Box as j, IconButton as me, FormControl as v, FormGroup as ue, Button as X } from "@mui/material";
4
- import he from "@/hooks/useTrackEvent";
5
- import { g as ge, a as pe } from "./RoleManagement-C0feJCuq.js";
6
- import { getRoleList as fe, getLocationTypes as ye, execute as O } from "@/common/services/GlobalApis";
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 be } from "react-hook-form";
9
- import { yupResolver as ve } from "@hookform/resolvers/yup";
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 m } from "@/views/custom-components/FormItem.jsx";
11
+ import { FormItem as c } from "@/views/custom-components/FormItem.jsx";
12
12
  import * as N from "yup";
13
- import A from "@/views/custom-components/CustomTextField";
14
- import Ne from "@/views/custom-components/CustomDropdown";
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 w from "@/views/custom-components/CustomAutoComplete";
17
- import { useTranslateProvider as Ie } from "@/common/languageTranslator/TranslationContext";
18
- import { FontAwesomeIcon as xe } from "@fortawesome/react-fontawesome";
19
- import { faXmark as we } from "@fortawesome/free-solid-svg-icons";
20
- import f from "@/common/services/util/GeneralUtil";
21
- import y from "prop-types";
22
- import J from "@/views/custom-components/CustomToggleSwitch";
23
- import { useSelector as Te } from "react-redux";
24
- import { getUseSkeleton as Me } from "@/store/reducers/SkeletonReducer";
25
- const Q = ({ children: I, isLoading: b }) => !Te(Me) || !b ? I : /* @__PURE__ */ s("div", { className: "pt-6 h-[88vh]", children: [
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
- Q.propTypes = {
77
- children: y.any,
78
- isLoading: y.any
76
+ ee.propTypes = {
77
+ children: v.any,
78
+ isLoading: v.any
79
79
  };
80
- const Re = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Le = ({
81
- selectedId: I,
82
- isUpdate: b,
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: Z
87
+ isRoleListModified: ae
86
88
  }) => {
87
- const G = K(null), z = K(!1), _ = he(), [i, V] = Y({}), [ee, D] = Y(!1), ae = N.object().shape({
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: f.isTecho ? N.boolean().notRequired() : N.boolean().nullable().defined("Please Select a Value"),
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: d,
103
- handleSubmit: te,
104
- formState: { errors: u, isSubmitting: le },
104
+ control: r,
105
+ handleSubmit: se,
106
+ formState: { errors: m, isSubmitting: ne },
105
107
  setValue: g,
106
108
  // getValues,
107
- watch: B,
108
- reset: se
109
- } = be({
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: ve(ae),
147
+ resolver: xe(le),
144
148
  mode: "onChange",
145
149
  shouldUnregister: !1
146
- }), ne = B("isBankDetailsRequired"), F = B("locationTypes"), { translate: P } = Ie(), re = B("isLocationRequired"), ie = B("isHealthInfraMandatory"), H = [
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) => f.isTecho ? ![
160
+ ].filter((e) => b.isTecho ? ![
157
161
  "isGeolocationMandatory",
158
162
  "isHealthInfraMandatory",
159
163
  "isLastNameMandatory",
160
164
  "isSmagTrainedMandatory"
161
- ].includes(e.value) : f.isSewaRural || f.isPhmp || f.isImomcare ? e.value !== "isNodalMandatory" : f.isEkavach ? ![
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), se(), _("conversion_event", {
169
- form: G.current,
172
+ h(0), oe(), F("conversion_event", {
173
+ form: z.current,
170
174
  form_name: "Manage Role",
171
- submit: z.current
172
- }), _("button_click", {
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
- }, x = (e, t, o) => {
178
- g(o, t);
179
- }, oe = async (e) => {
180
- var t, o;
181
+ }, I = (e, t, d) => {
182
+ g(d, t);
183
+ }, ue = async (e) => {
184
+ var t, d;
181
185
  try {
182
- _("button_click", {
183
- button_name: b ? "update role button" : "add role button",
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, b || (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(
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 pe(e), W({
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 ${b ? "Updated" : "Added"} Successfully`
195
- }), z.current = !0, k(), Z();
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: ${(o = (t = l == null ? void 0 : l.response) == null ? void 0 : t.data) == null ? void 0 : o.message}`
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 de(() => {
205
+ return he(() => {
204
206
  (async () => {
205
207
  try {
206
- D((o) => !o);
207
- const t = f.getEnv();
208
+ _((d) => !d);
209
+ const t = b.getEnv();
208
210
  if (L !== 0) {
209
- const [o, l, q, C, S] = await Promise.all([
210
- fe(),
211
- ye(),
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 (V((p) => {
232
- var T, M, R;
233
+ if (U((p) => {
234
+ var M, R, B;
233
235
  return {
234
236
  ...p,
235
- roles: o.data,
237
+ roles: d.data,
236
238
  locationData: l.data,
237
- manageTeam: (T = q == null ? void 0 : q.data) == null ? void 0 : T.result,
238
- category: (M = C == null ? void 0 : C.data) == null ? void 0 : M.result,
239
- healthInfraType: (R = S == null ? void 0 : S.data) == null ? void 0 : R.result
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
- }), I) {
242
- const { data: p } = await ge(I);
243
- V((n) => ({ ...n, roleData: p, env: t })), Object.keys(p).map((n) => g(n, p[n])), g("isBankDetailsRequired", p.isBankDetailsRequired), g("isBankDetailsMandatory", p.isBankDetailsMandatory);
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: T,
246
- healthInfrastructureIds: M,
247
- roleIds: R,
248
- categoryIds: U
247
+ manageByTeamTypeIds: M,
248
+ healthInfrastructureIds: R,
249
+ roleIds: B,
250
+ categoryIds: K
249
251
  } = p;
250
252
  g(
251
253
  "manageByTeamTypeIds",
252
- T ? T.map(
254
+ M ? M.map(
253
255
  (n) => {
254
- var c;
255
- return (c = q.data.result) == null ? void 0 : c.find((r) => (r == null ? void 0 : r.id) === n);
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
- M ? M.map(
262
+ R ? R.map(
261
263
  (n) => {
262
- var c;
263
- return (c = S.data.result) == null ? void 0 : c.find(
264
- (r) => (r == null ? void 0 : r.id) === n
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
- U ? U.map(
272
+ K ? K.map(
271
273
  (n) => {
272
- var c;
273
- return (c = C.data.result) == null ? void 0 : c.find((r) => (r == null ? void 0 : r.id) === n);
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
- R ? R.map((n) => {
279
- var c;
280
- return (c = o.data) == null ? void 0 : c.find((r) => (r == null ? void 0 : r.id) === n);
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 c;
286
- return (c = o.data) == null ? void 0 : c.find((r) => (r == null ? void 0 : r.id) === n);
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
- D((o) => !o);
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
- }), D((o) => !o);
298
+ }), _((d) => !d);
297
299
  }
298
300
  })();
299
- }, [I, L]), /* @__PURE__ */ a(
300
- ce,
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
- j,
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(Q, { isLoading: ee, children: [
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
- j,
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: b ? "Update Role" : "Add New Role"
320
+ children: f ? "Update Role" : "Add New Role"
319
321
  }
320
322
  ) }),
321
323
  /* @__PURE__ */ a(
322
- me,
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(xe, { icon: we, size: "lg" })
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: te(oe),
336
- ref: G,
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(v, { variant: "outlined", children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(m, { label: "Role Name", children: /* @__PURE__ */ a(
341
- A,
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: u,
347
- control: d,
348
+ errors: m,
349
+ control: r,
348
350
  dataTestId: "managerole-role-name-field"
349
351
  }
350
352
  ) }) }) }),
351
- /* @__PURE__ */ a(v, { variant: "outlined", children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(
352
- m,
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
- A,
359
+ j,
358
360
  {
359
361
  name: "maxPosition",
360
362
  id: "maxPosition",
361
- errors: u,
362
- control: d,
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
- !f.isTecho && /* @__PURE__ */ a(v, { variant: "outlined", children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(m, { label: "Max Health Infrastructure", children: /* @__PURE__ */ a(
381
- A,
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: d,
386
- errors: u,
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
- v,
409
+ y,
408
410
  {
409
411
  variant: "outlined",
410
412
  className: "flex flex-row items-center w-full ",
411
413
  children: /* @__PURE__ */ a(
412
- m,
414
+ c,
413
415
  {
414
416
  label: "Location Required",
415
417
  required: !0,
416
418
  direction: "row",
417
419
  children: /* @__PURE__ */ a(
418
- J,
420
+ G,
419
421
  {
420
- control: d,
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: u
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
- (re === !0 || le) && /* @__PURE__ */ a(E, { children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(
435
- m,
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
- w,
443
+ x,
442
444
  {
443
445
  id: "locationTypes",
444
- control: d,
446
+ control: r,
445
447
  name: "locationTypes",
446
448
  options: i.locationData,
447
- value: F == null ? void 0 : F.map(
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
- (o) => o.type === (e == null ? void 0 : e.type)
453
+ (d) => d.type === (e == null ? void 0 : e.type)
452
454
  );
453
455
  }
454
456
  ),
455
- errors: u,
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) => x(e, t, "locationTypes")
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
- m,
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
- w,
472
+ x,
471
473
  {
472
474
  name: "roleIds",
473
475
  id: "roleIds",
474
- errors: u,
475
- control: d,
476
+ errors: m,
477
+ control: r,
476
478
  dataTestId: "managerole-manage-role-select",
477
479
  options: i.roles,
478
- onChange: (e, t) => x(e, t, "roleIds"),
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
- m,
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
- w,
492
+ x,
491
493
  {
492
494
  name: "canManageRoleIds",
493
495
  id: "canManageRoleIds",
494
- errors: u,
495
- control: d,
496
+ errors: m,
497
+ control: r,
496
498
  dataTestId: "managerole-managed-by-role-select",
497
499
  options: i.roles,
498
- onChange: (e, t) => x(e, t, "canManageRoleIds"),
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
- m,
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
- Ne,
514
+ Z,
513
515
  {
514
- control: d,
516
+ control: r,
515
517
  id: "roleType",
516
518
  name: "roleType",
517
- options: Re,
519
+ options: Ce,
518
520
  displayName: "name",
519
521
  optionValue: "name",
520
- errors: u,
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
- m,
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
- w,
534
+ x,
533
535
  {
534
- control: d,
536
+ control: r,
535
537
  name: "manageByTeamTypeIds",
536
538
  id: "manageByTeamTypeIds",
537
- errors: u,
539
+ errors: m,
538
540
  options: i.manageTeam,
539
541
  dataTestId: "managerole-manage-team-select",
540
- onChange: (e, t) => x(e, t, "manageByTeamTypeIds"),
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
- m,
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: ie,
554
+ required: me,
553
555
  children: /* @__PURE__ */ a(
554
- w,
556
+ x,
555
557
  {
556
558
  options: i.healthInfraType,
557
- errors: u,
559
+ errors: m,
558
560
  name: "healthInfrastructureIds",
559
561
  id: "healthInfrastructureIds",
560
562
  dataTestId: "managerole-health-infrastructure-select",
561
- control: d,
562
- onChange: (e, t) => x(e, t, "healthInfrastructureIds"),
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
- !f.isBahaar && /* @__PURE__ */ a(E, { children: /* @__PURE__ */ a("div", { className: "space-y-4", children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(
569
- m,
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
- w,
576
+ x,
575
577
  {
576
578
  id: "categoryIds",
577
579
  name: "categoryIds",
578
- errors: u,
580
+ errors: m,
579
581
  options: i.category,
580
582
  dataTestId: "managerole-role-category-select",
581
- control: d,
582
- onChange: (e, t) => x(e, t, "categoryIds"),
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
- v,
593
+ y,
592
594
  {
593
595
  variant: "outlined",
594
596
  className: "flex flex-row items-center w-[60%] ",
595
597
  children: /* @__PURE__ */ a(
596
- m,
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
- J,
607
+ G,
606
608
  {
607
- control: d,
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: u
615
+ errors: m
614
616
  }
615
617
  )
616
618
  }
617
619
  )
618
620
  }
619
621
  ),
620
- !b && /* @__PURE__ */ a(E, { children: /* @__PURE__ */ a(v, { variant: "outlined ", className: "w-[40%]", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ a(
621
- m,
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: d,
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
- v,
693
+ y,
641
694
  {
642
695
  variant: "outlined",
643
696
  className: "flex flex-col items-start justify-between",
644
697
  children: /* @__PURE__ */ a(
645
- m,
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(ue, { row: !0, children: [
650
- H == null ? void 0 : H.map((e) => /* @__PURE__ */ a(
702
+ children: /* @__PURE__ */ s(fe, { row: !0, children: [
703
+ P == null ? void 0 : P.map((e) => /* @__PURE__ */ a(
651
704
  $,
652
705
  {
653
- control: d,
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
- ne === !0 && /* @__PURE__ */ a(
714
+ re === !0 && /* @__PURE__ */ a(
662
715
  $,
663
716
  {
664
717
  name: "isBankDetailsMandatory",
665
- control: d,
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
- j,
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
- X,
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: P("Close")
743
+ children: D("Close")
691
744
  }
692
745
  ),
693
746
  /* @__PURE__ */ a(
694
- X,
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: b ? `${P("Update Role")}` : `${P("Add Role")}`
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
- Le.propTypes = {
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
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
- Le as default
779
+ qe as default
727
780
  };
728
- //# sourceMappingURL=ManageRole-CuXmWQyp.js.map
781
+ //# sourceMappingURL=ManageRole-Cbs9dUhc.js.map