@argusoft/medplat-form-engine 1.0.10 → 1.0.12

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 (60) hide show
  1. package/dist/{AccessRights-sgIhYR30-DWNCTLI6.js → AccessRights-sgIhYR30-Dg6B4KJM.js} +20 -20
  2. package/dist/{AccessRights-sgIhYR30-DWNCTLI6.js.map → AccessRights-sgIhYR30-Dg6B4KJM.js.map} +1 -1
  3. package/dist/{AddFeatures-BxXCC6ex-1VYoA24R.js → AddFeatures-DLbjDGei-Dg8WYww8.js} +7 -7
  4. package/dist/{AddFeatures-BxXCC6ex-1VYoA24R.js.map → AddFeatures-DLbjDGei-Dg8WYww8.js.map} +1 -1
  5. package/dist/{AddLabelModal-DE3ploGD-DWF1SOUp.js → AddLabelModal-DE3ploGD-BV_K8Q7c.js} +45 -45
  6. package/dist/{AddLabelModal-DE3ploGD-DWF1SOUp.js.map → AddLabelModal-DE3ploGD-BV_K8Q7c.js.map} +1 -1
  7. package/dist/{AddRoleDrawer-ZK1eejxI-ldfhQqA_.js → AddRoleDrawer-ZK1eejxI-xMb2iVGk.js} +11 -11
  8. package/dist/{AddRoleDrawer-ZK1eejxI-ldfhQqA_.js.map → AddRoleDrawer-ZK1eejxI-xMb2iVGk.js.map} +1 -1
  9. package/dist/{AppModal-BgZyfrd--CNvWjWhL.js → AppModal-BgZyfrd--CZPgx1UG.js} +2 -2
  10. package/dist/{AppModal-BgZyfrd--CNvWjWhL.js.map → AppModal-BgZyfrd--CZPgx1UG.js.map} +1 -1
  11. package/dist/{ChangePasswordModal-MV7g8tkA-BDA1Pw0i.js → ChangePasswordModal-MV7g8tkA-D6c6QM4F.js} +2 -2
  12. package/dist/{ChangePasswordModal-MV7g8tkA-BDA1Pw0i.js.map → ChangePasswordModal-MV7g8tkA-D6c6QM4F.js.map} +1 -1
  13. package/dist/{ConditionConfig-GDCXIg3C-XbR1fp6h.js → ConditionConfig-GDCXIg3C-COtWwHe3.js} +2 -2
  14. package/dist/{ConditionConfig-GDCXIg3C-XbR1fp6h.js.map → ConditionConfig-GDCXIg3C-COtWwHe3.js.map} +1 -1
  15. package/dist/{FeatureMenu-BYSRoNm0-D2Ak-EDd.js → FeatureMenu-BYSRoNm0-9p5IIVx2.js} +2 -2
  16. package/dist/{FeatureMenu-BYSRoNm0-D2Ak-EDd.js.map → FeatureMenu-BYSRoNm0-9p5IIVx2.js.map} +1 -1
  17. package/dist/{ImmunizationConfigurationBase-DZ8EqXlF-CSPs9x_q.js → ImmunizationConfigurationBase-DZ8EqXlF-D645-PAk.js} +2 -2
  18. package/dist/{ImmunizationConfigurationBase-DZ8EqXlF-CSPs9x_q.js.map → ImmunizationConfigurationBase-DZ8EqXlF-D645-PAk.js.map} +1 -1
  19. package/dist/ImmunizationConfigurationBase-DZ8EqXlF.css +1 -1
  20. package/dist/{LanguagesModal-rk6IGQwY-Cxw9xctN.js → LanguagesModal-rk6IGQwY-BaAI1s2W.js} +2 -2
  21. package/dist/{LanguagesModal-rk6IGQwY-Cxw9xctN.js.map → LanguagesModal-rk6IGQwY-BaAI1s2W.js.map} +1 -1
  22. package/dist/{ManageDynamicFeature-CeeqiS3K-D2Se68tC.js → ManageDynamicFeature-BKkCnQvF-CinU35NS.js} +1013 -1013
  23. package/dist/ManageDynamicFeature-BKkCnQvF-CinU35NS.js.map +1 -0
  24. package/dist/{ManageEventConfiguration-BJxS2Su0-yd2dUxgz.js → ManageEventConfiguration-BJxS2Su0-DBdaQcPo.js} +27 -27
  25. package/dist/{ManageEventConfiguration-BJxS2Su0-yd2dUxgz.js.map → ManageEventConfiguration-BJxS2Su0-DBdaQcPo.js.map} +1 -1
  26. package/dist/ManageNotification-B4prX-9Z-B4mRuGir.js.map +1 -1
  27. package/dist/{ManageRole-ByqBmjuc-CApL3DJy.js → ManageRole-BjIIXAlK-DY39p0FD.js} +255 -226
  28. package/dist/ManageRole-BjIIXAlK-DY39p0FD.js.map +1 -0
  29. package/dist/{ManageTranslation-BTxvSYKb-CwT975cy.js → ManageTranslation-BTxvSYKb-C2CZwkRN.js} +2 -2
  30. package/dist/{ManageTranslation-BTxvSYKb-CwT975cy.js.map → ManageTranslation-BTxvSYKb-C2CZwkRN.js.map} +1 -1
  31. package/dist/{ManageUser-PHiTNyF8-Bddmh2CC.js → ManageUser-PHiTNyF8-Bm4bYqvt.js} +3 -3
  32. package/dist/{ManageUser-PHiTNyF8-Bddmh2CC.js.map → ManageUser-PHiTNyF8-Bm4bYqvt.js.map} +1 -1
  33. package/dist/{MedplatFormWrapper-DbdQUpEu.js → MedplatFormWrapper-CEXGoLC1.js} +3954 -3952
  34. package/dist/MedplatFormWrapper-CEXGoLC1.js.map +1 -0
  35. package/dist/MedplatFormWrapper.css +1 -0
  36. package/dist/{MobileTypeEventConfigModal-ChhO_A4f-Wd3d3SEP.js → MobileTypeEventConfigModal-ChhO_A4f-Dpq9010c.js} +2 -1
  37. package/dist/{MobileTypeEventConfigModal-ChhO_A4f-Wd3d3SEP.js.map → MobileTypeEventConfigModal-ChhO_A4f-Dpq9010c.js.map} +1 -1
  38. package/dist/{OtherTypeEventConfigModal-ZnCGWm9v-tpC-SI0P.js → OtherTypeEventConfigModal-ZnCGWm9v-CsQiv68d.js} +2 -1
  39. package/dist/{OtherTypeEventConfigModal-ZnCGWm9v-tpC-SI0P.js.map → OtherTypeEventConfigModal-ZnCGWm9v-CsQiv68d.js.map} +1 -1
  40. package/dist/{QueryManagement-DXA73N2j-Wlk7hKP3.js → QueryManagement-DXA73N2j-BMDEgiCy.js} +2 -2
  41. package/dist/{QueryManagement-DXA73N2j-Wlk7hKP3.js.map → QueryManagement-DXA73N2j-BMDEgiCy.js.map} +1 -1
  42. package/dist/{RoleManagement-CLaEJ90J-BW0tG5t9.js → RoleManagement-v5Nyp1vr-BsTLfcMm.js} +13 -7
  43. package/dist/RoleManagement-v5Nyp1vr-BsTLfcMm.js.map +1 -0
  44. package/dist/{SubMenu-BHcSNSUF-d-_yEXeN.js → SubMenu-BHcSNSUF-eLmX3DkH.js} +2 -2
  45. package/dist/{SubMenu-BHcSNSUF-d-_yEXeN.js.map → SubMenu-BHcSNSUF-eLmX3DkH.js.map} +1 -1
  46. package/dist/{TypeConfiguration-C-lk8Szs-DKu6I5Im.js → TypeConfiguration-C-lk8Szs-qaofDyyM.js} +7 -6
  47. package/dist/{TypeConfiguration-C-lk8Szs-DKu6I5Im.js.map → TypeConfiguration-C-lk8Szs-qaofDyyM.js.map} +1 -1
  48. package/dist/{WidgetList-BSApErov-CBYLh0Oh.js → WidgetList-BSApErov-D05f9srr.js} +2 -2
  49. package/dist/{WidgetList-BSApErov-CBYLh0Oh.js.map → WidgetList-BSApErov-D05f9srr.js.map} +1 -1
  50. package/dist/{index-CdFr9tGu.js → index-CnfGzeaj.js} +217 -216
  51. package/dist/index-CnfGzeaj.js.map +1 -0
  52. package/dist/index.css +1 -1
  53. package/dist/index.js +1 -1
  54. package/dist/manageImmunization-B4swS745-JldexHrO.js.map +1 -1
  55. package/package.json +3 -3
  56. package/dist/ManageDynamicFeature-CeeqiS3K-D2Se68tC.js.map +0 -1
  57. package/dist/ManageRole-ByqBmjuc-CApL3DJy.js.map +0 -1
  58. package/dist/MedplatFormWrapper-DbdQUpEu.js.map +0 -1
  59. package/dist/RoleManagement-CLaEJ90J-BW0tG5t9.js.map +0 -1
  60. package/dist/index-CdFr9tGu.js.map +0 -1
