@feedmepos/mf-hrm-portal 2.0.24-dev.5 → 2.0.24-dev.6
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-C_KqzCY2.js → AuditLogList-CYAykl2D.js} +350 -349
- package/dist/{EmployeeList-BmbGCjEy.js → EmployeeList-jGvj5Kjs.js} +6 -6
- package/dist/{Main-E-k5vSv1.js → Main-CCgt3-bl.js} +6 -6
- package/dist/{Main-D6diRfsf.js → Main-CMzANrJ-.js} +4 -4
- package/dist/{Main-CT5wdFX2.js → Main-D07IsGsd.js} +9 -9
- package/dist/{PermissionSetList-DnGM_RG4.js → PermissionSetList-B8_eRM-R.js} +6 -6
- package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BLEipX1D.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BjRb1dnQ.js} +555 -555
- package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_a439fdd8_lang-hfnl-SDJ.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_a439fdd8_lang-ZzioHV1l.js} +1 -1
- package/dist/{RoleList-Du-bPAUh.js → RoleList-BmvFGl6T.js} +7 -7
- package/dist/{TeamMemberList-toOqih8l.js → TeamMemberList-BjeZXuOZ.js} +8 -8
- package/dist/{TimesheetList-CRim6v7y.js → TimesheetList-BT-HR4np.js} +6 -6
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_d7ed31d7_lang-C3JuXuPD.js → TimesheetList.vue_vue_type_style_index_0_scoped_d7ed31d7_lang-vO6F5Zc6.js} +2 -2
- package/dist/{app-B2zHVYmO.js → app-DXMxGLgF.js} +4 -4
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-BrBobzTj.js → dayjs.min-CLlZV7c8.js} +1 -1
- package/dist/{employee-zBcwuJU6.js → employee-DnqW35Vb.js} +3 -3
- package/dist/{iteration-L-Jb1opR.js → iteration-CuaOtnox.js} +1 -1
- package/dist/{lodash-DGZvTqyO.js → lodash-CMfO1W5S.js} +1 -1
- package/dist/{rule-Dfi1iDWJ.js → rule-C5hRUHsA.js} +2 -2
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-DPTXpbkf.js → useAppStore-DqFkF7Pg.js} +1 -1
- package/dist/{useLoading-D8W8_Iny.js → useLoading-kPp1XRGN.js} +1 -1
- package/dist/{useReportPermissions-DcUg2TWM.js → useReportPermissions-DUhrchnA.js} +3 -3
- package/package.json +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { d as
|
|
3
|
-
import { useI18n as
|
|
4
|
-
import { G as
|
|
5
|
-
import { components as
|
|
6
|
-
import { g as
|
|
7
|
-
import { S as
|
|
8
|
-
import { _ as
|
|
9
|
-
import { _ as
|
|
10
|
-
import { t as
|
|
11
|
-
import { defineStore as
|
|
1
|
+
import { defineComponent as Ke, ref as b, computed as y, onMounted as Mt, onBeforeUnmount as Ft, watch as ue, resolveComponent as C, createElementBlock as I, openBlock as h, createBlock as Q, createCommentVNode as N, createElementVNode as l, Fragment as Z, renderList as ie, withCtx as B, createVNode as p, toDisplayString as u, unref as n, nextTick as Dt } from "vue";
|
|
2
|
+
import { d as _ } from "./dayjs.min-CLlZV7c8.js";
|
|
3
|
+
import { useI18n as ze, useCoreStore as It } from "@feedmepos/mf-common";
|
|
4
|
+
import { G as Re, _ as Ot } from "./app-DXMxGLgF.js";
|
|
5
|
+
import { components as Ce } from "@feedmepos/ui-library";
|
|
6
|
+
import { g as Ue, b as $e } from "./iteration-CuaOtnox.js";
|
|
7
|
+
import { S as fe, _ as Tt } from "./SelectFilter-C61IZSID.js";
|
|
8
|
+
import { _ as jt } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
|
|
9
|
+
import { _ as Pt } from "./index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js";
|
|
10
|
+
import { t as Vt, p as Ye } from "./rule-C5hRUHsA.js";
|
|
11
|
+
import { defineStore as At } from "pinia";
|
|
12
12
|
const se = [
|
|
13
13
|
{ key: "all", label: "All", subjectPrefixes: [] },
|
|
14
14
|
{ key: "inventory", label: "Inventory", subjectPrefixes: ["business::inventory", "inventory"] },
|
|
@@ -19,34 +19,34 @@ const se = [
|
|
|
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
|
+
], Ne = "/audit-logs", _e = {
|
|
23
23
|
async count(a) {
|
|
24
|
-
var w,
|
|
24
|
+
var w, P, M, S, s;
|
|
25
25
|
const o = {
|
|
26
26
|
...a != null && a.from ? { from: a.from } : {},
|
|
27
27
|
...a != null && a.to ? { to: a.to } : {},
|
|
28
28
|
...(w = a == null ? void 0 : a.userIds) != null && w.length ? { userIds: a.userIds } : {},
|
|
29
|
-
...(
|
|
29
|
+
...(P = a == null ? void 0 : a.subjects) != null && P.length ? { subjects: a.subjects } : {},
|
|
30
30
|
...(M = a == null ? void 0 : a.subjectPrefixes) != null && M.length ? { subjectPrefixes: a.subjectPrefixes } : {},
|
|
31
31
|
...(S = a == null ? void 0 : a.actions) != null && S.length ? { actions: a.actions } : {},
|
|
32
32
|
...(s = a == null ? void 0 : a.outcomes) != null && s.length ? { outcomes: a.outcomes } : {}
|
|
33
33
|
};
|
|
34
|
-
return (await
|
|
35
|
-
await
|
|
34
|
+
return (await Ue(
|
|
35
|
+
await $e().get(`${Ne}/count`, {
|
|
36
36
|
params: o,
|
|
37
37
|
paramsSerializer: (O) => {
|
|
38
|
-
const
|
|
38
|
+
const V = new URLSearchParams();
|
|
39
39
|
for (const [c, F] of Object.entries(O))
|
|
40
40
|
if (Array.isArray(F))
|
|
41
|
-
for (const K of F)
|
|
42
|
-
else F != null &&
|
|
43
|
-
return
|
|
41
|
+
for (const K of F) V.append(c, String(K));
|
|
42
|
+
else F != null && V.append(c, String(F));
|
|
43
|
+
return V.toString();
|
|
44
44
|
}
|
|
45
45
|
})
|
|
46
46
|
)).total;
|
|
47
47
|
},
|
|
48
48
|
async read(a) {
|
|
49
|
-
var f, w,
|
|
49
|
+
var f, w, P, M, S;
|
|
50
50
|
const o = {
|
|
51
51
|
limit: (a == null ? void 0 : a.limit) ?? 100,
|
|
52
52
|
offset: (a == null ? void 0 : a.offset) ?? 0,
|
|
@@ -54,30 +54,30 @@ const se = [
|
|
|
54
54
|
...a != null && a.to ? { to: a.to } : {},
|
|
55
55
|
...(f = a == null ? void 0 : a.userIds) != null && f.length ? { userIds: a.userIds } : {},
|
|
56
56
|
...(w = a == null ? void 0 : a.subjects) != null && w.length ? { subjects: a.subjects } : {},
|
|
57
|
-
...(
|
|
57
|
+
...(P = a == null ? void 0 : a.subjectPrefixes) != null && P.length ? { subjectPrefixes: a.subjectPrefixes } : {},
|
|
58
58
|
...(M = a == null ? void 0 : a.actions) != null && M.length ? { actions: a.actions } : {},
|
|
59
59
|
...(S = a == null ? void 0 : a.outcomes) != null && S.length ? { outcomes: a.outcomes } : {}
|
|
60
60
|
};
|
|
61
|
-
return
|
|
62
|
-
await
|
|
61
|
+
return Ue(
|
|
62
|
+
await $e().get(Ne, {
|
|
63
63
|
params: o,
|
|
64
64
|
// Serialize arrays as repeated params: key=val1&key=val2
|
|
65
65
|
// (NestJS @Query expects this; axios default adds brackets which break matching)
|
|
66
66
|
paramsSerializer: (s) => {
|
|
67
67
|
const O = new URLSearchParams();
|
|
68
|
-
for (const [
|
|
68
|
+
for (const [V, c] of Object.entries(s))
|
|
69
69
|
if (Array.isArray(c))
|
|
70
|
-
for (const F of c) O.append(
|
|
71
|
-
else c != null && O.append(
|
|
70
|
+
for (const F of c) O.append(V, String(F));
|
|
71
|
+
else c != null && O.append(V, String(c));
|
|
72
72
|
return O.toString();
|
|
73
73
|
}
|
|
74
74
|
})
|
|
75
75
|
);
|
|
76
76
|
}
|
|
77
|
-
},
|
|
77
|
+
}, Et = { class: "flex h-[46px] items-center gap-8 rounded-sm px-16 hover:bg-fm-color-opacity-sm" }, Rt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ct = {
|
|
78
78
|
"data-more-measure": "",
|
|
79
79
|
class: "flex h-[46px] items-center gap-8 rounded-sm px-16"
|
|
80
|
-
},
|
|
80
|
+
}, Ut = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, $t = /* @__PURE__ */ Ke({
|
|
81
81
|
__name: "AuditLogModuleTabs",
|
|
82
82
|
props: {
|
|
83
83
|
modelValue: {},
|
|
@@ -85,73 +85,73 @@ const se = [
|
|
|
85
85
|
},
|
|
86
86
|
emits: ["update:modelValue"],
|
|
87
87
|
setup(a, { emit: o }) {
|
|
88
|
-
const f = a, w = o, { t:
|
|
88
|
+
const f = a, w = o, { t: P } = ze(), M = b(!1), S = b(null), s = b(null), O = b([]), V = b(0), c = b(0);
|
|
89
89
|
let F = null;
|
|
90
90
|
async function K() {
|
|
91
|
-
if (await
|
|
91
|
+
if (await Dt(), !s.value) return;
|
|
92
92
|
const v = s.value.querySelectorAll("[data-tab-measure]");
|
|
93
|
-
O.value = Array.from(v).map((
|
|
93
|
+
O.value = Array.from(v).map((k) => k.offsetWidth);
|
|
94
94
|
const m = s.value.querySelector("[data-more-measure]");
|
|
95
|
-
|
|
95
|
+
V.value = (m == null ? void 0 : m.offsetWidth) ?? 0;
|
|
96
96
|
}
|
|
97
|
-
const ve =
|
|
97
|
+
const ve = y(() => {
|
|
98
98
|
const v = f.items.length;
|
|
99
99
|
if (v === 0) return 0;
|
|
100
100
|
if (!c.value || O.value.length !== v) return v;
|
|
101
101
|
const m = O.value;
|
|
102
|
-
if (m.reduce((r,
|
|
103
|
-
const x =
|
|
104
|
-
let T = 0,
|
|
102
|
+
if (m.reduce((r, q) => r + q, 0) <= c.value) return v;
|
|
103
|
+
const x = V.value;
|
|
104
|
+
let T = 0, j = 0;
|
|
105
105
|
for (let r = 0; r < v && !(T + m[r] + x > c.value); r++)
|
|
106
|
-
T += m[r],
|
|
107
|
-
return
|
|
108
|
-
}),
|
|
106
|
+
T += m[r], j++;
|
|
107
|
+
return j;
|
|
108
|
+
}), W = y(() => {
|
|
109
109
|
const v = ve.value, m = f.items.length;
|
|
110
110
|
if (v >= m) return [...f.items];
|
|
111
|
-
const
|
|
112
|
-
if (!x ||
|
|
111
|
+
const k = f.items.slice(0, v), x = f.items.find((E) => E.value === f.modelValue);
|
|
112
|
+
if (!x || k.some((E) => E.value === x.value)) return k;
|
|
113
113
|
if (v === 0) return [x];
|
|
114
|
-
const T = f.items.findIndex((E) => E.value === x.value),
|
|
115
|
-
let
|
|
116
|
-
for (;
|
|
117
|
-
|
|
118
|
-
return [...f.items.slice(0, Math.max(
|
|
119
|
-
}),
|
|
120
|
-
const v = new Set(
|
|
114
|
+
const T = f.items.findIndex((E) => E.value === x.value), j = O.value, r = V.value, q = j[T] ?? 0;
|
|
115
|
+
let Y = v, oe = j.slice(0, Y - 1).reduce((E, ae) => E + ae, 0);
|
|
116
|
+
for (; Y > 1 && oe + q + r > c.value; )
|
|
117
|
+
Y--, oe = j.slice(0, Y - 1).reduce((E, ae) => E + ae, 0);
|
|
118
|
+
return [...f.items.slice(0, Math.max(Y - 1, 0)), x];
|
|
119
|
+
}), ee = y(() => {
|
|
120
|
+
const v = new Set(W.value.map((m) => m.value));
|
|
121
121
|
return f.items.filter((m) => !v.has(m.value));
|
|
122
122
|
});
|
|
123
|
-
function
|
|
123
|
+
function te(v) {
|
|
124
124
|
M.value = !1, w("update:modelValue", v);
|
|
125
125
|
}
|
|
126
|
-
return
|
|
126
|
+
return Mt(async () => {
|
|
127
127
|
await K(), S.value && (c.value = S.value.clientWidth, F = new ResizeObserver(() => {
|
|
128
128
|
S.value && (c.value = S.value.clientWidth);
|
|
129
129
|
}), F.observe(S.value));
|
|
130
|
-
}),
|
|
130
|
+
}), Ft(() => {
|
|
131
131
|
F == null || F.disconnect(), F = null;
|
|
132
|
-
}),
|
|
132
|
+
}), ue(
|
|
133
133
|
() => f.items,
|
|
134
134
|
() => {
|
|
135
135
|
K();
|
|
136
136
|
},
|
|
137
137
|
{ deep: !0 }
|
|
138
138
|
), (v, m) => {
|
|
139
|
-
const
|
|
140
|
-
return
|
|
139
|
+
const k = C("FmTab"), x = C("FmIcon"), T = C("FmMenuItem"), j = C("FmMenu");
|
|
140
|
+
return h(), I("div", {
|
|
141
141
|
ref_key: "containerRef",
|
|
142
142
|
ref: S,
|
|
143
143
|
class: "relative flex w-full flex-row items-center"
|
|
144
144
|
}, [
|
|
145
|
-
(
|
|
145
|
+
(h(!0), I(Z, null, ie(W.value, (r) => (h(), Q(k, {
|
|
146
146
|
key: r.value,
|
|
147
147
|
"model-value": a.modelValue,
|
|
148
148
|
label: r.label,
|
|
149
149
|
badge: r.badge,
|
|
150
150
|
disabled: r.disabled,
|
|
151
151
|
value: r.value,
|
|
152
|
-
"onUpdate:modelValue":
|
|
152
|
+
"onUpdate:modelValue": te
|
|
153
153
|
}, null, 8, ["model-value", "label", "badge", "disabled", "value"]))), 128)),
|
|
154
|
-
|
|
154
|
+
ee.value.length > 0 ? (h(), Q(j, {
|
|
155
155
|
key: 0,
|
|
156
156
|
"show-menu": M.value,
|
|
157
157
|
class: "max-w-[360px] min-w-[90px] rounded-sm",
|
|
@@ -159,33 +159,33 @@ const se = [
|
|
|
159
159
|
onMenuChanged: m[0] || (m[0] = (r) => M.value = r)
|
|
160
160
|
}, {
|
|
161
161
|
"menu-button": B(() => [
|
|
162
|
-
l("div",
|
|
163
|
-
|
|
164
|
-
l("span",
|
|
162
|
+
l("div", Et, [
|
|
163
|
+
p(x, { name: "more_vert" }),
|
|
164
|
+
l("span", Rt, u(n(P)("auditLog.modules.more")), 1)
|
|
165
165
|
])
|
|
166
166
|
]),
|
|
167
167
|
default: B(() => [
|
|
168
|
-
(
|
|
168
|
+
(h(!0), I(Z, null, ie(ee.value, (r) => (h(), Q(T, {
|
|
169
169
|
key: r.value,
|
|
170
170
|
"model-value": a.modelValue === r.value,
|
|
171
171
|
label: r.label,
|
|
172
172
|
disabled: r.disabled,
|
|
173
|
-
onClick: (
|
|
173
|
+
onClick: (q) => te(r.value)
|
|
174
174
|
}, null, 8, ["model-value", "label", "disabled", "onClick"]))), 128))
|
|
175
175
|
]),
|
|
176
176
|
_: 1
|
|
177
|
-
}, 8, ["show-menu"])) :
|
|
177
|
+
}, 8, ["show-menu"])) : N("", !0),
|
|
178
178
|
l("div", {
|
|
179
179
|
ref_key: "measurerRef",
|
|
180
180
|
ref: s,
|
|
181
181
|
"aria-hidden": "true",
|
|
182
182
|
class: "pointer-events-none invisible absolute -left-[9999px] -top-[9999px] flex flex-row items-center"
|
|
183
183
|
}, [
|
|
184
|
-
(
|
|
184
|
+
(h(!0), I(Z, null, ie(a.items, (r) => (h(), I("div", {
|
|
185
185
|
key: `measure-${r.value}`,
|
|
186
186
|
"data-tab-measure": ""
|
|
187
187
|
}, [
|
|
188
|
-
|
|
188
|
+
p(k, {
|
|
189
189
|
"model-value": a.modelValue,
|
|
190
190
|
label: r.label,
|
|
191
191
|
badge: r.badge,
|
|
@@ -193,28 +193,28 @@ const se = [
|
|
|
193
193
|
value: r.value
|
|
194
194
|
}, null, 8, ["model-value", "label", "badge", "disabled", "value"])
|
|
195
195
|
]))), 128)),
|
|
196
|
-
l("div",
|
|
197
|
-
|
|
198
|
-
l("span",
|
|
196
|
+
l("div", Ct, [
|
|
197
|
+
p(x, { name: "more_vert" }),
|
|
198
|
+
l("span", Ut, u(n(P)("auditLog.modules.more")), 1)
|
|
199
199
|
])
|
|
200
200
|
], 512)
|
|
201
201
|
], 512);
|
|
202
202
|
};
|
|
203
203
|
}
|
|
204
|
-
}),
|
|
205
|
-
const a = b([]), o = b(!1), f = b(!1), w =
|
|
204
|
+
}), Yt = At("team", () => {
|
|
205
|
+
const a = b([]), o = b(!1), f = b(!1), w = y(
|
|
206
206
|
() => Object.fromEntries(a.value.map((s) => [s.doc.userId, s.name]))
|
|
207
|
-
),
|
|
207
|
+
), P = y(
|
|
208
208
|
() => Object.fromEntries(a.value.map((s) => [s.doc.userId, s.email]))
|
|
209
|
-
), M =
|
|
209
|
+
), M = y(
|
|
210
210
|
() => Object.fromEntries(a.value.map((s) => [s.doc.userId, s.phoneNumber]))
|
|
211
211
|
);
|
|
212
212
|
async function S({ force: s = !1 } = {}) {
|
|
213
213
|
if (!(!s && a.value.length > 0))
|
|
214
214
|
try {
|
|
215
215
|
o.value = !0;
|
|
216
|
-
const O = await
|
|
217
|
-
a.value = O.sort((
|
|
216
|
+
const O = await Vt.readTeamMembers();
|
|
217
|
+
a.value = O.sort((V, c) => V.doc.isOwner ? -1 : V.name.localeCompare(c.name)), f.value = !0;
|
|
218
218
|
} finally {
|
|
219
219
|
o.value = !1;
|
|
220
220
|
}
|
|
@@ -224,148 +224,147 @@ const se = [
|
|
|
224
224
|
isLoading: o,
|
|
225
225
|
hasLoaded: f,
|
|
226
226
|
userIdToName: w,
|
|
227
|
-
userIdToEmail:
|
|
227
|
+
userIdToEmail: P,
|
|
228
228
|
userIdToPhone: M,
|
|
229
229
|
readTeamMembers: S
|
|
230
230
|
};
|
|
231
|
-
}),
|
|
231
|
+
}), Nt = {
|
|
232
232
|
class: "flex flex-col gap-4 p-12 w-[260px]"
|
|
233
|
-
}, Nt = {
|
|
234
|
-
class: "text-xs font-semibold text-fm-color-typo-secondary mb-4"
|
|
235
233
|
}, Bt = {
|
|
236
|
-
class: "
|
|
234
|
+
class: "text-xs font-semibold text-fm-color-typo-secondary mb-4"
|
|
237
235
|
}, Kt = {
|
|
238
|
-
class: "
|
|
236
|
+
class: "flex min-h-0 flex-1 flex-col gap-16"
|
|
239
237
|
}, zt = {
|
|
240
|
-
class: "
|
|
238
|
+
class: "space-y-16"
|
|
241
239
|
}, qt = {
|
|
242
|
-
class: "
|
|
240
|
+
class: "flex flex-wrap items-center gap-8"
|
|
243
241
|
}, Ht = {
|
|
244
|
-
key: 0,
|
|
245
242
|
class: "w-fit"
|
|
246
243
|
}, Wt = {
|
|
247
244
|
class: "w-fit"
|
|
248
245
|
}, Jt = {
|
|
249
246
|
class: "w-fit"
|
|
250
247
|
}, Gt = {
|
|
248
|
+
class: "w-fit"
|
|
249
|
+
}, Xt = {
|
|
251
250
|
key: 0,
|
|
252
251
|
class: "space-y-12 p-4 text-sm"
|
|
253
|
-
}, Xt = {
|
|
254
|
-
class: "flex items-start justify-between gap-8 rounded-lg border border-fm-color-border-default p-12"
|
|
255
252
|
}, Qt = {
|
|
256
|
-
class: "
|
|
253
|
+
class: "flex items-start justify-between gap-8 rounded-lg border border-fm-color-border-default p-12"
|
|
257
254
|
}, Zt = {
|
|
258
|
-
class: "
|
|
255
|
+
class: "min-w-0 flex-1"
|
|
259
256
|
}, eo = {
|
|
260
|
-
class: "
|
|
257
|
+
class: "audit-log-operation-label-detail text-base font-bold leading-snug text-fm-color-typo-primary"
|
|
261
258
|
}, to = {
|
|
262
|
-
class: "
|
|
259
|
+
class: "rounded-lg border border-fm-color-border-default p-12"
|
|
263
260
|
}, oo = {
|
|
264
|
-
class: "
|
|
261
|
+
class: "space-y-12"
|
|
265
262
|
}, ao = {
|
|
266
|
-
class: "font-semibold"
|
|
267
|
-
}, lo = {
|
|
268
263
|
class: "text-xs text-fm-color-typo-secondary"
|
|
269
|
-
},
|
|
264
|
+
}, lo = {
|
|
270
265
|
class: "font-semibold"
|
|
271
|
-
},
|
|
266
|
+
}, so = {
|
|
272
267
|
class: "text-xs text-fm-color-typo-secondary"
|
|
268
|
+
}, no = {
|
|
269
|
+
class: "font-semibold"
|
|
273
270
|
}, uo = {
|
|
274
|
-
class: "
|
|
271
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
275
272
|
}, io = {
|
|
276
|
-
|
|
273
|
+
class: "break-all font-semibold"
|
|
277
274
|
}, ro = {
|
|
278
|
-
|
|
275
|
+
key: 0
|
|
279
276
|
}, co = {
|
|
280
|
-
class: "break-all font-mono text-xs font-semibold"
|
|
281
|
-
}, mo = {
|
|
282
277
|
class: "text-xs text-fm-color-typo-secondary"
|
|
283
|
-
},
|
|
278
|
+
}, mo = {
|
|
284
279
|
class: "break-all font-mono text-xs font-semibold"
|
|
280
|
+
}, fo = {
|
|
281
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
285
282
|
}, vo = {
|
|
283
|
+
class: "break-all font-mono text-xs font-semibold"
|
|
284
|
+
}, bo = {
|
|
286
285
|
class: "text-xs text-fm-color-typo-secondary"
|
|
287
286
|
}, go = {
|
|
288
287
|
class: "font-semibold"
|
|
289
|
-
}, bo = {
|
|
290
|
-
class: "rounded-lg border border-fm-color-border-default"
|
|
291
288
|
}, po = {
|
|
292
|
-
class: "
|
|
289
|
+
class: "rounded-lg border border-fm-color-border-default"
|
|
293
290
|
}, ho = {
|
|
294
|
-
class: "
|
|
291
|
+
class: "p-12"
|
|
295
292
|
}, yo = {
|
|
296
|
-
class: "
|
|
293
|
+
class: "text-base font-bold text-fm-color-typo-primary"
|
|
297
294
|
}, _o = {
|
|
298
|
-
class: "
|
|
295
|
+
class: "space-y-12 p-12"
|
|
299
296
|
}, xo = {
|
|
300
|
-
class: "
|
|
297
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
301
298
|
}, Lo = {
|
|
302
|
-
class: "
|
|
299
|
+
class: "font-semibold"
|
|
303
300
|
}, So = {
|
|
304
|
-
class: "
|
|
301
|
+
class: "rounded-lg border border-fm-color-border-default"
|
|
305
302
|
}, ko = {
|
|
306
|
-
class: "
|
|
303
|
+
class: "p-12"
|
|
307
304
|
}, wo = {
|
|
308
|
-
class: "
|
|
305
|
+
class: "text-base font-bold text-fm-color-typo-primary"
|
|
309
306
|
}, Mo = {
|
|
310
|
-
class: "
|
|
307
|
+
class: "space-y-12 p-12"
|
|
311
308
|
}, Fo = {
|
|
312
|
-
class: "
|
|
309
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
313
310
|
}, Do = {
|
|
314
|
-
|
|
311
|
+
class: "font-semibold"
|
|
315
312
|
}, Io = {
|
|
316
|
-
|
|
313
|
+
key: 0
|
|
317
314
|
}, Oo = {
|
|
315
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
316
|
+
}, To = {
|
|
318
317
|
key: 0,
|
|
319
318
|
class: "font-semibold"
|
|
320
|
-
},
|
|
319
|
+
}, jo = {
|
|
321
320
|
key: 1,
|
|
322
321
|
class: "break-all font-mono text-xs text-fm-color-typo-secondary"
|
|
323
|
-
}, jo = {
|
|
324
|
-
key: 1
|
|
325
322
|
}, Po = {
|
|
326
|
-
|
|
323
|
+
key: 1
|
|
327
324
|
}, Vo = {
|
|
328
|
-
class: "font-semibold whitespace-pre-line"
|
|
329
|
-
}, Ao = {
|
|
330
325
|
class: "text-xs text-fm-color-typo-secondary"
|
|
326
|
+
}, Ao = {
|
|
327
|
+
class: "font-semibold whitespace-pre-line"
|
|
331
328
|
}, Eo = {
|
|
332
|
-
class: "font-semibold"
|
|
333
|
-
}, Ro = {
|
|
334
329
|
class: "text-xs text-fm-color-typo-secondary"
|
|
330
|
+
}, Ro = {
|
|
331
|
+
class: "font-semibold"
|
|
335
332
|
}, Co = {
|
|
336
|
-
class: "
|
|
333
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
337
334
|
}, Uo = {
|
|
338
|
-
|
|
335
|
+
class: "break-all font-mono text-xs font-semibold"
|
|
339
336
|
}, $o = {
|
|
340
|
-
|
|
337
|
+
key: 2
|
|
341
338
|
}, Yo = {
|
|
342
|
-
class: "
|
|
339
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
343
340
|
}, No = {
|
|
344
|
-
class: "
|
|
341
|
+
class: "mt-4 space-y-4"
|
|
345
342
|
}, Bo = {
|
|
346
|
-
class: "text-xs font-
|
|
343
|
+
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"
|
|
347
344
|
}, Ko = {
|
|
345
|
+
class: "text-xs font-semibold"
|
|
346
|
+
}, zo = {
|
|
348
347
|
key: 0,
|
|
349
348
|
class: "text-fm-color-typo-secondary"
|
|
350
|
-
}, zo = {
|
|
351
|
-
key: 3
|
|
352
349
|
}, qo = {
|
|
353
|
-
|
|
350
|
+
key: 3
|
|
354
351
|
}, Ho = {
|
|
352
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
353
|
+
}, Wo = {
|
|
355
354
|
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"
|
|
356
|
-
}, ne = 100, xe = 1e3,
|
|
355
|
+
}, ne = 100, xe = 1e3, Jo = "D MMM YYYY h:mm A", Go = "YYYY-MM-DD HH:mm", A = "YYYY-MM-DD", Be = "audit-log-export-fields", Xo = /* @__PURE__ */ Ke({
|
|
357
356
|
__name: "AuditLogList",
|
|
358
357
|
setup(a) {
|
|
359
358
|
const {
|
|
360
359
|
t: o
|
|
361
|
-
} =
|
|
362
|
-
async function
|
|
363
|
-
const t = Uint8Array.from(atob(e), (
|
|
360
|
+
} = ze(), f = It(), w = Yt(), P = b(!1), M = b(!1), S = b([]), s = b(null), O = b(!1);
|
|
361
|
+
async function V(e) {
|
|
362
|
+
const t = Uint8Array.from(atob(e), (g) => g.charCodeAt(0)), i = new DecompressionStream("gzip"), L = i.writable.getWriter();
|
|
364
363
|
return await L.write(t), await L.close(), new Response(i.readable).text();
|
|
365
364
|
}
|
|
366
365
|
const c = b("");
|
|
367
366
|
let F = 0;
|
|
368
|
-
|
|
367
|
+
ue(() => {
|
|
369
368
|
var e, t;
|
|
370
369
|
return (t = (e = s.value) == null ? void 0 : e.metadata) == null ? void 0 : t.requestBody;
|
|
371
370
|
}, async (e) => {
|
|
@@ -380,7 +379,7 @@ const se = [
|
|
|
380
379
|
}
|
|
381
380
|
if (e.startsWith("gzip:")) {
|
|
382
381
|
try {
|
|
383
|
-
const i = await
|
|
382
|
+
const i = await V(e.slice(5));
|
|
384
383
|
if (t !== F) return;
|
|
385
384
|
c.value = JSON.stringify(JSON.parse(i), null, 2);
|
|
386
385
|
} catch {
|
|
@@ -397,60 +396,60 @@ const se = [
|
|
|
397
396
|
}, {
|
|
398
397
|
immediate: !0
|
|
399
398
|
});
|
|
400
|
-
const K = b(1), ve = b(!1),
|
|
401
|
-
startDate: `${
|
|
402
|
-
endDate: `${
|
|
403
|
-
}), m = b(),
|
|
399
|
+
const K = b(1), ve = b(!1), W = b(0), ee = y(() => Math.max(1, Math.ceil(W.value / ne))), te = _().format("YYYY-MM-DD"), v = b({
|
|
400
|
+
startDate: `${te} 00:00`,
|
|
401
|
+
endDate: `${te} 23:59`
|
|
402
|
+
}), m = b(), k = b(), x = b(), T = b(), j = b("all");
|
|
404
403
|
function r(e) {
|
|
405
404
|
return typeof e == "string" ? [e] : Array.isArray(e) ? e.filter((t) => typeof t == "string") : [];
|
|
406
405
|
}
|
|
407
|
-
const
|
|
408
|
-
function
|
|
406
|
+
const q = se.filter((e) => e.key !== "all").map((e) => e.key);
|
|
407
|
+
function Y(e) {
|
|
409
408
|
const t = se.find((i) => i.key !== "all" && i.subjectPrefixes.some((L) => e.startsWith(L)));
|
|
410
409
|
return (t == null ? void 0 : t.key) ?? "other";
|
|
411
410
|
}
|
|
412
|
-
function
|
|
413
|
-
const t =
|
|
414
|
-
return t === -1 ?
|
|
411
|
+
function oe(e) {
|
|
412
|
+
const t = q.indexOf(e);
|
|
413
|
+
return t === -1 ? q.length : t;
|
|
415
414
|
}
|
|
416
|
-
const Le =
|
|
415
|
+
const Le = y(() => se.map(({
|
|
417
416
|
key: e
|
|
418
417
|
}) => ({
|
|
419
418
|
label: o(`auditLog.modules.${e}`),
|
|
420
419
|
value: e
|
|
421
|
-
}))), E =
|
|
420
|
+
}))), E = y(() => se.find((e) => e.key === j.value) ?? se[0]), ae = y(() => j.value === "all"), qe = y(() => w.members.map((e) => ({
|
|
422
421
|
label: e.name,
|
|
423
422
|
value: e.doc.userId
|
|
424
|
-
}))),
|
|
425
|
-
const e =
|
|
426
|
-
label:
|
|
427
|
-
value:
|
|
428
|
-
}))), t = Object.entries(
|
|
429
|
-
label:
|
|
430
|
-
value:
|
|
423
|
+
}))), Se = y(() => {
|
|
424
|
+
const e = Ye.flatMap((g) => r(g.subject).map((D) => ({
|
|
425
|
+
label: g.label,
|
|
426
|
+
value: D
|
|
427
|
+
}))), t = Object.entries(Re).map(([g, D]) => ({
|
|
428
|
+
label: D,
|
|
429
|
+
value: g
|
|
431
430
|
})), i = /* @__PURE__ */ new Set(), L = [];
|
|
432
|
-
for (const
|
|
433
|
-
if (!i.has(
|
|
434
|
-
i.add(
|
|
435
|
-
const
|
|
431
|
+
for (const g of [...e, ...t])
|
|
432
|
+
if (!i.has(g.value)) {
|
|
433
|
+
i.add(g.value);
|
|
434
|
+
const D = Y(g.value);
|
|
436
435
|
L.push({
|
|
437
|
-
...
|
|
438
|
-
group: o(`auditLog.modules.${
|
|
436
|
+
...g,
|
|
437
|
+
group: o(`auditLog.modules.${D}`)
|
|
439
438
|
});
|
|
440
439
|
}
|
|
441
|
-
return L.sort((
|
|
442
|
-
});
|
|
443
|
-
function
|
|
440
|
+
return L.sort((g, D) => oe(Y(g.value)) - oe(Y(D.value)));
|
|
441
|
+
}), He = y(() => ae.value ? Se.value : Se.value.filter((e) => Y(e.value) === j.value));
|
|
442
|
+
function We(e, t) {
|
|
444
443
|
const i = t.toLowerCase();
|
|
445
444
|
return e.label.toLowerCase().includes(i) || e.value.replace(/^business::/, "").toLowerCase().includes(i) ? !0 : e.value.toLowerCase().includes(i);
|
|
446
445
|
}
|
|
447
|
-
const U =
|
|
446
|
+
const U = y(() => ({
|
|
448
447
|
manage: o("auditLog.action.manage"),
|
|
449
448
|
create: o("auditLog.action.create"),
|
|
450
449
|
read: o("auditLog.action.read"),
|
|
451
450
|
update: o("auditLog.action.update"),
|
|
452
451
|
delete: o("auditLog.action.delete")
|
|
453
|
-
})),
|
|
452
|
+
})), Je = y(() => [{
|
|
454
453
|
label: U.value.manage,
|
|
455
454
|
value: "manage"
|
|
456
455
|
}, {
|
|
@@ -465,20 +464,20 @@ const se = [
|
|
|
465
464
|
}, {
|
|
466
465
|
label: U.value.delete,
|
|
467
466
|
value: "delete"
|
|
468
|
-
}]),
|
|
467
|
+
}]), re = y(() => ({
|
|
469
468
|
allowed: o("auditLog.outcome.success"),
|
|
470
469
|
denied: o("auditLog.outcome.failed"),
|
|
471
470
|
skipped: o("auditLog.outcome.skipped")
|
|
472
|
-
})),
|
|
473
|
-
label:
|
|
471
|
+
})), Ge = y(() => [{
|
|
472
|
+
label: re.value.allowed,
|
|
474
473
|
value: "allowed"
|
|
475
474
|
}, {
|
|
476
|
-
label:
|
|
475
|
+
label: re.value.denied,
|
|
477
476
|
value: "denied"
|
|
478
477
|
}, {
|
|
479
|
-
label:
|
|
478
|
+
label: re.value.skipped,
|
|
480
479
|
value: "skipped"
|
|
481
|
-
}]),
|
|
480
|
+
}]), Xe = y(() => ({
|
|
482
481
|
admin: o("auditLog.detail.resolvedFromValue.admin"),
|
|
483
482
|
staff: o("auditLog.detail.resolvedFromValue.staff"),
|
|
484
483
|
permissionSet: o("auditLog.detail.resolvedFromValue.permissionSet"),
|
|
@@ -486,131 +485,131 @@ const se = [
|
|
|
486
485
|
custom: o("auditLog.detail.resolvedFromValue.custom"),
|
|
487
486
|
"no-match": o("auditLog.detail.resolvedFromValue.noMatch"),
|
|
488
487
|
unknown: o("auditLog.detail.resolvedFromValue.unknown")
|
|
489
|
-
})),
|
|
488
|
+
})), Qe = y(() => ({
|
|
490
489
|
GET: U.value.read,
|
|
491
490
|
POST: U.value.create,
|
|
492
491
|
PUT: U.value.update,
|
|
493
492
|
PATCH: U.value.update,
|
|
494
493
|
DELETE: U.value.delete
|
|
495
|
-
})),
|
|
494
|
+
})), ke = {
|
|
496
495
|
allowed: "success",
|
|
497
496
|
denied: "critical",
|
|
498
497
|
skipped: "warning"
|
|
499
498
|
};
|
|
500
|
-
function
|
|
501
|
-
return
|
|
499
|
+
function de(e) {
|
|
500
|
+
return _(e).format(Jo);
|
|
502
501
|
}
|
|
503
|
-
const
|
|
502
|
+
const Ze = y(() => {
|
|
504
503
|
const {
|
|
505
504
|
startDate: e,
|
|
506
505
|
endDate: t
|
|
507
506
|
} = v.value;
|
|
508
|
-
return e && t ? `${
|
|
509
|
-
}),
|
|
507
|
+
return e && t ? `${de(e)} – ${de(t)}` : e ? de(e) : t ? de(t) : o("auditLog.dateRange.placeholder");
|
|
508
|
+
}), et = y(() => [{
|
|
510
509
|
label: o("date.predefinedRanges.today"),
|
|
511
510
|
value: {
|
|
512
|
-
startDate:
|
|
513
|
-
endDate:
|
|
511
|
+
startDate: _().format(A),
|
|
512
|
+
endDate: _().format(A)
|
|
514
513
|
}
|
|
515
514
|
}, {
|
|
516
515
|
label: o("date.predefinedRanges.yesterday"),
|
|
517
516
|
value: {
|
|
518
|
-
startDate:
|
|
519
|
-
endDate:
|
|
517
|
+
startDate: _().subtract(1, "day").format(A),
|
|
518
|
+
endDate: _().subtract(1, "day").format(A)
|
|
520
519
|
}
|
|
521
520
|
}, {
|
|
522
521
|
label: o("date.predefinedRanges.thisWeek"),
|
|
523
522
|
value: {
|
|
524
|
-
startDate:
|
|
525
|
-
endDate:
|
|
523
|
+
startDate: _().startOf("week").format(A),
|
|
524
|
+
endDate: _().endOf("week").format(A)
|
|
526
525
|
}
|
|
527
526
|
}, {
|
|
528
527
|
label: o("date.predefinedRanges.lastWeek"),
|
|
529
528
|
value: {
|
|
530
|
-
startDate:
|
|
531
|
-
endDate:
|
|
529
|
+
startDate: _().subtract(1, "week").startOf("week").format(A),
|
|
530
|
+
endDate: _().subtract(1, "week").endOf("week").format(A)
|
|
532
531
|
}
|
|
533
532
|
}, {
|
|
534
533
|
label: o("date.predefinedRanges.last7Days"),
|
|
535
534
|
value: {
|
|
536
|
-
startDate:
|
|
537
|
-
endDate:
|
|
535
|
+
startDate: _().subtract(7, "day").format(A),
|
|
536
|
+
endDate: _().subtract(1, "day").format(A)
|
|
538
537
|
}
|
|
539
538
|
}, {
|
|
540
539
|
label: o("date.predefinedRanges.thisMonth"),
|
|
541
540
|
value: {
|
|
542
|
-
startDate:
|
|
543
|
-
endDate:
|
|
541
|
+
startDate: _().startOf("month").format(A),
|
|
542
|
+
endDate: _().endOf("month").format(A)
|
|
544
543
|
}
|
|
545
544
|
}, {
|
|
546
545
|
label: o("date.predefinedRanges.lastMonth"),
|
|
547
546
|
value: {
|
|
548
|
-
startDate:
|
|
549
|
-
endDate:
|
|
547
|
+
startDate: _().subtract(1, "month").startOf("month").format(A),
|
|
548
|
+
endDate: _().subtract(1, "month").endOf("month").format(A)
|
|
550
549
|
}
|
|
551
550
|
}]);
|
|
552
|
-
function
|
|
551
|
+
function be(e) {
|
|
553
552
|
var t;
|
|
554
|
-
return ((t =
|
|
553
|
+
return ((t = Ye.find((i) => i.subject === e)) == null ? void 0 : t.label) ?? Re[e];
|
|
555
554
|
}
|
|
556
|
-
function
|
|
555
|
+
function ce(e) {
|
|
557
556
|
var i;
|
|
558
557
|
const t = w.userIdToName[e.userId];
|
|
559
558
|
return t || (w.hasLoaded ? (i = f.sessionUser.value) != null && i.isInternal ? `${e.actorName ?? e.userId} (${o("auditLog.user.feedmeAdmin")})` : o("auditLog.user.feedmeAdmin") : e.userId);
|
|
560
559
|
}
|
|
561
|
-
function ke(e) {
|
|
562
|
-
return w.userIdToPhone[e.userId] || "-";
|
|
563
|
-
}
|
|
564
|
-
function et(e) {
|
|
565
|
-
return w.userIdToEmail[e.userId] || "-";
|
|
566
|
-
}
|
|
567
560
|
function we(e) {
|
|
568
|
-
return
|
|
561
|
+
return w.userIdToPhone[e.userId] || "-";
|
|
569
562
|
}
|
|
570
563
|
function tt(e) {
|
|
571
|
-
return
|
|
564
|
+
return w.userIdToEmail[e.userId] || "-";
|
|
572
565
|
}
|
|
573
566
|
function Me(e) {
|
|
574
|
-
return
|
|
575
|
-
}
|
|
576
|
-
function Fe(e) {
|
|
577
|
-
return e.metadata.operationLabel ?? Me(e.action);
|
|
567
|
+
return _(e).format("DD MMM YYYY, HH:mm");
|
|
578
568
|
}
|
|
579
569
|
function ot(e) {
|
|
580
|
-
return
|
|
570
|
+
return _(e).format("DD MMM YYYY, HH:mm:ss").toUpperCase();
|
|
581
571
|
}
|
|
582
|
-
function
|
|
583
|
-
return
|
|
572
|
+
function Fe(e) {
|
|
573
|
+
return U.value[e] ?? e;
|
|
574
|
+
}
|
|
575
|
+
function De(e) {
|
|
576
|
+
return e.metadata.operationLabel ?? Fe(e.action);
|
|
584
577
|
}
|
|
585
578
|
function at(e) {
|
|
586
|
-
return
|
|
579
|
+
return be(e.subject) ?? e.subject;
|
|
580
|
+
}
|
|
581
|
+
function ge(e) {
|
|
582
|
+
return re.value[e];
|
|
587
583
|
}
|
|
588
584
|
function lt(e) {
|
|
589
|
-
return
|
|
585
|
+
return Xe.value[e] ?? e;
|
|
590
586
|
}
|
|
591
|
-
function
|
|
587
|
+
function st(e) {
|
|
588
|
+
return e.metadata.requestMethod ? Qe.value[e.metadata.requestMethod] ?? e.metadata.requestMethod : Fe(e.action);
|
|
589
|
+
}
|
|
590
|
+
function Ie(e) {
|
|
592
591
|
const t = String(e ?? "");
|
|
593
592
|
return `"${(/^[=+\-@\t\r]/.test(t) ? `'${t}` : t).replace(/"/g, '""')}"`;
|
|
594
593
|
}
|
|
595
594
|
const pe = [{
|
|
596
595
|
key: "timestamp",
|
|
597
596
|
labelKey: "auditLog.exportFields.timestamp",
|
|
598
|
-
getValue: (e) =>
|
|
597
|
+
getValue: (e) => Me(e.timestamp),
|
|
599
598
|
defaultSelected: !0
|
|
600
599
|
}, {
|
|
601
600
|
key: "userName",
|
|
602
601
|
labelKey: "auditLog.exportFields.userName",
|
|
603
|
-
getValue: (e) =>
|
|
602
|
+
getValue: (e) => ce(e),
|
|
604
603
|
defaultSelected: !0
|
|
605
604
|
}, {
|
|
606
605
|
key: "userPhone",
|
|
607
606
|
labelKey: "auditLog.exportFields.userPhone",
|
|
608
|
-
getValue: (e) =>
|
|
607
|
+
getValue: (e) => we(e),
|
|
609
608
|
defaultSelected: !0
|
|
610
609
|
}, {
|
|
611
610
|
key: "subject",
|
|
612
611
|
labelKey: "auditLog.exportFields.subject",
|
|
613
|
-
getValue: (e) =>
|
|
612
|
+
getValue: (e) => be(e.subject) ?? e.subject,
|
|
614
613
|
defaultSelected: !0
|
|
615
614
|
}, {
|
|
616
615
|
key: "action",
|
|
@@ -620,12 +619,12 @@ const se = [
|
|
|
620
619
|
}, {
|
|
621
620
|
key: "operation",
|
|
622
621
|
labelKey: "auditLog.exportFields.operation",
|
|
623
|
-
getValue: (e) =>
|
|
622
|
+
getValue: (e) => De(e),
|
|
624
623
|
defaultSelected: !0
|
|
625
624
|
}, {
|
|
626
625
|
key: "outcome",
|
|
627
626
|
labelKey: "auditLog.exportFields.outcome",
|
|
628
|
-
getValue: (e) =>
|
|
627
|
+
getValue: (e) => ge(e.outcome),
|
|
629
628
|
defaultSelected: !0
|
|
630
629
|
}, {
|
|
631
630
|
key: "businessId",
|
|
@@ -667,9 +666,9 @@ const se = [
|
|
|
667
666
|
},
|
|
668
667
|
defaultSelected: !1
|
|
669
668
|
}];
|
|
670
|
-
function
|
|
669
|
+
function nt() {
|
|
671
670
|
try {
|
|
672
|
-
const e = localStorage.getItem(
|
|
671
|
+
const e = localStorage.getItem(Be);
|
|
673
672
|
if (e) {
|
|
674
673
|
const t = JSON.parse(e);
|
|
675
674
|
if (Array.isArray(t) && t.length > 0) return new Set(t);
|
|
@@ -678,41 +677,41 @@ const se = [
|
|
|
678
677
|
}
|
|
679
678
|
return new Set(pe.filter((e) => e.defaultSelected).map((e) => e.key));
|
|
680
679
|
}
|
|
681
|
-
const
|
|
682
|
-
function
|
|
683
|
-
const t = new Set(
|
|
680
|
+
const J = b(nt());
|
|
681
|
+
function ut(e) {
|
|
682
|
+
const t = new Set(J.value);
|
|
684
683
|
if (t.has(e)) {
|
|
685
684
|
if (t.size <= 1) return;
|
|
686
685
|
t.delete(e);
|
|
687
686
|
} else
|
|
688
687
|
t.add(e);
|
|
689
|
-
|
|
688
|
+
J.value = t;
|
|
690
689
|
try {
|
|
691
|
-
localStorage.setItem(
|
|
690
|
+
localStorage.setItem(Be, JSON.stringify([...t]));
|
|
692
691
|
} catch {
|
|
693
692
|
}
|
|
694
693
|
}
|
|
695
|
-
async function
|
|
696
|
-
var e, t, i, L,
|
|
694
|
+
async function it() {
|
|
695
|
+
var e, t, i, L, g, D;
|
|
697
696
|
if (!M.value) {
|
|
698
697
|
M.value = !0;
|
|
699
698
|
try {
|
|
700
699
|
const {
|
|
701
700
|
startDate: $,
|
|
702
|
-
endDate:
|
|
703
|
-
} = v.value,
|
|
701
|
+
endDate: z
|
|
702
|
+
} = v.value, H = E.value.subjectPrefixes, me = (/* @__PURE__ */ new Date()).toISOString().slice(0, 19).replace("T", " "), d = z ? G(z) : null, X = d && d < me ? d : me, vt = {
|
|
704
703
|
...$ ? {
|
|
705
|
-
from:
|
|
704
|
+
from: G($)
|
|
706
705
|
} : {},
|
|
707
|
-
to:
|
|
706
|
+
to: X,
|
|
708
707
|
...(e = m.value) != null && e.length ? {
|
|
709
708
|
userIds: m.value
|
|
710
709
|
} : {},
|
|
711
|
-
...
|
|
712
|
-
subjects:
|
|
710
|
+
...(t = k.value) != null && t.length ? {
|
|
711
|
+
subjects: k.value
|
|
713
712
|
} : {},
|
|
714
|
-
...
|
|
715
|
-
subjectPrefixes: [...
|
|
713
|
+
...H.length ? {
|
|
714
|
+
subjectPrefixes: [...H]
|
|
716
715
|
} : {},
|
|
717
716
|
...(i = T.value) != null && i.length ? {
|
|
718
717
|
actions: T.value
|
|
@@ -720,32 +719,32 @@ const se = [
|
|
|
720
719
|
...(L = x.value) != null && L.length ? {
|
|
721
720
|
outcomes: x.value
|
|
722
721
|
} : {}
|
|
723
|
-
},
|
|
724
|
-
let
|
|
722
|
+
}, je = [];
|
|
723
|
+
let Pe = 0;
|
|
725
724
|
for (; ; ) {
|
|
726
725
|
const R = await _e.read({
|
|
727
|
-
...
|
|
726
|
+
...vt,
|
|
728
727
|
limit: xe,
|
|
729
|
-
offset:
|
|
728
|
+
offset: Pe
|
|
730
729
|
});
|
|
731
|
-
if (
|
|
732
|
-
|
|
730
|
+
if (je.push(...R), R.length < xe) break;
|
|
731
|
+
Pe += xe;
|
|
733
732
|
}
|
|
734
|
-
const
|
|
735
|
-
`),
|
|
733
|
+
const Ve = pe.filter((R) => J.value.has(R.key)), bt = Ve.map((R) => o(R.labelKey)), gt = je.map((R) => Ve.map((wt) => wt.getValue(R) ?? "")), ye = -(/* @__PURE__ */ new Date()).getTimezoneOffset(), pt = ye >= 0 ? "+" : "-", ht = String(Math.floor(Math.abs(ye) / 60)).padStart(2, "0"), yt = String(Math.abs(ye) % 60).padStart(2, "0"), _t = `UTC${pt}${ht}:${yt}`, Ae = ((g = f.currentBusiness.value) == null ? void 0 : g.name) || "", xt = [$, z].filter(Boolean).join(" – "), Lt = [...[[o("auditLog.title")], [`${o("auditLog.frontMatter.date")}: ${xt}`], ...Ae ? [[`${o("auditLog.frontMatter.business")}: ${Ae}`]] : [], [`${o("auditLog.frontMatter.generatedBy")}: ${_().format("DD MMM YYYY, HH:mm")} (${_t})`], []].map((R) => R.map(Ie).join(",")), ...[bt, ...gt].map((R) => R.map(Ie).join(","))].join(`
|
|
734
|
+
`), St = `audit-log_${(((D = f.currentBusiness.value) == null ? void 0 : D.name) || "business").replace(/[^a-z0-9_-]+/gi, "_")}_${_().format("YYYYMMDD_HHmmss")}.csv`, kt = new Blob([`\uFEFF${Lt}`], {
|
|
736
735
|
type: "text/csv;charset=utf-8;"
|
|
737
|
-
}),
|
|
738
|
-
le.href =
|
|
736
|
+
}), Ee = window.URL.createObjectURL(kt), le = document.createElement("a");
|
|
737
|
+
le.href = Ee, le.download = St, document.body.appendChild(le), le.click(), le.remove(), window.URL.revokeObjectURL(Ee);
|
|
739
738
|
} finally {
|
|
740
739
|
M.value = !1;
|
|
741
740
|
}
|
|
742
741
|
}
|
|
743
742
|
}
|
|
744
|
-
const
|
|
743
|
+
const rt = [{
|
|
745
744
|
accessorKey: "timestamp",
|
|
746
745
|
header: () => o("auditLog.columns.timestamp"),
|
|
747
746
|
cell(e) {
|
|
748
|
-
return
|
|
747
|
+
return Me(e.row.original.timestamp);
|
|
749
748
|
}
|
|
750
749
|
}, {
|
|
751
750
|
accessorKey: "userId",
|
|
@@ -754,26 +753,26 @@ const se = [
|
|
|
754
753
|
size: 220,
|
|
755
754
|
cell(e) {
|
|
756
755
|
const t = e.row.original;
|
|
757
|
-
return
|
|
756
|
+
return p("div", {
|
|
758
757
|
class: "flex items-center gap-8"
|
|
759
|
-
}, [
|
|
760
|
-
name:
|
|
758
|
+
}, [p(Ce.FmAvatar, {
|
|
759
|
+
name: ce(t),
|
|
761
760
|
size: "sm",
|
|
762
761
|
class: "shrink-0"
|
|
763
|
-
}, null),
|
|
762
|
+
}, null), p("div", {
|
|
764
763
|
class: "min-w-0"
|
|
765
|
-
}, [
|
|
764
|
+
}, [p("p", {
|
|
766
765
|
class: "truncate font-semibold"
|
|
767
|
-
}, [
|
|
766
|
+
}, [ce(t)]), p("p", {
|
|
768
767
|
class: "truncate text-fm-color-typo-secondary"
|
|
769
|
-
}, [
|
|
768
|
+
}, [we(t)])])]);
|
|
770
769
|
}
|
|
771
770
|
}, {
|
|
772
771
|
accessorKey: "subject",
|
|
773
772
|
header: () => o("auditLog.columns.subject"),
|
|
774
773
|
cell(e) {
|
|
775
774
|
const t = e.row.original;
|
|
776
|
-
return
|
|
775
|
+
return be(t.subject) ?? t.subject;
|
|
777
776
|
}
|
|
778
777
|
}, {
|
|
779
778
|
accessorKey: "action",
|
|
@@ -784,7 +783,7 @@ const se = [
|
|
|
784
783
|
cellSpanClass: "audit-log-action-label"
|
|
785
784
|
},
|
|
786
785
|
cell(e) {
|
|
787
|
-
return
|
|
786
|
+
return De(e.row.original);
|
|
788
787
|
}
|
|
789
788
|
}, {
|
|
790
789
|
accessorKey: "outcome",
|
|
@@ -792,41 +791,41 @@ const se = [
|
|
|
792
791
|
enableSorting: !1,
|
|
793
792
|
cell(e) {
|
|
794
793
|
const t = e.row.original;
|
|
795
|
-
return
|
|
796
|
-
variant:
|
|
797
|
-
label:
|
|
794
|
+
return p(Ce.FmChip, {
|
|
795
|
+
variant: ke[t.outcome] ?? "neutral",
|
|
796
|
+
label: ge(t.outcome),
|
|
798
797
|
compact: !0
|
|
799
798
|
}, null);
|
|
800
799
|
}
|
|
801
800
|
}];
|
|
802
|
-
function
|
|
803
|
-
const t =
|
|
801
|
+
function G(e) {
|
|
802
|
+
const t = _(e, Go);
|
|
804
803
|
return new Date(t.year(), t.month(), t.date(), t.hour(), t.minute(), 0).toISOString().slice(0, 19).replace("T", " ");
|
|
805
804
|
}
|
|
806
|
-
async function
|
|
805
|
+
async function Oe() {
|
|
807
806
|
var e, t, i, L;
|
|
808
|
-
|
|
807
|
+
P.value = !0;
|
|
809
808
|
try {
|
|
810
809
|
const {
|
|
811
|
-
startDate:
|
|
812
|
-
endDate:
|
|
813
|
-
} = v.value, $ = (K.value - 1) * ne,
|
|
810
|
+
startDate: g,
|
|
811
|
+
endDate: D
|
|
812
|
+
} = v.value, $ = (K.value - 1) * ne, z = E.value.subjectPrefixes, H = await _e.read({
|
|
814
813
|
limit: ne,
|
|
815
814
|
offset: $,
|
|
816
|
-
...
|
|
817
|
-
from:
|
|
815
|
+
...g ? {
|
|
816
|
+
from: G(g)
|
|
818
817
|
} : {},
|
|
819
|
-
...
|
|
820
|
-
to:
|
|
818
|
+
...D ? {
|
|
819
|
+
to: G(D)
|
|
821
820
|
} : {},
|
|
822
821
|
...(e = m.value) != null && e.length ? {
|
|
823
822
|
userIds: m.value
|
|
824
823
|
} : {},
|
|
825
|
-
...
|
|
826
|
-
subjects:
|
|
824
|
+
...(t = k.value) != null && t.length ? {
|
|
825
|
+
subjects: k.value
|
|
827
826
|
} : {},
|
|
828
|
-
...
|
|
829
|
-
subjectPrefixes: [...
|
|
827
|
+
...z.length ? {
|
|
828
|
+
subjectPrefixes: [...z]
|
|
830
829
|
} : {},
|
|
831
830
|
...(i = T.value) != null && i.length ? {
|
|
832
831
|
actions: T.value
|
|
@@ -835,46 +834,46 @@ const se = [
|
|
|
835
834
|
outcomes: x.value
|
|
836
835
|
} : {}
|
|
837
836
|
});
|
|
838
|
-
S.value =
|
|
837
|
+
S.value = H, ve.value = H.length === ne;
|
|
839
838
|
} finally {
|
|
840
|
-
|
|
839
|
+
P.value = !1;
|
|
841
840
|
}
|
|
842
841
|
}
|
|
843
|
-
const
|
|
842
|
+
const Te = y(() => {
|
|
844
843
|
var e;
|
|
845
844
|
return JSON.stringify({
|
|
846
845
|
businessId: ((e = f.currentBusiness.value) == null ? void 0 : e._id) ?? "",
|
|
847
846
|
dateRange: v.value,
|
|
848
847
|
users: [...m.value ?? []].sort(),
|
|
849
|
-
subjects: [...
|
|
848
|
+
subjects: [...k.value ?? []].sort(),
|
|
850
849
|
outcomes: [...x.value ?? []].sort(),
|
|
851
850
|
actions: [...T.value ?? []].sort(),
|
|
852
|
-
moduleKey:
|
|
851
|
+
moduleKey: j.value
|
|
853
852
|
});
|
|
854
853
|
});
|
|
855
|
-
async function
|
|
856
|
-
var L,
|
|
854
|
+
async function dt() {
|
|
855
|
+
var L, g, D, $;
|
|
857
856
|
const {
|
|
858
857
|
startDate: e,
|
|
859
858
|
endDate: t
|
|
860
859
|
} = v.value, i = E.value.subjectPrefixes;
|
|
861
|
-
|
|
860
|
+
W.value = await _e.count({
|
|
862
861
|
...e ? {
|
|
863
|
-
from:
|
|
862
|
+
from: G(e)
|
|
864
863
|
} : {},
|
|
865
864
|
...t ? {
|
|
866
|
-
to:
|
|
865
|
+
to: G(t)
|
|
867
866
|
} : {},
|
|
868
867
|
...(L = m.value) != null && L.length ? {
|
|
869
868
|
userIds: m.value
|
|
870
869
|
} : {},
|
|
871
|
-
...
|
|
872
|
-
subjects:
|
|
870
|
+
...(g = k.value) != null && g.length ? {
|
|
871
|
+
subjects: k.value
|
|
873
872
|
} : {},
|
|
874
873
|
...i.length ? {
|
|
875
874
|
subjectPrefixes: [...i]
|
|
876
875
|
} : {},
|
|
877
|
-
...(
|
|
876
|
+
...(D = T.value) != null && D.length ? {
|
|
878
877
|
actions: T.value
|
|
879
878
|
} : {},
|
|
880
879
|
...($ = x.value) != null && $.length ? {
|
|
@@ -882,172 +881,174 @@ const se = [
|
|
|
882
881
|
} : {}
|
|
883
882
|
});
|
|
884
883
|
}
|
|
885
|
-
|
|
884
|
+
ue(Te, async () => {
|
|
886
885
|
var e;
|
|
887
|
-
K.value = 1, (e = f.currentBusiness.value) != null && e._id && await Promise.all([
|
|
886
|
+
K.value = 1, (e = f.currentBusiness.value) != null && e._id && await Promise.all([dt(), Oe()]);
|
|
888
887
|
}, {
|
|
889
888
|
immediate: !0
|
|
889
|
+
}), ue(j, () => {
|
|
890
|
+
k.value = void 0;
|
|
890
891
|
});
|
|
891
892
|
let he = !1;
|
|
892
|
-
async function
|
|
893
|
+
async function ct({
|
|
893
894
|
pageIndex: e
|
|
894
895
|
}) {
|
|
895
896
|
var t;
|
|
896
897
|
if ((t = f.currentBusiness.value) != null && t._id && e !== 0 && !he) {
|
|
897
898
|
he = !0, K.value = e + 1;
|
|
898
899
|
try {
|
|
899
|
-
await
|
|
900
|
+
await Oe();
|
|
900
901
|
} finally {
|
|
901
902
|
he = !1;
|
|
902
903
|
}
|
|
903
904
|
}
|
|
904
905
|
}
|
|
905
|
-
function
|
|
906
|
+
function mt(e) {
|
|
906
907
|
s.value = e, O.value = !0;
|
|
907
908
|
}
|
|
908
|
-
function
|
|
909
|
+
function ft() {
|
|
909
910
|
O.value = !1, s.value = null;
|
|
910
911
|
}
|
|
911
|
-
return
|
|
912
|
+
return ue(f.currentBusiness, (e) => {
|
|
912
913
|
e && w.readTeamMembers();
|
|
913
914
|
}, {
|
|
914
915
|
immediate: !0
|
|
915
916
|
}), (e, t) => {
|
|
916
|
-
const i = C("FmSpacer"), L = C("FmButton"),
|
|
917
|
-
return
|
|
917
|
+
const i = C("FmSpacer"), L = C("FmButton"), g = C("FmMenuItem"), D = C("FmMenu"), $ = C("FmChip"), z = C("FmDateRangePicker"), H = C("FmTable"), me = C("FmSideSheet");
|
|
918
|
+
return h(), I(Z, null, [p(jt, {
|
|
918
919
|
heading: n(o)("auditLog.title")
|
|
919
920
|
}, {
|
|
920
|
-
"append-heading": B(() => [
|
|
921
|
+
"append-heading": B(() => [p(i), p(L, {
|
|
921
922
|
variant: "primary",
|
|
922
923
|
"prepend-icon": "upload",
|
|
923
924
|
label: n(o)("auditLog.export"),
|
|
924
925
|
disabled: S.value.length === 0 || M.value || n(w).isLoading || n(w).members.length === 0,
|
|
925
926
|
loading: M.value,
|
|
926
|
-
onClick:
|
|
927
|
-
}, null, 8, ["label", "disabled", "loading"]),
|
|
927
|
+
onClick: it
|
|
928
|
+
}, null, 8, ["label", "disabled", "loading"]), p(D, {
|
|
928
929
|
"close-on-click": !1,
|
|
929
930
|
"z-index": 50
|
|
930
931
|
}, {
|
|
931
|
-
"menu-button": B(() => [
|
|
932
|
+
"menu-button": B(() => [p(L, {
|
|
932
933
|
variant: "tertiary",
|
|
933
934
|
icon: "settings",
|
|
934
935
|
"aria-label": n(o)("auditLog.exportSettings.title"),
|
|
935
936
|
disabled: M.value
|
|
936
937
|
}, null, 8, ["aria-label", "disabled"])]),
|
|
937
|
-
default: B(() => [l("div",
|
|
938
|
+
default: B(() => [l("div", Nt, [l("p", Bt, u(n(o)("auditLog.exportSettings.title")), 1), (h(), I(Z, null, ie(pe, (d) => p(g, {
|
|
938
939
|
key: d.key,
|
|
939
940
|
label: n(o)(d.labelKey),
|
|
940
941
|
"has-checkbox": "",
|
|
941
|
-
"model-value":
|
|
942
|
-
disabled:
|
|
943
|
-
onClick: (
|
|
942
|
+
"model-value": J.value.has(d.key),
|
|
943
|
+
disabled: J.value.has(d.key) && J.value.size === 1,
|
|
944
|
+
onClick: (X) => ut(d.key)
|
|
944
945
|
}, null, 8, ["label", "model-value", "disabled", "onClick"])), 64))])]),
|
|
945
946
|
_: 1
|
|
946
947
|
})]),
|
|
947
|
-
default: B(() => [l("div",
|
|
948
|
-
modelValue:
|
|
949
|
-
"onUpdate:modelValue": t[0] || (t[0] = (d) =>
|
|
948
|
+
default: B(() => [l("div", Kt, [l("div", zt, [p($t, {
|
|
949
|
+
modelValue: j.value,
|
|
950
|
+
"onUpdate:modelValue": t[0] || (t[0] = (d) => j.value = d),
|
|
950
951
|
items: Le.value
|
|
951
|
-
}, null, 8, ["modelValue", "items"]), l("div",
|
|
952
|
+
}, null, 8, ["modelValue", "items"]), l("div", qt, [p(z, {
|
|
952
953
|
modelValue: v.value,
|
|
953
954
|
"onUpdate:modelValue": t[1] || (t[1] = (d) => v.value = d),
|
|
954
955
|
"show-predefined-range": "",
|
|
955
956
|
"show-time": "",
|
|
956
|
-
"predefined-range":
|
|
957
|
+
"predefined-range": et.value
|
|
957
958
|
}, {
|
|
958
|
-
"trigger-button": B(() => [
|
|
959
|
-
label:
|
|
959
|
+
"trigger-button": B(() => [p($, {
|
|
960
|
+
label: Ze.value,
|
|
960
961
|
icon: "calendar_month"
|
|
961
962
|
}, null, 8, ["label"])]),
|
|
962
963
|
_: 1
|
|
963
|
-
}, 8, ["modelValue", "predefined-range"]), l("div",
|
|
964
|
+
}, 8, ["modelValue", "predefined-range"]), l("div", Ht, [p(fe, {
|
|
964
965
|
modelValue: m.value,
|
|
965
966
|
"onUpdate:modelValue": t[2] || (t[2] = (d) => m.value = d),
|
|
966
|
-
items:
|
|
967
|
+
items: qe.value,
|
|
967
968
|
multiple: "",
|
|
968
969
|
variant: "dark",
|
|
969
970
|
placeholder: n(o)("auditLog.filter.user_placeholder"),
|
|
970
971
|
"selected-prefix": n(o)("auditLog.filter.selected_user_prefix"),
|
|
971
972
|
"chip-icon": "account_circle"
|
|
972
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]),
|
|
973
|
-
modelValue:
|
|
974
|
-
"onUpdate:modelValue": t[3] || (t[3] = (d) =>
|
|
975
|
-
items:
|
|
976
|
-
"filter-fn":
|
|
973
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), l("div", Wt, [p(fe, {
|
|
974
|
+
modelValue: k.value,
|
|
975
|
+
"onUpdate:modelValue": t[3] || (t[3] = (d) => k.value = d),
|
|
976
|
+
items: He.value,
|
|
977
|
+
"filter-fn": We,
|
|
977
978
|
multiple: "",
|
|
978
979
|
variant: "dark",
|
|
979
980
|
placeholder: n(o)("auditLog.filter.subject_placeholder"),
|
|
980
981
|
"selected-prefix": n(o)("auditLog.filter.selected_subject_prefix"),
|
|
981
982
|
"chip-icon": "badge"
|
|
982
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])
|
|
983
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), l("div", Jt, [p(fe, {
|
|
983
984
|
modelValue: T.value,
|
|
984
985
|
"onUpdate:modelValue": t[4] || (t[4] = (d) => T.value = d),
|
|
985
|
-
items:
|
|
986
|
+
items: Je.value,
|
|
986
987
|
multiple: "",
|
|
987
988
|
variant: "dark",
|
|
988
989
|
placeholder: n(o)("auditLog.filter.action_placeholder"),
|
|
989
990
|
"selected-prefix": n(o)("auditLog.filter.selected_action_prefix"),
|
|
990
991
|
searchable: !1
|
|
991
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), l("div",
|
|
992
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), l("div", Gt, [p(fe, {
|
|
992
993
|
modelValue: x.value,
|
|
993
994
|
"onUpdate:modelValue": t[5] || (t[5] = (d) => x.value = d),
|
|
994
|
-
items:
|
|
995
|
+
items: Ge.value,
|
|
995
996
|
multiple: "",
|
|
996
997
|
variant: "dark",
|
|
997
998
|
placeholder: n(o)("auditLog.filter.status_placeholder"),
|
|
998
999
|
"selected-prefix": n(o)("auditLog.filter.selected_status_prefix"),
|
|
999
1000
|
searchable: !1,
|
|
1000
1001
|
"chip-icon": "check_circle"
|
|
1001
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])])]), !
|
|
1002
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])])]), !P.value && S.value.length === 0 ? (h(), Q(n(Pt), {
|
|
1002
1003
|
key: 0,
|
|
1003
1004
|
title: n(o)("auditLog.noData.title"),
|
|
1004
1005
|
subtitle: n(o)("auditLog.noData.subtitle")
|
|
1005
|
-
}, null, 8, ["title", "subtitle"])) : (
|
|
1006
|
+
}, null, 8, ["title", "subtitle"])) : (h(), Q(Ot, {
|
|
1006
1007
|
key: 1
|
|
1007
1008
|
}, {
|
|
1008
|
-
default: B(() => [(
|
|
1009
|
-
key:
|
|
1010
|
-
"column-defs":
|
|
1009
|
+
default: B(() => [(h(), Q(H, {
|
|
1010
|
+
key: Te.value,
|
|
1011
|
+
"column-defs": rt,
|
|
1011
1012
|
"row-data": S.value,
|
|
1012
1013
|
"page-size": ne,
|
|
1013
|
-
"page-count":
|
|
1014
|
-
"row-count":
|
|
1015
|
-
"fetch-fn":
|
|
1016
|
-
"hide-footer":
|
|
1017
|
-
loading:
|
|
1014
|
+
"page-count": ee.value,
|
|
1015
|
+
"row-count": W.value,
|
|
1016
|
+
"fetch-fn": ct,
|
|
1017
|
+
"hide-footer": ee.value <= 1,
|
|
1018
|
+
loading: P.value,
|
|
1018
1019
|
"pin-header-row": "",
|
|
1019
1020
|
class: "audit-log-list-table min-h-0 flex-1 cursor-pointer",
|
|
1020
|
-
onRowClick: t[6] || (t[6] = (d) =>
|
|
1021
|
+
onRowClick: t[6] || (t[6] = (d) => mt(d.original))
|
|
1021
1022
|
}, null, 8, ["row-data", "page-count", "row-count", "hide-footer", "loading"]))]),
|
|
1022
1023
|
_: 1
|
|
1023
1024
|
}))])]),
|
|
1024
1025
|
_: 1
|
|
1025
|
-
}, 8, ["heading"]),
|
|
1026
|
+
}, 8, ["heading"]), p(me, {
|
|
1026
1027
|
header: n(o)("auditLog.detail.header"),
|
|
1027
1028
|
"model-value": O.value,
|
|
1028
1029
|
"max-width": 480,
|
|
1029
1030
|
"dismiss-away": "",
|
|
1030
1031
|
"onUpdate:modelValue": t[7] || (t[7] = (d) => {
|
|
1031
|
-
d ||
|
|
1032
|
+
d || ft();
|
|
1032
1033
|
})
|
|
1033
1034
|
}, {
|
|
1034
|
-
default: B(() => [s.value ? (
|
|
1035
|
-
variant:
|
|
1036
|
-
label:
|
|
1035
|
+
default: B(() => [s.value ? (h(), I("div", Xt, [l("div", Qt, [l("div", Zt, [l("p", eo, u(at(s.value)), 1)]), p($, {
|
|
1036
|
+
variant: ke[s.value.outcome] ?? "neutral",
|
|
1037
|
+
label: ge(s.value.outcome),
|
|
1037
1038
|
compact: ""
|
|
1038
|
-
}, null, 8, ["variant", "label"])]), l("div",
|
|
1039
|
+
}, null, 8, ["variant", "label"])]), l("div", to, [l("div", oo, [l("div", null, [l("p", ao, u(n(o)("auditLog.detail.date")), 1), l("p", lo, u(ot(s.value.timestamp)), 1)]), l("div", null, [l("p", so, u(n(o)("auditLog.detail.user")), 1), l("p", no, u(ce(s.value)), 1)]), l("div", null, [l("p", uo, u(n(o)("auditLog.detail.email")), 1), l("p", io, u(tt(s.value)), 1)]), s.value.field ? (h(), I("div", ro, [l("p", co, u(n(o)("auditLog.detail.field")), 1), l("p", mo, u(s.value.field), 1)])) : N("", !0), l("div", null, [l("p", fo, u(n(o)("auditLog.detail.business")), 1), l("p", vo, u(s.value.businessId || "-"), 1)]), l("div", null, [l("p", bo, u(n(o)("auditLog.detail.restaurant")), 1), l("p", go, u(s.value.restaurantId || "-"), 1)])])]), l("div", po, [l("div", ho, [l("p", yo, u(n(o)("auditLog.detail.eventDetails")), 1)]), t[8] || (t[8] = l("hr", {
|
|
1039
1040
|
class: "border-fm-color-border-default"
|
|
1040
|
-
}, null, -1)), l("div",
|
|
1041
|
+
}, null, -1)), l("div", _o, [l("div", null, [l("p", xo, u(n(o)("auditLog.detail.actionDescription")), 1), l("p", Lo, u(s.value.metadata.operationLabel || "-"), 1)])])]), l("div", So, [l("div", ko, [l("p", wo, u(n(o)("auditLog.detail.metadata")), 1)]), t[9] || (t[9] = l("hr", {
|
|
1041
1042
|
class: "border-fm-color-border-default"
|
|
1042
|
-
}, null, -1)), l("div",
|
|
1043
|
-
key:
|
|
1043
|
+
}, null, -1)), l("div", Mo, [l("div", null, [l("p", Fo, u(n(o)("auditLog.detail.resolvedFrom")), 1), l("p", Do, u(lt(s.value.metadata.resolvedFrom)), 1)]), (s.value.metadata.resolvedFrom === "permissionSet" || s.value.metadata.resolvedFrom === "systemPermissionSet") && (s.value.metadata.permissionSetName || s.value.metadata.permissionSetId) ? (h(), I("div", Io, [l("p", Oo, u(n(o)("auditLog.detail.permissionSet")), 1), s.value.metadata.permissionSetName ? (h(), I("p", To, u(s.value.metadata.permissionSetName), 1)) : N("", !0), s.value.metadata.permissionSetId ? (h(), I("p", jo, u(s.value.metadata.permissionSetId), 1)) : N("", !0)])) : N("", !0), s.value.metadata.reason ? (h(), I("div", Po, [l("p", Vo, u(n(o)("auditLog.detail.reason")), 1), l("p", Ao, u(s.value.metadata.reason), 1)])) : N("", !0), l("div", null, [l("p", Eo, u(n(o)("auditLog.detail.requestMethod")), 1), l("p", Ro, u(st(s.value)), 1)]), l("div", null, [l("p", Co, u(n(o)("auditLog.detail.requestPath")), 1), l("p", Uo, u(s.value.metadata.requestPath || "-"), 1)]), s.value.metadata.trace && s.value.metadata.trace.length > 0 ? (h(), I("div", $o, [l("p", Yo, u(n(o)("auditLog.detail.permissionTrace")), 1), l("ol", No, [(h(!0), I(Z, null, ie(s.value.metadata.trace, (d, X) => (h(), I("li", {
|
|
1044
|
+
key: X,
|
|
1044
1045
|
class: "flex items-center gap-6"
|
|
1045
|
-
}, [l("span",
|
|
1046
|
+
}, [l("span", Bo, u(X + 1), 1), l("span", Ko, u(d), 1), X < s.value.metadata.trace.length - 1 ? (h(), I("span", zo, "→")) : N("", !0)]))), 128))])])) : N("", !0), c.value ? (h(), I("div", qo, [l("p", Ho, u(n(o)("auditLog.detail.requestBody")), 1), l("pre", Wo, u(c.value), 1)])) : N("", !0)])])])) : N("", !0)]),
|
|
1046
1047
|
_: 1
|
|
1047
1048
|
}, 8, ["header", "model-value"])], 64);
|
|
1048
1049
|
};
|
|
1049
1050
|
}
|
|
1050
|
-
}),
|
|
1051
|
+
}), ca = /* @__PURE__ */ Tt(Xo, [["__scopeId", "data-v-cf386576"]]);
|
|
1051
1052
|
export {
|
|
1052
|
-
|
|
1053
|
+
ca as default
|
|
1053
1054
|
};
|