@archbase/security-ui 4.0.1 → 4.0.3
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/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +897 -888
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { Modal as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { ArchbaseSpaceFixed as
|
|
11
|
-
var Ue = { exports: {} },
|
|
1
|
+
import { Modal as Fe, ScrollArea as Ie, Stack as oe, Grid as A, Group as $, Button as U, Paper as Y, Box as Je, Text as H, List as De, Checkbox as Ze, Tooltip as se, ActionIcon as B, Flex as te, Space as nr, Input as he, useTree as Qe, useMantineColorScheme as Be, TextInput as Ye, Tree as Xe, Badge as Se, Tabs as ie, RingProgress as Zr } from "@mantine/core";
|
|
2
|
+
import { getI18nextInstance as t, ARCHBASE_IOC_API_TYPE as X, emit as Pe, builder as Te, convertDateToISOString as Qr, processErrorMessage as Ae, getKeyByEnumValue as le, useArchbaseTheme as ir, useArchbaseValidator as Yr, useArchbaseTranslation as Xr, useValidationErrors as Kr, processDetailErrorMessage as Ee } from "@archbase/core";
|
|
3
|
+
import { ArchbaseEdit as ee, ArchbaseNotifications as Q, ArchbasePasswordEdit as _r, ArchbaseSelect as ea, ArchbaseCheckbox as pe, ArchbaseAvatarEdit as ra, ArchbaseAsyncSelect as aa, Columns as me, ArchbaseDataGridColumn as y, ArchbaseDataGrid as be, ArchbaseDialog as K } from "@archbase/components";
|
|
4
|
+
import { useArchbaseV1V2Compatibility as ke, useArchbaseDataSourceListener as Ke, useArchbaseRemoteServiceApi as _, useArchbaseRemoteDataSource as Ne, ArchbaseDataSource as ta, useArchbaseStore as lr, useArchbaseRemoteDataSourceV2 as we, useArchbaseDataSource as oa } from "@archbase/data";
|
|
5
|
+
import { useState as M, useCallback as ge, useEffect as Re, forwardRef as sa, useMemo as xe, useRef as je } from "react";
|
|
6
|
+
import { IconArrowRight as cr, IconArrowLeft as dr, IconChevronDown as _e, IconBorderCornerSquare as er, IconEye as Le, IconEdit as fe, IconTrashX as ve, IconShieldCheckered as Ve, IconPlus as ze } from "@tabler/icons-react";
|
|
7
|
+
import { UserGroupDto as rr, SecurityType as R, UserDto as na, GroupDto as ia, ProfileDto as la, ApiTokenDto as ca } from "@archbase/security";
|
|
8
|
+
import { DateTimePicker as da } from "@mantine/dates";
|
|
9
|
+
import { useFocusTrap as ua, useDebouncedValue as ar } from "@mantine/hooks";
|
|
10
|
+
import { ArchbaseSpaceFixed as ha, ArchbaseSpaceFill as pa, ArchbaseSpaceBottom as xa } from "@archbase/layout";
|
|
11
|
+
var Ue = { exports: {} }, Ce = {};
|
|
12
12
|
/**
|
|
13
13
|
* @license React
|
|
14
14
|
* react-jsx-runtime.production.js
|
|
@@ -18,143 +18,142 @@ var Ue = { 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 (
|
|
24
|
-
return
|
|
25
|
-
|
|
26
|
-
var r = Symbol.for("react.transitional.element"),
|
|
27
|
-
function
|
|
28
|
-
var
|
|
29
|
-
if (
|
|
30
|
-
|
|
31
|
-
for (var
|
|
32
|
-
|
|
21
|
+
var tr;
|
|
22
|
+
function fa() {
|
|
23
|
+
if (tr)
|
|
24
|
+
return Ce;
|
|
25
|
+
tr = 1;
|
|
26
|
+
var r = Symbol.for("react.transitional.element"), h = Symbol.for("react.fragment");
|
|
27
|
+
function w(d, l, f) {
|
|
28
|
+
var S = null;
|
|
29
|
+
if (f !== void 0 && (S = "" + f), l.key !== void 0 && (S = "" + l.key), "key" in l) {
|
|
30
|
+
f = {};
|
|
31
|
+
for (var u in l)
|
|
32
|
+
u !== "key" && (f[u] = l[u]);
|
|
33
33
|
} else
|
|
34
|
-
|
|
35
|
-
return
|
|
34
|
+
f = l;
|
|
35
|
+
return l = f.ref, {
|
|
36
36
|
$$typeof: r,
|
|
37
|
-
type:
|
|
38
|
-
key:
|
|
39
|
-
ref:
|
|
40
|
-
props:
|
|
37
|
+
type: d,
|
|
38
|
+
key: S,
|
|
39
|
+
ref: l !== void 0 ? l : null,
|
|
40
|
+
props: f
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
|
-
return
|
|
43
|
+
return Ce.Fragment = h, Ce.jsx = w, Ce.jsxs = w, Ce;
|
|
44
44
|
}
|
|
45
|
-
var
|
|
46
|
-
function
|
|
47
|
-
return
|
|
45
|
+
var or;
|
|
46
|
+
function ma() {
|
|
47
|
+
return or || (or = 1, Ue.exports = fa()), Ue.exports;
|
|
48
48
|
}
|
|
49
|
-
var e =
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
r.onClickCancel(r.dataSource.current);
|
|
49
|
+
var e = ma();
|
|
50
|
+
const ba = (r) => {
|
|
51
|
+
const h = { ...r.options ?? {} }, w = () => {
|
|
52
|
+
r.onCustomSave ? r.onCustomSave(r.dataSource.getCurrentRecord(), (l) => {
|
|
53
|
+
l && r.onAfterSave && r.onAfterSave(r.dataSource.getCurrentRecord()), r.onClickOk(r.dataSource.getCurrentRecord(), l);
|
|
54
|
+
}) : r.onClickOk(r.dataSource.getCurrentRecord(), !0);
|
|
55
|
+
}, d = () => {
|
|
56
|
+
r.onClickCancel(r.dataSource.getCurrentRecord());
|
|
58
57
|
};
|
|
59
58
|
return /* @__PURE__ */ e.jsx(
|
|
60
|
-
|
|
59
|
+
Fe,
|
|
61
60
|
{
|
|
62
61
|
opened: r.opened,
|
|
63
|
-
onClose:
|
|
64
|
-
title:
|
|
62
|
+
onClose: d,
|
|
63
|
+
title: t().t("archbase:Perfil"),
|
|
65
64
|
size: "60%",
|
|
66
65
|
styles: { content: { maxWidth: 1e3 } },
|
|
67
|
-
children: /* @__PURE__ */ e.jsx(
|
|
68
|
-
|
|
69
|
-
/* @__PURE__ */ e.jsxs(
|
|
70
|
-
/* @__PURE__ */ e.jsx(
|
|
71
|
-
|
|
66
|
+
children: /* @__PURE__ */ e.jsx(Ie, { style: { height: "460px" }, children: /* @__PURE__ */ e.jsxs(oe, { w: "98%", children: [
|
|
67
|
+
h?.customContentBefore && h.customContentBefore(r.dataSource.getCurrentRecord()),
|
|
68
|
+
/* @__PURE__ */ e.jsxs(A, { children: [
|
|
69
|
+
/* @__PURE__ */ e.jsx(A.Col, { span: { base: 12, md: 12, lg: 12 }, children: /* @__PURE__ */ e.jsx(
|
|
70
|
+
ee,
|
|
72
71
|
{
|
|
73
|
-
label: `${
|
|
74
|
-
placeholder: `${
|
|
72
|
+
label: `${t().t("archbase:Nome do perfil")}`,
|
|
73
|
+
placeholder: `${t().t("archbase:Informe o nome do perfil")}`,
|
|
75
74
|
dataSource: r.dataSource,
|
|
76
75
|
dataField: "name"
|
|
77
76
|
}
|
|
78
77
|
) }),
|
|
79
|
-
/* @__PURE__ */ e.jsx(
|
|
80
|
-
|
|
78
|
+
/* @__PURE__ */ e.jsx(A.Col, { span: { base: 12, md: 12, lg: 12 }, children: /* @__PURE__ */ e.jsx(
|
|
79
|
+
ee,
|
|
81
80
|
{
|
|
82
|
-
label: `${
|
|
83
|
-
placeholder: `${
|
|
81
|
+
label: `${t().t("archbase:Descrição do perfil")}`,
|
|
82
|
+
placeholder: `${t().t("archbase:Informe a descrição do perfil")}`,
|
|
84
83
|
dataSource: r.dataSource,
|
|
85
84
|
dataField: "description"
|
|
86
85
|
}
|
|
87
86
|
) })
|
|
88
87
|
] }),
|
|
89
|
-
|
|
90
|
-
/* @__PURE__ */ e.jsxs(
|
|
91
|
-
/* @__PURE__ */ e.jsx(U, { variant: "default", onClick:
|
|
92
|
-
/* @__PURE__ */ e.jsx(U, { onClick:
|
|
88
|
+
h?.customContentAfter && h.customContentAfter(r.dataSource.getCurrentRecord()),
|
|
89
|
+
/* @__PURE__ */ e.jsxs($, { justify: "flex-end", mt: "md", children: [
|
|
90
|
+
/* @__PURE__ */ e.jsx(U, { variant: "default", onClick: d, children: t().t("archbase:Cancelar") }),
|
|
91
|
+
/* @__PURE__ */ e.jsx(U, { onClick: w, children: t().t("archbase:Salvar") })
|
|
93
92
|
] })
|
|
94
93
|
] }) })
|
|
95
94
|
}
|
|
96
95
|
);
|
|
97
96
|
};
|
|
98
|
-
function
|
|
97
|
+
function ga({
|
|
99
98
|
availableItemsDS: r,
|
|
100
|
-
assignedItemsDS:
|
|
101
|
-
idFieldAvailable:
|
|
102
|
-
labelFieldAvailable:
|
|
103
|
-
idFieldAssigned:
|
|
104
|
-
labelFieldAssigned:
|
|
105
|
-
handleCreateAssociationObject:
|
|
106
|
-
width:
|
|
107
|
-
height:
|
|
108
|
-
titleAvailable:
|
|
109
|
-
titleAssigned:
|
|
99
|
+
assignedItemsDS: h,
|
|
100
|
+
idFieldAvailable: w,
|
|
101
|
+
labelFieldAvailable: d,
|
|
102
|
+
idFieldAssigned: l,
|
|
103
|
+
labelFieldAssigned: f,
|
|
104
|
+
handleCreateAssociationObject: S,
|
|
105
|
+
width: u = "400px",
|
|
106
|
+
height: P = "200px",
|
|
107
|
+
titleAvailable: x = "Disponíveis",
|
|
108
|
+
titleAssigned: v = "Selecionados"
|
|
110
109
|
}) {
|
|
111
|
-
|
|
110
|
+
ke(
|
|
112
111
|
"ArchbaseDualListSelector-Available",
|
|
113
112
|
r,
|
|
114
113
|
void 0,
|
|
115
114
|
[]
|
|
116
115
|
);
|
|
117
|
-
const
|
|
116
|
+
const i = ke(
|
|
118
117
|
"ArchbaseDualListSelector-Assigned",
|
|
119
|
-
|
|
118
|
+
h,
|
|
120
119
|
void 0,
|
|
121
120
|
[]
|
|
122
|
-
), [
|
|
123
|
-
r &&
|
|
124
|
-
}, [r,
|
|
125
|
-
|
|
121
|
+
), [c, L] = M([]), [b, re] = M([]), [J, ae] = M([]), [Z, I] = M([]), N = ge(() => {
|
|
122
|
+
r && L(r.browseRecords()), h && re(h.browseRecords());
|
|
123
|
+
}, [r, h]);
|
|
124
|
+
Ke({
|
|
126
125
|
dataSource: r,
|
|
127
126
|
listener: () => N()
|
|
128
|
-
}),
|
|
129
|
-
dataSource:
|
|
127
|
+
}), Ke({
|
|
128
|
+
dataSource: h,
|
|
130
129
|
listener: () => N()
|
|
131
|
-
}),
|
|
130
|
+
}), Re(() => {
|
|
132
131
|
N();
|
|
133
132
|
}, [N]);
|
|
134
|
-
const D = (
|
|
135
|
-
|
|
136
|
-
},
|
|
137
|
-
J.forEach((
|
|
138
|
-
const
|
|
139
|
-
if (
|
|
140
|
-
const m =
|
|
141
|
-
|
|
133
|
+
const D = (p, g) => typeof g == "function" ? g(p) : p[g], q = (p, g) => typeof g == "function" ? g(p) : p[g], o = (p, g) => {
|
|
134
|
+
p((m) => m.includes(g) ? m.filter((ce) => ce !== g) : [...m, g]);
|
|
135
|
+
}, F = () => {
|
|
136
|
+
J.forEach((p) => {
|
|
137
|
+
const g = c.find((m) => D(m, w) === p);
|
|
138
|
+
if (g) {
|
|
139
|
+
const m = S(g);
|
|
140
|
+
i.isDataSourceV2 ? (h.insert(m), h.save()) : (h.insert(m), h.save(), i.v1State.forceUpdate());
|
|
142
141
|
}
|
|
143
142
|
}), ae([]);
|
|
144
|
-
},
|
|
145
|
-
|
|
146
|
-
const
|
|
147
|
-
if (
|
|
148
|
-
const m = typeof
|
|
149
|
-
|
|
143
|
+
}, W = () => {
|
|
144
|
+
Z.forEach((p) => {
|
|
145
|
+
const g = b.find((m) => D(m, l) === p);
|
|
146
|
+
if (g) {
|
|
147
|
+
const m = typeof l == "function" ? { customId: l(g) } : { [l]: p };
|
|
148
|
+
i.isDataSourceV2 ? h.remove(() => h.locate(m)) : (h.remove(() => h.locate(m)), i.v1State.forceUpdate());
|
|
150
149
|
}
|
|
151
|
-
}),
|
|
150
|
+
}), I([]);
|
|
152
151
|
};
|
|
153
|
-
return /* @__PURE__ */ e.jsxs(
|
|
154
|
-
/* @__PURE__ */ e.jsxs(
|
|
155
|
-
/* @__PURE__ */ e.jsx(H, { children:
|
|
152
|
+
return /* @__PURE__ */ e.jsxs(Y, { withBorder: !0, style: { display: "flex", width: u, height: P }, children: [
|
|
153
|
+
/* @__PURE__ */ e.jsxs(Je, { style: { minWidth: "44%", minHeight: P }, children: [
|
|
154
|
+
/* @__PURE__ */ e.jsx(H, { children: x }),
|
|
156
155
|
/* @__PURE__ */ e.jsx(
|
|
157
|
-
|
|
156
|
+
De,
|
|
158
157
|
{
|
|
159
158
|
spacing: "xs",
|
|
160
159
|
size: "sm",
|
|
@@ -166,28 +165,28 @@ function dt({
|
|
|
166
165
|
overflowX: "hidden",
|
|
167
166
|
height: "calc(100% - 32px)"
|
|
168
167
|
},
|
|
169
|
-
children:
|
|
170
|
-
|
|
168
|
+
children: c.map((p) => /* @__PURE__ */ e.jsx(De.Item, { children: /* @__PURE__ */ e.jsx(
|
|
169
|
+
Ze,
|
|
171
170
|
{
|
|
172
|
-
label: q(
|
|
173
|
-
checked: J.includes(D(
|
|
174
|
-
onChange: () =>
|
|
175
|
-
disabled:
|
|
176
|
-
(
|
|
171
|
+
label: q(p, d),
|
|
172
|
+
checked: J.includes(D(p, w)),
|
|
173
|
+
onChange: () => o(ae, D(p, w)),
|
|
174
|
+
disabled: b.some(
|
|
175
|
+
(g) => D(g, l) === D(p, w)
|
|
177
176
|
)
|
|
178
177
|
}
|
|
179
|
-
) }, D(
|
|
178
|
+
) }, D(p, w)))
|
|
180
179
|
}
|
|
181
180
|
)
|
|
182
181
|
] }),
|
|
183
|
-
/* @__PURE__ */ e.jsxs(
|
|
184
|
-
/* @__PURE__ */ e.jsx(
|
|
185
|
-
/* @__PURE__ */ e.jsx(
|
|
182
|
+
/* @__PURE__ */ e.jsxs(oe, { gap: 5, style: { minWidth: "10%" }, justify: "center", align: "center", children: [
|
|
183
|
+
/* @__PURE__ */ e.jsx(se, { label: "Adicionar", children: /* @__PURE__ */ e.jsx(B, { onClick: F, disabled: !J.length, children: /* @__PURE__ */ e.jsx(cr, {}) }) }),
|
|
184
|
+
/* @__PURE__ */ e.jsx(se, { label: "Remover", children: /* @__PURE__ */ e.jsx(B, { onClick: W, disabled: !Z.length, children: /* @__PURE__ */ e.jsx(dr, {}) }) })
|
|
186
185
|
] }),
|
|
187
|
-
/* @__PURE__ */ e.jsxs(
|
|
188
|
-
/* @__PURE__ */ e.jsx(H, { children:
|
|
186
|
+
/* @__PURE__ */ e.jsxs(Je, { style: { minWidth: "44%", minHeight: P }, children: [
|
|
187
|
+
/* @__PURE__ */ e.jsx(H, { children: v }),
|
|
189
188
|
/* @__PURE__ */ e.jsx(
|
|
190
|
-
|
|
189
|
+
De,
|
|
191
190
|
{
|
|
192
191
|
spacing: "xs",
|
|
193
192
|
size: "sm",
|
|
@@ -199,25 +198,25 @@ function dt({
|
|
|
199
198
|
overflowX: "hidden",
|
|
200
199
|
height: "calc(100% - 32px)"
|
|
201
200
|
},
|
|
202
|
-
children:
|
|
203
|
-
|
|
201
|
+
children: b.map((p) => /* @__PURE__ */ e.jsx(De.Item, { children: /* @__PURE__ */ e.jsx(
|
|
202
|
+
Ze,
|
|
204
203
|
{
|
|
205
|
-
label: q(
|
|
206
|
-
checked:
|
|
207
|
-
onChange: () =>
|
|
204
|
+
label: q(p, f),
|
|
205
|
+
checked: Z.includes(D(p, l)),
|
|
206
|
+
onChange: () => o(I, D(p, l))
|
|
208
207
|
}
|
|
209
|
-
) }, D(
|
|
208
|
+
) }, D(p, l)))
|
|
210
209
|
}
|
|
211
210
|
)
|
|
212
211
|
] })
|
|
213
212
|
] });
|
|
214
213
|
}
|
|
215
|
-
const
|
|
216
|
-
({ image: r, label:
|
|
217
|
-
/* @__PURE__ */ e.jsx(H, { size: "sm", fw: 600, children:
|
|
218
|
-
/* @__PURE__ */ e.jsx(
|
|
214
|
+
const ja = sa(
|
|
215
|
+
({ image: r, label: h, description: w, origin: d, ...l }, f) => /* @__PURE__ */ e.jsx("div", { ref: f, ...l, children: /* @__PURE__ */ e.jsxs(te, { children: [
|
|
216
|
+
/* @__PURE__ */ e.jsx(H, { size: "sm", fw: 600, children: d ? d.name : "" }),
|
|
217
|
+
/* @__PURE__ */ e.jsx(nr, { w: "lg" })
|
|
219
218
|
] }) })
|
|
220
|
-
),
|
|
219
|
+
), ya = {
|
|
221
220
|
// Campos de identificação
|
|
222
221
|
showNickname: !0,
|
|
223
222
|
// Campos de perfil e grupos
|
|
@@ -237,215 +236,217 @@ const ut = Kr(
|
|
|
237
236
|
avatarMaxSizeKB: 2e3,
|
|
238
237
|
avatarImageQuality: 1,
|
|
239
238
|
allowEditEmail: !0
|
|
240
|
-
},
|
|
241
|
-
const
|
|
239
|
+
}, wa = (r) => {
|
|
240
|
+
const [h, w] = M(""), d = { ...ya, ...r.options ?? {} }, l = _(X.Group), { dataSource: f } = Ne({
|
|
242
241
|
name: "dsGroups",
|
|
243
|
-
service:
|
|
242
|
+
service: l,
|
|
244
243
|
pageSize: 9999,
|
|
245
244
|
loadOnStart: !0,
|
|
246
245
|
sort: ["name:asc"],
|
|
247
|
-
onError: (
|
|
248
|
-
|
|
246
|
+
onError: (i, c) => {
|
|
247
|
+
Q.showError(t().t("archbase:WARNING"), i, c);
|
|
249
248
|
}
|
|
250
|
-
})
|
|
249
|
+
});
|
|
250
|
+
console.log("versão 12/05/2026");
|
|
251
|
+
const S = _(X.Profile), { dataSource: u } = Ne({
|
|
251
252
|
name: "dsProfiles",
|
|
252
|
-
service:
|
|
253
|
+
service: S,
|
|
253
254
|
pageSize: 9999,
|
|
254
255
|
loadOnStart: !0,
|
|
255
256
|
sort: ["name:asc"],
|
|
256
|
-
onError: (
|
|
257
|
-
|
|
257
|
+
onError: (i, c) => {
|
|
258
|
+
Q.showError(t().t("archbase:WARNING"), i, c);
|
|
258
259
|
}
|
|
259
260
|
});
|
|
260
|
-
|
|
261
|
-
|
|
261
|
+
Re(() => {
|
|
262
|
+
w("");
|
|
262
263
|
}, [r.dataSource.getFieldValue("password")]);
|
|
263
|
-
const
|
|
264
|
+
const P = async () => {
|
|
264
265
|
if (r.dataSource.isInserting()) {
|
|
265
|
-
if (
|
|
266
|
-
const
|
|
267
|
-
|
|
266
|
+
if (d.userDefaultProfile) {
|
|
267
|
+
const i = Pe(Te.eq("name", d.userDefaultProfile)), c = await S.findAllWithFilter(i, 0, 1);
|
|
268
|
+
c && c.content.length > 0 && r.dataSource.setFieldValue("profile", c.content[0]);
|
|
268
269
|
}
|
|
269
|
-
if (
|
|
270
|
-
const
|
|
271
|
-
|
|
270
|
+
if (d.userDefaultGroups) {
|
|
271
|
+
const i = Pe(Te.in("name", d.userDefaultGroups)), c = await l.findAllWithFilter(i, 0, 500);
|
|
272
|
+
c && c.content.length > 0 && r.dataSource.setFieldValue("groups", c.content.map((L) => rr.newInstance(L)));
|
|
272
273
|
}
|
|
273
274
|
}
|
|
274
275
|
};
|
|
275
|
-
|
|
276
|
-
r.opened &&
|
|
276
|
+
Re(() => {
|
|
277
|
+
r.opened && P();
|
|
277
278
|
}, [r.opened]);
|
|
278
|
-
const
|
|
279
|
-
const
|
|
280
|
-
if (!
|
|
281
|
-
|
|
279
|
+
const x = () => {
|
|
280
|
+
const i = r.dataSource.getCurrentRecord();
|
|
281
|
+
if (!i.password && r.dataSource.isInserting()) {
|
|
282
|
+
w(t().t("archbase:Informe a senha"));
|
|
282
283
|
return;
|
|
283
284
|
}
|
|
284
|
-
r.onCustomSave ? r.onCustomSave(
|
|
285
|
-
|
|
286
|
-
}) : r.onClickOk(
|
|
287
|
-
},
|
|
288
|
-
r.onClickCancel(r.dataSource.
|
|
285
|
+
r.onCustomSave ? r.onCustomSave(i, (c) => {
|
|
286
|
+
c && r.onAfterSave && r.onAfterSave(i), r.onClickOk(i, c);
|
|
287
|
+
}) : r.onClickOk(i, !0);
|
|
288
|
+
}, v = () => {
|
|
289
|
+
r.onClickCancel(r.dataSource.getCurrentRecord());
|
|
289
290
|
};
|
|
290
291
|
return /* @__PURE__ */ e.jsxs(
|
|
291
|
-
|
|
292
|
+
Fe,
|
|
292
293
|
{
|
|
293
294
|
opened: r.opened,
|
|
294
|
-
onClose:
|
|
295
|
-
title:
|
|
295
|
+
onClose: v,
|
|
296
|
+
title: t().t("archbase:Usuário"),
|
|
296
297
|
size: "80%",
|
|
297
298
|
styles: { content: { maxWidth: 1e3 } },
|
|
298
299
|
children: [
|
|
299
|
-
/* @__PURE__ */ e.jsx(
|
|
300
|
-
|
|
301
|
-
/* @__PURE__ */ e.jsxs(
|
|
302
|
-
/* @__PURE__ */ e.jsx(
|
|
300
|
+
/* @__PURE__ */ e.jsx(Ie, { style: { height: "500px" }, children: /* @__PURE__ */ e.jsxs(oe, { w: "98%", children: [
|
|
301
|
+
d?.customContentBefore && /* @__PURE__ */ e.jsx(e.Fragment, { children: d.customContentBefore(r.dataSource.getCurrentRecord()) }),
|
|
302
|
+
/* @__PURE__ */ e.jsxs(A, { children: [
|
|
303
|
+
/* @__PURE__ */ e.jsx(A.Col, { span: { base: 12, md: 6, lg: 6 }, children: /* @__PURE__ */ e.jsxs($, { children: [
|
|
303
304
|
/* @__PURE__ */ e.jsx(
|
|
304
|
-
|
|
305
|
+
ee,
|
|
305
306
|
{
|
|
306
|
-
label: `${
|
|
307
|
-
placeholder: `${
|
|
307
|
+
label: `${t().t("archbase:Nome completo")}`,
|
|
308
|
+
placeholder: `${t().t("archbase:Informe o nome completo do usuário")}`,
|
|
308
309
|
dataSource: r.dataSource,
|
|
309
310
|
dataField: "name",
|
|
310
311
|
required: !0,
|
|
311
312
|
width: "calc(100% - 208px)"
|
|
312
313
|
}
|
|
313
314
|
),
|
|
314
|
-
|
|
315
|
-
|
|
315
|
+
d.showNickname && /* @__PURE__ */ e.jsx(
|
|
316
|
+
ee,
|
|
316
317
|
{
|
|
317
|
-
label: `${
|
|
318
|
-
placeholder: `${
|
|
318
|
+
label: `${t().t("archbase:Apelido")}`,
|
|
319
|
+
placeholder: `${t().t("archbase:Apelido")}`,
|
|
319
320
|
dataSource: r.dataSource,
|
|
320
321
|
dataField: "nickname",
|
|
321
|
-
required:
|
|
322
|
+
required: d.requiredNickname
|
|
322
323
|
}
|
|
323
324
|
)
|
|
324
325
|
] }) }),
|
|
325
|
-
/* @__PURE__ */ e.jsx(
|
|
326
|
-
|
|
326
|
+
/* @__PURE__ */ e.jsx(A.Col, { span: { base: 12, md: 6, lg: 6 }, children: /* @__PURE__ */ e.jsx(
|
|
327
|
+
ee,
|
|
327
328
|
{
|
|
328
|
-
label: `${
|
|
329
|
-
placeholder: `${
|
|
329
|
+
label: `${t().t("archbase:Descrição do usuário")}`,
|
|
330
|
+
placeholder: `${t().t("archbase:Informe a descrição do usuário")}`,
|
|
330
331
|
dataSource: r.dataSource,
|
|
331
332
|
dataField: "description",
|
|
332
333
|
required: !0
|
|
333
334
|
}
|
|
334
335
|
) })
|
|
335
336
|
] }),
|
|
336
|
-
/* @__PURE__ */ e.jsxs(
|
|
337
|
-
/* @__PURE__ */ e.jsx(
|
|
338
|
-
|
|
337
|
+
/* @__PURE__ */ e.jsxs(A, { children: [
|
|
338
|
+
/* @__PURE__ */ e.jsx(A.Col, { span: { base: 12, md: 6, lg: 6 }, children: /* @__PURE__ */ e.jsx(
|
|
339
|
+
ee,
|
|
339
340
|
{
|
|
340
|
-
label: `${
|
|
341
|
-
placeholder: `${
|
|
341
|
+
label: `${t().t("archbase:E-mail")}`,
|
|
342
|
+
placeholder: `${t().t("archbase:Informe o e-mail do usuário")}`,
|
|
342
343
|
dataSource: r.dataSource,
|
|
343
|
-
onChangeValue: (
|
|
344
|
+
onChangeValue: (i) => r.dataSource.setFieldValue("userName", i),
|
|
344
345
|
dataField: "email",
|
|
345
|
-
readOnly: r.dataSource.isEditing() ? !
|
|
346
|
+
readOnly: r.dataSource.isEditing() ? !d.allowEditEmail : !1,
|
|
346
347
|
required: !0
|
|
347
348
|
}
|
|
348
349
|
) }),
|
|
349
|
-
/* @__PURE__ */ e.jsx(
|
|
350
|
-
|
|
350
|
+
/* @__PURE__ */ e.jsx(A.Col, { span: { base: 12, md: 6, lg: 6 }, children: /* @__PURE__ */ e.jsx(
|
|
351
|
+
_r,
|
|
351
352
|
{
|
|
352
|
-
label: `${
|
|
353
|
+
label: `${t().t("archbase:Senha usuário")}`,
|
|
353
354
|
dataSource: r.dataSource,
|
|
354
355
|
dataField: "password",
|
|
355
|
-
error:
|
|
356
|
+
error: h,
|
|
356
357
|
required: r.dataSource.getFieldValue("isNewUser")
|
|
357
358
|
}
|
|
358
359
|
) })
|
|
359
360
|
] }),
|
|
360
|
-
/* @__PURE__ */ e.jsx(
|
|
361
|
-
|
|
361
|
+
/* @__PURE__ */ e.jsx(A, { children: d.showProfile && /* @__PURE__ */ e.jsx(A.Col, { span: { base: 12, md: 6, lg: 6 }, children: /* @__PURE__ */ e.jsx(
|
|
362
|
+
ea,
|
|
362
363
|
{
|
|
363
|
-
label: `${
|
|
364
|
+
label: `${t().t("archbase:Perfil do usuário")}`,
|
|
364
365
|
dataSource: r.dataSource,
|
|
365
366
|
dataField: "profile",
|
|
366
|
-
options:
|
|
367
|
+
options: u,
|
|
367
368
|
allowDeselect: !0,
|
|
368
369
|
optionsLabelField: "nome",
|
|
369
|
-
itemComponent:
|
|
370
|
-
getOptionLabel: (
|
|
371
|
-
getOptionValue: (
|
|
370
|
+
itemComponent: ja,
|
|
371
|
+
getOptionLabel: (i) => i.name,
|
|
372
|
+
getOptionValue: (i) => i.id
|
|
372
373
|
}
|
|
373
374
|
) }) }),
|
|
374
|
-
/* @__PURE__ */ e.jsxs(
|
|
375
|
-
/* @__PURE__ */ e.jsx(
|
|
376
|
-
/* @__PURE__ */ e.jsx(
|
|
377
|
-
|
|
378
|
-
|
|
375
|
+
/* @__PURE__ */ e.jsxs(A, { children: [
|
|
376
|
+
/* @__PURE__ */ e.jsx(A.Col, { span: { base: 12 }, children: d.showAccountConfigLabel && /* @__PURE__ */ e.jsx(H, { fz: 14, fw: 500, children: "Informe" }) }),
|
|
377
|
+
/* @__PURE__ */ e.jsx(A.Col, { span: { base: 12, md: 4, lg: 4 }, children: /* @__PURE__ */ e.jsxs(oe, { gap: "lg", children: [
|
|
378
|
+
d.showChangePasswordOnNextLogin && /* @__PURE__ */ e.jsx(he.Wrapper, { label: "", children: /* @__PURE__ */ e.jsx(
|
|
379
|
+
pe,
|
|
379
380
|
{
|
|
380
381
|
dataSource: r.dataSource,
|
|
381
382
|
dataField: "changePasswordOnNextLogin",
|
|
382
|
-
label: `${
|
|
383
|
+
label: `${t().t("archbase:Deve alterar senha próximo login ?")}`
|
|
383
384
|
}
|
|
384
385
|
) }),
|
|
385
|
-
|
|
386
|
-
|
|
386
|
+
d.showAllowPasswordChange && /* @__PURE__ */ e.jsx(he.Wrapper, { label: "", children: /* @__PURE__ */ e.jsx(
|
|
387
|
+
pe,
|
|
387
388
|
{
|
|
388
389
|
dataSource: r.dataSource,
|
|
389
390
|
dataField: "allowPasswordChange",
|
|
390
|
-
label: `${
|
|
391
|
+
label: `${t().t("archbase:Pode alterar a senha ?")}`
|
|
391
392
|
}
|
|
392
393
|
) }),
|
|
393
|
-
|
|
394
|
-
|
|
394
|
+
d.showPasswordNeverExpires && /* @__PURE__ */ e.jsx(he.Wrapper, { label: "", children: /* @__PURE__ */ e.jsx(
|
|
395
|
+
pe,
|
|
395
396
|
{
|
|
396
397
|
dataSource: r.dataSource,
|
|
397
398
|
dataField: "passwordNeverExpires",
|
|
398
|
-
label: `${
|
|
399
|
+
label: `${t().t("archbase:Senha nunca expira ?")}`
|
|
399
400
|
}
|
|
400
401
|
) })
|
|
401
402
|
] }) }),
|
|
402
|
-
/* @__PURE__ */ e.jsx(
|
|
403
|
-
|
|
404
|
-
|
|
403
|
+
/* @__PURE__ */ e.jsx(A.Col, { span: { base: 12, md: 4, lg: 4 }, children: /* @__PURE__ */ e.jsxs(oe, { gap: "lg", children: [
|
|
404
|
+
d.showAccountDeactivated && /* @__PURE__ */ e.jsx(he.Wrapper, { label: "", children: /* @__PURE__ */ e.jsx(
|
|
405
|
+
pe,
|
|
405
406
|
{
|
|
406
407
|
dataSource: r.dataSource,
|
|
407
408
|
dataField: "accountDeactivated",
|
|
408
|
-
label: `${
|
|
409
|
+
label: `${t().t("archbase:Conta desativada ?")}`
|
|
409
410
|
}
|
|
410
411
|
) }),
|
|
411
|
-
|
|
412
|
-
|
|
412
|
+
d.showAccountLocked && /* @__PURE__ */ e.jsx(he.Wrapper, { label: "", children: /* @__PURE__ */ e.jsx(
|
|
413
|
+
pe,
|
|
413
414
|
{
|
|
414
415
|
dataSource: r.dataSource,
|
|
415
416
|
dataField: "accountLocked",
|
|
416
|
-
label: `${
|
|
417
|
+
label: `${t().t("archbase:Conta bloqueada ?")}`
|
|
417
418
|
}
|
|
418
419
|
) }),
|
|
419
|
-
|
|
420
|
-
|
|
420
|
+
d.showIsAdministrator && /* @__PURE__ */ e.jsx(he.Wrapper, { label: "", children: /* @__PURE__ */ e.jsx(
|
|
421
|
+
pe,
|
|
421
422
|
{
|
|
422
423
|
dataSource: r.dataSource,
|
|
423
424
|
dataField: "isAdministrator",
|
|
424
|
-
label: `${
|
|
425
|
+
label: `${t().t("archbase:Administrador ?")}`
|
|
425
426
|
}
|
|
426
427
|
) })
|
|
427
428
|
] }) }),
|
|
428
|
-
/* @__PURE__ */ e.jsx(
|
|
429
|
-
|
|
429
|
+
/* @__PURE__ */ e.jsx(A.Col, { span: { base: 12, md: 4, lg: 4 }, children: /* @__PURE__ */ e.jsx(oe, { gap: "lg", children: /* @__PURE__ */ e.jsx(
|
|
430
|
+
ra,
|
|
430
431
|
{
|
|
431
|
-
label:
|
|
432
|
+
label: t().t("archbase:Foto do usuário"),
|
|
432
433
|
dataSource: r.dataSource,
|
|
433
434
|
dataField: "avatar",
|
|
434
435
|
width: 120,
|
|
435
436
|
height: 120,
|
|
436
|
-
maxSizeKB:
|
|
437
|
-
imageQuality:
|
|
437
|
+
maxSizeKB: d.avatarMaxSizeKB,
|
|
438
|
+
imageQuality: d.avatarImageQuality
|
|
438
439
|
}
|
|
439
440
|
) }) })
|
|
440
441
|
] }),
|
|
441
|
-
|
|
442
|
-
/* @__PURE__ */ e.jsx(
|
|
443
|
-
/* @__PURE__ */ e.jsx(
|
|
444
|
-
|
|
442
|
+
d.showGroups && /* @__PURE__ */ e.jsxs(A, { children: [
|
|
443
|
+
/* @__PURE__ */ e.jsx(A.Col, { span: { base: 12 }, children: /* @__PURE__ */ e.jsx(H, { fz: 14, fw: 500, children: "Grupos" }) }),
|
|
444
|
+
/* @__PURE__ */ e.jsx(A.Col, { span: { base: 12 }, children: /* @__PURE__ */ e.jsx(
|
|
445
|
+
ga,
|
|
445
446
|
{
|
|
446
|
-
titleAvailable:
|
|
447
|
-
titleAssigned:
|
|
448
|
-
assignedItemsDS: new
|
|
447
|
+
titleAvailable: t().t("archbase:Disponíveis"),
|
|
448
|
+
titleAssigned: t().t("archbase:Selecionados"),
|
|
449
|
+
assignedItemsDS: new ta("dsDualList", {
|
|
449
450
|
records: r.dataSource.getFieldValue("groups"),
|
|
450
451
|
grandTotalRecords: r.dataSource.getFieldValue("groups").length,
|
|
451
452
|
currentPage: 0,
|
|
@@ -454,323 +455,322 @@ const ut = Kr(
|
|
|
454
455
|
}),
|
|
455
456
|
width: "100%",
|
|
456
457
|
height: "200px",
|
|
457
|
-
availableItemsDS:
|
|
458
|
-
handleCreateAssociationObject: (
|
|
459
|
-
idFieldAssigned: (
|
|
458
|
+
availableItemsDS: f,
|
|
459
|
+
handleCreateAssociationObject: (i) => rr.newInstance(i),
|
|
460
|
+
idFieldAssigned: (i) => i && i.group ? i.group.id : "",
|
|
460
461
|
idFieldAvailable: "id",
|
|
461
|
-
labelFieldAssigned: (
|
|
462
|
+
labelFieldAssigned: (i) => i && i.group ? i.group.name : "",
|
|
462
463
|
labelFieldAvailable: "name"
|
|
463
464
|
}
|
|
464
465
|
) })
|
|
465
466
|
] }),
|
|
466
|
-
|
|
467
|
-
/* @__PURE__ */ e.jsx(
|
|
467
|
+
d?.customContentAfter && /* @__PURE__ */ e.jsx(e.Fragment, { children: d.customContentAfter(r.dataSource.getCurrentRecord()) }),
|
|
468
|
+
/* @__PURE__ */ e.jsx(nr, { h: "12px" })
|
|
468
469
|
] }) }),
|
|
469
|
-
/* @__PURE__ */ e.jsxs(
|
|
470
|
-
/* @__PURE__ */ e.jsx(U, { variant: "default", onClick:
|
|
471
|
-
/* @__PURE__ */ e.jsx(U, { onClick:
|
|
470
|
+
/* @__PURE__ */ e.jsxs($, { justify: "flex-end", mt: "md", children: [
|
|
471
|
+
/* @__PURE__ */ e.jsx(U, { variant: "default", onClick: v, children: t().t("archbase:Cancelar") }),
|
|
472
|
+
/* @__PURE__ */ e.jsx(U, { onClick: x, children: t().t("archbase:Salvar") })
|
|
472
473
|
] })
|
|
473
474
|
]
|
|
474
475
|
}
|
|
475
476
|
);
|
|
476
|
-
},
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
r.onClickCancel(r.dataSource.current);
|
|
477
|
+
}, Ca = (r) => {
|
|
478
|
+
const h = { ...r.options ?? {} }, w = () => {
|
|
479
|
+
r.onCustomSave ? r.onCustomSave(r.dataSource.getCurrentRecord(), (l) => {
|
|
480
|
+
l && r.onAfterSave && r.onAfterSave(r.dataSource.getCurrentRecord()), r.onClickOk(r.dataSource.getCurrentRecord(), l);
|
|
481
|
+
}) : r.onClickOk(r.dataSource.getCurrentRecord(), !0);
|
|
482
|
+
}, d = () => {
|
|
483
|
+
r.onClickCancel(r.dataSource.getCurrentRecord());
|
|
484
484
|
};
|
|
485
485
|
return /* @__PURE__ */ e.jsx(
|
|
486
|
-
|
|
486
|
+
Fe,
|
|
487
487
|
{
|
|
488
488
|
opened: r.opened,
|
|
489
|
-
onClose:
|
|
490
|
-
title:
|
|
489
|
+
onClose: d,
|
|
490
|
+
title: t().t("archbase:Grupo"),
|
|
491
491
|
size: "60%",
|
|
492
492
|
styles: { content: { maxWidth: 1e3 } },
|
|
493
|
-
children: /* @__PURE__ */ e.jsx(
|
|
494
|
-
|
|
495
|
-
/* @__PURE__ */ e.jsxs(
|
|
496
|
-
/* @__PURE__ */ e.jsx(
|
|
497
|
-
|
|
493
|
+
children: /* @__PURE__ */ e.jsx(Ie, { style: { height: "460px" }, children: /* @__PURE__ */ e.jsxs(oe, { w: "98%", children: [
|
|
494
|
+
h?.customContentBefore && h.customContentBefore(r.dataSource.getCurrentRecord()),
|
|
495
|
+
/* @__PURE__ */ e.jsxs(A, { children: [
|
|
496
|
+
/* @__PURE__ */ e.jsx(A.Col, { span: { base: 12 }, children: /* @__PURE__ */ e.jsx(
|
|
497
|
+
ee,
|
|
498
498
|
{
|
|
499
|
-
label: `${
|
|
500
|
-
placeholder: `${
|
|
499
|
+
label: `${t().t("archbase:Nome do grupo")}`,
|
|
500
|
+
placeholder: `${t().t("archbase:Informe o nome do grupo")}`,
|
|
501
501
|
dataSource: r.dataSource,
|
|
502
502
|
dataField: "name"
|
|
503
503
|
}
|
|
504
504
|
) }),
|
|
505
|
-
/* @__PURE__ */ e.jsx(
|
|
506
|
-
|
|
505
|
+
/* @__PURE__ */ e.jsx(A.Col, { span: { base: 12 }, children: /* @__PURE__ */ e.jsx(
|
|
506
|
+
ee,
|
|
507
507
|
{
|
|
508
|
-
label: `${
|
|
509
|
-
placeholder: `${
|
|
508
|
+
label: `${t().t("archbase:Descrição do grupo")}`,
|
|
509
|
+
placeholder: `${t().t("archbase:Informe a descrição do grupo")}`,
|
|
510
510
|
dataSource: r.dataSource,
|
|
511
511
|
dataField: "description"
|
|
512
512
|
}
|
|
513
513
|
) })
|
|
514
514
|
] }),
|
|
515
|
-
|
|
516
|
-
/* @__PURE__ */ e.jsxs(
|
|
517
|
-
/* @__PURE__ */ e.jsx(U, { variant: "default", onClick:
|
|
518
|
-
/* @__PURE__ */ e.jsx(U, { onClick:
|
|
515
|
+
h?.customContentAfter && h.customContentAfter(r.dataSource.getCurrentRecord()),
|
|
516
|
+
/* @__PURE__ */ e.jsxs($, { justify: "flex-end", mt: "md", children: [
|
|
517
|
+
/* @__PURE__ */ e.jsx(U, { variant: "default", onClick: d, children: t().t("archbase:Cancelar") }),
|
|
518
|
+
/* @__PURE__ */ e.jsx(U, { onClick: w, children: t().t("archbase:Salvar") })
|
|
519
519
|
] })
|
|
520
520
|
] }) })
|
|
521
521
|
}
|
|
522
522
|
);
|
|
523
|
-
},
|
|
523
|
+
}, va = ({ 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
|
-
/* @__PURE__ */ e.jsx(H, { size: "sm", children:
|
|
527
|
-
/* @__PURE__ */ e.jsx(H, { size: "xs", opacity: 0.65, children:
|
|
526
|
+
/* @__PURE__ */ e.jsx(H, { size: "sm", children: h }),
|
|
527
|
+
/* @__PURE__ */ e.jsx(H, { size: "xs", opacity: 0.65, children: w })
|
|
528
528
|
] })
|
|
529
|
-
] }) }),
|
|
530
|
-
|
|
531
|
-
const [
|
|
529
|
+
] }) }), Sa = (r) => {
|
|
530
|
+
ua();
|
|
531
|
+
const [h, w] = M(), d = _(X.User), l = ke(
|
|
532
532
|
"ApiTokenModal",
|
|
533
533
|
r.dataSource,
|
|
534
534
|
"expirationDate",
|
|
535
535
|
""
|
|
536
|
-
),
|
|
537
|
-
if (!
|
|
538
|
-
|
|
536
|
+
), f = (x) => {
|
|
537
|
+
if (!x)
|
|
538
|
+
l.handleValueChange(void 0);
|
|
539
539
|
else {
|
|
540
|
-
const
|
|
541
|
-
|
|
540
|
+
const v = typeof x == "string" ? new Date(x) : x, i = Qr(v);
|
|
541
|
+
l.handleValueChange(i);
|
|
542
542
|
}
|
|
543
|
-
|
|
544
|
-
},
|
|
543
|
+
w(x);
|
|
544
|
+
}, S = async (x, v) => new Promise(async (i, c) => {
|
|
545
545
|
try {
|
|
546
|
-
const
|
|
547
|
-
|
|
548
|
-
options:
|
|
549
|
-
page:
|
|
550
|
-
totalPages:
|
|
546
|
+
const L = Pe(Te.or(Te.eq("name", `^*${v.trim()}*`))), b = await d.findAllWithFilter(L, x, 20);
|
|
547
|
+
i({
|
|
548
|
+
options: b.content,
|
|
549
|
+
page: b.pageable.pageNumber,
|
|
550
|
+
totalPages: b.totalPages
|
|
551
551
|
});
|
|
552
|
-
} catch (
|
|
553
|
-
|
|
552
|
+
} catch (L) {
|
|
553
|
+
c(Ae(L));
|
|
554
554
|
}
|
|
555
|
-
}),
|
|
556
|
-
r.onCustomSave ? r.onCustomSave(r.dataSource.current, (
|
|
557
|
-
|
|
555
|
+
}), u = () => {
|
|
556
|
+
r.onCustomSave ? r.onCustomSave(r.dataSource.current, (x) => {
|
|
557
|
+
x && r.onAfterSave && r.onAfterSave(r.dataSource.current), r.onClickOk(r.dataSource.current, x);
|
|
558
558
|
}) : r.onClickOk(r.dataSource.current, !0);
|
|
559
|
-
},
|
|
559
|
+
}, P = () => {
|
|
560
560
|
r.onClickCancel(r.dataSource.current);
|
|
561
561
|
};
|
|
562
562
|
return /* @__PURE__ */ e.jsxs(
|
|
563
|
-
|
|
563
|
+
Fe,
|
|
564
564
|
{
|
|
565
565
|
opened: r.opened,
|
|
566
|
-
onClose:
|
|
567
|
-
title:
|
|
566
|
+
onClose: P,
|
|
567
|
+
title: t().t("archbase:Token de API"),
|
|
568
568
|
size: "50%",
|
|
569
569
|
children: [
|
|
570
|
-
/* @__PURE__ */ e.jsxs(
|
|
570
|
+
/* @__PURE__ */ e.jsxs(Ie, { style: { height: "300px" }, children: [
|
|
571
571
|
/* @__PURE__ */ e.jsx(
|
|
572
|
-
|
|
572
|
+
ee,
|
|
573
573
|
{
|
|
574
|
-
label: `${
|
|
575
|
-
placeholder: `${
|
|
574
|
+
label: `${t().t("archbase:Nome do token")}`,
|
|
575
|
+
placeholder: `${t().t("archbase:Informe o nome do token")}`,
|
|
576
576
|
dataSource: r.dataSource,
|
|
577
577
|
dataField: "name"
|
|
578
578
|
}
|
|
579
579
|
),
|
|
580
580
|
/* @__PURE__ */ e.jsx(
|
|
581
|
-
|
|
581
|
+
ee,
|
|
582
582
|
{
|
|
583
|
-
label: `${
|
|
584
|
-
placeholder: `${
|
|
583
|
+
label: `${t().t("archbase:Descrição do token")}`,
|
|
584
|
+
placeholder: `${t().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
|
+
da,
|
|
591
591
|
{
|
|
592
592
|
withSeconds: !0,
|
|
593
|
-
value:
|
|
594
|
-
onChange:
|
|
593
|
+
value: h,
|
|
594
|
+
onChange: f,
|
|
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
|
+
aa,
|
|
601
601
|
{
|
|
602
|
-
label: `${
|
|
602
|
+
label: `${t().t("archbase:Usuário")}`,
|
|
603
603
|
dataSource: r.dataSource,
|
|
604
604
|
dataField: "user",
|
|
605
|
-
placeholder: `${
|
|
606
|
-
getOptionLabel: (
|
|
607
|
-
getOptionValue: (
|
|
608
|
-
getOptions:
|
|
605
|
+
placeholder: `${t().t("archbase:Digite aqui o nome do usuário")}`,
|
|
606
|
+
getOptionLabel: (x) => x && x.email ? x.email : "",
|
|
607
|
+
getOptionValue: (x) => x && x.id ? x.id.toString() : "",
|
|
608
|
+
getOptions: S,
|
|
609
609
|
debounceTime: 500,
|
|
610
610
|
minCharsToSearch: 1,
|
|
611
|
-
itemComponent:
|
|
611
|
+
itemComponent: va
|
|
612
612
|
}
|
|
613
613
|
)
|
|
614
614
|
] }),
|
|
615
|
-
/* @__PURE__ */ e.jsxs(
|
|
616
|
-
/* @__PURE__ */ e.jsx(U, { variant: "default", onClick:
|
|
617
|
-
/* @__PURE__ */ e.jsx(U, { onClick:
|
|
615
|
+
/* @__PURE__ */ e.jsxs($, { justify: "flex-end", mt: "md", children: [
|
|
616
|
+
/* @__PURE__ */ e.jsx(U, { variant: "default", onClick: P, children: t().t("archbase:Cancelar") }),
|
|
617
|
+
/* @__PURE__ */ e.jsx(U, { onClick: u, children: t().t("archbase:Salvar") })
|
|
618
618
|
] })
|
|
619
619
|
]
|
|
620
620
|
}
|
|
621
621
|
);
|
|
622
|
-
},
|
|
623
|
-
const
|
|
624
|
-
return r.includes(
|
|
622
|
+
}, sr = (r) => {
|
|
623
|
+
const h = "->";
|
|
624
|
+
return r.includes(h) ? r.split(h).map((l) => l.trim()).map((l) => t().t(l)).join(` ${h} `) : t().t(r);
|
|
625
625
|
};
|
|
626
|
-
function Me({ dataSource: r, opened:
|
|
627
|
-
const
|
|
628
|
-
value:
|
|
629
|
-
label:
|
|
630
|
-
children:
|
|
631
|
-
value:
|
|
632
|
-
label:
|
|
626
|
+
function Me({ dataSource: r, opened: h, close: w }) {
|
|
627
|
+
const d = xe(() => r?.getFieldValue("name") || "", [r]), l = xe(() => r?.getFieldValue("id") || "", [r]), f = xe(() => r?.getFieldValue("type") || "", [r]), S = Qe(), u = Qe(), [P, x] = M([]), [v, i] = M([]), [c, L] = M(), [b, re] = M(), [J, ae] = M(""), [Z] = ar(J, 200), [I, N] = M(""), [D] = ar(I, 200), q = _(X.Resource), { colorScheme: o } = Be(), F = o === "dark" ? "var(--mantine-primary-color-7)" : "var(--mantine-primary-color-4)", W = xe(() => v.sort((s, n) => s.resourceDescription.localeCompare(n.resourceDescription)).map((s) => ({
|
|
628
|
+
value: s.resourceId,
|
|
629
|
+
label: s.resourceDescription,
|
|
630
|
+
children: s.permissions.filter((n) => n.actionDescription.toLowerCase().includes(D.toLowerCase())).sort((n, G) => n.actionDescription.localeCompare(G.actionDescription)).map((n) => ({
|
|
631
|
+
value: n.actionId,
|
|
632
|
+
label: n.actionDescription,
|
|
633
633
|
nodeProps: {
|
|
634
|
-
permissionId:
|
|
635
|
-
types:
|
|
636
|
-
owner:
|
|
634
|
+
permissionId: n.permissionId,
|
|
635
|
+
types: n.types ?? [],
|
|
636
|
+
owner: s
|
|
637
637
|
}
|
|
638
638
|
}))
|
|
639
|
-
})), [
|
|
640
|
-
value:
|
|
641
|
-
label:
|
|
642
|
-
children:
|
|
643
|
-
const
|
|
639
|
+
})), [v, D]), p = xe(() => v.map((s) => s.permissions.map((n) => n.actionId)).flat(), [v]), g = xe(() => P.sort((s, n) => s.resourceDescription.localeCompare(n.resourceDescription)).map((s) => ({
|
|
640
|
+
value: s.resourceId,
|
|
641
|
+
label: s.resourceDescription,
|
|
642
|
+
children: s.permissions.filter((n) => n.actionDescription.toLowerCase().includes(Z.toLowerCase())).sort((n, G) => n.actionDescription.localeCompare(G.actionDescription)).map((n) => {
|
|
643
|
+
const G = v.find((C) => C.resourceId === s.resourceId)?.permissions.find((C) => C.actionId === n.actionId);
|
|
644
644
|
return {
|
|
645
|
-
value:
|
|
646
|
-
label:
|
|
645
|
+
value: n.actionId,
|
|
646
|
+
label: n.actionDescription,
|
|
647
647
|
nodeProps: {
|
|
648
|
-
granted:
|
|
649
|
-
owner:
|
|
648
|
+
granted: p.includes(n.actionId) && G?.types?.includes(le(R, f)),
|
|
649
|
+
owner: s
|
|
650
650
|
}
|
|
651
651
|
};
|
|
652
652
|
})
|
|
653
|
-
})), [
|
|
654
|
-
if (
|
|
655
|
-
const
|
|
656
|
-
|
|
653
|
+
})), [P, v, p, f, Z]), m = ge(async () => {
|
|
654
|
+
if (l) {
|
|
655
|
+
const s = await q.getPermissionsBySecurityId(l, f), n = await q.getAllPermissionsAvailable();
|
|
656
|
+
x(n), i(s);
|
|
657
657
|
}
|
|
658
|
-
}, [
|
|
659
|
-
|
|
660
|
-
if (
|
|
661
|
-
|
|
662
|
-
let
|
|
663
|
-
return
|
|
664
|
-
...
|
|
665
|
-
permissions:
|
|
666
|
-
(
|
|
667
|
-
...
|
|
668
|
-
permissionId:
|
|
669
|
-
types: [...
|
|
670
|
-
} :
|
|
658
|
+
}, [l, f]), ce = ge(() => {
|
|
659
|
+
c?.value && l && q.createPermission(l, c.value, f).then((s) => {
|
|
660
|
+
if (s) {
|
|
661
|
+
i((E) => {
|
|
662
|
+
let T;
|
|
663
|
+
return E.map((j) => j.resourceId).includes(s.resourceId) ? T = E.map((j) => j.resourceId === s.resourceId ? j.permissions.map((k) => k.actionId).includes(c.value) ? {
|
|
664
|
+
...j,
|
|
665
|
+
permissions: j.permissions.map(
|
|
666
|
+
(k) => k.actionId === c.value ? {
|
|
667
|
+
...k,
|
|
668
|
+
permissionId: s.permissionId,
|
|
669
|
+
types: [...k.types ?? [], le(R, f)]
|
|
670
|
+
} : k
|
|
671
671
|
)
|
|
672
672
|
} : {
|
|
673
|
-
...
|
|
673
|
+
...j,
|
|
674
674
|
permissions: [
|
|
675
|
-
...
|
|
675
|
+
...j.permissions ?? [],
|
|
676
676
|
{
|
|
677
|
-
actionId:
|
|
678
|
-
actionDescription:
|
|
679
|
-
permissionId:
|
|
680
|
-
types: [
|
|
677
|
+
actionId: s.actionId,
|
|
678
|
+
actionDescription: s.actionDescription,
|
|
679
|
+
permissionId: s.permissionId,
|
|
680
|
+
types: [le(R, f)]
|
|
681
681
|
}
|
|
682
682
|
]
|
|
683
|
-
} :
|
|
684
|
-
...
|
|
683
|
+
} : j) : T = [
|
|
684
|
+
...E,
|
|
685
685
|
{
|
|
686
|
-
resourceId:
|
|
687
|
-
resourceDescription:
|
|
686
|
+
resourceId: s.resourceId,
|
|
687
|
+
resourceDescription: s.resourceDescription,
|
|
688
688
|
permissions: [
|
|
689
689
|
{
|
|
690
|
-
actionId:
|
|
691
|
-
actionDescription:
|
|
692
|
-
permissionId:
|
|
693
|
-
types: [
|
|
690
|
+
actionId: s.actionId,
|
|
691
|
+
actionDescription: s.actionDescription,
|
|
692
|
+
permissionId: s.permissionId,
|
|
693
|
+
types: [le(R, f)]
|
|
694
694
|
}
|
|
695
695
|
]
|
|
696
696
|
}
|
|
697
|
-
],
|
|
697
|
+
], T;
|
|
698
698
|
});
|
|
699
|
-
const
|
|
700
|
-
|
|
699
|
+
const n = g.filter((E) => E.value === c?.nodeProps?.owner?.resourceId).map((E) => E.children).flat(), G = n.map((E) => E.value).indexOf(c.value), C = n.find((E, T) => !E?.nodeProps?.granted && E?.value !== c.value && (n.length > G + 1 ? T > G : !0));
|
|
700
|
+
C?.value && S.select(C.value), u.expand(s.resourceId), L(C);
|
|
701
701
|
}
|
|
702
702
|
});
|
|
703
|
-
}, [
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
let
|
|
707
|
-
return
|
|
708
|
-
|
|
709
|
-
}),
|
|
710
|
-
}).map((
|
|
711
|
-
const
|
|
712
|
-
return
|
|
713
|
-
...
|
|
714
|
-
permissions: [...(
|
|
703
|
+
}, [c, l, f, q, g, P, v, S, u]), ne = ge(() => {
|
|
704
|
+
b?.nodeProps?.permissionId && q.deletePermission(b.nodeProps.permissionId).then(() => {
|
|
705
|
+
i((C) => [...C].filter((T) => {
|
|
706
|
+
let j = !0;
|
|
707
|
+
return T.permissions?.forEach((k) => {
|
|
708
|
+
k.permissionId !== void 0 && k.permissionId === b?.nodeProps?.permissionId && T.permissions.length === 1 && k?.types?.length === 1 && k.types[0] === le(R, f) && (j = !1);
|
|
709
|
+
}), j;
|
|
710
|
+
}).map((T) => {
|
|
711
|
+
const j = b?.nodeProps?.owner;
|
|
712
|
+
return T.resourceId === j.resourceId ? b?.nodeProps?.types?.length === 1 ? {
|
|
713
|
+
...T,
|
|
714
|
+
permissions: [...(T.permissions ?? []).filter((k) => k.permissionId !== b?.nodeProps?.permissionId)]
|
|
715
715
|
} : {
|
|
716
|
-
...
|
|
717
|
-
permissions: (
|
|
718
|
-
actionId:
|
|
719
|
-
actionDescription:
|
|
720
|
-
types: [...
|
|
721
|
-
} :
|
|
722
|
-
} :
|
|
716
|
+
...T,
|
|
717
|
+
permissions: (T.permissions ?? []).map((k) => k.actionId === b.value ? {
|
|
718
|
+
actionId: k.actionId,
|
|
719
|
+
actionDescription: k.actionDescription,
|
|
720
|
+
types: [...k.types?.filter((de) => de && de !== le(R, f)) ?? []]
|
|
721
|
+
} : k)
|
|
722
|
+
} : T;
|
|
723
723
|
}));
|
|
724
|
-
const
|
|
725
|
-
|
|
724
|
+
const s = W.filter((C) => C.value === b?.nodeProps?.owner?.resourceId).map((C) => C.children).flat(), n = s.map((C) => C.value).indexOf(b.value), G = s.find((C, E) => C?.nodeProps?.types.includes(le(R, f)) && C?.value !== b.value && (s.length > n + 1 ? E > n : !0));
|
|
725
|
+
G?.value && u.select(G.value), re(G);
|
|
726
726
|
});
|
|
727
|
-
}, [
|
|
728
|
-
return
|
|
729
|
-
|
|
730
|
-
}, [
|
|
731
|
-
/* @__PURE__ */ e.jsx(
|
|
732
|
-
/* @__PURE__ */ e.jsxs(
|
|
733
|
-
/* @__PURE__ */ e.jsxs(
|
|
734
|
-
/* @__PURE__ */ e.jsx(H, { children:
|
|
727
|
+
}, [b, q, f, W, v, u]);
|
|
728
|
+
return Re(() => {
|
|
729
|
+
h && r && (L(void 0), re(void 0), ae(""), N(""), u.collapseAllNodes(), S.collapseAllNodes(), m());
|
|
730
|
+
}, [h, f, l, m]), r ? /* @__PURE__ */ e.jsx(Fe, { opened: h, onClose: w, title: `${t().t(`archbase:${f}`)}: ${d}`, size: "80%", styles: { root: { overflow: "hidden" } }, children: /* @__PURE__ */ e.jsxs(ha, { height: "540px", children: [
|
|
731
|
+
/* @__PURE__ */ e.jsx(pa, { children: /* @__PURE__ */ e.jsx(Ie, { h: "500px", children: /* @__PURE__ */ e.jsx(Y, { withBorder: !0, my: 20, p: 20, children: /* @__PURE__ */ e.jsxs(A, { columns: 20, children: [
|
|
732
|
+
/* @__PURE__ */ e.jsxs(A.Col, { span: 9, children: [
|
|
733
|
+
/* @__PURE__ */ e.jsxs($, { mb: 20, children: [
|
|
734
|
+
/* @__PURE__ */ e.jsx(H, { children: t().t("archbase:Available") }),
|
|
735
735
|
/* @__PURE__ */ e.jsx(
|
|
736
|
-
|
|
736
|
+
Ye,
|
|
737
737
|
{
|
|
738
738
|
size: "xs",
|
|
739
739
|
value: J,
|
|
740
|
-
onChange: (
|
|
741
|
-
placeholder:
|
|
740
|
+
onChange: (s) => ae(s.target.value),
|
|
741
|
+
placeholder: t().t("archbase:Filter available permissions")
|
|
742
742
|
}
|
|
743
743
|
)
|
|
744
744
|
] }),
|
|
745
745
|
/* @__PURE__ */ e.jsx(
|
|
746
|
-
|
|
746
|
+
Xe,
|
|
747
747
|
{
|
|
748
|
-
data:
|
|
748
|
+
data: g,
|
|
749
749
|
selectOnClick: !0,
|
|
750
750
|
allowRangeSelection: !1,
|
|
751
|
-
tree:
|
|
752
|
-
renderNode: ({ level:
|
|
753
|
-
const
|
|
754
|
-
|
|
755
|
-
}, [
|
|
751
|
+
tree: S,
|
|
752
|
+
renderNode: ({ level: s, node: n, expanded: G, hasChildren: C, selected: E, elementProps: T }) => {
|
|
753
|
+
const j = n?.nodeProps?.granted, k = j ? "dimmed" : void 0, de = j ? "line-through" : void 0, V = ge((Ge) => {
|
|
754
|
+
L(n), T.onClick(Ge);
|
|
755
|
+
}, [n, T.onClick]);
|
|
756
756
|
return /* @__PURE__ */ e.jsxs(
|
|
757
|
-
|
|
757
|
+
$,
|
|
758
758
|
{
|
|
759
|
-
ml:
|
|
759
|
+
ml: C ? 0 : 5,
|
|
760
760
|
gap: 5,
|
|
761
|
-
...
|
|
762
|
-
bg:
|
|
763
|
-
onClick:
|
|
761
|
+
...T,
|
|
762
|
+
bg: E && s === 2 ? F : "",
|
|
763
|
+
onClick: V,
|
|
764
764
|
children: [
|
|
765
|
-
|
|
766
|
-
|
|
765
|
+
C && /* @__PURE__ */ e.jsx(
|
|
766
|
+
_e,
|
|
767
767
|
{
|
|
768
768
|
size: 18,
|
|
769
|
-
style: { transform:
|
|
769
|
+
style: { transform: G ? "rotate(0deg)" : "rotate(-90deg)" }
|
|
770
770
|
}
|
|
771
771
|
),
|
|
772
|
-
!
|
|
773
|
-
|
|
772
|
+
!C && /* @__PURE__ */ e.jsx(
|
|
773
|
+
er,
|
|
774
774
|
{
|
|
775
775
|
size: 12,
|
|
776
776
|
style: { transform: "rotate(-90deg)", marginTop: "-5px" }
|
|
@@ -779,9 +779,9 @@ function Me({ dataSource: r, opened: c, close: j }) {
|
|
|
779
779
|
/* @__PURE__ */ e.jsx(
|
|
780
780
|
H,
|
|
781
781
|
{
|
|
782
|
-
c:
|
|
783
|
-
td:
|
|
784
|
-
children:
|
|
782
|
+
c: k,
|
|
783
|
+
td: de,
|
|
784
|
+
children: sr(n.label)
|
|
785
785
|
}
|
|
786
786
|
)
|
|
787
787
|
]
|
|
@@ -791,61 +791,61 @@ function Me({ dataSource: r, opened: c, close: j }) {
|
|
|
791
791
|
}
|
|
792
792
|
)
|
|
793
793
|
] }),
|
|
794
|
-
/* @__PURE__ */ e.jsx(
|
|
795
|
-
/* @__PURE__ */ e.jsx(
|
|
796
|
-
/* @__PURE__ */ e.jsx(
|
|
794
|
+
/* @__PURE__ */ e.jsx(A.Col, { span: 2, children: /* @__PURE__ */ e.jsxs(oe, { gap: 5, style: { minWidth: "10%" }, justify: "center", align: "center", h: "100%", children: [
|
|
795
|
+
/* @__PURE__ */ e.jsx(se, { label: t().t("archbase:Add"), children: /* @__PURE__ */ e.jsx(B, { onClick: ce, disabled: !c || c?.nodeProps?.granted || !c.nodeProps, children: /* @__PURE__ */ e.jsx(cr, {}) }) }),
|
|
796
|
+
/* @__PURE__ */ e.jsx(se, { label: t().t("archbase:Remove"), children: /* @__PURE__ */ e.jsx(B, { onClick: ne, disabled: !b || !b?.nodeProps?.permissionId || !b.nodeProps, children: /* @__PURE__ */ e.jsx(dr, {}) }) })
|
|
797
797
|
] }) }),
|
|
798
|
-
/* @__PURE__ */ e.jsxs(
|
|
799
|
-
/* @__PURE__ */ e.jsxs(
|
|
800
|
-
/* @__PURE__ */ e.jsx(H, { children:
|
|
798
|
+
/* @__PURE__ */ e.jsxs(A.Col, { span: 9, children: [
|
|
799
|
+
/* @__PURE__ */ e.jsxs($, { mb: 20, children: [
|
|
800
|
+
/* @__PURE__ */ e.jsx(H, { children: t().t("archbase:Granted") }),
|
|
801
801
|
/* @__PURE__ */ e.jsx(
|
|
802
|
-
|
|
802
|
+
Ye,
|
|
803
803
|
{
|
|
804
804
|
size: "xs",
|
|
805
|
-
value:
|
|
806
|
-
onChange: (
|
|
807
|
-
placeholder:
|
|
805
|
+
value: I,
|
|
806
|
+
onChange: (s) => N(s.target.value),
|
|
807
|
+
placeholder: t().t("archbase:Filter granted permissions")
|
|
808
808
|
}
|
|
809
809
|
)
|
|
810
810
|
] }),
|
|
811
811
|
/* @__PURE__ */ e.jsx(
|
|
812
|
-
|
|
812
|
+
Xe,
|
|
813
813
|
{
|
|
814
|
-
data:
|
|
814
|
+
data: W,
|
|
815
815
|
selectOnClick: !0,
|
|
816
816
|
allowRangeSelection: !1,
|
|
817
|
-
tree:
|
|
818
|
-
renderNode: ({ level:
|
|
819
|
-
const
|
|
820
|
-
|
|
821
|
-
}, [
|
|
817
|
+
tree: u,
|
|
818
|
+
renderNode: ({ level: s, node: n, expanded: G, hasChildren: C, selected: E, elementProps: T }) => {
|
|
819
|
+
const j = ge((k) => {
|
|
820
|
+
re(n), T.onClick(k);
|
|
821
|
+
}, [n, T.onClick]);
|
|
822
822
|
return /* @__PURE__ */ e.jsxs(
|
|
823
|
-
|
|
823
|
+
$,
|
|
824
824
|
{
|
|
825
|
-
ml:
|
|
825
|
+
ml: C ? 0 : 5,
|
|
826
826
|
gap: 5,
|
|
827
|
-
...
|
|
828
|
-
bg:
|
|
829
|
-
onClick:
|
|
827
|
+
...T,
|
|
828
|
+
bg: E && s === 2 ? F : "",
|
|
829
|
+
onClick: j,
|
|
830
830
|
children: [
|
|
831
|
-
|
|
832
|
-
|
|
831
|
+
C && /* @__PURE__ */ e.jsx(
|
|
832
|
+
_e,
|
|
833
833
|
{
|
|
834
834
|
size: 18,
|
|
835
|
-
style: { transform:
|
|
835
|
+
style: { transform: G ? "rotate(0deg)" : "rotate(-90deg)" }
|
|
836
836
|
}
|
|
837
837
|
),
|
|
838
|
-
!
|
|
839
|
-
|
|
838
|
+
!C && /* @__PURE__ */ e.jsx(
|
|
839
|
+
er,
|
|
840
840
|
{
|
|
841
841
|
size: 12,
|
|
842
842
|
style: { transform: "rotate(-90deg)", marginTop: "-5px" }
|
|
843
843
|
}
|
|
844
844
|
),
|
|
845
|
-
/* @__PURE__ */ e.jsx(H, { children:
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
845
|
+
/* @__PURE__ */ e.jsx(H, { children: sr(n.label) }),
|
|
846
|
+
n?.nodeProps?.types?.includes("USER") && /* @__PURE__ */ e.jsx(Se, { color: "blue", children: t().t("archbase:user") }),
|
|
847
|
+
n?.nodeProps?.types?.includes("GROUP") && /* @__PURE__ */ e.jsx(Se, { color: "orange", children: t().t("archbase:group") }),
|
|
848
|
+
n?.nodeProps?.types?.includes("PROFILE") && /* @__PURE__ */ e.jsx(Se, { color: "pink", children: t().t("archbase:profile") })
|
|
849
849
|
]
|
|
850
850
|
}
|
|
851
851
|
);
|
|
@@ -854,121 +854,99 @@ function Me({ dataSource: r, opened: c, close: j }) {
|
|
|
854
854
|
)
|
|
855
855
|
] })
|
|
856
856
|
] }) }) }) }),
|
|
857
|
-
/* @__PURE__ */ e.jsx(
|
|
857
|
+
/* @__PURE__ */ e.jsx(xa, { size: "40px", children: /* @__PURE__ */ e.jsx($, { justify: "flex-end", children: /* @__PURE__ */ e.jsx(U, { onClick: w, children: t().t("archbase:Close") }) }) })
|
|
858
858
|
] }) }) : null;
|
|
859
859
|
}
|
|
860
|
-
const
|
|
861
|
-
function
|
|
860
|
+
const Oe = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAAABj1BMVEUAAADMzMzLy8vAwMDLy8vLy8vLy8vMzMzKysrR0dHPz8/MzMzNzc3KysrMzMzKysrLy8vLy8vLy8vJycnR0dHMzMzPz8/Ozs7MzMxPT0/Nzc1UVFTJyclTU1PMzMzKysrMzMzJycldXV1iYmLMzMzIyMhNTU1NTU3MzMzLy8vNzc3MzMxVVVXLy8vMzMzLy8vLy8tNTU3MzMzOzs5QUFDLy8vKyspRUVFRUVHMzMxZWVlycnLLy8tUVFTJycnKyspZWVlXV1dhYWHGxsZMTExQUFBPT0/Ozs7Ly8vPz89SUlJSUlLMzMxVVVVWVlZVVVXKysptbW1bW1t6enpmZmbLy8tKSkrQ0NDOzs5FRUXNzc1NTU3S0tLU1NRHR0dSUlKzs7ORkZF4eHhPT0/Jycm9vb26urp8fHxYWFisrKylpaWdnZ11dXVubm5fX1+8vLy3t7ehoaFkZGRVVVXBwcG/v7+vr6+ZmZmUlJSNjY2GhoZzc3NcXFzGxsbDw8Ofn5+WlpaBgYGwsLCpqalqampaWRCJAAAAVXRSTlMA+YUG1M7Df1AQ8urbdWdiXjo2HQkE+/vu4qqIcV1bRDEpIRwXFO/q2ZiObWJZSiv+9uTe3cq8s6qkgX55b1pWR0YVDfvJyLCcmZWTi2lZVz82LRcUQGGNCgAAA9pJREFUWMPll2db2zAQgJ0AgUIYDSl7tZRZ6N57793akizZCSSEEJKw9yi0/eHtEwgid5IxfOX9mnvenM93J8s4tZw5391Q3/Hu0mj3lTMnllys+hi6HqBCCCIEDVwPDVddPEEqXW9qiEOoeQAlDqlpGz1eYo2VYSFsE2ELcSPY6FvTV1njUFMDdVqCff48DWGgAdhOuMtPie8JrUaWq+3I5zs76Jg+cG50e3seVxPTF6S63svT0URNn1BSqffUEhvHE/ofgn8x9aZLKJpcja/sZnO57Pp0yqbIVKv2VDUBD93amedsn0QuA1U2eazynG8BceRPnrnWAczdmAERtLoHe6IhAaJWLWaVwNLLBPxXxQskCjogZse1ICz2G+TkDKNGbAb5THELwzaXQB2bzpZ6zt0GD5acZ5bKNA4LGSorET2BDz/NLDVT0FQywGW34GT81YhYForKo4dbCHjsVMLSEJuxgWnUkMAKkTmmE7E52ExhuX2vBGDzj+lFa7AKzRHUQ1K0qheNQZETPHj3FQSKfulF0zCYlpcVpyyAlseypcOdojC6uThxdQLt94mYTpRI2WjvduyL3kqRbGxXk1A+iYJFmywRhEyCIuEZwUXqq7Hxb+M60QYOtlsaZa3BT7PazuZxisP3VkA3/MX79a8QHH5574iWtfbZ2RDRUBDVA5HPzsbvvw6LaMZraLGodu9YdEzPhsRrBCIq985FLDKpto8mKY4WD+VWQymlXWVjpydshaiuILpcEKGxjSkfLE4VwaSqIOq5aioQ40w1IMRUEUEjgrctXkaqEZFDi1lccL1fGd5s94RKRLMMJZSTHrBGcEfiMxJ3Ne5HeYhg7CX03vgsVUZGiuesLBJqSrzUcNxgFBxHMGA2gVeRAjFkFOkJmCqSebekqzeTyrDmQ182IV8NEJtQNtytc+irBn5rwUHLqMJEvSGJlitCCCr2BsVRNFzyGdklcEQcHwAZop58SRmqEt2aZ3iJpChMuyJqlPC1CQRs51RDm08RdIAAhpzD6dCpvPpjNJ2hh5NyhvCFb5DIq0F83NKd/VY2LlWkXHFXjlTTfU1qlzNLC+OTs8Tev0JElHfZQkpkaT0GNEiVWJ8oqIjm8vdQ2GR7bAFrsGphbZHYQnthC5orm8y1fOCy9Fhy2NDyANVYr3IfGB6MXOM+Rdc+GZ48venLxG8+M46g9y734bl7wTiazlZ+hKZ1xPBFb/sA99D0t/cafrnQ3sq50sJb2+FTefOz804/50DC+++MPDeOTe+XD68GeJGXA6/ff4bJ+OfHt2edj+7ff9T59Ptz47TyD0dpv5fjoIC3AAAAAElFTkSuQmCC", Aa = (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, Ta = (r) => r.profile ? /* @__PURE__ */ e.jsx(Se, { color: "green", children: r.profile?.name }) : null;
|
|
861
|
+
function La({
|
|
862
862
|
height: r = "400px",
|
|
863
|
-
width:
|
|
864
|
-
createEntitiesWithId:
|
|
865
|
-
userModalOptions:
|
|
866
|
-
profileModalOptions:
|
|
867
|
-
groupModalOptions:
|
|
863
|
+
width: h = "100%",
|
|
864
|
+
createEntitiesWithId: w = !0,
|
|
865
|
+
userModalOptions: d,
|
|
866
|
+
profileModalOptions: l,
|
|
867
|
+
groupModalOptions: f,
|
|
868
|
+
options: S
|
|
868
869
|
}) {
|
|
869
|
-
const u =
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
"ArchbaseSecurityView-Groups",
|
|
877
|
-
void 0,
|
|
878
|
-
// Will be set when dsGroups is available
|
|
879
|
-
void 0,
|
|
880
|
-
void 0
|
|
881
|
-
), d = le(
|
|
882
|
-
"ArchbaseSecurityView-Profiles",
|
|
883
|
-
void 0,
|
|
884
|
-
// Will be set when dsProfiles is available
|
|
885
|
-
void 0,
|
|
886
|
-
void 0
|
|
887
|
-
), f = ye(null), m = ye(null), he = ye(null), ce = ye(null), i = ye(null), l = (t) => t.id, $ = (t) => t.id, S = (t) => t.id, z = (t) => t.id, k = (t) => t.id, { dataSource: A, isLoading: R } = se({
|
|
870
|
+
const u = ir();
|
|
871
|
+
lr("securityStore");
|
|
872
|
+
const P = Yr(), { colorScheme: x } = Be(), [v, i] = M(void 0), [c, L] = M("users"), b = _(X.User), re = _(X.Group), J = _(X.Resource), ae = _(X.Profile), [Z, I] = M(""), [N, D] = M(""), q = _(X.AccessToken), { t: o } = Xr(), F = je(null), W = je(null), p = je(null), g = je(null), m = je(null), ce = (a) => a.id, ne = (a) => a.id, s = (a) => a.id, n = (a) => a.id, G = (a) => a.id, {
|
|
873
|
+
dataSource: C,
|
|
874
|
+
isLoading: E,
|
|
875
|
+
refreshData: T
|
|
876
|
+
} = we({
|
|
888
877
|
name: "accessTokenApi",
|
|
889
878
|
service: q,
|
|
890
|
-
|
|
891
|
-
validator: E,
|
|
879
|
+
validator: P,
|
|
892
880
|
pageSize: 25,
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
onLoadComplete: (t) => {
|
|
897
|
-
},
|
|
898
|
-
onDestroy: (t) => {
|
|
899
|
-
},
|
|
900
|
-
onError: (t, L) => {
|
|
901
|
-
I(t), Y.showError(`${s("archbase:WARNING")}`, t, L);
|
|
881
|
+
defaultSortFields: ["user.email", "expirationTime:desc"],
|
|
882
|
+
onError: (a, z) => {
|
|
883
|
+
i(a), Q.showError(`${o("archbase:WARNING")}`, a, z);
|
|
902
884
|
}
|
|
903
|
-
}), {
|
|
885
|
+
}), {
|
|
886
|
+
dataSource: j,
|
|
887
|
+
isLoading: k,
|
|
888
|
+
refreshData: de
|
|
889
|
+
} = we({
|
|
904
890
|
name: "dsUsers",
|
|
905
|
-
service:
|
|
906
|
-
|
|
907
|
-
validator: E,
|
|
891
|
+
service: b,
|
|
892
|
+
validator: P,
|
|
908
893
|
pageSize: 25,
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
},
|
|
912
|
-
onDestroy: (t) => {
|
|
913
|
-
},
|
|
914
|
-
onError: (t, L) => {
|
|
915
|
-
I(t), Y.showError(`${s("archbase:WARNING")}`, t, L);
|
|
894
|
+
onError: (a, z) => {
|
|
895
|
+
i(a), Q.showError(`${o("archbase:WARNING")}`, a, z);
|
|
916
896
|
}
|
|
917
|
-
}), {
|
|
897
|
+
}), {
|
|
898
|
+
dataSource: V,
|
|
899
|
+
isLoading: Ge,
|
|
900
|
+
refreshData: ur
|
|
901
|
+
} = we({
|
|
918
902
|
name: "dsGroups",
|
|
919
|
-
service:
|
|
920
|
-
|
|
921
|
-
validator: E,
|
|
903
|
+
service: re,
|
|
904
|
+
validator: P,
|
|
922
905
|
pageSize: 25,
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
},
|
|
926
|
-
onDestroy: (t) => {
|
|
927
|
-
},
|
|
928
|
-
onError: (t, L) => {
|
|
929
|
-
I(t), Y.showError(`${s("archbase:WARNING")}`, t, L);
|
|
906
|
+
onError: (a, z) => {
|
|
907
|
+
i(a), Q.showError(`${o("archbase:WARNING")}`, a, z);
|
|
930
908
|
}
|
|
931
|
-
}), {
|
|
909
|
+
}), {
|
|
910
|
+
dataSource: O,
|
|
911
|
+
isLoading: hr,
|
|
912
|
+
refreshData: pr
|
|
913
|
+
} = we({
|
|
932
914
|
name: "dsProfile",
|
|
933
915
|
service: ae,
|
|
934
|
-
|
|
935
|
-
validator: E,
|
|
916
|
+
validator: P,
|
|
936
917
|
pageSize: 25,
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
},
|
|
940
|
-
onDestroy: (t) => {
|
|
941
|
-
},
|
|
942
|
-
onError: (t, L) => {
|
|
943
|
-
I(t), Y.showError(`${s("archbase:WARNING")}`, t, L);
|
|
918
|
+
onError: (a, z) => {
|
|
919
|
+
i(a), Q.showError(`${o("archbase:WARNING")}`, a, z);
|
|
944
920
|
}
|
|
945
|
-
}), {
|
|
921
|
+
}), {
|
|
922
|
+
dataSource: xr,
|
|
923
|
+
isLoading: fr,
|
|
924
|
+
refreshData: mr
|
|
925
|
+
} = we({
|
|
946
926
|
name: "dsResources",
|
|
947
927
|
service: J,
|
|
948
|
-
|
|
949
|
-
validator: E,
|
|
928
|
+
validator: P,
|
|
950
929
|
pageSize: 25,
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
},
|
|
954
|
-
onDestroy: (t) => {
|
|
955
|
-
},
|
|
956
|
-
onError: (t, L) => {
|
|
957
|
-
I(t), Y.showError(`${s("archbase:WARNING")}`, t, L);
|
|
930
|
+
onError: (a, z) => {
|
|
931
|
+
i(a), Q.showError(`${o("archbase:WARNING")}`, a, z);
|
|
958
932
|
}
|
|
959
|
-
})
|
|
933
|
+
});
|
|
934
|
+
Re(() => {
|
|
935
|
+
T({ filter: Pe(Te.eq("revoked", "false")) }), de(), ur(), pr(), mr();
|
|
936
|
+
}, []);
|
|
937
|
+
const ye = `calc(${r} - 40px)`, br = /* @__PURE__ */ e.jsxs(me, { children: [
|
|
960
938
|
/* @__PURE__ */ e.jsx(
|
|
961
|
-
|
|
939
|
+
y,
|
|
962
940
|
{
|
|
963
941
|
dataField: "user.avatar",
|
|
964
942
|
dataType: "image",
|
|
965
943
|
size: 80,
|
|
966
|
-
header: `${
|
|
967
|
-
render: (
|
|
944
|
+
header: `${o("archbase:Foto")}`,
|
|
945
|
+
render: (a) => /* @__PURE__ */ e.jsx(
|
|
968
946
|
"img",
|
|
969
947
|
{
|
|
970
948
|
style: { borderRadius: 50, height: "32px", maxHeight: "32px" },
|
|
971
|
-
src:
|
|
949
|
+
src: a.row.user && a.row.user.avatar ? atob(a.row.user.avatar) : Oe
|
|
972
950
|
}
|
|
973
951
|
),
|
|
974
952
|
inputFilterType: "text",
|
|
@@ -976,77 +954,77 @@ function Ft({
|
|
|
976
954
|
}
|
|
977
955
|
),
|
|
978
956
|
/* @__PURE__ */ e.jsx(
|
|
979
|
-
|
|
957
|
+
y,
|
|
980
958
|
{
|
|
981
959
|
dataField: "user.userName",
|
|
982
960
|
dataType: "text",
|
|
983
961
|
size: 300,
|
|
984
|
-
header: `${
|
|
962
|
+
header: `${o("archbase:Nome de Usuário")}`,
|
|
985
963
|
inputFilterType: "text"
|
|
986
964
|
}
|
|
987
965
|
),
|
|
988
966
|
/* @__PURE__ */ e.jsx(
|
|
989
|
-
|
|
967
|
+
y,
|
|
990
968
|
{
|
|
991
969
|
dataField: "user.email",
|
|
992
970
|
dataType: "text",
|
|
993
|
-
header: `${
|
|
971
|
+
header: `${o("archbase:Email")}`,
|
|
994
972
|
size: 300,
|
|
995
973
|
inputFilterType: "text"
|
|
996
974
|
}
|
|
997
975
|
),
|
|
998
976
|
/* @__PURE__ */ e.jsx(
|
|
999
|
-
|
|
977
|
+
y,
|
|
1000
978
|
{
|
|
1001
979
|
dataField: "expirationDate",
|
|
1002
980
|
dataType: "text",
|
|
1003
981
|
size: 300,
|
|
1004
|
-
header: `${
|
|
1005
|
-
render: (
|
|
982
|
+
header: `${o("archbase:Expira em")}`,
|
|
983
|
+
render: (a) => /* @__PURE__ */ e.jsx(H, { size: "sm", children: a.row.expirationDate }),
|
|
1006
984
|
inputFilterType: "text"
|
|
1007
985
|
}
|
|
1008
986
|
),
|
|
1009
987
|
/* @__PURE__ */ e.jsx(
|
|
1010
|
-
|
|
988
|
+
y,
|
|
1011
989
|
{
|
|
1012
990
|
dataField: "revoked",
|
|
1013
991
|
dataType: "boolean",
|
|
1014
|
-
header: `${
|
|
992
|
+
header: `${o("archbase:Revogado ?")}`,
|
|
1015
993
|
inputFilterType: "checkbox"
|
|
1016
994
|
}
|
|
1017
995
|
),
|
|
1018
996
|
/* @__PURE__ */ e.jsx(
|
|
1019
|
-
|
|
997
|
+
y,
|
|
1020
998
|
{
|
|
1021
999
|
dataField: "expired",
|
|
1022
1000
|
dataType: "boolean",
|
|
1023
|
-
header: `${
|
|
1001
|
+
header: `${o("archbase:Expirado ?")}`,
|
|
1024
1002
|
inputFilterType: "checkbox"
|
|
1025
1003
|
}
|
|
1026
1004
|
),
|
|
1027
1005
|
/* @__PURE__ */ e.jsx(
|
|
1028
|
-
|
|
1006
|
+
y,
|
|
1029
1007
|
{
|
|
1030
1008
|
dataField: "token",
|
|
1031
1009
|
dataType: "text",
|
|
1032
|
-
header: `${
|
|
1010
|
+
header: `${o("archbase:Token Acesso")}`,
|
|
1033
1011
|
size: 300,
|
|
1034
1012
|
inputFilterType: "text"
|
|
1035
1013
|
}
|
|
1036
1014
|
)
|
|
1037
|
-
] }),
|
|
1015
|
+
] }), gr = /* @__PURE__ */ e.jsxs(me, { children: [
|
|
1038
1016
|
/* @__PURE__ */ e.jsx(
|
|
1039
|
-
|
|
1017
|
+
y,
|
|
1040
1018
|
{
|
|
1041
1019
|
dataField: "avatar",
|
|
1042
1020
|
dataType: "image",
|
|
1043
1021
|
size: 80,
|
|
1044
|
-
header: `${
|
|
1045
|
-
render: (
|
|
1022
|
+
header: `${o("archbase:Foto")}`,
|
|
1023
|
+
render: (a) => /* @__PURE__ */ e.jsx(
|
|
1046
1024
|
"img",
|
|
1047
1025
|
{
|
|
1048
1026
|
style: { borderRadius: 50, height: "32px", maxHeight: "32px" },
|
|
1049
|
-
src:
|
|
1027
|
+
src: a.row.avatar ? atob(a.row.avatar) : Oe
|
|
1050
1028
|
}
|
|
1051
1029
|
),
|
|
1052
1030
|
enableSorting: !1,
|
|
@@ -1056,625 +1034,656 @@ function Ft({
|
|
|
1056
1034
|
}
|
|
1057
1035
|
),
|
|
1058
1036
|
/* @__PURE__ */ e.jsx(
|
|
1059
|
-
|
|
1037
|
+
y,
|
|
1060
1038
|
{
|
|
1061
1039
|
dataField: "name",
|
|
1062
1040
|
dataType: "text",
|
|
1063
1041
|
size: 300,
|
|
1064
|
-
header: `${
|
|
1042
|
+
header: `${o("archbase:Nome")}`,
|
|
1065
1043
|
inputFilterType: "text"
|
|
1066
1044
|
}
|
|
1067
1045
|
),
|
|
1068
1046
|
/* @__PURE__ */ e.jsx(
|
|
1069
|
-
|
|
1047
|
+
y,
|
|
1070
1048
|
{
|
|
1071
1049
|
dataField: "nickname",
|
|
1072
1050
|
dataType: "text",
|
|
1073
1051
|
size: 120,
|
|
1074
|
-
header: `${
|
|
1052
|
+
header: `${o("archbase:Apelido")}`,
|
|
1075
1053
|
inputFilterType: "text"
|
|
1076
1054
|
}
|
|
1077
1055
|
),
|
|
1078
1056
|
/* @__PURE__ */ e.jsx(
|
|
1079
|
-
|
|
1057
|
+
y,
|
|
1080
1058
|
{
|
|
1081
1059
|
dataField: "email",
|
|
1082
1060
|
dataType: "text",
|
|
1083
|
-
header: `${
|
|
1061
|
+
header: `${o("archbase:Email")}`,
|
|
1084
1062
|
size: 300,
|
|
1085
1063
|
inputFilterType: "text"
|
|
1086
1064
|
}
|
|
1087
1065
|
),
|
|
1088
1066
|
/* @__PURE__ */ e.jsx(
|
|
1089
|
-
|
|
1067
|
+
y,
|
|
1068
|
+
{
|
|
1069
|
+
dataField: "accountDeactivated",
|
|
1070
|
+
dataType: "boolean",
|
|
1071
|
+
header: `${o("archbase:Desativado?")}`,
|
|
1072
|
+
inputFilterType: "checkbox",
|
|
1073
|
+
size: 120
|
|
1074
|
+
}
|
|
1075
|
+
),
|
|
1076
|
+
/* @__PURE__ */ e.jsx(
|
|
1077
|
+
y,
|
|
1090
1078
|
{
|
|
1091
1079
|
dataField: "profile.name",
|
|
1092
1080
|
dataType: "text",
|
|
1093
|
-
header: `${
|
|
1081
|
+
header: `${o("archbase:Perfil")}`,
|
|
1094
1082
|
size: 200,
|
|
1095
|
-
render: (
|
|
1083
|
+
render: (a) => Ta(a.row),
|
|
1096
1084
|
inputFilterType: "text"
|
|
1097
1085
|
}
|
|
1098
1086
|
),
|
|
1099
1087
|
/* @__PURE__ */ e.jsx(
|
|
1100
|
-
|
|
1088
|
+
y,
|
|
1101
1089
|
{
|
|
1102
1090
|
dataField: "groups",
|
|
1103
1091
|
dataType: "text",
|
|
1104
1092
|
size: 300,
|
|
1105
|
-
header: `${
|
|
1106
|
-
render: (
|
|
1093
|
+
header: `${o("archbase:Grupos")}`,
|
|
1094
|
+
render: (a) => Aa(a.row),
|
|
1107
1095
|
enableSorting: !1,
|
|
1108
1096
|
enableColumnFilter: !1,
|
|
1109
1097
|
enableGlobalFilter: !1
|
|
1110
1098
|
}
|
|
1111
1099
|
),
|
|
1112
1100
|
/* @__PURE__ */ e.jsx(
|
|
1113
|
-
|
|
1101
|
+
y,
|
|
1114
1102
|
{
|
|
1115
1103
|
dataField: "isAdministrator",
|
|
1116
1104
|
dataType: "boolean",
|
|
1117
|
-
header: `${
|
|
1105
|
+
header: `${o("archbase:Admin ?")}`,
|
|
1118
1106
|
inputFilterType: "checkbox"
|
|
1119
1107
|
}
|
|
1120
1108
|
),
|
|
1121
1109
|
/* @__PURE__ */ e.jsx(
|
|
1122
|
-
|
|
1110
|
+
y,
|
|
1123
1111
|
{
|
|
1124
1112
|
dataField: "changePasswordOnNextLogin",
|
|
1125
1113
|
dataType: "boolean",
|
|
1126
|
-
header: `${
|
|
1114
|
+
header: `${o("archbase:Alt.senha próximo login?")}`,
|
|
1127
1115
|
inputFilterType: "checkbox",
|
|
1128
1116
|
size: 120
|
|
1129
1117
|
}
|
|
1130
1118
|
),
|
|
1131
1119
|
/* @__PURE__ */ e.jsx(
|
|
1132
|
-
|
|
1120
|
+
y,
|
|
1133
1121
|
{
|
|
1134
1122
|
dataField: "allowPasswordChange",
|
|
1135
1123
|
dataType: "boolean",
|
|
1136
|
-
header: `${
|
|
1124
|
+
header: `${o("archbase:Pode alterar senha?")}`,
|
|
1137
1125
|
inputFilterType: "checkbox",
|
|
1138
1126
|
size: 120
|
|
1139
1127
|
}
|
|
1140
1128
|
),
|
|
1141
1129
|
/* @__PURE__ */ e.jsx(
|
|
1142
|
-
|
|
1130
|
+
y,
|
|
1143
1131
|
{
|
|
1144
1132
|
dataField: "allowMultipleLogins",
|
|
1145
1133
|
dataType: "boolean",
|
|
1146
|
-
header: `${
|
|
1134
|
+
header: `${o("archbase:Permite multiplos logins?")}`,
|
|
1147
1135
|
inputFilterType: "checkbox",
|
|
1148
1136
|
size: 120
|
|
1149
1137
|
}
|
|
1150
1138
|
),
|
|
1151
1139
|
/* @__PURE__ */ e.jsx(
|
|
1152
|
-
|
|
1140
|
+
y,
|
|
1153
1141
|
{
|
|
1154
1142
|
dataField: "passwordNeverExpires",
|
|
1155
1143
|
dataType: "boolean",
|
|
1156
|
-
header: `${
|
|
1157
|
-
inputFilterType: "checkbox",
|
|
1158
|
-
size: 120
|
|
1159
|
-
}
|
|
1160
|
-
),
|
|
1161
|
-
/* @__PURE__ */ e.jsx(
|
|
1162
|
-
b,
|
|
1163
|
-
{
|
|
1164
|
-
dataField: "accountDeactivated",
|
|
1165
|
-
dataType: "boolean",
|
|
1166
|
-
header: `${s("archbase:Desativado?")}`,
|
|
1144
|
+
header: `${o("archbase:Senha nunca expira?")}`,
|
|
1167
1145
|
inputFilterType: "checkbox",
|
|
1168
1146
|
size: 120
|
|
1169
1147
|
}
|
|
1170
1148
|
),
|
|
1171
1149
|
/* @__PURE__ */ e.jsx(
|
|
1172
|
-
|
|
1150
|
+
y,
|
|
1173
1151
|
{
|
|
1174
1152
|
dataField: "accountLocked",
|
|
1175
1153
|
dataType: "boolean",
|
|
1176
|
-
header: `${
|
|
1154
|
+
header: `${o("archbase:Bloqueado?")}`,
|
|
1177
1155
|
inputFilterType: "checkbox",
|
|
1178
1156
|
size: 120
|
|
1179
1157
|
}
|
|
1180
1158
|
),
|
|
1181
1159
|
/* @__PURE__ */ e.jsx(
|
|
1182
|
-
|
|
1160
|
+
y,
|
|
1183
1161
|
{
|
|
1184
1162
|
dataField: "unlimitedAccessHours",
|
|
1185
1163
|
dataType: "boolean",
|
|
1186
|
-
header: `${
|
|
1164
|
+
header: `${o("archbase:Horário acesso ilimitado?")}`,
|
|
1187
1165
|
inputFilterType: "checkbox",
|
|
1188
1166
|
size: 140
|
|
1189
1167
|
}
|
|
1190
1168
|
)
|
|
1191
|
-
] }),
|
|
1169
|
+
] }), jr = /* @__PURE__ */ e.jsxs(me, { children: [
|
|
1192
1170
|
/* @__PURE__ */ e.jsx(
|
|
1193
|
-
|
|
1171
|
+
y,
|
|
1194
1172
|
{
|
|
1195
1173
|
dataField: "name",
|
|
1196
1174
|
dataType: "text",
|
|
1197
1175
|
size: 300,
|
|
1198
|
-
header: `${
|
|
1176
|
+
header: `${o("archbase:Nome do grupo")}`,
|
|
1199
1177
|
inputFilterType: "text"
|
|
1200
1178
|
}
|
|
1201
1179
|
),
|
|
1202
1180
|
/* @__PURE__ */ e.jsx(
|
|
1203
|
-
|
|
1181
|
+
y,
|
|
1204
1182
|
{
|
|
1205
1183
|
dataField: "description",
|
|
1206
1184
|
dataType: "text",
|
|
1207
|
-
header: `${
|
|
1185
|
+
header: `${o("archbase:Descrição")}`,
|
|
1208
1186
|
size: 800,
|
|
1209
1187
|
inputFilterType: "text"
|
|
1210
1188
|
}
|
|
1211
1189
|
)
|
|
1212
|
-
] }), yr = /* @__PURE__ */ e.jsxs(
|
|
1190
|
+
] }), yr = /* @__PURE__ */ e.jsxs(me, { children: [
|
|
1213
1191
|
/* @__PURE__ */ e.jsx(
|
|
1214
|
-
|
|
1192
|
+
y,
|
|
1215
1193
|
{
|
|
1216
1194
|
dataField: "name",
|
|
1217
1195
|
dataType: "text",
|
|
1218
1196
|
size: 300,
|
|
1219
|
-
header: `${
|
|
1197
|
+
header: `${o("archbase:Nome do perfil")}`,
|
|
1220
1198
|
inputFilterType: "text"
|
|
1221
1199
|
}
|
|
1222
1200
|
),
|
|
1223
1201
|
/* @__PURE__ */ e.jsx(
|
|
1224
|
-
|
|
1202
|
+
y,
|
|
1225
1203
|
{
|
|
1226
1204
|
dataField: "description",
|
|
1227
1205
|
dataType: "text",
|
|
1228
|
-
header: `${
|
|
1206
|
+
header: `${o("archbase:Descrição")}`,
|
|
1229
1207
|
size: 800,
|
|
1230
1208
|
inputFilterType: "text"
|
|
1231
1209
|
}
|
|
1232
1210
|
)
|
|
1233
|
-
] }), wr = /* @__PURE__ */ e.jsxs(
|
|
1211
|
+
] }), wr = /* @__PURE__ */ e.jsxs(me, { children: [
|
|
1234
1212
|
/* @__PURE__ */ e.jsx(
|
|
1235
|
-
|
|
1213
|
+
y,
|
|
1236
1214
|
{
|
|
1237
1215
|
dataField: "name",
|
|
1238
1216
|
dataType: "text",
|
|
1239
1217
|
size: 300,
|
|
1240
|
-
header: `${
|
|
1218
|
+
header: `${o("archbase:Nome do recurso")}`,
|
|
1241
1219
|
inputFilterType: "text"
|
|
1242
1220
|
}
|
|
1243
1221
|
),
|
|
1244
1222
|
/* @__PURE__ */ e.jsx(
|
|
1245
|
-
|
|
1223
|
+
y,
|
|
1246
1224
|
{
|
|
1247
1225
|
dataField: "description",
|
|
1248
1226
|
dataType: "text",
|
|
1249
|
-
header: `${
|
|
1227
|
+
header: `${o("archbase:Descrição")}`,
|
|
1250
1228
|
size: 800,
|
|
1251
1229
|
inputFilterType: "text"
|
|
1252
1230
|
}
|
|
1253
1231
|
)
|
|
1254
|
-
] }),
|
|
1255
|
-
const
|
|
1256
|
-
|
|
1257
|
-
}, vr = (
|
|
1258
|
-
|
|
1259
|
-
},
|
|
1260
|
-
|
|
1261
|
-
`${
|
|
1262
|
-
`${
|
|
1232
|
+
] }), Cr = () => {
|
|
1233
|
+
const a = na.newInstance();
|
|
1234
|
+
w || (a.id = void 0), j.insert(a), I(R.USER);
|
|
1235
|
+
}, vr = (a) => {
|
|
1236
|
+
j.isEmpty() || j.gotoRecordByData(a) && (j.edit(), I(R.USER));
|
|
1237
|
+
}, Sr = (a) => {
|
|
1238
|
+
j.isEmpty() || j.gotoRecordByData(a) && K.showConfirmDialogYesNo(
|
|
1239
|
+
`${o("archbase:Confirme")}`,
|
|
1240
|
+
`${o("archbase:Deseja remover o usuário ")}${a.name} ?`,
|
|
1263
1241
|
() => {
|
|
1264
|
-
|
|
1242
|
+
j.remove();
|
|
1265
1243
|
},
|
|
1266
1244
|
() => {
|
|
1267
1245
|
}
|
|
1268
1246
|
);
|
|
1269
|
-
}, Ar = (
|
|
1270
|
-
|
|
1271
|
-
}, Tr = (
|
|
1272
|
-
|
|
1273
|
-
/* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () =>
|
|
1274
|
-
/* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () =>
|
|
1275
|
-
/* @__PURE__ */ e.jsx(
|
|
1247
|
+
}, Ar = (a) => {
|
|
1248
|
+
j.isEmpty() || j.gotoRecordByData(a) && I(R.USER);
|
|
1249
|
+
}, Tr = (a) => /* @__PURE__ */ e.jsxs($, { gap: 1, wrap: "nowrap", children: [
|
|
1250
|
+
S?.beforeDefaultUserActions?.(a),
|
|
1251
|
+
/* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () => Ar(a), children: /* @__PURE__ */ e.jsx(Le, { size: 20, color: x === "dark" ? u.colors.blue[8] : u.colors.blue[4] }) }),
|
|
1252
|
+
/* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () => vr(a), children: /* @__PURE__ */ e.jsx(fe, { size: 20, color: x === "dark" ? u.colors.yellow[8] : u.colors.yellow[4] }) }),
|
|
1253
|
+
/* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () => Sr(a), children: /* @__PURE__ */ e.jsx(ve, { size: 20, color: x === "dark" ? u.colors.red[8] : u.colors.red[4] }) }),
|
|
1254
|
+
/* @__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(Ve, { size: 20, color: x === "dark" ? u.colors.green[8] : u.colors.green[4] }) }) }),
|
|
1255
|
+
S?.afterDefaultUserActions?.(a)
|
|
1276
1256
|
] }), kr = () => {
|
|
1277
|
-
const
|
|
1278
|
-
|
|
1279
|
-
}, Rr = (
|
|
1280
|
-
|
|
1281
|
-
}, Fr = (
|
|
1282
|
-
|
|
1283
|
-
`${
|
|
1284
|
-
`${
|
|
1257
|
+
const a = ia.newInstance();
|
|
1258
|
+
w || (a.id = void 0), V.insert(a), I(R.GROUP);
|
|
1259
|
+
}, Rr = (a) => {
|
|
1260
|
+
V.isEmpty() || V.gotoRecordByData(a) && (V.isEditing() || V.edit(), I(R.GROUP));
|
|
1261
|
+
}, Fr = (a) => {
|
|
1262
|
+
V.isEmpty() || V.gotoRecordByData(a) && K.showConfirmDialogYesNo(
|
|
1263
|
+
`${o("archbase:Confirme")}`,
|
|
1264
|
+
`${o("archbase:Deseja remover o grupo ")}${a.name} ?`,
|
|
1285
1265
|
() => {
|
|
1286
|
-
|
|
1266
|
+
V.remove();
|
|
1287
1267
|
},
|
|
1288
1268
|
() => {
|
|
1289
1269
|
}
|
|
1290
1270
|
);
|
|
1291
|
-
}, Ir = (
|
|
1292
|
-
|
|
1293
|
-
}, Dr = (
|
|
1294
|
-
|
|
1295
|
-
/* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () =>
|
|
1296
|
-
/* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () =>
|
|
1297
|
-
/* @__PURE__ */ e.jsx(
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
},
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1271
|
+
}, Ir = (a) => {
|
|
1272
|
+
V.isEmpty() || V.gotoRecordByData(a) && I(R.GROUP);
|
|
1273
|
+
}, Dr = (a) => /* @__PURE__ */ e.jsxs($, { gap: 1, wrap: "nowrap", children: [
|
|
1274
|
+
S?.beforeDefaultGroupActions?.(a),
|
|
1275
|
+
/* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () => Ir(a), children: /* @__PURE__ */ e.jsx(Le, { size: 20, color: x === "dark" ? u.colors.blue[8] : u.colors.blue[4] }) }),
|
|
1276
|
+
/* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () => Rr(a), children: /* @__PURE__ */ e.jsx(fe, { size: 20, color: x === "dark" ? u.colors.yellow[8] : u.colors.yellow[4] }) }),
|
|
1277
|
+
/* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () => Fr(a), children: /* @__PURE__ */ e.jsx(ve, { size: 20, color: x === "dark" ? u.colors.red[8] : u.colors.red[4] }) }),
|
|
1278
|
+
/* @__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(Ve, { size: 20, color: x === "dark" ? u.colors.green[8] : u.colors.green[4] }) }) }),
|
|
1279
|
+
S?.afterDefaultGroupActions?.(a)
|
|
1280
|
+
] }), ue = Kr(), Er = async () => {
|
|
1281
|
+
try {
|
|
1282
|
+
await j.save();
|
|
1283
|
+
} catch {
|
|
1284
|
+
return;
|
|
1285
|
+
}
|
|
1286
|
+
I(""), ue?.clearAll();
|
|
1304
1287
|
}, zr = () => {
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1288
|
+
I(""), j.isBrowsing() || j.cancel(), ue?.clearAll();
|
|
1289
|
+
}, Pr = async () => {
|
|
1290
|
+
try {
|
|
1291
|
+
await V.save();
|
|
1292
|
+
} catch {
|
|
1293
|
+
return;
|
|
1294
|
+
}
|
|
1295
|
+
I(""), ue?.clearAll();
|
|
1296
|
+
}, Gr = () => {
|
|
1297
|
+
I(""), V.isBrowsing() || V.cancel(), ue?.clearAll();
|
|
1298
|
+
}, $r = async () => {
|
|
1299
|
+
try {
|
|
1300
|
+
await O.save();
|
|
1301
|
+
} catch {
|
|
1302
|
+
return;
|
|
1303
|
+
}
|
|
1304
|
+
I(""), ue?.clearAll();
|
|
1305
|
+
}, Lr = () => {
|
|
1306
|
+
I(""), O.isBrowsing() || O.cancel(), ue?.clearAll();
|
|
1307
|
+
}, Vr = () => {
|
|
1308
|
+
const a = la.newInstance();
|
|
1309
|
+
w || (a.id = void 0), O.insert(a), I(R.PROFILE);
|
|
1310
|
+
}, Ur = (a) => {
|
|
1311
|
+
O.isEmpty() || O.gotoRecordByData(a) && (O.isEditing() || O.edit(), I(R.PROFILE));
|
|
1312
|
+
}, Mr = (a) => {
|
|
1313
|
+
O.isEmpty() || O.gotoRecordByData(a) && K.showConfirmDialogYesNo(
|
|
1314
|
+
`${o("archbase:Confirme")}`,
|
|
1315
|
+
`${o("archbase:Deseja remover o perfil ")}${a.name} ?`,
|
|
1313
1316
|
() => {
|
|
1314
|
-
|
|
1317
|
+
O.remove();
|
|
1315
1318
|
},
|
|
1316
1319
|
() => {
|
|
1317
1320
|
}
|
|
1318
1321
|
);
|
|
1319
|
-
},
|
|
1320
|
-
|
|
1321
|
-
},
|
|
1322
|
-
|
|
1323
|
-
/* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () =>
|
|
1324
|
-
/* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () =>
|
|
1325
|
-
/* @__PURE__ */ e.jsx(
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1322
|
+
}, Nr = (a) => {
|
|
1323
|
+
O.isEmpty() || O.gotoRecordByData(a) && I(R.PROFILE);
|
|
1324
|
+
}, Or = (a) => /* @__PURE__ */ e.jsxs($, { gap: 1, wrap: "nowrap", children: [
|
|
1325
|
+
S?.beforeDefaultProfileActions?.(a),
|
|
1326
|
+
/* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () => Nr(a), children: /* @__PURE__ */ e.jsx(Le, { size: 20, color: x === "dark" ? u.colors.blue[8] : u.colors.blue[4] }) }),
|
|
1327
|
+
/* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () => Ur(a), children: /* @__PURE__ */ e.jsx(fe, { size: 20, color: x === "dark" ? u.colors.yellow[8] : u.colors.yellow[4] }) }),
|
|
1328
|
+
/* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () => Mr(a), children: /* @__PURE__ */ e.jsx(ve, { size: 20, color: x === "dark" ? u.colors.red[8] : u.colors.red[4] }) }),
|
|
1329
|
+
/* @__PURE__ */ e.jsx(se, { withinPortal: !0, withArrow: !0, position: "left", label: `${o("archbase:Edit permissions")}`, children: /* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: He, children: /* @__PURE__ */ e.jsx(Ve, { size: 20, color: x === "dark" ? u.colors.green[8] : u.colors.green[4] }) }) }),
|
|
1330
|
+
S?.afterDefaultProfileActions?.(a)
|
|
1331
|
+
] }), Br = () => {
|
|
1332
|
+
const a = C.getCurrentRecord();
|
|
1333
|
+
a && K.showConfirmDialogYesNo(
|
|
1334
|
+
`${o("archbase:Confirme")}`,
|
|
1335
|
+
`${o("archbase:Deseja revogar o token de Acesso do usuário ")}${a.user.name} ?`,
|
|
1330
1336
|
async () => {
|
|
1331
|
-
await q.revoke(
|
|
1332
|
-
|
|
1333
|
-
`${
|
|
1334
|
-
`${
|
|
1335
|
-
),
|
|
1336
|
-
}).catch((
|
|
1337
|
-
|
|
1338
|
-
`${
|
|
1339
|
-
|
|
1340
|
-
|
|
1337
|
+
await q.revoke(a.token).then(async () => {
|
|
1338
|
+
Q.showSuccess(
|
|
1339
|
+
`${o("mentors:Informação")}`,
|
|
1340
|
+
`${o("mentors:Token de Acesso revogado com sucesso!")}`
|
|
1341
|
+
), C.refreshData();
|
|
1342
|
+
}).catch((z) => {
|
|
1343
|
+
K.showErrorWithDetails(
|
|
1344
|
+
`${o("mentors:Atenção")}`,
|
|
1345
|
+
Ae(z),
|
|
1346
|
+
Ee(z)
|
|
1341
1347
|
);
|
|
1342
1348
|
});
|
|
1343
1349
|
},
|
|
1344
1350
|
() => {
|
|
1345
1351
|
}
|
|
1346
1352
|
);
|
|
1353
|
+
}, We = () => {
|
|
1354
|
+
D(R.USER);
|
|
1355
|
+
}, qe = () => {
|
|
1356
|
+
D(R.GROUP);
|
|
1347
1357
|
}, He = () => {
|
|
1348
|
-
D(
|
|
1349
|
-
},
|
|
1350
|
-
D(F.GROUP);
|
|
1351
|
-
}, Ze = () => {
|
|
1352
|
-
D(F.PROFILE);
|
|
1353
|
-
}, Ge = () => {
|
|
1358
|
+
D(R.PROFILE);
|
|
1359
|
+
}, $e = () => {
|
|
1354
1360
|
D("");
|
|
1355
|
-
},
|
|
1356
|
-
/* @__PURE__ */ e.jsxs(
|
|
1357
|
-
/* @__PURE__ */ e.jsx(U, { color: "green", leftSection: /* @__PURE__ */ e.jsx(
|
|
1358
|
-
/* @__PURE__ */ e.jsx(U, { color: "blue", leftSection: /* @__PURE__ */ e.jsx(fe, {}), onClick:
|
|
1361
|
+
}, Wr = () => /* @__PURE__ */ e.jsxs(te, { justify: "space-between", style: { width: "50%" }, children: [
|
|
1362
|
+
/* @__PURE__ */ e.jsxs($, { align: "end", gap: "4px", wrap: "nowrap", children: [
|
|
1363
|
+
/* @__PURE__ */ e.jsx(U, { color: "green", leftSection: /* @__PURE__ */ e.jsx(ze, {}), onClick: Cr, children: `${o("archbase:New")}` }),
|
|
1364
|
+
/* @__PURE__ */ e.jsx(U, { color: "blue", leftSection: /* @__PURE__ */ e.jsx(fe, {}), onClick: We, children: `${o("archbase:Edit permissions")}` })
|
|
1359
1365
|
] }),
|
|
1360
|
-
/* @__PURE__ */ e.jsx(
|
|
1361
|
-
] }),
|
|
1362
|
-
/* @__PURE__ */ e.jsxs(
|
|
1363
|
-
/* @__PURE__ */ e.jsx(U, { color: "green", leftSection: /* @__PURE__ */ e.jsx(
|
|
1364
|
-
/* @__PURE__ */ e.jsx(U, { color: "blue", leftSection: /* @__PURE__ */ e.jsx(fe, {}), onClick:
|
|
1366
|
+
/* @__PURE__ */ e.jsx(te, { align: "flex-start", justify: "flex-end", style: { width: "200px" } })
|
|
1367
|
+
] }), qr = () => /* @__PURE__ */ e.jsxs(te, { justify: "space-between", style: { width: "50%" }, children: [
|
|
1368
|
+
/* @__PURE__ */ e.jsxs($, { align: "end", gap: "4px", wrap: "nowrap", children: [
|
|
1369
|
+
/* @__PURE__ */ e.jsx(U, { color: "green", leftSection: /* @__PURE__ */ e.jsx(ze, {}), onClick: kr, children: `${o("archbase:New")}` }),
|
|
1370
|
+
/* @__PURE__ */ e.jsx(U, { color: "blue", leftSection: /* @__PURE__ */ e.jsx(fe, {}), onClick: qe, children: `${o("archbase:Edit permissions")}` })
|
|
1365
1371
|
] }),
|
|
1366
|
-
/* @__PURE__ */ e.jsx(
|
|
1367
|
-
] }),
|
|
1368
|
-
/* @__PURE__ */ e.jsxs(
|
|
1369
|
-
/* @__PURE__ */ e.jsx(U, { color: "green", leftSection: /* @__PURE__ */ e.jsx(
|
|
1370
|
-
/* @__PURE__ */ e.jsx(U, { color: "blue", leftSection: /* @__PURE__ */ e.jsx(fe, {}), onClick:
|
|
1372
|
+
/* @__PURE__ */ e.jsx(te, { align: "flex-start", justify: "flex-end", style: { width: "200px" } })
|
|
1373
|
+
] }), Hr = () => /* @__PURE__ */ e.jsxs(te, { justify: "space-between", style: { width: "50%" }, children: [
|
|
1374
|
+
/* @__PURE__ */ e.jsxs($, { align: "end", gap: "4px", wrap: "nowrap", children: [
|
|
1375
|
+
/* @__PURE__ */ e.jsx(U, { color: "green", leftSection: /* @__PURE__ */ e.jsx(ze, {}), onClick: Vr, children: `${o("archbase:New")}` }),
|
|
1376
|
+
/* @__PURE__ */ e.jsx(U, { color: "blue", leftSection: /* @__PURE__ */ e.jsx(fe, {}), onClick: He, children: `${o("archbase:Edit permissions")}` })
|
|
1371
1377
|
] }),
|
|
1372
|
-
/* @__PURE__ */ e.jsx(
|
|
1373
|
-
] }),
|
|
1378
|
+
/* @__PURE__ */ e.jsx(te, { align: "flex-start", justify: "flex-end", style: { width: "200px" } })
|
|
1379
|
+
] }), Jr = () => /* @__PURE__ */ e.jsx(te, { justify: "space-between", style: { width: "50%" }, children: /* @__PURE__ */ e.jsx($, { align: "start", gap: "4px", wrap: "nowrap", children: /* @__PURE__ */ e.jsx(
|
|
1374
1380
|
U,
|
|
1375
1381
|
{
|
|
1376
|
-
disabled: !
|
|
1382
|
+
disabled: !C.getCurrentRecord(),
|
|
1377
1383
|
color: "red",
|
|
1378
|
-
leftSection: /* @__PURE__ */ e.jsx(
|
|
1379
|
-
onClick:
|
|
1380
|
-
children: `${
|
|
1384
|
+
leftSection: /* @__PURE__ */ e.jsx(ve, {}),
|
|
1385
|
+
onClick: Br,
|
|
1386
|
+
children: `${o("archbase:Revoke")}`
|
|
1381
1387
|
}
|
|
1382
1388
|
) }) });
|
|
1383
|
-
return /* @__PURE__ */ e.jsxs(
|
|
1384
|
-
/* @__PURE__ */ e.jsx(
|
|
1385
|
-
/* @__PURE__ */ e.jsx(
|
|
1386
|
-
/* @__PURE__ */ e.jsx(
|
|
1387
|
-
/* @__PURE__ */ e.jsx(
|
|
1388
|
-
/* @__PURE__ */ e.jsx(
|
|
1389
|
-
/* @__PURE__ */ e.jsx(
|
|
1389
|
+
return /* @__PURE__ */ e.jsxs(Y, { p: "md", style: { height: r, display: "flex", flexDirection: "column" }, children: [
|
|
1390
|
+
/* @__PURE__ */ e.jsx(ie, { variant: "pills", value: c, onChange: L, children: /* @__PURE__ */ e.jsxs(ie.List, { children: [
|
|
1391
|
+
/* @__PURE__ */ e.jsx(ie.Tab, { value: "users", children: `${o("Usuários")}` }),
|
|
1392
|
+
/* @__PURE__ */ e.jsx(ie.Tab, { value: "groups", children: `${o("Grupos")}` }),
|
|
1393
|
+
/* @__PURE__ */ e.jsx(ie.Tab, { value: "profiles", children: `${o("Perfis")}` }),
|
|
1394
|
+
/* @__PURE__ */ e.jsx(ie.Tab, { value: "resources", children: `${o("Recursos")}` }),
|
|
1395
|
+
/* @__PURE__ */ e.jsx(ie.Tab, { value: "accessTokens", children: `${o("Tokens Acesso")}` })
|
|
1390
1396
|
] }) }),
|
|
1391
1397
|
/* @__PURE__ */ e.jsx(
|
|
1392
|
-
|
|
1398
|
+
Y,
|
|
1393
1399
|
{
|
|
1394
1400
|
withBorder: !0,
|
|
1395
1401
|
mt: "md",
|
|
1396
1402
|
style: {
|
|
1397
|
-
height:
|
|
1398
|
-
display:
|
|
1403
|
+
height: ye,
|
|
1404
|
+
display: c === "users" ? "flex" : "none",
|
|
1399
1405
|
width: "100%",
|
|
1400
1406
|
flex: 1,
|
|
1401
1407
|
minHeight: 0,
|
|
1402
1408
|
overflow: "auto"
|
|
1403
1409
|
},
|
|
1404
1410
|
children: /* @__PURE__ */ e.jsx(
|
|
1405
|
-
|
|
1411
|
+
be,
|
|
1406
1412
|
{
|
|
1407
|
-
gridRef:
|
|
1413
|
+
gridRef: F,
|
|
1408
1414
|
printTitle: "Usuários",
|
|
1409
1415
|
width: "100%",
|
|
1410
1416
|
height: "100%",
|
|
1411
1417
|
withBorder: !1,
|
|
1412
|
-
dataSource:
|
|
1418
|
+
dataSource: j,
|
|
1413
1419
|
withColumnBorders: !0,
|
|
1414
1420
|
striped: !0,
|
|
1415
1421
|
enableTopToolbar: !0,
|
|
1416
1422
|
enableRowActions: !0,
|
|
1417
1423
|
pageSize: 50,
|
|
1418
|
-
isLoading:
|
|
1419
|
-
isError: !!
|
|
1420
|
-
error:
|
|
1424
|
+
isLoading: k,
|
|
1425
|
+
isError: !!v,
|
|
1426
|
+
error: v,
|
|
1421
1427
|
enableGlobalFilter: !0,
|
|
1422
|
-
getRowId:
|
|
1423
|
-
toolbarLeftContent:
|
|
1428
|
+
getRowId: ce,
|
|
1429
|
+
toolbarLeftContent: Wr(),
|
|
1424
1430
|
renderRowActions: Tr,
|
|
1425
|
-
|
|
1431
|
+
actionsColumnWidth: S?.userActionsColumnWidth,
|
|
1432
|
+
children: gr
|
|
1426
1433
|
}
|
|
1427
1434
|
)
|
|
1428
1435
|
}
|
|
1429
1436
|
),
|
|
1430
1437
|
/* @__PURE__ */ e.jsx(
|
|
1431
|
-
|
|
1438
|
+
Y,
|
|
1432
1439
|
{
|
|
1433
1440
|
withBorder: !0,
|
|
1434
1441
|
mt: "md",
|
|
1435
1442
|
style: {
|
|
1436
|
-
height:
|
|
1437
|
-
display:
|
|
1443
|
+
height: ye,
|
|
1444
|
+
display: c === "groups" ? "flex" : "none",
|
|
1438
1445
|
flex: 1,
|
|
1439
1446
|
minHeight: 0,
|
|
1440
1447
|
overflow: "auto"
|
|
1441
1448
|
},
|
|
1442
1449
|
children: /* @__PURE__ */ e.jsx(
|
|
1443
|
-
|
|
1450
|
+
be,
|
|
1444
1451
|
{
|
|
1445
|
-
gridRef:
|
|
1452
|
+
gridRef: W,
|
|
1446
1453
|
printTitle: "Grupos",
|
|
1447
1454
|
width: "100%",
|
|
1448
1455
|
height: "100%",
|
|
1449
1456
|
withBorder: !1,
|
|
1450
|
-
dataSource:
|
|
1457
|
+
dataSource: V,
|
|
1451
1458
|
withColumnBorders: !0,
|
|
1452
1459
|
striped: !1,
|
|
1453
1460
|
enableTopToolbar: !0,
|
|
1454
1461
|
enableRowActions: !0,
|
|
1455
1462
|
pageSize: 50,
|
|
1456
|
-
isLoading:
|
|
1457
|
-
isError: !!
|
|
1458
|
-
error:
|
|
1463
|
+
isLoading: Ge,
|
|
1464
|
+
isError: !!v,
|
|
1465
|
+
error: v,
|
|
1459
1466
|
enableGlobalFilter: !0,
|
|
1460
|
-
getRowId:
|
|
1467
|
+
getRowId: ne,
|
|
1461
1468
|
renderRowActions: Dr,
|
|
1462
|
-
|
|
1463
|
-
|
|
1469
|
+
actionsColumnWidth: S?.groupActionsColumnWidth,
|
|
1470
|
+
children: jr,
|
|
1471
|
+
toolbarLeftContent: qr()
|
|
1464
1472
|
}
|
|
1465
1473
|
)
|
|
1466
1474
|
}
|
|
1467
1475
|
),
|
|
1468
1476
|
/* @__PURE__ */ e.jsx(
|
|
1469
|
-
|
|
1477
|
+
Y,
|
|
1470
1478
|
{
|
|
1471
1479
|
withBorder: !0,
|
|
1472
1480
|
mt: "md",
|
|
1473
1481
|
style: {
|
|
1474
|
-
height:
|
|
1475
|
-
display:
|
|
1482
|
+
height: ye,
|
|
1483
|
+
display: c === "profiles" ? "flex" : "none",
|
|
1476
1484
|
flex: 1,
|
|
1477
1485
|
minHeight: 0,
|
|
1478
1486
|
overflow: "auto"
|
|
1479
1487
|
},
|
|
1480
1488
|
children: /* @__PURE__ */ e.jsx(
|
|
1481
|
-
|
|
1489
|
+
be,
|
|
1482
1490
|
{
|
|
1483
|
-
gridRef:
|
|
1491
|
+
gridRef: p,
|
|
1484
1492
|
printTitle: "Perfis",
|
|
1485
1493
|
width: "100%",
|
|
1486
1494
|
height: "100%",
|
|
1487
1495
|
withBorder: !1,
|
|
1488
|
-
dataSource:
|
|
1496
|
+
dataSource: O,
|
|
1489
1497
|
withColumnBorders: !0,
|
|
1490
1498
|
striped: !1,
|
|
1491
1499
|
enableTopToolbar: !0,
|
|
1492
1500
|
enableRowActions: !0,
|
|
1493
1501
|
pageSize: 50,
|
|
1494
|
-
isLoading:
|
|
1495
|
-
isError: !!
|
|
1496
|
-
error:
|
|
1502
|
+
isLoading: hr,
|
|
1503
|
+
isError: !!v,
|
|
1504
|
+
error: v,
|
|
1497
1505
|
enableGlobalFilter: !0,
|
|
1498
|
-
getRowId:
|
|
1499
|
-
toolbarLeftContent:
|
|
1500
|
-
renderRowActions:
|
|
1506
|
+
getRowId: s,
|
|
1507
|
+
toolbarLeftContent: Hr(),
|
|
1508
|
+
renderRowActions: Or,
|
|
1509
|
+
actionsColumnWidth: S?.profileActionsColumnWidth,
|
|
1501
1510
|
children: yr
|
|
1502
1511
|
}
|
|
1503
1512
|
)
|
|
1504
1513
|
}
|
|
1505
1514
|
),
|
|
1506
1515
|
/* @__PURE__ */ e.jsx(
|
|
1507
|
-
|
|
1516
|
+
Y,
|
|
1508
1517
|
{
|
|
1509
1518
|
withBorder: !0,
|
|
1510
1519
|
mt: "md",
|
|
1511
1520
|
style: {
|
|
1512
|
-
height:
|
|
1513
|
-
display:
|
|
1521
|
+
height: ye,
|
|
1522
|
+
display: c === "resources" ? "flex" : "none",
|
|
1514
1523
|
flex: 1,
|
|
1515
1524
|
minHeight: 0,
|
|
1516
1525
|
overflow: "auto"
|
|
1517
1526
|
},
|
|
1518
1527
|
children: /* @__PURE__ */ e.jsx(
|
|
1519
|
-
|
|
1528
|
+
be,
|
|
1520
1529
|
{
|
|
1521
|
-
gridRef:
|
|
1530
|
+
gridRef: g,
|
|
1522
1531
|
printTitle: "Recursos",
|
|
1523
1532
|
width: "100%",
|
|
1524
1533
|
height: "100%",
|
|
1525
1534
|
withBorder: !1,
|
|
1526
|
-
dataSource:
|
|
1535
|
+
dataSource: xr,
|
|
1527
1536
|
withColumnBorders: !0,
|
|
1528
1537
|
striped: !1,
|
|
1529
1538
|
enableTopToolbar: !0,
|
|
1530
1539
|
enableRowActions: !1,
|
|
1531
1540
|
pageSize: 50,
|
|
1532
1541
|
isLoading: fr,
|
|
1533
|
-
isError: !!
|
|
1534
|
-
error:
|
|
1542
|
+
isError: !!v,
|
|
1543
|
+
error: v,
|
|
1535
1544
|
enableGlobalFilter: !0,
|
|
1536
|
-
getRowId:
|
|
1545
|
+
getRowId: n,
|
|
1537
1546
|
children: wr
|
|
1538
1547
|
}
|
|
1539
1548
|
)
|
|
1540
1549
|
}
|
|
1541
1550
|
),
|
|
1542
1551
|
/* @__PURE__ */ e.jsx(
|
|
1543
|
-
|
|
1552
|
+
Y,
|
|
1544
1553
|
{
|
|
1545
1554
|
withBorder: !0,
|
|
1546
1555
|
mt: "md",
|
|
1547
1556
|
style: {
|
|
1548
|
-
height:
|
|
1549
|
-
display:
|
|
1557
|
+
height: ye,
|
|
1558
|
+
display: c === "accessTokens" ? "flex" : "none",
|
|
1550
1559
|
width: "100%",
|
|
1551
1560
|
flex: 1,
|
|
1552
1561
|
minHeight: 0,
|
|
1553
1562
|
overflow: "auto"
|
|
1554
1563
|
},
|
|
1555
1564
|
children: /* @__PURE__ */ e.jsx(
|
|
1556
|
-
|
|
1565
|
+
be,
|
|
1557
1566
|
{
|
|
1558
|
-
gridRef:
|
|
1567
|
+
gridRef: m,
|
|
1559
1568
|
printTitle: "Tokens de API",
|
|
1560
1569
|
width: "100%",
|
|
1561
1570
|
height: "100%",
|
|
1562
1571
|
withBorder: !1,
|
|
1563
|
-
dataSource:
|
|
1572
|
+
dataSource: C,
|
|
1564
1573
|
withColumnBorders: !0,
|
|
1565
1574
|
striped: !0,
|
|
1566
1575
|
enableTopToolbar: !0,
|
|
1567
1576
|
enableRowActions: !1,
|
|
1568
1577
|
pageSize: 50,
|
|
1569
|
-
isLoading:
|
|
1570
|
-
isError: !!
|
|
1571
|
-
error:
|
|
1578
|
+
isLoading: E,
|
|
1579
|
+
isError: !!v,
|
|
1580
|
+
error: v,
|
|
1572
1581
|
enableGlobalFilter: !0,
|
|
1573
|
-
getRowId:
|
|
1574
|
-
toolbarLeftContent:
|
|
1582
|
+
getRowId: G,
|
|
1583
|
+
toolbarLeftContent: Jr(),
|
|
1575
1584
|
children: br
|
|
1576
1585
|
}
|
|
1577
1586
|
)
|
|
1578
1587
|
}
|
|
1579
1588
|
),
|
|
1580
|
-
|
|
1581
|
-
|
|
1589
|
+
Z === R.USER ? /* @__PURE__ */ e.jsx(
|
|
1590
|
+
wa,
|
|
1582
1591
|
{
|
|
1583
|
-
onClickOk:
|
|
1592
|
+
onClickOk: Er,
|
|
1584
1593
|
opened: !0,
|
|
1585
|
-
dataSource:
|
|
1586
|
-
onClickCancel:
|
|
1587
|
-
options:
|
|
1594
|
+
dataSource: j,
|
|
1595
|
+
onClickCancel: zr,
|
|
1596
|
+
options: d
|
|
1588
1597
|
}
|
|
1589
1598
|
) : null,
|
|
1590
|
-
|
|
1591
|
-
|
|
1599
|
+
Z === R.GROUP ? /* @__PURE__ */ e.jsx(
|
|
1600
|
+
Ca,
|
|
1592
1601
|
{
|
|
1593
|
-
onClickOk:
|
|
1602
|
+
onClickOk: Pr,
|
|
1594
1603
|
opened: !0,
|
|
1595
|
-
dataSource:
|
|
1596
|
-
onClickCancel:
|
|
1597
|
-
options:
|
|
1604
|
+
dataSource: V,
|
|
1605
|
+
onClickCancel: Gr,
|
|
1606
|
+
options: f
|
|
1598
1607
|
}
|
|
1599
1608
|
) : null,
|
|
1600
|
-
|
|
1601
|
-
|
|
1609
|
+
Z === R.PROFILE ? /* @__PURE__ */ e.jsx(
|
|
1610
|
+
ba,
|
|
1602
1611
|
{
|
|
1603
|
-
onClickOk:
|
|
1612
|
+
onClickOk: $r,
|
|
1604
1613
|
opened: !0,
|
|
1605
|
-
dataSource:
|
|
1606
|
-
onClickCancel:
|
|
1607
|
-
options:
|
|
1614
|
+
dataSource: O,
|
|
1615
|
+
onClickCancel: Lr,
|
|
1616
|
+
options: l
|
|
1608
1617
|
}
|
|
1609
1618
|
) : null,
|
|
1610
|
-
N ===
|
|
1619
|
+
N === R.USER ? /* @__PURE__ */ e.jsx(
|
|
1611
1620
|
Me,
|
|
1612
1621
|
{
|
|
1613
|
-
dataSource:
|
|
1622
|
+
dataSource: j,
|
|
1614
1623
|
opened: !!N,
|
|
1615
|
-
close:
|
|
1624
|
+
close: $e
|
|
1616
1625
|
}
|
|
1617
1626
|
) : null,
|
|
1618
|
-
N ===
|
|
1627
|
+
N === R.GROUP ? /* @__PURE__ */ e.jsx(
|
|
1619
1628
|
Me,
|
|
1620
1629
|
{
|
|
1621
|
-
dataSource:
|
|
1630
|
+
dataSource: V,
|
|
1622
1631
|
opened: !!N,
|
|
1623
|
-
close:
|
|
1632
|
+
close: $e
|
|
1624
1633
|
}
|
|
1625
1634
|
) : null,
|
|
1626
|
-
N ===
|
|
1635
|
+
N === R.PROFILE ? /* @__PURE__ */ e.jsx(
|
|
1627
1636
|
Me,
|
|
1628
1637
|
{
|
|
1629
|
-
dataSource:
|
|
1638
|
+
dataSource: O,
|
|
1630
1639
|
opened: !!N,
|
|
1631
|
-
close:
|
|
1640
|
+
close: $e
|
|
1632
1641
|
}
|
|
1633
1642
|
) : null
|
|
1634
1643
|
] });
|
|
1635
1644
|
}
|
|
1636
|
-
function
|
|
1637
|
-
|
|
1638
|
-
const
|
|
1645
|
+
function Va({ height: r = "400px", width: h = "100%" }) {
|
|
1646
|
+
ir();
|
|
1647
|
+
const w = lr("apiTokenStore"), d = { validateEntity: () => [] }, { colorScheme: l } = Be(), [f, S] = M(void 0), u = _(X.ApiToken), [P, x] = M(""), v = je(null), i = (F) => F.id, { dataSource: c } = oa({
|
|
1639
1648
|
initialData: [],
|
|
1640
1649
|
name: "dataSource"
|
|
1641
|
-
}),
|
|
1650
|
+
}), L = ke(
|
|
1642
1651
|
"ArchbaseApiTokenView-LocalDataSource",
|
|
1643
|
-
|
|
1652
|
+
c,
|
|
1644
1653
|
void 0,
|
|
1645
1654
|
void 0
|
|
1646
|
-
), { dataSource:
|
|
1655
|
+
), { dataSource: b, isLoading: re } = Ne({
|
|
1647
1656
|
name: "dsApiToken",
|
|
1648
|
-
service:
|
|
1649
|
-
store:
|
|
1650
|
-
validator:
|
|
1657
|
+
service: u,
|
|
1658
|
+
store: w,
|
|
1659
|
+
validator: d,
|
|
1651
1660
|
pageSize: 25,
|
|
1652
1661
|
loadOnStart: !0,
|
|
1653
|
-
onLoadComplete: (
|
|
1662
|
+
onLoadComplete: (F) => {
|
|
1654
1663
|
},
|
|
1655
|
-
onDestroy: (
|
|
1664
|
+
onDestroy: (F) => {
|
|
1656
1665
|
},
|
|
1657
|
-
onError: (
|
|
1658
|
-
|
|
1666
|
+
onError: (F, W) => {
|
|
1667
|
+
S(F), Q.showError(t().t("archbase:WARNING"), F, W);
|
|
1659
1668
|
}
|
|
1660
|
-
}), J =
|
|
1669
|
+
}), J = ke(
|
|
1661
1670
|
"ArchbaseApiTokenView-RemoteDataSource",
|
|
1662
|
-
|
|
1671
|
+
b,
|
|
1663
1672
|
void 0,
|
|
1664
1673
|
void 0
|
|
1665
|
-
), ae = `calc(${r} - 40px)`,
|
|
1674
|
+
), ae = `calc(${r} - 40px)`, Z = /* @__PURE__ */ e.jsxs(me, { children: [
|
|
1666
1675
|
/* @__PURE__ */ e.jsx(
|
|
1667
|
-
|
|
1676
|
+
y,
|
|
1668
1677
|
{
|
|
1669
1678
|
dataField: "user.avatar",
|
|
1670
1679
|
dataType: "image",
|
|
1671
1680
|
size: 80,
|
|
1672
1681
|
header: "Foto",
|
|
1673
|
-
render: (
|
|
1682
|
+
render: (F) => /* @__PURE__ */ e.jsx(
|
|
1674
1683
|
"img",
|
|
1675
1684
|
{
|
|
1676
1685
|
style: { borderRadius: 50, height: "32px", maxHeight: "32px" },
|
|
1677
|
-
src:
|
|
1686
|
+
src: F.row.user && F.row.user.avatar ? atob(F.row.user.avatar) : Oe
|
|
1678
1687
|
}
|
|
1679
1688
|
),
|
|
1680
1689
|
inputFilterType: "text",
|
|
@@ -1682,7 +1691,7 @@ function It({ height: r = "400px", width: c = "100%" }) {
|
|
|
1682
1691
|
}
|
|
1683
1692
|
),
|
|
1684
1693
|
/* @__PURE__ */ e.jsx(
|
|
1685
|
-
|
|
1694
|
+
y,
|
|
1686
1695
|
{
|
|
1687
1696
|
dataField: "user.userName",
|
|
1688
1697
|
dataType: "text",
|
|
@@ -1692,7 +1701,7 @@ function It({ height: r = "400px", width: c = "100%" }) {
|
|
|
1692
1701
|
}
|
|
1693
1702
|
),
|
|
1694
1703
|
/* @__PURE__ */ e.jsx(
|
|
1695
|
-
|
|
1704
|
+
y,
|
|
1696
1705
|
{
|
|
1697
1706
|
dataField: "user.email",
|
|
1698
1707
|
dataType: "text",
|
|
@@ -1702,7 +1711,7 @@ function It({ height: r = "400px", width: c = "100%" }) {
|
|
|
1702
1711
|
}
|
|
1703
1712
|
),
|
|
1704
1713
|
/* @__PURE__ */ e.jsx(
|
|
1705
|
-
|
|
1714
|
+
y,
|
|
1706
1715
|
{
|
|
1707
1716
|
dataField: "token",
|
|
1708
1717
|
dataType: "text",
|
|
@@ -1713,7 +1722,7 @@ function It({ height: r = "400px", width: c = "100%" }) {
|
|
|
1713
1722
|
}
|
|
1714
1723
|
),
|
|
1715
1724
|
/* @__PURE__ */ e.jsx(
|
|
1716
|
-
|
|
1725
|
+
y,
|
|
1717
1726
|
{
|
|
1718
1727
|
dataField: "tenantId",
|
|
1719
1728
|
dataType: "text",
|
|
@@ -1724,41 +1733,41 @@ function It({ height: r = "400px", width: c = "100%" }) {
|
|
|
1724
1733
|
}
|
|
1725
1734
|
),
|
|
1726
1735
|
/* @__PURE__ */ e.jsx(
|
|
1727
|
-
|
|
1736
|
+
y,
|
|
1728
1737
|
{
|
|
1729
1738
|
dataField: "expirationDate",
|
|
1730
1739
|
dataType: "text",
|
|
1731
1740
|
size: 180,
|
|
1732
1741
|
header: "Validade",
|
|
1733
|
-
render: (
|
|
1734
|
-
if (!
|
|
1742
|
+
render: (F) => {
|
|
1743
|
+
if (!F.row.expirationDate)
|
|
1735
1744
|
return /* @__PURE__ */ e.jsx(H, { c: "dimmed", children: "Sem expiração" });
|
|
1736
|
-
const
|
|
1737
|
-
|
|
1738
|
-
const
|
|
1739
|
-
|
|
1740
|
-
const
|
|
1741
|
-
let
|
|
1742
|
-
m < 0 ? (
|
|
1743
|
-
const
|
|
1744
|
-
return /* @__PURE__ */ e.jsx(
|
|
1745
|
+
const W = /* @__PURE__ */ new Date();
|
|
1746
|
+
W.setHours(0, 0, 0, 0);
|
|
1747
|
+
const p = new Date(F.row.expirationDate);
|
|
1748
|
+
p.setHours(0, 0, 0, 0);
|
|
1749
|
+
const g = p.getTime() - W.getTime(), m = Math.ceil(g / (1e3 * 60 * 60 * 24));
|
|
1750
|
+
let ne = Math.max(0, Math.min(100, m / 365 * 100)), s = "green", n = "";
|
|
1751
|
+
m < 0 ? (s = "red", ne = 100, n = `Vencido há ${Math.abs(m)} dia${Math.abs(m) !== 1 ? "s" : ""}`) : m === 0 ? (s = "red", ne = 5, n = "Vence hoje") : m <= 7 ? (s = "red", n = `${m} dia${m !== 1 ? "s" : ""}`) : m <= 30 ? (s = "orange", n = `${m} dias`) : m <= 90 ? (s = "yellow", n = `${m} dias`) : (s = "green", n = `${m} dias`);
|
|
1752
|
+
const G = m < 0 ? `Vencido em ${p.toLocaleDateString()}` : `Expira em ${p.toLocaleDateString()}`;
|
|
1753
|
+
return /* @__PURE__ */ e.jsx(se, { label: G, withArrow: !0, children: /* @__PURE__ */ e.jsxs($, { gap: "xs", wrap: "nowrap", children: [
|
|
1745
1754
|
/* @__PURE__ */ e.jsx(
|
|
1746
|
-
|
|
1755
|
+
Zr,
|
|
1747
1756
|
{
|
|
1748
1757
|
size: 36,
|
|
1749
1758
|
thickness: 4,
|
|
1750
1759
|
roundCaps: !0,
|
|
1751
|
-
sections: [{ value: m < 0 ? 100 :
|
|
1760
|
+
sections: [{ value: m < 0 ? 100 : ne, color: s }]
|
|
1752
1761
|
}
|
|
1753
1762
|
),
|
|
1754
|
-
/* @__PURE__ */ e.jsx(H, { size: "sm", c: m < 0 ? "red" : void 0, fw: m <= 7 ? 600 : void 0, children:
|
|
1763
|
+
/* @__PURE__ */ e.jsx(H, { size: "sm", c: m < 0 ? "red" : void 0, fw: m <= 7 ? 600 : void 0, children: n })
|
|
1755
1764
|
] }) });
|
|
1756
1765
|
},
|
|
1757
1766
|
inputFilterType: "text"
|
|
1758
1767
|
}
|
|
1759
1768
|
),
|
|
1760
1769
|
/* @__PURE__ */ e.jsx(
|
|
1761
|
-
|
|
1770
|
+
y,
|
|
1762
1771
|
{
|
|
1763
1772
|
dataField: "activated",
|
|
1764
1773
|
dataType: "boolean",
|
|
@@ -1767,7 +1776,7 @@ function It({ height: r = "400px", width: c = "100%" }) {
|
|
|
1767
1776
|
}
|
|
1768
1777
|
),
|
|
1769
1778
|
/* @__PURE__ */ e.jsx(
|
|
1770
|
-
|
|
1779
|
+
y,
|
|
1771
1780
|
{
|
|
1772
1781
|
dataField: "revoked",
|
|
1773
1782
|
dataType: "boolean",
|
|
@@ -1775,23 +1784,23 @@ function It({ height: r = "400px", width: c = "100%" }) {
|
|
|
1775
1784
|
inputFilterType: "checkbox"
|
|
1776
1785
|
}
|
|
1777
1786
|
)
|
|
1778
|
-
] }),
|
|
1779
|
-
|
|
1787
|
+
] }), I = () => {
|
|
1788
|
+
c.insert(ca.newInstance()), c && !L.isDataSourceV2 && L.v1State.forceUpdate(), x("apiToken");
|
|
1780
1789
|
}, N = () => {
|
|
1781
|
-
|
|
1782
|
-
`${
|
|
1783
|
-
`${
|
|
1790
|
+
b.getCurrentRecord() && K.showConfirmDialogYesNo(
|
|
1791
|
+
`${t().t("archbase:Confirme")}`,
|
|
1792
|
+
`${t().t("archbase:Deseja revogar o token de API do usuário ")}${b.getCurrentRecord().user.name} ?`,
|
|
1784
1793
|
async () => {
|
|
1785
|
-
await
|
|
1786
|
-
|
|
1787
|
-
`${
|
|
1788
|
-
`${
|
|
1789
|
-
),
|
|
1790
|
-
}).catch((
|
|
1791
|
-
|
|
1792
|
-
`${
|
|
1793
|
-
|
|
1794
|
-
|
|
1794
|
+
await u.revoke(b.getCurrentRecord().token).then(async () => {
|
|
1795
|
+
Q.showSuccess(
|
|
1796
|
+
`${t().t("mentors:Informação")}`,
|
|
1797
|
+
`${t().t("mentors:Token de API revogado com sucesso!")}`
|
|
1798
|
+
), b.refreshData(), b && !J.isDataSourceV2 && J.v1State.forceUpdate();
|
|
1799
|
+
}).catch((F) => {
|
|
1800
|
+
K.showErrorWithDetails(
|
|
1801
|
+
`${t().t("mentors:Atenção")}`,
|
|
1802
|
+
Ae(F),
|
|
1803
|
+
Ee(F)
|
|
1795
1804
|
);
|
|
1796
1805
|
});
|
|
1797
1806
|
},
|
|
@@ -1799,45 +1808,45 @@ function It({ height: r = "400px", width: c = "100%" }) {
|
|
|
1799
1808
|
}
|
|
1800
1809
|
);
|
|
1801
1810
|
}, D = () => {
|
|
1802
|
-
|
|
1803
|
-
}, q = async (
|
|
1804
|
-
const
|
|
1805
|
-
if (
|
|
1811
|
+
x("");
|
|
1812
|
+
}, q = async (F, W) => {
|
|
1813
|
+
const p = c.getCurrentRecord();
|
|
1814
|
+
if (p)
|
|
1806
1815
|
try {
|
|
1807
|
-
if (
|
|
1808
|
-
|
|
1809
|
-
`${
|
|
1810
|
-
`${
|
|
1816
|
+
if (c.validate(), !p.user || !p.user.email) {
|
|
1817
|
+
K.showErrorWithDetails(
|
|
1818
|
+
`${t().t("archbase:WARNING")}`,
|
|
1819
|
+
`${t().t("archbase:Selecione um usuário para o token de API")}`,
|
|
1811
1820
|
""
|
|
1812
1821
|
);
|
|
1813
1822
|
return;
|
|
1814
1823
|
}
|
|
1815
|
-
await
|
|
1816
|
-
|
|
1817
|
-
`${
|
|
1818
|
-
`${
|
|
1819
|
-
),
|
|
1820
|
-
}).catch((
|
|
1821
|
-
|
|
1822
|
-
`${
|
|
1823
|
-
|
|
1824
|
-
|
|
1824
|
+
await u.create(p.user.email, p.expirationDate, p.name, p.description).then(async (g) => {
|
|
1825
|
+
c.cancel(), c && !L.isDataSourceV2 && L.v1State.forceUpdate(), b.append(g), b && !J.isDataSourceV2 && J.v1State.forceUpdate(), Q.showSuccess(
|
|
1826
|
+
`${t().t("mentors:Informação")}`,
|
|
1827
|
+
`${t().t("mentors:Token de API gerado com sucesso!")}`
|
|
1828
|
+
), W && W(!0);
|
|
1829
|
+
}).catch((g) => {
|
|
1830
|
+
K.showErrorWithDetails(
|
|
1831
|
+
`${t().t("mentors:Atenção")}`,
|
|
1832
|
+
Ae(g),
|
|
1833
|
+
Ee(g)
|
|
1825
1834
|
);
|
|
1826
1835
|
});
|
|
1827
|
-
} catch (
|
|
1828
|
-
|
|
1829
|
-
`${
|
|
1830
|
-
|
|
1831
|
-
|
|
1836
|
+
} catch (g) {
|
|
1837
|
+
K.showErrorWithDetails(
|
|
1838
|
+
`${t().t("mentors:Atenção")}`,
|
|
1839
|
+
Ae(g),
|
|
1840
|
+
Ee(g)
|
|
1832
1841
|
);
|
|
1833
1842
|
}
|
|
1834
|
-
},
|
|
1835
|
-
/* @__PURE__ */ e.jsx(U, { color: "green", leftSection: /* @__PURE__ */ e.jsx(
|
|
1836
|
-
/* @__PURE__ */ e.jsx(U, { disabled: !
|
|
1843
|
+
}, o = () => /* @__PURE__ */ e.jsx(te, { justify: "space-between", style: { width: "50%" }, children: /* @__PURE__ */ e.jsxs($, { align: "start", gap: "2px", wrap: "nowrap", children: [
|
|
1844
|
+
/* @__PURE__ */ e.jsx(U, { color: "green", leftSection: /* @__PURE__ */ e.jsx(ze, {}), onClick: I, children: t().t("archbase:New") }),
|
|
1845
|
+
/* @__PURE__ */ e.jsx(U, { disabled: !b.getCurrentRecord(), color: "red", leftSection: /* @__PURE__ */ e.jsx(ve, {}), onClick: N, children: t().t("archbase:Revoke") })
|
|
1837
1846
|
] }) });
|
|
1838
|
-
return /* @__PURE__ */ e.jsxs(
|
|
1847
|
+
return /* @__PURE__ */ e.jsxs(Y, { p: "md", style: { height: r, display: "flex", flexDirection: "column" }, children: [
|
|
1839
1848
|
/* @__PURE__ */ e.jsx(
|
|
1840
|
-
|
|
1849
|
+
Y,
|
|
1841
1850
|
{
|
|
1842
1851
|
withBorder: !0,
|
|
1843
1852
|
style: {
|
|
@@ -1849,36 +1858,36 @@ function It({ height: r = "400px", width: c = "100%" }) {
|
|
|
1849
1858
|
overflow: "auto"
|
|
1850
1859
|
},
|
|
1851
1860
|
children: /* @__PURE__ */ e.jsx(
|
|
1852
|
-
|
|
1861
|
+
be,
|
|
1853
1862
|
{
|
|
1854
|
-
gridRef:
|
|
1863
|
+
gridRef: v,
|
|
1855
1864
|
printTitle: "Tokens de API",
|
|
1856
1865
|
width: "100%",
|
|
1857
1866
|
height: "100%",
|
|
1858
1867
|
withBorder: !1,
|
|
1859
|
-
dataSource:
|
|
1868
|
+
dataSource: b,
|
|
1860
1869
|
withColumnBorders: !0,
|
|
1861
1870
|
striped: !0,
|
|
1862
1871
|
enableTopToolbar: !0,
|
|
1863
1872
|
enableRowActions: !1,
|
|
1864
1873
|
pageSize: 50,
|
|
1865
|
-
isLoading:
|
|
1866
|
-
isError: !!
|
|
1867
|
-
error:
|
|
1874
|
+
isLoading: re,
|
|
1875
|
+
isError: !!f,
|
|
1876
|
+
error: f,
|
|
1868
1877
|
enableGlobalFilter: !0,
|
|
1869
|
-
getRowId:
|
|
1870
|
-
toolbarLeftContent:
|
|
1871
|
-
children:
|
|
1878
|
+
getRowId: i,
|
|
1879
|
+
toolbarLeftContent: o(),
|
|
1880
|
+
children: Z
|
|
1872
1881
|
}
|
|
1873
1882
|
)
|
|
1874
1883
|
}
|
|
1875
1884
|
),
|
|
1876
|
-
|
|
1877
|
-
|
|
1885
|
+
P === "apiToken" ? /* @__PURE__ */ e.jsx(
|
|
1886
|
+
Sa,
|
|
1878
1887
|
{
|
|
1879
1888
|
onClickOk: D,
|
|
1880
1889
|
opened: !0,
|
|
1881
|
-
dataSource:
|
|
1890
|
+
dataSource: c,
|
|
1882
1891
|
onCustomSave: q,
|
|
1883
1892
|
onClickCancel: D
|
|
1884
1893
|
}
|
|
@@ -1886,14 +1895,14 @@ function It({ height: r = "400px", width: c = "100%" }) {
|
|
|
1886
1895
|
] });
|
|
1887
1896
|
}
|
|
1888
1897
|
export {
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1898
|
+
Sa as ApiTokenModal,
|
|
1899
|
+
Va as ArchbaseApiTokenView,
|
|
1900
|
+
ga as ArchbaseDualListSelector,
|
|
1901
|
+
La as ArchbaseSecurityView,
|
|
1902
|
+
Ca as GroupModal,
|
|
1894
1903
|
Me as PermissionsSelectorModal,
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1904
|
+
ba as ProfileModal,
|
|
1905
|
+
ja as RenderProfileUserItem,
|
|
1906
|
+
wa as UserModal
|
|
1898
1907
|
};
|
|
1899
1908
|
//# sourceMappingURL=index.js.map
|