@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.
Files changed (38) hide show
  1. package/dist/{AuditLogList-BQrLGMyl.js → AuditLogList-CVOicxwC.js} +150 -148
  2. package/dist/EmployeeList-CSBiU32b.js +626 -0
  3. package/dist/{Main-CLPyIa4z.js → Main-BTCSW3JL.js} +10 -9
  4. package/dist/{Main-D96yN3qU.js → Main-D9xZDqBk.js} +5 -5
  5. package/dist/PermissionSetList-r1ZvAW01.js +323 -0
  6. package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-hwxPInoN.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DXsl8Y5d.js} +663 -657
  7. package/dist/RoleList-Ca2gg1OL.js +494 -0
  8. package/dist/TeamMemberList-D__tUUst.js +945 -0
  9. package/dist/{TimesheetList-DfNUAxvs.js → TimesheetList-DGRLp8ZY.js} +25 -24
  10. package/dist/api/index.d.ts +1 -0
  11. package/dist/api/report-query/index.d.ts +5 -0
  12. package/dist/{app-BLccIfY3.js → app-c-GiPrdn.js} +756 -660
  13. package/dist/app.js +1 -1
  14. package/dist/composables/useReportPermissions.d.ts +14 -0
  15. package/dist/{dayjs.min-e_aDx5TL.js → dayjs.min-CJ2WQsea.js} +1 -1
  16. package/dist/employee-8oXtifwK.js +144 -0
  17. package/dist/helpers/permission-set.d.ts +22 -0
  18. package/dist/helpers/rule.d.ts +1 -1
  19. package/dist/{index-BFP38KNn.js → index-AdCh0qd6.js} +1 -1
  20. package/dist/{index-DqZ7dyeO.js → index-DSwL5tAm.js} +5017 -3187
  21. package/dist/{lodash-wWEU8x-_.js → lodash-C7JpKSnW.js} +1 -1
  22. package/dist/stores/permission-set.d.ts +15 -0
  23. package/dist/{team-D578BKW-.js → team-Fs4KPQg5.js} +1 -1
  24. package/dist/{timesheet-De_MM5L0.js → timesheet-D05cQ6a7.js} +2 -2
  25. package/dist/tsconfig.app.tsbuildinfo +1 -1
  26. package/dist/types/permission-set.d.ts +4 -0
  27. package/dist/types/report-query.d.ts +6 -0
  28. package/dist/{useAppStore-DAD4GUp4.js → useAppStore-D1eLjzj4.js} +34 -46
  29. package/dist/{useLoading-m7HMTn1_.js → useLoading-DB77wFeJ.js} +1 -1
  30. package/dist/useReportPermissions-p2VZ4ugv.js +65 -0
  31. package/dist/views/audit-log/locales/index.d.ts +8 -0
  32. package/dist/views/team/locales/index.d.ts +12 -0
  33. package/package.json +2 -2
  34. package/dist/EmployeeList-LaXwGXpL.js +0 -607
  35. package/dist/PermissionSetList-ChwTCq9b.js +0 -283
  36. package/dist/RoleList-QVyMZDOv.js +0 -496
  37. package/dist/TeamMemberList-CzFNU9mb.js +0 -952
  38. package/dist/employee-BokOkxvZ.js +0 -172
