@feedmepos/mf-hrm-portal 2.3.3 → 2.4.0
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/{ApprovalCodeList-BvS5dgU3.js → ApprovalCodeList-D62tXKEd.js} +7 -7
- package/dist/{AuditLogList-CpX_suVp.js → AuditLogList-DQOdhFJm.js} +825 -835
- package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BT4DaSaO.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BDT1AfXa.js} +2 -2
- package/dist/{EmployeeList-CVsnidNV.js → EmployeeList-Bd211chl.js} +8 -8
- package/dist/{FormItem.vue_vue_type_script_setup_true_lang-h8toO2k-.js → FormItem.vue_vue_type_script_setup_true_lang-CUBQnkkY.js} +1 -1
- package/dist/{GrantUserList-Dyh5kllB.js → GrantUserList-DaUUILOT.js} +8 -8
- package/dist/{Main-aoY6s0QA.js → Main-B95BdgQd.js} +5 -5
- package/dist/{Main-CRU4YEdj.js → Main-CvGjvEQL.js} +28 -28
- package/dist/{Main-OmCnufx6.js → Main-Dh3E2cEf.js} +11 -11
- package/dist/{PermissionSetList-B7B3vnRf.js → PermissionSetList-BIzlo_EV.js} +90 -90
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BYYiW77c.js +4181 -0
- package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-EwU7gHP7.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-CSYNrTGr.js} +1 -1
- package/dist/{RoleList-B7jLSn2l.js → RoleList-QJV3cGvV.js} +33 -33
- package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-BG5gE0iX.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-DsKfRa5Z.js} +1 -1
- package/dist/{ScheduleGeneralPage-DK2hKCWE.js → ScheduleGeneralPage-D6NPsdrU.js} +2 -2
- package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-mMjDR4Nz.js → ScheduleModal.vue_vue_type_script_setup_true_lang-kYGNELLb.js} +3 -3
- package/dist/{SchedulePage-Dn4joe9m.js → SchedulePage-CO_ZP2QD.js} +13 -13
- package/dist/{SchedulePositionPage-D7u4QBug.js → SchedulePositionPage-DFjWfRwI.js} +3 -3
- package/dist/{SelectFilter-BbTj7kMh.js → SelectFilter-B94Z_Fat.js} +1 -1
- package/dist/TeamMemberList-BbGMw0jg.js +1150 -0
- package/dist/{TimesheetList-B6TIgZba.js → TimesheetList-DiTCj2H7.js} +8 -8
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-CF1cWXsG.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-B97k3KNz.js} +3 -3
- package/dist/{app-Cfzysb_Z.js → app-BRlNuQIz.js} +2465 -2387
- package/dist/app.js +1 -1
- package/dist/{approval-code-CWq2ce3u.js → approval-code-D6eLRwC7.js} +1 -1
- package/dist/{dayjs.min-NoTESZyy.js → dayjs.min-BaLuYA95.js} +1 -1
- package/dist/{employee-BzUt7_wz.js → employee-DF_QGtpu.js} +4 -4
- package/dist/{grant-user-q_mkj3Vh.js → grant-user-CdkuTYlZ.js} +1 -1
- package/dist/{iteration-DmbHO_Rl.js → iteration-t4kb_i13.js} +1 -1
- package/dist/{lodash-DqvpfdBt.js → lodash-Dv0NUeUP.js} +1 -1
- package/dist/{restaurant-DJBQY9N5.js → restaurant-D2q9eNtu.js} +578 -581
- package/dist/{role-Crd3XL59.js → role-y253W1Ep.js} +19 -20
- package/dist/{rule-B1ck-XG6.js → rule-DaFOMP6z.js} +150 -153
- package/dist/src/composables/useTenant.d.ts +11 -0
- package/dist/src/router/courtGuard.d.ts +4 -0
- package/dist/src/stores/team.d.ts +1 -1
- package/dist/src/views/audit-log/useTraceIdDeepLink.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-TRX-PQD4.js → useAppStore-CIPpnfP7.js} +1 -1
- package/dist/{useLoading-W3YSF8OB.js → useLoading-BRCeBVXP.js} +1 -1
- package/dist/useReportPermissions-Bveud3kc.js +80 -0
- package/package.json +3 -3
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BVOwDcXo.js +0 -4167
- package/dist/TeamMemberList-C0nZBhqp.js +0 -1154
- package/dist/useReportPermissions-DmMlLiQP.js +0 -82
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as Vt, ref as
|
|
2
|
-
import { d as
|
|
1
|
+
import { defineComponent as Vt, ref as S, computed as A, onMounted as No, onBeforeUnmount as Ko, watch as ae, resolveComponent as R, createElementBlock as g, openBlock as v, createBlock as Te, createCommentVNode as F, createElementVNode as a, Fragment as z, renderList as ce, withCtx as B, createVNode as y, toDisplayString as l, unref as u, nextTick as Yo, onUnmounted as Bo, createTextVNode as ye, normalizeClass as zo } from "vue";
|
|
2
|
+
import { d as P } from "./dayjs.min-BaLuYA95.js";
|
|
3
3
|
import { defineStore as qo, storeToRefs as Jo } from "pinia";
|
|
4
4
|
import { useI18n as dt, useCoreStore as Ho } from "@feedmepos/mf-common";
|
|
5
|
-
import {
|
|
5
|
+
import { u as Wo, Y as Mt, _ as Go, a as Xo } from "./app-BRlNuQIz.js";
|
|
6
6
|
import { components as ve } from "@feedmepos/ui-library";
|
|
7
|
-
import { g as st, b as at, u as
|
|
8
|
-
import { S as
|
|
9
|
-
import { _ as
|
|
10
|
-
import { _ as
|
|
11
|
-
import { t as
|
|
12
|
-
import { u as
|
|
13
|
-
import { n as
|
|
14
|
-
import { useRoute as
|
|
15
|
-
import { u as
|
|
16
|
-
const
|
|
7
|
+
import { g as st, b as at, u as Qo } from "./restaurant-D2q9eNtu.js";
|
|
8
|
+
import { S as Me } from "./SelectFilter-B94Z_Fat.js";
|
|
9
|
+
import { _ as Zo } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
|
|
10
|
+
import { _ as es } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
|
|
11
|
+
import { t as ts, p as Dt } from "./rule-DaFOMP6z.js";
|
|
12
|
+
import { u as os } from "./useDebounce-B8ZPVS5C.js";
|
|
13
|
+
import { n as ss } from "./string-VNuQNweN.js";
|
|
14
|
+
import { useRoute as as, useRouter as ns } from "vue-router";
|
|
15
|
+
import { u as ls } from "./useMessage-_ywT_N9X.js";
|
|
16
|
+
const rs = {
|
|
17
17
|
order: "Order",
|
|
18
18
|
refund: "Refund",
|
|
19
19
|
drawer: "Cash drawer",
|
|
@@ -34,7 +34,7 @@ const ls = {
|
|
|
34
34
|
faceId: "Face ID",
|
|
35
35
|
mallIntegration: "Mall integration",
|
|
36
36
|
report: "Report"
|
|
37
|
-
},
|
|
37
|
+
}, De = [
|
|
38
38
|
{ key: "all", label: "All", subjectPrefixes: [] },
|
|
39
39
|
{ key: "inventory", label: "Inventory", subjectPrefixes: ["business::inventory", "inventory"], sources: ["portal"] },
|
|
40
40
|
{ key: "report", label: "Report", subjectPrefixes: ["business::report", "report"], sources: ["portal"] },
|
|
@@ -48,41 +48,41 @@ const ls = {
|
|
|
48
48
|
{ key: "miniProgram", label: "Mini Program", subjectPrefixes: ["business::miniProgram", "miniProgram"], sources: ["portal"] },
|
|
49
49
|
{ key: "media", label: "Media", subjectPrefixes: ["business::media", "media"], sources: ["portal"] },
|
|
50
50
|
{ key: "pos", label: "POS", subjectPrefixes: [], sources: ["pos-v8", "hrm-validate"] }
|
|
51
|
-
], nt = "/audit-logs",
|
|
51
|
+
], nt = "/audit-logs", Ce = {
|
|
52
52
|
async count(t) {
|
|
53
|
-
var r, d,
|
|
53
|
+
var r, c, d, b, _, w, D, O, i;
|
|
54
54
|
const o = {
|
|
55
55
|
...t != null && t.from ? { from: t.from } : {},
|
|
56
56
|
...t != null && t.to ? { to: t.to } : {},
|
|
57
57
|
...(r = t == null ? void 0 : t.userIds) != null && r.length ? { userIds: t.userIds } : {},
|
|
58
|
-
...(
|
|
59
|
-
...(
|
|
60
|
-
...(
|
|
61
|
-
...(
|
|
58
|
+
...(c = t == null ? void 0 : t.subjects) != null && c.length ? { subjects: t.subjects } : {},
|
|
59
|
+
...(d = t == null ? void 0 : t.subjectPrefixes) != null && d.length ? { subjectPrefixes: t.subjectPrefixes } : {},
|
|
60
|
+
...(b = t == null ? void 0 : t.actions) != null && b.length ? { actions: t.actions } : {},
|
|
61
|
+
...(_ = t == null ? void 0 : t.outcomes) != null && _.length ? { outcomes: t.outcomes } : {},
|
|
62
62
|
...t != null && t.feedmeAdminActors ? { feedmeAdminActors: !0 } : {},
|
|
63
63
|
...t != null && t.search ? { search: t.search } : {},
|
|
64
|
-
...(
|
|
65
|
-
...(
|
|
66
|
-
...(
|
|
67
|
-
...(
|
|
64
|
+
...(w = t == null ? void 0 : t.searchUserIds) != null && w.length ? { searchUserIds: t.searchUserIds } : {},
|
|
65
|
+
...(D = t == null ? void 0 : t.searchSubjects) != null && D.length ? { searchSubjects: t.searchSubjects } : {},
|
|
66
|
+
...(O = t == null ? void 0 : t.sources) != null && O.length ? { sources: t.sources } : {},
|
|
67
|
+
...(i = t == null ? void 0 : t.restaurantIds) != null && i.length ? { restaurantIds: t.restaurantIds } : {},
|
|
68
68
|
...t != null && t.traceId ? { traceId: t.traceId } : {}
|
|
69
69
|
};
|
|
70
70
|
return (await st(
|
|
71
71
|
await at().get(`${nt}/count`, {
|
|
72
72
|
params: o,
|
|
73
|
-
paramsSerializer: (
|
|
74
|
-
const
|
|
75
|
-
for (const [
|
|
76
|
-
if (Array.isArray(
|
|
77
|
-
for (const
|
|
78
|
-
else
|
|
79
|
-
return
|
|
73
|
+
paramsSerializer: (V) => {
|
|
74
|
+
const L = new URLSearchParams();
|
|
75
|
+
for (const [f, M] of Object.entries(V))
|
|
76
|
+
if (Array.isArray(M))
|
|
77
|
+
for (const C of M) L.append(f, String(C));
|
|
78
|
+
else M != null && L.append(f, String(M));
|
|
79
|
+
return L.toString();
|
|
80
80
|
}
|
|
81
81
|
})
|
|
82
82
|
)).total;
|
|
83
83
|
},
|
|
84
84
|
async read(t) {
|
|
85
|
-
var n, r, d,
|
|
85
|
+
var n, r, c, d, b, _, w, D, O;
|
|
86
86
|
const o = {
|
|
87
87
|
limit: (t == null ? void 0 : t.limit) ?? 100,
|
|
88
88
|
offset: (t == null ? void 0 : t.offset) ?? 0,
|
|
@@ -91,14 +91,14 @@ const ls = {
|
|
|
91
91
|
...(n = t == null ? void 0 : t.userIds) != null && n.length ? { userIds: t.userIds } : {},
|
|
92
92
|
...t != null && t.feedmeAdminActors ? { feedmeAdminActors: !0 } : {},
|
|
93
93
|
...(r = t == null ? void 0 : t.subjects) != null && r.length ? { subjects: t.subjects } : {},
|
|
94
|
-
...(
|
|
95
|
-
...(
|
|
96
|
-
...(
|
|
94
|
+
...(c = t == null ? void 0 : t.subjectPrefixes) != null && c.length ? { subjectPrefixes: t.subjectPrefixes } : {},
|
|
95
|
+
...(d = t == null ? void 0 : t.actions) != null && d.length ? { actions: t.actions } : {},
|
|
96
|
+
...(b = t == null ? void 0 : t.outcomes) != null && b.length ? { outcomes: t.outcomes } : {},
|
|
97
97
|
...t != null && t.search ? { search: t.search } : {},
|
|
98
|
-
...(
|
|
99
|
-
...(
|
|
100
|
-
...(
|
|
101
|
-
...(
|
|
98
|
+
...(_ = t == null ? void 0 : t.searchUserIds) != null && _.length ? { searchUserIds: t.searchUserIds } : {},
|
|
99
|
+
...(w = t == null ? void 0 : t.searchSubjects) != null && w.length ? { searchSubjects: t.searchSubjects } : {},
|
|
100
|
+
...(D = t == null ? void 0 : t.sources) != null && D.length ? { sources: t.sources } : {},
|
|
101
|
+
...(O = t == null ? void 0 : t.restaurantIds) != null && O.length ? { restaurantIds: t.restaurantIds } : {},
|
|
102
102
|
...t != null && t.traceId ? { traceId: t.traceId } : {}
|
|
103
103
|
};
|
|
104
104
|
return st(
|
|
@@ -106,13 +106,13 @@ const ls = {
|
|
|
106
106
|
params: o,
|
|
107
107
|
// Serialize arrays as repeated params: key=val1&key=val2
|
|
108
108
|
// (NestJS @Query expects this; axios default adds brackets which break matching)
|
|
109
|
-
paramsSerializer: (
|
|
110
|
-
const
|
|
111
|
-
for (const [
|
|
112
|
-
if (Array.isArray(
|
|
113
|
-
for (const
|
|
114
|
-
else
|
|
115
|
-
return
|
|
109
|
+
paramsSerializer: (i) => {
|
|
110
|
+
const V = new URLSearchParams();
|
|
111
|
+
for (const [L, f] of Object.entries(i))
|
|
112
|
+
if (Array.isArray(f))
|
|
113
|
+
for (const M of f) V.append(L, String(M));
|
|
114
|
+
else f != null && V.append(L, String(f));
|
|
115
|
+
return V.toString();
|
|
116
116
|
}
|
|
117
117
|
})
|
|
118
118
|
);
|
|
@@ -131,10 +131,10 @@ const ls = {
|
|
|
131
131
|
await at().get(`${nt}/actors`, { params: o })
|
|
132
132
|
);
|
|
133
133
|
}
|
|
134
|
-
},
|
|
134
|
+
}, is = { class: "flex h-[46px] items-center gap-8 rounded-sm px-16 hover:bg-fm-color-opacity-sm" }, us = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ds = {
|
|
135
135
|
"data-more-measure": "",
|
|
136
136
|
class: "flex h-[46px] items-center gap-8 rounded-sm px-16"
|
|
137
|
-
},
|
|
137
|
+
}, cs = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, fs = /* @__PURE__ */ Vt({
|
|
138
138
|
__name: "AuditLogModuleTabs",
|
|
139
139
|
props: {
|
|
140
140
|
modelValue: {},
|
|
@@ -142,107 +142,107 @@ const ls = {
|
|
|
142
142
|
},
|
|
143
143
|
emits: ["update:modelValue"],
|
|
144
144
|
setup(t, { emit: o }) {
|
|
145
|
-
const n = t, r = o, { t:
|
|
146
|
-
let
|
|
147
|
-
async function
|
|
148
|
-
if (await
|
|
149
|
-
const
|
|
150
|
-
|
|
151
|
-
const j =
|
|
152
|
-
|
|
145
|
+
const n = t, r = o, { t: c } = dt(), d = S(!1), b = S(null), _ = S(null), w = S([]), D = S(0), O = S(0);
|
|
146
|
+
let i = null;
|
|
147
|
+
async function V() {
|
|
148
|
+
if (await Yo(), !_.value) return;
|
|
149
|
+
const p = _.value.querySelectorAll("[data-tab-measure]");
|
|
150
|
+
w.value = Array.from(p).map((K) => K.offsetWidth);
|
|
151
|
+
const j = _.value.querySelector("[data-more-measure]");
|
|
152
|
+
D.value = (j == null ? void 0 : j.offsetWidth) ?? 0;
|
|
153
153
|
}
|
|
154
|
-
const
|
|
155
|
-
const
|
|
156
|
-
if (
|
|
157
|
-
if (!
|
|
158
|
-
const j =
|
|
159
|
-
if (j.reduce((I,
|
|
160
|
-
const E =
|
|
161
|
-
let
|
|
162
|
-
for (let I = 0; I <
|
|
163
|
-
|
|
164
|
-
return
|
|
165
|
-
}),
|
|
166
|
-
const
|
|
167
|
-
if (
|
|
168
|
-
const
|
|
169
|
-
if (!E ||
|
|
170
|
-
if (
|
|
171
|
-
const
|
|
172
|
-
let
|
|
173
|
-
for (;
|
|
174
|
-
|
|
175
|
-
return [...n.items.slice(0, Math.max(
|
|
176
|
-
}),
|
|
177
|
-
const
|
|
178
|
-
return n.items.filter((j) => !
|
|
154
|
+
const L = A(() => {
|
|
155
|
+
const p = n.items.length;
|
|
156
|
+
if (p === 0) return 0;
|
|
157
|
+
if (!O.value || w.value.length !== p) return p;
|
|
158
|
+
const j = w.value;
|
|
159
|
+
if (j.reduce((I, Q) => I + Q, 0) <= O.value) return p;
|
|
160
|
+
const E = D.value;
|
|
161
|
+
let X = 0, Y = 0;
|
|
162
|
+
for (let I = 0; I < p && !(X + j[I] + E > O.value); I++)
|
|
163
|
+
X += j[I], Y++;
|
|
164
|
+
return Y;
|
|
165
|
+
}), f = A(() => {
|
|
166
|
+
const p = L.value, j = n.items.length;
|
|
167
|
+
if (p >= j) return [...n.items];
|
|
168
|
+
const K = n.items.slice(0, p), E = n.items.find((W) => W.value === n.modelValue);
|
|
169
|
+
if (!E || K.some((W) => W.value === E.value)) return K;
|
|
170
|
+
if (p === 0) return [E];
|
|
171
|
+
const X = n.items.findIndex((W) => W.value === E.value), Y = w.value, I = D.value, Q = Y[X] ?? 0;
|
|
172
|
+
let H = p, xe = Y.slice(0, H - 1).reduce((W, Le) => W + Le, 0);
|
|
173
|
+
for (; H > 1 && xe + Q + I > O.value; )
|
|
174
|
+
H--, xe = Y.slice(0, H - 1).reduce((W, Le) => W + Le, 0);
|
|
175
|
+
return [...n.items.slice(0, Math.max(H - 1, 0)), E];
|
|
176
|
+
}), M = A(() => {
|
|
177
|
+
const p = new Set(f.value.map((j) => j.value));
|
|
178
|
+
return n.items.filter((j) => !p.has(j.value));
|
|
179
179
|
});
|
|
180
|
-
function
|
|
181
|
-
|
|
180
|
+
function C(p) {
|
|
181
|
+
d.value = !1, r("update:modelValue", p);
|
|
182
182
|
}
|
|
183
|
-
return
|
|
184
|
-
await
|
|
185
|
-
|
|
186
|
-
}),
|
|
183
|
+
return No(async () => {
|
|
184
|
+
await V(), b.value && (O.value = b.value.clientWidth, i = new ResizeObserver(() => {
|
|
185
|
+
b.value && (O.value = b.value.clientWidth);
|
|
186
|
+
}), i.observe(b.value));
|
|
187
187
|
}), Ko(() => {
|
|
188
|
-
|
|
189
|
-
}),
|
|
188
|
+
i == null || i.disconnect(), i = null;
|
|
189
|
+
}), ae(
|
|
190
190
|
() => n.items,
|
|
191
191
|
() => {
|
|
192
|
-
|
|
192
|
+
V();
|
|
193
193
|
},
|
|
194
194
|
{ deep: !0 }
|
|
195
|
-
), (
|
|
196
|
-
const
|
|
197
|
-
return
|
|
195
|
+
), (p, j) => {
|
|
196
|
+
const K = R("FmTab"), E = R("FmIcon"), X = R("FmMenuItem"), Y = R("FmMenu");
|
|
197
|
+
return v(), g("div", {
|
|
198
198
|
ref_key: "containerRef",
|
|
199
|
-
ref:
|
|
199
|
+
ref: b,
|
|
200
200
|
class: "relative flex w-full flex-row items-center"
|
|
201
201
|
}, [
|
|
202
|
-
(
|
|
202
|
+
(v(!0), g(z, null, ce(f.value, (I) => (v(), Te(K, {
|
|
203
203
|
key: I.value,
|
|
204
204
|
"model-value": t.modelValue,
|
|
205
205
|
label: I.label,
|
|
206
206
|
badge: I.badge,
|
|
207
207
|
disabled: I.disabled,
|
|
208
208
|
value: I.value,
|
|
209
|
-
"onUpdate:modelValue":
|
|
209
|
+
"onUpdate:modelValue": C
|
|
210
210
|
}, null, 8, ["model-value", "label", "badge", "disabled", "value"]))), 128)),
|
|
211
|
-
|
|
211
|
+
M.value.length > 0 ? (v(), Te(Y, {
|
|
212
212
|
key: 0,
|
|
213
|
-
"show-menu":
|
|
213
|
+
"show-menu": d.value,
|
|
214
214
|
class: "max-w-[360px] min-w-[90px] rounded-sm",
|
|
215
215
|
placement: "bottom-start",
|
|
216
|
-
onMenuChanged: j[0] || (j[0] = (I) =>
|
|
216
|
+
onMenuChanged: j[0] || (j[0] = (I) => d.value = I)
|
|
217
217
|
}, {
|
|
218
|
-
"menu-button":
|
|
219
|
-
a("div",
|
|
220
|
-
|
|
221
|
-
a("span",
|
|
218
|
+
"menu-button": B(() => [
|
|
219
|
+
a("div", is, [
|
|
220
|
+
y(E, { name: "more_vert" }),
|
|
221
|
+
a("span", us, l(u(c)("auditLog.modules.more")), 1)
|
|
222
222
|
])
|
|
223
223
|
]),
|
|
224
|
-
default:
|
|
225
|
-
(
|
|
224
|
+
default: B(() => [
|
|
225
|
+
(v(!0), g(z, null, ce(M.value, (I) => (v(), Te(X, {
|
|
226
226
|
key: I.value,
|
|
227
227
|
"model-value": t.modelValue === I.value,
|
|
228
228
|
label: I.label,
|
|
229
229
|
disabled: I.disabled,
|
|
230
|
-
onClick: (
|
|
230
|
+
onClick: (Q) => C(I.value)
|
|
231
231
|
}, null, 8, ["model-value", "label", "disabled", "onClick"]))), 128))
|
|
232
232
|
]),
|
|
233
233
|
_: 1
|
|
234
|
-
}, 8, ["show-menu"])) :
|
|
234
|
+
}, 8, ["show-menu"])) : F("", !0),
|
|
235
235
|
a("div", {
|
|
236
236
|
ref_key: "measurerRef",
|
|
237
|
-
ref:
|
|
237
|
+
ref: _,
|
|
238
238
|
"aria-hidden": "true",
|
|
239
239
|
class: "pointer-events-none invisible absolute -left-[9999px] -top-[9999px] flex flex-row items-center"
|
|
240
240
|
}, [
|
|
241
|
-
(
|
|
241
|
+
(v(!0), g(z, null, ce(t.items, (I) => (v(), g("div", {
|
|
242
242
|
key: `measure-${I.value}`,
|
|
243
243
|
"data-tab-measure": ""
|
|
244
244
|
}, [
|
|
245
|
-
|
|
245
|
+
y(K, {
|
|
246
246
|
"model-value": t.modelValue,
|
|
247
247
|
label: I.label,
|
|
248
248
|
badge: I.badge,
|
|
@@ -250,28 +250,28 @@ const ls = {
|
|
|
250
250
|
value: I.value
|
|
251
251
|
}, null, 8, ["model-value", "label", "badge", "disabled", "value"])
|
|
252
252
|
]))), 128)),
|
|
253
|
-
a("div",
|
|
254
|
-
|
|
255
|
-
a("span",
|
|
253
|
+
a("div", ds, [
|
|
254
|
+
y(E, { name: "more_vert" }),
|
|
255
|
+
a("span", cs, l(u(c)("auditLog.modules.more")), 1)
|
|
256
256
|
])
|
|
257
257
|
], 512)
|
|
258
258
|
], 512);
|
|
259
259
|
};
|
|
260
260
|
}
|
|
261
|
-
}),
|
|
262
|
-
const t =
|
|
263
|
-
() => Object.fromEntries(t.value.map((
|
|
261
|
+
}), ms = qo("hrm-team", () => {
|
|
262
|
+
const t = S([]), o = S(!1), n = S(!1), r = A(
|
|
263
|
+
() => Object.fromEntries(t.value.map((_) => [_.doc.userId, _.name]))
|
|
264
|
+
), c = A(
|
|
265
|
+
() => Object.fromEntries(t.value.map((_) => [_.doc.userId, _.email]))
|
|
264
266
|
), d = A(
|
|
265
|
-
() => Object.fromEntries(t.value.map((
|
|
266
|
-
), y = A(
|
|
267
|
-
() => Object.fromEntries(t.value.map((g) => [g.doc.userId, g.phoneNumber]))
|
|
267
|
+
() => Object.fromEntries(t.value.map((_) => [_.doc.userId, _.phoneNumber]))
|
|
268
268
|
);
|
|
269
|
-
async function
|
|
270
|
-
if (!(!
|
|
269
|
+
async function b({ force: _ = !1 } = {}) {
|
|
270
|
+
if (!(!_ && t.value.length > 0))
|
|
271
271
|
try {
|
|
272
272
|
o.value = !0;
|
|
273
|
-
const
|
|
274
|
-
t.value =
|
|
273
|
+
const w = await ts.readTeamMembers();
|
|
274
|
+
t.value = w.sort((D, O) => D.doc.isOwner ? -1 : D.name.localeCompare(O.name)), n.value = !0;
|
|
275
275
|
} finally {
|
|
276
276
|
o.value = !1;
|
|
277
277
|
}
|
|
@@ -281,12 +281,12 @@ const ls = {
|
|
|
281
281
|
isLoading: o,
|
|
282
282
|
hasLoaded: n,
|
|
283
283
|
userIdToName: r,
|
|
284
|
-
userIdToEmail:
|
|
285
|
-
userIdToPhone:
|
|
286
|
-
readTeamMembers:
|
|
284
|
+
userIdToEmail: c,
|
|
285
|
+
userIdToPhone: d,
|
|
286
|
+
readTeamMembers: b
|
|
287
287
|
};
|
|
288
288
|
});
|
|
289
|
-
function
|
|
289
|
+
function vs(t) {
|
|
290
290
|
const o = t.indexOf(".");
|
|
291
291
|
return o <= 0 || o === t.length - 1 ? null : { entity: t.slice(0, o), verb: t.slice(o + 1) };
|
|
292
292
|
}
|
|
@@ -294,76 +294,76 @@ function Ot(t) {
|
|
|
294
294
|
const o = t.split("-").join(" ");
|
|
295
295
|
return o.charAt(0).toUpperCase() + o.slice(1);
|
|
296
296
|
}
|
|
297
|
-
function
|
|
297
|
+
function ps(t, o, n) {
|
|
298
298
|
const r = t(o, n);
|
|
299
299
|
return r === o ? null : r;
|
|
300
300
|
}
|
|
301
301
|
function ut(t, o) {
|
|
302
|
-
const { eventKey: n, params: r, operationLabel:
|
|
302
|
+
const { eventKey: n, params: r, operationLabel: c } = o;
|
|
303
303
|
if (n) {
|
|
304
|
-
const
|
|
305
|
-
if (
|
|
306
|
-
const
|
|
307
|
-
if (
|
|
308
|
-
const
|
|
309
|
-
return
|
|
304
|
+
const d = ps(t, `auditLog.event.sentence.${n}`, r);
|
|
305
|
+
if (d) return d;
|
|
306
|
+
const b = vs(n);
|
|
307
|
+
if (b) {
|
|
308
|
+
const _ = `${Ot(b.verb)} ${Ot(b.entity)}`, w = (r == null ? void 0 : r.label) ?? (r == null ? void 0 : r.name);
|
|
309
|
+
return w !== void 0 && w !== "" ? `${_} — ${w}` : _;
|
|
310
310
|
}
|
|
311
311
|
}
|
|
312
|
-
return
|
|
312
|
+
return c ?? "";
|
|
313
313
|
}
|
|
314
|
-
function
|
|
315
|
-
const
|
|
316
|
-
let
|
|
317
|
-
function
|
|
318
|
-
const { traceId:
|
|
319
|
-
(
|
|
314
|
+
function gs({ logs: t, selectedLog: o, isSheetOpen: n, businessId: r }) {
|
|
315
|
+
const c = as(), d = ns(), { t: b } = dt(), _ = ls();
|
|
316
|
+
let w = 0;
|
|
317
|
+
function D(f) {
|
|
318
|
+
const { traceId: M, ...C } = c.query;
|
|
319
|
+
(M ?? void 0) !== f && d.replace({ query: f ? { ...C, traceId: f } : C });
|
|
320
320
|
}
|
|
321
|
-
function
|
|
322
|
-
|
|
321
|
+
function O(f) {
|
|
322
|
+
D(f.traceId || void 0);
|
|
323
323
|
}
|
|
324
|
-
function
|
|
325
|
-
|
|
324
|
+
function i() {
|
|
325
|
+
w++, D(void 0);
|
|
326
326
|
}
|
|
327
|
-
async function
|
|
328
|
-
var
|
|
329
|
-
if (((
|
|
330
|
-
const
|
|
331
|
-
let
|
|
332
|
-
if (!
|
|
327
|
+
async function V(f) {
|
|
328
|
+
var p;
|
|
329
|
+
if (((p = o.value) == null ? void 0 : p.traceId) === f) return;
|
|
330
|
+
const M = ++w;
|
|
331
|
+
let C = t.value.find((j) => j.traceId === f);
|
|
332
|
+
if (!C) {
|
|
333
333
|
try {
|
|
334
|
-
[
|
|
334
|
+
[C] = await Ce.read({ traceId: f, limit: 1 });
|
|
335
335
|
} catch {
|
|
336
|
-
|
|
336
|
+
M === w && _.error(b("auditLog.deepLink.loadFailed"));
|
|
337
337
|
return;
|
|
338
338
|
}
|
|
339
|
-
if (
|
|
339
|
+
if (M !== w) return;
|
|
340
340
|
}
|
|
341
|
-
if (!
|
|
342
|
-
|
|
341
|
+
if (!C) {
|
|
342
|
+
_.error(b("auditLog.deepLink.notFound")), D(void 0);
|
|
343
343
|
return;
|
|
344
344
|
}
|
|
345
|
-
o.value =
|
|
345
|
+
o.value = C, n.value = !0;
|
|
346
346
|
}
|
|
347
|
-
|
|
348
|
-
() => [
|
|
349
|
-
([
|
|
350
|
-
var
|
|
351
|
-
if (
|
|
352
|
-
|
|
347
|
+
ae(
|
|
348
|
+
() => [c.query.traceId, r()],
|
|
349
|
+
([f, M], C) => {
|
|
350
|
+
var p;
|
|
351
|
+
if (C != null && C[1] && M !== C[1]) {
|
|
352
|
+
w++, n.value = !1, o.value = null, D(void 0);
|
|
353
353
|
return;
|
|
354
354
|
}
|
|
355
|
-
typeof
|
|
355
|
+
typeof f == "string" && f ? M && V(f) : (w++, (p = o.value) != null && p.traceId && n.value && (n.value = !1, o.value = null));
|
|
356
356
|
},
|
|
357
357
|
{ immediate: !0 }
|
|
358
358
|
);
|
|
359
|
-
async function
|
|
359
|
+
async function L() {
|
|
360
360
|
try {
|
|
361
|
-
await navigator.clipboard.writeText(window.location.href),
|
|
361
|
+
await navigator.clipboard.writeText(window.location.href), _.success(b("auditLog.detail.linkCopied"));
|
|
362
362
|
} catch {
|
|
363
|
-
|
|
363
|
+
_.error(b("auditLog.detail.linkCopyFailed"));
|
|
364
364
|
}
|
|
365
365
|
}
|
|
366
|
-
return { onSheetOpened:
|
|
366
|
+
return { onSheetOpened: O, onSheetClosed: i, copyLink: L };
|
|
367
367
|
}
|
|
368
368
|
function _e(t) {
|
|
369
369
|
return typeof t == "object" && t !== null && !Array.isArray(t);
|
|
@@ -371,7 +371,7 @@ function _e(t) {
|
|
|
371
371
|
function je(t) {
|
|
372
372
|
return Array.isArray(t);
|
|
373
373
|
}
|
|
374
|
-
function
|
|
374
|
+
function Ke(t) {
|
|
375
375
|
if (t === null) return "null";
|
|
376
376
|
if (typeof t == "object")
|
|
377
377
|
try {
|
|
@@ -381,7 +381,7 @@ function Be(t) {
|
|
|
381
381
|
}
|
|
382
382
|
return String(t);
|
|
383
383
|
}
|
|
384
|
-
function
|
|
384
|
+
function hs(t, o) {
|
|
385
385
|
return t ? `${t}.${o}` : o;
|
|
386
386
|
}
|
|
387
387
|
function Ct(t) {
|
|
@@ -395,139 +395,139 @@ function Ct(t) {
|
|
|
395
395
|
return { ok: !1, value: void 0 };
|
|
396
396
|
}
|
|
397
397
|
}
|
|
398
|
-
const
|
|
399
|
-
function
|
|
398
|
+
const ys = ["_id", "id", "subject", "key", "name"];
|
|
399
|
+
function bs(t, o) {
|
|
400
400
|
if (t.length === 0 || o.length === 0) return null;
|
|
401
|
-
const n = (
|
|
402
|
-
const
|
|
403
|
-
return
|
|
401
|
+
const n = (c, d) => c.every((b) => _e(b) && b[d] !== void 0), r = (c, d) => {
|
|
402
|
+
const b = c.map((_) => _[d]);
|
|
403
|
+
return b.length === new Set(b).size;
|
|
404
404
|
};
|
|
405
|
-
for (const
|
|
406
|
-
if (n(t,
|
|
407
|
-
return
|
|
405
|
+
for (const c of ys)
|
|
406
|
+
if (n(t, c) && n(o, c) && r(t, c) && r(o, c))
|
|
407
|
+
return c;
|
|
408
408
|
return null;
|
|
409
409
|
}
|
|
410
410
|
function $t(t, o, n) {
|
|
411
|
-
n.push({ path: t, type: "added", before: null, after:
|
|
411
|
+
n.push({ path: t, type: "added", before: null, after: Ke(o) });
|
|
412
412
|
}
|
|
413
413
|
function Et(t, o, n) {
|
|
414
|
-
n.push({ path: t, type: "removed", before:
|
|
414
|
+
n.push({ path: t, type: "removed", before: Ke(o), after: null });
|
|
415
415
|
}
|
|
416
|
-
function
|
|
417
|
-
const
|
|
418
|
-
for (const
|
|
419
|
-
const
|
|
420
|
-
Ye(
|
|
416
|
+
function _s(t, o, n, r) {
|
|
417
|
+
const c = /* @__PURE__ */ new Set([...Object.keys(o), ...Object.keys(n)]);
|
|
418
|
+
for (const d of Array.from(c)) {
|
|
419
|
+
const b = Object.prototype.hasOwnProperty.call(o, d), _ = Object.prototype.hasOwnProperty.call(n, d);
|
|
420
|
+
Ye(hs(t, d), o[d], b, n[d], _, r);
|
|
421
421
|
}
|
|
422
422
|
}
|
|
423
|
-
function
|
|
424
|
-
const
|
|
425
|
-
if (
|
|
426
|
-
const
|
|
427
|
-
o.map((
|
|
428
|
-
),
|
|
429
|
-
n.map((
|
|
430
|
-
),
|
|
431
|
-
for (const
|
|
432
|
-
const j =
|
|
423
|
+
function xs(t, o, n, r) {
|
|
424
|
+
const c = bs(o, n);
|
|
425
|
+
if (c) {
|
|
426
|
+
const L = new Map(
|
|
427
|
+
o.map((p) => [p[c], p])
|
|
428
|
+
), f = new Map(
|
|
429
|
+
n.map((p) => [p[c], p])
|
|
430
|
+
), M = Array.from(L.keys()).concat(Array.from(f.keys())), C = Array.from(new Set(M));
|
|
431
|
+
for (const p of C) {
|
|
432
|
+
const j = L.has(p), K = f.has(p), E = `${t}[${String(p)}]`;
|
|
433
433
|
Ye(
|
|
434
434
|
E,
|
|
435
|
-
|
|
435
|
+
L.get(p),
|
|
436
436
|
j,
|
|
437
|
-
|
|
438
|
-
|
|
437
|
+
f.get(p),
|
|
438
|
+
K,
|
|
439
439
|
r
|
|
440
440
|
);
|
|
441
441
|
}
|
|
442
442
|
return;
|
|
443
443
|
}
|
|
444
|
-
const
|
|
445
|
-
for (const
|
|
446
|
-
|
|
447
|
-
for (const
|
|
448
|
-
|
|
449
|
-
const
|
|
450
|
-
for (const
|
|
451
|
-
const
|
|
452
|
-
for (let
|
|
453
|
-
|
|
454
|
-
for (let
|
|
455
|
-
|
|
444
|
+
const d = o.map((L, f) => ({ sig: JSON.stringify(L), idx: f, item: L })), b = n.map((L, f) => ({ sig: JSON.stringify(L), idx: f, item: L })), _ = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Map();
|
|
445
|
+
for (const L of d)
|
|
446
|
+
_.has(L.sig) || _.set(L.sig, []), _.get(L.sig).push(L);
|
|
447
|
+
for (const L of b)
|
|
448
|
+
w.has(L.sig) || w.set(L.sig, []), w.get(L.sig).push(L);
|
|
449
|
+
const D = [], O = [], i = Array.from(_.keys()).concat(Array.from(w.keys())), V = Array.from(new Set(i));
|
|
450
|
+
for (const L of V) {
|
|
451
|
+
const f = _.get(L) || [], M = w.get(L) || [], C = Math.min(f.length, M.length);
|
|
452
|
+
for (let p = C; p < f.length; p++)
|
|
453
|
+
D.push({ idx: f[p].idx, item: f[p].item });
|
|
454
|
+
for (let p = C; p < M.length; p++)
|
|
455
|
+
O.push({ idx: M[p].idx, item: M[p].item });
|
|
456
456
|
}
|
|
457
|
-
for (const { idx:
|
|
458
|
-
Et(`${t}[${
|
|
459
|
-
for (const { idx:
|
|
460
|
-
$t(`${t}[${
|
|
457
|
+
for (const { idx: L, item: f } of D)
|
|
458
|
+
Et(`${t}[${L}]`, f, r);
|
|
459
|
+
for (const { idx: L, item: f } of O)
|
|
460
|
+
$t(`${t}[${L}]`, f, r);
|
|
461
461
|
}
|
|
462
|
-
function Ye(t, o, n, r,
|
|
463
|
-
if (!n && !
|
|
464
|
-
if (n && !
|
|
465
|
-
Et(t, o,
|
|
462
|
+
function Ye(t, o, n, r, c, d) {
|
|
463
|
+
if (!n && !c) return;
|
|
464
|
+
if (n && !c) {
|
|
465
|
+
Et(t, o, d);
|
|
466
466
|
return;
|
|
467
467
|
}
|
|
468
|
-
if (!n &&
|
|
469
|
-
$t(t, r,
|
|
468
|
+
if (!n && c) {
|
|
469
|
+
$t(t, r, d);
|
|
470
470
|
return;
|
|
471
471
|
}
|
|
472
472
|
if (JSON.stringify(o) === JSON.stringify(r)) return;
|
|
473
473
|
if (_e(o) && _e(r)) {
|
|
474
|
-
|
|
474
|
+
_s(t, o, r, d);
|
|
475
475
|
return;
|
|
476
476
|
}
|
|
477
477
|
if (je(o) && je(r)) {
|
|
478
|
-
|
|
478
|
+
xs(t, o, r, d);
|
|
479
479
|
return;
|
|
480
480
|
}
|
|
481
|
-
const
|
|
482
|
-
if (
|
|
483
|
-
Ye(t,
|
|
481
|
+
const b = Ct(o), _ = Ct(r);
|
|
482
|
+
if (b.ok && _.ok) {
|
|
483
|
+
Ye(t, b.value, !0, _.value, !0, d);
|
|
484
484
|
return;
|
|
485
485
|
}
|
|
486
|
-
|
|
486
|
+
d.push({
|
|
487
487
|
path: t,
|
|
488
488
|
type: "changed",
|
|
489
|
-
before:
|
|
490
|
-
after:
|
|
489
|
+
before: Ke(o),
|
|
490
|
+
after: Ke(r)
|
|
491
491
|
});
|
|
492
492
|
}
|
|
493
|
-
function
|
|
493
|
+
function Ls(t, o) {
|
|
494
494
|
if (JSON.stringify(t) === JSON.stringify(o)) return [];
|
|
495
495
|
const n = t == null, r = o == null;
|
|
496
|
-
let
|
|
497
|
-
n && (_e(o) ?
|
|
498
|
-
let
|
|
499
|
-
r && (_e(t) ?
|
|
500
|
-
const
|
|
501
|
-
return Ye("",
|
|
496
|
+
let c = t;
|
|
497
|
+
n && (_e(o) ? c = {} : je(o) && (c = []));
|
|
498
|
+
let d = o;
|
|
499
|
+
r && (_e(t) ? d = {} : je(t) && (d = []));
|
|
500
|
+
const b = [];
|
|
501
|
+
return Ye("", c, !0, d, !0, b), b;
|
|
502
502
|
}
|
|
503
|
-
function
|
|
503
|
+
function Tt(t) {
|
|
504
504
|
const o = t.operations;
|
|
505
505
|
return !o || o.length === 0 ? !1 : o.some((n) => n.status === "failed");
|
|
506
506
|
}
|
|
507
507
|
function lt(t, o) {
|
|
508
|
-
var
|
|
508
|
+
var c, d;
|
|
509
509
|
if (t.source === "hrm-validate") return o("auditLog.pos.device.posV7");
|
|
510
|
-
const n = (
|
|
510
|
+
const n = (d = (c = t.metadata) == null ? void 0 : c.pos) == null ? void 0 : d.posMode, r = t.deviceId || "-";
|
|
511
511
|
return n ? `${r} · ${o(`auditLog.pos.mode.${n}`)}` : r;
|
|
512
512
|
}
|
|
513
|
-
function
|
|
513
|
+
function ks(t, o) {
|
|
514
514
|
var r;
|
|
515
515
|
const n = t.actorName || t.userId || "-";
|
|
516
516
|
return ((r = t.metadata) == null ? void 0 : r.actorKnown) === !1 ? `${n} (${o("auditLog.pos.unverified")})` : n;
|
|
517
517
|
}
|
|
518
|
-
function
|
|
519
|
-
var
|
|
518
|
+
function jt(t, o) {
|
|
519
|
+
var c;
|
|
520
520
|
const n = t.approverName || t.approverId;
|
|
521
521
|
if (!n)
|
|
522
522
|
return t.source === "hrm-validate" ? o("auditLog.pos.viaCode") : "-";
|
|
523
|
-
const r = ((
|
|
523
|
+
const r = ((c = t.metadata) == null ? void 0 : c.approverKnown) === !1 ? `${n} (${o("auditLog.pos.unverified")})` : n;
|
|
524
524
|
return t.source === "hrm-validate" ? `${r} · ${o("auditLog.pos.viaCode")}` : r;
|
|
525
525
|
}
|
|
526
|
-
function
|
|
526
|
+
function Ss(t, o) {
|
|
527
527
|
const n = t.approverName || t.approverId;
|
|
528
528
|
return n ? ` · ${o("auditLog.pos.approverInline", { name: n })}` : "";
|
|
529
529
|
}
|
|
530
|
-
function
|
|
530
|
+
function ws(t, o, n) {
|
|
531
531
|
return o || !(t != null && t.length) ? { userIds: [], feedmeAdminActors: !1 } : {
|
|
532
532
|
userIds: t.filter((r) => r !== n),
|
|
533
533
|
feedmeAdminActors: t.includes(n)
|
|
@@ -536,7 +536,7 @@ function Ss(t, o, n) {
|
|
|
536
536
|
function be(t) {
|
|
537
537
|
return t === void 0 ? "—" : Array.isArray(t) ? t.length > 0 ? t.join(", ") : "—" : t || "—";
|
|
538
538
|
}
|
|
539
|
-
function
|
|
539
|
+
function Is(t) {
|
|
540
540
|
return {
|
|
541
541
|
label: t.label,
|
|
542
542
|
labelKey: t.labelKey,
|
|
@@ -545,372 +545,372 @@ function ws(t) {
|
|
|
545
545
|
afterDisplay: be(t.after)
|
|
546
546
|
};
|
|
547
547
|
}
|
|
548
|
-
function
|
|
548
|
+
function As(t) {
|
|
549
549
|
return Array.isArray(t) && t.length > 0;
|
|
550
550
|
}
|
|
551
551
|
function Rt(t, o, n) {
|
|
552
552
|
return n.labelKey && o(n.labelKey) ? t(n.labelKey) : n.label;
|
|
553
553
|
}
|
|
554
|
-
function
|
|
554
|
+
function Ut(t, o) {
|
|
555
555
|
return ut(t, o) || t("auditLog.operation.unlabeled");
|
|
556
556
|
}
|
|
557
|
-
function
|
|
557
|
+
function Fs(t, o) {
|
|
558
558
|
return !o || o.length === 0 ? "" : o.map((n) => {
|
|
559
|
-
const r =
|
|
560
|
-
let
|
|
561
|
-
return n.status === "failed" && n.errorMessage && (
|
|
559
|
+
const r = Ut(t, n), c = t(`auditLog.outcome.${n.status}`);
|
|
560
|
+
let d = `${r}: ${c}`;
|
|
561
|
+
return n.status === "failed" && n.errorMessage && (d += ` — ${n.errorMessage}`), d;
|
|
562
562
|
}).join(`
|
|
563
563
|
`);
|
|
564
564
|
}
|
|
565
|
-
function
|
|
565
|
+
function Ms(t, o, n) {
|
|
566
566
|
const r = Rt(t, o, n);
|
|
567
567
|
return n.type === "add" ? `${r}: + ${be(n.after)}` : n.type === "remove" ? `${r}: - ${be(n.before)}` : `${r}: ${be(n.before)} → ${be(n.after)}`;
|
|
568
568
|
}
|
|
569
|
-
function
|
|
569
|
+
function Ds(t, o, n) {
|
|
570
570
|
if (!n || n.length === 0) return "";
|
|
571
|
-
const r = n.filter((
|
|
571
|
+
const r = n.filter((b) => b.changeNodes && b.changeNodes.length > 0);
|
|
572
572
|
if (r.length === 0) return "";
|
|
573
|
-
const
|
|
574
|
-
return r.map((
|
|
575
|
-
const
|
|
576
|
-
return
|
|
577
|
-
`) :
|
|
573
|
+
const c = r.length > 1;
|
|
574
|
+
return r.map((b) => {
|
|
575
|
+
const _ = (b.changeNodes ?? []).map((w) => Ms(t, o, w));
|
|
576
|
+
return c ? [`[${Ut(t, b)}]`, ..._].join(`
|
|
577
|
+
`) : _.join(`
|
|
578
578
|
`);
|
|
579
579
|
}).join(`
|
|
580
580
|
`);
|
|
581
581
|
}
|
|
582
|
-
const
|
|
582
|
+
const Os = {
|
|
583
583
|
class: "flex flex-col gap-4 p-12 w-[260px]"
|
|
584
|
-
}, Os = {
|
|
585
|
-
class: "text-xs font-semibold text-fm-color-typo-secondary mb-4"
|
|
586
584
|
}, Cs = {
|
|
585
|
+
class: "text-xs font-semibold text-fm-color-typo-secondary mb-4"
|
|
586
|
+
}, Ts = {
|
|
587
587
|
class: "flex min-h-0 flex-1 flex-col gap-16"
|
|
588
588
|
}, js = {
|
|
589
589
|
class: "space-y-16"
|
|
590
|
-
}, Ts = {
|
|
591
|
-
class: "flex flex-wrap items-center gap-8"
|
|
592
590
|
}, Ps = {
|
|
593
|
-
|
|
594
|
-
class: "w-fit"
|
|
591
|
+
class: "flex flex-wrap items-center gap-8"
|
|
595
592
|
}, Vs = {
|
|
596
|
-
key:
|
|
593
|
+
key: 0,
|
|
597
594
|
class: "w-fit"
|
|
598
595
|
}, $s = {
|
|
596
|
+
key: 1,
|
|
599
597
|
class: "w-fit"
|
|
600
598
|
}, Es = {
|
|
601
599
|
class: "w-fit"
|
|
602
600
|
}, Rs = {
|
|
601
|
+
class: "w-fit"
|
|
602
|
+
}, Us = {
|
|
603
603
|
key: 2,
|
|
604
604
|
class: "w-fit"
|
|
605
605
|
}, Ns = {
|
|
606
606
|
class: "flex h-full flex-col overflow-auto"
|
|
607
|
-
},
|
|
607
|
+
}, Ks = {
|
|
608
608
|
key: 0,
|
|
609
609
|
class: "space-y-12 p-4 text-sm"
|
|
610
|
-
},
|
|
610
|
+
}, Ys = {
|
|
611
611
|
class: "flex items-start justify-between gap-8 rounded-lg border border-fm-color-border-default p-12"
|
|
612
612
|
}, Bs = {
|
|
613
613
|
class: "min-w-0 flex-1"
|
|
614
|
-
}, Ys = {
|
|
615
|
-
class: "audit-log-operation-label-detail text-base font-bold leading-snug text-fm-color-typo-primary"
|
|
616
614
|
}, zs = {
|
|
615
|
+
class: "audit-log-operation-label-detail text-base font-bold leading-snug text-fm-color-typo-primary"
|
|
616
|
+
}, qs = {
|
|
617
617
|
key: 0,
|
|
618
618
|
class: "mt-4 break-all font-mono text-xs text-fm-color-typo-secondary"
|
|
619
|
-
},
|
|
619
|
+
}, Js = {
|
|
620
620
|
key: 1,
|
|
621
621
|
class: "mt-2 break-all font-mono text-xs text-fm-color-typo-secondary"
|
|
622
|
-
}, Js = {
|
|
623
|
-
class: "flex items-center gap-4"
|
|
624
622
|
}, Hs = {
|
|
625
|
-
class: "
|
|
623
|
+
class: "flex items-center gap-4"
|
|
626
624
|
}, Ws = {
|
|
627
|
-
class: "
|
|
625
|
+
class: "rounded-lg border border-fm-color-border-default p-12"
|
|
628
626
|
}, Gs = {
|
|
629
|
-
class: "
|
|
627
|
+
class: "space-y-12"
|
|
630
628
|
}, Xs = {
|
|
631
|
-
class: "font-semibold"
|
|
632
|
-
}, Qs = {
|
|
633
629
|
class: "text-xs text-fm-color-typo-secondary"
|
|
634
|
-
},
|
|
630
|
+
}, Qs = {
|
|
635
631
|
class: "font-semibold"
|
|
636
|
-
},
|
|
632
|
+
}, Zs = {
|
|
637
633
|
class: "text-xs text-fm-color-typo-secondary"
|
|
634
|
+
}, ea = {
|
|
635
|
+
class: "font-semibold"
|
|
638
636
|
}, ta = {
|
|
639
|
-
class: "
|
|
637
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
640
638
|
}, oa = {
|
|
641
|
-
|
|
639
|
+
class: "break-all font-semibold"
|
|
642
640
|
}, sa = {
|
|
643
|
-
|
|
641
|
+
key: 0
|
|
644
642
|
}, aa = {
|
|
645
|
-
class: "break-all font-mono text-xs font-semibold"
|
|
646
|
-
}, na = {
|
|
647
643
|
class: "text-xs text-fm-color-typo-secondary"
|
|
648
|
-
},
|
|
644
|
+
}, na = {
|
|
649
645
|
class: "break-all font-mono text-xs font-semibold"
|
|
650
|
-
},
|
|
646
|
+
}, la = {
|
|
651
647
|
class: "text-xs text-fm-color-typo-secondary"
|
|
648
|
+
}, ra = {
|
|
649
|
+
class: "break-all font-mono text-xs font-semibold"
|
|
652
650
|
}, ia = {
|
|
653
|
-
class: "
|
|
651
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
654
652
|
}, ua = {
|
|
655
|
-
class: "
|
|
653
|
+
class: "font-semibold"
|
|
656
654
|
}, da = {
|
|
657
|
-
class: "
|
|
655
|
+
class: "rounded-lg border border-fm-color-border-default"
|
|
658
656
|
}, ca = {
|
|
659
|
-
class: "
|
|
657
|
+
class: "p-12"
|
|
660
658
|
}, fa = {
|
|
661
|
-
class: "
|
|
659
|
+
class: "text-base font-bold text-fm-color-typo-primary"
|
|
662
660
|
}, ma = {
|
|
663
|
-
class: "
|
|
661
|
+
class: "space-y-12 p-12"
|
|
664
662
|
}, va = {
|
|
665
|
-
class: "
|
|
663
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
666
664
|
}, pa = {
|
|
667
|
-
class: "
|
|
665
|
+
class: "font-semibold"
|
|
668
666
|
}, ga = {
|
|
669
|
-
class: "
|
|
667
|
+
class: "rounded-lg border border-fm-color-border-default"
|
|
670
668
|
}, ha = {
|
|
671
|
-
class: "
|
|
669
|
+
class: "p-12"
|
|
672
670
|
}, ya = {
|
|
673
|
-
class: "
|
|
671
|
+
class: "text-base font-bold text-fm-color-typo-primary"
|
|
674
672
|
}, ba = {
|
|
675
|
-
class: "
|
|
673
|
+
class: "space-y-12 p-12"
|
|
676
674
|
}, _a = {
|
|
677
|
-
class: "
|
|
675
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
678
676
|
}, xa = {
|
|
679
|
-
|
|
677
|
+
class: "font-semibold"
|
|
680
678
|
}, La = {
|
|
681
|
-
|
|
679
|
+
key: 0
|
|
682
680
|
}, ka = {
|
|
681
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
682
|
+
}, Sa = {
|
|
683
683
|
key: 0,
|
|
684
684
|
class: "font-semibold"
|
|
685
|
-
},
|
|
685
|
+
}, wa = {
|
|
686
686
|
key: 1,
|
|
687
687
|
class: "break-all font-mono text-xs text-fm-color-typo-secondary"
|
|
688
|
-
}, wa = {
|
|
689
|
-
key: 1
|
|
690
688
|
}, Ia = {
|
|
691
|
-
|
|
689
|
+
key: 1
|
|
692
690
|
}, Aa = {
|
|
693
|
-
class: "font-semibold whitespace-pre-line"
|
|
694
|
-
}, Fa = {
|
|
695
691
|
class: "text-xs text-fm-color-typo-secondary"
|
|
692
|
+
}, Fa = {
|
|
693
|
+
class: "font-semibold whitespace-pre-line"
|
|
696
694
|
}, Ma = {
|
|
697
|
-
class: "font-semibold"
|
|
698
|
-
}, Da = {
|
|
699
695
|
class: "text-xs text-fm-color-typo-secondary"
|
|
696
|
+
}, Da = {
|
|
697
|
+
class: "font-semibold"
|
|
700
698
|
}, Oa = {
|
|
701
|
-
class: "break-all font-mono text-xs font-semibold"
|
|
702
|
-
}, Ca = {
|
|
703
699
|
class: "text-xs text-fm-color-typo-secondary"
|
|
704
|
-
},
|
|
700
|
+
}, Ca = {
|
|
705
701
|
class: "break-all font-mono text-xs font-semibold"
|
|
706
702
|
}, Ta = {
|
|
707
703
|
class: "text-xs text-fm-color-typo-secondary"
|
|
704
|
+
}, ja = {
|
|
705
|
+
class: "break-all font-mono text-xs font-semibold"
|
|
708
706
|
}, Pa = {
|
|
709
|
-
class: "
|
|
707
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
710
708
|
}, Va = {
|
|
709
|
+
class: "font-semibold"
|
|
710
|
+
}, $a = {
|
|
711
711
|
key: 0,
|
|
712
712
|
class: "break-all font-mono text-xs"
|
|
713
|
-
}, $a = {
|
|
714
|
-
key: 0
|
|
715
713
|
}, Ea = {
|
|
716
|
-
|
|
714
|
+
key: 0
|
|
717
715
|
}, Ra = {
|
|
718
|
-
class: "font-semibold"
|
|
719
|
-
}, Na = {
|
|
720
716
|
class: "text-xs text-fm-color-typo-secondary"
|
|
721
717
|
}, Ua = {
|
|
722
718
|
class: "font-semibold"
|
|
719
|
+
}, Na = {
|
|
720
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
723
721
|
}, Ka = {
|
|
722
|
+
class: "font-semibold"
|
|
723
|
+
}, Ya = {
|
|
724
724
|
class: "text-xs text-fm-color-typo-secondary"
|
|
725
725
|
}, Ba = {
|
|
726
726
|
class: "font-semibold"
|
|
727
|
-
}, Ya = {
|
|
728
|
-
key: 0
|
|
729
727
|
}, za = {
|
|
730
|
-
key:
|
|
728
|
+
key: 0
|
|
731
729
|
}, qa = {
|
|
732
|
-
|
|
730
|
+
key: 1
|
|
733
731
|
}, Ja = {
|
|
734
|
-
class: "
|
|
732
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
735
733
|
}, Ha = {
|
|
736
|
-
|
|
734
|
+
class: "whitespace-pre-wrap break-all font-mono text-xs"
|
|
737
735
|
}, Wa = {
|
|
738
|
-
|
|
736
|
+
key: 3
|
|
739
737
|
}, Ga = {
|
|
740
|
-
class: "
|
|
738
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
741
739
|
}, Xa = {
|
|
742
|
-
class: "
|
|
740
|
+
class: "mt-4 space-y-4"
|
|
743
741
|
}, Qa = {
|
|
744
|
-
class: "text-xs font-
|
|
742
|
+
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"
|
|
745
743
|
}, Za = {
|
|
744
|
+
class: "text-xs font-semibold"
|
|
745
|
+
}, en = {
|
|
746
746
|
key: 0,
|
|
747
747
|
class: "text-fm-color-typo-secondary"
|
|
748
|
-
}, en = {
|
|
749
|
-
key: 4
|
|
750
748
|
}, tn = {
|
|
751
|
-
|
|
749
|
+
key: 4
|
|
752
750
|
}, on = {
|
|
753
|
-
class: "
|
|
751
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
754
752
|
}, sn = {
|
|
753
|
+
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"
|
|
754
|
+
}, an = {
|
|
755
755
|
key: 0,
|
|
756
756
|
class: "space-y-12 p-4 text-sm"
|
|
757
|
-
}, an = {
|
|
758
|
-
class: "flex items-start justify-between gap-8 rounded-lg border border-fm-color-border-default p-12"
|
|
759
757
|
}, nn = {
|
|
760
|
-
class: "
|
|
758
|
+
class: "flex items-start justify-between gap-8 rounded-lg border border-fm-color-border-default p-12"
|
|
761
759
|
}, ln = {
|
|
762
|
-
class: "
|
|
760
|
+
class: "min-w-0 flex-1"
|
|
763
761
|
}, rn = {
|
|
762
|
+
class: "text-base font-bold leading-snug text-fm-color-typo-primary"
|
|
763
|
+
}, un = {
|
|
764
764
|
key: 0,
|
|
765
765
|
class: "text-xs text-fm-color-typo-secondary"
|
|
766
|
-
}, un = {
|
|
767
|
-
class: "rounded-lg border border-fm-color-border-default p-12"
|
|
768
766
|
}, dn = {
|
|
769
|
-
class: "
|
|
767
|
+
class: "rounded-lg border border-fm-color-border-default p-12"
|
|
770
768
|
}, cn = {
|
|
771
|
-
class: "
|
|
769
|
+
class: "space-y-12"
|
|
772
770
|
}, fn = {
|
|
773
|
-
class: "
|
|
771
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
774
772
|
}, mn = {
|
|
775
|
-
|
|
773
|
+
class: "font-semibold"
|
|
776
774
|
}, vn = {
|
|
777
|
-
|
|
775
|
+
key: 0
|
|
778
776
|
}, pn = {
|
|
779
|
-
class: "
|
|
777
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
780
778
|
}, gn = {
|
|
781
|
-
|
|
779
|
+
class: "font-semibold"
|
|
782
780
|
}, hn = {
|
|
783
|
-
|
|
781
|
+
key: 1
|
|
784
782
|
}, yn = {
|
|
785
|
-
class: "
|
|
783
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
786
784
|
}, bn = {
|
|
785
|
+
class: "font-semibold"
|
|
786
|
+
}, _n = {
|
|
787
787
|
key: 0,
|
|
788
788
|
class: "rounded-lg border border-fm-color-border-default p-12"
|
|
789
|
-
}, _n = {
|
|
790
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
791
789
|
}, xn = {
|
|
792
|
-
class: "
|
|
790
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
793
791
|
}, Ln = {
|
|
794
|
-
class: "
|
|
792
|
+
class: "whitespace-pre-line font-semibold text-fm-color-typo-error"
|
|
795
793
|
}, kn = {
|
|
796
|
-
class: "
|
|
794
|
+
class: "rounded-lg border border-fm-color-border-default"
|
|
797
795
|
}, Sn = {
|
|
798
|
-
class: "text-base font-bold text-fm-color-typo-primary"
|
|
799
|
-
}, wn = {
|
|
800
796
|
class: "p-12"
|
|
797
|
+
}, wn = {
|
|
798
|
+
class: "text-base font-bold text-fm-color-typo-primary"
|
|
801
799
|
}, In = {
|
|
800
|
+
class: "p-12"
|
|
801
|
+
}, An = {
|
|
802
802
|
key: 0,
|
|
803
803
|
class: "divide-y divide-fm-color-border-default"
|
|
804
|
-
}, An = {
|
|
805
|
-
class: "flex flex-wrap items-center gap-8"
|
|
806
804
|
}, Fn = {
|
|
807
|
-
class: "
|
|
805
|
+
class: "flex flex-wrap items-center gap-8"
|
|
808
806
|
}, Mn = {
|
|
809
|
-
class: "break-all
|
|
807
|
+
class: "break-all text-xs"
|
|
810
808
|
}, Dn = {
|
|
809
|
+
class: "break-all font-mono text-xs"
|
|
810
|
+
}, On = {
|
|
811
811
|
key: 0,
|
|
812
812
|
class: "text-fm-color-typo-success"
|
|
813
|
-
},
|
|
813
|
+
}, Cn = {
|
|
814
814
|
key: 1,
|
|
815
815
|
class: "text-fm-color-typo-error"
|
|
816
|
-
},
|
|
816
|
+
}, Tn = {
|
|
817
817
|
class: "text-fm-color-typo-error"
|
|
818
818
|
}, jn = {
|
|
819
819
|
class: "text-fm-color-typo-success"
|
|
820
|
-
},
|
|
820
|
+
}, Pn = {
|
|
821
821
|
key: 1,
|
|
822
822
|
class: "divide-y divide-fm-color-border-default"
|
|
823
|
-
}, Pn = {
|
|
824
|
-
class: "flex flex-wrap items-center gap-8"
|
|
825
823
|
}, Vn = {
|
|
826
|
-
class: "
|
|
824
|
+
class: "flex flex-wrap items-center gap-8"
|
|
827
825
|
}, $n = {
|
|
828
|
-
class: "
|
|
826
|
+
class: "break-all font-mono text-xs"
|
|
829
827
|
}, En = {
|
|
828
|
+
class: "space-y-4"
|
|
829
|
+
}, Rn = {
|
|
830
830
|
key: 0,
|
|
831
831
|
class: "text-fm-color-typo-success"
|
|
832
|
-
},
|
|
832
|
+
}, Un = {
|
|
833
833
|
key: 1,
|
|
834
834
|
class: "text-fm-color-typo-error"
|
|
835
835
|
}, Nn = {
|
|
836
836
|
class: "text-fm-color-typo-error"
|
|
837
|
-
}, Un = {
|
|
838
|
-
class: "text-fm-color-typo-success"
|
|
839
837
|
}, Kn = {
|
|
838
|
+
class: "text-fm-color-typo-success"
|
|
839
|
+
}, Yn = {
|
|
840
840
|
key: 2,
|
|
841
841
|
class: "text-fm-color-typo-secondary"
|
|
842
842
|
}, Bn = {
|
|
843
843
|
key: 1,
|
|
844
844
|
class: "rounded-lg border border-fm-color-border-default"
|
|
845
|
-
}, Yn = {
|
|
846
|
-
class: "text-base font-bold text-fm-color-typo-primary"
|
|
847
845
|
}, zn = {
|
|
848
|
-
class: "
|
|
846
|
+
class: "text-base font-bold text-fm-color-typo-primary"
|
|
849
847
|
}, qn = {
|
|
850
|
-
|
|
848
|
+
class: "space-y-12 p-12"
|
|
851
849
|
}, Jn = {
|
|
852
|
-
|
|
850
|
+
key: 0
|
|
853
851
|
}, Hn = {
|
|
854
|
-
class: "
|
|
852
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
855
853
|
}, Wn = {
|
|
856
|
-
|
|
854
|
+
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"
|
|
857
855
|
}, Gn = {
|
|
858
|
-
|
|
856
|
+
key: 1
|
|
859
857
|
}, Xn = {
|
|
858
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
859
|
+
}, Qn = {
|
|
860
860
|
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"
|
|
861
|
-
},
|
|
861
|
+
}, Oe = 100, rt = 1e3, it = "__feedmeAdmin__", Zn = "D MMM YYYY h:mm A", el = "YYYY-MM-DD HH:mm", N = "YYYY-MM-DD", Pt = "audit-log-export-fields-v3", tl = /* @__PURE__ */ Vt({
|
|
862
862
|
__name: "AuditLogList",
|
|
863
863
|
setup(t) {
|
|
864
864
|
const {
|
|
865
865
|
t: o,
|
|
866
866
|
te: n
|
|
867
|
-
} = dt(), r = Ho(), d =
|
|
867
|
+
} = dt(), r = Ho(), c = Wo(), d = ms(), b = Qo(), {
|
|
868
868
|
restaurants: _
|
|
869
|
-
} = Jo(
|
|
870
|
-
async function
|
|
871
|
-
const s = Uint8Array.from(atob(e), (k) => k.charCodeAt(0)),
|
|
872
|
-
return await
|
|
869
|
+
} = Jo(b), w = S(!1), D = S(!1), O = S([]), i = S(null), V = S(!1), L = S({}), f = S(null), M = S(!1);
|
|
870
|
+
async function C(e) {
|
|
871
|
+
const s = Uint8Array.from(atob(e), (k) => k.charCodeAt(0)), m = new DecompressionStream("gzip"), x = m.writable.getWriter();
|
|
872
|
+
return await x.write(s), await x.close(), new Response(m.readable).text();
|
|
873
873
|
}
|
|
874
|
-
const
|
|
875
|
-
let
|
|
876
|
-
|
|
874
|
+
const p = S("");
|
|
875
|
+
let j = 0;
|
|
876
|
+
ae(() => {
|
|
877
877
|
var e, s;
|
|
878
878
|
return (s = (e = i.value) == null ? void 0 : e.metadata) == null ? void 0 : s.requestBody;
|
|
879
879
|
}, async (e) => {
|
|
880
|
-
const s = ++
|
|
880
|
+
const s = ++j;
|
|
881
881
|
if (!e) {
|
|
882
|
-
|
|
882
|
+
p.value = "";
|
|
883
883
|
return;
|
|
884
884
|
}
|
|
885
885
|
if (typeof e == "object") {
|
|
886
|
-
|
|
886
|
+
p.value = JSON.stringify(e, null, 2);
|
|
887
887
|
return;
|
|
888
888
|
}
|
|
889
889
|
if (e.startsWith("gzip:")) {
|
|
890
890
|
try {
|
|
891
|
-
const
|
|
892
|
-
if (s !==
|
|
893
|
-
|
|
891
|
+
const m = await C(e.slice(5));
|
|
892
|
+
if (s !== j) return;
|
|
893
|
+
p.value = JSON.stringify(JSON.parse(m), null, 2);
|
|
894
894
|
} catch {
|
|
895
|
-
if (s !==
|
|
896
|
-
|
|
895
|
+
if (s !== j) return;
|
|
896
|
+
p.value = e;
|
|
897
897
|
}
|
|
898
898
|
return;
|
|
899
899
|
}
|
|
900
900
|
try {
|
|
901
|
-
|
|
901
|
+
p.value = JSON.stringify(JSON.parse(e), null, 2);
|
|
902
902
|
} catch {
|
|
903
|
-
|
|
903
|
+
p.value = e;
|
|
904
904
|
}
|
|
905
905
|
}, {
|
|
906
906
|
immediate: !0
|
|
907
907
|
});
|
|
908
|
-
async function
|
|
908
|
+
async function K(e) {
|
|
909
909
|
if (!e) return;
|
|
910
910
|
let s = e;
|
|
911
911
|
if (e.startsWith("gzip:"))
|
|
912
912
|
try {
|
|
913
|
-
s = await
|
|
913
|
+
s = await C(e.slice(5));
|
|
914
914
|
} catch {
|
|
915
915
|
return e;
|
|
916
916
|
}
|
|
@@ -920,7 +920,7 @@ const Ds = {
|
|
|
920
920
|
return s;
|
|
921
921
|
}
|
|
922
922
|
}
|
|
923
|
-
function
|
|
923
|
+
function E(e) {
|
|
924
924
|
if (e === void 0) return "";
|
|
925
925
|
if (typeof e == "object" && e !== null)
|
|
926
926
|
try {
|
|
@@ -930,144 +930,143 @@ const Ds = {
|
|
|
930
930
|
}
|
|
931
931
|
return String(e);
|
|
932
932
|
}
|
|
933
|
-
const
|
|
934
|
-
let
|
|
935
|
-
|
|
936
|
-
const s = ++
|
|
937
|
-
if (
|
|
938
|
-
const [
|
|
939
|
-
s ===
|
|
933
|
+
const X = S([]), Y = S([]), I = S(""), Q = S(""), H = S(!1);
|
|
934
|
+
let xe = 0;
|
|
935
|
+
ae(f, async (e) => {
|
|
936
|
+
const s = ++xe;
|
|
937
|
+
if (X.value = [], Y.value = [], I.value = "", Q.value = "", H.value = !1, !e) return;
|
|
938
|
+
const [m, x] = await Promise.all([K(e.before), K(e.after)]);
|
|
939
|
+
s === xe && (As(e.changeNodes) ? Y.value = e.changeNodes.map(Is) : X.value = Ls(m, x), I.value = E(m), Q.value = E(x));
|
|
940
940
|
});
|
|
941
|
-
function
|
|
941
|
+
function ct(e) {
|
|
942
942
|
return e === "added" ? "success" : e === "removed" ? "critical" : "warning";
|
|
943
943
|
}
|
|
944
|
-
function
|
|
944
|
+
function W(e) {
|
|
945
945
|
return o(e === "added" ? "auditLog.operation.added" : e === "removed" ? "auditLog.operation.removed" : "auditLog.operation.updated");
|
|
946
946
|
}
|
|
947
|
-
function
|
|
947
|
+
function Le(e) {
|
|
948
948
|
return e.replace(/\[[^\]]*\]/g, "");
|
|
949
949
|
}
|
|
950
|
-
function
|
|
950
|
+
function Nt(e) {
|
|
951
951
|
return e === "add" ? "success" : e === "remove" ? "critical" : "warning";
|
|
952
952
|
}
|
|
953
|
-
function
|
|
953
|
+
function Kt(e) {
|
|
954
954
|
return o(e === "add" ? "auditLog.operation.added" : e === "remove" ? "auditLog.operation.removed" : "auditLog.operation.updated");
|
|
955
955
|
}
|
|
956
|
-
function
|
|
956
|
+
function Yt(e) {
|
|
957
957
|
return Rt(o, n, e);
|
|
958
958
|
}
|
|
959
959
|
const ft = A(() => {
|
|
960
960
|
const e = [], s = /* @__PURE__ */ new Map();
|
|
961
|
-
for (const
|
|
962
|
-
const
|
|
963
|
-
let
|
|
964
|
-
|
|
961
|
+
for (const m of X.value) {
|
|
962
|
+
const x = Le(m.path), k = `${m.type}::${x}`;
|
|
963
|
+
let T = s.get(k);
|
|
964
|
+
T || (T = {
|
|
965
965
|
groupKey: k,
|
|
966
|
-
displayKey:
|
|
967
|
-
type:
|
|
966
|
+
displayKey: x,
|
|
967
|
+
type: m.type,
|
|
968
968
|
rows: []
|
|
969
|
-
}, s.set(k,
|
|
969
|
+
}, s.set(k, T), e.push(T)), T.rows.push(m);
|
|
970
970
|
}
|
|
971
971
|
return e;
|
|
972
|
-
}), Pe =
|
|
972
|
+
}), Pe = S(1), Bt = S(!1), Be = S(0), mt = A(() => Math.max(1, Math.ceil(Be.value / Oe))), vt = P().format("YYYY-MM-DD"), ne = S({
|
|
973
973
|
startDate: `${vt} 00:00`,
|
|
974
974
|
endDate: `${vt} 23:59`
|
|
975
|
-
}), fe =
|
|
976
|
-
function
|
|
975
|
+
}), fe = S(), Z = S(), le = S(), re = S(), ie = S("all");
|
|
976
|
+
function zt(e) {
|
|
977
977
|
return typeof e == "string" ? [e] : Array.isArray(e) ? e.filter((s) => typeof s == "string") : [];
|
|
978
978
|
}
|
|
979
|
-
const pt =
|
|
979
|
+
const pt = De.filter((e) => e.key !== "all").map((e) => e.key);
|
|
980
980
|
function Ve(e) {
|
|
981
|
-
const s =
|
|
981
|
+
const s = De.find((m) => m.key !== "all" && m.subjectPrefixes.some((x) => e.startsWith(x)));
|
|
982
982
|
return (s == null ? void 0 : s.key) ?? "other";
|
|
983
983
|
}
|
|
984
984
|
function gt(e) {
|
|
985
985
|
const s = pt.indexOf(e);
|
|
986
986
|
return s === -1 ? pt.length : s;
|
|
987
987
|
}
|
|
988
|
-
const
|
|
988
|
+
const qt = ["all", "report", "hrm", "payment"], Jt = A(() => De.filter(({
|
|
989
|
+
key: e
|
|
990
|
+
}) => !c.isFoodCourt.value || qt.includes(e)).map(({
|
|
989
991
|
key: e
|
|
990
992
|
}) => ({
|
|
991
993
|
label: o(`auditLog.modules.${e}`),
|
|
992
994
|
value: e
|
|
993
|
-
}))), $e = A(() =>
|
|
994
|
-
|
|
995
|
-
e &&
|
|
995
|
+
}))), $e = A(() => De.find((e) => e.key === ie.value) ?? De[0]), Ht = A(() => ie.value === "all"), q = A(() => ie.value === "pos"), pe = A(() => $e.value.sources ?? []);
|
|
996
|
+
ae(q, (e) => {
|
|
997
|
+
e && b.readRestaurants();
|
|
996
998
|
}, {
|
|
997
999
|
immediate: !0
|
|
998
1000
|
});
|
|
999
|
-
const
|
|
1001
|
+
const ee = S([]), Wt = A(() => _.value.map((e) => ({
|
|
1000
1002
|
label: e.profile.name,
|
|
1001
1003
|
value: String(e._id)
|
|
1002
|
-
}))),
|
|
1003
|
-
|
|
1004
|
-
|
|
1004
|
+
}))), Gt = A(() => Object.fromEntries(_.value.map((e) => [String(e._id), e.profile.name])));
|
|
1005
|
+
ae(ie, () => {
|
|
1006
|
+
ee.value = [];
|
|
1005
1007
|
});
|
|
1006
|
-
const
|
|
1008
|
+
const ke = S([]), Ee = S(!1), Xt = A(() => [...Ee.value ? [{
|
|
1007
1009
|
label: o("auditLog.user.feedmeAdmin"),
|
|
1008
1010
|
value: it
|
|
1009
1011
|
}] : [], ...d.members.map((e) => ({
|
|
1010
1012
|
label: e.name,
|
|
1011
1013
|
value: e.doc.userId
|
|
1012
|
-
})), ...
|
|
1014
|
+
})), ...ke.value.map((e) => ({
|
|
1013
1015
|
label: `${e.name} (${o("auditLog.user.feedmeAdmin")})`,
|
|
1014
1016
|
value: e.userId
|
|
1015
|
-
}))]),
|
|
1016
|
-
|
|
1017
|
+
}))]), ue = A(() => ws(fe.value, q.value, it)), ze = S(""), te = S(""), Qt = os(ze, (e) => {
|
|
1018
|
+
te.value = e.trim();
|
|
1017
1019
|
});
|
|
1018
|
-
|
|
1020
|
+
Bo(Qt);
|
|
1019
1021
|
const {
|
|
1020
|
-
onSheetOpened:
|
|
1021
|
-
onSheetClosed:
|
|
1022
|
-
copyLink:
|
|
1023
|
-
} =
|
|
1022
|
+
onSheetOpened: Zt,
|
|
1023
|
+
onSheetClosed: eo,
|
|
1024
|
+
copyLink: to
|
|
1025
|
+
} = gs({
|
|
1024
1026
|
logs: O,
|
|
1025
1027
|
selectedLog: i,
|
|
1026
|
-
isSheetOpen:
|
|
1027
|
-
businessId: () =>
|
|
1028
|
-
var e;
|
|
1029
|
-
return (e = r.currentBusiness.value) == null ? void 0 : e._id;
|
|
1030
|
-
}
|
|
1028
|
+
isSheetOpen: V,
|
|
1029
|
+
businessId: () => c.id.value
|
|
1031
1030
|
}), me = A(() => {
|
|
1032
|
-
const e =
|
|
1031
|
+
const e = te.value.toLowerCase();
|
|
1033
1032
|
if (!e) return [];
|
|
1034
1033
|
const s = /* @__PURE__ */ new Set();
|
|
1035
|
-
for (const
|
|
1036
|
-
const
|
|
1037
|
-
((d.userIdToName[
|
|
1034
|
+
for (const m of d.members) {
|
|
1035
|
+
const x = m.doc.userId;
|
|
1036
|
+
((d.userIdToName[x] ?? "").toLowerCase().includes(e) || (d.userIdToEmail[x] ?? "").toLowerCase().includes(e) || (d.userIdToPhone[x] ?? "").toLowerCase().includes(e)) && s.add(x);
|
|
1038
1037
|
}
|
|
1039
|
-
for (const
|
|
1040
|
-
|
|
1038
|
+
for (const m of ke.value)
|
|
1039
|
+
m.name.toLowerCase().includes(e) && s.add(m.userId);
|
|
1041
1040
|
return [...s];
|
|
1042
|
-
}),
|
|
1043
|
-
const e = Dt.flatMap((k) =>
|
|
1041
|
+
}), qe = A(() => {
|
|
1042
|
+
const e = Dt.flatMap((k) => zt(k.subject).map((T) => ({
|
|
1044
1043
|
label: k.label,
|
|
1045
|
-
value:
|
|
1046
|
-
}))), s = Object.entries(Mt).map(([k,
|
|
1047
|
-
label:
|
|
1044
|
+
value: T
|
|
1045
|
+
}))), s = Object.entries(Mt).map(([k, T]) => ({
|
|
1046
|
+
label: T,
|
|
1048
1047
|
value: k
|
|
1049
|
-
})),
|
|
1048
|
+
})), m = /* @__PURE__ */ new Set(), x = [];
|
|
1050
1049
|
for (const k of [...e, ...s])
|
|
1051
|
-
if (!
|
|
1052
|
-
|
|
1053
|
-
const
|
|
1054
|
-
|
|
1050
|
+
if (!m.has(k.value)) {
|
|
1051
|
+
m.add(k.value);
|
|
1052
|
+
const T = Ve(k.value);
|
|
1053
|
+
x.push({
|
|
1055
1054
|
...k,
|
|
1056
|
-
group: o(`auditLog.modules.${
|
|
1055
|
+
group: o(`auditLog.modules.${T}`)
|
|
1057
1056
|
});
|
|
1058
1057
|
}
|
|
1059
|
-
return
|
|
1058
|
+
return x.sort((k, T) => gt(Ve(k.value)) - gt(Ve(T.value)));
|
|
1060
1059
|
}), ge = A(() => {
|
|
1061
|
-
const e =
|
|
1060
|
+
const e = te.value.toLowerCase();
|
|
1062
1061
|
if (!e) return [];
|
|
1063
1062
|
const s = /* @__PURE__ */ new Set();
|
|
1064
|
-
for (const
|
|
1065
|
-
|
|
1063
|
+
for (const m of qe.value)
|
|
1064
|
+
m.label.toLowerCase().includes(e) && s.add(m.value);
|
|
1066
1065
|
return [...s];
|
|
1067
|
-
}),
|
|
1068
|
-
function
|
|
1069
|
-
const
|
|
1070
|
-
return e.label.toLowerCase().includes(
|
|
1066
|
+
}), oo = A(() => Ht.value ? qe.value : qe.value.filter((e) => Ve(e.value) === ie.value));
|
|
1067
|
+
function so(e, s) {
|
|
1068
|
+
const m = s.toLowerCase();
|
|
1069
|
+
return e.label.toLowerCase().includes(m) || e.value.replace(/^business::/, "").toLowerCase().includes(m) ? !0 : e.value.toLowerCase().includes(m);
|
|
1071
1070
|
}
|
|
1072
1071
|
const G = A(() => ({
|
|
1073
1072
|
manage: o("auditLog.action.manage"),
|
|
@@ -1075,7 +1074,7 @@ const Ds = {
|
|
|
1075
1074
|
read: o("auditLog.action.read"),
|
|
1076
1075
|
update: o("auditLog.action.update"),
|
|
1077
1076
|
delete: o("auditLog.action.delete")
|
|
1078
|
-
})),
|
|
1077
|
+
})), ao = A(() => [{
|
|
1079
1078
|
label: G.value.manage,
|
|
1080
1079
|
value: "manage"
|
|
1081
1080
|
}, {
|
|
@@ -1094,26 +1093,26 @@ const Ds = {
|
|
|
1094
1093
|
allowed: o("auditLog.outcome.success"),
|
|
1095
1094
|
denied: o("auditLog.outcome.failed"),
|
|
1096
1095
|
skipped: o("auditLog.outcome.skipped")
|
|
1097
|
-
})),
|
|
1096
|
+
})), Je = A(() => {
|
|
1098
1097
|
var e;
|
|
1099
1098
|
return ((e = r.sessionUser.value) == null ? void 0 : e.isInternal) ?? !1;
|
|
1100
1099
|
});
|
|
1101
1100
|
function ht(e) {
|
|
1102
|
-
return !
|
|
1101
|
+
return !Je.value && e === "skipped" ? "allowed" : e;
|
|
1103
1102
|
}
|
|
1104
|
-
function
|
|
1105
|
-
return !(e != null && e.length) ||
|
|
1103
|
+
function He(e) {
|
|
1104
|
+
return !(e != null && e.length) || Je.value ? e : e.includes("allowed") ? [.../* @__PURE__ */ new Set([...e, "skipped"])] : e;
|
|
1106
1105
|
}
|
|
1107
|
-
const
|
|
1106
|
+
const no = A(() => [{
|
|
1108
1107
|
label: Re.value.allowed,
|
|
1109
1108
|
value: "allowed"
|
|
1110
1109
|
}, {
|
|
1111
1110
|
label: Re.value.denied,
|
|
1112
1111
|
value: "denied"
|
|
1113
|
-
}, ...
|
|
1112
|
+
}, ...Je.value ? [{
|
|
1114
1113
|
label: Re.value.skipped,
|
|
1115
1114
|
value: "skipped"
|
|
1116
|
-
}] : []]),
|
|
1115
|
+
}] : []]), lo = A(() => ({
|
|
1117
1116
|
admin: o("auditLog.detail.resolvedFromValue.admin"),
|
|
1118
1117
|
staff: o("auditLog.detail.resolvedFromValue.staff"),
|
|
1119
1118
|
permissionSet: o("auditLog.detail.resolvedFromValue.permissionSet"),
|
|
@@ -1121,95 +1120,95 @@ const Ds = {
|
|
|
1121
1120
|
custom: o("auditLog.detail.resolvedFromValue.custom"),
|
|
1122
1121
|
"no-match": o("auditLog.detail.resolvedFromValue.noMatch"),
|
|
1123
1122
|
unknown: o("auditLog.detail.resolvedFromValue.unknown")
|
|
1124
|
-
})),
|
|
1123
|
+
})), ro = A(() => ({
|
|
1125
1124
|
GET: G.value.read,
|
|
1126
1125
|
POST: G.value.create,
|
|
1127
1126
|
PUT: G.value.update,
|
|
1128
1127
|
PATCH: G.value.update,
|
|
1129
1128
|
DELETE: G.value.delete
|
|
1130
|
-
})),
|
|
1129
|
+
})), io = {
|
|
1131
1130
|
allowed: "success",
|
|
1132
1131
|
denied: "critical",
|
|
1133
1132
|
skipped: "warning"
|
|
1134
1133
|
};
|
|
1135
|
-
function
|
|
1136
|
-
return
|
|
1134
|
+
function Ue(e) {
|
|
1135
|
+
return P(e).format(Zn);
|
|
1137
1136
|
}
|
|
1138
|
-
const
|
|
1137
|
+
const uo = A(() => {
|
|
1139
1138
|
const {
|
|
1140
1139
|
startDate: e,
|
|
1141
1140
|
endDate: s
|
|
1142
|
-
} =
|
|
1143
|
-
return e && s ? `${
|
|
1144
|
-
}),
|
|
1141
|
+
} = ne.value;
|
|
1142
|
+
return e && s ? `${Ue(e)} – ${Ue(s)}` : e ? Ue(e) : s ? Ue(s) : o("auditLog.dateRange.placeholder");
|
|
1143
|
+
}), co = A(() => [{
|
|
1145
1144
|
label: o("date.predefinedRanges.today"),
|
|
1146
1145
|
value: {
|
|
1147
|
-
startDate:
|
|
1148
|
-
endDate:
|
|
1146
|
+
startDate: P().format(N),
|
|
1147
|
+
endDate: P().format(N)
|
|
1149
1148
|
}
|
|
1150
1149
|
}, {
|
|
1151
1150
|
label: o("date.predefinedRanges.yesterday"),
|
|
1152
1151
|
value: {
|
|
1153
|
-
startDate:
|
|
1154
|
-
endDate:
|
|
1152
|
+
startDate: P().subtract(1, "day").format(N),
|
|
1153
|
+
endDate: P().subtract(1, "day").format(N)
|
|
1155
1154
|
}
|
|
1156
1155
|
}, {
|
|
1157
1156
|
label: o("date.predefinedRanges.thisWeek"),
|
|
1158
1157
|
value: {
|
|
1159
|
-
startDate:
|
|
1160
|
-
endDate:
|
|
1158
|
+
startDate: P().startOf("week").format(N),
|
|
1159
|
+
endDate: P().endOf("week").format(N)
|
|
1161
1160
|
}
|
|
1162
1161
|
}, {
|
|
1163
1162
|
label: o("date.predefinedRanges.lastWeek"),
|
|
1164
1163
|
value: {
|
|
1165
|
-
startDate:
|
|
1166
|
-
endDate:
|
|
1164
|
+
startDate: P().subtract(1, "week").startOf("week").format(N),
|
|
1165
|
+
endDate: P().subtract(1, "week").endOf("week").format(N)
|
|
1167
1166
|
}
|
|
1168
1167
|
}, {
|
|
1169
1168
|
label: o("date.predefinedRanges.last7Days"),
|
|
1170
1169
|
value: {
|
|
1171
|
-
startDate:
|
|
1172
|
-
endDate:
|
|
1170
|
+
startDate: P().subtract(7, "day").format(N),
|
|
1171
|
+
endDate: P().subtract(1, "day").format(N)
|
|
1173
1172
|
}
|
|
1174
1173
|
}, {
|
|
1175
1174
|
label: o("date.predefinedRanges.thisMonth"),
|
|
1176
1175
|
value: {
|
|
1177
|
-
startDate:
|
|
1178
|
-
endDate:
|
|
1176
|
+
startDate: P().startOf("month").format(N),
|
|
1177
|
+
endDate: P().endOf("month").format(N)
|
|
1179
1178
|
}
|
|
1180
1179
|
}, {
|
|
1181
1180
|
label: o("date.predefinedRanges.lastMonth"),
|
|
1182
1181
|
value: {
|
|
1183
|
-
startDate:
|
|
1184
|
-
endDate:
|
|
1182
|
+
startDate: P().subtract(1, "month").startOf("month").format(N),
|
|
1183
|
+
endDate: P().subtract(1, "month").endOf("month").format(N)
|
|
1185
1184
|
}
|
|
1186
1185
|
}]);
|
|
1187
|
-
function
|
|
1186
|
+
function We(e) {
|
|
1188
1187
|
var s;
|
|
1189
|
-
return ((s = Dt.find((
|
|
1188
|
+
return ((s = Dt.find((m) => m.subject === e)) == null ? void 0 : s.label) ?? Mt[e] ?? rs[e];
|
|
1190
1189
|
}
|
|
1191
|
-
function
|
|
1192
|
-
var
|
|
1190
|
+
function Se(e) {
|
|
1191
|
+
var m, x;
|
|
1193
1192
|
if (e.actorType === "posUser")
|
|
1194
|
-
return
|
|
1193
|
+
return ks(e, o);
|
|
1195
1194
|
if (e.actorType === "portalUser")
|
|
1196
1195
|
return e.actorName ?? e.userId;
|
|
1197
1196
|
if (e.actorType === "feedmeAdmin")
|
|
1198
|
-
return (
|
|
1197
|
+
return (m = r.sessionUser.value) != null && m.isInternal ? `${e.actorName ?? e.userId} (${o("auditLog.user.feedmeAdmin")})` : o("auditLog.user.feedmeAdmin");
|
|
1199
1198
|
const s = d.userIdToName[e.userId];
|
|
1200
|
-
return s || (d.hasLoaded ? (
|
|
1199
|
+
return s || (d.hasLoaded ? (x = r.sessionUser.value) != null && x.isInternal ? `${e.actorName ?? e.userId} (${o("auditLog.user.feedmeAdmin")})` : o("auditLog.user.feedmeAdmin") : e.userId);
|
|
1201
1200
|
}
|
|
1202
1201
|
function yt(e) {
|
|
1203
1202
|
return e.actorType === "posUser" ? q.value ? "" : lt(e, o) : d.userIdToPhone[e.userId] || "-";
|
|
1204
1203
|
}
|
|
1205
|
-
function
|
|
1204
|
+
function fo(e) {
|
|
1206
1205
|
return d.userIdToEmail[e.userId] || "-";
|
|
1207
1206
|
}
|
|
1208
1207
|
function bt(e) {
|
|
1209
|
-
return
|
|
1208
|
+
return P(e).format("DD MMM YYYY, HH:mm");
|
|
1210
1209
|
}
|
|
1211
|
-
function
|
|
1212
|
-
return
|
|
1210
|
+
function Ge(e) {
|
|
1211
|
+
return P(e).format("DD MMM YYYY, HH:mm:ss").toUpperCase();
|
|
1213
1212
|
}
|
|
1214
1213
|
function _t(e) {
|
|
1215
1214
|
return G.value[e] ?? e;
|
|
@@ -1220,31 +1219,31 @@ const Ds = {
|
|
|
1220
1219
|
params: e.params,
|
|
1221
1220
|
operationLabel: e.metadata.operationLabel ?? _t(e.action)
|
|
1222
1221
|
});
|
|
1223
|
-
return e.actorType === "posUser" && !q.value ? s +
|
|
1222
|
+
return e.actorType === "posUser" && !q.value ? s + Ss(e, o) : s;
|
|
1224
1223
|
}
|
|
1225
1224
|
function Lt(e) {
|
|
1226
1225
|
return ut(o, e) || o("auditLog.operation.unlabeled");
|
|
1227
1226
|
}
|
|
1228
|
-
function
|
|
1229
|
-
return
|
|
1227
|
+
function mo(e) {
|
|
1228
|
+
return We(e.subject) ?? e.subject;
|
|
1230
1229
|
}
|
|
1231
|
-
function
|
|
1230
|
+
function Xe(e) {
|
|
1232
1231
|
return Re.value[ht(e)];
|
|
1233
1232
|
}
|
|
1234
1233
|
function kt(e) {
|
|
1235
|
-
return
|
|
1234
|
+
return io[ht(e)] ?? "neutral";
|
|
1236
1235
|
}
|
|
1237
|
-
function
|
|
1238
|
-
return
|
|
1236
|
+
function vo(e) {
|
|
1237
|
+
return lo.value[e] ?? e;
|
|
1239
1238
|
}
|
|
1240
|
-
function
|
|
1241
|
-
return e.metadata.requestMethod ?
|
|
1239
|
+
function po(e) {
|
|
1240
|
+
return e.metadata.requestMethod ? ro.value[e.metadata.requestMethod] ?? e.metadata.requestMethod : _t(e.action);
|
|
1242
1241
|
}
|
|
1243
1242
|
function St(e) {
|
|
1244
1243
|
const s = String(e ?? "");
|
|
1245
1244
|
return `"${(/^[=+\-@\t\r]/.test(s) ? `'${s}` : s).replace(/"/g, '""')}"`;
|
|
1246
1245
|
}
|
|
1247
|
-
const
|
|
1246
|
+
const Qe = [{
|
|
1248
1247
|
key: "timestamp",
|
|
1249
1248
|
labelKey: "auditLog.exportFields.timestamp",
|
|
1250
1249
|
getValue: (e) => bt(e.timestamp),
|
|
@@ -1252,7 +1251,7 @@ const Ds = {
|
|
|
1252
1251
|
}, {
|
|
1253
1252
|
key: "userName",
|
|
1254
1253
|
labelKey: "auditLog.exportFields.userName",
|
|
1255
|
-
getValue: (e) =>
|
|
1254
|
+
getValue: (e) => Se(e),
|
|
1256
1255
|
defaultSelected: !0
|
|
1257
1256
|
}, {
|
|
1258
1257
|
key: "userPhone",
|
|
@@ -1262,7 +1261,7 @@ const Ds = {
|
|
|
1262
1261
|
}, {
|
|
1263
1262
|
key: "subject",
|
|
1264
1263
|
labelKey: "auditLog.exportFields.subject",
|
|
1265
|
-
getValue: (e) =>
|
|
1264
|
+
getValue: (e) => We(e.subject) ?? e.subject,
|
|
1266
1265
|
defaultSelected: !0
|
|
1267
1266
|
}, {
|
|
1268
1267
|
key: "action",
|
|
@@ -1277,17 +1276,17 @@ const Ds = {
|
|
|
1277
1276
|
}, {
|
|
1278
1277
|
key: "outcome",
|
|
1279
1278
|
labelKey: "auditLog.exportFields.outcome",
|
|
1280
|
-
getValue: (e) =>
|
|
1279
|
+
getValue: (e) => Xe(e.outcome),
|
|
1281
1280
|
defaultSelected: !0
|
|
1282
1281
|
}, {
|
|
1283
1282
|
key: "operationEvents",
|
|
1284
1283
|
labelKey: "auditLog.exportFields.operationEvents",
|
|
1285
|
-
getValue: (e) =>
|
|
1284
|
+
getValue: (e) => Fs(o, e.operations),
|
|
1286
1285
|
defaultSelected: !0
|
|
1287
1286
|
}, {
|
|
1288
1287
|
key: "changes",
|
|
1289
1288
|
labelKey: "auditLog.exportFields.changes",
|
|
1290
|
-
getValue: (e) =>
|
|
1289
|
+
getValue: (e) => Ds(o, n, e.operations),
|
|
1291
1290
|
defaultSelected: !1
|
|
1292
1291
|
}, {
|
|
1293
1292
|
key: "businessId",
|
|
@@ -1334,7 +1333,7 @@ const Ds = {
|
|
|
1334
1333
|
getValue: (e) => e.traceId ?? "",
|
|
1335
1334
|
defaultSelected: !1
|
|
1336
1335
|
}];
|
|
1337
|
-
function
|
|
1336
|
+
function go() {
|
|
1338
1337
|
try {
|
|
1339
1338
|
const e = localStorage.getItem(Pt);
|
|
1340
1339
|
if (e) {
|
|
@@ -1343,10 +1342,10 @@ const Ds = {
|
|
|
1343
1342
|
}
|
|
1344
1343
|
} catch {
|
|
1345
1344
|
}
|
|
1346
|
-
return new Set(
|
|
1345
|
+
return new Set(Qe.filter((e) => e.defaultSelected).map((e) => e.key));
|
|
1347
1346
|
}
|
|
1348
|
-
const he =
|
|
1349
|
-
function
|
|
1347
|
+
const he = S(go());
|
|
1348
|
+
function ho(e) {
|
|
1350
1349
|
const s = new Set(he.value);
|
|
1351
1350
|
if (s.has(e)) {
|
|
1352
1351
|
if (s.size <= 1) return;
|
|
@@ -1359,45 +1358,45 @@ const Ds = {
|
|
|
1359
1358
|
} catch {
|
|
1360
1359
|
}
|
|
1361
1360
|
}
|
|
1362
|
-
async function
|
|
1363
|
-
var e, s,
|
|
1364
|
-
if (!
|
|
1365
|
-
|
|
1361
|
+
async function yo() {
|
|
1362
|
+
var e, s, m;
|
|
1363
|
+
if (!D.value) {
|
|
1364
|
+
D.value = !0;
|
|
1366
1365
|
try {
|
|
1367
1366
|
const {
|
|
1368
|
-
startDate:
|
|
1369
|
-
endDate:
|
|
1370
|
-
} =
|
|
1371
|
-
...
|
|
1372
|
-
from: de(
|
|
1367
|
+
startDate: x,
|
|
1368
|
+
endDate: k
|
|
1369
|
+
} = ne.value, T = $e.value.subjectPrefixes, U = (/* @__PURE__ */ new Date()).toISOString().slice(0, 19).replace("T", " "), se = k ? de(k) : null, et = se && se < U ? se : U, tt = {
|
|
1370
|
+
...x ? {
|
|
1371
|
+
from: de(x)
|
|
1373
1372
|
} : {},
|
|
1374
|
-
to:
|
|
1375
|
-
...
|
|
1376
|
-
userIds:
|
|
1373
|
+
to: et,
|
|
1374
|
+
...ue.value.userIds.length ? {
|
|
1375
|
+
userIds: ue.value.userIds
|
|
1377
1376
|
} : {},
|
|
1378
|
-
...
|
|
1377
|
+
...ue.value.feedmeAdminActors ? {
|
|
1379
1378
|
feedmeAdminActors: !0
|
|
1380
1379
|
} : {},
|
|
1381
|
-
...(e =
|
|
1382
|
-
subjects:
|
|
1380
|
+
...(e = Z.value) != null && e.length ? {
|
|
1381
|
+
subjects: Z.value
|
|
1383
1382
|
} : {},
|
|
1384
|
-
...
|
|
1385
|
-
subjectPrefixes: [...
|
|
1383
|
+
...T.length ? {
|
|
1384
|
+
subjectPrefixes: [...T]
|
|
1386
1385
|
} : {},
|
|
1387
1386
|
...pe.value.length ? {
|
|
1388
1387
|
sources: [...pe.value]
|
|
1389
1388
|
} : {},
|
|
1390
|
-
...q.value &&
|
|
1391
|
-
restaurantIds: [...
|
|
1389
|
+
...q.value && ee.value.length ? {
|
|
1390
|
+
restaurantIds: [...ee.value]
|
|
1392
1391
|
} : {},
|
|
1393
|
-
...(s =
|
|
1394
|
-
actions:
|
|
1392
|
+
...(s = re.value) != null && s.length ? {
|
|
1393
|
+
actions: re.value
|
|
1395
1394
|
} : {},
|
|
1396
|
-
...(
|
|
1397
|
-
outcomes:
|
|
1395
|
+
...(m = le.value) != null && m.length ? {
|
|
1396
|
+
outcomes: He(le.value)
|
|
1398
1397
|
} : {},
|
|
1399
|
-
...
|
|
1400
|
-
search:
|
|
1398
|
+
...te.value ? {
|
|
1399
|
+
search: te.value
|
|
1401
1400
|
} : {},
|
|
1402
1401
|
...me.value.length ? {
|
|
1403
1402
|
searchUserIds: me.value
|
|
@@ -1406,35 +1405,35 @@ const Ds = {
|
|
|
1406
1405
|
searchSubjects: ge.value
|
|
1407
1406
|
} : {}
|
|
1408
1407
|
}, Ie = [];
|
|
1409
|
-
let
|
|
1408
|
+
let Ne = 0;
|
|
1410
1409
|
for (; ; ) {
|
|
1411
|
-
const J = await
|
|
1410
|
+
const J = await Ce.read({
|
|
1412
1411
|
...tt,
|
|
1413
1412
|
limit: rt,
|
|
1414
|
-
offset:
|
|
1413
|
+
offset: Ne
|
|
1415
1414
|
});
|
|
1416
1415
|
if (Ie.push(...J), J.length < rt) break;
|
|
1417
|
-
|
|
1416
|
+
Ne += rt;
|
|
1418
1417
|
}
|
|
1419
|
-
const
|
|
1420
|
-
`), Eo = `audit-log_${(
|
|
1418
|
+
const Ae = Qe.filter((J) => he.value.has(J.key)), h = Ae.map((J) => o(J.labelKey)), $ = Ie.map((J) => Ae.map((Uo) => Uo.getValue(J) ?? "")), ot = -(/* @__PURE__ */ new Date()).getTimezoneOffset(), Co = ot >= 0 ? "+" : "-", To = String(Math.floor(Math.abs(ot) / 60)).padStart(2, "0"), jo = String(Math.abs(ot) % 60).padStart(2, "0"), Po = `UTC${Co}${To}:${jo}`, At = c.name.value || "", Vo = [x, k].filter(Boolean).join(" – "), $o = [...[[o("auditLog.title")], [`${o("auditLog.frontMatter.date")}: ${Vo}`], ...At ? [[`${o("auditLog.frontMatter.business")}: ${At}`]] : [], [`${o("auditLog.frontMatter.generatedBy")}: ${P().format("DD MMM YYYY, HH:mm")} (${Po})`], []].map((J) => J.map(St).join(",")), ...[h, ...$].map((J) => J.map(St).join(","))].join(`
|
|
1419
|
+
`), Eo = `audit-log_${(c.name.value || "business").replace(/[^a-z0-9_-]+/gi, "_")}_${P().format("YYYYMMDD_HHmmss")}.csv`, Ro = new Blob([`\uFEFF${$o}`], {
|
|
1421
1420
|
type: "text/csv;charset=utf-8;"
|
|
1422
|
-
}), Ft = window.URL.createObjectURL(Ro),
|
|
1423
|
-
|
|
1421
|
+
}), Ft = window.URL.createObjectURL(Ro), Fe = document.createElement("a");
|
|
1422
|
+
Fe.href = Ft, Fe.download = Eo, document.body.appendChild(Fe), Fe.click(), Fe.remove(), window.URL.revokeObjectURL(Ft);
|
|
1424
1423
|
} finally {
|
|
1425
|
-
|
|
1424
|
+
D.value = !1;
|
|
1426
1425
|
}
|
|
1427
1426
|
}
|
|
1428
1427
|
}
|
|
1429
|
-
function
|
|
1428
|
+
function oe(e) {
|
|
1430
1429
|
return "status" in e;
|
|
1431
1430
|
}
|
|
1432
|
-
function
|
|
1433
|
-
return
|
|
1431
|
+
function bo(e) {
|
|
1432
|
+
return Tt(e) ? y(ve.FmTooltip, {
|
|
1434
1433
|
variant: "plain",
|
|
1435
1434
|
placement: "top"
|
|
1436
1435
|
}, {
|
|
1437
|
-
default: () =>
|
|
1436
|
+
default: () => y(ve.FmIcon, {
|
|
1438
1437
|
name: "error",
|
|
1439
1438
|
size: "sm",
|
|
1440
1439
|
class: "cursor-help text-fm-color-typo-error"
|
|
@@ -1442,15 +1441,15 @@ const Ds = {
|
|
|
1442
1441
|
content: () => o("auditLog.operation.partialFailure")
|
|
1443
1442
|
}) : null;
|
|
1444
1443
|
}
|
|
1445
|
-
function
|
|
1446
|
-
var
|
|
1444
|
+
function _o(e) {
|
|
1445
|
+
var m;
|
|
1447
1446
|
const s = e.original;
|
|
1448
|
-
return e.depth === 0 && !
|
|
1447
|
+
return e.depth === 0 && !oe(s) && !!((m = s.operations) != null && m.length);
|
|
1449
1448
|
}
|
|
1450
|
-
function
|
|
1451
|
-
return
|
|
1449
|
+
function xo(e) {
|
|
1450
|
+
return oe(e) ? void 0 : e.operations;
|
|
1452
1451
|
}
|
|
1453
|
-
const
|
|
1452
|
+
const we = [{
|
|
1454
1453
|
accessorKey: "timestamp",
|
|
1455
1454
|
header: () => o("auditLog.columns.timestamp"),
|
|
1456
1455
|
cell(e) {
|
|
@@ -1463,18 +1462,18 @@ const Ds = {
|
|
|
1463
1462
|
size: 220,
|
|
1464
1463
|
cell(e) {
|
|
1465
1464
|
const s = e.row.original;
|
|
1466
|
-
return
|
|
1465
|
+
return oe(s) ? null : y("div", {
|
|
1467
1466
|
class: "flex items-center gap-8"
|
|
1468
|
-
}, [
|
|
1469
|
-
name:
|
|
1470
|
-
initials:
|
|
1467
|
+
}, [y(ve.FmAvatar, {
|
|
1468
|
+
name: Se(s),
|
|
1469
|
+
initials: ss(Se(s)),
|
|
1471
1470
|
size: "sm",
|
|
1472
1471
|
class: "shrink-0"
|
|
1473
|
-
}, null),
|
|
1472
|
+
}, null), y("div", {
|
|
1474
1473
|
class: "min-w-0"
|
|
1475
|
-
}, [
|
|
1474
|
+
}, [y("p", {
|
|
1476
1475
|
class: "truncate font-semibold"
|
|
1477
|
-
}, [
|
|
1476
|
+
}, [Se(s)]), y("p", {
|
|
1478
1477
|
class: "truncate text-fm-color-typo-secondary"
|
|
1479
1478
|
}, [yt(s)])])]);
|
|
1480
1479
|
}
|
|
@@ -1483,9 +1482,9 @@ const Ds = {
|
|
|
1483
1482
|
header: () => o("auditLog.columns.subject"),
|
|
1484
1483
|
cell(e) {
|
|
1485
1484
|
const s = e.row.original;
|
|
1486
|
-
return
|
|
1485
|
+
return oe(s) ? y("span", {
|
|
1487
1486
|
class: "text-fm-color-typo-secondary"
|
|
1488
|
-
}, [o("auditLog.operation.rowHint")]) :
|
|
1487
|
+
}, [o("auditLog.operation.rowHint")]) : We(s.subject) ?? s.subject;
|
|
1489
1488
|
}
|
|
1490
1489
|
}, {
|
|
1491
1490
|
accessorKey: "action",
|
|
@@ -1496,41 +1495,41 @@ const Ds = {
|
|
|
1496
1495
|
cellSpanClass: "audit-log-action-label"
|
|
1497
1496
|
},
|
|
1498
1497
|
cell(e) {
|
|
1499
|
-
var
|
|
1498
|
+
var U;
|
|
1500
1499
|
const s = e.row.original;
|
|
1501
|
-
if (
|
|
1502
|
-
return
|
|
1500
|
+
if (oe(s))
|
|
1501
|
+
return y("span", {
|
|
1503
1502
|
class: "audit-op-marker flex flex-wrap items-baseline gap-4"
|
|
1504
|
-
}, [
|
|
1503
|
+
}, [y("span", {
|
|
1505
1504
|
class: "text-fm-color-typo-secondary"
|
|
1506
|
-
}, [ye("↳")]),
|
|
1505
|
+
}, [ye("↳")]), y("span", {
|
|
1507
1506
|
class: "font-semibold"
|
|
1508
|
-
}, [Lt(s)]), s.entityId ?
|
|
1507
|
+
}, [Lt(s)]), s.entityId ? y("span", {
|
|
1509
1508
|
class: "text-fm-color-typo-secondary"
|
|
1510
|
-
}, [ye("· "), s.entityId]) : null, s.status === "failed" && s.errorMessage ?
|
|
1509
|
+
}, [ye("· "), s.entityId]) : null, s.status === "failed" && s.errorMessage ? y("span", {
|
|
1511
1510
|
class: "text-fm-color-typo-error"
|
|
1512
1511
|
}, [ye("· "), s.errorMessage]) : null]);
|
|
1513
|
-
const
|
|
1514
|
-
|
|
1512
|
+
const m = ((U = s.operations) == null ? void 0 : U.length) ?? 0, x = (se) => {
|
|
1513
|
+
se.stopPropagation(), e.row.getToggleExpandedHandler()();
|
|
1515
1514
|
}, k = {
|
|
1516
1515
|
variant: "tertiary",
|
|
1517
1516
|
icon: e.row.getIsExpanded() ? "keyboard_arrow_up" : "keyboard_arrow_down",
|
|
1518
1517
|
"aria-label": o("auditLog.operation.toggle"),
|
|
1519
1518
|
class: "ml-auto shrink-0",
|
|
1520
|
-
onClick:
|
|
1521
|
-
},
|
|
1522
|
-
return
|
|
1519
|
+
onClick: x
|
|
1520
|
+
}, T = ve.FmButton;
|
|
1521
|
+
return y("span", {
|
|
1523
1522
|
class: "flex items-center gap-8"
|
|
1524
|
-
}, [
|
|
1523
|
+
}, [y("span", null, [xt(s)]), m > 0 ? y("span", {
|
|
1525
1524
|
class: "cursor-pointer",
|
|
1526
|
-
onClick:
|
|
1527
|
-
}, [
|
|
1525
|
+
onClick: x
|
|
1526
|
+
}, [y(ve.FmChip, {
|
|
1528
1527
|
variant: "neutral",
|
|
1529
1528
|
compact: !0,
|
|
1530
1529
|
label: o("auditLog.operation.badge", {
|
|
1531
|
-
count:
|
|
1530
|
+
count: m
|
|
1532
1531
|
})
|
|
1533
|
-
}, null)]) : null, e.row.getCanExpand() ?
|
|
1532
|
+
}, null)]) : null, e.row.getCanExpand() ? y(T, k, null) : null]);
|
|
1534
1533
|
}
|
|
1535
1534
|
}, {
|
|
1536
1535
|
accessorKey: "outcome",
|
|
@@ -1538,22 +1537,22 @@ const Ds = {
|
|
|
1538
1537
|
enableSorting: !1,
|
|
1539
1538
|
cell(e) {
|
|
1540
1539
|
const s = e.row.original;
|
|
1541
|
-
return
|
|
1540
|
+
return oe(s) ? y(ve.FmChip, {
|
|
1542
1541
|
variant: s.status === "failed" ? "critical" : "success",
|
|
1543
1542
|
label: s.status === "failed" ? o("auditLog.outcome.failed") : o("auditLog.outcome.success"),
|
|
1544
1543
|
compact: !0
|
|
1545
|
-
}, null) :
|
|
1544
|
+
}, null) : y("span", {
|
|
1546
1545
|
class: "flex items-center gap-4"
|
|
1547
|
-
}, [
|
|
1546
|
+
}, [y(ve.FmChip, {
|
|
1548
1547
|
variant: kt(s.outcome),
|
|
1549
|
-
label:
|
|
1548
|
+
label: Xe(s.outcome),
|
|
1550
1549
|
compact: !0
|
|
1551
|
-
}, null),
|
|
1550
|
+
}, null), bo(s)]);
|
|
1552
1551
|
}
|
|
1553
|
-
}],
|
|
1554
|
-
|
|
1552
|
+
}], Lo = [
|
|
1553
|
+
we[0],
|
|
1555
1554
|
// timestamp: Date
|
|
1556
|
-
|
|
1555
|
+
we.find((e) => e.accessorKey === "userId"),
|
|
1557
1556
|
// User: getUserName -> posActorLabel for posUser rows
|
|
1558
1557
|
{
|
|
1559
1558
|
accessorKey: "restaurantId",
|
|
@@ -1561,7 +1560,7 @@ const Ds = {
|
|
|
1561
1560
|
enableSorting: !1,
|
|
1562
1561
|
cell(e) {
|
|
1563
1562
|
const s = e.row.original;
|
|
1564
|
-
return
|
|
1563
|
+
return oe(s) ? null : s.restaurantId && Gt.value[s.restaurantId] || s.restaurantId || "-";
|
|
1565
1564
|
}
|
|
1566
1565
|
},
|
|
1567
1566
|
{
|
|
@@ -1570,7 +1569,7 @@ const Ds = {
|
|
|
1570
1569
|
enableSorting: !1,
|
|
1571
1570
|
cell(e) {
|
|
1572
1571
|
const s = e.row.original;
|
|
1573
|
-
return
|
|
1572
|
+
return oe(s) ? null : lt(s, o);
|
|
1574
1573
|
}
|
|
1575
1574
|
},
|
|
1576
1575
|
{
|
|
@@ -1579,60 +1578,60 @@ const Ds = {
|
|
|
1579
1578
|
enableSorting: !1,
|
|
1580
1579
|
cell(e) {
|
|
1581
1580
|
const s = e.row.original;
|
|
1582
|
-
return
|
|
1581
|
+
return oe(s) ? null : jt(s, o);
|
|
1583
1582
|
}
|
|
1584
1583
|
},
|
|
1585
|
-
|
|
1584
|
+
we.find((e) => e.accessorKey === "action"),
|
|
1586
1585
|
// Action Description: event line
|
|
1587
|
-
|
|
1586
|
+
we.find((e) => e.accessorKey === "outcome")
|
|
1588
1587
|
// Status
|
|
1589
|
-
],
|
|
1588
|
+
], ko = A(() => q.value ? Lo : we);
|
|
1590
1589
|
function de(e) {
|
|
1591
|
-
const s =
|
|
1590
|
+
const s = P(e, el);
|
|
1592
1591
|
return new Date(s.year(), s.month(), s.date(), s.hour(), s.minute(), 0).toISOString().slice(0, 19).replace("T", " ");
|
|
1593
1592
|
}
|
|
1594
1593
|
async function wt() {
|
|
1595
|
-
var e, s,
|
|
1596
|
-
|
|
1594
|
+
var e, s, m;
|
|
1595
|
+
w.value = !0;
|
|
1597
1596
|
try {
|
|
1598
1597
|
const {
|
|
1599
|
-
startDate:
|
|
1598
|
+
startDate: x,
|
|
1600
1599
|
endDate: k
|
|
1601
|
-
} =
|
|
1602
|
-
limit:
|
|
1603
|
-
offset:
|
|
1604
|
-
...
|
|
1605
|
-
from: de(
|
|
1600
|
+
} = ne.value, T = (Pe.value - 1) * Oe, U = $e.value.subjectPrefixes, se = await Ce.read({
|
|
1601
|
+
limit: Oe,
|
|
1602
|
+
offset: T,
|
|
1603
|
+
...x ? {
|
|
1604
|
+
from: de(x)
|
|
1606
1605
|
} : {},
|
|
1607
1606
|
...k ? {
|
|
1608
1607
|
to: de(k)
|
|
1609
1608
|
} : {},
|
|
1610
|
-
...
|
|
1611
|
-
userIds:
|
|
1609
|
+
...ue.value.userIds.length ? {
|
|
1610
|
+
userIds: ue.value.userIds
|
|
1612
1611
|
} : {},
|
|
1613
|
-
...
|
|
1612
|
+
...ue.value.feedmeAdminActors ? {
|
|
1614
1613
|
feedmeAdminActors: !0
|
|
1615
1614
|
} : {},
|
|
1616
|
-
...(e =
|
|
1617
|
-
subjects:
|
|
1615
|
+
...(e = Z.value) != null && e.length ? {
|
|
1616
|
+
subjects: Z.value
|
|
1618
1617
|
} : {},
|
|
1619
|
-
...
|
|
1620
|
-
subjectPrefixes: [...
|
|
1618
|
+
...U.length ? {
|
|
1619
|
+
subjectPrefixes: [...U]
|
|
1621
1620
|
} : {},
|
|
1622
1621
|
...pe.value.length ? {
|
|
1623
1622
|
sources: [...pe.value]
|
|
1624
1623
|
} : {},
|
|
1625
|
-
...q.value &&
|
|
1626
|
-
restaurantIds: [...
|
|
1624
|
+
...q.value && ee.value.length ? {
|
|
1625
|
+
restaurantIds: [...ee.value]
|
|
1627
1626
|
} : {},
|
|
1628
|
-
...(s =
|
|
1629
|
-
actions:
|
|
1627
|
+
...(s = re.value) != null && s.length ? {
|
|
1628
|
+
actions: re.value
|
|
1630
1629
|
} : {},
|
|
1631
|
-
...(
|
|
1632
|
-
outcomes:
|
|
1630
|
+
...(m = le.value) != null && m.length ? {
|
|
1631
|
+
outcomes: He(le.value)
|
|
1633
1632
|
} : {},
|
|
1634
|
-
...
|
|
1635
|
-
search:
|
|
1633
|
+
...te.value ? {
|
|
1634
|
+
search: te.value
|
|
1636
1635
|
} : {},
|
|
1637
1636
|
...me.value.length ? {
|
|
1638
1637
|
searchUserIds: me.value
|
|
@@ -1641,68 +1640,65 @@ const Ds = {
|
|
|
1641
1640
|
searchSubjects: ge.value
|
|
1642
1641
|
} : {}
|
|
1643
1642
|
});
|
|
1644
|
-
O.value =
|
|
1643
|
+
O.value = se, Bt.value = se.length === Oe, L.value = {};
|
|
1645
1644
|
} finally {
|
|
1646
|
-
|
|
1645
|
+
w.value = !1;
|
|
1647
1646
|
}
|
|
1648
1647
|
}
|
|
1649
|
-
const It = A(() => {
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
});
|
|
1667
|
-
async function Lo() {
|
|
1668
|
-
var L, k, C;
|
|
1648
|
+
const It = A(() => JSON.stringify({
|
|
1649
|
+
businessId: c.id.value ?? "",
|
|
1650
|
+
dateRange: ne.value,
|
|
1651
|
+
users: [...fe.value ?? []].sort(),
|
|
1652
|
+
subjects: [...Z.value ?? []].sort(),
|
|
1653
|
+
outcomes: [...le.value ?? []].sort(),
|
|
1654
|
+
actions: [...re.value ?? []].sort(),
|
|
1655
|
+
moduleKey: ie.value,
|
|
1656
|
+
restaurantIds: [...ee.value].sort(),
|
|
1657
|
+
search: te.value,
|
|
1658
|
+
// Member/feedme-admin-actor lists resolve asynchronously (and actors refetch on
|
|
1659
|
+
// every date-range change), so searchUserIds can change after the key above is
|
|
1660
|
+
// computed — include it explicitly or a late-arriving match never refetches.
|
|
1661
|
+
searchUserIds: [...me.value].sort()
|
|
1662
|
+
}));
|
|
1663
|
+
async function So() {
|
|
1664
|
+
var x, k, T;
|
|
1669
1665
|
const {
|
|
1670
1666
|
startDate: e,
|
|
1671
1667
|
endDate: s
|
|
1672
|
-
} =
|
|
1673
|
-
|
|
1668
|
+
} = ne.value, m = $e.value.subjectPrefixes;
|
|
1669
|
+
Be.value = await Ce.count({
|
|
1674
1670
|
...e ? {
|
|
1675
1671
|
from: de(e)
|
|
1676
1672
|
} : {},
|
|
1677
1673
|
...s ? {
|
|
1678
1674
|
to: de(s)
|
|
1679
1675
|
} : {},
|
|
1680
|
-
...
|
|
1681
|
-
userIds:
|
|
1676
|
+
...ue.value.userIds.length ? {
|
|
1677
|
+
userIds: ue.value.userIds
|
|
1682
1678
|
} : {},
|
|
1683
|
-
...
|
|
1679
|
+
...ue.value.feedmeAdminActors ? {
|
|
1684
1680
|
feedmeAdminActors: !0
|
|
1685
1681
|
} : {},
|
|
1686
|
-
...(
|
|
1687
|
-
subjects:
|
|
1682
|
+
...(x = Z.value) != null && x.length ? {
|
|
1683
|
+
subjects: Z.value
|
|
1688
1684
|
} : {},
|
|
1689
|
-
...
|
|
1690
|
-
subjectPrefixes: [...
|
|
1685
|
+
...m.length ? {
|
|
1686
|
+
subjectPrefixes: [...m]
|
|
1691
1687
|
} : {},
|
|
1692
1688
|
...pe.value.length ? {
|
|
1693
1689
|
sources: [...pe.value]
|
|
1694
1690
|
} : {},
|
|
1695
|
-
...q.value &&
|
|
1696
|
-
restaurantIds: [...
|
|
1691
|
+
...q.value && ee.value.length ? {
|
|
1692
|
+
restaurantIds: [...ee.value]
|
|
1697
1693
|
} : {},
|
|
1698
|
-
...(k =
|
|
1699
|
-
actions:
|
|
1694
|
+
...(k = re.value) != null && k.length ? {
|
|
1695
|
+
actions: re.value
|
|
1700
1696
|
} : {},
|
|
1701
|
-
...(
|
|
1702
|
-
outcomes:
|
|
1697
|
+
...(T = le.value) != null && T.length ? {
|
|
1698
|
+
outcomes: He(le.value)
|
|
1703
1699
|
} : {},
|
|
1704
|
-
...
|
|
1705
|
-
search:
|
|
1700
|
+
...te.value ? {
|
|
1701
|
+
search: te.value
|
|
1706
1702
|
} : {},
|
|
1707
1703
|
...me.value.length ? {
|
|
1708
1704
|
searchUserIds: me.value
|
|
@@ -1712,67 +1708,64 @@ const Ds = {
|
|
|
1712
1708
|
} : {}
|
|
1713
1709
|
});
|
|
1714
1710
|
}
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
Pe.value = 1, (e = r.currentBusiness.value) != null && e._id && await Promise.all([Lo(), wt()]);
|
|
1711
|
+
ae(It, async () => {
|
|
1712
|
+
Pe.value = 1, c.id.value && await Promise.all([So(), wt()]);
|
|
1718
1713
|
}, {
|
|
1719
1714
|
immediate: !0
|
|
1720
|
-
}),
|
|
1721
|
-
|
|
1715
|
+
}), ae(ie, () => {
|
|
1716
|
+
Z.value = void 0, q.value && (fe.value = void 0);
|
|
1722
1717
|
});
|
|
1723
|
-
let
|
|
1724
|
-
async function
|
|
1718
|
+
let Ze = !1;
|
|
1719
|
+
async function wo({
|
|
1725
1720
|
pageIndex: e
|
|
1726
1721
|
}) {
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
et = !0, Pe.value = e + 1;
|
|
1722
|
+
if (c.id.value && !(e === 0 && Pe.value === 1) && !Ze) {
|
|
1723
|
+
Ze = !0, Pe.value = e + 1;
|
|
1730
1724
|
try {
|
|
1731
1725
|
await wt();
|
|
1732
1726
|
} finally {
|
|
1733
|
-
|
|
1727
|
+
Ze = !1;
|
|
1734
1728
|
}
|
|
1735
1729
|
}
|
|
1736
1730
|
}
|
|
1737
|
-
function
|
|
1738
|
-
if (
|
|
1739
|
-
|
|
1731
|
+
function Io(e) {
|
|
1732
|
+
if (oe(e)) {
|
|
1733
|
+
Fo(e);
|
|
1740
1734
|
return;
|
|
1741
1735
|
}
|
|
1742
|
-
i.value = e,
|
|
1736
|
+
i.value = e, V.value = !0, Zt(e);
|
|
1743
1737
|
}
|
|
1744
|
-
function
|
|
1745
|
-
|
|
1738
|
+
function Ao() {
|
|
1739
|
+
V.value = !1, i.value = null, eo();
|
|
1746
1740
|
}
|
|
1747
|
-
function
|
|
1748
|
-
|
|
1741
|
+
function Fo(e) {
|
|
1742
|
+
f.value = e, M.value = !0;
|
|
1749
1743
|
}
|
|
1750
|
-
function
|
|
1751
|
-
|
|
1744
|
+
function Mo() {
|
|
1745
|
+
M.value = !1, f.value = null;
|
|
1752
1746
|
}
|
|
1753
|
-
|
|
1747
|
+
ae(c.id, (e) => {
|
|
1754
1748
|
e && d.readTeamMembers();
|
|
1755
1749
|
}, {
|
|
1756
1750
|
immediate: !0
|
|
1757
1751
|
});
|
|
1758
|
-
function
|
|
1752
|
+
function Do() {
|
|
1759
1753
|
const e = fe.value;
|
|
1760
1754
|
if (!(e != null && e.length)) return;
|
|
1761
|
-
const s = new Set(
|
|
1762
|
-
|
|
1755
|
+
const s = new Set(ke.value.map((k) => k.userId)), m = new Set(d.members.map((k) => k.doc.userId)), x = e.filter((k) => k === it ? Ee.value : d.hasLoaded ? m.has(k) || s.has(k) : !0);
|
|
1756
|
+
x.length !== e.length && (fe.value = x.length ? x : void 0);
|
|
1763
1757
|
}
|
|
1764
|
-
async function
|
|
1765
|
-
|
|
1766
|
-
if (!((c = r.currentBusiness.value) != null && c._id)) return;
|
|
1758
|
+
async function Oo() {
|
|
1759
|
+
if (!c.id.value) return;
|
|
1767
1760
|
const {
|
|
1768
1761
|
startDate: e,
|
|
1769
1762
|
endDate: s
|
|
1770
|
-
} =
|
|
1763
|
+
} = ne.value;
|
|
1771
1764
|
try {
|
|
1772
1765
|
const {
|
|
1773
|
-
actors:
|
|
1774
|
-
showFeedmeAdminFilter:
|
|
1775
|
-
} = await
|
|
1766
|
+
actors: m,
|
|
1767
|
+
showFeedmeAdminFilter: x
|
|
1768
|
+
} = await Ce.getFeedmeAdminFilter({
|
|
1776
1769
|
...e ? {
|
|
1777
1770
|
from: de(e)
|
|
1778
1771
|
} : {},
|
|
@@ -1780,252 +1773,249 @@ const Ds = {
|
|
|
1780
1773
|
to: de(s)
|
|
1781
1774
|
} : {}
|
|
1782
1775
|
});
|
|
1783
|
-
|
|
1776
|
+
ke.value = m, Ee.value = x;
|
|
1784
1777
|
} catch {
|
|
1785
|
-
|
|
1778
|
+
ke.value = [], Ee.value = !1;
|
|
1786
1779
|
}
|
|
1787
|
-
|
|
1780
|
+
Do();
|
|
1788
1781
|
}
|
|
1789
|
-
return
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
range: se.value
|
|
1794
|
-
};
|
|
1795
|
-
}, () => Mo(), {
|
|
1782
|
+
return ae(() => ({
|
|
1783
|
+
businessId: c.id.value,
|
|
1784
|
+
range: ne.value
|
|
1785
|
+
}), () => Oo(), {
|
|
1796
1786
|
immediate: !0,
|
|
1797
1787
|
deep: !0
|
|
1798
1788
|
}), (e, s) => {
|
|
1799
|
-
const
|
|
1800
|
-
return
|
|
1789
|
+
const m = R("FmSpacer"), x = R("FmButton"), k = R("FmMenuItem"), T = R("FmMenu"), U = R("FmChip"), se = R("FmDateRangePicker"), et = R("FmSearch"), tt = R("FmTable"), Ie = R("FmIcon"), Ne = R("FmTooltip"), Ae = R("FmSideSheet");
|
|
1790
|
+
return v(), g(z, null, [y(Zo, {
|
|
1801
1791
|
heading: u(o)("auditLog.title")
|
|
1802
1792
|
}, {
|
|
1803
|
-
"append-heading":
|
|
1793
|
+
"append-heading": B(() => [y(m), y(x, {
|
|
1804
1794
|
variant: "primary",
|
|
1805
1795
|
"prepend-icon": "upload",
|
|
1806
1796
|
label: u(o)("auditLog.export"),
|
|
1807
|
-
disabled: O.value.length === 0 ||
|
|
1808
|
-
loading:
|
|
1809
|
-
onClick:
|
|
1810
|
-
}, null, 8, ["label", "disabled", "loading"]),
|
|
1797
|
+
disabled: O.value.length === 0 || D.value || u(d).isLoading || u(d).members.length === 0,
|
|
1798
|
+
loading: D.value,
|
|
1799
|
+
onClick: yo
|
|
1800
|
+
}, null, 8, ["label", "disabled", "loading"]), y(T, {
|
|
1811
1801
|
"close-on-click": !1,
|
|
1812
1802
|
"z-index": 50
|
|
1813
1803
|
}, {
|
|
1814
|
-
"menu-button":
|
|
1804
|
+
"menu-button": B(() => [y(x, {
|
|
1815
1805
|
variant: "tertiary",
|
|
1816
1806
|
icon: "settings",
|
|
1817
1807
|
"aria-label": u(o)("auditLog.exportSettings.title"),
|
|
1818
|
-
disabled:
|
|
1808
|
+
disabled: D.value
|
|
1819
1809
|
}, null, 8, ["aria-label", "disabled"])]),
|
|
1820
|
-
default:
|
|
1821
|
-
key:
|
|
1822
|
-
label: u(o)(
|
|
1810
|
+
default: B(() => [a("div", Os, [a("p", Cs, l(u(o)("auditLog.exportSettings.title")), 1), (v(), g(z, null, ce(Qe, (h) => y(k, {
|
|
1811
|
+
key: h.key,
|
|
1812
|
+
label: u(o)(h.labelKey),
|
|
1823
1813
|
"has-checkbox": "",
|
|
1824
|
-
"model-value": he.value.has(
|
|
1825
|
-
disabled: he.value.has(
|
|
1826
|
-
onClick: (
|
|
1814
|
+
"model-value": he.value.has(h.key),
|
|
1815
|
+
disabled: he.value.has(h.key) && he.value.size === 1,
|
|
1816
|
+
onClick: ($) => ho(h.key)
|
|
1827
1817
|
}, null, 8, ["label", "model-value", "disabled", "onClick"])), 64))])]),
|
|
1828
1818
|
_: 1
|
|
1829
1819
|
})]),
|
|
1830
|
-
default:
|
|
1831
|
-
modelValue:
|
|
1832
|
-
"onUpdate:modelValue": s[0] || (s[0] = (
|
|
1833
|
-
items:
|
|
1834
|
-
}, null, 8, ["modelValue", "items"]), a("div",
|
|
1835
|
-
modelValue:
|
|
1836
|
-
"onUpdate:modelValue": s[1] || (s[1] = (
|
|
1820
|
+
default: B(() => [a("div", Ts, [a("div", js, [y(fs, {
|
|
1821
|
+
modelValue: ie.value,
|
|
1822
|
+
"onUpdate:modelValue": s[0] || (s[0] = (h) => ie.value = h),
|
|
1823
|
+
items: Jt.value
|
|
1824
|
+
}, null, 8, ["modelValue", "items"]), a("div", Ps, [y(se, {
|
|
1825
|
+
modelValue: ne.value,
|
|
1826
|
+
"onUpdate:modelValue": s[1] || (s[1] = (h) => ne.value = h),
|
|
1837
1827
|
"show-predefined-range": "",
|
|
1838
1828
|
"show-time": "",
|
|
1839
|
-
"predefined-range":
|
|
1829
|
+
"predefined-range": co.value
|
|
1840
1830
|
}, {
|
|
1841
|
-
"trigger-button":
|
|
1842
|
-
label:
|
|
1831
|
+
"trigger-button": B(() => [y(U, {
|
|
1832
|
+
label: uo.value,
|
|
1843
1833
|
icon: "calendar_month"
|
|
1844
1834
|
}, null, 8, ["label"])]),
|
|
1845
1835
|
_: 1
|
|
1846
|
-
}, 8, ["modelValue", "predefined-range"]), q.value ?
|
|
1836
|
+
}, 8, ["modelValue", "predefined-range"]), q.value ? F("", !0) : (v(), g("div", Vs, [y(Me, {
|
|
1847
1837
|
modelValue: fe.value,
|
|
1848
|
-
"onUpdate:modelValue": s[2] || (s[2] = (
|
|
1849
|
-
items:
|
|
1838
|
+
"onUpdate:modelValue": s[2] || (s[2] = (h) => fe.value = h),
|
|
1839
|
+
items: Xt.value,
|
|
1850
1840
|
multiple: "",
|
|
1851
1841
|
variant: "dark",
|
|
1852
1842
|
placeholder: u(o)("auditLog.filter.user_placeholder"),
|
|
1853
1843
|
"selected-prefix": u(o)("auditLog.filter.selected_user_prefix"),
|
|
1854
1844
|
"chip-icon": "account_circle"
|
|
1855
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])), q.value ?
|
|
1856
|
-
modelValue:
|
|
1857
|
-
"onUpdate:modelValue": s[3] || (s[3] = (
|
|
1858
|
-
items:
|
|
1859
|
-
"filter-fn":
|
|
1845
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])), q.value ? F("", !0) : (v(), g("div", $s, [y(Me, {
|
|
1846
|
+
modelValue: Z.value,
|
|
1847
|
+
"onUpdate:modelValue": s[3] || (s[3] = (h) => Z.value = h),
|
|
1848
|
+
items: oo.value,
|
|
1849
|
+
"filter-fn": so,
|
|
1860
1850
|
multiple: "",
|
|
1861
1851
|
variant: "dark",
|
|
1862
1852
|
placeholder: u(o)("auditLog.filter.subject_placeholder"),
|
|
1863
1853
|
"selected-prefix": u(o)("auditLog.filter.selected_subject_prefix"),
|
|
1864
1854
|
"chip-icon": "badge"
|
|
1865
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])), a("div",
|
|
1866
|
-
modelValue:
|
|
1867
|
-
"onUpdate:modelValue": s[4] || (s[4] = (
|
|
1868
|
-
items:
|
|
1855
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])), a("div", Es, [y(Me, {
|
|
1856
|
+
modelValue: re.value,
|
|
1857
|
+
"onUpdate:modelValue": s[4] || (s[4] = (h) => re.value = h),
|
|
1858
|
+
items: ao.value,
|
|
1869
1859
|
multiple: "",
|
|
1870
1860
|
variant: "dark",
|
|
1871
1861
|
placeholder: u(o)("auditLog.filter.action_placeholder"),
|
|
1872
1862
|
"selected-prefix": u(o)("auditLog.filter.selected_action_prefix"),
|
|
1873
1863
|
searchable: !1
|
|
1874
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div",
|
|
1875
|
-
modelValue:
|
|
1876
|
-
"onUpdate:modelValue": s[5] || (s[5] = (
|
|
1877
|
-
items:
|
|
1864
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div", Rs, [y(Me, {
|
|
1865
|
+
modelValue: le.value,
|
|
1866
|
+
"onUpdate:modelValue": s[5] || (s[5] = (h) => le.value = h),
|
|
1867
|
+
items: no.value,
|
|
1878
1868
|
multiple: "",
|
|
1879
1869
|
variant: "dark",
|
|
1880
1870
|
placeholder: u(o)("auditLog.filter.status_placeholder"),
|
|
1881
1871
|
"selected-prefix": u(o)("auditLog.filter.selected_status_prefix"),
|
|
1882
1872
|
searchable: !1,
|
|
1883
1873
|
"chip-icon": "check_circle"
|
|
1884
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), q.value ? (
|
|
1885
|
-
modelValue:
|
|
1886
|
-
"onUpdate:modelValue": s[6] || (s[6] = (
|
|
1887
|
-
items:
|
|
1874
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), q.value ? (v(), g("div", Us, [y(Me, {
|
|
1875
|
+
modelValue: ee.value,
|
|
1876
|
+
"onUpdate:modelValue": s[6] || (s[6] = (h) => ee.value = h),
|
|
1877
|
+
items: Wt.value,
|
|
1888
1878
|
multiple: "",
|
|
1889
1879
|
variant: "dark",
|
|
1890
1880
|
placeholder: u(o)("auditLog.filter.restaurant_placeholder"),
|
|
1891
1881
|
"selected-prefix": u(o)("auditLog.filter.selected_restaurant_prefix"),
|
|
1892
1882
|
"chip-icon": "storefront"
|
|
1893
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])) :
|
|
1894
|
-
modelValue:
|
|
1895
|
-
"onUpdate:modelValue": s[7] || (s[7] = (
|
|
1883
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])) : F("", !0), y(et, {
|
|
1884
|
+
modelValue: ze.value,
|
|
1885
|
+
"onUpdate:modelValue": s[7] || (s[7] = (h) => ze.value = h),
|
|
1896
1886
|
class: "ml-auto w-[280px]",
|
|
1897
1887
|
placeholder: u(o)("auditLog.search.placeholder")
|
|
1898
|
-
}, null, 8, ["modelValue", "placeholder"])])]),
|
|
1899
|
-
default:
|
|
1900
|
-
"is-loading":
|
|
1888
|
+
}, null, 8, ["modelValue", "placeholder"])])]), y(Go, null, {
|
|
1889
|
+
default: B(() => [a("div", Ns, [y(es, {
|
|
1890
|
+
"is-loading": w.value,
|
|
1901
1891
|
"is-empty": O.value.length === 0,
|
|
1902
1892
|
title: u(o)("auditLog.noData.title"),
|
|
1903
1893
|
subtitle: u(o)("auditLog.noData.subtitle")
|
|
1904
1894
|
}, {
|
|
1905
|
-
default:
|
|
1895
|
+
default: B(() => [(v(), Te(tt, {
|
|
1906
1896
|
key: It.value,
|
|
1907
|
-
"column-defs":
|
|
1897
|
+
"column-defs": ko.value,
|
|
1908
1898
|
"row-data": O.value,
|
|
1909
|
-
"page-size":
|
|
1899
|
+
"page-size": Oe,
|
|
1910
1900
|
"page-count": mt.value,
|
|
1911
|
-
"row-count":
|
|
1912
|
-
"fetch-fn":
|
|
1901
|
+
"row-count": Be.value,
|
|
1902
|
+
"fetch-fn": wo,
|
|
1913
1903
|
"hide-footer": mt.value <= 1,
|
|
1914
|
-
loading:
|
|
1915
|
-
"expanded-state":
|
|
1916
|
-
"get-row-can-expand":
|
|
1917
|
-
"get-sub-row":
|
|
1904
|
+
loading: w.value,
|
|
1905
|
+
"expanded-state": L.value,
|
|
1906
|
+
"get-row-can-expand": _o,
|
|
1907
|
+
"get-sub-row": xo,
|
|
1918
1908
|
"pin-header-row": "",
|
|
1919
1909
|
class: "audit-log-list-table cursor-pointer",
|
|
1920
|
-
"onUpdate:expandedState": s[8] || (s[8] = (
|
|
1921
|
-
onRowClick: s[9] || (s[9] = (
|
|
1910
|
+
"onUpdate:expandedState": s[8] || (s[8] = (h) => L.value = h),
|
|
1911
|
+
onRowClick: s[9] || (s[9] = (h) => Io(h.original))
|
|
1922
1912
|
}, null, 8, ["column-defs", "row-data", "page-count", "row-count", "hide-footer", "loading", "expanded-state"]))]),
|
|
1923
1913
|
_: 1
|
|
1924
1914
|
}, 8, ["is-loading", "is-empty", "title", "subtitle"])])]),
|
|
1925
1915
|
_: 1
|
|
1926
1916
|
})])]),
|
|
1927
1917
|
_: 1
|
|
1928
|
-
}, 8, ["heading"]),
|
|
1918
|
+
}, 8, ["heading"]), y(Ae, {
|
|
1929
1919
|
header: u(o)("auditLog.detail.header"),
|
|
1930
|
-
"model-value":
|
|
1920
|
+
"model-value": V.value,
|
|
1931
1921
|
"max-width": 768,
|
|
1932
1922
|
"dismiss-away": "",
|
|
1933
|
-
"onUpdate:modelValue": s[10] || (s[10] = (
|
|
1934
|
-
|
|
1923
|
+
"onUpdate:modelValue": s[10] || (s[10] = (h) => {
|
|
1924
|
+
h || Ao();
|
|
1935
1925
|
})
|
|
1936
1926
|
}, {
|
|
1937
|
-
default:
|
|
1927
|
+
default: B(() => [i.value ? (v(), g("div", Ks, [a("div", Ys, [a("div", Bs, [a("p", zs, l(mo(i.value)), 1), i.value.traceId ? (v(), g("p", qs, [ye(" Trace ID: " + l(i.value.traceId) + " ", 1), y(x, {
|
|
1938
1928
|
variant: "tertiary",
|
|
1939
1929
|
icon: "link",
|
|
1940
1930
|
class: "ml-4 align-middle",
|
|
1941
1931
|
"aria-label": u(o)("auditLog.detail.copyLink"),
|
|
1942
|
-
onClick: u(
|
|
1943
|
-
}, null, 8, ["aria-label", "onClick"])])) :
|
|
1932
|
+
onClick: u(to)
|
|
1933
|
+
}, null, 8, ["aria-label", "onClick"])])) : F("", !0), i.value.eventId ? (v(), g("p", Js, " Event ID: " + l(i.value.eventId), 1)) : F("", !0)]), a("div", Hs, [y(U, {
|
|
1944
1934
|
variant: kt(i.value.outcome),
|
|
1945
|
-
label:
|
|
1935
|
+
label: Xe(i.value.outcome),
|
|
1946
1936
|
compact: ""
|
|
1947
|
-
}, null, 8, ["variant", "label"]), u(
|
|
1937
|
+
}, null, 8, ["variant", "label"]), u(Tt)(i.value) ? (v(), Te(Ne, {
|
|
1948
1938
|
key: 0,
|
|
1949
1939
|
variant: "plain",
|
|
1950
1940
|
placement: "top"
|
|
1951
1941
|
}, {
|
|
1952
|
-
content:
|
|
1953
|
-
default:
|
|
1942
|
+
content: B(() => [ye(l(u(o)("auditLog.operation.partialFailure")), 1)]),
|
|
1943
|
+
default: B(() => [y(Ie, {
|
|
1954
1944
|
name: "error",
|
|
1955
1945
|
size: "sm",
|
|
1956
1946
|
class: "cursor-help text-fm-color-typo-error"
|
|
1957
1947
|
})]),
|
|
1958
1948
|
_: 1
|
|
1959
|
-
})) :
|
|
1949
|
+
})) : F("", !0)])]), a("div", Ws, [a("div", Gs, [a("div", null, [a("p", Xs, l(u(o)("auditLog.detail.date")), 1), a("p", Qs, l(Ge(i.value.timestamp)), 1)]), a("div", null, [a("p", Zs, l(u(o)("auditLog.detail.user")), 1), a("p", ea, l(Se(i.value)), 1)]), a("div", null, [a("p", ta, l(u(o)("auditLog.detail.email")), 1), a("p", oa, l(fo(i.value)), 1)]), i.value.field ? (v(), g("div", sa, [a("p", aa, l(u(o)("auditLog.detail.field")), 1), a("p", na, l(i.value.field), 1)])) : F("", !0), a("div", null, [a("p", la, l(u(o)("auditLog.detail.business")), 1), a("p", ra, l(i.value.businessId || "-"), 1)]), a("div", null, [a("p", ia, l(u(o)("auditLog.detail.restaurant")), 1), a("p", ua, l(i.value.restaurantId || "-"), 1)])])]), a("div", da, [a("div", ca, [a("p", fa, l(u(o)("auditLog.detail.eventDetails")), 1)]), s[13] || (s[13] = a("hr", {
|
|
1960
1950
|
class: "border-fm-color-border-default"
|
|
1961
|
-
}, null, -1)), a("div",
|
|
1951
|
+
}, null, -1)), a("div", ma, [a("div", null, [a("p", va, l(u(o)("auditLog.detail.actionDescription")), 1), a("p", pa, l(i.value.metadata.operationLabel || "-"), 1)])])]), a("div", ga, [a("div", ha, [a("p", ya, l(u(o)("auditLog.detail.metadata")), 1)]), s[14] || (s[14] = a("hr", {
|
|
1962
1952
|
class: "border-fm-color-border-default"
|
|
1963
|
-
}, null, -1)), a("div",
|
|
1953
|
+
}, null, -1)), a("div", ba, [a("div", null, [a("p", _a, l(u(o)("auditLog.detail.resolvedFrom")), 1), a("p", xa, l(vo(i.value.metadata.resolvedFrom)), 1)]), (i.value.metadata.resolvedFrom === "permissionSet" || i.value.metadata.resolvedFrom === "systemPermissionSet") && (i.value.metadata.permissionSetName || i.value.metadata.permissionSetId) ? (v(), g("div", La, [a("p", ka, l(u(o)("auditLog.detail.permissionSet")), 1), i.value.metadata.permissionSetName ? (v(), g("p", Sa, l(i.value.metadata.permissionSetName), 1)) : F("", !0), i.value.metadata.permissionSetId ? (v(), g("p", wa, l(i.value.metadata.permissionSetId), 1)) : F("", !0)])) : F("", !0), i.value.metadata.reason ? (v(), g("div", Ia, [a("p", Aa, l(u(o)("auditLog.detail.reason")), 1), a("p", Fa, l(i.value.metadata.reason), 1)])) : F("", !0), a("div", null, [a("p", Ma, l(u(o)("auditLog.detail.requestMethod")), 1), a("p", Da, l(po(i.value)), 1)]), a("div", null, [a("p", Oa, l(u(o)("auditLog.detail.requestPath")), 1), a("p", Ca, l(i.value.metadata.requestPath || "-"), 1)]), i.value.metadata.pos ? (v(), g(z, {
|
|
1964
1954
|
key: 2
|
|
1965
|
-
}, [a("div", null, [a("p",
|
|
1966
|
-
key:
|
|
1955
|
+
}, [a("div", null, [a("p", Ta, l(u(o)("auditLog.pos.details.eventKey")), 1), a("p", ja, l(i.value.eventKey || "-"), 1)]), a("div", null, [a("p", Pa, l(u(o)("auditLog.columns.device")), 1), a("p", Va, l(u(lt)(i.value, u(o))), 1), i.value.metadata.pos.machineId ? (v(), g("p", $a, l(i.value.metadata.pos.machineId), 1)) : F("", !0)]), i.value.metadata.pos.appVersion ? (v(), g("div", Ea, [a("p", Ra, l(u(o)("auditLog.pos.details.appVersion")), 1), a("p", Ua, l(i.value.metadata.pos.appVersion), 1)])) : F("", !0), a("div", null, [a("p", Na, l(u(o)("auditLog.columns.approver")), 1), a("p", Ka, l(u(jt)(i.value, u(o))), 1)]), a("div", null, [a("p", Ya, l(u(o)("auditLog.pos.details.clock")), 1), a("p", Ba, [ye(l(Ge(new Date(i.value.metadata.pos.occurredAt))) + " · " + l(i.value.metadata.pos.clockSkewMs) + " ms", 1), i.value.metadata.pos.clockClamped ? (v(), g("span", za, " · " + l(u(o)("auditLog.pos.details.clamped")), 1)) : F("", !0)])]), i.value.params ? (v(), g("div", qa, [a("p", Ja, l(u(o)("auditLog.pos.details.params")), 1), a("pre", Ha, l(i.value.params), 1)])) : F("", !0)], 64)) : F("", !0), i.value.metadata.trace && i.value.metadata.trace.length > 0 ? (v(), g("div", Wa, [a("p", Ga, l(u(o)("auditLog.detail.permissionTrace")), 1), a("ol", Xa, [(v(!0), g(z, null, ce(i.value.metadata.trace, (h, $) => (v(), g("li", {
|
|
1956
|
+
key: $,
|
|
1967
1957
|
class: "flex items-center gap-6"
|
|
1968
|
-
}, [a("span",
|
|
1958
|
+
}, [a("span", Qa, l($ + 1), 1), a("span", Za, l(h), 1), $ < i.value.metadata.trace.length - 1 ? (v(), g("span", en, "→")) : F("", !0)]))), 128))])])) : F("", !0), p.value ? (v(), g("div", tn, [a("p", on, l(u(o)("auditLog.detail.requestBody")), 1), a("pre", sn, l(p.value), 1)])) : F("", !0)])])])) : F("", !0)]),
|
|
1969
1959
|
_: 1
|
|
1970
|
-
}, 8, ["header", "model-value"]),
|
|
1960
|
+
}, 8, ["header", "model-value"]), y(Ae, {
|
|
1971
1961
|
header: u(o)("auditLog.operation.sheetHeader"),
|
|
1972
|
-
"model-value":
|
|
1962
|
+
"model-value": M.value,
|
|
1973
1963
|
"max-width": 768,
|
|
1974
1964
|
"dismiss-away": "",
|
|
1975
|
-
"onUpdate:modelValue": s[12] || (s[12] = (
|
|
1976
|
-
|
|
1965
|
+
"onUpdate:modelValue": s[12] || (s[12] = (h) => {
|
|
1966
|
+
h || Mo();
|
|
1977
1967
|
})
|
|
1978
1968
|
}, {
|
|
1979
|
-
default:
|
|
1980
|
-
variant:
|
|
1981
|
-
label:
|
|
1969
|
+
default: B(() => [f.value ? (v(), g("div", an, [a("div", nn, [a("div", ln, [a("p", rn, l(Lt(f.value)), 1), f.value.entityId ? (v(), g("p", un, l(f.value.entityId), 1)) : F("", !0)]), y(U, {
|
|
1970
|
+
variant: f.value.status === "failed" ? "critical" : "success",
|
|
1971
|
+
label: f.value.status === "failed" ? u(o)("auditLog.outcome.failed") : u(o)("auditLog.outcome.success"),
|
|
1982
1972
|
compact: ""
|
|
1983
|
-
}, null, 8, ["variant", "label"])]), a("div",
|
|
1984
|
-
ms:
|
|
1985
|
-
})), 1)])) :
|
|
1973
|
+
}, null, 8, ["variant", "label"])]), a("div", dn, [a("div", cn, [a("div", null, [a("p", fn, l(u(o)("auditLog.detail.date")), 1), a("p", mn, l(Ge(f.value.timestamp)), 1)]), f.value.entityId ? (v(), g("div", vn, [a("p", pn, l(u(o)("auditLog.operation.entity")), 1), a("p", gn, l(f.value.entityId), 1)])) : F("", !0), f.value.durationMs !== void 0 ? (v(), g("div", hn, [a("p", yn, l(u(o)("auditLog.operation.duration")), 1), a("p", bn, l(u(o)("auditLog.operation.durationValue", {
|
|
1974
|
+
ms: f.value.durationMs
|
|
1975
|
+
})), 1)])) : F("", !0)])]), f.value.status === "failed" ? (v(), g("div", _n, [a("p", xn, l(u(o)("auditLog.operation.error")), 1), a("p", Ln, l(f.value.errorMessage || "-"), 1)])) : F("", !0), a("div", kn, [a("div", Sn, [a("p", wn, l(u(o)("auditLog.operation.changes")), 1)]), s[17] || (s[17] = a("hr", {
|
|
1986
1976
|
class: "border-fm-color-border-default"
|
|
1987
|
-
}, null, -1)), a("div",
|
|
1988
|
-
key:
|
|
1977
|
+
}, null, -1)), a("div", In, [Y.value.length ? (v(), g("div", An, [(v(!0), g(z, null, ce(Y.value, (h, $) => (v(), g("div", {
|
|
1978
|
+
key: $,
|
|
1989
1979
|
class: "space-y-4 py-8 first:pt-0 last:pb-0"
|
|
1990
|
-
}, [a("div",
|
|
1991
|
-
variant:
|
|
1992
|
-
label:
|
|
1980
|
+
}, [a("div", Fn, [y(U, {
|
|
1981
|
+
variant: Nt(h.type),
|
|
1982
|
+
label: Kt(h.type),
|
|
1993
1983
|
compact: ""
|
|
1994
|
-
}, null, 8, ["variant", "label"]), a("span",
|
|
1984
|
+
}, null, 8, ["variant", "label"]), a("span", Mn, l(Yt(h)), 1)]), a("p", Dn, [h.type === "add" ? (v(), g("span", On, l(h.afterDisplay), 1)) : h.type === "remove" ? (v(), g("span", Cn, l(h.beforeDisplay), 1)) : (v(), g(z, {
|
|
1995
1985
|
key: 2
|
|
1996
|
-
}, [a("span",
|
|
1986
|
+
}, [a("span", Tn, l(h.beforeDisplay), 1), s[15] || (s[15] = a("span", {
|
|
1997
1987
|
class: "text-fm-color-typo-secondary"
|
|
1998
|
-
}, " → ", -1)), a("span", jn, l(
|
|
1999
|
-
key:
|
|
1988
|
+
}, " → ", -1)), a("span", jn, l(h.afterDisplay), 1)], 64))])]))), 128))])) : ft.value.length ? (v(), g("div", Pn, [(v(!0), g(z, null, ce(ft.value, (h) => (v(), g("div", {
|
|
1989
|
+
key: h.groupKey,
|
|
2000
1990
|
class: "space-y-4 py-8 first:pt-0 last:pb-0"
|
|
2001
|
-
}, [a("div",
|
|
2002
|
-
variant:
|
|
2003
|
-
label:
|
|
1991
|
+
}, [a("div", Vn, [y(U, {
|
|
1992
|
+
variant: ct(h.type),
|
|
1993
|
+
label: W(h.type),
|
|
2004
1994
|
compact: ""
|
|
2005
|
-
}, null, 8, ["variant", "label"]), a("span",
|
|
2006
|
-
key:
|
|
1995
|
+
}, null, 8, ["variant", "label"]), a("span", $n, l(h.displayKey), 1)]), a("div", En, [(v(!0), g(z, null, ce(h.rows, ($) => (v(), g("p", {
|
|
1996
|
+
key: $.path,
|
|
2007
1997
|
class: "break-all font-mono text-xs"
|
|
2008
|
-
}, [
|
|
1998
|
+
}, [$.type === "added" ? (v(), g("span", Rn, l($.after ?? "—"), 1)) : $.type === "removed" ? (v(), g("span", Un, l($.before ?? "—"), 1)) : (v(), g(z, {
|
|
2009
1999
|
key: 2
|
|
2010
|
-
}, [a("span", Nn, l(
|
|
2000
|
+
}, [a("span", Nn, l($.before ?? "—"), 1), s[16] || (s[16] = a("span", {
|
|
2011
2001
|
class: "text-fm-color-typo-secondary"
|
|
2012
|
-
}, " → ", -1)), a("span",
|
|
2002
|
+
}, " → ", -1)), a("span", Kn, l($.after ?? "—"), 1)], 64))]))), 128))])]))), 128))])) : (v(), g("p", Yn, l(u(o)("auditLog.operation.noChanges")), 1))])]), I.value || Q.value ? (v(), g("div", Bn, [a("button", {
|
|
2013
2003
|
type: "button",
|
|
2014
2004
|
class: "flex w-full items-center justify-between p-12 text-left",
|
|
2015
|
-
onClick: s[11] || (s[11] = (
|
|
2016
|
-
}, [a("p",
|
|
2005
|
+
onClick: s[11] || (s[11] = (h) => H.value = !H.value)
|
|
2006
|
+
}, [a("p", zn, l(u(o)("auditLog.operation.showData")), 1), y(Ie, {
|
|
2017
2007
|
name: "keyboard_arrow_down",
|
|
2018
|
-
class: zo(["shrink-0 transition-transform",
|
|
2019
|
-
}, null, 8, ["class"])]),
|
|
2008
|
+
class: zo(["shrink-0 transition-transform", H.value ? "rotate-180" : ""])
|
|
2009
|
+
}, null, 8, ["class"])]), H.value ? (v(), g(z, {
|
|
2020
2010
|
key: 0
|
|
2021
2011
|
}, [s[18] || (s[18] = a("hr", {
|
|
2022
2012
|
class: "border-fm-color-border-default"
|
|
2023
|
-
}, null, -1)), a("div",
|
|
2013
|
+
}, null, -1)), a("div", qn, [I.value ? (v(), g("div", Jn, [a("p", Hn, l(u(o)("auditLog.operation.before")), 1), a("pre", Wn, l(I.value), 1)])) : F("", !0), Q.value ? (v(), g("div", Gn, [a("p", Xn, l(u(o)("auditLog.operation.after")), 1), a("pre", Qn, l(Q.value), 1)])) : F("", !0)])], 64)) : F("", !0)])) : F("", !0)])) : F("", !0)]),
|
|
2024
2014
|
_: 1
|
|
2025
2015
|
}, 8, ["header", "model-value"])], 64);
|
|
2026
2016
|
};
|
|
2027
2017
|
}
|
|
2028
|
-
}),
|
|
2018
|
+
}), bl = /* @__PURE__ */ Xo(tl, [["__scopeId", "data-v-4a88a042"]]);
|
|
2029
2019
|
export {
|
|
2030
|
-
|
|
2020
|
+
bl as default
|
|
2031
2021
|
};
|