@feedmepos/mf-hrm-portal 1.1.3-dev.4 → 1.1.3-dev.7
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/{AuditLogList-BeigpKv1.js → AuditLogList-n6xAYZGv.js} +127 -139
- package/dist/EmployeeList-D9rLxXo5.js +626 -0
- package/dist/{Main-iC9TGp41.js → Main-BCa8A1rV.js} +5 -5
- package/dist/{Main-DWnVJGpe.js → Main-zQF3GD9j.js} +10 -9
- package/dist/PermissionSetList-EsoA_anf.js +338 -0
- package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DqWrIJPe.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BA1LS-wd.js} +454 -447
- package/dist/RoleList-Cfv9wKaN.js +494 -0
- package/dist/TeamMemberList-HkvCqzPj.js +945 -0
- package/dist/{TimesheetList-C4_i17S7.js → TimesheetList-B0e-Muws.js} +25 -24
- package/dist/api/index.d.ts +1 -0
- package/dist/api/report-query/index.d.ts +5 -0
- package/dist/{app-BRpUSeEf.js → app-DKSPx49S.js} +1449 -867
- package/dist/app.js +1 -1
- package/dist/composables/useReportPermissions.d.ts +14 -0
- package/dist/{dayjs.min-Dfq8fN9X.js → dayjs.min-DZJQ_JpV.js} +1 -1
- package/dist/employee-DKRqMph9.js +144 -0
- package/dist/helpers/permission-set.d.ts +22 -0
- package/dist/helpers/rule.d.ts +1 -1
- package/dist/{index-CvpJyEnB.js → index-BwyUbhZj.js} +1 -1
- package/dist/{index-nVxD4_on.js → index-D09s817L.js} +5017 -3187
- package/dist/{lodash-Cbt71kLf.js → lodash-CL6AaeJB.js} +1 -1
- package/dist/stores/permission-set.d.ts +15 -0
- package/dist/{team-CZZo-waE.js → team-DEjtUFVl.js} +1 -1
- package/dist/{timesheet-DuYLbiJ_.js → timesheet-B0usAfjL.js} +2 -2
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/types/permission-set.d.ts +4 -0
- package/dist/types/report-query.d.ts +6 -0
- package/dist/{useAppStore-Dt1nUJ4t.js → useAppStore-DfaKfSuR.js} +34 -46
- package/dist/{useLoading-CjyXOp7A.js → useLoading-D2AX24ph.js} +1 -1
- package/dist/useReportPermissions-CwsHq61C.js +65 -0
- package/dist/views/team/locales/index.d.ts +12 -0
- package/package.json +2 -2
- package/dist/EmployeeList-pCs8sKuU.js +0 -607
- package/dist/PermissionSetList-BLmeu-lo.js +0 -283
- package/dist/RoleList-DyOF2uRf.js +0 -496
- package/dist/TeamMemberList-Ck2gpjCC.js +0 -952
- package/dist/employee-BZxYvY4n.js +0 -172
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { defineComponent as le, ref as f, computed as k, watch as
|
|
2
|
-
import { d as ie } from "./dayjs.min-
|
|
1
|
+
import { defineComponent as le, ref as f, computed as k, watch as B, resolveComponent as w, createElementBlock as u, openBlock as d, Fragment as D, createVNode as n, unref as i, withCtx as V, createElementVNode as e, createBlock as K, createCommentVNode as v, toDisplayString as s, renderList as se } from "vue";
|
|
2
|
+
import { d as ie } from "./dayjs.min-DZJQ_JpV.js";
|
|
3
3
|
import { useI18n as ne, useCoreStore as de } from "@feedmepos/mf-common";
|
|
4
|
-
import { _ as ce,
|
|
4
|
+
import { _ as ce, G as re } from "./app-DKSPx49S.js";
|
|
5
5
|
import { _ as ue } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
|
|
6
6
|
import { _ as me } from "./index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js";
|
|
7
|
-
import { components as
|
|
8
|
-
import { g as fe, b as pe, p as
|
|
9
|
-
import { u as ve } from "./team-
|
|
10
|
-
import { S as
|
|
7
|
+
import { components as $ } from "@feedmepos/ui-library";
|
|
8
|
+
import { g as fe, b as pe, p as Y } from "./index-D09s817L.js";
|
|
9
|
+
import { u as ve } from "./team-DEjtUFVl.js";
|
|
10
|
+
import { S as C } from "./SelectFilter-NbXrJ4iH.js";
|
|
11
11
|
const _e = "/audit-logs", ge = {
|
|
12
|
-
async read(
|
|
12
|
+
async read(c) {
|
|
13
13
|
return fe(
|
|
14
14
|
await pe().get(_e, {
|
|
15
15
|
params: {
|
|
16
|
-
limit: (
|
|
17
|
-
offset: (
|
|
18
|
-
...
|
|
19
|
-
...
|
|
16
|
+
limit: (c == null ? void 0 : c.limit) ?? 100,
|
|
17
|
+
offset: (c == null ? void 0 : c.offset) ?? 0,
|
|
18
|
+
...c != null && c.from ? { from: c.from } : {},
|
|
19
|
+
...c != null && c.to ? { to: c.to } : {}
|
|
20
20
|
}
|
|
21
21
|
})
|
|
22
22
|
);
|
|
@@ -40,34 +40,34 @@ const _e = "/audit-logs", ge = {
|
|
|
40
40
|
class: "flex shrink-0 items-center justify-end border-t border-fm-color-border-default py-4"
|
|
41
41
|
}, Ie = {
|
|
42
42
|
class: "text-sm text-fm-color-typo-secondary"
|
|
43
|
-
},
|
|
43
|
+
}, je = {
|
|
44
44
|
key: 0,
|
|
45
45
|
class: "space-y-12 p-4 text-sm"
|
|
46
|
-
},
|
|
46
|
+
}, Te = {
|
|
47
47
|
class: "rounded-lg border border-fm-color-border-default"
|
|
48
48
|
}, De = {
|
|
49
49
|
class: "flex items-start justify-between gap-8 p-12"
|
|
50
|
-
},
|
|
50
|
+
}, Ve = {
|
|
51
51
|
class: "text-base font-bold leading-snug text-fm-color-typo-primary"
|
|
52
|
-
},
|
|
52
|
+
}, Ce = {
|
|
53
53
|
class: "space-y-12 p-12"
|
|
54
|
-
},
|
|
54
|
+
}, Oe = {
|
|
55
55
|
class: "text-xs text-fm-color-typo-secondary"
|
|
56
|
-
},
|
|
56
|
+
}, Pe = {
|
|
57
57
|
class: "font-semibold"
|
|
58
|
-
}, Ne = {
|
|
59
|
-
key: 0
|
|
60
58
|
}, Fe = {
|
|
59
|
+
key: 0
|
|
60
|
+
}, Ne = {
|
|
61
61
|
class: "text-xs text-fm-color-typo-secondary"
|
|
62
|
-
}, Re = {
|
|
63
|
-
class: "font-semibold"
|
|
64
62
|
}, Ue = {
|
|
65
|
-
class: "
|
|
63
|
+
class: "font-semibold"
|
|
66
64
|
}, Be = {
|
|
67
|
-
class: "break-all font-mono text-xs font-semibold"
|
|
68
|
-
}, Ae = {
|
|
69
65
|
class: "text-xs text-fm-color-typo-secondary"
|
|
66
|
+
}, Ae = {
|
|
67
|
+
class: "break-all font-mono text-xs font-semibold"
|
|
70
68
|
}, Ee = {
|
|
69
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
70
|
+
}, Re = {
|
|
71
71
|
class: "font-semibold"
|
|
72
72
|
}, qe = {
|
|
73
73
|
class: "text-xs text-fm-color-typo-secondary"
|
|
@@ -77,13 +77,13 @@ const _e = "/audit-logs", ge = {
|
|
|
77
77
|
key: 1
|
|
78
78
|
}, $e = {
|
|
79
79
|
class: "text-xs text-fm-color-typo-secondary"
|
|
80
|
-
}, Je = {
|
|
81
|
-
class: "font-semibold"
|
|
82
80
|
}, Ye = {
|
|
83
|
-
class: "
|
|
81
|
+
class: "font-semibold"
|
|
84
82
|
}, ze = {
|
|
85
|
-
class: "
|
|
83
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
86
84
|
}, Ge = {
|
|
85
|
+
class: "break-all font-mono text-xs font-semibold"
|
|
86
|
+
}, Je = {
|
|
87
87
|
class: "text-xs text-fm-color-typo-secondary"
|
|
88
88
|
}, Ze = {
|
|
89
89
|
class: "font-semibold"
|
|
@@ -134,41 +134,31 @@ const _e = "/audit-logs", ge = {
|
|
|
134
134
|
}, gt = {
|
|
135
135
|
class: "text-xs text-fm-color-typo-secondary"
|
|
136
136
|
}, ht = {
|
|
137
|
-
class: "
|
|
137
|
+
class: "font-mono text-xs font-semibold"
|
|
138
138
|
}, xt = {
|
|
139
|
-
key: 3
|
|
140
|
-
}, bt = {
|
|
141
139
|
class: "text-xs text-fm-color-typo-secondary"
|
|
140
|
+
}, bt = {
|
|
141
|
+
class: "break-all font-mono text-xs font-semibold"
|
|
142
142
|
}, yt = {
|
|
143
|
-
|
|
143
|
+
key: 3
|
|
144
144
|
}, Lt = {
|
|
145
145
|
class: "text-xs text-fm-color-typo-secondary"
|
|
146
146
|
}, kt = {
|
|
147
|
-
class: "font-mono text-xs font-semibold"
|
|
148
|
-
}, St = {
|
|
149
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
150
|
-
}, wt = {
|
|
151
|
-
class: "break-all font-mono text-xs font-semibold"
|
|
152
|
-
}, It = {
|
|
153
|
-
key: 4
|
|
154
|
-
}, Tt = {
|
|
155
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
156
|
-
}, jt = {
|
|
157
147
|
class: "mt-4 max-h-[400px] overflow-auto rounded bg-gray-100 p-8 font-mono text-xs leading-relaxed shadow-inner"
|
|
158
|
-
}, A = 100,
|
|
148
|
+
}, A = 100, Ft = /* @__PURE__ */ le({
|
|
159
149
|
__name: "AuditLogList",
|
|
160
|
-
setup(
|
|
150
|
+
setup(c) {
|
|
161
151
|
const {
|
|
162
152
|
t: o
|
|
163
|
-
} = ne(),
|
|
164
|
-
startDate:
|
|
165
|
-
endDate:
|
|
166
|
-
}), g = f(), h = f(), x = f(), b = f(),
|
|
167
|
-
label:
|
|
168
|
-
value:
|
|
169
|
-
}))),
|
|
170
|
-
label:
|
|
171
|
-
value:
|
|
153
|
+
} = ne(), z = de(), _ = ve(), I = f(!1), E = f([]), l = f(null), O = f(!1), p = f(1), j = f(!1), R = ie().format("YYYY-MM-DD"), S = f({
|
|
154
|
+
startDate: R,
|
|
155
|
+
endDate: R
|
|
156
|
+
}), g = f(), h = f(), x = f(), b = f(), G = k(() => _.members.map((a) => ({
|
|
157
|
+
label: a.name,
|
|
158
|
+
value: a.doc.userId
|
|
159
|
+
}))), J = k(() => Y.map((a) => ({
|
|
160
|
+
label: a.label,
|
|
161
|
+
value: a.subject
|
|
172
162
|
}))), Z = k(() => [{
|
|
173
163
|
label: o("auditLog.action.manage"),
|
|
174
164
|
value: "manage"
|
|
@@ -195,38 +185,38 @@ const _e = "/audit-logs", ge = {
|
|
|
195
185
|
value: "skipped"
|
|
196
186
|
}]), Q = k(() => {
|
|
197
187
|
const {
|
|
198
|
-
startDate:
|
|
188
|
+
startDate: a,
|
|
199
189
|
endDate: t
|
|
200
190
|
} = S.value;
|
|
201
|
-
return
|
|
202
|
-
}),
|
|
203
|
-
let
|
|
204
|
-
return g.value && g.value.length > 0 && (
|
|
191
|
+
return a && t ? `${a} – ${t}` : a || t || o("auditLog.dateRange.placeholder");
|
|
192
|
+
}), P = k(() => {
|
|
193
|
+
let a = E.value;
|
|
194
|
+
return g.value && g.value.length > 0 && (a = a.filter((t) => g.value.includes(t.userId))), h.value && h.value.length > 0 && (a = a.filter((t) => h.value.includes(t.subject))), x.value && x.value.length > 0 && (a = a.filter((t) => x.value.includes(t.outcome))), b.value && b.value.length > 0 && (a = a.filter((t) => b.value.includes(t.action))), a;
|
|
205
195
|
});
|
|
206
|
-
function
|
|
196
|
+
function F(a) {
|
|
207
197
|
var t;
|
|
208
|
-
return ((t =
|
|
198
|
+
return ((t = Y.find((m) => m.subject === a)) == null ? void 0 : t.label) ?? re[a];
|
|
209
199
|
}
|
|
210
|
-
const
|
|
200
|
+
const q = {
|
|
211
201
|
allowed: "success",
|
|
212
202
|
denied: "critical",
|
|
213
203
|
skipped: "warning"
|
|
214
204
|
}, W = [{
|
|
215
205
|
accessorKey: "timestamp",
|
|
216
206
|
header: () => o("auditLog.columns.timestamp"),
|
|
217
|
-
cell(
|
|
218
|
-
const t =
|
|
207
|
+
cell(a) {
|
|
208
|
+
const t = a.row.original;
|
|
219
209
|
return new Date(t.timestamp).toLocaleString();
|
|
220
210
|
}
|
|
221
211
|
}, {
|
|
222
212
|
accessorKey: "userId",
|
|
223
213
|
header: () => o("auditLog.columns.user"),
|
|
224
214
|
enableSorting: !1,
|
|
225
|
-
cell(
|
|
226
|
-
const t =
|
|
215
|
+
cell(a) {
|
|
216
|
+
const t = a.row.original, m = _.userIdToName[t.userId];
|
|
227
217
|
return n("div", {
|
|
228
218
|
class: "flex items-center gap-8"
|
|
229
|
-
}, [n(
|
|
219
|
+
}, [n($.FmAvatar, {
|
|
230
220
|
initials: m || t.userId,
|
|
231
221
|
size: "sm"
|
|
232
222
|
}, null), n("span", null, [m || t.userId])]);
|
|
@@ -237,15 +227,13 @@ const _e = "/audit-logs", ge = {
|
|
|
237
227
|
meta: {
|
|
238
228
|
cellClass: "text-left"
|
|
239
229
|
},
|
|
240
|
-
cell(
|
|
241
|
-
const t =
|
|
230
|
+
cell(a) {
|
|
231
|
+
const t = a.row.original, m = F(t.subject);
|
|
242
232
|
return m ? n("div", {
|
|
243
233
|
class: "text-left"
|
|
244
|
-
}, [n(
|
|
245
|
-
|
|
246
|
-
}, {
|
|
247
|
-
default: () => [n("span", null, [m])]
|
|
248
|
-
})]) : n("div", {
|
|
234
|
+
}, [n("span", null, [m]), n("p", {
|
|
235
|
+
class: "text-xs text-fm-color-typo-tertiary"
|
|
236
|
+
}, [t.subject])]) : n("div", {
|
|
249
237
|
class: "text-left"
|
|
250
238
|
}, [t.subject]);
|
|
251
239
|
}
|
|
@@ -257,108 +245,108 @@ const _e = "/audit-logs", ge = {
|
|
|
257
245
|
accessorKey: "outcome",
|
|
258
246
|
header: () => o("auditLog.columns.outcome"),
|
|
259
247
|
enableSorting: !1,
|
|
260
|
-
cell(
|
|
261
|
-
const t =
|
|
262
|
-
return n(
|
|
263
|
-
variant:
|
|
248
|
+
cell(a) {
|
|
249
|
+
const t = a.row.original;
|
|
250
|
+
return n($.FmChip, {
|
|
251
|
+
variant: q[t.outcome] ?? "neutral",
|
|
264
252
|
label: t.outcome,
|
|
265
253
|
compact: !0
|
|
266
254
|
}, null);
|
|
267
255
|
}
|
|
268
256
|
}];
|
|
269
|
-
function
|
|
270
|
-
const [m, y,
|
|
257
|
+
function M(a, t = !1) {
|
|
258
|
+
const [m, y, N] = a.split("-").map(Number), L = new Date(m, y - 1, N);
|
|
271
259
|
return t && L.setDate(L.getDate() + 1), L.toISOString().slice(0, 19).replace("T", " ");
|
|
272
260
|
}
|
|
273
|
-
async function
|
|
261
|
+
async function T() {
|
|
274
262
|
I.value = !0;
|
|
275
263
|
try {
|
|
276
264
|
const {
|
|
277
|
-
startDate:
|
|
265
|
+
startDate: a,
|
|
278
266
|
endDate: t
|
|
279
|
-
} = S.value, m = (
|
|
267
|
+
} = S.value, m = (p.value - 1) * A, [y] = await Promise.all([ge.read({
|
|
280
268
|
limit: A,
|
|
281
269
|
offset: m,
|
|
282
270
|
// Convert local date boundaries to UTC ISO strings so ClickHouse
|
|
283
271
|
// (which stores timestamps in UTC) receives the correct range.
|
|
284
|
-
...
|
|
285
|
-
from:
|
|
272
|
+
...a ? {
|
|
273
|
+
from: M(a)
|
|
286
274
|
} : {},
|
|
287
275
|
...t ? {
|
|
288
|
-
to:
|
|
276
|
+
to: M(t, !0)
|
|
289
277
|
} : {}
|
|
290
278
|
}), _.readTeamMembers()]);
|
|
291
|
-
E.value = y,
|
|
279
|
+
E.value = y, j.value = y.length === A;
|
|
292
280
|
} finally {
|
|
293
281
|
I.value = !1;
|
|
294
282
|
}
|
|
295
283
|
}
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
}),
|
|
299
|
-
|
|
284
|
+
B(S, () => {
|
|
285
|
+
p.value = 1, T();
|
|
286
|
+
}), B([g, h, x, b], () => {
|
|
287
|
+
p.value = 1;
|
|
300
288
|
});
|
|
301
289
|
async function X() {
|
|
302
|
-
|
|
290
|
+
p.value > 1 && (p.value--, await T());
|
|
303
291
|
}
|
|
304
292
|
async function ee() {
|
|
305
|
-
|
|
293
|
+
j.value && (p.value++, await T());
|
|
306
294
|
}
|
|
307
|
-
function te(
|
|
308
|
-
|
|
295
|
+
function te(a) {
|
|
296
|
+
l.value = a, O.value = !0;
|
|
309
297
|
}
|
|
310
298
|
function oe() {
|
|
311
|
-
|
|
299
|
+
O.value = !1, l.value = null;
|
|
312
300
|
}
|
|
313
|
-
return
|
|
314
|
-
|
|
301
|
+
return B(z.currentBusiness, (a) => {
|
|
302
|
+
a && (p.value = 1, T());
|
|
315
303
|
}, {
|
|
316
304
|
immediate: !0
|
|
317
|
-
}), (
|
|
318
|
-
const m = w("FmChip"), y = w("FmDateRangePicker"),
|
|
319
|
-
return d(),
|
|
305
|
+
}), (a, t) => {
|
|
306
|
+
const m = w("FmChip"), y = w("FmDateRangePicker"), N = w("FmTable"), L = w("FmButton"), ae = w("FmSideSheet");
|
|
307
|
+
return d(), u(D, null, [n(ue, {
|
|
320
308
|
heading: i(o)("auditLog.title")
|
|
321
309
|
}, {
|
|
322
|
-
default:
|
|
310
|
+
default: V(() => [e("div", he, [e("div", xe, [n(y, {
|
|
323
311
|
modelValue: S.value,
|
|
324
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
312
|
+
"onUpdate:modelValue": t[0] || (t[0] = (r) => S.value = r),
|
|
325
313
|
"show-predefined-range": ""
|
|
326
314
|
}, {
|
|
327
|
-
"trigger-button":
|
|
315
|
+
"trigger-button": V(() => [n(m, {
|
|
328
316
|
label: Q.value,
|
|
329
317
|
icon: "calendar_month"
|
|
330
318
|
}, null, 8, ["label"])]),
|
|
331
319
|
_: 1
|
|
332
|
-
}, 8, ["modelValue"]), e("div", be, [n(
|
|
320
|
+
}, 8, ["modelValue"]), e("div", be, [n(C, {
|
|
333
321
|
modelValue: g.value,
|
|
334
|
-
"onUpdate:modelValue": t[1] || (t[1] = (
|
|
335
|
-
items:
|
|
322
|
+
"onUpdate:modelValue": t[1] || (t[1] = (r) => g.value = r),
|
|
323
|
+
items: G.value,
|
|
336
324
|
multiple: "",
|
|
337
325
|
variant: "dark",
|
|
338
326
|
placeholder: i(o)("auditLog.filter.user_placeholder"),
|
|
339
327
|
"selected-prefix": i(o)("auditLog.filter.selected_user_prefix"),
|
|
340
328
|
"chip-icon": "account_circle"
|
|
341
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), e("div", ye, [n(
|
|
329
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), e("div", ye, [n(C, {
|
|
342
330
|
modelValue: h.value,
|
|
343
|
-
"onUpdate:modelValue": t[2] || (t[2] = (
|
|
344
|
-
items:
|
|
331
|
+
"onUpdate:modelValue": t[2] || (t[2] = (r) => h.value = r),
|
|
332
|
+
items: J.value,
|
|
345
333
|
multiple: "",
|
|
346
334
|
variant: "dark",
|
|
347
335
|
placeholder: i(o)("auditLog.filter.subject_placeholder"),
|
|
348
336
|
"selected-prefix": i(o)("auditLog.filter.selected_subject_prefix"),
|
|
349
337
|
"chip-icon": "badge"
|
|
350
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), e("div", Le, [n(
|
|
338
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), e("div", Le, [n(C, {
|
|
351
339
|
modelValue: b.value,
|
|
352
|
-
"onUpdate:modelValue": t[3] || (t[3] = (
|
|
340
|
+
"onUpdate:modelValue": t[3] || (t[3] = (r) => b.value = r),
|
|
353
341
|
items: Z.value,
|
|
354
342
|
multiple: "",
|
|
355
343
|
variant: "dark",
|
|
356
344
|
placeholder: i(o)("auditLog.filter.action_placeholder"),
|
|
357
345
|
"selected-prefix": i(o)("auditLog.filter.selected_action_prefix"),
|
|
358
346
|
searchable: !1
|
|
359
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), e("div", ke, [n(
|
|
347
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), e("div", ke, [n(C, {
|
|
360
348
|
modelValue: x.value,
|
|
361
|
-
"onUpdate:modelValue": t[4] || (t[4] = (
|
|
349
|
+
"onUpdate:modelValue": t[4] || (t[4] = (r) => x.value = r),
|
|
362
350
|
items: H.value,
|
|
363
351
|
multiple: "",
|
|
364
352
|
variant: "dark",
|
|
@@ -366,70 +354,70 @@ const _e = "/audit-logs", ge = {
|
|
|
366
354
|
"selected-prefix": i(o)("auditLog.filter.selected_status_prefix"),
|
|
367
355
|
searchable: !1,
|
|
368
356
|
"chip-icon": "check_circle"
|
|
369
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])]), !I.value &&
|
|
357
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])]), !I.value && P.value.length === 0 ? (d(), K(i(me), {
|
|
370
358
|
key: 0,
|
|
371
359
|
title: i(o)("auditLog.noData.title"),
|
|
372
360
|
subtitle: i(o)("auditLog.noData.subtitle")
|
|
373
|
-
}, null, 8, ["title", "subtitle"])) : (d(),
|
|
361
|
+
}, null, 8, ["title", "subtitle"])) : (d(), K(ce, {
|
|
374
362
|
key: 1
|
|
375
363
|
}, {
|
|
376
|
-
default:
|
|
364
|
+
default: V(() => [e("div", Se, [n(N, {
|
|
377
365
|
"column-defs": W,
|
|
378
|
-
"row-data":
|
|
379
|
-
"page-size":
|
|
366
|
+
"row-data": P.value,
|
|
367
|
+
"page-size": P.value.length,
|
|
380
368
|
loading: I.value,
|
|
381
369
|
"pin-header-row": "",
|
|
382
370
|
"hide-footer": "",
|
|
383
371
|
class: "min-h-0 flex-1 cursor-pointer",
|
|
384
|
-
onRowClick: t[5] || (t[5] = (
|
|
385
|
-
}, null, 8, ["row-data", "page-size", "loading"]),
|
|
372
|
+
onRowClick: t[5] || (t[5] = (r) => te(r.original))
|
|
373
|
+
}, null, 8, ["row-data", "page-size", "loading"]), p.value > 1 || j.value ? (d(), u("div", we, [n(L, {
|
|
386
374
|
variant: "tertiary",
|
|
387
375
|
icon: "chevron_left",
|
|
388
|
-
disabled:
|
|
376
|
+
disabled: p.value === 1,
|
|
389
377
|
"aria-label": i(o)("auditLog.pagination.prevPage"),
|
|
390
378
|
onClick: X
|
|
391
|
-
}, null, 8, ["disabled", "aria-label"]), e("span", Ie,
|
|
392
|
-
page:
|
|
379
|
+
}, null, 8, ["disabled", "aria-label"]), e("span", Ie, s(i(o)("auditLog.pagination.page", {
|
|
380
|
+
page: p.value
|
|
393
381
|
})), 1), n(L, {
|
|
394
382
|
variant: "tertiary",
|
|
395
383
|
icon: "chevron_right",
|
|
396
|
-
disabled: !
|
|
384
|
+
disabled: !j.value,
|
|
397
385
|
"aria-label": i(o)("auditLog.pagination.nextPage"),
|
|
398
386
|
onClick: ee
|
|
399
|
-
}, null, 8, ["disabled", "aria-label"])])) :
|
|
387
|
+
}, null, 8, ["disabled", "aria-label"])])) : v("", !0)])]),
|
|
400
388
|
_: 1
|
|
401
389
|
}))])]),
|
|
402
390
|
_: 1
|
|
403
391
|
}, 8, ["heading"]), n(ae, {
|
|
404
392
|
header: i(o)("auditLog.detail.header"),
|
|
405
|
-
"model-value":
|
|
393
|
+
"model-value": O.value,
|
|
406
394
|
"max-width": 480,
|
|
407
395
|
"dismiss-away": "",
|
|
408
|
-
"onUpdate:modelValue": t[6] || (t[6] = (
|
|
409
|
-
|
|
396
|
+
"onUpdate:modelValue": t[6] || (t[6] = (r) => {
|
|
397
|
+
r || oe();
|
|
410
398
|
})
|
|
411
399
|
}, {
|
|
412
|
-
default:
|
|
413
|
-
variant:
|
|
414
|
-
label:
|
|
400
|
+
default: V(() => [l.value ? (d(), u("div", je, [e("div", Te, [e("div", De, [e("span", Ve, s(F(l.value.subject) || l.value.subject), 1), n(m, {
|
|
401
|
+
variant: q[l.value.outcome] ?? "neutral",
|
|
402
|
+
label: l.value.outcome,
|
|
415
403
|
compact: ""
|
|
416
404
|
}, null, 8, ["variant", "label"])]), t[7] || (t[7] = e("hr", {
|
|
417
405
|
class: "border-fm-color-border-default"
|
|
418
|
-
}, null, -1)), e("div",
|
|
406
|
+
}, null, -1)), e("div", Ce, [e("div", null, [e("p", Oe, s(i(o)("auditLog.detail.timestamp")), 1), e("p", Pe, s(new Date(l.value.timestamp).toLocaleString()), 1)]), i(_).userIdToName[l.value.userId] ? (d(), u("div", Fe, [e("p", Ne, s(i(o)("auditLog.detail.user")), 1), e("p", Ue, s(i(_).userIdToName[l.value.userId]), 1)])) : v("", !0), e("div", null, [e("p", Be, s(i(o)("auditLog.detail.email")), 1), e("p", Ae, s(i(_).userIdToEmail[l.value.userId] || l.value.userId), 1)]), e("div", null, [e("p", Ee, s(i(o)("auditLog.detail.action")), 1), e("p", Re, s(l.value.action), 1)]), e("div", null, [e("p", qe, s(i(o)("auditLog.detail.subject")), 1), e("p", Me, s(F(l.value.subject) || l.value.subject), 1)]), l.value.field ? (d(), u("div", Ke, [e("p", $e, s(i(o)("auditLog.detail.field")), 1), e("p", Ye, s(l.value.field), 1)])) : v("", !0), e("div", null, [e("p", ze, s(i(o)("auditLog.detail.business")), 1), e("p", Ge, s(l.value.businessId || "-"), 1)]), e("div", null, [e("p", Je, s(i(o)("auditLog.detail.restaurant")), 1), e("p", Ze, s(l.value.restaurantId || "-"), 1)])])]), e("div", He, [e("div", Qe, [e("p", We, s(i(o)("auditLog.detail.metadata")), 1)]), t[8] || (t[8] = e("hr", {
|
|
419
407
|
class: "border-fm-color-border-default"
|
|
420
|
-
}, null, -1)), e("div", Xe, [
|
|
408
|
+
}, null, -1)), e("div", Xe, [l.value.metadata.reason ? (d(), u("div", et, [e("p", tt, s(i(o)("auditLog.detail.reason")), 1), e("p", ot, s(l.value.metadata.reason), 1)])) : v("", !0), e("div", null, [e("p", at, s(i(o)("auditLog.detail.resolvedFrom")), 1), e("p", lt, s(l.value.metadata.resolvedFrom), 1)]), l.value.metadata.permissionSetId ? (d(), u("div", st, [e("p", it, s(i(o)("auditLog.detail.permissionSet")), 1), l.value.metadata.resolvedFrom === "systemPermissionSet" ? (d(), u(D, {
|
|
421
409
|
key: 0
|
|
422
|
-
}, [e("p", nt, l
|
|
410
|
+
}, [e("p", nt, s(l.value.metadata.permissionSetName) + " (system)", 1), e("p", dt, s(l.value.metadata.permissionSetId), 1)], 64)) : (d(), u(D, {
|
|
423
411
|
key: 1
|
|
424
|
-
}, [e("p", ct, l
|
|
425
|
-
key:
|
|
412
|
+
}, [e("p", ct, s(l.value.metadata.permissionSetName || l.value.metadata.permissionSetId), 1), l.value.metadata.permissionSetName ? (d(), u("p", rt, s(l.value.metadata.permissionSetId), 1)) : v("", !0)], 64))])) : v("", !0), l.value.metadata.trace && l.value.metadata.trace.length > 0 ? (d(), u("div", ut, [e("p", mt, s(i(o)("auditLog.detail.permissionTrace")), 1), e("ol", ft, [(d(!0), u(D, null, se(l.value.metadata.trace, (r, U) => (d(), u("li", {
|
|
413
|
+
key: U,
|
|
426
414
|
class: "flex items-center gap-6"
|
|
427
|
-
}, [e("span", pt,
|
|
415
|
+
}, [e("span", pt, s(U + 1), 1), e("span", vt, s(r), 1), U < l.value.metadata.trace.length - 1 ? (d(), u("span", _t, "→")) : v("", !0)]))), 128))])])) : v("", !0), e("div", null, [e("p", gt, s(i(o)("auditLog.detail.requestMethod")), 1), e("p", ht, s(l.value.metadata.requestMethod), 1)]), e("div", null, [e("p", xt, s(i(o)("auditLog.detail.requestPath")), 1), e("p", bt, s(l.value.metadata.requestPath), 1)]), l.value.metadata.requestBody && Object.keys(l.value.metadata.requestBody).length > 0 ? (d(), u("div", yt, [e("p", Lt, s(i(o)("auditLog.detail.requestBody")), 1), e("pre", kt, s(JSON.stringify(l.value.metadata.requestBody, null, 2)), 1)])) : v("", !0)])])])) : v("", !0)]),
|
|
428
416
|
_: 1
|
|
429
417
|
}, 8, ["header", "model-value"])], 64);
|
|
430
418
|
};
|
|
431
419
|
}
|
|
432
420
|
});
|
|
433
421
|
export {
|
|
434
|
-
|
|
422
|
+
Ft as default
|
|
435
423
|
};
|