@@ -1,17 +1,17 @@
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-e_aDx5TL.js";
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-BLccIfY3.js";
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 B } from "@feedmepos/ui-library";
8
- import { g as fe, b as pe, p as J } from "./index-DqZ7dyeO.js";
9
- import { u as ve } from "./team-D578BKW-.js";
10
- import { S as P } from "./SelectFilter-NbXrJ4iH.js";
11
- const _e = "/audit-logs", ge = {
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(_e, {
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
- }, Te = {
43
+ }, je = {
44
44
  key: 0,
45
45
  class: "space-y-12 p-4 text-sm"
46
- }, je = {
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
- }, Oe = {
50
+ }, Ve = {
51
51
  class: "text-base font-bold leading-snug text-fm-color-typo-primary"
52
- }, Pe = {
52
+ }, Ce = {
53
53
  class: "space-y-12 p-12"
54
- }, Ve = {
54
+ }, Oe = {
55
55
  class: "text-xs text-fm-color-typo-secondary"
56
- }, Ce = {
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: "text-xs text-fm-color-typo-secondary"
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
- class: "text-xs text-fm-color-typo-secondary"
73
+ key: 1
74
74
  }, Me = {
75
- class: "font-semibold"
75
+ class: "text-xs text-fm-color-typo-secondary"
76
76
  }, Ke = {
77
- key: 1
77
+ class: "font-semibold"
78
78
  }, $e = {
79
79
  class: "text-xs text-fm-color-typo-secondary"
80
- }, Je = {
80
+ }, ze = {
81
81
  class: "font-semibold"
82
82
  }, Ye = {
83
- class: "text-xs text-fm-color-typo-secondary"
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
- }, Ze = {
86
+ }, Je = {
89
87
  class: "font-semibold"
88
+ }, Ze = {
89
+ class: "text-xs text-fm-color-typo-secondary"
90
90
  }, He = {
91
- class: "rounded-lg border border-fm-color-border-default"
91
+ class: "break-all font-mono text-xs font-semibold"
92
92
  }, Qe = {
93
- class: "p-12"
93
+ class: "text-xs text-fm-color-typo-secondary"
94
94
  }, We = {
95
- class: "text-base font-bold text-fm-color-typo-primary"
95
+ class: "font-semibold"
96
96
  }, Xe = {
97
- class: "space-y-12 p-12"
97
+ class: "rounded-lg border border-fm-color-border-default"
98
98
  }, et = {
99
- key: 0
99
+ class: "p-12"
100
100
  }, tt = {
101
- class: "text-xs text-fm-color-typo-secondary"
101
+ class: "text-base font-bold text-fm-color-typo-primary"
102
102
  }, ot = {
103
- class: "font-semibold"
103
+ class: "space-y-12 p-12"
104
104
  }, at = {
105
- class: "text-xs text-fm-color-typo-secondary"
105
+ key: 0
106
106
  }, lt = {
107
- class: "font-semibold"
107
+ class: "text-xs text-fm-color-typo-secondary"
108
108
  }, st = {
109
- key: 1
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
- class: "break-all font-mono text-xs text-fm-color-typo-secondary"
115
+ key: 1
116
116
  }, rt = {
117
- class: "font-semibold"
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
- }, ut = {
127
+ }, pt = {
122
128
  key: 2
123
- }, mt = {
129
+ }, _t = {
124
130
  class: "text-xs text-fm-color-typo-secondary"
125
- }, ft = {
131
+ }, vt = {
126
132
  class: "mt-4 space-y-4"
127
- }, pt = {
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
- }, vt = {
135
+ }, ht = {
130
136
  class: "text-xs font-semibold"
131
- }, _t = {
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: "mt-4 max-h-[400px] overflow-auto rounded bg-gray-100 p-8 font-mono text-xs leading-relaxed shadow-inner"
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
- class: "text-xs text-fm-color-typo-secondary"
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
- }, jt = {
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, At = /* @__PURE__ */ le({
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(), _ = 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
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: s,
194
+ startDate: a,
199
195
  endDate: t
200
196
  } = 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;
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 N(s) {
202
+ function F(a) {
207
203
  var t;
208
- return ((t = J.find((m) => m.subject === s)) == null ? void 0 : t.label) ?? ce[s];
204
+ return ((t = z.find((m) => m.subject === a)) == null ? void 0 : t.label) ?? ce[a];
209
205
  }
210
- const M = {
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(s) {
218
- const t = s.row.original;
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(s) {
226
- const t = s.row.original, m = _.userIdToName[t.userId];
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(B.FmAvatar, {
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(s) {
241
- const t = s.row.original, m = N(t.subject);
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(B.FmTooltip, {
245
- content: t.subject
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(s) {
261
- const t = s.row.original;
262
- return n(B.FmChip, {
263
- variant: M[t.outcome] ?? "neutral",
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 K(s, t = !1) {
270
- const [m, y, F] = s.split("-").map(Number), L = new Date(m, y - 1, F);
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 j() {
275
+ async function T() {
274
276
  I.value = !0;
275
277
  try {
276
278
  const {
277
- startDate: s,
279
+ startDate: a,
278
280
  endDate: t
279
- } = S.value, m = (v.value - 1) * A, [y] = await Promise.all([ge.read({
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
- ...s ? {
285
- from: K(s)
286
+ ...a ? {
287
+ from: M(a)
286
288
  } : {},
287
289
  ...t ? {
288
- to: K(t, !0)
290
+ to: M(t, !0)
289
291
  } : {}
290
- }), _.readTeamMembers()]);
291
- E.value = y, T.value = y.length === A;
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
- U(S, () => {
297
- v.value = 1, j();
298
- }), U([g, h, x, b], () => {
299
- v.value = 1;
298
+ B(S, () => {
299
+ _.value = 1, T();
300
+ }), B([g, h, x, b], () => {
301
+ _.value = 1;
300
302
  });
301
303
  async function X() {
302
- v.value > 1 && (v.value--, await j());
304
+ _.value > 1 && (_.value--, await T());
303
305
  }
304
306
  async function ee() {
305
- T.value && (v.value++, await j());
307
+ j.value && (_.value++, await T());
306
308
  }
307
- function te(s) {
308
- a.value = s, V.value = !0;
309
+ function te(a) {
310
+ l.value = a, O.value = !0;
309
311
  }
310
312
  function oe() {
311
- V.value = !1, a.value = null;
313
+ O.value = !1, l.value = null;
312
314
  }
313
- return U(Y.currentBusiness, (s) => {
314
- s && (v.value = 1, j());
315
+ return B(Y.currentBusiness, (a) => {
316
+ a && (_.value = 1, T());
315
317
  }, {
316
318
  immediate: !0
317
- }), (s, t) => {
318
- const m = w("FmChip"), y = w("FmDateRangePicker"), F = w("FmTable"), L = w("FmButton"), ae = w("FmSideSheet");
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: O(() => [e("div", he, [e("div", xe, [n(y, {
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": O(() => [n(m, {
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(P, {
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: z.value,
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(P, {
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: G.value,
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(P, {
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(P, {
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 && C.value.length === 0 ? (d(), $(i(me), {
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(), $(re, {
375
+ }, null, 8, ["title", "subtitle"])) : (d(), K(re, {
374
376
  key: 1
375
377
  }, {
376
- default: O(() => [e("div", Se, [n(F, {
378
+ default: V(() => [e("div", Se, [n(N, {
377
379
  "column-defs": W,
378
- "row-data": C.value,
379
- "page-size": C.value.length,
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"]), v.value > 1 || T.value ? (d(), r("div", we, [n(L, {
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: v.value === 1,
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, l(i(o)("auditLog.pagination.page", {
392
- page: v.value
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: !T.value,
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": V.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: 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,
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", 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", {
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", 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, {
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", nt, l(a.value.metadata.permissionSetName) + " (system)", 1), e("p", dt, l(a.value.metadata.permissionSetId), 1)], 64)) : (d(), r(D, {
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", 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
+ }, [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", 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)]),
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
- At as default
436
+ Bt as default
435
437
  };