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