@feedmepos/mf-hrm-portal 2.0.24-dev.4 → 2.0.24-dev.5
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-mfHfCrDp.js → AuditLogList-C_KqzCY2.js} +112 -113
- package/dist/{EmployeeList-mnaGEL4R.js → EmployeeList-BmbGCjEy.js} +6 -6
- package/dist/{Main-DTJOj2jJ.js → Main-CT5wdFX2.js} +9 -9
- package/dist/{Main-B4Xf2dm4.js → Main-D6diRfsf.js} +4 -4
- package/dist/{Main-BWSMKWxB.js → Main-E-k5vSv1.js} +6 -6
- package/dist/{PermissionSetList-CgPUMTJg.js → PermissionSetList-DnGM_RG4.js} +6 -6
- package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CfHx0q1H.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BLEipX1D.js} +950 -950
- package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_a439fdd8_lang-Cod0zTbu.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_a439fdd8_lang-hfnl-SDJ.js} +1 -1
- package/dist/{RoleList-Cg8Ye2Zk.js → RoleList-Du-bPAUh.js} +7 -7
- package/dist/{TeamMemberList-BoVZBjtB.js → TeamMemberList-toOqih8l.js} +8 -8
- package/dist/{TimesheetList-BiQswrw7.js → TimesheetList-CRim6v7y.js} +6 -6
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_d7ed31d7_lang-Bx5-vyxN.js → TimesheetList.vue_vue_type_style_index_0_scoped_d7ed31d7_lang-C3JuXuPD.js} +2 -2
- package/dist/{app-CZLWCtKb.js → app-B2zHVYmO.js} +4 -4
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-BMdREwIr.js → dayjs.min-BrBobzTj.js} +1 -1
- package/dist/{employee-CHBituQX.js → employee-zBcwuJU6.js} +3 -3
- package/dist/{iteration-DLrwtjjD.js → iteration-L-Jb1opR.js} +1 -1
- package/dist/{lodash-DrGn50Sb.js → lodash-DGZvTqyO.js} +1 -1
- package/dist/{rule-BFOjocRa.js → rule-Dfi1iDWJ.js} +2 -2
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-C1TRO_QU.js → useAppStore-DPTXpbkf.js} +1 -1
- package/dist/{useLoading-BBHvBcQn.js → useLoading-D8W8_Iny.js} +1 -1
- package/dist/{useReportPermissions-DhyumGy6.js → useReportPermissions-DcUg2TWM.js} +3 -3
- package/package.json +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as Be, ref as
|
|
2
|
-
import { d as y } from "./dayjs.min-
|
|
1
|
+
import { defineComponent as Be, ref as b, computed as _, onMounted as wt, onBeforeUnmount as Mt, watch as fe, resolveComponent as C, createElementBlock as k, openBlock as g, createBlock as Z, createCommentVNode as Y, createElementVNode as l, Fragment as ee, renderList as ue, withCtx as B, createVNode as h, toDisplayString as u, unref as n, nextTick as Ft } from "vue";
|
|
2
|
+
import { d as y } from "./dayjs.min-BrBobzTj.js";
|
|
3
3
|
import { useI18n as Ke, useCoreStore as Dt } from "@feedmepos/mf-common";
|
|
4
|
-
import { G as Ee, _ as It } from "./app-
|
|
4
|
+
import { G as Ee, _ as It } from "./app-B2zHVYmO.js";
|
|
5
5
|
import { components as Re } from "@feedmepos/ui-library";
|
|
6
|
-
import { g as Ce, b as Ue } from "./iteration-
|
|
6
|
+
import { g as Ce, b as Ue } from "./iteration-L-Jb1opR.js";
|
|
7
7
|
import { S as me, _ as Ot } from "./SelectFilter-C61IZSID.js";
|
|
8
8
|
import { _ as Tt } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
|
|
9
9
|
import { _ as jt } from "./index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js";
|
|
10
|
-
import { t as Pt, p as $e } from "./rule-
|
|
10
|
+
import { t as Pt, p as $e } from "./rule-Dfi1iDWJ.js";
|
|
11
11
|
import { defineStore as Vt } from "pinia";
|
|
12
12
|
const se = [
|
|
13
13
|
{ key: "all", label: "All", subjectPrefixes: [] },
|
|
@@ -21,14 +21,14 @@ const se = [
|
|
|
21
21
|
// { key: 'restaurantOperation', label: 'Restaurant Operation', subjectPrefixes: ['restaurant'] },
|
|
22
22
|
], Ye = "/audit-logs", _e = {
|
|
23
23
|
async count(a) {
|
|
24
|
-
var w, j, M,
|
|
24
|
+
var w, j, M, S, s;
|
|
25
25
|
const o = {
|
|
26
26
|
...a != null && a.from ? { from: a.from } : {},
|
|
27
27
|
...a != null && a.to ? { to: a.to } : {},
|
|
28
28
|
...(w = a == null ? void 0 : a.userIds) != null && w.length ? { userIds: a.userIds } : {},
|
|
29
29
|
...(j = a == null ? void 0 : a.subjects) != null && j.length ? { subjects: a.subjects } : {},
|
|
30
30
|
...(M = a == null ? void 0 : a.subjectPrefixes) != null && M.length ? { subjectPrefixes: a.subjectPrefixes } : {},
|
|
31
|
-
...(
|
|
31
|
+
...(S = a == null ? void 0 : a.actions) != null && S.length ? { actions: a.actions } : {},
|
|
32
32
|
...(s = a == null ? void 0 : a.outcomes) != null && s.length ? { outcomes: a.outcomes } : {}
|
|
33
33
|
};
|
|
34
34
|
return (await Ce(
|
|
@@ -46,17 +46,17 @@ const se = [
|
|
|
46
46
|
)).total;
|
|
47
47
|
},
|
|
48
48
|
async read(a) {
|
|
49
|
-
var
|
|
49
|
+
var f, w, j, M, S;
|
|
50
50
|
const o = {
|
|
51
51
|
limit: (a == null ? void 0 : a.limit) ?? 100,
|
|
52
52
|
offset: (a == null ? void 0 : a.offset) ?? 0,
|
|
53
53
|
...a != null && a.from ? { from: a.from } : {},
|
|
54
54
|
...a != null && a.to ? { to: a.to } : {},
|
|
55
|
-
...(
|
|
55
|
+
...(f = a == null ? void 0 : a.userIds) != null && f.length ? { userIds: a.userIds } : {},
|
|
56
56
|
...(w = a == null ? void 0 : a.subjects) != null && w.length ? { subjects: a.subjects } : {},
|
|
57
57
|
...(j = a == null ? void 0 : a.subjectPrefixes) != null && j.length ? { subjectPrefixes: a.subjectPrefixes } : {},
|
|
58
58
|
...(M = a == null ? void 0 : a.actions) != null && M.length ? { actions: a.actions } : {},
|
|
59
|
-
...(
|
|
59
|
+
...(S = a == null ? void 0 : a.outcomes) != null && S.length ? { outcomes: a.outcomes } : {}
|
|
60
60
|
};
|
|
61
61
|
return Ce(
|
|
62
62
|
await Ue().get(Ye, {
|
|
@@ -85,64 +85,64 @@ const se = [
|
|
|
85
85
|
},
|
|
86
86
|
emits: ["update:modelValue"],
|
|
87
87
|
setup(a, { emit: o }) {
|
|
88
|
-
const
|
|
88
|
+
const f = a, w = o, { t: j } = Ke(), M = b(!1), S = b(null), s = b(null), O = b([]), P = b(0), c = b(0);
|
|
89
89
|
let F = null;
|
|
90
90
|
async function K() {
|
|
91
91
|
if (await Ft(), !s.value) return;
|
|
92
|
-
const
|
|
93
|
-
O.value = Array.from(
|
|
92
|
+
const v = s.value.querySelectorAll("[data-tab-measure]");
|
|
93
|
+
O.value = Array.from(v).map((D) => D.offsetWidth);
|
|
94
94
|
const m = s.value.querySelector("[data-more-measure]");
|
|
95
95
|
P.value = (m == null ? void 0 : m.offsetWidth) ?? 0;
|
|
96
96
|
}
|
|
97
97
|
const ve = _(() => {
|
|
98
|
-
const
|
|
99
|
-
if (
|
|
100
|
-
if (!c.value || O.value.length !==
|
|
98
|
+
const v = f.items.length;
|
|
99
|
+
if (v === 0) return 0;
|
|
100
|
+
if (!c.value || O.value.length !== v) return v;
|
|
101
101
|
const m = O.value;
|
|
102
|
-
if (m.reduce((r, H) => r + H, 0) <= c.value) return
|
|
102
|
+
if (m.reduce((r, H) => r + H, 0) <= c.value) return v;
|
|
103
103
|
const x = P.value;
|
|
104
104
|
let T = 0, V = 0;
|
|
105
|
-
for (let r = 0; r <
|
|
105
|
+
for (let r = 0; r < v && !(T + m[r] + x > c.value); r++)
|
|
106
106
|
T += m[r], V++;
|
|
107
107
|
return V;
|
|
108
108
|
}), J = _(() => {
|
|
109
|
-
const
|
|
110
|
-
if (
|
|
111
|
-
const D =
|
|
109
|
+
const v = ve.value, m = f.items.length;
|
|
110
|
+
if (v >= m) return [...f.items];
|
|
111
|
+
const D = f.items.slice(0, v), x = f.items.find((E) => E.value === f.modelValue);
|
|
112
112
|
if (!x || D.some((E) => E.value === x.value)) return D;
|
|
113
|
-
if (
|
|
114
|
-
const T =
|
|
115
|
-
let N =
|
|
113
|
+
if (v === 0) return [x];
|
|
114
|
+
const T = f.items.findIndex((E) => E.value === x.value), V = O.value, r = P.value, H = V[T] ?? 0;
|
|
115
|
+
let N = v, ae = V.slice(0, N - 1).reduce((E, z) => E + z, 0);
|
|
116
116
|
for (; N > 1 && ae + H + r > c.value; )
|
|
117
117
|
N--, ae = V.slice(0, N - 1).reduce((E, z) => E + z, 0);
|
|
118
|
-
return [...
|
|
118
|
+
return [...f.items.slice(0, Math.max(N - 1, 0)), x];
|
|
119
119
|
}), te = _(() => {
|
|
120
|
-
const
|
|
121
|
-
return
|
|
120
|
+
const v = new Set(J.value.map((m) => m.value));
|
|
121
|
+
return f.items.filter((m) => !v.has(m.value));
|
|
122
122
|
});
|
|
123
|
-
function oe(
|
|
124
|
-
M.value = !1, w("update:modelValue",
|
|
123
|
+
function oe(v) {
|
|
124
|
+
M.value = !1, w("update:modelValue", v);
|
|
125
125
|
}
|
|
126
126
|
return wt(async () => {
|
|
127
|
-
await K(),
|
|
128
|
-
|
|
129
|
-
}), F.observe(
|
|
127
|
+
await K(), S.value && (c.value = S.value.clientWidth, F = new ResizeObserver(() => {
|
|
128
|
+
S.value && (c.value = S.value.clientWidth);
|
|
129
|
+
}), F.observe(S.value));
|
|
130
130
|
}), Mt(() => {
|
|
131
131
|
F == null || F.disconnect(), F = null;
|
|
132
132
|
}), fe(
|
|
133
|
-
() =>
|
|
133
|
+
() => f.items,
|
|
134
134
|
() => {
|
|
135
135
|
K();
|
|
136
136
|
},
|
|
137
137
|
{ deep: !0 }
|
|
138
|
-
), (
|
|
139
|
-
const D =
|
|
140
|
-
return
|
|
138
|
+
), (v, m) => {
|
|
139
|
+
const D = C("FmTab"), x = C("FmIcon"), T = C("FmMenuItem"), V = C("FmMenu");
|
|
140
|
+
return g(), k("div", {
|
|
141
141
|
ref_key: "containerRef",
|
|
142
|
-
ref:
|
|
142
|
+
ref: S,
|
|
143
143
|
class: "relative flex w-full flex-row items-center"
|
|
144
144
|
}, [
|
|
145
|
-
(
|
|
145
|
+
(g(!0), k(ee, null, ue(J.value, (r) => (g(), Z(D, {
|
|
146
146
|
key: r.value,
|
|
147
147
|
"model-value": a.modelValue,
|
|
148
148
|
label: r.label,
|
|
@@ -151,7 +151,7 @@ const se = [
|
|
|
151
151
|
value: r.value,
|
|
152
152
|
"onUpdate:modelValue": oe
|
|
153
153
|
}, null, 8, ["model-value", "label", "badge", "disabled", "value"]))), 128)),
|
|
154
|
-
te.value.length > 0 ? (
|
|
154
|
+
te.value.length > 0 ? (g(), Z(V, {
|
|
155
155
|
key: 0,
|
|
156
156
|
"show-menu": M.value,
|
|
157
157
|
class: "max-w-[360px] min-w-[90px] rounded-sm",
|
|
@@ -165,7 +165,7 @@ const se = [
|
|
|
165
165
|
])
|
|
166
166
|
]),
|
|
167
167
|
default: B(() => [
|
|
168
|
-
(
|
|
168
|
+
(g(!0), k(ee, null, ue(te.value, (r) => (g(), Z(T, {
|
|
169
169
|
key: r.value,
|
|
170
170
|
"model-value": a.modelValue === r.value,
|
|
171
171
|
label: r.label,
|
|
@@ -174,14 +174,14 @@ const se = [
|
|
|
174
174
|
}, null, 8, ["model-value", "label", "disabled", "onClick"]))), 128))
|
|
175
175
|
]),
|
|
176
176
|
_: 1
|
|
177
|
-
}, 8, ["show-menu"])) :
|
|
177
|
+
}, 8, ["show-menu"])) : Y("", !0),
|
|
178
178
|
l("div", {
|
|
179
179
|
ref_key: "measurerRef",
|
|
180
180
|
ref: s,
|
|
181
181
|
"aria-hidden": "true",
|
|
182
182
|
class: "pointer-events-none invisible absolute -left-[9999px] -top-[9999px] flex flex-row items-center"
|
|
183
183
|
}, [
|
|
184
|
-
(
|
|
184
|
+
(g(!0), k(ee, null, ue(a.items, (r) => (g(), k("div", {
|
|
185
185
|
key: `measure-${r.value}`,
|
|
186
186
|
"data-tab-measure": ""
|
|
187
187
|
}, [
|
|
@@ -202,19 +202,19 @@ const se = [
|
|
|
202
202
|
};
|
|
203
203
|
}
|
|
204
204
|
}), $t = Vt("team", () => {
|
|
205
|
-
const a =
|
|
205
|
+
const a = b([]), o = b(!1), f = b(!1), w = _(
|
|
206
206
|
() => Object.fromEntries(a.value.map((s) => [s.doc.userId, s.name]))
|
|
207
207
|
), j = _(
|
|
208
208
|
() => Object.fromEntries(a.value.map((s) => [s.doc.userId, s.email]))
|
|
209
209
|
), M = _(
|
|
210
210
|
() => Object.fromEntries(a.value.map((s) => [s.doc.userId, s.phoneNumber]))
|
|
211
211
|
);
|
|
212
|
-
async function
|
|
212
|
+
async function S({ force: s = !1 } = {}) {
|
|
213
213
|
if (!(!s && a.value.length > 0))
|
|
214
214
|
try {
|
|
215
215
|
o.value = !0;
|
|
216
216
|
const O = await Pt.readTeamMembers();
|
|
217
|
-
a.value = O.sort((P, c) => P.doc.isOwner ? -1 : P.name.localeCompare(c.name)),
|
|
217
|
+
a.value = O.sort((P, c) => P.doc.isOwner ? -1 : P.name.localeCompare(c.name)), f.value = !0;
|
|
218
218
|
} finally {
|
|
219
219
|
o.value = !1;
|
|
220
220
|
}
|
|
@@ -222,11 +222,11 @@ const se = [
|
|
|
222
222
|
return {
|
|
223
223
|
members: a,
|
|
224
224
|
isLoading: o,
|
|
225
|
-
hasLoaded:
|
|
225
|
+
hasLoaded: f,
|
|
226
226
|
userIdToName: w,
|
|
227
227
|
userIdToEmail: j,
|
|
228
228
|
userIdToPhone: M,
|
|
229
|
-
readTeamMembers:
|
|
229
|
+
readTeamMembers: S
|
|
230
230
|
};
|
|
231
231
|
}), Yt = {
|
|
232
232
|
class: "flex flex-col gap-4 p-12 w-[260px]"
|
|
@@ -284,10 +284,9 @@ const se = [
|
|
|
284
284
|
class: "break-all font-mono text-xs font-semibold"
|
|
285
285
|
}, vo = {
|
|
286
286
|
class: "text-xs text-fm-color-typo-secondary"
|
|
287
|
-
}, bo = {
|
|
288
|
-
class: "font-semibold"
|
|
289
287
|
}, go = {
|
|
290
|
-
|
|
288
|
+
class: "font-semibold"
|
|
289
|
+
}, bo = {
|
|
291
290
|
class: "rounded-lg border border-fm-color-border-default"
|
|
292
291
|
}, po = {
|
|
293
292
|
class: "p-12"
|
|
@@ -359,12 +358,12 @@ const se = [
|
|
|
359
358
|
setup(a) {
|
|
360
359
|
const {
|
|
361
360
|
t: o
|
|
362
|
-
} = Ke(),
|
|
361
|
+
} = Ke(), f = Dt(), w = $t(), j = b(!1), M = b(!1), S = b([]), s = b(null), O = b(!1);
|
|
363
362
|
async function P(e) {
|
|
364
363
|
const t = Uint8Array.from(atob(e), (p) => p.charCodeAt(0)), i = new DecompressionStream("gzip"), L = i.writable.getWriter();
|
|
365
364
|
return await L.write(t), await L.close(), new Response(i.readable).text();
|
|
366
365
|
}
|
|
367
|
-
const c =
|
|
366
|
+
const c = b("");
|
|
368
367
|
let F = 0;
|
|
369
368
|
fe(() => {
|
|
370
369
|
var e, t;
|
|
@@ -398,10 +397,10 @@ const se = [
|
|
|
398
397
|
}, {
|
|
399
398
|
immediate: !0
|
|
400
399
|
});
|
|
401
|
-
const K =
|
|
400
|
+
const K = b(1), ve = b(!1), J = b(0), te = _(() => Math.max(1, Math.ceil(J.value / ne))), oe = y().format("YYYY-MM-DD"), v = b({
|
|
402
401
|
startDate: `${oe} 00:00`,
|
|
403
402
|
endDate: `${oe} 23:59`
|
|
404
|
-
}), m =
|
|
403
|
+
}), m = b(), D = b(), x = b(), T = b(), V = b("all");
|
|
405
404
|
function r(e) {
|
|
406
405
|
return typeof e == "string" ? [e] : Array.isArray(e) ? e.filter((t) => typeof t == "string") : [];
|
|
407
406
|
}
|
|
@@ -445,26 +444,26 @@ const se = [
|
|
|
445
444
|
const i = t.toLowerCase();
|
|
446
445
|
return e.label.toLowerCase().includes(i) || e.value.replace(/^business::/, "").toLowerCase().includes(i) ? !0 : e.value.toLowerCase().includes(i);
|
|
447
446
|
}
|
|
448
|
-
const
|
|
447
|
+
const U = _(() => ({
|
|
449
448
|
manage: o("auditLog.action.manage"),
|
|
450
449
|
create: o("auditLog.action.create"),
|
|
451
450
|
read: o("auditLog.action.read"),
|
|
452
451
|
update: o("auditLog.action.update"),
|
|
453
452
|
delete: o("auditLog.action.delete")
|
|
454
453
|
})), We = _(() => [{
|
|
455
|
-
label:
|
|
454
|
+
label: U.value.manage,
|
|
456
455
|
value: "manage"
|
|
457
456
|
}, {
|
|
458
|
-
label:
|
|
457
|
+
label: U.value.create,
|
|
459
458
|
value: "create"
|
|
460
459
|
}, {
|
|
461
|
-
label:
|
|
460
|
+
label: U.value.read,
|
|
462
461
|
value: "read"
|
|
463
462
|
}, {
|
|
464
|
-
label:
|
|
463
|
+
label: U.value.update,
|
|
465
464
|
value: "update"
|
|
466
465
|
}, {
|
|
467
|
-
label:
|
|
466
|
+
label: U.value.delete,
|
|
468
467
|
value: "delete"
|
|
469
468
|
}]), ie = _(() => ({
|
|
470
469
|
allowed: o("auditLog.outcome.success"),
|
|
@@ -488,11 +487,11 @@ const se = [
|
|
|
488
487
|
"no-match": o("auditLog.detail.resolvedFromValue.noMatch"),
|
|
489
488
|
unknown: o("auditLog.detail.resolvedFromValue.unknown")
|
|
490
489
|
})), Xe = _(() => ({
|
|
491
|
-
GET:
|
|
492
|
-
POST:
|
|
493
|
-
PUT:
|
|
494
|
-
PATCH:
|
|
495
|
-
DELETE:
|
|
490
|
+
GET: U.value.read,
|
|
491
|
+
POST: U.value.create,
|
|
492
|
+
PUT: U.value.update,
|
|
493
|
+
PATCH: U.value.update,
|
|
494
|
+
DELETE: U.value.delete
|
|
496
495
|
})), Se = {
|
|
497
496
|
allowed: "success",
|
|
498
497
|
denied: "critical",
|
|
@@ -505,7 +504,7 @@ const se = [
|
|
|
505
504
|
const {
|
|
506
505
|
startDate: e,
|
|
507
506
|
endDate: t
|
|
508
|
-
} =
|
|
507
|
+
} = v.value;
|
|
509
508
|
return e && t ? `${re(e)} – ${re(t)}` : e ? re(e) : t ? re(t) : o("auditLog.dateRange.placeholder");
|
|
510
509
|
}), Ze = _(() => [{
|
|
511
510
|
label: o("date.predefinedRanges.today"),
|
|
@@ -550,14 +549,14 @@ const se = [
|
|
|
550
549
|
endDate: y().subtract(1, "month").endOf("month").format(A)
|
|
551
550
|
}
|
|
552
551
|
}]);
|
|
553
|
-
function
|
|
552
|
+
function ge(e) {
|
|
554
553
|
var t;
|
|
555
554
|
return ((t = $e.find((i) => i.subject === e)) == null ? void 0 : t.label) ?? Ee[e];
|
|
556
555
|
}
|
|
557
556
|
function de(e) {
|
|
558
557
|
var i;
|
|
559
558
|
const t = w.userIdToName[e.userId];
|
|
560
|
-
return t || (w.hasLoaded ? (i =
|
|
559
|
+
return t || (w.hasLoaded ? (i = f.sessionUser.value) != null && i.isInternal ? `${e.actorName ?? e.userId} (${o("auditLog.user.feedmeAdmin")})` : o("auditLog.user.feedmeAdmin") : e.userId);
|
|
561
560
|
}
|
|
562
561
|
function ke(e) {
|
|
563
562
|
return w.userIdToPhone[e.userId] || "-";
|
|
@@ -572,15 +571,15 @@ const se = [
|
|
|
572
571
|
return y(e).format("DD MMM YYYY, HH:mm:ss").toUpperCase();
|
|
573
572
|
}
|
|
574
573
|
function Me(e) {
|
|
575
|
-
return
|
|
574
|
+
return U.value[e] ?? e;
|
|
576
575
|
}
|
|
577
576
|
function Fe(e) {
|
|
578
577
|
return e.metadata.operationLabel ?? Me(e.action);
|
|
579
578
|
}
|
|
580
579
|
function ot(e) {
|
|
581
|
-
return
|
|
580
|
+
return ge(e.subject) ?? e.subject;
|
|
582
581
|
}
|
|
583
|
-
function
|
|
582
|
+
function be(e) {
|
|
584
583
|
return ie.value[e];
|
|
585
584
|
}
|
|
586
585
|
function at(e) {
|
|
@@ -611,7 +610,7 @@ const se = [
|
|
|
611
610
|
}, {
|
|
612
611
|
key: "subject",
|
|
613
612
|
labelKey: "auditLog.exportFields.subject",
|
|
614
|
-
getValue: (e) =>
|
|
613
|
+
getValue: (e) => ge(e.subject) ?? e.subject,
|
|
615
614
|
defaultSelected: !0
|
|
616
615
|
}, {
|
|
617
616
|
key: "action",
|
|
@@ -626,7 +625,7 @@ const se = [
|
|
|
626
625
|
}, {
|
|
627
626
|
key: "outcome",
|
|
628
627
|
labelKey: "auditLog.exportFields.outcome",
|
|
629
|
-
getValue: (e) =>
|
|
628
|
+
getValue: (e) => be(e.outcome),
|
|
630
629
|
defaultSelected: !0
|
|
631
630
|
}, {
|
|
632
631
|
key: "businessId",
|
|
@@ -679,7 +678,7 @@ const se = [
|
|
|
679
678
|
}
|
|
680
679
|
return new Set(pe.filter((e) => e.defaultSelected).map((e) => e.key));
|
|
681
680
|
}
|
|
682
|
-
const G =
|
|
681
|
+
const G = b(st());
|
|
683
682
|
function nt(e) {
|
|
684
683
|
const t = new Set(G.value);
|
|
685
684
|
if (t.has(e)) {
|
|
@@ -699,11 +698,11 @@ const se = [
|
|
|
699
698
|
M.value = !0;
|
|
700
699
|
try {
|
|
701
700
|
const {
|
|
702
|
-
startDate:
|
|
701
|
+
startDate: $,
|
|
703
702
|
endDate: q
|
|
704
|
-
} =
|
|
705
|
-
|
|
706
|
-
from: X(
|
|
703
|
+
} = v.value, W = E.value.subjectPrefixes, ce = (/* @__PURE__ */ new Date()).toISOString().slice(0, 19).replace("T", " "), d = q ? X(q) : null, Q = d && d < ce ? d : ce, ft = {
|
|
704
|
+
...$ ? {
|
|
705
|
+
from: X($)
|
|
707
706
|
} : {},
|
|
708
707
|
to: Q,
|
|
709
708
|
...(e = m.value) != null && e.length ? {
|
|
@@ -732,8 +731,8 @@ const se = [
|
|
|
732
731
|
if (Te.push(...R), R.length < xe) break;
|
|
733
732
|
je += xe;
|
|
734
733
|
}
|
|
735
|
-
const Pe = pe.filter((R) => G.value.has(R.key)), vt = Pe.map((R) => o(R.labelKey)),
|
|
736
|
-
`), Lt = `audit-log_${(((I =
|
|
734
|
+
const Pe = pe.filter((R) => G.value.has(R.key)), vt = Pe.map((R) => o(R.labelKey)), gt = Te.map((R) => Pe.map((kt) => kt.getValue(R) ?? "")), ye = -(/* @__PURE__ */ new Date()).getTimezoneOffset(), bt = ye >= 0 ? "+" : "-", pt = String(Math.floor(Math.abs(ye) / 60)).padStart(2, "0"), ht = String(Math.abs(ye) % 60).padStart(2, "0"), yt = `UTC${bt}${pt}:${ht}`, Ve = ((p = f.currentBusiness.value) == null ? void 0 : p.name) || "", _t = [$, q].filter(Boolean).join(" – "), xt = [...[[o("auditLog.title")], [`${o("auditLog.frontMatter.date")}: ${_t}`], ...Ve ? [[`${o("auditLog.frontMatter.business")}: ${Ve}`]] : [], [`${o("auditLog.frontMatter.generatedBy")}: ${y().format("DD MMM YYYY, HH:mm")} (${yt})`], []].map((R) => R.map(De).join(",")), ...[vt, ...gt].map((R) => R.map(De).join(","))].join(`
|
|
735
|
+
`), Lt = `audit-log_${(((I = f.currentBusiness.value) == null ? void 0 : I.name) || "business").replace(/[^a-z0-9_-]+/gi, "_")}_${y().format("YYYYMMDD_HHmmss")}.csv`, St = new Blob([`\uFEFF${xt}`], {
|
|
737
736
|
type: "text/csv;charset=utf-8;"
|
|
738
737
|
}), Ae = window.URL.createObjectURL(St), le = document.createElement("a");
|
|
739
738
|
le.href = Ae, le.download = Lt, document.body.appendChild(le), le.click(), le.remove(), window.URL.revokeObjectURL(Ae);
|
|
@@ -774,7 +773,7 @@ const se = [
|
|
|
774
773
|
header: () => o("auditLog.columns.subject"),
|
|
775
774
|
cell(e) {
|
|
776
775
|
const t = e.row.original;
|
|
777
|
-
return
|
|
776
|
+
return ge(t.subject) ?? t.subject;
|
|
778
777
|
}
|
|
779
778
|
}, {
|
|
780
779
|
accessorKey: "action",
|
|
@@ -795,7 +794,7 @@ const se = [
|
|
|
795
794
|
const t = e.row.original;
|
|
796
795
|
return h(Re.FmChip, {
|
|
797
796
|
variant: Se[t.outcome] ?? "neutral",
|
|
798
|
-
label:
|
|
797
|
+
label: be(t.outcome),
|
|
799
798
|
compact: !0
|
|
800
799
|
}, null);
|
|
801
800
|
}
|
|
@@ -811,9 +810,9 @@ const se = [
|
|
|
811
810
|
const {
|
|
812
811
|
startDate: p,
|
|
813
812
|
endDate: I
|
|
814
|
-
} =
|
|
813
|
+
} = v.value, $ = (K.value - 1) * ne, q = E.value.subjectPrefixes, W = await _e.read({
|
|
815
814
|
limit: ne,
|
|
816
|
-
offset:
|
|
815
|
+
offset: $,
|
|
817
816
|
...p ? {
|
|
818
817
|
from: X(p)
|
|
819
818
|
} : {},
|
|
@@ -836,7 +835,7 @@ const se = [
|
|
|
836
835
|
outcomes: x.value
|
|
837
836
|
} : {}
|
|
838
837
|
});
|
|
839
|
-
|
|
838
|
+
S.value = W, ve.value = W.length === ne;
|
|
840
839
|
} finally {
|
|
841
840
|
j.value = !1;
|
|
842
841
|
}
|
|
@@ -844,8 +843,8 @@ const se = [
|
|
|
844
843
|
const Oe = _(() => {
|
|
845
844
|
var e;
|
|
846
845
|
return JSON.stringify({
|
|
847
|
-
businessId: ((e =
|
|
848
|
-
dateRange:
|
|
846
|
+
businessId: ((e = f.currentBusiness.value) == null ? void 0 : e._id) ?? "",
|
|
847
|
+
dateRange: v.value,
|
|
849
848
|
users: [...m.value ?? []].sort(),
|
|
850
849
|
subjects: [...D.value ?? []].sort(),
|
|
851
850
|
outcomes: [...x.value ?? []].sort(),
|
|
@@ -854,11 +853,11 @@ const se = [
|
|
|
854
853
|
});
|
|
855
854
|
});
|
|
856
855
|
async function rt() {
|
|
857
|
-
var L, p, I,
|
|
856
|
+
var L, p, I, $;
|
|
858
857
|
const {
|
|
859
858
|
startDate: e,
|
|
860
859
|
endDate: t
|
|
861
|
-
} =
|
|
860
|
+
} = v.value, i = E.value.subjectPrefixes;
|
|
862
861
|
J.value = await _e.count({
|
|
863
862
|
...e ? {
|
|
864
863
|
from: X(e)
|
|
@@ -878,14 +877,14 @@ const se = [
|
|
|
878
877
|
...(I = T.value) != null && I.length ? {
|
|
879
878
|
actions: T.value
|
|
880
879
|
} : {},
|
|
881
|
-
...(
|
|
880
|
+
...($ = x.value) != null && $.length ? {
|
|
882
881
|
outcomes: x.value
|
|
883
882
|
} : {}
|
|
884
883
|
});
|
|
885
884
|
}
|
|
886
885
|
fe(Oe, async () => {
|
|
887
886
|
var e;
|
|
888
|
-
K.value = 1, (e =
|
|
887
|
+
K.value = 1, (e = f.currentBusiness.value) != null && e._id && await Promise.all([rt(), Ie()]);
|
|
889
888
|
}, {
|
|
890
889
|
immediate: !0
|
|
891
890
|
});
|
|
@@ -894,7 +893,7 @@ const se = [
|
|
|
894
893
|
pageIndex: e
|
|
895
894
|
}) {
|
|
896
895
|
var t;
|
|
897
|
-
if ((t =
|
|
896
|
+
if ((t = f.currentBusiness.value) != null && t._id && e !== 0 && !he) {
|
|
898
897
|
he = !0, K.value = e + 1;
|
|
899
898
|
try {
|
|
900
899
|
await Ie();
|
|
@@ -909,20 +908,20 @@ const se = [
|
|
|
909
908
|
function mt() {
|
|
910
909
|
O.value = !1, s.value = null;
|
|
911
910
|
}
|
|
912
|
-
return fe(
|
|
911
|
+
return fe(f.currentBusiness, (e) => {
|
|
913
912
|
e && w.readTeamMembers();
|
|
914
913
|
}, {
|
|
915
914
|
immediate: !0
|
|
916
915
|
}), (e, t) => {
|
|
917
|
-
const i =
|
|
918
|
-
return
|
|
916
|
+
const i = C("FmSpacer"), L = C("FmButton"), p = C("FmMenuItem"), I = C("FmMenu"), $ = C("FmChip"), q = C("FmDateRangePicker"), W = C("FmTable"), ce = C("FmSideSheet");
|
|
917
|
+
return g(), k(ee, null, [h(Tt, {
|
|
919
918
|
heading: n(o)("auditLog.title")
|
|
920
919
|
}, {
|
|
921
920
|
"append-heading": B(() => [h(i), h(L, {
|
|
922
921
|
variant: "primary",
|
|
923
922
|
"prepend-icon": "upload",
|
|
924
923
|
label: n(o)("auditLog.export"),
|
|
925
|
-
disabled:
|
|
924
|
+
disabled: S.value.length === 0 || M.value || n(w).isLoading || n(w).members.length === 0,
|
|
926
925
|
loading: M.value,
|
|
927
926
|
onClick: ut
|
|
928
927
|
}, null, 8, ["label", "disabled", "loading"]), h(I, {
|
|
@@ -935,7 +934,7 @@ const se = [
|
|
|
935
934
|
"aria-label": n(o)("auditLog.exportSettings.title"),
|
|
936
935
|
disabled: M.value
|
|
937
936
|
}, null, 8, ["aria-label", "disabled"])]),
|
|
938
|
-
default: B(() => [l("div", Yt, [l("p", Nt, u(n(o)("auditLog.exportSettings.title")), 1), (
|
|
937
|
+
default: B(() => [l("div", Yt, [l("p", Nt, u(n(o)("auditLog.exportSettings.title")), 1), (g(), k(ee, null, ue(pe, (d) => h(p, {
|
|
939
938
|
key: d.key,
|
|
940
939
|
label: n(o)(d.labelKey),
|
|
941
940
|
"has-checkbox": "",
|
|
@@ -950,13 +949,13 @@ const se = [
|
|
|
950
949
|
"onUpdate:modelValue": t[0] || (t[0] = (d) => V.value = d),
|
|
951
950
|
items: Le.value
|
|
952
951
|
}, null, 8, ["modelValue", "items"]), l("div", zt, [h(q, {
|
|
953
|
-
modelValue:
|
|
954
|
-
"onUpdate:modelValue": t[1] || (t[1] = (d) =>
|
|
952
|
+
modelValue: v.value,
|
|
953
|
+
"onUpdate:modelValue": t[1] || (t[1] = (d) => v.value = d),
|
|
955
954
|
"show-predefined-range": "",
|
|
956
955
|
"show-time": "",
|
|
957
956
|
"predefined-range": Ze.value
|
|
958
957
|
}, {
|
|
959
|
-
"trigger-button": B(() => [h(
|
|
958
|
+
"trigger-button": B(() => [h($, {
|
|
960
959
|
label: Qe.value,
|
|
961
960
|
icon: "calendar_month"
|
|
962
961
|
}, null, 8, ["label"])]),
|
|
@@ -970,7 +969,7 @@ const se = [
|
|
|
970
969
|
placeholder: n(o)("auditLog.filter.user_placeholder"),
|
|
971
970
|
"selected-prefix": n(o)("auditLog.filter.selected_user_prefix"),
|
|
972
971
|
"chip-icon": "account_circle"
|
|
973
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), z.value ? (
|
|
972
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), z.value ? (g(), k("div", Ht, [h(me, {
|
|
974
973
|
modelValue: D.value,
|
|
975
974
|
"onUpdate:modelValue": t[3] || (t[3] = (d) => D.value = d),
|
|
976
975
|
items: qe.value,
|
|
@@ -980,7 +979,7 @@ const se = [
|
|
|
980
979
|
placeholder: n(o)("auditLog.filter.subject_placeholder"),
|
|
981
980
|
"selected-prefix": n(o)("auditLog.filter.selected_subject_prefix"),
|
|
982
981
|
"chip-icon": "badge"
|
|
983
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])) :
|
|
982
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])) : Y("", !0), l("div", Wt, [h(me, {
|
|
984
983
|
modelValue: T.value,
|
|
985
984
|
"onUpdate:modelValue": t[4] || (t[4] = (d) => T.value = d),
|
|
986
985
|
items: We.value,
|
|
@@ -999,17 +998,17 @@ const se = [
|
|
|
999
998
|
"selected-prefix": n(o)("auditLog.filter.selected_status_prefix"),
|
|
1000
999
|
searchable: !1,
|
|
1001
1000
|
"chip-icon": "check_circle"
|
|
1002
|
-
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])])]), !j.value &&
|
|
1001
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])])]), !j.value && S.value.length === 0 ? (g(), Z(n(jt), {
|
|
1003
1002
|
key: 0,
|
|
1004
1003
|
title: n(o)("auditLog.noData.title"),
|
|
1005
1004
|
subtitle: n(o)("auditLog.noData.subtitle")
|
|
1006
|
-
}, null, 8, ["title", "subtitle"])) : (
|
|
1005
|
+
}, null, 8, ["title", "subtitle"])) : (g(), Z(It, {
|
|
1007
1006
|
key: 1
|
|
1008
1007
|
}, {
|
|
1009
|
-
default: B(() => [(
|
|
1008
|
+
default: B(() => [(g(), Z(W, {
|
|
1010
1009
|
key: Oe.value,
|
|
1011
1010
|
"column-defs": it,
|
|
1012
|
-
"row-data":
|
|
1011
|
+
"row-data": S.value,
|
|
1013
1012
|
"page-size": ne,
|
|
1014
1013
|
"page-count": te.value,
|
|
1015
1014
|
"row-count": J.value,
|
|
@@ -1032,23 +1031,23 @@ const se = [
|
|
|
1032
1031
|
d || mt();
|
|
1033
1032
|
})
|
|
1034
1033
|
}, {
|
|
1035
|
-
default: B(() => [s.value ? (
|
|
1034
|
+
default: B(() => [s.value ? (g(), k("div", Gt, [l("div", Xt, [l("div", Qt, [l("p", Zt, u(ot(s.value)), 1)]), h($, {
|
|
1036
1035
|
variant: Se[s.value.outcome] ?? "neutral",
|
|
1037
|
-
label:
|
|
1036
|
+
label: be(s.value.outcome),
|
|
1038
1037
|
compact: ""
|
|
1039
|
-
}, null, 8, ["variant", "label"])]), l("div", eo, [l("div", to, [l("div", null, [l("p", oo, u(n(o)("auditLog.detail.date")), 1), l("p", ao, u(tt(s.value.timestamp)), 1)]), l("div", null, [l("p", lo, u(n(o)("auditLog.detail.user")), 1), l("p", so, u(de(s.value)), 1)]), l("div", null, [l("p", no, u(n(o)("auditLog.detail.email")), 1), l("p", uo, u(et(s.value)), 1)]), s.value.field ? (
|
|
1038
|
+
}, null, 8, ["variant", "label"])]), l("div", eo, [l("div", to, [l("div", null, [l("p", oo, u(n(o)("auditLog.detail.date")), 1), l("p", ao, u(tt(s.value.timestamp)), 1)]), l("div", null, [l("p", lo, u(n(o)("auditLog.detail.user")), 1), l("p", so, u(de(s.value)), 1)]), l("div", null, [l("p", no, u(n(o)("auditLog.detail.email")), 1), l("p", uo, u(et(s.value)), 1)]), s.value.field ? (g(), k("div", io, [l("p", ro, u(n(o)("auditLog.detail.field")), 1), l("p", co, u(s.value.field), 1)])) : Y("", !0), l("div", null, [l("p", mo, u(n(o)("auditLog.detail.business")), 1), l("p", fo, u(s.value.businessId || "-"), 1)]), l("div", null, [l("p", vo, u(n(o)("auditLog.detail.restaurant")), 1), l("p", go, u(s.value.restaurantId || "-"), 1)])])]), l("div", bo, [l("div", po, [l("p", ho, u(n(o)("auditLog.detail.eventDetails")), 1)]), t[8] || (t[8] = l("hr", {
|
|
1040
1039
|
class: "border-fm-color-border-default"
|
|
1041
|
-
}, null, -1)), l("div", yo, [l("div", null, [l("p", _o, u(n(o)("auditLog.detail.actionDescription")), 1), l("p", xo, u(s.value.metadata.operationLabel), 1)])])])
|
|
1040
|
+
}, null, -1)), l("div", yo, [l("div", null, [l("p", _o, u(n(o)("auditLog.detail.actionDescription")), 1), l("p", xo, u(s.value.metadata.operationLabel || "-"), 1)])])]), l("div", Lo, [l("div", So, [l("p", ko, u(n(o)("auditLog.detail.metadata")), 1)]), t[9] || (t[9] = l("hr", {
|
|
1042
1041
|
class: "border-fm-color-border-default"
|
|
1043
|
-
}, null, -1)), l("div", wo, [l("div", null, [l("p", Mo, u(n(o)("auditLog.detail.resolvedFrom")), 1), l("p", Fo, u(at(s.value.metadata.resolvedFrom)), 1)]), (s.value.metadata.resolvedFrom === "permissionSet" || s.value.metadata.resolvedFrom === "systemPermissionSet") && (s.value.metadata.permissionSetName || s.value.metadata.permissionSetId) ? (
|
|
1042
|
+
}, null, -1)), l("div", wo, [l("div", null, [l("p", Mo, u(n(o)("auditLog.detail.resolvedFrom")), 1), l("p", Fo, u(at(s.value.metadata.resolvedFrom)), 1)]), (s.value.metadata.resolvedFrom === "permissionSet" || s.value.metadata.resolvedFrom === "systemPermissionSet") && (s.value.metadata.permissionSetName || s.value.metadata.permissionSetId) ? (g(), k("div", Do, [l("p", Io, u(n(o)("auditLog.detail.permissionSet")), 1), s.value.metadata.permissionSetName ? (g(), k("p", Oo, u(s.value.metadata.permissionSetName), 1)) : Y("", !0), s.value.metadata.permissionSetId ? (g(), k("p", To, u(s.value.metadata.permissionSetId), 1)) : Y("", !0)])) : Y("", !0), s.value.metadata.reason ? (g(), k("div", jo, [l("p", Po, u(n(o)("auditLog.detail.reason")), 1), l("p", Vo, u(s.value.metadata.reason), 1)])) : Y("", !0), l("div", null, [l("p", Ao, u(n(o)("auditLog.detail.requestMethod")), 1), l("p", Eo, u(lt(s.value)), 1)]), l("div", null, [l("p", Ro, u(n(o)("auditLog.detail.requestPath")), 1), l("p", Co, u(s.value.metadata.requestPath || "-"), 1)]), s.value.metadata.trace && s.value.metadata.trace.length > 0 ? (g(), k("div", Uo, [l("p", $o, u(n(o)("auditLog.detail.permissionTrace")), 1), l("ol", Yo, [(g(!0), k(ee, null, ue(s.value.metadata.trace, (d, Q) => (g(), k("li", {
|
|
1044
1043
|
key: Q,
|
|
1045
1044
|
class: "flex items-center gap-6"
|
|
1046
|
-
}, [l("span", No, u(Q + 1), 1), l("span", Bo, u(d), 1), Q < s.value.metadata.trace.length - 1 ? (
|
|
1045
|
+
}, [l("span", No, u(Q + 1), 1), l("span", Bo, u(d), 1), Q < s.value.metadata.trace.length - 1 ? (g(), k("span", Ko, "→")) : Y("", !0)]))), 128))])])) : Y("", !0), c.value ? (g(), k("div", zo, [l("p", qo, u(n(o)("auditLog.detail.requestBody")), 1), l("pre", Ho, u(c.value), 1)])) : Y("", !0)])])])) : Y("", !0)]),
|
|
1047
1046
|
_: 1
|
|
1048
1047
|
}, 8, ["header", "model-value"])], 64);
|
|
1049
1048
|
};
|
|
1050
1049
|
}
|
|
1051
|
-
}), da = /* @__PURE__ */ Ot(Go, [["__scopeId", "data-v-
|
|
1050
|
+
}), da = /* @__PURE__ */ Ot(Go, [["__scopeId", "data-v-04d270bd"]]);
|
|
1052
1051
|
export {
|
|
1053
1052
|
da as default
|
|
1054
1053
|
};
|
|
@@ -2,17 +2,17 @@ import { toRaw as Te, defineComponent as $e, ref as v, computed as k, watch as X
|
|
|
2
2
|
import { useI18n as Ae, useCoreStore as He } from "@feedmepos/mf-common";
|
|
3
3
|
import { useSnackbar as Pe, components as De, useDialog as Je, useBreakpoints as We } from "@feedmepos/ui-library";
|
|
4
4
|
import { S as ce, _ as Qe } from "./SelectFilter-C61IZSID.js";
|
|
5
|
-
import { _ as Ye, a as Ze } from "./app-
|
|
5
|
+
import { _ as Ye, a as Ze } from "./app-B2zHVYmO.js";
|
|
6
6
|
import { _ as Fe, u as Xe, H as ea } from "./FormItem.vue_vue_type_script_setup_true_lang-S4Mh4MvG.js";
|
|
7
7
|
import { u as aa, _ as ta } from "./useDiscardConfirm-DPhEV6v0.js";
|
|
8
8
|
import { _ as la } from "./index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js";
|
|
9
9
|
import { u as sa, _ as Ve } from "./useDebounce-CWb5QR9G.js";
|
|
10
|
-
import { u as Ne, E as oa } from "./employee-
|
|
11
|
-
import { u as ze } from "./iteration-
|
|
12
|
-
import { l as ra } from "./lodash-
|
|
10
|
+
import { u as Ne, E as oa } from "./employee-zBcwuJU6.js";
|
|
11
|
+
import { u as ze } from "./iteration-L-Jb1opR.js";
|
|
12
|
+
import { l as ra } from "./lodash-DGZvTqyO.js";
|
|
13
13
|
import { _ as Se } from "./FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js";
|
|
14
|
-
import { u as Oe } from "./useLoading-
|
|
15
|
-
import { u as we } from "./useAppStore-
|
|
14
|
+
import { u as Oe } from "./useLoading-D8W8_Iny.js";
|
|
15
|
+
import { u as we } from "./useAppStore-DPTXpbkf.js";
|
|
16
16
|
/* empty css */
|
|
17
17
|
function Ce(B) {
|
|
18
18
|
return JSON.parse(JSON.stringify(B));
|