@feedmepos/mf-hrm-portal 2.2.2-dev.4 → 2.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ApprovalCodeList-Dn8R6jgC.js → ApprovalCodeList-BnG3T_Lk.js} +5 -5
- package/dist/{AuditLogList-BdWELtlp.js → AuditLogList-CpK9-YkB.js} +759 -705
- package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-DbUdX_Qk.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-CzKzq19d.js} +2 -2
- package/dist/{EmployeeList-Br4a6imR.js → EmployeeList-CUsRanu7.js} +6 -6
- package/dist/{GrantUserList-YpLuH3il.js → GrantUserList-BJoj3ZcO.js} +6 -6
- package/dist/{Main-eBobrTdz.js → Main-5QLhf80L.js} +8 -8
- package/dist/{Main-DPoPfzcK.js → Main-BEUu3Hba.js} +5 -5
- package/dist/{Main-DWv0oSH4.js → Main-FPpK9B70.js} +11 -11
- package/dist/{PermissionSetList-ttA1JLVy.js → PermissionSetList-DZGZ0Pm_.js} +7 -7
- package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DQa3GK8B.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BHEW1_dv.js} +945 -945
- package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-XHuHin8t.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-Z-DH7ouY.js} +1 -1
- package/dist/{RoleList-B790AV-j.js → RoleList-D5yToard.js} +43 -43
- package/dist/{TeamMemberList-B-vgWJw4.js → TeamMemberList-C4-AHxO4.js} +9 -9
- package/dist/{TimesheetList-C05Wl5Gw.js → TimesheetList-DMo8KXoU.js} +7 -7
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-CDxi-Gdu.js → TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-2KHu-f8U.js} +3 -3
- package/dist/{app-DzZ_hyHn.js → app-DlSD8S9A.js} +2625 -2217
- package/dist/app.js +1 -1
- package/dist/{approval-code-jIjkeVEb.js → approval-code-BRClD2HN.js} +1 -1
- package/dist/{dayjs.min-B-hCRyX9.js → dayjs.min-DcI2auGP.js} +1 -1
- package/dist/{employee-C2s088Kk.js → employee-C_cvCoHM.js} +4 -4
- package/dist/{grant-user-SNiDV22U.js → grant-user-Dhi3ilC_.js} +1 -1
- package/dist/{iteration-C2OwvCva.js → iteration-DSzPQ0fZ.js} +1 -1
- package/dist/{lodash-BQEjwNx9.js → lodash-Ce0IJ8Y3.js} +1 -1
- package/dist/{restaurant-BTpBmfBV.js → restaurant-DiYb0pCm.js} +2 -2
- package/dist/{role-Z9s80hOy.js → role-DkTkfUgR.js} +2 -2
- package/dist/rule-B-REsmVM.js +771 -0
- package/dist/src/views/audit-log/export-lines.d.ts +8 -0
- package/dist/src/views/audit-log/locales/index.d.ts +68 -12
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-DCwd8GWN.js → useAppStore-BGhlB1_1.js} +1 -1
- package/dist/{useLoading-CXzTpIVv.js → useLoading-CvgqVDbF.js} +1 -1
- package/dist/{useReportPermissions-VnFzkyAH.js → useReportPermissions-VCzAQXKz.js} +5 -5
- package/package.json +2 -2
- package/dist/rule-DpoKkvLa.js +0 -1121
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { defineComponent as Mt, ref as S, computed as A, onMounted as
|
|
2
|
-
import { d as D } from "./dayjs.min-
|
|
3
|
-
import { useI18n as Ot, useCoreStore as
|
|
4
|
-
import {
|
|
5
|
-
import { components as
|
|
6
|
-
import { g as
|
|
7
|
-
import { S as Pe, _ as
|
|
8
|
-
import { _ as
|
|
9
|
-
import { _ as
|
|
10
|
-
import { t as
|
|
11
|
-
import { defineStore as
|
|
12
|
-
import { u as
|
|
13
|
-
const
|
|
1
|
+
import { defineComponent as Mt, ref as S, computed as A, onMounted as Ao, onBeforeUnmount as Fo, watch as de, resolveComponent as N, createElementBlock as b, openBlock as v, createBlock as ke, createCommentVNode as j, createElementVNode as a, Fragment as q, renderList as ae, withCtx as B, createVNode as m, toDisplayString as l, unref as c, nextTick as Mo, onUnmounted as Oo, createTextVNode as Ve, normalizeClass as Do } from "vue";
|
|
2
|
+
import { d as D } from "./dayjs.min-DcI2auGP.js";
|
|
3
|
+
import { useI18n as Ot, useCoreStore as jo } from "@feedmepos/mf-common";
|
|
4
|
+
import { B as St, _ as Co } from "./app-DlSD8S9A.js";
|
|
5
|
+
import { components as ue } from "@feedmepos/ui-library";
|
|
6
|
+
import { g as Ze, b as et } from "./restaurant-DiYb0pCm.js";
|
|
7
|
+
import { S as Pe, _ as To } from "./SelectFilter-ATOm0hdn.js";
|
|
8
|
+
import { _ as Vo } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
|
|
9
|
+
import { _ as Po } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
|
|
10
|
+
import { t as Eo, p as kt } from "./rule-B-REsmVM.js";
|
|
11
|
+
import { defineStore as $o } from "pinia";
|
|
12
|
+
import { u as No } from "./useDebounce-B8ZPVS5C.js";
|
|
13
|
+
const Le = [
|
|
14
14
|
{ key: "all", label: "All", subjectPrefixes: [] },
|
|
15
15
|
{ key: "inventory", label: "Inventory", subjectPrefixes: ["business::inventory", "inventory"] },
|
|
16
16
|
{ key: "report", label: "Report", subjectPrefixes: ["business::report", "report"] },
|
|
@@ -20,64 +20,64 @@ const xe = [
|
|
|
20
20
|
{ key: "crm", label: "CRM", subjectPrefixes: ["business::crm", "crm"] }
|
|
21
21
|
// Add more as modules are revamped with new actionguard:
|
|
22
22
|
// { key: 'restaurantOperation', label: 'Restaurant Operation', subjectPrefixes: ['restaurant'] },
|
|
23
|
-
],
|
|
23
|
+
], tt = "/audit-logs", Ee = {
|
|
24
24
|
async count(t) {
|
|
25
|
-
var
|
|
25
|
+
var r, d, g, p, h, i, C;
|
|
26
26
|
const o = {
|
|
27
27
|
...t != null && t.from ? { from: t.from } : {},
|
|
28
28
|
...t != null && t.to ? { to: t.to } : {},
|
|
29
|
-
...(
|
|
30
|
-
...(
|
|
29
|
+
...(r = t == null ? void 0 : t.userIds) != null && r.length ? { userIds: t.userIds } : {},
|
|
30
|
+
...(d = t == null ? void 0 : t.subjects) != null && d.length ? { subjects: t.subjects } : {},
|
|
31
31
|
...(g = t == null ? void 0 : t.subjectPrefixes) != null && g.length ? { subjectPrefixes: t.subjectPrefixes } : {},
|
|
32
|
-
...(
|
|
32
|
+
...(p = t == null ? void 0 : t.actions) != null && p.length ? { actions: t.actions } : {},
|
|
33
33
|
...(h = t == null ? void 0 : t.outcomes) != null && h.length ? { outcomes: t.outcomes } : {},
|
|
34
34
|
...t != null && t.feedmeAdminActors ? { feedmeAdminActors: !0 } : {},
|
|
35
35
|
...t != null && t.search ? { search: t.search } : {},
|
|
36
|
-
...(
|
|
36
|
+
...(i = t == null ? void 0 : t.searchUserIds) != null && i.length ? { searchUserIds: t.searchUserIds } : {},
|
|
37
37
|
...(C = t == null ? void 0 : t.searchSubjects) != null && C.length ? { searchSubjects: t.searchSubjects } : {}
|
|
38
38
|
};
|
|
39
|
-
return (await
|
|
40
|
-
await
|
|
39
|
+
return (await Ze(
|
|
40
|
+
await et().get(`${tt}/count`, {
|
|
41
41
|
params: o,
|
|
42
42
|
paramsSerializer: (O) => {
|
|
43
|
-
const
|
|
44
|
-
for (const [
|
|
43
|
+
const k = new URLSearchParams();
|
|
44
|
+
for (const [V, L] of Object.entries(O))
|
|
45
45
|
if (Array.isArray(L))
|
|
46
|
-
for (const I of L)
|
|
47
|
-
else L != null &&
|
|
48
|
-
return
|
|
46
|
+
for (const I of L) k.append(V, String(I));
|
|
47
|
+
else L != null && k.append(V, String(L));
|
|
48
|
+
return k.toString();
|
|
49
49
|
}
|
|
50
50
|
})
|
|
51
51
|
)).total;
|
|
52
52
|
},
|
|
53
53
|
async read(t) {
|
|
54
|
-
var
|
|
54
|
+
var n, r, d, g, p, h, i;
|
|
55
55
|
const o = {
|
|
56
56
|
limit: (t == null ? void 0 : t.limit) ?? 100,
|
|
57
57
|
offset: (t == null ? void 0 : t.offset) ?? 0,
|
|
58
58
|
...t != null && t.from ? { from: t.from } : {},
|
|
59
59
|
...t != null && t.to ? { to: t.to } : {},
|
|
60
|
-
...(
|
|
60
|
+
...(n = t == null ? void 0 : t.userIds) != null && n.length ? { userIds: t.userIds } : {},
|
|
61
61
|
...t != null && t.feedmeAdminActors ? { feedmeAdminActors: !0 } : {},
|
|
62
|
-
...(
|
|
63
|
-
...(
|
|
62
|
+
...(r = t == null ? void 0 : t.subjects) != null && r.length ? { subjects: t.subjects } : {},
|
|
63
|
+
...(d = t == null ? void 0 : t.subjectPrefixes) != null && d.length ? { subjectPrefixes: t.subjectPrefixes } : {},
|
|
64
64
|
...(g = t == null ? void 0 : t.actions) != null && g.length ? { actions: t.actions } : {},
|
|
65
|
-
...(
|
|
65
|
+
...(p = t == null ? void 0 : t.outcomes) != null && p.length ? { outcomes: t.outcomes } : {},
|
|
66
66
|
...t != null && t.search ? { search: t.search } : {},
|
|
67
67
|
...(h = t == null ? void 0 : t.searchUserIds) != null && h.length ? { searchUserIds: t.searchUserIds } : {},
|
|
68
|
-
...(
|
|
68
|
+
...(i = t == null ? void 0 : t.searchSubjects) != null && i.length ? { searchSubjects: t.searchSubjects } : {}
|
|
69
69
|
};
|
|
70
|
-
return
|
|
71
|
-
await
|
|
70
|
+
return Ze(
|
|
71
|
+
await et().get(tt, {
|
|
72
72
|
params: o,
|
|
73
73
|
// Serialize arrays as repeated params: key=val1&key=val2
|
|
74
74
|
// (NestJS @Query expects this; axios default adds brackets which break matching)
|
|
75
75
|
paramsSerializer: (C) => {
|
|
76
76
|
const O = new URLSearchParams();
|
|
77
|
-
for (const [
|
|
78
|
-
if (Array.isArray(
|
|
79
|
-
for (const L of
|
|
80
|
-
else
|
|
77
|
+
for (const [k, V] of Object.entries(C))
|
|
78
|
+
if (Array.isArray(V))
|
|
79
|
+
for (const L of V) O.append(k, String(L));
|
|
80
|
+
else V != null && O.append(k, String(V));
|
|
81
81
|
return O.toString();
|
|
82
82
|
}
|
|
83
83
|
})
|
|
@@ -93,14 +93,14 @@ const xe = [
|
|
|
93
93
|
...t != null && t.from ? { from: t.from } : {},
|
|
94
94
|
...t != null && t.to ? { to: t.to } : {}
|
|
95
95
|
};
|
|
96
|
-
return
|
|
97
|
-
await
|
|
96
|
+
return Ze(
|
|
97
|
+
await et().get(`${tt}/actors`, { params: o })
|
|
98
98
|
);
|
|
99
99
|
}
|
|
100
|
-
},
|
|
100
|
+
}, Uo = { class: "flex h-[46px] items-center gap-8 rounded-sm px-16 hover:bg-fm-color-opacity-sm" }, Ro = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ko = {
|
|
101
101
|
"data-more-measure": "",
|
|
102
102
|
class: "flex h-[46px] items-center gap-8 rounded-sm px-16"
|
|
103
|
-
},
|
|
103
|
+
}, Bo = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Yo = /* @__PURE__ */ Mt({
|
|
104
104
|
__name: "AuditLogModuleTabs",
|
|
105
105
|
props: {
|
|
106
106
|
modelValue: {},
|
|
@@ -108,92 +108,92 @@ const xe = [
|
|
|
108
108
|
},
|
|
109
109
|
emits: ["update:modelValue"],
|
|
110
110
|
setup(t, { emit: o }) {
|
|
111
|
-
const
|
|
112
|
-
let
|
|
113
|
-
async function
|
|
114
|
-
if (await
|
|
115
|
-
const
|
|
116
|
-
|
|
111
|
+
const n = t, r = o, { t: d } = Ot(), g = S(!1), p = S(null), h = S(null), i = S([]), C = S(0), O = S(0);
|
|
112
|
+
let k = null;
|
|
113
|
+
async function V() {
|
|
114
|
+
if (await Mo(), !h.value) return;
|
|
115
|
+
const _ = h.value.querySelectorAll("[data-tab-measure]");
|
|
116
|
+
i.value = Array.from(_).map((E) => E.offsetWidth);
|
|
117
117
|
const M = h.value.querySelector("[data-more-measure]");
|
|
118
118
|
C.value = (M == null ? void 0 : M.offsetWidth) ?? 0;
|
|
119
119
|
}
|
|
120
120
|
const L = A(() => {
|
|
121
|
-
const
|
|
122
|
-
if (
|
|
123
|
-
if (!O.value ||
|
|
124
|
-
const M =
|
|
125
|
-
if (M.reduce((
|
|
121
|
+
const _ = n.items.length;
|
|
122
|
+
if (_ === 0) return 0;
|
|
123
|
+
if (!O.value || i.value.length !== _) return _;
|
|
124
|
+
const M = i.value;
|
|
125
|
+
if (M.reduce((w, ce) => w + ce, 0) <= O.value) return _;
|
|
126
126
|
const T = C.value;
|
|
127
|
-
let Y = 0,
|
|
128
|
-
for (let
|
|
129
|
-
Y += M[
|
|
130
|
-
return
|
|
127
|
+
let Y = 0, U = 0;
|
|
128
|
+
for (let w = 0; w < _ && !(Y + M[w] + T > O.value); w++)
|
|
129
|
+
Y += M[w], U++;
|
|
130
|
+
return U;
|
|
131
131
|
}), I = A(() => {
|
|
132
|
-
const
|
|
133
|
-
if (
|
|
134
|
-
const E =
|
|
132
|
+
const _ = L.value, M = n.items.length;
|
|
133
|
+
if (_ >= M) return [...n.items];
|
|
134
|
+
const E = n.items.slice(0, _), T = n.items.find((J) => J.value === n.modelValue);
|
|
135
135
|
if (!T || E.some((J) => J.value === T.value)) return E;
|
|
136
|
-
if (
|
|
137
|
-
const Y =
|
|
138
|
-
let
|
|
139
|
-
for (;
|
|
140
|
-
|
|
141
|
-
return [...
|
|
136
|
+
if (_ === 0) return [T];
|
|
137
|
+
const Y = n.items.findIndex((J) => J.value === T.value), U = i.value, w = C.value, ce = U[Y] ?? 0;
|
|
138
|
+
let ne = _, Ie = U.slice(0, ne - 1).reduce((J, he) => J + he, 0);
|
|
139
|
+
for (; ne > 1 && Ie + ce + w > O.value; )
|
|
140
|
+
ne--, Ie = U.slice(0, ne - 1).reduce((J, he) => J + he, 0);
|
|
141
|
+
return [...n.items.slice(0, Math.max(ne - 1, 0)), T];
|
|
142
142
|
}), K = A(() => {
|
|
143
|
-
const
|
|
144
|
-
return
|
|
143
|
+
const _ = new Set(I.value.map((M) => M.value));
|
|
144
|
+
return n.items.filter((M) => !_.has(M.value));
|
|
145
145
|
});
|
|
146
|
-
function
|
|
147
|
-
g.value = !1,
|
|
146
|
+
function W(_) {
|
|
147
|
+
g.value = !1, r("update:modelValue", _);
|
|
148
148
|
}
|
|
149
|
-
return
|
|
150
|
-
await
|
|
151
|
-
|
|
152
|
-
}),
|
|
153
|
-
}),
|
|
154
|
-
|
|
155
|
-
}),
|
|
156
|
-
() =>
|
|
149
|
+
return Ao(async () => {
|
|
150
|
+
await V(), p.value && (O.value = p.value.clientWidth, k = new ResizeObserver(() => {
|
|
151
|
+
p.value && (O.value = p.value.clientWidth);
|
|
152
|
+
}), k.observe(p.value));
|
|
153
|
+
}), Fo(() => {
|
|
154
|
+
k == null || k.disconnect(), k = null;
|
|
155
|
+
}), de(
|
|
156
|
+
() => n.items,
|
|
157
157
|
() => {
|
|
158
|
-
|
|
158
|
+
V();
|
|
159
159
|
},
|
|
160
160
|
{ deep: !0 }
|
|
161
|
-
), (
|
|
162
|
-
const E =
|
|
163
|
-
return v(),
|
|
161
|
+
), (_, M) => {
|
|
162
|
+
const E = N("FmTab"), T = N("FmIcon"), Y = N("FmMenuItem"), U = N("FmMenu");
|
|
163
|
+
return v(), b("div", {
|
|
164
164
|
ref_key: "containerRef",
|
|
165
|
-
ref:
|
|
165
|
+
ref: p,
|
|
166
166
|
class: "relative flex w-full flex-row items-center"
|
|
167
167
|
}, [
|
|
168
|
-
(v(!0),
|
|
169
|
-
key:
|
|
168
|
+
(v(!0), b(q, null, ae(I.value, (w) => (v(), ke(E, {
|
|
169
|
+
key: w.value,
|
|
170
170
|
"model-value": t.modelValue,
|
|
171
|
-
label:
|
|
172
|
-
badge:
|
|
173
|
-
disabled:
|
|
174
|
-
value:
|
|
175
|
-
"onUpdate:modelValue":
|
|
171
|
+
label: w.label,
|
|
172
|
+
badge: w.badge,
|
|
173
|
+
disabled: w.disabled,
|
|
174
|
+
value: w.value,
|
|
175
|
+
"onUpdate:modelValue": W
|
|
176
176
|
}, null, 8, ["model-value", "label", "badge", "disabled", "value"]))), 128)),
|
|
177
|
-
K.value.length > 0 ? (v(),
|
|
177
|
+
K.value.length > 0 ? (v(), ke(U, {
|
|
178
178
|
key: 0,
|
|
179
179
|
"show-menu": g.value,
|
|
180
180
|
class: "max-w-[360px] min-w-[90px] rounded-sm",
|
|
181
181
|
placement: "bottom-start",
|
|
182
|
-
onMenuChanged: M[0] || (M[0] = (
|
|
182
|
+
onMenuChanged: M[0] || (M[0] = (w) => g.value = w)
|
|
183
183
|
}, {
|
|
184
184
|
"menu-button": B(() => [
|
|
185
|
-
a("div",
|
|
185
|
+
a("div", Uo, [
|
|
186
186
|
m(T, { name: "more_vert" }),
|
|
187
|
-
a("span",
|
|
187
|
+
a("span", Ro, l(c(d)("auditLog.modules.more")), 1)
|
|
188
188
|
])
|
|
189
189
|
]),
|
|
190
190
|
default: B(() => [
|
|
191
|
-
(v(!0),
|
|
192
|
-
key:
|
|
193
|
-
"model-value": t.modelValue ===
|
|
194
|
-
label:
|
|
195
|
-
disabled:
|
|
196
|
-
onClick: (
|
|
191
|
+
(v(!0), b(q, null, ae(K.value, (w) => (v(), ke(Y, {
|
|
192
|
+
key: w.value,
|
|
193
|
+
"model-value": t.modelValue === w.value,
|
|
194
|
+
label: w.label,
|
|
195
|
+
disabled: w.disabled,
|
|
196
|
+
onClick: (ce) => W(w.value)
|
|
197
197
|
}, null, 8, ["model-value", "label", "disabled", "onClick"]))), 128))
|
|
198
198
|
]),
|
|
199
199
|
_: 1
|
|
@@ -204,40 +204,40 @@ const xe = [
|
|
|
204
204
|
"aria-hidden": "true",
|
|
205
205
|
class: "pointer-events-none invisible absolute -left-[9999px] -top-[9999px] flex flex-row items-center"
|
|
206
206
|
}, [
|
|
207
|
-
(v(!0),
|
|
208
|
-
key: `measure-${
|
|
207
|
+
(v(!0), b(q, null, ae(t.items, (w) => (v(), b("div", {
|
|
208
|
+
key: `measure-${w.value}`,
|
|
209
209
|
"data-tab-measure": ""
|
|
210
210
|
}, [
|
|
211
211
|
m(E, {
|
|
212
212
|
"model-value": t.modelValue,
|
|
213
|
-
label:
|
|
214
|
-
badge:
|
|
215
|
-
disabled:
|
|
216
|
-
value:
|
|
213
|
+
label: w.label,
|
|
214
|
+
badge: w.badge,
|
|
215
|
+
disabled: w.disabled,
|
|
216
|
+
value: w.value
|
|
217
217
|
}, null, 8, ["model-value", "label", "badge", "disabled", "value"])
|
|
218
218
|
]))), 128)),
|
|
219
|
-
a("div",
|
|
219
|
+
a("div", Ko, [
|
|
220
220
|
m(T, { name: "more_vert" }),
|
|
221
|
-
a("span",
|
|
221
|
+
a("span", Bo, l(c(d)("auditLog.modules.more")), 1)
|
|
222
222
|
])
|
|
223
223
|
], 512)
|
|
224
224
|
], 512);
|
|
225
225
|
};
|
|
226
226
|
}
|
|
227
|
-
}),
|
|
228
|
-
const t = S([]), o = S(!1),
|
|
227
|
+
}), zo = $o("team", () => {
|
|
228
|
+
const t = S([]), o = S(!1), n = S(!1), r = A(
|
|
229
229
|
() => Object.fromEntries(t.value.map((h) => [h.doc.userId, h.name]))
|
|
230
|
-
),
|
|
230
|
+
), d = A(
|
|
231
231
|
() => Object.fromEntries(t.value.map((h) => [h.doc.userId, h.email]))
|
|
232
232
|
), g = A(
|
|
233
233
|
() => Object.fromEntries(t.value.map((h) => [h.doc.userId, h.phoneNumber]))
|
|
234
234
|
);
|
|
235
|
-
async function
|
|
235
|
+
async function p({ force: h = !1 } = {}) {
|
|
236
236
|
if (!(!h && t.value.length > 0))
|
|
237
237
|
try {
|
|
238
238
|
o.value = !0;
|
|
239
|
-
const
|
|
240
|
-
t.value =
|
|
239
|
+
const i = await Eo.readTeamMembers();
|
|
240
|
+
t.value = i.sort((C, O) => C.doc.isOwner ? -1 : C.name.localeCompare(O.name)), n.value = !0;
|
|
241
241
|
} finally {
|
|
242
242
|
o.value = !1;
|
|
243
243
|
}
|
|
@@ -245,45 +245,45 @@ const xe = [
|
|
|
245
245
|
return {
|
|
246
246
|
members: t,
|
|
247
247
|
isLoading: o,
|
|
248
|
-
hasLoaded:
|
|
249
|
-
userIdToName:
|
|
250
|
-
userIdToEmail:
|
|
248
|
+
hasLoaded: n,
|
|
249
|
+
userIdToName: r,
|
|
250
|
+
userIdToEmail: d,
|
|
251
251
|
userIdToPhone: g,
|
|
252
|
-
readTeamMembers:
|
|
252
|
+
readTeamMembers: p
|
|
253
253
|
};
|
|
254
254
|
});
|
|
255
|
-
function
|
|
255
|
+
function qo(t) {
|
|
256
256
|
const o = t.indexOf(".");
|
|
257
257
|
return o <= 0 || o === t.length - 1 ? null : { entity: t.slice(0, o), verb: t.slice(o + 1) };
|
|
258
258
|
}
|
|
259
|
-
function
|
|
259
|
+
function wt(t) {
|
|
260
260
|
const o = t.split("-").join(" ");
|
|
261
261
|
return o.charAt(0).toUpperCase() + o.slice(1);
|
|
262
262
|
}
|
|
263
|
-
function
|
|
264
|
-
const
|
|
265
|
-
return
|
|
263
|
+
function Jo(t, o, n) {
|
|
264
|
+
const r = t(o, n);
|
|
265
|
+
return r === o ? null : r;
|
|
266
266
|
}
|
|
267
|
-
function
|
|
268
|
-
const { eventKey:
|
|
269
|
-
if (
|
|
270
|
-
const g =
|
|
267
|
+
function st(t, o) {
|
|
268
|
+
const { eventKey: n, params: r, operationLabel: d } = o;
|
|
269
|
+
if (n) {
|
|
270
|
+
const g = Jo(t, `auditLog.event.sentence.${n}`, r);
|
|
271
271
|
if (g) return g;
|
|
272
|
-
const
|
|
273
|
-
if (
|
|
274
|
-
const h = `${
|
|
275
|
-
return
|
|
272
|
+
const p = qo(n);
|
|
273
|
+
if (p) {
|
|
274
|
+
const h = `${wt(p.verb)} ${wt(p.entity)}`, i = (r == null ? void 0 : r.label) ?? (r == null ? void 0 : r.name);
|
|
275
|
+
return i !== void 0 && i !== "" ? `${h} — ${i}` : h;
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
|
-
return
|
|
278
|
+
return d ?? "";
|
|
279
279
|
}
|
|
280
|
-
function
|
|
280
|
+
function ge(t) {
|
|
281
281
|
return typeof t == "object" && t !== null && !Array.isArray(t);
|
|
282
282
|
}
|
|
283
283
|
function we(t) {
|
|
284
284
|
return Array.isArray(t);
|
|
285
285
|
}
|
|
286
|
-
function
|
|
286
|
+
function Ne(t) {
|
|
287
287
|
if (t === null) return "null";
|
|
288
288
|
if (typeof t == "object")
|
|
289
289
|
try {
|
|
@@ -293,398 +293,429 @@ function Re(t) {
|
|
|
293
293
|
}
|
|
294
294
|
return String(t);
|
|
295
295
|
}
|
|
296
|
-
function
|
|
296
|
+
function Ho(t, o) {
|
|
297
297
|
return t ? `${t}.${o}` : o;
|
|
298
298
|
}
|
|
299
|
-
function
|
|
299
|
+
function It(t) {
|
|
300
300
|
if (typeof t != "string") return { ok: !1, value: void 0 };
|
|
301
301
|
const o = t.trim();
|
|
302
302
|
if (!o.startsWith("{") && !o.startsWith("[")) return { ok: !1, value: void 0 };
|
|
303
303
|
try {
|
|
304
|
-
const
|
|
305
|
-
return
|
|
304
|
+
const n = JSON.parse(o);
|
|
305
|
+
return ge(n) || we(n) ? { ok: !0, value: n } : { ok: !1, value: void 0 };
|
|
306
306
|
} catch {
|
|
307
307
|
return { ok: !1, value: void 0 };
|
|
308
308
|
}
|
|
309
309
|
}
|
|
310
|
-
const
|
|
311
|
-
function
|
|
310
|
+
const Wo = ["_id", "id", "subject", "key", "name"];
|
|
311
|
+
function Go(t, o) {
|
|
312
312
|
if (t.length === 0 || o.length === 0) return null;
|
|
313
|
-
const
|
|
314
|
-
const
|
|
315
|
-
return
|
|
313
|
+
const n = (d, g) => d.every((p) => ge(p) && p[g] !== void 0), r = (d, g) => {
|
|
314
|
+
const p = d.map((h) => h[g]);
|
|
315
|
+
return p.length === new Set(p).size;
|
|
316
316
|
};
|
|
317
|
-
for (const
|
|
318
|
-
if (
|
|
319
|
-
return
|
|
317
|
+
for (const d of Wo)
|
|
318
|
+
if (n(t, d) && n(o, d) && r(t, d) && r(o, d))
|
|
319
|
+
return d;
|
|
320
320
|
return null;
|
|
321
321
|
}
|
|
322
|
-
function Dt(t, o,
|
|
323
|
-
|
|
322
|
+
function Dt(t, o, n) {
|
|
323
|
+
n.push({ path: t, type: "added", before: null, after: Ne(o) });
|
|
324
324
|
}
|
|
325
|
-
function jt(t, o,
|
|
326
|
-
|
|
325
|
+
function jt(t, o, n) {
|
|
326
|
+
n.push({ path: t, type: "removed", before: Ne(o), after: null });
|
|
327
327
|
}
|
|
328
|
-
function
|
|
329
|
-
const
|
|
330
|
-
for (const g of Array.from(
|
|
331
|
-
const
|
|
332
|
-
Ue(
|
|
328
|
+
function Xo(t, o, n, r) {
|
|
329
|
+
const d = /* @__PURE__ */ new Set([...Object.keys(o), ...Object.keys(n)]);
|
|
330
|
+
for (const g of Array.from(d)) {
|
|
331
|
+
const p = Object.prototype.hasOwnProperty.call(o, g), h = Object.prototype.hasOwnProperty.call(n, g);
|
|
332
|
+
Ue(Ho(t, g), o[g], p, n[g], h, r);
|
|
333
333
|
}
|
|
334
334
|
}
|
|
335
|
-
function
|
|
336
|
-
const
|
|
337
|
-
if (
|
|
335
|
+
function Qo(t, o, n, r) {
|
|
336
|
+
const d = Go(o, n);
|
|
337
|
+
if (d) {
|
|
338
338
|
const L = new Map(
|
|
339
|
-
o.map((
|
|
339
|
+
o.map((_) => [_[d], _])
|
|
340
340
|
), I = new Map(
|
|
341
|
-
|
|
342
|
-
), K = Array.from(L.keys()).concat(Array.from(I.keys())),
|
|
343
|
-
for (const
|
|
344
|
-
const M = L.has(
|
|
341
|
+
n.map((_) => [_[d], _])
|
|
342
|
+
), K = Array.from(L.keys()).concat(Array.from(I.keys())), W = Array.from(new Set(K));
|
|
343
|
+
for (const _ of W) {
|
|
344
|
+
const M = L.has(_), E = I.has(_), T = `${t}[${String(_)}]`;
|
|
345
345
|
Ue(
|
|
346
346
|
T,
|
|
347
|
-
L.get(
|
|
347
|
+
L.get(_),
|
|
348
348
|
M,
|
|
349
|
-
I.get(
|
|
349
|
+
I.get(_),
|
|
350
350
|
E,
|
|
351
|
-
|
|
351
|
+
r
|
|
352
352
|
);
|
|
353
353
|
}
|
|
354
354
|
return;
|
|
355
355
|
}
|
|
356
|
-
const g = o.map((L, I) => ({ sig: JSON.stringify(L), idx: I, item: L })),
|
|
356
|
+
const g = o.map((L, I) => ({ sig: JSON.stringify(L), idx: I, item: L })), p = n.map((L, I) => ({ sig: JSON.stringify(L), idx: I, item: L })), h = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
|
|
357
357
|
for (const L of g)
|
|
358
358
|
h.has(L.sig) || h.set(L.sig, []), h.get(L.sig).push(L);
|
|
359
|
-
for (const L of
|
|
360
|
-
|
|
361
|
-
const C = [], O = [],
|
|
362
|
-
for (const L of
|
|
363
|
-
const I = h.get(L) || [], K =
|
|
364
|
-
for (let
|
|
365
|
-
C.push({ idx: I[
|
|
366
|
-
for (let
|
|
367
|
-
O.push({ idx: K[
|
|
359
|
+
for (const L of p)
|
|
360
|
+
i.has(L.sig) || i.set(L.sig, []), i.get(L.sig).push(L);
|
|
361
|
+
const C = [], O = [], k = Array.from(h.keys()).concat(Array.from(i.keys())), V = Array.from(new Set(k));
|
|
362
|
+
for (const L of V) {
|
|
363
|
+
const I = h.get(L) || [], K = i.get(L) || [], W = Math.min(I.length, K.length);
|
|
364
|
+
for (let _ = W; _ < I.length; _++)
|
|
365
|
+
C.push({ idx: I[_].idx, item: I[_].item });
|
|
366
|
+
for (let _ = W; _ < K.length; _++)
|
|
367
|
+
O.push({ idx: K[_].idx, item: K[_].item });
|
|
368
368
|
}
|
|
369
369
|
for (const { idx: L, item: I } of C)
|
|
370
|
-
jt(`${t}[${L}]`, I,
|
|
370
|
+
jt(`${t}[${L}]`, I, r);
|
|
371
371
|
for (const { idx: L, item: I } of O)
|
|
372
|
-
Dt(`${t}[${L}]`, I,
|
|
372
|
+
Dt(`${t}[${L}]`, I, r);
|
|
373
373
|
}
|
|
374
|
-
function Ue(t, o,
|
|
375
|
-
if (!
|
|
376
|
-
if (
|
|
374
|
+
function Ue(t, o, n, r, d, g) {
|
|
375
|
+
if (!n && !d) return;
|
|
376
|
+
if (n && !d) {
|
|
377
377
|
jt(t, o, g);
|
|
378
378
|
return;
|
|
379
379
|
}
|
|
380
|
-
if (!
|
|
381
|
-
Dt(t,
|
|
380
|
+
if (!n && d) {
|
|
381
|
+
Dt(t, r, g);
|
|
382
382
|
return;
|
|
383
383
|
}
|
|
384
|
-
if (JSON.stringify(o) === JSON.stringify(
|
|
385
|
-
if (
|
|
386
|
-
|
|
384
|
+
if (JSON.stringify(o) === JSON.stringify(r)) return;
|
|
385
|
+
if (ge(o) && ge(r)) {
|
|
386
|
+
Xo(t, o, r, g);
|
|
387
387
|
return;
|
|
388
388
|
}
|
|
389
|
-
if (we(o) && we(
|
|
390
|
-
|
|
389
|
+
if (we(o) && we(r)) {
|
|
390
|
+
Qo(t, o, r, g);
|
|
391
391
|
return;
|
|
392
392
|
}
|
|
393
|
-
const
|
|
394
|
-
if (
|
|
395
|
-
Ue(t,
|
|
393
|
+
const p = It(o), h = It(r);
|
|
394
|
+
if (p.ok && h.ok) {
|
|
395
|
+
Ue(t, p.value, !0, h.value, !0, g);
|
|
396
396
|
return;
|
|
397
397
|
}
|
|
398
398
|
g.push({
|
|
399
399
|
path: t,
|
|
400
400
|
type: "changed",
|
|
401
|
-
before:
|
|
402
|
-
after:
|
|
401
|
+
before: Ne(o),
|
|
402
|
+
after: Ne(r)
|
|
403
403
|
});
|
|
404
404
|
}
|
|
405
|
-
function
|
|
405
|
+
function Zo(t, o) {
|
|
406
406
|
if (JSON.stringify(t) === JSON.stringify(o)) return [];
|
|
407
|
-
const
|
|
408
|
-
let
|
|
409
|
-
|
|
407
|
+
const n = t == null, r = o == null;
|
|
408
|
+
let d = t;
|
|
409
|
+
n && (ge(o) ? d = {} : we(o) && (d = []));
|
|
410
410
|
let g = o;
|
|
411
|
-
|
|
412
|
-
const
|
|
413
|
-
return Ue("",
|
|
411
|
+
r && (ge(t) ? g = {} : we(t) && (g = []));
|
|
412
|
+
const p = [];
|
|
413
|
+
return Ue("", d, !0, g, !0, p), p;
|
|
414
414
|
}
|
|
415
|
-
function
|
|
415
|
+
function At(t) {
|
|
416
416
|
const o = t.operations;
|
|
417
|
-
return !o || o.length === 0 ? !1 : o.some((
|
|
417
|
+
return !o || o.length === 0 ? !1 : o.some((n) => n.status === "failed");
|
|
418
418
|
}
|
|
419
|
-
function
|
|
419
|
+
function pe(t) {
|
|
420
420
|
return t === void 0 ? "—" : Array.isArray(t) ? t.length > 0 ? t.join(", ") : "—" : t || "—";
|
|
421
421
|
}
|
|
422
|
-
function
|
|
422
|
+
function es(t) {
|
|
423
423
|
return {
|
|
424
424
|
label: t.label,
|
|
425
425
|
labelKey: t.labelKey,
|
|
426
426
|
type: t.type,
|
|
427
|
-
beforeDisplay:
|
|
428
|
-
afterDisplay:
|
|
427
|
+
beforeDisplay: pe(t.before),
|
|
428
|
+
afterDisplay: pe(t.after)
|
|
429
429
|
};
|
|
430
430
|
}
|
|
431
|
-
function
|
|
431
|
+
function ts(t) {
|
|
432
432
|
return Array.isArray(t) && t.length > 0;
|
|
433
433
|
}
|
|
434
|
-
|
|
434
|
+
function Ct(t, o, n) {
|
|
435
|
+
return n.labelKey && o(n.labelKey) ? t(n.labelKey) : n.label;
|
|
436
|
+
}
|
|
437
|
+
function Tt(t, o) {
|
|
438
|
+
return st(t, o) || t("auditLog.operation.unlabeled");
|
|
439
|
+
}
|
|
440
|
+
function os(t, o) {
|
|
441
|
+
return !o || o.length === 0 ? "" : o.map((n) => {
|
|
442
|
+
const r = Tt(t, n), d = t(`auditLog.outcome.${n.status}`);
|
|
443
|
+
let g = `${r}: ${d}`;
|
|
444
|
+
return n.status === "failed" && n.errorMessage && (g += ` — ${n.errorMessage}`), g;
|
|
445
|
+
}).join(`
|
|
446
|
+
`);
|
|
447
|
+
}
|
|
448
|
+
function ss(t, o, n) {
|
|
449
|
+
const r = Ct(t, o, n);
|
|
450
|
+
return n.type === "add" ? `${r}: + ${pe(n.after)}` : n.type === "remove" ? `${r}: - ${pe(n.before)}` : `${r}: ${pe(n.before)} → ${pe(n.after)}`;
|
|
451
|
+
}
|
|
452
|
+
function as(t, o, n) {
|
|
453
|
+
if (!n || n.length === 0) return "";
|
|
454
|
+
const r = n.filter((p) => p.changeNodes && p.changeNodes.length > 0);
|
|
455
|
+
if (r.length === 0) return "";
|
|
456
|
+
const d = r.length > 1;
|
|
457
|
+
return r.map((p) => {
|
|
458
|
+
const h = (p.changeNodes ?? []).map((i) => ss(t, o, i));
|
|
459
|
+
return d ? [`[${Tt(t, p)}]`, ...h].join(`
|
|
460
|
+
`) : h.join(`
|
|
461
|
+
`);
|
|
462
|
+
}).join(`
|
|
463
|
+
`);
|
|
464
|
+
}
|
|
465
|
+
const ns = {
|
|
435
466
|
class: "flex flex-col gap-4 p-12 w-[260px]"
|
|
436
|
-
},
|
|
467
|
+
}, ls = {
|
|
437
468
|
class: "text-xs font-semibold text-fm-color-typo-secondary mb-4"
|
|
438
|
-
},
|
|
469
|
+
}, rs = {
|
|
439
470
|
class: "flex min-h-0 flex-1 flex-col gap-16"
|
|
440
|
-
},
|
|
471
|
+
}, is = {
|
|
441
472
|
class: "space-y-16"
|
|
442
|
-
},
|
|
473
|
+
}, us = {
|
|
443
474
|
class: "flex flex-wrap items-center gap-8"
|
|
444
|
-
},
|
|
475
|
+
}, ds = {
|
|
445
476
|
class: "w-fit"
|
|
446
|
-
},
|
|
477
|
+
}, cs = {
|
|
447
478
|
class: "w-fit"
|
|
448
|
-
},
|
|
479
|
+
}, fs = {
|
|
449
480
|
class: "w-fit"
|
|
450
|
-
},
|
|
481
|
+
}, ms = {
|
|
451
482
|
class: "w-fit"
|
|
452
|
-
},
|
|
483
|
+
}, vs = {
|
|
453
484
|
class: "flex h-full flex-col overflow-auto"
|
|
454
|
-
},
|
|
485
|
+
}, ps = {
|
|
455
486
|
key: 0,
|
|
456
487
|
class: "space-y-12 p-4 text-sm"
|
|
457
|
-
},
|
|
488
|
+
}, gs = {
|
|
458
489
|
class: "flex items-start justify-between gap-8 rounded-lg border border-fm-color-border-default p-12"
|
|
459
|
-
},
|
|
490
|
+
}, hs = {
|
|
460
491
|
class: "min-w-0 flex-1"
|
|
461
|
-
},
|
|
492
|
+
}, ys = {
|
|
462
493
|
class: "audit-log-operation-label-detail text-base font-bold leading-snug text-fm-color-typo-primary"
|
|
463
|
-
},
|
|
494
|
+
}, bs = {
|
|
464
495
|
key: 0,
|
|
465
496
|
class: "mt-4 break-all font-mono text-xs text-fm-color-typo-secondary"
|
|
466
|
-
},
|
|
497
|
+
}, _s = {
|
|
467
498
|
class: "flex items-center gap-4"
|
|
468
|
-
},
|
|
499
|
+
}, xs = {
|
|
469
500
|
class: "rounded-lg border border-fm-color-border-default p-12"
|
|
470
|
-
},
|
|
501
|
+
}, Ls = {
|
|
471
502
|
class: "space-y-12"
|
|
472
|
-
},
|
|
473
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
474
|
-
}, bs = {
|
|
475
|
-
class: "font-semibold"
|
|
476
|
-
}, _s = {
|
|
503
|
+
}, Ss = {
|
|
477
504
|
class: "text-xs text-fm-color-typo-secondary"
|
|
478
|
-
},
|
|
505
|
+
}, ks = {
|
|
479
506
|
class: "font-semibold"
|
|
480
|
-
}, Ls = {
|
|
481
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
482
|
-
}, Ss = {
|
|
483
|
-
class: "break-all font-semibold"
|
|
484
507
|
}, ws = {
|
|
485
|
-
key: 0
|
|
486
|
-
}, ks = {
|
|
487
508
|
class: "text-xs text-fm-color-typo-secondary"
|
|
488
509
|
}, Is = {
|
|
489
|
-
class: "
|
|
510
|
+
class: "font-semibold"
|
|
490
511
|
}, As = {
|
|
491
512
|
class: "text-xs text-fm-color-typo-secondary"
|
|
492
513
|
}, Fs = {
|
|
493
|
-
class: "break-all font-
|
|
514
|
+
class: "break-all font-semibold"
|
|
494
515
|
}, Ms = {
|
|
495
|
-
|
|
516
|
+
key: 0
|
|
496
517
|
}, Os = {
|
|
497
|
-
class: "
|
|
518
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
498
519
|
}, Ds = {
|
|
499
|
-
class: "
|
|
520
|
+
class: "break-all font-mono text-xs font-semibold"
|
|
500
521
|
}, js = {
|
|
501
|
-
class: "
|
|
522
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
502
523
|
}, Cs = {
|
|
503
|
-
class: "
|
|
524
|
+
class: "break-all font-mono text-xs font-semibold"
|
|
504
525
|
}, Ts = {
|
|
505
|
-
class: "space-y-12 p-12"
|
|
506
|
-
}, Ps = {
|
|
507
526
|
class: "text-xs text-fm-color-typo-secondary"
|
|
508
527
|
}, Vs = {
|
|
509
528
|
class: "font-semibold"
|
|
510
|
-
},
|
|
529
|
+
}, Ps = {
|
|
511
530
|
class: "rounded-lg border border-fm-color-border-default"
|
|
512
|
-
},
|
|
531
|
+
}, Es = {
|
|
513
532
|
class: "p-12"
|
|
514
|
-
},
|
|
533
|
+
}, $s = {
|
|
515
534
|
class: "text-base font-bold text-fm-color-typo-primary"
|
|
516
535
|
}, Ns = {
|
|
517
536
|
class: "space-y-12 p-12"
|
|
518
|
-
},
|
|
537
|
+
}, Us = {
|
|
519
538
|
class: "text-xs text-fm-color-typo-secondary"
|
|
520
|
-
},
|
|
539
|
+
}, Rs = {
|
|
521
540
|
class: "font-semibold"
|
|
541
|
+
}, Ks = {
|
|
542
|
+
class: "rounded-lg border border-fm-color-border-default"
|
|
522
543
|
}, Bs = {
|
|
523
|
-
|
|
544
|
+
class: "p-12"
|
|
524
545
|
}, Ys = {
|
|
525
|
-
class: "text-
|
|
546
|
+
class: "text-base font-bold text-fm-color-typo-primary"
|
|
526
547
|
}, zs = {
|
|
548
|
+
class: "space-y-12 p-12"
|
|
549
|
+
}, qs = {
|
|
550
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
551
|
+
}, Js = {
|
|
552
|
+
class: "font-semibold"
|
|
553
|
+
}, Hs = {
|
|
554
|
+
key: 0
|
|
555
|
+
}, Ws = {
|
|
556
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
557
|
+
}, Gs = {
|
|
527
558
|
key: 0,
|
|
528
559
|
class: "font-semibold"
|
|
529
|
-
},
|
|
560
|
+
}, Xs = {
|
|
530
561
|
key: 1,
|
|
531
562
|
class: "break-all font-mono text-xs text-fm-color-typo-secondary"
|
|
532
|
-
},
|
|
563
|
+
}, Qs = {
|
|
533
564
|
key: 1
|
|
534
|
-
},
|
|
565
|
+
}, Zs = {
|
|
535
566
|
class: "text-xs text-fm-color-typo-secondary"
|
|
536
|
-
},
|
|
567
|
+
}, ea = {
|
|
537
568
|
class: "font-semibold whitespace-pre-line"
|
|
538
|
-
},
|
|
569
|
+
}, ta = {
|
|
539
570
|
class: "text-xs text-fm-color-typo-secondary"
|
|
540
|
-
},
|
|
571
|
+
}, oa = {
|
|
541
572
|
class: "font-semibold"
|
|
542
|
-
},
|
|
573
|
+
}, sa = {
|
|
543
574
|
class: "text-xs text-fm-color-typo-secondary"
|
|
544
|
-
},
|
|
575
|
+
}, aa = {
|
|
545
576
|
class: "break-all font-mono text-xs font-semibold"
|
|
546
|
-
},
|
|
577
|
+
}, na = {
|
|
547
578
|
key: 2
|
|
548
|
-
},
|
|
579
|
+
}, la = {
|
|
549
580
|
class: "text-xs text-fm-color-typo-secondary"
|
|
550
|
-
},
|
|
581
|
+
}, ra = {
|
|
551
582
|
class: "mt-4 space-y-4"
|
|
552
|
-
},
|
|
583
|
+
}, ia = {
|
|
553
584
|
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"
|
|
554
|
-
},
|
|
585
|
+
}, ua = {
|
|
555
586
|
class: "text-xs font-semibold"
|
|
556
|
-
},
|
|
587
|
+
}, da = {
|
|
557
588
|
key: 0,
|
|
558
589
|
class: "text-fm-color-typo-secondary"
|
|
559
|
-
},
|
|
590
|
+
}, ca = {
|
|
560
591
|
key: 3
|
|
561
|
-
},
|
|
592
|
+
}, fa = {
|
|
562
593
|
class: "text-xs text-fm-color-typo-secondary"
|
|
563
|
-
},
|
|
594
|
+
}, ma = {
|
|
564
595
|
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"
|
|
565
|
-
},
|
|
596
|
+
}, va = {
|
|
566
597
|
key: 0,
|
|
567
598
|
class: "space-y-12 p-4 text-sm"
|
|
568
|
-
},
|
|
599
|
+
}, pa = {
|
|
569
600
|
class: "flex items-start justify-between gap-8 rounded-lg border border-fm-color-border-default p-12"
|
|
570
|
-
},
|
|
601
|
+
}, ga = {
|
|
571
602
|
class: "min-w-0 flex-1"
|
|
572
|
-
},
|
|
603
|
+
}, ha = {
|
|
573
604
|
class: "text-base font-bold leading-snug text-fm-color-typo-primary"
|
|
574
|
-
},
|
|
605
|
+
}, ya = {
|
|
575
606
|
key: 0,
|
|
576
607
|
class: "text-xs text-fm-color-typo-secondary"
|
|
577
|
-
},
|
|
608
|
+
}, ba = {
|
|
578
609
|
class: "rounded-lg border border-fm-color-border-default p-12"
|
|
579
|
-
},
|
|
610
|
+
}, _a = {
|
|
580
611
|
class: "space-y-12"
|
|
581
|
-
},
|
|
612
|
+
}, xa = {
|
|
582
613
|
class: "text-xs text-fm-color-typo-secondary"
|
|
583
|
-
},
|
|
614
|
+
}, La = {
|
|
584
615
|
class: "font-semibold"
|
|
585
|
-
},
|
|
616
|
+
}, Sa = {
|
|
586
617
|
key: 0
|
|
587
|
-
},
|
|
618
|
+
}, ka = {
|
|
588
619
|
class: "text-xs text-fm-color-typo-secondary"
|
|
589
|
-
},
|
|
620
|
+
}, wa = {
|
|
590
621
|
class: "font-semibold"
|
|
591
|
-
},
|
|
622
|
+
}, Ia = {
|
|
592
623
|
key: 1
|
|
593
|
-
},
|
|
624
|
+
}, Aa = {
|
|
594
625
|
class: "text-xs text-fm-color-typo-secondary"
|
|
595
|
-
},
|
|
626
|
+
}, Fa = {
|
|
596
627
|
class: "font-semibold"
|
|
597
|
-
},
|
|
628
|
+
}, Ma = {
|
|
598
629
|
key: 0,
|
|
599
630
|
class: "rounded-lg border border-fm-color-border-default p-12"
|
|
600
|
-
},
|
|
631
|
+
}, Oa = {
|
|
601
632
|
class: "text-xs text-fm-color-typo-secondary"
|
|
602
|
-
},
|
|
633
|
+
}, Da = {
|
|
603
634
|
class: "whitespace-pre-line font-semibold text-fm-color-typo-error"
|
|
604
|
-
},
|
|
635
|
+
}, ja = {
|
|
605
636
|
class: "rounded-lg border border-fm-color-border-default"
|
|
606
|
-
},
|
|
637
|
+
}, Ca = {
|
|
607
638
|
class: "p-12"
|
|
608
|
-
},
|
|
639
|
+
}, Ta = {
|
|
609
640
|
class: "text-base font-bold text-fm-color-typo-primary"
|
|
610
|
-
},
|
|
641
|
+
}, Va = {
|
|
611
642
|
class: "p-12"
|
|
612
|
-
},
|
|
643
|
+
}, Pa = {
|
|
613
644
|
key: 0,
|
|
614
645
|
class: "divide-y divide-fm-color-border-default"
|
|
615
|
-
},
|
|
646
|
+
}, Ea = {
|
|
616
647
|
class: "flex flex-wrap items-center gap-8"
|
|
617
|
-
},
|
|
648
|
+
}, $a = {
|
|
618
649
|
class: "break-all text-xs"
|
|
619
|
-
},
|
|
650
|
+
}, Na = {
|
|
620
651
|
class: "break-all font-mono text-xs"
|
|
621
|
-
},
|
|
652
|
+
}, Ua = {
|
|
622
653
|
key: 0,
|
|
623
654
|
class: "text-fm-color-typo-success"
|
|
624
|
-
},
|
|
655
|
+
}, Ra = {
|
|
625
656
|
key: 1,
|
|
626
657
|
class: "text-fm-color-typo-error"
|
|
627
|
-
},
|
|
658
|
+
}, Ka = {
|
|
628
659
|
class: "text-fm-color-typo-error"
|
|
629
|
-
},
|
|
660
|
+
}, Ba = {
|
|
630
661
|
class: "text-fm-color-typo-success"
|
|
631
|
-
},
|
|
662
|
+
}, Ya = {
|
|
632
663
|
key: 1,
|
|
633
664
|
class: "divide-y divide-fm-color-border-default"
|
|
634
|
-
},
|
|
665
|
+
}, za = {
|
|
635
666
|
class: "flex flex-wrap items-center gap-8"
|
|
636
|
-
},
|
|
667
|
+
}, qa = {
|
|
637
668
|
class: "break-all font-mono text-xs"
|
|
638
|
-
},
|
|
669
|
+
}, Ja = {
|
|
639
670
|
class: "space-y-4"
|
|
640
|
-
},
|
|
671
|
+
}, Ha = {
|
|
641
672
|
key: 0,
|
|
642
673
|
class: "text-fm-color-typo-success"
|
|
643
|
-
},
|
|
674
|
+
}, Wa = {
|
|
644
675
|
key: 1,
|
|
645
676
|
class: "text-fm-color-typo-error"
|
|
646
|
-
},
|
|
677
|
+
}, Ga = {
|
|
647
678
|
class: "text-fm-color-typo-error"
|
|
648
|
-
},
|
|
679
|
+
}, Xa = {
|
|
649
680
|
class: "text-fm-color-typo-success"
|
|
650
|
-
},
|
|
681
|
+
}, Qa = {
|
|
651
682
|
key: 2,
|
|
652
683
|
class: "text-fm-color-typo-secondary"
|
|
653
|
-
},
|
|
684
|
+
}, Za = {
|
|
654
685
|
key: 1,
|
|
655
686
|
class: "rounded-lg border border-fm-color-border-default"
|
|
656
|
-
},
|
|
687
|
+
}, en = {
|
|
657
688
|
class: "text-base font-bold text-fm-color-typo-primary"
|
|
658
|
-
},
|
|
689
|
+
}, tn = {
|
|
659
690
|
class: "space-y-12 p-12"
|
|
660
|
-
},
|
|
691
|
+
}, on = {
|
|
661
692
|
key: 0
|
|
662
|
-
},
|
|
693
|
+
}, sn = {
|
|
663
694
|
class: "text-xs text-fm-color-typo-secondary"
|
|
664
|
-
},
|
|
695
|
+
}, an = {
|
|
665
696
|
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"
|
|
666
|
-
},
|
|
697
|
+
}, nn = {
|
|
667
698
|
key: 1
|
|
668
|
-
},
|
|
699
|
+
}, ln = {
|
|
669
700
|
class: "text-xs text-fm-color-typo-secondary"
|
|
670
|
-
},
|
|
701
|
+
}, rn = {
|
|
671
702
|
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"
|
|
672
|
-
},
|
|
703
|
+
}, Se = 100, ot = 1e3, $e = "__feedmeAdmin__", un = "D MMM YYYY h:mm A", dn = "YYYY-MM-DD HH:mm", R = "YYYY-MM-DD", Ft = "audit-log-export-fields-v3", cn = /* @__PURE__ */ Mt({
|
|
673
704
|
__name: "AuditLogList",
|
|
674
705
|
setup(t) {
|
|
675
706
|
const {
|
|
676
707
|
t: o,
|
|
677
|
-
te:
|
|
678
|
-
} = Ot(),
|
|
708
|
+
te: n
|
|
709
|
+
} = Ot(), r = jo(), d = zo(), g = S(!1), p = S(!1), h = S([]), i = S(null), C = S(!1), O = S({}), k = S(null), V = S(!1);
|
|
679
710
|
async function L(e) {
|
|
680
|
-
const s = Uint8Array.from(atob(e), (x) => x.charCodeAt(0)),
|
|
681
|
-
return await
|
|
711
|
+
const s = Uint8Array.from(atob(e), (x) => x.charCodeAt(0)), u = new DecompressionStream("gzip"), y = u.writable.getWriter();
|
|
712
|
+
return await y.write(s), await y.close(), new Response(u.readable).text();
|
|
682
713
|
}
|
|
683
714
|
const I = S("");
|
|
684
715
|
let K = 0;
|
|
685
|
-
|
|
716
|
+
de(() => {
|
|
686
717
|
var e, s;
|
|
687
|
-
return (s = (e =
|
|
718
|
+
return (s = (e = i.value) == null ? void 0 : e.metadata) == null ? void 0 : s.requestBody;
|
|
688
719
|
}, async (e) => {
|
|
689
720
|
const s = ++K;
|
|
690
721
|
if (!e) {
|
|
@@ -697,9 +728,9 @@ const es = {
|
|
|
697
728
|
}
|
|
698
729
|
if (e.startsWith("gzip:")) {
|
|
699
730
|
try {
|
|
700
|
-
const
|
|
731
|
+
const u = await L(e.slice(5));
|
|
701
732
|
if (s !== K) return;
|
|
702
|
-
I.value = JSON.stringify(JSON.parse(
|
|
733
|
+
I.value = JSON.stringify(JSON.parse(u), null, 2);
|
|
703
734
|
} catch {
|
|
704
735
|
if (s !== K) return;
|
|
705
736
|
I.value = e;
|
|
@@ -714,7 +745,7 @@ const es = {
|
|
|
714
745
|
}, {
|
|
715
746
|
immediate: !0
|
|
716
747
|
});
|
|
717
|
-
async function
|
|
748
|
+
async function W(e) {
|
|
718
749
|
if (!e) return;
|
|
719
750
|
let s = e;
|
|
720
751
|
if (e.startsWith("gzip:"))
|
|
@@ -729,7 +760,7 @@ const es = {
|
|
|
729
760
|
return s;
|
|
730
761
|
}
|
|
731
762
|
}
|
|
732
|
-
function
|
|
763
|
+
function _(e) {
|
|
733
764
|
if (e === void 0) return "";
|
|
734
765
|
if (typeof e == "object" && e !== null)
|
|
735
766
|
try {
|
|
@@ -739,171 +770,171 @@ const es = {
|
|
|
739
770
|
}
|
|
740
771
|
return String(e);
|
|
741
772
|
}
|
|
742
|
-
const M = S([]), E = S([]), T = S(""), Y = S(""),
|
|
743
|
-
let
|
|
744
|
-
|
|
745
|
-
const s = ++
|
|
746
|
-
if (M.value = [], E.value = [], T.value = "", Y.value = "",
|
|
747
|
-
const [
|
|
748
|
-
s ===
|
|
773
|
+
const M = S([]), E = S([]), T = S(""), Y = S(""), U = S(!1);
|
|
774
|
+
let w = 0;
|
|
775
|
+
de(k, async (e) => {
|
|
776
|
+
const s = ++w;
|
|
777
|
+
if (M.value = [], E.value = [], T.value = "", Y.value = "", U.value = !1, !e) return;
|
|
778
|
+
const [u, y] = await Promise.all([W(e.before), W(e.after)]);
|
|
779
|
+
s === w && (ts(e.changeNodes) ? E.value = e.changeNodes.map(es) : M.value = Zo(u, y), T.value = _(u), Y.value = _(y));
|
|
749
780
|
});
|
|
750
|
-
function
|
|
781
|
+
function ce(e) {
|
|
751
782
|
return e === "added" ? "success" : e === "removed" ? "critical" : "warning";
|
|
752
783
|
}
|
|
753
|
-
function
|
|
784
|
+
function ne(e) {
|
|
754
785
|
return o(e === "added" ? "auditLog.operation.added" : e === "removed" ? "auditLog.operation.removed" : "auditLog.operation.updated");
|
|
755
786
|
}
|
|
756
|
-
function
|
|
787
|
+
function Ie(e) {
|
|
757
788
|
return e.replace(/\[[^\]]*\]/g, "");
|
|
758
789
|
}
|
|
759
|
-
function
|
|
790
|
+
function at(e) {
|
|
760
791
|
return e === "add" ? "success" : e === "remove" ? "critical" : "warning";
|
|
761
792
|
}
|
|
762
793
|
function J(e) {
|
|
763
794
|
return o(e === "add" ? "auditLog.operation.added" : e === "remove" ? "auditLog.operation.removed" : "auditLog.operation.updated");
|
|
764
795
|
}
|
|
765
|
-
function
|
|
766
|
-
return
|
|
796
|
+
function he(e) {
|
|
797
|
+
return Ct(o, n, e);
|
|
767
798
|
}
|
|
768
|
-
const
|
|
799
|
+
const nt = A(() => {
|
|
769
800
|
const e = [], s = /* @__PURE__ */ new Map();
|
|
770
|
-
for (const
|
|
771
|
-
const
|
|
801
|
+
for (const u of M.value) {
|
|
802
|
+
const y = Ie(u.path), x = `${u.type}::${y}`;
|
|
772
803
|
let F = s.get(x);
|
|
773
804
|
F || (F = {
|
|
774
805
|
groupKey: x,
|
|
775
|
-
displayKey:
|
|
776
|
-
type:
|
|
806
|
+
displayKey: y,
|
|
807
|
+
type: u.type,
|
|
777
808
|
rows: []
|
|
778
|
-
}, s.set(x, F), e.push(F)), F.rows.push(
|
|
809
|
+
}, s.set(x, F), e.push(F)), F.rows.push(u);
|
|
779
810
|
}
|
|
780
811
|
return e;
|
|
781
|
-
}),
|
|
782
|
-
startDate: `${
|
|
783
|
-
endDate: `${
|
|
784
|
-
}),
|
|
785
|
-
function
|
|
812
|
+
}), Ae = S(1), Vt = S(!1), Re = S(0), lt = A(() => Math.max(1, Math.ceil(Re.value / Se))), rt = D().format("YYYY-MM-DD"), Q = S({
|
|
813
|
+
startDate: `${rt} 00:00`,
|
|
814
|
+
endDate: `${rt} 23:59`
|
|
815
|
+
}), fe = S(), G = S(), Z = S(), ee = S(), le = S("all");
|
|
816
|
+
function Pt(e) {
|
|
786
817
|
return typeof e == "string" ? [e] : Array.isArray(e) ? e.filter((s) => typeof s == "string") : [];
|
|
787
818
|
}
|
|
788
|
-
const
|
|
789
|
-
function
|
|
790
|
-
const s =
|
|
819
|
+
const it = Le.filter((e) => e.key !== "all").map((e) => e.key);
|
|
820
|
+
function Fe(e) {
|
|
821
|
+
const s = Le.find((u) => u.key !== "all" && u.subjectPrefixes.some((y) => e.startsWith(y)));
|
|
791
822
|
return (s == null ? void 0 : s.key) ?? "other";
|
|
792
823
|
}
|
|
793
|
-
function
|
|
794
|
-
const s =
|
|
795
|
-
return s === -1 ?
|
|
824
|
+
function ut(e) {
|
|
825
|
+
const s = it.indexOf(e);
|
|
826
|
+
return s === -1 ? it.length : s;
|
|
796
827
|
}
|
|
797
|
-
const
|
|
828
|
+
const Et = A(() => Le.map(({
|
|
798
829
|
key: e
|
|
799
830
|
}) => ({
|
|
800
831
|
label: o(`auditLog.modules.${e}`),
|
|
801
832
|
value: e
|
|
802
|
-
}))),
|
|
833
|
+
}))), Ke = A(() => Le.find((e) => e.key === le.value) ?? Le[0]), $t = A(() => le.value === "all"), ye = S([]), Me = S(!1), Nt = A(() => [...Me.value ? [{
|
|
803
834
|
label: o("auditLog.user.feedmeAdmin"),
|
|
804
|
-
value:
|
|
805
|
-
}] : [], ...
|
|
835
|
+
value: $e
|
|
836
|
+
}] : [], ...d.members.map((e) => ({
|
|
806
837
|
label: e.name,
|
|
807
838
|
value: e.doc.userId
|
|
808
|
-
})), ...
|
|
839
|
+
})), ...ye.value.map((e) => ({
|
|
809
840
|
label: `${e.name} (${o("auditLog.user.feedmeAdmin")})`,
|
|
810
841
|
value: e.userId
|
|
811
842
|
}))]), te = A(() => {
|
|
812
|
-
const e =
|
|
843
|
+
const e = fe.value ?? [];
|
|
813
844
|
return {
|
|
814
|
-
userIds: e.filter((s) => s !==
|
|
815
|
-
feedmeAdminActors: e.includes(
|
|
845
|
+
userIds: e.filter((s) => s !== $e),
|
|
846
|
+
feedmeAdminActors: e.includes($e)
|
|
816
847
|
};
|
|
817
|
-
}),
|
|
848
|
+
}), Be = S(""), X = S(""), Ut = No(Be, (e) => {
|
|
818
849
|
X.value = e.trim();
|
|
819
850
|
});
|
|
820
|
-
|
|
821
|
-
const
|
|
851
|
+
Oo(Ut);
|
|
852
|
+
const re = A(() => {
|
|
822
853
|
const e = X.value.toLowerCase();
|
|
823
854
|
if (!e) return [];
|
|
824
855
|
const s = /* @__PURE__ */ new Set();
|
|
825
|
-
for (const
|
|
826
|
-
const
|
|
827
|
-
((
|
|
856
|
+
for (const u of d.members) {
|
|
857
|
+
const y = u.doc.userId;
|
|
858
|
+
((d.userIdToName[y] ?? "").toLowerCase().includes(e) || (d.userIdToEmail[y] ?? "").toLowerCase().includes(e) || (d.userIdToPhone[y] ?? "").toLowerCase().includes(e)) && s.add(y);
|
|
828
859
|
}
|
|
829
|
-
for (const
|
|
830
|
-
|
|
860
|
+
for (const u of ye.value)
|
|
861
|
+
u.name.toLowerCase().includes(e) && s.add(u.userId);
|
|
831
862
|
return [...s];
|
|
832
|
-
}),
|
|
833
|
-
const e =
|
|
863
|
+
}), Ye = A(() => {
|
|
864
|
+
const e = kt.flatMap((x) => Pt(x.subject).map((F) => ({
|
|
834
865
|
label: x.label,
|
|
835
866
|
value: F
|
|
836
|
-
}))), s = Object.entries(
|
|
867
|
+
}))), s = Object.entries(St).map(([x, F]) => ({
|
|
837
868
|
label: F,
|
|
838
869
|
value: x
|
|
839
|
-
})),
|
|
870
|
+
})), u = /* @__PURE__ */ new Set(), y = [];
|
|
840
871
|
for (const x of [...e, ...s])
|
|
841
|
-
if (!
|
|
842
|
-
|
|
843
|
-
const F =
|
|
844
|
-
|
|
872
|
+
if (!u.has(x.value)) {
|
|
873
|
+
u.add(x.value);
|
|
874
|
+
const F = Fe(x.value);
|
|
875
|
+
y.push({
|
|
845
876
|
...x,
|
|
846
877
|
group: o(`auditLog.modules.${F}`)
|
|
847
878
|
});
|
|
848
879
|
}
|
|
849
|
-
return
|
|
880
|
+
return y.sort((x, F) => ut(Fe(x.value)) - ut(Fe(F.value)));
|
|
850
881
|
}), me = A(() => {
|
|
851
882
|
const e = X.value.toLowerCase();
|
|
852
883
|
if (!e) return [];
|
|
853
884
|
const s = /* @__PURE__ */ new Set();
|
|
854
|
-
for (const
|
|
855
|
-
|
|
885
|
+
for (const u of Ye.value)
|
|
886
|
+
u.label.toLowerCase().includes(e) && s.add(u.value);
|
|
856
887
|
return [...s];
|
|
857
|
-
}),
|
|
858
|
-
function
|
|
859
|
-
const
|
|
860
|
-
return e.label.toLowerCase().includes(
|
|
888
|
+
}), Rt = A(() => $t.value ? Ye.value : Ye.value.filter((e) => Fe(e.value) === le.value));
|
|
889
|
+
function Kt(e, s) {
|
|
890
|
+
const u = s.toLowerCase();
|
|
891
|
+
return e.label.toLowerCase().includes(u) || e.value.replace(/^business::/, "").toLowerCase().includes(u) ? !0 : e.value.toLowerCase().includes(u);
|
|
861
892
|
}
|
|
862
|
-
const
|
|
893
|
+
const H = A(() => ({
|
|
863
894
|
manage: o("auditLog.action.manage"),
|
|
864
895
|
create: o("auditLog.action.create"),
|
|
865
896
|
read: o("auditLog.action.read"),
|
|
866
897
|
update: o("auditLog.action.update"),
|
|
867
898
|
delete: o("auditLog.action.delete")
|
|
868
|
-
})),
|
|
869
|
-
label:
|
|
899
|
+
})), Bt = A(() => [{
|
|
900
|
+
label: H.value.manage,
|
|
870
901
|
value: "manage"
|
|
871
902
|
}, {
|
|
872
|
-
label:
|
|
903
|
+
label: H.value.create,
|
|
873
904
|
value: "create"
|
|
874
905
|
}, {
|
|
875
|
-
label:
|
|
906
|
+
label: H.value.read,
|
|
876
907
|
value: "read"
|
|
877
908
|
}, {
|
|
878
|
-
label:
|
|
909
|
+
label: H.value.update,
|
|
879
910
|
value: "update"
|
|
880
911
|
}, {
|
|
881
|
-
label:
|
|
912
|
+
label: H.value.delete,
|
|
882
913
|
value: "delete"
|
|
883
|
-
}]),
|
|
914
|
+
}]), Oe = A(() => ({
|
|
884
915
|
allowed: o("auditLog.outcome.success"),
|
|
885
916
|
denied: o("auditLog.outcome.failed"),
|
|
886
917
|
skipped: o("auditLog.outcome.skipped")
|
|
887
|
-
})),
|
|
918
|
+
})), ze = A(() => {
|
|
888
919
|
var e;
|
|
889
|
-
return ((e =
|
|
920
|
+
return ((e = r.sessionUser.value) == null ? void 0 : e.isInternal) ?? !1;
|
|
890
921
|
});
|
|
891
|
-
function
|
|
892
|
-
return !
|
|
922
|
+
function dt(e) {
|
|
923
|
+
return !ze.value && e === "skipped" ? "allowed" : e;
|
|
893
924
|
}
|
|
894
|
-
function
|
|
895
|
-
return !(e != null && e.length) ||
|
|
925
|
+
function qe(e) {
|
|
926
|
+
return !(e != null && e.length) || ze.value ? e : e.includes("allowed") ? [.../* @__PURE__ */ new Set([...e, "skipped"])] : e;
|
|
896
927
|
}
|
|
897
|
-
const
|
|
898
|
-
label:
|
|
928
|
+
const Yt = A(() => [{
|
|
929
|
+
label: Oe.value.allowed,
|
|
899
930
|
value: "allowed"
|
|
900
931
|
}, {
|
|
901
|
-
label:
|
|
932
|
+
label: Oe.value.denied,
|
|
902
933
|
value: "denied"
|
|
903
|
-
}, ...
|
|
904
|
-
label:
|
|
934
|
+
}, ...ze.value ? [{
|
|
935
|
+
label: Oe.value.skipped,
|
|
905
936
|
value: "skipped"
|
|
906
|
-
}] : []]),
|
|
937
|
+
}] : []]), zt = A(() => ({
|
|
907
938
|
admin: o("auditLog.detail.resolvedFromValue.admin"),
|
|
908
939
|
staff: o("auditLog.detail.resolvedFromValue.staff"),
|
|
909
940
|
permissionSet: o("auditLog.detail.resolvedFromValue.permissionSet"),
|
|
@@ -911,141 +942,145 @@ const es = {
|
|
|
911
942
|
custom: o("auditLog.detail.resolvedFromValue.custom"),
|
|
912
943
|
"no-match": o("auditLog.detail.resolvedFromValue.noMatch"),
|
|
913
944
|
unknown: o("auditLog.detail.resolvedFromValue.unknown")
|
|
914
|
-
})),
|
|
915
|
-
GET:
|
|
916
|
-
POST:
|
|
917
|
-
PUT:
|
|
918
|
-
PATCH:
|
|
919
|
-
DELETE:
|
|
920
|
-
})),
|
|
945
|
+
})), qt = A(() => ({
|
|
946
|
+
GET: H.value.read,
|
|
947
|
+
POST: H.value.create,
|
|
948
|
+
PUT: H.value.update,
|
|
949
|
+
PATCH: H.value.update,
|
|
950
|
+
DELETE: H.value.delete
|
|
951
|
+
})), Jt = {
|
|
921
952
|
allowed: "success",
|
|
922
953
|
denied: "critical",
|
|
923
954
|
skipped: "warning"
|
|
924
955
|
};
|
|
925
|
-
function
|
|
926
|
-
return D(e).format(
|
|
956
|
+
function De(e) {
|
|
957
|
+
return D(e).format(un);
|
|
927
958
|
}
|
|
928
|
-
const
|
|
959
|
+
const Ht = A(() => {
|
|
929
960
|
const {
|
|
930
961
|
startDate: e,
|
|
931
962
|
endDate: s
|
|
932
963
|
} = Q.value;
|
|
933
|
-
return e && s ? `${
|
|
934
|
-
}),
|
|
964
|
+
return e && s ? `${De(e)} – ${De(s)}` : e ? De(e) : s ? De(s) : o("auditLog.dateRange.placeholder");
|
|
965
|
+
}), Wt = A(() => [{
|
|
935
966
|
label: o("date.predefinedRanges.today"),
|
|
936
967
|
value: {
|
|
937
|
-
startDate: D().format(
|
|
938
|
-
endDate: D().format(
|
|
968
|
+
startDate: D().format(R),
|
|
969
|
+
endDate: D().format(R)
|
|
939
970
|
}
|
|
940
971
|
}, {
|
|
941
972
|
label: o("date.predefinedRanges.yesterday"),
|
|
942
973
|
value: {
|
|
943
|
-
startDate: D().subtract(1, "day").format(
|
|
944
|
-
endDate: D().subtract(1, "day").format(
|
|
974
|
+
startDate: D().subtract(1, "day").format(R),
|
|
975
|
+
endDate: D().subtract(1, "day").format(R)
|
|
945
976
|
}
|
|
946
977
|
}, {
|
|
947
978
|
label: o("date.predefinedRanges.thisWeek"),
|
|
948
979
|
value: {
|
|
949
|
-
startDate: D().startOf("week").format(
|
|
950
|
-
endDate: D().endOf("week").format(
|
|
980
|
+
startDate: D().startOf("week").format(R),
|
|
981
|
+
endDate: D().endOf("week").format(R)
|
|
951
982
|
}
|
|
952
983
|
}, {
|
|
953
984
|
label: o("date.predefinedRanges.lastWeek"),
|
|
954
985
|
value: {
|
|
955
|
-
startDate: D().subtract(1, "week").startOf("week").format(
|
|
956
|
-
endDate: D().subtract(1, "week").endOf("week").format(
|
|
986
|
+
startDate: D().subtract(1, "week").startOf("week").format(R),
|
|
987
|
+
endDate: D().subtract(1, "week").endOf("week").format(R)
|
|
957
988
|
}
|
|
958
989
|
}, {
|
|
959
990
|
label: o("date.predefinedRanges.last7Days"),
|
|
960
991
|
value: {
|
|
961
|
-
startDate: D().subtract(7, "day").format(
|
|
962
|
-
endDate: D().subtract(1, "day").format(
|
|
992
|
+
startDate: D().subtract(7, "day").format(R),
|
|
993
|
+
endDate: D().subtract(1, "day").format(R)
|
|
963
994
|
}
|
|
964
995
|
}, {
|
|
965
996
|
label: o("date.predefinedRanges.thisMonth"),
|
|
966
997
|
value: {
|
|
967
|
-
startDate: D().startOf("month").format(
|
|
968
|
-
endDate: D().endOf("month").format(
|
|
998
|
+
startDate: D().startOf("month").format(R),
|
|
999
|
+
endDate: D().endOf("month").format(R)
|
|
969
1000
|
}
|
|
970
1001
|
}, {
|
|
971
1002
|
label: o("date.predefinedRanges.lastMonth"),
|
|
972
1003
|
value: {
|
|
973
|
-
startDate: D().subtract(1, "month").startOf("month").format(
|
|
974
|
-
endDate: D().subtract(1, "month").endOf("month").format(
|
|
1004
|
+
startDate: D().subtract(1, "month").startOf("month").format(R),
|
|
1005
|
+
endDate: D().subtract(1, "month").endOf("month").format(R)
|
|
975
1006
|
}
|
|
976
1007
|
}]);
|
|
977
|
-
function
|
|
1008
|
+
function Je(e) {
|
|
978
1009
|
var s;
|
|
979
|
-
return ((s =
|
|
1010
|
+
return ((s = kt.find((u) => u.subject === e)) == null ? void 0 : s.label) ?? St[e];
|
|
980
1011
|
}
|
|
981
|
-
function
|
|
982
|
-
var
|
|
983
|
-
|
|
984
|
-
|
|
1012
|
+
function je(e) {
|
|
1013
|
+
var u, y;
|
|
1014
|
+
if (e.actorType === "portalUser")
|
|
1015
|
+
return e.actorName ?? e.userId;
|
|
1016
|
+
if (e.actorType === "feedmeAdmin")
|
|
1017
|
+
return (u = r.sessionUser.value) != null && u.isInternal ? `${e.actorName ?? e.userId} (${o("auditLog.user.feedmeAdmin")})` : o("auditLog.user.feedmeAdmin");
|
|
1018
|
+
const s = d.userIdToName[e.userId];
|
|
1019
|
+
return s || (d.hasLoaded ? (y = r.sessionUser.value) != null && y.isInternal ? `${e.actorName ?? e.userId} (${o("auditLog.user.feedmeAdmin")})` : o("auditLog.user.feedmeAdmin") : e.userId);
|
|
985
1020
|
}
|
|
986
|
-
function
|
|
987
|
-
return
|
|
1021
|
+
function ct(e) {
|
|
1022
|
+
return d.userIdToPhone[e.userId] || "-";
|
|
988
1023
|
}
|
|
989
|
-
function
|
|
990
|
-
return
|
|
1024
|
+
function Gt(e) {
|
|
1025
|
+
return d.userIdToEmail[e.userId] || "-";
|
|
991
1026
|
}
|
|
992
|
-
function
|
|
1027
|
+
function ft(e) {
|
|
993
1028
|
return D(e).format("DD MMM YYYY, HH:mm");
|
|
994
1029
|
}
|
|
995
|
-
function
|
|
1030
|
+
function mt(e) {
|
|
996
1031
|
return D(e).format("DD MMM YYYY, HH:mm:ss").toUpperCase();
|
|
997
1032
|
}
|
|
998
|
-
function
|
|
999
|
-
return
|
|
1033
|
+
function vt(e) {
|
|
1034
|
+
return H.value[e] ?? e;
|
|
1000
1035
|
}
|
|
1001
|
-
function
|
|
1002
|
-
return
|
|
1036
|
+
function pt(e) {
|
|
1037
|
+
return st(o, {
|
|
1003
1038
|
eventKey: e.eventKey,
|
|
1004
1039
|
params: e.params,
|
|
1005
|
-
operationLabel: e.metadata.operationLabel ??
|
|
1040
|
+
operationLabel: e.metadata.operationLabel ?? vt(e.action)
|
|
1006
1041
|
});
|
|
1007
1042
|
}
|
|
1008
|
-
function
|
|
1009
|
-
return
|
|
1043
|
+
function gt(e) {
|
|
1044
|
+
return st(o, e) || o("auditLog.operation.unlabeled");
|
|
1010
1045
|
}
|
|
1011
|
-
function
|
|
1012
|
-
return
|
|
1046
|
+
function Xt(e) {
|
|
1047
|
+
return Je(e.subject) ?? e.subject;
|
|
1013
1048
|
}
|
|
1014
|
-
function
|
|
1015
|
-
return
|
|
1049
|
+
function He(e) {
|
|
1050
|
+
return Oe.value[dt(e)];
|
|
1016
1051
|
}
|
|
1017
|
-
function
|
|
1018
|
-
return
|
|
1052
|
+
function ht(e) {
|
|
1053
|
+
return Jt[dt(e)] ?? "neutral";
|
|
1019
1054
|
}
|
|
1020
|
-
function
|
|
1021
|
-
return
|
|
1055
|
+
function Qt(e) {
|
|
1056
|
+
return zt.value[e] ?? e;
|
|
1022
1057
|
}
|
|
1023
|
-
function
|
|
1024
|
-
return e.metadata.requestMethod ?
|
|
1058
|
+
function Zt(e) {
|
|
1059
|
+
return e.metadata.requestMethod ? qt.value[e.metadata.requestMethod] ?? e.metadata.requestMethod : vt(e.action);
|
|
1025
1060
|
}
|
|
1026
|
-
function
|
|
1061
|
+
function yt(e) {
|
|
1027
1062
|
const s = String(e ?? "");
|
|
1028
1063
|
return `"${(/^[=+\-@\t\r]/.test(s) ? `'${s}` : s).replace(/"/g, '""')}"`;
|
|
1029
1064
|
}
|
|
1030
1065
|
const We = [{
|
|
1031
1066
|
key: "timestamp",
|
|
1032
1067
|
labelKey: "auditLog.exportFields.timestamp",
|
|
1033
|
-
getValue: (e) =>
|
|
1068
|
+
getValue: (e) => ft(e.timestamp),
|
|
1034
1069
|
defaultSelected: !0
|
|
1035
1070
|
}, {
|
|
1036
1071
|
key: "userName",
|
|
1037
1072
|
labelKey: "auditLog.exportFields.userName",
|
|
1038
|
-
getValue: (e) =>
|
|
1073
|
+
getValue: (e) => je(e),
|
|
1039
1074
|
defaultSelected: !0
|
|
1040
1075
|
}, {
|
|
1041
1076
|
key: "userPhone",
|
|
1042
1077
|
labelKey: "auditLog.exportFields.userPhone",
|
|
1043
|
-
getValue: (e) =>
|
|
1078
|
+
getValue: (e) => ct(e),
|
|
1044
1079
|
defaultSelected: !0
|
|
1045
1080
|
}, {
|
|
1046
1081
|
key: "subject",
|
|
1047
1082
|
labelKey: "auditLog.exportFields.subject",
|
|
1048
|
-
getValue: (e) =>
|
|
1083
|
+
getValue: (e) => Je(e.subject) ?? e.subject,
|
|
1049
1084
|
defaultSelected: !0
|
|
1050
1085
|
}, {
|
|
1051
1086
|
key: "action",
|
|
@@ -1055,13 +1090,23 @@ const es = {
|
|
|
1055
1090
|
}, {
|
|
1056
1091
|
key: "operation",
|
|
1057
1092
|
labelKey: "auditLog.exportFields.operation",
|
|
1058
|
-
getValue: (e) =>
|
|
1093
|
+
getValue: (e) => pt(e),
|
|
1059
1094
|
defaultSelected: !0
|
|
1060
1095
|
}, {
|
|
1061
1096
|
key: "outcome",
|
|
1062
1097
|
labelKey: "auditLog.exportFields.outcome",
|
|
1063
|
-
getValue: (e) =>
|
|
1098
|
+
getValue: (e) => He(e.outcome),
|
|
1099
|
+
defaultSelected: !0
|
|
1100
|
+
}, {
|
|
1101
|
+
key: "operationEvents",
|
|
1102
|
+
labelKey: "auditLog.exportFields.operationEvents",
|
|
1103
|
+
getValue: (e) => os(o, e.operations),
|
|
1064
1104
|
defaultSelected: !0
|
|
1105
|
+
}, {
|
|
1106
|
+
key: "changes",
|
|
1107
|
+
labelKey: "auditLog.exportFields.changes",
|
|
1108
|
+
getValue: (e) => as(o, n, e.operations),
|
|
1109
|
+
defaultSelected: !1
|
|
1065
1110
|
}, {
|
|
1066
1111
|
key: "businessId",
|
|
1067
1112
|
labelKey: "auditLog.exportFields.businessId",
|
|
@@ -1101,8 +1146,13 @@ const es = {
|
|
|
1101
1146
|
return (s = e.metadata) == null ? void 0 : s.requestPath;
|
|
1102
1147
|
},
|
|
1103
1148
|
defaultSelected: !1
|
|
1149
|
+
}, {
|
|
1150
|
+
key: "traceId",
|
|
1151
|
+
labelKey: "auditLog.exportFields.traceId",
|
|
1152
|
+
getValue: (e) => e.traceId ?? "",
|
|
1153
|
+
defaultSelected: !1
|
|
1104
1154
|
}];
|
|
1105
|
-
function
|
|
1155
|
+
function eo() {
|
|
1106
1156
|
try {
|
|
1107
1157
|
const e = localStorage.getItem(Ft);
|
|
1108
1158
|
if (e) {
|
|
@@ -1113,8 +1163,8 @@ const es = {
|
|
|
1113
1163
|
}
|
|
1114
1164
|
return new Set(We.filter((e) => e.defaultSelected).map((e) => e.key));
|
|
1115
1165
|
}
|
|
1116
|
-
const ve = S(
|
|
1117
|
-
function
|
|
1166
|
+
const ve = S(eo());
|
|
1167
|
+
function to(e) {
|
|
1118
1168
|
const s = new Set(ve.value);
|
|
1119
1169
|
if (s.has(e)) {
|
|
1120
1170
|
if (s.size <= 1) return;
|
|
@@ -1127,19 +1177,19 @@ const es = {
|
|
|
1127
1177
|
} catch {
|
|
1128
1178
|
}
|
|
1129
1179
|
}
|
|
1130
|
-
async function
|
|
1131
|
-
var e, s,
|
|
1132
|
-
if (!
|
|
1133
|
-
|
|
1180
|
+
async function oo() {
|
|
1181
|
+
var e, s, u, y, x;
|
|
1182
|
+
if (!p.value) {
|
|
1183
|
+
p.value = !0;
|
|
1134
1184
|
try {
|
|
1135
1185
|
const {
|
|
1136
1186
|
startDate: F,
|
|
1137
|
-
endDate:
|
|
1138
|
-
} = Q.value, oe =
|
|
1187
|
+
endDate: $
|
|
1188
|
+
} = Q.value, oe = Ke.value.subjectPrefixes, Ce = (/* @__PURE__ */ new Date()).toISOString().slice(0, 19).replace("T", " "), be = $ ? se($) : null, Te = be && be < Ce ? be : Ce, Xe = {
|
|
1139
1189
|
...F ? {
|
|
1140
1190
|
from: se(F)
|
|
1141
1191
|
} : {},
|
|
1142
|
-
to:
|
|
1192
|
+
to: Te,
|
|
1143
1193
|
...te.value.userIds.length ? {
|
|
1144
1194
|
userIds: te.value.userIds
|
|
1145
1195
|
} : {},
|
|
@@ -1155,48 +1205,48 @@ const es = {
|
|
|
1155
1205
|
...(s = ee.value) != null && s.length ? {
|
|
1156
1206
|
actions: ee.value
|
|
1157
1207
|
} : {},
|
|
1158
|
-
...(
|
|
1159
|
-
outcomes:
|
|
1208
|
+
...(u = Z.value) != null && u.length ? {
|
|
1209
|
+
outcomes: qe(Z.value)
|
|
1160
1210
|
} : {},
|
|
1161
1211
|
...X.value ? {
|
|
1162
1212
|
search: X.value
|
|
1163
1213
|
} : {},
|
|
1164
|
-
...
|
|
1165
|
-
searchUserIds:
|
|
1214
|
+
...re.value.length ? {
|
|
1215
|
+
searchUserIds: re.value
|
|
1166
1216
|
} : {},
|
|
1167
1217
|
...me.value.length ? {
|
|
1168
1218
|
searchSubjects: me.value
|
|
1169
1219
|
} : {}
|
|
1170
|
-
},
|
|
1220
|
+
}, _e = [];
|
|
1171
1221
|
let f = 0;
|
|
1172
1222
|
for (; ; ) {
|
|
1173
|
-
const z = await
|
|
1174
|
-
...
|
|
1175
|
-
limit:
|
|
1223
|
+
const z = await Ee.read({
|
|
1224
|
+
...Xe,
|
|
1225
|
+
limit: ot,
|
|
1176
1226
|
offset: f
|
|
1177
1227
|
});
|
|
1178
|
-
if (
|
|
1179
|
-
f +=
|
|
1228
|
+
if (_e.push(...z), z.length < ot) break;
|
|
1229
|
+
f += ot;
|
|
1180
1230
|
}
|
|
1181
|
-
const
|
|
1182
|
-
`),
|
|
1231
|
+
const P = We.filter((z) => ve.value.has(z.key)), go = P.map((z) => o(z.labelKey)), ho = _e.map((z) => P.map((Io) => Io.getValue(z) ?? "")), Qe = -(/* @__PURE__ */ new Date()).getTimezoneOffset(), yo = Qe >= 0 ? "+" : "-", bo = String(Math.floor(Math.abs(Qe) / 60)).padStart(2, "0"), _o = String(Math.abs(Qe) % 60).padStart(2, "0"), xo = `UTC${yo}${bo}:${_o}`, xt = ((y = r.currentBusiness.value) == null ? void 0 : y.name) || "", Lo = [F, $].filter(Boolean).join(" – "), So = [...[[o("auditLog.title")], [`${o("auditLog.frontMatter.date")}: ${Lo}`], ...xt ? [[`${o("auditLog.frontMatter.business")}: ${xt}`]] : [], [`${o("auditLog.frontMatter.generatedBy")}: ${D().format("DD MMM YYYY, HH:mm")} (${xo})`], []].map((z) => z.map(yt).join(",")), ...[go, ...ho].map((z) => z.map(yt).join(","))].join(`
|
|
1232
|
+
`), ko = `audit-log_${(((x = r.currentBusiness.value) == null ? void 0 : x.name) || "business").replace(/[^a-z0-9_-]+/gi, "_")}_${D().format("YYYYMMDD_HHmmss")}.csv`, wo = new Blob([`\uFEFF${So}`], {
|
|
1183
1233
|
type: "text/csv;charset=utf-8;"
|
|
1184
|
-
}),
|
|
1185
|
-
|
|
1234
|
+
}), Lt = window.URL.createObjectURL(wo), xe = document.createElement("a");
|
|
1235
|
+
xe.href = Lt, xe.download = ko, document.body.appendChild(xe), xe.click(), xe.remove(), window.URL.revokeObjectURL(Lt);
|
|
1186
1236
|
} finally {
|
|
1187
|
-
|
|
1237
|
+
p.value = !1;
|
|
1188
1238
|
}
|
|
1189
1239
|
}
|
|
1190
1240
|
}
|
|
1191
|
-
function
|
|
1241
|
+
function ie(e) {
|
|
1192
1242
|
return "status" in e;
|
|
1193
1243
|
}
|
|
1194
|
-
function
|
|
1195
|
-
return
|
|
1244
|
+
function so(e) {
|
|
1245
|
+
return At(e) ? m(ue.FmTooltip, {
|
|
1196
1246
|
variant: "plain",
|
|
1197
1247
|
placement: "top"
|
|
1198
1248
|
}, {
|
|
1199
|
-
default: () => m(
|
|
1249
|
+
default: () => m(ue.FmIcon, {
|
|
1200
1250
|
name: "error",
|
|
1201
1251
|
size: "sm",
|
|
1202
1252
|
class: "cursor-help text-fm-color-typo-error"
|
|
@@ -1204,19 +1254,19 @@ const es = {
|
|
|
1204
1254
|
content: () => o("auditLog.operation.partialFailure")
|
|
1205
1255
|
}) : null;
|
|
1206
1256
|
}
|
|
1207
|
-
function
|
|
1208
|
-
var
|
|
1257
|
+
function ao(e) {
|
|
1258
|
+
var u;
|
|
1209
1259
|
const s = e.original;
|
|
1210
|
-
return e.depth === 0 && !
|
|
1260
|
+
return e.depth === 0 && !ie(s) && !!((u = s.operations) != null && u.length);
|
|
1211
1261
|
}
|
|
1212
|
-
function
|
|
1213
|
-
return
|
|
1262
|
+
function no(e) {
|
|
1263
|
+
return ie(e) ? void 0 : e.operations;
|
|
1214
1264
|
}
|
|
1215
|
-
const
|
|
1265
|
+
const lo = [{
|
|
1216
1266
|
accessorKey: "timestamp",
|
|
1217
1267
|
header: () => o("auditLog.columns.timestamp"),
|
|
1218
1268
|
cell(e) {
|
|
1219
|
-
return
|
|
1269
|
+
return ft(e.row.original.timestamp);
|
|
1220
1270
|
}
|
|
1221
1271
|
}, {
|
|
1222
1272
|
accessorKey: "userId",
|
|
@@ -1225,28 +1275,28 @@ const es = {
|
|
|
1225
1275
|
size: 220,
|
|
1226
1276
|
cell(e) {
|
|
1227
1277
|
const s = e.row.original;
|
|
1228
|
-
return
|
|
1278
|
+
return ie(s) ? null : m("div", {
|
|
1229
1279
|
class: "flex items-center gap-8"
|
|
1230
|
-
}, [m(
|
|
1231
|
-
name:
|
|
1280
|
+
}, [m(ue.FmAvatar, {
|
|
1281
|
+
name: je(s),
|
|
1232
1282
|
size: "sm",
|
|
1233
1283
|
class: "shrink-0"
|
|
1234
1284
|
}, null), m("div", {
|
|
1235
1285
|
class: "min-w-0"
|
|
1236
1286
|
}, [m("p", {
|
|
1237
1287
|
class: "truncate font-semibold"
|
|
1238
|
-
}, [
|
|
1288
|
+
}, [je(s)]), m("p", {
|
|
1239
1289
|
class: "truncate text-fm-color-typo-secondary"
|
|
1240
|
-
}, [
|
|
1290
|
+
}, [ct(s)])])]);
|
|
1241
1291
|
}
|
|
1242
1292
|
}, {
|
|
1243
1293
|
accessorKey: "subject",
|
|
1244
1294
|
header: () => o("auditLog.columns.subject"),
|
|
1245
1295
|
cell(e) {
|
|
1246
1296
|
const s = e.row.original;
|
|
1247
|
-
return
|
|
1297
|
+
return ie(s) ? m("span", {
|
|
1248
1298
|
class: "text-fm-color-typo-secondary"
|
|
1249
|
-
}, [o("auditLog.operation.rowHint")]) :
|
|
1299
|
+
}, [o("auditLog.operation.rowHint")]) : Je(s.subject) ?? s.subject;
|
|
1250
1300
|
}
|
|
1251
1301
|
}, {
|
|
1252
1302
|
accessorKey: "action",
|
|
@@ -1257,39 +1307,39 @@ const es = {
|
|
|
1257
1307
|
cellSpanClass: "audit-log-action-label"
|
|
1258
1308
|
},
|
|
1259
1309
|
cell(e) {
|
|
1260
|
-
var
|
|
1310
|
+
var $;
|
|
1261
1311
|
const s = e.row.original;
|
|
1262
|
-
if (
|
|
1312
|
+
if (ie(s))
|
|
1263
1313
|
return m("span", {
|
|
1264
1314
|
class: "audit-op-marker flex flex-wrap items-baseline gap-4"
|
|
1265
1315
|
}, [m("span", {
|
|
1266
1316
|
class: "text-fm-color-typo-secondary"
|
|
1267
|
-
}, [
|
|
1317
|
+
}, [Ve("↳")]), m("span", {
|
|
1268
1318
|
class: "font-semibold"
|
|
1269
|
-
}, [
|
|
1319
|
+
}, [gt(s)]), s.entityId ? m("span", {
|
|
1270
1320
|
class: "text-fm-color-typo-secondary"
|
|
1271
|
-
}, [
|
|
1321
|
+
}, [Ve("· "), s.entityId]) : null, s.status === "failed" && s.errorMessage ? m("span", {
|
|
1272
1322
|
class: "text-fm-color-typo-error"
|
|
1273
|
-
}, [
|
|
1274
|
-
const
|
|
1323
|
+
}, [Ve("· "), s.errorMessage]) : null]);
|
|
1324
|
+
const u = (($ = s.operations) == null ? void 0 : $.length) ?? 0, y = (oe) => {
|
|
1275
1325
|
oe.stopPropagation(), e.row.getToggleExpandedHandler()();
|
|
1276
1326
|
}, x = {
|
|
1277
1327
|
variant: "tertiary",
|
|
1278
1328
|
icon: e.row.getIsExpanded() ? "keyboard_arrow_up" : "keyboard_arrow_down",
|
|
1279
1329
|
"aria-label": o("auditLog.operation.toggle"),
|
|
1280
1330
|
class: "ml-auto shrink-0",
|
|
1281
|
-
onClick:
|
|
1282
|
-
}, F =
|
|
1331
|
+
onClick: y
|
|
1332
|
+
}, F = ue.FmButton;
|
|
1283
1333
|
return m("span", {
|
|
1284
1334
|
class: "flex items-center gap-8"
|
|
1285
|
-
}, [m("span", null, [
|
|
1335
|
+
}, [m("span", null, [pt(s)]), u > 0 ? m("span", {
|
|
1286
1336
|
class: "cursor-pointer",
|
|
1287
|
-
onClick:
|
|
1288
|
-
}, [m(
|
|
1337
|
+
onClick: y
|
|
1338
|
+
}, [m(ue.FmChip, {
|
|
1289
1339
|
variant: "neutral",
|
|
1290
1340
|
compact: !0,
|
|
1291
1341
|
label: o("auditLog.operation.badge", {
|
|
1292
|
-
count:
|
|
1342
|
+
count: u
|
|
1293
1343
|
})
|
|
1294
1344
|
}, null)]) : null, e.row.getCanExpand() ? m(F, x, null) : null]);
|
|
1295
1345
|
}
|
|
@@ -1299,35 +1349,35 @@ const es = {
|
|
|
1299
1349
|
enableSorting: !1,
|
|
1300
1350
|
cell(e) {
|
|
1301
1351
|
const s = e.row.original;
|
|
1302
|
-
return
|
|
1352
|
+
return ie(s) ? m(ue.FmChip, {
|
|
1303
1353
|
variant: s.status === "failed" ? "critical" : "success",
|
|
1304
1354
|
label: s.status === "failed" ? o("auditLog.outcome.failed") : o("auditLog.outcome.success"),
|
|
1305
1355
|
compact: !0
|
|
1306
1356
|
}, null) : m("span", {
|
|
1307
1357
|
class: "flex items-center gap-4"
|
|
1308
|
-
}, [m(
|
|
1309
|
-
variant:
|
|
1310
|
-
label:
|
|
1358
|
+
}, [m(ue.FmChip, {
|
|
1359
|
+
variant: ht(s.outcome),
|
|
1360
|
+
label: He(s.outcome),
|
|
1311
1361
|
compact: !0
|
|
1312
|
-
}, null),
|
|
1362
|
+
}, null), so(s)]);
|
|
1313
1363
|
}
|
|
1314
1364
|
}];
|
|
1315
1365
|
function se(e) {
|
|
1316
|
-
const s = D(e,
|
|
1366
|
+
const s = D(e, dn);
|
|
1317
1367
|
return new Date(s.year(), s.month(), s.date(), s.hour(), s.minute(), 0).toISOString().slice(0, 19).replace("T", " ");
|
|
1318
1368
|
}
|
|
1319
|
-
async function
|
|
1320
|
-
var e, s,
|
|
1369
|
+
async function bt() {
|
|
1370
|
+
var e, s, u;
|
|
1321
1371
|
g.value = !0;
|
|
1322
1372
|
try {
|
|
1323
1373
|
const {
|
|
1324
|
-
startDate:
|
|
1374
|
+
startDate: y,
|
|
1325
1375
|
endDate: x
|
|
1326
|
-
} = Q.value, F = (
|
|
1327
|
-
limit:
|
|
1376
|
+
} = Q.value, F = (Ae.value - 1) * Se, $ = Ke.value.subjectPrefixes, oe = await Ee.read({
|
|
1377
|
+
limit: Se,
|
|
1328
1378
|
offset: F,
|
|
1329
|
-
...
|
|
1330
|
-
from: se(
|
|
1379
|
+
...y ? {
|
|
1380
|
+
from: se(y)
|
|
1331
1381
|
} : {},
|
|
1332
1382
|
...x ? {
|
|
1333
1383
|
to: se(x)
|
|
@@ -1341,50 +1391,54 @@ const es = {
|
|
|
1341
1391
|
...(e = G.value) != null && e.length ? {
|
|
1342
1392
|
subjects: G.value
|
|
1343
1393
|
} : {},
|
|
1344
|
-
|
|
1345
|
-
subjectPrefixes: [
|
|
1394
|
+
...$.length ? {
|
|
1395
|
+
subjectPrefixes: [...$]
|
|
1346
1396
|
} : {},
|
|
1347
1397
|
...(s = ee.value) != null && s.length ? {
|
|
1348
1398
|
actions: ee.value
|
|
1349
1399
|
} : {},
|
|
1350
|
-
...(
|
|
1351
|
-
outcomes:
|
|
1400
|
+
...(u = Z.value) != null && u.length ? {
|
|
1401
|
+
outcomes: qe(Z.value)
|
|
1352
1402
|
} : {},
|
|
1353
1403
|
...X.value ? {
|
|
1354
1404
|
search: X.value
|
|
1355
1405
|
} : {},
|
|
1356
|
-
...
|
|
1357
|
-
searchUserIds:
|
|
1406
|
+
...re.value.length ? {
|
|
1407
|
+
searchUserIds: re.value
|
|
1358
1408
|
} : {},
|
|
1359
1409
|
...me.value.length ? {
|
|
1360
1410
|
searchSubjects: me.value
|
|
1361
1411
|
} : {}
|
|
1362
1412
|
});
|
|
1363
|
-
h.value = oe,
|
|
1413
|
+
h.value = oe, Vt.value = oe.length === Se, O.value = {};
|
|
1364
1414
|
} finally {
|
|
1365
1415
|
g.value = !1;
|
|
1366
1416
|
}
|
|
1367
1417
|
}
|
|
1368
|
-
const
|
|
1418
|
+
const _t = A(() => {
|
|
1369
1419
|
var e;
|
|
1370
1420
|
return JSON.stringify({
|
|
1371
|
-
businessId: ((e =
|
|
1421
|
+
businessId: ((e = r.currentBusiness.value) == null ? void 0 : e._id) ?? "",
|
|
1372
1422
|
dateRange: Q.value,
|
|
1373
|
-
users: [...
|
|
1423
|
+
users: [...fe.value ?? []].sort(),
|
|
1374
1424
|
subjects: [...G.value ?? []].sort(),
|
|
1375
1425
|
outcomes: [...Z.value ?? []].sort(),
|
|
1376
1426
|
actions: [...ee.value ?? []].sort(),
|
|
1377
|
-
moduleKey:
|
|
1378
|
-
search: X.value
|
|
1427
|
+
moduleKey: le.value,
|
|
1428
|
+
search: X.value,
|
|
1429
|
+
// Member/feedme-admin-actor lists resolve asynchronously (and actors refetch on
|
|
1430
|
+
// every date-range change), so searchUserIds can change after the key above is
|
|
1431
|
+
// computed — include it explicitly or a late-arriving match never refetches.
|
|
1432
|
+
searchUserIds: [...re.value].sort()
|
|
1379
1433
|
});
|
|
1380
1434
|
});
|
|
1381
|
-
async function
|
|
1382
|
-
var
|
|
1435
|
+
async function ro() {
|
|
1436
|
+
var y, x, F;
|
|
1383
1437
|
const {
|
|
1384
1438
|
startDate: e,
|
|
1385
1439
|
endDate: s
|
|
1386
|
-
} = Q.value,
|
|
1387
|
-
|
|
1440
|
+
} = Q.value, u = Ke.value.subjectPrefixes;
|
|
1441
|
+
Re.value = await Ee.count({
|
|
1388
1442
|
...e ? {
|
|
1389
1443
|
from: se(e)
|
|
1390
1444
|
} : {},
|
|
@@ -1397,90 +1451,90 @@ const es = {
|
|
|
1397
1451
|
...te.value.feedmeAdminActors ? {
|
|
1398
1452
|
feedmeAdminActors: !0
|
|
1399
1453
|
} : {},
|
|
1400
|
-
...(
|
|
1454
|
+
...(y = G.value) != null && y.length ? {
|
|
1401
1455
|
subjects: G.value
|
|
1402
1456
|
} : {},
|
|
1403
|
-
...
|
|
1404
|
-
subjectPrefixes: [...
|
|
1457
|
+
...u.length ? {
|
|
1458
|
+
subjectPrefixes: [...u]
|
|
1405
1459
|
} : {},
|
|
1406
1460
|
...(x = ee.value) != null && x.length ? {
|
|
1407
1461
|
actions: ee.value
|
|
1408
1462
|
} : {},
|
|
1409
1463
|
...(F = Z.value) != null && F.length ? {
|
|
1410
|
-
outcomes:
|
|
1464
|
+
outcomes: qe(Z.value)
|
|
1411
1465
|
} : {},
|
|
1412
1466
|
...X.value ? {
|
|
1413
1467
|
search: X.value
|
|
1414
1468
|
} : {},
|
|
1415
|
-
...
|
|
1416
|
-
searchUserIds:
|
|
1469
|
+
...re.value.length ? {
|
|
1470
|
+
searchUserIds: re.value
|
|
1417
1471
|
} : {},
|
|
1418
1472
|
...me.value.length ? {
|
|
1419
1473
|
searchSubjects: me.value
|
|
1420
1474
|
} : {}
|
|
1421
1475
|
});
|
|
1422
1476
|
}
|
|
1423
|
-
|
|
1477
|
+
de(_t, async () => {
|
|
1424
1478
|
var e;
|
|
1425
|
-
|
|
1479
|
+
Ae.value = 1, (e = r.currentBusiness.value) != null && e._id && await Promise.all([ro(), bt()]);
|
|
1426
1480
|
}, {
|
|
1427
1481
|
immediate: !0
|
|
1428
|
-
}),
|
|
1482
|
+
}), de(le, () => {
|
|
1429
1483
|
G.value = void 0;
|
|
1430
1484
|
});
|
|
1431
|
-
let
|
|
1432
|
-
async function
|
|
1485
|
+
let Ge = !1;
|
|
1486
|
+
async function io({
|
|
1433
1487
|
pageIndex: e
|
|
1434
1488
|
}) {
|
|
1435
1489
|
var s;
|
|
1436
|
-
if ((s =
|
|
1437
|
-
|
|
1490
|
+
if ((s = r.currentBusiness.value) != null && s._id && !(e === 0 && Ae.value === 1) && !Ge) {
|
|
1491
|
+
Ge = !0, Ae.value = e + 1;
|
|
1438
1492
|
try {
|
|
1439
|
-
await
|
|
1493
|
+
await bt();
|
|
1440
1494
|
} finally {
|
|
1441
|
-
|
|
1495
|
+
Ge = !1;
|
|
1442
1496
|
}
|
|
1443
1497
|
}
|
|
1444
1498
|
}
|
|
1445
|
-
function
|
|
1446
|
-
if (
|
|
1447
|
-
|
|
1499
|
+
function uo(e) {
|
|
1500
|
+
if (ie(e)) {
|
|
1501
|
+
fo(e);
|
|
1448
1502
|
return;
|
|
1449
1503
|
}
|
|
1450
|
-
|
|
1504
|
+
i.value = e, C.value = !0;
|
|
1451
1505
|
}
|
|
1452
|
-
function
|
|
1453
|
-
C.value = !1,
|
|
1506
|
+
function co() {
|
|
1507
|
+
C.value = !1, i.value = null;
|
|
1454
1508
|
}
|
|
1455
|
-
function
|
|
1456
|
-
|
|
1509
|
+
function fo(e) {
|
|
1510
|
+
k.value = e, V.value = !0;
|
|
1457
1511
|
}
|
|
1458
|
-
function
|
|
1459
|
-
|
|
1512
|
+
function mo() {
|
|
1513
|
+
V.value = !1, k.value = null;
|
|
1460
1514
|
}
|
|
1461
|
-
|
|
1462
|
-
e &&
|
|
1515
|
+
de(r.currentBusiness, (e) => {
|
|
1516
|
+
e && d.readTeamMembers();
|
|
1463
1517
|
}, {
|
|
1464
1518
|
immediate: !0
|
|
1465
1519
|
});
|
|
1466
|
-
function
|
|
1467
|
-
const e =
|
|
1520
|
+
function vo() {
|
|
1521
|
+
const e = fe.value;
|
|
1468
1522
|
if (!(e != null && e.length)) return;
|
|
1469
|
-
const s = new Set(
|
|
1470
|
-
|
|
1523
|
+
const s = new Set(ye.value.map((x) => x.userId)), u = new Set(d.members.map((x) => x.doc.userId)), y = e.filter((x) => x === $e ? Me.value : d.hasLoaded ? u.has(x) || s.has(x) : !0);
|
|
1524
|
+
y.length !== e.length && (fe.value = y.length ? y : void 0);
|
|
1471
1525
|
}
|
|
1472
|
-
async function
|
|
1473
|
-
var
|
|
1474
|
-
if (!((
|
|
1526
|
+
async function po() {
|
|
1527
|
+
var u;
|
|
1528
|
+
if (!((u = r.currentBusiness.value) != null && u._id)) return;
|
|
1475
1529
|
const {
|
|
1476
1530
|
startDate: e,
|
|
1477
1531
|
endDate: s
|
|
1478
1532
|
} = Q.value;
|
|
1479
1533
|
try {
|
|
1480
1534
|
const {
|
|
1481
|
-
actors:
|
|
1535
|
+
actors: y,
|
|
1482
1536
|
showFeedmeAdminFilter: x
|
|
1483
|
-
} = await
|
|
1537
|
+
} = await Ee.getFeedmeAdminFilter({
|
|
1484
1538
|
...e ? {
|
|
1485
1539
|
from: se(e)
|
|
1486
1540
|
} : {},
|
|
@@ -1488,235 +1542,235 @@ const es = {
|
|
|
1488
1542
|
to: se(s)
|
|
1489
1543
|
} : {}
|
|
1490
1544
|
});
|
|
1491
|
-
|
|
1545
|
+
ye.value = y, Me.value = x;
|
|
1492
1546
|
} catch {
|
|
1493
|
-
|
|
1547
|
+
ye.value = [], Me.value = !1;
|
|
1494
1548
|
}
|
|
1495
|
-
|
|
1549
|
+
vo();
|
|
1496
1550
|
}
|
|
1497
|
-
return
|
|
1551
|
+
return de(() => {
|
|
1498
1552
|
var e;
|
|
1499
1553
|
return {
|
|
1500
|
-
businessId: (e =
|
|
1554
|
+
businessId: (e = r.currentBusiness.value) == null ? void 0 : e._id,
|
|
1501
1555
|
range: Q.value
|
|
1502
1556
|
};
|
|
1503
|
-
}, () =>
|
|
1557
|
+
}, () => po(), {
|
|
1504
1558
|
immediate: !0,
|
|
1505
1559
|
deep: !0
|
|
1506
1560
|
}), (e, s) => {
|
|
1507
|
-
const
|
|
1508
|
-
return v(),
|
|
1509
|
-
heading:
|
|
1561
|
+
const u = N("FmSpacer"), y = N("FmButton"), x = N("FmMenuItem"), F = N("FmMenu"), $ = N("FmChip"), oe = N("FmDateRangePicker"), Ce = N("FmSearch"), be = N("FmTable"), Te = N("FmIcon"), Xe = N("FmTooltip"), _e = N("FmSideSheet");
|
|
1562
|
+
return v(), b(q, null, [m(Vo, {
|
|
1563
|
+
heading: c(o)("auditLog.title")
|
|
1510
1564
|
}, {
|
|
1511
|
-
"append-heading": B(() => [m(
|
|
1565
|
+
"append-heading": B(() => [m(u), m(y, {
|
|
1512
1566
|
variant: "primary",
|
|
1513
1567
|
"prepend-icon": "upload",
|
|
1514
|
-
label:
|
|
1515
|
-
disabled: h.value.length === 0 ||
|
|
1516
|
-
loading:
|
|
1517
|
-
onClick:
|
|
1568
|
+
label: c(o)("auditLog.export"),
|
|
1569
|
+
disabled: h.value.length === 0 || p.value || c(d).isLoading || c(d).members.length === 0,
|
|
1570
|
+
loading: p.value,
|
|
1571
|
+
onClick: oo
|
|
1518
1572
|
}, null, 8, ["label", "disabled", "loading"]), m(F, {
|
|
1519
1573
|
"close-on-click": !1,
|
|
1520
1574
|
"z-index": 50
|
|
1521
1575
|
}, {
|
|
1522
|
-
"menu-button": B(() => [m(
|
|
1576
|
+
"menu-button": B(() => [m(y, {
|
|
1523
1577
|
variant: "tertiary",
|
|
1524
1578
|
icon: "settings",
|
|
1525
|
-
"aria-label":
|
|
1526
|
-
disabled:
|
|
1579
|
+
"aria-label": c(o)("auditLog.exportSettings.title"),
|
|
1580
|
+
disabled: p.value
|
|
1527
1581
|
}, null, 8, ["aria-label", "disabled"])]),
|
|
1528
|
-
default: B(() => [a("div",
|
|
1582
|
+
default: B(() => [a("div", ns, [a("p", ls, l(c(o)("auditLog.exportSettings.title")), 1), (v(), b(q, null, ae(We, (f) => m(x, {
|
|
1529
1583
|
key: f.key,
|
|
1530
|
-
label:
|
|
1584
|
+
label: c(o)(f.labelKey),
|
|
1531
1585
|
"has-checkbox": "",
|
|
1532
1586
|
"model-value": ve.value.has(f.key),
|
|
1533
1587
|
disabled: ve.value.has(f.key) && ve.value.size === 1,
|
|
1534
|
-
onClick: (
|
|
1588
|
+
onClick: (P) => to(f.key)
|
|
1535
1589
|
}, null, 8, ["label", "model-value", "disabled", "onClick"])), 64))])]),
|
|
1536
1590
|
_: 1
|
|
1537
1591
|
})]),
|
|
1538
|
-
default: B(() => [a("div",
|
|
1539
|
-
modelValue:
|
|
1540
|
-
"onUpdate:modelValue": s[0] || (s[0] = (f) =>
|
|
1541
|
-
items:
|
|
1542
|
-
}, null, 8, ["modelValue", "items"]), a("div",
|
|
1592
|
+
default: B(() => [a("div", rs, [a("div", is, [m(Yo, {
|
|
1593
|
+
modelValue: le.value,
|
|
1594
|
+
"onUpdate:modelValue": s[0] || (s[0] = (f) => le.value = f),
|
|
1595
|
+
items: Et.value
|
|
1596
|
+
}, null, 8, ["modelValue", "items"]), a("div", us, [m(oe, {
|
|
1543
1597
|
modelValue: Q.value,
|
|
1544
1598
|
"onUpdate:modelValue": s[1] || (s[1] = (f) => Q.value = f),
|
|
1545
1599
|
"show-predefined-range": "",
|
|
1546
1600
|
"show-time": "",
|
|
1547
|
-
"predefined-range":
|
|
1601
|
+
"predefined-range": Wt.value
|
|
1548
1602
|
}, {
|
|
1549
|
-
"trigger-button": B(() => [m(
|
|
1550
|
-
label:
|
|
1603
|
+
"trigger-button": B(() => [m($, {
|
|
1604
|
+
label: Ht.value,
|
|
1551
1605
|
icon: "calendar_month"
|
|
1552
1606
|
}, null, 8, ["label"])]),
|
|
1553
1607
|
_: 1
|
|
1554
|
-
}, 8, ["modelValue", "predefined-range"]), a("div",
|
|
1555
|
-
modelValue:
|
|
1556
|
-
"onUpdate:modelValue": s[2] || (s[2] = (f) =>
|
|
1557
|
-
items:
|
|
1608
|
+
}, 8, ["modelValue", "predefined-range"]), a("div", ds, [m(Pe, {
|
|
1609
|
+
modelValue: fe.value,
|
|
1610
|
+
"onUpdate:modelValue": s[2] || (s[2] = (f) => fe.value = f),
|
|
1611
|
+
items: Nt.value,
|
|
1558
1612
|
multiple: "",
|
|
1559
1613
|
variant: "dark",
|
|
1560
|
-
placeholder:
|
|
1561
|
-
"selected-prefix":
|
|
1614
|
+
placeholder: c(o)("auditLog.filter.user_placeholder"),
|
|
1615
|
+
"selected-prefix": c(o)("auditLog.filter.selected_user_prefix"),
|
|
1562
1616
|
"chip-icon": "account_circle"
|
|
1563
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div",
|
|
1617
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div", cs, [m(Pe, {
|
|
1564
1618
|
modelValue: G.value,
|
|
1565
1619
|
"onUpdate:modelValue": s[3] || (s[3] = (f) => G.value = f),
|
|
1566
|
-
items:
|
|
1567
|
-
"filter-fn":
|
|
1620
|
+
items: Rt.value,
|
|
1621
|
+
"filter-fn": Kt,
|
|
1568
1622
|
multiple: "",
|
|
1569
1623
|
variant: "dark",
|
|
1570
|
-
placeholder:
|
|
1571
|
-
"selected-prefix":
|
|
1624
|
+
placeholder: c(o)("auditLog.filter.subject_placeholder"),
|
|
1625
|
+
"selected-prefix": c(o)("auditLog.filter.selected_subject_prefix"),
|
|
1572
1626
|
"chip-icon": "badge"
|
|
1573
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div",
|
|
1627
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div", fs, [m(Pe, {
|
|
1574
1628
|
modelValue: ee.value,
|
|
1575
1629
|
"onUpdate:modelValue": s[4] || (s[4] = (f) => ee.value = f),
|
|
1576
|
-
items:
|
|
1630
|
+
items: Bt.value,
|
|
1577
1631
|
multiple: "",
|
|
1578
1632
|
variant: "dark",
|
|
1579
|
-
placeholder:
|
|
1580
|
-
"selected-prefix":
|
|
1633
|
+
placeholder: c(o)("auditLog.filter.action_placeholder"),
|
|
1634
|
+
"selected-prefix": c(o)("auditLog.filter.selected_action_prefix"),
|
|
1581
1635
|
searchable: !1
|
|
1582
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div",
|
|
1636
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div", ms, [m(Pe, {
|
|
1583
1637
|
modelValue: Z.value,
|
|
1584
1638
|
"onUpdate:modelValue": s[5] || (s[5] = (f) => Z.value = f),
|
|
1585
|
-
items:
|
|
1639
|
+
items: Yt.value,
|
|
1586
1640
|
multiple: "",
|
|
1587
1641
|
variant: "dark",
|
|
1588
|
-
placeholder:
|
|
1589
|
-
"selected-prefix":
|
|
1642
|
+
placeholder: c(o)("auditLog.filter.status_placeholder"),
|
|
1643
|
+
"selected-prefix": c(o)("auditLog.filter.selected_status_prefix"),
|
|
1590
1644
|
searchable: !1,
|
|
1591
1645
|
"chip-icon": "check_circle"
|
|
1592
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), m(
|
|
1593
|
-
modelValue:
|
|
1594
|
-
"onUpdate:modelValue": s[6] || (s[6] = (f) =>
|
|
1646
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), m(Ce, {
|
|
1647
|
+
modelValue: Be.value,
|
|
1648
|
+
"onUpdate:modelValue": s[6] || (s[6] = (f) => Be.value = f),
|
|
1595
1649
|
class: "ml-auto w-[280px]",
|
|
1596
|
-
placeholder:
|
|
1597
|
-
}, null, 8, ["modelValue", "placeholder"])])]), m(
|
|
1598
|
-
default: B(() => [a("div",
|
|
1650
|
+
placeholder: c(o)("auditLog.search.placeholder")
|
|
1651
|
+
}, null, 8, ["modelValue", "placeholder"])])]), m(Co, null, {
|
|
1652
|
+
default: B(() => [a("div", vs, [m(Po, {
|
|
1599
1653
|
"is-loading": g.value,
|
|
1600
1654
|
"is-empty": h.value.length === 0,
|
|
1601
|
-
title:
|
|
1602
|
-
subtitle:
|
|
1655
|
+
title: c(o)("auditLog.noData.title"),
|
|
1656
|
+
subtitle: c(o)("auditLog.noData.subtitle")
|
|
1603
1657
|
}, {
|
|
1604
|
-
default: B(() => [(v(),
|
|
1605
|
-
key:
|
|
1606
|
-
"column-defs":
|
|
1658
|
+
default: B(() => [(v(), ke(be, {
|
|
1659
|
+
key: _t.value,
|
|
1660
|
+
"column-defs": lo,
|
|
1607
1661
|
"row-data": h.value,
|
|
1608
|
-
"page-size":
|
|
1609
|
-
"page-count":
|
|
1610
|
-
"row-count":
|
|
1611
|
-
"fetch-fn":
|
|
1612
|
-
"hide-footer":
|
|
1662
|
+
"page-size": Se,
|
|
1663
|
+
"page-count": lt.value,
|
|
1664
|
+
"row-count": Re.value,
|
|
1665
|
+
"fetch-fn": io,
|
|
1666
|
+
"hide-footer": lt.value <= 1,
|
|
1613
1667
|
loading: g.value,
|
|
1614
1668
|
"expanded-state": O.value,
|
|
1615
|
-
"get-row-can-expand":
|
|
1616
|
-
"get-sub-row":
|
|
1669
|
+
"get-row-can-expand": ao,
|
|
1670
|
+
"get-sub-row": no,
|
|
1617
1671
|
"pin-header-row": "",
|
|
1618
1672
|
class: "audit-log-list-table cursor-pointer",
|
|
1619
1673
|
"onUpdate:expandedState": s[7] || (s[7] = (f) => O.value = f),
|
|
1620
|
-
onRowClick: s[8] || (s[8] = (f) =>
|
|
1674
|
+
onRowClick: s[8] || (s[8] = (f) => uo(f.original))
|
|
1621
1675
|
}, null, 8, ["row-data", "page-count", "row-count", "hide-footer", "loading", "expanded-state"]))]),
|
|
1622
1676
|
_: 1
|
|
1623
1677
|
}, 8, ["is-loading", "is-empty", "title", "subtitle"])])]),
|
|
1624
1678
|
_: 1
|
|
1625
1679
|
})])]),
|
|
1626
1680
|
_: 1
|
|
1627
|
-
}, 8, ["heading"]), m(
|
|
1628
|
-
header:
|
|
1681
|
+
}, 8, ["heading"]), m(_e, {
|
|
1682
|
+
header: c(o)("auditLog.detail.header"),
|
|
1629
1683
|
"model-value": C.value,
|
|
1630
1684
|
"max-width": 768,
|
|
1631
1685
|
"dismiss-away": "",
|
|
1632
1686
|
"onUpdate:modelValue": s[9] || (s[9] = (f) => {
|
|
1633
|
-
f ||
|
|
1687
|
+
f || co();
|
|
1634
1688
|
})
|
|
1635
1689
|
}, {
|
|
1636
|
-
default: B(() => [
|
|
1637
|
-
variant:
|
|
1638
|
-
label:
|
|
1690
|
+
default: B(() => [i.value ? (v(), b("div", ps, [a("div", gs, [a("div", hs, [a("p", ys, l(Xt(i.value)), 1), i.value.traceId ? (v(), b("p", bs, " Trace ID: " + l(i.value.traceId), 1)) : j("", !0)]), a("div", _s, [m($, {
|
|
1691
|
+
variant: ht(i.value.outcome),
|
|
1692
|
+
label: He(i.value.outcome),
|
|
1639
1693
|
compact: ""
|
|
1640
|
-
}, null, 8, ["variant", "label"]),
|
|
1694
|
+
}, null, 8, ["variant", "label"]), c(At)(i.value) ? (v(), ke(Xe, {
|
|
1641
1695
|
key: 0,
|
|
1642
1696
|
variant: "plain",
|
|
1643
1697
|
placement: "top"
|
|
1644
1698
|
}, {
|
|
1645
|
-
content: B(() => [
|
|
1646
|
-
default: B(() => [m(
|
|
1699
|
+
content: B(() => [Ve(l(c(o)("auditLog.operation.partialFailure")), 1)]),
|
|
1700
|
+
default: B(() => [m(Te, {
|
|
1647
1701
|
name: "error",
|
|
1648
1702
|
size: "sm",
|
|
1649
1703
|
class: "cursor-help text-fm-color-typo-error"
|
|
1650
1704
|
})]),
|
|
1651
1705
|
_: 1
|
|
1652
|
-
})) : j("", !0)])]), a("div",
|
|
1706
|
+
})) : j("", !0)])]), a("div", xs, [a("div", Ls, [a("div", null, [a("p", Ss, l(c(o)("auditLog.detail.date")), 1), a("p", ks, l(mt(i.value.timestamp)), 1)]), a("div", null, [a("p", ws, l(c(o)("auditLog.detail.user")), 1), a("p", Is, l(je(i.value)), 1)]), a("div", null, [a("p", As, l(c(o)("auditLog.detail.email")), 1), a("p", Fs, l(Gt(i.value)), 1)]), i.value.field ? (v(), b("div", Ms, [a("p", Os, l(c(o)("auditLog.detail.field")), 1), a("p", Ds, l(i.value.field), 1)])) : j("", !0), a("div", null, [a("p", js, l(c(o)("auditLog.detail.business")), 1), a("p", Cs, l(i.value.businessId || "-"), 1)]), a("div", null, [a("p", Ts, l(c(o)("auditLog.detail.restaurant")), 1), a("p", Vs, l(i.value.restaurantId || "-"), 1)])])]), a("div", Ps, [a("div", Es, [a("p", $s, l(c(o)("auditLog.detail.eventDetails")), 1)]), s[12] || (s[12] = a("hr", {
|
|
1653
1707
|
class: "border-fm-color-border-default"
|
|
1654
|
-
}, null, -1)), a("div",
|
|
1708
|
+
}, null, -1)), a("div", Ns, [a("div", null, [a("p", Us, l(c(o)("auditLog.detail.actionDescription")), 1), a("p", Rs, l(i.value.metadata.operationLabel || "-"), 1)])])]), a("div", Ks, [a("div", Bs, [a("p", Ys, l(c(o)("auditLog.detail.metadata")), 1)]), s[13] || (s[13] = a("hr", {
|
|
1655
1709
|
class: "border-fm-color-border-default"
|
|
1656
|
-
}, null, -1)), a("div",
|
|
1657
|
-
key:
|
|
1710
|
+
}, null, -1)), a("div", zs, [a("div", null, [a("p", qs, l(c(o)("auditLog.detail.resolvedFrom")), 1), a("p", Js, l(Qt(i.value.metadata.resolvedFrom)), 1)]), (i.value.metadata.resolvedFrom === "permissionSet" || i.value.metadata.resolvedFrom === "systemPermissionSet") && (i.value.metadata.permissionSetName || i.value.metadata.permissionSetId) ? (v(), b("div", Hs, [a("p", Ws, l(c(o)("auditLog.detail.permissionSet")), 1), i.value.metadata.permissionSetName ? (v(), b("p", Gs, l(i.value.metadata.permissionSetName), 1)) : j("", !0), i.value.metadata.permissionSetId ? (v(), b("p", Xs, l(i.value.metadata.permissionSetId), 1)) : j("", !0)])) : j("", !0), i.value.metadata.reason ? (v(), b("div", Qs, [a("p", Zs, l(c(o)("auditLog.detail.reason")), 1), a("p", ea, l(i.value.metadata.reason), 1)])) : j("", !0), a("div", null, [a("p", ta, l(c(o)("auditLog.detail.requestMethod")), 1), a("p", oa, l(Zt(i.value)), 1)]), a("div", null, [a("p", sa, l(c(o)("auditLog.detail.requestPath")), 1), a("p", aa, l(i.value.metadata.requestPath || "-"), 1)]), i.value.metadata.trace && i.value.metadata.trace.length > 0 ? (v(), b("div", na, [a("p", la, l(c(o)("auditLog.detail.permissionTrace")), 1), a("ol", ra, [(v(!0), b(q, null, ae(i.value.metadata.trace, (f, P) => (v(), b("li", {
|
|
1711
|
+
key: P,
|
|
1658
1712
|
class: "flex items-center gap-6"
|
|
1659
|
-
}, [a("span",
|
|
1713
|
+
}, [a("span", ia, l(P + 1), 1), a("span", ua, l(f), 1), P < i.value.metadata.trace.length - 1 ? (v(), b("span", da, "→")) : j("", !0)]))), 128))])])) : j("", !0), I.value ? (v(), b("div", ca, [a("p", fa, l(c(o)("auditLog.detail.requestBody")), 1), a("pre", ma, l(I.value), 1)])) : j("", !0)])])])) : j("", !0)]),
|
|
1660
1714
|
_: 1
|
|
1661
|
-
}, 8, ["header", "model-value"]), m(
|
|
1662
|
-
header:
|
|
1663
|
-
"model-value":
|
|
1715
|
+
}, 8, ["header", "model-value"]), m(_e, {
|
|
1716
|
+
header: c(o)("auditLog.operation.sheetHeader"),
|
|
1717
|
+
"model-value": V.value,
|
|
1664
1718
|
"max-width": 768,
|
|
1665
1719
|
"dismiss-away": "",
|
|
1666
1720
|
"onUpdate:modelValue": s[11] || (s[11] = (f) => {
|
|
1667
|
-
f ||
|
|
1721
|
+
f || mo();
|
|
1668
1722
|
})
|
|
1669
1723
|
}, {
|
|
1670
|
-
default: B(() => [
|
|
1671
|
-
variant:
|
|
1672
|
-
label:
|
|
1724
|
+
default: B(() => [k.value ? (v(), b("div", va, [a("div", pa, [a("div", ga, [a("p", ha, l(gt(k.value)), 1), k.value.entityId ? (v(), b("p", ya, l(k.value.entityId), 1)) : j("", !0)]), m($, {
|
|
1725
|
+
variant: k.value.status === "failed" ? "critical" : "success",
|
|
1726
|
+
label: k.value.status === "failed" ? c(o)("auditLog.outcome.failed") : c(o)("auditLog.outcome.success"),
|
|
1673
1727
|
compact: ""
|
|
1674
|
-
}, null, 8, ["variant", "label"])]), a("div",
|
|
1675
|
-
ms:
|
|
1676
|
-
})), 1)])) : j("", !0)])]),
|
|
1728
|
+
}, null, 8, ["variant", "label"])]), a("div", ba, [a("div", _a, [a("div", null, [a("p", xa, l(c(o)("auditLog.detail.date")), 1), a("p", La, l(mt(k.value.timestamp)), 1)]), k.value.entityId ? (v(), b("div", Sa, [a("p", ka, l(c(o)("auditLog.operation.entity")), 1), a("p", wa, l(k.value.entityId), 1)])) : j("", !0), k.value.durationMs !== void 0 ? (v(), b("div", Ia, [a("p", Aa, l(c(o)("auditLog.operation.duration")), 1), a("p", Fa, l(c(o)("auditLog.operation.durationValue", {
|
|
1729
|
+
ms: k.value.durationMs
|
|
1730
|
+
})), 1)])) : j("", !0)])]), k.value.status === "failed" ? (v(), b("div", Ma, [a("p", Oa, l(c(o)("auditLog.operation.error")), 1), a("p", Da, l(k.value.errorMessage || "-"), 1)])) : j("", !0), a("div", ja, [a("div", Ca, [a("p", Ta, l(c(o)("auditLog.operation.changes")), 1)]), s[16] || (s[16] = a("hr", {
|
|
1677
1731
|
class: "border-fm-color-border-default"
|
|
1678
|
-
}, null, -1)), a("div",
|
|
1679
|
-
key:
|
|
1732
|
+
}, null, -1)), a("div", Va, [E.value.length ? (v(), b("div", Pa, [(v(!0), b(q, null, ae(E.value, (f, P) => (v(), b("div", {
|
|
1733
|
+
key: P,
|
|
1680
1734
|
class: "space-y-4 py-8 first:pt-0 last:pb-0"
|
|
1681
|
-
}, [a("div",
|
|
1682
|
-
variant:
|
|
1735
|
+
}, [a("div", Ea, [m($, {
|
|
1736
|
+
variant: at(f.type),
|
|
1683
1737
|
label: J(f.type),
|
|
1684
1738
|
compact: ""
|
|
1685
|
-
}, null, 8, ["variant", "label"]), a("span",
|
|
1739
|
+
}, null, 8, ["variant", "label"]), a("span", $a, l(he(f)), 1)]), a("p", Na, [f.type === "add" ? (v(), b("span", Ua, l(f.afterDisplay), 1)) : f.type === "remove" ? (v(), b("span", Ra, l(f.beforeDisplay), 1)) : (v(), b(q, {
|
|
1686
1740
|
key: 2
|
|
1687
|
-
}, [a("span",
|
|
1741
|
+
}, [a("span", Ka, l(f.beforeDisplay), 1), s[14] || (s[14] = a("span", {
|
|
1688
1742
|
class: "text-fm-color-typo-secondary"
|
|
1689
|
-
}, " → ", -1)), a("span",
|
|
1743
|
+
}, " → ", -1)), a("span", Ba, l(f.afterDisplay), 1)], 64))])]))), 128))])) : nt.value.length ? (v(), b("div", Ya, [(v(!0), b(q, null, ae(nt.value, (f) => (v(), b("div", {
|
|
1690
1744
|
key: f.groupKey,
|
|
1691
1745
|
class: "space-y-4 py-8 first:pt-0 last:pb-0"
|
|
1692
|
-
}, [a("div",
|
|
1693
|
-
variant:
|
|
1694
|
-
label:
|
|
1746
|
+
}, [a("div", za, [m($, {
|
|
1747
|
+
variant: ce(f.type),
|
|
1748
|
+
label: ne(f.type),
|
|
1695
1749
|
compact: ""
|
|
1696
|
-
}, null, 8, ["variant", "label"]), a("span",
|
|
1697
|
-
key:
|
|
1750
|
+
}, null, 8, ["variant", "label"]), a("span", qa, l(f.displayKey), 1)]), a("div", Ja, [(v(!0), b(q, null, ae(f.rows, (P) => (v(), b("p", {
|
|
1751
|
+
key: P.path,
|
|
1698
1752
|
class: "break-all font-mono text-xs"
|
|
1699
|
-
}, [
|
|
1753
|
+
}, [P.type === "added" ? (v(), b("span", Ha, l(P.after ?? "—"), 1)) : P.type === "removed" ? (v(), b("span", Wa, l(P.before ?? "—"), 1)) : (v(), b(q, {
|
|
1700
1754
|
key: 2
|
|
1701
|
-
}, [a("span",
|
|
1755
|
+
}, [a("span", Ga, l(P.before ?? "—"), 1), s[15] || (s[15] = a("span", {
|
|
1702
1756
|
class: "text-fm-color-typo-secondary"
|
|
1703
|
-
}, " → ", -1)), a("span",
|
|
1757
|
+
}, " → ", -1)), a("span", Xa, l(P.after ?? "—"), 1)], 64))]))), 128))])]))), 128))])) : (v(), b("p", Qa, l(c(o)("auditLog.operation.noChanges")), 1))])]), T.value || Y.value ? (v(), b("div", Za, [a("button", {
|
|
1704
1758
|
type: "button",
|
|
1705
1759
|
class: "flex w-full items-center justify-between p-12 text-left",
|
|
1706
|
-
onClick: s[10] || (s[10] = (f) =>
|
|
1707
|
-
}, [a("p",
|
|
1760
|
+
onClick: s[10] || (s[10] = (f) => U.value = !U.value)
|
|
1761
|
+
}, [a("p", en, l(c(o)("auditLog.operation.showData")), 1), m(Te, {
|
|
1708
1762
|
name: "keyboard_arrow_down",
|
|
1709
|
-
class:
|
|
1710
|
-
}, null, 8, ["class"])]),
|
|
1763
|
+
class: Do(["shrink-0 transition-transform", U.value ? "rotate-180" : ""])
|
|
1764
|
+
}, null, 8, ["class"])]), U.value ? (v(), b(q, {
|
|
1711
1765
|
key: 0
|
|
1712
1766
|
}, [s[17] || (s[17] = a("hr", {
|
|
1713
1767
|
class: "border-fm-color-border-default"
|
|
1714
|
-
}, null, -1)), a("div",
|
|
1768
|
+
}, null, -1)), a("div", tn, [T.value ? (v(), b("div", on, [a("p", sn, l(c(o)("auditLog.operation.before")), 1), a("pre", an, l(T.value), 1)])) : j("", !0), Y.value ? (v(), b("div", nn, [a("p", ln, l(c(o)("auditLog.operation.after")), 1), a("pre", rn, l(Y.value), 1)])) : j("", !0)])], 64)) : j("", !0)])) : j("", !0)])) : j("", !0)]),
|
|
1715
1769
|
_: 1
|
|
1716
1770
|
}, 8, ["header", "model-value"])], 64);
|
|
1717
1771
|
};
|
|
1718
1772
|
}
|
|
1719
|
-
}),
|
|
1773
|
+
}), In = /* @__PURE__ */ To(cn, [["__scopeId", "data-v-8abe880c"]]);
|
|
1720
1774
|
export {
|
|
1721
|
-
|
|
1775
|
+
In as default
|
|
1722
1776
|
};
|