@feedmepos/mf-hrm-portal 2.0.8-dev.1 → 2.0.8-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.
Files changed (32) hide show
  1. package/dist/AuditLogList-CNrMFE7u.js +708 -0
  2. package/dist/{EmployeeList-DuRlCrqN.js → EmployeeList-cOmlbt40.js} +5 -5
  3. package/dist/{Main-BfDH3uAt.js → Main-BDXOkOE2.js} +9 -9
  4. package/dist/{Main-QpKV1hdj.js → Main-BJh3lH16.js} +4 -4
  5. package/dist/{Main-D4ueBOl0.js → Main-C3koRp1u.js} +6 -6
  6. package/dist/{PermissionSetList-DfAZmUkI.js → PermissionSetList-CLJn0V0J.js} +5 -5
  7. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Bcr-EX6B.js +3471 -0
  8. package/dist/{RoleList-D4mup6LW.js → RoleList-Bd3v0EoJ.js} +7 -7
  9. package/dist/{TeamMemberList-D9rTKS5N.js → TeamMemberList-CbfbIqYV.js} +8 -8
  10. package/dist/{TimesheetList-CBudjg1y.js → TimesheetList-DkJWAHEN.js} +7 -7
  11. package/dist/{app-BO9lM0sJ.js → app-CBCdQFuQ.js} +683 -503
  12. package/dist/app.js +1 -1
  13. package/dist/{dayjs.min-lY-LRZuh.js → dayjs.min-D-dyRkoG.js} +1 -1
  14. package/dist/{employee-DXp_u8jd.js → employee-BUIgpjQN.js} +4 -4
  15. package/dist/{index-BigKo-lS.js → index-BMJS_Lkf.js} +1 -1
  16. package/dist/{index-DAuOIotV.js → index-CPrEayXj.js} +2 -2
  17. package/dist/{iteration-DgaP-HFg.js → iteration-CsLWDBUl.js} +1 -1
  18. package/dist/{lodash-Mhrrz947.js → lodash-B9IFDgiG.js} +1 -1
  19. package/dist/src/composables/useBasePermission.d.ts +37 -0
  20. package/dist/src/helpers/permission-sync.d.ts +12 -0
  21. package/dist/src/views/audit-log/locales/index.d.ts +140 -0
  22. package/dist/src/views/team/components/BasePermission.vue.d.ts +1 -1
  23. package/dist/style.css +1 -1
  24. package/dist/{team-oeTIbsa-.js → team-6mA14lfK.js} +1 -1
  25. package/dist/{timesheet-B4XO3Kjx.js → timesheet-DG2p1hTy.js} +3 -3
  26. package/dist/tsconfig.app.tsbuildinfo +1 -1
  27. package/dist/{useAppStore-Cu5QCTlx.js → useAppStore-CmUOIsdB.js} +1 -1
  28. package/dist/{useLoading-DKnxkHGF.js → useLoading-Ct9N6Ir6.js} +1 -1
  29. package/dist/{useReportPermissions-B_w5FiAK.js → useReportPermissions-D_KEL6RC.js} +3 -3
  30. package/package.json +2 -2
  31. package/dist/AuditLogList-YGP3G14A.js +0 -493
  32. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DokyDyxJ.js +0 -3432
@@ -1,7 +1,7 @@
1
1
  import { defineStore as f, storeToRefs as v } from "pinia";
2
2
  import { ref as b } from "vue";
3
3
  import { useCoreStore as I, baseClientInstance as w } from "@feedmepos/mf-common";
