@archbase/security-ui 4.0.34 → 4.0.36
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/archbase-security-ui-4.0.36.tgz +0 -0
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +361 -341
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
- package/dist/archbase-security-ui-4.0.34.tgz +0 -0
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Modal as Fe, ScrollArea as ye, Stack as oe, Grid as D, Group as $, Button as U, Paper as Y, Box as He, Text as H, List as De, Checkbox as Je, Tooltip as se, ActionIcon as B, Flex as
|
|
2
|
-
import { getI18nextInstance as
|
|
3
|
-
import { ArchbaseEdit as ee, ArchbaseNotifications as Q, ArchbasePasswordEdit as Kr, ArchbaseSelect as _r, ArchbaseCheckbox as xe, ArchbaseAvatarEdit as
|
|
4
|
-
import { useArchbaseV1V2Compatibility as ke, useArchbaseDataSourceListener as Xe, useArchbaseRemoteServiceApi as _, useArchbaseRemoteDataSource as Me, ArchbaseDataSource as
|
|
5
|
-
import { useState as M, useCallback as ge, useEffect as Re, forwardRef as
|
|
1
|
+
import { Modal as Fe, ScrollArea as ye, Stack as oe, Grid as D, Group as $, Button as U, Paper as Y, Box as He, Text as H, List as De, Checkbox as Je, Tooltip as se, ActionIcon as B, Flex as ae, Space as sr, Input as he, useTree as Ze, useMantineColorScheme as Oe, TextInput as Qe, Tree as Ye, Badge as Se, Tabs as ie, RingProgress as Jr } from "@mantine/core";
|
|
2
|
+
import { getI18nextInstance as a, ARCHBASE_IOC_API_TYPE as X, emit as ze, builder as Te, convertDateToISOString as Zr, processErrorMessage as Ae, getKeyByEnumValue as le, useArchbaseTheme as nr, useArchbaseValidator as Qr, useArchbaseTranslation as Yr, useValidationErrors as Xr, processDetailErrorMessage as Ie } from "@archbase/core";
|
|
3
|
+
import { ArchbaseEdit as ee, ArchbaseNotifications as Q, ArchbasePasswordEdit as Kr, ArchbaseSelect as _r, ArchbaseCheckbox as xe, ArchbaseAvatarEdit as et, ArchbaseAsyncSelect as rt, Columns as me, ArchbaseDataGridColumn as f, ArchbaseDataGrid as be, ArchbaseDialog as K } from "@archbase/components";
|
|
4
|
+
import { useArchbaseV1V2Compatibility as ke, useArchbaseDataSourceListener as Xe, useArchbaseRemoteServiceApi as _, useArchbaseRemoteDataSource as Me, ArchbaseDataSource as tt, useArchbaseStore as ir, useArchbaseRemoteDataSourceV2 as we, useArchbaseDataSource as at } from "@archbase/data";
|
|
5
|
+
import { useState as M, useCallback as ge, useEffect as Re, forwardRef as ot, useMemo as pe, useRef as je } from "react";
|
|
6
6
|
import { IconArrowRight as lr, IconArrowLeft as cr, IconChevronDown as Ke, IconBorderCornerSquare as _e, IconEye as $e, IconEdit as fe, IconTrashX as Ce, IconShieldCheckered as Le, IconPlus as Ee } from "@tabler/icons-react";
|
|
7
|
-
import { UserGroupDto as er, SecurityType as k, UserDto as
|
|
8
|
-
import { DateTimePicker as
|
|
9
|
-
import { useFocusTrap as
|
|
10
|
-
import { ArchbaseSpaceFixed as
|
|
7
|
+
import { UserGroupDto as er, SecurityType as k, UserDto as st, GroupDto as nt, ProfileDto as it, ApiTokenDto as lt } from "@archbase/security";
|
|
8
|
+
import { DateTimePicker as ct } from "@mantine/dates";
|
|
9
|
+
import { useFocusTrap as dt, useDebouncedValue as rr } from "@mantine/hooks";
|
|
10
|
+
import { ArchbaseSpaceFixed as ut, ArchbaseSpaceFill as ht, ArchbaseSpaceBottom as xt } from "@archbase/layout";
|
|
11
11
|
var Ve = { exports: {} }, ve = {};
|
|
12
12
|
/**
|
|
13
13
|
* @license React
|
|
@@ -18,36 +18,36 @@ var Ve = { exports: {} }, ve = {};
|
|
|
18
18
|
* This source code is licensed under the MIT license found in the
|
|
19
19
|
* LICENSE file in the root directory of this source tree.
|
|
20
20
|
*/
|
|
21
|
-
var
|
|
22
|
-
function
|
|
23
|
-
if (
|
|
21
|
+
var tr;
|
|
22
|
+
function pt() {
|
|
23
|
+
if (tr)
|
|
24
24
|
return ve;
|
|
25
|
-
|
|
25
|
+
tr = 1;
|
|
26
26
|
var r = Symbol.for("react.transitional.element"), h = Symbol.for("react.fragment");
|
|
27
|
-
function w(d, l,
|
|
27
|
+
function w(d, l, m) {
|
|
28
28
|
var S = null;
|
|
29
|
-
if (
|
|
30
|
-
|
|
29
|
+
if (m !== void 0 && (S = "" + m), l.key !== void 0 && (S = "" + l.key), "key" in l) {
|
|
30
|
+
m = {};
|
|
31
31
|
for (var u in l)
|
|
32
|
-
u !== "key" && (
|
|
32
|
+
u !== "key" && (m[u] = l[u]);
|
|
33
33
|
} else
|
|
34
|
-
|
|
35
|
-
return l =
|
|
34
|
+
m = l;
|
|
35
|
+
return l = m.ref, {
|
|
36
36
|
$$typeof: r,
|
|
37
37
|
type: d,
|
|
38
38
|
key: S,
|
|
39
39
|
ref: l !== void 0 ? l : null,
|
|
40
|
-
props:
|
|
40
|
+
props: m
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
43
|
return ve.Fragment = h, ve.jsx = w, ve.jsxs = w, ve;
|
|
44
44
|
}
|
|
45
|
-
var
|
|
46
|
-
function
|
|
47
|
-
return
|
|
45
|
+
var ar;
|
|
46
|
+
function ft() {
|
|
47
|
+
return ar || (ar = 1, Ve.exports = pt()), Ve.exports;
|
|
48
48
|
}
|
|
49
|
-
var e =
|
|
50
|
-
const
|
|
49
|
+
var e = ft();
|
|
50
|
+
const mt = (r) => {
|
|
51
51
|
const h = { ...r.options ?? {} }, w = () => {
|
|
52
52
|
r.onCustomSave ? r.onCustomSave(r.dataSource.getCurrentRecord(), (l) => {
|
|
53
53
|
l && r.onAfterSave && r.onAfterSave(r.dataSource.getCurrentRecord()), r.onClickOk(r.dataSource.getCurrentRecord(), l);
|
|
@@ -60,7 +60,7 @@ const ma = (r) => {
|
|
|
60
60
|
{
|
|
61
61
|
opened: r.opened,
|
|
62
62
|
onClose: d,
|
|
63
|
-
title:
|
|
63
|
+
title: a().t("archbase:Perfil"),
|
|
64
64
|
size: "60%",
|
|
65
65
|
styles: { content: { maxWidth: 1e3 } },
|
|
66
66
|
children: /* @__PURE__ */ e.jsx(ye, { style: { height: "460px" }, children: /* @__PURE__ */ e.jsxs(oe, { w: "98%", children: [
|
|
@@ -69,8 +69,8 @@ const ma = (r) => {
|
|
|
69
69
|
/* @__PURE__ */ e.jsx(D.Col, { span: { base: 12, md: 12, lg: 12 }, children: /* @__PURE__ */ e.jsx(
|
|
70
70
|
ee,
|
|
71
71
|
{
|
|
72
|
-
label: `${
|
|
73
|
-
placeholder: `${
|
|
72
|
+
label: `${a().t("archbase:Nome do perfil")}`,
|
|
73
|
+
placeholder: `${a().t("archbase:Informe o nome do perfil")}`,
|
|
74
74
|
dataSource: r.dataSource,
|
|
75
75
|
dataField: "name"
|
|
76
76
|
}
|
|
@@ -78,8 +78,8 @@ const ma = (r) => {
|
|
|
78
78
|
/* @__PURE__ */ e.jsx(D.Col, { span: { base: 12, md: 12, lg: 12 }, children: /* @__PURE__ */ e.jsx(
|
|
79
79
|
ee,
|
|
80
80
|
{
|
|
81
|
-
label: `${
|
|
82
|
-
placeholder: `${
|
|
81
|
+
label: `${a().t("archbase:Descrição do perfil")}`,
|
|
82
|
+
placeholder: `${a().t("archbase:Informe a descrição do perfil")}`,
|
|
83
83
|
dataSource: r.dataSource,
|
|
84
84
|
dataField: "description"
|
|
85
85
|
}
|
|
@@ -87,20 +87,20 @@ const ma = (r) => {
|
|
|
87
87
|
] }),
|
|
88
88
|
h?.customContentAfter && h.customContentAfter(r.dataSource.getCurrentRecord()),
|
|
89
89
|
/* @__PURE__ */ e.jsxs($, { justify: "flex-end", mt: "md", children: [
|
|
90
|
-
/* @__PURE__ */ e.jsx(U, { variant: "default", onClick: d, children:
|
|
91
|
-
/* @__PURE__ */ e.jsx(U, { onClick: w, children:
|
|
90
|
+
/* @__PURE__ */ e.jsx(U, { variant: "default", onClick: d, children: a().t("archbase:Cancelar") }),
|
|
91
|
+
/* @__PURE__ */ e.jsx(U, { onClick: w, children: a().t("archbase:Salvar") })
|
|
92
92
|
] })
|
|
93
93
|
] }) })
|
|
94
94
|
}
|
|
95
95
|
);
|
|
96
96
|
};
|
|
97
|
-
function
|
|
97
|
+
function bt({
|
|
98
98
|
availableItemsDS: r,
|
|
99
99
|
assignedItemsDS: h,
|
|
100
100
|
idFieldAvailable: w,
|
|
101
101
|
labelFieldAvailable: d,
|
|
102
102
|
idFieldAssigned: l,
|
|
103
|
-
labelFieldAssigned:
|
|
103
|
+
labelFieldAssigned: m,
|
|
104
104
|
handleCreateAssociationObject: S,
|
|
105
105
|
width: u = "400px",
|
|
106
106
|
height: P = "200px",
|
|
@@ -118,7 +118,7 @@ function ba({
|
|
|
118
118
|
h,
|
|
119
119
|
void 0,
|
|
120
120
|
[]
|
|
121
|
-
), [c, L] = M([]), [
|
|
121
|
+
), [c, L] = M([]), [g, re] = M([]), [J, te] = M([]), [Z, F] = M([]), N = ge(() => {
|
|
122
122
|
r && L(r.browseRecords()), h && re(h.browseRecords());
|
|
123
123
|
}, [r, h]);
|
|
124
124
|
Xe({
|
|
@@ -130,22 +130,22 @@ function ba({
|
|
|
130
130
|
}), Re(() => {
|
|
131
131
|
N();
|
|
132
132
|
}, [N]);
|
|
133
|
-
const I = (x,
|
|
134
|
-
x((
|
|
133
|
+
const I = (x, j) => typeof j == "function" ? j(x) : x[j], q = (x, j) => typeof j == "function" ? j(x) : x[j], o = (x, j) => {
|
|
134
|
+
x((b) => b.includes(j) ? b.filter((ce) => ce !== j) : [...b, j]);
|
|
135
135
|
}, R = () => {
|
|
136
136
|
J.forEach((x) => {
|
|
137
|
-
const
|
|
138
|
-
if (
|
|
139
|
-
const
|
|
140
|
-
i.isDataSourceV2 ? (h.insert(
|
|
137
|
+
const j = c.find((b) => I(b, w) === x);
|
|
138
|
+
if (j) {
|
|
139
|
+
const b = S(j);
|
|
140
|
+
i.isDataSourceV2 ? (h.insert(b), h.save()) : (h.insert(b), h.save(), i.v1State.forceUpdate());
|
|
141
141
|
}
|
|
142
|
-
}),
|
|
142
|
+
}), te([]);
|
|
143
143
|
}, W = () => {
|
|
144
144
|
Z.forEach((x) => {
|
|
145
|
-
const
|
|
146
|
-
if (
|
|
147
|
-
const
|
|
148
|
-
i.isDataSourceV2 ? h.remove(() => h.locate(
|
|
145
|
+
const j = g.find((b) => I(b, l) === x);
|
|
146
|
+
if (j) {
|
|
147
|
+
const b = typeof l == "function" ? { customId: l(j) } : { [l]: x };
|
|
148
|
+
i.isDataSourceV2 ? h.remove(() => h.locate(b)) : (h.remove(() => h.locate(b)), i.v1State.forceUpdate());
|
|
149
149
|
}
|
|
150
150
|
}), F([]);
|
|
151
151
|
};
|
|
@@ -170,9 +170,9 @@ function ba({
|
|
|
170
170
|
{
|
|
171
171
|
label: q(x, d),
|
|
172
172
|
checked: J.includes(I(x, w)),
|
|
173
|
-
onChange: () => o(
|
|
174
|
-
disabled:
|
|
175
|
-
(
|
|
173
|
+
onChange: () => o(te, I(x, w)),
|
|
174
|
+
disabled: g.some(
|
|
175
|
+
(j) => I(j, l) === I(x, w)
|
|
176
176
|
)
|
|
177
177
|
}
|
|
178
178
|
) }, I(x, w)))
|
|
@@ -198,10 +198,10 @@ function ba({
|
|
|
198
198
|
overflowX: "hidden",
|
|
199
199
|
height: "calc(100% - 32px)"
|
|
200
200
|
},
|
|
201
|
-
children:
|
|
201
|
+
children: g.map((x) => /* @__PURE__ */ e.jsx(De.Item, { children: /* @__PURE__ */ e.jsx(
|
|
202
202
|
Je,
|
|
203
203
|
{
|
|
204
|
-
label: q(x,
|
|
204
|
+
label: q(x, m),
|
|
205
205
|
checked: Z.includes(I(x, l)),
|
|
206
206
|
onChange: () => o(F, I(x, l))
|
|
207
207
|
}
|
|
@@ -211,12 +211,12 @@ function ba({
|
|
|
211
211
|
] })
|
|
212
212
|
] });
|
|
213
213
|
}
|
|
214
|
-
const
|
|
215
|
-
({ image: r, label: h, description: w, origin: d, ...l },
|
|
214
|
+
const gt = ot(
|
|
215
|
+
({ image: r, label: h, description: w, origin: d, ...l }, m) => /* @__PURE__ */ e.jsx("div", { ref: m, ...l, children: /* @__PURE__ */ e.jsxs(ae, { children: [
|
|
216
216
|
/* @__PURE__ */ e.jsx(H, { size: "sm", fw: 600, children: d ? d.name : "" }),
|
|
217
217
|
/* @__PURE__ */ e.jsx(sr, { w: "lg" })
|
|
218
218
|
] }) })
|
|
219
|
-
),
|
|
219
|
+
), jt = {
|
|
220
220
|
// Campos de identificação
|
|
221
221
|
showNickname: !0,
|
|
222
222
|
// Campos de perfil e grupos
|
|
@@ -236,15 +236,15 @@ const ga = oa(
|
|
|
236
236
|
avatarMaxSizeKB: 2e3,
|
|
237
237
|
avatarImageQuality: 1,
|
|
238
238
|
allowEditEmail: !0
|
|
239
|
-
},
|
|
240
|
-
const [h, w] = M(""), d = { ...
|
|
239
|
+
}, yt = (r) => {
|
|
240
|
+
const [h, w] = M(""), d = { ...jt, ...r.options ?? {} }, l = _(X.Group), { dataSource: m } = Me({
|
|
241
241
|
name: "dsGroups",
|
|
242
242
|
service: l,
|
|
243
243
|
pageSize: 9999,
|
|
244
244
|
loadOnStart: !0,
|
|
245
245
|
sort: ["name:asc"],
|
|
246
246
|
onError: (i, c) => {
|
|
247
|
-
Q.showError(
|
|
247
|
+
Q.showError(a().t("archbase:WARNING"), i, c);
|
|
248
248
|
}
|
|
249
249
|
});
|
|
250
250
|
console.log("versão 12/05/2026");
|
|
@@ -255,7 +255,7 @@ const ga = oa(
|
|
|
255
255
|
loadOnStart: !0,
|
|
256
256
|
sort: ["name:asc"],
|
|
257
257
|
onError: (i, c) => {
|
|
258
|
-
Q.showError(
|
|
258
|
+
Q.showError(a().t("archbase:WARNING"), i, c);
|
|
259
259
|
}
|
|
260
260
|
});
|
|
261
261
|
Re(() => {
|
|
@@ -279,7 +279,7 @@ const ga = oa(
|
|
|
279
279
|
const p = () => {
|
|
280
280
|
const i = r.dataSource.getCurrentRecord();
|
|
281
281
|
if (!i.password && r.dataSource.isInserting()) {
|
|
282
|
-
w(
|
|
282
|
+
w(a().t("archbase:Informe a senha"));
|
|
283
283
|
return;
|
|
284
284
|
}
|
|
285
285
|
r.onCustomSave ? r.onCustomSave(i, (c) => {
|
|
@@ -293,7 +293,7 @@ const ga = oa(
|
|
|
293
293
|
{
|
|
294
294
|
opened: r.opened,
|
|
295
295
|
onClose: C,
|
|
296
|
-
title:
|
|
296
|
+
title: a().t("archbase:Usuário"),
|
|
297
297
|
size: "80%",
|
|
298
298
|
styles: { content: { maxWidth: 1e3 } },
|
|
299
299
|
children: [
|
|
@@ -304,8 +304,8 @@ const ga = oa(
|
|
|
304
304
|
/* @__PURE__ */ e.jsx(
|
|
305
305
|
ee,
|
|
306
306
|
{
|
|
307
|
-
label: `${
|
|
308
|
-
placeholder: `${
|
|
307
|
+
label: `${a().t("archbase:Nome completo")}`,
|
|
308
|
+
placeholder: `${a().t("archbase:Informe o nome completo do usuário")}`,
|
|
309
309
|
dataSource: r.dataSource,
|
|
310
310
|
dataField: "name",
|
|
311
311
|
required: !0,
|
|
@@ -315,8 +315,8 @@ const ga = oa(
|
|
|
315
315
|
d.showNickname && /* @__PURE__ */ e.jsx(
|
|
316
316
|
ee,
|
|
317
317
|
{
|
|
318
|
-
label: `${
|
|
319
|
-
placeholder: `${
|
|
318
|
+
label: `${a().t("archbase:Apelido")}`,
|
|
319
|
+
placeholder: `${a().t("archbase:Apelido")}`,
|
|
320
320
|
dataSource: r.dataSource,
|
|
321
321
|
dataField: "nickname",
|
|
322
322
|
required: d.requiredNickname
|
|
@@ -326,8 +326,8 @@ const ga = oa(
|
|
|
326
326
|
/* @__PURE__ */ e.jsx(D.Col, { span: { base: 12, md: 6, lg: 6 }, children: /* @__PURE__ */ e.jsx(
|
|
327
327
|
ee,
|
|
328
328
|
{
|
|
329
|
-
label: `${
|
|
330
|
-
placeholder: `${
|
|
329
|
+
label: `${a().t("archbase:Descrição do usuário")}`,
|
|
330
|
+
placeholder: `${a().t("archbase:Informe a descrição do usuário")}`,
|
|
331
331
|
dataSource: r.dataSource,
|
|
332
332
|
dataField: "description",
|
|
333
333
|
required: !0
|
|
@@ -338,8 +338,8 @@ const ga = oa(
|
|
|
338
338
|
/* @__PURE__ */ e.jsx(D.Col, { span: { base: 12, md: 6, lg: 6 }, children: /* @__PURE__ */ e.jsx(
|
|
339
339
|
ee,
|
|
340
340
|
{
|
|
341
|
-
label: `${
|
|
342
|
-
placeholder: `${
|
|
341
|
+
label: `${a().t("archbase:E-mail")}`,
|
|
342
|
+
placeholder: `${a().t("archbase:Informe o e-mail do usuário")}`,
|
|
343
343
|
dataSource: r.dataSource,
|
|
344
344
|
onChangeValue: (i) => r.dataSource.setFieldValue("userName", i),
|
|
345
345
|
dataField: "email",
|
|
@@ -350,7 +350,7 @@ const ga = oa(
|
|
|
350
350
|
/* @__PURE__ */ e.jsx(D.Col, { span: { base: 12, md: 6, lg: 6 }, children: /* @__PURE__ */ e.jsx(
|
|
351
351
|
Kr,
|
|
352
352
|
{
|
|
353
|
-
label: `${
|
|
353
|
+
label: `${a().t("archbase:Senha usuário")}`,
|
|
354
354
|
dataSource: r.dataSource,
|
|
355
355
|
dataField: "password",
|
|
356
356
|
error: h,
|
|
@@ -361,13 +361,13 @@ const ga = oa(
|
|
|
361
361
|
/* @__PURE__ */ e.jsx(D, { children: d.showProfile && /* @__PURE__ */ e.jsx(D.Col, { span: { base: 12, md: 6, lg: 6 }, children: /* @__PURE__ */ e.jsx(
|
|
362
362
|
_r,
|
|
363
363
|
{
|
|
364
|
-
label: `${
|
|
364
|
+
label: `${a().t("archbase:Perfil do usuário")}`,
|
|
365
365
|
dataSource: r.dataSource,
|
|
366
366
|
dataField: "profile",
|
|
367
367
|
options: u,
|
|
368
368
|
allowDeselect: !0,
|
|
369
369
|
optionsLabelField: "nome",
|
|
370
|
-
itemComponent:
|
|
370
|
+
itemComponent: gt,
|
|
371
371
|
getOptionLabel: (i) => i.name,
|
|
372
372
|
getOptionValue: (i) => i.id
|
|
373
373
|
}
|
|
@@ -380,7 +380,7 @@ const ga = oa(
|
|
|
380
380
|
{
|
|
381
381
|
dataSource: r.dataSource,
|
|
382
382
|
dataField: "changePasswordOnNextLogin",
|
|
383
|
-
label: `${
|
|
383
|
+
label: `${a().t("archbase:Deve alterar senha próximo login ?")}`
|
|
384
384
|
}
|
|
385
385
|
) }),
|
|
386
386
|
d.showAllowPasswordChange && /* @__PURE__ */ e.jsx(he.Wrapper, { label: "", children: /* @__PURE__ */ e.jsx(
|
|
@@ -388,7 +388,7 @@ const ga = oa(
|
|
|
388
388
|
{
|
|
389
389
|
dataSource: r.dataSource,
|
|
390
390
|
dataField: "allowPasswordChange",
|
|
391
|
-
label: `${
|
|
391
|
+
label: `${a().t("archbase:Pode alterar a senha ?")}`
|
|
392
392
|
}
|
|
393
393
|
) }),
|
|
394
394
|
d.showPasswordNeverExpires && /* @__PURE__ */ e.jsx(he.Wrapper, { label: "", children: /* @__PURE__ */ e.jsx(
|
|
@@ -396,7 +396,7 @@ const ga = oa(
|
|
|
396
396
|
{
|
|
397
397
|
dataSource: r.dataSource,
|
|
398
398
|
dataField: "passwordNeverExpires",
|
|
399
|
-
label: `${
|
|
399
|
+
label: `${a().t("archbase:Senha nunca expira ?")}`
|
|
400
400
|
}
|
|
401
401
|
) })
|
|
402
402
|
] }) }),
|
|
@@ -406,7 +406,7 @@ const ga = oa(
|
|
|
406
406
|
{
|
|
407
407
|
dataSource: r.dataSource,
|
|
408
408
|
dataField: "accountDeactivated",
|
|
409
|
-
label: `${
|
|
409
|
+
label: `${a().t("archbase:Conta desativada ?")}`
|
|
410
410
|
}
|
|
411
411
|
) }),
|
|
412
412
|
d.showAccountLocked && /* @__PURE__ */ e.jsx(he.Wrapper, { label: "", children: /* @__PURE__ */ e.jsx(
|
|
@@ -414,7 +414,7 @@ const ga = oa(
|
|
|
414
414
|
{
|
|
415
415
|
dataSource: r.dataSource,
|
|
416
416
|
dataField: "accountLocked",
|
|
417
|
-
label: `${
|
|
417
|
+
label: `${a().t("archbase:Conta bloqueada ?")}`
|
|
418
418
|
}
|
|
419
419
|
) }),
|
|
420
420
|
d.showIsAdministrator && /* @__PURE__ */ e.jsx(he.Wrapper, { label: "", children: /* @__PURE__ */ e.jsx(
|
|
@@ -422,14 +422,14 @@ const ga = oa(
|
|
|
422
422
|
{
|
|
423
423
|
dataSource: r.dataSource,
|
|
424
424
|
dataField: "isAdministrator",
|
|
425
|
-
label: `${
|
|
425
|
+
label: `${a().t("archbase:Administrador ?")}`
|
|
426
426
|
}
|
|
427
427
|
) })
|
|
428
428
|
] }) }),
|
|
429
429
|
/* @__PURE__ */ e.jsx(D.Col, { span: { base: 12, md: 4, lg: 4 }, children: /* @__PURE__ */ e.jsx(oe, { gap: "lg", children: /* @__PURE__ */ e.jsx(
|
|
430
|
-
|
|
430
|
+
et,
|
|
431
431
|
{
|
|
432
|
-
label:
|
|
432
|
+
label: a().t("archbase:Foto do usuário"),
|
|
433
433
|
dataSource: r.dataSource,
|
|
434
434
|
dataField: "avatar",
|
|
435
435
|
width: 120,
|
|
@@ -442,11 +442,11 @@ const ga = oa(
|
|
|
442
442
|
d.showGroups && /* @__PURE__ */ e.jsxs(D, { children: [
|
|
443
443
|
/* @__PURE__ */ e.jsx(D.Col, { span: { base: 12 }, children: /* @__PURE__ */ e.jsx(H, { fz: 14, fw: 500, children: "Grupos" }) }),
|
|
444
444
|
/* @__PURE__ */ e.jsx(D.Col, { span: { base: 12 }, children: /* @__PURE__ */ e.jsx(
|
|
445
|
-
|
|
445
|
+
bt,
|
|
446
446
|
{
|
|
447
|
-
titleAvailable:
|
|
448
|
-
titleAssigned:
|
|
449
|
-
assignedItemsDS: new
|
|
447
|
+
titleAvailable: a().t("archbase:Disponíveis"),
|
|
448
|
+
titleAssigned: a().t("archbase:Selecionados"),
|
|
449
|
+
assignedItemsDS: new tt("dsDualList", {
|
|
450
450
|
records: r.dataSource.getFieldValue("groups"),
|
|
451
451
|
grandTotalRecords: r.dataSource.getFieldValue("groups").length,
|
|
452
452
|
currentPage: 0,
|
|
@@ -455,7 +455,7 @@ const ga = oa(
|
|
|
455
455
|
}),
|
|
456
456
|
width: "100%",
|
|
457
457
|
height: "200px",
|
|
458
|
-
availableItemsDS:
|
|
458
|
+
availableItemsDS: m,
|
|
459
459
|
handleCreateAssociationObject: (i) => er.newInstance(i),
|
|
460
460
|
idFieldAssigned: (i) => i && i.group ? i.group.id : "",
|
|
461
461
|
idFieldAvailable: "id",
|
|
@@ -468,13 +468,13 @@ const ga = oa(
|
|
|
468
468
|
/* @__PURE__ */ e.jsx(sr, { h: "12px" })
|
|
469
469
|
] }) }),
|
|
470
470
|
/* @__PURE__ */ e.jsxs($, { justify: "flex-end", mt: "md", children: [
|
|
471
|
-
/* @__PURE__ */ e.jsx(U, { variant: "default", onClick: C, children:
|
|
472
|
-
/* @__PURE__ */ e.jsx(U, { onClick: p, children:
|
|
471
|
+
/* @__PURE__ */ e.jsx(U, { variant: "default", onClick: C, children: a().t("archbase:Cancelar") }),
|
|
472
|
+
/* @__PURE__ */ e.jsx(U, { onClick: p, children: a().t("archbase:Salvar") })
|
|
473
473
|
] })
|
|
474
474
|
]
|
|
475
475
|
}
|
|
476
476
|
);
|
|
477
|
-
},
|
|
477
|
+
}, wt = (r) => {
|
|
478
478
|
const h = { ...r.options ?? {} }, w = () => {
|
|
479
479
|
r.onCustomSave ? r.onCustomSave(r.dataSource.getCurrentRecord(), (l) => {
|
|
480
480
|
l && r.onAfterSave && r.onAfterSave(r.dataSource.getCurrentRecord()), r.onClickOk(r.dataSource.getCurrentRecord(), l);
|
|
@@ -487,7 +487,7 @@ const ga = oa(
|
|
|
487
487
|
{
|
|
488
488
|
opened: r.opened,
|
|
489
489
|
onClose: d,
|
|
490
|
-
title:
|
|
490
|
+
title: a().t("archbase:Grupo"),
|
|
491
491
|
size: "60%",
|
|
492
492
|
styles: { content: { maxWidth: 1e3 } },
|
|
493
493
|
children: /* @__PURE__ */ e.jsx(ye, { style: { height: "460px" }, children: /* @__PURE__ */ e.jsxs(oe, { w: "98%", children: [
|
|
@@ -496,8 +496,8 @@ const ga = oa(
|
|
|
496
496
|
/* @__PURE__ */ e.jsx(D.Col, { span: { base: 12 }, children: /* @__PURE__ */ e.jsx(
|
|
497
497
|
ee,
|
|
498
498
|
{
|
|
499
|
-
label: `${
|
|
500
|
-
placeholder: `${
|
|
499
|
+
label: `${a().t("archbase:Nome do grupo")}`,
|
|
500
|
+
placeholder: `${a().t("archbase:Informe o nome do grupo")}`,
|
|
501
501
|
dataSource: r.dataSource,
|
|
502
502
|
dataField: "name"
|
|
503
503
|
}
|
|
@@ -505,8 +505,8 @@ const ga = oa(
|
|
|
505
505
|
/* @__PURE__ */ e.jsx(D.Col, { span: { base: 12 }, children: /* @__PURE__ */ e.jsx(
|
|
506
506
|
ee,
|
|
507
507
|
{
|
|
508
|
-
label: `${
|
|
509
|
-
placeholder: `${
|
|
508
|
+
label: `${a().t("archbase:Descrição do grupo")}`,
|
|
509
|
+
placeholder: `${a().t("archbase:Informe a descrição do grupo")}`,
|
|
510
510
|
dataSource: r.dataSource,
|
|
511
511
|
dataField: "description"
|
|
512
512
|
}
|
|
@@ -514,26 +514,26 @@ const ga = oa(
|
|
|
514
514
|
] }),
|
|
515
515
|
h?.customContentAfter && h.customContentAfter(r.dataSource.getCurrentRecord()),
|
|
516
516
|
/* @__PURE__ */ e.jsxs($, { justify: "flex-end", mt: "md", children: [
|
|
517
|
-
/* @__PURE__ */ e.jsx(U, { variant: "default", onClick: d, children:
|
|
518
|
-
/* @__PURE__ */ e.jsx(U, { onClick: w, children:
|
|
517
|
+
/* @__PURE__ */ e.jsx(U, { variant: "default", onClick: d, children: a().t("archbase:Cancelar") }),
|
|
518
|
+
/* @__PURE__ */ e.jsx(U, { onClick: w, children: a().t("archbase:Salvar") })
|
|
519
519
|
] })
|
|
520
520
|
] }) })
|
|
521
521
|
}
|
|
522
522
|
);
|
|
523
|
-
},
|
|
523
|
+
}, vt = ({ image: r, label: h, description: w, ...d }) => /* @__PURE__ */ e.jsx("div", { ...d, children: /* @__PURE__ */ e.jsxs($, { grow: !0, children: [
|
|
524
524
|
/* @__PURE__ */ e.jsx("img", { style: { maxWidth: "32px" }, src: r }),
|
|
525
525
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
526
526
|
/* @__PURE__ */ e.jsx(H, { size: "sm", children: h }),
|
|
527
527
|
/* @__PURE__ */ e.jsx(H, { size: "xs", opacity: 0.65, children: w })
|
|
528
528
|
] })
|
|
529
|
-
] }) }),
|
|
530
|
-
|
|
529
|
+
] }) }), Ct = (r) => {
|
|
530
|
+
dt();
|
|
531
531
|
const [h, w] = M(), d = _(X.User), l = ke(
|
|
532
532
|
"ApiTokenModal",
|
|
533
533
|
r.dataSource,
|
|
534
534
|
"expirationDate",
|
|
535
535
|
""
|
|
536
|
-
),
|
|
536
|
+
), m = (p) => {
|
|
537
537
|
if (!p)
|
|
538
538
|
l.handleValueChange(void 0);
|
|
539
539
|
else {
|
|
@@ -543,11 +543,11 @@ const ga = oa(
|
|
|
543
543
|
w(p);
|
|
544
544
|
}, S = async (p, C) => new Promise(async (i, c) => {
|
|
545
545
|
try {
|
|
546
|
-
const L = ze(Te.or(Te.eq("name", `^*${C.trim()}*`))),
|
|
546
|
+
const L = ze(Te.or(Te.eq("name", `^*${C.trim()}*`))), g = await d.findAllWithFilter(L, p, 20);
|
|
547
547
|
i({
|
|
548
|
-
options:
|
|
549
|
-
page:
|
|
550
|
-
totalPages:
|
|
548
|
+
options: g.content,
|
|
549
|
+
page: g.pageable.pageNumber,
|
|
550
|
+
totalPages: g.totalPages
|
|
551
551
|
});
|
|
552
552
|
} catch (L) {
|
|
553
553
|
c(Ae(L));
|
|
@@ -564,15 +564,15 @@ const ga = oa(
|
|
|
564
564
|
{
|
|
565
565
|
opened: r.opened,
|
|
566
566
|
onClose: P,
|
|
567
|
-
title:
|
|
567
|
+
title: a().t("archbase:Token de API"),
|
|
568
568
|
size: "50%",
|
|
569
569
|
children: [
|
|
570
570
|
/* @__PURE__ */ e.jsxs(ye, { style: { height: "300px" }, children: [
|
|
571
571
|
/* @__PURE__ */ e.jsx(
|
|
572
572
|
ee,
|
|
573
573
|
{
|
|
574
|
-
label: `${
|
|
575
|
-
placeholder: `${
|
|
574
|
+
label: `${a().t("archbase:Nome do token")}`,
|
|
575
|
+
placeholder: `${a().t("archbase:Informe o nome do token")}`,
|
|
576
576
|
dataSource: r.dataSource,
|
|
577
577
|
dataField: "name"
|
|
578
578
|
}
|
|
@@ -580,51 +580,51 @@ const ga = oa(
|
|
|
580
580
|
/* @__PURE__ */ e.jsx(
|
|
581
581
|
ee,
|
|
582
582
|
{
|
|
583
|
-
label: `${
|
|
584
|
-
placeholder: `${
|
|
583
|
+
label: `${a().t("archbase:Descrição do token")}`,
|
|
584
|
+
placeholder: `${a().t("archbase:Informe a descrição do token")}`,
|
|
585
585
|
dataSource: r.dataSource,
|
|
586
586
|
dataField: "description"
|
|
587
587
|
}
|
|
588
588
|
),
|
|
589
589
|
/* @__PURE__ */ e.jsx(
|
|
590
|
-
|
|
590
|
+
ct,
|
|
591
591
|
{
|
|
592
592
|
withSeconds: !0,
|
|
593
593
|
value: h,
|
|
594
|
-
onChange:
|
|
594
|
+
onChange: m,
|
|
595
595
|
label: "Data/hora expiração",
|
|
596
596
|
placeholder: "Selecione a data de expiração"
|
|
597
597
|
}
|
|
598
598
|
),
|
|
599
599
|
/* @__PURE__ */ e.jsx(
|
|
600
|
-
|
|
600
|
+
rt,
|
|
601
601
|
{
|
|
602
|
-
label: `${
|
|
602
|
+
label: `${a().t("archbase:Usuário")}`,
|
|
603
603
|
dataSource: r.dataSource,
|
|
604
604
|
dataField: "user",
|
|
605
|
-
placeholder: `${
|
|
605
|
+
placeholder: `${a().t("archbase:Digite aqui o nome do usuário")}`,
|
|
606
606
|
getOptionLabel: (p) => p && p.email ? p.email : "",
|
|
607
607
|
getOptionValue: (p) => p && p.id ? p.id.toString() : "",
|
|
608
608
|
getOptions: S,
|
|
609
609
|
debounceTime: 500,
|
|
610
610
|
minCharsToSearch: 1,
|
|
611
|
-
itemComponent:
|
|
611
|
+
itemComponent: vt
|
|
612
612
|
}
|
|
613
613
|
)
|
|
614
614
|
] }),
|
|
615
615
|
/* @__PURE__ */ e.jsxs($, { justify: "flex-end", mt: "md", children: [
|
|
616
|
-
/* @__PURE__ */ e.jsx(U, { variant: "default", onClick: P, children:
|
|
617
|
-
/* @__PURE__ */ e.jsx(U, { onClick: u, children:
|
|
616
|
+
/* @__PURE__ */ e.jsx(U, { variant: "default", onClick: P, children: a().t("archbase:Cancelar") }),
|
|
617
|
+
/* @__PURE__ */ e.jsx(U, { onClick: u, children: a().t("archbase:Salvar") })
|
|
618
618
|
] })
|
|
619
619
|
]
|
|
620
620
|
}
|
|
621
621
|
);
|
|
622
622
|
}, or = (r) => {
|
|
623
623
|
const h = "->";
|
|
624
|
-
return r.includes(h) ? r.split(h).map((l) => l.trim()).map((l) =>
|
|
624
|
+
return r.includes(h) ? r.split(h).map((l) => l.trim()).map((l) => a().t(l)).join(` ${h} `) : a().t(r);
|
|
625
625
|
};
|
|
626
626
|
function Ue({ dataSource: r, opened: h, close: w }) {
|
|
627
|
-
const d = pe(() => r?.getFieldValue("name") || "", [r]), l = pe(() => r?.getFieldValue("id") || "", [r]),
|
|
627
|
+
const d = pe(() => r?.getFieldValue("name") || "", [r]), l = pe(() => r?.getFieldValue("id") || "", [r]), m = pe(() => r?.getFieldValue("type") || "", [r]), S = Ze(), u = Ze(), [P, p] = M([]), [C, i] = M([]), [c, L] = M(), [g, re] = M(), [J, te] = M(""), [Z] = rr(J, 200), [F, N] = M(""), [I] = rr(F, 200), q = _(X.Resource), { colorScheme: o } = Oe(), R = o === "dark" ? "var(--mantine-primary-color-7)" : "var(--mantine-primary-color-4)", W = pe(() => C.sort((s, n) => s.resourceDescription.localeCompare(n.resourceDescription)).map((s) => ({
|
|
628
628
|
value: s.resourceId,
|
|
629
629
|
label: s.resourceDescription,
|
|
630
630
|
children: s.permissions.filter((n) => n.actionDescription.toLowerCase().includes(I.toLowerCase())).sort((n, G) => n.actionDescription.localeCompare(G.actionDescription)).map((n) => ({
|
|
@@ -636,7 +636,7 @@ function Ue({ dataSource: r, opened: h, close: w }) {
|
|
|
636
636
|
owner: s
|
|
637
637
|
}
|
|
638
638
|
}))
|
|
639
|
-
})), [C, I]), x = pe(() => C.map((s) => s.permissions.map((n) => n.actionId)).flat(), [C]),
|
|
639
|
+
})), [C, I]), x = pe(() => C.map((s) => s.permissions.map((n) => n.actionId)).flat(), [C]), j = pe(() => P.sort((s, n) => s.resourceDescription.localeCompare(n.resourceDescription)).map((s) => ({
|
|
640
640
|
value: s.resourceId,
|
|
641
641
|
label: s.resourceDescription,
|
|
642
642
|
children: s.permissions.filter((n) => n.actionDescription.toLowerCase().includes(Z.toLowerCase())).sort((n, G) => n.actionDescription.localeCompare(G.actionDescription)).map((n) => {
|
|
@@ -645,42 +645,42 @@ function Ue({ dataSource: r, opened: h, close: w }) {
|
|
|
645
645
|
value: n.actionId,
|
|
646
646
|
label: n.actionDescription,
|
|
647
647
|
nodeProps: {
|
|
648
|
-
granted: x.includes(n.actionId) && G?.types?.includes(le(k,
|
|
648
|
+
granted: x.includes(n.actionId) && G?.types?.includes(le(k, m)),
|
|
649
649
|
owner: s
|
|
650
650
|
}
|
|
651
651
|
};
|
|
652
652
|
})
|
|
653
|
-
})), [P, C, x,
|
|
653
|
+
})), [P, C, x, m, Z]), b = ge(async () => {
|
|
654
654
|
if (l) {
|
|
655
|
-
const s = await q.getPermissionsBySecurityId(l,
|
|
655
|
+
const s = await q.getPermissionsBySecurityId(l, m), n = await q.getAllPermissionsAvailable();
|
|
656
656
|
p(n), i(s);
|
|
657
657
|
}
|
|
658
|
-
}, [l,
|
|
659
|
-
c?.value && l && q.createPermission(l, c.value,
|
|
658
|
+
}, [l, m]), ce = ge(() => {
|
|
659
|
+
c?.value && l && q.createPermission(l, c.value, m).then((s) => {
|
|
660
660
|
if (s) {
|
|
661
661
|
i((E) => {
|
|
662
662
|
let A;
|
|
663
|
-
return E.map((
|
|
664
|
-
...
|
|
665
|
-
permissions:
|
|
663
|
+
return E.map((y) => y.resourceId).includes(s.resourceId) ? A = E.map((y) => y.resourceId === s.resourceId ? y.permissions.map((T) => T.actionId).includes(c.value) ? {
|
|
664
|
+
...y,
|
|
665
|
+
permissions: y.permissions.map(
|
|
666
666
|
(T) => T.actionId === c.value ? {
|
|
667
667
|
...T,
|
|
668
668
|
permissionId: s.permissionId,
|
|
669
|
-
types: [...T.types ?? [], le(k,
|
|
669
|
+
types: [...T.types ?? [], le(k, m)]
|
|
670
670
|
} : T
|
|
671
671
|
)
|
|
672
672
|
} : {
|
|
673
|
-
...
|
|
673
|
+
...y,
|
|
674
674
|
permissions: [
|
|
675
|
-
...
|
|
675
|
+
...y.permissions ?? [],
|
|
676
676
|
{
|
|
677
677
|
actionId: s.actionId,
|
|
678
678
|
actionDescription: s.actionDescription,
|
|
679
679
|
permissionId: s.permissionId,
|
|
680
|
-
types: [le(k,
|
|
680
|
+
types: [le(k, m)]
|
|
681
681
|
}
|
|
682
682
|
]
|
|
683
|
-
} :
|
|
683
|
+
} : y) : A = [
|
|
684
684
|
...E,
|
|
685
685
|
{
|
|
686
686
|
resourceId: s.resourceId,
|
|
@@ -690,67 +690,67 @@ function Ue({ dataSource: r, opened: h, close: w }) {
|
|
|
690
690
|
actionId: s.actionId,
|
|
691
691
|
actionDescription: s.actionDescription,
|
|
692
692
|
permissionId: s.permissionId,
|
|
693
|
-
types: [le(k,
|
|
693
|
+
types: [le(k, m)]
|
|
694
694
|
}
|
|
695
695
|
]
|
|
696
696
|
}
|
|
697
697
|
], A;
|
|
698
698
|
});
|
|
699
|
-
const n =
|
|
699
|
+
const n = j.filter((E) => E.value === c?.nodeProps?.owner?.resourceId).map((E) => E.children).flat(), G = n.map((E) => E.value).indexOf(c.value), v = n.find((E, A) => !E?.nodeProps?.granted && E?.value !== c.value && (n.length > G + 1 ? A > G : !0));
|
|
700
700
|
v?.value && S.select(v.value), u.expand(s.resourceId), L(v);
|
|
701
701
|
}
|
|
702
702
|
});
|
|
703
|
-
}, [c, l,
|
|
704
|
-
|
|
703
|
+
}, [c, l, m, q, j, P, C, S, u]), ne = ge(() => {
|
|
704
|
+
g?.nodeProps?.permissionId && q.deletePermission(g.nodeProps.permissionId).then(() => {
|
|
705
705
|
i((v) => [...v].filter((A) => {
|
|
706
|
-
let
|
|
706
|
+
let y = !0;
|
|
707
707
|
return A.permissions?.forEach((T) => {
|
|
708
|
-
T.permissionId !== void 0 && T.permissionId ===
|
|
709
|
-
}),
|
|
708
|
+
T.permissionId !== void 0 && T.permissionId === g?.nodeProps?.permissionId && A.permissions.length === 1 && T?.types?.length === 1 && T.types[0] === le(k, m) && (y = !1);
|
|
709
|
+
}), y;
|
|
710
710
|
}).map((A) => {
|
|
711
|
-
const
|
|
712
|
-
return A.resourceId ===
|
|
711
|
+
const y = g?.nodeProps?.owner;
|
|
712
|
+
return A.resourceId === y.resourceId ? g?.nodeProps?.types?.length === 1 ? {
|
|
713
713
|
...A,
|
|
714
|
-
permissions: [...(A.permissions ?? []).filter((T) => T.permissionId !==
|
|
714
|
+
permissions: [...(A.permissions ?? []).filter((T) => T.permissionId !== g?.nodeProps?.permissionId)]
|
|
715
715
|
} : {
|
|
716
716
|
...A,
|
|
717
|
-
permissions: (A.permissions ?? []).map((T) => T.actionId ===
|
|
717
|
+
permissions: (A.permissions ?? []).map((T) => T.actionId === g.value ? {
|
|
718
718
|
actionId: T.actionId,
|
|
719
719
|
actionDescription: T.actionDescription,
|
|
720
|
-
types: [...T.types?.filter((de) => de && de !== le(k,
|
|
720
|
+
types: [...T.types?.filter((de) => de && de !== le(k, m)) ?? []]
|
|
721
721
|
} : T)
|
|
722
722
|
} : A;
|
|
723
723
|
}));
|
|
724
|
-
const s = W.filter((v) => v.value ===
|
|
724
|
+
const s = W.filter((v) => v.value === g?.nodeProps?.owner?.resourceId).map((v) => v.children).flat(), n = s.map((v) => v.value).indexOf(g.value), G = s.find((v, E) => v?.nodeProps?.types.includes(le(k, m)) && v?.value !== g.value && (s.length > n + 1 ? E > n : !0));
|
|
725
725
|
G?.value && u.select(G.value), re(G);
|
|
726
726
|
});
|
|
727
|
-
}, [
|
|
727
|
+
}, [g, q, m, W, C, u]);
|
|
728
728
|
return Re(() => {
|
|
729
|
-
h && r && (L(void 0), re(void 0),
|
|
730
|
-
}, [h,
|
|
731
|
-
/* @__PURE__ */ e.jsx(
|
|
729
|
+
h && r && (L(void 0), re(void 0), te(""), N(""), u.collapseAllNodes(), S.collapseAllNodes(), b());
|
|
730
|
+
}, [h, m, l, b]), r ? /* @__PURE__ */ e.jsx(Fe, { opened: h, onClose: w, title: `${a().t(`archbase:${m}`)}: ${d}`, size: "80%", styles: { root: { overflow: "hidden" } }, children: /* @__PURE__ */ e.jsxs(ut, { height: "540px", children: [
|
|
731
|
+
/* @__PURE__ */ e.jsx(ht, { children: /* @__PURE__ */ e.jsx(Y, { withBorder: !0, my: 20, p: 20, style: { height: "calc(100% - 40px)", overflow: "hidden", display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ e.jsxs("div", { style: { flex: 1, display: "flex", flexDirection: "row", overflow: "hidden", minHeight: 0, gap: "8px" }, children: [
|
|
732
732
|
/* @__PURE__ */ e.jsxs("div", { style: { flex: 9, display: "flex", flexDirection: "column", overflow: "hidden", minHeight: 0 }, children: [
|
|
733
733
|
/* @__PURE__ */ e.jsxs($, { mb: 20, children: [
|
|
734
|
-
/* @__PURE__ */ e.jsx(H, { children:
|
|
734
|
+
/* @__PURE__ */ e.jsx(H, { children: a().t("archbase:Available") }),
|
|
735
735
|
/* @__PURE__ */ e.jsx(
|
|
736
736
|
Qe,
|
|
737
737
|
{
|
|
738
738
|
size: "xs",
|
|
739
739
|
value: J,
|
|
740
|
-
onChange: (s) =>
|
|
741
|
-
placeholder:
|
|
740
|
+
onChange: (s) => te(s.target.value),
|
|
741
|
+
placeholder: a().t("archbase:Filter available permissions")
|
|
742
742
|
}
|
|
743
743
|
)
|
|
744
744
|
] }),
|
|
745
745
|
/* @__PURE__ */ e.jsx(ye, { style: { flex: 1, minHeight: 0 }, children: /* @__PURE__ */ e.jsx(
|
|
746
746
|
Ye,
|
|
747
747
|
{
|
|
748
|
-
data:
|
|
748
|
+
data: j,
|
|
749
749
|
selectOnClick: !0,
|
|
750
750
|
allowRangeSelection: !1,
|
|
751
751
|
tree: S,
|
|
752
752
|
renderNode: ({ level: s, node: n, expanded: G, hasChildren: v, selected: E, elementProps: A }) => {
|
|
753
|
-
const
|
|
753
|
+
const y = n?.nodeProps?.granted, T = y ? "dimmed" : void 0, de = y ? "line-through" : void 0, V = ge((Pe) => {
|
|
754
754
|
L(n), A.onClick(Pe);
|
|
755
755
|
}, [n, A.onClick]);
|
|
756
756
|
return /* @__PURE__ */ e.jsxs(
|
|
@@ -792,19 +792,19 @@ function Ue({ dataSource: r, opened: h, close: w }) {
|
|
|
792
792
|
) })
|
|
793
793
|
] }),
|
|
794
794
|
/* @__PURE__ */ e.jsx("div", { style: { flex: 2, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ e.jsxs(oe, { gap: 5, align: "center", children: [
|
|
795
|
-
/* @__PURE__ */ e.jsx(se, { label:
|
|
796
|
-
/* @__PURE__ */ e.jsx(se, { label:
|
|
795
|
+
/* @__PURE__ */ e.jsx(se, { label: a().t("archbase:Add"), children: /* @__PURE__ */ e.jsx(B, { onClick: ce, disabled: !c || c?.nodeProps?.granted || !c.nodeProps, children: /* @__PURE__ */ e.jsx(lr, {}) }) }),
|
|
796
|
+
/* @__PURE__ */ e.jsx(se, { label: a().t("archbase:Remove"), children: /* @__PURE__ */ e.jsx(B, { onClick: ne, disabled: !g || !g?.nodeProps?.permissionId || !g.nodeProps, children: /* @__PURE__ */ e.jsx(cr, {}) }) })
|
|
797
797
|
] }) }),
|
|
798
798
|
/* @__PURE__ */ e.jsxs("div", { style: { flex: 9, display: "flex", flexDirection: "column", overflow: "hidden", minHeight: 0 }, children: [
|
|
799
799
|
/* @__PURE__ */ e.jsxs($, { mb: 20, children: [
|
|
800
|
-
/* @__PURE__ */ e.jsx(H, { children:
|
|
800
|
+
/* @__PURE__ */ e.jsx(H, { children: a().t("archbase:Granted") }),
|
|
801
801
|
/* @__PURE__ */ e.jsx(
|
|
802
802
|
Qe,
|
|
803
803
|
{
|
|
804
804
|
size: "xs",
|
|
805
805
|
value: F,
|
|
806
806
|
onChange: (s) => N(s.target.value),
|
|
807
|
-
placeholder:
|
|
807
|
+
placeholder: a().t("archbase:Filter granted permissions")
|
|
808
808
|
}
|
|
809
809
|
)
|
|
810
810
|
] }),
|
|
@@ -816,7 +816,7 @@ function Ue({ dataSource: r, opened: h, close: w }) {
|
|
|
816
816
|
allowRangeSelection: !1,
|
|
817
817
|
tree: u,
|
|
818
818
|
renderNode: ({ level: s, node: n, expanded: G, hasChildren: v, selected: E, elementProps: A }) => {
|
|
819
|
-
const
|
|
819
|
+
const y = ge((T) => {
|
|
820
820
|
re(n), A.onClick(T);
|
|
821
821
|
}, [n, A.onClick]);
|
|
822
822
|
return /* @__PURE__ */ e.jsxs(
|
|
@@ -826,7 +826,7 @@ function Ue({ dataSource: r, opened: h, close: w }) {
|
|
|
826
826
|
gap: 5,
|
|
827
827
|
...A,
|
|
828
828
|
bg: E && s === 2 ? R : "",
|
|
829
|
-
onClick:
|
|
829
|
+
onClick: y,
|
|
830
830
|
children: [
|
|
831
831
|
v && /* @__PURE__ */ e.jsx(
|
|
832
832
|
Ke,
|
|
@@ -843,9 +843,9 @@ function Ue({ dataSource: r, opened: h, close: w }) {
|
|
|
843
843
|
}
|
|
844
844
|
),
|
|
845
845
|
/* @__PURE__ */ e.jsx(H, { children: or(n.label) }),
|
|
846
|
-
n?.nodeProps?.types?.includes("USER") && /* @__PURE__ */ e.jsx(Se, { color: "blue", children:
|
|
847
|
-
n?.nodeProps?.types?.includes("GROUP") && /* @__PURE__ */ e.jsx(Se, { color: "orange", children:
|
|
848
|
-
n?.nodeProps?.types?.includes("PROFILE") && /* @__PURE__ */ e.jsx(Se, { color: "pink", children:
|
|
846
|
+
n?.nodeProps?.types?.includes("USER") && /* @__PURE__ */ e.jsx(Se, { color: "blue", children: a().t("archbase:user") }),
|
|
847
|
+
n?.nodeProps?.types?.includes("GROUP") && /* @__PURE__ */ e.jsx(Se, { color: "orange", children: a().t("archbase:group") }),
|
|
848
|
+
n?.nodeProps?.types?.includes("PROFILE") && /* @__PURE__ */ e.jsx(Se, { color: "pink", children: a().t("archbase:profile") })
|
|
849
849
|
]
|
|
850
850
|
}
|
|
851
851
|
);
|
|
@@ -854,22 +854,22 @@ function Ue({ dataSource: r, opened: h, close: w }) {
|
|
|
854
854
|
) })
|
|
855
855
|
] })
|
|
856
856
|
] }) }) }),
|
|
857
|
-
/* @__PURE__ */ e.jsx(
|
|
857
|
+
/* @__PURE__ */ e.jsx(xt, { size: "40px", children: /* @__PURE__ */ e.jsx($, { justify: "flex-end", children: /* @__PURE__ */ e.jsx(U, { onClick: w, children: a().t("archbase:Close") }) }) })
|
|
858
858
|
] }) }) : null;
|
|
859
859
|
}
|
|
860
|
-
const Ne = "data:image/png;base64,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",
|
|
861
|
-
function $
|
|
860
|
+
const Ne = "data:image/png;base64,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", St = (r) => r.groups ? /* @__PURE__ */ e.jsx("div", { style: { display: "flex" }, children: r.groups ? r.groups.map((h, w) => /* @__PURE__ */ e.jsx("div", { style: { paddingRight: "2px" }, children: /* @__PURE__ */ e.jsx(Se, { color: "blue", children: h.group?.name }) }, w)) : null }) : null, At = (r) => r.profile ? /* @__PURE__ */ e.jsx(Se, { color: "green", children: r.profile?.name }) : null;
|
|
861
|
+
function $t({
|
|
862
862
|
height: r = "400px",
|
|
863
863
|
width: h = "100%",
|
|
864
864
|
createEntitiesWithId: w = !0,
|
|
865
865
|
userModalOptions: d,
|
|
866
866
|
profileModalOptions: l,
|
|
867
|
-
groupModalOptions:
|
|
867
|
+
groupModalOptions: m,
|
|
868
868
|
options: S
|
|
869
869
|
}) {
|
|
870
870
|
const u = nr();
|
|
871
871
|
ir("securityStore");
|
|
872
|
-
const P = Qr(), { colorScheme: p } = Oe(), [C, i] = M(void 0), [c, L] = M("users"),
|
|
872
|
+
const P = Qr(), { colorScheme: p } = Oe(), [C, i] = M(void 0), [c, L] = M("users"), g = _(X.User), re = _(X.Group), J = _(X.Resource), te = _(X.Profile), [Z, F] = M(""), [N, I] = M(""), q = _(X.AccessToken), { t: o } = Yr(), R = je(null), W = je(null), x = je(null), j = je(null), b = je(null), ce = (t) => t.id, ne = (t) => t.id, s = (t) => t.id, n = (t) => t.id, G = (t) => t.id, {
|
|
873
873
|
dataSource: v,
|
|
874
874
|
isLoading: E,
|
|
875
875
|
refreshData: A
|
|
@@ -879,20 +879,20 @@ function $a({
|
|
|
879
879
|
validator: P,
|
|
880
880
|
pageSize: 25,
|
|
881
881
|
defaultSortFields: ["user.email", "expirationTime:desc"],
|
|
882
|
-
onError: (
|
|
883
|
-
i(
|
|
882
|
+
onError: (t, z) => {
|
|
883
|
+
i(t), Q.showError(`${o("archbase:WARNING")}`, t, z);
|
|
884
884
|
}
|
|
885
885
|
}), {
|
|
886
|
-
dataSource:
|
|
886
|
+
dataSource: y,
|
|
887
887
|
isLoading: T,
|
|
888
888
|
refreshData: de
|
|
889
889
|
} = we({
|
|
890
890
|
name: "dsUsers",
|
|
891
|
-
service:
|
|
891
|
+
service: g,
|
|
892
892
|
validator: P,
|
|
893
893
|
pageSize: 25,
|
|
894
|
-
onError: (
|
|
895
|
-
i(
|
|
894
|
+
onError: (t, z) => {
|
|
895
|
+
i(t), Q.showError(`${o("archbase:WARNING")}`, t, z);
|
|
896
896
|
}
|
|
897
897
|
}), {
|
|
898
898
|
dataSource: V,
|
|
@@ -903,8 +903,8 @@ function $a({
|
|
|
903
903
|
service: re,
|
|
904
904
|
validator: P,
|
|
905
905
|
pageSize: 25,
|
|
906
|
-
onError: (
|
|
907
|
-
i(
|
|
906
|
+
onError: (t, z) => {
|
|
907
|
+
i(t), Q.showError(`${o("archbase:WARNING")}`, t, z);
|
|
908
908
|
}
|
|
909
909
|
}), {
|
|
910
910
|
dataSource: O,
|
|
@@ -912,11 +912,11 @@ function $a({
|
|
|
912
912
|
refreshData: hr
|
|
913
913
|
} = we({
|
|
914
914
|
name: "dsProfile",
|
|
915
|
-
service:
|
|
915
|
+
service: te,
|
|
916
916
|
validator: P,
|
|
917
917
|
pageSize: 25,
|
|
918
|
-
onError: (
|
|
919
|
-
i(
|
|
918
|
+
onError: (t, z) => {
|
|
919
|
+
i(t), Q.showError(`${o("archbase:WARNING")}`, t, z);
|
|
920
920
|
}
|
|
921
921
|
}), {
|
|
922
922
|
dataSource: xr,
|
|
@@ -927,8 +927,8 @@ function $a({
|
|
|
927
927
|
service: J,
|
|
928
928
|
validator: P,
|
|
929
929
|
pageSize: 25,
|
|
930
|
-
onError: (
|
|
931
|
-
i(
|
|
930
|
+
onError: (t, z) => {
|
|
931
|
+
i(t), Q.showError(`${o("archbase:WARNING")}`, t, z);
|
|
932
932
|
}
|
|
933
933
|
});
|
|
934
934
|
Re(() => {
|
|
@@ -936,17 +936,17 @@ function $a({
|
|
|
936
936
|
}, []);
|
|
937
937
|
const mr = /* @__PURE__ */ e.jsxs(me, { children: [
|
|
938
938
|
/* @__PURE__ */ e.jsx(
|
|
939
|
-
|
|
939
|
+
f,
|
|
940
940
|
{
|
|
941
941
|
dataField: "user.avatar",
|
|
942
942
|
dataType: "image",
|
|
943
943
|
size: 80,
|
|
944
944
|
header: `${o("archbase:Foto")}`,
|
|
945
|
-
render: (
|
|
945
|
+
render: (t) => /* @__PURE__ */ e.jsx(
|
|
946
946
|
"img",
|
|
947
947
|
{
|
|
948
948
|
style: { borderRadius: 50, height: "32px", maxHeight: "32px" },
|
|
949
|
-
src:
|
|
949
|
+
src: t.row.user && t.row.user.avatar ? atob(t.row.user.avatar) : Ne
|
|
950
950
|
}
|
|
951
951
|
),
|
|
952
952
|
inputFilterType: "text",
|
|
@@ -954,7 +954,7 @@ function $a({
|
|
|
954
954
|
}
|
|
955
955
|
),
|
|
956
956
|
/* @__PURE__ */ e.jsx(
|
|
957
|
-
|
|
957
|
+
f,
|
|
958
958
|
{
|
|
959
959
|
dataField: "user.userName",
|
|
960
960
|
dataType: "text",
|
|
@@ -964,7 +964,7 @@ function $a({
|
|
|
964
964
|
}
|
|
965
965
|
),
|
|
966
966
|
/* @__PURE__ */ e.jsx(
|
|
967
|
-
|
|
967
|
+
f,
|
|
968
968
|
{
|
|
969
969
|
dataField: "user.email",
|
|
970
970
|
dataType: "text",
|
|
@@ -974,18 +974,18 @@ function $a({
|
|
|
974
974
|
}
|
|
975
975
|
),
|
|
976
976
|
/* @__PURE__ */ e.jsx(
|
|
977
|
-
|
|
977
|
+
f,
|
|
978
978
|
{
|
|
979
979
|
dataField: "expirationDate",
|
|
980
980
|
dataType: "text",
|
|
981
981
|
size: 300,
|
|
982
982
|
header: `${o("archbase:Expira em")}`,
|
|
983
|
-
render: (
|
|
983
|
+
render: (t) => /* @__PURE__ */ e.jsx(H, { size: "sm", children: t.row.expirationDate }),
|
|
984
984
|
inputFilterType: "text"
|
|
985
985
|
}
|
|
986
986
|
),
|
|
987
987
|
/* @__PURE__ */ e.jsx(
|
|
988
|
-
|
|
988
|
+
f,
|
|
989
989
|
{
|
|
990
990
|
dataField: "revoked",
|
|
991
991
|
dataType: "boolean",
|
|
@@ -994,7 +994,7 @@ function $a({
|
|
|
994
994
|
}
|
|
995
995
|
),
|
|
996
996
|
/* @__PURE__ */ e.jsx(
|
|
997
|
-
|
|
997
|
+
f,
|
|
998
998
|
{
|
|
999
999
|
dataField: "expired",
|
|
1000
1000
|
dataType: "boolean",
|
|
@@ -1003,7 +1003,7 @@ function $a({
|
|
|
1003
1003
|
}
|
|
1004
1004
|
),
|
|
1005
1005
|
/* @__PURE__ */ e.jsx(
|
|
1006
|
-
|
|
1006
|
+
f,
|
|
1007
1007
|
{
|
|
1008
1008
|
dataField: "token",
|
|
1009
1009
|
dataType: "text",
|
|
@@ -1014,17 +1014,17 @@ function $a({
|
|
|
1014
1014
|
)
|
|
1015
1015
|
] }), br = /* @__PURE__ */ e.jsxs(me, { children: [
|
|
1016
1016
|
/* @__PURE__ */ e.jsx(
|
|
1017
|
-
|
|
1017
|
+
f,
|
|
1018
1018
|
{
|
|
1019
1019
|
dataField: "avatar",
|
|
1020
1020
|
dataType: "image",
|
|
1021
1021
|
size: 80,
|
|
1022
1022
|
header: `${o("archbase:Foto")}`,
|
|
1023
|
-
render: (
|
|
1023
|
+
render: (t) => /* @__PURE__ */ e.jsx(
|
|
1024
1024
|
"img",
|
|
1025
1025
|
{
|
|
1026
1026
|
style: { borderRadius: 50, height: "32px", maxHeight: "32px" },
|
|
1027
|
-
src:
|
|
1027
|
+
src: t.row.avatar ? atob(t.row.avatar) : Ne
|
|
1028
1028
|
}
|
|
1029
1029
|
),
|
|
1030
1030
|
enableSorting: !1,
|
|
@@ -1034,7 +1034,7 @@ function $a({
|
|
|
1034
1034
|
}
|
|
1035
1035
|
),
|
|
1036
1036
|
/* @__PURE__ */ e.jsx(
|
|
1037
|
-
|
|
1037
|
+
f,
|
|
1038
1038
|
{
|
|
1039
1039
|
dataField: "name",
|
|
1040
1040
|
dataType: "text",
|
|
@@ -1044,7 +1044,7 @@ function $a({
|
|
|
1044
1044
|
}
|
|
1045
1045
|
),
|
|
1046
1046
|
/* @__PURE__ */ e.jsx(
|
|
1047
|
-
|
|
1047
|
+
f,
|
|
1048
1048
|
{
|
|
1049
1049
|
dataField: "nickname",
|
|
1050
1050
|
dataType: "text",
|
|
@@ -1054,7 +1054,7 @@ function $a({
|
|
|
1054
1054
|
}
|
|
1055
1055
|
),
|
|
1056
1056
|
/* @__PURE__ */ e.jsx(
|
|
1057
|
-
|
|
1057
|
+
f,
|
|
1058
1058
|
{
|
|
1059
1059
|
dataField: "email",
|
|
1060
1060
|
dataType: "text",
|
|
@@ -1064,7 +1064,7 @@ function $a({
|
|
|
1064
1064
|
}
|
|
1065
1065
|
),
|
|
1066
1066
|
/* @__PURE__ */ e.jsx(
|
|
1067
|
-
|
|
1067
|
+
f,
|
|
1068
1068
|
{
|
|
1069
1069
|
dataField: "accountDeactivated",
|
|
1070
1070
|
dataType: "boolean",
|
|
@@ -1074,31 +1074,31 @@ function $a({
|
|
|
1074
1074
|
}
|
|
1075
1075
|
),
|
|
1076
1076
|
/* @__PURE__ */ e.jsx(
|
|
1077
|
-
|
|
1077
|
+
f,
|
|
1078
1078
|
{
|
|
1079
1079
|
dataField: "profile.name",
|
|
1080
1080
|
dataType: "text",
|
|
1081
1081
|
header: `${o("archbase:Perfil")}`,
|
|
1082
1082
|
size: 200,
|
|
1083
|
-
render: (
|
|
1083
|
+
render: (t) => At(t.row),
|
|
1084
1084
|
inputFilterType: "text"
|
|
1085
1085
|
}
|
|
1086
1086
|
),
|
|
1087
1087
|
/* @__PURE__ */ e.jsx(
|
|
1088
|
-
|
|
1088
|
+
f,
|
|
1089
1089
|
{
|
|
1090
1090
|
dataField: "groups",
|
|
1091
1091
|
dataType: "text",
|
|
1092
1092
|
size: 300,
|
|
1093
1093
|
header: `${o("archbase:Grupos")}`,
|
|
1094
|
-
render: (
|
|
1094
|
+
render: (t) => St(t.row),
|
|
1095
1095
|
enableSorting: !1,
|
|
1096
1096
|
enableColumnFilter: !1,
|
|
1097
1097
|
enableGlobalFilter: !1
|
|
1098
1098
|
}
|
|
1099
1099
|
),
|
|
1100
1100
|
/* @__PURE__ */ e.jsx(
|
|
1101
|
-
|
|
1101
|
+
f,
|
|
1102
1102
|
{
|
|
1103
1103
|
dataField: "isAdministrator",
|
|
1104
1104
|
dataType: "boolean",
|
|
@@ -1107,7 +1107,7 @@ function $a({
|
|
|
1107
1107
|
}
|
|
1108
1108
|
),
|
|
1109
1109
|
/* @__PURE__ */ e.jsx(
|
|
1110
|
-
|
|
1110
|
+
f,
|
|
1111
1111
|
{
|
|
1112
1112
|
dataField: "changePasswordOnNextLogin",
|
|
1113
1113
|
dataType: "boolean",
|
|
@@ -1117,7 +1117,7 @@ function $a({
|
|
|
1117
1117
|
}
|
|
1118
1118
|
),
|
|
1119
1119
|
/* @__PURE__ */ e.jsx(
|
|
1120
|
-
|
|
1120
|
+
f,
|
|
1121
1121
|
{
|
|
1122
1122
|
dataField: "allowPasswordChange",
|
|
1123
1123
|
dataType: "boolean",
|
|
@@ -1127,7 +1127,7 @@ function $a({
|
|
|
1127
1127
|
}
|
|
1128
1128
|
),
|
|
1129
1129
|
/* @__PURE__ */ e.jsx(
|
|
1130
|
-
|
|
1130
|
+
f,
|
|
1131
1131
|
{
|
|
1132
1132
|
dataField: "allowMultipleLogins",
|
|
1133
1133
|
dataType: "boolean",
|
|
@@ -1137,7 +1137,7 @@ function $a({
|
|
|
1137
1137
|
}
|
|
1138
1138
|
),
|
|
1139
1139
|
/* @__PURE__ */ e.jsx(
|
|
1140
|
-
|
|
1140
|
+
f,
|
|
1141
1141
|
{
|
|
1142
1142
|
dataField: "passwordNeverExpires",
|
|
1143
1143
|
dataType: "boolean",
|
|
@@ -1147,7 +1147,7 @@ function $a({
|
|
|
1147
1147
|
}
|
|
1148
1148
|
),
|
|
1149
1149
|
/* @__PURE__ */ e.jsx(
|
|
1150
|
-
|
|
1150
|
+
f,
|
|
1151
1151
|
{
|
|
1152
1152
|
dataField: "accountLocked",
|
|
1153
1153
|
dataType: "boolean",
|
|
@@ -1157,7 +1157,7 @@ function $a({
|
|
|
1157
1157
|
}
|
|
1158
1158
|
),
|
|
1159
1159
|
/* @__PURE__ */ e.jsx(
|
|
1160
|
-
|
|
1160
|
+
f,
|
|
1161
1161
|
{
|
|
1162
1162
|
dataField: "unlimitedAccessHours",
|
|
1163
1163
|
dataType: "boolean",
|
|
@@ -1168,7 +1168,7 @@ function $a({
|
|
|
1168
1168
|
)
|
|
1169
1169
|
] }), gr = /* @__PURE__ */ e.jsxs(me, { children: [
|
|
1170
1170
|
/* @__PURE__ */ e.jsx(
|
|
1171
|
-
|
|
1171
|
+
f,
|
|
1172
1172
|
{
|
|
1173
1173
|
dataField: "name",
|
|
1174
1174
|
dataType: "text",
|
|
@@ -1178,7 +1178,7 @@ function $a({
|
|
|
1178
1178
|
}
|
|
1179
1179
|
),
|
|
1180
1180
|
/* @__PURE__ */ e.jsx(
|
|
1181
|
-
|
|
1181
|
+
f,
|
|
1182
1182
|
{
|
|
1183
1183
|
dataField: "description",
|
|
1184
1184
|
dataType: "text",
|
|
@@ -1189,7 +1189,7 @@ function $a({
|
|
|
1189
1189
|
)
|
|
1190
1190
|
] }), jr = /* @__PURE__ */ e.jsxs(me, { children: [
|
|
1191
1191
|
/* @__PURE__ */ e.jsx(
|
|
1192
|
-
|
|
1192
|
+
f,
|
|
1193
1193
|
{
|
|
1194
1194
|
dataField: "name",
|
|
1195
1195
|
dataType: "text",
|
|
@@ -1199,7 +1199,7 @@ function $a({
|
|
|
1199
1199
|
}
|
|
1200
1200
|
),
|
|
1201
1201
|
/* @__PURE__ */ e.jsx(
|
|
1202
|
-
|
|
1202
|
+
f,
|
|
1203
1203
|
{
|
|
1204
1204
|
dataField: "description",
|
|
1205
1205
|
dataType: "text",
|
|
@@ -1210,7 +1210,7 @@ function $a({
|
|
|
1210
1210
|
)
|
|
1211
1211
|
] }), yr = /* @__PURE__ */ e.jsxs(me, { children: [
|
|
1212
1212
|
/* @__PURE__ */ e.jsx(
|
|
1213
|
-
|
|
1213
|
+
f,
|
|
1214
1214
|
{
|
|
1215
1215
|
dataField: "name",
|
|
1216
1216
|
dataType: "text",
|
|
@@ -1220,7 +1220,7 @@ function $a({
|
|
|
1220
1220
|
}
|
|
1221
1221
|
),
|
|
1222
1222
|
/* @__PURE__ */ e.jsx(
|
|
1223
|
-
|
|
1223
|
+
f,
|
|
1224
1224
|
{
|
|
1225
1225
|
dataField: "description",
|
|
1226
1226
|
dataType: "text",
|
|
@@ -1230,62 +1230,62 @@ function $a({
|
|
|
1230
1230
|
}
|
|
1231
1231
|
)
|
|
1232
1232
|
] }), wr = () => {
|
|
1233
|
-
const
|
|
1234
|
-
w || (
|
|
1235
|
-
}, vr = (
|
|
1236
|
-
|
|
1237
|
-
}, Cr = (
|
|
1238
|
-
|
|
1233
|
+
const t = st.newInstance();
|
|
1234
|
+
w || (t.id = void 0), y.insert(t), F(k.USER);
|
|
1235
|
+
}, vr = (t) => {
|
|
1236
|
+
y.isEmpty() || y.gotoRecordByData(t) && (y.edit(), F(k.USER));
|
|
1237
|
+
}, Cr = (t) => {
|
|
1238
|
+
y.isEmpty() || y.gotoRecordByData(t) && K.showConfirmDialogYesNo(
|
|
1239
1239
|
`${o("archbase:Confirme")}`,
|
|
1240
|
-
`${o("archbase:Deseja remover o usuário ")}${
|
|
1240
|
+
`${o("archbase:Deseja remover o usuário ")}${t.name} ?`,
|
|
1241
1241
|
() => {
|
|
1242
|
-
|
|
1242
|
+
y.remove();
|
|
1243
1243
|
},
|
|
1244
1244
|
() => {
|
|
1245
1245
|
}
|
|
1246
1246
|
);
|
|
1247
|
-
}, Sr = (
|
|
1248
|
-
|
|
1249
|
-
}, Ar = (
|
|
1250
|
-
S?.beforeDefaultUserActions?.(
|
|
1251
|
-
/* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () => Sr(
|
|
1252
|
-
/* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () => vr(
|
|
1253
|
-
/* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () => Cr(
|
|
1247
|
+
}, Sr = (t) => {
|
|
1248
|
+
y.isEmpty() || y.gotoRecordByData(t) && F(k.USER);
|
|
1249
|
+
}, Ar = (t) => /* @__PURE__ */ e.jsxs($, { gap: 1, wrap: "nowrap", children: [
|
|
1250
|
+
S?.beforeDefaultUserActions?.(t),
|
|
1251
|
+
/* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () => Sr(t), children: /* @__PURE__ */ e.jsx($e, { size: 20, color: p === "dark" ? u.colors.blue[8] : u.colors.blue[4] }) }),
|
|
1252
|
+
/* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () => vr(t), children: /* @__PURE__ */ e.jsx(fe, { size: 20, color: p === "dark" ? u.colors.yellow[8] : u.colors.yellow[4] }) }),
|
|
1253
|
+
/* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () => Cr(t), children: /* @__PURE__ */ e.jsx(Ce, { size: 20, color: p === "dark" ? u.colors.red[8] : u.colors.red[4] }) }),
|
|
1254
1254
|
/* @__PURE__ */ e.jsx(se, { withinPortal: !0, withArrow: !0, position: "left", label: `${o("archbase:Edit permissions")}`, children: /* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: Be, children: /* @__PURE__ */ e.jsx(Le, { size: 20, color: p === "dark" ? u.colors.green[8] : u.colors.green[4] }) }) }),
|
|
1255
|
-
S?.afterDefaultUserActions?.(
|
|
1255
|
+
S?.afterDefaultUserActions?.(t)
|
|
1256
1256
|
] }), Tr = () => {
|
|
1257
|
-
const
|
|
1258
|
-
w || (
|
|
1259
|
-
}, kr = (
|
|
1260
|
-
V.isEmpty() || V.gotoRecordByData(
|
|
1261
|
-
}, Rr = (
|
|
1262
|
-
V.isEmpty() || V.gotoRecordByData(
|
|
1257
|
+
const t = nt.newInstance();
|
|
1258
|
+
w || (t.id = void 0), V.insert(t), F(k.GROUP);
|
|
1259
|
+
}, kr = (t) => {
|
|
1260
|
+
V.isEmpty() || V.gotoRecordByData(t) && (V.isEditing() || V.edit(), F(k.GROUP));
|
|
1261
|
+
}, Rr = (t) => {
|
|
1262
|
+
V.isEmpty() || V.gotoRecordByData(t) && K.showConfirmDialogYesNo(
|
|
1263
1263
|
`${o("archbase:Confirme")}`,
|
|
1264
|
-
`${o("archbase:Deseja remover o grupo ")}${
|
|
1264
|
+
`${o("archbase:Deseja remover o grupo ")}${t.name} ?`,
|
|
1265
1265
|
() => {
|
|
1266
1266
|
V.remove();
|
|
1267
1267
|
},
|
|
1268
1268
|
() => {
|
|
1269
1269
|
}
|
|
1270
1270
|
);
|
|
1271
|
-
}, Fr = (
|
|
1272
|
-
V.isEmpty() || V.gotoRecordByData(
|
|
1273
|
-
}, Dr = (
|
|
1274
|
-
S?.beforeDefaultGroupActions?.(
|
|
1275
|
-
/* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () => Fr(
|
|
1276
|
-
/* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () => kr(
|
|
1277
|
-
/* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () => Rr(
|
|
1271
|
+
}, Fr = (t) => {
|
|
1272
|
+
V.isEmpty() || V.gotoRecordByData(t) && F(k.GROUP);
|
|
1273
|
+
}, Dr = (t) => /* @__PURE__ */ e.jsxs($, { gap: 1, wrap: "nowrap", children: [
|
|
1274
|
+
S?.beforeDefaultGroupActions?.(t),
|
|
1275
|
+
/* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () => Fr(t), children: /* @__PURE__ */ e.jsx($e, { size: 20, color: p === "dark" ? u.colors.blue[8] : u.colors.blue[4] }) }),
|
|
1276
|
+
/* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () => kr(t), children: /* @__PURE__ */ e.jsx(fe, { size: 20, color: p === "dark" ? u.colors.yellow[8] : u.colors.yellow[4] }) }),
|
|
1277
|
+
/* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () => Rr(t), children: /* @__PURE__ */ e.jsx(Ce, { size: 20, color: p === "dark" ? u.colors.red[8] : u.colors.red[4] }) }),
|
|
1278
1278
|
/* @__PURE__ */ e.jsx(se, { withinPortal: !0, withArrow: !0, position: "left", label: `${o("archbase:Edit permissions")}`, children: /* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: We, children: /* @__PURE__ */ e.jsx(Le, { size: 20, color: p === "dark" ? u.colors.green[8] : u.colors.green[4] }) }) }),
|
|
1279
|
-
S?.afterDefaultGroupActions?.(
|
|
1279
|
+
S?.afterDefaultGroupActions?.(t)
|
|
1280
1280
|
] }), ue = Xr(), Ir = async () => {
|
|
1281
1281
|
try {
|
|
1282
|
-
await
|
|
1282
|
+
await y.save();
|
|
1283
1283
|
} catch {
|
|
1284
1284
|
return;
|
|
1285
1285
|
}
|
|
1286
1286
|
F(""), ue?.clearAll();
|
|
1287
1287
|
}, Er = () => {
|
|
1288
|
-
F(""),
|
|
1288
|
+
F(""), y.isBrowsing() || y.cancel(), ue?.clearAll();
|
|
1289
1289
|
}, zr = async () => {
|
|
1290
1290
|
try {
|
|
1291
1291
|
await V.save();
|
|
@@ -1305,36 +1305,36 @@ function $a({
|
|
|
1305
1305
|
}, $r = () => {
|
|
1306
1306
|
F(""), O.isBrowsing() || O.cancel(), ue?.clearAll();
|
|
1307
1307
|
}, Lr = () => {
|
|
1308
|
-
const
|
|
1309
|
-
w || (
|
|
1310
|
-
}, Vr = (
|
|
1311
|
-
O.isEmpty() || O.gotoRecordByData(
|
|
1312
|
-
}, Ur = (
|
|
1313
|
-
O.isEmpty() || O.gotoRecordByData(
|
|
1308
|
+
const t = it.newInstance();
|
|
1309
|
+
w || (t.id = void 0), O.insert(t), F(k.PROFILE);
|
|
1310
|
+
}, Vr = (t) => {
|
|
1311
|
+
O.isEmpty() || O.gotoRecordByData(t) && (O.isEditing() || O.edit(), F(k.PROFILE));
|
|
1312
|
+
}, Ur = (t) => {
|
|
1313
|
+
O.isEmpty() || O.gotoRecordByData(t) && K.showConfirmDialogYesNo(
|
|
1314
1314
|
`${o("archbase:Confirme")}`,
|
|
1315
|
-
`${o("archbase:Deseja remover o perfil ")}${
|
|
1315
|
+
`${o("archbase:Deseja remover o perfil ")}${t.name} ?`,
|
|
1316
1316
|
() => {
|
|
1317
1317
|
O.remove();
|
|
1318
1318
|
},
|
|
1319
1319
|
() => {
|
|
1320
1320
|
}
|
|
1321
1321
|
);
|
|
1322
|
-
}, Mr = (
|
|
1323
|
-
O.isEmpty() || O.gotoRecordByData(
|
|
1324
|
-
}, Nr = (
|
|
1325
|
-
S?.beforeDefaultProfileActions?.(
|
|
1326
|
-
/* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () => Mr(
|
|
1327
|
-
/* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () => Vr(
|
|
1328
|
-
/* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () => Ur(
|
|
1322
|
+
}, Mr = (t) => {
|
|
1323
|
+
O.isEmpty() || O.gotoRecordByData(t) && F(k.PROFILE);
|
|
1324
|
+
}, Nr = (t) => /* @__PURE__ */ e.jsxs($, { gap: 1, wrap: "nowrap", children: [
|
|
1325
|
+
S?.beforeDefaultProfileActions?.(t),
|
|
1326
|
+
/* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () => Mr(t), children: /* @__PURE__ */ e.jsx($e, { size: 20, color: p === "dark" ? u.colors.blue[8] : u.colors.blue[4] }) }),
|
|
1327
|
+
/* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () => Vr(t), children: /* @__PURE__ */ e.jsx(fe, { size: 20, color: p === "dark" ? u.colors.yellow[8] : u.colors.yellow[4] }) }),
|
|
1328
|
+
/* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () => Ur(t), children: /* @__PURE__ */ e.jsx(Ce, { size: 20, color: p === "dark" ? u.colors.red[8] : u.colors.red[4] }) }),
|
|
1329
1329
|
/* @__PURE__ */ e.jsx(se, { withinPortal: !0, withArrow: !0, position: "left", label: `${o("archbase:Edit permissions")}`, children: /* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: qe, children: /* @__PURE__ */ e.jsx(Le, { size: 20, color: p === "dark" ? u.colors.green[8] : u.colors.green[4] }) }) }),
|
|
1330
|
-
S?.afterDefaultProfileActions?.(
|
|
1330
|
+
S?.afterDefaultProfileActions?.(t)
|
|
1331
1331
|
] }), Or = () => {
|
|
1332
|
-
const
|
|
1333
|
-
|
|
1332
|
+
const t = v.getCurrentRecord();
|
|
1333
|
+
t && K.showConfirmDialogYesNo(
|
|
1334
1334
|
`${o("archbase:Confirme")}`,
|
|
1335
|
-
`${o("archbase:Deseja revogar o token de Acesso do usuário ")}${
|
|
1335
|
+
`${o("archbase:Deseja revogar o token de Acesso do usuário ")}${t.user.name} ?`,
|
|
1336
1336
|
async () => {
|
|
1337
|
-
await q.revoke(
|
|
1337
|
+
await q.revoke(t.token).then(async () => {
|
|
1338
1338
|
Q.showSuccess(
|
|
1339
1339
|
`${o("mentors:Informação")}`,
|
|
1340
1340
|
`${o("mentors:Token de Acesso revogado com sucesso!")}`
|
|
@@ -1358,25 +1358,25 @@ function $a({
|
|
|
1358
1358
|
I(k.PROFILE);
|
|
1359
1359
|
}, Ge = () => {
|
|
1360
1360
|
I("");
|
|
1361
|
-
}, Br = () => /* @__PURE__ */ e.jsxs(
|
|
1361
|
+
}, Br = () => /* @__PURE__ */ e.jsxs(ae, { justify: "space-between", style: { width: "50%" }, children: [
|
|
1362
1362
|
/* @__PURE__ */ e.jsxs($, { align: "end", gap: "4px", wrap: "nowrap", children: [
|
|
1363
1363
|
/* @__PURE__ */ e.jsx(U, { color: "green", leftSection: /* @__PURE__ */ e.jsx(Ee, {}), onClick: wr, children: `${o("archbase:New")}` }),
|
|
1364
1364
|
/* @__PURE__ */ e.jsx(U, { color: "blue", leftSection: /* @__PURE__ */ e.jsx(fe, {}), onClick: Be, children: `${o("archbase:Edit permissions")}` })
|
|
1365
1365
|
] }),
|
|
1366
|
-
/* @__PURE__ */ e.jsx(
|
|
1367
|
-
] }), Wr = () => /* @__PURE__ */ e.jsxs(
|
|
1366
|
+
/* @__PURE__ */ e.jsx(ae, { align: "flex-start", justify: "flex-end", style: { width: "200px" } })
|
|
1367
|
+
] }), Wr = () => /* @__PURE__ */ e.jsxs(ae, { justify: "space-between", style: { width: "50%" }, children: [
|
|
1368
1368
|
/* @__PURE__ */ e.jsxs($, { align: "end", gap: "4px", wrap: "nowrap", children: [
|
|
1369
1369
|
/* @__PURE__ */ e.jsx(U, { color: "green", leftSection: /* @__PURE__ */ e.jsx(Ee, {}), onClick: Tr, children: `${o("archbase:New")}` }),
|
|
1370
1370
|
/* @__PURE__ */ e.jsx(U, { color: "blue", leftSection: /* @__PURE__ */ e.jsx(fe, {}), onClick: We, children: `${o("archbase:Edit permissions")}` })
|
|
1371
1371
|
] }),
|
|
1372
|
-
/* @__PURE__ */ e.jsx(
|
|
1373
|
-
] }), qr = () => /* @__PURE__ */ e.jsxs(
|
|
1372
|
+
/* @__PURE__ */ e.jsx(ae, { align: "flex-start", justify: "flex-end", style: { width: "200px" } })
|
|
1373
|
+
] }), qr = () => /* @__PURE__ */ e.jsxs(ae, { justify: "space-between", style: { width: "50%" }, children: [
|
|
1374
1374
|
/* @__PURE__ */ e.jsxs($, { align: "end", gap: "4px", wrap: "nowrap", children: [
|
|
1375
1375
|
/* @__PURE__ */ e.jsx(U, { color: "green", leftSection: /* @__PURE__ */ e.jsx(Ee, {}), onClick: Lr, children: `${o("archbase:New")}` }),
|
|
1376
1376
|
/* @__PURE__ */ e.jsx(U, { color: "blue", leftSection: /* @__PURE__ */ e.jsx(fe, {}), onClick: qe, children: `${o("archbase:Edit permissions")}` })
|
|
1377
1377
|
] }),
|
|
1378
|
-
/* @__PURE__ */ e.jsx(
|
|
1379
|
-
] }), Hr = () => /* @__PURE__ */ e.jsx(
|
|
1378
|
+
/* @__PURE__ */ e.jsx(ae, { align: "flex-start", justify: "flex-end", style: { width: "200px" } })
|
|
1379
|
+
] }), Hr = () => /* @__PURE__ */ e.jsx(ae, { justify: "space-between", style: { width: "50%" }, children: /* @__PURE__ */ e.jsx($, { align: "start", gap: "4px", wrap: "nowrap", children: /* @__PURE__ */ e.jsx(
|
|
1380
1380
|
U,
|
|
1381
1381
|
{
|
|
1382
1382
|
disabled: !v.getCurrentRecord(),
|
|
@@ -1414,7 +1414,7 @@ function $a({
|
|
|
1414
1414
|
width: "100%",
|
|
1415
1415
|
height: "100%",
|
|
1416
1416
|
withBorder: !1,
|
|
1417
|
-
dataSource:
|
|
1417
|
+
dataSource: y,
|
|
1418
1418
|
withColumnBorders: !0,
|
|
1419
1419
|
striped: !0,
|
|
1420
1420
|
enableTopToolbar: !0,
|
|
@@ -1523,7 +1523,7 @@ function $a({
|
|
|
1523
1523
|
children: /* @__PURE__ */ e.jsx(
|
|
1524
1524
|
be,
|
|
1525
1525
|
{
|
|
1526
|
-
gridRef:
|
|
1526
|
+
gridRef: j,
|
|
1527
1527
|
printTitle: "Recursos",
|
|
1528
1528
|
width: "100%",
|
|
1529
1529
|
height: "100%",
|
|
@@ -1559,7 +1559,7 @@ function $a({
|
|
|
1559
1559
|
children: /* @__PURE__ */ e.jsx(
|
|
1560
1560
|
be,
|
|
1561
1561
|
{
|
|
1562
|
-
gridRef:
|
|
1562
|
+
gridRef: b,
|
|
1563
1563
|
printTitle: "Tokens de API",
|
|
1564
1564
|
width: "100%",
|
|
1565
1565
|
height: "100%",
|
|
@@ -1582,27 +1582,27 @@ function $a({
|
|
|
1582
1582
|
}
|
|
1583
1583
|
),
|
|
1584
1584
|
Z === k.USER ? /* @__PURE__ */ e.jsx(
|
|
1585
|
-
|
|
1585
|
+
yt,
|
|
1586
1586
|
{
|
|
1587
1587
|
onClickOk: Ir,
|
|
1588
1588
|
opened: !0,
|
|
1589
|
-
dataSource:
|
|
1589
|
+
dataSource: y,
|
|
1590
1590
|
onClickCancel: Er,
|
|
1591
1591
|
options: d
|
|
1592
1592
|
}
|
|
1593
1593
|
) : null,
|
|
1594
1594
|
Z === k.GROUP ? /* @__PURE__ */ e.jsx(
|
|
1595
|
-
|
|
1595
|
+
wt,
|
|
1596
1596
|
{
|
|
1597
1597
|
onClickOk: zr,
|
|
1598
1598
|
opened: !0,
|
|
1599
1599
|
dataSource: V,
|
|
1600
1600
|
onClickCancel: Pr,
|
|
1601
|
-
options:
|
|
1601
|
+
options: m
|
|
1602
1602
|
}
|
|
1603
1603
|
) : null,
|
|
1604
1604
|
Z === k.PROFILE ? /* @__PURE__ */ e.jsx(
|
|
1605
|
-
|
|
1605
|
+
mt,
|
|
1606
1606
|
{
|
|
1607
1607
|
onClickOk: Gr,
|
|
1608
1608
|
opened: !0,
|
|
@@ -1614,7 +1614,7 @@ function $a({
|
|
|
1614
1614
|
N === k.USER ? /* @__PURE__ */ e.jsx(
|
|
1615
1615
|
Ue,
|
|
1616
1616
|
{
|
|
1617
|
-
dataSource:
|
|
1617
|
+
dataSource: y,
|
|
1618
1618
|
opened: !!N,
|
|
1619
1619
|
close: Ge
|
|
1620
1620
|
}
|
|
@@ -1637,9 +1637,9 @@ function $a({
|
|
|
1637
1637
|
) : null
|
|
1638
1638
|
] });
|
|
1639
1639
|
}
|
|
1640
|
-
function
|
|
1640
|
+
function Lt({ height: r = "400px", width: h = "100%" }) {
|
|
1641
1641
|
nr();
|
|
1642
|
-
const w = ir("apiTokenStore"), d = { validateEntity: () => [] }, { colorScheme: l } = Oe(), [
|
|
1642
|
+
const w = ir("apiTokenStore"), d = { validateEntity: () => [] }, { colorScheme: l } = Oe(), [m, S] = M(void 0), u = _(X.ApiToken), [P, p] = M(""), C = je(null), i = (R) => R.id, { dataSource: c } = at({
|
|
1643
1643
|
initialData: [],
|
|
1644
1644
|
name: "dataSource"
|
|
1645
1645
|
}), L = ke(
|
|
@@ -1647,7 +1647,7 @@ function La({ height: r = "400px", width: h = "100%" }) {
|
|
|
1647
1647
|
c,
|
|
1648
1648
|
void 0,
|
|
1649
1649
|
void 0
|
|
1650
|
-
), { dataSource:
|
|
1650
|
+
), { dataSource: g, isLoading: re } = Me({
|
|
1651
1651
|
name: "dsApiToken",
|
|
1652
1652
|
service: u,
|
|
1653
1653
|
store: w,
|
|
@@ -1659,16 +1659,16 @@ function La({ height: r = "400px", width: h = "100%" }) {
|
|
|
1659
1659
|
onDestroy: (R) => {
|
|
1660
1660
|
},
|
|
1661
1661
|
onError: (R, W) => {
|
|
1662
|
-
S(R), Q.showError(
|
|
1662
|
+
S(R), Q.showError(a().t("archbase:WARNING"), R, W);
|
|
1663
1663
|
}
|
|
1664
1664
|
}), J = ke(
|
|
1665
1665
|
"ArchbaseApiTokenView-RemoteDataSource",
|
|
1666
|
-
|
|
1666
|
+
g,
|
|
1667
1667
|
void 0,
|
|
1668
1668
|
void 0
|
|
1669
|
-
),
|
|
1669
|
+
), te = `calc(${r} - 40px)`, Z = /* @__PURE__ */ e.jsxs(me, { children: [
|
|
1670
1670
|
/* @__PURE__ */ e.jsx(
|
|
1671
|
-
|
|
1671
|
+
f,
|
|
1672
1672
|
{
|
|
1673
1673
|
dataField: "user.avatar",
|
|
1674
1674
|
dataType: "image",
|
|
@@ -1686,7 +1686,7 @@ function La({ height: r = "400px", width: h = "100%" }) {
|
|
|
1686
1686
|
}
|
|
1687
1687
|
),
|
|
1688
1688
|
/* @__PURE__ */ e.jsx(
|
|
1689
|
-
|
|
1689
|
+
f,
|
|
1690
1690
|
{
|
|
1691
1691
|
dataField: "user.userName",
|
|
1692
1692
|
dataType: "text",
|
|
@@ -1696,7 +1696,7 @@ function La({ height: r = "400px", width: h = "100%" }) {
|
|
|
1696
1696
|
}
|
|
1697
1697
|
),
|
|
1698
1698
|
/* @__PURE__ */ e.jsx(
|
|
1699
|
-
|
|
1699
|
+
f,
|
|
1700
1700
|
{
|
|
1701
1701
|
dataField: "user.email",
|
|
1702
1702
|
dataType: "text",
|
|
@@ -1706,7 +1706,27 @@ function La({ height: r = "400px", width: h = "100%" }) {
|
|
|
1706
1706
|
}
|
|
1707
1707
|
),
|
|
1708
1708
|
/* @__PURE__ */ e.jsx(
|
|
1709
|
-
|
|
1709
|
+
f,
|
|
1710
|
+
{
|
|
1711
|
+
dataField: "name",
|
|
1712
|
+
dataType: "text",
|
|
1713
|
+
header: "Nome",
|
|
1714
|
+
size: 240,
|
|
1715
|
+
inputFilterType: "text"
|
|
1716
|
+
}
|
|
1717
|
+
),
|
|
1718
|
+
/* @__PURE__ */ e.jsx(
|
|
1719
|
+
f,
|
|
1720
|
+
{
|
|
1721
|
+
dataField: "description",
|
|
1722
|
+
dataType: "text",
|
|
1723
|
+
header: "Descrição",
|
|
1724
|
+
size: 300,
|
|
1725
|
+
inputFilterType: "text"
|
|
1726
|
+
}
|
|
1727
|
+
),
|
|
1728
|
+
/* @__PURE__ */ e.jsx(
|
|
1729
|
+
f,
|
|
1710
1730
|
{
|
|
1711
1731
|
dataField: "token",
|
|
1712
1732
|
dataType: "text",
|
|
@@ -1717,7 +1737,7 @@ function La({ height: r = "400px", width: h = "100%" }) {
|
|
|
1717
1737
|
}
|
|
1718
1738
|
),
|
|
1719
1739
|
/* @__PURE__ */ e.jsx(
|
|
1720
|
-
|
|
1740
|
+
f,
|
|
1721
1741
|
{
|
|
1722
1742
|
dataField: "tenantId",
|
|
1723
1743
|
dataType: "text",
|
|
@@ -1728,7 +1748,7 @@ function La({ height: r = "400px", width: h = "100%" }) {
|
|
|
1728
1748
|
}
|
|
1729
1749
|
),
|
|
1730
1750
|
/* @__PURE__ */ e.jsx(
|
|
1731
|
-
|
|
1751
|
+
f,
|
|
1732
1752
|
{
|
|
1733
1753
|
dataField: "expirationDate",
|
|
1734
1754
|
dataType: "text",
|
|
@@ -1741,10 +1761,10 @@ function La({ height: r = "400px", width: h = "100%" }) {
|
|
|
1741
1761
|
W.setHours(0, 0, 0, 0);
|
|
1742
1762
|
const x = new Date(R.row.expirationDate);
|
|
1743
1763
|
x.setHours(0, 0, 0, 0);
|
|
1744
|
-
const
|
|
1745
|
-
let ne = Math.max(0, Math.min(100,
|
|
1746
|
-
|
|
1747
|
-
const G =
|
|
1764
|
+
const j = x.getTime() - W.getTime(), b = Math.ceil(j / (1e3 * 60 * 60 * 24));
|
|
1765
|
+
let ne = Math.max(0, Math.min(100, b / 365 * 100)), s = "green", n = "";
|
|
1766
|
+
b < 0 ? (s = "red", ne = 100, n = `Vencido há ${Math.abs(b)} dia${Math.abs(b) !== 1 ? "s" : ""}`) : b === 0 ? (s = "red", ne = 5, n = "Vence hoje") : b <= 7 ? (s = "red", n = `${b} dia${b !== 1 ? "s" : ""}`) : b <= 30 ? (s = "orange", n = `${b} dias`) : b <= 90 ? (s = "yellow", n = `${b} dias`) : (s = "green", n = `${b} dias`);
|
|
1767
|
+
const G = b < 0 ? `Vencido em ${x.toLocaleDateString()}` : `Expira em ${x.toLocaleDateString()}`;
|
|
1748
1768
|
return /* @__PURE__ */ e.jsx(se, { label: G, withArrow: !0, children: /* @__PURE__ */ e.jsxs($, { gap: "xs", wrap: "nowrap", children: [
|
|
1749
1769
|
/* @__PURE__ */ e.jsx(
|
|
1750
1770
|
Jr,
|
|
@@ -1752,17 +1772,17 @@ function La({ height: r = "400px", width: h = "100%" }) {
|
|
|
1752
1772
|
size: 36,
|
|
1753
1773
|
thickness: 4,
|
|
1754
1774
|
roundCaps: !0,
|
|
1755
|
-
sections: [{ value:
|
|
1775
|
+
sections: [{ value: b < 0 ? 100 : ne, color: s }]
|
|
1756
1776
|
}
|
|
1757
1777
|
),
|
|
1758
|
-
/* @__PURE__ */ e.jsx(H, { size: "sm", c:
|
|
1778
|
+
/* @__PURE__ */ e.jsx(H, { size: "sm", c: b < 0 ? "red" : void 0, fw: b <= 7 ? 600 : void 0, children: n })
|
|
1759
1779
|
] }) });
|
|
1760
1780
|
},
|
|
1761
1781
|
inputFilterType: "text"
|
|
1762
1782
|
}
|
|
1763
1783
|
),
|
|
1764
1784
|
/* @__PURE__ */ e.jsx(
|
|
1765
|
-
|
|
1785
|
+
f,
|
|
1766
1786
|
{
|
|
1767
1787
|
dataField: "activated",
|
|
1768
1788
|
dataType: "boolean",
|
|
@@ -1771,7 +1791,7 @@ function La({ height: r = "400px", width: h = "100%" }) {
|
|
|
1771
1791
|
}
|
|
1772
1792
|
),
|
|
1773
1793
|
/* @__PURE__ */ e.jsx(
|
|
1774
|
-
|
|
1794
|
+
f,
|
|
1775
1795
|
{
|
|
1776
1796
|
dataField: "revoked",
|
|
1777
1797
|
dataType: "boolean",
|
|
@@ -1780,20 +1800,20 @@ function La({ height: r = "400px", width: h = "100%" }) {
|
|
|
1780
1800
|
}
|
|
1781
1801
|
)
|
|
1782
1802
|
] }), F = () => {
|
|
1783
|
-
c.insert(
|
|
1803
|
+
c.insert(lt.newInstance()), c && !L.isDataSourceV2 && L.v1State.forceUpdate(), p("apiToken");
|
|
1784
1804
|
}, N = () => {
|
|
1785
|
-
|
|
1786
|
-
`${
|
|
1787
|
-
`${
|
|
1805
|
+
g.getCurrentRecord() && K.showConfirmDialogYesNo(
|
|
1806
|
+
`${a().t("archbase:Confirme")}`,
|
|
1807
|
+
`${a().t("archbase:Deseja revogar o token de API do usuário ")}${g.getCurrentRecord().user.name} ?`,
|
|
1788
1808
|
async () => {
|
|
1789
|
-
await u.revoke(
|
|
1809
|
+
await u.revoke(g.getCurrentRecord().token).then(async () => {
|
|
1790
1810
|
Q.showSuccess(
|
|
1791
|
-
`${
|
|
1792
|
-
`${
|
|
1793
|
-
),
|
|
1811
|
+
`${a().t("mentors:Informação")}`,
|
|
1812
|
+
`${a().t("mentors:Token de API revogado com sucesso!")}`
|
|
1813
|
+
), g.refreshData(), g && !J.isDataSourceV2 && J.v1State.forceUpdate();
|
|
1794
1814
|
}).catch((R) => {
|
|
1795
1815
|
K.showErrorWithDetails(
|
|
1796
|
-
`${
|
|
1816
|
+
`${a().t("mentors:Atenção")}`,
|
|
1797
1817
|
Ae(R),
|
|
1798
1818
|
Ie(R)
|
|
1799
1819
|
);
|
|
@@ -1810,34 +1830,34 @@ function La({ height: r = "400px", width: h = "100%" }) {
|
|
|
1810
1830
|
try {
|
|
1811
1831
|
if (c.validate(), !x.user || !x.user.email) {
|
|
1812
1832
|
K.showErrorWithDetails(
|
|
1813
|
-
`${
|
|
1814
|
-
`${
|
|
1833
|
+
`${a().t("archbase:WARNING")}`,
|
|
1834
|
+
`${a().t("archbase:Selecione um usuário para o token de API")}`,
|
|
1815
1835
|
""
|
|
1816
1836
|
);
|
|
1817
1837
|
return;
|
|
1818
1838
|
}
|
|
1819
|
-
await u.create(x.user.email, x.expirationDate, x.name, x.description).then(async (
|
|
1820
|
-
c.cancel(), c && !L.isDataSourceV2 && L.v1State.forceUpdate(),
|
|
1821
|
-
`${
|
|
1822
|
-
`${
|
|
1839
|
+
await u.create(x.user.email, x.expirationDate, x.name, x.description).then(async (j) => {
|
|
1840
|
+
c.cancel(), c && !L.isDataSourceV2 && L.v1State.forceUpdate(), g.append(j), g && !J.isDataSourceV2 && J.v1State.forceUpdate(), Q.showSuccess(
|
|
1841
|
+
`${a().t("mentors:Informação")}`,
|
|
1842
|
+
`${a().t("mentors:Token de API gerado com sucesso!")}`
|
|
1823
1843
|
), W && W(!0);
|
|
1824
|
-
}).catch((
|
|
1844
|
+
}).catch((j) => {
|
|
1825
1845
|
K.showErrorWithDetails(
|
|
1826
|
-
`${
|
|
1827
|
-
Ae(
|
|
1828
|
-
Ie(
|
|
1846
|
+
`${a().t("mentors:Atenção")}`,
|
|
1847
|
+
Ae(j),
|
|
1848
|
+
Ie(j)
|
|
1829
1849
|
);
|
|
1830
1850
|
});
|
|
1831
|
-
} catch (
|
|
1851
|
+
} catch (j) {
|
|
1832
1852
|
K.showErrorWithDetails(
|
|
1833
|
-
`${
|
|
1834
|
-
Ae(
|
|
1835
|
-
Ie(
|
|
1853
|
+
`${a().t("mentors:Atenção")}`,
|
|
1854
|
+
Ae(j),
|
|
1855
|
+
Ie(j)
|
|
1836
1856
|
);
|
|
1837
1857
|
}
|
|
1838
|
-
}, o = () => /* @__PURE__ */ e.jsx(
|
|
1839
|
-
/* @__PURE__ */ e.jsx(U, { color: "green", leftSection: /* @__PURE__ */ e.jsx(Ee, {}), onClick: F, children:
|
|
1840
|
-
/* @__PURE__ */ e.jsx(U, { disabled: !
|
|
1858
|
+
}, o = () => /* @__PURE__ */ e.jsx(ae, { justify: "space-between", style: { width: "50%" }, children: /* @__PURE__ */ e.jsxs($, { align: "start", gap: "2px", wrap: "nowrap", children: [
|
|
1859
|
+
/* @__PURE__ */ e.jsx(U, { color: "green", leftSection: /* @__PURE__ */ e.jsx(Ee, {}), onClick: F, children: a().t("archbase:New") }),
|
|
1860
|
+
/* @__PURE__ */ e.jsx(U, { disabled: !g.getCurrentRecord(), color: "red", leftSection: /* @__PURE__ */ e.jsx(Ce, {}), onClick: N, children: a().t("archbase:Revoke") })
|
|
1841
1861
|
] }) });
|
|
1842
1862
|
return /* @__PURE__ */ e.jsxs(Y, { p: "md", style: { height: r, display: "flex", flexDirection: "column" }, children: [
|
|
1843
1863
|
/* @__PURE__ */ e.jsx(
|
|
@@ -1845,7 +1865,7 @@ function La({ height: r = "400px", width: h = "100%" }) {
|
|
|
1845
1865
|
{
|
|
1846
1866
|
withBorder: !0,
|
|
1847
1867
|
style: {
|
|
1848
|
-
height:
|
|
1868
|
+
height: te,
|
|
1849
1869
|
display: "flex",
|
|
1850
1870
|
width: "100%",
|
|
1851
1871
|
flex: 1,
|
|
@@ -1860,15 +1880,15 @@ function La({ height: r = "400px", width: h = "100%" }) {
|
|
|
1860
1880
|
width: "100%",
|
|
1861
1881
|
height: "100%",
|
|
1862
1882
|
withBorder: !1,
|
|
1863
|
-
dataSource:
|
|
1883
|
+
dataSource: g,
|
|
1864
1884
|
withColumnBorders: !0,
|
|
1865
1885
|
striped: !0,
|
|
1866
1886
|
enableTopToolbar: !0,
|
|
1867
1887
|
enableRowActions: !1,
|
|
1868
1888
|
pageSize: 50,
|
|
1869
1889
|
isLoading: re,
|
|
1870
|
-
isError: !!
|
|
1871
|
-
error:
|
|
1890
|
+
isError: !!m,
|
|
1891
|
+
error: m,
|
|
1872
1892
|
enableGlobalFilter: !0,
|
|
1873
1893
|
getRowId: i,
|
|
1874
1894
|
toolbarLeftContent: o(),
|
|
@@ -1878,7 +1898,7 @@ function La({ height: r = "400px", width: h = "100%" }) {
|
|
|
1878
1898
|
}
|
|
1879
1899
|
),
|
|
1880
1900
|
P === "apiToken" ? /* @__PURE__ */ e.jsx(
|
|
1881
|
-
|
|
1901
|
+
Ct,
|
|
1882
1902
|
{
|
|
1883
1903
|
onClickOk: I,
|
|
1884
1904
|
opened: !0,
|
|
@@ -1890,14 +1910,14 @@ function La({ height: r = "400px", width: h = "100%" }) {
|
|
|
1890
1910
|
] });
|
|
1891
1911
|
}
|
|
1892
1912
|
export {
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
$
|
|
1897
|
-
|
|
1913
|
+
Ct as ApiTokenModal,
|
|
1914
|
+
Lt as ArchbaseApiTokenView,
|
|
1915
|
+
bt as ArchbaseDualListSelector,
|
|
1916
|
+
$t as ArchbaseSecurityView,
|
|
1917
|
+
wt as GroupModal,
|
|
1898
1918
|
Ue as PermissionsSelectorModal,
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1919
|
+
mt as ProfileModal,
|
|
1920
|
+
gt as RenderProfileUserItem,
|
|
1921
|
+
yt as UserModal
|
|
1902
1922
|
};
|
|
1903
1923
|
//# sourceMappingURL=index.js.map
|