@@ -1,107 +1,107 @@
1
- import { jsx as e, jsxs as t, Fragment as D } from "react/jsx-runtime";
2
- import { useRef as G, useState as V, useEffect as ne } from "react";
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-CLaEJ90J-BW0tG5t9.js";
6
- import { getRoleList as ye, getLocationTypes as ge, execute as H } from "@/common/services/GlobalApis";
7
- import { showToast as F } from "@/common/toaster/toaster";
5
+ import { g as pe, a as he } from "./RoleManagement-v5Nyp1vr-BsTLfcMm.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 n } from "@/views/custom-components/FormItem.jsx";
11
+ import { FormItem as d } from "@/views/custom-components/FormItem.jsx";
12
12
  import * as N from "yup";
13
- import E from "@/views/custom-components/CustomTextField";
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 R from "@/views/custom-components/CustomAutoComplete";
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 xe } from "@fortawesome/free-solid-svg-icons";
20
- import y from "@/common/services/util/GeneralUtil";
21
- import g from "prop-types";
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 Te } from "react-redux";
23
+ import { useSelector as xe } from "react-redux";
24
24
  import { getUseSkeleton as we } from "@/store/reducers/SkeletonReducer";
25
- const J = ({ children: I, isLoading: f }) => !Te(we) || !f ? I : /* @__PURE__ */ t("div", { className: "pt-6 h-[88vh]", 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__ */ e("div", { className: "bg-gray-300 animate-pulse rounded-md w-32 h-8" }),
28
- /* @__PURE__ */ e("div", { className: "bg-gray-300 animate-pulse rounded-full w-10 h-10" })
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__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-4", children: [1, 2, 3].map((s) => /* @__PURE__ */ t("div", { className: "space-y-1.5", children: [
32
- /* @__PURE__ */ e("div", { className: "h-4 bg-gray-300 rounded w-1/3 mb-2 animate-pulse" }),
33
- /* @__PURE__ */ e("div", { className: "h-10 bg-gray-300 rounded animate-pulse w-full" })
34
- ] }, s)) }),
35
- /* @__PURE__ */ e("div", { className: "flex items-center gap-6 w-full", children: /* @__PURE__ */ t("div", { className: "w-full", children: [
36
- /* @__PURE__ */ e("div", { className: "h-4 bg-gray-300 rounded w-1/4 mb-2 animate-pulse" }),
37
- /* @__PURE__ */ e("div", { className: "h-8 bg-gray-300 rounded-full w-16 animate-pulse" })
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((s) => /* @__PURE__ */ t("div", { className: "space-y-1.5", children: [
41
- /* @__PURE__ */ e("div", { className: "h-4 bg-gray-300 rounded w-1/4 mb-2 animate-pulse" }),
42
- /* @__PURE__ */ e("div", { className: "h-10 bg-gray-300 rounded animate-pulse w-full" })
43
- ] }, s)),
44
- /* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [1, 2].map((s) => /* @__PURE__ */ t("div", { className: "space-y-1.5", children: [
45
- /* @__PURE__ */ e("div", { className: "h-4 bg-gray-300 rounded w-1/3 mb-2 animate-pulse" }),
46
- /* @__PURE__ */ e("div", { className: "h-10 bg-gray-300 rounded animate-pulse w-full" })
47
- ] }, s)) }),
48
- [1, 2].map((s) => /* @__PURE__ */ t("div", { className: "space-y-1.5", children: [
49
- /* @__PURE__ */ e("div", { className: "h-4 bg-gray-300 rounded w-1/3 mb-2 animate-pulse" }),
50
- /* @__PURE__ */ e("div", { className: "h-10 bg-gray-300 rounded animate-pulse w-full" })
51
- ] }, s))
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__ */ e("div", { className: "h-4 bg-gray-300 rounded w-1/3 mb-2 animate-pulse" }),
56
- /* @__PURE__ */ e("div", { className: "h-8 bg-gray-300 rounded-full w-16 animate-pulse" })
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__ */ e("div", { className: "h-5 w-5 bg-gray-300 rounded animate-pulse" }),
60
- /* @__PURE__ */ e("div", { className: "h-4 bg-gray-300 rounded w-1/3 animate-pulse" })
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__ */ e("div", { className: "h-4 bg-gray-300 rounded w-1/4 mb-2 animate-pulse" }),
65
- /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-4", children: [1, 2, 3, 4].map((s) => /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
66
- /* @__PURE__ */ e("div", { className: "h-5 w-5 bg-gray-300 rounded animate-pulse" }),
67
- /* @__PURE__ */ e("div", { className: "h-4 w-16 bg-gray-300 rounded animate-pulse" })
68
- ] }, s)) })
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__ */ e("div", { className: "h-9 w-20 bg-gray-300 rounded animate-pulse" }),
73
- /* @__PURE__ */ e("div", { className: "h-9 w-24 bg-gray-300 rounded animate-pulse" })
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: g.any,
78
- isLoading: g.any
77
+ children: y.any,
78
+ isLoading: y.any
79
79
  };
