@feedmepos/mf-hrm-portal 1.1.3-dev → 1.1.3-dev.2
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-kZBi77lv.js +435 -0
- package/dist/{EmployeeList-zU7fmC4c.js → EmployeeList-Cg-mhdLv.js} +5 -5
- package/dist/{Main-BqhrqOzx.js → Main-BHF7vXlD.js} +28 -27
- package/dist/{Main-DGymQNz9.js → Main-CC9_bKTG.js} +7 -7
- package/dist/PermissionSetList-C0FOYrQ6.js +283 -0
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CS4B-7AU.js +3084 -0
- package/dist/{RoleList-jbZqer7A.js → RoleList-D2NTVZa_.js} +5 -5
- package/dist/{TeamMemberList-uamoOFIV.js → TeamMemberList-DC0Gxjin.js} +325 -322
- package/dist/{TimesheetList-hgT9DrHd.js → TimesheetList-CksRCsTc.js} +6 -6
- package/dist/api/index.d.ts +4 -0
- package/dist/api/team/index.d.ts +2 -2
- package/dist/{app-CcbYGJ22.js → app-kKq54h9D.js} +490 -344
- package/dist/app.js +3 -3
- package/dist/{dayjs.min-CgN1oBQf.js → dayjs.min-CGTR0SS0.js} +1 -1
- package/dist/{employee-khk560IC.js → employee-CRKx3zN0.js} +3 -3
- package/dist/helpers/permission-set.d.ts +15 -0
- package/dist/{index-D5sdamN5.js → index-DRoNwfyW.js} +2153 -2053
- package/dist/index-TP4vQCyq.js +827 -0
- package/dist/{lodash-7Am6_Zd3.js → lodash-CeWi5dyp.js} +1 -1
- package/dist/stores/team.d.ts +4 -1
- package/dist/team-CuLNHjGN.js +29 -0
- package/dist/{timesheet-DKhEeLe7.js → timesheet-V636ISlI.js} +2 -2
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/types/audit-log.d.ts +1 -19
- package/dist/{useAppStore-DOSLuH24.js → useAppStore-DoX0IUFz.js} +1 -1
- package/dist/{useLoading-BA-GSZ3R.js → useLoading-1yy1KHsE.js} +1 -1
- package/dist/views/audit-log/locales/index.d.ts +76 -0
- package/dist/views/team/locales/index.d.ts +12 -8
- package/package.json +3 -2
- package/dist/AuditLogList-DNQh1rE9.js +0 -316
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BvjXcknf.js +0 -3050
- package/dist/RolePermissionList-Dd8ks5i7.js +0 -285
- package/dist/team-CFyc6tnm.js +0 -26
- package/dist/types/permission.d.ts +0 -1
- /package/dist/views/team/{role/RolePermissionForm.vue.d.ts → permission-set/PermissionSetForm.vue.d.ts} +0 -0
- /package/dist/views/team/{role/RolePermissionList.vue.d.ts → permission-set/PermissionSetList.vue.d.ts} +0 -0
|
@@ -0,0 +1,435 @@
|
|
|
1
|
+
import { defineComponent as le, ref as f, computed as k, watch as U, resolveComponent as w, createElementBlock as r, openBlock as d, Fragment as D, createVNode as n, unref as i, withCtx as O, createElementVNode as e, createBlock as $, createCommentVNode as p, toDisplayString as l, renderList as se } from "vue";
|
|
2
|
+
import { d as ie } from "./dayjs.min-CGTR0SS0.js";
|
|
3
|
+
import { useI18n as ne, useCoreStore as de } from "@feedmepos/mf-common";
|
|
4
|
+
import { _ as re, l as ce } from "./app-kKq54h9D.js";
|
|
5
|
+
import { _ as ue } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
|
|
6
|
+
import { _ as me } from "./index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js";
|
|
7
|
+
import { components as B } from "@feedmepos/ui-library";
|
|
8
|
+
import { g as fe, b as pe, p as J } from "./index-DRoNwfyW.js";
|
|
9
|
+
import { u as ve } from "./team-CuLNHjGN.js";
|
|
10
|
+
import { S as P } from "./SelectFilter-NbXrJ4iH.js";
|
|
11
|
+
const _e = "/audit-logs", ge = {
|
|
12
|
+
async read(c) {
|
|
13
|
+
return fe(
|
|
14
|
+
await pe().get(_e, {
|
|
15
|
+
params: {
|
|
16
|
+
limit: (c == null ? void 0 : c.limit) ?? 100,
|
|
17
|
+
offset: (c == null ? void 0 : c.offset) ?? 0,
|
|
18
|
+
...c != null && c.from ? { from: c.from } : {},
|
|
19
|
+
...c != null && c.to ? { to: c.to } : {}
|
|
20
|
+
}
|
|
21
|
+
})
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
}, he = {
|
|
25
|
+
class: "flex flex-1 flex-col gap-16 min-h-0"
|
|
26
|
+
}, xe = {
|
|
27
|
+
class: "flex items-center gap-8"
|
|
28
|
+
}, be = {
|
|
29
|
+
class: "w-fit"
|
|
30
|
+
}, ye = {
|
|
31
|
+
class: "w-fit"
|
|
32
|
+
}, Le = {
|
|
33
|
+
class: "w-fit"
|
|
34
|
+
}, ke = {
|
|
35
|
+
class: "w-fit"
|
|
36
|
+
}, Se = {
|
|
37
|
+
class: "flex h-full flex-col"
|
|
38
|
+
}, we = {
|
|
39
|
+
key: 0,
|
|
40
|
+
class: "flex shrink-0 items-center justify-end border-t border-fm-color-border-default py-4"
|
|
41
|
+
}, Ie = {
|
|
42
|
+
class: "text-sm text-fm-color-typo-secondary"
|
|
43
|
+
}, Te = {
|
|
44
|
+
key: 0,
|
|
45
|
+
class: "space-y-12 p-4 text-sm"
|
|
46
|
+
}, je = {
|
|
47
|
+
class: "rounded-lg border border-fm-color-border-default"
|
|
48
|
+
}, De = {
|
|
49
|
+
class: "flex items-start justify-between gap-8 p-12"
|
|
50
|
+
}, Oe = {
|
|
51
|
+
class: "text-base font-bold leading-snug text-fm-color-typo-primary"
|
|
52
|
+
}, Pe = {
|
|
53
|
+
class: "space-y-12 p-12"
|
|
54
|
+
}, Ve = {
|
|
55
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
56
|
+
}, Ce = {
|
|
57
|
+
class: "font-semibold"
|
|
58
|
+
}, Ne = {
|
|
59
|
+
key: 0
|
|
60
|
+
}, Fe = {
|
|
61
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
62
|
+
}, Re = {
|
|
63
|
+
class: "font-semibold"
|
|
64
|
+
}, Ue = {
|
|
65
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
66
|
+
}, Be = {
|
|
67
|
+
class: "break-all font-mono text-xs font-semibold"
|
|
68
|
+
}, Ae = {
|
|
69
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
70
|
+
}, Ee = {
|
|
71
|
+
class: "font-semibold"
|
|
72
|
+
}, qe = {
|
|
73
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
74
|
+
}, Me = {
|
|
75
|
+
class: "font-semibold"
|
|
76
|
+
}, Ke = {
|
|
77
|
+
key: 1
|
|
78
|
+
}, $e = {
|
|
79
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
80
|
+
}, Je = {
|
|
81
|
+
class: "font-semibold"
|
|
82
|
+
}, Ye = {
|
|
83
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
84
|
+
}, ze = {
|
|
85
|
+
class: "break-all font-mono text-xs font-semibold"
|
|
86
|
+
}, Ge = {
|
|
87
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
88
|
+
}, Ze = {
|
|
89
|
+
class: "font-semibold"
|
|
90
|
+
}, He = {
|
|
91
|
+
class: "rounded-lg border border-fm-color-border-default"
|
|
92
|
+
}, Qe = {
|
|
93
|
+
class: "p-12"
|
|
94
|
+
}, We = {
|
|
95
|
+
class: "text-base font-bold text-fm-color-typo-primary"
|
|
96
|
+
}, Xe = {
|
|
97
|
+
class: "space-y-12 p-12"
|
|
98
|
+
}, et = {
|
|
99
|
+
key: 0
|
|
100
|
+
}, tt = {
|
|
101
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
102
|
+
}, ot = {
|
|
103
|
+
class: "font-semibold"
|
|
104
|
+
}, at = {
|
|
105
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
106
|
+
}, lt = {
|
|
107
|
+
class: "font-semibold"
|
|
108
|
+
}, st = {
|
|
109
|
+
key: 1
|
|
110
|
+
}, it = {
|
|
111
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
112
|
+
}, nt = {
|
|
113
|
+
class: "font-semibold"
|
|
114
|
+
}, dt = {
|
|
115
|
+
class: "break-all font-mono text-xs text-fm-color-typo-secondary"
|
|
116
|
+
}, rt = {
|
|
117
|
+
class: "font-semibold"
|
|
118
|
+
}, ct = {
|
|
119
|
+
key: 0,
|
|
120
|
+
class: "break-all font-mono text-xs text-fm-color-typo-secondary"
|
|
121
|
+
}, ut = {
|
|
122
|
+
key: 2
|
|
123
|
+
}, mt = {
|
|
124
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
125
|
+
}, ft = {
|
|
126
|
+
class: "mt-4 space-y-4"
|
|
127
|
+
}, pt = {
|
|
128
|
+
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"
|
|
129
|
+
}, vt = {
|
|
130
|
+
class: "text-xs font-semibold"
|
|
131
|
+
}, _t = {
|
|
132
|
+
key: 0,
|
|
133
|
+
class: "text-fm-color-typo-secondary"
|
|
134
|
+
}, gt = {
|
|
135
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
136
|
+
}, ht = {
|
|
137
|
+
class: "mt-4 max-h-[400px] overflow-auto rounded bg-gray-100 p-8 font-mono text-xs leading-relaxed shadow-inner"
|
|
138
|
+
}, xt = {
|
|
139
|
+
key: 3
|
|
140
|
+
}, bt = {
|
|
141
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
142
|
+
}, yt = {
|
|
143
|
+
class: "mt-4 max-h-[400px] overflow-auto rounded bg-gray-100 p-8 font-mono text-xs leading-relaxed shadow-inner"
|
|
144
|
+
}, Lt = {
|
|
145
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
146
|
+
}, kt = {
|
|
147
|
+
class: "font-mono text-xs font-semibold"
|
|
148
|
+
}, St = {
|
|
149
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
150
|
+
}, wt = {
|
|
151
|
+
class: "break-all font-mono text-xs font-semibold"
|
|
152
|
+
}, It = {
|
|
153
|
+
key: 4
|
|
154
|
+
}, Tt = {
|
|
155
|
+
class: "text-xs text-fm-color-typo-secondary"
|
|
156
|
+
}, jt = {
|
|
157
|
+
class: "mt-4 max-h-[400px] overflow-auto rounded bg-gray-100 p-8 font-mono text-xs leading-relaxed shadow-inner"
|
|
158
|
+
}, A = 100, At = /* @__PURE__ */ le({
|
|
159
|
+
__name: "AuditLogList",
|
|
160
|
+
setup(c) {
|
|
161
|
+
const {
|
|
162
|
+
t: o
|
|
163
|
+
} = ne(), Y = de(), _ = ve(), I = f(!1), E = f([]), a = f(null), V = f(!1), v = f(1), T = f(!1), q = ie().format("YYYY-MM-DD"), S = f({
|
|
164
|
+
startDate: q,
|
|
165
|
+
endDate: q
|
|
166
|
+
}), g = f(), h = f(), x = f(), b = f(), z = k(() => _.members.map((s) => ({
|
|
167
|
+
label: s.name,
|
|
168
|
+
value: s.doc.userId
|
|
169
|
+
}))), G = k(() => J.map((s) => ({
|
|
170
|
+
label: s.label,
|
|
171
|
+
value: s.subject
|
|
172
|
+
}))), Z = k(() => [{
|
|
173
|
+
label: o("auditLog.action.manage"),
|
|
174
|
+
value: "manage"
|
|
175
|
+
}, {
|
|
176
|
+
label: o("auditLog.action.create"),
|
|
177
|
+
value: "create"
|
|
178
|
+
}, {
|
|
179
|
+
label: o("auditLog.action.read"),
|
|
180
|
+
value: "read"
|
|
181
|
+
}, {
|
|
182
|
+
label: o("auditLog.action.update"),
|
|
183
|
+
value: "update"
|
|
184
|
+
}, {
|
|
185
|
+
label: o("auditLog.action.delete"),
|
|
186
|
+
value: "delete"
|
|
187
|
+
}]), H = k(() => [{
|
|
188
|
+
label: o("auditLog.outcome.allowed"),
|
|
189
|
+
value: "allowed"
|
|
190
|
+
}, {
|
|
191
|
+
label: o("auditLog.outcome.denied"),
|
|
192
|
+
value: "denied"
|
|
193
|
+
}, {
|
|
194
|
+
label: o("auditLog.outcome.skipped"),
|
|
195
|
+
value: "skipped"
|
|
196
|
+
}]), Q = k(() => {
|
|
197
|
+
const {
|
|
198
|
+
startDate: s,
|
|
199
|
+
endDate: t
|
|
200
|
+
} = S.value;
|
|
201
|
+
return s && t ? `${s} – ${t}` : s || t || o("auditLog.dateRange.placeholder");
|
|
202
|
+
}), C = k(() => {
|
|
203
|
+
let s = E.value;
|
|
204
|
+
return g.value && g.value.length > 0 && (s = s.filter((t) => g.value.includes(t.userId))), h.value && h.value.length > 0 && (s = s.filter((t) => h.value.includes(t.subject))), x.value && x.value.length > 0 && (s = s.filter((t) => x.value.includes(t.outcome))), b.value && b.value.length > 0 && (s = s.filter((t) => b.value.includes(t.action))), s;
|
|
205
|
+
});
|
|
206
|
+
function N(s) {
|
|
207
|
+
var t;
|
|
208
|
+
return ((t = J.find((m) => m.subject === s)) == null ? void 0 : t.label) ?? ce[s];
|
|
209
|
+
}
|
|
210
|
+
const M = {
|
|
211
|
+
allowed: "success",
|
|
212
|
+
denied: "critical",
|
|
213
|
+
skipped: "warning"
|
|
214
|
+
}, W = [{
|
|
215
|
+
accessorKey: "timestamp",
|
|
216
|
+
header: () => o("auditLog.columns.timestamp"),
|
|
217
|
+
cell(s) {
|
|
218
|
+
const t = s.row.original;
|
|
219
|
+
return new Date(t.timestamp).toLocaleString();
|
|
220
|
+
}
|
|
221
|
+
}, {
|
|
222
|
+
accessorKey: "userId",
|
|
223
|
+
header: () => o("auditLog.columns.user"),
|
|
224
|
+
enableSorting: !1,
|
|
225
|
+
cell(s) {
|
|
226
|
+
const t = s.row.original, m = _.userIdToName[t.userId];
|
|
227
|
+
return n("div", {
|
|
228
|
+
class: "flex items-center gap-8"
|
|
229
|
+
}, [n(B.FmAvatar, {
|
|
230
|
+
initials: m || t.userId,
|
|
231
|
+
size: "sm"
|
|
232
|
+
}, null), n("span", null, [m || t.userId])]);
|
|
233
|
+
}
|
|
234
|
+
}, {
|
|
235
|
+
accessorKey: "subject",
|
|
236
|
+
header: () => o("auditLog.columns.subject"),
|
|
237
|
+
meta: {
|
|
238
|
+
cellClass: "text-left"
|
|
239
|
+
},
|
|
240
|
+
cell(s) {
|
|
241
|
+
const t = s.row.original, m = N(t.subject);
|
|
242
|
+
return m ? n("div", {
|
|
243
|
+
class: "text-left"
|
|
244
|
+
}, [n(B.FmTooltip, {
|
|
245
|
+
content: t.subject
|
|
246
|
+
}, {
|
|
247
|
+
default: () => [n("span", null, [m])]
|
|
248
|
+
})]) : n("div", {
|
|
249
|
+
class: "text-left"
|
|
250
|
+
}, [t.subject]);
|
|
251
|
+
}
|
|
252
|
+
}, {
|
|
253
|
+
accessorKey: "action",
|
|
254
|
+
header: () => o("auditLog.columns.action"),
|
|
255
|
+
enableSorting: !1
|
|
256
|
+
}, {
|
|
257
|
+
accessorKey: "outcome",
|
|
258
|
+
header: () => o("auditLog.columns.outcome"),
|
|
259
|
+
enableSorting: !1,
|
|
260
|
+
cell(s) {
|
|
261
|
+
const t = s.row.original;
|
|
262
|
+
return n(B.FmChip, {
|
|
263
|
+
variant: M[t.outcome] ?? "neutral",
|
|
264
|
+
label: t.outcome,
|
|
265
|
+
compact: !0
|
|
266
|
+
}, null);
|
|
267
|
+
}
|
|
268
|
+
}];
|
|
269
|
+
function K(s, t = !1) {
|
|
270
|
+
const [m, y, F] = s.split("-").map(Number), L = new Date(m, y - 1, F);
|
|
271
|
+
return t && L.setDate(L.getDate() + 1), L.toISOString().slice(0, 19).replace("T", " ");
|
|
272
|
+
}
|
|
273
|
+
async function j() {
|
|
274
|
+
I.value = !0;
|
|
275
|
+
try {
|
|
276
|
+
const {
|
|
277
|
+
startDate: s,
|
|
278
|
+
endDate: t
|
|
279
|
+
} = S.value, m = (v.value - 1) * A, [y] = await Promise.all([ge.read({
|
|
280
|
+
limit: A,
|
|
281
|
+
offset: m,
|
|
282
|
+
// Convert local date boundaries to UTC ISO strings so ClickHouse
|
|
283
|
+
// (which stores timestamps in UTC) receives the correct range.
|
|
284
|
+
...s ? {
|
|
285
|
+
from: K(s)
|
|
286
|
+
} : {},
|
|
287
|
+
...t ? {
|
|
288
|
+
to: K(t, !0)
|
|
289
|
+
} : {}
|
|
290
|
+
}), _.readTeamMembers()]);
|
|
291
|
+
E.value = y, T.value = y.length === A;
|
|
292
|
+
} finally {
|
|
293
|
+
I.value = !1;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
U(S, () => {
|
|
297
|
+
v.value = 1, j();
|
|
298
|
+
}), U([g, h, x, b], () => {
|
|
299
|
+
v.value = 1;
|
|
300
|
+
});
|
|
301
|
+
async function X() {
|
|
302
|
+
v.value > 1 && (v.value--, await j());
|
|
303
|
+
}
|
|
304
|
+
async function ee() {
|
|
305
|
+
T.value && (v.value++, await j());
|
|
306
|
+
}
|
|
307
|
+
function te(s) {
|
|
308
|
+
a.value = s, V.value = !0;
|
|
309
|
+
}
|
|
310
|
+
function oe() {
|
|
311
|
+
V.value = !1, a.value = null;
|
|
312
|
+
}
|
|
313
|
+
return U(Y.currentBusiness, (s) => {
|
|
314
|
+
s && (v.value = 1, j());
|
|
315
|
+
}, {
|
|
316
|
+
immediate: !0
|
|
317
|
+
}), (s, t) => {
|
|
318
|
+
const m = w("FmChip"), y = w("FmDateRangePicker"), F = w("FmTable"), L = w("FmButton"), ae = w("FmSideSheet");
|
|
319
|
+
return d(), r(D, null, [n(ue, {
|
|
320
|
+
heading: i(o)("auditLog.title")
|
|
321
|
+
}, {
|
|
322
|
+
default: O(() => [e("div", he, [e("div", xe, [n(y, {
|
|
323
|
+
modelValue: S.value,
|
|
324
|
+
"onUpdate:modelValue": t[0] || (t[0] = (u) => S.value = u),
|
|
325
|
+
"show-predefined-range": ""
|
|
326
|
+
}, {
|
|
327
|
+
"trigger-button": O(() => [n(m, {
|
|
328
|
+
label: Q.value,
|
|
329
|
+
icon: "calendar_month"
|
|
330
|
+
}, null, 8, ["label"])]),
|
|
331
|
+
_: 1
|
|
332
|
+
}, 8, ["modelValue"]), e("div", be, [n(P, {
|
|
333
|
+
modelValue: g.value,
|
|
334
|
+
"onUpdate:modelValue": t[1] || (t[1] = (u) => g.value = u),
|
|
335
|
+
items: z.value,
|
|
336
|
+
multiple: "",
|
|
337
|
+
variant: "dark",
|
|
338
|
+
placeholder: i(o)("auditLog.filter.user_placeholder"),
|
|
339
|
+
"selected-prefix": i(o)("auditLog.filter.selected_user_prefix"),
|
|
340
|
+
"chip-icon": "account_circle"
|
|
341
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), e("div", ye, [n(P, {
|
|
342
|
+
modelValue: h.value,
|
|
343
|
+
"onUpdate:modelValue": t[2] || (t[2] = (u) => h.value = u),
|
|
344
|
+
items: G.value,
|
|
345
|
+
multiple: "",
|
|
346
|
+
variant: "dark",
|
|
347
|
+
placeholder: i(o)("auditLog.filter.subject_placeholder"),
|
|
348
|
+
"selected-prefix": i(o)("auditLog.filter.selected_subject_prefix"),
|
|
349
|
+
"chip-icon": "badge"
|
|
350
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), e("div", Le, [n(P, {
|
|
351
|
+
modelValue: b.value,
|
|
352
|
+
"onUpdate:modelValue": t[3] || (t[3] = (u) => b.value = u),
|
|
353
|
+
items: Z.value,
|
|
354
|
+
multiple: "",
|
|
355
|
+
variant: "dark",
|
|
356
|
+
placeholder: i(o)("auditLog.filter.action_placeholder"),
|
|
357
|
+
"selected-prefix": i(o)("auditLog.filter.selected_action_prefix"),
|
|
358
|
+
searchable: !1
|
|
359
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), e("div", ke, [n(P, {
|
|
360
|
+
modelValue: x.value,
|
|
361
|
+
"onUpdate:modelValue": t[4] || (t[4] = (u) => x.value = u),
|
|
362
|
+
items: H.value,
|
|
363
|
+
multiple: "",
|
|
364
|
+
variant: "dark",
|
|
365
|
+
placeholder: i(o)("auditLog.filter.status_placeholder"),
|
|
366
|
+
"selected-prefix": i(o)("auditLog.filter.selected_status_prefix"),
|
|
367
|
+
searchable: !1,
|
|
368
|
+
"chip-icon": "check_circle"
|
|
369
|
+
}, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])]), !I.value && C.value.length === 0 ? (d(), $(i(me), {
|
|
370
|
+
key: 0,
|
|
371
|
+
title: i(o)("auditLog.noData.title"),
|
|
372
|
+
subtitle: i(o)("auditLog.noData.subtitle")
|
|
373
|
+
}, null, 8, ["title", "subtitle"])) : (d(), $(re, {
|
|
374
|
+
key: 1
|
|
375
|
+
}, {
|
|
376
|
+
default: O(() => [e("div", Se, [n(F, {
|
|
377
|
+
"column-defs": W,
|
|
378
|
+
"row-data": C.value,
|
|
379
|
+
"page-size": C.value.length,
|
|
380
|
+
loading: I.value,
|
|
381
|
+
"pin-header-row": "",
|
|
382
|
+
"hide-footer": "",
|
|
383
|
+
class: "min-h-0 flex-1 cursor-pointer",
|
|
384
|
+
onRowClick: t[5] || (t[5] = (u) => te(u.original))
|
|
385
|
+
}, null, 8, ["row-data", "page-size", "loading"]), v.value > 1 || T.value ? (d(), r("div", we, [n(L, {
|
|
386
|
+
variant: "tertiary",
|
|
387
|
+
icon: "chevron_left",
|
|
388
|
+
disabled: v.value === 1,
|
|
389
|
+
"aria-label": i(o)("auditLog.pagination.prevPage"),
|
|
390
|
+
onClick: X
|
|
391
|
+
}, null, 8, ["disabled", "aria-label"]), e("span", Ie, l(i(o)("auditLog.pagination.page", {
|
|
392
|
+
page: v.value
|
|
393
|
+
})), 1), n(L, {
|
|
394
|
+
variant: "tertiary",
|
|
395
|
+
icon: "chevron_right",
|
|
396
|
+
disabled: !T.value,
|
|
397
|
+
"aria-label": i(o)("auditLog.pagination.nextPage"),
|
|
398
|
+
onClick: ee
|
|
399
|
+
}, null, 8, ["disabled", "aria-label"])])) : p("", !0)])]),
|
|
400
|
+
_: 1
|
|
401
|
+
}))])]),
|
|
402
|
+
_: 1
|
|
403
|
+
}, 8, ["heading"]), n(ae, {
|
|
404
|
+
header: i(o)("auditLog.detail.header"),
|
|
405
|
+
"model-value": V.value,
|
|
406
|
+
"max-width": 480,
|
|
407
|
+
"dismiss-away": "",
|
|
408
|
+
"onUpdate:modelValue": t[6] || (t[6] = (u) => {
|
|
409
|
+
u || oe();
|
|
410
|
+
})
|
|
411
|
+
}, {
|
|
412
|
+
default: O(() => [a.value ? (d(), r("div", Te, [e("div", je, [e("div", De, [e("span", Oe, l(N(a.value.subject) || a.value.subject), 1), n(m, {
|
|
413
|
+
variant: M[a.value.outcome] ?? "neutral",
|
|
414
|
+
label: a.value.outcome,
|
|
415
|
+
compact: ""
|
|
416
|
+
}, null, 8, ["variant", "label"])]), t[7] || (t[7] = e("hr", {
|
|
417
|
+
class: "border-fm-color-border-default"
|
|
418
|
+
}, null, -1)), e("div", Pe, [e("div", null, [e("p", Ve, l(i(o)("auditLog.detail.timestamp")), 1), e("p", Ce, l(new Date(a.value.timestamp).toLocaleString()), 1)]), i(_).userIdToName[a.value.userId] ? (d(), r("div", Ne, [e("p", Fe, l(i(o)("auditLog.detail.user")), 1), e("p", Re, l(i(_).userIdToName[a.value.userId]), 1)])) : p("", !0), e("div", null, [e("p", Ue, l(i(o)("auditLog.detail.email")), 1), e("p", Be, l(i(_).userIdToEmail[a.value.userId] || a.value.userId), 1)]), e("div", null, [e("p", Ae, l(i(o)("auditLog.detail.action")), 1), e("p", Ee, l(a.value.action), 1)]), e("div", null, [e("p", qe, l(i(o)("auditLog.detail.subject")), 1), e("p", Me, l(N(a.value.subject) || a.value.subject), 1)]), a.value.field ? (d(), r("div", Ke, [e("p", $e, l(i(o)("auditLog.detail.field")), 1), e("p", Je, l(a.value.field), 1)])) : p("", !0), e("div", null, [e("p", Ye, l(i(o)("auditLog.detail.business")), 1), e("p", ze, l(a.value.businessId || "-"), 1)]), e("div", null, [e("p", Ge, l(i(o)("auditLog.detail.restaurant")), 1), e("p", Ze, l(a.value.restaurantId || "-"), 1)])])]), e("div", He, [e("div", Qe, [e("p", We, l(i(o)("auditLog.detail.metadata")), 1)]), t[8] || (t[8] = e("hr", {
|
|
419
|
+
class: "border-fm-color-border-default"
|
|
420
|
+
}, null, -1)), e("div", Xe, [a.value.metadata.reason ? (d(), r("div", et, [e("p", tt, l(i(o)("auditLog.detail.reason")), 1), e("p", ot, l(a.value.metadata.reason), 1)])) : p("", !0), e("div", null, [e("p", at, l(i(o)("auditLog.detail.resolvedFrom")), 1), e("p", lt, l(a.value.metadata.resolvedFrom), 1)]), a.value.metadata.permissionSetId ? (d(), r("div", st, [e("p", it, l(i(o)("auditLog.detail.permissionSet")), 1), a.value.metadata.resolvedFrom === "systemPermissionSet" ? (d(), r(D, {
|
|
421
|
+
key: 0
|
|
422
|
+
}, [e("p", nt, l(a.value.metadata.permissionSetName) + " (system)", 1), e("p", dt, l(a.value.metadata.permissionSetId), 1)], 64)) : (d(), r(D, {
|
|
423
|
+
key: 1
|
|
424
|
+
}, [e("p", rt, l(a.value.metadata.permissionSetName || a.value.metadata.permissionSetId), 1), a.value.metadata.permissionSetName ? (d(), r("p", ct, l(a.value.metadata.permissionSetId), 1)) : p("", !0)], 64))])) : p("", !0), a.value.metadata.trace && a.value.metadata.trace.length > 0 ? (d(), r("div", ut, [e("p", mt, l(i(o)("auditLog.detail.permissionTrace")), 1), e("ol", ft, [(d(!0), r(D, null, se(a.value.metadata.trace, (u, R) => (d(), r("li", {
|
|
425
|
+
key: R,
|
|
426
|
+
class: "flex items-center gap-6"
|
|
427
|
+
}, [e("span", pt, l(R + 1), 1), e("span", vt, l(u), 1), R < a.value.metadata.trace.length - 1 ? (d(), r("span", _t, "→")) : p("", !0)]))), 128))])])) : p("", !0), e("div", null, [e("p", gt, l(i(o)("auditLog.detail.decisivePermission")), 1), e("pre", ht, l(JSON.stringify(a.value.metadata.decisivePermission, null, 2)), 1)]), a.value.metadata.decisiveRule ? (d(), r("div", xt, [e("p", bt, l(i(o)("auditLog.detail.decisiveRule")), 1), e("pre", yt, l(JSON.stringify(a.value.metadata.decisiveRule, null, 2)), 1)])) : p("", !0), e("div", null, [e("p", Lt, l(i(o)("auditLog.detail.requestMethod")), 1), e("p", kt, l(a.value.metadata.requestMethod), 1)]), e("div", null, [e("p", St, l(i(o)("auditLog.detail.requestPath")), 1), e("p", wt, l(a.value.metadata.requestPath), 1)]), a.value.metadata.requestBody && Object.keys(a.value.metadata.requestBody).length > 0 ? (d(), r("div", It, [e("p", Tt, l(i(o)("auditLog.detail.requestBody")), 1), e("pre", jt, l(JSON.stringify(a.value.metadata.requestBody, null, 2)), 1)])) : p("", !0)])])])) : p("", !0)]),
|
|
428
|
+
_: 1
|
|
429
|
+
}, 8, ["header", "model-value"])], 64);
|
|
430
|
+
};
|
|
431
|
+
}
|
|
432
|
+
});
|
|
433
|
+
export {
|
|
434
|
+
At as default
|
|
435
|
+
};
|
|
@@ -2,14 +2,14 @@ import { createElementBlock as $, openBlock as h, createElementVNode as c, toRaw
|
|
|
2
2
|
import { useCoreStore as be, useI18n as Ve, RestaurantSelector as me } from "@feedmepos/mf-common";
|
|
3
3
|
import { useSnackbar as Fe, components as xe, useDialog as Le, useBreakpoints as Be, FmButtonVariant as De } from "@feedmepos/ui-library";
|
|
4
4
|
import { _ as Ne, S as ce } from "./SelectFilter-NbXrJ4iH.js";
|
|
5
|
-
import { _ as Pe } from "./app-
|
|
5
|
+
import { _ as Pe } from "./app-kKq54h9D.js";
|
|
6
6
|
import { _ as Te } from "./index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js";
|
|
7
7
|
import { u as we } from "./useSearch-B6WK1LBB.js";
|
|
8
|
-
import { u as ke, E as ze } from "./employee-
|
|
9
|
-
import { l as Ae } from "./lodash-
|
|
8
|
+
import { u as ke, E as ze } from "./employee-CRKx3zN0.js";
|
|
9
|
+
import { l as Ae } from "./lodash-CeWi5dyp.js";
|
|
10
10
|
import { u as je, _ as de, a as pe, b as Ke } from "./useRestaurantMap-D5BNPLKh.js";
|
|
11
|
-
import { u as Ge } from "./useLoading-
|
|
12
|
-
import { u as ne } from "./useAppStore-
|
|
11
|
+
import { u as Ge } from "./useLoading-1yy1KHsE.js";
|
|
12
|
+
import { u as ne } from "./useAppStore-DoX0IUFz.js";
|
|
13
13
|
const qe = {};
|
|
14
14
|
function He(S, O) {
|
|
15
15
|
return h(), $("div", null, [...O[0] || (O[0] = [
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { defineComponent as V, ref as u, computed as B, watch as A, resolveComponent as
|
|
2
|
-
import { useRouter as
|
|
3
|
-
import { useI18n as
|
|
4
|
-
import { _ as
|
|
5
|
-
import { _ as
|
|
1
|
+
import { defineComponent as V, ref as u, computed as B, watch as A, resolveComponent as i, createBlock as s, openBlock as c, withCtx as p, createElementVNode as C, createVNode as d, resolveDynamicComponent as T, createCommentVNode as S } from "vue";
|
|
2
|
+
import { useRouter as k, useRoute as F } from "vue-router";
|
|
3
|
+
import { useI18n as N } from "@feedmepos/mf-common";
|
|
4
|
+
import { _ as g } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
5
|
+
import { _ as h } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
|
|
6
6
|
import "@feedmepos/ui-library";
|
|
7
|
-
import "./index-
|
|
8
|
-
import { R as v } from "./app-
|
|
9
|
-
import "./useAppStore-
|
|
7
|
+
import "./index-DRoNwfyW.js";
|
|
8
|
+
import { R as v } from "./app-kKq54h9D.js";
|
|
9
|
+
import "./useAppStore-DoX0IUFz.js";
|
|
10
|
+
import "./index-TP4vQCyq.js";
|
|
10
11
|
/* empty css */
|
|
11
12
|
/* empty css */
|
|
12
|
-
import "./team-
|
|
13
|
-
const
|
|
13
|
+
import "./team-CuLNHjGN.js";
|
|
14
|
+
const w = { class: "space-y-24" }, P = /* @__PURE__ */ V({
|
|
14
15
|
__name: "Main",
|
|
15
|
-
setup(
|
|
16
|
-
const { t: a } =
|
|
16
|
+
setup(x) {
|
|
17
|
+
const { t: a } = N(), f = k(), R = F(), _ = u(), b = u(), t = u("member");
|
|
17
18
|
R.name === v.TEAM_ROLE ? t.value = "role" : t.value = "member";
|
|
18
|
-
const
|
|
19
|
+
const r = B(() => n.value.find((e) => e.value === t.value) || n.value[0]);
|
|
19
20
|
A(t, (e) => {
|
|
20
21
|
e === "member" ? f.replace({ name: v.TEAM_MEMBER }) : e === "role" && f.replace({ name: v.TEAM_ROLE });
|
|
21
22
|
});
|
|
@@ -30,42 +31,42 @@ const x = { class: "space-y-24" }, J = /* @__PURE__ */ V({
|
|
|
30
31
|
}
|
|
31
32
|
},
|
|
32
33
|
{
|
|
33
|
-
label: a("
|
|
34
|
+
label: a("permissionSet.title"),
|
|
34
35
|
value: "role",
|
|
35
|
-
createButtonLabel: a("
|
|
36
|
+
createButtonLabel: a("permissionSet.createButtonLabel"),
|
|
36
37
|
createButtonAction: () => {
|
|
37
38
|
var e;
|
|
38
39
|
(e = b.value) == null || e.create();
|
|
39
40
|
}
|
|
40
41
|
}
|
|
41
42
|
]);
|
|
42
|
-
return (e,
|
|
43
|
-
const L =
|
|
44
|
-
return
|
|
45
|
-
heading:
|
|
43
|
+
return (e, l) => {
|
|
44
|
+
const L = i("FmSpacer"), E = i("FmTabs"), M = i("RouterView");
|
|
45
|
+
return c(), s(h, {
|
|
46
|
+
heading: r.value.label
|
|
46
47
|
}, {
|
|
47
48
|
"append-heading": p(() => {
|
|
48
49
|
var o;
|
|
49
50
|
return [
|
|
50
51
|
d(L),
|
|
51
|
-
(o =
|
|
52
|
+
(o = r.value) != null && o.createButtonLabel ? (c(), s(g, {
|
|
52
53
|
key: 0,
|
|
53
54
|
icon: "add",
|
|
54
|
-
label:
|
|
55
|
-
onClick:
|
|
56
|
-
}, null, 8, ["label"])) :
|
|
55
|
+
label: r.value.createButtonLabel,
|
|
56
|
+
onClick: l[0] || (l[0] = (m) => r.value.createButtonAction())
|
|
57
|
+
}, null, 8, ["label"])) : S("", !0)
|
|
57
58
|
];
|
|
58
59
|
}),
|
|
59
60
|
default: p(() => [
|
|
60
|
-
C("div",
|
|
61
|
+
C("div", w, [
|
|
61
62
|
d(E, {
|
|
62
63
|
modelValue: t.value,
|
|
63
|
-
"onUpdate:modelValue":
|
|
64
|
+
"onUpdate:modelValue": l[1] || (l[1] = (o) => t.value = o),
|
|
64
65
|
items: n.value
|
|
65
66
|
}, null, 8, ["modelValue", "items"]),
|
|
66
67
|
d(M, null, {
|
|
67
68
|
default: p(({ Component: o }) => [
|
|
68
|
-
(
|
|
69
|
+
(c(), s(T(o), {
|
|
69
70
|
ref: (m) => {
|
|
70
71
|
t.value === "member" && (_.value = m), t.value === "role" && (b.value = m);
|
|
71
72
|
}
|
|
@@ -81,5 +82,5 @@ const x = { class: "space-y-24" }, J = /* @__PURE__ */ V({
|
|
|
81
82
|
}
|
|
82
83
|
});
|
|
83
84
|
export {
|
|
84
|
-
|
|
85
|
+
P as default
|
|
85
86
|
};
|
|
@@ -3,15 +3,15 @@ import { useRouter as of, useRoute as cf } from "vue-router";
|
|
|
3
3
|
import { useCoreStore as hf, useI18n as uf } from "@feedmepos/mf-common";
|
|
4
4
|
import { _ as vf } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
5
5
|
import { _ as pf } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
|
|
6
|
-
import { u as df } from "./useAppStore-
|
|
6
|
+
import { u as df } from "./useAppStore-DoX0IUFz.js";
|
|
7
7
|
import "@feedmepos/ui-library";
|
|
8
8
|
/* empty css */
|
|
9
|
-
import { u as mf } from "./employee-
|
|
10
|
-
import "./lodash-
|
|
11
|
-
import "./index-
|
|
12
|
-
import { R as vt } from "./app-
|
|
13
|
-
import "./dayjs.min-
|
|
14
|
-
import "./timesheet-
|
|
9
|
+
import { u as mf } from "./employee-CRKx3zN0.js";
|
|
10
|
+
import "./lodash-CeWi5dyp.js";
|
|
11
|
+
import "./index-DRoNwfyW.js";
|
|
12
|
+
import { R as vt } from "./app-kKq54h9D.js";
|
|
13
|
+
import "./dayjs.min-CGTR0SS0.js";
|
|
14
|
+
import "./timesheet-V636ISlI.js";
|
|
15
15
|
var In = {};
|
|
16
16
|
/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */
|
|
17
17
|
var jt = {};
|