@feedmepos/mf-hrm-portal 2.1.1-dev.5 → 2.1.1-dev.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ApprovalCodeList-CQApO-t4.js +728 -0
- package/dist/{AuditLogList-CXUkbDyT.js → AuditLogList-DH2ZvAVE.js} +244 -240
- package/dist/ConditionFormHost.vue_vue_type_script_setup_true_lang-B5OgqCR0.js +387 -0
- package/dist/EmployeeList-B1Q4RH2r.js +883 -0
- package/dist/{GrantUserList-DKP4MBQM.js → GrantUserList-DURXYzRs.js} +140 -137
- package/dist/{Main-CyCfz4ka.js → Main-B06aoNy1.js} +1033 -1029
- package/dist/{Main-Cz1pfe2k.js → Main-BC7IPhbz.js} +7 -7
- package/dist/Main-BRrcfqXc.js +121 -0
- package/dist/PermissionSetList-CiVFvnlW.js +393 -0
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BAmLIGEn.js +4122 -0
- package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_a439fdd8_lang-BJp9hEfv.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DVVSBIx2.js} +1 -0
- package/dist/ResponsiveFabButton.vue_vue_type_script_setup_true_lang-QrqYEy8i.js +42 -0
- package/dist/RoleList-BVFWURdS.js +685 -0
- package/dist/TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js +37 -0
- package/dist/TeamMemberList-DlurP2WR.js +1215 -0
- package/dist/{TimesheetList-s_bP5OGA.js → TimesheetList-C4G2Va4m.js} +118 -112
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_91afda4e_lang-BCLv-2Re.js → TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-BJujYg6e.js} +2 -2
- package/dist/{app-BP0oihBR.js → app-CGL_lSgW.js} +5073 -2360
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-BTSZLci9.js → dayjs.min-BXDtus8O.js} +1 -1
- package/dist/{employee-BPv1j6T4.js → employee-CVZUQI_y.js} +3 -3
- package/dist/{iteration-BNA1cEos.js → iteration-BXcl549C.js} +1 -1
- package/dist/{lodash-DKG9IyB-.js → lodash-CmrNrQXn.js} +1 -1
- package/dist/{role-BS3LFO8u.js → role-Ct8MPQeS.js} +1 -1
- package/dist/rule-M8SC_Jhl.js +1058 -0
- package/dist/src/components/CheckboxInput.vue.d.ts +1 -1
- package/dist/src/components/button/ResponsiveFabButton.vue.d.ts +7 -1
- package/dist/src/components/table/TableEmptyState.vue.d.ts +7 -15
- package/dist/src/composables/useBasePermission.d.ts +2 -1
- package/dist/src/composables/useConditionDraft.d.ts +40 -0
- package/dist/src/composables/useCoverConditionOverride.d.ts +61 -0
- package/dist/src/helpers/business-timezone.d.ts +22 -0
- package/dist/src/helpers/filter.d.ts +15 -0
- package/dist/src/helpers/permission-reconcile.d.ts +15 -0
- package/dist/src/helpers/permission-reconcile.test.d.ts +1 -0
- package/dist/src/helpers/permission-set.d.ts +8 -4
- package/dist/src/helpers/rule.d.ts +2 -1
- package/dist/src/stores/permission-set.d.ts +12 -3
- package/dist/src/types/approval-code.d.ts +29 -48
- package/dist/src/views/hr/employee/EmployeeList.vue.d.ts +1 -0
- package/dist/src/views/team/components/BasePermission.vue.d.ts +13 -0
- package/dist/src/views/team/condition-builders/ConditionFormHost.vue.d.ts +22 -0
- package/dist/src/views/team/condition-builders/ConditionFormRenderer.vue.d.ts +23 -0
- package/dist/src/views/team/condition-builders/component-map.d.ts +4 -0
- package/dist/src/views/team/condition-builders/condition-form-dedupe.d.ts +23 -0
- package/dist/src/views/team/locales/index.d.ts +80 -0
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useReportPermissions-J3-DjopO.js → useReportPermissions-COONOIe1.js} +3 -3
- package/package.json +2 -2
- package/dist/ApprovalCodeList-CXJyMKEg.js +0 -757
- package/dist/CollapsibleWrapper.vue_vue_type_script_setup_true_lang-BLJlmPVa.js +0 -58
- package/dist/EmployeeList-BSfUFTcN.js +0 -899
- package/dist/Main-CblWfQk_.js +0 -122
- package/dist/PermissionSetList-BwyblSeE.js +0 -357
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BJ-PZ2Nv.js +0 -3458
- package/dist/ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js +0 -38
- package/dist/RoleList-CXYgCmHp.js +0 -567
- package/dist/TeamMemberList-CnLbqaPS.js +0 -1131
- package/dist/rule-DaSLVZWm.js +0 -996
|
@@ -1,15 +1,15 @@
|
|
|
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
|
|
2
|
-
import { d as x } from "./dayjs.min-
|
|
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 he, createCommentVNode as N, createElementVNode as a, Fragment as Z, renderList as ie, withCtx as Y, createVNode as b, toDisplayString as u, unref as i, nextTick as Rt } from "vue";
|
|
2
|
+
import { d as x } from "./dayjs.min-BXDtus8O.js";
|
|
3
3
|
import { useI18n as Qe, useCoreStore as Ct } from "@feedmepos/mf-common";
|
|
4
|
-
import { G as He, _ as Ut } from "./app-
|
|
4
|
+
import { G as He, _ as Ut } from "./app-CGL_lSgW.js";
|
|
5
5
|
import { components as We } from "@feedmepos/ui-library";
|
|
6
6
|
import { g as Ae, b as Fe } from "./restaurant-YOVMuuFY.js";
|
|
7
|
-
import { S as
|
|
7
|
+
import { S as ge, _ as $t } from "./SelectFilter-ATOm0hdn.js";
|
|
8
8
|
import { _ as Nt } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
|
|
9
|
-
import { _ as Yt } from "./
|
|
10
|
-
import { t as Bt, p as Je } from "./rule-
|
|
9
|
+
import { _ as Yt } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
|
|
10
|
+
import { t as Bt, p as Je } from "./rule-M8SC_Jhl.js";
|
|
11
11
|
import { defineStore as Kt } from "pinia";
|
|
12
|
-
const
|
|
12
|
+
const ne = [
|
|
13
13
|
{ key: "all", label: "All", subjectPrefixes: [] },
|
|
14
14
|
{ key: "inventory", label: "Inventory", subjectPrefixes: ["business::inventory", "inventory"] },
|
|
15
15
|
{ key: "report", label: "Report", subjectPrefixes: ["business::report", "report"] },
|
|
@@ -19,7 +19,7 @@ const ue = [
|
|
|
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
|
-
], Me = "/audit-logs",
|
|
22
|
+
], Me = "/audit-logs", be = {
|
|
23
23
|
async count(l) {
|
|
24
24
|
var L, j, I, w, s;
|
|
25
25
|
const o = {
|
|
@@ -39,7 +39,7 @@ const ue = [
|
|
|
39
39
|
const P = new URLSearchParams();
|
|
40
40
|
for (const [v, A] of Object.entries(D))
|
|
41
41
|
if (Array.isArray(A))
|
|
42
|
-
for (const
|
|
42
|
+
for (const B of A) P.append(v, String(B));
|
|
43
43
|
else A != null && P.append(v, String(A));
|
|
44
44
|
return P.toString();
|
|
45
45
|
}
|
|
@@ -103,14 +103,14 @@ const ue = [
|
|
|
103
103
|
setup(l, { emit: o }) {
|
|
104
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
105
|
let A = null;
|
|
106
|
-
async function
|
|
106
|
+
async function B() {
|
|
107
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 _e = 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;
|
|
@@ -122,25 +122,25 @@ const ue = [
|
|
|
122
122
|
O += _[d], T++;
|
|
123
123
|
return T;
|
|
124
124
|
}), J = h(() => {
|
|
125
|
-
const m =
|
|
125
|
+
const m = _e.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, le = T.slice(0, $ - 1).reduce((E, oe) => E + oe, 0);
|
|
132
|
+
for (; $ > 1 && le + H + d > v.value; )
|
|
133
|
+
$--, le = T.slice(0, $ - 1).reduce((E, oe) => E + oe, 0);
|
|
134
134
|
return [...c.items.slice(0, Math.max($ - 1, 0)), S];
|
|
135
|
-
}),
|
|
135
|
+
}), ee = h(() => {
|
|
136
136
|
const m = new Set(J.value.map((_) => _.value));
|
|
137
137
|
return c.items.filter((_) => !m.has(_.value));
|
|
138
138
|
});
|
|
139
|
-
function
|
|
139
|
+
function te(m) {
|
|
140
140
|
I.value = !1, L("update:modelValue", m);
|
|
141
141
|
}
|
|
142
142
|
return Vt(async () => {
|
|
143
|
-
await
|
|
143
|
+
await B(), w.value && (v.value = w.value.clientWidth, A = new ResizeObserver(() => {
|
|
144
144
|
w.value && (v.value = w.value.clientWidth);
|
|
145
145
|
}), A.observe(w.value));
|
|
146
146
|
}), Et(() => {
|
|
@@ -148,7 +148,7 @@ const ue = [
|
|
|
148
148
|
}), Q(
|
|
149
149
|
() => c.items,
|
|
150
150
|
() => {
|
|
151
|
-
|
|
151
|
+
B();
|
|
152
152
|
},
|
|
153
153
|
{ deep: !0 }
|
|
154
154
|
), (m, _) => {
|
|
@@ -158,35 +158,35 @@ const ue = [
|
|
|
158
158
|
ref: w,
|
|
159
159
|
class: "relative flex w-full flex-row items-center"
|
|
160
160
|
}, [
|
|
161
|
-
(y(!0), M(
|
|
161
|
+
(y(!0), M(Z, null, ie(J.value, (d) => (y(), he(k, {
|
|
162
162
|
key: d.value,
|
|
163
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": te
|
|
169
169
|
}, null, 8, ["model-value", "label", "badge", "disabled", "value"]))), 128)),
|
|
170
|
-
|
|
170
|
+
ee.value.length > 0 ? (y(), he(T, {
|
|
171
171
|
key: 0,
|
|
172
172
|
"show-menu": I.value,
|
|
173
173
|
class: "max-w-[360px] min-w-[90px] rounded-sm",
|
|
174
174
|
placement: "bottom-start",
|
|
175
175
|
onMenuChanged: _[0] || (_[0] = (d) => I.value = d)
|
|
176
176
|
}, {
|
|
177
|
-
"menu-button":
|
|
177
|
+
"menu-button": Y(() => [
|
|
178
178
|
a("div", zt, [
|
|
179
|
-
|
|
180
|
-
a("span", qt, i(
|
|
179
|
+
b(S, { name: "more_vert" }),
|
|
180
|
+
a("span", qt, u(i(j)("auditLog.modules.more")), 1)
|
|
181
181
|
])
|
|
182
182
|
]),
|
|
183
|
-
default:
|
|
184
|
-
(y(!0), M(
|
|
183
|
+
default: Y(() => [
|
|
184
|
+
(y(!0), M(Z, null, ie(ee.value, (d) => (y(), he(O, {
|
|
185
185
|
key: d.value,
|
|
186
186
|
"model-value": l.modelValue === d.value,
|
|
187
187
|
label: d.label,
|
|
188
188
|
disabled: d.disabled,
|
|
189
|
-
onClick: (H) =>
|
|
189
|
+
onClick: (H) => te(d.value)
|
|
190
190
|
}, null, 8, ["model-value", "label", "disabled", "onClick"]))), 128))
|
|
191
191
|
]),
|
|
192
192
|
_: 1
|
|
@@ -197,11 +197,11 @@ 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
|
-
(y(!0), M(
|
|
200
|
+
(y(!0), M(Z, null, ie(l.items, (d) => (y(), M("div", {
|
|
201
201
|
key: `measure-${d.value}`,
|
|
202
202
|
"data-tab-measure": ""
|
|
203
203
|
}, [
|
|
204
|
-
|
|
204
|
+
b(k, {
|
|
205
205
|
"model-value": l.modelValue,
|
|
206
206
|
label: d.label,
|
|
207
207
|
badge: d.badge,
|
|
@@ -210,8 +210,8 @@ const ue = [
|
|
|
210
210
|
}, null, 8, ["model-value", "label", "badge", "disabled", "value"])
|
|
211
211
|
]))), 128)),
|
|
212
212
|
a("div", Ht, [
|
|
213
|
-
|
|
214
|
-
a("span", Wt, i(
|
|
213
|
+
b(S, { name: "more_vert" }),
|
|
214
|
+
a("span", Wt, u(i(j)("auditLog.modules.more")), 1)
|
|
215
215
|
])
|
|
216
216
|
], 512)
|
|
217
217
|
], 512);
|
|
@@ -263,120 +263,122 @@ const ue = [
|
|
|
263
263
|
}, sl = {
|
|
264
264
|
class: "w-fit"
|
|
265
265
|
}, nl = {
|
|
266
|
+
class: "flex h-full flex-col overflow-auto"
|
|
267
|
+
}, ul = {
|
|
266
268
|
key: 0,
|
|
267
269
|
class: "space-y-12 p-4 text-sm"
|
|
268
|
-
}, ul = {
|
|
269
|
-
class: "flex items-start justify-between gap-8 rounded-lg border border-fm-color-border-default p-12"
|
|
270
270
|
}, il = {
|
|
271
|
-
class: "
|
|
271
|
+
class: "flex items-start justify-between gap-8 rounded-lg border border-fm-color-border-default p-12"
|
|
272
272
|
}, rl = {
|
|
273
|
-
class: "
|
|
273
|
+
class: "min-w-0 flex-1"
|
|
274
274
|
}, dl = {
|
|
275
|
-
class: "
|
|
275
|
+
class: "audit-log-operation-label-detail text-base font-bold leading-snug text-fm-color-typo-primary"
|
|
276
276
|
}, cl = {
|
|
277
|
-
class: "
|
|
277
|
+
class: "rounded-lg border border-fm-color-border-default p-12"
|
|
278
278
|
}, ml = {
|
|
279
|
-
class: "
|
|
279
|
+
class: "space-y-12"
|
|
280
280
|
}, fl = {
|
|
281
|
-
class: "font-semibold"
|
|
282
|
-
}, vl = {
|
|
283
281
|
class: "text-xs text-fm-color-typo-secondary"
|
|
284
|
-
},
|
|
282
|
+
}, vl = {
|
|
285
283
|
class: "font-semibold"
|
|
286
|
-
},
|
|
284
|
+
}, gl = {
|
|
287
285
|
class: "text-xs text-fm-color-typo-secondary"
|
|
286
|
+
}, bl = {
|
|
287
|
+
class: "font-semibold"
|
|
288
288
|
}, pl = {
|
|
289
|
-
class: "
|
|
289
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
290
290
|
}, hl = {
|
|
291
|
+
class: "break-all font-semibold"
|
|
292
|
+
}, _l = {
|
|
291
293
|
key: 0
|
|
292
294
|
}, yl = {
|
|
293
295
|
class: "text-xs text-fm-color-typo-secondary"
|
|
294
|
-
}, _l = {
|
|
295
|
-
class: "break-all font-mono text-xs font-semibold"
|
|
296
296
|
}, xl = {
|
|
297
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
298
|
-
}, Ll = {
|
|
299
297
|
class: "break-all font-mono text-xs font-semibold"
|
|
300
|
-
},
|
|
298
|
+
}, Ll = {
|
|
301
299
|
class: "text-xs text-fm-color-typo-secondary"
|
|
300
|
+
}, Sl = {
|
|
301
|
+
class: "break-all font-mono text-xs font-semibold"
|
|
302
302
|
}, wl = {
|
|
303
|
-
class: "
|
|
303
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
304
304
|
}, kl = {
|
|
305
|
-
class: "
|
|
305
|
+
class: "font-semibold"
|
|
306
306
|
}, Il = {
|
|
307
|
-
class: "
|
|
307
|
+
class: "rounded-lg border border-fm-color-border-default"
|
|
308
308
|
}, Al = {
|
|
309
|
-
class: "
|
|
309
|
+
class: "p-12"
|
|
310
310
|
}, Fl = {
|
|
311
|
-
class: "
|
|
311
|
+
class: "text-base font-bold text-fm-color-typo-primary"
|
|
312
312
|
}, Ml = {
|
|
313
|
-
class: "
|
|
313
|
+
class: "space-y-12 p-12"
|
|
314
314
|
}, Dl = {
|
|
315
|
-
class: "
|
|
315
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
316
316
|
}, Ol = {
|
|
317
|
-
class: "
|
|
317
|
+
class: "font-semibold"
|
|
318
318
|
}, Tl = {
|
|
319
|
-
class: "
|
|
319
|
+
class: "rounded-lg border border-fm-color-border-default"
|
|
320
320
|
}, jl = {
|
|
321
|
-
class: "
|
|
321
|
+
class: "p-12"
|
|
322
322
|
}, Pl = {
|
|
323
|
-
class: "
|
|
323
|
+
class: "text-base font-bold text-fm-color-typo-primary"
|
|
324
324
|
}, Vl = {
|
|
325
|
-
class: "
|
|
325
|
+
class: "space-y-12 p-12"
|
|
326
326
|
}, El = {
|
|
327
|
-
class: "
|
|
327
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
328
328
|
}, Rl = {
|
|
329
|
-
|
|
329
|
+
class: "font-semibold"
|
|
330
330
|
}, Cl = {
|
|
331
|
-
|
|
331
|
+
key: 0
|
|
332
332
|
}, Ul = {
|
|
333
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
334
|
+
}, $l = {
|
|
333
335
|
key: 0,
|
|
334
336
|
class: "font-semibold"
|
|
335
|
-
},
|
|
337
|
+
}, Nl = {
|
|
336
338
|
key: 1,
|
|
337
339
|
class: "break-all font-mono text-xs text-fm-color-typo-secondary"
|
|
338
|
-
}, Nl = {
|
|
339
|
-
key: 1
|
|
340
340
|
}, Yl = {
|
|
341
|
-
|
|
341
|
+
key: 1
|
|
342
342
|
}, Bl = {
|
|
343
|
-
class: "font-semibold whitespace-pre-line"
|
|
344
|
-
}, Kl = {
|
|
345
343
|
class: "text-xs text-fm-color-typo-secondary"
|
|
344
|
+
}, Kl = {
|
|
345
|
+
class: "font-semibold whitespace-pre-line"
|
|
346
346
|
}, zl = {
|
|
347
|
-
class: "font-semibold"
|
|
348
|
-
}, ql = {
|
|
349
347
|
class: "text-xs text-fm-color-typo-secondary"
|
|
348
|
+
}, ql = {
|
|
349
|
+
class: "font-semibold"
|
|
350
350
|
}, Hl = {
|
|
351
|
-
class: "
|
|
351
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
352
352
|
}, Wl = {
|
|
353
|
-
|
|
353
|
+
class: "break-all font-mono text-xs font-semibold"
|
|
354
354
|
}, Jl = {
|
|
355
|
-
|
|
355
|
+
key: 2
|
|
356
356
|
}, Gl = {
|
|
357
|
-
class: "
|
|
357
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
358
358
|
}, Xl = {
|
|
359
|
-
class: "
|
|
359
|
+
class: "mt-4 space-y-4"
|
|
360
360
|
}, Ql = {
|
|
361
|
-
class: "text-xs font-
|
|
361
|
+
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"
|
|
362
362
|
}, Zl = {
|
|
363
|
+
class: "text-xs font-semibold"
|
|
364
|
+
}, eo = {
|
|
363
365
|
key: 0,
|
|
364
366
|
class: "text-fm-color-typo-secondary"
|
|
365
|
-
}, eo = {
|
|
366
|
-
key: 3
|
|
367
367
|
}, to = {
|
|
368
|
-
|
|
368
|
+
key: 3
|
|
369
369
|
}, lo = {
|
|
370
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
371
|
+
}, oo = {
|
|
370
372
|
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
|
-
},
|
|
373
|
+
}, ue = 100, De = 1e3, pe = "__feedmeAdmin__", ao = "D MMM YYYY h:mm A", so = "YYYY-MM-DD HH:mm", V = "YYYY-MM-DD", Ge = "audit-log-export-fields", no = /* @__PURE__ */ Xe({
|
|
372
374
|
__name: "AuditLogList",
|
|
373
375
|
setup(l) {
|
|
374
376
|
const {
|
|
375
377
|
t: o
|
|
376
378
|
} = Qe(), c = Ct(), L = Gt(), j = f(!1), I = f(!1), w = f([]), s = f(null), D = f(!1);
|
|
377
379
|
async function P(e) {
|
|
378
|
-
const t = Uint8Array.from(atob(e), (r) => r.charCodeAt(0)),
|
|
379
|
-
return await g.write(t), await g.close(), new Response(
|
|
380
|
+
const t = Uint8Array.from(atob(e), (r) => r.charCodeAt(0)), n = new DecompressionStream("gzip"), g = n.writable.getWriter();
|
|
381
|
+
return await g.write(t), await g.close(), new Response(n.readable).text();
|
|
380
382
|
}
|
|
381
383
|
const v = f("");
|
|
382
384
|
let A = 0;
|
|
@@ -395,9 +397,9 @@ const ue = [
|
|
|
395
397
|
}
|
|
396
398
|
if (e.startsWith("gzip:")) {
|
|
397
399
|
try {
|
|
398
|
-
const
|
|
400
|
+
const n = await P(e.slice(5));
|
|
399
401
|
if (t !== A) return;
|
|
400
|
-
v.value = JSON.stringify(JSON.parse(
|
|
402
|
+
v.value = JSON.stringify(JSON.parse(n), null, 2);
|
|
401
403
|
} catch {
|
|
402
404
|
if (t !== A) return;
|
|
403
405
|
v.value = e;
|
|
@@ -412,41 +414,41 @@ const ue = [
|
|
|
412
414
|
}, {
|
|
413
415
|
immediate: !0
|
|
414
416
|
});
|
|
415
|
-
const
|
|
416
|
-
startDate: `${
|
|
417
|
-
endDate: `${
|
|
417
|
+
const B = f(1), _e = f(!1), J = f(0), ee = h(() => Math.max(1, Math.ceil(J.value / ue))), te = x().format("YYYY-MM-DD"), m = f({
|
|
418
|
+
startDate: `${te} 00:00`,
|
|
419
|
+
endDate: `${te} 23:59`
|
|
418
420
|
}), _ = f(), k = f(), S = f(), O = f(), T = f("all");
|
|
419
421
|
function d(e) {
|
|
420
422
|
return typeof e == "string" ? [e] : Array.isArray(e) ? e.filter((t) => typeof t == "string") : [];
|
|
421
423
|
}
|
|
422
|
-
const H =
|
|
424
|
+
const H = ne.filter((e) => e.key !== "all").map((e) => e.key);
|
|
423
425
|
function $(e) {
|
|
424
|
-
const t =
|
|
426
|
+
const t = ne.find((n) => n.key !== "all" && n.subjectPrefixes.some((g) => e.startsWith(g)));
|
|
425
427
|
return (t == null ? void 0 : t.key) ?? "other";
|
|
426
428
|
}
|
|
427
|
-
function
|
|
429
|
+
function le(e) {
|
|
428
430
|
const t = H.indexOf(e);
|
|
429
431
|
return t === -1 ? H.length : t;
|
|
430
432
|
}
|
|
431
|
-
const Oe = h(() =>
|
|
433
|
+
const Oe = h(() => ne.map(({
|
|
432
434
|
key: e
|
|
433
435
|
}) => ({
|
|
434
436
|
label: o(`auditLog.modules.${e}`),
|
|
435
437
|
value: e
|
|
436
|
-
}))), E = h(() =>
|
|
438
|
+
}))), E = h(() => ne.find((e) => e.key === T.value) ?? ne[0]), oe = h(() => T.value === "all"), re = f([]), de = f(!1), Ze = h(() => [...de.value ? [{
|
|
437
439
|
label: o("auditLog.user.feedmeAdmin"),
|
|
438
|
-
value:
|
|
440
|
+
value: pe
|
|
439
441
|
}] : [], ...L.members.map((e) => ({
|
|
440
442
|
label: e.name,
|
|
441
443
|
value: e.doc.userId
|
|
442
|
-
})), ...
|
|
444
|
+
})), ...re.value.map((e) => ({
|
|
443
445
|
label: `${e.name} (${o("auditLog.user.feedmeAdmin")})`,
|
|
444
446
|
value: e.userId
|
|
445
|
-
}))]),
|
|
447
|
+
}))]), K = h(() => {
|
|
446
448
|
const e = _.value ?? [];
|
|
447
449
|
return {
|
|
448
|
-
userIds: e.filter((t) => t !==
|
|
449
|
-
feedmeAdminActors: e.includes(
|
|
450
|
+
userIds: e.filter((t) => t !== pe),
|
|
451
|
+
feedmeAdminActors: e.includes(pe)
|
|
450
452
|
};
|
|
451
453
|
}), Te = h(() => {
|
|
452
454
|
const e = Je.flatMap((r) => d(r.subject).map((F) => ({
|
|
@@ -455,21 +457,21 @@ const ue = [
|
|
|
455
457
|
}))), t = Object.entries(He).map(([r, F]) => ({
|
|
456
458
|
label: F,
|
|
457
459
|
value: r
|
|
458
|
-
})),
|
|
460
|
+
})), n = /* @__PURE__ */ new Set(), g = [];
|
|
459
461
|
for (const r of [...e, ...t])
|
|
460
|
-
if (!
|
|
461
|
-
|
|
462
|
+
if (!n.has(r.value)) {
|
|
463
|
+
n.add(r.value);
|
|
462
464
|
const F = $(r.value);
|
|
463
465
|
g.push({
|
|
464
466
|
...r,
|
|
465
467
|
group: o(`auditLog.modules.${F}`)
|
|
466
468
|
});
|
|
467
469
|
}
|
|
468
|
-
return g.sort((r, F) =>
|
|
469
|
-
}), et = h(() =>
|
|
470
|
+
return g.sort((r, F) => le($(r.value)) - le($(F.value)));
|
|
471
|
+
}), et = h(() => oe.value ? Te.value : Te.value.filter((e) => $(e.value) === T.value));
|
|
470
472
|
function tt(e, t) {
|
|
471
|
-
const
|
|
472
|
-
return e.label.toLowerCase().includes(
|
|
473
|
+
const n = t.toLowerCase();
|
|
474
|
+
return e.label.toLowerCase().includes(n) || e.value.replace(/^business::/, "").toLowerCase().includes(n) ? !0 : e.value.toLowerCase().includes(n);
|
|
473
475
|
}
|
|
474
476
|
const U = h(() => ({
|
|
475
477
|
manage: o("auditLog.action.manage"),
|
|
@@ -492,28 +494,28 @@ const ue = [
|
|
|
492
494
|
}, {
|
|
493
495
|
label: U.value.delete,
|
|
494
496
|
value: "delete"
|
|
495
|
-
}]),
|
|
497
|
+
}]), ce = h(() => ({
|
|
496
498
|
allowed: o("auditLog.outcome.success"),
|
|
497
499
|
denied: o("auditLog.outcome.failed"),
|
|
498
500
|
skipped: o("auditLog.outcome.skipped")
|
|
499
|
-
})),
|
|
501
|
+
})), ye = h(() => {
|
|
500
502
|
var e;
|
|
501
503
|
return ((e = c.sessionUser.value) == null ? void 0 : e.isInternal) ?? !1;
|
|
502
504
|
});
|
|
503
505
|
function je(e) {
|
|
504
|
-
return !
|
|
506
|
+
return !ye.value && e === "skipped" ? "allowed" : e;
|
|
505
507
|
}
|
|
506
508
|
function xe(e) {
|
|
507
|
-
return !(e != null && e.length) ||
|
|
509
|
+
return !(e != null && e.length) || ye.value ? e : e.includes("allowed") ? [.../* @__PURE__ */ new Set([...e, "skipped"])] : e;
|
|
508
510
|
}
|
|
509
511
|
const ot = h(() => [{
|
|
510
|
-
label:
|
|
512
|
+
label: ce.value.allowed,
|
|
511
513
|
value: "allowed"
|
|
512
514
|
}, {
|
|
513
|
-
label:
|
|
515
|
+
label: ce.value.denied,
|
|
514
516
|
value: "denied"
|
|
515
|
-
}, ...
|
|
516
|
-
label:
|
|
517
|
+
}, ...ye.value ? [{
|
|
518
|
+
label: ce.value.skipped,
|
|
517
519
|
value: "skipped"
|
|
518
520
|
}] : []]), at = h(() => ({
|
|
519
521
|
admin: o("auditLog.detail.resolvedFromValue.admin"),
|
|
@@ -534,15 +536,15 @@ const ue = [
|
|
|
534
536
|
denied: "critical",
|
|
535
537
|
skipped: "warning"
|
|
536
538
|
};
|
|
537
|
-
function
|
|
538
|
-
return x(e).format(
|
|
539
|
+
function me(e) {
|
|
540
|
+
return x(e).format(ao);
|
|
539
541
|
}
|
|
540
542
|
const ut = h(() => {
|
|
541
543
|
const {
|
|
542
544
|
startDate: e,
|
|
543
545
|
endDate: t
|
|
544
546
|
} = m.value;
|
|
545
|
-
return e && t ? `${
|
|
547
|
+
return e && t ? `${me(e)} – ${me(t)}` : e ? me(e) : t ? me(t) : o("auditLog.dateRange.placeholder");
|
|
546
548
|
}), it = h(() => [{
|
|
547
549
|
label: o("date.predefinedRanges.today"),
|
|
548
550
|
value: {
|
|
@@ -588,12 +590,12 @@ const ue = [
|
|
|
588
590
|
}]);
|
|
589
591
|
function Le(e) {
|
|
590
592
|
var t;
|
|
591
|
-
return ((t = Je.find((
|
|
593
|
+
return ((t = Je.find((n) => n.subject === e)) == null ? void 0 : t.label) ?? He[e];
|
|
592
594
|
}
|
|
593
|
-
function
|
|
594
|
-
var
|
|
595
|
+
function fe(e) {
|
|
596
|
+
var n;
|
|
595
597
|
const t = L.userIdToName[e.userId];
|
|
596
|
-
return t || (L.hasLoaded ? (
|
|
598
|
+
return t || (L.hasLoaded ? (n = c.sessionUser.value) != null && n.isInternal ? `${e.actorName ?? e.userId} (${o("auditLog.user.feedmeAdmin")})` : o("auditLog.user.feedmeAdmin") : e.userId);
|
|
597
599
|
}
|
|
598
600
|
function Pe(e) {
|
|
599
601
|
return L.userIdToPhone[e.userId] || "-";
|
|
@@ -617,7 +619,7 @@ const ue = [
|
|
|
617
619
|
return Le(e.subject) ?? e.subject;
|
|
618
620
|
}
|
|
619
621
|
function Se(e) {
|
|
620
|
-
return
|
|
622
|
+
return ce.value[je(e)];
|
|
621
623
|
}
|
|
622
624
|
function Ce(e) {
|
|
623
625
|
return nt[je(e)] ?? "neutral";
|
|
@@ -640,7 +642,7 @@ const ue = [
|
|
|
640
642
|
}, {
|
|
641
643
|
key: "userName",
|
|
642
644
|
labelKey: "auditLog.exportFields.userName",
|
|
643
|
-
getValue: (e) =>
|
|
645
|
+
getValue: (e) => fe(e),
|
|
644
646
|
defaultSelected: !0
|
|
645
647
|
}, {
|
|
646
648
|
key: "userPhone",
|
|
@@ -733,22 +735,22 @@ const ue = [
|
|
|
733
735
|
}
|
|
734
736
|
}
|
|
735
737
|
async function bt() {
|
|
736
|
-
var e, t,
|
|
738
|
+
var e, t, n, g, r;
|
|
737
739
|
if (!I.value) {
|
|
738
740
|
I.value = !0;
|
|
739
741
|
try {
|
|
740
742
|
const {
|
|
741
743
|
startDate: F,
|
|
742
|
-
endDate:
|
|
743
|
-
} = m.value, W = E.value.subjectPrefixes,
|
|
744
|
+
endDate: z
|
|
745
|
+
} = m.value, W = E.value.subjectPrefixes, ve = (/* @__PURE__ */ new Date()).toISOString().slice(0, 19).replace("T", " "), ae = z ? q(z) : null, p = ae && ae < ve ? ae : ve, X = {
|
|
744
746
|
...F ? {
|
|
745
747
|
from: q(F)
|
|
746
748
|
} : {},
|
|
747
|
-
to:
|
|
748
|
-
...
|
|
749
|
-
userIds:
|
|
749
|
+
to: p,
|
|
750
|
+
...K.value.userIds.length ? {
|
|
751
|
+
userIds: K.value.userIds
|
|
750
752
|
} : {},
|
|
751
|
-
...
|
|
753
|
+
...K.value.feedmeAdminActors ? {
|
|
752
754
|
feedmeAdminActors: !0
|
|
753
755
|
} : {},
|
|
754
756
|
...(e = k.value) != null && e.length ? {
|
|
@@ -760,13 +762,13 @@ const ue = [
|
|
|
760
762
|
...(t = O.value) != null && t.length ? {
|
|
761
763
|
actions: O.value
|
|
762
764
|
} : {},
|
|
763
|
-
...(
|
|
765
|
+
...(n = S.value) != null && n.length ? {
|
|
764
766
|
outcomes: xe(S.value)
|
|
765
767
|
} : {}
|
|
766
768
|
}, Ye = [];
|
|
767
769
|
let Be = 0;
|
|
768
770
|
for (; ; ) {
|
|
769
|
-
const R = await
|
|
771
|
+
const R = await be.read({
|
|
770
772
|
...X,
|
|
771
773
|
limit: De,
|
|
772
774
|
offset: Be
|
|
@@ -774,11 +776,11 @@ const ue = [
|
|
|
774
776
|
if (Ye.push(...R), R.length < De) break;
|
|
775
777
|
Be += De;
|
|
776
778
|
}
|
|
777
|
-
const Ke = we.filter((R) => G.value.has(R.key)), wt = Ke.map((R) => o(R.labelKey)), kt = Ye.map((R) => Ke.map((Pt) => Pt.getValue(R) ?? "")), Ie = -(/* @__PURE__ */ new Date()).getTimezoneOffset(), It = Ie >= 0 ? "+" : "-", At = String(Math.floor(Math.abs(Ie) / 60)).padStart(2, "0"), Ft = String(Math.abs(Ie) % 60).padStart(2, "0"), Mt = `UTC${It}${At}:${Ft}`, ze = ((g = c.currentBusiness.value) == null ? void 0 : g.name) || "", Dt = [F,
|
|
779
|
+
const Ke = we.filter((R) => G.value.has(R.key)), wt = Ke.map((R) => o(R.labelKey)), kt = Ye.map((R) => Ke.map((Pt) => Pt.getValue(R) ?? "")), Ie = -(/* @__PURE__ */ new Date()).getTimezoneOffset(), It = Ie >= 0 ? "+" : "-", At = String(Math.floor(Math.abs(Ie) / 60)).padStart(2, "0"), Ft = String(Math.abs(Ie) % 60).padStart(2, "0"), Mt = `UTC${It}${At}:${Ft}`, ze = ((g = c.currentBusiness.value) == null ? void 0 : g.name) || "", Dt = [F, z].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
780
|
`), 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}`], {
|
|
779
781
|
type: "text/csv;charset=utf-8;"
|
|
780
|
-
}), qe = window.URL.createObjectURL(jt),
|
|
781
|
-
|
|
782
|
+
}), qe = window.URL.createObjectURL(jt), se = document.createElement("a");
|
|
783
|
+
se.href = qe, se.download = Tt, document.body.appendChild(se), se.click(), se.remove(), window.URL.revokeObjectURL(qe);
|
|
782
784
|
} finally {
|
|
783
785
|
I.value = !1;
|
|
784
786
|
}
|
|
@@ -797,17 +799,17 @@ const ue = [
|
|
|
797
799
|
size: 220,
|
|
798
800
|
cell(e) {
|
|
799
801
|
const t = e.row.original;
|
|
800
|
-
return
|
|
802
|
+
return b("div", {
|
|
801
803
|
class: "flex items-center gap-8"
|
|
802
|
-
}, [
|
|
803
|
-
name:
|
|
804
|
+
}, [b(We.FmAvatar, {
|
|
805
|
+
name: fe(t),
|
|
804
806
|
size: "sm",
|
|
805
807
|
class: "shrink-0"
|
|
806
|
-
}, null),
|
|
808
|
+
}, null), b("div", {
|
|
807
809
|
class: "min-w-0"
|
|
808
|
-
}, [
|
|
810
|
+
}, [b("p", {
|
|
809
811
|
class: "truncate font-semibold"
|
|
810
|
-
}, [
|
|
812
|
+
}, [fe(t)]), b("p", {
|
|
811
813
|
class: "truncate text-fm-color-typo-secondary"
|
|
812
814
|
}, [Pe(t)])])]);
|
|
813
815
|
}
|
|
@@ -835,7 +837,7 @@ const ue = [
|
|
|
835
837
|
enableSorting: !1,
|
|
836
838
|
cell(e) {
|
|
837
839
|
const t = e.row.original;
|
|
838
|
-
return
|
|
840
|
+
return b(We.FmChip, {
|
|
839
841
|
variant: Ce(t.outcome),
|
|
840
842
|
label: Se(t.outcome),
|
|
841
843
|
compact: !0
|
|
@@ -843,18 +845,18 @@ const ue = [
|
|
|
843
845
|
}
|
|
844
846
|
}];
|
|
845
847
|
function q(e) {
|
|
846
|
-
const t = x(e,
|
|
848
|
+
const t = x(e, so);
|
|
847
849
|
return new Date(t.year(), t.month(), t.date(), t.hour(), t.minute(), 0).toISOString().slice(0, 19).replace("T", " ");
|
|
848
850
|
}
|
|
849
851
|
async function $e() {
|
|
850
|
-
var e, t,
|
|
852
|
+
var e, t, n;
|
|
851
853
|
j.value = !0;
|
|
852
854
|
try {
|
|
853
855
|
const {
|
|
854
856
|
startDate: g,
|
|
855
857
|
endDate: r
|
|
856
|
-
} = m.value, F = (
|
|
857
|
-
limit:
|
|
858
|
+
} = m.value, F = (B.value - 1) * ue, z = E.value.subjectPrefixes, W = await be.read({
|
|
859
|
+
limit: ue,
|
|
858
860
|
offset: F,
|
|
859
861
|
...g ? {
|
|
860
862
|
from: q(g)
|
|
@@ -862,26 +864,26 @@ const ue = [
|
|
|
862
864
|
...r ? {
|
|
863
865
|
to: q(r)
|
|
864
866
|
} : {},
|
|
865
|
-
...
|
|
866
|
-
userIds:
|
|
867
|
+
...K.value.userIds.length ? {
|
|
868
|
+
userIds: K.value.userIds
|
|
867
869
|
} : {},
|
|
868
|
-
...
|
|
870
|
+
...K.value.feedmeAdminActors ? {
|
|
869
871
|
feedmeAdminActors: !0
|
|
870
872
|
} : {},
|
|
871
873
|
...(e = k.value) != null && e.length ? {
|
|
872
874
|
subjects: k.value
|
|
873
875
|
} : {},
|
|
874
|
-
...
|
|
875
|
-
subjectPrefixes: [...
|
|
876
|
+
...z.length ? {
|
|
877
|
+
subjectPrefixes: [...z]
|
|
876
878
|
} : {},
|
|
877
879
|
...(t = O.value) != null && t.length ? {
|
|
878
880
|
actions: O.value
|
|
879
881
|
} : {},
|
|
880
|
-
...(
|
|
882
|
+
...(n = S.value) != null && n.length ? {
|
|
881
883
|
outcomes: xe(S.value)
|
|
882
884
|
} : {}
|
|
883
885
|
});
|
|
884
|
-
w.value = W,
|
|
886
|
+
w.value = W, _e.value = W.length === ue;
|
|
885
887
|
} finally {
|
|
886
888
|
j.value = !1;
|
|
887
889
|
}
|
|
@@ -903,25 +905,25 @@ const ue = [
|
|
|
903
905
|
const {
|
|
904
906
|
startDate: e,
|
|
905
907
|
endDate: t
|
|
906
|
-
} = m.value,
|
|
907
|
-
J.value = await
|
|
908
|
+
} = m.value, n = E.value.subjectPrefixes;
|
|
909
|
+
J.value = await be.count({
|
|
908
910
|
...e ? {
|
|
909
911
|
from: q(e)
|
|
910
912
|
} : {},
|
|
911
913
|
...t ? {
|
|
912
914
|
to: q(t)
|
|
913
915
|
} : {},
|
|
914
|
-
...
|
|
915
|
-
userIds:
|
|
916
|
+
...K.value.userIds.length ? {
|
|
917
|
+
userIds: K.value.userIds
|
|
916
918
|
} : {},
|
|
917
|
-
...
|
|
919
|
+
...K.value.feedmeAdminActors ? {
|
|
918
920
|
feedmeAdminActors: !0
|
|
919
921
|
} : {},
|
|
920
922
|
...(g = k.value) != null && g.length ? {
|
|
921
923
|
subjects: k.value
|
|
922
924
|
} : {},
|
|
923
|
-
...
|
|
924
|
-
subjectPrefixes: [...
|
|
925
|
+
...n.length ? {
|
|
926
|
+
subjectPrefixes: [...n]
|
|
925
927
|
} : {},
|
|
926
928
|
...(r = O.value) != null && r.length ? {
|
|
927
929
|
actions: O.value
|
|
@@ -933,19 +935,19 @@ const ue = [
|
|
|
933
935
|
}
|
|
934
936
|
Q(Ne, async () => {
|
|
935
937
|
var e;
|
|
936
|
-
|
|
938
|
+
B.value = 1, (e = c.currentBusiness.value) != null && e._id && await Promise.all([ht(), $e()]);
|
|
937
939
|
}, {
|
|
938
940
|
immediate: !0
|
|
939
941
|
}), Q(T, () => {
|
|
940
942
|
k.value = void 0;
|
|
941
943
|
});
|
|
942
944
|
let ke = !1;
|
|
943
|
-
async function
|
|
945
|
+
async function _t({
|
|
944
946
|
pageIndex: e
|
|
945
947
|
}) {
|
|
946
948
|
var t;
|
|
947
|
-
if ((t = c.currentBusiness.value) != null && t._id && !(e === 0 &&
|
|
948
|
-
ke = !0,
|
|
949
|
+
if ((t = c.currentBusiness.value) != null && t._id && !(e === 0 && B.value === 1) && !ke) {
|
|
950
|
+
ke = !0, B.value = e + 1;
|
|
949
951
|
try {
|
|
950
952
|
await $e();
|
|
951
953
|
} finally {
|
|
@@ -953,7 +955,7 @@ const ue = [
|
|
|
953
955
|
}
|
|
954
956
|
}
|
|
955
957
|
}
|
|
956
|
-
function
|
|
958
|
+
function yt(e) {
|
|
957
959
|
s.value = e, D.value = !0;
|
|
958
960
|
}
|
|
959
961
|
function xt() {
|
|
@@ -967,12 +969,12 @@ const ue = [
|
|
|
967
969
|
function Lt() {
|
|
968
970
|
const e = _.value;
|
|
969
971
|
if (!(e != null && e.length)) return;
|
|
970
|
-
const t = new Set(
|
|
972
|
+
const t = new Set(re.value.map((r) => r.userId)), n = new Set(L.members.map((r) => r.doc.userId)), g = e.filter((r) => r === pe ? de.value : L.hasLoaded ? n.has(r) || t.has(r) : !0);
|
|
971
973
|
g.length !== e.length && (_.value = g.length ? g : void 0);
|
|
972
974
|
}
|
|
973
975
|
async function St() {
|
|
974
|
-
var
|
|
975
|
-
if (!((
|
|
976
|
+
var n;
|
|
977
|
+
if (!((n = c.currentBusiness.value) != null && n._id)) return;
|
|
976
978
|
const {
|
|
977
979
|
startDate: e,
|
|
978
980
|
endDate: t
|
|
@@ -981,7 +983,7 @@ const ue = [
|
|
|
981
983
|
const {
|
|
982
984
|
actors: g,
|
|
983
985
|
showFeedmeAdminFilter: r
|
|
984
|
-
} = await
|
|
986
|
+
} = await be.getFeedmeAdminFilter({
|
|
985
987
|
...e ? {
|
|
986
988
|
from: q(e)
|
|
987
989
|
} : {},
|
|
@@ -989,9 +991,9 @@ const ue = [
|
|
|
989
991
|
to: q(t)
|
|
990
992
|
} : {}
|
|
991
993
|
});
|
|
992
|
-
|
|
994
|
+
re.value = g, de.value = r;
|
|
993
995
|
} catch {
|
|
994
|
-
|
|
996
|
+
re.value = [], de.value = !1;
|
|
995
997
|
}
|
|
996
998
|
Lt();
|
|
997
999
|
}
|
|
@@ -1005,141 +1007,143 @@ const ue = [
|
|
|
1005
1007
|
immediate: !0,
|
|
1006
1008
|
deep: !0
|
|
1007
1009
|
}), (e, t) => {
|
|
1008
|
-
const
|
|
1009
|
-
return y(), M(
|
|
1010
|
-
heading:
|
|
1010
|
+
const n = C("FmSpacer"), g = C("FmButton"), r = C("FmMenuItem"), F = C("FmMenu"), z = C("FmChip"), W = C("FmDateRangePicker"), ve = C("FmTable"), ae = C("FmSideSheet");
|
|
1011
|
+
return y(), M(Z, null, [b(Nt, {
|
|
1012
|
+
heading: i(o)("auditLog.title")
|
|
1011
1013
|
}, {
|
|
1012
|
-
"append-heading":
|
|
1014
|
+
"append-heading": Y(() => [b(n), b(g, {
|
|
1013
1015
|
variant: "primary",
|
|
1014
1016
|
"prepend-icon": "upload",
|
|
1015
|
-
label:
|
|
1016
|
-
disabled: w.value.length === 0 || I.value ||
|
|
1017
|
+
label: i(o)("auditLog.export"),
|
|
1018
|
+
disabled: w.value.length === 0 || I.value || i(L).isLoading || i(L).members.length === 0,
|
|
1017
1019
|
loading: I.value,
|
|
1018
1020
|
onClick: bt
|
|
1019
|
-
}, null, 8, ["label", "disabled", "loading"]),
|
|
1021
|
+
}, null, 8, ["label", "disabled", "loading"]), b(F, {
|
|
1020
1022
|
"close-on-click": !1,
|
|
1021
1023
|
"z-index": 50
|
|
1022
1024
|
}, {
|
|
1023
|
-
"menu-button":
|
|
1025
|
+
"menu-button": Y(() => [b(g, {
|
|
1024
1026
|
variant: "tertiary",
|
|
1025
1027
|
icon: "settings",
|
|
1026
|
-
"aria-label":
|
|
1028
|
+
"aria-label": i(o)("auditLog.exportSettings.title"),
|
|
1027
1029
|
disabled: I.value
|
|
1028
1030
|
}, null, 8, ["aria-label", "disabled"])]),
|
|
1029
|
-
default:
|
|
1030
|
-
key:
|
|
1031
|
-
label:
|
|
1031
|
+
default: Y(() => [a("div", Xt, [a("p", Qt, u(i(o)("auditLog.exportSettings.title")), 1), (y(), M(Z, null, ie(we, (p) => b(r, {
|
|
1032
|
+
key: p.key,
|
|
1033
|
+
label: i(o)(p.labelKey),
|
|
1032
1034
|
"has-checkbox": "",
|
|
1033
|
-
"model-value": G.value.has(
|
|
1034
|
-
disabled: G.value.has(
|
|
1035
|
-
onClick: (X) => gt(
|
|
1035
|
+
"model-value": G.value.has(p.key),
|
|
1036
|
+
disabled: G.value.has(p.key) && G.value.size === 1,
|
|
1037
|
+
onClick: (X) => gt(p.key)
|
|
1036
1038
|
}, null, 8, ["label", "model-value", "disabled", "onClick"])), 64))])]),
|
|
1037
1039
|
_: 1
|
|
1038
1040
|
})]),
|
|
1039
|
-
default:
|
|
1041
|
+
default: Y(() => [a("div", Zt, [a("div", el, [b(Jt, {
|
|
1040
1042
|
modelValue: T.value,
|
|
1041
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
1043
|
+
"onUpdate:modelValue": t[0] || (t[0] = (p) => T.value = p),
|
|
1042
1044
|
items: Oe.value
|
|
1043
|
-
}, null, 8, ["modelValue", "items"]), a("div", tl, [
|
|
1045
|
+
}, null, 8, ["modelValue", "items"]), a("div", tl, [b(W, {
|
|
1044
1046
|
modelValue: m.value,
|
|
1045
|
-
"onUpdate:modelValue": t[1] || (t[1] = (
|
|
1047
|
+
"onUpdate:modelValue": t[1] || (t[1] = (p) => m.value = p),
|
|
1046
1048
|
"show-predefined-range": "",
|
|
1047
1049
|
"show-time": "",
|
|
1048
1050
|
"predefined-range": it.value
|
|
1049
1051
|
}, {
|
|
1050
|
-
"trigger-button":
|
|
1052
|
+
"trigger-button": Y(() => [b(z, {
|
|
1051
1053
|
label: ut.value,
|
|
1052
1054
|
icon: "calendar_month"
|
|
1053
1055
|
}, null, 8, ["label"])]),
|
|
1054
1056
|
_: 1
|
|
1055
|
-
}, 8, ["modelValue", "predefined-range"]), a("div", ll, [
|
|
1057
|
+
}, 8, ["modelValue", "predefined-range"]), a("div", ll, [b(ge, {
|
|
1056
1058
|
modelValue: _.value,
|
|
1057
|
-
"onUpdate:modelValue": t[2] || (t[2] = (
|
|
1059
|
+
"onUpdate:modelValue": t[2] || (t[2] = (p) => _.value = p),
|
|
1058
1060
|
items: Ze.value,
|
|
1059
1061
|
multiple: "",
|
|
1060
1062
|
variant: "dark",
|
|
1061
|
-
placeholder:
|
|
1062
|
-
"selected-prefix":
|
|
1063
|
+
placeholder: i(o)("auditLog.filter.user_placeholder"),
|
|
1064
|
+
"selected-prefix": i(o)("auditLog.filter.selected_user_prefix"),
|
|
1063
1065
|
"chip-icon": "account_circle"
|
|
1064
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div", ol, [
|
|
1066
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div", ol, [b(ge, {
|
|
1065
1067
|
modelValue: k.value,
|
|
1066
|
-
"onUpdate:modelValue": t[3] || (t[3] = (
|
|
1068
|
+
"onUpdate:modelValue": t[3] || (t[3] = (p) => k.value = p),
|
|
1067
1069
|
items: et.value,
|
|
1068
1070
|
"filter-fn": tt,
|
|
1069
1071
|
multiple: "",
|
|
1070
1072
|
variant: "dark",
|
|
1071
|
-
placeholder:
|
|
1072
|
-
"selected-prefix":
|
|
1073
|
+
placeholder: i(o)("auditLog.filter.subject_placeholder"),
|
|
1074
|
+
"selected-prefix": i(o)("auditLog.filter.selected_subject_prefix"),
|
|
1073
1075
|
"chip-icon": "badge"
|
|
1074
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div", al, [
|
|
1076
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div", al, [b(ge, {
|
|
1075
1077
|
modelValue: O.value,
|
|
1076
|
-
"onUpdate:modelValue": t[4] || (t[4] = (
|
|
1078
|
+
"onUpdate:modelValue": t[4] || (t[4] = (p) => O.value = p),
|
|
1077
1079
|
items: lt.value,
|
|
1078
1080
|
multiple: "",
|
|
1079
1081
|
variant: "dark",
|
|
1080
|
-
placeholder:
|
|
1081
|
-
"selected-prefix":
|
|
1082
|
+
placeholder: i(o)("auditLog.filter.action_placeholder"),
|
|
1083
|
+
"selected-prefix": i(o)("auditLog.filter.selected_action_prefix"),
|
|
1082
1084
|
searchable: !1
|
|
1083
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div", sl, [
|
|
1085
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div", sl, [b(ge, {
|
|
1084
1086
|
modelValue: S.value,
|
|
1085
|
-
"onUpdate:modelValue": t[5] || (t[5] = (
|
|
1087
|
+
"onUpdate:modelValue": t[5] || (t[5] = (p) => S.value = p),
|
|
1086
1088
|
items: ot.value,
|
|
1087
1089
|
multiple: "",
|
|
1088
1090
|
variant: "dark",
|
|
1089
|
-
placeholder:
|
|
1090
|
-
"selected-prefix":
|
|
1091
|
+
placeholder: i(o)("auditLog.filter.status_placeholder"),
|
|
1092
|
+
"selected-prefix": i(o)("auditLog.filter.selected_status_prefix"),
|
|
1091
1093
|
searchable: !1,
|
|
1092
1094
|
"chip-icon": "check_circle"
|
|
1093
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])])]),
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1095
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])])]), b(Ut, null, {
|
|
1096
|
+
default: Y(() => [a("div", nl, [b(Yt, {
|
|
1097
|
+
"is-loading": j.value,
|
|
1098
|
+
"is-empty": w.value.length === 0,
|
|
1099
|
+
title: i(o)("auditLog.noData.title"),
|
|
1100
|
+
subtitle: i(o)("auditLog.noData.subtitle")
|
|
1101
|
+
}, {
|
|
1102
|
+
default: Y(() => [(y(), he(ve, {
|
|
1103
|
+
key: Ne.value,
|
|
1104
|
+
"column-defs": pt,
|
|
1105
|
+
"row-data": w.value,
|
|
1106
|
+
"page-size": ue,
|
|
1107
|
+
"page-count": ee.value,
|
|
1108
|
+
"row-count": J.value,
|
|
1109
|
+
"fetch-fn": _t,
|
|
1110
|
+
"hide-footer": ee.value <= 1,
|
|
1111
|
+
loading: j.value,
|
|
1112
|
+
"pin-header-row": "",
|
|
1113
|
+
class: "audit-log-list-table cursor-pointer",
|
|
1114
|
+
onRowClick: t[6] || (t[6] = (p) => yt(p.original))
|
|
1115
|
+
}, null, 8, ["row-data", "page-count", "row-count", "hide-footer", "loading"]))]),
|
|
1116
|
+
_: 1
|
|
1117
|
+
}, 8, ["is-loading", "is-empty", "title", "subtitle"])])]),
|
|
1114
1118
|
_: 1
|
|
1115
|
-
})
|
|
1119
|
+
})])]),
|
|
1116
1120
|
_: 1
|
|
1117
|
-
}, 8, ["heading"]),
|
|
1118
|
-
header:
|
|
1121
|
+
}, 8, ["heading"]), b(ae, {
|
|
1122
|
+
header: i(o)("auditLog.detail.header"),
|
|
1119
1123
|
"model-value": D.value,
|
|
1120
1124
|
"max-width": 480,
|
|
1121
1125
|
"dismiss-away": "",
|
|
1122
|
-
"onUpdate:modelValue": t[7] || (t[7] = (
|
|
1123
|
-
|
|
1126
|
+
"onUpdate:modelValue": t[7] || (t[7] = (p) => {
|
|
1127
|
+
p || xt();
|
|
1124
1128
|
})
|
|
1125
1129
|
}, {
|
|
1126
|
-
default:
|
|
1130
|
+
default: Y(() => [s.value ? (y(), M("div", ul, [a("div", il, [a("div", rl, [a("p", dl, u(ct(s.value)), 1)]), b(z, {
|
|
1127
1131
|
variant: Ce(s.value.outcome),
|
|
1128
1132
|
label: Se(s.value.outcome),
|
|
1129
1133
|
compact: ""
|
|
1130
|
-
}, null, 8, ["variant", "label"])]), a("div",
|
|
1134
|
+
}, null, 8, ["variant", "label"])]), a("div", cl, [a("div", ml, [a("div", null, [a("p", fl, u(i(o)("auditLog.detail.date")), 1), a("p", vl, u(dt(s.value.timestamp)), 1)]), a("div", null, [a("p", gl, u(i(o)("auditLog.detail.user")), 1), a("p", bl, u(fe(s.value)), 1)]), a("div", null, [a("p", pl, u(i(o)("auditLog.detail.email")), 1), a("p", hl, u(rt(s.value)), 1)]), s.value.field ? (y(), M("div", _l, [a("p", yl, u(i(o)("auditLog.detail.field")), 1), a("p", xl, u(s.value.field), 1)])) : N("", !0), a("div", null, [a("p", Ll, u(i(o)("auditLog.detail.business")), 1), a("p", Sl, u(s.value.businessId || "-"), 1)]), a("div", null, [a("p", wl, u(i(o)("auditLog.detail.restaurant")), 1), a("p", kl, u(s.value.restaurantId || "-"), 1)])])]), a("div", Il, [a("div", Al, [a("p", Fl, u(i(o)("auditLog.detail.eventDetails")), 1)]), t[8] || (t[8] = a("hr", {
|
|
1131
1135
|
class: "border-fm-color-border-default"
|
|
1132
|
-
}, null, -1)), a("div",
|
|
1136
|
+
}, null, -1)), a("div", Ml, [a("div", null, [a("p", Dl, u(i(o)("auditLog.detail.actionDescription")), 1), a("p", Ol, u(s.value.metadata.operationLabel || "-"), 1)])])]), a("div", Tl, [a("div", jl, [a("p", Pl, u(i(o)("auditLog.detail.metadata")), 1)]), t[9] || (t[9] = a("hr", {
|
|
1133
1137
|
class: "border-fm-color-border-default"
|
|
1134
|
-
}, null, -1)), a("div",
|
|
1138
|
+
}, null, -1)), a("div", Vl, [a("div", null, [a("p", El, u(i(o)("auditLog.detail.resolvedFrom")), 1), a("p", Rl, u(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", Cl, [a("p", Ul, u(i(o)("auditLog.detail.permissionSet")), 1), s.value.metadata.permissionSetName ? (y(), M("p", $l, u(s.value.metadata.permissionSetName), 1)) : N("", !0), s.value.metadata.permissionSetId ? (y(), M("p", Nl, u(s.value.metadata.permissionSetId), 1)) : N("", !0)])) : N("", !0), s.value.metadata.reason ? (y(), M("div", Yl, [a("p", Bl, u(i(o)("auditLog.detail.reason")), 1), a("p", Kl, u(s.value.metadata.reason), 1)])) : N("", !0), a("div", null, [a("p", zl, u(i(o)("auditLog.detail.requestMethod")), 1), a("p", ql, u(ft(s.value)), 1)]), a("div", null, [a("p", Hl, u(i(o)("auditLog.detail.requestPath")), 1), a("p", Wl, u(s.value.metadata.requestPath || "-"), 1)]), s.value.metadata.trace && s.value.metadata.trace.length > 0 ? (y(), M("div", Jl, [a("p", Gl, u(i(o)("auditLog.detail.permissionTrace")), 1), a("ol", Xl, [(y(!0), M(Z, null, ie(s.value.metadata.trace, (p, X) => (y(), M("li", {
|
|
1135
1139
|
key: X,
|
|
1136
1140
|
class: "flex items-center gap-6"
|
|
1137
|
-
}, [a("span",
|
|
1141
|
+
}, [a("span", Ql, u(X + 1), 1), a("span", Zl, u(p), 1), X < s.value.metadata.trace.length - 1 ? (y(), M("span", eo, "→")) : N("", !0)]))), 128))])])) : N("", !0), v.value ? (y(), M("div", to, [a("p", lo, u(i(o)("auditLog.detail.requestBody")), 1), a("pre", oo, u(v.value), 1)])) : N("", !0)])])])) : N("", !0)]),
|
|
1138
1142
|
_: 1
|
|
1139
1143
|
}, 8, ["header", "model-value"])], 64);
|
|
1140
1144
|
};
|
|
1141
1145
|
}
|
|
1142
|
-
}),
|
|
1146
|
+
}), xo = /* @__PURE__ */ $t(no, [["__scopeId", "data-v-ab237027"]]);
|
|
1143
1147
|
export {
|
|
1144
|
-
|
|
1148
|
+
xo as default
|
|
1145
1149
|
};
|