@feedmepos/mf-hrm-portal 1.1.3-dev.6 → 1.1.3-dev.7

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 (37) hide show
  1. package/dist/{AuditLogList-BQrLGMyl.js → AuditLogList-n6xAYZGv.js} +123 -135
  2. package/dist/EmployeeList-D9rLxXo5.js +626 -0
  3. package/dist/{Main-D96yN3qU.js → Main-BCa8A1rV.js} +5 -5
  4. package/dist/{Main-CLPyIa4z.js → Main-zQF3GD9j.js} +10 -9
  5. package/dist/PermissionSetList-EsoA_anf.js +338 -0
  6. package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-hwxPInoN.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BA1LS-wd.js} +681 -675
  7. package/dist/RoleList-Cfv9wKaN.js +494 -0
  8. package/dist/TeamMemberList-HkvCqzPj.js +945 -0
  9. package/dist/{TimesheetList-DfNUAxvs.js → TimesheetList-B0e-Muws.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-DKSPx49S.js} +748 -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-DZJQ_JpV.js} +1 -1
  16. package/dist/employee-DKRqMph9.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-BwyUbhZj.js} +1 -1
  20. package/dist/{index-DqZ7dyeO.js → index-D09s817L.js} +5017 -3187
  21. package/dist/{lodash-wWEU8x-_.js → lodash-CL6AaeJB.js} +1 -1
  22. package/dist/stores/permission-set.d.ts +15 -0
  23. package/dist/{team-D578BKW-.js → team-DEjtUFVl.js} +1 -1
  24. package/dist/{timesheet-De_MM5L0.js → timesheet-B0usAfjL.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-DfaKfSuR.js} +34 -46
  29. package/dist/{useLoading-m7HMTn1_.js → useLoading-D2AX24ph.js} +1 -1
  30. package/dist/useReportPermissions-CwsHq61C.js +65 -0
  31. package/dist/views/team/locales/index.d.ts +12 -0
  32. package/package.json +1 -1
  33. package/dist/EmployeeList-LaXwGXpL.js +0 -607
  34. package/dist/PermissionSetList-ChwTCq9b.js +0 -283
  35. package/dist/RoleList-QVyMZDOv.js +0 -496
  36. package/dist/TeamMemberList-CzFNU9mb.js +0 -952
  37. package/dist/employee-BokOkxvZ.js +0 -172
