@argusoft/medplat-core 1.0.26 → 1.0.27
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-CupmTG3T.js → AccessRights-CHu27ZOw.js} +220 -217
- package/dist/AccessRights-CHu27ZOw.js.map +1 -0
- package/dist/{AddEditQueryBuilder-C8ZSkOF0.js → AddEditQueryBuilder-Brdnm6rQ.js} +2 -2
- package/dist/{AddEditQueryBuilder-C8ZSkOF0.js.map → AddEditQueryBuilder-Brdnm6rQ.js.map} +1 -1
- package/dist/{AddFeatures-CqE3v0BN.js → AddFeatures-C0Z29oSd.js} +2 -2
- package/dist/{AddFeatures-CqE3v0BN.js.map → AddFeatures-C0Z29oSd.js.map} +1 -1
- package/dist/{AddLabelModal-CB8E8cYG.js → AddLabelModal-DFllBVcd.js} +2 -2
- package/dist/{AddLabelModal-CB8E8cYG.js.map → AddLabelModal-DFllBVcd.js.map} +1 -1
- package/dist/{AppModal-BKgIwe1h.js → AppModal-CtG2GjD_.js} +2 -2
- package/dist/{AppModal-BKgIwe1h.js.map → AppModal-CtG2GjD_.js.map} +1 -1
- package/dist/{ChangePasswordModalCore-DTYWRTa-.js → ChangePasswordModalCore-CDxkeIIM.js} +2 -2
- package/dist/{ChangePasswordModalCore-DTYWRTa-.js.map → ChangePasswordModalCore-CDxkeIIM.js.map} +1 -1
- package/dist/{EventConfigurations-lPcZGpLi.js → EventConfigurations-kNtAj_WM.js} +76 -76
- package/dist/EventConfigurations-kNtAj_WM.js.map +1 -0
- package/dist/{FeatureMenu-DUZL32RI.js → FeatureMenu-jl7-Tk6y.js} +49 -49
- package/dist/FeatureMenu-jl7-Tk6y.js.map +1 -0
- package/dist/FileSaver.min-CN9EpL2h.js.map +1 -1
- package/dist/{ImmunizationConfigurationsList-K2ddBpPJ.js → ImmunizationConfigurationsList-DdSZicTP.js} +72 -73
- package/dist/{ImmunizationConfigurationsList-K2ddBpPJ.js.map → ImmunizationConfigurationsList-DdSZicTP.js.map} +1 -1
- package/dist/ImmunizationSkeleton-D2tdv5k-.js.map +1 -1
- package/dist/{LanguagesModal-CX3oS8rk.js → LanguagesModal-D6VfaGrl.js} +2 -2
- package/dist/{LanguagesModal-CX3oS8rk.js.map → LanguagesModal-D6VfaGrl.js.map} +1 -1
- package/dist/{ManageNotification-CSl02Wq7.js → ManageNotification-CaBAOhji.js} +2 -2
- package/dist/ManageNotification-CaBAOhji.js.map +1 -0
- package/dist/{ManageRole-B9bs_T00.js → ManageRole-CGYfglpo.js} +2 -2
- package/dist/{ManageRole-B9bs_T00.js.map → ManageRole-CGYfglpo.js.map} +1 -1
- package/dist/{ManageTranslation-D9IScGhk.js → ManageTranslation-B4C9-lWD.js} +74 -74
- package/dist/ManageTranslation-B4C9-lWD.js.map +1 -0
- package/dist/{ManageUser-AB3_Vfp_.js → ManageUser-AY1EUDLI.js} +600 -601
- package/dist/ManageUser-AY1EUDLI.js.map +1 -0
- package/dist/{NotificationList-D1U1LYnz.js → NotificationList-C3Vb_jKU.js} +73 -73
- package/dist/NotificationList-C3Vb_jKU.js.map +1 -0
- package/dist/OtherTypeEventConfigModal-BeG1GrUi.js.map +1 -1
- package/dist/{QueryBuilder-DI0wCJbz.js → QueryBuilder-z7eqfd7D.js} +117 -119
- package/dist/QueryBuilder-z7eqfd7D.js.map +1 -0
- package/dist/{QueryManagement-CRykYGum.js → QueryManagement-BIhEDKuA.js} +114 -114
- package/dist/QueryManagement-BIhEDKuA.js.map +1 -0
- package/dist/{RoleManagement-BIiW9uTq.js → RoleManagement-BPl2cE27.js} +99 -99
- package/dist/RoleManagement-BPl2cE27.js.map +1 -0
- package/dist/{SubMenu-CM_4wNCR.js → SubMenu-DYxAPH2Z.js} +34 -34
- package/dist/SubMenu-DYxAPH2Z.js.map +1 -0
- package/dist/{UserList-2gGuDgNa.js → UserList-Bc8gYxRL.js} +397 -400
- package/dist/UserList-Bc8gYxRL.js.map +1 -0
- package/dist/{WidgetList-B7X8Awkg.js → WidgetList-Dw_FmbbE.js} +26 -26
- package/dist/WidgetList-Dw_FmbbE.js.map +1 -0
- package/dist/i18next-CTOWN_jH.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +10 -10
- package/dist/xlsx.min-D1LFqt_b.js.map +1 -1
- package/package.json +1 -1
- package/dist/AccessRights-CupmTG3T.js.map +0 -1
- package/dist/EventConfigurations-lPcZGpLi.js.map +0 -1
- package/dist/FeatureMenu-DUZL32RI.js.map +0 -1
- package/dist/ManageNotification-CSl02Wq7.js.map +0 -1
- package/dist/ManageTranslation-D9IScGhk.js.map +0 -1
- package/dist/ManageUser-AB3_Vfp_.js.map +0 -1
- package/dist/NotificationList-D1U1LYnz.js.map +0 -1
- package/dist/QueryBuilder-DI0wCJbz.js.map +0 -1
- package/dist/QueryManagement-CRykYGum.js.map +0 -1
- package/dist/RoleManagement-BIiW9uTq.js.map +0 -1
- package/dist/SubMenu-CM_4wNCR.js.map +0 -1
- package/dist/UserList-2gGuDgNa.js.map +0 -1
- package/dist/WidgetList-B7X8Awkg.js.map +0 -1
|
@@ -1,31 +1,31 @@
|
|
|
1
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
|
|
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
3
|
import k from "@mui/material/Grid2";
|
|
4
4
|
import l from "prop-types";
|
|
5
5
|
import It from "@/views/custom-components/CustomConfirmationModal";
|
|
6
|
-
import { useState as m, useEffect as
|
|
6
|
+
import { useState as m, useEffect as ae, createElement as Pe, useRef as Le, useCallback as wt } from "react";
|
|
7
7
|
import { useTheme as vt } from "@mui/material/styles";
|
|
8
|
-
import { a as ee, d as
|
|
8
|
+
import { a as ee, d as bt, b as xe, c as Dt, p as Ct } from "./Features-CObdzJp_.js";
|
|
9
9
|
import { execute as te, getRoleList as kt } from "@/common/services/GlobalApis.js";
|
|
10
10
|
import "@/assets/scss/scrollBar.scss";
|
|
11
11
|
import { useForm as Ie, Controller as Ot } from "react-hook-form";
|
|
12
|
-
import { showToast as
|
|
12
|
+
import { showToast as T } from "@/common/toaster/toaster";
|
|
13
13
|
import Jt from "@/hooks/useTrackEvent";
|
|
14
|
-
import { useTranslateProvider as
|
|
14
|
+
import { useTranslateProvider as ze } from "@/common/languageTranslator/TranslationContext";
|
|
15
15
|
import { FontAwesomeIcon as B } from "@fortawesome/react-fontawesome";
|
|
16
|
-
import { faXmark as Be, faCheck as
|
|
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
17
|
import { yupResolver as Lt } from "@hookform/resolvers/yup";
|
|
18
18
|
import * as V from "yup";
|
|
19
19
|
import ge from "@/views/custom-components/CustomCheckBox";
|
|
20
|
-
import
|
|
21
|
-
import { execute as
|
|
22
|
-
import
|
|
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
23
|
import ne from "@/common/services/util/GeneralUtil";
|
|
24
|
-
import
|
|
24
|
+
import Mt from "@mui/material/Accordion";
|
|
25
25
|
import jt from "@mui/material/AccordionDetails";
|
|
26
26
|
import Ut from "@mui/material/AccordionSummary";
|
|
27
|
-
import { useSelector as
|
|
28
|
-
import { getUseSkeleton as
|
|
27
|
+
import { useSelector as $t } from "react-redux";
|
|
28
|
+
import { getUseSkeleton as zt } from "@/store/reducers/SkeletonReducer";
|
|
29
29
|
const Bt = V.object().shape({
|
|
30
30
|
noStartDate: V.boolean().default(!0),
|
|
31
31
|
noEndDate: V.boolean().default(!0),
|
|
@@ -53,13 +53,13 @@ function Ye({
|
|
|
53
53
|
subMenuId: C,
|
|
54
54
|
newApiData: p
|
|
55
55
|
}) {
|
|
56
|
-
const { translate:
|
|
56
|
+
const { translate: M } = ze(), {
|
|
57
57
|
handleSubmit: j,
|
|
58
|
-
control:
|
|
58
|
+
control: E,
|
|
59
59
|
reset: O,
|
|
60
60
|
watch: x,
|
|
61
61
|
formState: { errors: c },
|
|
62
|
-
trigger:
|
|
62
|
+
trigger: R
|
|
63
63
|
} = Ie({
|
|
64
64
|
resolver: Lt(Bt),
|
|
65
65
|
defaultValues: {
|
|
@@ -70,8 +70,8 @@ function Ye({
|
|
|
70
70
|
isBackendOnly: !1
|
|
71
71
|
},
|
|
72
72
|
mode: "onChange"
|
|
73
|
-
}), Y = x("noStartDate"), J = x("noEndDate"), A = x("startDate"), N = x("endDate"),
|
|
74
|
-
var d,
|
|
73
|
+
}), Y = x("noStartDate"), J = x("noEndDate"), A = x("startDate"), N = x("endDate"), b = async (I) => {
|
|
74
|
+
var d, w;
|
|
75
75
|
if (y) {
|
|
76
76
|
try {
|
|
77
77
|
await te({
|
|
@@ -84,16 +84,16 @@ function Ye({
|
|
|
84
84
|
endDate: I.noEndDate ? null : I.endDate,
|
|
85
85
|
isBackendOnly: I.isBackendOnly
|
|
86
86
|
}
|
|
87
|
-
}),
|
|
87
|
+
}), T({
|
|
88
88
|
type: "success",
|
|
89
89
|
message: "Permission Granted Successfully"
|
|
90
90
|
});
|
|
91
91
|
const { data: U } = await ee(C);
|
|
92
92
|
p(U);
|
|
93
93
|
} catch (U) {
|
|
94
|
-
|
|
94
|
+
T({
|
|
95
95
|
type: "error",
|
|
96
|
-
message: `Error granting permission: ${(
|
|
96
|
+
message: `Error granting permission: ${(w = (d = U == null ? void 0 : U.response) == null ? void 0 : d.data) == null ? void 0 : w.message}`
|
|
97
97
|
});
|
|
98
98
|
}
|
|
99
99
|
O(), _();
|
|
@@ -112,14 +112,14 @@ function Ye({
|
|
|
112
112
|
lg:w-[40vw] lg:max-w-2xl
|
|
113
113
|
xl:w-[30vw] xl:max-w-3xl
|
|
114
114
|
`,
|
|
115
|
-
children: /* @__PURE__ */ f("form", { onSubmit: j(
|
|
115
|
+
children: /* @__PURE__ */ f("form", { onSubmit: j(b), children: [
|
|
116
116
|
/* @__PURE__ */ f(k, { className: "flex justify-between items-center mb-4", children: [
|
|
117
117
|
/* @__PURE__ */ s(
|
|
118
118
|
H,
|
|
119
119
|
{
|
|
120
120
|
variant: "h6",
|
|
121
121
|
className: "text-base sm:text-lg text-customBlue",
|
|
122
|
-
children:
|
|
122
|
+
children: M("Set Access Window")
|
|
123
123
|
}
|
|
124
124
|
),
|
|
125
125
|
/* @__PURE__ */ s(Se, { onClick: P, children: /* @__PURE__ */ s(B, { icon: Be }) })
|
|
@@ -131,16 +131,16 @@ function Ye({
|
|
|
131
131
|
{
|
|
132
132
|
defaultChecked: !0,
|
|
133
133
|
label: "No Start Date",
|
|
134
|
-
control:
|
|
134
|
+
control: E,
|
|
135
135
|
errors: c,
|
|
136
136
|
name: "noStartDate",
|
|
137
|
-
onChange: () =>
|
|
137
|
+
onChange: () => R("startDate")
|
|
138
138
|
}
|
|
139
139
|
),
|
|
140
140
|
/* @__PURE__ */ s(
|
|
141
|
-
|
|
141
|
+
Me,
|
|
142
142
|
{
|
|
143
|
-
control:
|
|
143
|
+
control: E,
|
|
144
144
|
name: "startDate",
|
|
145
145
|
errors: c,
|
|
146
146
|
disabled: Y,
|
|
@@ -154,16 +154,16 @@ function Ye({
|
|
|
154
154
|
ge,
|
|
155
155
|
{
|
|
156
156
|
label: "No End Date",
|
|
157
|
-
control:
|
|
157
|
+
control: E,
|
|
158
158
|
name: "noEndDate",
|
|
159
159
|
errors: c,
|
|
160
|
-
onChange: () =>
|
|
160
|
+
onChange: () => R("endDate")
|
|
161
161
|
}
|
|
162
162
|
),
|
|
163
163
|
/* @__PURE__ */ s(
|
|
164
|
-
|
|
164
|
+
Me,
|
|
165
165
|
{
|
|
166
|
-
control:
|
|
166
|
+
control: E,
|
|
167
167
|
name: "endDate",
|
|
168
168
|
errors: c,
|
|
169
169
|
disabled: J,
|
|
@@ -177,7 +177,7 @@ function Ye({
|
|
|
177
177
|
ge,
|
|
178
178
|
{
|
|
179
179
|
label: "Is Backend Only?",
|
|
180
|
-
control:
|
|
180
|
+
control: E,
|
|
181
181
|
name: "isBackendOnly",
|
|
182
182
|
className: ""
|
|
183
183
|
}
|
|
@@ -192,7 +192,7 @@ function Ye({
|
|
|
192
192
|
onClick: P,
|
|
193
193
|
type: "button",
|
|
194
194
|
className: "mt-2",
|
|
195
|
-
children:
|
|
195
|
+
children: M("Close")
|
|
196
196
|
}
|
|
197
197
|
),
|
|
198
198
|
/* @__PURE__ */ s(
|
|
@@ -203,7 +203,7 @@ function Ye({
|
|
|
203
203
|
size: "small",
|
|
204
204
|
type: "submit",
|
|
205
205
|
className: "mt-2",
|
|
206
|
-
children:
|
|
206
|
+
children: M("Submit")
|
|
207
207
|
}
|
|
208
208
|
)
|
|
209
209
|
] })
|
|
@@ -227,28 +227,28 @@ function qe({
|
|
|
227
227
|
roleList: y,
|
|
228
228
|
featureData: C
|
|
229
229
|
}) {
|
|
230
|
-
const [p,
|
|
231
|
-
(N) => !(C != null && C.some((
|
|
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
232
|
);
|
|
233
|
-
|
|
233
|
+
ae(() => {
|
|
234
234
|
const N = setTimeout(() => {
|
|
235
|
-
|
|
235
|
+
E(p);
|
|
236
236
|
}, 300);
|
|
237
237
|
return () => clearTimeout(N);
|
|
238
|
-
}, [p]),
|
|
238
|
+
}, [p]), ae(() => {
|
|
239
239
|
j !== "" && A(j);
|
|
240
|
-
}, [j]),
|
|
240
|
+
}, [j]), ae(() => {
|
|
241
241
|
A("");
|
|
242
242
|
}, []);
|
|
243
|
-
const A = async (N,
|
|
243
|
+
const A = async (N, b = C) => {
|
|
244
244
|
try {
|
|
245
|
-
const { data: P } = await
|
|
245
|
+
const { data: P } = await Rt({
|
|
246
246
|
code: "user_search_for_selectize",
|
|
247
247
|
parameters: {
|
|
248
248
|
searchString: N
|
|
249
249
|
}
|
|
250
250
|
}), I = ((P == null ? void 0 : P.result) || []).filter((d) => d == null ? void 0 : d.id).filter(
|
|
251
|
-
(d) => !(
|
|
251
|
+
(d) => !(b != null && b.some((w) => (w == null ? void 0 : w.userId) === (d == null ? void 0 : d.id)))
|
|
252
252
|
).map((d) => ({
|
|
253
253
|
...d,
|
|
254
254
|
displayName: `${d.firstName || ""} ${d.lastName || ""} (${d.userName || ""})`.trim()
|
|
@@ -274,22 +274,22 @@ function qe({
|
|
|
274
274
|
users: !0,
|
|
275
275
|
control: c,
|
|
276
276
|
defaultValue: null,
|
|
277
|
-
render: ({ field: { onChange: N, value:
|
|
277
|
+
render: ({ field: { onChange: N, value: b, ref: P } }) => /* @__PURE__ */ s(
|
|
278
278
|
xt,
|
|
279
279
|
{
|
|
280
280
|
options: O,
|
|
281
281
|
getOptionLabel: (I) => I.displayName || "",
|
|
282
282
|
isOptionEqualToValue: (I, d) => I.id === (d == null ? void 0 : d.id),
|
|
283
|
-
value:
|
|
284
|
-
onChange: (I, d,
|
|
285
|
-
|
|
283
|
+
value: b || null,
|
|
284
|
+
onChange: (I, d, w) => {
|
|
285
|
+
w === "clear" && A(""), N(d);
|
|
286
286
|
},
|
|
287
|
-
onInputChange: (I, d,
|
|
288
|
-
|
|
287
|
+
onInputChange: (I, d, w) => {
|
|
288
|
+
w === "input" && M(d);
|
|
289
289
|
},
|
|
290
290
|
renderOption: (I, d) => {
|
|
291
|
-
const
|
|
292
|
-
if (
|
|
291
|
+
const w = d.displayName || "", U = p.trim(), $ = w.toLowerCase().indexOf(U.toLowerCase());
|
|
292
|
+
if ($ === -1)
|
|
293
293
|
return /* @__PURE__ */ Pe(
|
|
294
294
|
"li",
|
|
295
295
|
{
|
|
@@ -297,13 +297,13 @@ function qe({
|
|
|
297
297
|
key: d.id,
|
|
298
298
|
style: { lineHeight: 1.5, fontSize: "14px" }
|
|
299
299
|
},
|
|
300
|
-
|
|
300
|
+
w
|
|
301
301
|
);
|
|
302
|
-
const le =
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
), K =
|
|
306
|
-
|
|
302
|
+
const le = w.substring(0, $), ce = w.substring(
|
|
303
|
+
$,
|
|
304
|
+
$ + U.length
|
|
305
|
+
), K = w.substring(
|
|
306
|
+
$ + U.length
|
|
307
307
|
);
|
|
308
308
|
return /* @__PURE__ */ Pe("li", { ...I, key: d.id }, /* @__PURE__ */ f("span", { className: "inline", children: [
|
|
309
309
|
le,
|
|
@@ -312,7 +312,7 @@ function qe({
|
|
|
312
312
|
] }));
|
|
313
313
|
},
|
|
314
314
|
renderInput: (I) => /* @__PURE__ */ s(
|
|
315
|
-
|
|
315
|
+
$e,
|
|
316
316
|
{
|
|
317
317
|
...I,
|
|
318
318
|
label: "User",
|
|
@@ -329,7 +329,7 @@ function qe({
|
|
|
329
329
|
/* @__PURE__ */ f(k, { className: "flex flex-row flex-2 md:space-x-3 items-center w-full", children: [
|
|
330
330
|
/* @__PURE__ */ s(H, { className: "flex-1", children: r("Role") }),
|
|
331
331
|
/* @__PURE__ */ s(k, { className: "flex-3", children: /* @__PURE__ */ s(
|
|
332
|
-
|
|
332
|
+
Ft,
|
|
333
333
|
{
|
|
334
334
|
id: "selectedRoles",
|
|
335
335
|
name: "selectedRoles",
|
|
@@ -349,9 +349,9 @@ function qe({
|
|
|
349
349
|
{
|
|
350
350
|
variant: "contained",
|
|
351
351
|
size: "small",
|
|
352
|
-
onClick:
|
|
353
|
-
var
|
|
354
|
-
_(N), A("", [...C, { userId: (
|
|
352
|
+
onClick: R((N) => {
|
|
353
|
+
var b;
|
|
354
|
+
_(N), A("", [...C, { userId: (b = N.roles) == null ? void 0 : b.id }]), Y();
|
|
355
355
|
}),
|
|
356
356
|
children: r("add")
|
|
357
357
|
}
|
|
@@ -374,14 +374,14 @@ function We({
|
|
|
374
374
|
featureState: C,
|
|
375
375
|
featureName: p
|
|
376
376
|
}) {
|
|
377
|
-
const
|
|
377
|
+
const M = () => {
|
|
378
378
|
_();
|
|
379
|
-
}, j = C[p] || !1,
|
|
379
|
+
}, j = C[p] || !1, E = (O, x = 0) => {
|
|
380
380
|
if (!O) return null;
|
|
381
|
-
const c = O.child || [],
|
|
381
|
+
const c = O.child || [], R = O.display_name || O.name || O.id;
|
|
382
382
|
return /* @__PURE__ */ f("div", { className: "py-2 ", children: [
|
|
383
383
|
/* @__PURE__ */ f("div", { className: "flex items-center ", children: [
|
|
384
|
-
j ? /* @__PURE__ */ s(B, { icon:
|
|
384
|
+
j ? /* @__PURE__ */ s(B, { icon: Et }) : /* @__PURE__ */ s(B, { icon: Tt }),
|
|
385
385
|
/* @__PURE__ */ s("div", { className: "top-6.5 w-4 border-t border-gray-300" }),
|
|
386
386
|
/* @__PURE__ */ s(
|
|
387
387
|
"div",
|
|
@@ -398,7 +398,7 @@ function We({
|
|
|
398
398
|
transition-all duration-200 cursor-pointer
|
|
399
399
|
|
|
400
400
|
`,
|
|
401
|
-
children:
|
|
401
|
+
children: R
|
|
402
402
|
}
|
|
403
403
|
)
|
|
404
404
|
] }),
|
|
@@ -415,12 +415,12 @@ function We({
|
|
|
415
415
|
}
|
|
416
416
|
),
|
|
417
417
|
/* @__PURE__ */ s("div", { className: "absolute left-0 top-6.5 w-3 border-t border-gray-300" }),
|
|
418
|
-
|
|
418
|
+
E(Y, x + 1)
|
|
419
419
|
] }, J);
|
|
420
420
|
}) })
|
|
421
421
|
] });
|
|
422
422
|
};
|
|
423
|
-
return /* @__PURE__ */ s(je, { open: r, onClose:
|
|
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
424
|
Ue,
|
|
425
425
|
{
|
|
426
426
|
className: `
|
|
@@ -439,13 +439,13 @@ function We({
|
|
|
439
439
|
Se,
|
|
440
440
|
{
|
|
441
441
|
size: "small",
|
|
442
|
-
onClick:
|
|
442
|
+
onClick: M,
|
|
443
443
|
"data-testid": "flywayquery-close-button",
|
|
444
444
|
children: /* @__PURE__ */ s(B, { icon: Be })
|
|
445
445
|
}
|
|
446
446
|
)
|
|
447
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:
|
|
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
449
|
]
|
|
450
450
|
}
|
|
451
451
|
) }) });
|
|
@@ -459,11 +459,11 @@ We.propTypes = {
|
|
|
459
459
|
};
|
|
460
460
|
function He({ config: r, row: _ }) {
|
|
461
461
|
var O;
|
|
462
|
-
const [y, C] = m(null), p = !!y,
|
|
462
|
+
const [y, C] = m(null), p = !!y, M = (x) => {
|
|
463
463
|
x.stopPropagation(), C(x.currentTarget), typeof r.menuClick == "function" && r.menuClick(_);
|
|
464
464
|
}, j = (x) => {
|
|
465
465
|
x && x.stopPropagation(), C(null);
|
|
466
|
-
},
|
|
466
|
+
}, E = (x) => (c) => {
|
|
467
467
|
c.stopPropagation(), typeof x.onClick == "function" && x.onClick(_), C(null);
|
|
468
468
|
};
|
|
469
469
|
return /* @__PURE__ */ f(re, { children: [
|
|
@@ -477,7 +477,7 @@ function He({ config: r, row: _ }) {
|
|
|
477
477
|
backgroundColor: "transparent"
|
|
478
478
|
}
|
|
479
479
|
},
|
|
480
|
-
onClick:
|
|
480
|
+
onClick: M,
|
|
481
481
|
"data-testid": r.dataTestId,
|
|
482
482
|
children: r.icon
|
|
483
483
|
}
|
|
@@ -490,7 +490,7 @@ function He({ config: r, row: _ }) {
|
|
|
490
490
|
onClose: j,
|
|
491
491
|
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
492
492
|
transformOrigin: { vertical: "top", horizontal: "right" },
|
|
493
|
-
children: (O = r.menuItems) == null ? void 0 : O.map((x, c) => /* @__PURE__ */ s(St, { onClick:
|
|
493
|
+
children: (O = r.menuItems) == null ? void 0 : O.map((x, c) => /* @__PURE__ */ s(St, { onClick: E(x), children: x.label }, c))
|
|
494
494
|
}
|
|
495
495
|
)
|
|
496
496
|
] });
|
|
@@ -508,26 +508,29 @@ function Yt({
|
|
|
508
508
|
onNewAPIChange: C,
|
|
509
509
|
rights: p
|
|
510
510
|
}) {
|
|
511
|
-
const
|
|
512
|
-
var n
|
|
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
513
|
if (!q || q.length === 0) return null;
|
|
514
514
|
const e = q.filter(
|
|
515
|
-
(
|
|
516
|
-
var
|
|
517
|
-
return (
|
|
515
|
+
(i) => {
|
|
516
|
+
var a;
|
|
517
|
+
return (a = i == null ? void 0 : i.id) == null ? void 0 : a.startsWith("view");
|
|
518
518
|
}
|
|
519
519
|
);
|
|
520
520
|
if (e && e.length > 0) {
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
if (
|
|
525
|
-
|
|
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;
|
|
526
529
|
}
|
|
527
|
-
return (
|
|
530
|
+
return (n = q[0]) == null ? void 0 : n.id;
|
|
528
531
|
};
|
|
529
|
-
|
|
530
|
-
let e =
|
|
532
|
+
ae(() => {
|
|
533
|
+
let e = E.current;
|
|
531
534
|
return () => {
|
|
532
535
|
x("conversion_event", {
|
|
533
536
|
form: e,
|
|
@@ -537,9 +540,9 @@ function Yt({
|
|
|
537
540
|
};
|
|
538
541
|
}, []);
|
|
539
542
|
const pe = (e) => {
|
|
540
|
-
var
|
|
543
|
+
var i;
|
|
541
544
|
let n;
|
|
542
|
-
return 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;
|
|
543
546
|
};
|
|
544
547
|
l.any;
|
|
545
548
|
const he = (e) => (e == null || e.userMenuItemDtos.forEach((n) => {
|
|
@@ -550,54 +553,54 @@ function Yt({
|
|
|
550
553
|
}), e), ot = async () => {
|
|
551
554
|
var e, n;
|
|
552
555
|
try {
|
|
553
|
-
if (Q((
|
|
554
|
-
const
|
|
555
|
-
Object.entries(JSON.parse(
|
|
556
|
-
([
|
|
557
|
-
t === !0 &&
|
|
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);
|
|
558
561
|
}
|
|
559
562
|
);
|
|
560
563
|
try {
|
|
561
564
|
await te({
|
|
562
565
|
code: "delete_permissions",
|
|
563
566
|
parameters: {
|
|
564
|
-
permissionList:
|
|
565
|
-
roleId: parseInt(
|
|
566
|
-
userId: parseInt(
|
|
567
|
+
permissionList: i,
|
|
568
|
+
roleId: parseInt(z == null ? void 0 : z.designationId),
|
|
569
|
+
userId: parseInt(z == null ? void 0 : z.userId)
|
|
567
570
|
}
|
|
568
|
-
}),
|
|
571
|
+
}), T({
|
|
569
572
|
type: "success",
|
|
570
573
|
message: "Permission Deleted Successfully"
|
|
571
574
|
});
|
|
572
|
-
const { data:
|
|
573
|
-
Z(
|
|
575
|
+
const { data: a } = await ee(r);
|
|
576
|
+
Z(a);
|
|
574
577
|
} catch {
|
|
575
|
-
|
|
578
|
+
T({
|
|
576
579
|
type: "error",
|
|
577
580
|
message: "error occurred"
|
|
578
581
|
});
|
|
579
582
|
}
|
|
580
583
|
} else {
|
|
581
|
-
await
|
|
582
|
-
let { data:
|
|
583
|
-
(
|
|
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);
|
|
584
587
|
}
|
|
585
|
-
K(!1), Q((
|
|
586
|
-
} catch (
|
|
587
|
-
|
|
588
|
+
K(!1), Q((i) => !i);
|
|
589
|
+
} catch (i) {
|
|
590
|
+
T({
|
|
588
591
|
type: "error",
|
|
589
|
-
message: `Error Deleting data: ${(n = (e =
|
|
590
|
-
}), Q((
|
|
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);
|
|
591
594
|
}
|
|
592
595
|
}, rt = (e, n) => {
|
|
593
|
-
const
|
|
596
|
+
const i = new Set(e.map((t) => t.id)), a = [];
|
|
594
597
|
return Object.entries(n).forEach(([t, o]) => {
|
|
595
|
-
o === !0 && !
|
|
598
|
+
o === !0 && !i.has(t) && a.push({ id: t, action: "grant" });
|
|
596
599
|
}), e.forEach((t) => {
|
|
597
|
-
n[t.id] ||
|
|
598
|
-
}),
|
|
600
|
+
n[t.id] || a.push({ id: t.id, action: "revoke" });
|
|
601
|
+
}), a;
|
|
599
602
|
}, { handleSubmit: lt } = Ie({}), ye = async (e) => {
|
|
600
|
-
var n,
|
|
603
|
+
var n, i, a, t, o, g;
|
|
601
604
|
try {
|
|
602
605
|
if (se) {
|
|
603
606
|
e = { ...e, featureJson: JSON.parse(e == null ? void 0 : e.featureJson) };
|
|
@@ -606,11 +609,11 @@ function Yt({
|
|
|
606
609
|
e == null ? void 0 : e.featureJson
|
|
607
610
|
);
|
|
608
611
|
if (((n = S[0]) == null ? void 0 : n.action) === "grant")
|
|
609
|
-
|
|
612
|
+
ie({
|
|
610
613
|
...e,
|
|
611
|
-
id: (
|
|
614
|
+
id: (i = S[0]) == null ? void 0 : i.id
|
|
612
615
|
}), ue(1);
|
|
613
|
-
else if (((
|
|
616
|
+
else if (((a = S[0]) == null ? void 0 : a.action) === "revoke")
|
|
614
617
|
try {
|
|
615
618
|
await te({
|
|
616
619
|
code: "revoke_permission",
|
|
@@ -619,12 +622,12 @@ function Yt({
|
|
|
619
622
|
roleId: parseInt(e == null ? void 0 : e.designationId),
|
|
620
623
|
userId: parseInt(e == null ? void 0 : e.userId)
|
|
621
624
|
}
|
|
622
|
-
}),
|
|
625
|
+
}), T({
|
|
623
626
|
type: "success",
|
|
624
627
|
message: "Permission Revoked Successfully"
|
|
625
628
|
});
|
|
626
629
|
} catch {
|
|
627
|
-
|
|
630
|
+
T({
|
|
628
631
|
type: "error",
|
|
629
632
|
message: "Error in revoking permission"
|
|
630
633
|
});
|
|
@@ -634,7 +637,7 @@ function Yt({
|
|
|
634
637
|
} else
|
|
635
638
|
await Dt(e);
|
|
636
639
|
} catch (S) {
|
|
637
|
-
|
|
640
|
+
T({
|
|
638
641
|
type: "error",
|
|
639
642
|
message: `Error Updating data: ${(g = (o = S == null ? void 0 : S.response) == null ? void 0 : o.data) == null ? void 0 : g.message}`
|
|
640
643
|
});
|
|
@@ -645,15 +648,15 @@ function Yt({
|
|
|
645
648
|
...e,
|
|
646
649
|
featureJson: JSON.parse(e == null ? void 0 : e.featureJson)
|
|
647
650
|
}, e != null && e.checkAll) {
|
|
648
|
-
const
|
|
651
|
+
const i = Object.keys(e == null ? void 0 : e.featureJson).filter((a) => (e == null ? void 0 : e.featureJson[a]) === !1).join(",");
|
|
649
652
|
await te({
|
|
650
653
|
code: "grant_permission_bulk",
|
|
651
654
|
parameters: {
|
|
652
|
-
permission_id_list:
|
|
655
|
+
permission_id_list: i,
|
|
653
656
|
role_id: parseInt(e == null ? void 0 : e.designationId),
|
|
654
657
|
user_id: parseInt(e == null ? void 0 : e.userId)
|
|
655
658
|
}
|
|
656
|
-
}),
|
|
659
|
+
}), T({
|
|
657
660
|
type: "success",
|
|
658
661
|
message: "Permission granted Successfully"
|
|
659
662
|
});
|
|
@@ -664,53 +667,53 @@ function Yt({
|
|
|
664
667
|
console.error(n);
|
|
665
668
|
}
|
|
666
669
|
}, ke = async (e) => {
|
|
667
|
-
var n,
|
|
670
|
+
var n, i, a, t;
|
|
668
671
|
if (!(e != null && e.roles || e != null && e.selectedRoles)) {
|
|
669
|
-
|
|
672
|
+
T({
|
|
670
673
|
message: "Please select either user or role !!",
|
|
671
674
|
type: "info"
|
|
672
675
|
});
|
|
673
676
|
return;
|
|
674
677
|
}
|
|
675
678
|
if (se && c.length < 1) {
|
|
676
|
-
|
|
679
|
+
T({
|
|
677
680
|
message: "Please add permissions first for this feature !!",
|
|
678
681
|
type: "info"
|
|
679
682
|
});
|
|
680
683
|
return;
|
|
681
684
|
}
|
|
682
685
|
try {
|
|
683
|
-
const o = ((n = e == null ? void 0 : e.selectedRoles) == null ? void 0 : n.map((v) => v == null ? void 0 : v.id)) || [], g =
|
|
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(
|
|
684
687
|
(v) => o.includes(v == null ? void 0 : v.designationId)
|
|
685
688
|
) : !1;
|
|
686
689
|
if (g || S)
|
|
687
|
-
|
|
690
|
+
T({
|
|
688
691
|
message: "Selected User Already found please select another id",
|
|
689
692
|
type: "warning"
|
|
690
693
|
});
|
|
691
694
|
else {
|
|
692
695
|
const v = o == null ? void 0 : o.join(","), D = {
|
|
693
|
-
userId: (
|
|
696
|
+
userId: (i = e == null ? void 0 : e.roles) == null ? void 0 : i.id,
|
|
694
697
|
designationId: v || null
|
|
695
|
-
},
|
|
698
|
+
}, F = q.filter(
|
|
696
699
|
(h) => {
|
|
697
700
|
var G;
|
|
698
701
|
return (G = h == null ? void 0 : h.id) == null ? void 0 : G.startsWith("view");
|
|
699
702
|
}
|
|
700
703
|
);
|
|
701
704
|
if (se) {
|
|
702
|
-
const h = (
|
|
705
|
+
const h = (a = F.find(
|
|
703
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)
|
|
704
|
-
)) == null ? void 0 :
|
|
705
|
-
h ?
|
|
707
|
+
)) == null ? void 0 : a.id;
|
|
708
|
+
h ? ie({
|
|
706
709
|
...D,
|
|
707
710
|
id: h
|
|
708
|
-
}) :
|
|
711
|
+
}) : F.some((W) => W.id === "view.report") ? ie({
|
|
709
712
|
...D,
|
|
710
713
|
id: "view.report"
|
|
711
|
-
}) :
|
|
714
|
+
}) : ie({
|
|
712
715
|
...D,
|
|
713
|
-
id: (
|
|
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)
|
|
714
717
|
}), ue(1);
|
|
715
718
|
const { data: G } = await ee(r);
|
|
716
719
|
Z(G);
|
|
@@ -729,10 +732,10 @@ function Yt({
|
|
|
729
732
|
feature_name_list: W
|
|
730
733
|
}
|
|
731
734
|
});
|
|
732
|
-
|
|
735
|
+
R(yt.result);
|
|
733
736
|
} else
|
|
734
|
-
|
|
735
|
-
|
|
737
|
+
R([]);
|
|
738
|
+
T({
|
|
736
739
|
message: "menu item added successfully",
|
|
737
740
|
type: "success"
|
|
738
741
|
});
|
|
@@ -740,20 +743,20 @@ function Yt({
|
|
|
740
743
|
O.current = !0, le({});
|
|
741
744
|
}
|
|
742
745
|
} catch (o) {
|
|
743
|
-
console.error(o),
|
|
746
|
+
console.error(o), T({
|
|
744
747
|
message: "cannot add menu item",
|
|
745
748
|
type: "error"
|
|
746
749
|
});
|
|
747
750
|
}
|
|
748
|
-
}, dt =
|
|
751
|
+
}, dt = wt(
|
|
749
752
|
gt((e) => {
|
|
750
753
|
if (!e)
|
|
751
754
|
J(A);
|
|
752
755
|
else {
|
|
753
756
|
const n = A == null ? void 0 : A.filter(
|
|
754
|
-
(
|
|
755
|
-
var
|
|
756
|
-
return
|
|
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);
|
|
757
760
|
}
|
|
758
761
|
);
|
|
759
762
|
x("search_tracking", {
|
|
@@ -766,37 +769,37 @@ function Yt({
|
|
|
766
769
|
[c, x]
|
|
767
770
|
), ut = (e) => {
|
|
768
771
|
const n = e.target.value.toLowerCase();
|
|
769
|
-
|
|
772
|
+
be(n), dt(n);
|
|
770
773
|
}, ft = (e, n = {}) => {
|
|
771
|
-
const
|
|
772
|
-
return Object.keys(e).forEach((
|
|
773
|
-
Object.prototype.hasOwnProperty.call(n,
|
|
774
|
-
}), JSON.stringify(
|
|
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);
|
|
775
778
|
}, mt = (e, n) => {
|
|
776
|
-
const
|
|
779
|
+
const i = new Set(n.map((t) => t.id)), a = {};
|
|
777
780
|
return e.forEach((t) => {
|
|
778
|
-
|
|
779
|
-
}), JSON.stringify(
|
|
781
|
+
a[t.id] = i.has(t.id);
|
|
782
|
+
}), JSON.stringify(a);
|
|
780
783
|
}, Z = (e) => {
|
|
781
|
-
e == null || e.userMenuItemDtos.forEach((
|
|
782
|
-
|
|
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(
|
|
783
786
|
e == null ? void 0 : e.permissions,
|
|
784
|
-
|
|
785
|
-
),
|
|
787
|
+
a == null ? void 0 : a.permissions
|
|
788
|
+
), a.designationId ? (a.code = "Role", a.displayName = a.roleName) : (a.code = "User", a.displayName = a.fullName);
|
|
786
789
|
});
|
|
787
790
|
const n = [
|
|
788
|
-
...new Set(e.permissions.map((
|
|
791
|
+
...new Set(e.permissions.map((a) => a.id))
|
|
789
792
|
];
|
|
790
|
-
|
|
791
|
-
const
|
|
792
|
-
J(
|
|
793
|
+
R(n), tt(e == null ? void 0 : e.permissions);
|
|
794
|
+
const i = pe(e);
|
|
795
|
+
J(i), N(i);
|
|
793
796
|
};
|
|
794
|
-
|
|
797
|
+
ae(() => {
|
|
795
798
|
(async () => {
|
|
796
|
-
var n,
|
|
799
|
+
var n, i, a;
|
|
797
800
|
try {
|
|
798
801
|
if (r) {
|
|
799
|
-
X(null), Oe(!1), Q((u) => !u),
|
|
802
|
+
X(null), Oe(!1), Q((u) => !u), be("");
|
|
800
803
|
let t, o;
|
|
801
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)
|
|
802
805
|
Z(t);
|
|
@@ -806,13 +809,13 @@ function Yt({
|
|
|
806
809
|
J(u), N(u);
|
|
807
810
|
}
|
|
808
811
|
let g = I;
|
|
809
|
-
if (!
|
|
812
|
+
if (!b || b.length === 0) {
|
|
810
813
|
const { data: u } = await kt();
|
|
811
814
|
d(u), g = u;
|
|
812
815
|
}
|
|
813
816
|
let S;
|
|
814
817
|
if (o)
|
|
815
|
-
S = t.permissions.map((u) => u.id),
|
|
818
|
+
S = t.permissions.map((u) => u.id), R(S);
|
|
816
819
|
else if (S = t.featureJson ? Object.keys(JSON.parse(t.featureJson)) : [], S.length > 0) {
|
|
817
820
|
const [u] = await Promise.all([
|
|
818
821
|
await te({
|
|
@@ -823,14 +826,14 @@ function Yt({
|
|
|
823
826
|
}
|
|
824
827
|
})
|
|
825
828
|
]);
|
|
826
|
-
|
|
829
|
+
R((n = u.data) == null ? void 0 : n.result);
|
|
827
830
|
} else
|
|
828
|
-
|
|
831
|
+
R([]);
|
|
829
832
|
if (g && g.length > 0)
|
|
830
833
|
if (t.isDynamicFeature) {
|
|
831
834
|
const v = JSON.parse(JSON.stringify(g)).filter((D) => {
|
|
832
|
-
const
|
|
833
|
-
return
|
|
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;
|
|
834
837
|
});
|
|
835
838
|
P(v);
|
|
836
839
|
} else
|
|
@@ -838,23 +841,23 @@ function Yt({
|
|
|
838
841
|
Q((u) => !u);
|
|
839
842
|
}
|
|
840
843
|
} catch (t) {
|
|
841
|
-
|
|
844
|
+
T({
|
|
842
845
|
type: "error",
|
|
843
|
-
message: `Error loading initial data: ${(
|
|
846
|
+
message: `Error loading initial data: ${(a = (i = t == null ? void 0 : t.response) == null ? void 0 : i.data) == null ? void 0 : a.message}`
|
|
844
847
|
}), Q((o) => !o);
|
|
845
848
|
}
|
|
846
849
|
})();
|
|
847
850
|
}, [r, C]);
|
|
848
851
|
function oe(e, n) {
|
|
849
|
-
for (const
|
|
850
|
-
if (String(
|
|
851
|
-
return
|
|
852
|
+
for (const i of e)
|
|
853
|
+
if (String(i.id) === String(n))
|
|
854
|
+
return i;
|
|
852
855
|
return null;
|
|
853
856
|
}
|
|
854
|
-
const [pt, Oe] = m(!1), ht = (e) => (n,
|
|
855
|
-
Oe(
|
|
857
|
+
const [pt, Oe] = m(!1), ht = (e) => (n, i) => {
|
|
858
|
+
Oe(i ? e : !1);
|
|
856
859
|
};
|
|
857
|
-
return /* @__PURE__ */ s(Je, { children: (Ve || y) &&
|
|
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: [
|
|
858
861
|
/* @__PURE__ */ s("div", { className: "bg-gray-300 animate-pulse rounded-sm h-[70px] mb-2" }),
|
|
859
862
|
/* @__PURE__ */ s("div", { className: "bg-gray-300 animate-pulse rounded-sm h-[280px] mb-2" })
|
|
860
863
|
] }) }) : /* @__PURE__ */ f(k, { container: !0, sx: { borderTop: `1px solid ${j.palette.divider}` }, children: [
|
|
@@ -863,7 +866,7 @@ function Yt({
|
|
|
863
866
|
{
|
|
864
867
|
description: "Are you sure , Do you want to delete this ?",
|
|
865
868
|
title: "CONFIRM ACTION",
|
|
866
|
-
open: ce &&
|
|
869
|
+
open: ce && we === (z == null ? void 0 : z.id),
|
|
867
870
|
handleClick: ot,
|
|
868
871
|
handleClose: () => K((e) => !e),
|
|
869
872
|
dataTestId: "accessrights-delete-modal"
|
|
@@ -876,8 +879,8 @@ function Yt({
|
|
|
876
879
|
onClose: () => {
|
|
877
880
|
de((e) => !e), X(null), fe(""), me([]);
|
|
878
881
|
},
|
|
879
|
-
featureState:
|
|
880
|
-
featureName:
|
|
882
|
+
featureState: it,
|
|
883
|
+
featureName: at,
|
|
881
884
|
permissions: L
|
|
882
885
|
}
|
|
883
886
|
),
|
|
@@ -894,7 +897,7 @@ function Yt({
|
|
|
894
897
|
/* @__PURE__ */ s(
|
|
895
898
|
"form",
|
|
896
899
|
{
|
|
897
|
-
ref:
|
|
900
|
+
ref: E,
|
|
898
901
|
onSubmit: lt(ke),
|
|
899
902
|
className: "w-full",
|
|
900
903
|
children: /* @__PURE__ */ f(
|
|
@@ -907,7 +910,7 @@ function Yt({
|
|
|
907
910
|
/* @__PURE__ */ f(k, { className: "flex-1 flex space-x-10 items-center justify-between", children: [
|
|
908
911
|
/* @__PURE__ */ s(H, { variant: "body2", children: De("Search") }),
|
|
909
912
|
/* @__PURE__ */ s(re, { children: /* @__PURE__ */ s(
|
|
910
|
-
|
|
913
|
+
$e,
|
|
911
914
|
{
|
|
912
915
|
id: "searchQuery",
|
|
913
916
|
placeholder: "Search Text",
|
|
@@ -923,12 +926,12 @@ function Yt({
|
|
|
923
926
|
}
|
|
924
927
|
) })
|
|
925
928
|
] }),
|
|
926
|
-
|
|
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(
|
|
927
930
|
qe,
|
|
928
931
|
{
|
|
929
932
|
translate: De,
|
|
930
933
|
onSubmit: ke,
|
|
931
|
-
roleList:
|
|
934
|
+
roleList: b,
|
|
932
935
|
featureData: Y
|
|
933
936
|
}
|
|
934
937
|
) })
|
|
@@ -938,7 +941,7 @@ function Yt({
|
|
|
938
941
|
}
|
|
939
942
|
),
|
|
940
943
|
/* @__PURE__ */ s("div", { style: { width: "100%" }, children: Y.map((e) => /* @__PURE__ */ s(Je, { children: /* @__PURE__ */ f(
|
|
941
|
-
|
|
944
|
+
Mt,
|
|
942
945
|
{
|
|
943
946
|
expanded: pt === `panel${e == null ? void 0 : e.id}`,
|
|
944
947
|
onChange: ht(`panel${e == null ? void 0 : e.id}`),
|
|
@@ -967,7 +970,7 @@ function Yt({
|
|
|
967
970
|
}
|
|
968
971
|
),
|
|
969
972
|
/* @__PURE__ */ f("div", { className: "ml-auto mr-4 flex items-center space-x-3", children: [
|
|
970
|
-
|
|
973
|
+
ne.hasCheckRights(p == null ? void 0 : p["delete.manage.featurelist"]) && /* @__PURE__ */ s(
|
|
971
974
|
B,
|
|
972
975
|
{
|
|
973
976
|
icon: _t,
|
|
@@ -982,7 +985,7 @@ function Yt({
|
|
|
982
985
|
}
|
|
983
986
|
}
|
|
984
987
|
),
|
|
985
|
-
|
|
988
|
+
ne.hasCheckRights(p == null ? void 0 : p["update.manage.featurelist"]) && /* @__PURE__ */ s(
|
|
986
989
|
He,
|
|
987
990
|
{
|
|
988
991
|
config: {
|
|
@@ -1018,11 +1021,11 @@ function Yt({
|
|
|
1018
1021
|
checkAll: !0
|
|
1019
1022
|
});
|
|
1020
1023
|
else {
|
|
1021
|
-
let
|
|
1022
|
-
const
|
|
1024
|
+
let i = JSON.parse(w);
|
|
1025
|
+
const a = (c == null ? void 0 : c.length) > 0 ? c.reduce(
|
|
1023
1026
|
(t, { feature_name: o }) => (t[o] = !0, t),
|
|
1024
1027
|
{}
|
|
1025
|
-
) : Object.keys(
|
|
1028
|
+
) : Object.keys(i).reduce(
|
|
1026
1029
|
(t, o) => (t[o] = !0, t),
|
|
1027
1030
|
{}
|
|
1028
1031
|
);
|
|
@@ -1030,12 +1033,12 @@ function Yt({
|
|
|
1030
1033
|
(t) => t.map(
|
|
1031
1034
|
(o) => o.id === n.id ? {
|
|
1032
1035
|
...o,
|
|
1033
|
-
featureJson: JSON.stringify(
|
|
1036
|
+
featureJson: JSON.stringify(a)
|
|
1034
1037
|
} : o
|
|
1035
1038
|
)
|
|
1036
1039
|
), ye({
|
|
1037
1040
|
...Ze,
|
|
1038
|
-
featureJson: JSON.stringify(
|
|
1041
|
+
featureJson: JSON.stringify(a)
|
|
1039
1042
|
});
|
|
1040
1043
|
}
|
|
1041
1044
|
}
|
|
@@ -1050,40 +1053,40 @@ function Yt({
|
|
|
1050
1053
|
}
|
|
1051
1054
|
),
|
|
1052
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: [
|
|
1053
|
-
c.length <= 0 && Object.keys(JSON.parse(
|
|
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" }),
|
|
1054
1057
|
(c == null ? void 0 : c.length) > 0 ? Object.keys(
|
|
1055
1058
|
JSON.parse(e.featureJson || "{}")
|
|
1056
|
-
).map((n,
|
|
1059
|
+
).map((n, i) => {
|
|
1057
1060
|
var u, v;
|
|
1058
|
-
const
|
|
1061
|
+
const a = JSON.parse(
|
|
1059
1062
|
e.featureJson || "{}"
|
|
1060
1063
|
), t = ((u = c.find(
|
|
1061
1064
|
(D) => D.feature_name === n
|
|
1062
|
-
)) == null ? void 0 : u.display_name) || n, o =
|
|
1065
|
+
)) == null ? void 0 : u.display_name) || n, o = a[n] || !1, g = oe(
|
|
1063
1066
|
q,
|
|
1064
1067
|
t
|
|
1065
1068
|
), S = (((v = g == null ? void 0 : g.child) == null ? void 0 : v.length) || 0) > 0;
|
|
1066
1069
|
return /* @__PURE__ */ f(
|
|
1067
|
-
|
|
1070
|
+
Ee,
|
|
1068
1071
|
{
|
|
1069
1072
|
className: "p-0 flex ",
|
|
1070
1073
|
children: [
|
|
1071
1074
|
/* @__PURE__ */ s(
|
|
1072
|
-
|
|
1075
|
+
Te,
|
|
1073
1076
|
{
|
|
1074
1077
|
control: /* @__PURE__ */ s(
|
|
1075
1078
|
_e,
|
|
1076
1079
|
{
|
|
1077
|
-
disabled: ne.
|
|
1080
|
+
disabled: !ne.hasCheckRights(p == null ? void 0 : p["update.manage.featurelist"]) || n === Ce(),
|
|
1078
1081
|
checked: o,
|
|
1079
1082
|
name: n,
|
|
1080
1083
|
onClick: () => {
|
|
1081
1084
|
const D = {
|
|
1082
|
-
...
|
|
1085
|
+
...a,
|
|
1083
1086
|
[n]: !o
|
|
1084
1087
|
};
|
|
1085
1088
|
J(
|
|
1086
|
-
(
|
|
1089
|
+
(F) => F.map(
|
|
1087
1090
|
(h) => h.id === e.id ? {
|
|
1088
1091
|
...h,
|
|
1089
1092
|
featureJson: JSON.stringify(
|
|
@@ -1121,7 +1124,7 @@ function Yt({
|
|
|
1121
1124
|
return;
|
|
1122
1125
|
}
|
|
1123
1126
|
fe(n), me(
|
|
1124
|
-
|
|
1127
|
+
a
|
|
1125
1128
|
), de(!0), X(g);
|
|
1126
1129
|
},
|
|
1127
1130
|
className: "cursor-pointer text-gray-600 transition-transform duration-200 hover:scale-[1.2] py-1 pr-3",
|
|
@@ -1129,48 +1132,48 @@ function Yt({
|
|
|
1129
1132
|
B,
|
|
1130
1133
|
{
|
|
1131
1134
|
color: "primary",
|
|
1132
|
-
icon:
|
|
1135
|
+
icon: Re
|
|
1133
1136
|
}
|
|
1134
1137
|
) }) : /* @__PURE__ */ s(Ae, { title: "View Permissions", children: /* @__PURE__ */ s(
|
|
1135
1138
|
B,
|
|
1136
1139
|
{
|
|
1137
1140
|
className: " text-[var(--color-primary)] ",
|
|
1138
1141
|
color: "primary",
|
|
1139
|
-
icon:
|
|
1142
|
+
icon: Fe
|
|
1140
1143
|
}
|
|
1141
1144
|
) })
|
|
1142
1145
|
}
|
|
1143
1146
|
)
|
|
1144
1147
|
]
|
|
1145
1148
|
},
|
|
1146
|
-
`featureName-${
|
|
1149
|
+
`featureName-${i}`
|
|
1147
1150
|
);
|
|
1148
|
-
}) : Object.keys(JSON.parse(
|
|
1149
|
-
(n,
|
|
1151
|
+
}) : Object.keys(JSON.parse(w || "{}")).map(
|
|
1152
|
+
(n, i) => {
|
|
1150
1153
|
var S;
|
|
1151
|
-
const
|
|
1154
|
+
const a = JSON.parse(
|
|
1152
1155
|
e.featureJson || "{}"
|
|
1153
|
-
), t =
|
|
1156
|
+
), t = a[n] || !1, o = oe(
|
|
1154
1157
|
q,
|
|
1155
1158
|
n
|
|
1156
1159
|
), g = (((S = o == null ? void 0 : o.child) == null ? void 0 : S.length) || 0) > 0;
|
|
1157
1160
|
return /* @__PURE__ */ f(
|
|
1158
|
-
|
|
1161
|
+
Ee,
|
|
1159
1162
|
{
|
|
1160
1163
|
className: "p-0",
|
|
1161
1164
|
children: [
|
|
1162
1165
|
/* @__PURE__ */ s(
|
|
1163
|
-
|
|
1166
|
+
Te,
|
|
1164
1167
|
{
|
|
1165
1168
|
control: /* @__PURE__ */ s(
|
|
1166
1169
|
_e,
|
|
1167
1170
|
{
|
|
1168
|
-
disabled: ne.
|
|
1171
|
+
disabled: !ne.hasCheckRights(p == null ? void 0 : p["update.manage.featurelist"]) || n === Ce(),
|
|
1169
1172
|
checked: t,
|
|
1170
1173
|
name: n,
|
|
1171
1174
|
onClick: () => {
|
|
1172
1175
|
const u = {
|
|
1173
|
-
...
|
|
1176
|
+
...a,
|
|
1174
1177
|
[n]: !t
|
|
1175
1178
|
};
|
|
1176
1179
|
J(
|
|
@@ -1218,21 +1221,21 @@ function Yt({
|
|
|
1218
1221
|
B,
|
|
1219
1222
|
{
|
|
1220
1223
|
color: "primary",
|
|
1221
|
-
icon:
|
|
1224
|
+
icon: Re
|
|
1222
1225
|
}
|
|
1223
1226
|
) : /* @__PURE__ */ s(
|
|
1224
1227
|
B,
|
|
1225
1228
|
{
|
|
1226
1229
|
className: " text-[var(--color-primary)] ",
|
|
1227
1230
|
color: "primary",
|
|
1228
|
-
icon:
|
|
1231
|
+
icon: Fe
|
|
1229
1232
|
}
|
|
1230
1233
|
)
|
|
1231
1234
|
}
|
|
1232
1235
|
)
|
|
1233
1236
|
]
|
|
1234
1237
|
},
|
|
1235
|
-
`featureName-${
|
|
1238
|
+
`featureName-${i}`
|
|
1236
1239
|
);
|
|
1237
1240
|
}
|
|
1238
1241
|
)
|
|
@@ -1256,4 +1259,4 @@ Yt.propTypes = {
|
|
|
1256
1259
|
export {
|
|
1257
1260
|
Yt as default
|
|
1258
1261
|
};
|
|
1259
|
-
//# sourceMappingURL=AccessRights-
|
|
1262
|
+
//# sourceMappingURL=AccessRights-CHu27ZOw.js.map
|