@feedmepos/mf-hrm-portal 2.0.24-dev.12 → 2.0.24-dev.14
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-_OSOwJVi.js → AuditLogList-CtneTBoV.js} +378 -365
- package/dist/{EmployeeList-DrBO8Kk6.js → EmployeeList-C7dIO8gr.js} +6 -6
- package/dist/{Main-CuFC87ma.js → Main-3gbHRwy4.js} +6 -6
- package/dist/{Main-3j9ReeYP.js → Main-CU92m_i1.js} +9 -9
- package/dist/{Main-CB8WXm4L.js → Main-D5PmpNiB.js} +4 -4
- package/dist/{PermissionSetList-DRyugr1w.js → PermissionSetList-Dej3hhUp.js} +6 -6
- package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BpI_IJIp.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-C9fM3DpC.js} +744 -744
- package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_a439fdd8_lang-Dj0pRX1U.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_a439fdd8_lang-DiCE_AYD.js} +1 -1
- package/dist/{RoleList-B7kXklX5.js → RoleList-B98ExzJE.js} +7 -7
- package/dist/{TeamMemberList-CbqkMiT6.js → TeamMemberList-YTHgBCoO.js} +8 -8
- package/dist/{TimesheetList-Cr74-E32.js → TimesheetList-2HclOof1.js} +6 -6
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_91afda4e_lang-Cdd6GpKp.js → TimesheetList.vue_vue_type_style_index_0_scoped_91afda4e_lang-BBHwVX-k.js} +2 -2
- package/dist/{app-Bn7c7G7J.js → app-CoIsLUsi.js} +190 -172
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-D9tKWmYV.js → dayjs.min-JqoERYFc.js} +1 -1
- package/dist/{employee-VNw8J2OI.js → employee-D_oJJt4e.js} +3 -3
- package/dist/{iteration-xEBe_nnw.js → iteration-CmwYwOHJ.js} +1 -1
- package/dist/{lodash-BSzlmur1.js → lodash-DISd2c6W.js} +1 -1
- package/dist/{rule-DUXHgPce.js → rule-B4b6tRUV.js} +2 -2
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-Cj44joeR.js → useAppStore-m4x4qFHC.js} +1 -1
- package/dist/{useLoading-DCVDPJRt.js → useLoading-BcujhoYe.js} +1 -1
- package/dist/{useReportPermissions-DUDF9brn.js → useReportPermissions-bHlIA-k-.js} +3 -3
- package/package.json +2 -2
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { d as x } from "./dayjs.min-
|
|
3
|
-
import { useI18n as
|
|
4
|
-
import { G as
|
|
5
|
-
import { components as
|
|
6
|
-
import { g as
|
|
7
|
-
import { S as be, _ as
|
|
8
|
-
import { _ as
|
|
9
|
-
import { _ as
|
|
10
|
-
import { t as
|
|
11
|
-
import { defineStore as
|
|
1
|
+
import { defineComponent as Xe, ref as f, computed as h, onMounted as Vt, onBeforeUnmount as Et, watch as Q, resolveComponent as C, createElementBlock as M, openBlock as y, createBlock as Z, createCommentVNode as N, createElementVNode as a, Fragment as ee, renderList as re, withCtx as K, createVNode as p, toDisplayString as i, unref as n, nextTick as Rt } from "vue";
|
|
2
|
+
import { d as x } from "./dayjs.min-JqoERYFc.js";
|
|
3
|
+
import { useI18n as Qe, useCoreStore as Ct } from "@feedmepos/mf-common";
|
|
4
|
+
import { G as He, _ as Ut } from "./app-CoIsLUsi.js";
|
|
5
|
+
import { components as We } from "@feedmepos/ui-library";
|
|
6
|
+
import { g as Ie, b as Ae } from "./iteration-CmwYwOHJ.js";
|
|
7
|
+
import { S as be, _ as $t } from "./SelectFilter-C61IZSID.js";
|
|
8
|
+
import { _ as Nt } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
|
|
9
|
+
import { _ as Yt } from "./index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js";
|
|
10
|
+
import { t as Bt, p as Je } from "./rule-B4b6tRUV.js";
|
|
11
|
+
import { defineStore as Kt } from "pinia";
|
|
12
12
|
const ue = [
|
|
13
13
|
{ key: "all", label: "All", subjectPrefixes: [] },
|
|
14
14
|
{ key: "inventory", label: "Inventory", subjectPrefixes: ["business::inventory", "inventory"] },
|
|
@@ -20,56 +20,56 @@ const ue = [
|
|
|
20
20
|
// Add more as modules are revamped with new actionguard:
|
|
21
21
|
// { key: 'restaurantOperation', label: 'Restaurant Operation', subjectPrefixes: ['restaurant'] },
|
|
22
22
|
], Fe = "/audit-logs", pe = {
|
|
23
|
-
async count(
|
|
24
|
-
var L, j,
|
|
25
|
-
const
|
|
26
|
-
...
|
|
27
|
-
...
|
|
28
|
-
...(L =
|
|
29
|
-
...(j =
|
|
30
|
-
...(
|
|
31
|
-
...(w =
|
|
32
|
-
...(s =
|
|
33
|
-
...
|
|
23
|
+
async count(l) {
|
|
24
|
+
var L, j, I, w, s;
|
|
25
|
+
const o = {
|
|
26
|
+
...l != null && l.from ? { from: l.from } : {},
|
|
27
|
+
...l != null && l.to ? { to: l.to } : {},
|
|
28
|
+
...(L = l == null ? void 0 : l.userIds) != null && L.length ? { userIds: l.userIds } : {},
|
|
29
|
+
...(j = l == null ? void 0 : l.subjects) != null && j.length ? { subjects: l.subjects } : {},
|
|
30
|
+
...(I = l == null ? void 0 : l.subjectPrefixes) != null && I.length ? { subjectPrefixes: l.subjectPrefixes } : {},
|
|
31
|
+
...(w = l == null ? void 0 : l.actions) != null && w.length ? { actions: l.actions } : {},
|
|
32
|
+
...(s = l == null ? void 0 : l.outcomes) != null && s.length ? { outcomes: l.outcomes } : {},
|
|
33
|
+
...l != null && l.feedmeAdminActors ? { feedmeAdminActors: !0 } : {}
|
|
34
34
|
};
|
|
35
|
-
return (await
|
|
35
|
+
return (await Ie(
|
|
36
36
|
await Ae().get(`${Fe}/count`, {
|
|
37
|
-
params:
|
|
37
|
+
params: o,
|
|
38
38
|
paramsSerializer: (D) => {
|
|
39
39
|
const P = new URLSearchParams();
|
|
40
|
-
for (const [v,
|
|
41
|
-
if (Array.isArray(
|
|
42
|
-
for (const z of
|
|
43
|
-
else
|
|
40
|
+
for (const [v, A] of Object.entries(D))
|
|
41
|
+
if (Array.isArray(A))
|
|
42
|
+
for (const z of A) P.append(v, String(z));
|
|
43
|
+
else A != null && P.append(v, String(A));
|
|
44
44
|
return P.toString();
|
|
45
45
|
}
|
|
46
46
|
})
|
|
47
47
|
)).total;
|
|
48
48
|
},
|
|
49
|
-
async read(
|
|
50
|
-
var c, L, j,
|
|
51
|
-
const
|
|
52
|
-
limit: (
|
|
53
|
-
offset: (
|
|
54
|
-
...
|
|
55
|
-
...
|
|
56
|
-
...(c =
|
|
57
|
-
...
|
|
58
|
-
...(L =
|
|
59
|
-
...(j =
|
|
60
|
-
...(
|
|
61
|
-
...(w =
|
|
49
|
+
async read(l) {
|
|
50
|
+
var c, L, j, I, w;
|
|
51
|
+
const o = {
|
|
52
|
+
limit: (l == null ? void 0 : l.limit) ?? 100,
|
|
53
|
+
offset: (l == null ? void 0 : l.offset) ?? 0,
|
|
54
|
+
...l != null && l.from ? { from: l.from } : {},
|
|
55
|
+
...l != null && l.to ? { to: l.to } : {},
|
|
56
|
+
...(c = l == null ? void 0 : l.userIds) != null && c.length ? { userIds: l.userIds } : {},
|
|
57
|
+
...l != null && l.feedmeAdminActors ? { feedmeAdminActors: !0 } : {},
|
|
58
|
+
...(L = l == null ? void 0 : l.subjects) != null && L.length ? { subjects: l.subjects } : {},
|
|
59
|
+
...(j = l == null ? void 0 : l.subjectPrefixes) != null && j.length ? { subjectPrefixes: l.subjectPrefixes } : {},
|
|
60
|
+
...(I = l == null ? void 0 : l.actions) != null && I.length ? { actions: l.actions } : {},
|
|
61
|
+
...(w = l == null ? void 0 : l.outcomes) != null && w.length ? { outcomes: l.outcomes } : {}
|
|
62
62
|
};
|
|
63
|
-
return
|
|
63
|
+
return Ie(
|
|
64
64
|
await Ae().get(Fe, {
|
|
65
|
-
params:
|
|
65
|
+
params: o,
|
|
66
66
|
// Serialize arrays as repeated params: key=val1&key=val2
|
|
67
67
|
// (NestJS @Query expects this; axios default adds brackets which break matching)
|
|
68
68
|
paramsSerializer: (s) => {
|
|
69
69
|
const D = new URLSearchParams();
|
|
70
70
|
for (const [P, v] of Object.entries(s))
|
|
71
71
|
if (Array.isArray(v))
|
|
72
|
-
for (const
|
|
72
|
+
for (const A of v) D.append(P, String(A));
|
|
73
73
|
else v != null && D.append(P, String(v));
|
|
74
74
|
return D.toString();
|
|
75
75
|
}
|
|
@@ -81,36 +81,36 @@ const ue = [
|
|
|
81
81
|
* viewers only; empty for merchants). `showFeedmeAdminFilter` indicates whether to offer
|
|
82
82
|
* the "FeedMe Admin" catch-all (only when the business has relevant admin activity).
|
|
83
83
|
*/
|
|
84
|
-
async getFeedmeAdminFilter(
|
|
85
|
-
const
|
|
86
|
-
...
|
|
87
|
-
...
|
|
84
|
+
async getFeedmeAdminFilter(l) {
|
|
85
|
+
const o = {
|
|
86
|
+
...l != null && l.from ? { from: l.from } : {},
|
|
87
|
+
...l != null && l.to ? { to: l.to } : {}
|
|
88
88
|
};
|
|
89
|
-
return
|
|
90
|
-
await Ae().get(`${Fe}/actors`, { params:
|
|
89
|
+
return Ie(
|
|
90
|
+
await Ae().get(`${Fe}/actors`, { params: o })
|
|
91
91
|
);
|
|
92
92
|
}
|
|
93
|
-
},
|
|
93
|
+
}, zt = { class: "flex h-[46px] items-center gap-8 rounded-sm px-16 hover:bg-fm-color-opacity-sm" }, qt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ht = {
|
|
94
94
|
"data-more-measure": "",
|
|
95
95
|
class: "flex h-[46px] items-center gap-8 rounded-sm px-16"
|
|
96
|
-
},
|
|
96
|
+
}, Wt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Jt = /* @__PURE__ */ Xe({
|
|
97
97
|
__name: "AuditLogModuleTabs",
|
|
98
98
|
props: {
|
|
99
99
|
modelValue: {},
|
|
100
100
|
items: {}
|
|
101
101
|
},
|
|
102
102
|
emits: ["update:modelValue"],
|
|
103
|
-
setup(
|
|
104
|
-
const c =
|
|
105
|
-
let
|
|
103
|
+
setup(l, { emit: o }) {
|
|
104
|
+
const c = l, L = o, { t: j } = Qe(), I = f(!1), w = f(null), s = f(null), D = f([]), P = f(0), v = f(0);
|
|
105
|
+
let A = null;
|
|
106
106
|
async function z() {
|
|
107
|
-
if (await
|
|
107
|
+
if (await Rt(), !s.value) return;
|
|
108
108
|
const m = s.value.querySelectorAll("[data-tab-measure]");
|
|
109
109
|
D.value = Array.from(m).map((k) => k.offsetWidth);
|
|
110
110
|
const _ = s.value.querySelector("[data-more-measure]");
|
|
111
111
|
P.value = (_ == null ? void 0 : _.offsetWidth) ?? 0;
|
|
112
112
|
}
|
|
113
|
-
const
|
|
113
|
+
const ye = h(() => {
|
|
114
114
|
const m = c.items.length;
|
|
115
115
|
if (m === 0) return 0;
|
|
116
116
|
if (!v.value || D.value.length !== m) return m;
|
|
@@ -121,30 +121,30 @@ const ue = [
|
|
|
121
121
|
for (let d = 0; d < m && !(O + _[d] + S > v.value); d++)
|
|
122
122
|
O += _[d], T++;
|
|
123
123
|
return T;
|
|
124
|
-
}), J =
|
|
125
|
-
const m =
|
|
124
|
+
}), J = h(() => {
|
|
125
|
+
const m = ye.value, _ = c.items.length;
|
|
126
126
|
if (m >= _) return [...c.items];
|
|
127
127
|
const k = c.items.slice(0, m), S = c.items.find((E) => E.value === c.modelValue);
|
|
128
128
|
if (!S || k.some((E) => E.value === S.value)) return k;
|
|
129
129
|
if (m === 0) return [S];
|
|
130
130
|
const O = c.items.findIndex((E) => E.value === S.value), T = D.value, d = P.value, H = T[O] ?? 0;
|
|
131
|
-
let $ = m,
|
|
132
|
-
for (; $ > 1 &&
|
|
133
|
-
$--,
|
|
131
|
+
let $ = m, oe = T.slice(0, $ - 1).reduce((E, ae) => E + ae, 0);
|
|
132
|
+
for (; $ > 1 && oe + H + d > v.value; )
|
|
133
|
+
$--, oe = T.slice(0, $ - 1).reduce((E, ae) => E + ae, 0);
|
|
134
134
|
return [...c.items.slice(0, Math.max($ - 1, 0)), S];
|
|
135
|
-
}), te =
|
|
135
|
+
}), te = h(() => {
|
|
136
136
|
const m = new Set(J.value.map((_) => _.value));
|
|
137
137
|
return c.items.filter((_) => !m.has(_.value));
|
|
138
138
|
});
|
|
139
|
-
function
|
|
140
|
-
|
|
139
|
+
function le(m) {
|
|
140
|
+
I.value = !1, L("update:modelValue", m);
|
|
141
141
|
}
|
|
142
|
-
return
|
|
143
|
-
await z(), w.value && (v.value = w.value.clientWidth,
|
|
142
|
+
return Vt(async () => {
|
|
143
|
+
await z(), w.value && (v.value = w.value.clientWidth, A = new ResizeObserver(() => {
|
|
144
144
|
w.value && (v.value = w.value.clientWidth);
|
|
145
|
-
}),
|
|
146
|
-
}),
|
|
147
|
-
|
|
145
|
+
}), A.observe(w.value));
|
|
146
|
+
}), Et(() => {
|
|
147
|
+
A == null || A.disconnect(), A = null;
|
|
148
148
|
}), Q(
|
|
149
149
|
() => c.items,
|
|
150
150
|
() => {
|
|
@@ -153,40 +153,40 @@ const ue = [
|
|
|
153
153
|
{ deep: !0 }
|
|
154
154
|
), (m, _) => {
|
|
155
155
|
const k = C("FmTab"), S = C("FmIcon"), O = C("FmMenuItem"), T = C("FmMenu");
|
|
156
|
-
return
|
|
156
|
+
return y(), M("div", {
|
|
157
157
|
ref_key: "containerRef",
|
|
158
158
|
ref: w,
|
|
159
159
|
class: "relative flex w-full flex-row items-center"
|
|
160
160
|
}, [
|
|
161
|
-
(
|
|
161
|
+
(y(!0), M(ee, null, re(J.value, (d) => (y(), Z(k, {
|
|
162
162
|
key: d.value,
|
|
163
|
-
"model-value":
|
|
163
|
+
"model-value": l.modelValue,
|
|
164
164
|
label: d.label,
|
|
165
165
|
badge: d.badge,
|
|
166
166
|
disabled: d.disabled,
|
|
167
167
|
value: d.value,
|
|
168
|
-
"onUpdate:modelValue":
|
|
168
|
+
"onUpdate:modelValue": le
|
|
169
169
|
}, null, 8, ["model-value", "label", "badge", "disabled", "value"]))), 128)),
|
|
170
|
-
te.value.length > 0 ? (
|
|
170
|
+
te.value.length > 0 ? (y(), Z(T, {
|
|
171
171
|
key: 0,
|
|
172
|
-
"show-menu":
|
|
172
|
+
"show-menu": I.value,
|
|
173
173
|
class: "max-w-[360px] min-w-[90px] rounded-sm",
|
|
174
174
|
placement: "bottom-start",
|
|
175
|
-
onMenuChanged: _[0] || (_[0] = (d) =>
|
|
175
|
+
onMenuChanged: _[0] || (_[0] = (d) => I.value = d)
|
|
176
176
|
}, {
|
|
177
177
|
"menu-button": K(() => [
|
|
178
|
-
a("div",
|
|
178
|
+
a("div", zt, [
|
|
179
179
|
p(S, { name: "more_vert" }),
|
|
180
|
-
a("span",
|
|
180
|
+
a("span", qt, i(n(j)("auditLog.modules.more")), 1)
|
|
181
181
|
])
|
|
182
182
|
]),
|
|
183
183
|
default: K(() => [
|
|
184
|
-
(
|
|
184
|
+
(y(!0), M(ee, null, re(te.value, (d) => (y(), Z(O, {
|
|
185
185
|
key: d.value,
|
|
186
|
-
"model-value":
|
|
186
|
+
"model-value": l.modelValue === d.value,
|
|
187
187
|
label: d.label,
|
|
188
188
|
disabled: d.disabled,
|
|
189
|
-
onClick: (H) =>
|
|
189
|
+
onClick: (H) => le(d.value)
|
|
190
190
|
}, null, 8, ["model-value", "label", "disabled", "onClick"]))), 128))
|
|
191
191
|
]),
|
|
192
192
|
_: 1
|
|
@@ -197,194 +197,194 @@ const ue = [
|
|
|
197
197
|
"aria-hidden": "true",
|
|
198
198
|
class: "pointer-events-none invisible absolute -left-[9999px] -top-[9999px] flex flex-row items-center"
|
|
199
199
|
}, [
|
|
200
|
-
(
|
|
200
|
+
(y(!0), M(ee, null, re(l.items, (d) => (y(), M("div", {
|
|
201
201
|
key: `measure-${d.value}`,
|
|
202
202
|
"data-tab-measure": ""
|
|
203
203
|
}, [
|
|
204
204
|
p(k, {
|
|
205
|
-
"model-value":
|
|
205
|
+
"model-value": l.modelValue,
|
|
206
206
|
label: d.label,
|
|
207
207
|
badge: d.badge,
|
|
208
208
|
disabled: d.disabled,
|
|
209
209
|
value: d.value
|
|
210
210
|
}, null, 8, ["model-value", "label", "badge", "disabled", "value"])
|
|
211
211
|
]))), 128)),
|
|
212
|
-
a("div",
|
|
212
|
+
a("div", Ht, [
|
|
213
213
|
p(S, { name: "more_vert" }),
|
|
214
|
-
a("span",
|
|
214
|
+
a("span", Wt, i(n(j)("auditLog.modules.more")), 1)
|
|
215
215
|
])
|
|
216
216
|
], 512)
|
|
217
217
|
], 512);
|
|
218
218
|
};
|
|
219
219
|
}
|
|
220
|
-
}),
|
|
221
|
-
const
|
|
222
|
-
() => Object.fromEntries(
|
|
223
|
-
), j =
|
|
224
|
-
() => Object.fromEntries(
|
|
225
|
-
),
|
|
226
|
-
() => Object.fromEntries(
|
|
220
|
+
}), Gt = Kt("team", () => {
|
|
221
|
+
const l = f([]), o = f(!1), c = f(!1), L = h(
|
|
222
|
+
() => Object.fromEntries(l.value.map((s) => [s.doc.userId, s.name]))
|
|
223
|
+
), j = h(
|
|
224
|
+
() => Object.fromEntries(l.value.map((s) => [s.doc.userId, s.email]))
|
|
225
|
+
), I = h(
|
|
226
|
+
() => Object.fromEntries(l.value.map((s) => [s.doc.userId, s.phoneNumber]))
|
|
227
227
|
);
|
|
228
228
|
async function w({ force: s = !1 } = {}) {
|
|
229
|
-
if (!(!s &&
|
|
229
|
+
if (!(!s && l.value.length > 0))
|
|
230
230
|
try {
|
|
231
|
-
|
|
232
|
-
const D = await
|
|
233
|
-
|
|
231
|
+
o.value = !0;
|
|
232
|
+
const D = await Bt.readTeamMembers();
|
|
233
|
+
l.value = D.sort((P, v) => P.doc.isOwner ? -1 : P.name.localeCompare(v.name)), c.value = !0;
|
|
234
234
|
} finally {
|
|
235
|
-
|
|
235
|
+
o.value = !1;
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
238
|
return {
|
|
239
|
-
members:
|
|
240
|
-
isLoading:
|
|
239
|
+
members: l,
|
|
240
|
+
isLoading: o,
|
|
241
241
|
hasLoaded: c,
|
|
242
242
|
userIdToName: L,
|
|
243
243
|
userIdToEmail: j,
|
|
244
|
-
userIdToPhone:
|
|
244
|
+
userIdToPhone: I,
|
|
245
245
|
readTeamMembers: w
|
|
246
246
|
};
|
|
247
|
-
}),
|
|
247
|
+
}), Xt = {
|
|
248
248
|
class: "flex flex-col gap-4 p-12 w-[260px]"
|
|
249
|
-
},
|
|
249
|
+
}, Qt = {
|
|
250
250
|
class: "text-xs font-semibold text-fm-color-typo-secondary mb-4"
|
|
251
|
-
},
|
|
251
|
+
}, Zt = {
|
|
252
252
|
class: "flex min-h-0 flex-1 flex-col gap-16"
|
|
253
|
-
},
|
|
253
|
+
}, el = {
|
|
254
254
|
class: "space-y-16"
|
|
255
|
-
},
|
|
255
|
+
}, tl = {
|
|
256
256
|
class: "flex flex-wrap items-center gap-8"
|
|
257
|
-
},
|
|
257
|
+
}, ll = {
|
|
258
258
|
class: "w-fit"
|
|
259
|
-
},
|
|
259
|
+
}, ol = {
|
|
260
260
|
class: "w-fit"
|
|
261
|
-
},
|
|
261
|
+
}, al = {
|
|
262
262
|
class: "w-fit"
|
|
263
|
-
},
|
|
263
|
+
}, sl = {
|
|
264
264
|
class: "w-fit"
|
|
265
|
-
},
|
|
265
|
+
}, nl = {
|
|
266
266
|
key: 0,
|
|
267
267
|
class: "space-y-12 p-4 text-sm"
|
|
268
|
-
},
|
|
268
|
+
}, ul = {
|
|
269
269
|
class: "flex items-start justify-between gap-8 rounded-lg border border-fm-color-border-default p-12"
|
|
270
|
-
},
|
|
270
|
+
}, il = {
|
|
271
271
|
class: "min-w-0 flex-1"
|
|
272
|
-
},
|
|
272
|
+
}, rl = {
|
|
273
273
|
class: "audit-log-operation-label-detail text-base font-bold leading-snug text-fm-color-typo-primary"
|
|
274
|
-
},
|
|
274
|
+
}, dl = {
|
|
275
275
|
class: "rounded-lg border border-fm-color-border-default p-12"
|
|
276
|
-
},
|
|
276
|
+
}, cl = {
|
|
277
277
|
class: "space-y-12"
|
|
278
|
-
},
|
|
278
|
+
}, ml = {
|
|
279
279
|
class: "text-xs text-fm-color-typo-secondary"
|
|
280
|
-
},
|
|
280
|
+
}, fl = {
|
|
281
281
|
class: "font-semibold"
|
|
282
|
-
},
|
|
282
|
+
}, vl = {
|
|
283
283
|
class: "text-xs text-fm-color-typo-secondary"
|
|
284
|
-
},
|
|
284
|
+
}, gl = {
|
|
285
285
|
class: "font-semibold"
|
|
286
|
-
},
|
|
286
|
+
}, bl = {
|
|
287
287
|
class: "text-xs text-fm-color-typo-secondary"
|
|
288
|
-
},
|
|
288
|
+
}, pl = {
|
|
289
289
|
class: "break-all font-semibold"
|
|
290
|
-
},
|
|
290
|
+
}, hl = {
|
|
291
291
|
key: 0
|
|
292
|
-
},
|
|
292
|
+
}, yl = {
|
|
293
293
|
class: "text-xs text-fm-color-typo-secondary"
|
|
294
|
-
},
|
|
294
|
+
}, _l = {
|
|
295
295
|
class: "break-all font-mono text-xs font-semibold"
|
|
296
|
-
},
|
|
296
|
+
}, xl = {
|
|
297
297
|
class: "text-xs text-fm-color-typo-secondary"
|
|
298
|
-
},
|
|
298
|
+
}, Ll = {
|
|
299
299
|
class: "break-all font-mono text-xs font-semibold"
|
|
300
|
-
},
|
|
300
|
+
}, Sl = {
|
|
301
301
|
class: "text-xs text-fm-color-typo-secondary"
|
|
302
|
-
},
|
|
302
|
+
}, wl = {
|
|
303
303
|
class: "font-semibold"
|
|
304
|
-
},
|
|
304
|
+
}, kl = {
|
|
305
305
|
class: "rounded-lg border border-fm-color-border-default"
|
|
306
|
-
},
|
|
306
|
+
}, Il = {
|
|
307
307
|
class: "p-12"
|
|
308
|
-
},
|
|
308
|
+
}, Al = {
|
|
309
309
|
class: "text-base font-bold text-fm-color-typo-primary"
|
|
310
|
-
},
|
|
310
|
+
}, Fl = {
|
|
311
311
|
class: "space-y-12 p-12"
|
|
312
|
-
},
|
|
312
|
+
}, Ml = {
|
|
313
313
|
class: "text-xs text-fm-color-typo-secondary"
|
|
314
|
-
},
|
|
314
|
+
}, Dl = {
|
|
315
315
|
class: "font-semibold"
|
|
316
|
-
},
|
|
316
|
+
}, Ol = {
|
|
317
317
|
class: "rounded-lg border border-fm-color-border-default"
|
|
318
|
-
},
|
|
318
|
+
}, Tl = {
|
|
319
319
|
class: "p-12"
|
|
320
|
-
},
|
|
320
|
+
}, jl = {
|
|
321
321
|
class: "text-base font-bold text-fm-color-typo-primary"
|
|
322
|
-
},
|
|
322
|
+
}, Pl = {
|
|
323
323
|
class: "space-y-12 p-12"
|
|
324
|
-
},
|
|
324
|
+
}, Vl = {
|
|
325
325
|
class: "text-xs text-fm-color-typo-secondary"
|
|
326
|
-
},
|
|
326
|
+
}, El = {
|
|
327
327
|
class: "font-semibold"
|
|
328
|
-
},
|
|
328
|
+
}, Rl = {
|
|
329
329
|
key: 0
|
|
330
|
-
},
|
|
330
|
+
}, Cl = {
|
|
331
331
|
class: "text-xs text-fm-color-typo-secondary"
|
|
332
|
-
},
|
|
332
|
+
}, Ul = {
|
|
333
333
|
key: 0,
|
|
334
334
|
class: "font-semibold"
|
|
335
|
-
},
|
|
335
|
+
}, $l = {
|
|
336
336
|
key: 1,
|
|
337
337
|
class: "break-all font-mono text-xs text-fm-color-typo-secondary"
|
|
338
|
-
},
|
|
338
|
+
}, Nl = {
|
|
339
339
|
key: 1
|
|
340
|
-
},
|
|
340
|
+
}, Yl = {
|
|
341
341
|
class: "text-xs text-fm-color-typo-secondary"
|
|
342
|
-
},
|
|
342
|
+
}, Bl = {
|
|
343
343
|
class: "font-semibold whitespace-pre-line"
|
|
344
|
-
},
|
|
344
|
+
}, Kl = {
|
|
345
345
|
class: "text-xs text-fm-color-typo-secondary"
|
|
346
|
-
},
|
|
346
|
+
}, zl = {
|
|
347
347
|
class: "font-semibold"
|
|
348
|
-
},
|
|
348
|
+
}, ql = {
|
|
349
349
|
class: "text-xs text-fm-color-typo-secondary"
|
|
350
|
-
},
|
|
350
|
+
}, Hl = {
|
|
351
351
|
class: "break-all font-mono text-xs font-semibold"
|
|
352
|
-
},
|
|
352
|
+
}, Wl = {
|
|
353
353
|
key: 2
|
|
354
|
-
},
|
|
354
|
+
}, Jl = {
|
|
355
355
|
class: "text-xs text-fm-color-typo-secondary"
|
|
356
|
-
},
|
|
356
|
+
}, Gl = {
|
|
357
357
|
class: "mt-4 space-y-4"
|
|
358
|
-
},
|
|
358
|
+
}, Xl = {
|
|
359
359
|
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"
|
|
360
|
-
},
|
|
360
|
+
}, Ql = {
|
|
361
361
|
class: "text-xs font-semibold"
|
|
362
|
-
},
|
|
362
|
+
}, Zl = {
|
|
363
363
|
key: 0,
|
|
364
364
|
class: "text-fm-color-typo-secondary"
|
|
365
|
-
},
|
|
365
|
+
}, eo = {
|
|
366
366
|
key: 3
|
|
367
|
-
},
|
|
367
|
+
}, to = {
|
|
368
368
|
class: "text-xs text-fm-color-typo-secondary"
|
|
369
|
-
},
|
|
369
|
+
}, lo = {
|
|
370
370
|
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"
|
|
371
|
-
}, ie = 100,
|
|
371
|
+
}, ie = 100, Me = 1e3, he = "__feedmeAdmin__", oo = "D MMM YYYY h:mm A", ao = "YYYY-MM-DD HH:mm", V = "YYYY-MM-DD", Ge = "audit-log-export-fields", so = /* @__PURE__ */ Xe({
|
|
372
372
|
__name: "AuditLogList",
|
|
373
|
-
setup(
|
|
373
|
+
setup(l) {
|
|
374
374
|
const {
|
|
375
|
-
t:
|
|
376
|
-
} =
|
|
375
|
+
t: o
|
|
376
|
+
} = Qe(), c = Ct(), L = Gt(), j = f(!1), I = f(!1), w = f([]), s = f(null), D = f(!1);
|
|
377
377
|
async function P(e) {
|
|
378
378
|
const t = Uint8Array.from(atob(e), (r) => r.charCodeAt(0)), u = new DecompressionStream("gzip"), g = u.writable.getWriter();
|
|
379
379
|
return await g.write(t), await g.close(), new Response(u.readable).text();
|
|
380
380
|
}
|
|
381
381
|
const v = f("");
|
|
382
|
-
let
|
|
382
|
+
let A = 0;
|
|
383
383
|
Q(() => {
|
|
384
384
|
var e, t;
|
|
385
385
|
return (t = (e = s.value) == null ? void 0 : e.metadata) == null ? void 0 : t.requestBody;
|
|
386
386
|
}, async (e) => {
|
|
387
|
-
const t = ++
|
|
387
|
+
const t = ++A;
|
|
388
388
|
if (!e) {
|
|
389
389
|
v.value = "";
|
|
390
390
|
return;
|
|
@@ -396,10 +396,10 @@ const ue = [
|
|
|
396
396
|
if (e.startsWith("gzip:")) {
|
|
397
397
|
try {
|
|
398
398
|
const u = await P(e.slice(5));
|
|
399
|
-
if (t !==
|
|
399
|
+
if (t !== A) return;
|
|
400
400
|
v.value = JSON.stringify(JSON.parse(u), null, 2);
|
|
401
401
|
} catch {
|
|
402
|
-
if (t !==
|
|
402
|
+
if (t !== A) return;
|
|
403
403
|
v.value = e;
|
|
404
404
|
}
|
|
405
405
|
return;
|
|
@@ -412,9 +412,9 @@ const ue = [
|
|
|
412
412
|
}, {
|
|
413
413
|
immediate: !0
|
|
414
414
|
});
|
|
415
|
-
const z = f(1),
|
|
416
|
-
startDate: `${
|
|
417
|
-
endDate: `${
|
|
415
|
+
const z = f(1), ye = f(!1), J = f(0), te = h(() => Math.max(1, Math.ceil(J.value / ie))), le = x().format("YYYY-MM-DD"), m = f({
|
|
416
|
+
startDate: `${le} 00:00`,
|
|
417
|
+
endDate: `${le} 23:59`
|
|
418
418
|
}), _ = f(), k = f(), S = f(), O = f(), T = f("all");
|
|
419
419
|
function d(e) {
|
|
420
420
|
return typeof e == "string" ? [e] : Array.isArray(e) ? e.filter((t) => typeof t == "string") : [];
|
|
@@ -424,60 +424,60 @@ const ue = [
|
|
|
424
424
|
const t = ue.find((u) => u.key !== "all" && u.subjectPrefixes.some((g) => e.startsWith(g)));
|
|
425
425
|
return (t == null ? void 0 : t.key) ?? "other";
|
|
426
426
|
}
|
|
427
|
-
function
|
|
427
|
+
function oe(e) {
|
|
428
428
|
const t = H.indexOf(e);
|
|
429
429
|
return t === -1 ? H.length : t;
|
|
430
430
|
}
|
|
431
|
-
const
|
|
431
|
+
const De = h(() => ue.map(({
|
|
432
432
|
key: e
|
|
433
433
|
}) => ({
|
|
434
|
-
label:
|
|
434
|
+
label: o(`auditLog.modules.${e}`),
|
|
435
435
|
value: e
|
|
436
|
-
}))), E =
|
|
437
|
-
label:
|
|
436
|
+
}))), E = h(() => ue.find((e) => e.key === T.value) ?? ue[0]), ae = h(() => T.value === "all"), de = f([]), ce = f(!1), Ze = h(() => [...ce.value ? [{
|
|
437
|
+
label: o("auditLog.user.feedmeAdmin"),
|
|
438
438
|
value: he
|
|
439
439
|
}] : [], ...L.members.map((e) => ({
|
|
440
440
|
label: e.name,
|
|
441
441
|
value: e.doc.userId
|
|
442
442
|
})), ...de.value.map((e) => ({
|
|
443
|
-
label: `${e.name} (${
|
|
443
|
+
label: `${e.name} (${o("auditLog.user.feedmeAdmin")})`,
|
|
444
444
|
value: e.userId
|
|
445
|
-
}))]), Y =
|
|
445
|
+
}))]), Y = h(() => {
|
|
446
446
|
const e = _.value ?? [];
|
|
447
447
|
return {
|
|
448
448
|
userIds: e.filter((t) => t !== he),
|
|
449
449
|
feedmeAdminActors: e.includes(he)
|
|
450
450
|
};
|
|
451
|
-
}),
|
|
452
|
-
const e =
|
|
451
|
+
}), Oe = h(() => {
|
|
452
|
+
const e = Je.flatMap((r) => d(r.subject).map((F) => ({
|
|
453
453
|
label: r.label,
|
|
454
|
-
value:
|
|
455
|
-
}))), t = Object.entries(
|
|
456
|
-
label:
|
|
454
|
+
value: F
|
|
455
|
+
}))), t = Object.entries(He).map(([r, F]) => ({
|
|
456
|
+
label: F,
|
|
457
457
|
value: r
|
|
458
458
|
})), u = /* @__PURE__ */ new Set(), g = [];
|
|
459
459
|
for (const r of [...e, ...t])
|
|
460
460
|
if (!u.has(r.value)) {
|
|
461
461
|
u.add(r.value);
|
|
462
|
-
const
|
|
462
|
+
const F = $(r.value);
|
|
463
463
|
g.push({
|
|
464
464
|
...r,
|
|
465
|
-
group:
|
|
465
|
+
group: o(`auditLog.modules.${F}`)
|
|
466
466
|
});
|
|
467
467
|
}
|
|
468
|
-
return g.sort((r,
|
|
469
|
-
}),
|
|
470
|
-
function
|
|
468
|
+
return g.sort((r, F) => oe($(r.value)) - oe($(F.value)));
|
|
469
|
+
}), et = h(() => ae.value ? Oe.value : Oe.value.filter((e) => $(e.value) === T.value));
|
|
470
|
+
function tt(e, t) {
|
|
471
471
|
const u = t.toLowerCase();
|
|
472
472
|
return e.label.toLowerCase().includes(u) || e.value.replace(/^business::/, "").toLowerCase().includes(u) ? !0 : e.value.toLowerCase().includes(u);
|
|
473
473
|
}
|
|
474
|
-
const U =
|
|
475
|
-
manage:
|
|
476
|
-
create:
|
|
477
|
-
read:
|
|
478
|
-
update:
|
|
479
|
-
delete:
|
|
480
|
-
})),
|
|
474
|
+
const U = h(() => ({
|
|
475
|
+
manage: o("auditLog.action.manage"),
|
|
476
|
+
create: o("auditLog.action.create"),
|
|
477
|
+
read: o("auditLog.action.read"),
|
|
478
|
+
update: o("auditLog.action.update"),
|
|
479
|
+
delete: o("auditLog.action.delete")
|
|
480
|
+
})), lt = h(() => [{
|
|
481
481
|
label: U.value.manage,
|
|
482
482
|
value: "manage"
|
|
483
483
|
}, {
|
|
@@ -492,137 +492,150 @@ const ue = [
|
|
|
492
492
|
}, {
|
|
493
493
|
label: U.value.delete,
|
|
494
494
|
value: "delete"
|
|
495
|
-
}]), me =
|
|
496
|
-
allowed:
|
|
497
|
-
denied:
|
|
498
|
-
skipped:
|
|
499
|
-
})),
|
|
495
|
+
}]), me = h(() => ({
|
|
496
|
+
allowed: o("auditLog.outcome.success"),
|
|
497
|
+
denied: o("auditLog.outcome.failed"),
|
|
498
|
+
skipped: o("auditLog.outcome.skipped")
|
|
499
|
+
})), _e = h(() => {
|
|
500
|
+
var e;
|
|
501
|
+
return ((e = c.sessionUser.value) == null ? void 0 : e.isInternal) ?? !1;
|
|
502
|
+
});
|
|
503
|
+
function Te(e) {
|
|
504
|
+
return !_e.value && e === "skipped" ? "allowed" : e;
|
|
505
|
+
}
|
|
506
|
+
function je(e) {
|
|
507
|
+
return !(e != null && e.length) || _e.value ? e : e.includes("allowed") ? [.../* @__PURE__ */ new Set([...e, "skipped"])] : e;
|
|
508
|
+
}
|
|
509
|
+
const ot = h(() => [{
|
|
500
510
|
label: me.value.allowed,
|
|
501
511
|
value: "allowed"
|
|
502
512
|
}, {
|
|
503
513
|
label: me.value.denied,
|
|
504
514
|
value: "denied"
|
|
505
|
-
}, {
|
|
515
|
+
}, ..._e.value ? [{
|
|
506
516
|
label: me.value.skipped,
|
|
507
517
|
value: "skipped"
|
|
508
|
-
}]),
|
|
509
|
-
admin:
|
|
510
|
-
staff:
|
|
511
|
-
permissionSet:
|
|
512
|
-
systemPermissionSet:
|
|
513
|
-
custom:
|
|
514
|
-
"no-match":
|
|
515
|
-
unknown:
|
|
516
|
-
})),
|
|
518
|
+
}] : []]), at = h(() => ({
|
|
519
|
+
admin: o("auditLog.detail.resolvedFromValue.admin"),
|
|
520
|
+
staff: o("auditLog.detail.resolvedFromValue.staff"),
|
|
521
|
+
permissionSet: o("auditLog.detail.resolvedFromValue.permissionSet"),
|
|
522
|
+
systemPermissionSet: o("auditLog.detail.resolvedFromValue.systemPermissionSet"),
|
|
523
|
+
custom: o("auditLog.detail.resolvedFromValue.custom"),
|
|
524
|
+
"no-match": o("auditLog.detail.resolvedFromValue.noMatch"),
|
|
525
|
+
unknown: o("auditLog.detail.resolvedFromValue.unknown")
|
|
526
|
+
})), st = h(() => ({
|
|
517
527
|
GET: U.value.read,
|
|
518
528
|
POST: U.value.create,
|
|
519
529
|
PUT: U.value.update,
|
|
520
530
|
PATCH: U.value.update,
|
|
521
531
|
DELETE: U.value.delete
|
|
522
|
-
})),
|
|
532
|
+
})), nt = {
|
|
523
533
|
allowed: "success",
|
|
524
534
|
denied: "critical",
|
|
525
535
|
skipped: "warning"
|
|
526
536
|
};
|
|
527
537
|
function fe(e) {
|
|
528
|
-
return x(e).format(
|
|
538
|
+
return x(e).format(oo);
|
|
529
539
|
}
|
|
530
|
-
const
|
|
540
|
+
const ut = h(() => {
|
|
531
541
|
const {
|
|
532
542
|
startDate: e,
|
|
533
543
|
endDate: t
|
|
534
544
|
} = m.value;
|
|
535
|
-
return e && t ? `${fe(e)} – ${fe(t)}` : e ? fe(e) : t ? fe(t) :
|
|
536
|
-
}),
|
|
537
|
-
label:
|
|
545
|
+
return e && t ? `${fe(e)} – ${fe(t)}` : e ? fe(e) : t ? fe(t) : o("auditLog.dateRange.placeholder");
|
|
546
|
+
}), it = h(() => [{
|
|
547
|
+
label: o("date.predefinedRanges.today"),
|
|
538
548
|
value: {
|
|
539
549
|
startDate: x().format(V),
|
|
540
550
|
endDate: x().format(V)
|
|
541
551
|
}
|
|
542
552
|
}, {
|
|
543
|
-
label:
|
|
553
|
+
label: o("date.predefinedRanges.yesterday"),
|
|
544
554
|
value: {
|
|
545
555
|
startDate: x().subtract(1, "day").format(V),
|
|
546
556
|
endDate: x().subtract(1, "day").format(V)
|
|
547
557
|
}
|
|
548
558
|
}, {
|
|
549
|
-
label:
|
|
559
|
+
label: o("date.predefinedRanges.thisWeek"),
|
|
550
560
|
value: {
|
|
551
561
|
startDate: x().startOf("week").format(V),
|
|
552
562
|
endDate: x().endOf("week").format(V)
|
|
553
563
|
}
|
|
554
564
|
}, {
|
|
555
|
-
label:
|
|
565
|
+
label: o("date.predefinedRanges.lastWeek"),
|
|
556
566
|
value: {
|
|
557
567
|
startDate: x().subtract(1, "week").startOf("week").format(V),
|
|
558
568
|
endDate: x().subtract(1, "week").endOf("week").format(V)
|
|
559
569
|
}
|
|
560
570
|
}, {
|
|
561
|
-
label:
|
|
571
|
+
label: o("date.predefinedRanges.last7Days"),
|
|
562
572
|
value: {
|
|
563
573
|
startDate: x().subtract(7, "day").format(V),
|
|
564
574
|
endDate: x().subtract(1, "day").format(V)
|
|
565
575
|
}
|
|
566
576
|
}, {
|
|
567
|
-
label:
|
|
577
|
+
label: o("date.predefinedRanges.thisMonth"),
|
|
568
578
|
value: {
|
|
569
579
|
startDate: x().startOf("month").format(V),
|
|
570
580
|
endDate: x().endOf("month").format(V)
|
|
571
581
|
}
|
|
572
582
|
}, {
|
|
573
|
-
label:
|
|
583
|
+
label: o("date.predefinedRanges.lastMonth"),
|
|
574
584
|
value: {
|
|
575
585
|
startDate: x().subtract(1, "month").startOf("month").format(V),
|
|
576
586
|
endDate: x().subtract(1, "month").endOf("month").format(V)
|
|
577
587
|
}
|
|
578
588
|
}]);
|
|
579
|
-
function
|
|
589
|
+
function xe(e) {
|
|
580
590
|
var t;
|
|
581
|
-
return ((t =
|
|
591
|
+
return ((t = Je.find((u) => u.subject === e)) == null ? void 0 : t.label) ?? He[e];
|
|
582
592
|
}
|
|
583
593
|
function ve(e) {
|
|
584
594
|
var u;
|
|
585
595
|
const t = L.userIdToName[e.userId];
|
|
586
|
-
return t || (L.hasLoaded ? (u = c.sessionUser.value) != null && u.isInternal ? `${e.actorName ?? e.userId} (${
|
|
596
|
+
return t || (L.hasLoaded ? (u = c.sessionUser.value) != null && u.isInternal ? `${e.actorName ?? e.userId} (${o("auditLog.user.feedmeAdmin")})` : o("auditLog.user.feedmeAdmin") : e.userId);
|
|
587
597
|
}
|
|
588
|
-
function
|
|
598
|
+
function Pe(e) {
|
|
589
599
|
return L.userIdToPhone[e.userId] || "-";
|
|
590
600
|
}
|
|
591
|
-
function
|
|
601
|
+
function rt(e) {
|
|
592
602
|
return L.userIdToEmail[e.userId] || "-";
|
|
593
603
|
}
|
|
594
|
-
function
|
|
604
|
+
function Ve(e) {
|
|
595
605
|
return x(e).format("DD MMM YYYY, HH:mm");
|
|
596
606
|
}
|
|
597
|
-
function
|
|
607
|
+
function dt(e) {
|
|
598
608
|
return x(e).format("DD MMM YYYY, HH:mm:ss").toUpperCase();
|
|
599
609
|
}
|
|
600
|
-
function
|
|
610
|
+
function Ee(e) {
|
|
601
611
|
return U.value[e] ?? e;
|
|
602
612
|
}
|
|
603
|
-
function
|
|
604
|
-
return e.metadata.operationLabel ??
|
|
613
|
+
function Re(e) {
|
|
614
|
+
return e.metadata.operationLabel ?? Ee(e.action);
|
|
615
|
+
}
|
|
616
|
+
function ct(e) {
|
|
617
|
+
return xe(e.subject) ?? e.subject;
|
|
605
618
|
}
|
|
606
|
-
function
|
|
607
|
-
return
|
|
619
|
+
function Le(e) {
|
|
620
|
+
return me.value[Te(e)];
|
|
608
621
|
}
|
|
609
|
-
function
|
|
610
|
-
return
|
|
622
|
+
function Ce(e) {
|
|
623
|
+
return nt[Te(e)] ?? "neutral";
|
|
611
624
|
}
|
|
612
|
-
function
|
|
613
|
-
return
|
|
625
|
+
function mt(e) {
|
|
626
|
+
return at.value[e] ?? e;
|
|
614
627
|
}
|
|
615
|
-
function
|
|
616
|
-
return e.metadata.requestMethod ?
|
|
628
|
+
function ft(e) {
|
|
629
|
+
return e.metadata.requestMethod ? st.value[e.metadata.requestMethod] ?? e.metadata.requestMethod : Ee(e.action);
|
|
617
630
|
}
|
|
618
|
-
function
|
|
631
|
+
function Ue(e) {
|
|
619
632
|
const t = String(e ?? "");
|
|
620
633
|
return `"${(/^[=+\-@\t\r]/.test(t) ? `'${t}` : t).replace(/"/g, '""')}"`;
|
|
621
634
|
}
|
|
622
|
-
const
|
|
635
|
+
const Se = [{
|
|
623
636
|
key: "timestamp",
|
|
624
637
|
labelKey: "auditLog.exportFields.timestamp",
|
|
625
|
-
getValue: (e) =>
|
|
638
|
+
getValue: (e) => Ve(e.timestamp),
|
|
626
639
|
defaultSelected: !0
|
|
627
640
|
}, {
|
|
628
641
|
key: "userName",
|
|
@@ -632,12 +645,12 @@ const ue = [
|
|
|
632
645
|
}, {
|
|
633
646
|
key: "userPhone",
|
|
634
647
|
labelKey: "auditLog.exportFields.userPhone",
|
|
635
|
-
getValue: (e) =>
|
|
648
|
+
getValue: (e) => Pe(e),
|
|
636
649
|
defaultSelected: !0
|
|
637
650
|
}, {
|
|
638
651
|
key: "subject",
|
|
639
652
|
labelKey: "auditLog.exportFields.subject",
|
|
640
|
-
getValue: (e) =>
|
|
653
|
+
getValue: (e) => xe(e.subject) ?? e.subject,
|
|
641
654
|
defaultSelected: !0
|
|
642
655
|
}, {
|
|
643
656
|
key: "action",
|
|
@@ -647,12 +660,12 @@ const ue = [
|
|
|
647
660
|
}, {
|
|
648
661
|
key: "operation",
|
|
649
662
|
labelKey: "auditLog.exportFields.operation",
|
|
650
|
-
getValue: (e) =>
|
|
663
|
+
getValue: (e) => Re(e),
|
|
651
664
|
defaultSelected: !0
|
|
652
665
|
}, {
|
|
653
666
|
key: "outcome",
|
|
654
667
|
labelKey: "auditLog.exportFields.outcome",
|
|
655
|
-
getValue: (e) =>
|
|
668
|
+
getValue: (e) => Le(e.outcome),
|
|
656
669
|
defaultSelected: !0
|
|
657
670
|
}, {
|
|
658
671
|
key: "businessId",
|
|
@@ -694,19 +707,19 @@ const ue = [
|
|
|
694
707
|
},
|
|
695
708
|
defaultSelected: !1
|
|
696
709
|
}];
|
|
697
|
-
function
|
|
710
|
+
function vt() {
|
|
698
711
|
try {
|
|
699
|
-
const e = localStorage.getItem(
|
|
712
|
+
const e = localStorage.getItem(Ge);
|
|
700
713
|
if (e) {
|
|
701
714
|
const t = JSON.parse(e);
|
|
702
715
|
if (Array.isArray(t) && t.length > 0) return new Set(t);
|
|
703
716
|
}
|
|
704
717
|
} catch {
|
|
705
718
|
}
|
|
706
|
-
return new Set(
|
|
719
|
+
return new Set(Se.filter((e) => e.defaultSelected).map((e) => e.key));
|
|
707
720
|
}
|
|
708
|
-
const G = f(
|
|
709
|
-
function
|
|
721
|
+
const G = f(vt());
|
|
722
|
+
function gt(e) {
|
|
710
723
|
const t = new Set(G.value);
|
|
711
724
|
if (t.has(e)) {
|
|
712
725
|
if (t.size <= 1) return;
|
|
@@ -715,21 +728,21 @@ const ue = [
|
|
|
715
728
|
t.add(e);
|
|
716
729
|
G.value = t;
|
|
717
730
|
try {
|
|
718
|
-
localStorage.setItem(
|
|
731
|
+
localStorage.setItem(Ge, JSON.stringify([...t]));
|
|
719
732
|
} catch {
|
|
720
733
|
}
|
|
721
734
|
}
|
|
722
|
-
async function
|
|
735
|
+
async function bt() {
|
|
723
736
|
var e, t, u, g, r;
|
|
724
|
-
if (!
|
|
725
|
-
|
|
737
|
+
if (!I.value) {
|
|
738
|
+
I.value = !0;
|
|
726
739
|
try {
|
|
727
740
|
const {
|
|
728
|
-
startDate:
|
|
741
|
+
startDate: F,
|
|
729
742
|
endDate: B
|
|
730
743
|
} = m.value, W = E.value.subjectPrefixes, ge = (/* @__PURE__ */ new Date()).toISOString().slice(0, 19).replace("T", " "), se = B ? q(B) : null, b = se && se < ge ? se : ge, X = {
|
|
731
|
-
...
|
|
732
|
-
from: q(
|
|
744
|
+
...F ? {
|
|
745
|
+
from: q(F)
|
|
733
746
|
} : {},
|
|
734
747
|
to: b,
|
|
735
748
|
...Y.value.userIds.length ? {
|
|
@@ -748,45 +761,45 @@ const ue = [
|
|
|
748
761
|
actions: O.value
|
|
749
762
|
} : {},
|
|
750
763
|
...(u = S.value) != null && u.length ? {
|
|
751
|
-
outcomes: S.value
|
|
764
|
+
outcomes: je(S.value)
|
|
752
765
|
} : {}
|
|
753
|
-
},
|
|
754
|
-
let
|
|
766
|
+
}, Ye = [];
|
|
767
|
+
let Be = 0;
|
|
755
768
|
for (; ; ) {
|
|
756
769
|
const R = await pe.read({
|
|
757
770
|
...X,
|
|
758
|
-
limit:
|
|
759
|
-
offset:
|
|
771
|
+
limit: Me,
|
|
772
|
+
offset: Be
|
|
760
773
|
});
|
|
761
|
-
if (
|
|
762
|
-
|
|
774
|
+
if (Ye.push(...R), R.length < Me) break;
|
|
775
|
+
Be += Me;
|
|
763
776
|
}
|
|
764
|
-
const
|
|
765
|
-
`),
|
|
777
|
+
const Ke = Se.filter((R) => G.value.has(R.key)), wt = Ke.map((R) => o(R.labelKey)), kt = Ye.map((R) => Ke.map((Pt) => Pt.getValue(R) ?? "")), ke = -(/* @__PURE__ */ new Date()).getTimezoneOffset(), It = ke >= 0 ? "+" : "-", At = String(Math.floor(Math.abs(ke) / 60)).padStart(2, "0"), Ft = String(Math.abs(ke) % 60).padStart(2, "0"), Mt = `UTC${It}${At}:${Ft}`, ze = ((g = c.currentBusiness.value) == null ? void 0 : g.name) || "", Dt = [F, B].filter(Boolean).join(" – "), Ot = [...[[o("auditLog.title")], [`${o("auditLog.frontMatter.date")}: ${Dt}`], ...ze ? [[`${o("auditLog.frontMatter.business")}: ${ze}`]] : [], [`${o("auditLog.frontMatter.generatedBy")}: ${x().format("DD MMM YYYY, HH:mm")} (${Mt})`], []].map((R) => R.map(Ue).join(",")), ...[wt, ...kt].map((R) => R.map(Ue).join(","))].join(`
|
|
778
|
+
`), Tt = `audit-log_${(((r = c.currentBusiness.value) == null ? void 0 : r.name) || "business").replace(/[^a-z0-9_-]+/gi, "_")}_${x().format("YYYYMMDD_HHmmss")}.csv`, jt = new Blob([`\uFEFF${Ot}`], {
|
|
766
779
|
type: "text/csv;charset=utf-8;"
|
|
767
|
-
}),
|
|
768
|
-
ne.href =
|
|
780
|
+
}), qe = window.URL.createObjectURL(jt), ne = document.createElement("a");
|
|
781
|
+
ne.href = qe, ne.download = Tt, document.body.appendChild(ne), ne.click(), ne.remove(), window.URL.revokeObjectURL(qe);
|
|
769
782
|
} finally {
|
|
770
|
-
|
|
783
|
+
I.value = !1;
|
|
771
784
|
}
|
|
772
785
|
}
|
|
773
786
|
}
|
|
774
|
-
const
|
|
787
|
+
const pt = [{
|
|
775
788
|
accessorKey: "timestamp",
|
|
776
|
-
header: () =>
|
|
789
|
+
header: () => o("auditLog.columns.timestamp"),
|
|
777
790
|
cell(e) {
|
|
778
|
-
return
|
|
791
|
+
return Ve(e.row.original.timestamp);
|
|
779
792
|
}
|
|
780
793
|
}, {
|
|
781
794
|
accessorKey: "userId",
|
|
782
|
-
header: () =>
|
|
795
|
+
header: () => o("auditLog.columns.user"),
|
|
783
796
|
enableSorting: !1,
|
|
784
797
|
size: 220,
|
|
785
798
|
cell(e) {
|
|
786
799
|
const t = e.row.original;
|
|
787
800
|
return p("div", {
|
|
788
801
|
class: "flex items-center gap-8"
|
|
789
|
-
}, [p(
|
|
802
|
+
}, [p(We.FmAvatar, {
|
|
790
803
|
name: ve(t),
|
|
791
804
|
size: "sm",
|
|
792
805
|
class: "shrink-0"
|
|
@@ -796,53 +809,53 @@ const ue = [
|
|
|
796
809
|
class: "truncate font-semibold"
|
|
797
810
|
}, [ve(t)]), p("p", {
|
|
798
811
|
class: "truncate text-fm-color-typo-secondary"
|
|
799
|
-
}, [
|
|
812
|
+
}, [Pe(t)])])]);
|
|
800
813
|
}
|
|
801
814
|
}, {
|
|
802
815
|
accessorKey: "subject",
|
|
803
|
-
header: () =>
|
|
816
|
+
header: () => o("auditLog.columns.subject"),
|
|
804
817
|
cell(e) {
|
|
805
818
|
const t = e.row.original;
|
|
806
|
-
return
|
|
819
|
+
return xe(t.subject) ?? t.subject;
|
|
807
820
|
}
|
|
808
821
|
}, {
|
|
809
822
|
accessorKey: "action",
|
|
810
|
-
header: () =>
|
|
823
|
+
header: () => o("auditLog.columns.action"),
|
|
811
824
|
enableSorting: !1,
|
|
812
825
|
size: 280,
|
|
813
826
|
meta: {
|
|
814
827
|
cellSpanClass: "audit-log-action-label"
|
|
815
828
|
},
|
|
816
829
|
cell(e) {
|
|
817
|
-
return
|
|
830
|
+
return Re(e.row.original);
|
|
818
831
|
}
|
|
819
832
|
}, {
|
|
820
833
|
accessorKey: "outcome",
|
|
821
|
-
header: () =>
|
|
834
|
+
header: () => o("auditLog.columns.outcome"),
|
|
822
835
|
enableSorting: !1,
|
|
823
836
|
cell(e) {
|
|
824
837
|
const t = e.row.original;
|
|
825
|
-
return p(
|
|
826
|
-
variant:
|
|
827
|
-
label:
|
|
838
|
+
return p(We.FmChip, {
|
|
839
|
+
variant: Ce(t.outcome),
|
|
840
|
+
label: Le(t.outcome),
|
|
828
841
|
compact: !0
|
|
829
842
|
}, null);
|
|
830
843
|
}
|
|
831
844
|
}];
|
|
832
845
|
function q(e) {
|
|
833
|
-
const t = x(e,
|
|
846
|
+
const t = x(e, ao);
|
|
834
847
|
return new Date(t.year(), t.month(), t.date(), t.hour(), t.minute(), 0).toISOString().slice(0, 19).replace("T", " ");
|
|
835
848
|
}
|
|
836
|
-
async function
|
|
849
|
+
async function $e() {
|
|
837
850
|
var e, t, u;
|
|
838
851
|
j.value = !0;
|
|
839
852
|
try {
|
|
840
853
|
const {
|
|
841
854
|
startDate: g,
|
|
842
855
|
endDate: r
|
|
843
|
-
} = m.value,
|
|
856
|
+
} = m.value, F = (z.value - 1) * ie, B = E.value.subjectPrefixes, W = await pe.read({
|
|
844
857
|
limit: ie,
|
|
845
|
-
offset:
|
|
858
|
+
offset: F,
|
|
846
859
|
...g ? {
|
|
847
860
|
from: q(g)
|
|
848
861
|
} : {},
|
|
@@ -865,15 +878,15 @@ const ue = [
|
|
|
865
878
|
actions: O.value
|
|
866
879
|
} : {},
|
|
867
880
|
...(u = S.value) != null && u.length ? {
|
|
868
|
-
outcomes: S.value
|
|
881
|
+
outcomes: je(S.value)
|
|
869
882
|
} : {}
|
|
870
883
|
});
|
|
871
|
-
w.value = W,
|
|
884
|
+
w.value = W, ye.value = W.length === ie;
|
|
872
885
|
} finally {
|
|
873
886
|
j.value = !1;
|
|
874
887
|
}
|
|
875
888
|
}
|
|
876
|
-
const
|
|
889
|
+
const Ne = h(() => {
|
|
877
890
|
var e;
|
|
878
891
|
return JSON.stringify({
|
|
879
892
|
businessId: ((e = c.currentBusiness.value) == null ? void 0 : e._id) ?? "",
|
|
@@ -885,8 +898,8 @@ const ue = [
|
|
|
885
898
|
moduleKey: T.value
|
|
886
899
|
});
|
|
887
900
|
});
|
|
888
|
-
async function
|
|
889
|
-
var g, r,
|
|
901
|
+
async function ht() {
|
|
902
|
+
var g, r, F;
|
|
890
903
|
const {
|
|
891
904
|
startDate: e,
|
|
892
905
|
endDate: t
|
|
@@ -913,37 +926,37 @@ const ue = [
|
|
|
913
926
|
...(r = O.value) != null && r.length ? {
|
|
914
927
|
actions: O.value
|
|
915
928
|
} : {},
|
|
916
|
-
...(
|
|
929
|
+
...(F = S.value) != null && F.length ? {
|
|
917
930
|
outcomes: S.value
|
|
918
931
|
} : {}
|
|
919
932
|
});
|
|
920
933
|
}
|
|
921
|
-
Q(
|
|
934
|
+
Q(Ne, async () => {
|
|
922
935
|
var e;
|
|
923
|
-
z.value = 1, (e = c.currentBusiness.value) != null && e._id && await Promise.all([
|
|
936
|
+
z.value = 1, (e = c.currentBusiness.value) != null && e._id && await Promise.all([ht(), $e()]);
|
|
924
937
|
}, {
|
|
925
938
|
immediate: !0
|
|
926
939
|
}), Q(T, () => {
|
|
927
940
|
k.value = void 0;
|
|
928
941
|
});
|
|
929
|
-
let
|
|
930
|
-
async function
|
|
942
|
+
let we = !1;
|
|
943
|
+
async function yt({
|
|
931
944
|
pageIndex: e
|
|
932
945
|
}) {
|
|
933
946
|
var t;
|
|
934
|
-
if ((t = c.currentBusiness.value) != null && t._id && e !== 0 && !
|
|
935
|
-
|
|
947
|
+
if ((t = c.currentBusiness.value) != null && t._id && e !== 0 && !we) {
|
|
948
|
+
we = !0, z.value = e + 1;
|
|
936
949
|
try {
|
|
937
|
-
await
|
|
950
|
+
await $e();
|
|
938
951
|
} finally {
|
|
939
|
-
|
|
952
|
+
we = !1;
|
|
940
953
|
}
|
|
941
954
|
}
|
|
942
955
|
}
|
|
943
|
-
function
|
|
956
|
+
function _t(e) {
|
|
944
957
|
s.value = e, D.value = !0;
|
|
945
958
|
}
|
|
946
|
-
function
|
|
959
|
+
function xt() {
|
|
947
960
|
D.value = !1, s.value = null;
|
|
948
961
|
}
|
|
949
962
|
Q(c.currentBusiness, (e) => {
|
|
@@ -951,13 +964,13 @@ const ue = [
|
|
|
951
964
|
}, {
|
|
952
965
|
immediate: !0
|
|
953
966
|
});
|
|
954
|
-
function
|
|
967
|
+
function Lt() {
|
|
955
968
|
const e = _.value;
|
|
956
969
|
if (!(e != null && e.length)) return;
|
|
957
970
|
const t = new Set(de.value.map((r) => r.userId)), u = new Set(L.members.map((r) => r.doc.userId)), g = e.filter((r) => r === he ? ce.value : L.hasLoaded ? u.has(r) || t.has(r) : !0);
|
|
958
971
|
g.length !== e.length && (_.value = g.length ? g : void 0);
|
|
959
972
|
}
|
|
960
|
-
async function
|
|
973
|
+
async function St() {
|
|
961
974
|
var u;
|
|
962
975
|
if (!((u = c.currentBusiness.value) != null && u._id)) return;
|
|
963
976
|
const {
|
|
@@ -980,7 +993,7 @@ const ue = [
|
|
|
980
993
|
} catch {
|
|
981
994
|
de.value = [], ce.value = !1;
|
|
982
995
|
}
|
|
983
|
-
|
|
996
|
+
Lt();
|
|
984
997
|
}
|
|
985
998
|
return Q(() => {
|
|
986
999
|
var e;
|
|
@@ -988,145 +1001,145 @@ const ue = [
|
|
|
988
1001
|
businessId: (e = c.currentBusiness.value) == null ? void 0 : e._id,
|
|
989
1002
|
range: m.value
|
|
990
1003
|
};
|
|
991
|
-
}, () =>
|
|
1004
|
+
}, () => St(), {
|
|
992
1005
|
immediate: !0,
|
|
993
1006
|
deep: !0
|
|
994
1007
|
}), (e, t) => {
|
|
995
|
-
const u = C("FmSpacer"), g = C("FmButton"), r = C("FmMenuItem"),
|
|
996
|
-
return
|
|
997
|
-
heading: n(
|
|
1008
|
+
const u = C("FmSpacer"), g = C("FmButton"), r = C("FmMenuItem"), F = C("FmMenu"), B = C("FmChip"), W = C("FmDateRangePicker"), ge = C("FmTable"), se = C("FmSideSheet");
|
|
1009
|
+
return y(), M(ee, null, [p(Nt, {
|
|
1010
|
+
heading: n(o)("auditLog.title")
|
|
998
1011
|
}, {
|
|
999
1012
|
"append-heading": K(() => [p(u), p(g, {
|
|
1000
1013
|
variant: "primary",
|
|
1001
1014
|
"prepend-icon": "upload",
|
|
1002
|
-
label: n(
|
|
1003
|
-
disabled: w.value.length === 0 ||
|
|
1004
|
-
loading:
|
|
1005
|
-
onClick:
|
|
1006
|
-
}, null, 8, ["label", "disabled", "loading"]), p(
|
|
1015
|
+
label: n(o)("auditLog.export"),
|
|
1016
|
+
disabled: w.value.length === 0 || I.value || n(L).isLoading || n(L).members.length === 0,
|
|
1017
|
+
loading: I.value,
|
|
1018
|
+
onClick: bt
|
|
1019
|
+
}, null, 8, ["label", "disabled", "loading"]), p(F, {
|
|
1007
1020
|
"close-on-click": !1,
|
|
1008
1021
|
"z-index": 50
|
|
1009
1022
|
}, {
|
|
1010
1023
|
"menu-button": K(() => [p(g, {
|
|
1011
1024
|
variant: "tertiary",
|
|
1012
1025
|
icon: "settings",
|
|
1013
|
-
"aria-label": n(
|
|
1014
|
-
disabled:
|
|
1026
|
+
"aria-label": n(o)("auditLog.exportSettings.title"),
|
|
1027
|
+
disabled: I.value
|
|
1015
1028
|
}, null, 8, ["aria-label", "disabled"])]),
|
|
1016
|
-
default: K(() => [a("div",
|
|
1029
|
+
default: K(() => [a("div", Xt, [a("p", Qt, i(n(o)("auditLog.exportSettings.title")), 1), (y(), M(ee, null, re(Se, (b) => p(r, {
|
|
1017
1030
|
key: b.key,
|
|
1018
|
-
label: n(
|
|
1031
|
+
label: n(o)(b.labelKey),
|
|
1019
1032
|
"has-checkbox": "",
|
|
1020
1033
|
"model-value": G.value.has(b.key),
|
|
1021
1034
|
disabled: G.value.has(b.key) && G.value.size === 1,
|
|
1022
|
-
onClick: (X) =>
|
|
1035
|
+
onClick: (X) => gt(b.key)
|
|
1023
1036
|
}, null, 8, ["label", "model-value", "disabled", "onClick"])), 64))])]),
|
|
1024
1037
|
_: 1
|
|
1025
1038
|
})]),
|
|
1026
|
-
default: K(() => [a("div",
|
|
1039
|
+
default: K(() => [a("div", Zt, [a("div", el, [p(Jt, {
|
|
1027
1040
|
modelValue: T.value,
|
|
1028
1041
|
"onUpdate:modelValue": t[0] || (t[0] = (b) => T.value = b),
|
|
1029
|
-
items:
|
|
1030
|
-
}, null, 8, ["modelValue", "items"]), a("div",
|
|
1042
|
+
items: De.value
|
|
1043
|
+
}, null, 8, ["modelValue", "items"]), a("div", tl, [p(W, {
|
|
1031
1044
|
modelValue: m.value,
|
|
1032
1045
|
"onUpdate:modelValue": t[1] || (t[1] = (b) => m.value = b),
|
|
1033
1046
|
"show-predefined-range": "",
|
|
1034
1047
|
"show-time": "",
|
|
1035
|
-
"predefined-range":
|
|
1048
|
+
"predefined-range": it.value
|
|
1036
1049
|
}, {
|
|
1037
1050
|
"trigger-button": K(() => [p(B, {
|
|
1038
|
-
label:
|
|
1051
|
+
label: ut.value,
|
|
1039
1052
|
icon: "calendar_month"
|
|
1040
1053
|
}, null, 8, ["label"])]),
|
|
1041
1054
|
_: 1
|
|
1042
|
-
}, 8, ["modelValue", "predefined-range"]), a("div",
|
|
1055
|
+
}, 8, ["modelValue", "predefined-range"]), a("div", ll, [p(be, {
|
|
1043
1056
|
modelValue: _.value,
|
|
1044
1057
|
"onUpdate:modelValue": t[2] || (t[2] = (b) => _.value = b),
|
|
1045
|
-
items:
|
|
1058
|
+
items: Ze.value,
|
|
1046
1059
|
multiple: "",
|
|
1047
1060
|
variant: "dark",
|
|
1048
|
-
placeholder: n(
|
|
1049
|
-
"selected-prefix": n(
|
|
1061
|
+
placeholder: n(o)("auditLog.filter.user_placeholder"),
|
|
1062
|
+
"selected-prefix": n(o)("auditLog.filter.selected_user_prefix"),
|
|
1050
1063
|
"chip-icon": "account_circle"
|
|
1051
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div",
|
|
1064
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div", ol, [p(be, {
|
|
1052
1065
|
modelValue: k.value,
|
|
1053
1066
|
"onUpdate:modelValue": t[3] || (t[3] = (b) => k.value = b),
|
|
1054
|
-
items:
|
|
1055
|
-
"filter-fn":
|
|
1067
|
+
items: et.value,
|
|
1068
|
+
"filter-fn": tt,
|
|
1056
1069
|
multiple: "",
|
|
1057
1070
|
variant: "dark",
|
|
1058
|
-
placeholder: n(
|
|
1059
|
-
"selected-prefix": n(
|
|
1071
|
+
placeholder: n(o)("auditLog.filter.subject_placeholder"),
|
|
1072
|
+
"selected-prefix": n(o)("auditLog.filter.selected_subject_prefix"),
|
|
1060
1073
|
"chip-icon": "badge"
|
|
1061
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div",
|
|
1074
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div", al, [p(be, {
|
|
1062
1075
|
modelValue: O.value,
|
|
1063
1076
|
"onUpdate:modelValue": t[4] || (t[4] = (b) => O.value = b),
|
|
1064
|
-
items:
|
|
1077
|
+
items: lt.value,
|
|
1065
1078
|
multiple: "",
|
|
1066
1079
|
variant: "dark",
|
|
1067
|
-
placeholder: n(
|
|
1068
|
-
"selected-prefix": n(
|
|
1080
|
+
placeholder: n(o)("auditLog.filter.action_placeholder"),
|
|
1081
|
+
"selected-prefix": n(o)("auditLog.filter.selected_action_prefix"),
|
|
1069
1082
|
searchable: !1
|
|
1070
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div",
|
|
1083
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div", sl, [p(be, {
|
|
1071
1084
|
modelValue: S.value,
|
|
1072
1085
|
"onUpdate:modelValue": t[5] || (t[5] = (b) => S.value = b),
|
|
1073
|
-
items:
|
|
1086
|
+
items: ot.value,
|
|
1074
1087
|
multiple: "",
|
|
1075
1088
|
variant: "dark",
|
|
1076
|
-
placeholder: n(
|
|
1077
|
-
"selected-prefix": n(
|
|
1089
|
+
placeholder: n(o)("auditLog.filter.status_placeholder"),
|
|
1090
|
+
"selected-prefix": n(o)("auditLog.filter.selected_status_prefix"),
|
|
1078
1091
|
searchable: !1,
|
|
1079
1092
|
"chip-icon": "check_circle"
|
|
1080
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])])]), !j.value && w.value.length === 0 ? (
|
|
1093
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])])]), !j.value && w.value.length === 0 ? (y(), Z(n(Yt), {
|
|
1081
1094
|
key: 0,
|
|
1082
|
-
title: n(
|
|
1083
|
-
subtitle: n(
|
|
1084
|
-
}, null, 8, ["title", "subtitle"])) : (
|
|
1095
|
+
title: n(o)("auditLog.noData.title"),
|
|
1096
|
+
subtitle: n(o)("auditLog.noData.subtitle")
|
|
1097
|
+
}, null, 8, ["title", "subtitle"])) : (y(), Z(Ut, {
|
|
1085
1098
|
key: 1
|
|
1086
1099
|
}, {
|
|
1087
|
-
default: K(() => [(
|
|
1088
|
-
key:
|
|
1089
|
-
"column-defs":
|
|
1100
|
+
default: K(() => [(y(), Z(ge, {
|
|
1101
|
+
key: Ne.value,
|
|
1102
|
+
"column-defs": pt,
|
|
1090
1103
|
"row-data": w.value,
|
|
1091
1104
|
"page-size": ie,
|
|
1092
1105
|
"page-count": te.value,
|
|
1093
1106
|
"row-count": J.value,
|
|
1094
|
-
"fetch-fn":
|
|
1107
|
+
"fetch-fn": yt,
|
|
1095
1108
|
"hide-footer": te.value <= 1,
|
|
1096
1109
|
loading: j.value,
|
|
1097
1110
|
"pin-header-row": "",
|
|
1098
1111
|
class: "audit-log-list-table min-h-0 flex-1 cursor-pointer",
|
|
1099
|
-
onRowClick: t[6] || (t[6] = (b) =>
|
|
1112
|
+
onRowClick: t[6] || (t[6] = (b) => _t(b.original))
|
|
1100
1113
|
}, null, 8, ["row-data", "page-count", "row-count", "hide-footer", "loading"]))]),
|
|
1101
1114
|
_: 1
|
|
1102
1115
|
}))])]),
|
|
1103
1116
|
_: 1
|
|
1104
1117
|
}, 8, ["heading"]), p(se, {
|
|
1105
|
-
header: n(
|
|
1118
|
+
header: n(o)("auditLog.detail.header"),
|
|
1106
1119
|
"model-value": D.value,
|
|
1107
1120
|
"max-width": 480,
|
|
1108
1121
|
"dismiss-away": "",
|
|
1109
1122
|
"onUpdate:modelValue": t[7] || (t[7] = (b) => {
|
|
1110
|
-
b ||
|
|
1123
|
+
b || xt();
|
|
1111
1124
|
})
|
|
1112
1125
|
}, {
|
|
1113
|
-
default: K(() => [s.value ? (
|
|
1114
|
-
variant:
|
|
1115
|
-
label:
|
|
1126
|
+
default: K(() => [s.value ? (y(), M("div", nl, [a("div", ul, [a("div", il, [a("p", rl, i(ct(s.value)), 1)]), p(B, {
|
|
1127
|
+
variant: Ce(s.value.outcome),
|
|
1128
|
+
label: Le(s.value.outcome),
|
|
1116
1129
|
compact: ""
|
|
1117
|
-
}, null, 8, ["variant", "label"])]), a("div",
|
|
1130
|
+
}, null, 8, ["variant", "label"])]), a("div", dl, [a("div", cl, [a("div", null, [a("p", ml, i(n(o)("auditLog.detail.date")), 1), a("p", fl, i(dt(s.value.timestamp)), 1)]), a("div", null, [a("p", vl, i(n(o)("auditLog.detail.user")), 1), a("p", gl, i(ve(s.value)), 1)]), a("div", null, [a("p", bl, i(n(o)("auditLog.detail.email")), 1), a("p", pl, i(rt(s.value)), 1)]), s.value.field ? (y(), M("div", hl, [a("p", yl, i(n(o)("auditLog.detail.field")), 1), a("p", _l, i(s.value.field), 1)])) : N("", !0), a("div", null, [a("p", xl, i(n(o)("auditLog.detail.business")), 1), a("p", Ll, i(s.value.businessId || "-"), 1)]), a("div", null, [a("p", Sl, i(n(o)("auditLog.detail.restaurant")), 1), a("p", wl, i(s.value.restaurantId || "-"), 1)])])]), a("div", kl, [a("div", Il, [a("p", Al, i(n(o)("auditLog.detail.eventDetails")), 1)]), t[8] || (t[8] = a("hr", {
|
|
1118
1131
|
class: "border-fm-color-border-default"
|
|
1119
|
-
}, null, -1)), a("div",
|
|
1132
|
+
}, null, -1)), a("div", Fl, [a("div", null, [a("p", Ml, i(n(o)("auditLog.detail.actionDescription")), 1), a("p", Dl, i(s.value.metadata.operationLabel || "-"), 1)])])]), a("div", Ol, [a("div", Tl, [a("p", jl, i(n(o)("auditLog.detail.metadata")), 1)]), t[9] || (t[9] = a("hr", {
|
|
1120
1133
|
class: "border-fm-color-border-default"
|
|
1121
|
-
}, null, -1)), a("div",
|
|
1134
|
+
}, null, -1)), a("div", Pl, [a("div", null, [a("p", Vl, i(n(o)("auditLog.detail.resolvedFrom")), 1), a("p", El, i(mt(s.value.metadata.resolvedFrom)), 1)]), (s.value.metadata.resolvedFrom === "permissionSet" || s.value.metadata.resolvedFrom === "systemPermissionSet") && (s.value.metadata.permissionSetName || s.value.metadata.permissionSetId) ? (y(), M("div", Rl, [a("p", Cl, i(n(o)("auditLog.detail.permissionSet")), 1), s.value.metadata.permissionSetName ? (y(), M("p", Ul, i(s.value.metadata.permissionSetName), 1)) : N("", !0), s.value.metadata.permissionSetId ? (y(), M("p", $l, i(s.value.metadata.permissionSetId), 1)) : N("", !0)])) : N("", !0), s.value.metadata.reason ? (y(), M("div", Nl, [a("p", Yl, i(n(o)("auditLog.detail.reason")), 1), a("p", Bl, i(s.value.metadata.reason), 1)])) : N("", !0), a("div", null, [a("p", Kl, i(n(o)("auditLog.detail.requestMethod")), 1), a("p", zl, i(ft(s.value)), 1)]), a("div", null, [a("p", ql, i(n(o)("auditLog.detail.requestPath")), 1), a("p", Hl, i(s.value.metadata.requestPath || "-"), 1)]), s.value.metadata.trace && s.value.metadata.trace.length > 0 ? (y(), M("div", Wl, [a("p", Jl, i(n(o)("auditLog.detail.permissionTrace")), 1), a("ol", Gl, [(y(!0), M(ee, null, re(s.value.metadata.trace, (b, X) => (y(), M("li", {
|
|
1122
1135
|
key: X,
|
|
1123
1136
|
class: "flex items-center gap-6"
|
|
1124
|
-
}, [a("span",
|
|
1137
|
+
}, [a("span", Xl, i(X + 1), 1), a("span", Ql, i(b), 1), X < s.value.metadata.trace.length - 1 ? (y(), M("span", Zl, "→")) : N("", !0)]))), 128))])])) : N("", !0), v.value ? (y(), M("div", eo, [a("p", to, i(n(o)("auditLog.detail.requestBody")), 1), a("pre", lo, i(v.value), 1)])) : N("", !0)])])])) : N("", !0)]),
|
|
1125
1138
|
_: 1
|
|
1126
1139
|
}, 8, ["header", "model-value"])], 64);
|
|
1127
1140
|
};
|
|
1128
1141
|
}
|
|
1129
|
-
}),
|
|
1142
|
+
}), _o = /* @__PURE__ */ $t(so, [["__scopeId", "data-v-a0d27858"]]);
|
|
1130
1143
|
export {
|
|
1131
|
-
|
|
1144
|
+
_o as default
|
|
1132
1145
|
};
|