4
- import { g as l, b as d, s as R } from "./iteration-DgaP-HFg.js";
4
+ import { g as l, b as d, s as R } from "./iteration-CsLWDBUl.js";
5
5
  const p = {
6
6
  async readRoles() {
7
7
  return l(await d().get("/pos-roles"));
@@ -1,6 +1,6 @@
1
1
  import { computed as I, isRef as L, watch as M } from "vue";
2
2
  import { SnackbarPosition as y } from "@feedmepos/ui-library";
3
- import { a as w, v } from "./useAppStore-Cu5QCTlx.js";
3
+ import { a as w, v } from "./useAppStore-CmUOIsdB.js";
4
4
  const E = (r) => {
5
5
  async function d(u, e) {
6
6
  var l, a;
@@ -1,8 +1,8 @@
1
1
  import { computed as u, ref as r } from "vue";
2
- import { e as l } from "./iteration-DgaP-HFg.js";
2
+ import { e as l } from "./iteration-CsLWDBUl.js";
3
3
  import { useCoreStore as y } from "@feedmepos/mf-common";
4
- import { e as R, R as h } from "./index-DAuOIotV.js";
5
- import "./app-BO9lM0sJ.js";
4
+ import { e as R, R as h } from "./index-CPrEayXj.js";
5
+ import "./app-CBCdQFuQ.js";
6
6
  const n = r([]), c = r(!1), t = r(!1), m = r(null);
7
7
  function L() {
8
8
  const d = y();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-hrm-portal",
3
- "version": "2.0.8-dev.1",
3
+ "version": "2.0.8-dev.10",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -29,7 +29,7 @@
29
29
  "vue-router": "^4.3.2",
30
30
  "vue3-lottie": "^3.3.0",
31
31
  "xlsx": "^0.18.5",
32
- "@feedmepos/hrm-permission": "1.0.4"
32
+ "@feedmepos/hrm-permission": "1.0.5"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@casl/ability": "^3.4.0",
@@ -1,493 +0,0 @@
1
- import { defineComponent as de, ref as h, computed as k, watch as R, resolveComponent as D, createElementBlock as f, openBlock as m, Fragment as A, createVNode as d, unref as n, withCtx as N, createElementVNode as e, createBlock as $, createCommentVNode as x, toDisplayString as s, renderList as re, createTextVNode as Y } from "vue";
2
- import { d as ce } from "./dayjs.min-lY-LRZuh.js";
3
- import { useI18n as ue, useCoreStore as me } from "@feedmepos/mf-common";
4
- import { F as J, _ as fe } from "./app-BO9lM0sJ.js";
5
- import { _ as pe } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
6
- import { _ as ve } from "./index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js";
7
- import { components as G } from "@feedmepos/ui-library";
8
- import { g as _e, b as ge } from "./iteration-DgaP-HFg.js";
9
- import { u as he } from "./team-oeTIbsa-.js";
10
- import { S as U } from "./SelectFilter-DUj7GBtT.js";
11
- import { p as Z } from "./index-DAuOIotV.js";
12
- const be = "/audit-logs", xe = {
13
- async read(i) {
14
- var F, g, L, w;
15
- const o = {
16
- limit: (i == null ? void 0 : i.limit) ?? 100,
17
- offset: (i == null ? void 0 : i.offset) ?? 0,
18
- ...i != null && i.from ? { from: i.from } : {},
19
- ...i != null && i.to ? { to: i.to } : {},
20
- ...(F = i == null ? void 0 : i.userIds) != null && F.length ? { userIds: i.userIds } : {},
21
- ...(g = i == null ? void 0 : i.subjects) != null && g.length ? { subjects: i.subjects } : {},
22
- ...(L = i == null ? void 0 : i.actions) != null && L.length ? { actions: i.actions } : {},
23
- ...(w = i == null ? void 0 : i.outcomes) != null && w.length ? { outcomes: i.outcomes } : {}
24
- };
25
- return console.log("[AuditLogAPI] request params:", o), _e(
26
- await ge().get(be, {
27
- params: o,
28
- // Serialize arrays as repeated params: key=val1&key=val2
29
- // (NestJS @Query expects this; axios default adds brackets which break matching)
30
- paramsSerializer: (a) => {
31
- const y = new URLSearchParams();
32
- for (const [p, b] of Object.entries(a))
33
- if (Array.isArray(b))
34
- for (const O of b) y.append(p, String(O));
35
- else b != null && y.append(p, String(b));
36
- return console.log("[AuditLogAPI] serialized query string:", y.toString()), y.toString();
37
- }
38
- })
39
- );
40
- }
41
- }, ye = {
42
- class: "flex flex-1 flex-col gap-16 min-h-0"
43
- }, Le = {
44
- class: "flex items-center gap-8"
45
- }, Se = {
46
- class: "w-fit"
47
- }, ke = {
48
- class: "w-fit"
49
- }, we = {
50
- class: "w-fit"
51
- }, Ie = {
52
- class: "w-fit"
53
- }, Ce = {
54
- class: "flex h-full flex-col"
55
- }, Pe = {
56
- key: 0,
57
- class: "flex shrink-0 items-center justify-end border-t border-fm-color-border-default py-4"
58
- }, Te = {
59
- class: "text-sm text-fm-color-typo-secondary"
60
- }, Ve = {
61
- key: 0,
62
- class: "space-y-12 p-4 text-sm"
63
- }, je = {
64
- class: "rounded-lg border border-fm-color-border-default"
65
- }, De = {
66
- class: "flex items-start justify-between gap-8 p-12"
67
- }, Fe = {
68
- class: "text-base font-bold leading-snug text-fm-color-typo-primary flex-1 min-w-0"
69
- }, Oe = {
70
- class: "audit-log-operation-label-detail font-semibold"
71
- }, Ae = {
72
- class: "space-y-12 p-12"
73
- }, Ne = {
74
- class: "text-xs text-fm-color-typo-secondary"
75
- }, Ue = {
76
- class: "font-semibold"
77
- }, Be = {
78
- key: 0
79
- }, Ee = {
80
- class: "text-xs text-fm-color-typo-secondary"
81
- }, Re = {
82
- class: "font-semibold"
83
- }, qe = {
84
- class: "text-xs text-fm-color-typo-secondary"
85
- }, ze = {
86
- class: "break-all font-mono text-xs font-semibold"
87
- }, Me = {
88
- class: "text-xs text-fm-color-typo-secondary"
89
- }, Ke = {
90
- class: "font-semibold"
91
- }, $e = {
92
- class: "text-xs text-fm-color-typo-secondary"
93
- }, Ye = {
94
- class: "font-semibold"
95
- }, Je = {
96
- key: 1
97
- }, Ge = {
98
- class: "text-xs text-fm-color-typo-secondary"
99
- }, Ze = {
100
- class: "font-semibold"
101
- }, He = {
102
- class: "text-xs text-fm-color-typo-secondary"
103
- }, Qe = {
104
- class: "break-all font-mono text-xs font-semibold"
105
- }, We = {
106
- class: "text-xs text-fm-color-typo-secondary"
107
- }, Xe = {
108
- class: "font-semibold"
109
- }, et = {
110
- class: "rounded-lg border border-fm-color-border-default"
111
- }, tt = {
112
- class: "p-12"
113
- }, ot = {
114
- class: "text-base font-bold text-fm-color-typo-primary"
115
- }, at = {
116
- class: "space-y-12 p-12"
117
- }, lt = {
118
- key: 0
119
- }, st = {
120
- class: "text-xs text-fm-color-typo-secondary"
121
- }, nt = {
122
- class: "font-semibold"
123
- }, it = {
124
- class: "text-xs text-fm-color-typo-secondary"
125
- }, dt = {
126
- class: "font-semibold"
127
- }, rt = {
128
- key: 1
129
- }, ct = {
130
- class: "text-xs text-fm-color-typo-secondary"
131
- }, ut = {
132
- class: "font-semibold"
133
- }, mt = {
134
- class: "break-all font-mono text-xs text-fm-color-typo-secondary"
135
- }, ft = {
136
- class: "font-semibold"
137
- }, pt = {
138
- key: 0,
139
- class: "break-all font-mono text-xs text-fm-color-typo-secondary"
140
- }, vt = {
141
- key: 2
142
- }, _t = {
143
- class: "text-xs text-fm-color-typo-secondary"
144
- }, gt = {
145
- class: "mt-4 space-y-4"
146
- }, ht = {
147
- 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"
148
- }, bt = {
149
- class: "text-xs font-semibold"
150
- }, xt = {
151
- key: 0,
152
- class: "text-fm-color-typo-secondary"
153
- }, yt = {
154
- class: "text-xs text-fm-color-typo-secondary"
155
- }, Lt = {
156
- class: "font-mono text-xs font-semibold"
157
- }, St = {
158
- class: "text-xs text-fm-color-typo-secondary"
159
- }, kt = {
160
- class: "break-all font-mono text-xs font-semibold"
161
- }, wt = {
162
- key: 3
163
- }, It = {
164
- class: "text-xs text-fm-color-typo-secondary"
165
- }, Ct = {
166
- class: "mt-4 max-h-[400px] overflow-auto rounded bg-gray-100 p-8 font-mono text-xs leading-relaxed shadow-inner"
167
- }, q = 100, Et = /* @__PURE__ */ de({
168
- __name: "AuditLogList",
169
- setup(i) {
170
- const {
171
- t: o
172
- } = ue(), F = me(), g = he(), L = h(!1), w = h([]), a = h(null), y = h(!1), p = h(1), b = h(!1), O = ce().format("YYYY-MM-DD"), I = h({
173
- startDate: O,
174
- endDate: O
175
- }), C = h(), P = h(), T = h(), V = h();
176
- function H(l) {
177
- return typeof l == "string" ? [l] : Array.isArray(l) ? l.filter((t) => typeof t == "string") : [];
178
- }
179
- const Q = k(() => g.members.map((l) => ({
180
- label: l.name,
181
- value: l.doc.userId
182
- }))), W = k(() => {
183
- const l = Z.flatMap((c) => H(c.subject).map((_) => ({
184
- label: c.label,
185
- value: _
186
- }))), t = Object.entries(J).map(([c, _]) => ({
187
- label: _,
188
- value: c
189
- })), r = /* @__PURE__ */ new Set(), v = [];
190
- for (const c of [...l, ...t])
191
- r.has(c.value) || (r.add(c.value), v.push(c));
192
- return v;
193
- });
194
- function X(l, t) {
195
- const r = t.toLowerCase();
196
- return !!(l.label.toLowerCase().includes(r) || l.value.replace(/^business::/, "").toLowerCase().includes(r) || l.value.toLowerCase().includes(r));
197
- }
198
- const ee = k(() => [{
199
- label: o("auditLog.action.manage"),
200
- value: "manage"
201
- }, {
202
- label: o("auditLog.action.create"),
203
- value: "create"
204
- }, {
205
- label: o("auditLog.action.read"),
206
- value: "read"
207
- }, {
208
- label: o("auditLog.action.update"),
209
- value: "update"
210
- }, {
211
- label: o("auditLog.action.delete"),
212
- value: "delete"
213
- }]), te = k(() => [{
214
- label: o("auditLog.outcome.allowed"),
215
- value: "allowed"
216
- }, {
217
- label: o("auditLog.outcome.denied"),
218
- value: "denied"
219
- }, {
220
- label: o("auditLog.outcome.skipped"),
221
- value: "skipped"
222
- }]), oe = k(() => {
223
- const {
224
- startDate: l,
225
- endDate: t
226
- } = I.value;
227
- return l && t ? `${l} – ${t}` : l || t || o("auditLog.dateRange.placeholder");
228
- }), B = k(() => w.value);
229
- function z(l) {
230
- var t;
231
- return ((t = Z.find((r) => r.subject === l)) == null ? void 0 : t.label) ?? J[l];
232
- }
233
- const M = {
234
- allowed: "success",
235
- denied: "critical",
236
- skipped: "warning"
237
- }, ae = [{
238
- accessorKey: "timestamp",
239
- header: () => o("auditLog.columns.timestamp"),
240
- cell(l) {
241
- const t = l.row.original;
242
- return new Date(t.timestamp).toLocaleString();
243
- }
244
- }, {
245
- accessorKey: "userId",
246
- header: () => o("auditLog.columns.user"),
247
- enableSorting: !1,
248
- size: 220,
249
- cell(l) {
250
- const t = l.row.original, r = g.userIdToName[t.userId], v = g.userIdToPhone[t.userId], c = g.userIdToEmail[t.userId];
251
- return d("div", {
252
- class: "flex items-center gap-8"
253
- }, [d(G.FmAvatar, {
254
- initials: r || t.userId,
255
- size: "sm",
256
- class: "shrink-0"
257
- }, null), d("div", {
258
- class: "min-w-0"
259
- }, [r && d("p", {
260
- class: "truncate font-semibold"
261
- }, [r, v && d("span", {
262
- class: "font-normal"
263
- }, [Y(" ("), v, Y(")")])]), c && d("p", {
264
- class: "truncate"
265
- }, [c]), d("p", {
266
- class: "truncate font-mono text-[10px] text-fm-color-typo-tertiary"
267
- }, [t.userId])])]);
268
- }
269
- }, {
270
- accessorKey: "subject",
271
- header: () => o("auditLog.columns.subject"),
272
- meta: {
273
- cellClass: "text-left"
274
- },
275
- cell(l) {
276
- const t = l.row.original, r = z(t.subject);
277
- return r ? d("div", {
278
- class: "text-left"
279
- }, [d("span", null, [r]), d("p", {
280
- class: "text-xs text-fm-color-typo-tertiary"
281
- }, [t.subject])]) : d("div", {
282
- class: "text-left"
283
- }, [t.subject]);
284
- }
285
- }, {
286
- accessorKey: "action",
287
- header: () => o("auditLog.columns.action"),
288
- enableSorting: !1
289
- }, {
290
- accessorKey: "operationLabel",
291
- header: () => o("auditLog.columns.operation"),
292
- enableSorting: !1,
293
- size: 240,
294
- meta: {
295
- cellSpanClass: "audit-log-operation-label-table"
296
- },
297
- cell(l) {
298
- return l.row.original.metadata.operationLabel ?? "-";
299
- }
300
- }, {
301
- accessorKey: "outcome",
302
- header: () => o("auditLog.columns.outcome"),
303
- enableSorting: !1,
304
- cell(l) {
305
- const t = l.row.original;
306
- return d(G.FmChip, {
307
- variant: M[t.outcome] ?? "neutral",
308
- label: t.outcome,
309
- compact: !0
310
- }, null);
311
- }
312
- }];
313
- function K(l, t = !1) {
314
- const [r, v, c] = l.split("-").map(Number), _ = new Date(r, v - 1, c);
315
- return t && _.setDate(_.getDate() + 1), _.toISOString().slice(0, 19).replace("T", " ");
316
- }
317
- async function j() {
318
- var l, t, r, v;
319
- L.value = !0;
320
- try {
321
- const {
322
- startDate: c,
323
- endDate: _
324
- } = I.value, E = (p.value - 1) * q, u = {
325
- limit: q,
326
- offset: E,
327
- // Convert local date boundaries to UTC ISO strings so ClickHouse
328
- // (which stores timestamps in UTC) receives the correct range.
329
- ...c ? {
330
- from: K(c)
331
- } : {},
332
- ..._ ? {
333
- to: K(_, !0)
334
- } : {},
335
- ...(l = C.value) != null && l.length ? {
336
- userIds: C.value
337
- } : {},
338
- ...(t = P.value) != null && t.length ? {
339
- subjects: P.value
340
- } : {},
341
- ...(r = V.value) != null && r.length ? {
342
- actions: V.value
343
- } : {},
344
- ...(v = T.value) != null && v.length ? {
345
- outcomes: T.value
346
- } : {}
347
- }, S = await xe.read(u);
348
- w.value = S, b.value = S.length === q;
349
- } finally {
350
- L.value = !1;
351
- }
352
- }
353
- R(I, () => {
354
- p.value = 1, j();
355
- }), R([C, P, T, V], () => {
356
- p.value = 1, j();
357
- });
358
- async function le() {
359
- p.value > 1 && (p.value--, await j());
360
- }
361
- async function se() {
362
- b.value && (p.value++, await j());
363
- }
364
- function ne(l) {
365
- a.value = l, y.value = !0;
366
- }
367
- function ie() {
368
- y.value = !1, a.value = null;
369
- }
370
- return R(F.currentBusiness, (l) => {
371
- l && (p.value = 1, g.readTeamMembers(), j());
372
- }, {
373
- immediate: !0
374
- }), (l, t) => {
375
- const r = D("FmChip"), v = D("FmDateRangePicker"), c = D("FmTable"), _ = D("FmButton"), E = D("FmSideSheet");
376
- return m(), f(A, null, [d(pe, {
377
- heading: n(o)("auditLog.title")
378
- }, {
379
- default: N(() => [e("div", ye, [e("div", Le, [d(v, {
380
- modelValue: I.value,
381
- "onUpdate:modelValue": t[0] || (t[0] = (u) => I.value = u),
382
- "show-predefined-range": ""
383
- }, {
384
- "trigger-button": N(() => [d(r, {
385
- label: oe.value,
386
- icon: "calendar_month"
387
- }, null, 8, ["label"])]),
388
- _: 1
389
- }, 8, ["modelValue"]), e("div", Se, [d(U, {
390
- modelValue: C.value,
391
- "onUpdate:modelValue": t[1] || (t[1] = (u) => C.value = u),
392
- items: Q.value,
393
- multiple: "",
394
- variant: "dark",
395
- placeholder: n(o)("auditLog.filter.user_placeholder"),
396
- "selected-prefix": n(o)("auditLog.filter.selected_user_prefix"),
397
- "chip-icon": "account_circle"
398
- }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), e("div", ke, [d(U, {
399
- modelValue: P.value,
400
- "onUpdate:modelValue": t[2] || (t[2] = (u) => P.value = u),
401
- items: W.value,
402
- "filter-fn": X,
403
- multiple: "",
404
- variant: "dark",
405
- placeholder: n(o)("auditLog.filter.subject_placeholder"),
406
- "selected-prefix": n(o)("auditLog.filter.selected_subject_prefix"),
407
- "chip-icon": "badge"
408
- }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), e("div", we, [d(U, {
409
- modelValue: V.value,
410
- "onUpdate:modelValue": t[3] || (t[3] = (u) => V.value = u),
411
- items: ee.value,
412
- multiple: "",
413
- variant: "dark",
414
- placeholder: n(o)("auditLog.filter.action_placeholder"),
415
- "selected-prefix": n(o)("auditLog.filter.selected_action_prefix"),
416
- searchable: !1
417
- }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), e("div", Ie, [d(U, {
418
- modelValue: T.value,
419
- "onUpdate:modelValue": t[4] || (t[4] = (u) => T.value = u),
420
- items: te.value,
421
- multiple: "",
422
- variant: "dark",
423
- placeholder: n(o)("auditLog.filter.status_placeholder"),
424
- "selected-prefix": n(o)("auditLog.filter.selected_status_prefix"),
425
- searchable: !1,
426
- "chip-icon": "check_circle"
427
- }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])]), !L.value && B.value.length === 0 ? (m(), $(n(ve), {
428
- key: 0,
429
- title: n(o)("auditLog.noData.title"),
430
- subtitle: n(o)("auditLog.noData.subtitle")
431
- }, null, 8, ["title", "subtitle"])) : (m(), $(fe, {
432
- key: 1
433
- }, {
434
- default: N(() => [e("div", Ce, [d(c, {
435
- "column-defs": ae,
436
- "row-data": B.value,
437
- "page-size": B.value.length,
438
- loading: L.value,
439
- "pin-header-row": "",
440
- "hide-footer": "",
441
- class: "min-h-0 flex-1 cursor-pointer",
442
- onRowClick: t[5] || (t[5] = (u) => ne(u.original))
443
- }, null, 8, ["row-data", "page-size", "loading"]), p.value > 1 || b.value ? (m(), f("div", Pe, [d(_, {
444
- variant: "tertiary",
445
- icon: "chevron_left",
446
- disabled: p.value === 1,
447
- "aria-label": n(o)("auditLog.pagination.prevPage"),
448
- onClick: le
449
- }, null, 8, ["disabled", "aria-label"]), e("span", Te, s(n(o)("auditLog.pagination.page", {
450
- page: p.value
451
- })), 1), d(_, {
452
- variant: "tertiary",
453
- icon: "chevron_right",
454
- disabled: !b.value,
455
- "aria-label": n(o)("auditLog.pagination.nextPage"),
456
- onClick: se
457
- }, null, 8, ["disabled", "aria-label"])])) : x("", !0)])]),
458
- _: 1
459
- }))])]),
460
- _: 1
461
- }, 8, ["heading"]), d(E, {
462
- header: n(o)("auditLog.detail.header"),
463
- "model-value": y.value,
464
- "max-width": 480,
465
- "dismiss-away": "",
466
- "onUpdate:modelValue": t[6] || (t[6] = (u) => {
467
- u || ie();
468
- })
469
- }, {
470
- default: N(() => [a.value ? (m(), f("div", Ve, [e("div", je, [e("div", De, [e("div", Fe, [e("p", Oe, s(a.value.metadata.operationLabel || "-"), 1)]), d(r, {
471
- variant: M[a.value.outcome] ?? "neutral",
472
- label: a.value.outcome,
473
- compact: ""
474
- }, null, 8, ["variant", "label"])]), t[7] || (t[7] = e("hr", {
475
- class: "border-fm-color-border-default"
476
- }, null, -1)), e("div", Ae, [e("div", null, [e("p", Ne, s(n(o)("auditLog.detail.timestamp")), 1), e("p", Ue, s(new Date(a.value.timestamp).toLocaleString()), 1)]), n(g).userIdToName[a.value.userId] ? (m(), f("div", Be, [e("p", Ee, s(n(o)("auditLog.detail.user")), 1), e("p", Re, s(n(g).userIdToName[a.value.userId]), 1)])) : x("", !0), e("div", null, [e("p", qe, s(n(o)("auditLog.detail.email")), 1), e("p", ze, s(n(g).userIdToEmail[a.value.userId] || a.value.userId), 1)]), e("div", null, [e("p", Me, s(n(o)("auditLog.detail.action")), 1), e("p", Ke, s(a.value.action), 1)]), e("div", null, [e("p", $e, s(n(o)("auditLog.detail.subject")), 1), e("p", Ye, s(z(a.value.subject) || a.value.subject), 1)]), a.value.field ? (m(), f("div", Je, [e("p", Ge, s(n(o)("auditLog.detail.field")), 1), e("p", Ze, s(a.value.field), 1)])) : x("", !0), e("div", null, [e("p", He, s(n(o)("auditLog.detail.business")), 1), e("p", Qe, s(a.value.businessId || "-"), 1)]), e("div", null, [e("p", We, s(n(o)("auditLog.detail.restaurant")), 1), e("p", Xe, s(a.value.restaurantId || "-"), 1)])])]), e("div", et, [e("div", tt, [e("p", ot, s(n(o)("auditLog.detail.metadata")), 1)]), t[8] || (t[8] = e("hr", {
477
- class: "border-fm-color-border-default"
478
- }, null, -1)), e("div", at, [a.value.metadata.reason ? (m(), f("div", lt, [e("p", st, s(n(o)("auditLog.detail.reason")), 1), e("p", nt, s(a.value.metadata.reason), 1)])) : x("", !0), e("div", null, [e("p", it, s(n(o)("auditLog.detail.resolvedFrom")), 1), e("p", dt, s(a.value.metadata.resolvedFrom), 1)]), a.value.metadata.permissionSetId ? (m(), f("div", rt, [e("p", ct, s(n(o)("auditLog.detail.permissionSet")), 1), a.value.metadata.resolvedFrom === "systemPermissionSet" ? (m(), f(A, {
479
- key: 0
480
- }, [e("p", ut, s(a.value.metadata.permissionSetName) + " (system)", 1), e("p", mt, s(a.value.metadata.permissionSetId), 1)], 64)) : (m(), f(A, {
481
- key: 1
482
- }, [e("p", ft, s(a.value.metadata.permissionSetName || a.value.metadata.permissionSetId), 1), a.value.metadata.permissionSetName ? (m(), f("p", pt, s(a.value.metadata.permissionSetId), 1)) : x("", !0)], 64))])) : x("", !0), a.value.metadata.trace && a.value.metadata.trace.length > 0 ? (m(), f("div", vt, [e("p", _t, s(n(o)("auditLog.detail.permissionTrace")), 1), e("ol", gt, [(m(!0), f(A, null, re(a.value.metadata.trace, (u, S) => (m(), f("li", {
483
- key: S,
484
- class: "flex items-center gap-6"
485
- }, [e("span", ht, s(S + 1), 1), e("span", bt, s(u), 1), S < a.value.metadata.trace.length - 1 ? (m(), f("span", xt, "→")) : x("", !0)]))), 128))])])) : x("", !0), e("div", null, [e("p", yt, s(n(o)("auditLog.detail.requestMethod")), 1), e("p", Lt, s(a.value.metadata.requestMethod), 1)]), e("div", null, [e("p", St, s(n(o)("auditLog.detail.requestPath")), 1), e("p", kt, s(a.value.metadata.requestPath), 1)]), a.value.metadata.requestBody && Object.keys(a.value.metadata.requestBody).length > 0 ? (m(), f("div", wt, [e("p", It, s(n(o)("auditLog.detail.requestBody")), 1), e("pre", Ct, s(JSON.stringify(a.value.metadata.requestBody, null, 2)), 1)])) : x("", !0)])])])) : x("", !0)]),
486
- _: 1
487
- }, 8, ["header", "model-value"])], 64);
488
- };
489
- }
490
- });
491
- export {
492
- Et as default
493
- };