@argusoft/medplat-core 1.0.28 → 1.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AccessRights-Zm8Obm4N.js +1284 -0
- package/dist/AccessRights-Zm8Obm4N.js.map +1 -0
- package/dist/{AddFeatures-C0Z29oSd.js → AddFeatures-v3TmGQee.js} +2 -2
- package/dist/{AddFeatures-C0Z29oSd.js.map → AddFeatures-v3TmGQee.js.map} +1 -1
- package/dist/AddMenuConfiguration-Ce91MhnU.js +8547 -0
- package/dist/AddMenuConfiguration-Ce91MhnU.js.map +1 -0
- package/dist/{AddRoleDrawer-CQdzQZLb.js → AddRoleDrawer-0gqAK8N0.js} +62 -63
- package/dist/AddRoleDrawer-0gqAK8N0.js.map +1 -0
- package/dist/{ChangePasswordModalCore-CDxkeIIM.js → ChangePasswordModalCore-DutQAZOx.js} +2 -2
- package/dist/{ChangePasswordModalCore-CDxkeIIM.js.map → ChangePasswordModalCore-DutQAZOx.js.map} +1 -1
- package/dist/{ConditionConfig-DSsgGEXS.js → ConditionConfig-B4Ffpgj3.js} +2 -2
- package/dist/ConditionConfig-B4Ffpgj3.js.map +1 -0
- package/dist/{EntityManagement-GaYsBTvf.js → EntityManagement-CPQL6qBj.js} +2 -2
- package/dist/{EntityManagement-GaYsBTvf.js.map → EntityManagement-CPQL6qBj.js.map} +1 -1
- package/dist/{EventConfigurations-kNtAj_WM.js → EventConfigurations-BJcURufo.js} +3 -3
- package/dist/{EventConfigurations-kNtAj_WM.js.map → EventConfigurations-BJcURufo.js.map} +1 -1
- package/dist/{EventsExceptionModal-D4Bf1ilS.js → EventsExceptionModal-BlZtBQoR.js} +2 -2
- package/dist/{EventsExceptionModal-D4Bf1ilS.js.map → EventsExceptionModal-BlZtBQoR.js.map} +1 -1
- package/dist/{EventsSkeleton-8iiETGcf.js → EventsSkeleton-DK6JDKAK.js} +26 -19
- package/dist/EventsSkeleton-DK6JDKAK.js.map +1 -0
- package/dist/{FeatureMenu-jl7-Tk6y.js → FeatureMenu-C3503UIX.js} +3 -3
- package/dist/{FeatureMenu-jl7-Tk6y.js.map → FeatureMenu-C3503UIX.js.map} +1 -1
- package/dist/Features-Dne21RWu.js +14 -0
- package/dist/Features-Dne21RWu.js.map +1 -0
- package/dist/{ManageNotification-CaBAOhji.js → Google-DQxMfbaL.js} +1725 -2652
- package/dist/{ManageNotification-CaBAOhji.js.map → Google-DQxMfbaL.js.map} +1 -1
- package/dist/ImmunizationConfigurationBase-DLQVSNnt.js +5895 -0
- package/dist/ImmunizationConfigurationBase-DLQVSNnt.js.map +1 -0
- package/dist/ImmunizationConfigurationBase.css +1 -1
- package/dist/{ManageDynamicFeature-BhONvfC_.js → ManageDynamicFeature-dt096fyj.js} +2 -2
- package/dist/{ManageDynamicFeature-BhONvfC_.js.map → ManageDynamicFeature-dt096fyj.js.map} +1 -1
- package/dist/{ManageEventConfiguration-DV3I5POA.js → ManageEventConfiguration-BpSJszSX.js} +5 -5
- package/dist/{ManageEventConfiguration-DV3I5POA.js.map → ManageEventConfiguration-BpSJszSX.js.map} +1 -1
- package/dist/ManageNotification-CfhHlfxA.js +934 -0
- package/dist/ManageNotification-CfhHlfxA.js.map +1 -0
- package/dist/{ManageRole-CGYfglpo.js → ManageRole-4Y2PP4dQ.js} +32 -30
- package/dist/ManageRole-4Y2PP4dQ.js.map +1 -0
- package/dist/{ManageUser-AY1EUDLI.js → ManageUser-DDzyd9jm.js} +1728 -1592
- package/dist/ManageUser-DDzyd9jm.js.map +1 -0
- package/dist/MobileMenuManagement-Cf8IZlla.js +108 -0
- package/dist/MobileMenuManagement-Cf8IZlla.js.map +1 -0
- package/dist/{MobileTypeEventConfigModal-BxLympIO.js → MobileTypeEventConfigModal-DUkUYACe.js} +2 -2
- package/dist/MobileTypeEventConfigModal-DUkUYACe.js.map +1 -0
- package/dist/{NotificationList-C3Vb_jKU.js → NotificationList-BMFpNUJG.js} +109 -110
- package/dist/NotificationList-BMFpNUJG.js.map +1 -0
- package/dist/{OtherTypeEventConfigModal-BeG1GrUi.js → OtherTypeEventConfigModal-CYBfr2XE.js} +570 -478
- package/dist/OtherTypeEventConfigModal-CYBfr2XE.js.map +1 -0
- package/dist/{RoleManagement-BPl2cE27.js → RoleManagement-DEiBNfT8.js} +100 -101
- package/dist/RoleManagement-DEiBNfT8.js.map +1 -0
- package/dist/{ServerSyncModal-D_oFpv3C.js → ServerSyncModal-92U3xtqI.js} +84 -85
- package/dist/ServerSyncModal-92U3xtqI.js.map +1 -0
- package/dist/{SubMenu-DYxAPH2Z.js → SubMenu-B072oEGb.js} +3 -3
- package/dist/{SubMenu-DYxAPH2Z.js.map → SubMenu-B072oEGb.js.map} +1 -1
- package/dist/{TableDetails-Cf_YfnY2.js → TableDetails-BtafRxXb.js} +1069 -831
- package/dist/TableDetails-BtafRxXb.js.map +1 -0
- package/dist/{TableList-D6jnIbnz.js → TableList-Dpo6dO7S.js} +2 -2
- package/dist/{TableList-D6jnIbnz.js.map → TableList-Dpo6dO7S.js.map} +1 -1
- package/dist/{TypeConfiguration-37wp-gsl.js → TypeConfiguration-C3xoP2Nb.js} +2 -2
- package/dist/{TypeConfiguration-37wp-gsl.js.map → TypeConfiguration-C3xoP2Nb.js.map} +1 -1
- package/dist/{WidgetList-Dw_FmbbE.js → WidgetList-D7YuWfDD.js} +2 -2
- package/dist/{WidgetList-Dw_FmbbE.js.map → WidgetList-D7YuWfDD.js.map} +1 -1
- package/dist/dashboardLayoutUtils-D1xCAxp3.js +405 -0
- package/dist/dashboardLayoutUtils-D1xCAxp3.js.map +1 -0
- package/dist/index.js +4 -752
- package/dist/index.js.map +1 -1
- package/dist/index.lib-C3fwoM3y.js +820 -0
- package/dist/index.lib-C3fwoM3y.js.map +1 -0
- package/package.json +2 -2
- package/dist/AccessRights-CHu27ZOw.js +0 -1262
- package/dist/AccessRights-CHu27ZOw.js.map +0 -1
- package/dist/AddMenuConfiguration-BSQLl88V.js +0 -6570
- package/dist/AddMenuConfiguration-BSQLl88V.js.map +0 -1
- package/dist/AddRoleDrawer-CQdzQZLb.js.map +0 -1
- package/dist/ConditionConfig-DSsgGEXS.js.map +0 -1
- package/dist/EventsSkeleton-8iiETGcf.js.map +0 -1
- package/dist/Features-CObdzJp_.js +0 -13
- package/dist/Features-CObdzJp_.js.map +0 -1
- package/dist/ImmunizationConfigurationBase-DZGqwda2.js +0 -5910
- package/dist/ImmunizationConfigurationBase-DZGqwda2.js.map +0 -1
- package/dist/ManageRole-CGYfglpo.js.map +0 -1
- package/dist/ManageUser-AY1EUDLI.js.map +0 -1
- package/dist/MobileMenuManagement-CVAKyKDa.js +0 -112
- package/dist/MobileMenuManagement-CVAKyKDa.js.map +0 -1
- package/dist/MobileTypeEventConfigModal-BxLympIO.js.map +0 -1
- package/dist/NotificationList-C3Vb_jKU.js.map +0 -1
- package/dist/OtherTypeEventConfigModal-BeG1GrUi.js.map +0 -1
- package/dist/RoleManagement-BPl2cE27.js.map +0 -1
- package/dist/ServerSyncModal-D_oFpv3C.js.map +0 -1
- package/dist/TableDetails-Cf_YfnY2.js.map +0 -1
- package/dist/dashboardLayoutUtils-Bt5HA96J.js +0 -265
- package/dist/dashboardLayoutUtils-Bt5HA96J.js.map +0 -1
|
@@ -1,1262 +0,0 @@
|
|
|
1
|
-
import { jsx as s, jsxs as f, Fragment as Je } from "react/jsx-runtime";
|
|
2
|
-
import { Modal as je, Box as re, Card as Ue, Typography as H, IconButton as Se, Button as Ne, Autocomplete as xt, TextField as $e, debounce as gt, ListItem as Ee, FormControlLabel as Te, Checkbox as _e, Tooltip as Ae, Menu as Nt, MenuItem as St } from "@mui/material";
|
|
3
|
-
import k from "@mui/material/Grid2";
|
|
4
|
-
import l from "prop-types";
|
|
5
|
-
import It from "@/views/custom-components/CustomConfirmationModal";
|
|
6
|
-
import { useState as m, useEffect as ae, createElement as Pe, useRef as Le, useCallback as wt } from "react";
|
|
7
|
-
import { useTheme as vt } from "@mui/material/styles";
|
|
8
|
-
import { a as ee, d as bt, b as xe, c as Dt, p as Ct } from "./Features-CObdzJp_.js";
|
|
9
|
-
import { execute as te, getRoleList as kt } from "@/common/services/GlobalApis.js";
|
|
10
|
-
import "@/assets/scss/scrollBar.scss";
|
|
11
|
-
import { useForm as Ie, Controller as Ot } from "react-hook-form";
|
|
12
|
-
import { showToast as T } from "@/common/toaster/toaster";
|
|
13
|
-
import Jt from "@/hooks/useTrackEvent";
|
|
14
|
-
import { useTranslateProvider as ze } from "@/common/languageTranslator/TranslationContext";
|
|
15
|
-
import { FontAwesomeIcon as B } from "@fortawesome/react-fontawesome";
|
|
16
|
-
import { faXmark as Be, faCheck as Et, faArrowRight as Tt, faTrash as _t, faPen as At, faAngleDown as Pt, faEyeSlash as Re, faEye as Fe } from "@fortawesome/free-solid-svg-icons";
|
|
17
|
-
import { yupResolver as Lt } from "@hookform/resolvers/yup";
|
|
18
|
-
import * as V from "yup";
|
|
19
|
-
import ge from "@/views/custom-components/CustomCheckBox";
|
|
20
|
-
import Me from "@/views/custom-components/CustomDatePicker";
|
|
21
|
-
import { execute as Rt } from "@/common/services/GlobalApis";
|
|
22
|
-
import Ft from "@/views/custom-components/CustomAutoComplete";
|
|
23
|
-
import ne from "@/common/services/util/GeneralUtil";
|
|
24
|
-
import Mt from "@mui/material/Accordion";
|
|
25
|
-
import jt from "@mui/material/AccordionDetails";
|
|
26
|
-
import Ut from "@mui/material/AccordionSummary";
|
|
27
|
-
import { useSelector as $t } from "react-redux";
|
|
28
|
-
import { getUseSkeleton as zt } from "@/store/reducers/SkeletonReducer";
|
|
29
|
-
const Bt = V.object().shape({
|
|
30
|
-
noStartDate: V.boolean().default(!0),
|
|
31
|
-
noEndDate: V.boolean().default(!0),
|
|
32
|
-
startDate: V.date().nullable().when("noStartDate", {
|
|
33
|
-
is: !1,
|
|
34
|
-
then: (r) => r.required("Start date is required")
|
|
35
|
-
}),
|
|
36
|
-
endDate: V.date().nullable().when("noEndDate", {
|
|
37
|
-
is: !1,
|
|
38
|
-
then: (r) => r.required("End date is required")
|
|
39
|
-
}).test(
|
|
40
|
-
"endAfterStart",
|
|
41
|
-
"End date must be after start date",
|
|
42
|
-
function(r) {
|
|
43
|
-
const { startDate: _, noEndDate: y } = this.parent;
|
|
44
|
-
return !r || y || !_ ? !0 : new Date(r) >= new Date(_);
|
|
45
|
-
}
|
|
46
|
-
),
|
|
47
|
-
isBackendOnly: V.boolean().default(!1)
|
|
48
|
-
});
|
|
49
|
-
function Ye({
|
|
50
|
-
isOpen: r,
|
|
51
|
-
onClose: _,
|
|
52
|
-
pendingGrant: y,
|
|
53
|
-
subMenuId: C,
|
|
54
|
-
newApiData: p
|
|
55
|
-
}) {
|
|
56
|
-
const { translate: M } = ze(), {
|
|
57
|
-
handleSubmit: j,
|
|
58
|
-
control: E,
|
|
59
|
-
reset: O,
|
|
60
|
-
watch: x,
|
|
61
|
-
formState: { errors: c },
|
|
62
|
-
trigger: R
|
|
63
|
-
} = Ie({
|
|
64
|
-
resolver: Lt(Bt),
|
|
65
|
-
defaultValues: {
|
|
66
|
-
noStartDate: !0,
|
|
67
|
-
noEndDate: !0,
|
|
68
|
-
startDate: null,
|
|
69
|
-
endDate: null,
|
|
70
|
-
isBackendOnly: !1
|
|
71
|
-
},
|
|
72
|
-
mode: "onChange"
|
|
73
|
-
}), Y = x("noStartDate"), J = x("noEndDate"), A = x("startDate"), N = x("endDate"), b = async (I) => {
|
|
74
|
-
var d, w;
|
|
75
|
-
if (y) {
|
|
76
|
-
try {
|
|
77
|
-
await te({
|
|
78
|
-
code: "grant_permission",
|
|
79
|
-
parameters: {
|
|
80
|
-
featureName: y.id,
|
|
81
|
-
roleIds: y != null && y.designationId ? String(y == null ? void 0 : y.designationId) : null,
|
|
82
|
-
userIds: y != null && y.userId ? String(y.userId) : null,
|
|
83
|
-
startDate: I.noStartDate ? null : I.startDate,
|
|
84
|
-
endDate: I.noEndDate ? null : I.endDate,
|
|
85
|
-
isBackendOnly: I.isBackendOnly
|
|
86
|
-
}
|
|
87
|
-
}), T({
|
|
88
|
-
type: "success",
|
|
89
|
-
message: "Permission Granted Successfully"
|
|
90
|
-
});
|
|
91
|
-
const { data: U } = await ee(C);
|
|
92
|
-
p(U);
|
|
93
|
-
} catch (U) {
|
|
94
|
-
T({
|
|
95
|
-
type: "error",
|
|
96
|
-
message: `Error granting permission: ${(w = (d = U == null ? void 0 : U.response) == null ? void 0 : d.data) == null ? void 0 : w.message}`
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
O(), _();
|
|
100
|
-
}
|
|
101
|
-
}, P = () => {
|
|
102
|
-
O(), _();
|
|
103
|
-
};
|
|
104
|
-
return /* @__PURE__ */ s(je, { open: r, onClose: P, children: /* @__PURE__ */ s(re, { className: "fixed inset-0 flex items-start justify-center z-50 overflow-y-auto bg-opacity-10", children: /* @__PURE__ */ s(
|
|
105
|
-
Ue,
|
|
106
|
-
{
|
|
107
|
-
className: `
|
|
108
|
-
relative mt-10 p-4 shadow-lg flex flex-col rounded-xl
|
|
109
|
-
w-[95vw] max-w-md
|
|
110
|
-
sm:w-[80vw] sm:max-w-lg
|
|
111
|
-
md:w-[60vw] md:max-w-xl
|
|
112
|
-
lg:w-[40vw] lg:max-w-2xl
|
|
113
|
-
xl:w-[30vw] xl:max-w-3xl
|
|
114
|
-
`,
|
|
115
|
-
children: /* @__PURE__ */ f("form", { onSubmit: j(b), children: [
|
|
116
|
-
/* @__PURE__ */ f(k, { className: "flex justify-between items-center mb-4", children: [
|
|
117
|
-
/* @__PURE__ */ s(
|
|
118
|
-
H,
|
|
119
|
-
{
|
|
120
|
-
variant: "h6",
|
|
121
|
-
className: "text-base sm:text-lg text-customBlue",
|
|
122
|
-
children: M("Set Access Window")
|
|
123
|
-
}
|
|
124
|
-
),
|
|
125
|
-
/* @__PURE__ */ s(Se, { onClick: P, children: /* @__PURE__ */ s(B, { icon: Be }) })
|
|
126
|
-
] }),
|
|
127
|
-
/* @__PURE__ */ f(k, { className: "flex flex-col sm:flex-row gap-4 mb-4", children: [
|
|
128
|
-
/* @__PURE__ */ f(k, { className: "flex-1", children: [
|
|
129
|
-
/* @__PURE__ */ s(
|
|
130
|
-
ge,
|
|
131
|
-
{
|
|
132
|
-
defaultChecked: !0,
|
|
133
|
-
label: "No Start Date",
|
|
134
|
-
control: E,
|
|
135
|
-
errors: c,
|
|
136
|
-
name: "noStartDate",
|
|
137
|
-
onChange: () => R("startDate")
|
|
138
|
-
}
|
|
139
|
-
),
|
|
140
|
-
/* @__PURE__ */ s(
|
|
141
|
-
Me,
|
|
142
|
-
{
|
|
143
|
-
control: E,
|
|
144
|
-
name: "startDate",
|
|
145
|
-
errors: c,
|
|
146
|
-
disabled: Y,
|
|
147
|
-
format: "DD/MM/YYYY",
|
|
148
|
-
maxDate: N || void 0
|
|
149
|
-
}
|
|
150
|
-
)
|
|
151
|
-
] }),
|
|
152
|
-
/* @__PURE__ */ f(k, { className: "flex-1", children: [
|
|
153
|
-
/* @__PURE__ */ s(
|
|
154
|
-
ge,
|
|
155
|
-
{
|
|
156
|
-
label: "No End Date",
|
|
157
|
-
control: E,
|
|
158
|
-
name: "noEndDate",
|
|
159
|
-
errors: c,
|
|
160
|
-
onChange: () => R("endDate")
|
|
161
|
-
}
|
|
162
|
-
),
|
|
163
|
-
/* @__PURE__ */ s(
|
|
164
|
-
Me,
|
|
165
|
-
{
|
|
166
|
-
control: E,
|
|
167
|
-
name: "endDate",
|
|
168
|
-
errors: c,
|
|
169
|
-
disabled: J,
|
|
170
|
-
format: "DD/MM/YYYY",
|
|
171
|
-
minDate: A || void 0
|
|
172
|
-
}
|
|
173
|
-
)
|
|
174
|
-
] })
|
|
175
|
-
] }),
|
|
176
|
-
/* @__PURE__ */ s(
|
|
177
|
-
ge,
|
|
178
|
-
{
|
|
179
|
-
label: "Is Backend Only?",
|
|
180
|
-
control: E,
|
|
181
|
-
name: "isBackendOnly",
|
|
182
|
-
className: ""
|
|
183
|
-
}
|
|
184
|
-
),
|
|
185
|
-
/* @__PURE__ */ f(k, { className: "flex justify-end gap-3 mt-2", children: [
|
|
186
|
-
/* @__PURE__ */ s(
|
|
187
|
-
Ne,
|
|
188
|
-
{
|
|
189
|
-
variant: "contained",
|
|
190
|
-
color: "secondary",
|
|
191
|
-
size: "small",
|
|
192
|
-
onClick: P,
|
|
193
|
-
type: "button",
|
|
194
|
-
className: "mt-2",
|
|
195
|
-
children: M("Close")
|
|
196
|
-
}
|
|
197
|
-
),
|
|
198
|
-
/* @__PURE__ */ s(
|
|
199
|
-
Ne,
|
|
200
|
-
{
|
|
201
|
-
variant: "contained",
|
|
202
|
-
color: "primary",
|
|
203
|
-
size: "small",
|
|
204
|
-
type: "submit",
|
|
205
|
-
className: "mt-2",
|
|
206
|
-
children: M("Submit")
|
|
207
|
-
}
|
|
208
|
-
)
|
|
209
|
-
] })
|
|
210
|
-
] })
|
|
211
|
-
}
|
|
212
|
-
) }) });
|
|
213
|
-
}
|
|
214
|
-
Ye.propTypes = {
|
|
215
|
-
isOpen: l.bool,
|
|
216
|
-
onClose: l.func,
|
|
217
|
-
pendingGrant: l.object,
|
|
218
|
-
execute: l.func,
|
|
219
|
-
getFeatureDataV2: l.func,
|
|
220
|
-
subMenuId: l.string,
|
|
221
|
-
newApiData: l.func,
|
|
222
|
-
showToast: l.func
|
|
223
|
-
};
|
|
224
|
-
function qe({
|
|
225
|
-
translate: r,
|
|
226
|
-
onSubmit: _,
|
|
227
|
-
roleList: y,
|
|
228
|
-
featureData: C
|
|
229
|
-
}) {
|
|
230
|
-
const [p, M] = m(""), [j, E] = m(""), [O, x] = m([]), { control: c, handleSubmit: R, reset: Y } = Ie({}), J = y.filter(
|
|
231
|
-
(N) => !(C != null && C.some((b) => (b == null ? void 0 : b.designationId) === (N == null ? void 0 : N.id)))
|
|
232
|
-
);
|
|
233
|
-
ae(() => {
|
|
234
|
-
const N = setTimeout(() => {
|
|
235
|
-
E(p);
|
|
236
|
-
}, 300);
|
|
237
|
-
return () => clearTimeout(N);
|
|
238
|
-
}, [p]), ae(() => {
|
|
239
|
-
j !== "" && A(j);
|
|
240
|
-
}, [j]), ae(() => {
|
|
241
|
-
A("");
|
|
242
|
-
}, []);
|
|
243
|
-
const A = async (N, b = C) => {
|
|
244
|
-
try {
|
|
245
|
-
const { data: P } = await Rt({
|
|
246
|
-
code: "user_search_for_selectize",
|
|
247
|
-
parameters: {
|
|
248
|
-
searchString: N
|
|
249
|
-
}
|
|
250
|
-
}), I = ((P == null ? void 0 : P.result) || []).filter((d) => d == null ? void 0 : d.id).filter(
|
|
251
|
-
(d) => !(b != null && b.some((w) => (w == null ? void 0 : w.userId) === (d == null ? void 0 : d.id)))
|
|
252
|
-
).map((d) => ({
|
|
253
|
-
...d,
|
|
254
|
-
displayName: `${d.firstName || ""} ${d.lastName || ""} (${d.userName || ""})`.trim()
|
|
255
|
-
}));
|
|
256
|
-
x(I);
|
|
257
|
-
} catch (P) {
|
|
258
|
-
console.error(P);
|
|
259
|
-
}
|
|
260
|
-
};
|
|
261
|
-
return /* @__PURE__ */ f(k, { className: "flex flex-col md:flex-row gap-3 md:pl-5 justify-start w-full", children: [
|
|
262
|
-
/* @__PURE__ */ f(
|
|
263
|
-
k,
|
|
264
|
-
{
|
|
265
|
-
className: "flex flex-col md:flex-row md:space-x-5 justify-center items-center w-full",
|
|
266
|
-
children: [
|
|
267
|
-
/* @__PURE__ */ f(k, { className: "flex flex-row flex-2 md:space-x-3 items-center w-full", children: [
|
|
268
|
-
/* @__PURE__ */ s(H, { className: "flex-1", children: r("User") }),
|
|
269
|
-
/* @__PURE__ */ s(k, { className: "flex-3", children: /* @__PURE__ */ s(
|
|
270
|
-
Ot,
|
|
271
|
-
{
|
|
272
|
-
name: "roles",
|
|
273
|
-
id: "roles",
|
|
274
|
-
users: !0,
|
|
275
|
-
control: c,
|
|
276
|
-
defaultValue: null,
|
|
277
|
-
render: ({ field: { onChange: N, value: b, ref: P } }) => /* @__PURE__ */ s(
|
|
278
|
-
xt,
|
|
279
|
-
{
|
|
280
|
-
options: O,
|
|
281
|
-
getOptionLabel: (I) => I.displayName || "",
|
|
282
|
-
isOptionEqualToValue: (I, d) => I.id === (d == null ? void 0 : d.id),
|
|
283
|
-
value: b || null,
|
|
284
|
-
onChange: (I, d, w) => {
|
|
285
|
-
w === "clear" && A(""), N(d);
|
|
286
|
-
},
|
|
287
|
-
onInputChange: (I, d, w) => {
|
|
288
|
-
w === "input" && M(d);
|
|
289
|
-
},
|
|
290
|
-
renderOption: (I, d) => {
|
|
291
|
-
const w = d.displayName || "", U = p.trim(), $ = w.toLowerCase().indexOf(U.toLowerCase());
|
|
292
|
-
if ($ === -1)
|
|
293
|
-
return /* @__PURE__ */ Pe(
|
|
294
|
-
"li",
|
|
295
|
-
{
|
|
296
|
-
...I,
|
|
297
|
-
key: d.id,
|
|
298
|
-
style: { lineHeight: 1.5, fontSize: "14px" }
|
|
299
|
-
},
|
|
300
|
-
w
|
|
301
|
-
);
|
|
302
|
-
const le = w.substring(0, $), ce = w.substring(
|
|
303
|
-
$,
|
|
304
|
-
$ + U.length
|
|
305
|
-
), K = w.substring(
|
|
306
|
-
$ + U.length
|
|
307
|
-
);
|
|
308
|
-
return /* @__PURE__ */ Pe("li", { ...I, key: d.id }, /* @__PURE__ */ f("span", { className: "inline", children: [
|
|
309
|
-
le,
|
|
310
|
-
/* @__PURE__ */ s("span", { className: "bg-yellow-300", children: ce }),
|
|
311
|
-
K
|
|
312
|
-
] }));
|
|
313
|
-
},
|
|
314
|
-
renderInput: (I) => /* @__PURE__ */ s(
|
|
315
|
-
$e,
|
|
316
|
-
{
|
|
317
|
-
...I,
|
|
318
|
-
label: "User",
|
|
319
|
-
variant: "outlined",
|
|
320
|
-
size: "small",
|
|
321
|
-
inputRef: P
|
|
322
|
-
}
|
|
323
|
-
)
|
|
324
|
-
}
|
|
325
|
-
)
|
|
326
|
-
}
|
|
327
|
-
) })
|
|
328
|
-
] }),
|
|
329
|
-
/* @__PURE__ */ f(k, { className: "flex flex-row flex-2 md:space-x-3 items-center w-full", children: [
|
|
330
|
-
/* @__PURE__ */ s(H, { className: "flex-1", children: r("Role") }),
|
|
331
|
-
/* @__PURE__ */ s(k, { className: "flex-3", children: /* @__PURE__ */ s(
|
|
332
|
-
Ft,
|
|
333
|
-
{
|
|
334
|
-
id: "selectedRoles",
|
|
335
|
-
name: "selectedRoles",
|
|
336
|
-
options: J,
|
|
337
|
-
control: c,
|
|
338
|
-
getOptionLabel: (N) => N == null ? void 0 : N.name,
|
|
339
|
-
dataTestId: "accessrights-select-role"
|
|
340
|
-
}
|
|
341
|
-
) })
|
|
342
|
-
] })
|
|
343
|
-
]
|
|
344
|
-
},
|
|
345
|
-
"specific-section"
|
|
346
|
-
),
|
|
347
|
-
/* @__PURE__ */ s(k, { className: "flex items-center md:pr-5 justify-end", children: /* @__PURE__ */ s(
|
|
348
|
-
Ne,
|
|
349
|
-
{
|
|
350
|
-
variant: "contained",
|
|
351
|
-
size: "small",
|
|
352
|
-
onClick: R((N) => {
|
|
353
|
-
var b;
|
|
354
|
-
_(N), A("", [...C, { userId: (b = N.roles) == null ? void 0 : b.id }]), Y();
|
|
355
|
-
}),
|
|
356
|
-
children: r("add")
|
|
357
|
-
}
|
|
358
|
-
) })
|
|
359
|
-
] });
|
|
360
|
-
}
|
|
361
|
-
qe.propTypes = {
|
|
362
|
-
translate: l.any,
|
|
363
|
-
permissionDetailsList: l.any,
|
|
364
|
-
getPermissionDetails: l.any,
|
|
365
|
-
onSubmit: l.any,
|
|
366
|
-
permissionTypes: l.any,
|
|
367
|
-
roleList: l.any,
|
|
368
|
-
featureData: l.any
|
|
369
|
-
};
|
|
370
|
-
function We({
|
|
371
|
-
isOpen: r,
|
|
372
|
-
onClose: _,
|
|
373
|
-
permissions: y,
|
|
374
|
-
featureState: C,
|
|
375
|
-
featureName: p
|
|
376
|
-
}) {
|
|
377
|
-
const M = () => {
|
|
378
|
-
_();
|
|
379
|
-
}, j = C[p] || !1, E = (O, x = 0) => {
|
|
380
|
-
if (!O) return null;
|
|
381
|
-
const c = O.child || [], R = O.display_name || O.name || O.id;
|
|
382
|
-
return /* @__PURE__ */ f("div", { className: "py-2 ", children: [
|
|
383
|
-
/* @__PURE__ */ f("div", { className: "flex items-center ", children: [
|
|
384
|
-
j ? /* @__PURE__ */ s(B, { icon: Et }) : /* @__PURE__ */ s(B, { icon: Tt }),
|
|
385
|
-
/* @__PURE__ */ s("div", { className: "top-6.5 w-4 border-t border-gray-300" }),
|
|
386
|
-
/* @__PURE__ */ s(
|
|
387
|
-
"div",
|
|
388
|
-
{
|
|
389
|
-
className: `
|
|
390
|
-
inline-flex items-center
|
|
391
|
-
text-[0.8rem]
|
|
392
|
-
px-2 py-1
|
|
393
|
-
rounded-full
|
|
394
|
-
bg-gray-100
|
|
395
|
-
text-gray-800
|
|
396
|
-
border border-gray-300
|
|
397
|
-
hover:bg-gray-200
|
|
398
|
-
transition-all duration-200 cursor-pointer
|
|
399
|
-
|
|
400
|
-
`,
|
|
401
|
-
children: R
|
|
402
|
-
}
|
|
403
|
-
)
|
|
404
|
-
] }),
|
|
405
|
-
(c == null ? void 0 : c.length) > 0 && /* @__PURE__ */ s("div", { className: "pl-2 ", children: c.map((Y, J) => {
|
|
406
|
-
const A = J === c.length - 1;
|
|
407
|
-
return /* @__PURE__ */ f("div", { className: "relative pl-3", children: [
|
|
408
|
-
/* @__PURE__ */ s(
|
|
409
|
-
"div",
|
|
410
|
-
{
|
|
411
|
-
className: `
|
|
412
|
-
absolute left-0 w-px bg-gray-300
|
|
413
|
-
${A ? "top-0 h-6.5" : "top-[-11px] bottom-0"}
|
|
414
|
-
`
|
|
415
|
-
}
|
|
416
|
-
),
|
|
417
|
-
/* @__PURE__ */ s("div", { className: "absolute left-0 top-6.5 w-3 border-t border-gray-300" }),
|
|
418
|
-
E(Y, x + 1)
|
|
419
|
-
] }, J);
|
|
420
|
-
}) })
|
|
421
|
-
] });
|
|
422
|
-
};
|
|
423
|
-
return /* @__PURE__ */ s(je, { open: r, onClose: M, children: /* @__PURE__ */ s(re, { className: "fixed inset-0 flex items-start justify-center z-50 bg-opacity-10", children: /* @__PURE__ */ f(
|
|
424
|
-
Ue,
|
|
425
|
-
{
|
|
426
|
-
className: `
|
|
427
|
-
relative mt-10 shadow-lg flex flex-col rounded-xl
|
|
428
|
-
w-[95vw] max-w-md
|
|
429
|
-
sm:w-[80vw] sm:max-w-lg
|
|
430
|
-
md:w-[60vw] md:max-w-xl
|
|
431
|
-
lg:w-[60vw] lg:max-w-2xl
|
|
432
|
-
xl:w-[30vw] xl:max-w-3xl
|
|
433
|
-
|
|
434
|
-
`,
|
|
435
|
-
children: [
|
|
436
|
-
/* @__PURE__ */ f(k, { className: "flex justify-between items-center p-[5px_10px] border-b border-black", children: [
|
|
437
|
-
/* @__PURE__ */ s(H, { variant: "body1", className: "font-bold text-customBlue", children: "Permissions" }),
|
|
438
|
-
/* @__PURE__ */ s(
|
|
439
|
-
Se,
|
|
440
|
-
{
|
|
441
|
-
size: "small",
|
|
442
|
-
onClick: M,
|
|
443
|
-
"data-testid": "flywayquery-close-button",
|
|
444
|
-
children: /* @__PURE__ */ s(B, { icon: Be })
|
|
445
|
-
}
|
|
446
|
-
)
|
|
447
|
-
] }),
|
|
448
|
-
/* @__PURE__ */ s("div", { className: " max-h-[75vh] overflow-y-auto", children: y && /* @__PURE__ */ s("div", { className: "w-max pl-6 m-3 rounded px-2 py-1 h-fit ", children: E(y) }) })
|
|
449
|
-
]
|
|
450
|
-
}
|
|
451
|
-
) }) });
|
|
452
|
-
}
|
|
453
|
-
We.propTypes = {
|
|
454
|
-
isOpen: l.bool,
|
|
455
|
-
onClose: l.func,
|
|
456
|
-
permissions: l.any,
|
|
457
|
-
featureName: l.any,
|
|
458
|
-
featureState: l.any
|
|
459
|
-
};
|
|
460
|
-
function He({ config: r, row: _ }) {
|
|
461
|
-
var O;
|
|
462
|
-
const [y, C] = m(null), p = !!y, M = (x) => {
|
|
463
|
-
x.stopPropagation(), C(x.currentTarget), typeof r.menuClick == "function" && r.menuClick(_);
|
|
464
|
-
}, j = (x) => {
|
|
465
|
-
x && x.stopPropagation(), C(null);
|
|
466
|
-
}, E = (x) => (c) => {
|
|
467
|
-
c.stopPropagation(), typeof x.onClick == "function" && x.onClick(_), C(null);
|
|
468
|
-
};
|
|
469
|
-
return /* @__PURE__ */ f(re, { children: [
|
|
470
|
-
/* @__PURE__ */ s(
|
|
471
|
-
Se,
|
|
472
|
-
{
|
|
473
|
-
size: "small",
|
|
474
|
-
disableRipple: !0,
|
|
475
|
-
sx: {
|
|
476
|
-
"&:hover": {
|
|
477
|
-
backgroundColor: "transparent"
|
|
478
|
-
}
|
|
479
|
-
},
|
|
480
|
-
onClick: M,
|
|
481
|
-
"data-testid": r.dataTestId,
|
|
482
|
-
children: r.icon
|
|
483
|
-
}
|
|
484
|
-
),
|
|
485
|
-
/* @__PURE__ */ s(
|
|
486
|
-
Nt,
|
|
487
|
-
{
|
|
488
|
-
anchorEl: y,
|
|
489
|
-
open: p,
|
|
490
|
-
onClose: j,
|
|
491
|
-
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
492
|
-
transformOrigin: { vertical: "top", horizontal: "right" },
|
|
493
|
-
children: (O = r.menuItems) == null ? void 0 : O.map((x, c) => /* @__PURE__ */ s(St, { onClick: E(x), children: x.label }, c))
|
|
494
|
-
}
|
|
495
|
-
)
|
|
496
|
-
] });
|
|
497
|
-
}
|
|
498
|
-
He.propTypes = {
|
|
499
|
-
config: l.any,
|
|
500
|
-
row: l.any
|
|
501
|
-
};
|
|
502
|
-
function Yt({
|
|
503
|
-
subMenuId: r,
|
|
504
|
-
// subMenuGroupName,
|
|
505
|
-
subMenuFeatureVal: _,
|
|
506
|
-
// selectedTab,
|
|
507
|
-
parentLoading: y,
|
|
508
|
-
onNewAPIChange: C,
|
|
509
|
-
rights: p
|
|
510
|
-
}) {
|
|
511
|
-
const M = $t(zt), j = vt(), E = Le(null), O = Le(!1), x = Jt(), [c, R] = m([]), [Y, J] = m([]), [A, N] = m([]), [b, P] = m([]), [I, d] = m([]), [w, U] = m(""), [$, le] = m({}), [ce, K] = m(!1), [Ke, de] = m(!1), [we, Qe] = m(""), [z, Xe] = m(null), [Ze, Ge] = m({}), [Ve, Q] = m(!1), [se, ve] = m(!1), [et, ie] = m(null), [q, tt] = m([]), [st, ue] = m(0), [nt, be] = m(""), { translate: De } = ze(), [at, fe] = m(""), [it, me] = m([]), [L, X] = m(null), Ce = () => {
|
|
512
|
-
var n;
|
|
513
|
-
if (!q || q.length === 0) return null;
|
|
514
|
-
const e = q.filter(
|
|
515
|
-
(i) => {
|
|
516
|
-
var a;
|
|
517
|
-
return (a = i == null ? void 0 : i.id) == null ? void 0 : a.startsWith("view");
|
|
518
|
-
}
|
|
519
|
-
);
|
|
520
|
-
if (e && e.length > 0) {
|
|
521
|
-
const i = e.find(
|
|
522
|
-
(t) => /^view\.report\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t.id)
|
|
523
|
-
);
|
|
524
|
-
if (i) return i.id;
|
|
525
|
-
if (e.some((t) => t.id === "view.report")) return "view.report";
|
|
526
|
-
const a = e.filter((t) => t.id.split(".").length === 3);
|
|
527
|
-
if (a.length > 0)
|
|
528
|
-
return a[0].id;
|
|
529
|
-
}
|
|
530
|
-
return (n = q[0]) == null ? void 0 : n.id;
|
|
531
|
-
};
|
|
532
|
-
ae(() => {
|
|
533
|
-
let e = E.current;
|
|
534
|
-
return () => {
|
|
535
|
-
x("conversion_event", {
|
|
536
|
-
form: e,
|
|
537
|
-
form_name: "Access Rights",
|
|
538
|
-
submit: O.current
|
|
539
|
-
});
|
|
540
|
-
};
|
|
541
|
-
}, []);
|
|
542
|
-
const pe = (e) => {
|
|
543
|
-
var i;
|
|
544
|
-
let n;
|
|
545
|
-
return n = (i = e.userMenuItemDtos) == null ? void 0 : i.toSorted((a, t) => a.designationId !== void 0 && t.designationId !== void 0 ? a.designationId - t.designationId : a.designationId !== void 0 && t.designationId === void 0 ? -1 : a.designationId === void 0 && t.designationId !== void 0 ? 1 : a.userId !== void 0 && t.userId !== void 0 ? a.userId - t.userId : a.userId !== void 0 && t.userId === void 0 ? -1 : a.userId === void 0 && t.userId !== void 0 ? 1 : 0), n;
|
|
546
|
-
};
|
|
547
|
-
l.any;
|
|
548
|
-
const he = (e) => (e == null || e.userMenuItemDtos.forEach((n) => {
|
|
549
|
-
n.featureJson = ft(
|
|
550
|
-
JSON.parse(e.featureJson || "{}"),
|
|
551
|
-
JSON.parse(n.featureJson || "{}")
|
|
552
|
-
), n.designationId ? (n.code = "Role", n.displayName = n.roleName) : (n.code = "User", n.displayName = n.fullName);
|
|
553
|
-
}), e), ot = async () => {
|
|
554
|
-
var e, n;
|
|
555
|
-
try {
|
|
556
|
-
if (Q((i) => !i), se) {
|
|
557
|
-
const i = [];
|
|
558
|
-
Object.entries(JSON.parse(z == null ? void 0 : z.featureJson)).forEach(
|
|
559
|
-
([a, t]) => {
|
|
560
|
-
t === !0 && i.push(a);
|
|
561
|
-
}
|
|
562
|
-
);
|
|
563
|
-
try {
|
|
564
|
-
await te({
|
|
565
|
-
code: "delete_permissions",
|
|
566
|
-
parameters: {
|
|
567
|
-
permissionList: i,
|
|
568
|
-
roleId: parseInt(z == null ? void 0 : z.designationId),
|
|
569
|
-
userId: parseInt(z == null ? void 0 : z.userId)
|
|
570
|
-
}
|
|
571
|
-
}), T({
|
|
572
|
-
type: "success",
|
|
573
|
-
message: "Permission Deleted Successfully"
|
|
574
|
-
});
|
|
575
|
-
const { data: a } = await ee(r);
|
|
576
|
-
Z(a);
|
|
577
|
-
} catch {
|
|
578
|
-
T({
|
|
579
|
-
type: "error",
|
|
580
|
-
message: "error occurred"
|
|
581
|
-
});
|
|
582
|
-
}
|
|
583
|
-
} else {
|
|
584
|
-
await bt(we);
|
|
585
|
-
let { data: i } = await xe(r);
|
|
586
|
-
(i == null ? void 0 : i.userMenuItemDtos.length) > 0 && (i = he(i)), J(i.userMenuItemDtos);
|
|
587
|
-
}
|
|
588
|
-
K(!1), Q((i) => !i);
|
|
589
|
-
} catch (i) {
|
|
590
|
-
T({
|
|
591
|
-
type: "error",
|
|
592
|
-
message: `Error Deleting data: ${(n = (e = i == null ? void 0 : i.response) == null ? void 0 : e.data) == null ? void 0 : n.message}`
|
|
593
|
-
}), Q((a) => !a), K(!1);
|
|
594
|
-
}
|
|
595
|
-
}, rt = (e, n) => {
|
|
596
|
-
const i = new Set(e.map((t) => t.id)), a = [];
|
|
597
|
-
return Object.entries(n).forEach(([t, o]) => {
|
|
598
|
-
o === !0 && !i.has(t) && a.push({ id: t, action: "grant" });
|
|
599
|
-
}), e.forEach((t) => {
|
|
600
|
-
n[t.id] || a.push({ id: t.id, action: "revoke" });
|
|
601
|
-
}), a;
|
|
602
|
-
}, { handleSubmit: lt } = Ie({}), ye = async (e) => {
|
|
603
|
-
var n, i, a, t, o, g;
|
|
604
|
-
try {
|
|
605
|
-
if (se) {
|
|
606
|
-
e = { ...e, featureJson: JSON.parse(e == null ? void 0 : e.featureJson) };
|
|
607
|
-
const S = rt(
|
|
608
|
-
e.permissions,
|
|
609
|
-
e == null ? void 0 : e.featureJson
|
|
610
|
-
);
|
|
611
|
-
if (((n = S[0]) == null ? void 0 : n.action) === "grant")
|
|
612
|
-
ie({
|
|
613
|
-
...e,
|
|
614
|
-
id: (i = S[0]) == null ? void 0 : i.id
|
|
615
|
-
}), ue(1);
|
|
616
|
-
else if (((a = S[0]) == null ? void 0 : a.action) === "revoke")
|
|
617
|
-
try {
|
|
618
|
-
await te({
|
|
619
|
-
code: "revoke_permission",
|
|
620
|
-
parameters: {
|
|
621
|
-
featureName: (t = S[0]) == null ? void 0 : t.id,
|
|
622
|
-
roleId: parseInt(e == null ? void 0 : e.designationId),
|
|
623
|
-
userId: parseInt(e == null ? void 0 : e.userId)
|
|
624
|
-
}
|
|
625
|
-
}), T({
|
|
626
|
-
type: "success",
|
|
627
|
-
message: "Permission Revoked Successfully"
|
|
628
|
-
});
|
|
629
|
-
} catch {
|
|
630
|
-
T({
|
|
631
|
-
type: "error",
|
|
632
|
-
message: "Error in revoking permission"
|
|
633
|
-
});
|
|
634
|
-
}
|
|
635
|
-
const { data: u } = await ee(r);
|
|
636
|
-
Z(u);
|
|
637
|
-
} else
|
|
638
|
-
await Dt(e);
|
|
639
|
-
} catch (S) {
|
|
640
|
-
T({
|
|
641
|
-
type: "error",
|
|
642
|
-
message: `Error Updating data: ${(g = (o = S == null ? void 0 : S.response) == null ? void 0 : o.data) == null ? void 0 : g.message}`
|
|
643
|
-
});
|
|
644
|
-
}
|
|
645
|
-
}, ct = async (e) => {
|
|
646
|
-
try {
|
|
647
|
-
if (e = {
|
|
648
|
-
...e,
|
|
649
|
-
featureJson: JSON.parse(e == null ? void 0 : e.featureJson)
|
|
650
|
-
}, e != null && e.checkAll) {
|
|
651
|
-
const i = Object.keys(e == null ? void 0 : e.featureJson).filter((a) => (e == null ? void 0 : e.featureJson[a]) === !1).join(",");
|
|
652
|
-
await te({
|
|
653
|
-
code: "grant_permission_bulk",
|
|
654
|
-
parameters: {
|
|
655
|
-
permission_id_list: i,
|
|
656
|
-
role_id: parseInt(e == null ? void 0 : e.designationId),
|
|
657
|
-
user_id: parseInt(e == null ? void 0 : e.userId)
|
|
658
|
-
}
|
|
659
|
-
}), T({
|
|
660
|
-
type: "success",
|
|
661
|
-
message: "Permission granted Successfully"
|
|
662
|
-
});
|
|
663
|
-
}
|
|
664
|
-
const { data: n } = await ee(r);
|
|
665
|
-
Z(n);
|
|
666
|
-
} catch (n) {
|
|
667
|
-
console.error(n);
|
|
668
|
-
}
|
|
669
|
-
}, ke = async (e) => {
|
|
670
|
-
var n, i, a, t;
|
|
671
|
-
if (!(e != null && e.roles || e != null && e.selectedRoles)) {
|
|
672
|
-
T({
|
|
673
|
-
message: "Please select either user or role !!",
|
|
674
|
-
type: "info"
|
|
675
|
-
});
|
|
676
|
-
return;
|
|
677
|
-
}
|
|
678
|
-
if (se && c.length < 1) {
|
|
679
|
-
T({
|
|
680
|
-
message: "Please add permissions first for this feature !!",
|
|
681
|
-
type: "info"
|
|
682
|
-
});
|
|
683
|
-
return;
|
|
684
|
-
}
|
|
685
|
-
try {
|
|
686
|
-
const o = ((n = e == null ? void 0 : e.selectedRoles) == null ? void 0 : n.map((v) => v == null ? void 0 : v.id)) || [], g = $ != null && $.id ? Y.some((v) => (v == null ? void 0 : v.userId) === ($ == null ? void 0 : $.id)) : !1, S = (o == null ? void 0 : o.length) > 0 ? Y.some(
|
|
687
|
-
(v) => o.includes(v == null ? void 0 : v.designationId)
|
|
688
|
-
) : !1;
|
|
689
|
-
if (g || S)
|
|
690
|
-
T({
|
|
691
|
-
message: "Selected User Already found please select another id",
|
|
692
|
-
type: "warning"
|
|
693
|
-
});
|
|
694
|
-
else {
|
|
695
|
-
const v = o == null ? void 0 : o.join(","), D = {
|
|
696
|
-
userId: (i = e == null ? void 0 : e.roles) == null ? void 0 : i.id,
|
|
697
|
-
designationId: v || null
|
|
698
|
-
}, F = q.filter(
|
|
699
|
-
(h) => {
|
|
700
|
-
var G;
|
|
701
|
-
return (G = h == null ? void 0 : h.id) == null ? void 0 : G.startsWith("view");
|
|
702
|
-
}
|
|
703
|
-
);
|
|
704
|
-
if (se) {
|
|
705
|
-
const h = (a = F.find(
|
|
706
|
-
(W) => /^view\.report\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(W.id)
|
|
707
|
-
)) == null ? void 0 : a.id;
|
|
708
|
-
h ? ie({
|
|
709
|
-
...D,
|
|
710
|
-
id: h
|
|
711
|
-
}) : F.some((W) => W.id === "view.report") ? ie({
|
|
712
|
-
...D,
|
|
713
|
-
id: "view.report"
|
|
714
|
-
}) : ie({
|
|
715
|
-
...D,
|
|
716
|
-
id: (F == null ? void 0 : F.filter((W) => W.id.split(".").length === 3).map((W) => W.id)[0]) || ((t = q[0]) == null ? void 0 : t.id)
|
|
717
|
-
}), ue(1);
|
|
718
|
-
const { data: G } = await ee(r);
|
|
719
|
-
Z(G);
|
|
720
|
-
} else {
|
|
721
|
-
await Ct(r, D);
|
|
722
|
-
let { data: h } = await xe(r);
|
|
723
|
-
(h == null ? void 0 : h.userMenuItemDtos.length) > 0 && (h == null ? void 0 : h.userMenuItemDtos.length) > 0 && (h = he(h)), U(h == null ? void 0 : h.featureJson);
|
|
724
|
-
const G = pe(h);
|
|
725
|
-
J(G);
|
|
726
|
-
const W = h.featureJson ? Object.keys(JSON.parse(h.featureJson)) : [];
|
|
727
|
-
if (W.length > 0) {
|
|
728
|
-
const { data: yt } = await te({
|
|
729
|
-
code: "retrieve_display_name_for_feature",
|
|
730
|
-
parameters: {
|
|
731
|
-
menu_id: r,
|
|
732
|
-
feature_name_list: W
|
|
733
|
-
}
|
|
734
|
-
});
|
|
735
|
-
R(yt.result);
|
|
736
|
-
} else
|
|
737
|
-
R([]);
|
|
738
|
-
T({
|
|
739
|
-
message: "menu item added successfully",
|
|
740
|
-
type: "success"
|
|
741
|
-
});
|
|
742
|
-
}
|
|
743
|
-
O.current = !0, le({});
|
|
744
|
-
}
|
|
745
|
-
} catch (o) {
|
|
746
|
-
console.error(o), T({
|
|
747
|
-
message: "cannot add menu item",
|
|
748
|
-
type: "error"
|
|
749
|
-
});
|
|
750
|
-
}
|
|
751
|
-
}, dt = wt(
|
|
752
|
-
gt((e) => {
|
|
753
|
-
if (!e)
|
|
754
|
-
J(A);
|
|
755
|
-
else {
|
|
756
|
-
const n = A == null ? void 0 : A.filter(
|
|
757
|
-
(i) => {
|
|
758
|
-
var a, t;
|
|
759
|
-
return i != null && i.designationId ? (a = i.roleName) == null ? void 0 : a.toLowerCase().includes(e) : (t = i.fullName) == null ? void 0 : t.toLowerCase().includes(e);
|
|
760
|
-
}
|
|
761
|
-
);
|
|
762
|
-
x("search_tracking", {
|
|
763
|
-
searchTerm: e,
|
|
764
|
-
results_count: n.length,
|
|
765
|
-
search_type: "Page Search"
|
|
766
|
-
}), J(n);
|
|
767
|
-
}
|
|
768
|
-
}, 500),
|
|
769
|
-
[c, x]
|
|
770
|
-
), ut = (e) => {
|
|
771
|
-
const n = e.target.value.toLowerCase();
|
|
772
|
-
be(n), dt(n);
|
|
773
|
-
}, ft = (e, n = {}) => {
|
|
774
|
-
const i = {};
|
|
775
|
-
return Object.keys(e).forEach((a) => {
|
|
776
|
-
Object.prototype.hasOwnProperty.call(n, a) ? i[a] = n[a] : i[a] = e[a];
|
|
777
|
-
}), JSON.stringify(i);
|
|
778
|
-
}, mt = (e, n) => {
|
|
779
|
-
const i = new Set(n.map((t) => t.id)), a = {};
|
|
780
|
-
return e.forEach((t) => {
|
|
781
|
-
a[t.id] = i.has(t.id);
|
|
782
|
-
}), JSON.stringify(a);
|
|
783
|
-
}, Z = (e) => {
|
|
784
|
-
e == null || e.userMenuItemDtos.forEach((a) => {
|
|
785
|
-
a.id = (a == null ? void 0 : a.designationId) || (a == null ? void 0 : a.userId), a.featureJson = mt(
|
|
786
|
-
e == null ? void 0 : e.permissions,
|
|
787
|
-
a == null ? void 0 : a.permissions
|
|
788
|
-
), a.designationId ? (a.code = "Role", a.displayName = a.roleName) : (a.code = "User", a.displayName = a.fullName);
|
|
789
|
-
});
|
|
790
|
-
const n = [
|
|
791
|
-
...new Set(e.permissions.map((a) => a.id))
|
|
792
|
-
];
|
|
793
|
-
R(n), tt(e == null ? void 0 : e.permissions);
|
|
794
|
-
const i = pe(e);
|
|
795
|
-
J(i), N(i);
|
|
796
|
-
};
|
|
797
|
-
ae(() => {
|
|
798
|
-
(async () => {
|
|
799
|
-
var n, i, a;
|
|
800
|
-
try {
|
|
801
|
-
if (r) {
|
|
802
|
-
X(null), Oe(!1), Q((u) => !u), be("");
|
|
803
|
-
let t, o;
|
|
804
|
-
if (_ ? (t = (await ee(r)).data, o = !0, ve(!0), C({ id: r, val: !0 })) : (t = (await xe(r)).data, o = !1, ve(!1), C({ id: r, val: !1 })), o)
|
|
805
|
-
Z(t);
|
|
806
|
-
else {
|
|
807
|
-
(t == null ? void 0 : t.userMenuItemDtos.length) > 0 && (t = he(t)), U(t == null ? void 0 : t.featureJson);
|
|
808
|
-
const u = pe(t);
|
|
809
|
-
J(u), N(u);
|
|
810
|
-
}
|
|
811
|
-
let g = I;
|
|
812
|
-
if (!b || b.length === 0) {
|
|
813
|
-
const { data: u } = await kt();
|
|
814
|
-
d(u), g = u;
|
|
815
|
-
}
|
|
816
|
-
let S;
|
|
817
|
-
if (o)
|
|
818
|
-
S = t.permissions.map((u) => u.id), R(S);
|
|
819
|
-
else if (S = t.featureJson ? Object.keys(JSON.parse(t.featureJson)) : [], S.length > 0) {
|
|
820
|
-
const [u] = await Promise.all([
|
|
821
|
-
await te({
|
|
822
|
-
code: "retrieve_display_name_for_feature",
|
|
823
|
-
parameters: {
|
|
824
|
-
menu_id: r,
|
|
825
|
-
feature_name_list: S
|
|
826
|
-
}
|
|
827
|
-
})
|
|
828
|
-
]);
|
|
829
|
-
R((n = u.data) == null ? void 0 : n.result);
|
|
830
|
-
} else
|
|
831
|
-
R([]);
|
|
832
|
-
if (g && g.length > 0)
|
|
833
|
-
if (t.isDynamicFeature) {
|
|
834
|
-
const v = JSON.parse(JSON.stringify(g)).filter((D) => {
|
|
835
|
-
const F = D.roleType;
|
|
836
|
-
return F === null || t != null && t.isMobileFeature && (t != null && t.isWebFeature) ? !0 : t.isMobileFeature ? F === "MOBILE" || F === "BOTH" : t.isWebFeature ? F === "WEB" || F === "BOTH" : !1;
|
|
837
|
-
});
|
|
838
|
-
P(v);
|
|
839
|
-
} else
|
|
840
|
-
P(g);
|
|
841
|
-
Q((u) => !u);
|
|
842
|
-
}
|
|
843
|
-
} catch (t) {
|
|
844
|
-
T({
|
|
845
|
-
type: "error",
|
|
846
|
-
message: `Error loading initial data: ${(a = (i = t == null ? void 0 : t.response) == null ? void 0 : i.data) == null ? void 0 : a.message}`
|
|
847
|
-
}), Q((o) => !o);
|
|
848
|
-
}
|
|
849
|
-
})();
|
|
850
|
-
}, [r, C]);
|
|
851
|
-
function oe(e, n) {
|
|
852
|
-
for (const i of e)
|
|
853
|
-
if (String(i.id) === String(n))
|
|
854
|
-
return i;
|
|
855
|
-
return null;
|
|
856
|
-
}
|
|
857
|
-
const [pt, Oe] = m(!1), ht = (e) => (n, i) => {
|
|
858
|
-
Oe(i ? e : !1);
|
|
859
|
-
};
|
|
860
|
-
return /* @__PURE__ */ s(Je, { children: (Ve || y) && M ? /* @__PURE__ */ s("div", { className: "w-full flex flex-wrap", children: /* @__PURE__ */ f("div", { className: "w-full flex flex-col px-2", children: [
|
|
861
|
-
/* @__PURE__ */ s("div", { className: "bg-gray-300 animate-pulse rounded-sm h-[70px] mb-2" }),
|
|
862
|
-
/* @__PURE__ */ s("div", { className: "bg-gray-300 animate-pulse rounded-sm h-[280px] mb-2" })
|
|
863
|
-
] }) }) : /* @__PURE__ */ f(k, { container: !0, sx: { borderTop: `1px solid ${j.palette.divider}` }, children: [
|
|
864
|
-
/* @__PURE__ */ s(
|
|
865
|
-
It,
|
|
866
|
-
{
|
|
867
|
-
description: "Are you sure , Do you want to delete this ?",
|
|
868
|
-
title: "CONFIRM ACTION",
|
|
869
|
-
open: ce && we === (z == null ? void 0 : z.id),
|
|
870
|
-
handleClick: ot,
|
|
871
|
-
handleClose: () => K((e) => !e),
|
|
872
|
-
dataTestId: "accessrights-delete-modal"
|
|
873
|
-
}
|
|
874
|
-
),
|
|
875
|
-
/* @__PURE__ */ s(
|
|
876
|
-
We,
|
|
877
|
-
{
|
|
878
|
-
isOpen: Ke && L,
|
|
879
|
-
onClose: () => {
|
|
880
|
-
de((e) => !e), X(null), fe(""), me([]);
|
|
881
|
-
},
|
|
882
|
-
featureState: it,
|
|
883
|
-
featureName: at,
|
|
884
|
-
permissions: L
|
|
885
|
-
}
|
|
886
|
-
),
|
|
887
|
-
/* @__PURE__ */ s(
|
|
888
|
-
Ye,
|
|
889
|
-
{
|
|
890
|
-
isOpen: st === 1,
|
|
891
|
-
onClose: () => ue(0),
|
|
892
|
-
pendingGrant: et,
|
|
893
|
-
subMenuId: r,
|
|
894
|
-
newApiData: Z
|
|
895
|
-
}
|
|
896
|
-
),
|
|
897
|
-
/* @__PURE__ */ s(
|
|
898
|
-
"form",
|
|
899
|
-
{
|
|
900
|
-
ref: E,
|
|
901
|
-
onSubmit: lt(ke),
|
|
902
|
-
className: "w-full",
|
|
903
|
-
children: /* @__PURE__ */ f(
|
|
904
|
-
k,
|
|
905
|
-
{
|
|
906
|
-
container: !0,
|
|
907
|
-
className: "flex flex-col md:flex-row items-center justify-between p-2 w-full",
|
|
908
|
-
spacing: 1,
|
|
909
|
-
children: [
|
|
910
|
-
/* @__PURE__ */ f(k, { className: "flex-1 flex space-x-10 items-center justify-between", children: [
|
|
911
|
-
/* @__PURE__ */ s(H, { variant: "body2", children: De("Search") }),
|
|
912
|
-
/* @__PURE__ */ s(re, { children: /* @__PURE__ */ s(
|
|
913
|
-
$e,
|
|
914
|
-
{
|
|
915
|
-
id: "searchQuery",
|
|
916
|
-
placeholder: "Search Text",
|
|
917
|
-
size: "small",
|
|
918
|
-
onChange: ut,
|
|
919
|
-
value: nt,
|
|
920
|
-
"data-testid": "access-rights-textfield-search",
|
|
921
|
-
sx: {
|
|
922
|
-
"& .MuiInputBase-root": {
|
|
923
|
-
height: "2.6em"
|
|
924
|
-
}
|
|
925
|
-
}
|
|
926
|
-
}
|
|
927
|
-
) })
|
|
928
|
-
] }),
|
|
929
|
-
ne.hasCheckRights(p == null ? void 0 : p["update.manage.featurelist"]) && /* @__PURE__ */ s(k, { className: "flex-3 flex space-x-10 items-center justify-between w-full", children: /* @__PURE__ */ s(
|
|
930
|
-
qe,
|
|
931
|
-
{
|
|
932
|
-
translate: De,
|
|
933
|
-
onSubmit: ke,
|
|
934
|
-
roleList: b,
|
|
935
|
-
featureData: Y
|
|
936
|
-
}
|
|
937
|
-
) })
|
|
938
|
-
]
|
|
939
|
-
}
|
|
940
|
-
)
|
|
941
|
-
}
|
|
942
|
-
),
|
|
943
|
-
/* @__PURE__ */ s("div", { style: { width: "100%" }, children: Y.map((e) => /* @__PURE__ */ s(Je, { children: /* @__PURE__ */ f(
|
|
944
|
-
Mt,
|
|
945
|
-
{
|
|
946
|
-
expanded: pt === `panel${e == null ? void 0 : e.id}`,
|
|
947
|
-
onChange: ht(`panel${e == null ? void 0 : e.id}`),
|
|
948
|
-
children: [
|
|
949
|
-
/* @__PURE__ */ f(
|
|
950
|
-
Ut,
|
|
951
|
-
{
|
|
952
|
-
expandIcon: /* @__PURE__ */ s(B, { icon: Pt }),
|
|
953
|
-
"aria-controls": "panel1bh-content",
|
|
954
|
-
id: "panel1bh-header",
|
|
955
|
-
children: [
|
|
956
|
-
/* @__PURE__ */ s(
|
|
957
|
-
H,
|
|
958
|
-
{
|
|
959
|
-
component: "span",
|
|
960
|
-
sx: { width: "33%", flexShrink: 0 },
|
|
961
|
-
children: e.code
|
|
962
|
-
}
|
|
963
|
-
),
|
|
964
|
-
/* @__PURE__ */ s(
|
|
965
|
-
H,
|
|
966
|
-
{
|
|
967
|
-
component: "span",
|
|
968
|
-
sx: { color: "text.secondary" },
|
|
969
|
-
children: e.displayName
|
|
970
|
-
}
|
|
971
|
-
),
|
|
972
|
-
/* @__PURE__ */ f("div", { className: "ml-auto mr-4 flex items-center space-x-3", children: [
|
|
973
|
-
ne.hasCheckRights(p == null ? void 0 : p["delete.manage.featurelist"]) && /* @__PURE__ */ s(
|
|
974
|
-
B,
|
|
975
|
-
{
|
|
976
|
-
icon: _t,
|
|
977
|
-
style: {
|
|
978
|
-
cursor: "pointer",
|
|
979
|
-
color: j.palette.error.main,
|
|
980
|
-
fontSize: "16px",
|
|
981
|
-
marginTop: "0.5rem"
|
|
982
|
-
},
|
|
983
|
-
onClick: (n) => {
|
|
984
|
-
n.stopPropagation(), n.preventDefault(), K(!0), Qe(e.id), Xe(e);
|
|
985
|
-
}
|
|
986
|
-
}
|
|
987
|
-
),
|
|
988
|
-
ne.hasCheckRights(p == null ? void 0 : p["update.manage.featurelist"]) && /* @__PURE__ */ s(
|
|
989
|
-
He,
|
|
990
|
-
{
|
|
991
|
-
config: {
|
|
992
|
-
label: "",
|
|
993
|
-
icon: /* @__PURE__ */ s(
|
|
994
|
-
B,
|
|
995
|
-
{
|
|
996
|
-
style: {
|
|
997
|
-
cursor: "pointer",
|
|
998
|
-
// color: theme.palette.error.main,
|
|
999
|
-
fontSize: "16px",
|
|
1000
|
-
marginTop: "0.5rem"
|
|
1001
|
-
},
|
|
1002
|
-
icon: At
|
|
1003
|
-
}
|
|
1004
|
-
),
|
|
1005
|
-
dataTestId: "accessrights-edit-icon",
|
|
1006
|
-
menuClick: (n) => {
|
|
1007
|
-
Ge(() => ({
|
|
1008
|
-
...n,
|
|
1009
|
-
code: n.designationId ? "Role" : "User",
|
|
1010
|
-
menuConfigId: r,
|
|
1011
|
-
displayName: n.designationId ? n.roleName : n.fullName
|
|
1012
|
-
}));
|
|
1013
|
-
},
|
|
1014
|
-
menuItems: [
|
|
1015
|
-
{
|
|
1016
|
-
label: "Check All",
|
|
1017
|
-
onClick: (n) => {
|
|
1018
|
-
if (se)
|
|
1019
|
-
ct({
|
|
1020
|
-
...n,
|
|
1021
|
-
checkAll: !0
|
|
1022
|
-
});
|
|
1023
|
-
else {
|
|
1024
|
-
let i = JSON.parse(w);
|
|
1025
|
-
const a = (c == null ? void 0 : c.length) > 0 ? c.reduce(
|
|
1026
|
-
(t, { feature_name: o }) => (t[o] = !0, t),
|
|
1027
|
-
{}
|
|
1028
|
-
) : Object.keys(i).reduce(
|
|
1029
|
-
(t, o) => (t[o] = !0, t),
|
|
1030
|
-
{}
|
|
1031
|
-
);
|
|
1032
|
-
J(
|
|
1033
|
-
(t) => t.map(
|
|
1034
|
-
(o) => o.id === n.id ? {
|
|
1035
|
-
...o,
|
|
1036
|
-
featureJson: JSON.stringify(a)
|
|
1037
|
-
} : o
|
|
1038
|
-
)
|
|
1039
|
-
), ye({
|
|
1040
|
-
...Ze,
|
|
1041
|
-
featureJson: JSON.stringify(a)
|
|
1042
|
-
});
|
|
1043
|
-
}
|
|
1044
|
-
}
|
|
1045
|
-
}
|
|
1046
|
-
]
|
|
1047
|
-
},
|
|
1048
|
-
row: e
|
|
1049
|
-
}
|
|
1050
|
-
)
|
|
1051
|
-
] })
|
|
1052
|
-
]
|
|
1053
|
-
}
|
|
1054
|
-
),
|
|
1055
|
-
/* @__PURE__ */ s(jt, { children: /* @__PURE__ */ s("div", { className: "overflow-x-auto", children: /* @__PURE__ */ s("div", { className: "flex gap-6 w-max", children: /* @__PURE__ */ f("div", { className: "grid grid-cols-3 w-max p-0 m-0", children: [
|
|
1056
|
-
c.length <= 0 && Object.keys(JSON.parse(w || "{}")).length <= 0 && /* @__PURE__ */ s("div", { className: "text-gray-500 px-4 italic", children: "No Data to Display" }),
|
|
1057
|
-
(c == null ? void 0 : c.length) > 0 ? Object.keys(
|
|
1058
|
-
JSON.parse(e.featureJson || "{}")
|
|
1059
|
-
).map((n, i) => {
|
|
1060
|
-
var u, v;
|
|
1061
|
-
const a = JSON.parse(
|
|
1062
|
-
e.featureJson || "{}"
|
|
1063
|
-
), t = ((u = c.find(
|
|
1064
|
-
(D) => D.feature_name === n
|
|
1065
|
-
)) == null ? void 0 : u.display_name) || n, o = a[n] || !1, g = oe(
|
|
1066
|
-
q,
|
|
1067
|
-
t
|
|
1068
|
-
), S = (((v = g == null ? void 0 : g.child) == null ? void 0 : v.length) || 0) > 0;
|
|
1069
|
-
return /* @__PURE__ */ f(
|
|
1070
|
-
Ee,
|
|
1071
|
-
{
|
|
1072
|
-
className: "p-0 flex ",
|
|
1073
|
-
children: [
|
|
1074
|
-
/* @__PURE__ */ s(
|
|
1075
|
-
Te,
|
|
1076
|
-
{
|
|
1077
|
-
control: /* @__PURE__ */ s(
|
|
1078
|
-
_e,
|
|
1079
|
-
{
|
|
1080
|
-
disabled: !ne.hasCheckRights(p == null ? void 0 : p["update.manage.featurelist"]) || n === Ce(),
|
|
1081
|
-
checked: o,
|
|
1082
|
-
name: n,
|
|
1083
|
-
onClick: () => {
|
|
1084
|
-
const D = {
|
|
1085
|
-
...a,
|
|
1086
|
-
[n]: !o
|
|
1087
|
-
};
|
|
1088
|
-
J(
|
|
1089
|
-
(F) => F.map(
|
|
1090
|
-
(h) => h.id === e.id ? {
|
|
1091
|
-
...h,
|
|
1092
|
-
featureJson: JSON.stringify(
|
|
1093
|
-
D
|
|
1094
|
-
)
|
|
1095
|
-
} : h
|
|
1096
|
-
)
|
|
1097
|
-
), ye({
|
|
1098
|
-
...e,
|
|
1099
|
-
featureJson: JSON.stringify(
|
|
1100
|
-
D
|
|
1101
|
-
),
|
|
1102
|
-
code: e.designationId ? "Role" : "User",
|
|
1103
|
-
menuConfigId: r,
|
|
1104
|
-
displayName: e.designationId ? e.roleName : e.fullName
|
|
1105
|
-
});
|
|
1106
|
-
}
|
|
1107
|
-
}
|
|
1108
|
-
),
|
|
1109
|
-
label: /* @__PURE__ */ s(H, { variant: "body2", children: (() => {
|
|
1110
|
-
const D = oe(
|
|
1111
|
-
q,
|
|
1112
|
-
t
|
|
1113
|
-
);
|
|
1114
|
-
return D ? D.name : t;
|
|
1115
|
-
})() })
|
|
1116
|
-
}
|
|
1117
|
-
),
|
|
1118
|
-
S && /* @__PURE__ */ s(
|
|
1119
|
-
"div",
|
|
1120
|
-
{
|
|
1121
|
-
onClick: () => {
|
|
1122
|
-
if ((L == null ? void 0 : L.id) === (g == null ? void 0 : g.id)) {
|
|
1123
|
-
X(null), de(!1), fe(""), me([]);
|
|
1124
|
-
return;
|
|
1125
|
-
}
|
|
1126
|
-
fe(n), me(
|
|
1127
|
-
a
|
|
1128
|
-
), de(!0), X(g);
|
|
1129
|
-
},
|
|
1130
|
-
className: "cursor-pointer text-gray-600 transition-transform duration-200 hover:scale-[1.2] py-1 pr-3",
|
|
1131
|
-
children: (L == null ? void 0 : L.id) === (g == null ? void 0 : g.id) ? /* @__PURE__ */ s(Ae, { title: "Close Permissions", children: /* @__PURE__ */ s(
|
|
1132
|
-
B,
|
|
1133
|
-
{
|
|
1134
|
-
color: "primary",
|
|
1135
|
-
icon: Re
|
|
1136
|
-
}
|
|
1137
|
-
) }) : /* @__PURE__ */ s(Ae, { title: "View Permissions", children: /* @__PURE__ */ s(
|
|
1138
|
-
B,
|
|
1139
|
-
{
|
|
1140
|
-
className: " text-[var(--color-primary)] ",
|
|
1141
|
-
color: "primary",
|
|
1142
|
-
icon: Fe
|
|
1143
|
-
}
|
|
1144
|
-
) })
|
|
1145
|
-
}
|
|
1146
|
-
)
|
|
1147
|
-
]
|
|
1148
|
-
},
|
|
1149
|
-
`featureName-${i}`
|
|
1150
|
-
);
|
|
1151
|
-
}) : Object.keys(JSON.parse(w || "{}")).map(
|
|
1152
|
-
(n, i) => {
|
|
1153
|
-
var S;
|
|
1154
|
-
const a = JSON.parse(
|
|
1155
|
-
e.featureJson || "{}"
|
|
1156
|
-
), t = a[n] || !1, o = oe(
|
|
1157
|
-
q,
|
|
1158
|
-
n
|
|
1159
|
-
), g = (((S = o == null ? void 0 : o.child) == null ? void 0 : S.length) || 0) > 0;
|
|
1160
|
-
return /* @__PURE__ */ f(
|
|
1161
|
-
Ee,
|
|
1162
|
-
{
|
|
1163
|
-
className: "p-0",
|
|
1164
|
-
children: [
|
|
1165
|
-
/* @__PURE__ */ s(
|
|
1166
|
-
Te,
|
|
1167
|
-
{
|
|
1168
|
-
control: /* @__PURE__ */ s(
|
|
1169
|
-
_e,
|
|
1170
|
-
{
|
|
1171
|
-
disabled: !ne.hasCheckRights(p == null ? void 0 : p["update.manage.featurelist"]) || n === Ce(),
|
|
1172
|
-
checked: t,
|
|
1173
|
-
name: n,
|
|
1174
|
-
onClick: () => {
|
|
1175
|
-
const u = {
|
|
1176
|
-
...a,
|
|
1177
|
-
[n]: !t
|
|
1178
|
-
};
|
|
1179
|
-
J(
|
|
1180
|
-
(v) => v.map(
|
|
1181
|
-
(D) => D.id === e.id ? {
|
|
1182
|
-
...D,
|
|
1183
|
-
featureJson: JSON.stringify(
|
|
1184
|
-
u
|
|
1185
|
-
)
|
|
1186
|
-
} : D
|
|
1187
|
-
)
|
|
1188
|
-
), ye({
|
|
1189
|
-
...e,
|
|
1190
|
-
featureJson: JSON.stringify(
|
|
1191
|
-
u
|
|
1192
|
-
),
|
|
1193
|
-
code: e.designationId ? "Role" : "User",
|
|
1194
|
-
menuConfigId: r,
|
|
1195
|
-
displayName: e.designationId ? e.roleName : e.fullName
|
|
1196
|
-
});
|
|
1197
|
-
}
|
|
1198
|
-
}
|
|
1199
|
-
),
|
|
1200
|
-
label: /* @__PURE__ */ s(H, { variant: "body2", children: (() => {
|
|
1201
|
-
const u = oe(
|
|
1202
|
-
q,
|
|
1203
|
-
n
|
|
1204
|
-
);
|
|
1205
|
-
return u ? u.name : n;
|
|
1206
|
-
})() })
|
|
1207
|
-
}
|
|
1208
|
-
),
|
|
1209
|
-
g && /* @__PURE__ */ s(
|
|
1210
|
-
"div",
|
|
1211
|
-
{
|
|
1212
|
-
onClick: () => {
|
|
1213
|
-
if ((L == null ? void 0 : L.id) === (o == null ? void 0 : o.id)) {
|
|
1214
|
-
X(null);
|
|
1215
|
-
return;
|
|
1216
|
-
}
|
|
1217
|
-
X(o);
|
|
1218
|
-
},
|
|
1219
|
-
className: "cursor-pointer text-slate-500 dark:text-slate-400 transition-transform duration-200 hover:scale-[1.2] py-1 pr-3",
|
|
1220
|
-
children: (L == null ? void 0 : L.id) === (o == null ? void 0 : o.id) ? /* @__PURE__ */ s(
|
|
1221
|
-
B,
|
|
1222
|
-
{
|
|
1223
|
-
color: "primary",
|
|
1224
|
-
icon: Re
|
|
1225
|
-
}
|
|
1226
|
-
) : /* @__PURE__ */ s(
|
|
1227
|
-
B,
|
|
1228
|
-
{
|
|
1229
|
-
className: " text-[var(--color-primary)] ",
|
|
1230
|
-
color: "primary",
|
|
1231
|
-
icon: Fe
|
|
1232
|
-
}
|
|
1233
|
-
)
|
|
1234
|
-
}
|
|
1235
|
-
)
|
|
1236
|
-
]
|
|
1237
|
-
},
|
|
1238
|
-
`featureName-${i}`
|
|
1239
|
-
);
|
|
1240
|
-
}
|
|
1241
|
-
)
|
|
1242
|
-
] }) }) }) })
|
|
1243
|
-
]
|
|
1244
|
-
}
|
|
1245
|
-
) })) })
|
|
1246
|
-
] }) });
|
|
1247
|
-
}
|
|
1248
|
-
Yt.propTypes = {
|
|
1249
|
-
subMenuId: l.any,
|
|
1250
|
-
subMenuGroupName: l.any,
|
|
1251
|
-
selectedTab: l.any,
|
|
1252
|
-
parentLoading: l.any,
|
|
1253
|
-
isNewApi: l.any,
|
|
1254
|
-
setIsNewApi: l.any,
|
|
1255
|
-
onNewAPIChange: l.any,
|
|
1256
|
-
subMenuFeatureVal: l.any,
|
|
1257
|
-
rights: l.any
|
|
1258
|
-
};
|
|
1259
|
-
export {
|
|
1260
|
-
Yt as default
|
|
1261
|
-
};
|
|
1262
|
-
//# sourceMappingURL=AccessRights-CHu27ZOw.js.map
|