@@ -1,13 +1,13 @@
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 u, openBlock as d, Fragment as D, createVNode as n, unref as i, withCtx as V, createElementVNode as e, createBlock as K, createCommentVNode as v, toDisplayString as s, renderList as se } from "vue";
2
+ import { d as ie } from "./dayjs.min-DZJQ_JpV.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 ce, G as re } from "./app-DKSPx49S.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";
7
+ import { components as $ } from "@feedmepos/ui-library";
8
+ import { g as fe, b as pe, p as Y } from "./index-D09s817L.js";
9
+ import { u as ve } from "./team-DEjtUFVl.js";
10
+ import { S as C } from "./SelectFilter-NbXrJ4iH.js";
11
11
  const _e = "/audit-logs", ge = {
12
12
  async read(c) {
13
13
  return fe(
@@ -40,34 +40,34 @@ 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
73
  class: "text-xs text-fm-color-typo-secondary"
@@ -77,13 +77,13 @@ const _e = "/audit-logs", ge = {
77
77
  key: 1
78
78
  }, $e = {
79
79
  class: "text-xs text-fm-color-typo-secondary"
80
- }, Je = {
81
- class: "font-semibold"
82
80
  }, Ye = {
83
- class: "text-xs text-fm-color-typo-secondary"
81
+ class: "font-semibold"
84
82
  }, ze = {
85
- class: "break-all font-mono text-xs font-semibold"
83
+ class: "text-xs text-fm-color-typo-secondary"
86
84
  }, Ge = {
85
+ class: "break-all font-mono text-xs font-semibold"
86
+ }, Je = {
87
87
  class: "text-xs text-fm-color-typo-secondary"
88
88
  }, Ze = {
89
89
  class: "font-semibold"
@@ -113,9 +113,9 @@ const _e = "/audit-logs", ge = {
113
113
  class: "font-semibold"
114
114
  }, dt = {
115
115
  class: "break-all font-mono text-xs text-fm-color-typo-secondary"
116
- }, rt = {
117
- class: "font-semibold"
118
116
  }, ct = {
117
+ class: "font-semibold"
118
+ }, rt = {
119
119
  key: 0,
120
120
  class: "break-all font-mono text-xs text-fm-color-typo-secondary"
121
121
  }, ut = {
@@ -134,41 +134,31 @@ const _e = "/audit-logs", ge = {
134
134
  }, gt = {
135
135
  class: "text-xs text-fm-color-typo-secondary"
136
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"
137
+ class: "font-mono text-xs font-semibold"
138
138
  }, xt = {
139
- key: 3
140
- }, bt = {
141
139
  class: "text-xs text-fm-color-typo-secondary"
140
+ }, bt = {
141
+ class: "break-all font-mono text-xs font-semibold"
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
+ key: 3
144
144
  }, Lt = {
145
145
  class: "text-xs text-fm-color-typo-secondary"
146
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
147
  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({
148
+ }, A = 100, Ft = /* @__PURE__ */ le({
159
149
  __name: "AuditLogList",
160
150
  setup(c) {
161
151
  const {
162
152
  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
153
+ } = ne(), z = de(), _ = ve(), I = f(!1), E = f([]), l = f(null), O = f(!1), p = f(1), j = f(!1), R = ie().format("YYYY-MM-DD"), S = f({
154
+ startDate: R,
155
+ endDate: R
156
+ }), g = f(), h = f(), x = f(), b = f(), G = k(() => _.members.map((a) => ({
157
+ label: a.name,
158
+ value: a.doc.userId
159
+ }))), J = k(() => Y.map((a) => ({
160
+ label: a.label,
161
+ value: a.subject
172
162
  }))), Z = k(() => [{
173
163
  label: o("auditLog.action.manage"),
174
164
  value: "manage"
@@ -195,38 +185,38 @@ const _e = "/audit-logs", ge = {
195
185
  value: "skipped"
196
186
  }]), Q = k(() => {
197
187
  const {
198
- startDate: s,
188
+ startDate: a,
199
189
  endDate: t
200
190
  } = 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;
191
+ return a && t ? `${a} – ${t}` : a || t || o("auditLog.dateRange.placeholder");
192
+ }), P = k(() => {
193
+ let a = E.value;
194
+ 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
195
  });
206
- function N(s) {
196
+ function F(a) {
207
197
  var t;
208
- return ((t = J.find((m) => m.subject === s)) == null ? void 0 : t.label) ?? ce[s];
198
+ return ((t = Y.find((m) => m.subject === a)) == null ? void 0 : t.label) ?? re[a];
209
199
  }
210
- const M = {
200
+ const q = {
211
201
  allowed: "success",
212
202
  denied: "critical",
213
203
  skipped: "warning"
214
204
  }, W = [{
215
205
  accessorKey: "timestamp",
216
206
  header: () => o("auditLog.columns.timestamp"),
217
- cell(s) {
218
- const t = s.row.original;
207
+ cell(a) {
208
+ const t = a.row.original;
219
209
  return new Date(t.timestamp).toLocaleString();
220
210
  }
221
211
  }, {
222
212
  accessorKey: "userId",
223
213
  header: () => o("auditLog.columns.user"),
224
214
  enableSorting: !1,
225
- cell(s) {
226
- const t = s.row.original, m = _.userIdToName[t.userId];
215
+ cell(a) {
216
+ const t = a.row.original, m = _.userIdToName[t.userId];
227
217
  return n("div", {
228
218
  class: "flex items-center gap-8"
229
- }, [n(B.FmAvatar, {
219
+ }, [n($.FmAvatar, {
230
220
  initials: m || t.userId,
231
221
  size: "sm"
232
222
  }, null), n("span", null, [m || t.userId])]);
@@ -237,15 +227,13 @@ const _e = "/audit-logs", ge = {
237
227
  meta: {
238
228
  cellClass: "text-left"
239
229
  },
240
- cell(s) {
241
- const t = s.row.original, m = N(t.subject);
230
+ cell(a) {
231
+ const t = a.row.original, m = F(t.subject);
242
232
  return m ? n("div", {
243
233
  class: "text-left"
244
- }, [n(B.FmTooltip, {
245
- content: t.subject
246
- }, {
247
- default: () => [n("span", null, [m])]
248
- })]) : n("div", {
234
+ }, [n("span", null, [m]), n("p", {
235
+ class: "text-xs text-fm-color-typo-tertiary"
236
+ }, [t.subject])]) : n("div", {
249
237
  class: "text-left"
250
238
  }, [t.subject]);
251
239
  }
@@ -257,108 +245,108 @@ const _e = "/audit-logs", ge = {
257
245
  accessorKey: "outcome",
258
246
  header: () => o("auditLog.columns.outcome"),
259
247
  enableSorting: !1,
260
- cell(s) {
261
- const t = s.row.original;
262
- return n(B.FmChip, {
263
- variant: M[t.outcome] ?? "neutral",
248
+ cell(a) {
249
+ const t = a.row.original;
250
+ return n($.FmChip, {
251
+ variant: q[t.outcome] ?? "neutral",
264
252
  label: t.outcome,
265
253
  compact: !0
266
254
  }, null);
267
255
  }
268
256
  }];
269
- function K(s, t = !1) {
270
- const [m, y, F] = s.split("-").map(Number), L = new Date(m, y - 1, F);
257
+ function M(a, t = !1) {
258
+ const [m, y, N] = a.split("-").map(Number), L = new Date(m, y - 1, N);
271
259
  return t && L.setDate(L.getDate() + 1), L.toISOString().slice(0, 19).replace("T", " ");
272
260
  }
273
- async function j() {
261
+ async function T() {
274
262
  I.value = !0;
275
263
  try {
276
264
  const {
277
- startDate: s,
265
+ startDate: a,
278
266
  endDate: t
279
- } = S.value, m = (v.value - 1) * A, [y] = await Promise.all([ge.read({
267
+ } = S.value, m = (p.value - 1) * A, [y] = await Promise.all([ge.read({
280
268
  limit: A,
281
269
  offset: m,
282
270
  // Convert local date boundaries to UTC ISO strings so ClickHouse
283
271
  // (which stores timestamps in UTC) receives the correct range.
284
- ...s ? {
285
- from: K(s)
272
+ ...a ? {
273
+ from: M(a)
286
274
  } : {},
287
275
  ...t ? {
288
- to: K(t, !0)
276
+ to: M(t, !0)
289
277
  } : {}
290
278
  }), _.readTeamMembers()]);
291
- E.value = y, T.value = y.length === A;
279
+ E.value = y, j.value = y.length === A;
292
280
  } finally {
293
281
  I.value = !1;
294
282
  }
295
283
  }
296
- U(S, () => {
297
- v.value = 1, j();
298
- }), U([g, h, x, b], () => {
299
- v.value = 1;
284
+ B(S, () => {
285
+ p.value = 1, T();
286
+ }), B([g, h, x, b], () => {
287
+ p.value = 1;
300
288
  });
301
289
  async function X() {
302
- v.value > 1 && (v.value--, await j());
290
+ p.value > 1 && (p.value--, await T());
303
291
  }
304
292
  async function ee() {
305
- T.value && (v.value++, await j());
293
+ j.value && (p.value++, await T());
306
294
  }
307
- function te(s) {
308
- a.value = s, V.value = !0;
295
+ function te(a) {
296
+ l.value = a, O.value = !0;
309
297
  }
310
298
  function oe() {
311
- V.value = !1, a.value = null;
299
+ O.value = !1, l.value = null;
312
300
  }
313
- return U(Y.currentBusiness, (s) => {
314
- s && (v.value = 1, j());
301
+ return B(z.currentBusiness, (a) => {
302
+ a && (p.value = 1, T());
315
303
  }, {
316
304
  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, {
305
+ }), (a, t) => {
306
+ const m = w("FmChip"), y = w("FmDateRangePicker"), N = w("FmTable"), L = w("FmButton"), ae = w("FmSideSheet");
307
+ return d(), u(D, null, [n(ue, {
320
308
  heading: i(o)("auditLog.title")
321
309
  }, {
322
- default: O(() => [e("div", he, [e("div", xe, [n(y, {
310
+ default: V(() => [e("div", he, [e("div", xe, [n(y, {
323
311
  modelValue: S.value,
324
- "onUpdate:modelValue": t[0] || (t[0] = (u) => S.value = u),
312
+ "onUpdate:modelValue": t[0] || (t[0] = (r) => S.value = r),
325
313
  "show-predefined-range": ""
326
314
  }, {
327
- "trigger-button": O(() => [n(m, {
315
+ "trigger-button": V(() => [n(m, {
328
316
  label: Q.value,
329
317
  icon: "calendar_month"
330
318
  }, null, 8, ["label"])]),
331
319
  _: 1
332
- }, 8, ["modelValue"]), e("div", be, [n(P, {
320
+ }, 8, ["modelValue"]), e("div", be, [n(C, {
333
321
  modelValue: g.value,
334
- "onUpdate:modelValue": t[1] || (t[1] = (u) => g.value = u),
335
- items: z.value,
322
+ "onUpdate:modelValue": t[1] || (t[1] = (r) => g.value = r),
323
+ items: G.value,
336
324
  multiple: "",
337
325
  variant: "dark",
338
326
  placeholder: i(o)("auditLog.filter.user_placeholder"),
339
327
  "selected-prefix": i(o)("auditLog.filter.selected_user_prefix"),
340
328
  "chip-icon": "account_circle"
341
- }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), e("div", ye, [n(P, {
329
+ }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), e("div", ye, [n(C, {
342
330
  modelValue: h.value,
343
- "onUpdate:modelValue": t[2] || (t[2] = (u) => h.value = u),
344
- items: G.value,
331
+ "onUpdate:modelValue": t[2] || (t[2] = (r) => h.value = r),
332
+ items: J.value,
345
333
  multiple: "",
346
334
  variant: "dark",
347
335
  placeholder: i(o)("auditLog.filter.subject_placeholder"),
348
336
  "selected-prefix": i(o)("auditLog.filter.selected_subject_prefix"),
349
337
  "chip-icon": "badge"
350
- }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), e("div", Le, [n(P, {
338
+ }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), e("div", Le, [n(C, {
351
339
  modelValue: b.value,
352
- "onUpdate:modelValue": t[3] || (t[3] = (u) => b.value = u),
340
+ "onUpdate:modelValue": t[3] || (t[3] = (r) => b.value = r),
353
341
  items: Z.value,
354
342
  multiple: "",
355
343
  variant: "dark",
356
344
  placeholder: i(o)("auditLog.filter.action_placeholder"),
357
345
  "selected-prefix": i(o)("auditLog.filter.selected_action_prefix"),
358
346
  searchable: !1
359
- }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), e("div", ke, [n(P, {
347
+ }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), e("div", ke, [n(C, {
360
348
  modelValue: x.value,
361
- "onUpdate:modelValue": t[4] || (t[4] = (u) => x.value = u),
349
+ "onUpdate:modelValue": t[4] || (t[4] = (r) => x.value = r),
362
350
  items: H.value,
363
351
  multiple: "",
364
352
  variant: "dark",
@@ -366,70 +354,70 @@ const _e = "/audit-logs", ge = {
366
354
  "selected-prefix": i(o)("auditLog.filter.selected_status_prefix"),
367
355
  searchable: !1,
368
356
  "chip-icon": "check_circle"
369
- }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])]), !I.value && C.value.length === 0 ? (d(), $(i(me), {
357
+ }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])]), !I.value && P.value.length === 0 ? (d(), K(i(me), {
370
358
  key: 0,
371
359
  title: i(o)("auditLog.noData.title"),
372
360
  subtitle: i(o)("auditLog.noData.subtitle")
373
- }, null, 8, ["title", "subtitle"])) : (d(), $(re, {
361
+ }, null, 8, ["title", "subtitle"])) : (d(), K(ce, {
374
362
  key: 1
375
363
  }, {
376
- default: O(() => [e("div", Se, [n(F, {
364
+ default: V(() => [e("div", Se, [n(N, {
377
365
  "column-defs": W,
378
- "row-data": C.value,
379
- "page-size": C.value.length,
366
+ "row-data": P.value,
367
+ "page-size": P.value.length,
380
368
  loading: I.value,
381
369
  "pin-header-row": "",
382
370
  "hide-footer": "",
383
371
  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, {
372
+ onRowClick: t[5] || (t[5] = (r) => te(r.original))
373
+ }, null, 8, ["row-data", "page-size", "loading"]), p.value > 1 || j.value ? (d(), u("div", we, [n(L, {
386
374
  variant: "tertiary",
387
375
  icon: "chevron_left",
388
- disabled: v.value === 1,
376
+ disabled: p.value === 1,
389
377
  "aria-label": i(o)("auditLog.pagination.prevPage"),
390
378
  onClick: X
391
- }, null, 8, ["disabled", "aria-label"]), e("span", Ie, l(i(o)("auditLog.pagination.page", {
392
- page: v.value
379
+ }, null, 8, ["disabled", "aria-label"]), e("span", Ie, s(i(o)("auditLog.pagination.page", {
380
+ page: p.value
393
381
  })), 1), n(L, {
394
382
  variant: "tertiary",
395
383
  icon: "chevron_right",
396
- disabled: !T.value,
384
+ disabled: !j.value,
397
385
  "aria-label": i(o)("auditLog.pagination.nextPage"),
398
386
  onClick: ee
399
- }, null, 8, ["disabled", "aria-label"])])) : p("", !0)])]),
387
+ }, null, 8, ["disabled", "aria-label"])])) : v("", !0)])]),
400
388
  _: 1
401
389
  }))])]),
402
390
  _: 1
403
391
  }, 8, ["heading"]), n(ae, {
404
392
  header: i(o)("auditLog.detail.header"),
405
- "model-value": V.value,
393
+ "model-value": O.value,
406
394
  "max-width": 480,
407
395
  "dismiss-away": "",
408
- "onUpdate:modelValue": t[6] || (t[6] = (u) => {
409
- u || oe();
396
+ "onUpdate:modelValue": t[6] || (t[6] = (r) => {
397
+ r || oe();
410
398
  })
411
399
  }, {
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,
400
+ default: V(() => [l.value ? (d(), u("div", je, [e("div", Te, [e("div", De, [e("span", Ve, s(F(l.value.subject) || l.value.subject), 1), n(m, {
401
+ variant: q[l.value.outcome] ?? "neutral",
402
+ label: l.value.outcome,
415
403
  compact: ""
416
404
  }, null, 8, ["variant", "label"])]), t[7] || (t[7] = e("hr", {
417
405
  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", {
406
+ }, 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(_).userIdToName[l.value.userId] ? (d(), u("div", Fe, [e("p", Ne, s(i(o)("auditLog.detail.user")), 1), e("p", Ue, s(i(_).userIdToName[l.value.userId]), 1)])) : v("", !0), e("div", null, [e("p", Be, s(i(o)("auditLog.detail.email")), 1), e("p", Ae, s(i(_).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)]), e("div", null, [e("p", qe, s(i(o)("auditLog.detail.subject")), 1), e("p", Me, s(F(l.value.subject) || l.value.subject), 1)]), l.value.field ? (d(), u("div", Ke, [e("p", $e, s(i(o)("auditLog.detail.field")), 1), e("p", Ye, s(l.value.field), 1)])) : v("", !0), e("div", null, [e("p", ze, s(i(o)("auditLog.detail.business")), 1), e("p", Ge, s(l.value.businessId || "-"), 1)]), e("div", null, [e("p", Je, s(i(o)("auditLog.detail.restaurant")), 1), e("p", Ze, s(l.value.restaurantId || "-"), 1)])])]), e("div", He, [e("div", Qe, [e("p", We, s(i(o)("auditLog.detail.metadata")), 1)]), t[8] || (t[8] = e("hr", {
419
407
  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, {
408
+ }, null, -1)), e("div", Xe, [l.value.metadata.reason ? (d(), u("div", et, [e("p", tt, s(i(o)("auditLog.detail.reason")), 1), e("p", ot, s(l.value.metadata.reason), 1)])) : v("", !0), e("div", null, [e("p", at, s(i(o)("auditLog.detail.resolvedFrom")), 1), e("p", lt, s(l.value.metadata.resolvedFrom), 1)]), l.value.metadata.permissionSetId ? (d(), u("div", st, [e("p", it, s(i(o)("auditLog.detail.permissionSet")), 1), l.value.metadata.resolvedFrom === "systemPermissionSet" ? (d(), u(D, {
421
409
  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, {
410
+ }, [e("p", nt, s(l.value.metadata.permissionSetName) + " (system)", 1), e("p", dt, s(l.value.metadata.permissionSetId), 1)], 64)) : (d(), u(D, {
423
411
  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,
412
+ }, [e("p", ct, s(l.value.metadata.permissionSetName || l.value.metadata.permissionSetId), 1), l.value.metadata.permissionSetName ? (d(), u("p", rt, s(l.value.metadata.permissionSetId), 1)) : v("", !0)], 64))])) : v("", !0), l.value.metadata.trace && l.value.metadata.trace.length > 0 ? (d(), u("div", ut, [e("p", mt, s(i(o)("auditLog.detail.permissionTrace")), 1), e("ol", ft, [(d(!0), u(D, null, se(l.value.metadata.trace, (r, U) => (d(), u("li", {
413
+ key: U,
426
414
  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)]),
415
+ }, [e("span", pt, s(U + 1), 1), e("span", vt, s(r), 1), U < l.value.metadata.trace.length - 1 ? (d(), u("span", _t, "→")) : v("", !0)]))), 128))])])) : v("", !0), e("div", null, [e("p", gt, s(i(o)("auditLog.detail.requestMethod")), 1), e("p", ht, s(l.value.metadata.requestMethod), 1)]), e("div", null, [e("p", xt, s(i(o)("auditLog.detail.requestPath")), 1), e("p", bt, s(l.value.metadata.requestPath), 1)]), l.value.metadata.requestBody && Object.keys(l.value.metadata.requestBody).length > 0 ? (d(), u("div", yt, [e("p", Lt, s(i(o)("auditLog.detail.requestBody")), 1), e("pre", kt, s(JSON.stringify(l.value.metadata.requestBody, null, 2)), 1)])) : v("", !0)])])])) : v("", !0)]),
428
416
  _: 1
429
417
  }, 8, ["header", "model-value"])], 64);
430
418
  };
431
419
  }
432
420
  });
433
421
  export {
434
- At as default
422
+ Ft as default
435
423
  };