@feedmepos/mf-hrm-portal 2.0.24-dev.1 → 2.0.24-dev.4
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/{AuditLogList-BetvGaDX.js → AuditLogList-mfHfCrDp.js} +374 -380
- package/dist/{EmployeeList-B-XHFRU-.js → EmployeeList-mnaGEL4R.js} +6 -6
- package/dist/{Main-2OGCqAeO.js → Main-B4Xf2dm4.js} +4 -4
- package/dist/{Main-0k0WaemL.js → Main-BWSMKWxB.js} +6 -6
- package/dist/{Main-CjfEUkuJ.js → Main-DTJOj2jJ.js} +9 -9
- package/dist/{PermissionSetList-Cl5Zkj0c.js → PermissionSetList-CgPUMTJg.js} +6 -6
- package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DhsRoS9v.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CfHx0q1H.js} +702 -702
- package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_a439fdd8_lang-DREzWx0l.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_a439fdd8_lang-Cod0zTbu.js} +1 -1
- package/dist/{RoleList-CqxTqm13.js → RoleList-Cg8Ye2Zk.js} +7 -7
- package/dist/{TeamMemberList-BVWthOPA.js → TeamMemberList-BoVZBjtB.js} +8 -8
- package/dist/{TimesheetList-Bh9v_qYt.js → TimesheetList-BiQswrw7.js} +6 -6
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_d7ed31d7_lang-CLPUVVhu.js → TimesheetList.vue_vue_type_style_index_0_scoped_d7ed31d7_lang-Bx5-vyxN.js} +2 -2
- package/dist/{app-CMYV9sz0.js → app-CZLWCtKb.js} +28 -20
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-DlsortAX.js → dayjs.min-BMdREwIr.js} +1 -1
- package/dist/{employee-walWoaes.js → employee-CHBituQX.js} +3 -3
- package/dist/{iteration-CzhHoG_z.js → iteration-DLrwtjjD.js} +1 -1
- package/dist/{lodash-DLFCPgMt.js → lodash-DrGn50Sb.js} +1 -1
- package/dist/{rule-BqeyTmLz.js → rule-BFOjocRa.js} +2 -2
- package/dist/src/stores/team.d.ts +4 -1
- package/dist/src/views/audit-log/locales/index.d.ts +16 -8
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-BX_L8TWU.js → useAppStore-C1TRO_QU.js} +1 -1
- package/dist/{useLoading-BlNSXpjY.js → useLoading-BBHvBcQn.js} +1 -1
- package/dist/{useReportPermissions-DiF4euxe.js → useReportPermissions-DhyumGy6.js} +3 -3
- package/package.json +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as Be, ref as
|
|
2
|
-
import { d as
|
|
1
|
+
import { defineComponent as Be, ref as g, computed as _, onMounted as wt, onBeforeUnmount as Mt, watch as fe, resolveComponent as U, createElementBlock as S, openBlock as f, createBlock as Z, createCommentVNode as C, createElementVNode as l, Fragment as ee, renderList as ue, withCtx as B, createVNode as h, toDisplayString as u, unref as n, nextTick as Ft } from "vue";
|
|
2
|
+
import { d as y } from "./dayjs.min-BMdREwIr.js";
|
|
3
3
|
import { useI18n as Ke, useCoreStore as Dt } from "@feedmepos/mf-common";
|
|
4
|
-
import { G as
|
|
4
|
+
import { G as Ee, _ as It } from "./app-CZLWCtKb.js";
|
|
5
5
|
import { components as Re } from "@feedmepos/ui-library";
|
|
6
|
-
import { g as Ce, b as Ue } from "./iteration-
|
|
7
|
-
import { S as
|
|
6
|
+
import { g as Ce, b as Ue } from "./iteration-DLrwtjjD.js";
|
|
7
|
+
import { S as me, _ as Ot } from "./SelectFilter-C61IZSID.js";
|
|
8
8
|
import { _ as Tt } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
|
|
9
9
|
import { _ as jt } from "./index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js";
|
|
10
|
-
import { t as Pt, p as
|
|
10
|
+
import { t as Pt, p as $e } from "./rule-BFOjocRa.js";
|
|
11
11
|
import { defineStore as Vt } from "pinia";
|
|
12
12
|
const se = [
|
|
13
13
|
{ key: "all", label: "All", subjectPrefixes: [] },
|
|
@@ -19,62 +19,62 @@ const se = [
|
|
|
19
19
|
{ key: "crm", label: "CRM", subjectPrefixes: ["business::crm", "crm"] }
|
|
20
20
|
// Add more as modules are revamped with new actionguard:
|
|
21
21
|
// { key: 'restaurantOperation', label: 'Restaurant Operation', subjectPrefixes: ['restaurant'] },
|
|
22
|
-
],
|
|
23
|
-
async count(
|
|
24
|
-
var
|
|
22
|
+
], Ye = "/audit-logs", _e = {
|
|
23
|
+
async count(a) {
|
|
24
|
+
var w, j, M, k, s;
|
|
25
25
|
const o = {
|
|
26
|
-
...
|
|
27
|
-
...
|
|
28
|
-
...(
|
|
29
|
-
...(j =
|
|
30
|
-
...(
|
|
31
|
-
...(
|
|
32
|
-
...(s =
|
|
26
|
+
...a != null && a.from ? { from: a.from } : {},
|
|
27
|
+
...a != null && a.to ? { to: a.to } : {},
|
|
28
|
+
...(w = a == null ? void 0 : a.userIds) != null && w.length ? { userIds: a.userIds } : {},
|
|
29
|
+
...(j = a == null ? void 0 : a.subjects) != null && j.length ? { subjects: a.subjects } : {},
|
|
30
|
+
...(M = a == null ? void 0 : a.subjectPrefixes) != null && M.length ? { subjectPrefixes: a.subjectPrefixes } : {},
|
|
31
|
+
...(k = a == null ? void 0 : a.actions) != null && k.length ? { actions: a.actions } : {},
|
|
32
|
+
...(s = a == null ? void 0 : a.outcomes) != null && s.length ? { outcomes: a.outcomes } : {}
|
|
33
33
|
};
|
|
34
34
|
return (await Ce(
|
|
35
|
-
await Ue().get(`${
|
|
35
|
+
await Ue().get(`${Ye}/count`, {
|
|
36
36
|
params: o,
|
|
37
37
|
paramsSerializer: (O) => {
|
|
38
38
|
const P = new URLSearchParams();
|
|
39
|
-
for (const [
|
|
40
|
-
if (Array.isArray(
|
|
41
|
-
for (const
|
|
42
|
-
else
|
|
39
|
+
for (const [c, F] of Object.entries(O))
|
|
40
|
+
if (Array.isArray(F))
|
|
41
|
+
for (const K of F) P.append(c, String(K));
|
|
42
|
+
else F != null && P.append(c, String(F));
|
|
43
43
|
return P.toString();
|
|
44
44
|
}
|
|
45
45
|
})
|
|
46
46
|
)).total;
|
|
47
47
|
},
|
|
48
|
-
async read(
|
|
49
|
-
var
|
|
48
|
+
async read(a) {
|
|
49
|
+
var v, w, j, M, k;
|
|
50
50
|
const o = {
|
|
51
|
-
limit: (
|
|
52
|
-
offset: (
|
|
53
|
-
...
|
|
54
|
-
...
|
|
55
|
-
...(
|
|
56
|
-
...(
|
|
57
|
-
...(j =
|
|
58
|
-
...(
|
|
59
|
-
...(
|
|
51
|
+
limit: (a == null ? void 0 : a.limit) ?? 100,
|
|
52
|
+
offset: (a == null ? void 0 : a.offset) ?? 0,
|
|
53
|
+
...a != null && a.from ? { from: a.from } : {},
|
|
54
|
+
...a != null && a.to ? { to: a.to } : {},
|
|
55
|
+
...(v = a == null ? void 0 : a.userIds) != null && v.length ? { userIds: a.userIds } : {},
|
|
56
|
+
...(w = a == null ? void 0 : a.subjects) != null && w.length ? { subjects: a.subjects } : {},
|
|
57
|
+
...(j = a == null ? void 0 : a.subjectPrefixes) != null && j.length ? { subjectPrefixes: a.subjectPrefixes } : {},
|
|
58
|
+
...(M = a == null ? void 0 : a.actions) != null && M.length ? { actions: a.actions } : {},
|
|
59
|
+
...(k = a == null ? void 0 : a.outcomes) != null && k.length ? { outcomes: a.outcomes } : {}
|
|
60
60
|
};
|
|
61
61
|
return Ce(
|
|
62
|
-
await Ue().get(
|
|
62
|
+
await Ue().get(Ye, {
|
|
63
63
|
params: o,
|
|
64
64
|
// Serialize arrays as repeated params: key=val1&key=val2
|
|
65
65
|
// (NestJS @Query expects this; axios default adds brackets which break matching)
|
|
66
66
|
paramsSerializer: (s) => {
|
|
67
67
|
const O = new URLSearchParams();
|
|
68
|
-
for (const [P,
|
|
69
|
-
if (Array.isArray(
|
|
70
|
-
for (const
|
|
71
|
-
else
|
|
68
|
+
for (const [P, c] of Object.entries(s))
|
|
69
|
+
if (Array.isArray(c))
|
|
70
|
+
for (const F of c) O.append(P, String(F));
|
|
71
|
+
else c != null && O.append(P, String(c));
|
|
72
72
|
return O.toString();
|
|
73
73
|
}
|
|
74
74
|
})
|
|
75
75
|
);
|
|
76
76
|
}
|
|
77
|
-
},
|
|
77
|
+
}, At = { class: "flex h-[46px] items-center gap-8 rounded-sm px-16 hover:bg-fm-color-opacity-sm" }, Et = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Rt = {
|
|
78
78
|
"data-more-measure": "",
|
|
79
79
|
class: "flex h-[46px] items-center gap-8 rounded-sm px-16"
|
|
80
80
|
}, Ct = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ut = /* @__PURE__ */ Be({
|
|
@@ -84,150 +84,151 @@ const se = [
|
|
|
84
84
|
items: {}
|
|
85
85
|
},
|
|
86
86
|
emits: ["update:modelValue"],
|
|
87
|
-
setup(
|
|
88
|
-
const
|
|
89
|
-
let
|
|
90
|
-
async function
|
|
87
|
+
setup(a, { emit: o }) {
|
|
88
|
+
const v = a, w = o, { t: j } = Ke(), M = g(!1), k = g(null), s = g(null), O = g([]), P = g(0), c = g(0);
|
|
89
|
+
let F = null;
|
|
90
|
+
async function K() {
|
|
91
91
|
if (await Ft(), !s.value) return;
|
|
92
|
-
const
|
|
93
|
-
O.value = Array.from(
|
|
92
|
+
const b = s.value.querySelectorAll("[data-tab-measure]");
|
|
93
|
+
O.value = Array.from(b).map((D) => D.offsetWidth);
|
|
94
94
|
const m = s.value.querySelector("[data-more-measure]");
|
|
95
95
|
P.value = (m == null ? void 0 : m.offsetWidth) ?? 0;
|
|
96
96
|
}
|
|
97
|
-
const
|
|
98
|
-
const
|
|
99
|
-
if (
|
|
100
|
-
if (!
|
|
97
|
+
const ve = _(() => {
|
|
98
|
+
const b = v.items.length;
|
|
99
|
+
if (b === 0) return 0;
|
|
100
|
+
if (!c.value || O.value.length !== b) return b;
|
|
101
101
|
const m = O.value;
|
|
102
|
-
if (m.reduce((
|
|
103
|
-
const
|
|
102
|
+
if (m.reduce((r, H) => r + H, 0) <= c.value) return b;
|
|
103
|
+
const x = P.value;
|
|
104
104
|
let T = 0, V = 0;
|
|
105
|
-
for (let
|
|
106
|
-
T += m[
|
|
105
|
+
for (let r = 0; r < b && !(T + m[r] + x > c.value); r++)
|
|
106
|
+
T += m[r], V++;
|
|
107
107
|
return V;
|
|
108
|
-
}), J =
|
|
109
|
-
const
|
|
110
|
-
if (
|
|
111
|
-
const
|
|
112
|
-
if (!
|
|
113
|
-
if (
|
|
114
|
-
const T =
|
|
115
|
-
let
|
|
116
|
-
for (;
|
|
117
|
-
|
|
118
|
-
return [...
|
|
119
|
-
}), te =
|
|
120
|
-
const
|
|
121
|
-
return
|
|
108
|
+
}), J = _(() => {
|
|
109
|
+
const b = ve.value, m = v.items.length;
|
|
110
|
+
if (b >= m) return [...v.items];
|
|
111
|
+
const D = v.items.slice(0, b), x = v.items.find((E) => E.value === v.modelValue);
|
|
112
|
+
if (!x || D.some((E) => E.value === x.value)) return D;
|
|
113
|
+
if (b === 0) return [x];
|
|
114
|
+
const T = v.items.findIndex((E) => E.value === x.value), V = O.value, r = P.value, H = V[T] ?? 0;
|
|
115
|
+
let N = b, ae = V.slice(0, N - 1).reduce((E, z) => E + z, 0);
|
|
116
|
+
for (; N > 1 && ae + H + r > c.value; )
|
|
117
|
+
N--, ae = V.slice(0, N - 1).reduce((E, z) => E + z, 0);
|
|
118
|
+
return [...v.items.slice(0, Math.max(N - 1, 0)), x];
|
|
119
|
+
}), te = _(() => {
|
|
120
|
+
const b = new Set(J.value.map((m) => m.value));
|
|
121
|
+
return v.items.filter((m) => !b.has(m.value));
|
|
122
122
|
});
|
|
123
|
-
function oe(
|
|
124
|
-
|
|
123
|
+
function oe(b) {
|
|
124
|
+
M.value = !1, w("update:modelValue", b);
|
|
125
125
|
}
|
|
126
126
|
return wt(async () => {
|
|
127
|
-
await
|
|
128
|
-
|
|
129
|
-
}),
|
|
127
|
+
await K(), k.value && (c.value = k.value.clientWidth, F = new ResizeObserver(() => {
|
|
128
|
+
k.value && (c.value = k.value.clientWidth);
|
|
129
|
+
}), F.observe(k.value));
|
|
130
130
|
}), Mt(() => {
|
|
131
|
-
|
|
132
|
-
}),
|
|
133
|
-
() =>
|
|
131
|
+
F == null || F.disconnect(), F = null;
|
|
132
|
+
}), fe(
|
|
133
|
+
() => v.items,
|
|
134
134
|
() => {
|
|
135
|
-
|
|
135
|
+
K();
|
|
136
136
|
},
|
|
137
137
|
{ deep: !0 }
|
|
138
|
-
), (
|
|
139
|
-
const
|
|
140
|
-
return f(),
|
|
138
|
+
), (b, m) => {
|
|
139
|
+
const D = U("FmTab"), x = U("FmIcon"), T = U("FmMenuItem"), V = U("FmMenu");
|
|
140
|
+
return f(), S("div", {
|
|
141
141
|
ref_key: "containerRef",
|
|
142
|
-
ref:
|
|
142
|
+
ref: k,
|
|
143
143
|
class: "relative flex w-full flex-row items-center"
|
|
144
144
|
}, [
|
|
145
|
-
(f(!0),
|
|
146
|
-
key:
|
|
147
|
-
"model-value":
|
|
148
|
-
label:
|
|
149
|
-
badge:
|
|
150
|
-
disabled:
|
|
151
|
-
value:
|
|
145
|
+
(f(!0), S(ee, null, ue(J.value, (r) => (f(), Z(D, {
|
|
146
|
+
key: r.value,
|
|
147
|
+
"model-value": a.modelValue,
|
|
148
|
+
label: r.label,
|
|
149
|
+
badge: r.badge,
|
|
150
|
+
disabled: r.disabled,
|
|
151
|
+
value: r.value,
|
|
152
152
|
"onUpdate:modelValue": oe
|
|
153
153
|
}, null, 8, ["model-value", "label", "badge", "disabled", "value"]))), 128)),
|
|
154
154
|
te.value.length > 0 ? (f(), Z(V, {
|
|
155
155
|
key: 0,
|
|
156
|
-
"show-menu":
|
|
156
|
+
"show-menu": M.value,
|
|
157
157
|
class: "max-w-[360px] min-w-[90px] rounded-sm",
|
|
158
158
|
placement: "bottom-start",
|
|
159
|
-
onMenuChanged: m[0] || (m[0] = (
|
|
159
|
+
onMenuChanged: m[0] || (m[0] = (r) => M.value = r)
|
|
160
160
|
}, {
|
|
161
|
-
"menu-button":
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
161
|
+
"menu-button": B(() => [
|
|
162
|
+
l("div", At, [
|
|
163
|
+
h(x, { name: "more_vert" }),
|
|
164
|
+
l("span", Et, u(n(j)("auditLog.modules.more")), 1)
|
|
165
165
|
])
|
|
166
166
|
]),
|
|
167
|
-
default:
|
|
168
|
-
(f(!0),
|
|
169
|
-
key:
|
|
170
|
-
"model-value":
|
|
171
|
-
label:
|
|
172
|
-
disabled:
|
|
173
|
-
onClick: (H) => oe(
|
|
167
|
+
default: B(() => [
|
|
168
|
+
(f(!0), S(ee, null, ue(te.value, (r) => (f(), Z(T, {
|
|
169
|
+
key: r.value,
|
|
170
|
+
"model-value": a.modelValue === r.value,
|
|
171
|
+
label: r.label,
|
|
172
|
+
disabled: r.disabled,
|
|
173
|
+
onClick: (H) => oe(r.value)
|
|
174
174
|
}, null, 8, ["model-value", "label", "disabled", "onClick"]))), 128))
|
|
175
175
|
]),
|
|
176
176
|
_: 1
|
|
177
177
|
}, 8, ["show-menu"])) : C("", !0),
|
|
178
|
-
|
|
178
|
+
l("div", {
|
|
179
179
|
ref_key: "measurerRef",
|
|
180
180
|
ref: s,
|
|
181
181
|
"aria-hidden": "true",
|
|
182
182
|
class: "pointer-events-none invisible absolute -left-[9999px] -top-[9999px] flex flex-row items-center"
|
|
183
183
|
}, [
|
|
184
|
-
(f(!0),
|
|
185
|
-
key: `measure-${
|
|
184
|
+
(f(!0), S(ee, null, ue(a.items, (r) => (f(), S("div", {
|
|
185
|
+
key: `measure-${r.value}`,
|
|
186
186
|
"data-tab-measure": ""
|
|
187
187
|
}, [
|
|
188
|
-
|
|
189
|
-
"model-value":
|
|
190
|
-
label:
|
|
191
|
-
badge:
|
|
192
|
-
disabled:
|
|
193
|
-
value:
|
|
188
|
+
h(D, {
|
|
189
|
+
"model-value": a.modelValue,
|
|
190
|
+
label: r.label,
|
|
191
|
+
badge: r.badge,
|
|
192
|
+
disabled: r.disabled,
|
|
193
|
+
value: r.value
|
|
194
194
|
}, null, 8, ["model-value", "label", "badge", "disabled", "value"])
|
|
195
195
|
]))), 128)),
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
196
|
+
l("div", Rt, [
|
|
197
|
+
h(x, { name: "more_vert" }),
|
|
198
|
+
l("span", Ct, u(n(j)("auditLog.modules.more")), 1)
|
|
199
199
|
])
|
|
200
200
|
], 512)
|
|
201
201
|
], 512);
|
|
202
202
|
};
|
|
203
203
|
}
|
|
204
|
-
}),
|
|
205
|
-
const
|
|
206
|
-
() => Object.fromEntries(
|
|
207
|
-
),
|
|
208
|
-
() => Object.fromEntries(
|
|
209
|
-
),
|
|
210
|
-
() => Object.fromEntries(
|
|
204
|
+
}), $t = Vt("team", () => {
|
|
205
|
+
const a = g([]), o = g(!1), v = g(!1), w = _(
|
|
206
|
+
() => Object.fromEntries(a.value.map((s) => [s.doc.userId, s.name]))
|
|
207
|
+
), j = _(
|
|
208
|
+
() => Object.fromEntries(a.value.map((s) => [s.doc.userId, s.email]))
|
|
209
|
+
), M = _(
|
|
210
|
+
() => Object.fromEntries(a.value.map((s) => [s.doc.userId, s.phoneNumber]))
|
|
211
211
|
);
|
|
212
|
-
async function
|
|
213
|
-
if (!(!
|
|
212
|
+
async function k({ force: s = !1 } = {}) {
|
|
213
|
+
if (!(!s && a.value.length > 0))
|
|
214
214
|
try {
|
|
215
215
|
o.value = !0;
|
|
216
|
-
const
|
|
217
|
-
|
|
216
|
+
const O = await Pt.readTeamMembers();
|
|
217
|
+
a.value = O.sort((P, c) => P.doc.isOwner ? -1 : P.name.localeCompare(c.name)), v.value = !0;
|
|
218
218
|
} finally {
|
|
219
219
|
o.value = !1;
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
222
|
return {
|
|
223
|
-
members:
|
|
223
|
+
members: a,
|
|
224
224
|
isLoading: o,
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
225
|
+
hasLoaded: v,
|
|
226
|
+
userIdToName: w,
|
|
227
|
+
userIdToEmail: j,
|
|
228
|
+
userIdToPhone: M,
|
|
229
|
+
readTeamMembers: k
|
|
229
230
|
};
|
|
230
|
-
}),
|
|
231
|
+
}), Yt = {
|
|
231
232
|
class: "flex flex-col gap-4 p-12 w-[260px]"
|
|
232
233
|
}, Nt = {
|
|
233
234
|
class: "text-xs font-semibold text-fm-color-typo-secondary mb-4"
|
|
@@ -261,9 +262,9 @@ const se = [
|
|
|
261
262
|
class: "space-y-12"
|
|
262
263
|
}, oo = {
|
|
263
264
|
class: "text-xs text-fm-color-typo-secondary"
|
|
264
|
-
}, lo = {
|
|
265
|
-
class: "font-semibold"
|
|
266
265
|
}, ao = {
|
|
266
|
+
class: "font-semibold"
|
|
267
|
+
}, lo = {
|
|
267
268
|
class: "text-xs text-fm-color-typo-secondary"
|
|
268
269
|
}, so = {
|
|
269
270
|
class: "font-semibold"
|
|
@@ -272,11 +273,11 @@ const se = [
|
|
|
272
273
|
}, uo = {
|
|
273
274
|
class: "break-all font-semibold"
|
|
274
275
|
}, io = {
|
|
275
|
-
|
|
276
|
+
key: 0
|
|
276
277
|
}, ro = {
|
|
277
|
-
class: "
|
|
278
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
278
279
|
}, co = {
|
|
279
|
-
|
|
280
|
+
class: "break-all font-mono text-xs font-semibold"
|
|
280
281
|
}, mo = {
|
|
281
282
|
class: "text-xs text-fm-color-typo-secondary"
|
|
282
283
|
}, fo = {
|
|
@@ -284,196 +285,192 @@ const se = [
|
|
|
284
285
|
}, vo = {
|
|
285
286
|
class: "text-xs text-fm-color-typo-secondary"
|
|
286
287
|
}, bo = {
|
|
287
|
-
class: "break-all font-mono text-xs font-semibold"
|
|
288
|
-
}, go = {
|
|
289
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
290
|
-
}, po = {
|
|
291
288
|
class: "font-semibold"
|
|
292
|
-
},
|
|
289
|
+
}, go = {
|
|
293
290
|
key: 0,
|
|
294
291
|
class: "rounded-lg border border-fm-color-border-default"
|
|
295
|
-
},
|
|
292
|
+
}, po = {
|
|
296
293
|
class: "p-12"
|
|
297
|
-
},
|
|
294
|
+
}, ho = {
|
|
298
295
|
class: "text-base font-bold text-fm-color-typo-primary"
|
|
299
|
-
},
|
|
296
|
+
}, yo = {
|
|
300
297
|
class: "space-y-12 p-12"
|
|
301
|
-
},
|
|
298
|
+
}, _o = {
|
|
302
299
|
class: "text-xs text-fm-color-typo-secondary"
|
|
303
|
-
},
|
|
300
|
+
}, xo = {
|
|
304
301
|
class: "font-semibold"
|
|
305
|
-
},
|
|
302
|
+
}, Lo = {
|
|
306
303
|
class: "rounded-lg border border-fm-color-border-default"
|
|
307
|
-
},
|
|
304
|
+
}, So = {
|
|
308
305
|
class: "p-12"
|
|
309
|
-
},
|
|
306
|
+
}, ko = {
|
|
310
307
|
class: "text-base font-bold text-fm-color-typo-primary"
|
|
311
|
-
},
|
|
308
|
+
}, wo = {
|
|
312
309
|
class: "space-y-12 p-12"
|
|
313
|
-
},
|
|
310
|
+
}, Mo = {
|
|
314
311
|
class: "text-xs text-fm-color-typo-secondary"
|
|
315
|
-
},
|
|
312
|
+
}, Fo = {
|
|
316
313
|
class: "font-semibold"
|
|
317
|
-
},
|
|
314
|
+
}, Do = {
|
|
318
315
|
key: 0
|
|
319
|
-
},
|
|
316
|
+
}, Io = {
|
|
320
317
|
class: "text-xs text-fm-color-typo-secondary"
|
|
321
|
-
},
|
|
318
|
+
}, Oo = {
|
|
322
319
|
key: 0,
|
|
323
320
|
class: "font-semibold"
|
|
324
|
-
},
|
|
321
|
+
}, To = {
|
|
325
322
|
key: 1,
|
|
326
323
|
class: "break-all font-mono text-xs text-fm-color-typo-secondary"
|
|
327
|
-
},
|
|
324
|
+
}, jo = {
|
|
328
325
|
key: 1
|
|
329
|
-
},
|
|
326
|
+
}, Po = {
|
|
330
327
|
class: "text-xs text-fm-color-typo-secondary"
|
|
331
|
-
},
|
|
328
|
+
}, Vo = {
|
|
332
329
|
class: "font-semibold whitespace-pre-line"
|
|
333
|
-
},
|
|
330
|
+
}, Ao = {
|
|
334
331
|
class: "text-xs text-fm-color-typo-secondary"
|
|
335
|
-
},
|
|
332
|
+
}, Eo = {
|
|
336
333
|
class: "font-semibold"
|
|
337
|
-
},
|
|
334
|
+
}, Ro = {
|
|
338
335
|
class: "text-xs text-fm-color-typo-secondary"
|
|
339
|
-
},
|
|
336
|
+
}, Co = {
|
|
340
337
|
class: "break-all font-mono text-xs font-semibold"
|
|
341
|
-
},
|
|
338
|
+
}, Uo = {
|
|
342
339
|
key: 2
|
|
343
|
-
},
|
|
340
|
+
}, $o = {
|
|
344
341
|
class: "text-xs text-fm-color-typo-secondary"
|
|
345
|
-
},
|
|
342
|
+
}, Yo = {
|
|
346
343
|
class: "mt-4 space-y-4"
|
|
347
|
-
},
|
|
344
|
+
}, No = {
|
|
348
345
|
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"
|
|
349
|
-
},
|
|
346
|
+
}, Bo = {
|
|
350
347
|
class: "text-xs font-semibold"
|
|
351
|
-
},
|
|
348
|
+
}, Ko = {
|
|
352
349
|
key: 0,
|
|
353
350
|
class: "text-fm-color-typo-secondary"
|
|
354
|
-
},
|
|
351
|
+
}, zo = {
|
|
355
352
|
key: 3
|
|
356
|
-
},
|
|
353
|
+
}, qo = {
|
|
357
354
|
class: "text-xs text-fm-color-typo-secondary"
|
|
358
|
-
},
|
|
355
|
+
}, Ho = {
|
|
359
356
|
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"
|
|
360
|
-
}, ne = 100, xe = 1e3,
|
|
357
|
+
}, ne = 100, xe = 1e3, Wo = "D MMM YYYY h:mm A", Jo = "YYYY-MM-DD HH:mm", A = "YYYY-MM-DD", Ne = "audit-log-export-fields", Go = /* @__PURE__ */ Be({
|
|
361
358
|
__name: "AuditLogList",
|
|
362
|
-
setup(
|
|
359
|
+
setup(a) {
|
|
363
360
|
const {
|
|
364
361
|
t: o
|
|
365
|
-
} = Ke(),
|
|
362
|
+
} = Ke(), v = Dt(), w = $t(), j = g(!1), M = g(!1), k = g([]), s = g(null), O = g(!1);
|
|
366
363
|
async function P(e) {
|
|
367
|
-
const t = Uint8Array.from(atob(e), (p) => p.charCodeAt(0)),
|
|
368
|
-
return await
|
|
364
|
+
const t = Uint8Array.from(atob(e), (p) => p.charCodeAt(0)), i = new DecompressionStream("gzip"), L = i.writable.getWriter();
|
|
365
|
+
return await L.write(t), await L.close(), new Response(i.readable).text();
|
|
369
366
|
}
|
|
370
|
-
const
|
|
371
|
-
let
|
|
372
|
-
|
|
367
|
+
const c = g("");
|
|
368
|
+
let F = 0;
|
|
369
|
+
fe(() => {
|
|
373
370
|
var e, t;
|
|
374
371
|
return (t = (e = s.value) == null ? void 0 : e.metadata) == null ? void 0 : t.requestBody;
|
|
375
372
|
}, async (e) => {
|
|
376
|
-
const t = ++
|
|
373
|
+
const t = ++F;
|
|
377
374
|
if (!e) {
|
|
378
|
-
|
|
375
|
+
c.value = "";
|
|
379
376
|
return;
|
|
380
377
|
}
|
|
381
378
|
if (typeof e == "object") {
|
|
382
|
-
|
|
379
|
+
c.value = JSON.stringify(e, null, 2);
|
|
383
380
|
return;
|
|
384
381
|
}
|
|
385
382
|
if (e.startsWith("gzip:")) {
|
|
386
383
|
try {
|
|
387
|
-
const
|
|
388
|
-
if (t !==
|
|
389
|
-
|
|
384
|
+
const i = await P(e.slice(5));
|
|
385
|
+
if (t !== F) return;
|
|
386
|
+
c.value = JSON.stringify(JSON.parse(i), null, 2);
|
|
390
387
|
} catch {
|
|
391
|
-
if (t !==
|
|
392
|
-
|
|
388
|
+
if (t !== F) return;
|
|
389
|
+
c.value = e;
|
|
393
390
|
}
|
|
394
391
|
return;
|
|
395
392
|
}
|
|
396
393
|
try {
|
|
397
|
-
|
|
394
|
+
c.value = JSON.stringify(JSON.parse(e), null, 2);
|
|
398
395
|
} catch {
|
|
399
|
-
|
|
396
|
+
c.value = e;
|
|
400
397
|
}
|
|
401
398
|
}, {
|
|
402
399
|
immediate: !0
|
|
403
400
|
});
|
|
404
|
-
const
|
|
401
|
+
const K = g(1), ve = g(!1), J = g(0), te = _(() => Math.max(1, Math.ceil(J.value / ne))), oe = y().format("YYYY-MM-DD"), b = g({
|
|
405
402
|
startDate: `${oe} 00:00`,
|
|
406
403
|
endDate: `${oe} 23:59`
|
|
407
|
-
}), m =
|
|
408
|
-
function
|
|
404
|
+
}), m = g(), D = g(), x = g(), T = g(), V = g("all");
|
|
405
|
+
function r(e) {
|
|
409
406
|
return typeof e == "string" ? [e] : Array.isArray(e) ? e.filter((t) => typeof t == "string") : [];
|
|
410
407
|
}
|
|
411
408
|
const H = se.filter((e) => e.key !== "all").map((e) => e.key);
|
|
412
|
-
function
|
|
413
|
-
const t = se.find((
|
|
409
|
+
function N(e) {
|
|
410
|
+
const t = se.find((i) => i.key !== "all" && i.subjectPrefixes.some((L) => e.startsWith(L)));
|
|
414
411
|
return (t == null ? void 0 : t.key) ?? "other";
|
|
415
412
|
}
|
|
416
|
-
function
|
|
413
|
+
function ae(e) {
|
|
417
414
|
const t = H.indexOf(e);
|
|
418
415
|
return t === -1 ? H.length : t;
|
|
419
416
|
}
|
|
420
|
-
const Le =
|
|
417
|
+
const Le = _(() => se.map(({
|
|
421
418
|
key: e
|
|
422
419
|
}) => ({
|
|
423
420
|
label: o(`auditLog.modules.${e}`),
|
|
424
421
|
value: e
|
|
425
|
-
}))),
|
|
422
|
+
}))), E = _(() => se.find((e) => e.key === V.value) ?? se[0]), z = _(() => V.value === "all"), ze = _(() => w.members.map((e) => ({
|
|
426
423
|
label: e.name,
|
|
427
424
|
value: e.doc.userId
|
|
428
|
-
}))), qe =
|
|
429
|
-
const e =
|
|
425
|
+
}))), qe = _(() => {
|
|
426
|
+
const e = $e.flatMap((p) => r(p.subject).map((I) => ({
|
|
430
427
|
label: p.label,
|
|
431
|
-
value:
|
|
432
|
-
}))), t = Object.entries(
|
|
433
|
-
label:
|
|
428
|
+
value: I
|
|
429
|
+
}))), t = Object.entries(Ee).map(([p, I]) => ({
|
|
430
|
+
label: I,
|
|
434
431
|
value: p
|
|
435
|
-
})),
|
|
432
|
+
})), i = /* @__PURE__ */ new Set(), L = [];
|
|
436
433
|
for (const p of [...e, ...t])
|
|
437
|
-
if (!
|
|
438
|
-
|
|
439
|
-
const
|
|
440
|
-
|
|
434
|
+
if (!i.has(p.value)) {
|
|
435
|
+
i.add(p.value);
|
|
436
|
+
const I = N(p.value);
|
|
437
|
+
L.push({
|
|
441
438
|
...p,
|
|
442
|
-
group: o(`auditLog.modules.${
|
|
439
|
+
group: o(`auditLog.modules.${I}`)
|
|
443
440
|
});
|
|
444
441
|
}
|
|
445
|
-
return
|
|
442
|
+
return L.sort((p, I) => ae(N(p.value)) - ae(N(I.value)));
|
|
446
443
|
});
|
|
447
444
|
function He(e, t) {
|
|
448
|
-
const
|
|
449
|
-
return e.label.toLowerCase().includes(
|
|
445
|
+
const i = t.toLowerCase();
|
|
446
|
+
return e.label.toLowerCase().includes(i) || e.value.replace(/^business::/, "").toLowerCase().includes(i) ? !0 : e.value.toLowerCase().includes(i);
|
|
450
447
|
}
|
|
451
|
-
const
|
|
448
|
+
const $ = _(() => ({
|
|
452
449
|
manage: o("auditLog.action.manage"),
|
|
453
450
|
create: o("auditLog.action.create"),
|
|
454
451
|
read: o("auditLog.action.read"),
|
|
455
452
|
update: o("auditLog.action.update"),
|
|
456
453
|
delete: o("auditLog.action.delete")
|
|
457
|
-
})), We =
|
|
458
|
-
label:
|
|
454
|
+
})), We = _(() => [{
|
|
455
|
+
label: $.value.manage,
|
|
459
456
|
value: "manage"
|
|
460
457
|
}, {
|
|
461
|
-
label:
|
|
458
|
+
label: $.value.create,
|
|
462
459
|
value: "create"
|
|
463
460
|
}, {
|
|
464
|
-
label:
|
|
461
|
+
label: $.value.read,
|
|
465
462
|
value: "read"
|
|
466
463
|
}, {
|
|
467
|
-
label:
|
|
464
|
+
label: $.value.update,
|
|
468
465
|
value: "update"
|
|
469
466
|
}, {
|
|
470
|
-
label:
|
|
467
|
+
label: $.value.delete,
|
|
471
468
|
value: "delete"
|
|
472
|
-
}]), ie =
|
|
469
|
+
}]), ie = _(() => ({
|
|
473
470
|
allowed: o("auditLog.outcome.success"),
|
|
474
471
|
denied: o("auditLog.outcome.failed"),
|
|
475
472
|
skipped: o("auditLog.outcome.skipped")
|
|
476
|
-
})), Je =
|
|
473
|
+
})), Je = _(() => [{
|
|
477
474
|
label: ie.value.allowed,
|
|
478
475
|
value: "allowed"
|
|
479
476
|
}, {
|
|
@@ -482,7 +479,7 @@ const se = [
|
|
|
482
479
|
}, {
|
|
483
480
|
label: ie.value.skipped,
|
|
484
481
|
value: "skipped"
|
|
485
|
-
}]), Ge =
|
|
482
|
+
}]), Ge = _(() => ({
|
|
486
483
|
admin: o("auditLog.detail.resolvedFromValue.admin"),
|
|
487
484
|
staff: o("auditLog.detail.resolvedFromValue.staff"),
|
|
488
485
|
permissionSet: o("auditLog.detail.resolvedFromValue.permissionSet"),
|
|
@@ -490,104 +487,106 @@ const se = [
|
|
|
490
487
|
custom: o("auditLog.detail.resolvedFromValue.custom"),
|
|
491
488
|
"no-match": o("auditLog.detail.resolvedFromValue.noMatch"),
|
|
492
489
|
unknown: o("auditLog.detail.resolvedFromValue.unknown")
|
|
493
|
-
})), Xe =
|
|
494
|
-
GET:
|
|
495
|
-
POST:
|
|
496
|
-
PUT:
|
|
497
|
-
PATCH:
|
|
498
|
-
DELETE:
|
|
490
|
+
})), Xe = _(() => ({
|
|
491
|
+
GET: $.value.read,
|
|
492
|
+
POST: $.value.create,
|
|
493
|
+
PUT: $.value.update,
|
|
494
|
+
PATCH: $.value.update,
|
|
495
|
+
DELETE: $.value.delete
|
|
499
496
|
})), Se = {
|
|
500
497
|
allowed: "success",
|
|
501
498
|
denied: "critical",
|
|
502
499
|
skipped: "warning"
|
|
503
500
|
};
|
|
504
501
|
function re(e) {
|
|
505
|
-
return
|
|
502
|
+
return y(e).format(Wo);
|
|
506
503
|
}
|
|
507
|
-
const Qe =
|
|
504
|
+
const Qe = _(() => {
|
|
508
505
|
const {
|
|
509
506
|
startDate: e,
|
|
510
507
|
endDate: t
|
|
511
|
-
} =
|
|
508
|
+
} = b.value;
|
|
512
509
|
return e && t ? `${re(e)} – ${re(t)}` : e ? re(e) : t ? re(t) : o("auditLog.dateRange.placeholder");
|
|
513
|
-
}), Ze =
|
|
510
|
+
}), Ze = _(() => [{
|
|
514
511
|
label: o("date.predefinedRanges.today"),
|
|
515
512
|
value: {
|
|
516
|
-
startDate:
|
|
517
|
-
endDate:
|
|
513
|
+
startDate: y().format(A),
|
|
514
|
+
endDate: y().format(A)
|
|
518
515
|
}
|
|
519
516
|
}, {
|
|
520
517
|
label: o("date.predefinedRanges.yesterday"),
|
|
521
518
|
value: {
|
|
522
|
-
startDate:
|
|
523
|
-
endDate:
|
|
519
|
+
startDate: y().subtract(1, "day").format(A),
|
|
520
|
+
endDate: y().subtract(1, "day").format(A)
|
|
524
521
|
}
|
|
525
522
|
}, {
|
|
526
523
|
label: o("date.predefinedRanges.thisWeek"),
|
|
527
524
|
value: {
|
|
528
|
-
startDate:
|
|
529
|
-
endDate:
|
|
525
|
+
startDate: y().startOf("week").format(A),
|
|
526
|
+
endDate: y().endOf("week").format(A)
|
|
530
527
|
}
|
|
531
528
|
}, {
|
|
532
529
|
label: o("date.predefinedRanges.lastWeek"),
|
|
533
530
|
value: {
|
|
534
|
-
startDate:
|
|
535
|
-
endDate:
|
|
531
|
+
startDate: y().subtract(1, "week").startOf("week").format(A),
|
|
532
|
+
endDate: y().subtract(1, "week").endOf("week").format(A)
|
|
536
533
|
}
|
|
537
534
|
}, {
|
|
538
535
|
label: o("date.predefinedRanges.last7Days"),
|
|
539
536
|
value: {
|
|
540
|
-
startDate:
|
|
541
|
-
endDate:
|
|
537
|
+
startDate: y().subtract(7, "day").format(A),
|
|
538
|
+
endDate: y().subtract(1, "day").format(A)
|
|
542
539
|
}
|
|
543
540
|
}, {
|
|
544
541
|
label: o("date.predefinedRanges.thisMonth"),
|
|
545
542
|
value: {
|
|
546
|
-
startDate:
|
|
547
|
-
endDate:
|
|
543
|
+
startDate: y().startOf("month").format(A),
|
|
544
|
+
endDate: y().endOf("month").format(A)
|
|
548
545
|
}
|
|
549
546
|
}, {
|
|
550
547
|
label: o("date.predefinedRanges.lastMonth"),
|
|
551
548
|
value: {
|
|
552
|
-
startDate:
|
|
553
|
-
endDate:
|
|
549
|
+
startDate: y().subtract(1, "month").startOf("month").format(A),
|
|
550
|
+
endDate: y().subtract(1, "month").endOf("month").format(A)
|
|
554
551
|
}
|
|
555
552
|
}]);
|
|
556
|
-
function
|
|
553
|
+
function be(e) {
|
|
557
554
|
var t;
|
|
558
|
-
return ((t =
|
|
555
|
+
return ((t = $e.find((i) => i.subject === e)) == null ? void 0 : t.label) ?? Ee[e];
|
|
559
556
|
}
|
|
560
|
-
function
|
|
561
|
-
|
|
557
|
+
function de(e) {
|
|
558
|
+
var i;
|
|
559
|
+
const t = w.userIdToName[e.userId];
|
|
560
|
+
return t || (w.hasLoaded ? (i = v.sessionUser.value) != null && i.isInternal ? `${e.actorName ?? e.userId} (${o("auditLog.user.feedmeAdmin")})` : o("auditLog.user.feedmeAdmin") : e.userId);
|
|
562
561
|
}
|
|
563
562
|
function ke(e) {
|
|
564
|
-
return
|
|
563
|
+
return w.userIdToPhone[e.userId] || "-";
|
|
565
564
|
}
|
|
566
565
|
function et(e) {
|
|
567
|
-
return
|
|
566
|
+
return w.userIdToEmail[e.userId] || "-";
|
|
568
567
|
}
|
|
569
568
|
function we(e) {
|
|
570
|
-
return
|
|
569
|
+
return y(e).format("DD MMM YYYY, HH:mm");
|
|
571
570
|
}
|
|
572
571
|
function tt(e) {
|
|
573
|
-
return
|
|
572
|
+
return y(e).format("DD MMM YYYY, HH:mm:ss").toUpperCase();
|
|
574
573
|
}
|
|
575
574
|
function Me(e) {
|
|
576
|
-
return
|
|
575
|
+
return $.value[e] ?? e;
|
|
577
576
|
}
|
|
578
577
|
function Fe(e) {
|
|
579
578
|
return e.metadata.operationLabel ?? Me(e.action);
|
|
580
579
|
}
|
|
581
580
|
function ot(e) {
|
|
582
|
-
return
|
|
581
|
+
return be(e.subject) ?? e.subject;
|
|
583
582
|
}
|
|
584
583
|
function ge(e) {
|
|
585
584
|
return ie.value[e];
|
|
586
585
|
}
|
|
587
|
-
function
|
|
586
|
+
function at(e) {
|
|
588
587
|
return Ge.value[e] ?? e;
|
|
589
588
|
}
|
|
590
|
-
function
|
|
589
|
+
function lt(e) {
|
|
591
590
|
return e.metadata.requestMethod ? Xe.value[e.metadata.requestMethod] ?? e.metadata.requestMethod : Me(e.action);
|
|
592
591
|
}
|
|
593
592
|
function De(e) {
|
|
@@ -602,7 +601,7 @@ const se = [
|
|
|
602
601
|
}, {
|
|
603
602
|
key: "userName",
|
|
604
603
|
labelKey: "auditLog.exportFields.userName",
|
|
605
|
-
getValue: (e) =>
|
|
604
|
+
getValue: (e) => de(e),
|
|
606
605
|
defaultSelected: !0
|
|
607
606
|
}, {
|
|
608
607
|
key: "userPhone",
|
|
@@ -612,7 +611,7 @@ const se = [
|
|
|
612
611
|
}, {
|
|
613
612
|
key: "subject",
|
|
614
613
|
labelKey: "auditLog.exportFields.subject",
|
|
615
|
-
getValue: (e) =>
|
|
614
|
+
getValue: (e) => be(e.subject) ?? e.subject,
|
|
616
615
|
defaultSelected: !0
|
|
617
616
|
}, {
|
|
618
617
|
key: "action",
|
|
@@ -680,7 +679,7 @@ const se = [
|
|
|
680
679
|
}
|
|
681
680
|
return new Set(pe.filter((e) => e.defaultSelected).map((e) => e.key));
|
|
682
681
|
}
|
|
683
|
-
const G =
|
|
682
|
+
const G = g(st());
|
|
684
683
|
function nt(e) {
|
|
685
684
|
const t = new Set(G.value);
|
|
686
685
|
if (t.has(e)) {
|
|
@@ -695,32 +694,32 @@ const se = [
|
|
|
695
694
|
}
|
|
696
695
|
}
|
|
697
696
|
async function ut() {
|
|
698
|
-
var e, t,
|
|
699
|
-
if (!
|
|
700
|
-
|
|
697
|
+
var e, t, i, L, p, I;
|
|
698
|
+
if (!M.value) {
|
|
699
|
+
M.value = !0;
|
|
701
700
|
try {
|
|
702
701
|
const {
|
|
703
|
-
startDate:
|
|
702
|
+
startDate: Y,
|
|
704
703
|
endDate: q
|
|
705
|
-
} =
|
|
706
|
-
|
|
707
|
-
from: X(
|
|
704
|
+
} = b.value, W = E.value.subjectPrefixes, ce = (/* @__PURE__ */ new Date()).toISOString().slice(0, 19).replace("T", " "), d = q ? X(q) : null, Q = d && d < ce ? d : ce, ft = {
|
|
705
|
+
...Y ? {
|
|
706
|
+
from: X(Y)
|
|
708
707
|
} : {},
|
|
709
708
|
to: Q,
|
|
710
709
|
...(e = m.value) != null && e.length ? {
|
|
711
710
|
userIds: m.value
|
|
712
711
|
} : {},
|
|
713
|
-
...z.value && ((t =
|
|
714
|
-
subjects:
|
|
712
|
+
...z.value && ((t = D.value) != null && t.length) ? {
|
|
713
|
+
subjects: D.value
|
|
715
714
|
} : {},
|
|
716
715
|
...W.length ? {
|
|
717
716
|
subjectPrefixes: [...W]
|
|
718
717
|
} : {},
|
|
719
|
-
...(
|
|
718
|
+
...(i = T.value) != null && i.length ? {
|
|
720
719
|
actions: T.value
|
|
721
720
|
} : {},
|
|
722
|
-
...(
|
|
723
|
-
outcomes:
|
|
721
|
+
...(L = x.value) != null && L.length ? {
|
|
722
|
+
outcomes: x.value
|
|
724
723
|
} : {}
|
|
725
724
|
}, Te = [];
|
|
726
725
|
let je = 0;
|
|
@@ -733,13 +732,13 @@ const se = [
|
|
|
733
732
|
if (Te.push(...R), R.length < xe) break;
|
|
734
733
|
je += xe;
|
|
735
734
|
}
|
|
736
|
-
const Pe = pe.filter((R) => G.value.has(R.key)), vt = Pe.map((R) => o(R.labelKey)), bt = Te.map((R) => Pe.map((kt) => kt.getValue(R) ?? "")), ye = -(/* @__PURE__ */ new Date()).getTimezoneOffset(), gt = ye >= 0 ? "+" : "-", pt = String(Math.floor(Math.abs(ye) / 60)).padStart(2, "0"), ht = String(Math.abs(ye) % 60).padStart(2, "0"), yt = `UTC${gt}${pt}:${ht}`, Ve = ((p =
|
|
737
|
-
`), Lt = `audit-log_${(((
|
|
735
|
+
const Pe = pe.filter((R) => G.value.has(R.key)), vt = Pe.map((R) => o(R.labelKey)), bt = Te.map((R) => Pe.map((kt) => kt.getValue(R) ?? "")), ye = -(/* @__PURE__ */ new Date()).getTimezoneOffset(), gt = ye >= 0 ? "+" : "-", pt = String(Math.floor(Math.abs(ye) / 60)).padStart(2, "0"), ht = String(Math.abs(ye) % 60).padStart(2, "0"), yt = `UTC${gt}${pt}:${ht}`, Ve = ((p = v.currentBusiness.value) == null ? void 0 : p.name) || "", _t = [Y, q].filter(Boolean).join(" – "), xt = [...[[o("auditLog.title")], [`${o("auditLog.frontMatter.date")}: ${_t}`], ...Ve ? [[`${o("auditLog.frontMatter.business")}: ${Ve}`]] : [], [`${o("auditLog.frontMatter.generatedBy")}: ${y().format("DD MMM YYYY, HH:mm")} (${yt})`], []].map((R) => R.map(De).join(",")), ...[vt, ...bt].map((R) => R.map(De).join(","))].join(`
|
|
736
|
+
`), Lt = `audit-log_${(((I = v.currentBusiness.value) == null ? void 0 : I.name) || "business").replace(/[^a-z0-9_-]+/gi, "_")}_${y().format("YYYYMMDD_HHmmss")}.csv`, St = new Blob([`\uFEFF${xt}`], {
|
|
738
737
|
type: "text/csv;charset=utf-8;"
|
|
739
|
-
}),
|
|
740
|
-
|
|
738
|
+
}), Ae = window.URL.createObjectURL(St), le = document.createElement("a");
|
|
739
|
+
le.href = Ae, le.download = Lt, document.body.appendChild(le), le.click(), le.remove(), window.URL.revokeObjectURL(Ae);
|
|
741
740
|
} finally {
|
|
742
|
-
|
|
741
|
+
M.value = !1;
|
|
743
742
|
}
|
|
744
743
|
}
|
|
745
744
|
}
|
|
@@ -756,31 +755,26 @@ const se = [
|
|
|
756
755
|
size: 220,
|
|
757
756
|
cell(e) {
|
|
758
757
|
const t = e.row.original;
|
|
759
|
-
return
|
|
758
|
+
return h("div", {
|
|
760
759
|
class: "flex items-center gap-8"
|
|
761
|
-
}, [
|
|
762
|
-
|
|
760
|
+
}, [h(Re.FmAvatar, {
|
|
761
|
+
name: de(t),
|
|
763
762
|
size: "sm",
|
|
764
763
|
class: "shrink-0"
|
|
765
|
-
}, null),
|
|
764
|
+
}, null), h("div", {
|
|
766
765
|
class: "min-w-0"
|
|
767
|
-
}, [
|
|
766
|
+
}, [h("p", {
|
|
768
767
|
class: "truncate font-semibold"
|
|
769
|
-
}, [
|
|
768
|
+
}, [de(t)]), h("p", {
|
|
770
769
|
class: "truncate text-fm-color-typo-secondary"
|
|
771
770
|
}, [ke(t)])])]);
|
|
772
771
|
}
|
|
773
772
|
}, {
|
|
774
773
|
accessorKey: "subject",
|
|
775
774
|
header: () => o("auditLog.columns.subject"),
|
|
776
|
-
meta: {
|
|
777
|
-
cellClass: "text-left"
|
|
778
|
-
},
|
|
779
775
|
cell(e) {
|
|
780
776
|
const t = e.row.original;
|
|
781
|
-
return
|
|
782
|
-
class: "text-left"
|
|
783
|
-
}, [de(t.subject) ?? t.subject]);
|
|
777
|
+
return be(t.subject) ?? t.subject;
|
|
784
778
|
}
|
|
785
779
|
}, {
|
|
786
780
|
accessorKey: "action",
|
|
@@ -799,7 +793,7 @@ const se = [
|
|
|
799
793
|
enableSorting: !1,
|
|
800
794
|
cell(e) {
|
|
801
795
|
const t = e.row.original;
|
|
802
|
-
return
|
|
796
|
+
return h(Re.FmChip, {
|
|
803
797
|
variant: Se[t.outcome] ?? "neutral",
|
|
804
798
|
label: ge(t.outcome),
|
|
805
799
|
compact: !0
|
|
@@ -807,64 +801,64 @@ const se = [
|
|
|
807
801
|
}
|
|
808
802
|
}];
|
|
809
803
|
function X(e) {
|
|
810
|
-
const t =
|
|
804
|
+
const t = y(e, Jo);
|
|
811
805
|
return new Date(t.year(), t.month(), t.date(), t.hour(), t.minute(), 0).toISOString().slice(0, 19).replace("T", " ");
|
|
812
806
|
}
|
|
813
807
|
async function Ie() {
|
|
814
|
-
var e, t,
|
|
808
|
+
var e, t, i, L;
|
|
815
809
|
j.value = !0;
|
|
816
810
|
try {
|
|
817
811
|
const {
|
|
818
812
|
startDate: p,
|
|
819
|
-
endDate:
|
|
820
|
-
} =
|
|
813
|
+
endDate: I
|
|
814
|
+
} = b.value, Y = (K.value - 1) * ne, q = E.value.subjectPrefixes, W = await _e.read({
|
|
821
815
|
limit: ne,
|
|
822
|
-
offset:
|
|
816
|
+
offset: Y,
|
|
823
817
|
...p ? {
|
|
824
818
|
from: X(p)
|
|
825
819
|
} : {},
|
|
826
|
-
...
|
|
827
|
-
to: X(
|
|
820
|
+
...I ? {
|
|
821
|
+
to: X(I)
|
|
828
822
|
} : {},
|
|
829
823
|
...(e = m.value) != null && e.length ? {
|
|
830
824
|
userIds: m.value
|
|
831
825
|
} : {},
|
|
832
|
-
...z.value && ((t =
|
|
833
|
-
subjects:
|
|
826
|
+
...z.value && ((t = D.value) != null && t.length) ? {
|
|
827
|
+
subjects: D.value
|
|
834
828
|
} : {},
|
|
835
829
|
...q.length ? {
|
|
836
830
|
subjectPrefixes: [...q]
|
|
837
831
|
} : {},
|
|
838
|
-
...(
|
|
832
|
+
...(i = T.value) != null && i.length ? {
|
|
839
833
|
actions: T.value
|
|
840
834
|
} : {},
|
|
841
|
-
...(
|
|
842
|
-
outcomes:
|
|
835
|
+
...(L = x.value) != null && L.length ? {
|
|
836
|
+
outcomes: x.value
|
|
843
837
|
} : {}
|
|
844
838
|
});
|
|
845
|
-
|
|
839
|
+
k.value = W, ve.value = W.length === ne;
|
|
846
840
|
} finally {
|
|
847
841
|
j.value = !1;
|
|
848
842
|
}
|
|
849
843
|
}
|
|
850
|
-
const Oe =
|
|
844
|
+
const Oe = _(() => {
|
|
851
845
|
var e;
|
|
852
846
|
return JSON.stringify({
|
|
853
|
-
businessId: ((e =
|
|
854
|
-
dateRange:
|
|
847
|
+
businessId: ((e = v.currentBusiness.value) == null ? void 0 : e._id) ?? "",
|
|
848
|
+
dateRange: b.value,
|
|
855
849
|
users: [...m.value ?? []].sort(),
|
|
856
|
-
subjects: [...
|
|
857
|
-
outcomes: [...
|
|
850
|
+
subjects: [...D.value ?? []].sort(),
|
|
851
|
+
outcomes: [...x.value ?? []].sort(),
|
|
858
852
|
actions: [...T.value ?? []].sort(),
|
|
859
853
|
moduleKey: V.value
|
|
860
854
|
});
|
|
861
855
|
});
|
|
862
856
|
async function rt() {
|
|
863
|
-
var
|
|
857
|
+
var L, p, I, Y;
|
|
864
858
|
const {
|
|
865
859
|
startDate: e,
|
|
866
860
|
endDate: t
|
|
867
|
-
} =
|
|
861
|
+
} = b.value, i = E.value.subjectPrefixes;
|
|
868
862
|
J.value = await _e.count({
|
|
869
863
|
...e ? {
|
|
870
864
|
from: X(e)
|
|
@@ -872,26 +866,26 @@ const se = [
|
|
|
872
866
|
...t ? {
|
|
873
867
|
to: X(t)
|
|
874
868
|
} : {},
|
|
875
|
-
...(
|
|
869
|
+
...(L = m.value) != null && L.length ? {
|
|
876
870
|
userIds: m.value
|
|
877
871
|
} : {},
|
|
878
|
-
...z.value && ((p =
|
|
879
|
-
subjects:
|
|
872
|
+
...z.value && ((p = D.value) != null && p.length) ? {
|
|
873
|
+
subjects: D.value
|
|
880
874
|
} : {},
|
|
881
|
-
...
|
|
882
|
-
subjectPrefixes: [...
|
|
875
|
+
...i.length ? {
|
|
876
|
+
subjectPrefixes: [...i]
|
|
883
877
|
} : {},
|
|
884
|
-
...(
|
|
878
|
+
...(I = T.value) != null && I.length ? {
|
|
885
879
|
actions: T.value
|
|
886
880
|
} : {},
|
|
887
|
-
...(
|
|
888
|
-
outcomes:
|
|
881
|
+
...(Y = x.value) != null && Y.length ? {
|
|
882
|
+
outcomes: x.value
|
|
889
883
|
} : {}
|
|
890
884
|
});
|
|
891
885
|
}
|
|
892
|
-
|
|
886
|
+
fe(Oe, async () => {
|
|
893
887
|
var e;
|
|
894
|
-
|
|
888
|
+
K.value = 1, (e = v.currentBusiness.value) != null && e._id && await Promise.all([rt(), Ie()]);
|
|
895
889
|
}, {
|
|
896
890
|
immediate: !0
|
|
897
891
|
});
|
|
@@ -900,8 +894,8 @@ const se = [
|
|
|
900
894
|
pageIndex: e
|
|
901
895
|
}) {
|
|
902
896
|
var t;
|
|
903
|
-
if ((t =
|
|
904
|
-
he = !0,
|
|
897
|
+
if ((t = v.currentBusiness.value) != null && t._id && e !== 0 && !he) {
|
|
898
|
+
he = !0, K.value = e + 1;
|
|
905
899
|
try {
|
|
906
900
|
await Ie();
|
|
907
901
|
} finally {
|
|
@@ -915,107 +909,107 @@ const se = [
|
|
|
915
909
|
function mt() {
|
|
916
910
|
O.value = !1, s.value = null;
|
|
917
911
|
}
|
|
918
|
-
return
|
|
919
|
-
e &&
|
|
912
|
+
return fe(v.currentBusiness, (e) => {
|
|
913
|
+
e && w.readTeamMembers();
|
|
920
914
|
}, {
|
|
921
915
|
immediate: !0
|
|
922
916
|
}), (e, t) => {
|
|
923
|
-
const
|
|
924
|
-
return f(),
|
|
925
|
-
heading:
|
|
917
|
+
const i = U("FmSpacer"), L = U("FmButton"), p = U("FmMenuItem"), I = U("FmMenu"), Y = U("FmChip"), q = U("FmDateRangePicker"), W = U("FmTable"), ce = U("FmSideSheet");
|
|
918
|
+
return f(), S(ee, null, [h(Tt, {
|
|
919
|
+
heading: n(o)("auditLog.title")
|
|
926
920
|
}, {
|
|
927
|
-
"append-heading":
|
|
921
|
+
"append-heading": B(() => [h(i), h(L, {
|
|
928
922
|
variant: "primary",
|
|
929
923
|
"prepend-icon": "upload",
|
|
930
|
-
label:
|
|
931
|
-
disabled:
|
|
932
|
-
loading:
|
|
924
|
+
label: n(o)("auditLog.export"),
|
|
925
|
+
disabled: k.value.length === 0 || M.value || n(w).isLoading || n(w).members.length === 0,
|
|
926
|
+
loading: M.value,
|
|
933
927
|
onClick: ut
|
|
934
|
-
}, null, 8, ["label", "disabled", "loading"]),
|
|
928
|
+
}, null, 8, ["label", "disabled", "loading"]), h(I, {
|
|
935
929
|
"close-on-click": !1,
|
|
936
930
|
"z-index": 50
|
|
937
931
|
}, {
|
|
938
|
-
"menu-button":
|
|
932
|
+
"menu-button": B(() => [h(L, {
|
|
939
933
|
variant: "tertiary",
|
|
940
934
|
icon: "settings",
|
|
941
|
-
"aria-label":
|
|
942
|
-
disabled:
|
|
935
|
+
"aria-label": n(o)("auditLog.exportSettings.title"),
|
|
936
|
+
disabled: M.value
|
|
943
937
|
}, null, 8, ["aria-label", "disabled"])]),
|
|
944
|
-
default:
|
|
945
|
-
key:
|
|
946
|
-
label:
|
|
938
|
+
default: B(() => [l("div", Yt, [l("p", Nt, u(n(o)("auditLog.exportSettings.title")), 1), (f(), S(ee, null, ue(pe, (d) => h(p, {
|
|
939
|
+
key: d.key,
|
|
940
|
+
label: n(o)(d.labelKey),
|
|
947
941
|
"has-checkbox": "",
|
|
948
|
-
"model-value": G.value.has(
|
|
949
|
-
disabled: G.value.has(
|
|
950
|
-
onClick: (Q) => nt(
|
|
942
|
+
"model-value": G.value.has(d.key),
|
|
943
|
+
disabled: G.value.has(d.key) && G.value.size === 1,
|
|
944
|
+
onClick: (Q) => nt(d.key)
|
|
951
945
|
}, null, 8, ["label", "model-value", "disabled", "onClick"])), 64))])]),
|
|
952
946
|
_: 1
|
|
953
947
|
})]),
|
|
954
|
-
default:
|
|
948
|
+
default: B(() => [l("div", Bt, [l("div", Kt, [h(Ut, {
|
|
955
949
|
modelValue: V.value,
|
|
956
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
950
|
+
"onUpdate:modelValue": t[0] || (t[0] = (d) => V.value = d),
|
|
957
951
|
items: Le.value
|
|
958
|
-
}, null, 8, ["modelValue", "items"]),
|
|
959
|
-
modelValue:
|
|
960
|
-
"onUpdate:modelValue": t[1] || (t[1] = (
|
|
952
|
+
}, null, 8, ["modelValue", "items"]), l("div", zt, [h(q, {
|
|
953
|
+
modelValue: b.value,
|
|
954
|
+
"onUpdate:modelValue": t[1] || (t[1] = (d) => b.value = d),
|
|
961
955
|
"show-predefined-range": "",
|
|
962
956
|
"show-time": "",
|
|
963
957
|
"predefined-range": Ze.value
|
|
964
958
|
}, {
|
|
965
|
-
"trigger-button":
|
|
959
|
+
"trigger-button": B(() => [h(Y, {
|
|
966
960
|
label: Qe.value,
|
|
967
961
|
icon: "calendar_month"
|
|
968
962
|
}, null, 8, ["label"])]),
|
|
969
963
|
_: 1
|
|
970
|
-
}, 8, ["modelValue", "predefined-range"]),
|
|
964
|
+
}, 8, ["modelValue", "predefined-range"]), l("div", qt, [h(me, {
|
|
971
965
|
modelValue: m.value,
|
|
972
|
-
"onUpdate:modelValue": t[2] || (t[2] = (
|
|
966
|
+
"onUpdate:modelValue": t[2] || (t[2] = (d) => m.value = d),
|
|
973
967
|
items: ze.value,
|
|
974
968
|
multiple: "",
|
|
975
969
|
variant: "dark",
|
|
976
|
-
placeholder:
|
|
977
|
-
"selected-prefix":
|
|
970
|
+
placeholder: n(o)("auditLog.filter.user_placeholder"),
|
|
971
|
+
"selected-prefix": n(o)("auditLog.filter.selected_user_prefix"),
|
|
978
972
|
"chip-icon": "account_circle"
|
|
979
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), z.value ? (f(),
|
|
980
|
-
modelValue:
|
|
981
|
-
"onUpdate:modelValue": t[3] || (t[3] = (
|
|
973
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), z.value ? (f(), S("div", Ht, [h(me, {
|
|
974
|
+
modelValue: D.value,
|
|
975
|
+
"onUpdate:modelValue": t[3] || (t[3] = (d) => D.value = d),
|
|
982
976
|
items: qe.value,
|
|
983
977
|
"filter-fn": He,
|
|
984
978
|
multiple: "",
|
|
985
979
|
variant: "dark",
|
|
986
|
-
placeholder:
|
|
987
|
-
"selected-prefix":
|
|
980
|
+
placeholder: n(o)("auditLog.filter.subject_placeholder"),
|
|
981
|
+
"selected-prefix": n(o)("auditLog.filter.selected_subject_prefix"),
|
|
988
982
|
"chip-icon": "badge"
|
|
989
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])) : C("", !0),
|
|
983
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])) : C("", !0), l("div", Wt, [h(me, {
|
|
990
984
|
modelValue: T.value,
|
|
991
|
-
"onUpdate:modelValue": t[4] || (t[4] = (
|
|
985
|
+
"onUpdate:modelValue": t[4] || (t[4] = (d) => T.value = d),
|
|
992
986
|
items: We.value,
|
|
993
987
|
multiple: "",
|
|
994
988
|
variant: "dark",
|
|
995
|
-
placeholder:
|
|
996
|
-
"selected-prefix":
|
|
989
|
+
placeholder: n(o)("auditLog.filter.action_placeholder"),
|
|
990
|
+
"selected-prefix": n(o)("auditLog.filter.selected_action_prefix"),
|
|
997
991
|
searchable: !1
|
|
998
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]),
|
|
999
|
-
modelValue:
|
|
1000
|
-
"onUpdate:modelValue": t[5] || (t[5] = (
|
|
992
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), l("div", Jt, [h(me, {
|
|
993
|
+
modelValue: x.value,
|
|
994
|
+
"onUpdate:modelValue": t[5] || (t[5] = (d) => x.value = d),
|
|
1001
995
|
items: Je.value,
|
|
1002
996
|
multiple: "",
|
|
1003
997
|
variant: "dark",
|
|
1004
|
-
placeholder:
|
|
1005
|
-
"selected-prefix":
|
|
998
|
+
placeholder: n(o)("auditLog.filter.status_placeholder"),
|
|
999
|
+
"selected-prefix": n(o)("auditLog.filter.selected_status_prefix"),
|
|
1006
1000
|
searchable: !1,
|
|
1007
1001
|
"chip-icon": "check_circle"
|
|
1008
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])])]), !j.value &&
|
|
1002
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])])]), !j.value && k.value.length === 0 ? (f(), Z(n(jt), {
|
|
1009
1003
|
key: 0,
|
|
1010
|
-
title:
|
|
1011
|
-
subtitle:
|
|
1004
|
+
title: n(o)("auditLog.noData.title"),
|
|
1005
|
+
subtitle: n(o)("auditLog.noData.subtitle")
|
|
1012
1006
|
}, null, 8, ["title", "subtitle"])) : (f(), Z(It, {
|
|
1013
1007
|
key: 1
|
|
1014
1008
|
}, {
|
|
1015
|
-
default:
|
|
1009
|
+
default: B(() => [(f(), Z(W, {
|
|
1016
1010
|
key: Oe.value,
|
|
1017
1011
|
"column-defs": it,
|
|
1018
|
-
"row-data":
|
|
1012
|
+
"row-data": k.value,
|
|
1019
1013
|
"page-size": ne,
|
|
1020
1014
|
"page-count": te.value,
|
|
1021
1015
|
"row-count": J.value,
|
|
@@ -1024,37 +1018,37 @@ const se = [
|
|
|
1024
1018
|
loading: j.value,
|
|
1025
1019
|
"pin-header-row": "",
|
|
1026
1020
|
class: "audit-log-list-table min-h-0 flex-1 cursor-pointer",
|
|
1027
|
-
onRowClick: t[6] || (t[6] = (
|
|
1021
|
+
onRowClick: t[6] || (t[6] = (d) => ct(d.original))
|
|
1028
1022
|
}, null, 8, ["row-data", "page-count", "row-count", "hide-footer", "loading"]))]),
|
|
1029
1023
|
_: 1
|
|
1030
1024
|
}))])]),
|
|
1031
1025
|
_: 1
|
|
1032
|
-
}, 8, ["heading"]),
|
|
1033
|
-
header:
|
|
1026
|
+
}, 8, ["heading"]), h(ce, {
|
|
1027
|
+
header: n(o)("auditLog.detail.header"),
|
|
1034
1028
|
"model-value": O.value,
|
|
1035
1029
|
"max-width": 480,
|
|
1036
1030
|
"dismiss-away": "",
|
|
1037
|
-
"onUpdate:modelValue": t[7] || (t[7] = (
|
|
1038
|
-
|
|
1031
|
+
"onUpdate:modelValue": t[7] || (t[7] = (d) => {
|
|
1032
|
+
d || mt();
|
|
1039
1033
|
})
|
|
1040
1034
|
}, {
|
|
1041
|
-
default:
|
|
1035
|
+
default: B(() => [s.value ? (f(), S("div", Gt, [l("div", Xt, [l("div", Qt, [l("p", Zt, u(ot(s.value)), 1)]), h(Y, {
|
|
1042
1036
|
variant: Se[s.value.outcome] ?? "neutral",
|
|
1043
1037
|
label: ge(s.value.outcome),
|
|
1044
1038
|
compact: ""
|
|
1045
|
-
}, null, 8, ["variant", "label"])]),
|
|
1039
|
+
}, null, 8, ["variant", "label"])]), l("div", eo, [l("div", to, [l("div", null, [l("p", oo, u(n(o)("auditLog.detail.date")), 1), l("p", ao, u(tt(s.value.timestamp)), 1)]), l("div", null, [l("p", lo, u(n(o)("auditLog.detail.user")), 1), l("p", so, u(de(s.value)), 1)]), l("div", null, [l("p", no, u(n(o)("auditLog.detail.email")), 1), l("p", uo, u(et(s.value)), 1)]), s.value.field ? (f(), S("div", io, [l("p", ro, u(n(o)("auditLog.detail.field")), 1), l("p", co, u(s.value.field), 1)])) : C("", !0), l("div", null, [l("p", mo, u(n(o)("auditLog.detail.business")), 1), l("p", fo, u(s.value.businessId || "-"), 1)]), l("div", null, [l("p", vo, u(n(o)("auditLog.detail.restaurant")), 1), l("p", bo, u(s.value.restaurantId || "-"), 1)])])]), s.value.metadata.operationLabel ? (f(), S("div", go, [l("div", po, [l("p", ho, u(n(o)("auditLog.detail.eventDetails")), 1)]), t[8] || (t[8] = l("hr", {
|
|
1046
1040
|
class: "border-fm-color-border-default"
|
|
1047
|
-
}, null, -1)),
|
|
1041
|
+
}, null, -1)), l("div", yo, [l("div", null, [l("p", _o, u(n(o)("auditLog.detail.actionDescription")), 1), l("p", xo, u(s.value.metadata.operationLabel), 1)])])])) : C("", !0), l("div", Lo, [l("div", So, [l("p", ko, u(n(o)("auditLog.detail.metadata")), 1)]), t[9] || (t[9] = l("hr", {
|
|
1048
1042
|
class: "border-fm-color-border-default"
|
|
1049
|
-
}, null, -1)),
|
|
1043
|
+
}, null, -1)), l("div", wo, [l("div", null, [l("p", Mo, u(n(o)("auditLog.detail.resolvedFrom")), 1), l("p", Fo, u(at(s.value.metadata.resolvedFrom)), 1)]), (s.value.metadata.resolvedFrom === "permissionSet" || s.value.metadata.resolvedFrom === "systemPermissionSet") && (s.value.metadata.permissionSetName || s.value.metadata.permissionSetId) ? (f(), S("div", Do, [l("p", Io, u(n(o)("auditLog.detail.permissionSet")), 1), s.value.metadata.permissionSetName ? (f(), S("p", Oo, u(s.value.metadata.permissionSetName), 1)) : C("", !0), s.value.metadata.permissionSetId ? (f(), S("p", To, u(s.value.metadata.permissionSetId), 1)) : C("", !0)])) : C("", !0), s.value.metadata.reason ? (f(), S("div", jo, [l("p", Po, u(n(o)("auditLog.detail.reason")), 1), l("p", Vo, u(s.value.metadata.reason), 1)])) : C("", !0), l("div", null, [l("p", Ao, u(n(o)("auditLog.detail.requestMethod")), 1), l("p", Eo, u(lt(s.value)), 1)]), l("div", null, [l("p", Ro, u(n(o)("auditLog.detail.requestPath")), 1), l("p", Co, u(s.value.metadata.requestPath || "-"), 1)]), s.value.metadata.trace && s.value.metadata.trace.length > 0 ? (f(), S("div", Uo, [l("p", $o, u(n(o)("auditLog.detail.permissionTrace")), 1), l("ol", Yo, [(f(!0), S(ee, null, ue(s.value.metadata.trace, (d, Q) => (f(), S("li", {
|
|
1050
1044
|
key: Q,
|
|
1051
1045
|
class: "flex items-center gap-6"
|
|
1052
|
-
}, [
|
|
1046
|
+
}, [l("span", No, u(Q + 1), 1), l("span", Bo, u(d), 1), Q < s.value.metadata.trace.length - 1 ? (f(), S("span", Ko, "→")) : C("", !0)]))), 128))])])) : C("", !0), c.value ? (f(), S("div", zo, [l("p", qo, u(n(o)("auditLog.detail.requestBody")), 1), l("pre", Ho, u(c.value), 1)])) : C("", !0)])])])) : C("", !0)]),
|
|
1053
1047
|
_: 1
|
|
1054
1048
|
}, 8, ["header", "model-value"])], 64);
|
|
1055
1049
|
};
|
|
1056
1050
|
}
|
|
1057
|
-
}),
|
|
1051
|
+
}), da = /* @__PURE__ */ Ot(Go, [["__scopeId", "data-v-61b74784"]]);
|
|
1058
1052
|
export {
|
|
1059
|
-
|
|
1053
|
+
da as default
|
|
1060
1054
|
};
|