@feedmepos/mf-hrm-portal 2.0.24-dev.1 → 2.0.24-dev.3
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-BetvGaDX.js → AuditLogList-Czy2T2Rx.js} +204 -208
- package/dist/{EmployeeList-B-XHFRU-.js → EmployeeList-DXTIVdNQ.js} +6 -6
- package/dist/{Main-0k0WaemL.js → Main-BBGd8ZTL.js} +6 -6
- package/dist/{Main-2OGCqAeO.js → Main-DndCDnpH.js} +4 -4
- package/dist/{Main-CjfEUkuJ.js → Main-lGjnpbfI.js} +9 -9
- package/dist/{PermissionSetList-Cl5Zkj0c.js → PermissionSetList-ENyBOnPF.js} +6 -6
- package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DhsRoS9v.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BWBZROlT.js} +530 -530
- package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_a439fdd8_lang-DREzWx0l.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_a439fdd8_lang-CDtl09zY.js} +1 -1
- package/dist/{RoleList-CqxTqm13.js → RoleList-BX_2VJZ6.js} +7 -7
- package/dist/{TeamMemberList-BVWthOPA.js → TeamMemberList-D5dwxHbo.js} +8 -8
- package/dist/{TimesheetList-Bh9v_qYt.js → TimesheetList-B92TB91G.js} +6 -6
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_d7ed31d7_lang-CLPUVVhu.js → TimesheetList.vue_vue_type_style_index_0_scoped_d7ed31d7_lang-fZeEZTuq.js} +2 -2
- package/dist/{app-CMYV9sz0.js → app-KE1Um386.js} +4 -8
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-DlsortAX.js → dayjs.min-1lGJFcPX.js} +1 -1
- package/dist/{employee-walWoaes.js → employee-BqMV_HCx.js} +3 -3
- package/dist/{iteration-CzhHoG_z.js → iteration-DlBvbGKr.js} +1 -1
- package/dist/{lodash-DLFCPgMt.js → lodash-aPPIHJY6.js} +1 -1
- package/dist/{rule-BqeyTmLz.js → rule-BxTkC7Lz.js} +2 -2
- package/dist/src/views/audit-log/locales/index.d.ts +0 -4
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-BX_L8TWU.js → useAppStore-DT7SMn0u.js} +1 -1
- package/dist/{useLoading-BlNSXpjY.js → useLoading-DogwStiv.js} +1 -1
- package/dist/{useReportPermissions-DiF4euxe.js → useReportPermissions-CsXjuESs.js} +3 -3
- package/package.json +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as Be, ref as h, computed as x, onMounted as wt, onBeforeUnmount as Mt, watch as
|
|
2
|
-
import { d as _ } from "./dayjs.min-
|
|
1
|
+
import { defineComponent as Be, ref as h, computed as x, onMounted as wt, onBeforeUnmount as Mt, watch as fe, resolveComponent as U, createElementBlock as k, openBlock as f, createBlock as Z, createCommentVNode as C, createElementVNode as a, Fragment as ee, renderList as ue, withCtx as K, createVNode as g, toDisplayString as u, unref as n, nextTick as Ft } from "vue";
|
|
2
|
+
import { d as _ } from "./dayjs.min-1lGJFcPX.js";
|
|
3
3
|
import { useI18n as Ke, useCoreStore as Dt } from "@feedmepos/mf-common";
|
|
4
|
-
import { G as Ae, _ as It } from "./app-
|
|
4
|
+
import { G as Ae, _ as It } from "./app-KE1Um386.js";
|
|
5
5
|
import { components as Re } from "@feedmepos/ui-library";
|
|
6
|
-
import { g as Ce, b as Ue } from "./iteration-
|
|
7
|
-
import { S as
|
|
6
|
+
import { g as Ce, b as Ue } from "./iteration-DlBvbGKr.js";
|
|
7
|
+
import { S as me, _ as Ot } from "./SelectFilter-C61IZSID.js";
|
|
8
8
|
import { _ as Tt } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
|
|
9
9
|
import { _ as jt } from "./index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js";
|
|
10
|
-
import { t as Pt, p as Ye } from "./rule-
|
|
10
|
+
import { t as Pt, p as Ye } from "./rule-BxTkC7Lz.js";
|
|
11
11
|
import { defineStore as Vt } from "pinia";
|
|
12
12
|
const se = [
|
|
13
13
|
{ key: "all", label: "All", subjectPrefixes: [] },
|
|
@@ -20,55 +20,55 @@ const se = [
|
|
|
20
20
|
// Add more as modules are revamped with new actionguard:
|
|
21
21
|
// { key: 'restaurantOperation', label: 'Restaurant Operation', subjectPrefixes: ['restaurant'] },
|
|
22
22
|
], $e = "/audit-logs", _e = {
|
|
23
|
-
async count(
|
|
23
|
+
async count(o) {
|
|
24
24
|
var I, j, w, r, s;
|
|
25
|
-
const
|
|
26
|
-
...
|
|
27
|
-
...
|
|
28
|
-
...(I =
|
|
29
|
-
...(j =
|
|
30
|
-
...(w =
|
|
31
|
-
...(r =
|
|
32
|
-
...(s =
|
|
25
|
+
const l = {
|
|
26
|
+
...o != null && o.from ? { from: o.from } : {},
|
|
27
|
+
...o != null && o.to ? { to: o.to } : {},
|
|
28
|
+
...(I = o == null ? void 0 : o.userIds) != null && I.length ? { userIds: o.userIds } : {},
|
|
29
|
+
...(j = o == null ? void 0 : o.subjects) != null && j.length ? { subjects: o.subjects } : {},
|
|
30
|
+
...(w = o == null ? void 0 : o.subjectPrefixes) != null && w.length ? { subjectPrefixes: o.subjectPrefixes } : {},
|
|
31
|
+
...(r = o == null ? void 0 : o.actions) != null && r.length ? { actions: o.actions } : {},
|
|
32
|
+
...(s = o == null ? void 0 : o.outcomes) != null && s.length ? { outcomes: o.outcomes } : {}
|
|
33
33
|
};
|
|
34
34
|
return (await Ce(
|
|
35
35
|
await Ue().get(`${$e}/count`, {
|
|
36
|
-
params:
|
|
36
|
+
params: l,
|
|
37
37
|
paramsSerializer: (O) => {
|
|
38
38
|
const P = new URLSearchParams();
|
|
39
|
-
for (const [
|
|
39
|
+
for (const [b, M] of Object.entries(O))
|
|
40
40
|
if (Array.isArray(M))
|
|
41
|
-
for (const N of M) P.append(
|
|
42
|
-
else M != null && P.append(
|
|
41
|
+
for (const N of M) P.append(b, String(N));
|
|
42
|
+
else M != null && P.append(b, String(M));
|
|
43
43
|
return P.toString();
|
|
44
44
|
}
|
|
45
45
|
})
|
|
46
46
|
)).total;
|
|
47
47
|
},
|
|
48
|
-
async read(
|
|
48
|
+
async read(o) {
|
|
49
49
|
var y, I, j, w, r;
|
|
50
|
-
const
|
|
51
|
-
limit: (
|
|
52
|
-
offset: (
|
|
53
|
-
...
|
|
54
|
-
...
|
|
55
|
-
...(y =
|
|
56
|
-
...(I =
|
|
57
|
-
...(j =
|
|
58
|
-
...(w =
|
|
59
|
-
...(r =
|
|
50
|
+
const l = {
|
|
51
|
+
limit: (o == null ? void 0 : o.limit) ?? 100,
|
|
52
|
+
offset: (o == null ? void 0 : o.offset) ?? 0,
|
|
53
|
+
...o != null && o.from ? { from: o.from } : {},
|
|
54
|
+
...o != null && o.to ? { to: o.to } : {},
|
|
55
|
+
...(y = o == null ? void 0 : o.userIds) != null && y.length ? { userIds: o.userIds } : {},
|
|
56
|
+
...(I = o == null ? void 0 : o.subjects) != null && I.length ? { subjects: o.subjects } : {},
|
|
57
|
+
...(j = o == null ? void 0 : o.subjectPrefixes) != null && j.length ? { subjectPrefixes: o.subjectPrefixes } : {},
|
|
58
|
+
...(w = o == null ? void 0 : o.actions) != null && w.length ? { actions: o.actions } : {},
|
|
59
|
+
...(r = o == null ? void 0 : o.outcomes) != null && r.length ? { outcomes: o.outcomes } : {}
|
|
60
60
|
};
|
|
61
61
|
return Ce(
|
|
62
62
|
await Ue().get($e, {
|
|
63
|
-
params:
|
|
63
|
+
params: l,
|
|
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 [P,
|
|
69
|
-
if (Array.isArray(
|
|
70
|
-
for (const M of
|
|
71
|
-
else
|
|
68
|
+
for (const [P, b] of Object.entries(s))
|
|
69
|
+
if (Array.isArray(b))
|
|
70
|
+
for (const M of b) O.append(P, String(M));
|
|
71
|
+
else b != null && O.append(P, String(b));
|
|
72
72
|
return O.toString();
|
|
73
73
|
}
|
|
74
74
|
})
|
|
@@ -84,8 +84,8 @@ const se = [
|
|
|
84
84
|
items: {}
|
|
85
85
|
},
|
|
86
86
|
emits: ["update:modelValue"],
|
|
87
|
-
setup(
|
|
88
|
-
const y =
|
|
87
|
+
setup(o, { emit: l }) {
|
|
88
|
+
const y = o, I = l, { t: j } = Ke(), w = h(!1), r = h(null), s = h(null), O = h([]), P = h(0), b = h(0);
|
|
89
89
|
let M = null;
|
|
90
90
|
async function N() {
|
|
91
91
|
if (await Ft(), !s.value) return;
|
|
@@ -94,26 +94,26 @@ const se = [
|
|
|
94
94
|
const m = s.value.querySelector("[data-more-measure]");
|
|
95
95
|
P.value = (m == null ? void 0 : m.offsetWidth) ?? 0;
|
|
96
96
|
}
|
|
97
|
-
const
|
|
97
|
+
const ve = x(() => {
|
|
98
98
|
const v = y.items.length;
|
|
99
99
|
if (v === 0) return 0;
|
|
100
|
-
if (!
|
|
100
|
+
if (!b.value || O.value.length !== v) return v;
|
|
101
101
|
const m = O.value;
|
|
102
|
-
if (m.reduce((i, H) => i + H, 0) <=
|
|
102
|
+
if (m.reduce((i, H) => i + H, 0) <= b.value) return v;
|
|
103
103
|
const L = P.value;
|
|
104
104
|
let T = 0, V = 0;
|
|
105
|
-
for (let i = 0; i < v && !(T + m[i] + L >
|
|
105
|
+
for (let i = 0; i < v && !(T + m[i] + L > b.value); i++)
|
|
106
106
|
T += m[i], V++;
|
|
107
107
|
return V;
|
|
108
108
|
}), J = x(() => {
|
|
109
|
-
const v =
|
|
109
|
+
const v = ve.value, m = y.items.length;
|
|
110
110
|
if (v >= m) return [...y.items];
|
|
111
111
|
const F = y.items.slice(0, v), L = y.items.find((A) => A.value === y.modelValue);
|
|
112
112
|
if (!L || F.some((A) => A.value === L.value)) return F;
|
|
113
113
|
if (v === 0) return [L];
|
|
114
114
|
const T = y.items.findIndex((A) => A.value === L.value), V = O.value, i = P.value, H = V[T] ?? 0;
|
|
115
115
|
let B = v, le = V.slice(0, B - 1).reduce((A, z) => A + z, 0);
|
|
116
|
-
for (; B > 1 && le + H + i >
|
|
116
|
+
for (; B > 1 && le + H + i > b.value; )
|
|
117
117
|
B--, le = V.slice(0, B - 1).reduce((A, z) => A + z, 0);
|
|
118
118
|
return [...y.items.slice(0, Math.max(B - 1, 0)), L];
|
|
119
119
|
}), te = x(() => {
|
|
@@ -124,12 +124,12 @@ const se = [
|
|
|
124
124
|
w.value = !1, I("update:modelValue", v);
|
|
125
125
|
}
|
|
126
126
|
return wt(async () => {
|
|
127
|
-
await N(), r.value && (
|
|
128
|
-
r.value && (
|
|
127
|
+
await N(), r.value && (b.value = r.value.clientWidth, M = new ResizeObserver(() => {
|
|
128
|
+
r.value && (b.value = r.value.clientWidth);
|
|
129
129
|
}), M.observe(r.value));
|
|
130
130
|
}), Mt(() => {
|
|
131
131
|
M == null || M.disconnect(), M = null;
|
|
132
|
-
}),
|
|
132
|
+
}), fe(
|
|
133
133
|
() => y.items,
|
|
134
134
|
() => {
|
|
135
135
|
N();
|
|
@@ -144,7 +144,7 @@ const se = [
|
|
|
144
144
|
}, [
|
|
145
145
|
(f(!0), k(ee, null, ue(J.value, (i) => (f(), Z(F, {
|
|
146
146
|
key: i.value,
|
|
147
|
-
"model-value":
|
|
147
|
+
"model-value": o.modelValue,
|
|
148
148
|
label: i.label,
|
|
149
149
|
badge: i.badge,
|
|
150
150
|
disabled: i.disabled,
|
|
@@ -160,14 +160,14 @@ const se = [
|
|
|
160
160
|
}, {
|
|
161
161
|
"menu-button": K(() => [
|
|
162
162
|
a("div", Et, [
|
|
163
|
-
|
|
164
|
-
a("span", At, n(
|
|
163
|
+
g(L, { name: "more_vert" }),
|
|
164
|
+
a("span", At, u(n(j)("auditLog.modules.more")), 1)
|
|
165
165
|
])
|
|
166
166
|
]),
|
|
167
167
|
default: K(() => [
|
|
168
168
|
(f(!0), k(ee, null, ue(te.value, (i) => (f(), Z(T, {
|
|
169
169
|
key: i.value,
|
|
170
|
-
"model-value":
|
|
170
|
+
"model-value": o.modelValue === i.value,
|
|
171
171
|
label: i.label,
|
|
172
172
|
disabled: i.disabled,
|
|
173
173
|
onClick: (H) => oe(i.value)
|
|
@@ -181,12 +181,12 @@ const se = [
|
|
|
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
|
-
(f(!0), k(ee, null, ue(
|
|
184
|
+
(f(!0), k(ee, null, ue(o.items, (i) => (f(), k("div", {
|
|
185
185
|
key: `measure-${i.value}`,
|
|
186
186
|
"data-tab-measure": ""
|
|
187
187
|
}, [
|
|
188
|
-
|
|
189
|
-
"model-value":
|
|
188
|
+
g(F, {
|
|
189
|
+
"model-value": o.modelValue,
|
|
190
190
|
label: i.label,
|
|
191
191
|
badge: i.badge,
|
|
192
192
|
disabled: i.disabled,
|
|
@@ -194,34 +194,34 @@ const se = [
|
|
|
194
194
|
}, null, 8, ["model-value", "label", "badge", "disabled", "value"])
|
|
195
195
|
]))), 128)),
|
|
196
196
|
a("div", Rt, [
|
|
197
|
-
|
|
198
|
-
a("span", Ct, n(
|
|
197
|
+
g(L, { name: "more_vert" }),
|
|
198
|
+
a("span", Ct, u(n(j)("auditLog.modules.more")), 1)
|
|
199
199
|
])
|
|
200
200
|
], 512)
|
|
201
201
|
], 512);
|
|
202
202
|
};
|
|
203
203
|
}
|
|
204
204
|
}), Yt = Vt("team", () => {
|
|
205
|
-
const
|
|
206
|
-
() => Object.fromEntries(
|
|
205
|
+
const o = h([]), l = h(!1), y = x(
|
|
206
|
+
() => Object.fromEntries(o.value.map((r) => [r.doc.userId, r.name]))
|
|
207
207
|
), I = x(
|
|
208
|
-
() => Object.fromEntries(
|
|
208
|
+
() => Object.fromEntries(o.value.map((r) => [r.doc.userId, r.email]))
|
|
209
209
|
), j = x(
|
|
210
|
-
() => Object.fromEntries(
|
|
210
|
+
() => Object.fromEntries(o.value.map((r) => [r.doc.userId, r.phoneNumber]))
|
|
211
211
|
);
|
|
212
212
|
async function w({ force: r = !1 } = {}) {
|
|
213
|
-
if (!(!r &&
|
|
213
|
+
if (!(!r && o.value.length > 0))
|
|
214
214
|
try {
|
|
215
|
-
|
|
215
|
+
l.value = !0;
|
|
216
216
|
const s = await Pt.readTeamMembers();
|
|
217
|
-
|
|
217
|
+
o.value = s.sort((O, P) => O.doc.isOwner ? -1 : O.name.localeCompare(P.name));
|
|
218
218
|
} finally {
|
|
219
|
-
|
|
219
|
+
l.value = !1;
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
222
|
return {
|
|
223
|
-
members:
|
|
224
|
-
isLoading:
|
|
223
|
+
members: o,
|
|
224
|
+
isLoading: l,
|
|
225
225
|
userIdToName: y,
|
|
226
226
|
userIdToEmail: I,
|
|
227
227
|
userIdToPhone: j,
|
|
@@ -272,136 +272,132 @@ const se = [
|
|
|
272
272
|
}, uo = {
|
|
273
273
|
class: "break-all font-semibold"
|
|
274
274
|
}, io = {
|
|
275
|
-
|
|
275
|
+
key: 0
|
|
276
276
|
}, ro = {
|
|
277
|
-
class: "
|
|
277
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
278
278
|
}, co = {
|
|
279
|
-
|
|
279
|
+
class: "break-all font-mono text-xs font-semibold"
|
|
280
280
|
}, mo = {
|
|
281
281
|
class: "text-xs text-fm-color-typo-secondary"
|
|
282
282
|
}, fo = {
|
|
283
283
|
class: "break-all font-mono text-xs font-semibold"
|
|
284
284
|
}, vo = {
|
|
285
285
|
class: "text-xs text-fm-color-typo-secondary"
|
|
286
|
-
}, bo = {
|
|
287
|
-
class: "break-all font-mono text-xs font-semibold"
|
|
288
286
|
}, go = {
|
|
289
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
290
|
-
}, po = {
|
|
291
287
|
class: "font-semibold"
|
|
292
|
-
},
|
|
288
|
+
}, bo = {
|
|
293
289
|
key: 0,
|
|
294
290
|
class: "rounded-lg border border-fm-color-border-default"
|
|
295
|
-
},
|
|
291
|
+
}, po = {
|
|
296
292
|
class: "p-12"
|
|
297
|
-
},
|
|
293
|
+
}, ho = {
|
|
298
294
|
class: "text-base font-bold text-fm-color-typo-primary"
|
|
299
|
-
},
|
|
295
|
+
}, yo = {
|
|
300
296
|
class: "space-y-12 p-12"
|
|
301
|
-
},
|
|
297
|
+
}, _o = {
|
|
302
298
|
class: "text-xs text-fm-color-typo-secondary"
|
|
303
|
-
},
|
|
299
|
+
}, xo = {
|
|
304
300
|
class: "font-semibold"
|
|
305
|
-
},
|
|
301
|
+
}, Lo = {
|
|
306
302
|
class: "rounded-lg border border-fm-color-border-default"
|
|
307
|
-
},
|
|
303
|
+
}, So = {
|
|
308
304
|
class: "p-12"
|
|
309
|
-
},
|
|
305
|
+
}, ko = {
|
|
310
306
|
class: "text-base font-bold text-fm-color-typo-primary"
|
|
311
|
-
},
|
|
307
|
+
}, wo = {
|
|
312
308
|
class: "space-y-12 p-12"
|
|
313
|
-
},
|
|
309
|
+
}, Mo = {
|
|
314
310
|
class: "text-xs text-fm-color-typo-secondary"
|
|
315
|
-
},
|
|
311
|
+
}, Fo = {
|
|
316
312
|
class: "font-semibold"
|
|
317
|
-
},
|
|
313
|
+
}, Do = {
|
|
318
314
|
key: 0
|
|
319
|
-
},
|
|
315
|
+
}, Io = {
|
|
320
316
|
class: "text-xs text-fm-color-typo-secondary"
|
|
321
|
-
},
|
|
317
|
+
}, Oo = {
|
|
322
318
|
key: 0,
|
|
323
319
|
class: "font-semibold"
|
|
324
|
-
},
|
|
320
|
+
}, To = {
|
|
325
321
|
key: 1,
|
|
326
322
|
class: "break-all font-mono text-xs text-fm-color-typo-secondary"
|
|
327
|
-
},
|
|
323
|
+
}, jo = {
|
|
328
324
|
key: 1
|
|
325
|
+
}, Po = {
|
|
326
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
327
|
+
}, Vo = {
|
|
328
|
+
class: "font-semibold whitespace-pre-line"
|
|
329
329
|
}, Eo = {
|
|
330
330
|
class: "text-xs text-fm-color-typo-secondary"
|
|
331
331
|
}, Ao = {
|
|
332
|
-
class: "font-semibold
|
|
332
|
+
class: "font-semibold"
|
|
333
333
|
}, Ro = {
|
|
334
334
|
class: "text-xs text-fm-color-typo-secondary"
|
|
335
335
|
}, Co = {
|
|
336
|
-
class: "font-semibold"
|
|
337
|
-
}, Uo = {
|
|
338
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
339
|
-
}, Yo = {
|
|
340
336
|
class: "break-all font-mono text-xs font-semibold"
|
|
341
|
-
},
|
|
337
|
+
}, Uo = {
|
|
342
338
|
key: 2
|
|
343
|
-
},
|
|
339
|
+
}, Yo = {
|
|
344
340
|
class: "text-xs text-fm-color-typo-secondary"
|
|
345
|
-
},
|
|
341
|
+
}, $o = {
|
|
346
342
|
class: "mt-4 space-y-4"
|
|
347
|
-
},
|
|
343
|
+
}, No = {
|
|
348
344
|
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"
|
|
349
|
-
},
|
|
345
|
+
}, Bo = {
|
|
350
346
|
class: "text-xs font-semibold"
|
|
351
|
-
},
|
|
347
|
+
}, Ko = {
|
|
352
348
|
key: 0,
|
|
353
349
|
class: "text-fm-color-typo-secondary"
|
|
354
|
-
},
|
|
350
|
+
}, zo = {
|
|
355
351
|
key: 3
|
|
356
|
-
},
|
|
352
|
+
}, qo = {
|
|
357
353
|
class: "text-xs text-fm-color-typo-secondary"
|
|
358
|
-
},
|
|
354
|
+
}, Ho = {
|
|
359
355
|
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"
|
|
360
|
-
}, ne = 100, xe = 1e3,
|
|
356
|
+
}, ne = 100, xe = 1e3, Wo = "D MMM YYYY h:mm A", Jo = "YYYY-MM-DD HH:mm", E = "YYYY-MM-DD", Ne = "audit-log-export-fields", Go = /* @__PURE__ */ Be({
|
|
361
357
|
__name: "AuditLogList",
|
|
362
|
-
setup(
|
|
358
|
+
setup(o) {
|
|
363
359
|
const {
|
|
364
|
-
t:
|
|
360
|
+
t: l
|
|
365
361
|
} = Ke(), y = Dt(), I = Yt(), j = h(!1), w = h(!1), r = h([]), s = h(null), O = h(!1);
|
|
366
362
|
async function P(e) {
|
|
367
363
|
const t = Uint8Array.from(atob(e), (p) => p.charCodeAt(0)), d = new DecompressionStream("gzip"), S = d.writable.getWriter();
|
|
368
364
|
return await S.write(t), await S.close(), new Response(d.readable).text();
|
|
369
365
|
}
|
|
370
|
-
const
|
|
366
|
+
const b = h("");
|
|
371
367
|
let M = 0;
|
|
372
|
-
|
|
368
|
+
fe(() => {
|
|
373
369
|
var e, t;
|
|
374
370
|
return (t = (e = s.value) == null ? void 0 : e.metadata) == null ? void 0 : t.requestBody;
|
|
375
371
|
}, async (e) => {
|
|
376
372
|
const t = ++M;
|
|
377
373
|
if (!e) {
|
|
378
|
-
|
|
374
|
+
b.value = "";
|
|
379
375
|
return;
|
|
380
376
|
}
|
|
381
377
|
if (typeof e == "object") {
|
|
382
|
-
|
|
378
|
+
b.value = JSON.stringify(e, null, 2);
|
|
383
379
|
return;
|
|
384
380
|
}
|
|
385
381
|
if (e.startsWith("gzip:")) {
|
|
386
382
|
try {
|
|
387
383
|
const d = await P(e.slice(5));
|
|
388
384
|
if (t !== M) return;
|
|
389
|
-
|
|
385
|
+
b.value = JSON.stringify(JSON.parse(d), null, 2);
|
|
390
386
|
} catch {
|
|
391
387
|
if (t !== M) return;
|
|
392
|
-
|
|
388
|
+
b.value = e;
|
|
393
389
|
}
|
|
394
390
|
return;
|
|
395
391
|
}
|
|
396
392
|
try {
|
|
397
|
-
|
|
393
|
+
b.value = JSON.stringify(JSON.parse(e), null, 2);
|
|
398
394
|
} catch {
|
|
399
|
-
|
|
395
|
+
b.value = e;
|
|
400
396
|
}
|
|
401
397
|
}, {
|
|
402
398
|
immediate: !0
|
|
403
399
|
});
|
|
404
|
-
const N = h(1),
|
|
400
|
+
const N = h(1), ve = h(!1), J = h(0), te = x(() => Math.max(1, Math.ceil(J.value / ne))), oe = _().format("YYYY-MM-DD"), v = h({
|
|
405
401
|
startDate: `${oe} 00:00`,
|
|
406
402
|
endDate: `${oe} 23:59`
|
|
407
403
|
}), m = h(), F = h(), L = h(), T = h(), V = h("all");
|
|
@@ -420,7 +416,7 @@ const se = [
|
|
|
420
416
|
const Le = x(() => se.map(({
|
|
421
417
|
key: e
|
|
422
418
|
}) => ({
|
|
423
|
-
label:
|
|
419
|
+
label: l(`auditLog.modules.${e}`),
|
|
424
420
|
value: e
|
|
425
421
|
}))), A = x(() => se.find((e) => e.key === V.value) ?? se[0]), z = x(() => V.value === "all"), ze = x(() => I.members.map((e) => ({
|
|
426
422
|
label: e.name,
|
|
@@ -439,7 +435,7 @@ const se = [
|
|
|
439
435
|
const D = B(p.value);
|
|
440
436
|
S.push({
|
|
441
437
|
...p,
|
|
442
|
-
group:
|
|
438
|
+
group: l(`auditLog.modules.${D}`)
|
|
443
439
|
});
|
|
444
440
|
}
|
|
445
441
|
return S.sort((p, D) => le(B(p.value)) - le(B(D.value)));
|
|
@@ -449,11 +445,11 @@ const se = [
|
|
|
449
445
|
return e.label.toLowerCase().includes(d) || e.value.replace(/^business::/, "").toLowerCase().includes(d) ? !0 : e.value.toLowerCase().includes(d);
|
|
450
446
|
}
|
|
451
447
|
const Y = x(() => ({
|
|
452
|
-
manage:
|
|
453
|
-
create:
|
|
454
|
-
read:
|
|
455
|
-
update:
|
|
456
|
-
delete:
|
|
448
|
+
manage: l("auditLog.action.manage"),
|
|
449
|
+
create: l("auditLog.action.create"),
|
|
450
|
+
read: l("auditLog.action.read"),
|
|
451
|
+
update: l("auditLog.action.update"),
|
|
452
|
+
delete: l("auditLog.action.delete")
|
|
457
453
|
})), We = x(() => [{
|
|
458
454
|
label: Y.value.manage,
|
|
459
455
|
value: "manage"
|
|
@@ -470,9 +466,9 @@ const se = [
|
|
|
470
466
|
label: Y.value.delete,
|
|
471
467
|
value: "delete"
|
|
472
468
|
}]), ie = x(() => ({
|
|
473
|
-
allowed:
|
|
474
|
-
denied:
|
|
475
|
-
skipped:
|
|
469
|
+
allowed: l("auditLog.outcome.success"),
|
|
470
|
+
denied: l("auditLog.outcome.failed"),
|
|
471
|
+
skipped: l("auditLog.outcome.skipped")
|
|
476
472
|
})), Je = x(() => [{
|
|
477
473
|
label: ie.value.allowed,
|
|
478
474
|
value: "allowed"
|
|
@@ -483,13 +479,13 @@ const se = [
|
|
|
483
479
|
label: ie.value.skipped,
|
|
484
480
|
value: "skipped"
|
|
485
481
|
}]), Ge = x(() => ({
|
|
486
|
-
admin:
|
|
487
|
-
staff:
|
|
488
|
-
permissionSet:
|
|
489
|
-
systemPermissionSet:
|
|
490
|
-
custom:
|
|
491
|
-
"no-match":
|
|
492
|
-
unknown:
|
|
482
|
+
admin: l("auditLog.detail.resolvedFromValue.admin"),
|
|
483
|
+
staff: l("auditLog.detail.resolvedFromValue.staff"),
|
|
484
|
+
permissionSet: l("auditLog.detail.resolvedFromValue.permissionSet"),
|
|
485
|
+
systemPermissionSet: l("auditLog.detail.resolvedFromValue.systemPermissionSet"),
|
|
486
|
+
custom: l("auditLog.detail.resolvedFromValue.custom"),
|
|
487
|
+
"no-match": l("auditLog.detail.resolvedFromValue.noMatch"),
|
|
488
|
+
unknown: l("auditLog.detail.resolvedFromValue.unknown")
|
|
493
489
|
})), Xe = x(() => ({
|
|
494
490
|
GET: Y.value.read,
|
|
495
491
|
POST: Y.value.create,
|
|
@@ -502,62 +498,62 @@ const se = [
|
|
|
502
498
|
skipped: "warning"
|
|
503
499
|
};
|
|
504
500
|
function re(e) {
|
|
505
|
-
return _(e).format(
|
|
501
|
+
return _(e).format(Wo);
|
|
506
502
|
}
|
|
507
503
|
const Qe = x(() => {
|
|
508
504
|
const {
|
|
509
505
|
startDate: e,
|
|
510
506
|
endDate: t
|
|
511
507
|
} = v.value;
|
|
512
|
-
return e && t ? `${re(e)} – ${re(t)}` : e ? re(e) : t ? re(t) :
|
|
508
|
+
return e && t ? `${re(e)} – ${re(t)}` : e ? re(e) : t ? re(t) : l("auditLog.dateRange.placeholder");
|
|
513
509
|
}), Ze = x(() => [{
|
|
514
|
-
label:
|
|
510
|
+
label: l("date.predefinedRanges.today"),
|
|
515
511
|
value: {
|
|
516
512
|
startDate: _().format(E),
|
|
517
513
|
endDate: _().format(E)
|
|
518
514
|
}
|
|
519
515
|
}, {
|
|
520
|
-
label:
|
|
516
|
+
label: l("date.predefinedRanges.yesterday"),
|
|
521
517
|
value: {
|
|
522
518
|
startDate: _().subtract(1, "day").format(E),
|
|
523
519
|
endDate: _().subtract(1, "day").format(E)
|
|
524
520
|
}
|
|
525
521
|
}, {
|
|
526
|
-
label:
|
|
522
|
+
label: l("date.predefinedRanges.thisWeek"),
|
|
527
523
|
value: {
|
|
528
524
|
startDate: _().startOf("week").format(E),
|
|
529
525
|
endDate: _().endOf("week").format(E)
|
|
530
526
|
}
|
|
531
527
|
}, {
|
|
532
|
-
label:
|
|
528
|
+
label: l("date.predefinedRanges.lastWeek"),
|
|
533
529
|
value: {
|
|
534
530
|
startDate: _().subtract(1, "week").startOf("week").format(E),
|
|
535
531
|
endDate: _().subtract(1, "week").endOf("week").format(E)
|
|
536
532
|
}
|
|
537
533
|
}, {
|
|
538
|
-
label:
|
|
534
|
+
label: l("date.predefinedRanges.last7Days"),
|
|
539
535
|
value: {
|
|
540
536
|
startDate: _().subtract(7, "day").format(E),
|
|
541
537
|
endDate: _().subtract(1, "day").format(E)
|
|
542
538
|
}
|
|
543
539
|
}, {
|
|
544
|
-
label:
|
|
540
|
+
label: l("date.predefinedRanges.thisMonth"),
|
|
545
541
|
value: {
|
|
546
542
|
startDate: _().startOf("month").format(E),
|
|
547
543
|
endDate: _().endOf("month").format(E)
|
|
548
544
|
}
|
|
549
545
|
}, {
|
|
550
|
-
label:
|
|
546
|
+
label: l("date.predefinedRanges.lastMonth"),
|
|
551
547
|
value: {
|
|
552
548
|
startDate: _().subtract(1, "month").startOf("month").format(E),
|
|
553
549
|
endDate: _().subtract(1, "month").endOf("month").format(E)
|
|
554
550
|
}
|
|
555
551
|
}]);
|
|
556
|
-
function
|
|
552
|
+
function ge(e) {
|
|
557
553
|
var t;
|
|
558
554
|
return ((t = Ye.find((d) => d.subject === e)) == null ? void 0 : t.label) ?? Ae[e];
|
|
559
555
|
}
|
|
560
|
-
function
|
|
556
|
+
function de(e) {
|
|
561
557
|
return I.userIdToName[e.userId] || e.userId;
|
|
562
558
|
}
|
|
563
559
|
function ke(e) {
|
|
@@ -579,9 +575,9 @@ const se = [
|
|
|
579
575
|
return e.metadata.operationLabel ?? Me(e.action);
|
|
580
576
|
}
|
|
581
577
|
function ot(e) {
|
|
582
|
-
return
|
|
578
|
+
return ge(e.subject) ?? e.subject;
|
|
583
579
|
}
|
|
584
|
-
function
|
|
580
|
+
function be(e) {
|
|
585
581
|
return ie.value[e];
|
|
586
582
|
}
|
|
587
583
|
function lt(e) {
|
|
@@ -602,7 +598,7 @@ const se = [
|
|
|
602
598
|
}, {
|
|
603
599
|
key: "userName",
|
|
604
600
|
labelKey: "auditLog.exportFields.userName",
|
|
605
|
-
getValue: (e) =>
|
|
601
|
+
getValue: (e) => de(e),
|
|
606
602
|
defaultSelected: !0
|
|
607
603
|
}, {
|
|
608
604
|
key: "userPhone",
|
|
@@ -612,7 +608,7 @@ const se = [
|
|
|
612
608
|
}, {
|
|
613
609
|
key: "subject",
|
|
614
610
|
labelKey: "auditLog.exportFields.subject",
|
|
615
|
-
getValue: (e) =>
|
|
611
|
+
getValue: (e) => ge(e.subject) ?? e.subject,
|
|
616
612
|
defaultSelected: !0
|
|
617
613
|
}, {
|
|
618
614
|
key: "action",
|
|
@@ -627,7 +623,7 @@ const se = [
|
|
|
627
623
|
}, {
|
|
628
624
|
key: "outcome",
|
|
629
625
|
labelKey: "auditLog.exportFields.outcome",
|
|
630
|
-
getValue: (e) =>
|
|
626
|
+
getValue: (e) => be(e.outcome),
|
|
631
627
|
defaultSelected: !0
|
|
632
628
|
}, {
|
|
633
629
|
key: "businessId",
|
|
@@ -702,7 +698,7 @@ const se = [
|
|
|
702
698
|
const {
|
|
703
699
|
startDate: $,
|
|
704
700
|
endDate: q
|
|
705
|
-
} = v.value, W = A.value.subjectPrefixes,
|
|
701
|
+
} = v.value, W = A.value.subjectPrefixes, ce = (/* @__PURE__ */ new Date()).toISOString().slice(0, 19).replace("T", " "), c = q ? X(q) : null, Q = c && c < ce ? c : ce, ft = {
|
|
706
702
|
...$ ? {
|
|
707
703
|
from: X($)
|
|
708
704
|
} : {},
|
|
@@ -733,7 +729,7 @@ const se = [
|
|
|
733
729
|
if (Te.push(...R), R.length < xe) break;
|
|
734
730
|
je += xe;
|
|
735
731
|
}
|
|
736
|
-
const Pe = pe.filter((R) => G.value.has(R.key)), vt = Pe.map((R) =>
|
|
732
|
+
const Pe = pe.filter((R) => G.value.has(R.key)), vt = Pe.map((R) => l(R.labelKey)), gt = Te.map((R) => Pe.map((kt) => kt.getValue(R) ?? "")), ye = -(/* @__PURE__ */ new Date()).getTimezoneOffset(), bt = ye >= 0 ? "+" : "-", pt = String(Math.floor(Math.abs(ye) / 60)).padStart(2, "0"), ht = String(Math.abs(ye) % 60).padStart(2, "0"), yt = `UTC${bt}${pt}:${ht}`, Ve = ((p = y.currentBusiness.value) == null ? void 0 : p.name) || "", _t = [$, q].filter(Boolean).join(" – "), xt = [...[[l("auditLog.title")], [`${l("auditLog.frontMatter.date")}: ${_t}`], ...Ve ? [[`${l("auditLog.frontMatter.business")}: ${Ve}`]] : [], [`${l("auditLog.frontMatter.generatedBy")}: ${_().format("DD MMM YYYY, HH:mm")} (${yt})`], []].map((R) => R.map(De).join(",")), ...[vt, ...gt].map((R) => R.map(De).join(","))].join(`
|
|
737
733
|
`), Lt = `audit-log_${(((D = y.currentBusiness.value) == null ? void 0 : D.name) || "business").replace(/[^a-z0-9_-]+/gi, "_")}_${_().format("YYYYMMDD_HHmmss")}.csv`, St = new Blob([`\uFEFF${xt}`], {
|
|
738
734
|
type: "text/csv;charset=utf-8;"
|
|
739
735
|
}), Ee = window.URL.createObjectURL(St), ae = document.createElement("a");
|
|
@@ -745,46 +741,46 @@ const se = [
|
|
|
745
741
|
}
|
|
746
742
|
const it = [{
|
|
747
743
|
accessorKey: "timestamp",
|
|
748
|
-
header: () =>
|
|
744
|
+
header: () => l("auditLog.columns.timestamp"),
|
|
749
745
|
cell(e) {
|
|
750
746
|
return we(e.row.original.timestamp);
|
|
751
747
|
}
|
|
752
748
|
}, {
|
|
753
749
|
accessorKey: "userId",
|
|
754
|
-
header: () =>
|
|
750
|
+
header: () => l("auditLog.columns.user"),
|
|
755
751
|
enableSorting: !1,
|
|
756
752
|
size: 220,
|
|
757
753
|
cell(e) {
|
|
758
754
|
const t = e.row.original;
|
|
759
|
-
return
|
|
755
|
+
return g("div", {
|
|
760
756
|
class: "flex items-center gap-8"
|
|
761
|
-
}, [
|
|
762
|
-
initials:
|
|
757
|
+
}, [g(Re.FmAvatar, {
|
|
758
|
+
initials: de(t),
|
|
763
759
|
size: "sm",
|
|
764
760
|
class: "shrink-0"
|
|
765
|
-
}, null),
|
|
761
|
+
}, null), g("div", {
|
|
766
762
|
class: "min-w-0"
|
|
767
|
-
}, [
|
|
763
|
+
}, [g("p", {
|
|
768
764
|
class: "truncate font-semibold"
|
|
769
|
-
}, [
|
|
765
|
+
}, [de(t)]), g("p", {
|
|
770
766
|
class: "truncate text-fm-color-typo-secondary"
|
|
771
767
|
}, [ke(t)])])]);
|
|
772
768
|
}
|
|
773
769
|
}, {
|
|
774
770
|
accessorKey: "subject",
|
|
775
|
-
header: () =>
|
|
771
|
+
header: () => l("auditLog.columns.subject"),
|
|
776
772
|
meta: {
|
|
777
773
|
cellClass: "text-left"
|
|
778
774
|
},
|
|
779
775
|
cell(e) {
|
|
780
776
|
const t = e.row.original;
|
|
781
|
-
return
|
|
777
|
+
return g("div", {
|
|
782
778
|
class: "text-left"
|
|
783
|
-
}, [
|
|
779
|
+
}, [ge(t.subject) ?? t.subject]);
|
|
784
780
|
}
|
|
785
781
|
}, {
|
|
786
782
|
accessorKey: "action",
|
|
787
|
-
header: () =>
|
|
783
|
+
header: () => l("auditLog.columns.action"),
|
|
788
784
|
enableSorting: !1,
|
|
789
785
|
size: 280,
|
|
790
786
|
meta: {
|
|
@@ -795,19 +791,19 @@ const se = [
|
|
|
795
791
|
}
|
|
796
792
|
}, {
|
|
797
793
|
accessorKey: "outcome",
|
|
798
|
-
header: () =>
|
|
794
|
+
header: () => l("auditLog.columns.outcome"),
|
|
799
795
|
enableSorting: !1,
|
|
800
796
|
cell(e) {
|
|
801
797
|
const t = e.row.original;
|
|
802
|
-
return
|
|
798
|
+
return g(Re.FmChip, {
|
|
803
799
|
variant: Se[t.outcome] ?? "neutral",
|
|
804
|
-
label:
|
|
800
|
+
label: be(t.outcome),
|
|
805
801
|
compact: !0
|
|
806
802
|
}, null);
|
|
807
803
|
}
|
|
808
804
|
}];
|
|
809
805
|
function X(e) {
|
|
810
|
-
const t = _(e,
|
|
806
|
+
const t = _(e, Jo);
|
|
811
807
|
return new Date(t.year(), t.month(), t.date(), t.hour(), t.minute(), 0).toISOString().slice(0, 19).replace("T", " ");
|
|
812
808
|
}
|
|
813
809
|
async function Ie() {
|
|
@@ -842,7 +838,7 @@ const se = [
|
|
|
842
838
|
outcomes: L.value
|
|
843
839
|
} : {}
|
|
844
840
|
});
|
|
845
|
-
r.value = W,
|
|
841
|
+
r.value = W, ve.value = W.length === ne;
|
|
846
842
|
} finally {
|
|
847
843
|
j.value = !1;
|
|
848
844
|
}
|
|
@@ -889,7 +885,7 @@ const se = [
|
|
|
889
885
|
} : {}
|
|
890
886
|
});
|
|
891
887
|
}
|
|
892
|
-
|
|
888
|
+
fe(Oe, async () => {
|
|
893
889
|
var e;
|
|
894
890
|
N.value = 1, (e = y.currentBusiness.value) != null && e._id && await Promise.all([rt(), Ie()]);
|
|
895
891
|
}, {
|
|
@@ -915,35 +911,35 @@ const se = [
|
|
|
915
911
|
function mt() {
|
|
916
912
|
O.value = !1, s.value = null;
|
|
917
913
|
}
|
|
918
|
-
return
|
|
914
|
+
return fe(y.currentBusiness, (e) => {
|
|
919
915
|
e && I.readTeamMembers();
|
|
920
916
|
}, {
|
|
921
917
|
immediate: !0
|
|
922
918
|
}), (e, t) => {
|
|
923
|
-
const d = U("FmSpacer"), S = U("FmButton"), p = U("FmMenuItem"), D = U("FmMenu"), $ = U("FmChip"), q = U("FmDateRangePicker"), W = U("FmTable"),
|
|
924
|
-
return f(), k(ee, null, [
|
|
925
|
-
heading:
|
|
919
|
+
const d = U("FmSpacer"), S = U("FmButton"), p = U("FmMenuItem"), D = U("FmMenu"), $ = U("FmChip"), q = U("FmDateRangePicker"), W = U("FmTable"), ce = U("FmSideSheet");
|
|
920
|
+
return f(), k(ee, null, [g(Tt, {
|
|
921
|
+
heading: n(l)("auditLog.title")
|
|
926
922
|
}, {
|
|
927
|
-
"append-heading": K(() => [
|
|
923
|
+
"append-heading": K(() => [g(d), g(S, {
|
|
928
924
|
variant: "primary",
|
|
929
925
|
"prepend-icon": "upload",
|
|
930
|
-
label:
|
|
931
|
-
disabled: r.value.length === 0 || w.value ||
|
|
926
|
+
label: n(l)("auditLog.export"),
|
|
927
|
+
disabled: r.value.length === 0 || w.value || n(I).isLoading || n(I).members.length === 0,
|
|
932
928
|
loading: w.value,
|
|
933
929
|
onClick: ut
|
|
934
|
-
}, null, 8, ["label", "disabled", "loading"]),
|
|
930
|
+
}, null, 8, ["label", "disabled", "loading"]), g(D, {
|
|
935
931
|
"close-on-click": !1,
|
|
936
932
|
"z-index": 50
|
|
937
933
|
}, {
|
|
938
|
-
"menu-button": K(() => [
|
|
934
|
+
"menu-button": K(() => [g(S, {
|
|
939
935
|
variant: "tertiary",
|
|
940
936
|
icon: "settings",
|
|
941
|
-
"aria-label":
|
|
937
|
+
"aria-label": n(l)("auditLog.exportSettings.title"),
|
|
942
938
|
disabled: w.value
|
|
943
939
|
}, null, 8, ["aria-label", "disabled"])]),
|
|
944
|
-
default: K(() => [a("div", $t, [a("p", Nt, n(
|
|
940
|
+
default: K(() => [a("div", $t, [a("p", Nt, u(n(l)("auditLog.exportSettings.title")), 1), (f(), k(ee, null, ue(pe, (c) => g(p, {
|
|
945
941
|
key: c.key,
|
|
946
|
-
label:
|
|
942
|
+
label: n(l)(c.labelKey),
|
|
947
943
|
"has-checkbox": "",
|
|
948
944
|
"model-value": G.value.has(c.key),
|
|
949
945
|
disabled: G.value.has(c.key) && G.value.size === 1,
|
|
@@ -951,64 +947,64 @@ const se = [
|
|
|
951
947
|
}, null, 8, ["label", "model-value", "disabled", "onClick"])), 64))])]),
|
|
952
948
|
_: 1
|
|
953
949
|
})]),
|
|
954
|
-
default: K(() => [a("div", Bt, [a("div", Kt, [
|
|
950
|
+
default: K(() => [a("div", Bt, [a("div", Kt, [g(Ut, {
|
|
955
951
|
modelValue: V.value,
|
|
956
952
|
"onUpdate:modelValue": t[0] || (t[0] = (c) => V.value = c),
|
|
957
953
|
items: Le.value
|
|
958
|
-
}, null, 8, ["modelValue", "items"]), a("div", zt, [
|
|
954
|
+
}, null, 8, ["modelValue", "items"]), a("div", zt, [g(q, {
|
|
959
955
|
modelValue: v.value,
|
|
960
956
|
"onUpdate:modelValue": t[1] || (t[1] = (c) => v.value = c),
|
|
961
957
|
"show-predefined-range": "",
|
|
962
958
|
"show-time": "",
|
|
963
959
|
"predefined-range": Ze.value
|
|
964
960
|
}, {
|
|
965
|
-
"trigger-button": K(() => [
|
|
961
|
+
"trigger-button": K(() => [g($, {
|
|
966
962
|
label: Qe.value,
|
|
967
963
|
icon: "calendar_month"
|
|
968
964
|
}, null, 8, ["label"])]),
|
|
969
965
|
_: 1
|
|
970
|
-
}, 8, ["modelValue", "predefined-range"]), a("div", qt, [
|
|
966
|
+
}, 8, ["modelValue", "predefined-range"]), a("div", qt, [g(me, {
|
|
971
967
|
modelValue: m.value,
|
|
972
968
|
"onUpdate:modelValue": t[2] || (t[2] = (c) => m.value = c),
|
|
973
969
|
items: ze.value,
|
|
974
970
|
multiple: "",
|
|
975
971
|
variant: "dark",
|
|
976
|
-
placeholder:
|
|
977
|
-
"selected-prefix":
|
|
972
|
+
placeholder: n(l)("auditLog.filter.user_placeholder"),
|
|
973
|
+
"selected-prefix": n(l)("auditLog.filter.selected_user_prefix"),
|
|
978
974
|
"chip-icon": "account_circle"
|
|
979
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), z.value ? (f(), k("div", Ht, [
|
|
975
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), z.value ? (f(), k("div", Ht, [g(me, {
|
|
980
976
|
modelValue: F.value,
|
|
981
977
|
"onUpdate:modelValue": t[3] || (t[3] = (c) => F.value = c),
|
|
982
978
|
items: qe.value,
|
|
983
979
|
"filter-fn": He,
|
|
984
980
|
multiple: "",
|
|
985
981
|
variant: "dark",
|
|
986
|
-
placeholder:
|
|
987
|
-
"selected-prefix":
|
|
982
|
+
placeholder: n(l)("auditLog.filter.subject_placeholder"),
|
|
983
|
+
"selected-prefix": n(l)("auditLog.filter.selected_subject_prefix"),
|
|
988
984
|
"chip-icon": "badge"
|
|
989
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])) : C("", !0), a("div", Wt, [
|
|
985
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])) : C("", !0), a("div", Wt, [g(me, {
|
|
990
986
|
modelValue: T.value,
|
|
991
987
|
"onUpdate:modelValue": t[4] || (t[4] = (c) => T.value = c),
|
|
992
988
|
items: We.value,
|
|
993
989
|
multiple: "",
|
|
994
990
|
variant: "dark",
|
|
995
|
-
placeholder:
|
|
996
|
-
"selected-prefix":
|
|
991
|
+
placeholder: n(l)("auditLog.filter.action_placeholder"),
|
|
992
|
+
"selected-prefix": n(l)("auditLog.filter.selected_action_prefix"),
|
|
997
993
|
searchable: !1
|
|
998
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div", Jt, [
|
|
994
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div", Jt, [g(me, {
|
|
999
995
|
modelValue: L.value,
|
|
1000
996
|
"onUpdate:modelValue": t[5] || (t[5] = (c) => L.value = c),
|
|
1001
997
|
items: Je.value,
|
|
1002
998
|
multiple: "",
|
|
1003
999
|
variant: "dark",
|
|
1004
|
-
placeholder:
|
|
1005
|
-
"selected-prefix":
|
|
1000
|
+
placeholder: n(l)("auditLog.filter.status_placeholder"),
|
|
1001
|
+
"selected-prefix": n(l)("auditLog.filter.selected_status_prefix"),
|
|
1006
1002
|
searchable: !1,
|
|
1007
1003
|
"chip-icon": "check_circle"
|
|
1008
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])])]), !j.value && r.value.length === 0 ? (f(), Z(
|
|
1004
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])])]), !j.value && r.value.length === 0 ? (f(), Z(n(jt), {
|
|
1009
1005
|
key: 0,
|
|
1010
|
-
title:
|
|
1011
|
-
subtitle:
|
|
1006
|
+
title: n(l)("auditLog.noData.title"),
|
|
1007
|
+
subtitle: n(l)("auditLog.noData.subtitle")
|
|
1012
1008
|
}, null, 8, ["title", "subtitle"])) : (f(), Z(It, {
|
|
1013
1009
|
key: 1
|
|
1014
1010
|
}, {
|
|
@@ -1029,8 +1025,8 @@ const se = [
|
|
|
1029
1025
|
_: 1
|
|
1030
1026
|
}))])]),
|
|
1031
1027
|
_: 1
|
|
1032
|
-
}, 8, ["heading"]),
|
|
1033
|
-
header:
|
|
1028
|
+
}, 8, ["heading"]), g(ce, {
|
|
1029
|
+
header: n(l)("auditLog.detail.header"),
|
|
1034
1030
|
"model-value": O.value,
|
|
1035
1031
|
"max-width": 480,
|
|
1036
1032
|
"dismiss-away": "",
|
|
@@ -1038,23 +1034,23 @@ const se = [
|
|
|
1038
1034
|
c || mt();
|
|
1039
1035
|
})
|
|
1040
1036
|
}, {
|
|
1041
|
-
default: K(() => [s.value ? (f(), k("div", Gt, [a("div", Xt, [a("div", Qt, [a("p", Zt,
|
|
1037
|
+
default: K(() => [s.value ? (f(), k("div", Gt, [a("div", Xt, [a("div", Qt, [a("p", Zt, u(ot(s.value)), 1)]), g($, {
|
|
1042
1038
|
variant: Se[s.value.outcome] ?? "neutral",
|
|
1043
|
-
label:
|
|
1039
|
+
label: be(s.value.outcome),
|
|
1044
1040
|
compact: ""
|
|
1045
|
-
}, null, 8, ["variant", "label"])]), a("div", eo, [a("div", to, [a("div", null, [a("p", oo, n(
|
|
1041
|
+
}, null, 8, ["variant", "label"])]), a("div", eo, [a("div", to, [a("div", null, [a("p", oo, u(n(l)("auditLog.detail.date")), 1), a("p", lo, u(tt(s.value.timestamp)), 1)]), a("div", null, [a("p", ao, u(n(l)("auditLog.detail.user")), 1), a("p", so, u(de(s.value)), 1)]), a("div", null, [a("p", no, u(n(l)("auditLog.detail.email")), 1), a("p", uo, u(et(s.value)), 1)]), s.value.field ? (f(), k("div", io, [a("p", ro, u(n(l)("auditLog.detail.field")), 1), a("p", co, u(s.value.field), 1)])) : C("", !0), a("div", null, [a("p", mo, u(n(l)("auditLog.detail.business")), 1), a("p", fo, u(s.value.businessId || "-"), 1)]), a("div", null, [a("p", vo, u(n(l)("auditLog.detail.restaurant")), 1), a("p", go, u(s.value.restaurantId || "-"), 1)])])]), s.value.metadata.operationLabel ? (f(), k("div", bo, [a("div", po, [a("p", ho, u(n(l)("auditLog.detail.changeDetails")), 1)]), t[8] || (t[8] = a("hr", {
|
|
1046
1042
|
class: "border-fm-color-border-default"
|
|
1047
|
-
}, null, -1)), a("div",
|
|
1043
|
+
}, null, -1)), a("div", yo, [a("div", null, [a("p", _o, u(n(l)("auditLog.detail.actionDescription")), 1), a("p", xo, u(s.value.metadata.operationLabel), 1)])])])) : C("", !0), a("div", Lo, [a("div", So, [a("p", ko, u(n(l)("auditLog.detail.metadata")), 1)]), t[9] || (t[9] = a("hr", {
|
|
1048
1044
|
class: "border-fm-color-border-default"
|
|
1049
|
-
}, null, -1)), a("div",
|
|
1045
|
+
}, null, -1)), a("div", wo, [a("div", null, [a("p", Mo, u(n(l)("auditLog.detail.resolvedFrom")), 1), a("p", Fo, 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) ? (f(), k("div", Do, [a("p", Io, u(n(l)("auditLog.detail.permissionSet")), 1), s.value.metadata.permissionSetName ? (f(), k("p", Oo, u(s.value.metadata.permissionSetName), 1)) : C("", !0), s.value.metadata.permissionSetId ? (f(), k("p", To, u(s.value.metadata.permissionSetId), 1)) : C("", !0)])) : C("", !0), s.value.metadata.reason ? (f(), k("div", jo, [a("p", Po, u(n(l)("auditLog.detail.reason")), 1), a("p", Vo, u(s.value.metadata.reason), 1)])) : C("", !0), a("div", null, [a("p", Eo, u(n(l)("auditLog.detail.requestMethod")), 1), a("p", Ao, u(at(s.value)), 1)]), a("div", null, [a("p", Ro, u(n(l)("auditLog.detail.requestPath")), 1), a("p", Co, u(s.value.metadata.requestPath || "-"), 1)]), s.value.metadata.trace && s.value.metadata.trace.length > 0 ? (f(), k("div", Uo, [a("p", Yo, u(n(l)("auditLog.detail.permissionTrace")), 1), a("ol", $o, [(f(!0), k(ee, null, ue(s.value.metadata.trace, (c, Q) => (f(), k("li", {
|
|
1050
1046
|
key: Q,
|
|
1051
1047
|
class: "flex items-center gap-6"
|
|
1052
|
-
}, [a("span",
|
|
1048
|
+
}, [a("span", No, u(Q + 1), 1), a("span", Bo, u(c), 1), Q < s.value.metadata.trace.length - 1 ? (f(), k("span", Ko, "→")) : C("", !0)]))), 128))])])) : C("", !0), b.value ? (f(), k("div", zo, [a("p", qo, u(n(l)("auditLog.detail.requestBody")), 1), a("pre", Ho, u(b.value), 1)])) : C("", !0)])])])) : C("", !0)]),
|
|
1053
1049
|
_: 1
|
|
1054
1050
|
}, 8, ["header", "model-value"])], 64);
|
|
1055
1051
|
};
|
|
1056
1052
|
}
|
|
1057
|
-
}),
|
|
1053
|
+
}), dl = /* @__PURE__ */ Ot(Go, [["__scopeId", "data-v-4fe10597"]]);
|
|
1058
1054
|
export {
|
|
1059
|
-
|
|
1055
|
+
dl as default
|
|
1060
1056
|
};
|