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