@feedmepos/mf-hrm-portal 1.1.6-dev → 2.0.0

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.
Files changed (98) hide show
  1. package/dist/AuditLogList-Cm3ueTso.js +474 -0
  2. package/dist/EmployeeList-vMcIqBU_.js +626 -0
  3. package/dist/{main-C370wsCl.js → Main-CeGYov-a.js} +1502 -1531
  4. package/dist/Main-gHCENd4i.js +86 -0
  5. package/dist/{PageLayout.vue_vue_type_script_setup_true_lang-DuwNwJDM.js → PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js} +2 -2
  6. package/dist/PermissionSetList-Dw69OYF4.js +323 -0
  7. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-bvPOPUhu.js +3092 -0
  8. package/dist/ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js +38 -0
  9. package/dist/RoleList-D1CrixYc.js +497 -0
  10. package/dist/{useSearch-C25VELOk.js → SelectFilter-NbXrJ4iH.js} +90 -101
  11. package/dist/TeamMemberList-M0Q8CP4h.js +973 -0
  12. package/dist/{TimesheetList-qaolOL4w.js → TimesheetList-BmOfy0pc.js} +31 -29
  13. package/dist/api/audit-log/index.d.ts +14 -0
  14. package/dist/api/index.d.ts +5 -0
  15. package/dist/api/permission-assignment/index.d.ts +10 -0
  16. package/dist/api/permission-set/index.d.ts +8 -0
  17. package/dist/api/report-query/index.d.ts +5 -0
  18. package/dist/api/team/index.d.ts +2 -1
  19. package/dist/app-RUdgf-7_.js +3286 -0
  20. package/dist/app.js +1 -1
  21. package/dist/components/AppForm.vue.d.ts +3 -2
  22. package/dist/components/CheckboxInput.vue.d.ts +10 -4
  23. package/dist/components/CollapsibleWrapper.vue.d.ts +3 -2
  24. package/dist/components/form/SelectFilter.vue.d.ts +3 -2
  25. package/dist/components/layout/FormColumn.vue.d.ts +6 -3
  26. package/dist/components/layout/FormItem.vue.d.ts +2 -1
  27. package/dist/components/layout/FormSection.vue.d.ts +2 -1
  28. package/dist/components/layout/FullWrapper.vue.d.ts +6 -3
  29. package/dist/components/layout/PageLayout.vue.d.ts +2 -1
  30. package/dist/components/menu/BottomSheetMenu.vue.d.ts +2 -1
  31. package/dist/components/menu/BottomSheetMenuItem.vue.d.ts +6 -3
  32. package/dist/components/table/EmptyDataTemplate/index.vue.d.ts +6 -3
  33. package/dist/composables/useAppStore.d.ts +6 -6
  34. package/dist/composables/useDateRange.d.ts +1 -1
  35. package/dist/composables/useReportPermissions.d.ts +14 -0
  36. package/dist/composables/useRestaurantMap.d.ts +4 -8
  37. package/dist/composables/useSheet.d.ts +1 -1
  38. package/dist/dayjs.min-D9w2-Exz.js +282 -0
  39. package/dist/employee-B3jBmvNJ.js +144 -0
  40. package/dist/helpers/permission-set.d.ts +69 -0
  41. package/dist/helpers/portal-user.d.ts +8 -0
  42. package/dist/helpers/rule.d.ts +5 -4
  43. package/dist/index-BMVQbdBd.js +827 -0
  44. package/dist/index-BS6B6k7h.js +10340 -0
  45. package/dist/{empty-placeholder-ey8LJtN1.js → index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js} +43 -2
  46. package/dist/{lodash-B5BTJU4_.js → lodash-CglPbFKR.js} +326 -343
  47. package/dist/router/shared.d.ts +4 -1
  48. package/dist/stores/employee.d.ts +4 -4
  49. package/dist/stores/permission-assignment.d.ts +277 -0
  50. package/dist/stores/permission-set.d.ts +265 -0
  51. package/dist/stores/role.d.ts +4 -4
  52. package/dist/stores/team.d.ts +300 -0
  53. package/dist/stores/timesheet.d.ts +19 -19
  54. package/dist/style.css +1 -1
  55. package/dist/team-afjBSzOz.js +33 -0
  56. package/dist/{timesheet-Cy-jSzje.js → timesheet-fOBJOS1i.js} +14 -14
  57. package/dist/tsconfig.app.tsbuildinfo +1 -1
  58. package/dist/types/audit-log.d.ts +1 -0
  59. package/dist/types/permission-assignment.d.ts +20 -0
  60. package/dist/types/permission-set.d.ts +24 -0
  61. package/dist/types/report-query.d.ts +6 -0
  62. package/dist/types/team.d.ts +13 -3
  63. package/dist/useAppStore-D-SLROq6.js +168 -0
  64. package/dist/useLoading-CLQGJW7G.js +99 -0
  65. package/dist/useReportPermissions-Cx4ghxj6.js +65 -0
  66. package/dist/{useRestaurantMap-CpS9-OSq.js → useRestaurantMap-D5BNPLKh.js} +7 -7
  67. package/dist/useSearch-B6WK1LBB.js +15 -0
  68. package/dist/views/audit-log/locales/index.d.ts +295 -0
  69. package/dist/views/hr/employee/{components/EmployeeForm.vue.d.ts → EmployeeForm.vue.d.ts} +10 -7
  70. package/dist/views/team/Main.vue.d.ts +2 -0
  71. package/dist/views/team/components/BasePermission.vue.d.ts +64 -0
  72. package/dist/views/team/components/{TeamMemberConditionPermission.vue.d.ts → ConditionPermission.vue.d.ts} +14 -1
  73. package/dist/views/team/components/InheritPermissionTooltip.vue.d.ts +14 -0
  74. package/dist/views/team/components/PermissionWithTooltip.vue.d.ts +14 -0
  75. package/dist/views/team/components/PortalPermissionEditor.vue.d.ts +68 -28
  76. package/dist/views/team/components/{TeamMemberRolePermission.vue.d.ts → PosRolePermission.vue.d.ts} +14 -1
  77. package/dist/views/team/locales/index.d.ts +200 -4
  78. package/dist/views/team/{components → member}/AddMemberForm.vue.d.ts +1 -0
  79. package/dist/views/team/member/TeamMemberList.vue.d.ts +4 -0
  80. package/dist/views/team/member/TeamMemberMasterUser.vue.d.ts +55 -0
  81. package/dist/views/team/permission-set/PermissionSetForm.vue.d.ts +19 -0
  82. package/dist/views/team/permission-set/PermissionSetList.vue.d.ts +5 -0
  83. package/package.json +15 -8
  84. package/dist/EmployeeList-CP42mLpi.js +0 -605
  85. package/dist/RoleList-CsctaXlu.js +0 -492
  86. package/dist/TeamMemberList-DtXoUa5K.js +0 -1508
  87. package/dist/app-G_Dbs0OJ.js +0 -1202
  88. package/dist/employee-BTWpYxn5.js +0 -449
  89. package/dist/index-8ift6lz3.js +0 -57
  90. package/dist/rule-CM7JgjNr.js +0 -142112
  91. package/dist/types/permission.d.ts +0 -4
  92. package/dist/useAppStore-zINIo0LR.js +0 -93
  93. package/dist/useLoading-CWBRIBiy.js +0 -141
  94. package/dist/views/team/components/TeamMemberBasePermission.vue.d.ts +0 -36
  95. package/dist/views/team/components/TeamMemberMasterUser.vue.d.ts +0 -718
  96. /package/dist/views/{hr/main.vue.d.ts → audit-log/AuditLogList.vue.d.ts} +0 -0
  97. /package/dist/views/{team/TeamMemberList.vue.d.ts → hr/Main.vue.d.ts} +0 -0
  98. /package/dist/views/team/{components → member}/MemberInfo.vue.d.ts +0 -0
