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