80
80
  const Me = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Re = ({
81
- selectedId: I,
81
+ selectedId: x,
82
82
  isUpdate: f,
83
- open: s,
83
+ open: c,
84
84
  setOpen: Q,
85
85
  isRoleListModified: X
86
86
  }) => {
87
- const O = G(null), W = G(!1), q = ue(), [d, U] = V({}), [Z, k] = V(!1), ee = N.object().shape({
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: (a) => a.min(1, "Select Location Type").required("Select Location Type"),
92
- otherwise: (a) => a.notRequired()
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: y.isTecho ? N.boolean().notRequired() : N.boolean().nullable().defined("Please Select a Value"),
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: (a) => a.min(1, "Select Health Infrastructure Type").required("Select Health Infrastructure Type"),
99
- otherwise: (a) => a.notRequired()
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: o,
102
+ control: i,
103
103
  handleSubmit: ae,
104
- formState: { errors: c, isSubmitting: le },
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(), ie = L("isLocationRequired"), oe = L("isHealthInfraMandatory"), z = [
146
+ }), re = L("isBankDetailsRequired"), $ = L("locationTypes"), { translate: _ } = Ne(), oe = L("isLocationRequired"), ie = L("isHealthInfraMandatory"), z = [
146
147
  { label: "Email", value: "isEmailMandatory" },
147
- ...(d == null ? void 0 : d.env) !== "chip" ? [{ label: "Aadhar Number", value: "isAadharNumMandatory" }] : [],
148
+ ...(m == null ? void 0 : m.env) !== "chip" ? [{ label: "Aadhar Number", value: "isAadharNumMandatory" }] : [],
148
149
  { label: "Contact Number", value: "isContactNumMandatory" },
149
- ...(d == null ? void 0 : d.env) !== "chip" ? [{ label: "Convox Id", value: "isConvoxIdMandatory" }] : [],
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
- ...(d == null ? void 0 : d.env) !== "chip" ? [{ label: "Smag Trained", value: "isSmagTrainedMandatory" }] : [],
154
+ ...(m == null ? void 0 : m.env) !== "chip" ? [{ label: "Smag Trained", value: "isSmagTrainedMandatory" }] : [],
154
155
  { label: "Nodal", value: "isNodalMandatory" }
155
- ].filter((a) => y.isTecho ? ![
156
+ ].filter((e) => g.isTecho ? ![
156
157
  "isGeolocationMandatory",
157
158
  "isHealthInfraMandatory",
158
159
  "isLastNameMandatory",
159
160
  "isSmagTrainedMandatory"
160
- ].includes(a.value) : y.isSewaRural || y.isPhmp || y.isImomcare ? a.value !== "isNodalMandatory" : y.isEkavach ? ![
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(a.value) : !0), B = () => {
167
+ ].includes(e.value) : !0), B = () => {
167
168
  Q(0), te(), q("conversion_event", {
168
- form: O.current,
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
- }, x = (a, l, v) => {
177
+ }, I = (e, l, v) => {
177
178
  p(v, l);
178
- }, se = async (a) => {
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 a.bankDetailsRequired, delete a.bankDetailsMandatory, f || (delete a.id, delete a.state, delete a.createdOn, delete a.createdBy, delete a.code, delete a.description, delete a.assignedFeatures, delete a.assignedFeatureList), a.roleIds = a.roleIds.map((r) => r == null ? void 0 : r.id), a.manageByTeamTypeIds = a.manageByTeamTypeIds.map(
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
- ), a.healthInfrastructureIds = a.healthInfrastructureIds.map(
188
+ ), e.manageByTeamTypeIds = e.manageByTeamTypeIds.map(
188
189
  (r) => r == null ? void 0 : r.id
189
- ), a.categoryIds = a.categoryIds.map((r) => r == null ? void 0 : r.id), a.locationTypes = a.isLocationRequired === !0 ? a.locationTypes : [], delete a.isLocationRequired, a.manageByRoleIds = a.roleIds, await he(a), F({
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
- F({
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 ne(() => {
203
+ return se(() => {
201
204
  (async () => {
202
205
  try {
203
206
  k((l) => !l);
204
- const a = y.getEnv();
205
- if (s !== 0) {
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
- H({
211
+ ye(),
212
+ F({
210
213
  code: "team_all_types_for_roles",
211
214
  parameters: {}
212
215
  }),
213
- H({
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
- H({
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 T, w, M;
232
+ var w, M, R;
230
233
  return {
231
234
  ...h,
232
235
  roles: l.data,
233
236
  locationData: v.data,
234
- manageTeam: (T = r == null ? void 0 : r.data) == null ? void 0 : T.result,
235
- category: (w = S == null ? void 0 : S.data) == null ? void 0 : w.result,
236
- healthInfraType: (M = C == null ? void 0 : C.data) == null ? void 0 : M.result
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
- }), I) {
239
- const { data: h } = await pe(I);
240
- U((i) => ({ ...i, roleData: h, env: a })), Object.keys(h).map((i) => p(i, h[i])), p("isBankDetailsRequired", h.isBankDetailsRequired), p("isBankDetailsMandatory", h.isBankDetailsMandatory);
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: T,
243
- healthInfrastructureIds: w,
244
- roleIds: M,
245
+ manageByTeamTypeIds: w,
246
+ healthInfrastructureIds: M,
247
+ roleIds: R,
245
248
  categoryIds: A
246
249
  } = h;
247
250
  p(
248
251
  "manageByTeamTypeIds",
249
- T ? T.map(
250
- (i) => {
251
- var m;
252
- return (m = r.data.result) == null ? void 0 : m.find((u) => (u == null ? void 0 : u.id) === i);
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
- w ? w.map(
258
- (i) => {
259
- var m;
260
- return (m = C.data.result) == null ? void 0 : m.find(
261
- (u) => (u == null ? void 0 : u.id) === i
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((i) => i !== void 0) : []
267
+ ).filter((o) => o !== void 0) : []
265
268
  ), p(
266
269
  "categoryIds",
267
270
  A ? A.map(
268
- (i) => {
269
- var m;
270
- return (m = S.data.result) == null ? void 0 : m.find((u) => (u == null ? void 0 : u.id) === i);
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
- M ? M.map((i) => {
276
- var m;
277
- return (m = l.data) == null ? void 0 : m.find((u) => (u == null ? void 0 : u.id) === i);
278
- }).filter((i) => i !== void 0) : []
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 (a) {
284
- F({
285
- message: `Error in manage role :${a == null ? void 0 : a.message}`,
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
- }, [I, s]), /* @__PURE__ */ e(
299
+ }, [x, c]), /* @__PURE__ */ a(
291
300
  de,
292
301
  {
293
- open: s !== 0,
302
+ open: c !== 0,
294
303
  onClose: B,
295
304
  "data-testid": "managerole-modal",
296
- children: /* @__PURE__ */ e("div", { className: "mt-10 fixed inset-0 z-[100] flex items-center justify-center p-4 animate-in fade-in duration-200", children: /* @__PURE__ */ e(
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: (a) => a.palette.custom.customBackground },
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__ */ e("div", { children: /* @__PURE__ */ e(
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__ */ e(
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__ */ e(Ie, { icon: xe, size: "lg" })
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(se),
327
- ref: O,
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__ */ e(b, { variant: "outlined", children: /* @__PURE__ */ e("div", { className: "space-y-1.5", children: /* @__PURE__ */ e(n, { label: "Role Name", children: /* @__PURE__ */ e(
332
- E,
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: c,
338
- control: o,
346
+ errors: u,
347
+ control: i,
339
348
  dataTestId: "managerole-role-name-field"
340
349
  }
341
350
  ) }) }) }),
342
- /* @__PURE__ */ e(b, { variant: "outlined", children: /* @__PURE__ */ e("div", { className: "space-y-1.5", children: /* @__PURE__ */ e(
343
- n,
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__ */ e(
348
- E,
356
+ children: /* @__PURE__ */ a(
357
+ O,
349
358
  {
350
359
  name: "maxPosition",
351
360
  id: "maxPosition",
352
- errors: c,
353
- control: o,
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: (a) => {
363
- a.target.value = a.target.value.replace(/\D/g, "");
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
- !y.isTecho && /* @__PURE__ */ e(b, { variant: "outlined", children: /* @__PURE__ */ e("div", { className: "space-y-1.5", children: /* @__PURE__ */ e(n, { label: "Max Health Infrastructure", children: /* @__PURE__ */ e(
372
- E,
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: o,
377
- errors: c,
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: (a) => {
387
- a.target.value = a.target.value.replace(
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__ */ e("div", { className: "flex items-center gap-6 w-full", children: /* @__PURE__ */ e(
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__ */ e(
403
- n,
411
+ children: /* @__PURE__ */ a(
412
+ d,
404
413
  {
405
414
  label: "Location Required",
406
415
  required: !0,
407
416
  direction: "row",
408
- children: /* @__PURE__ */ e(
417
+ children: /* @__PURE__ */ a(
409
418
  Y,
410
419
  {
411
- control: o,
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: c
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
- (ie === !0 || le) && /* @__PURE__ */ e(D, { children: /* @__PURE__ */ e("div", { className: "space-y-1.5", children: /* @__PURE__ */ e(
426
- n,
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__ */ e(
432
- R,
440
+ children: /* @__PURE__ */ a(
441
+ T,
433
442
  {
434
443
  id: "locationTypes",
435
- control: o,
444
+ control: i,
436
445
  name: "locationTypes",
437
- options: d.locationData,
446
+ options: m.locationData,
438
447
  value: $ == null ? void 0 : $.map(
439
- (a) => {
448
+ (e) => {
440
449
  var l;
441
- return (l = d.locationData) == null ? void 0 : l.find(
442
- (v) => v.type === (a == null ? void 0 : a.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: c,
447
- getOptionLabel: (a) => a == null ? void 0 : a.name,
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: (a, l) => x(a, l, "locationTypes")
459
+ onChange: (e, l) => I(e, l, "locationTypes")
451
460
  }
452
461
  )
453
462
  }
454
463
  ) }) }),
455
- /* @__PURE__ */ e("div", { className: "space-y-1.5", children: /* @__PURE__ */ e(
456
- n,
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__ */ e(
461
- R,
469
+ children: /* @__PURE__ */ a(
470
+ T,
462
471
  {
463
472
  name: "roleIds",
464
473
  id: "roleIds",
465
- errors: c,
466
- control: o,
474
+ errors: u,
475
+ control: i,
467
476
  dataTestId: "managerole-manage-role-select",
468
- options: d.roles,
469
- onChange: (a, l) => x(a, l, "roleIds"),
470
- getOptionLabel: (a) => a == null ? void 0 : a.name
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__ */ e("div", { className: "space-y-1.5", children: /* @__PURE__ */ e(
477
- n,
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__ */ e(
511
+ children: /* @__PURE__ */ a(
483
512
  be,
484
513
  {
485
- control: o,
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: c,
520
+ errors: u,
492
521
  dataTestId: "managerole-role-type-dropdown"
493
522
  }
494
523
  )
495
524
  }
496
525
  ) }),
497
- /* @__PURE__ */ e("div", { className: "space-y-1.5", children: /* @__PURE__ */ e(
498
- n,
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__ */ e(
503
- R,
531
+ children: /* @__PURE__ */ a(
532
+ T,
504
533
  {
505
- control: o,
534
+ control: i,
506
535
  name: "manageByTeamTypeIds",
507
536
  id: "manageByTeamTypeIds",
508
- errors: c,
509
- options: d.manageTeam,
537
+ errors: u,
538
+ options: m.manageTeam,
510
539
  dataTestId: "managerole-manage-team-select",
511
- onChange: (a, l) => x(a, l, "manageByTeamTypeIds"),
512
- getOptionLabel: (a) => a == null ? void 0 : a.type
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__ */ e("div", { className: "space-y-4", children: /* @__PURE__ */ e("div", { className: "space-y-1.5", children: /* @__PURE__ */ e(
519
- n,
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: oe,
524
- children: /* @__PURE__ */ e(
525
- R,
552
+ required: ie,
553
+ children: /* @__PURE__ */ a(
554
+ T,
526
555
  {
527
- options: d.healthInfraType,
528
- errors: c,
556
+ options: m.healthInfraType,
557
+ errors: u,
529
558
  name: "healthInfrastructureIds",
530
559
  id: "healthInfrastructureIds",
531
560
  dataTestId: "managerole-health-infrastructure-select",
532
- control: o,
533
- onChange: (a, l) => x(a, l, "healthInfrastructureIds"),
534
- getOptionLabel: (a) => a == null ? void 0 : a.value
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
- !y.isBahaar && /* @__PURE__ */ e(D, { children: /* @__PURE__ */ e("div", { className: "space-y-4", children: /* @__PURE__ */ e("div", { className: "space-y-1.5", children: /* @__PURE__ */ e(
540
- n,
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__ */ e(
545
- R,
573
+ children: /* @__PURE__ */ a(
574
+ T,
546
575
  {
547
576
  id: "categoryIds",
548
577
  name: "categoryIds",
549
- errors: c,
550
- options: d.category,
578
+ errors: u,
579
+ options: m.category,
551
580
  dataTestId: "managerole-role-category-select",
552
- control: o,
553
- onChange: (a, l) => x(a, l, "categoryIds"),
554
- getOptionLabel: (a) => a == null ? void 0 : a.value
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__ */ e(
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__ */ e(
567
- n,
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__ */ e(
604
+ children: /* @__PURE__ */ a(
576
605
  Y,
577
606
  {
578
- control: o,
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: c
613
+ errors: u
585
614
  }
586
615
  )
587
616
  }
588
617
  )
589
618
  }
590
619
  ),
591
- !f && /* @__PURE__ */ e(D, { children: /* @__PURE__ */ e(b, { variant: "outlined ", className: "w-[40%]", children: /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e(
592
- n,
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__ */ e(
627
+ children: /* @__PURE__ */ a(
599
628
  j,
600
629
  {
601
630
  name: "canSelfManage",
602
- control: o,
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__ */ e("div", { className: "flex items-center gap-6", children: /* @__PURE__ */ e(
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__ */ e(
616
- n,
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((a) => /* @__PURE__ */ e(
650
+ z == null ? void 0 : z.map((e) => /* @__PURE__ */ a(
622
651
  j,
623
652
  {
624
- control: o,
625
- name: a.value,
626
- label: a.label,
653
+ control: i,
654
+ name: e.value,
655
+ label: e.label,
627
656
  isFullWidth: !1,
628
- "data-testid": `managerole-mandatory-field-${a.value}`
657
+ "data-testid": `managerole-mandatory-field-${e.value}`
629
658
  },
630
- a.value
659
+ e.value
631
660
  )),
632
- re === !0 && /* @__PURE__ */ e(
661
+ re === !0 && /* @__PURE__ */ a(
633
662
  j,
634
663
  {
635
664
  name: "isBankDetailsMandatory",
636
- control: o,
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__ */ e(
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__ */ e(
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: g.bool,
689
- role: g.object,
690
- onClose: g.func,
691
- open: g.bool,
692
- setOpen: g.func,
693
- selectedId: g.string,
694
- isRoleListModified: g.bool
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-ByqBmjuc-CApL3DJy.js.map
728
+ //# sourceMappingURL=ManageRole-BjIIXAlK-DY39p0FD.js.map