@@ -0,0 +1,474 @@
1
+ import { defineComponent as se, ref as _, computed as k, watch as R, resolveComponent as D, createElementBlock as m, openBlock as r, Fragment as A, createVNode as d, unref as s, withCtx as F, createElementVNode as e, createBlock as $, createCommentVNode as g, toDisplayString as a, renderList as ie, createTextVNode as Y } from "vue";
2
+ import { d as ne } from "./dayjs.min-D9w2-Exz.js";
3
+ import { useI18n as de, useCoreStore as ce } from "@feedmepos/mf-common";
4
+ import { _ as re, G as ue } from "./app-RUdgf-7_.js";
5
+ import { _ as me } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
6
+ import { _ as fe } from "./index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js";
7
+ import { components as G } from "@feedmepos/ui-library";
8
+ import { g as pe, b as _e, p as J } from "./index-BS6B6k7h.js";
9
+ import { u as ve } from "./team-afjBSzOz.js";
10
+ import { S as U } from "./SelectFilter-NbXrJ4iH.js";
11
+ const ge = "/audit-logs", he = {
12
+ async read(n) {
13
+ var O, p, L, I;
14
+ const t = {
15
+ limit: (n == null ? void 0 : n.limit) ?? 100,
16
+ offset: (n == null ? void 0 : n.offset) ?? 0,
17
+ ...n != null && n.from ? { from: n.from } : {},
18
+ ...n != null && n.to ? { to: n.to } : {},
19
+ ...(O = n == null ? void 0 : n.userIds) != null && O.length ? { userIds: n.userIds } : {},
20
+ ...(p = n == null ? void 0 : n.subjects) != null && p.length ? { subjects: n.subjects } : {},
21
+ ...(L = n == null ? void 0 : n.actions) != null && L.length ? { actions: n.actions } : {},
22
+ ...(I = n == null ? void 0 : n.outcomes) != null && I.length ? { outcomes: n.outcomes } : {}
23
+ };
24
+ return console.log("[AuditLogAPI] request params:", t), pe(
25
+ await _e().get(ge, {
26
+ params: t,
27
+ // Serialize arrays as repeated params: key=val1&key=val2
28
+ // (NestJS @Query expects this; axios default adds brackets which break matching)
29
+ paramsSerializer: (l) => {
30
+ const y = new URLSearchParams();
31
+ for (const [f, v] of Object.entries(l))
32
+ if (Array.isArray(v))
33
+ for (const N of v) y.append(f, String(N));
34
+ else v != null && y.append(f, String(v));
35
+ return console.log("[AuditLogAPI] serialized query string:", y.toString()), y.toString();
36
+ }
37
+ })
38
+ );
39
+ }
40
+ }, be = {
41
+ class: "flex flex-1 flex-col gap-16 min-h-0"
42
+ }, xe = {
43
+ class: "flex items-center gap-8"
44
+ }, ye = {
45
+ class: "w-fit"
46
+ }, Le = {
47
+ class: "w-fit"
48
+ }, Se = {
49
+ class: "w-fit"
50
+ }, ke = {
51
+ class: "w-fit"
52
+ }, Ie = {
53
+ class: "flex h-full flex-col"
54
+ }, we = {
55
+ key: 0,
56
+ class: "flex shrink-0 items-center justify-end border-t border-fm-color-border-default py-4"
57
+ }, Te = {
58
+ class: "text-sm text-fm-color-typo-secondary"
59
+ }, je = {
60
+ key: 0,
61
+ class: "space-y-12 p-4 text-sm"
62
+ }, Pe = {
63
+ class: "rounded-lg border border-fm-color-border-default"
64
+ }, Ve = {
65
+ class: "flex items-start justify-between gap-8 p-12"
66
+ }, Ce = {
67
+ class: "text-base font-bold leading-snug text-fm-color-typo-primary flex-1 min-w-0"
68
+ }, De = {
69
+ class: "audit-log-operation-label-detail font-semibold"
70
+ }, Oe = {
71
+ class: "space-y-12 p-12"
72
+ }, Ne = {
73
+ class: "text-xs text-fm-color-typo-secondary"
74
+ }, Ae = {
75
+ class: "font-semibold"
76
+ }, Fe = {
77
+ key: 0
78
+ }, Ue = {
79
+ class: "text-xs text-fm-color-typo-secondary"
80
+ }, Be = {
81
+ class: "font-semibold"
82
+ }, Ee = {
83
+ class: "text-xs text-fm-color-typo-secondary"
84
+ }, Re = {
85
+ class: "break-all font-mono text-xs font-semibold"
86
+ }, qe = {
87
+ class: "text-xs text-fm-color-typo-secondary"
88
+ }, Me = {
89
+ class: "font-semibold"
90
+ }, ze = {
91
+ class: "text-xs text-fm-color-typo-secondary"
92
+ }, Ke = {
93
+ class: "font-semibold"
94
+ }, $e = {
95
+ key: 1
96
+ }, Ye = {
97
+ class: "text-xs text-fm-color-typo-secondary"
98
+ }, Ge = {
99
+ class: "font-semibold"
100
+ }, Je = {
101
+ class: "text-xs text-fm-color-typo-secondary"
102
+ }, Ze = {
103
+ class: "break-all font-mono text-xs font-semibold"
104
+ }, He = {
105
+ class: "text-xs text-fm-color-typo-secondary"
106
+ }, Qe = {
107
+ class: "font-semibold"
108
+ }, We = {
109
+ class: "rounded-lg border border-fm-color-border-default"
110
+ }, Xe = {
111
+ class: "p-12"
112
+ }, et = {
113
+ class: "text-base font-bold text-fm-color-typo-primary"
114
+ }, tt = {
115
+ class: "space-y-12 p-12"
116
+ }, ot = {
117
+ key: 0
118
+ }, lt = {
119
+ class: "text-xs text-fm-color-typo-secondary"
120
+ }, at = {
121
+ class: "font-semibold"
122
+ }, st = {
123
+ class: "text-xs text-fm-color-typo-secondary"
124
+ }, it = {
125
+ class: "font-semibold"
126
+ }, nt = {
127
+ key: 1
128
+ }, dt = {
129
+ class: "text-xs text-fm-color-typo-secondary"
130
+ }, ct = {
131
+ class: "font-semibold"
132
+ }, rt = {
133
+ class: "break-all font-mono text-xs text-fm-color-typo-secondary"
134
+ }, ut = {
135
+ class: "font-semibold"
136
+ }, mt = {
137
+ key: 0,
138
+ class: "break-all font-mono text-xs text-fm-color-typo-secondary"
139
+ }, ft = {
140
+ key: 2
141
+ }, pt = {
142
+ class: "text-xs text-fm-color-typo-secondary"
143
+ }, _t = {
144
+ class: "mt-4 space-y-4"
145
+ }, vt = {
146
+ 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"
147
+ }, gt = {
148
+ class: "text-xs font-semibold"
149
+ }, ht = {
150
+ key: 0,
151
+ class: "text-fm-color-typo-secondary"
152
+ }, bt = {
153
+ class: "text-xs text-fm-color-typo-secondary"
154
+ }, xt = {
155
+ class: "font-mono text-xs font-semibold"
156
+ }, yt = {
157
+ class: "text-xs text-fm-color-typo-secondary"
158
+ }, Lt = {
159
+ class: "break-all font-mono text-xs font-semibold"
160
+ }, St = {
161
+ key: 3
162
+ }, kt = {
163
+ class: "text-xs text-fm-color-typo-secondary"
164
+ }, It = {
165
+ class: "mt-4 max-h-[400px] overflow-auto rounded bg-gray-100 p-8 font-mono text-xs leading-relaxed shadow-inner"
166
+ }, q = 100, Ft = /* @__PURE__ */ se({
167
+ __name: "AuditLogList",
168
+ setup(n) {
169
+ const {
170
+ t
171
+ } = de(), O = ce(), p = ve(), L = _(!1), I = _([]), l = _(null), y = _(!1), f = _(1), v = _(!1), N = ne().format("YYYY-MM-DD"), w = _({
172
+ startDate: N,
173
+ endDate: N
174
+ }), T = _(), j = _(), P = _(), V = _(), Z = k(() => p.members.map((i) => ({
175
+ label: i.name,
176
+ value: i.doc.userId
177
+ }))), H = k(() => J.map((i) => ({
178
+ label: i.label,
179
+ value: i.subject
180
+ }))), Q = k(() => [{
181
+ label: t("auditLog.action.manage"),
182
+ value: "manage"
183
+ }, {
184
+ label: t("auditLog.action.create"),
185
+ value: "create"
186
+ }, {
187
+ label: t("auditLog.action.read"),
188
+ value: "read"
189
+ }, {
190
+ label: t("auditLog.action.update"),
191
+ value: "update"
192
+ }, {
193
+ label: t("auditLog.action.delete"),
194
+ value: "delete"
195
+ }]), W = k(() => [{
196
+ label: t("auditLog.outcome.allowed"),
197
+ value: "allowed"
198
+ }, {
199
+ label: t("auditLog.outcome.denied"),
200
+ value: "denied"
201
+ }, {
202
+ label: t("auditLog.outcome.skipped"),
203
+ value: "skipped"
204
+ }]), X = k(() => {
205
+ const {
206
+ startDate: i,
207
+ endDate: o
208
+ } = w.value;
209
+ return i && o ? `${i} – ${o}` : i || o || t("auditLog.dateRange.placeholder");
210
+ }), B = k(() => I.value);
211
+ function M(i) {
212
+ var o;
213
+ return ((o = J.find((u) => u.subject === i)) == null ? void 0 : o.label) ?? ue[i];
214
+ }
215
+ const z = {
216
+ allowed: "success",
217
+ denied: "critical",
218
+ skipped: "warning"
219
+ }, ee = [{
220
+ accessorKey: "timestamp",
221
+ header: () => t("auditLog.columns.timestamp"),
222
+ cell(i) {
223
+ const o = i.row.original;
224
+ return new Date(o.timestamp).toLocaleString();
225
+ }
226
+ }, {
227
+ accessorKey: "userId",
228
+ header: () => t("auditLog.columns.user"),
229
+ enableSorting: !1,
230
+ size: 220,
231
+ cell(i) {
232
+ const o = i.row.original, u = p.userIdToName[o.userId], h = p.userIdToPhone[o.userId], b = p.userIdToEmail[o.userId];
233
+ return d("div", {
234
+ class: "flex items-center gap-8"
235
+ }, [d(G.FmAvatar, {
236
+ initials: u || o.userId,
237
+ size: "sm",
238
+ class: "shrink-0"
239
+ }, null), d("div", {
240
+ class: "min-w-0"
241
+ }, [u && d("p", {
242
+ class: "truncate font-semibold"
243
+ }, [u, h && d("span", {
244
+ class: "font-normal"
245
+ }, [Y(" ("), h, Y(")")])]), b && d("p", {
246
+ class: "truncate"
247
+ }, [b]), d("p", {
248
+ class: "truncate font-mono text-[10px] text-fm-color-typo-tertiary"
249
+ }, [o.userId])])]);
250
+ }
251
+ }, {
252
+ accessorKey: "subject",
253
+ header: () => t("auditLog.columns.subject"),
254
+ meta: {
255
+ cellClass: "text-left"
256
+ },
257
+ cell(i) {
258
+ const o = i.row.original, u = M(o.subject);
259
+ return u ? d("div", {
260
+ class: "text-left"
261
+ }, [d("span", null, [u]), d("p", {
262
+ class: "text-xs text-fm-color-typo-tertiary"
263
+ }, [o.subject])]) : d("div", {
264
+ class: "text-left"
265
+ }, [o.subject]);
266
+ }
267
+ }, {
268
+ accessorKey: "action",
269
+ header: () => t("auditLog.columns.action"),
270
+ enableSorting: !1
271
+ }, {
272
+ accessorKey: "operationLabel",
273
+ header: () => t("auditLog.columns.operation"),
274
+ enableSorting: !1,
275
+ size: 240,
276
+ meta: {
277
+ cellSpanClass: "audit-log-operation-label-table"
278
+ },
279
+ cell(i) {
280
+ return i.row.original.metadata.operationLabel ?? "-";
281
+ }
282
+ }, {
283
+ accessorKey: "outcome",
284
+ header: () => t("auditLog.columns.outcome"),
285
+ enableSorting: !1,
286
+ cell(i) {
287
+ const o = i.row.original;
288
+ return d(G.FmChip, {
289
+ variant: z[o.outcome] ?? "neutral",
290
+ label: o.outcome,
291
+ compact: !0
292
+ }, null);
293
+ }
294
+ }];
295
+ function K(i, o = !1) {
296
+ const [u, h, b] = i.split("-").map(Number), x = new Date(u, h - 1, b);
297
+ return o && x.setDate(x.getDate() + 1), x.toISOString().slice(0, 19).replace("T", " ");
298
+ }
299
+ async function C() {
300
+ var i, o, u, h;
301
+ L.value = !0;
302
+ try {
303
+ const {
304
+ startDate: b,
305
+ endDate: x
306
+ } = w.value, E = (f.value - 1) * q, c = {
307
+ limit: q,
308
+ offset: E,
309
+ // Convert local date boundaries to UTC ISO strings so ClickHouse
310
+ // (which stores timestamps in UTC) receives the correct range.
311
+ ...b ? {
312
+ from: K(b)
313
+ } : {},
314
+ ...x ? {
315
+ to: K(x, !0)
316
+ } : {},
317
+ ...(i = T.value) != null && i.length ? {
318
+ userIds: T.value
319
+ } : {},
320
+ ...(o = j.value) != null && o.length ? {
321
+ subjects: j.value
322
+ } : {},
323
+ ...(u = V.value) != null && u.length ? {
324
+ actions: V.value
325
+ } : {},
326
+ ...(h = P.value) != null && h.length ? {
327
+ outcomes: P.value
328
+ } : {}
329
+ }, S = await he.read(c);
330
+ I.value = S, v.value = S.length === q;
331
+ } finally {
332
+ L.value = !1;
333
+ }
334
+ }
335
+ R(w, () => {
336
+ f.value = 1, C();
337
+ }), R([T, j, P, V], () => {
338
+ f.value = 1, C();
339
+ });
340
+ async function te() {
341
+ f.value > 1 && (f.value--, await C());
342
+ }
343
+ async function oe() {
344
+ v.value && (f.value++, await C());
345
+ }
346
+ function le(i) {
347
+ l.value = i, y.value = !0;
348
+ }
349
+ function ae() {
350
+ y.value = !1, l.value = null;
351
+ }
352
+ return R(O.currentBusiness, (i) => {
353
+ i && (f.value = 1, p.readTeamMembers(), C());
354
+ }, {
355
+ immediate: !0
356
+ }), (i, o) => {
357
+ const u = D("FmChip"), h = D("FmDateRangePicker"), b = D("FmTable"), x = D("FmButton"), E = D("FmSideSheet");
358
+ return r(), m(A, null, [d(me, {
359
+ heading: s(t)("auditLog.title")
360
+ }, {
361
+ default: F(() => [e("div", be, [e("div", xe, [d(h, {
362
+ modelValue: w.value,
363
+ "onUpdate:modelValue": o[0] || (o[0] = (c) => w.value = c),
364
+ "show-predefined-range": ""
365
+ }, {
366
+ "trigger-button": F(() => [d(u, {
367
+ label: X.value,
368
+ icon: "calendar_month"
369
+ }, null, 8, ["label"])]),
370
+ _: 1
371
+ }, 8, ["modelValue"]), e("div", ye, [d(U, {
372
+ modelValue: T.value,
373
+ "onUpdate:modelValue": o[1] || (o[1] = (c) => T.value = c),
374
+ items: Z.value,
375
+ multiple: "",
376
+ variant: "dark",
377
+ placeholder: s(t)("auditLog.filter.user_placeholder"),
378
+ "selected-prefix": s(t)("auditLog.filter.selected_user_prefix"),
379
+ "chip-icon": "account_circle"
380
+ }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), e("div", Le, [d(U, {
381
+ modelValue: j.value,
382
+ "onUpdate:modelValue": o[2] || (o[2] = (c) => j.value = c),
383
+ items: H.value,
384
+ multiple: "",
385
+ variant: "dark",
386
+ placeholder: s(t)("auditLog.filter.subject_placeholder"),
387
+ "selected-prefix": s(t)("auditLog.filter.selected_subject_prefix"),
388
+ "chip-icon": "badge"
389
+ }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), e("div", Se, [d(U, {
390
+ modelValue: V.value,
391
+ "onUpdate:modelValue": o[3] || (o[3] = (c) => V.value = c),
392
+ items: Q.value,
393
+ multiple: "",
394
+ variant: "dark",
395
+ placeholder: s(t)("auditLog.filter.action_placeholder"),
396
+ "selected-prefix": s(t)("auditLog.filter.selected_action_prefix"),
397
+ searchable: !1
398
+ }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), e("div", ke, [d(U, {
399
+ modelValue: P.value,
400
+ "onUpdate:modelValue": o[4] || (o[4] = (c) => P.value = c),
401
+ items: W.value,
402
+ multiple: "",
403
+ variant: "dark",
404
+ placeholder: s(t)("auditLog.filter.status_placeholder"),
405
+ "selected-prefix": s(t)("auditLog.filter.selected_status_prefix"),
406
+ searchable: !1,
407
+ "chip-icon": "check_circle"
408
+ }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])]), !L.value && B.value.length === 0 ? (r(), $(s(fe), {
409
+ key: 0,
410
+ title: s(t)("auditLog.noData.title"),
411
+ subtitle: s(t)("auditLog.noData.subtitle")
412
+ }, null, 8, ["title", "subtitle"])) : (r(), $(re, {
413
+ key: 1
414
+ }, {
415
+ default: F(() => [e("div", Ie, [d(b, {
416
+ "column-defs": ee,
417
+ "row-data": B.value,
418
+ "page-size": B.value.length,
419
+ loading: L.value,
420
+ "pin-header-row": "",
421
+ "hide-footer": "",
422
+ class: "min-h-0 flex-1 cursor-pointer",
423
+ onRowClick: o[5] || (o[5] = (c) => le(c.original))
424
+ }, null, 8, ["row-data", "page-size", "loading"]), f.value > 1 || v.value ? (r(), m("div", we, [d(x, {
425
+ variant: "tertiary",
426
+ icon: "chevron_left",
427
+ disabled: f.value === 1,
428
+ "aria-label": s(t)("auditLog.pagination.prevPage"),
429
+ onClick: te
430
+ }, null, 8, ["disabled", "aria-label"]), e("span", Te, a(s(t)("auditLog.pagination.page", {
431
+ page: f.value
432
+ })), 1), d(x, {
433
+ variant: "tertiary",
434
+ icon: "chevron_right",
435
+ disabled: !v.value,
436
+ "aria-label": s(t)("auditLog.pagination.nextPage"),
437
+ onClick: oe
438
+ }, null, 8, ["disabled", "aria-label"])])) : g("", !0)])]),
439
+ _: 1
440
+ }))])]),
441
+ _: 1
442
+ }, 8, ["heading"]), d(E, {
443
+ header: s(t)("auditLog.detail.header"),
444
+ "model-value": y.value,
445
+ "max-width": 480,
446
+ "dismiss-away": "",
447
+ "onUpdate:modelValue": o[6] || (o[6] = (c) => {
448
+ c || ae();
449
+ })
450
+ }, {
451
+ default: F(() => [l.value ? (r(), m("div", je, [e("div", Pe, [e("div", Ve, [e("div", Ce, [e("p", De, a(l.value.metadata.operationLabel || "-"), 1)]), d(u, {
452
+ variant: z[l.value.outcome] ?? "neutral",
453
+ label: l.value.outcome,
454
+ compact: ""
455
+ }, null, 8, ["variant", "label"])]), o[7] || (o[7] = e("hr", {
456
+ class: "border-fm-color-border-default"
457
+ }, null, -1)), e("div", Oe, [e("div", null, [e("p", Ne, a(s(t)("auditLog.detail.timestamp")), 1), e("p", Ae, a(new Date(l.value.timestamp).toLocaleString()), 1)]), s(p).userIdToName[l.value.userId] ? (r(), m("div", Fe, [e("p", Ue, a(s(t)("auditLog.detail.user")), 1), e("p", Be, a(s(p).userIdToName[l.value.userId]), 1)])) : g("", !0), e("div", null, [e("p", Ee, a(s(t)("auditLog.detail.email")), 1), e("p", Re, a(s(p).userIdToEmail[l.value.userId] || l.value.userId), 1)]), e("div", null, [e("p", qe, a(s(t)("auditLog.detail.action")), 1), e("p", Me, a(l.value.action), 1)]), e("div", null, [e("p", ze, a(s(t)("auditLog.detail.subject")), 1), e("p", Ke, a(M(l.value.subject) || l.value.subject), 1)]), l.value.field ? (r(), m("div", $e, [e("p", Ye, a(s(t)("auditLog.detail.field")), 1), e("p", Ge, a(l.value.field), 1)])) : g("", !0), e("div", null, [e("p", Je, a(s(t)("auditLog.detail.business")), 1), e("p", Ze, a(l.value.businessId || "-"), 1)]), e("div", null, [e("p", He, a(s(t)("auditLog.detail.restaurant")), 1), e("p", Qe, a(l.value.restaurantId || "-"), 1)])])]), e("div", We, [e("div", Xe, [e("p", et, a(s(t)("auditLog.detail.metadata")), 1)]), o[8] || (o[8] = e("hr", {
458
+ class: "border-fm-color-border-default"
459
+ }, null, -1)), e("div", tt, [l.value.metadata.reason ? (r(), m("div", ot, [e("p", lt, a(s(t)("auditLog.detail.reason")), 1), e("p", at, a(l.value.metadata.reason), 1)])) : g("", !0), e("div", null, [e("p", st, a(s(t)("auditLog.detail.resolvedFrom")), 1), e("p", it, a(l.value.metadata.resolvedFrom), 1)]), l.value.metadata.permissionSetId ? (r(), m("div", nt, [e("p", dt, a(s(t)("auditLog.detail.permissionSet")), 1), l.value.metadata.resolvedFrom === "systemPermissionSet" ? (r(), m(A, {
460
+ key: 0
461
+ }, [e("p", ct, a(l.value.metadata.permissionSetName) + " (system)", 1), e("p", rt, a(l.value.metadata.permissionSetId), 1)], 64)) : (r(), m(A, {
462
+ key: 1
463
+ }, [e("p", ut, a(l.value.metadata.permissionSetName || l.value.metadata.permissionSetId), 1), l.value.metadata.permissionSetName ? (r(), m("p", mt, a(l.value.metadata.permissionSetId), 1)) : g("", !0)], 64))])) : g("", !0), l.value.metadata.trace && l.value.metadata.trace.length > 0 ? (r(), m("div", ft, [e("p", pt, a(s(t)("auditLog.detail.permissionTrace")), 1), e("ol", _t, [(r(!0), m(A, null, ie(l.value.metadata.trace, (c, S) => (r(), m("li", {
464
+ key: S,
465
+ class: "flex items-center gap-6"
466
+ }, [e("span", vt, a(S + 1), 1), e("span", gt, a(c), 1), S < l.value.metadata.trace.length - 1 ? (r(), m("span", ht, "→")) : g("", !0)]))), 128))])])) : g("", !0), e("div", null, [e("p", bt, a(s(t)("auditLog.detail.requestMethod")), 1), e("p", xt, a(l.value.metadata.requestMethod), 1)]), e("div", null, [e("p", yt, a(s(t)("auditLog.detail.requestPath")), 1), e("p", Lt, a(l.value.metadata.requestPath), 1)]), l.value.metadata.requestBody && Object.keys(l.value.metadata.requestBody).length > 0 ? (r(), m("div", St, [e("p", kt, a(s(t)("auditLog.detail.requestBody")), 1), e("pre", It, a(JSON.stringify(l.value.metadata.requestBody, null, 2)), 1)])) : g("", !0)])])])) : g("", !0)]),
467
+ _: 1
468
+ }, 8, ["header", "model-value"])], 64);
469
+ };
470
+ }
471
+ });
472
+ export {
473
+ Ft as default
474
+ };