@feedmepos/mf-hrm-portal 2.0.8-dev.17 → 2.0.8-dev.18
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-BNOhL75v.js → AuditLogList-1UVDS19H.js} +209 -199
- package/dist/{EmployeeList-CIVd7TT4.js → EmployeeList-ByUJ2SF9.js} +5 -5
- package/dist/{Main-DzRNS6is.js → Main-7tLK7qPa.js} +4 -4
- package/dist/{Main-n4rYlWPw.js → Main-C20b5HgL.js} +9 -9
- package/dist/{Main-DfDLgL31.js → Main-CurtiZ-3.js} +6 -6
- package/dist/{PermissionSetList-MIVMrxD5.js → PermissionSetList-CSLzYcw7.js} +28 -28
- package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BbDFemzB.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DYg5WOE5.js} +774 -774
- package/dist/{RoleList-D-Eckybt.js → RoleList-Dnqlh3Ow.js} +7 -7
- package/dist/{TeamMemberList-CQ0_XEDl.js → TeamMemberList-DDEiOr_n.js} +8 -8
- package/dist/{TimesheetList-B1rhAA1b.js → TimesheetList-DbCnkKkG.js} +7 -7
- package/dist/{app-by6XXDQy.js → app-CvwHREKu.js} +1728 -1184
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-pMMbdX3v.js → dayjs.min-BO_eER_a.js} +1 -1
- package/dist/{employee-BcIA1Cie.js → employee-C0IdmyuS.js} +4 -4
- package/dist/{index-Di_6eujn.js → index-DOp8utmL.js} +2 -2
- package/dist/{index-uj01aRCZ.js → index-aRoJM-Ja.js} +1 -1
- package/dist/{iteration-Bx-ZYM-b.js → iteration-DhAhuJkI.js} +1 -1
- package/dist/{lodash-BCTEbnPv.js → lodash-DLLCKnyf.js} +1 -1
- package/dist/src/views/audit-log/constants.d.ts +30 -0
- package/dist/{team-CigHObEk.js → team-DWVRSONN.js} +1 -1
- package/dist/{timesheet-CtqIEgCP.js → timesheet-BncEz2En.js} +3 -3
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-Cv7_PUF7.js → useAppStore-CM-zLY3O.js} +1 -1
- package/dist/{useLoading-D_mFwIoX.js → useLoading-B14dLvdS.js} +1 -1
- package/dist/{useReportPermissions-DHhsduxz.js → useReportPermissions-BBLrZyHg.js} +3 -3
- package/package.json +3 -3
|
@@ -1,40 +1,50 @@
|
|
|
1
1
|
import { defineComponent as Se, ref as y, computed as x, resolveComponent as V, createElementBlock as v, openBlock as r, createBlock as z, createCommentVNode as k, Fragment as H, renderList as ee, withCtx as D, createElementVNode as l, createVNode as u, toDisplayString as i, unref as s, watch as Z } from "vue";
|
|
2
|
-
import { d as Q } from "./dayjs.min-
|
|
2
|
+
import { d as Q } from "./dayjs.min-BO_eER_a.js";
|
|
3
3
|
import { useI18n as ke, useCoreStore as et } from "@feedmepos/mf-common";
|
|
4
|
-
import {
|
|
4
|
+
import { b as _e, _ as tt } from "./app-CvwHREKu.js";
|
|
5
5
|
import { components as he } from "@feedmepos/ui-library";
|
|
6
|
-
import { g as lt, b as
|
|
6
|
+
import { g as lt, b as at } from "./iteration-DhAhuJkI.js";
|
|
7
7
|
import { S as W } from "./SelectFilter-DUj7GBtT.js";
|
|
8
|
-
import { _ as
|
|
8
|
+
import { _ as ot } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
|
|
9
9
|
import { _ as st } from "./index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js";
|
|
10
|
-
import { p as ye } from "./index-
|
|
11
|
-
import { u as nt } from "./team-
|
|
12
|
-
const
|
|
10
|
+
import { p as ye } from "./index-DOp8utmL.js";
|
|
11
|
+
import { u as nt } from "./team-DWVRSONN.js";
|
|
12
|
+
const ne = [
|
|
13
|
+
{ key: "all", label: "All", subjectPrefixes: [] },
|
|
14
|
+
{ key: "inventory", label: "Inventory", subjectPrefixes: ["business::inventory", "inventory"] },
|
|
15
|
+
{ key: "report", label: "Report", subjectPrefixes: ["business::report", "report"] },
|
|
16
|
+
{ key: "hrm", label: "HRM", subjectPrefixes: ["business::hrm", "hrm"] },
|
|
17
|
+
{ key: "payment", label: "Payment", subjectPrefixes: ["business::payment", "payment"] },
|
|
18
|
+
{ key: "menu", label: "Menu", subjectPrefixes: ["business::menu", "menu"] },
|
|
19
|
+
{ key: "crm", label: "CRM", subjectPrefixes: ["business::crm", "crm"] }
|
|
20
|
+
// Add more as modules are revamped with new actionguard:
|
|
21
|
+
// { key: 'restaurantOperation', label: 'Restaurant Operation', subjectPrefixes: ['restaurant'] },
|
|
22
|
+
], it = "/audit-logs", xe = {
|
|
13
23
|
async read(n) {
|
|
14
|
-
var w, F,
|
|
15
|
-
const
|
|
24
|
+
var w, F, C, L, I;
|
|
25
|
+
const a = {
|
|
16
26
|
limit: (n == null ? void 0 : n.limit) ?? 100,
|
|
17
27
|
offset: (n == null ? void 0 : n.offset) ?? 0,
|
|
18
28
|
...n != null && n.from ? { from: n.from } : {},
|
|
19
29
|
...n != null && n.to ? { to: n.to } : {},
|
|
20
30
|
...(w = n == null ? void 0 : n.userIds) != null && w.length ? { userIds: n.userIds } : {},
|
|
21
31
|
...(F = n == null ? void 0 : n.subjects) != null && F.length ? { subjects: n.subjects } : {},
|
|
22
|
-
...(
|
|
32
|
+
...(C = n == null ? void 0 : n.subjectPrefixes) != null && C.length ? { subjectPrefixes: n.subjectPrefixes } : {},
|
|
23
33
|
...(L = n == null ? void 0 : n.actions) != null && L.length ? { actions: n.actions } : {},
|
|
24
34
|
...(I = n == null ? void 0 : n.outcomes) != null && I.length ? { outcomes: n.outcomes } : {}
|
|
25
35
|
};
|
|
26
|
-
return console.log("[AuditLogAPI] request params:",
|
|
27
|
-
await
|
|
28
|
-
params:
|
|
36
|
+
return console.log("[AuditLogAPI] request params:", a), lt(
|
|
37
|
+
await at().get(it, {
|
|
38
|
+
params: a,
|
|
29
39
|
// Serialize arrays as repeated params: key=val1&key=val2
|
|
30
40
|
// (NestJS @Query expects this; axios default adds brackets which break matching)
|
|
31
|
-
paramsSerializer: (
|
|
32
|
-
const
|
|
33
|
-
for (const [g, m] of Object.entries(
|
|
41
|
+
paramsSerializer: (o) => {
|
|
42
|
+
const P = new URLSearchParams();
|
|
43
|
+
for (const [g, m] of Object.entries(o))
|
|
34
44
|
if (Array.isArray(m))
|
|
35
|
-
for (const b of m)
|
|
36
|
-
else m != null &&
|
|
37
|
-
return console.log("[AuditLogAPI] serialized query string:",
|
|
45
|
+
for (const b of m) P.append(g, String(b));
|
|
46
|
+
else m != null && P.append(g, String(m));
|
|
47
|
+
return console.log("[AuditLogAPI] serialized query string:", P.toString()), P.toString();
|
|
38
48
|
}
|
|
39
49
|
})
|
|
40
50
|
);
|
|
@@ -47,21 +57,21 @@ const it = "/audit-logs", xe = {
|
|
|
47
57
|
showMoreAt: { default: 6 }
|
|
48
58
|
},
|
|
49
59
|
emits: ["update:modelValue"],
|
|
50
|
-
setup(n, { emit:
|
|
51
|
-
const w = n, F =
|
|
52
|
-
const m = w.items.slice(0, I.value - 1), b = w.items.find((S) => S.value === w.modelValue),
|
|
53
|
-
return b &&
|
|
54
|
-
}),
|
|
55
|
-
const m = new Set(
|
|
60
|
+
setup(n, { emit: a }) {
|
|
61
|
+
const w = n, F = a, { t: C } = ke(), L = y(!1), I = x(() => Math.max(w.showMoreAt, 1)), o = x(() => {
|
|
62
|
+
const m = w.items.slice(0, I.value - 1), b = w.items.find((S) => S.value === w.modelValue), M = m.map((S) => S.value);
|
|
63
|
+
return b && M.includes(b.value) ? w.items.slice(0, I.value) : b ? [...m, b] : m;
|
|
64
|
+
}), P = x(() => {
|
|
65
|
+
const m = new Set(o.value.map((b) => b.value));
|
|
56
66
|
return w.items.filter((b) => !m.has(b.value));
|
|
57
67
|
});
|
|
58
68
|
function g(m) {
|
|
59
69
|
L.value = !1, F("update:modelValue", m);
|
|
60
70
|
}
|
|
61
71
|
return (m, b) => {
|
|
62
|
-
const
|
|
72
|
+
const M = V("FmTab"), S = V("FmIcon"), O = V("FmMenuItem"), E = V("FmMenu");
|
|
63
73
|
return r(), v("div", ut, [
|
|
64
|
-
(r(!0), v(H, null, ee(
|
|
74
|
+
(r(!0), v(H, null, ee(o.value, (c) => (r(), z(M, {
|
|
65
75
|
key: c.value,
|
|
66
76
|
"model-value": n.modelValue,
|
|
67
77
|
label: c.label,
|
|
@@ -70,7 +80,7 @@ const it = "/audit-logs", xe = {
|
|
|
70
80
|
value: c.value,
|
|
71
81
|
"onUpdate:modelValue": g
|
|
72
82
|
}, null, 8, ["model-value", "label", "badge", "disabled", "value"]))), 128)),
|
|
73
|
-
|
|
83
|
+
P.value.length > 0 ? (r(), z(E, {
|
|
74
84
|
key: 0,
|
|
75
85
|
"show-menu": L.value,
|
|
76
86
|
class: "max-w-[360px] min-w-[90px] rounded-sm",
|
|
@@ -80,16 +90,16 @@ const it = "/audit-logs", xe = {
|
|
|
80
90
|
"menu-button": D(() => [
|
|
81
91
|
l("div", dt, [
|
|
82
92
|
u(S, { name: "more_vert" }),
|
|
83
|
-
l("span", rt, i(s(
|
|
93
|
+
l("span", rt, i(s(C)("auditLog.modules.more")), 1)
|
|
84
94
|
])
|
|
85
95
|
]),
|
|
86
96
|
default: D(() => [
|
|
87
|
-
(r(!0), v(H, null, ee(
|
|
97
|
+
(r(!0), v(H, null, ee(P.value, (c) => (r(), z(O, {
|
|
88
98
|
key: c.value,
|
|
89
99
|
"model-value": n.modelValue === c.value,
|
|
90
100
|
label: c.label,
|
|
91
101
|
disabled: c.disabled,
|
|
92
|
-
onClick: (
|
|
102
|
+
onClick: (N) => g(c.value)
|
|
93
103
|
}, null, 8, ["model-value", "label", "disabled", "onClick"]))), 128))
|
|
94
104
|
]),
|
|
95
105
|
_: 1
|
|
@@ -134,19 +144,19 @@ const it = "/audit-logs", xe = {
|
|
|
134
144
|
class: "audit-log-operation-label-detail text-base font-bold leading-snug text-fm-color-typo-primary"
|
|
135
145
|
}, It = {
|
|
136
146
|
class: "rounded-lg border border-fm-color-border-default p-12"
|
|
137
|
-
},
|
|
147
|
+
}, Pt = {
|
|
138
148
|
class: "space-y-12"
|
|
139
|
-
},
|
|
149
|
+
}, Tt = {
|
|
140
150
|
class: "text-xs text-fm-color-typo-secondary"
|
|
141
|
-
},
|
|
151
|
+
}, Mt = {
|
|
142
152
|
class: "font-semibold"
|
|
143
|
-
},
|
|
153
|
+
}, jt = {
|
|
144
154
|
class: "text-xs text-fm-color-typo-secondary"
|
|
145
|
-
},
|
|
155
|
+
}, Ct = {
|
|
146
156
|
class: "font-semibold"
|
|
147
|
-
},
|
|
157
|
+
}, Ot = {
|
|
148
158
|
class: "text-xs text-fm-color-typo-secondary"
|
|
149
|
-
},
|
|
159
|
+
}, Et = {
|
|
150
160
|
class: "break-all font-semibold"
|
|
151
161
|
}, Dt = {
|
|
152
162
|
class: "text-xs text-fm-color-typo-secondary"
|
|
@@ -154,15 +164,15 @@ const it = "/audit-logs", xe = {
|
|
|
154
164
|
class: "font-semibold"
|
|
155
165
|
}, Ut = {
|
|
156
166
|
key: 0
|
|
157
|
-
}, Nt = {
|
|
158
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
159
|
-
}, Kt = {
|
|
160
|
-
class: "break-all font-mono text-xs font-semibold"
|
|
161
167
|
}, Rt = {
|
|
162
168
|
class: "text-xs text-fm-color-typo-secondary"
|
|
163
|
-
},
|
|
169
|
+
}, Nt = {
|
|
164
170
|
class: "break-all font-mono text-xs font-semibold"
|
|
171
|
+
}, Kt = {
|
|
172
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
165
173
|
}, Bt = {
|
|
174
|
+
class: "break-all font-mono text-xs font-semibold"
|
|
175
|
+
}, qt = {
|
|
166
176
|
class: "text-xs text-fm-color-typo-secondary"
|
|
167
177
|
}, Yt = {
|
|
168
178
|
class: "font-semibold"
|
|
@@ -173,9 +183,9 @@ const it = "/audit-logs", xe = {
|
|
|
173
183
|
class: "p-12"
|
|
174
184
|
}, Ht = {
|
|
175
185
|
class: "text-base font-bold text-fm-color-typo-primary"
|
|
176
|
-
}, Jt = {
|
|
177
|
-
class: "space-y-12 p-12"
|
|
178
186
|
}, Gt = {
|
|
187
|
+
class: "space-y-12 p-12"
|
|
188
|
+
}, Jt = {
|
|
179
189
|
class: "text-xs text-fm-color-typo-secondary"
|
|
180
190
|
}, Xt = {
|
|
181
191
|
class: "font-semibold"
|
|
@@ -191,9 +201,9 @@ const it = "/audit-logs", xe = {
|
|
|
191
201
|
class: "text-xs text-fm-color-typo-secondary"
|
|
192
202
|
}, ll = {
|
|
193
203
|
class: "font-semibold"
|
|
194
|
-
}, ol = {
|
|
195
|
-
key: 0
|
|
196
204
|
}, al = {
|
|
205
|
+
key: 0
|
|
206
|
+
}, ol = {
|
|
197
207
|
class: "text-xs text-fm-color-typo-secondary"
|
|
198
208
|
}, sl = {
|
|
199
209
|
key: 0,
|
|
@@ -234,24 +244,24 @@ const it = "/audit-logs", xe = {
|
|
|
234
244
|
class: "text-xs text-fm-color-typo-secondary"
|
|
235
245
|
}, Ll = {
|
|
236
246
|
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"
|
|
237
|
-
}, ie = 100, ue = 1e3, Le = "audit-log-export-fields",
|
|
247
|
+
}, ie = 100, ue = 1e3, Le = "audit-log-export-fields", El = /* @__PURE__ */ Se({
|
|
238
248
|
__name: "AuditLogList",
|
|
239
249
|
setup(n) {
|
|
240
250
|
const {
|
|
241
|
-
t:
|
|
242
|
-
} = ke(), w = et(), F = nt(),
|
|
251
|
+
t: a
|
|
252
|
+
} = ke(), w = et(), F = nt(), C = y(!1), L = y(!1), I = y([]), o = y(null), P = y(!1), g = y(1), m = y(!1), b = Q().format("YYYY-MM-DD"), M = y({
|
|
243
253
|
startDate: b,
|
|
244
254
|
endDate: b
|
|
245
|
-
}), S = y(),
|
|
255
|
+
}), S = y(), O = y(), E = y(), c = y(), N = y("all");
|
|
246
256
|
function we(e) {
|
|
247
257
|
return typeof e == "string" ? [e] : Array.isArray(e) ? e.filter((t) => typeof t == "string") : [];
|
|
248
258
|
}
|
|
249
259
|
const Fe = x(() => ne.map(({
|
|
250
260
|
key: e
|
|
251
261
|
}) => ({
|
|
252
|
-
label:
|
|
262
|
+
label: a(`auditLog.modules.${e}`),
|
|
253
263
|
value: e
|
|
254
|
-
}))), de = x(() => ne.find((e) => e.key ===
|
|
264
|
+
}))), de = x(() => ne.find((e) => e.key === N.value) ?? ne[0]), te = x(() => N.value === "all"), Ve = x(() => F.members.map((e) => ({
|
|
255
265
|
label: e.name,
|
|
256
266
|
value: e.doc.userId
|
|
257
267
|
}))), Ie = x(() => {
|
|
@@ -266,80 +276,80 @@ const it = "/audit-logs", xe = {
|
|
|
266
276
|
f.has(p.value) || (f.add(p.value), _.push(p));
|
|
267
277
|
return _;
|
|
268
278
|
});
|
|
269
|
-
function
|
|
279
|
+
function Pe(e, t) {
|
|
270
280
|
const f = t.toLowerCase();
|
|
271
281
|
return e.label.toLowerCase().includes(f) || e.value.replace(/^business::/, "").toLowerCase().includes(f) ? !0 : e.value.toLowerCase().includes(f);
|
|
272
282
|
}
|
|
273
|
-
const
|
|
274
|
-
manage:
|
|
275
|
-
create:
|
|
276
|
-
read:
|
|
277
|
-
update:
|
|
278
|
-
delete:
|
|
279
|
-
})),
|
|
280
|
-
label:
|
|
283
|
+
const T = x(() => ({
|
|
284
|
+
manage: a("auditLog.action.manage"),
|
|
285
|
+
create: a("auditLog.action.create"),
|
|
286
|
+
read: a("auditLog.action.read"),
|
|
287
|
+
update: a("auditLog.action.update"),
|
|
288
|
+
delete: a("auditLog.action.delete")
|
|
289
|
+
})), Te = x(() => [{
|
|
290
|
+
label: T.value.manage,
|
|
281
291
|
value: "manage"
|
|
282
292
|
}, {
|
|
283
|
-
label:
|
|
293
|
+
label: T.value.create,
|
|
284
294
|
value: "create"
|
|
285
295
|
}, {
|
|
286
|
-
label:
|
|
296
|
+
label: T.value.read,
|
|
287
297
|
value: "read"
|
|
288
298
|
}, {
|
|
289
|
-
label:
|
|
299
|
+
label: T.value.update,
|
|
290
300
|
value: "update"
|
|
291
301
|
}, {
|
|
292
|
-
label:
|
|
302
|
+
label: T.value.delete,
|
|
293
303
|
value: "delete"
|
|
294
|
-
}]),
|
|
295
|
-
allowed:
|
|
296
|
-
denied:
|
|
297
|
-
skipped:
|
|
298
|
-
})),
|
|
299
|
-
label:
|
|
304
|
+
}]), G = x(() => ({
|
|
305
|
+
allowed: a("auditLog.outcome.success"),
|
|
306
|
+
denied: a("auditLog.outcome.failed"),
|
|
307
|
+
skipped: a("auditLog.outcome.skipped")
|
|
308
|
+
})), Me = x(() => [{
|
|
309
|
+
label: G.value.allowed,
|
|
300
310
|
value: "allowed"
|
|
301
311
|
}, {
|
|
302
|
-
label:
|
|
312
|
+
label: G.value.denied,
|
|
303
313
|
value: "denied"
|
|
304
314
|
}, {
|
|
305
|
-
label:
|
|
315
|
+
label: G.value.skipped,
|
|
306
316
|
value: "skipped"
|
|
307
|
-
}]),
|
|
308
|
-
admin:
|
|
309
|
-
staff:
|
|
310
|
-
permissionSet:
|
|
311
|
-
systemPermissionSet:
|
|
312
|
-
custom:
|
|
313
|
-
"no-match":
|
|
314
|
-
unknown:
|
|
315
|
-
})),
|
|
316
|
-
GET:
|
|
317
|
-
POST:
|
|
318
|
-
PUT:
|
|
319
|
-
PATCH:
|
|
320
|
-
DELETE:
|
|
317
|
+
}]), je = x(() => ({
|
|
318
|
+
admin: a("auditLog.detail.resolvedFromValue.admin"),
|
|
319
|
+
staff: a("auditLog.detail.resolvedFromValue.staff"),
|
|
320
|
+
permissionSet: a("auditLog.detail.resolvedFromValue.permissionSet"),
|
|
321
|
+
systemPermissionSet: a("auditLog.detail.resolvedFromValue.systemPermissionSet"),
|
|
322
|
+
custom: a("auditLog.detail.resolvedFromValue.custom"),
|
|
323
|
+
"no-match": a("auditLog.detail.resolvedFromValue.noMatch"),
|
|
324
|
+
unknown: a("auditLog.detail.resolvedFromValue.unknown")
|
|
325
|
+
})), Ce = x(() => ({
|
|
326
|
+
GET: T.value.read,
|
|
327
|
+
POST: T.value.create,
|
|
328
|
+
PUT: T.value.update,
|
|
329
|
+
PATCH: T.value.update,
|
|
330
|
+
DELETE: T.value.delete
|
|
321
331
|
})), re = {
|
|
322
332
|
allowed: "success",
|
|
323
333
|
denied: "critical",
|
|
324
334
|
skipped: "warning"
|
|
325
|
-
},
|
|
335
|
+
}, Oe = x(() => {
|
|
326
336
|
const {
|
|
327
337
|
startDate: e,
|
|
328
338
|
endDate: t
|
|
329
|
-
} =
|
|
330
|
-
return e && t ? `${e} – ${t}` : e || t ||
|
|
339
|
+
} = M.value;
|
|
340
|
+
return e && t ? `${e} – ${t}` : e || t || a("auditLog.dateRange.placeholder");
|
|
331
341
|
});
|
|
332
342
|
function le(e) {
|
|
333
343
|
var t;
|
|
334
344
|
return ((t = ye.find((f) => f.subject === e)) == null ? void 0 : t.label) ?? _e[e];
|
|
335
345
|
}
|
|
336
|
-
function
|
|
346
|
+
function J(e) {
|
|
337
347
|
return F.userIdToName[e.userId] || e.userId;
|
|
338
348
|
}
|
|
339
349
|
function ce(e) {
|
|
340
350
|
return F.userIdToPhone[e.userId] || "-";
|
|
341
351
|
}
|
|
342
|
-
function
|
|
352
|
+
function Ee(e) {
|
|
343
353
|
return F.userIdToEmail[e.userId] || "-";
|
|
344
354
|
}
|
|
345
355
|
function me(e) {
|
|
@@ -349,21 +359,21 @@ const it = "/audit-logs", xe = {
|
|
|
349
359
|
return Q(e).format("DD MMM YYYY, HH:mm:ss").toUpperCase();
|
|
350
360
|
}
|
|
351
361
|
function fe(e) {
|
|
352
|
-
return
|
|
362
|
+
return T.value[e] ?? e;
|
|
353
363
|
}
|
|
354
|
-
function
|
|
364
|
+
function ae(e) {
|
|
355
365
|
return e.metadata.operationLabel ?? fe(e.action);
|
|
356
366
|
}
|
|
357
|
-
function
|
|
358
|
-
return
|
|
367
|
+
function oe(e) {
|
|
368
|
+
return G.value[e];
|
|
359
369
|
}
|
|
360
370
|
function Ae(e) {
|
|
361
|
-
return
|
|
371
|
+
return je.value[e] ?? e;
|
|
362
372
|
}
|
|
363
373
|
function Ue(e) {
|
|
364
|
-
return e.metadata.requestMethod ?
|
|
374
|
+
return e.metadata.requestMethod ? Ce.value[e.metadata.requestMethod] ?? e.metadata.requestMethod : fe(e.action);
|
|
365
375
|
}
|
|
366
|
-
function
|
|
376
|
+
function Re(e) {
|
|
367
377
|
const t = String(e ?? "");
|
|
368
378
|
return `"${(/^[=+\-@\t\r]/.test(t) ? `'${t}` : t).replace(/"/g, '""')}"`;
|
|
369
379
|
}
|
|
@@ -375,7 +385,7 @@ const it = "/audit-logs", xe = {
|
|
|
375
385
|
}, {
|
|
376
386
|
key: "userName",
|
|
377
387
|
labelKey: "auditLog.exportFields.userName",
|
|
378
|
-
getValue: (e) =>
|
|
388
|
+
getValue: (e) => J(e),
|
|
379
389
|
defaultSelected: !0
|
|
380
390
|
}, {
|
|
381
391
|
key: "userPhone",
|
|
@@ -395,12 +405,12 @@ const it = "/audit-logs", xe = {
|
|
|
395
405
|
}, {
|
|
396
406
|
key: "operation",
|
|
397
407
|
labelKey: "auditLog.exportFields.operation",
|
|
398
|
-
getValue: (e) =>
|
|
408
|
+
getValue: (e) => ae(e),
|
|
399
409
|
defaultSelected: !0
|
|
400
410
|
}, {
|
|
401
411
|
key: "outcome",
|
|
402
412
|
labelKey: "auditLog.exportFields.outcome",
|
|
403
|
-
getValue: (e) =>
|
|
413
|
+
getValue: (e) => oe(e.outcome),
|
|
404
414
|
defaultSelected: !0
|
|
405
415
|
}, {
|
|
406
416
|
key: "businessId",
|
|
@@ -442,7 +452,7 @@ const it = "/audit-logs", xe = {
|
|
|
442
452
|
},
|
|
443
453
|
defaultSelected: !1
|
|
444
454
|
}];
|
|
445
|
-
function
|
|
455
|
+
function Ne() {
|
|
446
456
|
try {
|
|
447
457
|
const e = localStorage.getItem(Le);
|
|
448
458
|
if (e) {
|
|
@@ -453,21 +463,21 @@ const it = "/audit-logs", xe = {
|
|
|
453
463
|
}
|
|
454
464
|
return new Set(se.filter((e) => e.defaultSelected).map((e) => e.key));
|
|
455
465
|
}
|
|
456
|
-
const
|
|
457
|
-
function
|
|
458
|
-
const t = new Set(
|
|
466
|
+
const K = y(Ne());
|
|
467
|
+
function Ke(e) {
|
|
468
|
+
const t = new Set(K.value);
|
|
459
469
|
if (t.has(e)) {
|
|
460
470
|
if (t.size <= 1) return;
|
|
461
471
|
t.delete(e);
|
|
462
472
|
} else
|
|
463
473
|
t.add(e);
|
|
464
|
-
|
|
474
|
+
K.value = t;
|
|
465
475
|
try {
|
|
466
476
|
localStorage.setItem(Le, JSON.stringify([...t]));
|
|
467
477
|
} catch {
|
|
468
478
|
}
|
|
469
479
|
}
|
|
470
|
-
async function
|
|
480
|
+
async function Be() {
|
|
471
481
|
var e, t, f, _, p;
|
|
472
482
|
if (!L.value) {
|
|
473
483
|
L.value = !0;
|
|
@@ -475,7 +485,7 @@ const it = "/audit-logs", xe = {
|
|
|
475
485
|
const {
|
|
476
486
|
startDate: h,
|
|
477
487
|
endDate: A
|
|
478
|
-
} =
|
|
488
|
+
} = M.value, U = de.value.subjectPrefixes, R = (/* @__PURE__ */ new Date()).toISOString().slice(0, 19).replace("T", " "), Y = A ? X(A, !0) : null, d = Y && Y < R ? Y : R, q = {
|
|
479
489
|
...h ? {
|
|
480
490
|
from: X(h)
|
|
481
491
|
} : {},
|
|
@@ -483,8 +493,8 @@ const it = "/audit-logs", xe = {
|
|
|
483
493
|
...(e = S.value) != null && e.length ? {
|
|
484
494
|
userIds: S.value
|
|
485
495
|
} : {},
|
|
486
|
-
...te.value && ((t =
|
|
487
|
-
subjects:
|
|
496
|
+
...te.value && ((t = O.value) != null && t.length) ? {
|
|
497
|
+
subjects: O.value
|
|
488
498
|
} : {},
|
|
489
499
|
...U.length ? {
|
|
490
500
|
subjectPrefixes: [...U]
|
|
@@ -492,21 +502,21 @@ const it = "/audit-logs", xe = {
|
|
|
492
502
|
...(f = c.value) != null && f.length ? {
|
|
493
503
|
actions: c.value
|
|
494
504
|
} : {},
|
|
495
|
-
...(_ =
|
|
496
|
-
outcomes:
|
|
505
|
+
...(_ = E.value) != null && _.length ? {
|
|
506
|
+
outcomes: E.value
|
|
497
507
|
} : {}
|
|
498
508
|
}, ve = [];
|
|
499
509
|
let pe = 0;
|
|
500
510
|
for (; ; ) {
|
|
501
|
-
const
|
|
502
|
-
...
|
|
511
|
+
const j = await xe.read({
|
|
512
|
+
...q,
|
|
503
513
|
limit: ue,
|
|
504
514
|
offset: pe
|
|
505
515
|
});
|
|
506
|
-
if (ve.push(...
|
|
516
|
+
if (ve.push(...j), j.length < ue) break;
|
|
507
517
|
pe += ue;
|
|
508
518
|
}
|
|
509
|
-
const ge = se.filter((
|
|
519
|
+
const ge = se.filter((j) => K.value.has(j.key)), Ge = ge.map((j) => a(j.labelKey)), Je = ve.map((j) => ge.map((We) => We.getValue(j) ?? "")), Xe = [Ge, ...Je].map((j) => j.map(Re).join(",")).join(`
|
|
510
520
|
`), Ze = `audit-log_${(((p = w.currentBusiness.value) == null ? void 0 : p.name) || "business").replace(/[^a-z0-9_-]+/gi, "_")}_${Q().format("YYYYMMDD_HHmmss")}.csv`, Qe = new Blob([`\uFEFF${Xe}`], {
|
|
511
521
|
type: "text/csv;charset=utf-8;"
|
|
512
522
|
}), be = window.URL.createObjectURL(Qe), $ = document.createElement("a");
|
|
@@ -516,15 +526,15 @@ const it = "/audit-logs", xe = {
|
|
|
516
526
|
}
|
|
517
527
|
}
|
|
518
528
|
}
|
|
519
|
-
const
|
|
529
|
+
const qe = [{
|
|
520
530
|
accessorKey: "timestamp",
|
|
521
|
-
header: () =>
|
|
531
|
+
header: () => a("auditLog.columns.timestamp"),
|
|
522
532
|
cell(e) {
|
|
523
533
|
return me(e.row.original.timestamp);
|
|
524
534
|
}
|
|
525
535
|
}, {
|
|
526
536
|
accessorKey: "userId",
|
|
527
|
-
header: () =>
|
|
537
|
+
header: () => a("auditLog.columns.user"),
|
|
528
538
|
enableSorting: !1,
|
|
529
539
|
size: 220,
|
|
530
540
|
cell(e) {
|
|
@@ -532,20 +542,20 @@ const it = "/audit-logs", xe = {
|
|
|
532
542
|
return u("div", {
|
|
533
543
|
class: "flex items-center gap-8"
|
|
534
544
|
}, [u(he.FmAvatar, {
|
|
535
|
-
initials:
|
|
545
|
+
initials: J(t),
|
|
536
546
|
size: "sm",
|
|
537
547
|
class: "shrink-0"
|
|
538
548
|
}, null), u("div", {
|
|
539
549
|
class: "min-w-0"
|
|
540
550
|
}, [u("p", {
|
|
541
551
|
class: "truncate font-semibold"
|
|
542
|
-
}, [
|
|
552
|
+
}, [J(t)]), u("p", {
|
|
543
553
|
class: "truncate text-fm-color-typo-secondary"
|
|
544
554
|
}, [ce(t)])])]);
|
|
545
555
|
}
|
|
546
556
|
}, {
|
|
547
557
|
accessorKey: "subject",
|
|
548
|
-
header: () =>
|
|
558
|
+
header: () => a("auditLog.columns.role"),
|
|
549
559
|
meta: {
|
|
550
560
|
cellClass: "text-left"
|
|
551
561
|
},
|
|
@@ -557,24 +567,24 @@ const it = "/audit-logs", xe = {
|
|
|
557
567
|
}
|
|
558
568
|
}, {
|
|
559
569
|
accessorKey: "action",
|
|
560
|
-
header: () =>
|
|
570
|
+
header: () => a("auditLog.columns.action"),
|
|
561
571
|
enableSorting: !1,
|
|
562
572
|
size: 280,
|
|
563
573
|
meta: {
|
|
564
574
|
cellSpanClass: "audit-log-action-label"
|
|
565
575
|
},
|
|
566
576
|
cell(e) {
|
|
567
|
-
return
|
|
577
|
+
return ae(e.row.original);
|
|
568
578
|
}
|
|
569
579
|
}, {
|
|
570
580
|
accessorKey: "outcome",
|
|
571
|
-
header: () =>
|
|
581
|
+
header: () => a("auditLog.columns.outcome"),
|
|
572
582
|
enableSorting: !1,
|
|
573
583
|
cell(e) {
|
|
574
584
|
const t = e.row.original;
|
|
575
585
|
return u(he.FmChip, {
|
|
576
586
|
variant: re[t.outcome] ?? "neutral",
|
|
577
|
-
label:
|
|
587
|
+
label: oe(t.outcome),
|
|
578
588
|
compact: !0
|
|
579
589
|
}, null);
|
|
580
590
|
}
|
|
@@ -583,14 +593,14 @@ const it = "/audit-logs", xe = {
|
|
|
583
593
|
const [f, _, p] = e.split("-").map(Number), h = new Date(f, _ - 1, p);
|
|
584
594
|
return t && h.setDate(h.getDate() + 1), h.toISOString().slice(0, 19).replace("T", " ");
|
|
585
595
|
}
|
|
586
|
-
async function
|
|
596
|
+
async function B() {
|
|
587
597
|
var e, t, f, _;
|
|
588
|
-
|
|
598
|
+
C.value = !0;
|
|
589
599
|
try {
|
|
590
600
|
const {
|
|
591
601
|
startDate: p,
|
|
592
602
|
endDate: h
|
|
593
|
-
} =
|
|
603
|
+
} = M.value, A = (g.value - 1) * ie, U = de.value.subjectPrefixes, R = await xe.read({
|
|
594
604
|
limit: ie,
|
|
595
605
|
offset: A,
|
|
596
606
|
...p ? {
|
|
@@ -602,8 +612,8 @@ const it = "/audit-logs", xe = {
|
|
|
602
612
|
...(e = S.value) != null && e.length ? {
|
|
603
613
|
userIds: S.value
|
|
604
614
|
} : {},
|
|
605
|
-
...te.value && ((t =
|
|
606
|
-
subjects:
|
|
615
|
+
...te.value && ((t = O.value) != null && t.length) ? {
|
|
616
|
+
subjects: O.value
|
|
607
617
|
} : {},
|
|
608
618
|
...U.length ? {
|
|
609
619
|
subjectPrefixes: [...U]
|
|
@@ -611,50 +621,50 @@ const it = "/audit-logs", xe = {
|
|
|
611
621
|
...(f = c.value) != null && f.length ? {
|
|
612
622
|
actions: c.value
|
|
613
623
|
} : {},
|
|
614
|
-
...(_ =
|
|
615
|
-
outcomes:
|
|
624
|
+
...(_ = E.value) != null && _.length ? {
|
|
625
|
+
outcomes: E.value
|
|
616
626
|
} : {}
|
|
617
627
|
});
|
|
618
|
-
I.value =
|
|
628
|
+
I.value = R, m.value = R.length === ie;
|
|
619
629
|
} finally {
|
|
620
|
-
|
|
630
|
+
C.value = !1;
|
|
621
631
|
}
|
|
622
632
|
}
|
|
623
|
-
Z(
|
|
624
|
-
g.value = 1,
|
|
625
|
-
}), Z([S,
|
|
626
|
-
g.value = 1,
|
|
627
|
-
}), Z(
|
|
628
|
-
g.value = 1,
|
|
633
|
+
Z(M, () => {
|
|
634
|
+
g.value = 1, B();
|
|
635
|
+
}), Z([S, O, E, c], () => {
|
|
636
|
+
g.value = 1, B();
|
|
637
|
+
}), Z(N, () => {
|
|
638
|
+
g.value = 1, B();
|
|
629
639
|
});
|
|
630
640
|
async function Ye() {
|
|
631
|
-
g.value > 1 && (g.value--, await
|
|
641
|
+
g.value > 1 && (g.value--, await B());
|
|
632
642
|
}
|
|
633
643
|
async function $e() {
|
|
634
|
-
m.value && (g.value++, await
|
|
644
|
+
m.value && (g.value++, await B());
|
|
635
645
|
}
|
|
636
646
|
function ze(e) {
|
|
637
|
-
|
|
647
|
+
o.value = e, P.value = !0;
|
|
638
648
|
}
|
|
639
649
|
function He() {
|
|
640
|
-
|
|
650
|
+
P.value = !1, o.value = null;
|
|
641
651
|
}
|
|
642
652
|
return Z(w.currentBusiness, (e) => {
|
|
643
|
-
e && (g.value = 1, F.readTeamMembers(),
|
|
653
|
+
e && (g.value = 1, F.readTeamMembers(), B());
|
|
644
654
|
}, {
|
|
645
655
|
immediate: !0
|
|
646
656
|
}), (e, t) => {
|
|
647
|
-
const f = V("FmSpacer"), _ = V("FmButton"), p = V("FmMenuItem"), h = V("FmMenu"), A = V("FmChip"), U = V("FmDateRangePicker"),
|
|
648
|
-
return r(), v(H, null, [u(
|
|
649
|
-
heading: s(
|
|
657
|
+
const f = V("FmSpacer"), _ = V("FmButton"), p = V("FmMenuItem"), h = V("FmMenu"), A = V("FmChip"), U = V("FmDateRangePicker"), R = V("FmTable"), Y = V("FmSideSheet");
|
|
658
|
+
return r(), v(H, null, [u(ot, {
|
|
659
|
+
heading: s(a)("auditLog.title")
|
|
650
660
|
}, {
|
|
651
661
|
"append-heading": D(() => [u(f), u(_, {
|
|
652
662
|
variant: "primary",
|
|
653
663
|
"prepend-icon": "upload",
|
|
654
|
-
label: s(
|
|
664
|
+
label: s(a)("auditLog.export"),
|
|
655
665
|
disabled: I.value.length === 0 || L.value || s(F).isLoading || s(F).members.length === 0,
|
|
656
666
|
loading: L.value,
|
|
657
|
-
onClick:
|
|
667
|
+
onClick: Be
|
|
658
668
|
}, null, 8, ["label", "disabled", "loading"]), u(h, {
|
|
659
669
|
"close-on-click": !1,
|
|
660
670
|
"z-index": 50
|
|
@@ -662,30 +672,30 @@ const it = "/audit-logs", xe = {
|
|
|
662
672
|
"menu-button": D(() => [u(_, {
|
|
663
673
|
variant: "tertiary",
|
|
664
674
|
icon: "settings",
|
|
665
|
-
"aria-label": s(
|
|
675
|
+
"aria-label": s(a)("auditLog.exportSettings.title"),
|
|
666
676
|
disabled: L.value
|
|
667
677
|
}, null, 8, ["aria-label", "disabled"])]),
|
|
668
|
-
default: D(() => [l("div", mt, [l("p", ft, i(s(
|
|
678
|
+
default: D(() => [l("div", mt, [l("p", ft, i(s(a)("auditLog.exportSettings.title")), 1), (r(), v(H, null, ee(se, (d) => u(p, {
|
|
669
679
|
key: d.key,
|
|
670
|
-
label: s(
|
|
680
|
+
label: s(a)(d.labelKey),
|
|
671
681
|
"has-checkbox": "",
|
|
672
|
-
"model-value":
|
|
673
|
-
disabled:
|
|
674
|
-
onClick: (
|
|
682
|
+
"model-value": K.value.has(d.key),
|
|
683
|
+
disabled: K.value.has(d.key) && K.value.size === 1,
|
|
684
|
+
onClick: (q) => Ke(d.key)
|
|
675
685
|
}, null, 8, ["label", "model-value", "disabled", "onClick"])), 64))])]),
|
|
676
686
|
_: 1
|
|
677
687
|
})]),
|
|
678
688
|
default: D(() => [l("div", vt, [l("div", pt, [u(ct, {
|
|
679
|
-
modelValue:
|
|
680
|
-
"onUpdate:modelValue": t[0] || (t[0] = (d) =>
|
|
689
|
+
modelValue: N.value,
|
|
690
|
+
"onUpdate:modelValue": t[0] || (t[0] = (d) => N.value = d),
|
|
681
691
|
items: Fe.value
|
|
682
692
|
}, null, 8, ["modelValue", "items"]), l("div", gt, [u(U, {
|
|
683
|
-
modelValue:
|
|
684
|
-
"onUpdate:modelValue": t[1] || (t[1] = (d) =>
|
|
693
|
+
modelValue: M.value,
|
|
694
|
+
"onUpdate:modelValue": t[1] || (t[1] = (d) => M.value = d),
|
|
685
695
|
"show-predefined-range": ""
|
|
686
696
|
}, {
|
|
687
697
|
"trigger-button": D(() => [u(A, {
|
|
688
|
-
label:
|
|
698
|
+
label: Oe.value,
|
|
689
699
|
icon: "calendar_month"
|
|
690
700
|
}, null, 8, ["label"])]),
|
|
691
701
|
_: 1
|
|
@@ -695,50 +705,50 @@ const it = "/audit-logs", xe = {
|
|
|
695
705
|
items: Ve.value,
|
|
696
706
|
multiple: "",
|
|
697
707
|
variant: "dark",
|
|
698
|
-
placeholder: s(
|
|
699
|
-
"selected-prefix": s(
|
|
708
|
+
placeholder: s(a)("auditLog.filter.user_placeholder"),
|
|
709
|
+
"selected-prefix": s(a)("auditLog.filter.selected_user_prefix"),
|
|
700
710
|
"chip-icon": "account_circle"
|
|
701
711
|
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), te.value ? (r(), v("div", _t, [u(W, {
|
|
702
|
-
modelValue:
|
|
703
|
-
"onUpdate:modelValue": t[3] || (t[3] = (d) =>
|
|
712
|
+
modelValue: O.value,
|
|
713
|
+
"onUpdate:modelValue": t[3] || (t[3] = (d) => O.value = d),
|
|
704
714
|
items: Ie.value,
|
|
705
|
-
"filter-fn":
|
|
715
|
+
"filter-fn": Pe,
|
|
706
716
|
multiple: "",
|
|
707
717
|
variant: "dark",
|
|
708
|
-
placeholder: s(
|
|
709
|
-
"selected-prefix": s(
|
|
718
|
+
placeholder: s(a)("auditLog.filter.subject_placeholder"),
|
|
719
|
+
"selected-prefix": s(a)("auditLog.filter.selected_subject_prefix"),
|
|
710
720
|
"chip-icon": "badge"
|
|
711
721
|
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])) : k("", !0), l("div", ht, [u(W, {
|
|
712
722
|
modelValue: c.value,
|
|
713
723
|
"onUpdate:modelValue": t[4] || (t[4] = (d) => c.value = d),
|
|
714
|
-
items:
|
|
724
|
+
items: Te.value,
|
|
715
725
|
multiple: "",
|
|
716
726
|
variant: "dark",
|
|
717
|
-
placeholder: s(
|
|
718
|
-
"selected-prefix": s(
|
|
727
|
+
placeholder: s(a)("auditLog.filter.action_placeholder"),
|
|
728
|
+
"selected-prefix": s(a)("auditLog.filter.selected_action_prefix"),
|
|
719
729
|
searchable: !1
|
|
720
730
|
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), l("div", yt, [u(W, {
|
|
721
|
-
modelValue:
|
|
722
|
-
"onUpdate:modelValue": t[5] || (t[5] = (d) =>
|
|
723
|
-
items:
|
|
731
|
+
modelValue: E.value,
|
|
732
|
+
"onUpdate:modelValue": t[5] || (t[5] = (d) => E.value = d),
|
|
733
|
+
items: Me.value,
|
|
724
734
|
multiple: "",
|
|
725
735
|
variant: "dark",
|
|
726
|
-
placeholder: s(
|
|
727
|
-
"selected-prefix": s(
|
|
736
|
+
placeholder: s(a)("auditLog.filter.status_placeholder"),
|
|
737
|
+
"selected-prefix": s(a)("auditLog.filter.selected_status_prefix"),
|
|
728
738
|
searchable: !1,
|
|
729
739
|
"chip-icon": "check_circle"
|
|
730
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])])]), !
|
|
740
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])])]), !C.value && I.value.length === 0 ? (r(), z(s(st), {
|
|
731
741
|
key: 0,
|
|
732
|
-
title: s(
|
|
733
|
-
subtitle: s(
|
|
742
|
+
title: s(a)("auditLog.noData.title"),
|
|
743
|
+
subtitle: s(a)("auditLog.noData.subtitle")
|
|
734
744
|
}, null, 8, ["title", "subtitle"])) : (r(), z(tt, {
|
|
735
745
|
key: 1
|
|
736
746
|
}, {
|
|
737
|
-
default: D(() => [l("div", xt, [u(
|
|
738
|
-
"column-defs":
|
|
747
|
+
default: D(() => [l("div", xt, [u(R, {
|
|
748
|
+
"column-defs": qe,
|
|
739
749
|
"row-data": I.value,
|
|
740
750
|
"page-size": I.value.length,
|
|
741
|
-
loading:
|
|
751
|
+
loading: C.value,
|
|
742
752
|
"pin-header-row": "",
|
|
743
753
|
"hide-footer": "",
|
|
744
754
|
class: "min-h-0 flex-1 cursor-pointer",
|
|
@@ -747,46 +757,46 @@ const it = "/audit-logs", xe = {
|
|
|
747
757
|
variant: "tertiary",
|
|
748
758
|
icon: "chevron_left",
|
|
749
759
|
disabled: g.value === 1,
|
|
750
|
-
"aria-label": s(
|
|
760
|
+
"aria-label": s(a)("auditLog.pagination.prevPage"),
|
|
751
761
|
onClick: Ye
|
|
752
|
-
}, null, 8, ["disabled", "aria-label"]), l("span", St, i(s(
|
|
762
|
+
}, null, 8, ["disabled", "aria-label"]), l("span", St, i(s(a)("auditLog.pagination.page", {
|
|
753
763
|
page: g.value
|
|
754
764
|
})), 1), u(_, {
|
|
755
765
|
variant: "tertiary",
|
|
756
766
|
icon: "chevron_right",
|
|
757
767
|
disabled: !m.value,
|
|
758
|
-
"aria-label": s(
|
|
768
|
+
"aria-label": s(a)("auditLog.pagination.nextPage"),
|
|
759
769
|
onClick: $e
|
|
760
770
|
}, null, 8, ["disabled", "aria-label"])])) : k("", !0)])]),
|
|
761
771
|
_: 1
|
|
762
772
|
}))])]),
|
|
763
773
|
_: 1
|
|
764
774
|
}, 8, ["heading"]), u(Y, {
|
|
765
|
-
header: s(
|
|
766
|
-
"model-value":
|
|
775
|
+
header: s(a)("auditLog.detail.header"),
|
|
776
|
+
"model-value": P.value,
|
|
767
777
|
"max-width": 480,
|
|
768
778
|
"dismiss-away": "",
|
|
769
779
|
"onUpdate:modelValue": t[7] || (t[7] = (d) => {
|
|
770
780
|
d || He();
|
|
771
781
|
})
|
|
772
782
|
}, {
|
|
773
|
-
default: D(() => [
|
|
774
|
-
variant: re[
|
|
775
|
-
label:
|
|
783
|
+
default: D(() => [o.value ? (r(), v("div", kt, [l("div", wt, [l("div", Ft, [l("p", Vt, i(ae(o.value)), 1)]), u(A, {
|
|
784
|
+
variant: re[o.value.outcome] ?? "neutral",
|
|
785
|
+
label: oe(o.value.outcome),
|
|
776
786
|
compact: ""
|
|
777
|
-
}, null, 8, ["variant", "label"])]), l("div", It, [l("div",
|
|
787
|
+
}, null, 8, ["variant", "label"])]), l("div", It, [l("div", Pt, [l("div", null, [l("p", Tt, i(s(a)("auditLog.detail.date")), 1), l("p", Mt, i(De(o.value.timestamp)), 1)]), l("div", null, [l("p", jt, i(s(a)("auditLog.detail.user")), 1), l("p", Ct, i(J(o.value)), 1)]), l("div", null, [l("p", Ot, i(s(a)("auditLog.detail.email")), 1), l("p", Et, i(Ee(o.value)), 1)]), l("div", null, [l("p", Dt, i(s(a)("auditLog.detail.role")), 1), l("p", At, i(le(o.value.subject) || o.value.subject), 1)]), o.value.field ? (r(), v("div", Ut, [l("p", Rt, i(s(a)("auditLog.detail.field")), 1), l("p", Nt, i(o.value.field), 1)])) : k("", !0), l("div", null, [l("p", Kt, i(s(a)("auditLog.detail.business")), 1), l("p", Bt, i(o.value.businessId || "-"), 1)]), l("div", null, [l("p", qt, i(s(a)("auditLog.detail.restaurant")), 1), l("p", Yt, i(o.value.restaurantId || "-"), 1)])])]), o.value.metadata.operationLabel ? (r(), v("div", $t, [l("div", zt, [l("p", Ht, i(s(a)("auditLog.detail.changeDetails")), 1)]), t[8] || (t[8] = l("hr", {
|
|
778
788
|
class: "border-fm-color-border-default"
|
|
779
|
-
}, null, -1)), l("div",
|
|
789
|
+
}, null, -1)), l("div", Gt, [l("div", null, [l("p", Jt, i(s(a)("auditLog.detail.eventType")), 1), l("p", Xt, i(o.value.metadata.operationLabel), 1)])])])) : k("", !0), l("div", Zt, [l("div", Qt, [l("p", Wt, i(s(a)("auditLog.detail.metadata")), 1)]), t[9] || (t[9] = l("hr", {
|
|
780
790
|
class: "border-fm-color-border-default"
|
|
781
|
-
}, null, -1)), l("div", el, [l("div", null, [l("p", tl, i(s(
|
|
782
|
-
key:
|
|
791
|
+
}, null, -1)), l("div", el, [l("div", null, [l("p", tl, i(s(a)("auditLog.detail.resolvedFrom")), 1), l("p", ll, i(Ae(o.value.metadata.resolvedFrom)), 1)]), (o.value.metadata.resolvedFrom === "permissionSet" || o.value.metadata.resolvedFrom === "systemPermissionSet") && (o.value.metadata.permissionSetName || o.value.metadata.permissionSetId) ? (r(), v("div", al, [l("p", ol, i(s(a)("auditLog.detail.permissionSet")), 1), o.value.metadata.permissionSetName ? (r(), v("p", sl, i(o.value.metadata.permissionSetName), 1)) : k("", !0), o.value.metadata.permissionSetId ? (r(), v("p", nl, i(o.value.metadata.permissionSetId), 1)) : k("", !0)])) : k("", !0), o.value.metadata.reason ? (r(), v("div", il, [l("p", ul, i(s(a)("auditLog.detail.reason")), 1), l("p", dl, i(o.value.metadata.reason), 1)])) : k("", !0), l("div", null, [l("p", rl, i(s(a)("auditLog.detail.requestMethod")), 1), l("p", cl, i(Ue(o.value)), 1)]), l("div", null, [l("p", ml, i(s(a)("auditLog.detail.requestPath")), 1), l("p", fl, i(o.value.metadata.requestPath || "-"), 1)]), o.value.metadata.trace && o.value.metadata.trace.length > 0 ? (r(), v("div", vl, [l("p", pl, i(s(a)("auditLog.detail.permissionTrace")), 1), l("ol", gl, [(r(!0), v(H, null, ee(o.value.metadata.trace, (d, q) => (r(), v("li", {
|
|
792
|
+
key: q,
|
|
783
793
|
class: "flex items-center gap-6"
|
|
784
|
-
}, [l("span", bl, i(
|
|
794
|
+
}, [l("span", bl, i(q + 1), 1), l("span", _l, i(d), 1), q < o.value.metadata.trace.length - 1 ? (r(), v("span", hl, "→")) : k("", !0)]))), 128))])])) : k("", !0), o.value.metadata.requestBody && Object.keys(o.value.metadata.requestBody).length > 0 ? (r(), v("div", yl, [l("p", xl, i(s(a)("auditLog.detail.requestBody")), 1), l("pre", Ll, i(JSON.stringify(o.value.metadata.requestBody, null, 2)), 1)])) : k("", !0)])])])) : k("", !0)]),
|
|
785
795
|
_: 1
|
|
786
796
|
}, 8, ["header", "model-value"])], 64);
|
|
787
797
|
};
|
|
788
798
|
}
|
|
789
799
|
});
|
|
790
800
|
export {
|
|
791
|
-
|
|
801
|
+
El as default
|
|
792
802
|
};
|