@feedmepos/mf-hrm-portal 2.3.2-dev.13 → 2.3.2-dev.15
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-CkEhtUbS.js → ApprovalCodeList-qB2eycv0.js} +7 -7
- package/dist/{AuditLogList-Bz5zAZyW.js → AuditLogList-DaqYMXFA.js} +366 -361
- package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-ChuqsZ3x.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-orzPqq0L.js} +2 -2
- package/dist/{EmployeeList-CynhLV-L.js → EmployeeList-h0fWCjea.js} +8 -8
- package/dist/{FormSection.vue_vue_type_script_setup_true_lang-CiFif3c3.js → FormSection.vue_vue_type_script_setup_true_lang-rg4r9aRR.js} +1 -1
- package/dist/{GrantUserList-DeWVTGuy.js → GrantUserList-DqeHBPqr.js} +8 -8
- package/dist/{Main-DZGRjkR3.js → Main-8SeOYhVr.js} +5 -5
- package/dist/{Main-DnryPI7f.js → Main-DnWIkti6.js} +12 -12
- package/dist/{Main-B3Leg_L0.js → Main-s-s803fq.js} +10 -10
- package/dist/{MyPosProfile-Dm93oppE.js → MyPosProfile-ChVMjpLY.js} +1 -1
- package/dist/{PermissionSetList-ecBXd3ag.js → PermissionSetList-Bh0o_HFX.js} +17 -17
- package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BLMb_4xS.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-05XZu7a9.js} +987 -987
- package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-2XEgCaw_.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-rb5MPBnA.js} +29 -29
- package/dist/{RoleForm.vue_vue_type_script_setup_true_lang-BWwZEK1N.js → RoleForm.vue_vue_type_script_setup_true_lang-CwzYGZNY.js} +31 -31
- package/dist/{RoleList-V02s5IFg.js → RoleList-BjcuUCyF.js} +7 -7
- package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-D4EmiXpK.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-BSmFLxZS.js} +1 -1
- package/dist/{ScheduleGeneralPage-B19huvz7.js → ScheduleGeneralPage-C0Y9XHXR.js} +2 -2
- package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-DpHkFE_N.js → ScheduleModal.vue_vue_type_script_setup_true_lang-B1293tLU.js} +4 -4
- package/dist/{SchedulePage-DatMj0FX.js → SchedulePage-Cqp0mIOQ.js} +9 -9
- package/dist/{SchedulePositionPage-weHCiVXF.js → SchedulePositionPage-DpF7fZ2G.js} +3 -3
- package/dist/{SelectFilter-VzroQ6nY.js → SelectFilter-jjUAj29l.js} +1 -1
- package/dist/TeamMemberList-B2wxF6Yn.js +2082 -0
- package/dist/{TimesheetList-tA58dMKW.js → TimesheetList-CzUVfPGT.js} +8 -8
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-B0kMSBDL.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-CZ6axjWg.js} +3 -3
- package/dist/{app-v2fOFcO4.js → app-IdmhLBBn.js} +1388 -1345
- package/dist/app.js +1 -1
- package/dist/{approval-code-DXtjIgqA.js → approval-code-BOfGQEGW.js} +1 -1
- package/dist/{dayjs.min-DxlOWUZ1.js → dayjs.min-DkHZ47ah.js} +17 -17
- package/dist/{employee-RT04bxj-.js → employee-CJXt2fuN.js} +5 -5
- package/dist/{grant-user-6LflFpNK.js → grant-user-Bj6DpBWc.js} +1 -1
- package/dist/{iteration-Ce8Ag6An.js → iteration-BRk48OAH.js} +1 -1
- package/dist/{lodash-CKvwb5V-.js → lodash-CDREeRGa.js} +1 -1
- package/dist/{member-grant-CmrGFbhy.js → member-grant-BkZ_oF44.js} +5 -5
- package/dist/{restaurant-B8fppQ6A.js → restaurant-BEdgW6Se.js} +1 -1
- package/dist/{role-BtVKxf2F.js → role-CtYVs62K.js} +3 -3
- package/dist/{rule-Cd1olm_T.js → rule-CWR80AmG.js} +11 -11
- package/dist/src/views/audit-log/constants.d.ts +1 -1
- package/dist/src/views/audit-log/locales/index.d.ts +16 -0
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-CgesqYqb.js → useAppStore-DAW1zVPH.js} +1 -1
- package/dist/{useLoading-nOeAHeTr.js → useLoading-C-AZgSLr.js} +1 -1
- package/dist/{useReportPermissions-CB_JGPpt.js → useReportPermissions-ld6buoVe.js} +20 -20
- package/dist/{useSsoProviders-9r2i0iR9.js → useSsoProviders-DeTogbyW.js} +1 -1
- package/package.json +1 -1
- package/dist/TeamMemberList-Ckh78JzV.js +0 -2083
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { d as
|
|
1
|
+
import { defineComponent as Vt, ref as S, computed as A, onMounted as No, onBeforeUnmount as Ko, watch as ae, resolveComponent as R, createElementBlock as g, openBlock as v, createBlock as Te, createCommentVNode as F, createElementVNode as a, Fragment as z, renderList as ce, withCtx as B, createVNode as y, toDisplayString as l, unref as u, nextTick as Yo, onUnmounted as Bo, createTextVNode as ye, normalizeClass as zo } from "vue";
|
|
2
|
+
import { d as P } from "./dayjs.min-DkHZ47ah.js";
|
|
3
3
|
import { defineStore as qo, storeToRefs as Jo } from "pinia";
|
|
4
4
|
import { useI18n as dt, useCoreStore as Ho } from "@feedmepos/mf-common";
|
|
5
|
-
import { g as
|
|
5
|
+
import { g as st, b as at, u as Wo, B as Mt, _ as Go, a as Xo } from "./app-IdmhLBBn.js";
|
|
6
6
|
import { components as ve } from "@feedmepos/ui-library";
|
|
7
|
-
import { S as Me } from "./SelectFilter-
|
|
7
|
+
import { S as Me } from "./SelectFilter-jjUAj29l.js";
|
|
8
8
|
import { _ as Qo } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
|
|
9
9
|
import { _ as Zo } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
|
|
10
|
-
import { t as
|
|
11
|
-
import { u as
|
|
12
|
-
import { u as
|
|
13
|
-
import { n as
|
|
14
|
-
import { useRoute as
|
|
15
|
-
import { u as
|
|
16
|
-
const
|
|
10
|
+
import { t as es, p as Dt } from "./rule-CWR80AmG.js";
|
|
11
|
+
import { u as ts } from "./restaurant-BEdgW6Se.js";
|
|
12
|
+
import { u as os } from "./useDebounce-B8ZPVS5C.js";
|
|
13
|
+
import { n as ss } from "./string-DZQ1uNjn.js";
|
|
14
|
+
import { useRoute as as, useRouter as ns } from "vue-router";
|
|
15
|
+
import { u as ls } from "./useMessage-_ywT_N9X.js";
|
|
16
|
+
const rs = {
|
|
17
17
|
order: "Order",
|
|
18
18
|
refund: "Refund",
|
|
19
19
|
drawer: "Cash drawer",
|
|
@@ -42,6 +42,11 @@ const ra = {
|
|
|
42
42
|
{ key: "payment", label: "Payment", subjectPrefixes: ["business::payment", "payment"], sources: ["portal"] },
|
|
43
43
|
{ key: "menu", label: "Menu", subjectPrefixes: ["business::menu", "menu"], sources: ["portal"] },
|
|
44
44
|
{ key: "crm", label: "CRM", subjectPrefixes: ["business::crm", "crm"], sources: ["portal"] },
|
|
45
|
+
{ key: "operation", label: "Operation", subjectPrefixes: ["business::operation", "operation"], sources: ["portal"] },
|
|
46
|
+
// Settings spans the mdm, kiosk and eInvoice namespaces (PermissionCategory.settings).
|
|
47
|
+
{ key: "settings", label: "Settings", subjectPrefixes: ["business::mdm", "business::kiosk", "business::eInvoice", "mdm", "kiosk", "eInvoice"], sources: ["portal"] },
|
|
48
|
+
{ key: "miniProgram", label: "Mini Program", subjectPrefixes: ["business::miniProgram", "miniProgram"], sources: ["portal"] },
|
|
49
|
+
{ key: "media", label: "Media", subjectPrefixes: ["business::media", "media"], sources: ["portal"] },
|
|
45
50
|
{ key: "pos", label: "POS", subjectPrefixes: [], sources: ["pos-v8", "hrm-validate"] }
|
|
46
51
|
], nt = "/audit-logs", Ce = {
|
|
47
52
|
async count(t) {
|
|
@@ -62,12 +67,12 @@ const ra = {
|
|
|
62
67
|
...(i = t == null ? void 0 : t.restaurantIds) != null && i.length ? { restaurantIds: t.restaurantIds } : {},
|
|
63
68
|
...t != null && t.traceId ? { traceId: t.traceId } : {}
|
|
64
69
|
};
|
|
65
|
-
return (await
|
|
66
|
-
await
|
|
70
|
+
return (await st(
|
|
71
|
+
await at().get(`${nt}/count`, {
|
|
67
72
|
params: o,
|
|
68
|
-
paramsSerializer: (
|
|
73
|
+
paramsSerializer: (V) => {
|
|
69
74
|
const L = new URLSearchParams();
|
|
70
|
-
for (const [f, M] of Object.entries(
|
|
75
|
+
for (const [f, M] of Object.entries(V))
|
|
71
76
|
if (Array.isArray(M))
|
|
72
77
|
for (const C of M) L.append(f, String(C));
|
|
73
78
|
else M != null && L.append(f, String(M));
|
|
@@ -96,18 +101,18 @@ const ra = {
|
|
|
96
101
|
...(O = t == null ? void 0 : t.restaurantIds) != null && O.length ? { restaurantIds: t.restaurantIds } : {},
|
|
97
102
|
...t != null && t.traceId ? { traceId: t.traceId } : {}
|
|
98
103
|
};
|
|
99
|
-
return
|
|
100
|
-
await
|
|
104
|
+
return st(
|
|
105
|
+
await at().get(nt, {
|
|
101
106
|
params: o,
|
|
102
107
|
// Serialize arrays as repeated params: key=val1&key=val2
|
|
103
108
|
// (NestJS @Query expects this; axios default adds brackets which break matching)
|
|
104
109
|
paramsSerializer: (i) => {
|
|
105
|
-
const
|
|
110
|
+
const V = new URLSearchParams();
|
|
106
111
|
for (const [L, f] of Object.entries(i))
|
|
107
112
|
if (Array.isArray(f))
|
|
108
|
-
for (const M of f)
|
|
109
|
-
else f != null &&
|
|
110
|
-
return
|
|
113
|
+
for (const M of f) V.append(L, String(M));
|
|
114
|
+
else f != null && V.append(L, String(f));
|
|
115
|
+
return V.toString();
|
|
111
116
|
}
|
|
112
117
|
})
|
|
113
118
|
);
|
|
@@ -122,14 +127,14 @@ const ra = {
|
|
|
122
127
|
...t != null && t.from ? { from: t.from } : {},
|
|
123
128
|
...t != null && t.to ? { to: t.to } : {}
|
|
124
129
|
};
|
|
125
|
-
return
|
|
126
|
-
await
|
|
130
|
+
return st(
|
|
131
|
+
await at().get(`${nt}/actors`, { params: o })
|
|
127
132
|
);
|
|
128
133
|
}
|
|
129
|
-
},
|
|
134
|
+
}, is = { class: "flex h-[46px] items-center gap-8 rounded-sm px-16 hover:bg-fm-color-opacity-sm" }, us = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ds = {
|
|
130
135
|
"data-more-measure": "",
|
|
131
136
|
class: "flex h-[46px] items-center gap-8 rounded-sm px-16"
|
|
132
|
-
},
|
|
137
|
+
}, cs = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, fs = /* @__PURE__ */ Vt({
|
|
133
138
|
__name: "AuditLogModuleTabs",
|
|
134
139
|
props: {
|
|
135
140
|
modelValue: {},
|
|
@@ -139,7 +144,7 @@ const ra = {
|
|
|
139
144
|
setup(t, { emit: o }) {
|
|
140
145
|
const n = t, r = o, { t: c } = dt(), d = S(!1), b = S(null), _ = S(null), w = S([]), D = S(0), O = S(0);
|
|
141
146
|
let i = null;
|
|
142
|
-
async function
|
|
147
|
+
async function V() {
|
|
143
148
|
if (await Yo(), !_.value) return;
|
|
144
149
|
const p = _.value.querySelectorAll("[data-tab-measure]");
|
|
145
150
|
w.value = Array.from(p).map((K) => K.offsetWidth);
|
|
@@ -176,15 +181,15 @@ const ra = {
|
|
|
176
181
|
d.value = !1, r("update:modelValue", p);
|
|
177
182
|
}
|
|
178
183
|
return No(async () => {
|
|
179
|
-
await
|
|
184
|
+
await V(), b.value && (O.value = b.value.clientWidth, i = new ResizeObserver(() => {
|
|
180
185
|
b.value && (O.value = b.value.clientWidth);
|
|
181
186
|
}), i.observe(b.value));
|
|
182
187
|
}), Ko(() => {
|
|
183
188
|
i == null || i.disconnect(), i = null;
|
|
184
|
-
}),
|
|
189
|
+
}), ae(
|
|
185
190
|
() => n.items,
|
|
186
191
|
() => {
|
|
187
|
-
|
|
192
|
+
V();
|
|
188
193
|
},
|
|
189
194
|
{ deep: !0 }
|
|
190
195
|
), (p, j) => {
|
|
@@ -211,9 +216,9 @@ const ra = {
|
|
|
211
216
|
onMenuChanged: j[0] || (j[0] = (I) => d.value = I)
|
|
212
217
|
}, {
|
|
213
218
|
"menu-button": B(() => [
|
|
214
|
-
|
|
219
|
+
a("div", is, [
|
|
215
220
|
y(E, { name: "more_vert" }),
|
|
216
|
-
|
|
221
|
+
a("span", us, l(u(c)("auditLog.modules.more")), 1)
|
|
217
222
|
])
|
|
218
223
|
]),
|
|
219
224
|
default: B(() => [
|
|
@@ -227,7 +232,7 @@ const ra = {
|
|
|
227
232
|
]),
|
|
228
233
|
_: 1
|
|
229
234
|
}, 8, ["show-menu"])) : F("", !0),
|
|
230
|
-
|
|
235
|
+
a("div", {
|
|
231
236
|
ref_key: "measurerRef",
|
|
232
237
|
ref: _,
|
|
233
238
|
"aria-hidden": "true",
|
|
@@ -245,15 +250,15 @@ const ra = {
|
|
|
245
250
|
value: I.value
|
|
246
251
|
}, null, 8, ["model-value", "label", "badge", "disabled", "value"])
|
|
247
252
|
]))), 128)),
|
|
248
|
-
|
|
253
|
+
a("div", ds, [
|
|
249
254
|
y(E, { name: "more_vert" }),
|
|
250
|
-
|
|
255
|
+
a("span", cs, l(u(c)("auditLog.modules.more")), 1)
|
|
251
256
|
])
|
|
252
257
|
], 512)
|
|
253
258
|
], 512);
|
|
254
259
|
};
|
|
255
260
|
}
|
|
256
|
-
}),
|
|
261
|
+
}), ms = qo("hrm-team", () => {
|
|
257
262
|
const t = S([]), o = S(!1), n = S(!1), r = A(
|
|
258
263
|
() => Object.fromEntries(t.value.map((_) => [_.doc.userId, _.name]))
|
|
259
264
|
), c = A(
|
|
@@ -265,7 +270,7 @@ const ra = {
|
|
|
265
270
|
if (!(!_ && t.value.length > 0))
|
|
266
271
|
try {
|
|
267
272
|
o.value = !0;
|
|
268
|
-
const w = await
|
|
273
|
+
const w = await es.readTeamMembers();
|
|
269
274
|
t.value = w.sort((D, O) => D.doc.isOwner ? -1 : D.name.localeCompare(O.name)), n.value = !0;
|
|
270
275
|
} finally {
|
|
271
276
|
o.value = !1;
|
|
@@ -281,7 +286,7 @@ const ra = {
|
|
|
281
286
|
readTeamMembers: b
|
|
282
287
|
};
|
|
283
288
|
});
|
|
284
|
-
function
|
|
289
|
+
function vs(t) {
|
|
285
290
|
const o = t.indexOf(".");
|
|
286
291
|
return o <= 0 || o === t.length - 1 ? null : { entity: t.slice(0, o), verb: t.slice(o + 1) };
|
|
287
292
|
}
|
|
@@ -289,16 +294,16 @@ function Ot(t) {
|
|
|
289
294
|
const o = t.split("-").join(" ");
|
|
290
295
|
return o.charAt(0).toUpperCase() + o.slice(1);
|
|
291
296
|
}
|
|
292
|
-
function
|
|
297
|
+
function ps(t, o, n) {
|
|
293
298
|
const r = t(o, n);
|
|
294
299
|
return r === o ? null : r;
|
|
295
300
|
}
|
|
296
301
|
function ut(t, o) {
|
|
297
302
|
const { eventKey: n, params: r, operationLabel: c } = o;
|
|
298
303
|
if (n) {
|
|
299
|
-
const d =
|
|
304
|
+
const d = ps(t, `auditLog.event.sentence.${n}`, r);
|
|
300
305
|
if (d) return d;
|
|
301
|
-
const b =
|
|
306
|
+
const b = vs(n);
|
|
302
307
|
if (b) {
|
|
303
308
|
const _ = `${Ot(b.verb)} ${Ot(b.entity)}`, w = (r == null ? void 0 : r.label) ?? (r == null ? void 0 : r.name);
|
|
304
309
|
return w !== void 0 && w !== "" ? `${_} — ${w}` : _;
|
|
@@ -306,8 +311,8 @@ function ut(t, o) {
|
|
|
306
311
|
}
|
|
307
312
|
return c ?? "";
|
|
308
313
|
}
|
|
309
|
-
function
|
|
310
|
-
const c =
|
|
314
|
+
function gs({ logs: t, selectedLog: o, isSheetOpen: n, businessId: r }) {
|
|
315
|
+
const c = as(), d = ns(), { t: b } = dt(), _ = ls();
|
|
311
316
|
let w = 0;
|
|
312
317
|
function D(f) {
|
|
313
318
|
const { traceId: M, ...C } = c.query;
|
|
@@ -319,7 +324,7 @@ function ga({ logs: t, selectedLog: o, isSheetOpen: n, businessId: r }) {
|
|
|
319
324
|
function i() {
|
|
320
325
|
w++, D(void 0);
|
|
321
326
|
}
|
|
322
|
-
async function
|
|
327
|
+
async function V(f) {
|
|
323
328
|
var p;
|
|
324
329
|
if (((p = o.value) == null ? void 0 : p.traceId) === f) return;
|
|
325
330
|
const M = ++w;
|
|
@@ -339,7 +344,7 @@ function ga({ logs: t, selectedLog: o, isSheetOpen: n, businessId: r }) {
|
|
|
339
344
|
}
|
|
340
345
|
o.value = C, n.value = !0;
|
|
341
346
|
}
|
|
342
|
-
|
|
347
|
+
ae(
|
|
343
348
|
() => [c.query.traceId, r()],
|
|
344
349
|
([f, M], C) => {
|
|
345
350
|
var p;
|
|
@@ -347,7 +352,7 @@ function ga({ logs: t, selectedLog: o, isSheetOpen: n, businessId: r }) {
|
|
|
347
352
|
w++, n.value = !1, o.value = null, D(void 0);
|
|
348
353
|
return;
|
|
349
354
|
}
|
|
350
|
-
typeof f == "string" && f ? M &&
|
|
355
|
+
typeof f == "string" && f ? M && V(f) : (w++, (p = o.value) != null && p.traceId && n.value && (n.value = !1, o.value = null));
|
|
351
356
|
},
|
|
352
357
|
{ immediate: !0 }
|
|
353
358
|
);
|
|
@@ -376,7 +381,7 @@ function Ke(t) {
|
|
|
376
381
|
}
|
|
377
382
|
return String(t);
|
|
378
383
|
}
|
|
379
|
-
function
|
|
384
|
+
function hs(t, o) {
|
|
380
385
|
return t ? `${t}.${o}` : o;
|
|
381
386
|
}
|
|
382
387
|
function Ct(t) {
|
|
@@ -390,33 +395,33 @@ function Ct(t) {
|
|
|
390
395
|
return { ok: !1, value: void 0 };
|
|
391
396
|
}
|
|
392
397
|
}
|
|
393
|
-
const
|
|
394
|
-
function
|
|
398
|
+
const ys = ["_id", "id", "subject", "key", "name"];
|
|
399
|
+
function bs(t, o) {
|
|
395
400
|
if (t.length === 0 || o.length === 0) return null;
|
|
396
401
|
const n = (c, d) => c.every((b) => _e(b) && b[d] !== void 0), r = (c, d) => {
|
|
397
402
|
const b = c.map((_) => _[d]);
|
|
398
403
|
return b.length === new Set(b).size;
|
|
399
404
|
};
|
|
400
|
-
for (const c of
|
|
405
|
+
for (const c of ys)
|
|
401
406
|
if (n(t, c) && n(o, c) && r(t, c) && r(o, c))
|
|
402
407
|
return c;
|
|
403
408
|
return null;
|
|
404
409
|
}
|
|
405
|
-
function
|
|
410
|
+
function $t(t, o, n) {
|
|
406
411
|
n.push({ path: t, type: "added", before: null, after: Ke(o) });
|
|
407
412
|
}
|
|
408
413
|
function Et(t, o, n) {
|
|
409
414
|
n.push({ path: t, type: "removed", before: Ke(o), after: null });
|
|
410
415
|
}
|
|
411
|
-
function
|
|
416
|
+
function _s(t, o, n, r) {
|
|
412
417
|
const c = /* @__PURE__ */ new Set([...Object.keys(o), ...Object.keys(n)]);
|
|
413
418
|
for (const d of Array.from(c)) {
|
|
414
419
|
const b = Object.prototype.hasOwnProperty.call(o, d), _ = Object.prototype.hasOwnProperty.call(n, d);
|
|
415
|
-
Ye(
|
|
420
|
+
Ye(hs(t, d), o[d], b, n[d], _, r);
|
|
416
421
|
}
|
|
417
422
|
}
|
|
418
|
-
function
|
|
419
|
-
const c =
|
|
423
|
+
function xs(t, o, n, r) {
|
|
424
|
+
const c = bs(o, n);
|
|
420
425
|
if (c) {
|
|
421
426
|
const L = new Map(
|
|
422
427
|
o.map((p) => [p[c], p])
|
|
@@ -441,8 +446,8 @@ function xa(t, o, n, r) {
|
|
|
441
446
|
_.has(L.sig) || _.set(L.sig, []), _.get(L.sig).push(L);
|
|
442
447
|
for (const L of b)
|
|
443
448
|
w.has(L.sig) || w.set(L.sig, []), w.get(L.sig).push(L);
|
|
444
|
-
const D = [], O = [], i = Array.from(_.keys()).concat(Array.from(w.keys())),
|
|
445
|
-
for (const L of
|
|
449
|
+
const D = [], O = [], i = Array.from(_.keys()).concat(Array.from(w.keys())), V = Array.from(new Set(i));
|
|
450
|
+
for (const L of V) {
|
|
446
451
|
const f = _.get(L) || [], M = w.get(L) || [], C = Math.min(f.length, M.length);
|
|
447
452
|
for (let p = C; p < f.length; p++)
|
|
448
453
|
D.push({ idx: f[p].idx, item: f[p].item });
|
|
@@ -452,7 +457,7 @@ function xa(t, o, n, r) {
|
|
|
452
457
|
for (const { idx: L, item: f } of D)
|
|
453
458
|
Et(`${t}[${L}]`, f, r);
|
|
454
459
|
for (const { idx: L, item: f } of O)
|
|
455
|
-
|
|
460
|
+
$t(`${t}[${L}]`, f, r);
|
|
456
461
|
}
|
|
457
462
|
function Ye(t, o, n, r, c, d) {
|
|
458
463
|
if (!n && !c) return;
|
|
@@ -461,16 +466,16 @@ function Ye(t, o, n, r, c, d) {
|
|
|
461
466
|
return;
|
|
462
467
|
}
|
|
463
468
|
if (!n && c) {
|
|
464
|
-
|
|
469
|
+
$t(t, r, d);
|
|
465
470
|
return;
|
|
466
471
|
}
|
|
467
472
|
if (JSON.stringify(o) === JSON.stringify(r)) return;
|
|
468
473
|
if (_e(o) && _e(r)) {
|
|
469
|
-
|
|
474
|
+
_s(t, o, r, d);
|
|
470
475
|
return;
|
|
471
476
|
}
|
|
472
477
|
if (je(o) && je(r)) {
|
|
473
|
-
|
|
478
|
+
xs(t, o, r, d);
|
|
474
479
|
return;
|
|
475
480
|
}
|
|
476
481
|
const b = Ct(o), _ = Ct(r);
|
|
@@ -485,7 +490,7 @@ function Ye(t, o, n, r, c, d) {
|
|
|
485
490
|
after: Ke(r)
|
|
486
491
|
});
|
|
487
492
|
}
|
|
488
|
-
function
|
|
493
|
+
function Ls(t, o) {
|
|
489
494
|
if (JSON.stringify(t) === JSON.stringify(o)) return [];
|
|
490
495
|
const n = t == null, r = o == null;
|
|
491
496
|
let c = t;
|
|
@@ -505,7 +510,7 @@ function lt(t, o) {
|
|
|
505
510
|
const n = (d = (c = t.metadata) == null ? void 0 : c.pos) == null ? void 0 : d.posMode, r = t.deviceId || "-";
|
|
506
511
|
return n ? `${r} · ${o(`auditLog.pos.mode.${n}`)}` : r;
|
|
507
512
|
}
|
|
508
|
-
function
|
|
513
|
+
function ks(t, o) {
|
|
509
514
|
var r;
|
|
510
515
|
const n = t.actorName || t.userId || "-";
|
|
511
516
|
return ((r = t.metadata) == null ? void 0 : r.actorKnown) === !1 ? `${n} (${o("auditLog.pos.unverified")})` : n;
|
|
@@ -518,11 +523,11 @@ function jt(t, o) {
|
|
|
518
523
|
const r = ((c = t.metadata) == null ? void 0 : c.approverKnown) === !1 ? `${n} (${o("auditLog.pos.unverified")})` : n;
|
|
519
524
|
return t.source === "hrm-validate" ? `${r} · ${o("auditLog.pos.viaCode")}` : r;
|
|
520
525
|
}
|
|
521
|
-
function
|
|
526
|
+
function Ss(t, o) {
|
|
522
527
|
const n = t.approverName || t.approverId;
|
|
523
528
|
return n ? ` · ${o("auditLog.pos.approverInline", { name: n })}` : "";
|
|
524
529
|
}
|
|
525
|
-
function
|
|
530
|
+
function ws(t, o, n) {
|
|
526
531
|
return o || !(t != null && t.length) ? { userIds: [], feedmeAdminActors: !1 } : {
|
|
527
532
|
userIds: t.filter((r) => r !== n),
|
|
528
533
|
feedmeAdminActors: t.includes(n)
|
|
@@ -531,7 +536,7 @@ function wa(t, o, n) {
|
|
|
531
536
|
function be(t) {
|
|
532
537
|
return t === void 0 ? "—" : Array.isArray(t) ? t.length > 0 ? t.join(", ") : "—" : t || "—";
|
|
533
538
|
}
|
|
534
|
-
function
|
|
539
|
+
function Is(t) {
|
|
535
540
|
return {
|
|
536
541
|
label: t.label,
|
|
537
542
|
labelKey: t.labelKey,
|
|
@@ -540,7 +545,7 @@ function Ia(t) {
|
|
|
540
545
|
afterDisplay: be(t.after)
|
|
541
546
|
};
|
|
542
547
|
}
|
|
543
|
-
function
|
|
548
|
+
function As(t) {
|
|
544
549
|
return Array.isArray(t) && t.length > 0;
|
|
545
550
|
}
|
|
546
551
|
function Rt(t, o, n) {
|
|
@@ -549,7 +554,7 @@ function Rt(t, o, n) {
|
|
|
549
554
|
function Ut(t, o) {
|
|
550
555
|
return ut(t, o) || t("auditLog.operation.unlabeled");
|
|
551
556
|
}
|
|
552
|
-
function
|
|
557
|
+
function Fs(t, o) {
|
|
553
558
|
return !o || o.length === 0 ? "" : o.map((n) => {
|
|
554
559
|
const r = Ut(t, n), c = t(`auditLog.outcome.${n.status}`);
|
|
555
560
|
let d = `${r}: ${c}`;
|
|
@@ -557,185 +562,185 @@ function Fa(t, o) {
|
|
|
557
562
|
}).join(`
|
|
558
563
|
`);
|
|
559
564
|
}
|
|
560
|
-
function
|
|
565
|
+
function Ms(t, o, n) {
|
|
561
566
|
const r = Rt(t, o, n);
|
|
562
567
|
return n.type === "add" ? `${r}: + ${be(n.after)}` : n.type === "remove" ? `${r}: - ${be(n.before)}` : `${r}: ${be(n.before)} → ${be(n.after)}`;
|
|
563
568
|
}
|
|
564
|
-
function
|
|
569
|
+
function Ds(t, o, n) {
|
|
565
570
|
if (!n || n.length === 0) return "";
|
|
566
571
|
const r = n.filter((b) => b.changeNodes && b.changeNodes.length > 0);
|
|
567
572
|
if (r.length === 0) return "";
|
|
568
573
|
const c = r.length > 1;
|
|
569
574
|
return r.map((b) => {
|
|
570
|
-
const _ = (b.changeNodes ?? []).map((w) =>
|
|
575
|
+
const _ = (b.changeNodes ?? []).map((w) => Ms(t, o, w));
|
|
571
576
|
return c ? [`[${Ut(t, b)}]`, ..._].join(`
|
|
572
577
|
`) : _.join(`
|
|
573
578
|
`);
|
|
574
579
|
}).join(`
|
|
575
580
|
`);
|
|
576
581
|
}
|
|
577
|
-
const
|
|
582
|
+
const Os = {
|
|
578
583
|
class: "flex flex-col gap-4 p-12 w-[260px]"
|
|
579
|
-
},
|
|
584
|
+
}, Cs = {
|
|
580
585
|
class: "text-xs font-semibold text-fm-color-typo-secondary mb-4"
|
|
581
|
-
},
|
|
586
|
+
}, Ts = {
|
|
582
587
|
class: "flex min-h-0 flex-1 flex-col gap-16"
|
|
583
|
-
},
|
|
588
|
+
}, js = {
|
|
584
589
|
class: "space-y-16"
|
|
585
|
-
},
|
|
590
|
+
}, Ps = {
|
|
586
591
|
class: "flex flex-wrap items-center gap-8"
|
|
587
|
-
},
|
|
592
|
+
}, Vs = {
|
|
588
593
|
key: 0,
|
|
589
594
|
class: "w-fit"
|
|
590
|
-
},
|
|
595
|
+
}, $s = {
|
|
591
596
|
key: 1,
|
|
592
597
|
class: "w-fit"
|
|
593
|
-
},
|
|
598
|
+
}, Es = {
|
|
594
599
|
class: "w-fit"
|
|
595
|
-
},
|
|
600
|
+
}, Rs = {
|
|
596
601
|
class: "w-fit"
|
|
597
|
-
},
|
|
602
|
+
}, Us = {
|
|
598
603
|
key: 2,
|
|
599
604
|
class: "w-fit"
|
|
600
|
-
},
|
|
605
|
+
}, Ns = {
|
|
601
606
|
class: "flex h-full flex-col overflow-auto"
|
|
602
|
-
},
|
|
607
|
+
}, Ks = {
|
|
603
608
|
key: 0,
|
|
604
609
|
class: "space-y-12 p-4 text-sm"
|
|
605
|
-
},
|
|
610
|
+
}, Ys = {
|
|
606
611
|
class: "flex items-start justify-between gap-8 rounded-lg border border-fm-color-border-default p-12"
|
|
607
|
-
},
|
|
612
|
+
}, Bs = {
|
|
608
613
|
class: "min-w-0 flex-1"
|
|
609
|
-
},
|
|
614
|
+
}, zs = {
|
|
610
615
|
class: "audit-log-operation-label-detail text-base font-bold leading-snug text-fm-color-typo-primary"
|
|
611
|
-
},
|
|
616
|
+
}, qs = {
|
|
612
617
|
key: 0,
|
|
613
618
|
class: "mt-4 break-all font-mono text-xs text-fm-color-typo-secondary"
|
|
614
|
-
},
|
|
619
|
+
}, Js = {
|
|
615
620
|
key: 1,
|
|
616
621
|
class: "mt-2 break-all font-mono text-xs text-fm-color-typo-secondary"
|
|
617
|
-
},
|
|
622
|
+
}, Hs = {
|
|
618
623
|
class: "flex items-center gap-4"
|
|
619
|
-
},
|
|
624
|
+
}, Ws = {
|
|
620
625
|
class: "rounded-lg border border-fm-color-border-default p-12"
|
|
621
|
-
},
|
|
626
|
+
}, Gs = {
|
|
622
627
|
class: "space-y-12"
|
|
623
|
-
},
|
|
628
|
+
}, Xs = {
|
|
624
629
|
class: "text-xs text-fm-color-typo-secondary"
|
|
625
|
-
},
|
|
630
|
+
}, Qs = {
|
|
626
631
|
class: "font-semibold"
|
|
627
|
-
},
|
|
632
|
+
}, Zs = {
|
|
628
633
|
class: "text-xs text-fm-color-typo-secondary"
|
|
629
|
-
},
|
|
634
|
+
}, ea = {
|
|
630
635
|
class: "font-semibold"
|
|
631
|
-
},
|
|
636
|
+
}, ta = {
|
|
632
637
|
class: "text-xs text-fm-color-typo-secondary"
|
|
633
|
-
},
|
|
638
|
+
}, oa = {
|
|
634
639
|
class: "break-all font-semibold"
|
|
635
|
-
},
|
|
640
|
+
}, sa = {
|
|
636
641
|
key: 0
|
|
637
|
-
},
|
|
642
|
+
}, aa = {
|
|
638
643
|
class: "text-xs text-fm-color-typo-secondary"
|
|
639
|
-
},
|
|
644
|
+
}, na = {
|
|
640
645
|
class: "break-all font-mono text-xs font-semibold"
|
|
641
|
-
},
|
|
646
|
+
}, la = {
|
|
642
647
|
class: "text-xs text-fm-color-typo-secondary"
|
|
643
|
-
},
|
|
648
|
+
}, ra = {
|
|
644
649
|
class: "break-all font-mono text-xs font-semibold"
|
|
645
|
-
},
|
|
650
|
+
}, ia = {
|
|
646
651
|
class: "text-xs text-fm-color-typo-secondary"
|
|
647
|
-
},
|
|
652
|
+
}, ua = {
|
|
648
653
|
class: "font-semibold"
|
|
649
|
-
},
|
|
654
|
+
}, da = {
|
|
650
655
|
class: "rounded-lg border border-fm-color-border-default"
|
|
651
|
-
},
|
|
656
|
+
}, ca = {
|
|
652
657
|
class: "p-12"
|
|
653
|
-
},
|
|
658
|
+
}, fa = {
|
|
654
659
|
class: "text-base font-bold text-fm-color-typo-primary"
|
|
655
|
-
},
|
|
660
|
+
}, ma = {
|
|
656
661
|
class: "space-y-12 p-12"
|
|
657
|
-
},
|
|
662
|
+
}, va = {
|
|
658
663
|
class: "text-xs text-fm-color-typo-secondary"
|
|
659
|
-
},
|
|
664
|
+
}, pa = {
|
|
660
665
|
class: "font-semibold"
|
|
661
|
-
},
|
|
666
|
+
}, ga = {
|
|
662
667
|
class: "rounded-lg border border-fm-color-border-default"
|
|
663
|
-
},
|
|
668
|
+
}, ha = {
|
|
664
669
|
class: "p-12"
|
|
665
|
-
},
|
|
670
|
+
}, ya = {
|
|
666
671
|
class: "text-base font-bold text-fm-color-typo-primary"
|
|
667
|
-
},
|
|
672
|
+
}, ba = {
|
|
668
673
|
class: "space-y-12 p-12"
|
|
669
|
-
},
|
|
674
|
+
}, _a = {
|
|
670
675
|
class: "text-xs text-fm-color-typo-secondary"
|
|
671
|
-
},
|
|
676
|
+
}, xa = {
|
|
672
677
|
class: "font-semibold"
|
|
673
|
-
},
|
|
678
|
+
}, La = {
|
|
674
679
|
key: 0
|
|
675
|
-
},
|
|
680
|
+
}, ka = {
|
|
676
681
|
class: "text-xs text-fm-color-typo-secondary"
|
|
677
|
-
},
|
|
682
|
+
}, Sa = {
|
|
678
683
|
key: 0,
|
|
679
684
|
class: "font-semibold"
|
|
680
|
-
},
|
|
685
|
+
}, wa = {
|
|
681
686
|
key: 1,
|
|
682
687
|
class: "break-all font-mono text-xs text-fm-color-typo-secondary"
|
|
683
|
-
},
|
|
688
|
+
}, Ia = {
|
|
684
689
|
key: 1
|
|
685
|
-
},
|
|
690
|
+
}, Aa = {
|
|
686
691
|
class: "text-xs text-fm-color-typo-secondary"
|
|
687
|
-
},
|
|
692
|
+
}, Fa = {
|
|
688
693
|
class: "font-semibold whitespace-pre-line"
|
|
689
|
-
},
|
|
694
|
+
}, Ma = {
|
|
690
695
|
class: "text-xs text-fm-color-typo-secondary"
|
|
691
|
-
},
|
|
696
|
+
}, Da = {
|
|
692
697
|
class: "font-semibold"
|
|
693
|
-
},
|
|
698
|
+
}, Oa = {
|
|
694
699
|
class: "text-xs text-fm-color-typo-secondary"
|
|
695
|
-
},
|
|
700
|
+
}, Ca = {
|
|
696
701
|
class: "break-all font-mono text-xs font-semibold"
|
|
697
|
-
},
|
|
702
|
+
}, Ta = {
|
|
698
703
|
class: "text-xs text-fm-color-typo-secondary"
|
|
699
|
-
},
|
|
704
|
+
}, ja = {
|
|
700
705
|
class: "break-all font-mono text-xs font-semibold"
|
|
701
|
-
},
|
|
706
|
+
}, Pa = {
|
|
702
707
|
class: "text-xs text-fm-color-typo-secondary"
|
|
703
|
-
},
|
|
708
|
+
}, Va = {
|
|
704
709
|
class: "font-semibold"
|
|
705
|
-
},
|
|
710
|
+
}, $a = {
|
|
706
711
|
key: 0,
|
|
707
712
|
class: "break-all font-mono text-xs"
|
|
708
|
-
},
|
|
713
|
+
}, Ea = {
|
|
709
714
|
key: 0
|
|
710
|
-
},
|
|
715
|
+
}, Ra = {
|
|
711
716
|
class: "text-xs text-fm-color-typo-secondary"
|
|
712
|
-
},
|
|
717
|
+
}, Ua = {
|
|
713
718
|
class: "font-semibold"
|
|
714
|
-
},
|
|
719
|
+
}, Na = {
|
|
715
720
|
class: "text-xs text-fm-color-typo-secondary"
|
|
716
|
-
},
|
|
721
|
+
}, Ka = {
|
|
717
722
|
class: "font-semibold"
|
|
718
|
-
},
|
|
723
|
+
}, Ya = {
|
|
719
724
|
class: "text-xs text-fm-color-typo-secondary"
|
|
720
|
-
},
|
|
725
|
+
}, Ba = {
|
|
721
726
|
class: "font-semibold"
|
|
722
|
-
},
|
|
727
|
+
}, za = {
|
|
723
728
|
key: 0
|
|
724
|
-
},
|
|
729
|
+
}, qa = {
|
|
725
730
|
key: 1
|
|
726
|
-
},
|
|
731
|
+
}, Ja = {
|
|
727
732
|
class: "text-xs text-fm-color-typo-secondary"
|
|
728
|
-
},
|
|
733
|
+
}, Ha = {
|
|
729
734
|
class: "whitespace-pre-wrap break-all font-mono text-xs"
|
|
730
|
-
},
|
|
735
|
+
}, Wa = {
|
|
731
736
|
key: 3
|
|
732
|
-
},
|
|
737
|
+
}, Ga = {
|
|
733
738
|
class: "text-xs text-fm-color-typo-secondary"
|
|
734
|
-
},
|
|
739
|
+
}, Xa = {
|
|
735
740
|
class: "mt-4 space-y-4"
|
|
736
|
-
},
|
|
741
|
+
}, Qa = {
|
|
737
742
|
class: "flex h-16 w-16 shrink-0 items-center justify-center rounded-full bg-fm-color-primary-default text-xs font-bold text-white"
|
|
738
|
-
},
|
|
743
|
+
}, Za = {
|
|
739
744
|
class: "text-xs font-semibold"
|
|
740
745
|
}, en = {
|
|
741
746
|
key: 0,
|
|
@@ -744,9 +749,9 @@ const Oa = {
|
|
|
744
749
|
key: 4
|
|
745
750
|
}, on = {
|
|
746
751
|
class: "text-xs text-fm-color-typo-secondary"
|
|
747
|
-
}, an = {
|
|
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"
|
|
749
752
|
}, sn = {
|
|
753
|
+
class: "mt-4 max-h-[400px] overflow-auto rounded bg-gray-100 p-8 font-mono text-xs leading-relaxed shadow-inner whitespace-pre-wrap break-all"
|
|
754
|
+
}, an = {
|
|
750
755
|
key: 0,
|
|
751
756
|
class: "space-y-12 p-4 text-sm"
|
|
752
757
|
}, nn = {
|
|
@@ -812,12 +817,12 @@ const Oa = {
|
|
|
812
817
|
class: "text-fm-color-typo-error"
|
|
813
818
|
}, jn = {
|
|
814
819
|
class: "text-fm-color-typo-success"
|
|
815
|
-
},
|
|
820
|
+
}, Pn = {
|
|
816
821
|
key: 1,
|
|
817
822
|
class: "divide-y divide-fm-color-border-default"
|
|
818
|
-
},
|
|
823
|
+
}, Vn = {
|
|
819
824
|
class: "flex flex-wrap items-center gap-8"
|
|
820
|
-
},
|
|
825
|
+
}, $n = {
|
|
821
826
|
class: "break-all font-mono text-xs"
|
|
822
827
|
}, En = {
|
|
823
828
|
class: "space-y-4"
|
|
@@ -853,26 +858,26 @@ const Oa = {
|
|
|
853
858
|
class: "text-xs text-fm-color-typo-secondary"
|
|
854
859
|
}, Qn = {
|
|
855
860
|
class: "mt-4 max-h-[400px] overflow-auto rounded bg-gray-100 p-8 font-mono text-xs leading-relaxed shadow-inner whitespace-pre-wrap break-all"
|
|
856
|
-
}, Oe = 100, rt = 1e3, it = "__feedmeAdmin__", Zn = "D MMM YYYY h:mm A", el = "YYYY-MM-DD HH:mm", N = "YYYY-MM-DD",
|
|
861
|
+
}, Oe = 100, rt = 1e3, it = "__feedmeAdmin__", Zn = "D MMM YYYY h:mm A", el = "YYYY-MM-DD HH:mm", N = "YYYY-MM-DD", Pt = "audit-log-export-fields-v3", tl = /* @__PURE__ */ Vt({
|
|
857
862
|
__name: "AuditLogList",
|
|
858
863
|
setup(t) {
|
|
859
864
|
const {
|
|
860
865
|
t: o,
|
|
861
866
|
te: n
|
|
862
|
-
} = dt(), r = Ho(), c = Wo(), d =
|
|
867
|
+
} = dt(), r = Ho(), c = Wo(), d = ms(), b = ts(), {
|
|
863
868
|
restaurants: _
|
|
864
|
-
} = Jo(b), w = S(!1), D = S(!1), O = S([]), i = S(null),
|
|
869
|
+
} = Jo(b), w = S(!1), D = S(!1), O = S([]), i = S(null), V = S(!1), L = S({}), f = S(null), M = S(!1);
|
|
865
870
|
async function C(e) {
|
|
866
|
-
const
|
|
867
|
-
return await x.write(
|
|
871
|
+
const s = Uint8Array.from(atob(e), (k) => k.charCodeAt(0)), m = new DecompressionStream("gzip"), x = m.writable.getWriter();
|
|
872
|
+
return await x.write(s), await x.close(), new Response(m.readable).text();
|
|
868
873
|
}
|
|
869
874
|
const p = S("");
|
|
870
875
|
let j = 0;
|
|
871
|
-
|
|
872
|
-
var e,
|
|
873
|
-
return (
|
|
876
|
+
ae(() => {
|
|
877
|
+
var e, s;
|
|
878
|
+
return (s = (e = i.value) == null ? void 0 : e.metadata) == null ? void 0 : s.requestBody;
|
|
874
879
|
}, async (e) => {
|
|
875
|
-
const
|
|
880
|
+
const s = ++j;
|
|
876
881
|
if (!e) {
|
|
877
882
|
p.value = "";
|
|
878
883
|
return;
|
|
@@ -884,10 +889,10 @@ const Oa = {
|
|
|
884
889
|
if (e.startsWith("gzip:")) {
|
|
885
890
|
try {
|
|
886
891
|
const m = await C(e.slice(5));
|
|
887
|
-
if (
|
|
892
|
+
if (s !== j) return;
|
|
888
893
|
p.value = JSON.stringify(JSON.parse(m), null, 2);
|
|
889
894
|
} catch {
|
|
890
|
-
if (
|
|
895
|
+
if (s !== j) return;
|
|
891
896
|
p.value = e;
|
|
892
897
|
}
|
|
893
898
|
return;
|
|
@@ -902,17 +907,17 @@ const Oa = {
|
|
|
902
907
|
});
|
|
903
908
|
async function K(e) {
|
|
904
909
|
if (!e) return;
|
|
905
|
-
let
|
|
910
|
+
let s = e;
|
|
906
911
|
if (e.startsWith("gzip:"))
|
|
907
912
|
try {
|
|
908
|
-
|
|
913
|
+
s = await C(e.slice(5));
|
|
909
914
|
} catch {
|
|
910
915
|
return e;
|
|
911
916
|
}
|
|
912
917
|
try {
|
|
913
|
-
return JSON.parse(
|
|
918
|
+
return JSON.parse(s);
|
|
914
919
|
} catch {
|
|
915
|
-
return
|
|
920
|
+
return s;
|
|
916
921
|
}
|
|
917
922
|
}
|
|
918
923
|
function E(e) {
|
|
@@ -927,11 +932,11 @@ const Oa = {
|
|
|
927
932
|
}
|
|
928
933
|
const X = S([]), Y = S([]), I = S(""), Q = S(""), H = S(!1);
|
|
929
934
|
let xe = 0;
|
|
930
|
-
|
|
931
|
-
const
|
|
935
|
+
ae(f, async (e) => {
|
|
936
|
+
const s = ++xe;
|
|
932
937
|
if (X.value = [], Y.value = [], I.value = "", Q.value = "", H.value = !1, !e) return;
|
|
933
938
|
const [m, x] = await Promise.all([K(e.before), K(e.after)]);
|
|
934
|
-
|
|
939
|
+
s === xe && (As(e.changeNodes) ? Y.value = e.changeNodes.map(Is) : X.value = Ls(m, x), I.value = E(m), Q.value = E(x));
|
|
935
940
|
});
|
|
936
941
|
function ct(e) {
|
|
937
942
|
return e === "added" ? "success" : e === "removed" ? "critical" : "warning";
|
|
@@ -952,33 +957,33 @@ const Oa = {
|
|
|
952
957
|
return Rt(o, n, e);
|
|
953
958
|
}
|
|
954
959
|
const ft = A(() => {
|
|
955
|
-
const e = [],
|
|
960
|
+
const e = [], s = /* @__PURE__ */ new Map();
|
|
956
961
|
for (const m of X.value) {
|
|
957
962
|
const x = Le(m.path), k = `${m.type}::${x}`;
|
|
958
|
-
let T =
|
|
963
|
+
let T = s.get(k);
|
|
959
964
|
T || (T = {
|
|
960
965
|
groupKey: k,
|
|
961
966
|
displayKey: x,
|
|
962
967
|
type: m.type,
|
|
963
968
|
rows: []
|
|
964
|
-
},
|
|
969
|
+
}, s.set(k, T), e.push(T)), T.rows.push(m);
|
|
965
970
|
}
|
|
966
971
|
return e;
|
|
967
|
-
}),
|
|
972
|
+
}), Pe = S(1), Bt = S(!1), Be = S(0), mt = A(() => Math.max(1, Math.ceil(Be.value / Oe))), vt = P().format("YYYY-MM-DD"), ne = S({
|
|
968
973
|
startDate: `${vt} 00:00`,
|
|
969
974
|
endDate: `${vt} 23:59`
|
|
970
975
|
}), fe = S(), Z = S(), le = S(), re = S(), ie = S("all");
|
|
971
976
|
function zt(e) {
|
|
972
|
-
return typeof e == "string" ? [e] : Array.isArray(e) ? e.filter((
|
|
977
|
+
return typeof e == "string" ? [e] : Array.isArray(e) ? e.filter((s) => typeof s == "string") : [];
|
|
973
978
|
}
|
|
974
979
|
const pt = De.filter((e) => e.key !== "all").map((e) => e.key);
|
|
975
|
-
function
|
|
976
|
-
const
|
|
977
|
-
return (
|
|
980
|
+
function Ve(e) {
|
|
981
|
+
const s = De.find((m) => m.key !== "all" && m.subjectPrefixes.some((x) => e.startsWith(x)));
|
|
982
|
+
return (s == null ? void 0 : s.key) ?? "other";
|
|
978
983
|
}
|
|
979
984
|
function gt(e) {
|
|
980
|
-
const
|
|
981
|
-
return
|
|
985
|
+
const s = pt.indexOf(e);
|
|
986
|
+
return s === -1 ? pt.length : s;
|
|
982
987
|
}
|
|
983
988
|
const qt = ["all", "report", "hrm", "payment"], Jt = A(() => De.filter(({
|
|
984
989
|
key: e
|
|
@@ -987,8 +992,8 @@ const Oa = {
|
|
|
987
992
|
}) => ({
|
|
988
993
|
label: o(`auditLog.modules.${e}`),
|
|
989
994
|
value: e
|
|
990
|
-
}))),
|
|
991
|
-
|
|
995
|
+
}))), $e = A(() => De.find((e) => e.key === ie.value) ?? De[0]), Ht = A(() => ie.value === "all"), q = A(() => ie.value === "pos"), pe = A(() => $e.value.sources ?? []);
|
|
996
|
+
ae(q, (e) => {
|
|
992
997
|
e && b.readRestaurants();
|
|
993
998
|
}, {
|
|
994
999
|
immediate: !0
|
|
@@ -997,7 +1002,7 @@ const Oa = {
|
|
|
997
1002
|
label: e.profile.name,
|
|
998
1003
|
value: String(e._id)
|
|
999
1004
|
}))), Gt = A(() => Object.fromEntries(_.value.map((e) => [String(e._id), e.profile.name])));
|
|
1000
|
-
|
|
1005
|
+
ae(ie, () => {
|
|
1001
1006
|
ee.value = [];
|
|
1002
1007
|
});
|
|
1003
1008
|
const ke = S([]), Ee = S(!1), Xt = A(() => [...Ee.value ? [{
|
|
@@ -1009,7 +1014,7 @@ const Oa = {
|
|
|
1009
1014
|
})), ...ke.value.map((e) => ({
|
|
1010
1015
|
label: `${e.name} (${o("auditLog.user.feedmeAdmin")})`,
|
|
1011
1016
|
value: e.userId
|
|
1012
|
-
}))]), ue = A(() =>
|
|
1017
|
+
}))]), ue = A(() => ws(fe.value, q.value, it)), ze = S(""), te = S(""), Qt = os(ze, (e) => {
|
|
1013
1018
|
te.value = e.trim();
|
|
1014
1019
|
});
|
|
1015
1020
|
Bo(Qt);
|
|
@@ -1017,50 +1022,50 @@ const Oa = {
|
|
|
1017
1022
|
onSheetOpened: Zt,
|
|
1018
1023
|
onSheetClosed: eo,
|
|
1019
1024
|
copyLink: to
|
|
1020
|
-
} =
|
|
1025
|
+
} = gs({
|
|
1021
1026
|
logs: O,
|
|
1022
1027
|
selectedLog: i,
|
|
1023
|
-
isSheetOpen:
|
|
1028
|
+
isSheetOpen: V,
|
|
1024
1029
|
businessId: () => c.id.value
|
|
1025
1030
|
}), me = A(() => {
|
|
1026
1031
|
const e = te.value.toLowerCase();
|
|
1027
1032
|
if (!e) return [];
|
|
1028
|
-
const
|
|
1033
|
+
const s = /* @__PURE__ */ new Set();
|
|
1029
1034
|
for (const m of d.members) {
|
|
1030
1035
|
const x = m.doc.userId;
|
|
1031
|
-
((d.userIdToName[x] ?? "").toLowerCase().includes(e) || (d.userIdToEmail[x] ?? "").toLowerCase().includes(e) || (d.userIdToPhone[x] ?? "").toLowerCase().includes(e)) &&
|
|
1036
|
+
((d.userIdToName[x] ?? "").toLowerCase().includes(e) || (d.userIdToEmail[x] ?? "").toLowerCase().includes(e) || (d.userIdToPhone[x] ?? "").toLowerCase().includes(e)) && s.add(x);
|
|
1032
1037
|
}
|
|
1033
1038
|
for (const m of ke.value)
|
|
1034
|
-
m.name.toLowerCase().includes(e) &&
|
|
1035
|
-
return [...
|
|
1039
|
+
m.name.toLowerCase().includes(e) && s.add(m.userId);
|
|
1040
|
+
return [...s];
|
|
1036
1041
|
}), qe = A(() => {
|
|
1037
1042
|
const e = Dt.flatMap((k) => zt(k.subject).map((T) => ({
|
|
1038
1043
|
label: k.label,
|
|
1039
1044
|
value: T
|
|
1040
|
-
}))),
|
|
1045
|
+
}))), s = Object.entries(Mt).map(([k, T]) => ({
|
|
1041
1046
|
label: T,
|
|
1042
1047
|
value: k
|
|
1043
1048
|
})), m = /* @__PURE__ */ new Set(), x = [];
|
|
1044
|
-
for (const k of [...e, ...
|
|
1049
|
+
for (const k of [...e, ...s])
|
|
1045
1050
|
if (!m.has(k.value)) {
|
|
1046
1051
|
m.add(k.value);
|
|
1047
|
-
const T =
|
|
1052
|
+
const T = Ve(k.value);
|
|
1048
1053
|
x.push({
|
|
1049
1054
|
...k,
|
|
1050
1055
|
group: o(`auditLog.modules.${T}`)
|
|
1051
1056
|
});
|
|
1052
1057
|
}
|
|
1053
|
-
return x.sort((k, T) => gt(
|
|
1058
|
+
return x.sort((k, T) => gt(Ve(k.value)) - gt(Ve(T.value)));
|
|
1054
1059
|
}), ge = A(() => {
|
|
1055
1060
|
const e = te.value.toLowerCase();
|
|
1056
1061
|
if (!e) return [];
|
|
1057
|
-
const
|
|
1062
|
+
const s = /* @__PURE__ */ new Set();
|
|
1058
1063
|
for (const m of qe.value)
|
|
1059
|
-
m.label.toLowerCase().includes(e) &&
|
|
1060
|
-
return [...
|
|
1061
|
-
}), oo = A(() => Ht.value ? qe.value : qe.value.filter((e) =>
|
|
1062
|
-
function
|
|
1063
|
-
const m =
|
|
1064
|
+
m.label.toLowerCase().includes(e) && s.add(m.value);
|
|
1065
|
+
return [...s];
|
|
1066
|
+
}), oo = A(() => Ht.value ? qe.value : qe.value.filter((e) => Ve(e.value) === ie.value));
|
|
1067
|
+
function so(e, s) {
|
|
1068
|
+
const m = s.toLowerCase();
|
|
1064
1069
|
return e.label.toLowerCase().includes(m) || e.value.replace(/^business::/, "").toLowerCase().includes(m) ? !0 : e.value.toLowerCase().includes(m);
|
|
1065
1070
|
}
|
|
1066
1071
|
const G = A(() => ({
|
|
@@ -1069,7 +1074,7 @@ const Oa = {
|
|
|
1069
1074
|
read: o("auditLog.action.read"),
|
|
1070
1075
|
update: o("auditLog.action.update"),
|
|
1071
1076
|
delete: o("auditLog.action.delete")
|
|
1072
|
-
})),
|
|
1077
|
+
})), ao = A(() => [{
|
|
1073
1078
|
label: G.value.manage,
|
|
1074
1079
|
value: "manage"
|
|
1075
1080
|
}, {
|
|
@@ -1127,71 +1132,71 @@ const Oa = {
|
|
|
1127
1132
|
skipped: "warning"
|
|
1128
1133
|
};
|
|
1129
1134
|
function Ue(e) {
|
|
1130
|
-
return
|
|
1135
|
+
return P(e).format(Zn);
|
|
1131
1136
|
}
|
|
1132
1137
|
const uo = A(() => {
|
|
1133
1138
|
const {
|
|
1134
1139
|
startDate: e,
|
|
1135
|
-
endDate:
|
|
1140
|
+
endDate: s
|
|
1136
1141
|
} = ne.value;
|
|
1137
|
-
return e &&
|
|
1142
|
+
return e && s ? `${Ue(e)} – ${Ue(s)}` : e ? Ue(e) : s ? Ue(s) : o("auditLog.dateRange.placeholder");
|
|
1138
1143
|
}), co = A(() => [{
|
|
1139
1144
|
label: o("date.predefinedRanges.today"),
|
|
1140
1145
|
value: {
|
|
1141
|
-
startDate:
|
|
1142
|
-
endDate:
|
|
1146
|
+
startDate: P().format(N),
|
|
1147
|
+
endDate: P().format(N)
|
|
1143
1148
|
}
|
|
1144
1149
|
}, {
|
|
1145
1150
|
label: o("date.predefinedRanges.yesterday"),
|
|
1146
1151
|
value: {
|
|
1147
|
-
startDate:
|
|
1148
|
-
endDate:
|
|
1152
|
+
startDate: P().subtract(1, "day").format(N),
|
|
1153
|
+
endDate: P().subtract(1, "day").format(N)
|
|
1149
1154
|
}
|
|
1150
1155
|
}, {
|
|
1151
1156
|
label: o("date.predefinedRanges.thisWeek"),
|
|
1152
1157
|
value: {
|
|
1153
|
-
startDate:
|
|
1154
|
-
endDate:
|
|
1158
|
+
startDate: P().startOf("week").format(N),
|
|
1159
|
+
endDate: P().endOf("week").format(N)
|
|
1155
1160
|
}
|
|
1156
1161
|
}, {
|
|
1157
1162
|
label: o("date.predefinedRanges.lastWeek"),
|
|
1158
1163
|
value: {
|
|
1159
|
-
startDate:
|
|
1160
|
-
endDate:
|
|
1164
|
+
startDate: P().subtract(1, "week").startOf("week").format(N),
|
|
1165
|
+
endDate: P().subtract(1, "week").endOf("week").format(N)
|
|
1161
1166
|
}
|
|
1162
1167
|
}, {
|
|
1163
1168
|
label: o("date.predefinedRanges.last7Days"),
|
|
1164
1169
|
value: {
|
|
1165
|
-
startDate:
|
|
1166
|
-
endDate:
|
|
1170
|
+
startDate: P().subtract(7, "day").format(N),
|
|
1171
|
+
endDate: P().subtract(1, "day").format(N)
|
|
1167
1172
|
}
|
|
1168
1173
|
}, {
|
|
1169
1174
|
label: o("date.predefinedRanges.thisMonth"),
|
|
1170
1175
|
value: {
|
|
1171
|
-
startDate:
|
|
1172
|
-
endDate:
|
|
1176
|
+
startDate: P().startOf("month").format(N),
|
|
1177
|
+
endDate: P().endOf("month").format(N)
|
|
1173
1178
|
}
|
|
1174
1179
|
}, {
|
|
1175
1180
|
label: o("date.predefinedRanges.lastMonth"),
|
|
1176
1181
|
value: {
|
|
1177
|
-
startDate:
|
|
1178
|
-
endDate:
|
|
1182
|
+
startDate: P().subtract(1, "month").startOf("month").format(N),
|
|
1183
|
+
endDate: P().subtract(1, "month").endOf("month").format(N)
|
|
1179
1184
|
}
|
|
1180
1185
|
}]);
|
|
1181
1186
|
function We(e) {
|
|
1182
|
-
var
|
|
1183
|
-
return ((
|
|
1187
|
+
var s;
|
|
1188
|
+
return ((s = Dt.find((m) => m.subject === e)) == null ? void 0 : s.label) ?? Mt[e] ?? rs[e];
|
|
1184
1189
|
}
|
|
1185
1190
|
function Se(e) {
|
|
1186
1191
|
var m, x;
|
|
1187
1192
|
if (e.actorType === "posUser")
|
|
1188
|
-
return
|
|
1193
|
+
return ks(e, o);
|
|
1189
1194
|
if (e.actorType === "portalUser")
|
|
1190
1195
|
return e.actorName ?? e.userId;
|
|
1191
1196
|
if (e.actorType === "feedmeAdmin")
|
|
1192
1197
|
return (m = r.sessionUser.value) != null && m.isInternal ? `${e.actorName ?? e.userId} (${o("auditLog.user.feedmeAdmin")})` : o("auditLog.user.feedmeAdmin");
|
|
1193
|
-
const
|
|
1194
|
-
return
|
|
1198
|
+
const s = d.userIdToName[e.userId];
|
|
1199
|
+
return s || (d.hasLoaded ? (x = r.sessionUser.value) != null && x.isInternal ? `${e.actorName ?? e.userId} (${o("auditLog.user.feedmeAdmin")})` : o("auditLog.user.feedmeAdmin") : e.userId);
|
|
1195
1200
|
}
|
|
1196
1201
|
function yt(e) {
|
|
1197
1202
|
return e.actorType === "posUser" ? q.value ? "" : lt(e, o) : d.userIdToPhone[e.userId] || "-";
|
|
@@ -1200,21 +1205,21 @@ const Oa = {
|
|
|
1200
1205
|
return d.userIdToEmail[e.userId] || "-";
|
|
1201
1206
|
}
|
|
1202
1207
|
function bt(e) {
|
|
1203
|
-
return
|
|
1208
|
+
return P(e).format("DD MMM YYYY, HH:mm");
|
|
1204
1209
|
}
|
|
1205
1210
|
function Ge(e) {
|
|
1206
|
-
return
|
|
1211
|
+
return P(e).format("DD MMM YYYY, HH:mm:ss").toUpperCase();
|
|
1207
1212
|
}
|
|
1208
1213
|
function _t(e) {
|
|
1209
1214
|
return G.value[e] ?? e;
|
|
1210
1215
|
}
|
|
1211
1216
|
function xt(e) {
|
|
1212
|
-
const
|
|
1217
|
+
const s = ut(o, {
|
|
1213
1218
|
eventKey: e.eventKey,
|
|
1214
1219
|
params: e.params,
|
|
1215
1220
|
operationLabel: e.metadata.operationLabel ?? _t(e.action)
|
|
1216
1221
|
});
|
|
1217
|
-
return e.actorType === "posUser" && !q.value ?
|
|
1222
|
+
return e.actorType === "posUser" && !q.value ? s + Ss(e, o) : s;
|
|
1218
1223
|
}
|
|
1219
1224
|
function Lt(e) {
|
|
1220
1225
|
return ut(o, e) || o("auditLog.operation.unlabeled");
|
|
@@ -1235,8 +1240,8 @@ const Oa = {
|
|
|
1235
1240
|
return e.metadata.requestMethod ? ro.value[e.metadata.requestMethod] ?? e.metadata.requestMethod : _t(e.action);
|
|
1236
1241
|
}
|
|
1237
1242
|
function St(e) {
|
|
1238
|
-
const
|
|
1239
|
-
return `"${(/^[=+\-@\t\r]/.test(
|
|
1243
|
+
const s = String(e ?? "");
|
|
1244
|
+
return `"${(/^[=+\-@\t\r]/.test(s) ? `'${s}` : s).replace(/"/g, '""')}"`;
|
|
1240
1245
|
}
|
|
1241
1246
|
const Qe = [{
|
|
1242
1247
|
key: "timestamp",
|
|
@@ -1276,12 +1281,12 @@ const Oa = {
|
|
|
1276
1281
|
}, {
|
|
1277
1282
|
key: "operationEvents",
|
|
1278
1283
|
labelKey: "auditLog.exportFields.operationEvents",
|
|
1279
|
-
getValue: (e) =>
|
|
1284
|
+
getValue: (e) => Fs(o, e.operations),
|
|
1280
1285
|
defaultSelected: !0
|
|
1281
1286
|
}, {
|
|
1282
1287
|
key: "changes",
|
|
1283
1288
|
labelKey: "auditLog.exportFields.changes",
|
|
1284
|
-
getValue: (e) =>
|
|
1289
|
+
getValue: (e) => Ds(o, n, e.operations),
|
|
1285
1290
|
defaultSelected: !1
|
|
1286
1291
|
}, {
|
|
1287
1292
|
key: "businessId",
|
|
@@ -1302,24 +1307,24 @@ const Oa = {
|
|
|
1302
1307
|
key: "resolvedFrom",
|
|
1303
1308
|
labelKey: "auditLog.exportFields.resolvedFrom",
|
|
1304
1309
|
getValue: (e) => {
|
|
1305
|
-
var
|
|
1306
|
-
return (
|
|
1310
|
+
var s;
|
|
1311
|
+
return (s = e.metadata) == null ? void 0 : s.resolvedFrom;
|
|
1307
1312
|
},
|
|
1308
1313
|
defaultSelected: !1
|
|
1309
1314
|
}, {
|
|
1310
1315
|
key: "requestMethod",
|
|
1311
1316
|
labelKey: "auditLog.exportFields.requestMethod",
|
|
1312
1317
|
getValue: (e) => {
|
|
1313
|
-
var
|
|
1314
|
-
return (
|
|
1318
|
+
var s;
|
|
1319
|
+
return (s = e.metadata) == null ? void 0 : s.requestMethod;
|
|
1315
1320
|
},
|
|
1316
1321
|
defaultSelected: !1
|
|
1317
1322
|
}, {
|
|
1318
1323
|
key: "requestPath",
|
|
1319
1324
|
labelKey: "auditLog.exportFields.requestPath",
|
|
1320
1325
|
getValue: (e) => {
|
|
1321
|
-
var
|
|
1322
|
-
return (
|
|
1326
|
+
var s;
|
|
1327
|
+
return (s = e.metadata) == null ? void 0 : s.requestPath;
|
|
1323
1328
|
},
|
|
1324
1329
|
defaultSelected: !1
|
|
1325
1330
|
}, {
|
|
@@ -1330,10 +1335,10 @@ const Oa = {
|
|
|
1330
1335
|
}];
|
|
1331
1336
|
function go() {
|
|
1332
1337
|
try {
|
|
1333
|
-
const e = localStorage.getItem(
|
|
1338
|
+
const e = localStorage.getItem(Pt);
|
|
1334
1339
|
if (e) {
|
|
1335
|
-
const
|
|
1336
|
-
if (Array.isArray(
|
|
1340
|
+
const s = JSON.parse(e);
|
|
1341
|
+
if (Array.isArray(s) && s.length > 0) return new Set(s);
|
|
1337
1342
|
}
|
|
1338
1343
|
} catch {
|
|
1339
1344
|
}
|
|
@@ -1341,27 +1346,27 @@ const Oa = {
|
|
|
1341
1346
|
}
|
|
1342
1347
|
const he = S(go());
|
|
1343
1348
|
function ho(e) {
|
|
1344
|
-
const
|
|
1345
|
-
if (
|
|
1346
|
-
if (
|
|
1347
|
-
|
|
1349
|
+
const s = new Set(he.value);
|
|
1350
|
+
if (s.has(e)) {
|
|
1351
|
+
if (s.size <= 1) return;
|
|
1352
|
+
s.delete(e);
|
|
1348
1353
|
} else
|
|
1349
|
-
|
|
1350
|
-
he.value =
|
|
1354
|
+
s.add(e);
|
|
1355
|
+
he.value = s;
|
|
1351
1356
|
try {
|
|
1352
|
-
localStorage.setItem(
|
|
1357
|
+
localStorage.setItem(Pt, JSON.stringify([...s]));
|
|
1353
1358
|
} catch {
|
|
1354
1359
|
}
|
|
1355
1360
|
}
|
|
1356
1361
|
async function yo() {
|
|
1357
|
-
var e,
|
|
1362
|
+
var e, s, m;
|
|
1358
1363
|
if (!D.value) {
|
|
1359
1364
|
D.value = !0;
|
|
1360
1365
|
try {
|
|
1361
1366
|
const {
|
|
1362
1367
|
startDate: x,
|
|
1363
1368
|
endDate: k
|
|
1364
|
-
} = ne.value, T =
|
|
1369
|
+
} = ne.value, T = $e.value.subjectPrefixes, U = (/* @__PURE__ */ new Date()).toISOString().slice(0, 19).replace("T", " "), se = k ? de(k) : null, et = se && se < U ? se : U, tt = {
|
|
1365
1370
|
...x ? {
|
|
1366
1371
|
from: de(x)
|
|
1367
1372
|
} : {},
|
|
@@ -1384,7 +1389,7 @@ const Oa = {
|
|
|
1384
1389
|
...q.value && ee.value.length ? {
|
|
1385
1390
|
restaurantIds: [...ee.value]
|
|
1386
1391
|
} : {},
|
|
1387
|
-
...(
|
|
1392
|
+
...(s = re.value) != null && s.length ? {
|
|
1388
1393
|
actions: re.value
|
|
1389
1394
|
} : {},
|
|
1390
1395
|
...(m = le.value) != null && m.length ? {
|
|
@@ -1410,8 +1415,8 @@ const Oa = {
|
|
|
1410
1415
|
if (Ie.push(...J), J.length < rt) break;
|
|
1411
1416
|
Ne += rt;
|
|
1412
1417
|
}
|
|
1413
|
-
const Ae = Qe.filter((J) => he.value.has(J.key)), h = Ae.map((J) => o(J.labelKey)),
|
|
1414
|
-
`), Eo = `audit-log_${(c.name.value || "business").replace(/[^a-z0-9_-]+/gi, "_")}_${
|
|
1418
|
+
const Ae = Qe.filter((J) => he.value.has(J.key)), h = Ae.map((J) => o(J.labelKey)), $ = Ie.map((J) => Ae.map((Uo) => Uo.getValue(J) ?? "")), ot = -(/* @__PURE__ */ new Date()).getTimezoneOffset(), Co = ot >= 0 ? "+" : "-", To = String(Math.floor(Math.abs(ot) / 60)).padStart(2, "0"), jo = String(Math.abs(ot) % 60).padStart(2, "0"), Po = `UTC${Co}${To}:${jo}`, At = c.name.value || "", Vo = [x, k].filter(Boolean).join(" – "), $o = [...[[o("auditLog.title")], [`${o("auditLog.frontMatter.date")}: ${Vo}`], ...At ? [[`${o("auditLog.frontMatter.business")}: ${At}`]] : [], [`${o("auditLog.frontMatter.generatedBy")}: ${P().format("DD MMM YYYY, HH:mm")} (${Po})`], []].map((J) => J.map(St).join(",")), ...[h, ...$].map((J) => J.map(St).join(","))].join(`
|
|
1419
|
+
`), Eo = `audit-log_${(c.name.value || "business").replace(/[^a-z0-9_-]+/gi, "_")}_${P().format("YYYYMMDD_HHmmss")}.csv`, Ro = new Blob([`\uFEFF${$o}`], {
|
|
1415
1420
|
type: "text/csv;charset=utf-8;"
|
|
1416
1421
|
}), Ft = window.URL.createObjectURL(Ro), Fe = document.createElement("a");
|
|
1417
1422
|
Fe.href = Ft, Fe.download = Eo, document.body.appendChild(Fe), Fe.click(), Fe.remove(), window.URL.revokeObjectURL(Ft);
|
|
@@ -1438,8 +1443,8 @@ const Oa = {
|
|
|
1438
1443
|
}
|
|
1439
1444
|
function _o(e) {
|
|
1440
1445
|
var m;
|
|
1441
|
-
const
|
|
1442
|
-
return e.depth === 0 && !oe(
|
|
1446
|
+
const s = e.original;
|
|
1447
|
+
return e.depth === 0 && !oe(s) && !!((m = s.operations) != null && m.length);
|
|
1443
1448
|
}
|
|
1444
1449
|
function xo(e) {
|
|
1445
1450
|
return oe(e) ? void 0 : e.operations;
|
|
@@ -1456,30 +1461,30 @@ const Oa = {
|
|
|
1456
1461
|
enableSorting: !1,
|
|
1457
1462
|
size: 220,
|
|
1458
1463
|
cell(e) {
|
|
1459
|
-
const
|
|
1460
|
-
return oe(
|
|
1464
|
+
const s = e.row.original;
|
|
1465
|
+
return oe(s) ? null : y("div", {
|
|
1461
1466
|
class: "flex items-center gap-8"
|
|
1462
1467
|
}, [y(ve.FmAvatar, {
|
|
1463
|
-
name: Se(
|
|
1464
|
-
initials:
|
|
1468
|
+
name: Se(s),
|
|
1469
|
+
initials: ss(Se(s)),
|
|
1465
1470
|
size: "sm",
|
|
1466
1471
|
class: "shrink-0"
|
|
1467
1472
|
}, null), y("div", {
|
|
1468
1473
|
class: "min-w-0"
|
|
1469
1474
|
}, [y("p", {
|
|
1470
1475
|
class: "truncate font-semibold"
|
|
1471
|
-
}, [Se(
|
|
1476
|
+
}, [Se(s)]), y("p", {
|
|
1472
1477
|
class: "truncate text-fm-color-typo-secondary"
|
|
1473
|
-
}, [yt(
|
|
1478
|
+
}, [yt(s)])])]);
|
|
1474
1479
|
}
|
|
1475
1480
|
}, {
|
|
1476
1481
|
accessorKey: "subject",
|
|
1477
1482
|
header: () => o("auditLog.columns.subject"),
|
|
1478
1483
|
cell(e) {
|
|
1479
|
-
const
|
|
1480
|
-
return oe(
|
|
1484
|
+
const s = e.row.original;
|
|
1485
|
+
return oe(s) ? y("span", {
|
|
1481
1486
|
class: "text-fm-color-typo-secondary"
|
|
1482
|
-
}, [o("auditLog.operation.rowHint")]) : We(
|
|
1487
|
+
}, [o("auditLog.operation.rowHint")]) : We(s.subject) ?? s.subject;
|
|
1483
1488
|
}
|
|
1484
1489
|
}, {
|
|
1485
1490
|
accessorKey: "action",
|
|
@@ -1491,21 +1496,21 @@ const Oa = {
|
|
|
1491
1496
|
},
|
|
1492
1497
|
cell(e) {
|
|
1493
1498
|
var U;
|
|
1494
|
-
const
|
|
1495
|
-
if (oe(
|
|
1499
|
+
const s = e.row.original;
|
|
1500
|
+
if (oe(s))
|
|
1496
1501
|
return y("span", {
|
|
1497
1502
|
class: "audit-op-marker flex flex-wrap items-baseline gap-4"
|
|
1498
1503
|
}, [y("span", {
|
|
1499
1504
|
class: "text-fm-color-typo-secondary"
|
|
1500
1505
|
}, [ye("↳")]), y("span", {
|
|
1501
1506
|
class: "font-semibold"
|
|
1502
|
-
}, [Lt(
|
|
1507
|
+
}, [Lt(s)]), s.entityId ? y("span", {
|
|
1503
1508
|
class: "text-fm-color-typo-secondary"
|
|
1504
|
-
}, [ye("· "),
|
|
1509
|
+
}, [ye("· "), s.entityId]) : null, s.status === "failed" && s.errorMessage ? y("span", {
|
|
1505
1510
|
class: "text-fm-color-typo-error"
|
|
1506
|
-
}, [ye("· "),
|
|
1507
|
-
const m = ((U =
|
|
1508
|
-
|
|
1511
|
+
}, [ye("· "), s.errorMessage]) : null]);
|
|
1512
|
+
const m = ((U = s.operations) == null ? void 0 : U.length) ?? 0, x = (se) => {
|
|
1513
|
+
se.stopPropagation(), e.row.getToggleExpandedHandler()();
|
|
1509
1514
|
}, k = {
|
|
1510
1515
|
variant: "tertiary",
|
|
1511
1516
|
icon: e.row.getIsExpanded() ? "keyboard_arrow_up" : "keyboard_arrow_down",
|
|
@@ -1515,7 +1520,7 @@ const Oa = {
|
|
|
1515
1520
|
}, T = ve.FmButton;
|
|
1516
1521
|
return y("span", {
|
|
1517
1522
|
class: "flex items-center gap-8"
|
|
1518
|
-
}, [y("span", null, [xt(
|
|
1523
|
+
}, [y("span", null, [xt(s)]), m > 0 ? y("span", {
|
|
1519
1524
|
class: "cursor-pointer",
|
|
1520
1525
|
onClick: x
|
|
1521
1526
|
}, [y(ve.FmChip, {
|
|
@@ -1531,18 +1536,18 @@ const Oa = {
|
|
|
1531
1536
|
header: () => o("auditLog.columns.outcome"),
|
|
1532
1537
|
enableSorting: !1,
|
|
1533
1538
|
cell(e) {
|
|
1534
|
-
const
|
|
1535
|
-
return oe(
|
|
1536
|
-
variant:
|
|
1537
|
-
label:
|
|
1539
|
+
const s = e.row.original;
|
|
1540
|
+
return oe(s) ? y(ve.FmChip, {
|
|
1541
|
+
variant: s.status === "failed" ? "critical" : "success",
|
|
1542
|
+
label: s.status === "failed" ? o("auditLog.outcome.failed") : o("auditLog.outcome.success"),
|
|
1538
1543
|
compact: !0
|
|
1539
1544
|
}, null) : y("span", {
|
|
1540
1545
|
class: "flex items-center gap-4"
|
|
1541
1546
|
}, [y(ve.FmChip, {
|
|
1542
|
-
variant: kt(
|
|
1543
|
-
label: Xe(
|
|
1547
|
+
variant: kt(s.outcome),
|
|
1548
|
+
label: Xe(s.outcome),
|
|
1544
1549
|
compact: !0
|
|
1545
|
-
}, null), bo(
|
|
1550
|
+
}, null), bo(s)]);
|
|
1546
1551
|
}
|
|
1547
1552
|
}], Lo = [
|
|
1548
1553
|
we[0],
|
|
@@ -1554,8 +1559,8 @@ const Oa = {
|
|
|
1554
1559
|
header: () => o("auditLog.columns.restaurant"),
|
|
1555
1560
|
enableSorting: !1,
|
|
1556
1561
|
cell(e) {
|
|
1557
|
-
const
|
|
1558
|
-
return oe(
|
|
1562
|
+
const s = e.row.original;
|
|
1563
|
+
return oe(s) ? null : s.restaurantId && Gt.value[s.restaurantId] || s.restaurantId || "-";
|
|
1559
1564
|
}
|
|
1560
1565
|
},
|
|
1561
1566
|
{
|
|
@@ -1563,8 +1568,8 @@ const Oa = {
|
|
|
1563
1568
|
header: () => o("auditLog.columns.device"),
|
|
1564
1569
|
enableSorting: !1,
|
|
1565
1570
|
cell(e) {
|
|
1566
|
-
const
|
|
1567
|
-
return oe(
|
|
1571
|
+
const s = e.row.original;
|
|
1572
|
+
return oe(s) ? null : lt(s, o);
|
|
1568
1573
|
}
|
|
1569
1574
|
},
|
|
1570
1575
|
{
|
|
@@ -1572,8 +1577,8 @@ const Oa = {
|
|
|
1572
1577
|
header: () => o("auditLog.columns.approver"),
|
|
1573
1578
|
enableSorting: !1,
|
|
1574
1579
|
cell(e) {
|
|
1575
|
-
const
|
|
1576
|
-
return oe(
|
|
1580
|
+
const s = e.row.original;
|
|
1581
|
+
return oe(s) ? null : jt(s, o);
|
|
1577
1582
|
}
|
|
1578
1583
|
},
|
|
1579
1584
|
we.find((e) => e.accessorKey === "action"),
|
|
@@ -1582,17 +1587,17 @@ const Oa = {
|
|
|
1582
1587
|
// Status
|
|
1583
1588
|
], ko = A(() => q.value ? Lo : we);
|
|
1584
1589
|
function de(e) {
|
|
1585
|
-
const
|
|
1586
|
-
return new Date(
|
|
1590
|
+
const s = P(e, el);
|
|
1591
|
+
return new Date(s.year(), s.month(), s.date(), s.hour(), s.minute(), 0).toISOString().slice(0, 19).replace("T", " ");
|
|
1587
1592
|
}
|
|
1588
1593
|
async function wt() {
|
|
1589
|
-
var e,
|
|
1594
|
+
var e, s, m;
|
|
1590
1595
|
w.value = !0;
|
|
1591
1596
|
try {
|
|
1592
1597
|
const {
|
|
1593
1598
|
startDate: x,
|
|
1594
1599
|
endDate: k
|
|
1595
|
-
} = ne.value, T = (
|
|
1600
|
+
} = ne.value, T = (Pe.value - 1) * Oe, U = $e.value.subjectPrefixes, se = await Ce.read({
|
|
1596
1601
|
limit: Oe,
|
|
1597
1602
|
offset: T,
|
|
1598
1603
|
...x ? {
|
|
@@ -1619,7 +1624,7 @@ const Oa = {
|
|
|
1619
1624
|
...q.value && ee.value.length ? {
|
|
1620
1625
|
restaurantIds: [...ee.value]
|
|
1621
1626
|
} : {},
|
|
1622
|
-
...(
|
|
1627
|
+
...(s = re.value) != null && s.length ? {
|
|
1623
1628
|
actions: re.value
|
|
1624
1629
|
} : {},
|
|
1625
1630
|
...(m = le.value) != null && m.length ? {
|
|
@@ -1635,7 +1640,7 @@ const Oa = {
|
|
|
1635
1640
|
searchSubjects: ge.value
|
|
1636
1641
|
} : {}
|
|
1637
1642
|
});
|
|
1638
|
-
O.value =
|
|
1643
|
+
O.value = se, Bt.value = se.length === Oe, L.value = {};
|
|
1639
1644
|
} finally {
|
|
1640
1645
|
w.value = !1;
|
|
1641
1646
|
}
|
|
@@ -1659,14 +1664,14 @@ const Oa = {
|
|
|
1659
1664
|
var x, k, T;
|
|
1660
1665
|
const {
|
|
1661
1666
|
startDate: e,
|
|
1662
|
-
endDate:
|
|
1663
|
-
} = ne.value, m =
|
|
1667
|
+
endDate: s
|
|
1668
|
+
} = ne.value, m = $e.value.subjectPrefixes;
|
|
1664
1669
|
Be.value = await Ce.count({
|
|
1665
1670
|
...e ? {
|
|
1666
1671
|
from: de(e)
|
|
1667
1672
|
} : {},
|
|
1668
|
-
...
|
|
1669
|
-
to: de(
|
|
1673
|
+
...s ? {
|
|
1674
|
+
to: de(s)
|
|
1670
1675
|
} : {},
|
|
1671
1676
|
...ue.value.userIds.length ? {
|
|
1672
1677
|
userIds: ue.value.userIds
|
|
@@ -1703,19 +1708,19 @@ const Oa = {
|
|
|
1703
1708
|
} : {}
|
|
1704
1709
|
});
|
|
1705
1710
|
}
|
|
1706
|
-
|
|
1707
|
-
|
|
1711
|
+
ae(It, async () => {
|
|
1712
|
+
Pe.value = 1, c.id.value && await Promise.all([So(), wt()]);
|
|
1708
1713
|
}, {
|
|
1709
1714
|
immediate: !0
|
|
1710
|
-
}),
|
|
1715
|
+
}), ae(ie, () => {
|
|
1711
1716
|
Z.value = void 0, q.value && (fe.value = void 0);
|
|
1712
1717
|
});
|
|
1713
1718
|
let Ze = !1;
|
|
1714
1719
|
async function wo({
|
|
1715
1720
|
pageIndex: e
|
|
1716
1721
|
}) {
|
|
1717
|
-
if (c.id.value && !(e === 0 &&
|
|
1718
|
-
Ze = !0,
|
|
1722
|
+
if (c.id.value && !(e === 0 && Pe.value === 1) && !Ze) {
|
|
1723
|
+
Ze = !0, Pe.value = e + 1;
|
|
1719
1724
|
try {
|
|
1720
1725
|
await wt();
|
|
1721
1726
|
} finally {
|
|
@@ -1728,10 +1733,10 @@ const Oa = {
|
|
|
1728
1733
|
Fo(e);
|
|
1729
1734
|
return;
|
|
1730
1735
|
}
|
|
1731
|
-
i.value = e,
|
|
1736
|
+
i.value = e, V.value = !0, Zt(e);
|
|
1732
1737
|
}
|
|
1733
1738
|
function Ao() {
|
|
1734
|
-
|
|
1739
|
+
V.value = !1, i.value = null, eo();
|
|
1735
1740
|
}
|
|
1736
1741
|
function Fo(e) {
|
|
1737
1742
|
f.value = e, M.value = !0;
|
|
@@ -1739,7 +1744,7 @@ const Oa = {
|
|
|
1739
1744
|
function Mo() {
|
|
1740
1745
|
M.value = !1, f.value = null;
|
|
1741
1746
|
}
|
|
1742
|
-
|
|
1747
|
+
ae(c.id, (e) => {
|
|
1743
1748
|
e && d.readTeamMembers();
|
|
1744
1749
|
}, {
|
|
1745
1750
|
immediate: !0
|
|
@@ -1747,14 +1752,14 @@ const Oa = {
|
|
|
1747
1752
|
function Do() {
|
|
1748
1753
|
const e = fe.value;
|
|
1749
1754
|
if (!(e != null && e.length)) return;
|
|
1750
|
-
const
|
|
1755
|
+
const s = new Set(ke.value.map((k) => k.userId)), m = new Set(d.members.map((k) => k.doc.userId)), x = e.filter((k) => k === it ? Ee.value : d.hasLoaded ? m.has(k) || s.has(k) : !0);
|
|
1751
1756
|
x.length !== e.length && (fe.value = x.length ? x : void 0);
|
|
1752
1757
|
}
|
|
1753
1758
|
async function Oo() {
|
|
1754
1759
|
if (!c.id.value) return;
|
|
1755
1760
|
const {
|
|
1756
1761
|
startDate: e,
|
|
1757
|
-
endDate:
|
|
1762
|
+
endDate: s
|
|
1758
1763
|
} = ne.value;
|
|
1759
1764
|
try {
|
|
1760
1765
|
const {
|
|
@@ -1764,8 +1769,8 @@ const Oa = {
|
|
|
1764
1769
|
...e ? {
|
|
1765
1770
|
from: de(e)
|
|
1766
1771
|
} : {},
|
|
1767
|
-
...
|
|
1768
|
-
to: de(
|
|
1772
|
+
...s ? {
|
|
1773
|
+
to: de(s)
|
|
1769
1774
|
} : {}
|
|
1770
1775
|
});
|
|
1771
1776
|
ke.value = m, Ee.value = x;
|
|
@@ -1774,14 +1779,14 @@ const Oa = {
|
|
|
1774
1779
|
}
|
|
1775
1780
|
Do();
|
|
1776
1781
|
}
|
|
1777
|
-
return
|
|
1782
|
+
return ae(() => ({
|
|
1778
1783
|
businessId: c.id.value,
|
|
1779
1784
|
range: ne.value
|
|
1780
1785
|
}), () => Oo(), {
|
|
1781
1786
|
immediate: !0,
|
|
1782
1787
|
deep: !0
|
|
1783
|
-
}), (e,
|
|
1784
|
-
const m = R("FmSpacer"), x = R("FmButton"), k = R("FmMenuItem"), T = R("FmMenu"), U = R("FmChip"),
|
|
1788
|
+
}), (e, s) => {
|
|
1789
|
+
const m = R("FmSpacer"), x = R("FmButton"), k = R("FmMenuItem"), T = R("FmMenu"), U = R("FmChip"), se = R("FmDateRangePicker"), et = R("FmSearch"), tt = R("FmTable"), Ie = R("FmIcon"), Ne = R("FmTooltip"), Ae = R("FmSideSheet");
|
|
1785
1790
|
return v(), g(z, null, [y(Qo, {
|
|
1786
1791
|
heading: u(o)("auditLog.title")
|
|
1787
1792
|
}, {
|
|
@@ -1802,23 +1807,23 @@ const Oa = {
|
|
|
1802
1807
|
"aria-label": u(o)("auditLog.exportSettings.title"),
|
|
1803
1808
|
disabled: D.value
|
|
1804
1809
|
}, null, 8, ["aria-label", "disabled"])]),
|
|
1805
|
-
default: B(() => [
|
|
1810
|
+
default: B(() => [a("div", Os, [a("p", Cs, l(u(o)("auditLog.exportSettings.title")), 1), (v(), g(z, null, ce(Qe, (h) => y(k, {
|
|
1806
1811
|
key: h.key,
|
|
1807
1812
|
label: u(o)(h.labelKey),
|
|
1808
1813
|
"has-checkbox": "",
|
|
1809
1814
|
"model-value": he.value.has(h.key),
|
|
1810
1815
|
disabled: he.value.has(h.key) && he.value.size === 1,
|
|
1811
|
-
onClick: (
|
|
1816
|
+
onClick: ($) => ho(h.key)
|
|
1812
1817
|
}, null, 8, ["label", "model-value", "disabled", "onClick"])), 64))])]),
|
|
1813
1818
|
_: 1
|
|
1814
1819
|
})]),
|
|
1815
|
-
default: B(() => [
|
|
1820
|
+
default: B(() => [a("div", Ts, [a("div", js, [y(fs, {
|
|
1816
1821
|
modelValue: ie.value,
|
|
1817
|
-
"onUpdate:modelValue":
|
|
1822
|
+
"onUpdate:modelValue": s[0] || (s[0] = (h) => ie.value = h),
|
|
1818
1823
|
items: Jt.value
|
|
1819
|
-
}, null, 8, ["modelValue", "items"]),
|
|
1824
|
+
}, null, 8, ["modelValue", "items"]), a("div", Ps, [y(se, {
|
|
1820
1825
|
modelValue: ne.value,
|
|
1821
|
-
"onUpdate:modelValue":
|
|
1826
|
+
"onUpdate:modelValue": s[1] || (s[1] = (h) => ne.value = h),
|
|
1822
1827
|
"show-predefined-range": "",
|
|
1823
1828
|
"show-time": "",
|
|
1824
1829
|
"predefined-range": co.value
|
|
@@ -1828,37 +1833,37 @@ const Oa = {
|
|
|
1828
1833
|
icon: "calendar_month"
|
|
1829
1834
|
}, null, 8, ["label"])]),
|
|
1830
1835
|
_: 1
|
|
1831
|
-
}, 8, ["modelValue", "predefined-range"]), q.value ? F("", !0) : (v(), g("div",
|
|
1836
|
+
}, 8, ["modelValue", "predefined-range"]), q.value ? F("", !0) : (v(), g("div", Vs, [y(Me, {
|
|
1832
1837
|
modelValue: fe.value,
|
|
1833
|
-
"onUpdate:modelValue":
|
|
1838
|
+
"onUpdate:modelValue": s[2] || (s[2] = (h) => fe.value = h),
|
|
1834
1839
|
items: Xt.value,
|
|
1835
1840
|
multiple: "",
|
|
1836
1841
|
variant: "dark",
|
|
1837
1842
|
placeholder: u(o)("auditLog.filter.user_placeholder"),
|
|
1838
1843
|
"selected-prefix": u(o)("auditLog.filter.selected_user_prefix"),
|
|
1839
1844
|
"chip-icon": "account_circle"
|
|
1840
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])), q.value ? F("", !0) : (v(), g("div",
|
|
1845
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])), q.value ? F("", !0) : (v(), g("div", $s, [y(Me, {
|
|
1841
1846
|
modelValue: Z.value,
|
|
1842
|
-
"onUpdate:modelValue":
|
|
1847
|
+
"onUpdate:modelValue": s[3] || (s[3] = (h) => Z.value = h),
|
|
1843
1848
|
items: oo.value,
|
|
1844
|
-
"filter-fn":
|
|
1849
|
+
"filter-fn": so,
|
|
1845
1850
|
multiple: "",
|
|
1846
1851
|
variant: "dark",
|
|
1847
1852
|
placeholder: u(o)("auditLog.filter.subject_placeholder"),
|
|
1848
1853
|
"selected-prefix": u(o)("auditLog.filter.selected_subject_prefix"),
|
|
1849
1854
|
"chip-icon": "badge"
|
|
1850
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])),
|
|
1855
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])), a("div", Es, [y(Me, {
|
|
1851
1856
|
modelValue: re.value,
|
|
1852
|
-
"onUpdate:modelValue":
|
|
1853
|
-
items:
|
|
1857
|
+
"onUpdate:modelValue": s[4] || (s[4] = (h) => re.value = h),
|
|
1858
|
+
items: ao.value,
|
|
1854
1859
|
multiple: "",
|
|
1855
1860
|
variant: "dark",
|
|
1856
1861
|
placeholder: u(o)("auditLog.filter.action_placeholder"),
|
|
1857
1862
|
"selected-prefix": u(o)("auditLog.filter.selected_action_prefix"),
|
|
1858
1863
|
searchable: !1
|
|
1859
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]),
|
|
1864
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div", Rs, [y(Me, {
|
|
1860
1865
|
modelValue: le.value,
|
|
1861
|
-
"onUpdate:modelValue":
|
|
1866
|
+
"onUpdate:modelValue": s[5] || (s[5] = (h) => le.value = h),
|
|
1862
1867
|
items: no.value,
|
|
1863
1868
|
multiple: "",
|
|
1864
1869
|
variant: "dark",
|
|
@@ -1866,9 +1871,9 @@ const Oa = {
|
|
|
1866
1871
|
"selected-prefix": u(o)("auditLog.filter.selected_status_prefix"),
|
|
1867
1872
|
searchable: !1,
|
|
1868
1873
|
"chip-icon": "check_circle"
|
|
1869
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), q.value ? (v(), g("div",
|
|
1874
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), q.value ? (v(), g("div", Us, [y(Me, {
|
|
1870
1875
|
modelValue: ee.value,
|
|
1871
|
-
"onUpdate:modelValue":
|
|
1876
|
+
"onUpdate:modelValue": s[6] || (s[6] = (h) => ee.value = h),
|
|
1872
1877
|
items: Wt.value,
|
|
1873
1878
|
multiple: "",
|
|
1874
1879
|
variant: "dark",
|
|
@@ -1877,11 +1882,11 @@ const Oa = {
|
|
|
1877
1882
|
"chip-icon": "storefront"
|
|
1878
1883
|
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])) : F("", !0), y(et, {
|
|
1879
1884
|
modelValue: ze.value,
|
|
1880
|
-
"onUpdate:modelValue":
|
|
1885
|
+
"onUpdate:modelValue": s[7] || (s[7] = (h) => ze.value = h),
|
|
1881
1886
|
class: "ml-auto w-[280px]",
|
|
1882
1887
|
placeholder: u(o)("auditLog.search.placeholder")
|
|
1883
1888
|
}, null, 8, ["modelValue", "placeholder"])])]), y(Go, null, {
|
|
1884
|
-
default: B(() => [
|
|
1889
|
+
default: B(() => [a("div", Ns, [y(Zo, {
|
|
1885
1890
|
"is-loading": w.value,
|
|
1886
1891
|
"is-empty": O.value.length === 0,
|
|
1887
1892
|
title: u(o)("auditLog.noData.title"),
|
|
@@ -1902,8 +1907,8 @@ const Oa = {
|
|
|
1902
1907
|
"get-sub-row": xo,
|
|
1903
1908
|
"pin-header-row": "",
|
|
1904
1909
|
class: "audit-log-list-table cursor-pointer",
|
|
1905
|
-
"onUpdate:expandedState":
|
|
1906
|
-
onRowClick:
|
|
1910
|
+
"onUpdate:expandedState": s[8] || (s[8] = (h) => L.value = h),
|
|
1911
|
+
onRowClick: s[9] || (s[9] = (h) => Io(h.original))
|
|
1907
1912
|
}, null, 8, ["column-defs", "row-data", "page-count", "row-count", "hide-footer", "loading", "expanded-state"]))]),
|
|
1908
1913
|
_: 1
|
|
1909
1914
|
}, 8, ["is-loading", "is-empty", "title", "subtitle"])])]),
|
|
@@ -1912,20 +1917,20 @@ const Oa = {
|
|
|
1912
1917
|
_: 1
|
|
1913
1918
|
}, 8, ["heading"]), y(Ae, {
|
|
1914
1919
|
header: u(o)("auditLog.detail.header"),
|
|
1915
|
-
"model-value":
|
|
1920
|
+
"model-value": V.value,
|
|
1916
1921
|
"max-width": 768,
|
|
1917
1922
|
"dismiss-away": "",
|
|
1918
|
-
"onUpdate:modelValue":
|
|
1923
|
+
"onUpdate:modelValue": s[10] || (s[10] = (h) => {
|
|
1919
1924
|
h || Ao();
|
|
1920
1925
|
})
|
|
1921
1926
|
}, {
|
|
1922
|
-
default: B(() => [i.value ? (v(), g("div",
|
|
1927
|
+
default: B(() => [i.value ? (v(), g("div", Ks, [a("div", Ys, [a("div", Bs, [a("p", zs, l(mo(i.value)), 1), i.value.traceId ? (v(), g("p", qs, [ye(" Trace ID: " + l(i.value.traceId) + " ", 1), y(x, {
|
|
1923
1928
|
variant: "tertiary",
|
|
1924
1929
|
icon: "link",
|
|
1925
1930
|
class: "ml-4 align-middle",
|
|
1926
1931
|
"aria-label": u(o)("auditLog.detail.copyLink"),
|
|
1927
1932
|
onClick: u(to)
|
|
1928
|
-
}, null, 8, ["aria-label", "onClick"])])) : F("", !0), i.value.eventId ? (v(), g("p",
|
|
1933
|
+
}, null, 8, ["aria-label", "onClick"])])) : F("", !0), i.value.eventId ? (v(), g("p", Js, " Event ID: " + l(i.value.eventId), 1)) : F("", !0)]), a("div", Hs, [y(U, {
|
|
1929
1934
|
variant: kt(i.value.outcome),
|
|
1930
1935
|
label: Xe(i.value.outcome),
|
|
1931
1936
|
compact: ""
|
|
@@ -1941,71 +1946,71 @@ const Oa = {
|
|
|
1941
1946
|
class: "cursor-help text-fm-color-typo-error"
|
|
1942
1947
|
})]),
|
|
1943
1948
|
_: 1
|
|
1944
|
-
})) : F("", !0)])]),
|
|
1949
|
+
})) : F("", !0)])]), a("div", Ws, [a("div", Gs, [a("div", null, [a("p", Xs, l(u(o)("auditLog.detail.date")), 1), a("p", Qs, l(Ge(i.value.timestamp)), 1)]), a("div", null, [a("p", Zs, l(u(o)("auditLog.detail.user")), 1), a("p", ea, l(Se(i.value)), 1)]), a("div", null, [a("p", ta, l(u(o)("auditLog.detail.email")), 1), a("p", oa, l(fo(i.value)), 1)]), i.value.field ? (v(), g("div", sa, [a("p", aa, l(u(o)("auditLog.detail.field")), 1), a("p", na, l(i.value.field), 1)])) : F("", !0), a("div", null, [a("p", la, l(u(o)("auditLog.detail.business")), 1), a("p", ra, l(i.value.businessId || "-"), 1)]), a("div", null, [a("p", ia, l(u(o)("auditLog.detail.restaurant")), 1), a("p", ua, l(i.value.restaurantId || "-"), 1)])])]), a("div", da, [a("div", ca, [a("p", fa, l(u(o)("auditLog.detail.eventDetails")), 1)]), s[13] || (s[13] = a("hr", {
|
|
1945
1950
|
class: "border-fm-color-border-default"
|
|
1946
|
-
}, null, -1)),
|
|
1951
|
+
}, null, -1)), a("div", ma, [a("div", null, [a("p", va, l(u(o)("auditLog.detail.actionDescription")), 1), a("p", pa, l(i.value.metadata.operationLabel || "-"), 1)])])]), a("div", ga, [a("div", ha, [a("p", ya, l(u(o)("auditLog.detail.metadata")), 1)]), s[14] || (s[14] = a("hr", {
|
|
1947
1952
|
class: "border-fm-color-border-default"
|
|
1948
|
-
}, null, -1)),
|
|
1953
|
+
}, null, -1)), a("div", ba, [a("div", null, [a("p", _a, l(u(o)("auditLog.detail.resolvedFrom")), 1), a("p", xa, l(vo(i.value.metadata.resolvedFrom)), 1)]), (i.value.metadata.resolvedFrom === "permissionSet" || i.value.metadata.resolvedFrom === "systemPermissionSet") && (i.value.metadata.permissionSetName || i.value.metadata.permissionSetId) ? (v(), g("div", La, [a("p", ka, l(u(o)("auditLog.detail.permissionSet")), 1), i.value.metadata.permissionSetName ? (v(), g("p", Sa, l(i.value.metadata.permissionSetName), 1)) : F("", !0), i.value.metadata.permissionSetId ? (v(), g("p", wa, l(i.value.metadata.permissionSetId), 1)) : F("", !0)])) : F("", !0), i.value.metadata.reason ? (v(), g("div", Ia, [a("p", Aa, l(u(o)("auditLog.detail.reason")), 1), a("p", Fa, l(i.value.metadata.reason), 1)])) : F("", !0), a("div", null, [a("p", Ma, l(u(o)("auditLog.detail.requestMethod")), 1), a("p", Da, l(po(i.value)), 1)]), a("div", null, [a("p", Oa, l(u(o)("auditLog.detail.requestPath")), 1), a("p", Ca, l(i.value.metadata.requestPath || "-"), 1)]), i.value.metadata.pos ? (v(), g(z, {
|
|
1949
1954
|
key: 2
|
|
1950
|
-
}, [
|
|
1951
|
-
key:
|
|
1955
|
+
}, [a("div", null, [a("p", Ta, l(u(o)("auditLog.pos.details.eventKey")), 1), a("p", ja, l(i.value.eventKey || "-"), 1)]), a("div", null, [a("p", Pa, l(u(o)("auditLog.columns.device")), 1), a("p", Va, l(u(lt)(i.value, u(o))), 1), i.value.metadata.pos.machineId ? (v(), g("p", $a, l(i.value.metadata.pos.machineId), 1)) : F("", !0)]), i.value.metadata.pos.appVersion ? (v(), g("div", Ea, [a("p", Ra, l(u(o)("auditLog.pos.details.appVersion")), 1), a("p", Ua, l(i.value.metadata.pos.appVersion), 1)])) : F("", !0), a("div", null, [a("p", Na, l(u(o)("auditLog.columns.approver")), 1), a("p", Ka, l(u(jt)(i.value, u(o))), 1)]), a("div", null, [a("p", Ya, l(u(o)("auditLog.pos.details.clock")), 1), a("p", Ba, [ye(l(Ge(new Date(i.value.metadata.pos.occurredAt))) + " · " + l(i.value.metadata.pos.clockSkewMs) + " ms", 1), i.value.metadata.pos.clockClamped ? (v(), g("span", za, " · " + l(u(o)("auditLog.pos.details.clamped")), 1)) : F("", !0)])]), i.value.params ? (v(), g("div", qa, [a("p", Ja, l(u(o)("auditLog.pos.details.params")), 1), a("pre", Ha, l(i.value.params), 1)])) : F("", !0)], 64)) : F("", !0), i.value.metadata.trace && i.value.metadata.trace.length > 0 ? (v(), g("div", Wa, [a("p", Ga, l(u(o)("auditLog.detail.permissionTrace")), 1), a("ol", Xa, [(v(!0), g(z, null, ce(i.value.metadata.trace, (h, $) => (v(), g("li", {
|
|
1956
|
+
key: $,
|
|
1952
1957
|
class: "flex items-center gap-6"
|
|
1953
|
-
}, [
|
|
1958
|
+
}, [a("span", Qa, l($ + 1), 1), a("span", Za, l(h), 1), $ < i.value.metadata.trace.length - 1 ? (v(), g("span", en, "→")) : F("", !0)]))), 128))])])) : F("", !0), p.value ? (v(), g("div", tn, [a("p", on, l(u(o)("auditLog.detail.requestBody")), 1), a("pre", sn, l(p.value), 1)])) : F("", !0)])])])) : F("", !0)]),
|
|
1954
1959
|
_: 1
|
|
1955
1960
|
}, 8, ["header", "model-value"]), y(Ae, {
|
|
1956
1961
|
header: u(o)("auditLog.operation.sheetHeader"),
|
|
1957
1962
|
"model-value": M.value,
|
|
1958
1963
|
"max-width": 768,
|
|
1959
1964
|
"dismiss-away": "",
|
|
1960
|
-
"onUpdate:modelValue":
|
|
1965
|
+
"onUpdate:modelValue": s[12] || (s[12] = (h) => {
|
|
1961
1966
|
h || Mo();
|
|
1962
1967
|
})
|
|
1963
1968
|
}, {
|
|
1964
|
-
default: B(() => [f.value ? (v(), g("div",
|
|
1969
|
+
default: B(() => [f.value ? (v(), g("div", an, [a("div", nn, [a("div", ln, [a("p", rn, l(Lt(f.value)), 1), f.value.entityId ? (v(), g("p", un, l(f.value.entityId), 1)) : F("", !0)]), y(U, {
|
|
1965
1970
|
variant: f.value.status === "failed" ? "critical" : "success",
|
|
1966
1971
|
label: f.value.status === "failed" ? u(o)("auditLog.outcome.failed") : u(o)("auditLog.outcome.success"),
|
|
1967
1972
|
compact: ""
|
|
1968
|
-
}, null, 8, ["variant", "label"])]),
|
|
1973
|
+
}, null, 8, ["variant", "label"])]), a("div", dn, [a("div", cn, [a("div", null, [a("p", fn, l(u(o)("auditLog.detail.date")), 1), a("p", mn, l(Ge(f.value.timestamp)), 1)]), f.value.entityId ? (v(), g("div", vn, [a("p", pn, l(u(o)("auditLog.operation.entity")), 1), a("p", gn, l(f.value.entityId), 1)])) : F("", !0), f.value.durationMs !== void 0 ? (v(), g("div", hn, [a("p", yn, l(u(o)("auditLog.operation.duration")), 1), a("p", bn, l(u(o)("auditLog.operation.durationValue", {
|
|
1969
1974
|
ms: f.value.durationMs
|
|
1970
|
-
})), 1)])) : F("", !0)])]), f.value.status === "failed" ? (v(), g("div", _n, [
|
|
1975
|
+
})), 1)])) : F("", !0)])]), f.value.status === "failed" ? (v(), g("div", _n, [a("p", xn, l(u(o)("auditLog.operation.error")), 1), a("p", Ln, l(f.value.errorMessage || "-"), 1)])) : F("", !0), a("div", kn, [a("div", Sn, [a("p", wn, l(u(o)("auditLog.operation.changes")), 1)]), s[17] || (s[17] = a("hr", {
|
|
1971
1976
|
class: "border-fm-color-border-default"
|
|
1972
|
-
}, null, -1)),
|
|
1973
|
-
key:
|
|
1977
|
+
}, null, -1)), a("div", In, [Y.value.length ? (v(), g("div", An, [(v(!0), g(z, null, ce(Y.value, (h, $) => (v(), g("div", {
|
|
1978
|
+
key: $,
|
|
1974
1979
|
class: "space-y-4 py-8 first:pt-0 last:pb-0"
|
|
1975
|
-
}, [
|
|
1980
|
+
}, [a("div", Fn, [y(U, {
|
|
1976
1981
|
variant: Nt(h.type),
|
|
1977
1982
|
label: Kt(h.type),
|
|
1978
1983
|
compact: ""
|
|
1979
|
-
}, null, 8, ["variant", "label"]),
|
|
1984
|
+
}, null, 8, ["variant", "label"]), a("span", Mn, l(Yt(h)), 1)]), a("p", Dn, [h.type === "add" ? (v(), g("span", On, l(h.afterDisplay), 1)) : h.type === "remove" ? (v(), g("span", Cn, l(h.beforeDisplay), 1)) : (v(), g(z, {
|
|
1980
1985
|
key: 2
|
|
1981
|
-
}, [
|
|
1986
|
+
}, [a("span", Tn, l(h.beforeDisplay), 1), s[15] || (s[15] = a("span", {
|
|
1982
1987
|
class: "text-fm-color-typo-secondary"
|
|
1983
|
-
}, " → ", -1)),
|
|
1988
|
+
}, " → ", -1)), a("span", jn, l(h.afterDisplay), 1)], 64))])]))), 128))])) : ft.value.length ? (v(), g("div", Pn, [(v(!0), g(z, null, ce(ft.value, (h) => (v(), g("div", {
|
|
1984
1989
|
key: h.groupKey,
|
|
1985
1990
|
class: "space-y-4 py-8 first:pt-0 last:pb-0"
|
|
1986
|
-
}, [
|
|
1991
|
+
}, [a("div", Vn, [y(U, {
|
|
1987
1992
|
variant: ct(h.type),
|
|
1988
1993
|
label: W(h.type),
|
|
1989
1994
|
compact: ""
|
|
1990
|
-
}, null, 8, ["variant", "label"]),
|
|
1991
|
-
key:
|
|
1995
|
+
}, null, 8, ["variant", "label"]), a("span", $n, l(h.displayKey), 1)]), a("div", En, [(v(!0), g(z, null, ce(h.rows, ($) => (v(), g("p", {
|
|
1996
|
+
key: $.path,
|
|
1992
1997
|
class: "break-all font-mono text-xs"
|
|
1993
|
-
}, [
|
|
1998
|
+
}, [$.type === "added" ? (v(), g("span", Rn, l($.after ?? "—"), 1)) : $.type === "removed" ? (v(), g("span", Un, l($.before ?? "—"), 1)) : (v(), g(z, {
|
|
1994
1999
|
key: 2
|
|
1995
|
-
}, [
|
|
2000
|
+
}, [a("span", Nn, l($.before ?? "—"), 1), s[16] || (s[16] = a("span", {
|
|
1996
2001
|
class: "text-fm-color-typo-secondary"
|
|
1997
|
-
}, " → ", -1)),
|
|
2002
|
+
}, " → ", -1)), a("span", Kn, l($.after ?? "—"), 1)], 64))]))), 128))])]))), 128))])) : (v(), g("p", Yn, l(u(o)("auditLog.operation.noChanges")), 1))])]), I.value || Q.value ? (v(), g("div", Bn, [a("button", {
|
|
1998
2003
|
type: "button",
|
|
1999
2004
|
class: "flex w-full items-center justify-between p-12 text-left",
|
|
2000
|
-
onClick:
|
|
2001
|
-
}, [
|
|
2005
|
+
onClick: s[11] || (s[11] = (h) => H.value = !H.value)
|
|
2006
|
+
}, [a("p", zn, l(u(o)("auditLog.operation.showData")), 1), y(Ie, {
|
|
2002
2007
|
name: "keyboard_arrow_down",
|
|
2003
2008
|
class: zo(["shrink-0 transition-transform", H.value ? "rotate-180" : ""])
|
|
2004
2009
|
}, null, 8, ["class"])]), H.value ? (v(), g(z, {
|
|
2005
2010
|
key: 0
|
|
2006
|
-
}, [
|
|
2011
|
+
}, [s[18] || (s[18] = a("hr", {
|
|
2007
2012
|
class: "border-fm-color-border-default"
|
|
2008
|
-
}, null, -1)),
|
|
2013
|
+
}, null, -1)), a("div", qn, [I.value ? (v(), g("div", Jn, [a("p", Hn, l(u(o)("auditLog.operation.before")), 1), a("pre", Wn, l(I.value), 1)])) : F("", !0), Q.value ? (v(), g("div", Gn, [a("p", Xn, l(u(o)("auditLog.operation.after")), 1), a("pre", Qn, l(Q.value), 1)])) : F("", !0)])], 64)) : F("", !0)])) : F("", !0)])) : F("", !0)]),
|
|
2009
2014
|
_: 1
|
|
2010
2015
|
}, 8, ["header", "model-value"])], 64);
|
|
2011
2016
|
};
|