@feedmepos/mf-hrm-portal 2.0.16-dev.1 → 2.0.16
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-BZPpMthp.js → AuditLogList-iyCwZoot.js} +384 -380
- package/dist/{EmployeeList-DvWJ0QUc.js → EmployeeList-CJvHFQnQ.js} +5 -5
- package/dist/{Main-CWilH1zx.js → Main-Br1NK5Nk.js} +9 -9
- package/dist/{Main-DAWaIqp9.js → Main-C-_jj0hE.js} +4 -4
- package/dist/{Main-BNFGDNdT.js → Main-CVLdj0vm.js} +4 -4
- package/dist/{PermissionSetList-BkRtZkAZ.js → PermissionSetList-4lJbnJsE.js} +5 -5
- package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CGYLUF1m.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DJniPhu1.js} +1049 -1049
- package/dist/{RoleList-D26aCQ4A.js → RoleList-C0NI4ooY.js} +7 -7
- package/dist/{TeamMemberList-Dh3AlL0Q.js → TeamMemberList-CGjxliOv.js} +6 -6
- package/dist/{TimesheetList-DDaK0iJU.js → TimesheetList-Cvco7hQ7.js} +6 -6
- package/dist/{app-BlFL6W1C.js → app-Deq-BbQg.js} +4 -4
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-B81EyB1J.js → dayjs.min-BC7eDcw3.js} +1 -1
- package/dist/{employee-BaOat18O.js → employee-CSb8K1_S.js} +3 -3
- package/dist/{iteration-Cuw1W-W9.js → iteration-CzlBzD5p.js} +2 -2
- package/dist/{lodash-BtkvPA8j.js → lodash-BxgA1s7j.js} +1 -1
- package/dist/{rule-8ylgGfvp.js → rule-BYb8TfeP.js} +2 -2
- package/dist/{timesheet-BpHPcIrb.js → timesheet-BlHG7Fw5.js} +2 -2
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-Bs9JwLL8.js → useAppStore-tV67t5M2.js} +1 -1
- package/dist/{useLoading-ZHDY--I6.js → useLoading-DWaMwG8t.js} +1 -1
- package/dist/{useReportPermissions-CNhcwQO7.js → useReportPermissions-DJvfurhn.js} +3 -3
- package/package.json +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { d as _ } from "./dayjs.min-
|
|
3
|
-
import { useI18n as
|
|
4
|
-
import { f as
|
|
5
|
-
import { components as
|
|
6
|
-
import { g as
|
|
1
|
+
import { defineComponent as Ee, ref as p, computed as L, onMounted as ft, onBeforeUnmount as vt, watch as Q, resolveComponent as E, createElementBlock as y, openBlock as m, createBlock as oe, createCommentVNode as V, createElementVNode as l, Fragment as ee, renderList as se, withCtx as Y, createVNode as u, toDisplayString as i, unref as n, nextTick as pt } from "vue";
|
|
2
|
+
import { d as _ } from "./dayjs.min-BC7eDcw3.js";
|
|
3
|
+
import { useI18n as Ae, useCoreStore as bt } from "@feedmepos/mf-common";
|
|
4
|
+
import { f as Oe, _ as gt } from "./app-Deq-BbQg.js";
|
|
5
|
+
import { components as Ve } from "@feedmepos/ui-library";
|
|
6
|
+
import { g as ht, b as yt } from "./iteration-CzlBzD5p.js";
|
|
7
7
|
import { S as ce } from "./SelectFilter-DUj7GBtT.js";
|
|
8
|
-
import { _ as
|
|
9
|
-
import { _ as
|
|
10
|
-
import { t as
|
|
11
|
-
import { defineStore as
|
|
8
|
+
import { _ as _t } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
|
|
9
|
+
import { _ as xt } from "./index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js";
|
|
10
|
+
import { t as Lt, p as Pe } from "./rule-BYb8TfeP.js";
|
|
11
|
+
import { defineStore as St } from "pinia";
|
|
12
12
|
const ge = [
|
|
13
13
|
{ key: "all", label: "All", subjectPrefixes: [] },
|
|
14
14
|
{ key: "inventory", label: "Inventory", subjectPrefixes: ["business::inventory", "inventory"] },
|
|
@@ -19,40 +19,40 @@ const ge = [
|
|
|
19
19
|
{ key: "crm", label: "CRM", subjectPrefixes: ["business::crm", "crm"] }
|
|
20
20
|
// Add more as modules are revamped with new actionguard:
|
|
21
21
|
// { key: 'restaurantOperation', label: 'Restaurant Operation', subjectPrefixes: ['restaurant'] },
|
|
22
|
-
],
|
|
22
|
+
], kt = "/audit-logs", je = {
|
|
23
23
|
async read(o) {
|
|
24
|
-
var x,
|
|
24
|
+
var x, T, P, I, c;
|
|
25
25
|
const a = {
|
|
26
26
|
limit: (o == null ? void 0 : o.limit) ?? 100,
|
|
27
27
|
offset: (o == null ? void 0 : o.offset) ?? 0,
|
|
28
28
|
...o != null && o.from ? { from: o.from } : {},
|
|
29
29
|
...o != null && o.to ? { to: o.to } : {},
|
|
30
30
|
...(x = o == null ? void 0 : o.userIds) != null && x.length ? { userIds: o.userIds } : {},
|
|
31
|
-
...(
|
|
32
|
-
...(
|
|
33
|
-
...(
|
|
31
|
+
...(T = o == null ? void 0 : o.subjects) != null && T.length ? { subjects: o.subjects } : {},
|
|
32
|
+
...(P = o == null ? void 0 : o.subjectPrefixes) != null && P.length ? { subjectPrefixes: o.subjectPrefixes } : {},
|
|
33
|
+
...(I = o == null ? void 0 : o.actions) != null && I.length ? { actions: o.actions } : {},
|
|
34
34
|
...(c = o == null ? void 0 : o.outcomes) != null && c.length ? { outcomes: o.outcomes } : {}
|
|
35
35
|
};
|
|
36
|
-
return console.log("[AuditLogAPI] request params:", a),
|
|
37
|
-
await
|
|
36
|
+
return console.log("[AuditLogAPI] request params:", a), ht(
|
|
37
|
+
await yt().get(kt, {
|
|
38
38
|
params: a,
|
|
39
39
|
// Serialize arrays as repeated params: key=val1&key=val2
|
|
40
40
|
// (NestJS @Query expects this; axios default adds brackets which break matching)
|
|
41
41
|
paramsSerializer: (s) => {
|
|
42
42
|
const w = new URLSearchParams();
|
|
43
|
-
for (const [
|
|
44
|
-
if (Array.isArray(
|
|
45
|
-
for (const
|
|
46
|
-
else
|
|
43
|
+
for (const [R, g] of Object.entries(s))
|
|
44
|
+
if (Array.isArray(g))
|
|
45
|
+
for (const j of g) w.append(R, String(j));
|
|
46
|
+
else g != null && w.append(R, String(g));
|
|
47
47
|
return console.log("[AuditLogAPI] serialized query string:", w.toString()), w.toString();
|
|
48
48
|
}
|
|
49
49
|
})
|
|
50
50
|
);
|
|
51
51
|
}
|
|
52
|
-
},
|
|
52
|
+
}, wt = { class: "flex h-[46px] items-center gap-8 rounded-sm px-16 hover:bg-fm-color-opacity-sm" }, Mt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ft = {
|
|
53
53
|
"data-more-measure": "",
|
|
54
54
|
class: "flex h-[46px] items-center gap-8 rounded-sm px-16"
|
|
55
|
-
},
|
|
55
|
+
}, It = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Tt = /* @__PURE__ */ Ee({
|
|
56
56
|
__name: "AuditLogModuleTabs",
|
|
57
57
|
props: {
|
|
58
58
|
modelValue: {},
|
|
@@ -60,107 +60,107 @@ const ge = [
|
|
|
60
60
|
},
|
|
61
61
|
emits: ["update:modelValue"],
|
|
62
62
|
setup(o, { emit: a }) {
|
|
63
|
-
const x = o,
|
|
64
|
-
let
|
|
65
|
-
async function
|
|
66
|
-
if (await
|
|
63
|
+
const x = o, T = a, { t: P } = Ae(), I = p(!1), c = p(null), s = p(null), w = p([]), R = p(0), g = p(0);
|
|
64
|
+
let j = null;
|
|
65
|
+
async function D() {
|
|
66
|
+
if (await pt(), !s.value) return;
|
|
67
67
|
const f = s.value.querySelectorAll("[data-tab-measure]");
|
|
68
|
-
w.value = Array.from(f).map((
|
|
68
|
+
w.value = Array.from(f).map((M) => M.offsetWidth);
|
|
69
69
|
const v = s.value.querySelector("[data-more-measure]");
|
|
70
|
-
|
|
70
|
+
R.value = (v == null ? void 0 : v.offsetWidth) ?? 0;
|
|
71
71
|
}
|
|
72
|
-
const
|
|
72
|
+
const J = L(() => {
|
|
73
73
|
const f = x.items.length;
|
|
74
74
|
if (f === 0) return 0;
|
|
75
|
-
if (!
|
|
75
|
+
if (!g.value || w.value.length !== f) return f;
|
|
76
76
|
const v = w.value;
|
|
77
|
-
if (v.reduce((r,
|
|
78
|
-
const
|
|
79
|
-
let
|
|
80
|
-
for (let r = 0; r < f && !(
|
|
81
|
-
|
|
82
|
-
return
|
|
83
|
-
}),
|
|
84
|
-
const f =
|
|
77
|
+
if (v.reduce((r, B) => r + B, 0) <= g.value) return f;
|
|
78
|
+
const F = R.value;
|
|
79
|
+
let z = 0, N = 0;
|
|
80
|
+
for (let r = 0; r < f && !(z + v[r] + F > g.value); r++)
|
|
81
|
+
z += v[r], N++;
|
|
82
|
+
return N;
|
|
83
|
+
}), te = L(() => {
|
|
84
|
+
const f = J.value, v = x.items.length;
|
|
85
85
|
if (f >= v) return [...x.items];
|
|
86
|
-
const
|
|
87
|
-
if (!
|
|
88
|
-
if (f === 0) return [
|
|
89
|
-
const
|
|
90
|
-
let
|
|
91
|
-
for (;
|
|
92
|
-
|
|
93
|
-
return [...x.items.slice(0, Math.max(
|
|
94
|
-
}),
|
|
95
|
-
const f = new Set(
|
|
86
|
+
const M = x.items.slice(0, f), F = x.items.find((h) => h.value === x.modelValue);
|
|
87
|
+
if (!F || M.some((h) => h.value === F.value)) return M;
|
|
88
|
+
if (f === 0) return [F];
|
|
89
|
+
const z = x.items.findIndex((h) => h.value === F.value), N = w.value, r = R.value, B = N[z] ?? 0;
|
|
90
|
+
let H = f, ne = N.slice(0, H - 1).reduce((h, ae) => h + ae, 0);
|
|
91
|
+
for (; H > 1 && ne + B + r > g.value; )
|
|
92
|
+
H--, ne = N.slice(0, H - 1).reduce((h, ae) => h + ae, 0);
|
|
93
|
+
return [...x.items.slice(0, Math.max(H - 1, 0)), F];
|
|
94
|
+
}), $ = L(() => {
|
|
95
|
+
const f = new Set(te.value.map((v) => v.value));
|
|
96
96
|
return x.items.filter((v) => !f.has(v.value));
|
|
97
97
|
});
|
|
98
|
-
function
|
|
99
|
-
|
|
98
|
+
function U(f) {
|
|
99
|
+
I.value = !1, T("update:modelValue", f);
|
|
100
100
|
}
|
|
101
|
-
return
|
|
102
|
-
await
|
|
103
|
-
c.value && (
|
|
104
|
-
}),
|
|
105
|
-
}),
|
|
106
|
-
|
|
107
|
-
}),
|
|
101
|
+
return ft(async () => {
|
|
102
|
+
await D(), c.value && (g.value = c.value.clientWidth, j = new ResizeObserver(() => {
|
|
103
|
+
c.value && (g.value = c.value.clientWidth);
|
|
104
|
+
}), j.observe(c.value));
|
|
105
|
+
}), vt(() => {
|
|
106
|
+
j == null || j.disconnect(), j = null;
|
|
107
|
+
}), Q(
|
|
108
108
|
() => x.items,
|
|
109
109
|
() => {
|
|
110
|
-
|
|
110
|
+
D();
|
|
111
111
|
},
|
|
112
112
|
{ deep: !0 }
|
|
113
113
|
), (f, v) => {
|
|
114
|
-
const
|
|
115
|
-
return m(),
|
|
114
|
+
const M = E("FmTab"), F = E("FmIcon"), z = E("FmMenuItem"), N = E("FmMenu");
|
|
115
|
+
return m(), y("div", {
|
|
116
116
|
ref_key: "containerRef",
|
|
117
117
|
ref: c,
|
|
118
118
|
class: "relative flex w-full flex-row items-center"
|
|
119
119
|
}, [
|
|
120
|
-
(m(!0),
|
|
120
|
+
(m(!0), y(ee, null, se(te.value, (r) => (m(), oe(M, {
|
|
121
121
|
key: r.value,
|
|
122
122
|
"model-value": o.modelValue,
|
|
123
123
|
label: r.label,
|
|
124
124
|
badge: r.badge,
|
|
125
125
|
disabled: r.disabled,
|
|
126
126
|
value: r.value,
|
|
127
|
-
"onUpdate:modelValue":
|
|
127
|
+
"onUpdate:modelValue": U
|
|
128
128
|
}, null, 8, ["model-value", "label", "badge", "disabled", "value"]))), 128)),
|
|
129
|
-
|
|
129
|
+
$.value.length > 0 ? (m(), oe(N, {
|
|
130
130
|
key: 0,
|
|
131
|
-
"show-menu":
|
|
131
|
+
"show-menu": I.value,
|
|
132
132
|
class: "max-w-[360px] min-w-[90px] rounded-sm",
|
|
133
133
|
placement: "bottom-start",
|
|
134
|
-
onMenuChanged: v[0] || (v[0] = (r) =>
|
|
134
|
+
onMenuChanged: v[0] || (v[0] = (r) => I.value = r)
|
|
135
135
|
}, {
|
|
136
|
-
"menu-button":
|
|
137
|
-
l("div",
|
|
138
|
-
u(
|
|
139
|
-
l("span",
|
|
136
|
+
"menu-button": Y(() => [
|
|
137
|
+
l("div", wt, [
|
|
138
|
+
u(F, { name: "more_vert" }),
|
|
139
|
+
l("span", Mt, i(n(P)("auditLog.modules.more")), 1)
|
|
140
140
|
])
|
|
141
141
|
]),
|
|
142
|
-
default:
|
|
143
|
-
(m(!0),
|
|
142
|
+
default: Y(() => [
|
|
143
|
+
(m(!0), y(ee, null, se($.value, (r) => (m(), oe(z, {
|
|
144
144
|
key: r.value,
|
|
145
145
|
"model-value": o.modelValue === r.value,
|
|
146
146
|
label: r.label,
|
|
147
147
|
disabled: r.disabled,
|
|
148
|
-
onClick: (
|
|
148
|
+
onClick: (B) => U(r.value)
|
|
149
149
|
}, null, 8, ["model-value", "label", "disabled", "onClick"]))), 128))
|
|
150
150
|
]),
|
|
151
151
|
_: 1
|
|
152
|
-
}, 8, ["show-menu"])) :
|
|
152
|
+
}, 8, ["show-menu"])) : V("", !0),
|
|
153
153
|
l("div", {
|
|
154
154
|
ref_key: "measurerRef",
|
|
155
155
|
ref: s,
|
|
156
156
|
"aria-hidden": "true",
|
|
157
157
|
class: "pointer-events-none invisible absolute -left-[9999px] -top-[9999px] flex flex-row items-center"
|
|
158
158
|
}, [
|
|
159
|
-
(m(!0),
|
|
159
|
+
(m(!0), y(ee, null, se(o.items, (r) => (m(), y("div", {
|
|
160
160
|
key: `measure-${r.value}`,
|
|
161
161
|
"data-tab-measure": ""
|
|
162
162
|
}, [
|
|
163
|
-
u(
|
|
163
|
+
u(M, {
|
|
164
164
|
"model-value": o.modelValue,
|
|
165
165
|
label: r.label,
|
|
166
166
|
badge: r.badge,
|
|
@@ -168,28 +168,28 @@ const ge = [
|
|
|
168
168
|
value: r.value
|
|
169
169
|
}, null, 8, ["model-value", "label", "badge", "disabled", "value"])
|
|
170
170
|
]))), 128)),
|
|
171
|
-
l("div",
|
|
172
|
-
u(
|
|
173
|
-
l("span",
|
|
171
|
+
l("div", Ft, [
|
|
172
|
+
u(F, { name: "more_vert" }),
|
|
173
|
+
l("span", It, i(n(P)("auditLog.modules.more")), 1)
|
|
174
174
|
])
|
|
175
175
|
], 512)
|
|
176
176
|
], 512);
|
|
177
177
|
};
|
|
178
178
|
}
|
|
179
|
-
}), Dt =
|
|
179
|
+
}), Dt = St("team", () => {
|
|
180
180
|
const o = p([]), a = p(!1), x = L(
|
|
181
181
|
() => Object.fromEntries(o.value.map((c) => [c.doc.userId, c.name]))
|
|
182
|
-
),
|
|
182
|
+
), T = L(
|
|
183
183
|
() => Object.fromEntries(o.value.map((c) => [c.doc.userId, c.email]))
|
|
184
|
-
),
|
|
184
|
+
), P = L(
|
|
185
185
|
() => Object.fromEntries(o.value.map((c) => [c.doc.userId, c.phoneNumber]))
|
|
186
186
|
);
|
|
187
|
-
async function
|
|
187
|
+
async function I({ force: c = !1 } = {}) {
|
|
188
188
|
if (!(!c && o.value.length > 0))
|
|
189
189
|
try {
|
|
190
190
|
a.value = !0;
|
|
191
|
-
const s = await
|
|
192
|
-
o.value = s.sort((w,
|
|
191
|
+
const s = await Lt.readTeamMembers();
|
|
192
|
+
o.value = s.sort((w, R) => w.doc.isOwner ? -1 : w.name.localeCompare(R.name));
|
|
193
193
|
} finally {
|
|
194
194
|
a.value = !1;
|
|
195
195
|
}
|
|
@@ -198,253 +198,257 @@ const ge = [
|
|
|
198
198
|
members: o,
|
|
199
199
|
isLoading: a,
|
|
200
200
|
userIdToName: x,
|
|
201
|
-
userIdToEmail:
|
|
202
|
-
userIdToPhone:
|
|
203
|
-
readTeamMembers:
|
|
201
|
+
userIdToEmail: T,
|
|
202
|
+
userIdToPhone: P,
|
|
203
|
+
readTeamMembers: I
|
|
204
204
|
};
|
|
205
|
-
}),
|
|
205
|
+
}), Ot = {
|
|
206
206
|
class: "flex flex-col gap-4 p-12 w-[260px]"
|
|
207
|
-
}, Ot = {
|
|
208
|
-
class: "text-xs font-semibold text-fm-color-typo-secondary mb-4"
|
|
209
207
|
}, Vt = {
|
|
210
|
-
class: "
|
|
208
|
+
class: "text-xs font-semibold text-fm-color-typo-secondary mb-4"
|
|
211
209
|
}, Pt = {
|
|
212
|
-
class: "
|
|
210
|
+
class: "flex min-h-0 flex-1 flex-col gap-16"
|
|
213
211
|
}, jt = {
|
|
214
|
-
class: "
|
|
212
|
+
class: "space-y-16"
|
|
215
213
|
}, Ct = {
|
|
216
|
-
class: "
|
|
214
|
+
class: "flex flex-wrap items-center gap-8"
|
|
217
215
|
}, Et = {
|
|
218
|
-
key: 0,
|
|
219
216
|
class: "w-fit"
|
|
220
217
|
}, At = {
|
|
218
|
+
key: 0,
|
|
221
219
|
class: "w-fit"
|
|
222
220
|
}, Rt = {
|
|
223
221
|
class: "w-fit"
|
|
224
222
|
}, Ut = {
|
|
225
|
-
class: "
|
|
223
|
+
class: "w-fit"
|
|
226
224
|
}, Nt = {
|
|
225
|
+
class: "flex h-full flex-col"
|
|
226
|
+
}, $t = {
|
|
227
227
|
key: 0,
|
|
228
228
|
class: "flex shrink-0 items-center justify-end border-t border-fm-color-border-default py-4"
|
|
229
|
-
}, $t = {
|
|
230
|
-
class: "text-sm text-fm-color-typo-secondary"
|
|
231
229
|
}, Yt = {
|
|
230
|
+
class: "text-sm text-fm-color-typo-secondary"
|
|
231
|
+
}, zt = {
|
|
232
232
|
key: 0,
|
|
233
233
|
class: "space-y-12 p-4 text-sm"
|
|
234
|
-
}, zt = {
|
|
235
|
-
class: "flex items-start justify-between gap-8 rounded-lg border border-fm-color-border-default p-12"
|
|
236
234
|
}, Bt = {
|
|
237
|
-
class: "
|
|
235
|
+
class: "flex items-start justify-between gap-8 rounded-lg border border-fm-color-border-default p-12"
|
|
238
236
|
}, Kt = {
|
|
239
|
-
class: "
|
|
237
|
+
class: "min-w-0 flex-1"
|
|
240
238
|
}, qt = {
|
|
241
|
-
class: "
|
|
239
|
+
class: "audit-log-operation-label-detail text-base font-bold leading-snug text-fm-color-typo-primary"
|
|
242
240
|
}, Ht = {
|
|
243
|
-
class: "
|
|
241
|
+
class: "rounded-lg border border-fm-color-border-default p-12"
|
|
244
242
|
}, Wt = {
|
|
245
|
-
class: "
|
|
243
|
+
class: "space-y-12"
|
|
246
244
|
}, Jt = {
|
|
247
|
-
class: "font-semibold"
|
|
248
|
-
}, Gt = {
|
|
249
245
|
class: "text-xs text-fm-color-typo-secondary"
|
|
250
|
-
},
|
|
246
|
+
}, Gt = {
|
|
251
247
|
class: "font-semibold"
|
|
252
|
-
},
|
|
248
|
+
}, Xt = {
|
|
253
249
|
class: "text-xs text-fm-color-typo-secondary"
|
|
250
|
+
}, Zt = {
|
|
251
|
+
class: "font-semibold"
|
|
254
252
|
}, Qt = {
|
|
255
|
-
class: "break-all font-semibold"
|
|
256
|
-
}, ea = {
|
|
257
253
|
class: "text-xs text-fm-color-typo-secondary"
|
|
254
|
+
}, ea = {
|
|
255
|
+
class: "break-all font-semibold"
|
|
258
256
|
}, ta = {
|
|
259
|
-
class: "
|
|
257
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
260
258
|
}, aa = {
|
|
261
|
-
|
|
259
|
+
class: "font-semibold"
|
|
262
260
|
}, la = {
|
|
263
|
-
|
|
261
|
+
key: 0
|
|
264
262
|
}, oa = {
|
|
265
|
-
class: "break-all font-mono text-xs font-semibold"
|
|
266
|
-
}, sa = {
|
|
267
263
|
class: "text-xs text-fm-color-typo-secondary"
|
|
268
|
-
},
|
|
264
|
+
}, sa = {
|
|
269
265
|
class: "break-all font-mono text-xs font-semibold"
|
|
270
|
-
},
|
|
266
|
+
}, na = {
|
|
271
267
|
class: "text-xs text-fm-color-typo-secondary"
|
|
268
|
+
}, ia = {
|
|
269
|
+
class: "break-all font-mono text-xs font-semibold"
|
|
272
270
|
}, ra = {
|
|
273
|
-
class: "
|
|
271
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
274
272
|
}, ua = {
|
|
273
|
+
class: "font-semibold"
|
|
274
|
+
}, da = {
|
|
275
275
|
key: 0,
|
|
276
276
|
class: "rounded-lg border border-fm-color-border-default"
|
|
277
|
-
}, da = {
|
|
278
|
-
class: "p-12"
|
|
279
277
|
}, ca = {
|
|
280
|
-
class: "
|
|
278
|
+
class: "p-12"
|
|
281
279
|
}, ma = {
|
|
282
|
-
class: "
|
|
280
|
+
class: "text-base font-bold text-fm-color-typo-primary"
|
|
283
281
|
}, fa = {
|
|
284
|
-
class: "
|
|
282
|
+
class: "space-y-12 p-12"
|
|
285
283
|
}, va = {
|
|
286
|
-
class: "
|
|
284
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
287
285
|
}, pa = {
|
|
288
|
-
class: "
|
|
286
|
+
class: "font-semibold"
|
|
289
287
|
}, ba = {
|
|
290
|
-
class: "
|
|
288
|
+
class: "rounded-lg border border-fm-color-border-default"
|
|
291
289
|
}, ga = {
|
|
292
|
-
class: "
|
|
290
|
+
class: "p-12"
|
|
293
291
|
}, ha = {
|
|
294
|
-
class: "
|
|
292
|
+
class: "text-base font-bold text-fm-color-typo-primary"
|
|
295
293
|
}, ya = {
|
|
296
|
-
class: "
|
|
294
|
+
class: "space-y-12 p-12"
|
|
297
295
|
}, _a = {
|
|
298
|
-
class: "
|
|
296
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
299
297
|
}, xa = {
|
|
300
|
-
|
|
298
|
+
class: "font-semibold"
|
|
301
299
|
}, La = {
|
|
302
|
-
|
|
300
|
+
key: 0
|
|
303
301
|
}, Sa = {
|
|
302
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
303
|
+
}, ka = {
|
|
304
304
|
key: 0,
|
|
305
305
|
class: "font-semibold"
|
|
306
|
-
},
|
|
306
|
+
}, wa = {
|
|
307
307
|
key: 1,
|
|
308
308
|
class: "break-all font-mono text-xs text-fm-color-typo-secondary"
|
|
309
|
-
}, wa = {
|
|
310
|
-
key: 1
|
|
311
309
|
}, Ma = {
|
|
312
|
-
|
|
310
|
+
key: 1
|
|
313
311
|
}, Fa = {
|
|
314
|
-
class: "
|
|
312
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
315
313
|
}, Ia = {
|
|
314
|
+
class: "font-semibold whitespace-pre-line"
|
|
315
|
+
}, Ta = {
|
|
316
316
|
class: "text-xs text-fm-color-typo-secondary"
|
|
317
317
|
}, Da = {
|
|
318
318
|
class: "font-semibold"
|
|
319
|
-
}, Ta = {
|
|
320
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
321
319
|
}, Oa = {
|
|
322
|
-
class: "
|
|
320
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
323
321
|
}, Va = {
|
|
324
|
-
|
|
322
|
+
class: "break-all font-mono text-xs font-semibold"
|
|
325
323
|
}, Pa = {
|
|
326
|
-
|
|
324
|
+
key: 2
|
|
327
325
|
}, ja = {
|
|
328
|
-
class: "
|
|
326
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
329
327
|
}, Ca = {
|
|
330
|
-
class: "
|
|
328
|
+
class: "mt-4 space-y-4"
|
|
331
329
|
}, Ea = {
|
|
332
|
-
class: "text-xs font-
|
|
330
|
+
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"
|
|
333
331
|
}, Aa = {
|
|
332
|
+
class: "text-xs font-semibold"
|
|
333
|
+
}, Ra = {
|
|
334
334
|
key: 0,
|
|
335
335
|
class: "text-fm-color-typo-secondary"
|
|
336
|
-
}, Ra = {
|
|
337
|
-
key: 3
|
|
338
336
|
}, Ua = {
|
|
339
|
-
|
|
337
|
+
key: 3
|
|
340
338
|
}, Na = {
|
|
339
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
340
|
+
}, $a = {
|
|
341
341
|
class: "mt-4 max-h-[400px] overflow-auto rounded bg-gray-100 p-8 font-mono text-xs leading-relaxed shadow-inner whitespace-pre-wrap break-all"
|
|
342
|
-
}, he = 100, ye = 1e3,
|
|
342
|
+
}, he = 100, ye = 1e3, Ya = "YYYY-MM-DD HH:mm", O = "YYYY-MM-DD", Ce = "audit-log-export-fields", al = /* @__PURE__ */ Ee({
|
|
343
343
|
__name: "AuditLogList",
|
|
344
344
|
setup(o) {
|
|
345
345
|
const {
|
|
346
346
|
t: a
|
|
347
|
-
} =
|
|
348
|
-
async function
|
|
349
|
-
const t = Uint8Array.from(atob(e), (S) => S.charCodeAt(0)),
|
|
350
|
-
return k.write(t), k.close(), new Response(
|
|
347
|
+
} = Ae(), x = bt(), T = Dt(), P = p(!1), I = p(!1), c = p([]), s = p(null), w = p(!1);
|
|
348
|
+
async function R(e) {
|
|
349
|
+
const t = Uint8Array.from(atob(e), (S) => S.charCodeAt(0)), b = new DecompressionStream("gzip"), k = b.writable.getWriter();
|
|
350
|
+
return await k.write(t), await k.close(), new Response(b.readable).text();
|
|
351
351
|
}
|
|
352
|
-
const
|
|
353
|
-
|
|
352
|
+
const g = p("");
|
|
353
|
+
let j = 0;
|
|
354
|
+
Q(() => {
|
|
354
355
|
var e, t;
|
|
355
356
|
return (t = (e = s.value) == null ? void 0 : e.metadata) == null ? void 0 : t.requestBody;
|
|
356
357
|
}, async (e) => {
|
|
358
|
+
const t = ++j;
|
|
357
359
|
if (!e) {
|
|
358
|
-
|
|
360
|
+
g.value = "";
|
|
359
361
|
return;
|
|
360
362
|
}
|
|
361
363
|
if (typeof e == "object") {
|
|
362
|
-
|
|
364
|
+
g.value = JSON.stringify(e, null, 2);
|
|
363
365
|
return;
|
|
364
366
|
}
|
|
365
367
|
if (e.startsWith("gzip:")) {
|
|
366
368
|
try {
|
|
367
|
-
const
|
|
368
|
-
|
|
369
|
+
const b = await R(e.slice(5));
|
|
370
|
+
if (t !== j) return;
|
|
371
|
+
g.value = JSON.stringify(JSON.parse(b), null, 2);
|
|
369
372
|
} catch {
|
|
370
|
-
|
|
373
|
+
if (t !== j) return;
|
|
374
|
+
g.value = e;
|
|
371
375
|
}
|
|
372
376
|
return;
|
|
373
377
|
}
|
|
374
378
|
try {
|
|
375
|
-
|
|
379
|
+
g.value = JSON.stringify(JSON.parse(e), null, 2);
|
|
376
380
|
} catch {
|
|
377
|
-
|
|
381
|
+
g.value = e;
|
|
378
382
|
}
|
|
379
383
|
}, {
|
|
380
384
|
immediate: !0
|
|
381
385
|
});
|
|
382
|
-
const
|
|
383
|
-
startDate: `${
|
|
384
|
-
endDate: `${
|
|
385
|
-
}),
|
|
386
|
-
function
|
|
386
|
+
const D = p(1), J = p(!1), te = _().format("YYYY-MM-DD"), $ = p({
|
|
387
|
+
startDate: `${te} 00:00`,
|
|
388
|
+
endDate: `${te} 23:59`
|
|
389
|
+
}), U = p(), f = p(), v = p(), M = p(), F = p("all");
|
|
390
|
+
function z(e) {
|
|
387
391
|
return typeof e == "string" ? [e] : Array.isArray(e) ? e.filter((t) => typeof t == "string") : [];
|
|
388
392
|
}
|
|
389
|
-
const
|
|
393
|
+
const N = L(() => ge.map(({
|
|
390
394
|
key: e
|
|
391
395
|
}) => ({
|
|
392
396
|
label: a(`auditLog.modules.${e}`),
|
|
393
397
|
value: e
|
|
394
|
-
}))),
|
|
398
|
+
}))), r = L(() => ge.find((e) => e.key === F.value) ?? ge[0]), B = L(() => F.value === "all"), H = L(() => T.members.map((e) => ({
|
|
395
399
|
label: e.name,
|
|
396
400
|
value: e.doc.userId
|
|
397
|
-
}))),
|
|
398
|
-
const e =
|
|
401
|
+
}))), ne = L(() => {
|
|
402
|
+
const e = Pe.flatMap((S) => z(S.subject).map((A) => ({
|
|
399
403
|
label: S.label,
|
|
400
|
-
value:
|
|
401
|
-
}))), t = Object.entries(
|
|
402
|
-
label:
|
|
404
|
+
value: A
|
|
405
|
+
}))), t = Object.entries(Oe).map(([S, A]) => ({
|
|
406
|
+
label: A,
|
|
403
407
|
value: S
|
|
404
|
-
})),
|
|
408
|
+
})), b = /* @__PURE__ */ new Set(), k = [];
|
|
405
409
|
for (const S of [...e, ...t])
|
|
406
|
-
|
|
410
|
+
b.has(S.value) || (b.add(S.value), k.push(S));
|
|
407
411
|
return k;
|
|
408
412
|
});
|
|
409
|
-
function
|
|
410
|
-
const
|
|
411
|
-
return e.label.toLowerCase().includes(
|
|
413
|
+
function _e(e, t) {
|
|
414
|
+
const b = t.toLowerCase();
|
|
415
|
+
return e.label.toLowerCase().includes(b) || e.value.replace(/^business::/, "").toLowerCase().includes(b) ? !0 : e.value.toLowerCase().includes(b);
|
|
412
416
|
}
|
|
413
|
-
const
|
|
417
|
+
const h = L(() => ({
|
|
414
418
|
manage: a("auditLog.action.manage"),
|
|
415
419
|
create: a("auditLog.action.create"),
|
|
416
420
|
read: a("auditLog.action.read"),
|
|
417
421
|
update: a("auditLog.action.update"),
|
|
418
422
|
delete: a("auditLog.action.delete")
|
|
419
|
-
})),
|
|
420
|
-
label:
|
|
423
|
+
})), ae = L(() => [{
|
|
424
|
+
label: h.value.manage,
|
|
421
425
|
value: "manage"
|
|
422
426
|
}, {
|
|
423
|
-
label:
|
|
427
|
+
label: h.value.create,
|
|
424
428
|
value: "create"
|
|
425
429
|
}, {
|
|
426
|
-
label:
|
|
430
|
+
label: h.value.read,
|
|
427
431
|
value: "read"
|
|
428
432
|
}, {
|
|
429
|
-
label:
|
|
433
|
+
label: h.value.update,
|
|
430
434
|
value: "update"
|
|
431
435
|
}, {
|
|
432
|
-
label:
|
|
436
|
+
label: h.value.delete,
|
|
433
437
|
value: "delete"
|
|
434
|
-
}]),
|
|
438
|
+
}]), ie = L(() => ({
|
|
435
439
|
allowed: a("auditLog.outcome.success"),
|
|
436
440
|
denied: a("auditLog.outcome.failed"),
|
|
437
441
|
skipped: a("auditLog.outcome.skipped")
|
|
438
|
-
})),
|
|
439
|
-
label:
|
|
442
|
+
})), Re = L(() => [{
|
|
443
|
+
label: ie.value.allowed,
|
|
440
444
|
value: "allowed"
|
|
441
445
|
}, {
|
|
442
|
-
label:
|
|
446
|
+
label: ie.value.denied,
|
|
443
447
|
value: "denied"
|
|
444
448
|
}, {
|
|
445
|
-
label:
|
|
449
|
+
label: ie.value.skipped,
|
|
446
450
|
value: "skipped"
|
|
447
|
-
}]),
|
|
451
|
+
}]), Ue = L(() => ({
|
|
448
452
|
admin: a("auditLog.detail.resolvedFromValue.admin"),
|
|
449
453
|
staff: a("auditLog.detail.resolvedFromValue.staff"),
|
|
450
454
|
permissionSet: a("auditLog.detail.resolvedFromValue.permissionSet"),
|
|
@@ -452,107 +456,107 @@ const ge = [
|
|
|
452
456
|
custom: a("auditLog.detail.resolvedFromValue.custom"),
|
|
453
457
|
"no-match": a("auditLog.detail.resolvedFromValue.noMatch"),
|
|
454
458
|
unknown: a("auditLog.detail.resolvedFromValue.unknown")
|
|
455
|
-
})),
|
|
456
|
-
GET:
|
|
457
|
-
POST:
|
|
458
|
-
PUT:
|
|
459
|
-
PATCH:
|
|
460
|
-
DELETE:
|
|
461
|
-
})),
|
|
459
|
+
})), Ne = L(() => ({
|
|
460
|
+
GET: h.value.read,
|
|
461
|
+
POST: h.value.create,
|
|
462
|
+
PUT: h.value.update,
|
|
463
|
+
PATCH: h.value.update,
|
|
464
|
+
DELETE: h.value.delete
|
|
465
|
+
})), xe = {
|
|
462
466
|
allowed: "success",
|
|
463
467
|
denied: "critical",
|
|
464
468
|
skipped: "warning"
|
|
465
|
-
},
|
|
469
|
+
}, $e = L(() => {
|
|
466
470
|
const {
|
|
467
471
|
startDate: e,
|
|
468
472
|
endDate: t
|
|
469
|
-
} =
|
|
473
|
+
} = $.value;
|
|
470
474
|
return e && t ? `${e} – ${t}` : e || t || a("auditLog.dateRange.placeholder");
|
|
471
|
-
}),
|
|
475
|
+
}), Ye = L(() => [{
|
|
472
476
|
label: a("date.predefinedRanges.today"),
|
|
473
477
|
value: {
|
|
474
|
-
startDate: _().format(
|
|
475
|
-
endDate: _().format(
|
|
478
|
+
startDate: _().format(O),
|
|
479
|
+
endDate: _().format(O)
|
|
476
480
|
}
|
|
477
481
|
}, {
|
|
478
482
|
label: a("date.predefinedRanges.yesterday"),
|
|
479
483
|
value: {
|
|
480
|
-
startDate: _().subtract(1, "day").format(
|
|
481
|
-
endDate: _().subtract(1, "day").format(
|
|
484
|
+
startDate: _().subtract(1, "day").format(O),
|
|
485
|
+
endDate: _().subtract(1, "day").format(O)
|
|
482
486
|
}
|
|
483
487
|
}, {
|
|
484
488
|
label: a("date.predefinedRanges.thisWeek"),
|
|
485
489
|
value: {
|
|
486
|
-
startDate: _().startOf("week").format(
|
|
487
|
-
endDate: _().endOf("week").format(
|
|
490
|
+
startDate: _().startOf("week").format(O),
|
|
491
|
+
endDate: _().endOf("week").format(O)
|
|
488
492
|
}
|
|
489
493
|
}, {
|
|
490
494
|
label: a("date.predefinedRanges.lastWeek"),
|
|
491
495
|
value: {
|
|
492
|
-
startDate: _().subtract(1, "week").startOf("week").format(
|
|
493
|
-
endDate: _().subtract(1, "week").endOf("week").format(
|
|
496
|
+
startDate: _().subtract(1, "week").startOf("week").format(O),
|
|
497
|
+
endDate: _().subtract(1, "week").endOf("week").format(O)
|
|
494
498
|
}
|
|
495
499
|
}, {
|
|
496
500
|
label: a("date.predefinedRanges.last7Days"),
|
|
497
501
|
value: {
|
|
498
|
-
startDate: _().subtract(7, "day").format(
|
|
499
|
-
endDate: _().subtract(1, "day").format(
|
|
502
|
+
startDate: _().subtract(7, "day").format(O),
|
|
503
|
+
endDate: _().subtract(1, "day").format(O)
|
|
500
504
|
}
|
|
501
505
|
}, {
|
|
502
506
|
label: a("date.predefinedRanges.thisMonth"),
|
|
503
507
|
value: {
|
|
504
|
-
startDate: _().startOf("month").format(
|
|
505
|
-
endDate: _().endOf("month").format(
|
|
508
|
+
startDate: _().startOf("month").format(O),
|
|
509
|
+
endDate: _().endOf("month").format(O)
|
|
506
510
|
}
|
|
507
511
|
}, {
|
|
508
512
|
label: a("date.predefinedRanges.lastMonth"),
|
|
509
513
|
value: {
|
|
510
|
-
startDate: _().subtract(1, "month").startOf("month").format(
|
|
511
|
-
endDate: _().subtract(1, "month").endOf("month").format(
|
|
514
|
+
startDate: _().subtract(1, "month").startOf("month").format(O),
|
|
515
|
+
endDate: _().subtract(1, "month").endOf("month").format(O)
|
|
512
516
|
}
|
|
513
517
|
}]);
|
|
514
518
|
function me(e) {
|
|
515
519
|
var t;
|
|
516
|
-
return ((t =
|
|
520
|
+
return ((t = Pe.find((b) => b.subject === e)) == null ? void 0 : t.label) ?? Oe[e];
|
|
517
521
|
}
|
|
518
522
|
function re(e) {
|
|
519
|
-
return
|
|
523
|
+
return T.userIdToName[e.userId] || e.userId;
|
|
520
524
|
}
|
|
521
|
-
function
|
|
522
|
-
return
|
|
525
|
+
function Le(e) {
|
|
526
|
+
return T.userIdToPhone[e.userId] || "-";
|
|
523
527
|
}
|
|
524
|
-
function
|
|
525
|
-
return
|
|
528
|
+
function ze(e) {
|
|
529
|
+
return T.userIdToEmail[e.userId] || "-";
|
|
526
530
|
}
|
|
527
|
-
function
|
|
531
|
+
function Se(e) {
|
|
528
532
|
return _(e).format("DD MMM YYYY, HH:mm");
|
|
529
533
|
}
|
|
530
|
-
function
|
|
534
|
+
function Be(e) {
|
|
531
535
|
return _(e).format("DD MMM YYYY, HH:mm:ss").toUpperCase();
|
|
532
536
|
}
|
|
533
|
-
function
|
|
534
|
-
return
|
|
537
|
+
function ke(e) {
|
|
538
|
+
return h.value[e] ?? e;
|
|
535
539
|
}
|
|
536
540
|
function fe(e) {
|
|
537
|
-
return e.metadata.operationLabel ??
|
|
541
|
+
return e.metadata.operationLabel ?? ke(e.action);
|
|
538
542
|
}
|
|
539
543
|
function ve(e) {
|
|
540
|
-
return
|
|
541
|
-
}
|
|
542
|
-
function Be(e) {
|
|
543
|
-
return Re.value[e] ?? e;
|
|
544
|
+
return ie.value[e];
|
|
544
545
|
}
|
|
545
546
|
function Ke(e) {
|
|
546
|
-
return
|
|
547
|
+
return Ue.value[e] ?? e;
|
|
547
548
|
}
|
|
548
|
-
function
|
|
549
|
+
function qe(e) {
|
|
550
|
+
return e.metadata.requestMethod ? Ne.value[e.metadata.requestMethod] ?? e.metadata.requestMethod : ke(e.action);
|
|
551
|
+
}
|
|
552
|
+
function we(e) {
|
|
549
553
|
const t = String(e ?? "");
|
|
550
554
|
return `"${(/^[=+\-@\t\r]/.test(t) ? `'${t}` : t).replace(/"/g, '""')}"`;
|
|
551
555
|
}
|
|
552
556
|
const pe = [{
|
|
553
557
|
key: "timestamp",
|
|
554
558
|
labelKey: "auditLog.exportFields.timestamp",
|
|
555
|
-
getValue: (e) =>
|
|
559
|
+
getValue: (e) => Se(e.timestamp),
|
|
556
560
|
defaultSelected: !0
|
|
557
561
|
}, {
|
|
558
562
|
key: "userName",
|
|
@@ -562,7 +566,7 @@ const ge = [
|
|
|
562
566
|
}, {
|
|
563
567
|
key: "userPhone",
|
|
564
568
|
labelKey: "auditLog.exportFields.userPhone",
|
|
565
|
-
getValue: (e) =>
|
|
569
|
+
getValue: (e) => Le(e),
|
|
566
570
|
defaultSelected: !0
|
|
567
571
|
}, {
|
|
568
572
|
key: "subject",
|
|
@@ -624,9 +628,9 @@ const ge = [
|
|
|
624
628
|
},
|
|
625
629
|
defaultSelected: !1
|
|
626
630
|
}];
|
|
627
|
-
function
|
|
631
|
+
function He() {
|
|
628
632
|
try {
|
|
629
|
-
const e = localStorage.getItem(
|
|
633
|
+
const e = localStorage.getItem(Ce);
|
|
630
634
|
if (e) {
|
|
631
635
|
const t = JSON.parse(e);
|
|
632
636
|
if (Array.isArray(t) && t.length > 0) return new Set(t);
|
|
@@ -635,74 +639,74 @@ const ge = [
|
|
|
635
639
|
}
|
|
636
640
|
return new Set(pe.filter((e) => e.defaultSelected).map((e) => e.key));
|
|
637
641
|
}
|
|
638
|
-
const
|
|
639
|
-
function
|
|
640
|
-
const t = new Set(
|
|
642
|
+
const G = p(He());
|
|
643
|
+
function We(e) {
|
|
644
|
+
const t = new Set(G.value);
|
|
641
645
|
if (t.has(e)) {
|
|
642
646
|
if (t.size <= 1) return;
|
|
643
647
|
t.delete(e);
|
|
644
648
|
} else
|
|
645
649
|
t.add(e);
|
|
646
|
-
|
|
650
|
+
G.value = t;
|
|
647
651
|
try {
|
|
648
|
-
localStorage.setItem(
|
|
652
|
+
localStorage.setItem(Ce, JSON.stringify([...t]));
|
|
649
653
|
} catch {
|
|
650
654
|
}
|
|
651
655
|
}
|
|
652
|
-
async function
|
|
653
|
-
var e, t,
|
|
654
|
-
if (!
|
|
655
|
-
|
|
656
|
+
async function Je() {
|
|
657
|
+
var e, t, b, k, S, A;
|
|
658
|
+
if (!I.value) {
|
|
659
|
+
I.value = !0;
|
|
656
660
|
try {
|
|
657
661
|
const {
|
|
658
|
-
startDate:
|
|
659
|
-
endDate:
|
|
660
|
-
} =
|
|
661
|
-
...
|
|
662
|
-
from: ue(
|
|
662
|
+
startDate: K,
|
|
663
|
+
endDate: q
|
|
664
|
+
} = $.value, W = r.value.subjectPrefixes, de = (/* @__PURE__ */ new Date()).toISOString().slice(0, 19).replace("T", " "), d = q ? ue(q) : null, Z = d && d < de ? d : de, tt = {
|
|
665
|
+
...K ? {
|
|
666
|
+
from: ue(K)
|
|
663
667
|
} : {},
|
|
664
|
-
to:
|
|
665
|
-
...(e =
|
|
666
|
-
userIds:
|
|
668
|
+
to: Z,
|
|
669
|
+
...(e = U.value) != null && e.length ? {
|
|
670
|
+
userIds: U.value
|
|
667
671
|
} : {},
|
|
668
|
-
...
|
|
669
|
-
subjects:
|
|
672
|
+
...B.value && ((t = f.value) != null && t.length) ? {
|
|
673
|
+
subjects: f.value
|
|
670
674
|
} : {},
|
|
671
|
-
...
|
|
672
|
-
subjectPrefixes: [...
|
|
675
|
+
...W.length ? {
|
|
676
|
+
subjectPrefixes: [...W]
|
|
673
677
|
} : {},
|
|
674
|
-
...(
|
|
675
|
-
actions:
|
|
678
|
+
...(b = M.value) != null && b.length ? {
|
|
679
|
+
actions: M.value
|
|
676
680
|
} : {},
|
|
677
|
-
...(k =
|
|
678
|
-
outcomes:
|
|
681
|
+
...(k = v.value) != null && k.length ? {
|
|
682
|
+
outcomes: v.value
|
|
679
683
|
} : {}
|
|
680
|
-
},
|
|
681
|
-
let
|
|
684
|
+
}, Me = [];
|
|
685
|
+
let Fe = 0;
|
|
682
686
|
for (; ; ) {
|
|
683
|
-
const
|
|
684
|
-
...
|
|
687
|
+
const C = await je.read({
|
|
688
|
+
...tt,
|
|
685
689
|
limit: ye,
|
|
686
|
-
offset:
|
|
690
|
+
offset: Fe
|
|
687
691
|
});
|
|
688
|
-
if (
|
|
689
|
-
|
|
692
|
+
if (Me.push(...C), C.length < ye) break;
|
|
693
|
+
Fe += ye;
|
|
690
694
|
}
|
|
691
|
-
const
|
|
692
|
-
`),
|
|
695
|
+
const Ie = pe.filter((C) => G.value.has(C.key)), at = Ie.map((C) => a(C.labelKey)), lt = Me.map((C) => Ie.map((mt) => mt.getValue(C) ?? "")), be = -(/* @__PURE__ */ new Date()).getTimezoneOffset(), ot = be >= 0 ? "+" : "-", st = String(Math.floor(Math.abs(be) / 60)).padStart(2, "0"), nt = String(Math.abs(be) % 60).padStart(2, "0"), it = `UTC${ot}${st}:${nt}`, Te = ((S = x.currentBusiness.value) == null ? void 0 : S.name) || "", rt = [K, q].filter(Boolean).join(" – "), ut = [...[[a("auditLog.title")], [`${a("auditLog.frontMatter.date")}: ${rt}`], ...Te ? [[`${a("auditLog.frontMatter.business")}: ${Te}`]] : [], [`${a("auditLog.frontMatter.generatedBy")}: ${_().format("DD MMM YYYY, HH:mm")} (${it})`], []].map((C) => C.map(we).join(",")), ...[at, ...lt].map((C) => C.map(we).join(","))].join(`
|
|
696
|
+
`), dt = `audit-log_${(((A = x.currentBusiness.value) == null ? void 0 : A.name) || "business").replace(/[^a-z0-9_-]+/gi, "_")}_${_().format("YYYYMMDD_HHmmss")}.csv`, ct = new Blob([`\uFEFF${ut}`], {
|
|
693
697
|
type: "text/csv;charset=utf-8;"
|
|
694
|
-
}), De = window.URL.createObjectURL(
|
|
695
|
-
le.href = De, le.download =
|
|
698
|
+
}), De = window.URL.createObjectURL(ct), le = document.createElement("a");
|
|
699
|
+
le.href = De, le.download = dt, document.body.appendChild(le), le.click(), le.remove(), window.URL.revokeObjectURL(De);
|
|
696
700
|
} finally {
|
|
697
|
-
|
|
701
|
+
I.value = !1;
|
|
698
702
|
}
|
|
699
703
|
}
|
|
700
704
|
}
|
|
701
|
-
const
|
|
705
|
+
const Ge = [{
|
|
702
706
|
accessorKey: "timestamp",
|
|
703
707
|
header: () => a("auditLog.columns.timestamp"),
|
|
704
708
|
cell(e) {
|
|
705
|
-
return
|
|
709
|
+
return Se(e.row.original.timestamp);
|
|
706
710
|
}
|
|
707
711
|
}, {
|
|
708
712
|
accessorKey: "userId",
|
|
@@ -713,7 +717,7 @@ const ge = [
|
|
|
713
717
|
const t = e.row.original;
|
|
714
718
|
return u("div", {
|
|
715
719
|
class: "flex items-center gap-8"
|
|
716
|
-
}, [u(
|
|
720
|
+
}, [u(Ve.FmAvatar, {
|
|
717
721
|
initials: re(t),
|
|
718
722
|
size: "sm",
|
|
719
723
|
class: "shrink-0"
|
|
@@ -723,7 +727,7 @@ const ge = [
|
|
|
723
727
|
class: "truncate font-semibold"
|
|
724
728
|
}, [re(t)]), u("p", {
|
|
725
729
|
class: "truncate text-fm-color-typo-secondary"
|
|
726
|
-
}, [
|
|
730
|
+
}, [Le(t)])])]);
|
|
727
731
|
}
|
|
728
732
|
}, {
|
|
729
733
|
accessorKey: "subject",
|
|
@@ -754,194 +758,194 @@ const ge = [
|
|
|
754
758
|
enableSorting: !1,
|
|
755
759
|
cell(e) {
|
|
756
760
|
const t = e.row.original;
|
|
757
|
-
return u(
|
|
758
|
-
variant:
|
|
761
|
+
return u(Ve.FmChip, {
|
|
762
|
+
variant: xe[t.outcome] ?? "neutral",
|
|
759
763
|
label: ve(t.outcome),
|
|
760
764
|
compact: !0
|
|
761
765
|
}, null);
|
|
762
766
|
}
|
|
763
767
|
}];
|
|
764
768
|
function ue(e) {
|
|
765
|
-
const t = _(e,
|
|
769
|
+
const t = _(e, Ya);
|
|
766
770
|
return new Date(t.year(), t.month(), t.date(), t.hour(), t.minute(), 0).toISOString().slice(0, 19).replace("T", " ");
|
|
767
771
|
}
|
|
768
|
-
async function
|
|
769
|
-
var e, t,
|
|
770
|
-
|
|
772
|
+
async function X() {
|
|
773
|
+
var e, t, b, k;
|
|
774
|
+
P.value = !0;
|
|
771
775
|
try {
|
|
772
776
|
const {
|
|
773
777
|
startDate: S,
|
|
774
|
-
endDate:
|
|
775
|
-
} =
|
|
778
|
+
endDate: A
|
|
779
|
+
} = $.value, K = (D.value - 1) * he, q = r.value.subjectPrefixes, W = await je.read({
|
|
776
780
|
limit: he,
|
|
777
|
-
offset:
|
|
781
|
+
offset: K,
|
|
778
782
|
...S ? {
|
|
779
783
|
from: ue(S)
|
|
780
784
|
} : {},
|
|
781
|
-
...
|
|
782
|
-
to: ue(
|
|
785
|
+
...A ? {
|
|
786
|
+
to: ue(A)
|
|
783
787
|
} : {},
|
|
784
|
-
...(e =
|
|
785
|
-
userIds:
|
|
788
|
+
...(e = U.value) != null && e.length ? {
|
|
789
|
+
userIds: U.value
|
|
786
790
|
} : {},
|
|
787
|
-
...
|
|
788
|
-
subjects:
|
|
791
|
+
...B.value && ((t = f.value) != null && t.length) ? {
|
|
792
|
+
subjects: f.value
|
|
789
793
|
} : {},
|
|
790
|
-
...
|
|
791
|
-
subjectPrefixes: [...
|
|
794
|
+
...q.length ? {
|
|
795
|
+
subjectPrefixes: [...q]
|
|
792
796
|
} : {},
|
|
793
|
-
...(
|
|
794
|
-
actions:
|
|
797
|
+
...(b = M.value) != null && b.length ? {
|
|
798
|
+
actions: M.value
|
|
795
799
|
} : {},
|
|
796
|
-
...(k =
|
|
797
|
-
outcomes:
|
|
800
|
+
...(k = v.value) != null && k.length ? {
|
|
801
|
+
outcomes: v.value
|
|
798
802
|
} : {}
|
|
799
803
|
});
|
|
800
|
-
c.value =
|
|
804
|
+
c.value = W, J.value = W.length === he;
|
|
801
805
|
} finally {
|
|
802
|
-
|
|
806
|
+
P.value = !1;
|
|
803
807
|
}
|
|
804
808
|
}
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
}),
|
|
808
|
-
|
|
809
|
-
}),
|
|
810
|
-
|
|
809
|
+
Q($, () => {
|
|
810
|
+
D.value = 1, X();
|
|
811
|
+
}), Q([U, f, v, M], () => {
|
|
812
|
+
D.value = 1, X();
|
|
813
|
+
}), Q(F, () => {
|
|
814
|
+
D.value = 1, X();
|
|
811
815
|
});
|
|
812
|
-
async function Ge() {
|
|
813
|
-
h.value > 1 && (h.value--, await Q());
|
|
814
|
-
}
|
|
815
816
|
async function Xe() {
|
|
816
|
-
|
|
817
|
+
D.value > 1 && (D.value--, await X());
|
|
818
|
+
}
|
|
819
|
+
async function Ze() {
|
|
820
|
+
J.value && (D.value++, await X());
|
|
817
821
|
}
|
|
818
|
-
function
|
|
822
|
+
function Qe(e) {
|
|
819
823
|
s.value = e, w.value = !0;
|
|
820
824
|
}
|
|
821
|
-
function
|
|
825
|
+
function et() {
|
|
822
826
|
w.value = !1, s.value = null;
|
|
823
827
|
}
|
|
824
|
-
return
|
|
825
|
-
e && (
|
|
828
|
+
return Q(x.currentBusiness, (e) => {
|
|
829
|
+
e && (D.value = 1, T.readTeamMembers(), X());
|
|
826
830
|
}, {
|
|
827
831
|
immediate: !0
|
|
828
832
|
}), (e, t) => {
|
|
829
|
-
const
|
|
830
|
-
return m(),
|
|
833
|
+
const b = E("FmSpacer"), k = E("FmButton"), S = E("FmMenuItem"), A = E("FmMenu"), K = E("FmChip"), q = E("FmDateRangePicker"), W = E("FmTable"), de = E("FmSideSheet");
|
|
834
|
+
return m(), y(ee, null, [u(_t, {
|
|
831
835
|
heading: n(a)("auditLog.title")
|
|
832
836
|
}, {
|
|
833
|
-
"append-heading":
|
|
837
|
+
"append-heading": Y(() => [u(b), u(k, {
|
|
834
838
|
variant: "primary",
|
|
835
839
|
"prepend-icon": "upload",
|
|
836
840
|
label: n(a)("auditLog.export"),
|
|
837
|
-
disabled: c.value.length === 0 ||
|
|
838
|
-
loading:
|
|
839
|
-
onClick:
|
|
840
|
-
}, null, 8, ["label", "disabled", "loading"]), u(
|
|
841
|
+
disabled: c.value.length === 0 || I.value || n(T).isLoading || n(T).members.length === 0,
|
|
842
|
+
loading: I.value,
|
|
843
|
+
onClick: Je
|
|
844
|
+
}, null, 8, ["label", "disabled", "loading"]), u(A, {
|
|
841
845
|
"close-on-click": !1,
|
|
842
846
|
"z-index": 50
|
|
843
847
|
}, {
|
|
844
|
-
"menu-button":
|
|
848
|
+
"menu-button": Y(() => [u(k, {
|
|
845
849
|
variant: "tertiary",
|
|
846
850
|
icon: "settings",
|
|
847
851
|
"aria-label": n(a)("auditLog.exportSettings.title"),
|
|
848
|
-
disabled:
|
|
852
|
+
disabled: I.value
|
|
849
853
|
}, null, 8, ["aria-label", "disabled"])]),
|
|
850
|
-
default:
|
|
854
|
+
default: Y(() => [l("div", Ot, [l("p", Vt, i(n(a)("auditLog.exportSettings.title")), 1), (m(), y(ee, null, se(pe, (d) => u(S, {
|
|
851
855
|
key: d.key,
|
|
852
856
|
label: n(a)(d.labelKey),
|
|
853
857
|
"has-checkbox": "",
|
|
854
|
-
"model-value":
|
|
855
|
-
disabled:
|
|
856
|
-
onClick: (
|
|
858
|
+
"model-value": G.value.has(d.key),
|
|
859
|
+
disabled: G.value.has(d.key) && G.value.size === 1,
|
|
860
|
+
onClick: (Z) => We(d.key)
|
|
857
861
|
}, null, 8, ["label", "model-value", "disabled", "onClick"])), 64))])]),
|
|
858
862
|
_: 1
|
|
859
863
|
})]),
|
|
860
|
-
default:
|
|
861
|
-
modelValue:
|
|
862
|
-
"onUpdate:modelValue": t[0] || (t[0] = (d) =>
|
|
863
|
-
items:
|
|
864
|
-
}, null, 8, ["modelValue", "items"]), l("div",
|
|
865
|
-
modelValue:
|
|
866
|
-
"onUpdate:modelValue": t[1] || (t[1] = (d) =>
|
|
864
|
+
default: Y(() => [l("div", Pt, [l("div", jt, [u(Tt, {
|
|
865
|
+
modelValue: F.value,
|
|
866
|
+
"onUpdate:modelValue": t[0] || (t[0] = (d) => F.value = d),
|
|
867
|
+
items: N.value
|
|
868
|
+
}, null, 8, ["modelValue", "items"]), l("div", Ct, [u(q, {
|
|
869
|
+
modelValue: $.value,
|
|
870
|
+
"onUpdate:modelValue": t[1] || (t[1] = (d) => $.value = d),
|
|
867
871
|
"show-predefined-range": "",
|
|
868
872
|
"show-time": "",
|
|
869
|
-
"predefined-range":
|
|
873
|
+
"predefined-range": Ye.value
|
|
870
874
|
}, {
|
|
871
|
-
"trigger-button":
|
|
872
|
-
label:
|
|
875
|
+
"trigger-button": Y(() => [u(K, {
|
|
876
|
+
label: $e.value,
|
|
873
877
|
icon: "calendar_month"
|
|
874
878
|
}, null, 8, ["label"])]),
|
|
875
879
|
_: 1
|
|
876
|
-
}, 8, ["modelValue", "predefined-range"]), l("div",
|
|
877
|
-
modelValue:
|
|
878
|
-
"onUpdate:modelValue": t[2] || (t[2] = (d) =>
|
|
879
|
-
items:
|
|
880
|
+
}, 8, ["modelValue", "predefined-range"]), l("div", Et, [u(ce, {
|
|
881
|
+
modelValue: U.value,
|
|
882
|
+
"onUpdate:modelValue": t[2] || (t[2] = (d) => U.value = d),
|
|
883
|
+
items: H.value,
|
|
880
884
|
multiple: "",
|
|
881
885
|
variant: "dark",
|
|
882
886
|
placeholder: n(a)("auditLog.filter.user_placeholder"),
|
|
883
887
|
"selected-prefix": n(a)("auditLog.filter.selected_user_prefix"),
|
|
884
888
|
"chip-icon": "account_circle"
|
|
885
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]),
|
|
886
|
-
modelValue:
|
|
887
|
-
"onUpdate:modelValue": t[3] || (t[3] = (d) =>
|
|
888
|
-
items:
|
|
889
|
-
"filter-fn":
|
|
889
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), B.value ? (m(), y("div", At, [u(ce, {
|
|
890
|
+
modelValue: f.value,
|
|
891
|
+
"onUpdate:modelValue": t[3] || (t[3] = (d) => f.value = d),
|
|
892
|
+
items: ne.value,
|
|
893
|
+
"filter-fn": _e,
|
|
890
894
|
multiple: "",
|
|
891
895
|
variant: "dark",
|
|
892
896
|
placeholder: n(a)("auditLog.filter.subject_placeholder"),
|
|
893
897
|
"selected-prefix": n(a)("auditLog.filter.selected_subject_prefix"),
|
|
894
898
|
"chip-icon": "badge"
|
|
895
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])) :
|
|
896
|
-
modelValue:
|
|
897
|
-
"onUpdate:modelValue": t[4] || (t[4] = (d) =>
|
|
898
|
-
items:
|
|
899
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])) : V("", !0), l("div", Rt, [u(ce, {
|
|
900
|
+
modelValue: M.value,
|
|
901
|
+
"onUpdate:modelValue": t[4] || (t[4] = (d) => M.value = d),
|
|
902
|
+
items: ae.value,
|
|
899
903
|
multiple: "",
|
|
900
904
|
variant: "dark",
|
|
901
905
|
placeholder: n(a)("auditLog.filter.action_placeholder"),
|
|
902
906
|
"selected-prefix": n(a)("auditLog.filter.selected_action_prefix"),
|
|
903
907
|
searchable: !1
|
|
904
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), l("div",
|
|
905
|
-
modelValue:
|
|
906
|
-
"onUpdate:modelValue": t[5] || (t[5] = (d) =>
|
|
907
|
-
items:
|
|
908
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), l("div", Ut, [u(ce, {
|
|
909
|
+
modelValue: v.value,
|
|
910
|
+
"onUpdate:modelValue": t[5] || (t[5] = (d) => v.value = d),
|
|
911
|
+
items: Re.value,
|
|
908
912
|
multiple: "",
|
|
909
913
|
variant: "dark",
|
|
910
914
|
placeholder: n(a)("auditLog.filter.status_placeholder"),
|
|
911
915
|
"selected-prefix": n(a)("auditLog.filter.selected_status_prefix"),
|
|
912
916
|
searchable: !1,
|
|
913
917
|
"chip-icon": "check_circle"
|
|
914
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])])]), !
|
|
918
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])])]), !P.value && c.value.length === 0 ? (m(), oe(n(xt), {
|
|
915
919
|
key: 0,
|
|
916
920
|
title: n(a)("auditLog.noData.title"),
|
|
917
921
|
subtitle: n(a)("auditLog.noData.subtitle")
|
|
918
|
-
}, null, 8, ["title", "subtitle"])) : (m(), oe(
|
|
922
|
+
}, null, 8, ["title", "subtitle"])) : (m(), oe(gt, {
|
|
919
923
|
key: 1
|
|
920
924
|
}, {
|
|
921
|
-
default:
|
|
922
|
-
"column-defs":
|
|
925
|
+
default: Y(() => [l("div", Nt, [u(W, {
|
|
926
|
+
"column-defs": Ge,
|
|
923
927
|
"row-data": c.value,
|
|
924
928
|
"page-size": c.value.length,
|
|
925
|
-
loading:
|
|
929
|
+
loading: P.value,
|
|
926
930
|
"pin-header-row": "",
|
|
927
931
|
"hide-footer": "",
|
|
928
932
|
class: "min-h-0 flex-1 cursor-pointer",
|
|
929
|
-
onRowClick: t[6] || (t[6] = (d) =>
|
|
930
|
-
}, null, 8, ["row-data", "page-size", "loading"]),
|
|
933
|
+
onRowClick: t[6] || (t[6] = (d) => Qe(d.original))
|
|
934
|
+
}, null, 8, ["row-data", "page-size", "loading"]), D.value > 1 || J.value ? (m(), y("div", $t, [u(k, {
|
|
931
935
|
variant: "tertiary",
|
|
932
936
|
icon: "chevron_left",
|
|
933
|
-
disabled:
|
|
937
|
+
disabled: D.value === 1,
|
|
934
938
|
"aria-label": n(a)("auditLog.pagination.prevPage"),
|
|
935
|
-
onClick:
|
|
936
|
-
}, null, 8, ["disabled", "aria-label"]), l("span",
|
|
937
|
-
page:
|
|
939
|
+
onClick: Xe
|
|
940
|
+
}, null, 8, ["disabled", "aria-label"]), l("span", Yt, i(n(a)("auditLog.pagination.page", {
|
|
941
|
+
page: D.value
|
|
938
942
|
})), 1), u(k, {
|
|
939
943
|
variant: "tertiary",
|
|
940
944
|
icon: "chevron_right",
|
|
941
|
-
disabled: !
|
|
945
|
+
disabled: !J.value,
|
|
942
946
|
"aria-label": n(a)("auditLog.pagination.nextPage"),
|
|
943
|
-
onClick:
|
|
944
|
-
}, null, 8, ["disabled", "aria-label"])])) :
|
|
947
|
+
onClick: Ze
|
|
948
|
+
}, null, 8, ["disabled", "aria-label"])])) : V("", !0)])]),
|
|
945
949
|
_: 1
|
|
946
950
|
}))])]),
|
|
947
951
|
_: 1
|
|
@@ -951,26 +955,26 @@ const ge = [
|
|
|
951
955
|
"max-width": 480,
|
|
952
956
|
"dismiss-away": "",
|
|
953
957
|
"onUpdate:modelValue": t[7] || (t[7] = (d) => {
|
|
954
|
-
d ||
|
|
958
|
+
d || et();
|
|
955
959
|
})
|
|
956
960
|
}, {
|
|
957
|
-
default:
|
|
958
|
-
variant:
|
|
961
|
+
default: Y(() => [s.value ? (m(), y("div", zt, [l("div", Bt, [l("div", Kt, [l("p", qt, i(fe(s.value)), 1)]), u(K, {
|
|
962
|
+
variant: xe[s.value.outcome] ?? "neutral",
|
|
959
963
|
label: ve(s.value.outcome),
|
|
960
964
|
compact: ""
|
|
961
|
-
}, null, 8, ["variant", "label"])]), l("div",
|
|
965
|
+
}, null, 8, ["variant", "label"])]), l("div", Ht, [l("div", Wt, [l("div", null, [l("p", Jt, i(n(a)("auditLog.detail.date")), 1), l("p", Gt, i(Be(s.value.timestamp)), 1)]), l("div", null, [l("p", Xt, i(n(a)("auditLog.detail.user")), 1), l("p", Zt, i(re(s.value)), 1)]), l("div", null, [l("p", Qt, i(n(a)("auditLog.detail.email")), 1), l("p", ea, i(ze(s.value)), 1)]), l("div", null, [l("p", ta, i(n(a)("auditLog.detail.role")), 1), l("p", aa, i(me(s.value.subject) || s.value.subject), 1)]), s.value.field ? (m(), y("div", la, [l("p", oa, i(n(a)("auditLog.detail.field")), 1), l("p", sa, i(s.value.field), 1)])) : V("", !0), l("div", null, [l("p", na, i(n(a)("auditLog.detail.business")), 1), l("p", ia, i(s.value.businessId || "-"), 1)]), l("div", null, [l("p", ra, i(n(a)("auditLog.detail.restaurant")), 1), l("p", ua, i(s.value.restaurantId || "-"), 1)])])]), s.value.metadata.operationLabel ? (m(), y("div", da, [l("div", ca, [l("p", ma, i(n(a)("auditLog.detail.changeDetails")), 1)]), t[8] || (t[8] = l("hr", {
|
|
962
966
|
class: "border-fm-color-border-default"
|
|
963
|
-
}, null, -1)), l("div",
|
|
967
|
+
}, null, -1)), l("div", fa, [l("div", null, [l("p", va, i(n(a)("auditLog.detail.eventType")), 1), l("p", pa, i(s.value.metadata.operationLabel), 1)])])])) : V("", !0), l("div", ba, [l("div", ga, [l("p", ha, i(n(a)("auditLog.detail.metadata")), 1)]), t[9] || (t[9] = l("hr", {
|
|
964
968
|
class: "border-fm-color-border-default"
|
|
965
|
-
}, null, -1)), l("div",
|
|
966
|
-
key:
|
|
969
|
+
}, null, -1)), l("div", ya, [l("div", null, [l("p", _a, i(n(a)("auditLog.detail.resolvedFrom")), 1), l("p", xa, i(Ke(s.value.metadata.resolvedFrom)), 1)]), (s.value.metadata.resolvedFrom === "permissionSet" || s.value.metadata.resolvedFrom === "systemPermissionSet") && (s.value.metadata.permissionSetName || s.value.metadata.permissionSetId) ? (m(), y("div", La, [l("p", Sa, i(n(a)("auditLog.detail.permissionSet")), 1), s.value.metadata.permissionSetName ? (m(), y("p", ka, i(s.value.metadata.permissionSetName), 1)) : V("", !0), s.value.metadata.permissionSetId ? (m(), y("p", wa, i(s.value.metadata.permissionSetId), 1)) : V("", !0)])) : V("", !0), s.value.metadata.reason ? (m(), y("div", Ma, [l("p", Fa, i(n(a)("auditLog.detail.reason")), 1), l("p", Ia, i(s.value.metadata.reason), 1)])) : V("", !0), l("div", null, [l("p", Ta, i(n(a)("auditLog.detail.requestMethod")), 1), l("p", Da, i(qe(s.value)), 1)]), l("div", null, [l("p", Oa, i(n(a)("auditLog.detail.requestPath")), 1), l("p", Va, i(s.value.metadata.requestPath || "-"), 1)]), s.value.metadata.trace && s.value.metadata.trace.length > 0 ? (m(), y("div", Pa, [l("p", ja, i(n(a)("auditLog.detail.permissionTrace")), 1), l("ol", Ca, [(m(!0), y(ee, null, se(s.value.metadata.trace, (d, Z) => (m(), y("li", {
|
|
970
|
+
key: Z,
|
|
967
971
|
class: "flex items-center gap-6"
|
|
968
|
-
}, [l("span",
|
|
972
|
+
}, [l("span", Ea, i(Z + 1), 1), l("span", Aa, i(d), 1), Z < s.value.metadata.trace.length - 1 ? (m(), y("span", Ra, "→")) : V("", !0)]))), 128))])])) : V("", !0), g.value ? (m(), y("div", Ua, [l("p", Na, i(n(a)("auditLog.detail.requestBody")), 1), l("pre", $a, i(g.value), 1)])) : V("", !0)])])])) : V("", !0)]),
|
|
969
973
|
_: 1
|
|
970
974
|
}, 8, ["header", "model-value"])], 64);
|
|
971
975
|
};
|
|
972
976
|
}
|
|
973
977
|
});
|
|
974
978
|
export {
|
|
975
|
-
|
|
979
|
+
al as default
|
|
976
980
|
};
|