@argusoft/medplat-core 1.0.19 → 1.0.21

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 (71) 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-CTVs_Gr9.js} +2 -2
  6. package/dist/{AddFeatures-CE5rBxEG.js.map → AddFeatures-CTVs_Gr9.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/{ChangePasswordModalCore-50EzprTk.js → ChangePasswordModalCore-DotONnMz.js} +459 -458
  10. package/dist/{ChangePasswordModalCore-50EzprTk.js.map → ChangePasswordModalCore-DotONnMz.js.map} +1 -1
  11. package/dist/{ConditionConfig-D2hOAa4n.js → ConditionConfig-C3rF2wXU.js} +2 -2
  12. package/dist/{ConditionConfig-D2hOAa4n.js.map → ConditionConfig-C3rF2wXU.js.map} +1 -1
  13. package/dist/{EventConfigurations-D8juDb29.js → EventConfigurations-BGffjVC7.js} +3 -3
  14. package/dist/{EventConfigurations-D8juDb29.js.map → EventConfigurations-BGffjVC7.js.map} +1 -1
  15. package/dist/{EventsExceptionModal-DsvngLi8.js → EventsExceptionModal-D4Bf1ilS.js} +2 -2
  16. package/dist/{EventsExceptionModal-DsvngLi8.js.map → EventsExceptionModal-D4Bf1ilS.js.map} +1 -1
  17. package/dist/EventsSkeleton-8iiETGcf.js +76 -0
  18. package/dist/EventsSkeleton-8iiETGcf.js.map +1 -0
  19. package/dist/{FeatureMenu-CLX8VNZ-.js → FeatureMenu-DUZL32RI.js} +3 -3
  20. package/dist/{FeatureMenu-CLX8VNZ-.js.map → FeatureMenu-DUZL32RI.js.map} +1 -1
  21. package/dist/Features-CObdzJp_.js +13 -0
  22. package/dist/Features-CObdzJp_.js.map +1 -0
  23. package/dist/{ImmunizationConfigurationBase-C5wnjI_-.js → ImmunizationConfigurationBase-CUQGVlhB.js} +741 -731
  24. package/dist/ImmunizationConfigurationBase-CUQGVlhB.js.map +1 -0
  25. package/dist/ImmunizationConfigurationBase.css +1 -1
  26. package/dist/{ManageDynamicFeature-i6ARKe36.js → ManageDynamicFeature-BhONvfC_.js} +2 -2
  27. package/dist/{ManageDynamicFeature-i6ARKe36.js.map → ManageDynamicFeature-BhONvfC_.js.map} +1 -1
  28. package/dist/{ManageEventConfiguration-CHugu2vQ.js → ManageEventConfiguration-BntUc_YI.js} +5 -5
  29. package/dist/{ManageEventConfiguration-CHugu2vQ.js.map → ManageEventConfiguration-BntUc_YI.js.map} +1 -1
  30. package/dist/{ManageNotification-BUAvg5Ge.js → ManageNotification-CSl02Wq7.js} +2 -2
  31. package/dist/{ManageNotification-BUAvg5Ge.js.map → ManageNotification-CSl02Wq7.js.map} +1 -1
  32. package/dist/{ManageRole-Cbs9dUhc.js → ManageRole-CZAk-IlM.js} +222 -229
  33. package/dist/ManageRole-CZAk-IlM.js.map +1 -0
  34. package/dist/{ManageUser-C6dlK-Mr.js → ManageUser-Ca1BsI1u.js} +2 -2
  35. package/dist/{ManageUser-C6dlK-Mr.js.map → ManageUser-Ca1BsI1u.js.map} +1 -1
  36. package/dist/{MobileTypeEventConfigModal-2w0WQ3WY.js → MobileTypeEventConfigModal-BNjZ8pnq.js} +2 -2
  37. package/dist/{MobileTypeEventConfigModal-2w0WQ3WY.js.map → MobileTypeEventConfigModal-BNjZ8pnq.js.map} +1 -1
  38. package/dist/{NotificationList-CUZSWp2J.js → NotificationList-D1U1LYnz.js} +140 -139
  39. package/dist/NotificationList-D1U1LYnz.js.map +1 -0
  40. package/dist/{OtherTypeEventConfigModal-D1p8M39y.js → OtherTypeEventConfigModal-DiVhWDpG.js} +2 -2
  41. package/dist/{OtherTypeEventConfigModal-D1p8M39y.js.map → OtherTypeEventConfigModal-DiVhWDpG.js.map} +1 -1
  42. package/dist/{QueryBuilder-DXexUIe8.js → QueryBuilder-DI0wCJbz.js} +85 -84
  43. package/dist/QueryBuilder-DI0wCJbz.js.map +1 -0
  44. package/dist/{RoleManagement-BThAL5LO.js → RoleManagement-B9WgZGEj.js} +182 -168
  45. package/dist/RoleManagement-B9WgZGEj.js.map +1 -0
  46. package/dist/{ShowFlywayQuery-BkyA6QaA.js → ShowFlywayQuery-tj42YQAS.js} +33 -33
  47. package/dist/ShowFlywayQuery-tj42YQAS.js.map +1 -0
  48. package/dist/{SubMenu-BGznOP2a.js → SubMenu-CM_4wNCR.js} +2 -2
  49. package/dist/{SubMenu-BGznOP2a.js.map → SubMenu-CM_4wNCR.js.map} +1 -1
  50. package/dist/{TypeConfiguration-D-3xNcyd.js → TypeConfiguration-CupQxH9Y.js} +28 -28
  51. package/dist/TypeConfiguration-CupQxH9Y.js.map +1 -0
  52. package/dist/{UserList-D7GL7jvO.js → UserList-BzHsbYel.js} +186 -185
  53. package/dist/UserList-BzHsbYel.js.map +1 -0
  54. package/dist/{WidgetList-B3Sm9weK.js → WidgetList-B7X8Awkg.js} +2 -2
  55. package/dist/{WidgetList-B3Sm9weK.js.map → WidgetList-B7X8Awkg.js.map} +1 -1
  56. package/dist/index.js +10 -10
  57. package/package.json +1 -1
  58. package/dist/AddEditQueryBuilder-Bcjl5mXE.js.map +0 -1
  59. package/dist/AddRoleDrawer-Bc655LQU.js.map +0 -1
  60. package/dist/EventsSkeleton-DCXwwPbb.js +0 -76
  61. package/dist/EventsSkeleton-DCXwwPbb.js.map +0 -1
  62. package/dist/Features-Cpf1PDx0.js +0 -13
  63. package/dist/Features-Cpf1PDx0.js.map +0 -1
  64. package/dist/ImmunizationConfigurationBase-C5wnjI_-.js.map +0 -1
  65. package/dist/ManageRole-Cbs9dUhc.js.map +0 -1
  66. package/dist/NotificationList-CUZSWp2J.js.map +0 -1
  67. package/dist/QueryBuilder-DXexUIe8.js.map +0 -1
  68. package/dist/RoleManagement-BThAL5LO.js.map +0 -1
  69. package/dist/ShowFlywayQuery-BkyA6QaA.js.map +0 -1
  70. package/dist/TypeConfiguration-D-3xNcyd.js.map +0 -1
  71. package/dist/UserList-D7GL7jvO.js.map +0 -1
@@ -1,34 +1,36 @@
1
- import { jsxs as r, jsx as t, Fragment as L } from "react/jsx-runtime";
2
- import u from "@/common/services/util/GeneralUtil";
3
- import { useState as m, useEffect as ce, Suspense as H, lazy as Q } from "react";
4
- import { Box as p, Card as T, Typography as d, Button as C, TextField as K, Switch as de, Chip as $ } from "@mui/material";
1
+ import { jsxs as l, jsx as t, Fragment as R } from "react/jsx-runtime";
2
+ import g from "@/common/services/util/GeneralUtil";
3
+ import { useState as d, useEffect as ue, Suspense as K, lazy as Z } from "react";
4
+ import fe from "@/views/custom-components/CustomConfirmationModal";
5
+ import { Box as p, Card as C, Typography as m, Button as T, TextField as X, Switch as pe, Chip as _ } from "@mui/material";
5
6
  import { alpha as S } from "@mui/material/styles";
6
- import { useTranslateProvider as me } from "@/common/languageTranslator/TranslationContext";
7
- import { api as h } from "@/common/interceptors/AxiosInterceptor";
8
- import { getRoleList as _ } from "@/common/services/GlobalApis.js";
9
- import { getAssignedFeatures as ue } from "@/utils/feature.js";
7
+ import { useTranslateProvider as he } from "@/common/languageTranslator/TranslationContext";
8
+ import O from "@/common/config/implementationConfig";
9
+ import { api as f } from "@/common/interceptors/AxiosInterceptor";
10
+ import { getRoleList as z } from "@/common/services/GlobalApis.js";
11
+ import { getAssignedFeatures as ge } from "@/utils/feature.js";
10
12
  import { showToast as x } from "@/common/toaster/toaster";
11
- import { FontAwesomeIcon as fe } from "@fortawesome/react-fontawesome";
12
- import { faTrash as he } from "@fortawesome/free-solid-svg-icons";
13
- import pe from "@/hooks/useTrackEvent";
14
- import z from "prop-types";
15
- import { useSelector as X } from "react-redux";
16
- import { getUseSkeleton as ge } from "@/store/reducers/SkeletonReducer";
17
- const j = () => h.get("/role"), xe = (l) => h.delete(u.isTecho ? `/menuconfig/usermenuitem/delete?empMenuItemId=${l}` : `/menuconfig/usermenuitem/${l}`), ve = (l) => h.get(u.isTecho ? `/role/retrieveById?id=${l}` : `/role/${l}`), Oe = (l) => h.post("/role", { ...l }), Be = (l) => u.isTecho ? h.put("/role/update", { ...l }) : h.post("/role", { ...l }), be = (l) => h.put(`role/?is_active=${l.state === "INACTIVE" ? "true" : "false"}`, {
18
- ...l
19
- }), De = (l, n) => h.post(`/menuconfig/assignnewfeature?roleId=${n}`, { ...l }), Z = ({ children: l, isLoading: n = !0 }) => !X(ge) || !n ? l : /* @__PURE__ */ r("div", { className: "pt-6 relative h-[90vh]", children: [
20
- /* @__PURE__ */ r("div", { className: "flex flex-row h-[80vh] ", children: [
21
- /* @__PURE__ */ r("div", { className: "flex flex-col border border-gray-300 w-[20%] p-2 mr-3 rounded-md", children: [
13
+ import { FontAwesomeIcon as xe } from "@fortawesome/react-fontawesome";
14
+ import { faTrash as ve } from "@fortawesome/free-solid-svg-icons";
15
+ import ye from "@/hooks/useTrackEvent";
16
+ import j from "prop-types";
17
+ import { useSelector as ee } from "react-redux";
18
+ import { getUseSkeleton as be } from "@/store/reducers/SkeletonReducer";
19
+ const V = () => f.get("/role"), we = (o) => f.delete(O.api.useQueryParamStyle ? `/menuconfig/usermenuitem/delete?empMenuItemId=${o}` : `/menuconfig/usermenuitem/${o}`), Ne = (o) => f.get(O.api.useQueryParamStyle ? `/role/retrieveById?id=${o}` : `/role/${o}`), Ye = (o) => f.post("/role", { ...o }), Qe = (o) => O.api.useQueryParamStyle ? f.put("/role/update", { ...o }) : f.post("/role", { ...o }), Ie = (o) => f.put(`role/?is_active=${o.state === "INACTIVE" ? "true" : "false"}`, {
20
+ ...o
21
+ }), Je = (o, n) => f.post(`/menuconfig/assignnewfeature?roleId=${n}`, { ...o }), te = ({ children: o, isLoading: n = !0 }) => !ee(be) || !n ? o : /* @__PURE__ */ l("div", { className: "pt-6 relative h-[90vh]", children: [
22
+ /* @__PURE__ */ l("div", { className: "flex flex-row h-[80vh] ", children: [
23
+ /* @__PURE__ */ l("div", { className: "flex flex-col border border-gray-300 w-[20%] p-2 mr-3 rounded-md", children: [
22
24
  " ",
23
- /* @__PURE__ */ r("div", { className: "flex justify-between", children: [
25
+ /* @__PURE__ */ l("div", { className: "flex justify-between", children: [
24
26
  /* @__PURE__ */ t("div", { className: "bg-gray-300 animate-pulse rounded-sm w-23 h-[40px] mr-3" }),
25
27
  /* @__PURE__ */ t("div", { className: "bg-gray-300 animate-pulse rounded-sm w-40 h-[40px]" })
26
28
  ] }),
27
29
  /* @__PURE__ */ t("div", { className: "bg-gray-300 animate-pulse rounded-sm mt-2 w-full h-[50px]" }),
28
30
  /* @__PURE__ */ t("div", { className: "bg-gray-300 animate-pulse rounded-sm mt-2 w-full h-full" })
29
31
  ] }),
30
- /* @__PURE__ */ r("div", { className: "flex flex-col border border-gray-300 w-[80%] p-2 rounded-md", children: [
31
- /* @__PURE__ */ r("div", { className: "flex justify-between", children: [
32
+ /* @__PURE__ */ l("div", { className: "flex flex-col border border-gray-300 w-[80%] p-2 rounded-md", children: [
33
+ /* @__PURE__ */ l("div", { className: "flex justify-between", children: [
32
34
  /* @__PURE__ */ t("div", { className: "bg-gray-300 animate-pulse rounded-sm w-24 h-[40px]" }),
33
35
  /* @__PURE__ */ t("div", { className: "bg-gray-300 animate-pulse rounded-sm w-21 h-[40px]" })
34
36
  ] }),
@@ -38,100 +40,101 @@ const j = () => h.get("/role"), xe = (l) => h.delete(u.isTecho ? `/menuconfig/us
38
40
  ] }),
39
41
  /* @__PURE__ */ t("div", { className: "absolute bottom-20 right-[10px] ", children: /* @__PURE__ */ t("div", { className: "bg-gray-300 animate-pulse rounded-full w-[40px] h-[40px]" }) })
40
42
  ] });
41
- Z.propTypes = {
42
- children: z.any,
43
- loading: z.any,
44
- isLoading: z.any
43
+ te.propTypes = {
44
+ children: j.any,
45
+ loading: j.any,
46
+ isLoading: j.any
45
47
  };
46
- const ye = Q(() => import("./AddFeatures-CE5rBxEG.js")), we = Q(() => import("./ManageRole-Cbs9dUhc.js"));
47
- function Ne() {
48
- var q;
49
- const { translate: l } = me(), [n, b] = m(""), [o, y] = m(n[0]), [A, ee] = m(!1), [V, f] = m(!1), [O, B] = m(!1), [F, D] = m(0), [U, k] = m(""), [w, W] = m(""), [c, te] = m({}), Y = pe(), P = X((e) => e.Authenticate.user.roleId), [E, ae] = m([]), N = async (e = !1) => {
50
- var a;
48
+ const Ce = Z(() => import("./AddFeatures-CTVs_Gr9.js")), Te = Z(() => import("./ManageRole-CZAk-IlM.js"));
49
+ function Se() {
50
+ var H;
51
+ const { translate: o } = he(), [n, y] = d(""), [a, b] = d(n[0]), [A, ae] = d(!1), [P, u] = d(!1), [B, D] = d(!1), [F, U] = d(0), [W, k] = d(""), [w, Y] = d(""), [c, re] = d({}), [se, E] = d(!1), Q = ye(), J = ee((e) => e.Authenticate.user.roleId), [M, le] = d([]), N = async (e = !1) => {
52
+ var r;
51
53
  try {
52
- f(!0);
53
- const s = A ? j() : _();
54
- let i, g = [];
55
- if (P) {
56
- const [{ data: v }, M] = await Promise.all([
54
+ u(!0);
55
+ const s = A ? V() : z();
56
+ let i, h = [];
57
+ if (J) {
58
+ const [{ data: v }, $] = await Promise.all([
57
59
  s,
58
- ve(P)
60
+ Ne(J)
59
61
  ]);
60
- i = v, g = ((a = M == null ? void 0 : M.data) == null ? void 0 : a.roleIds) || [];
62
+ i = v, h = ((r = $ == null ? void 0 : $.data) == null ? void 0 : r.roleIds) || [];
61
63
  } else {
62
64
  const { data: v } = await s;
63
65
  i = v;
64
66
  }
65
- ae(g);
66
- const R = g.length > 0 ? i.filter((v) => g.includes(v.id)) : i;
67
- b(R), !e && R.length > 0 && y(R[0]);
67
+ le(h);
68
+ const L = h.length > 0 ? i.filter((v) => h.includes(v.id)) : i;
69
+ y(L), !e && L.length > 0 && b(L[0]);
68
70
  } catch (s) {
69
71
  console.error(s), x({ message: "Error in getting role data", type: "error" });
70
72
  } finally {
71
- f(!1);
73
+ u(!1);
72
74
  }
73
75
  };
74
- ce(function() {
76
+ ue(function() {
75
77
  (async () => {
76
- const { data: a } = await ue("techo.manage.role");
77
- a && te(JSON.parse(a));
78
+ const { data: r } = await ge("techo.manage.role");
79
+ r && re(JSON.parse(r));
78
80
  })(), N();
79
81
  }, []);
80
- const se = async (e) => {
81
- let a = e.target.checked;
82
- ee(e.target.checked);
82
+ const oe = async (e) => {
83
+ let r = e.target.checked;
84
+ ae(e.target.checked);
83
85
  try {
84
- f((i) => !i);
86
+ u((i) => !i);
85
87
  let s;
86
- a ? { data: s } = await j() : { data: s } = await _(), E && E.length > 0 && (s = s.filter(
87
- (i) => E.includes(i.id)
88
- )), b(s), y(s[0]), f((i) => !i), k("");
88
+ r ? { data: s } = await V() : { data: s } = await z(), M && M.length > 0 && (s = s.filter(
89
+ (i) => M.includes(i.id)
90
+ )), y(s), b(s[0]), u((i) => !i), k("");
89
91
  } catch (s) {
90
- console.error(s), x({ message: "Error in getting role data", type: "error" }), f((i) => !i);
92
+ console.error(s), x({ message: "Error in getting role data", type: "error" }), u((i) => !i);
91
93
  }
92
- }, J = n ? n == null ? void 0 : n.filter(
93
- (e) => e.name.toLowerCase().includes(U.toLowerCase())
94
- ) : [], re = (e) => {
94
+ }, G = n ? n == null ? void 0 : n.filter(
95
+ (e) => e.name.toLowerCase().includes(W.toLowerCase())
96
+ ) : [], ne = (e) => {
95
97
  if (!e) return "";
96
- const a = new Date(Number(e)), s = String(a.getDate()).padStart(2, "0"), i = String(a.getMonth() + 1).padStart(2, "0"), g = a.getFullYear();
97
- return `${s}/${i}/${g}`;
98
- }, le = async () => {
98
+ const r = new Date(Number(e)), s = String(r.getDate()).padStart(2, "0"), i = String(r.getMonth() + 1).padStart(2, "0"), h = r.getFullYear();
99
+ return `${s}/${i}/${h}`;
100
+ }, ie = async () => {
101
+ E(!1);
99
102
  try {
100
- const e = n == null ? void 0 : n.find((s) => s.id === o.id);
101
- await be(e), x({
103
+ const e = n == null ? void 0 : n.find((s) => s.id === a.id);
104
+ await Ie(e), x({
102
105
  message: `State succesfully changed from ${(e == null ? void 0 : e.state) === "INACTIVE" ? "inactive" : "active"} to ${(e == null ? void 0 : e.state) === "INACTIVE" ? "active" : "inactive"}`,
103
106
  type: "success"
104
107
  });
105
- let a;
106
- f((s) => !s), A ? a = await j() : a = await _(), b(a.data), y(a.data[0]), f((s) => !s);
108
+ let r;
109
+ u((s) => !s), A ? r = await V() : r = await z(), y(r.data), b(r.data[0]), u((s) => !s);
107
110
  } catch (e) {
108
- console.error(e), x({ message: "Error in handle active", type: "error" }), f((a) => !a);
111
+ console.error(e), x({ message: "Error in handle active", type: "error" }), u((r) => !r);
109
112
  }
110
- }, I = n ? (q = n.find((e) => e.id === o.id)) == null ? void 0 : q.assignedFeatureList.filter(
113
+ }, I = n ? (H = n.find((e) => e.id === a.id)) == null ? void 0 : H.assignedFeatureList.filter(
111
114
  (e) => {
112
- var a;
113
- return (a = e.featureName) == null ? void 0 : a.toLowerCase().includes(w == null ? void 0 : w.toLowerCase());
115
+ var r;
116
+ return (r = e.featureName) == null ? void 0 : r.toLowerCase().includes(w == null ? void 0 : w.toLowerCase());
114
117
  }
115
- ).sort((e, a) => {
118
+ ).sort((e, r) => {
116
119
  var s;
117
- return (s = e.featureName) == null ? void 0 : s.localeCompare(a.featureName);
118
- }) : [], oe = async (e) => {
120
+ return (s = e.featureName) == null ? void 0 : s.localeCompare(r.featureName);
121
+ }) : [], ce = async (e) => {
119
122
  try {
120
- await xe(e.userMenuItemId), await N(!0), W(""), x({ message: "Feature deleted successfully!", type: "success" });
121
- } catch (a) {
122
- x({ message: a, type: "error" });
123
+ await we(e.userMenuItemId), await N(!0), Y(""), x({ message: "Feature deleted successfully!", type: "success" });
124
+ } catch (r) {
125
+ x({ message: r, type: "error" });
123
126
  }
124
- }, G = (e) => {
125
- D(e), Y("button_click", {
127
+ }, q = (e) => {
128
+ U(e), Q("button_click", {
126
129
  button_name: `${e === 1 ? "add" : "edit"} role modal button`,
127
130
  button_type: "navigate",
128
131
  button_id: `roles-${e === 1 ? "add" : "edit"}-button`
129
132
  });
130
- }, ne = () => {
133
+ }, de = () => {
131
134
  N(), k("");
132
- }, ie = async () => {
135
+ }, me = async () => {
133
136
  try {
134
- B(!0), await Y("button_click", {
137
+ D(!0), await Q("button_click", {
135
138
  button_name: "add feature button",
136
139
  button_type: "navigate",
137
140
  button_id: "roles-addfeatures-button-add"
@@ -140,22 +143,22 @@ function Ne() {
140
143
  console.error(e);
141
144
  }
142
145
  };
143
- return u.isTecho && !V && !(c != null && c["view.manage.role"]) ? /* @__PURE__ */ t(p, { className: "flex justify-center items-center w-full h-[80vh]", children: /* @__PURE__ */ t(
144
- T,
146
+ return g.isTecho && !P && !(c != null && c["view.manage.role"]) ? /* @__PURE__ */ t(p, { className: "flex justify-center items-center w-full h-[80vh]", children: /* @__PURE__ */ t(
147
+ C,
145
148
  {
146
149
  className: "h-80 w-150 flex justify-center items-center",
147
- children: /* @__PURE__ */ t(d, { variant: "h5", className: "text-customBlue", children: "You dont have permission to view Roles" })
150
+ children: /* @__PURE__ */ t(m, { variant: "h5", className: "text-customBlue", children: "You dont have permission to view Roles" })
148
151
  }
149
- ) }) : /* @__PURE__ */ t(Z, { isLoading: V, children: /* @__PURE__ */ r(p, { className: "flex flex-col gap-4 p-4 min-[900px]:flex-row min-[900px]:h-[calc(100vh-80px)]", children: [
150
- /* @__PURE__ */ r(
151
- T,
152
+ ) }) : /* @__PURE__ */ t(te, { isLoading: P, children: /* @__PURE__ */ l(p, { className: "flex flex-col gap-4 p-4 min-[900px]:flex-row min-[900px]:h-[calc(100vh-80px)]", children: [
153
+ /* @__PURE__ */ l(
154
+ C,
152
155
  {
153
156
  variant: "outlined",
154
157
  className: "w-full min-[900px]:w-[300px] flex flex-col p-4",
155
158
  children: [
156
- /* @__PURE__ */ r("div", { className: "flex justify-between items-center mb-3", children: [
159
+ /* @__PURE__ */ l("div", { className: "flex justify-between items-center mb-3", children: [
157
160
  /* @__PURE__ */ t(
158
- d,
161
+ m,
159
162
  {
160
163
  variant: "h6",
161
164
  fontWeight: 600,
@@ -163,58 +166,58 @@ function Ne() {
163
166
  children: "User Roles"
164
167
  }
165
168
  ),
166
- (!u.isTecho || (c == null ? void 0 : c["create.manage.role"])) && /* @__PURE__ */ t(
167
- C,
169
+ (!g.isTecho || (c == null ? void 0 : c["create.manage.role"])) && /* @__PURE__ */ t(
170
+ T,
168
171
  {
169
172
  size: "small",
170
173
  variant: "contained",
171
174
  color: "primary",
172
- onClick: () => G(1),
175
+ onClick: () => q(1),
173
176
  "data-testid": "managerole-add-button",
174
- children: l("+ Add Role")
177
+ children: o("+ Add Role")
175
178
  }
176
179
  )
177
180
  ] }),
178
181
  /* @__PURE__ */ t(
179
- K,
182
+ X,
180
183
  {
181
184
  size: "small",
182
185
  variant: "outlined",
183
186
  placeholder: "Search roles...",
184
187
  fullWidth: !0,
185
- value: U,
188
+ value: W,
186
189
  onChange: (e) => k(e.target.value),
187
190
  "data-testid": "listofroles-search-input"
188
191
  }
189
192
  ),
190
- /* @__PURE__ */ r("div", { className: "flex items-center gap-2 mt-3", children: [
193
+ /* @__PURE__ */ l("div", { className: "flex items-center gap-2 mt-3", children: [
191
194
  /* @__PURE__ */ t(
192
- de,
195
+ pe,
193
196
  {
194
197
  size: "small",
195
198
  checked: A,
196
- onChange: se
199
+ onChange: oe
197
200
  }
198
201
  ),
199
- /* @__PURE__ */ t(d, { variant: "body2", children: "Include Inactive" })
202
+ /* @__PURE__ */ t(m, { variant: "body2", children: "Include Inactive" })
200
203
  ] }),
201
- /* @__PURE__ */ t("div", { className: "flex-1 overflow-y-auto mt-4", children: J.length > 0 && /* @__PURE__ */ t(L, { children: J.map((e) => /* @__PURE__ */ r(
202
- T,
204
+ /* @__PURE__ */ t("div", { className: "flex-1 overflow-y-auto mt-4", children: G.length > 0 && /* @__PURE__ */ t(R, { children: G.map((e) => /* @__PURE__ */ l(
205
+ C,
203
206
  {
204
207
  variant: "outlined",
205
- onClick: () => y(e),
208
+ onClick: () => b(e),
206
209
  className: `p-3 cursor-pointer transition
207
- ${o.id === e.id ? "border-b-2" : "border-b-2 border-0"}`,
208
- sx: o.id === e.id ? {
209
- bgcolor: (a) => S(a.palette.primary.main, 0.08)
210
+ ${a.id === e.id ? "border-b-2" : "border-b-2 border-0"}`,
211
+ sx: a.id === e.id ? {
212
+ bgcolor: (r) => S(r.palette.primary.main, 0.08)
210
213
  } : {},
211
214
  children: [
212
- /* @__PURE__ */ r(d, { fontWeight: 600, children: [
215
+ /* @__PURE__ */ l(m, { fontWeight: 600, children: [
213
216
  e.name,
214
217
  "     ",
215
- (e == null ? void 0 : e.state) === "INACTIVE" && /* @__PURE__ */ t($, { label: "INACTIVE", color: "disabled", size: "small" })
218
+ (e == null ? void 0 : e.state) === "INACTIVE" && /* @__PURE__ */ t(_, { label: "INACTIVE", color: "disabled", size: "small" })
216
219
  ] }),
217
- /* @__PURE__ */ r(d, { variant: "body2", color: "text.secondary", children: [
220
+ /* @__PURE__ */ l(m, { variant: "body2", color: "text.secondary", children: [
218
221
  e.assignedFeatureList.length,
219
222
  " Features"
220
223
  ] })
@@ -225,88 +228,88 @@ function Ne() {
225
228
  ]
226
229
  }
227
230
  ),
228
- /* @__PURE__ */ r(
229
- T,
231
+ /* @__PURE__ */ l(
232
+ C,
230
233
  {
231
234
  variant: "outlined",
232
235
  className: "w-full min-[900px]:flex-1 flex flex-col p-5",
233
236
  children: [
234
- /* @__PURE__ */ r("div", { className: "flex flex-col sm:flex-row justify-between items-start border-b pb-4 gap-4", children: [
235
- /* @__PURE__ */ r("div", { className: "flex flex-col gap-1 w-full sm:w-auto", children: [
236
- /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
237
+ /* @__PURE__ */ l("div", { className: "flex flex-col sm:flex-row justify-between items-start border-b pb-4 gap-4", children: [
238
+ /* @__PURE__ */ l("div", { className: "flex flex-col gap-1 w-full sm:w-auto", children: [
239
+ /* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: [
237
240
  /* @__PURE__ */ t(
238
- d,
241
+ m,
239
242
  {
240
243
  variant: "h5",
241
244
  fontWeight: 600,
242
245
  className: "text-customBlue",
243
- children: (o == null ? void 0 : o.name) || "Select Role"
246
+ children: (a == null ? void 0 : a.name) || "Select Role"
244
247
  }
245
248
  ),
246
- (o == null ? void 0 : o.state) === "ACTIVE" && /* @__PURE__ */ t($, { label: "ACTIVE", color: "success", size: "small" }),
247
- (o == null ? void 0 : o.state) === "INACTIVE" && /* @__PURE__ */ t($, { label: "INACTIVE", color: "disabled", size: "small" })
249
+ (a == null ? void 0 : a.state) === "ACTIVE" && /* @__PURE__ */ t(_, { label: "ACTIVE", color: "success", size: "small" }),
250
+ (a == null ? void 0 : a.state) === "INACTIVE" && /* @__PURE__ */ t(_, { label: "INACTIVE", color: "disabled", size: "small" })
248
251
  ] }),
249
- /* @__PURE__ */ r(
250
- d,
252
+ /* @__PURE__ */ l(
253
+ m,
251
254
  {
252
255
  variant: "body2",
253
256
  color: "text.secondary",
254
257
  className: "mt-1",
255
258
  children: [
256
259
  "Created on ",
257
- re(o == null ? void 0 : o.createdOn)
260
+ ne(a == null ? void 0 : a.createdOn)
258
261
  ]
259
262
  }
260
263
  )
261
264
  ] }),
262
- /* @__PURE__ */ r("div", { className: "flex gap-2", children: [
263
- (!u.isTecho || (c == null ? void 0 : c["update.manage.role.toggleActive"])) && /* @__PURE__ */ t(
264
- C,
265
+ /* @__PURE__ */ l("div", { className: "flex gap-2", children: [
266
+ (!g.isTecho || (c == null ? void 0 : c["update.manage.role.toggleActive"])) && /* @__PURE__ */ t(
267
+ T,
265
268
  {
266
269
  variant: "outlined",
267
270
  size: "small",
268
- onClick: () => le(),
269
- children: (o == null ? void 0 : o.state) === "ACTIVE" ? "Deactivate" : "Activate"
271
+ onClick: () => E(!0),
272
+ children: (a == null ? void 0 : a.state) === "ACTIVE" ? "Deactivate" : "Activate"
270
273
  }
271
274
  ),
272
- (!u.isTecho || (c == null ? void 0 : c["update.manage.role"])) && /* @__PURE__ */ t(
273
- C,
275
+ (!g.isTecho || (c == null ? void 0 : c["update.manage.role"])) && /* @__PURE__ */ t(
276
+ T,
274
277
  {
275
278
  variant: "contained",
276
279
  size: "small",
277
- onClick: () => G(2),
280
+ onClick: () => q(2),
278
281
  children: "✏️ Edit Role"
279
282
  }
280
283
  )
281
284
  ] })
282
285
  ] }),
283
- /* @__PURE__ */ r("div", { className: "mt-5 flex flex-col flex-1 overflow-hidden", children: [
284
- /* @__PURE__ */ r("div", { className: "flex flex-col sm:flex-row justify-between items-start sm:items-center mb-4 gap-4", children: [
285
- /* @__PURE__ */ r("div", { className: "flex flex-row items-center gap-2 w-full sm:w-auto", children: [
286
- /* @__PURE__ */ t(d, { fontWeight: 600, children: l("Assigned Features") }),
287
- /* @__PURE__ */ r(d, { variant: "body2", color: "text.secondary", children: [
286
+ /* @__PURE__ */ l("div", { className: "mt-5 flex flex-col flex-1 overflow-hidden", children: [
287
+ /* @__PURE__ */ l("div", { className: "flex flex-col sm:flex-row justify-between items-start sm:items-center mb-4 gap-4", children: [
288
+ /* @__PURE__ */ l("div", { className: "flex flex-row items-center gap-2 w-full sm:w-auto", children: [
289
+ /* @__PURE__ */ t(m, { fontWeight: 600, children: o("Assigned Features") }),
290
+ /* @__PURE__ */ l(m, { variant: "body2", color: "text.secondary", children: [
288
291
  "(",
289
292
  I.length,
290
293
  " ",
291
- l("features active for this role"),
294
+ o("features active for this role"),
292
295
  ")"
293
296
  ] })
294
297
  ] }),
295
298
  /* @__PURE__ */ t(
296
- K,
299
+ X,
297
300
  {
298
301
  size: "small",
299
302
  sx: { width: { xs: "100%", sm: "60%" } },
300
303
  placeholder: "Search Feature Name",
301
304
  variant: "outlined",
302
305
  value: w,
303
- onChange: (e) => W(e.target.value),
306
+ onChange: (e) => Y(e.target.value),
304
307
  "data-testid": "assignedfeatures-search-input"
305
308
  }
306
309
  )
307
310
  ] }),
308
- /* @__PURE__ */ r(p, { className: "overflow-x-auto w-full", children: [
309
- /* @__PURE__ */ r(
311
+ /* @__PURE__ */ l(p, { className: "overflow-x-auto w-full", children: [
312
+ /* @__PURE__ */ l(
310
313
  p,
311
314
  {
312
315
  className: "grid grid-cols-[minmax(340px,1.5fr)_120px] px-4 py-2 text-[15px] font-semibold border-b min-w-[500px]",
@@ -315,12 +318,12 @@ function Ne() {
315
318
  bgcolor: (e) => S(e.palette.action.hover, 0.04)
316
319
  },
317
320
  children: [
318
- /* @__PURE__ */ t("div", { children: l("FEATURE NAME") }),
319
- /* @__PURE__ */ t("div", { className: "text-center", children: l("ACTIONS") })
321
+ /* @__PURE__ */ t("div", { children: o("FEATURE NAME") }),
322
+ /* @__PURE__ */ t("div", { className: "text-center", children: o("ACTIONS") })
320
323
  ]
321
324
  }
322
325
  ),
323
- /* @__PURE__ */ r(
326
+ /* @__PURE__ */ l(
324
327
  p,
325
328
  {
326
329
  className: "h-[calc(100vh-440px)] overflow-y-auto min-w-[500px]",
@@ -328,7 +331,7 @@ function Ne() {
328
331
  bgcolor: "background.paper"
329
332
  },
330
333
  children: [
331
- I.length > 0 && /* @__PURE__ */ t(L, { children: I.map((e, a) => /* @__PURE__ */ r(
334
+ I.length > 0 && /* @__PURE__ */ t(R, { children: I.map((e, r) => /* @__PURE__ */ l(
332
335
  p,
333
336
  {
334
337
  className: "grid grid-cols-[minmax(340px,1.5fr)_120px] px-4 py-3 items-center border-b last:border-b-0 transition",
@@ -338,25 +341,25 @@ function Ne() {
338
341
  }
339
342
  },
340
343
  children: [
341
- /* @__PURE__ */ t("div", { className: "flex flex-col", children: /* @__PURE__ */ t(d, { sx: { fontSize: "13px", fontWeight: 600 }, children: e.featureName }) }),
342
- /* @__PURE__ */ t("div", { className: "flex justify-center", children: (!u.isTecho || (c == null ? void 0 : c["view.manage.role.unassignFeature"])) && /* @__PURE__ */ t(
343
- fe,
344
+ /* @__PURE__ */ t("div", { className: "flex flex-col", children: /* @__PURE__ */ t(m, { sx: { fontSize: "13px", fontWeight: 600 }, children: e.featureName }) }),
345
+ /* @__PURE__ */ t("div", { className: "flex justify-center", children: (!g.isTecho || (c == null ? void 0 : c["view.manage.role.unassignFeature"])) && /* @__PURE__ */ t(
346
+ xe,
344
347
  {
345
- icon: he,
348
+ icon: ve,
346
349
  onClick: () => {
347
- oe(e);
350
+ ce(e);
348
351
  },
349
352
  color: "error",
350
353
  className: "text-red-400 cursor-pointer",
351
- "data-testid": `assignedfeatures-delete-icon-${a}`
354
+ "data-testid": `assignedfeatures-delete-icon-${r}`
352
355
  }
353
356
  ) })
354
357
  ]
355
358
  },
356
359
  e.id
357
360
  )) }),
358
- I.length === 0 && /* @__PURE__ */ t(L, { children: /* @__PURE__ */ t(
359
- d,
361
+ I.length === 0 && /* @__PURE__ */ t(R, { children: /* @__PURE__ */ t(
362
+ m,
360
363
  {
361
364
  className: "p-4",
362
365
  sx: { fontSize: "13px", fontStyle: "italic" },
@@ -375,48 +378,59 @@ function Ne() {
375
378
  sx: {
376
379
  bgcolor: (e) => S(e.palette.primary.main, 0.06)
377
380
  },
378
- children: (!u.isTecho || (c == null ? void 0 : c["view.manage.role.assignFeature"])) && /* @__PURE__ */ t(C, { variant: "outlined", size: "small", onClick: ie, children: "+ Add More Features" })
381
+ children: (!g.isTecho || (c == null ? void 0 : c["view.manage.role.assignFeature"])) && /* @__PURE__ */ t(T, { variant: "outlined", size: "small", onClick: me, children: "+ Add More Features" })
379
382
  }
380
383
  )
381
384
  ]
382
385
  }
383
386
  ),
384
- /* @__PURE__ */ t(H, { children: /* @__PURE__ */ t(
385
- we,
387
+ /* @__PURE__ */ t(
388
+ fe,
389
+ {
390
+ open: se,
391
+ handleClose: () => E(!1),
392
+ handleClick: ie,
393
+ title: (a == null ? void 0 : a.state) === "ACTIVE" ? "Deactivate Role" : "Activate Role",
394
+ description: `Are you sure you want to ${(a == null ? void 0 : a.state) === "ACTIVE" ? "deactivate" : "activate"} the role "${a == null ? void 0 : a.name}"?`,
395
+ dataTestId: "toggle-role-confirm-modal"
396
+ }
397
+ ),
398
+ /* @__PURE__ */ t(K, { children: /* @__PURE__ */ t(
399
+ Te,
386
400
  {
387
401
  isUpdate: F !== 1,
388
- selectedId: F === 2 ? o.id : null,
402
+ selectedId: F === 2 ? a.id : null,
389
403
  "data-testid": "roles-managerole-add-button",
390
404
  open: F,
391
- setOpen: D,
392
- isRoleListModified: ne
405
+ setOpen: U,
406
+ isRoleListModified: de
393
407
  }
394
408
  ) }),
395
- /* @__PURE__ */ t(H, { fallback: /* @__PURE__ */ t("div", { className: "animate-pulse w-80 h-20 " }), children: O === !0 && /* @__PURE__ */ t(
396
- ye,
409
+ /* @__PURE__ */ t(K, { fallback: /* @__PURE__ */ t("div", { className: "animate-pulse w-80 h-20 " }), children: B === !0 && /* @__PURE__ */ t(
410
+ Ce,
397
411
  {
398
- open: O,
399
- setOpenModal: B,
400
- selectedId: o.id,
412
+ open: B,
413
+ setOpenModal: D,
414
+ selectedId: a.id,
401
415
  setData: () => N(!0),
402
416
  assignedFeatureList: n ? (() => {
403
- var e, a, s;
404
- return (e = n == null ? void 0 : n.find((i) => (i == null ? void 0 : i.id) === o.id)) != null && e.assignedFeatureList ? (a = n == null ? void 0 : n.find((i) => (i == null ? void 0 : i.id) === o.id)) == null ? void 0 : a.assignedFeatureList : (s = n[0]) == null ? void 0 : s.assignedFeatureList;
417
+ var e, r, s;
418
+ return (e = n == null ? void 0 : n.find((i) => (i == null ? void 0 : i.id) === a.id)) != null && e.assignedFeatureList ? (r = n == null ? void 0 : n.find((i) => (i == null ? void 0 : i.id) === a.id)) == null ? void 0 : r.assignedFeatureList : (s = n[0]) == null ? void 0 : s.assignedFeatureList;
405
419
  })() : [],
406
420
  "data-testid": "roles-addfeatures-component"
407
421
  }
408
422
  ) })
409
423
  ] }) });
410
424
  }
411
- const Ue = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
425
+ const Ge = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
412
426
  __proto__: null,
413
- default: Ne
427
+ default: Se
414
428
  }, Symbol.toStringTag, { value: "Module" }));
415
429
  export {
416
- Ue as R,
417
- Be as a,
418
- Oe as b,
419
- ve as g,
420
- De as p
430
+ Ge as R,
431
+ Qe as a,
432
+ Ye as b,
433
+ Ne as g,
434
+ Je as p
421
435
  };
422
- //# sourceMappingURL=RoleManagement-BThAL5LO.js.map
436
+ //# sourceMappingURL=RoleManagement-B9WgZGEj.js.map