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