@feedmepos/mf-hrm-portal 2.3.2-dev.13 → 2.3.2-dev.15

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 (45) hide show
  1. package/dist/{ApprovalCodeList-CkEhtUbS.js → ApprovalCodeList-qB2eycv0.js} +7 -7
  2. package/dist/{AuditLogList-Bz5zAZyW.js → AuditLogList-DaqYMXFA.js} +366 -361
  3. package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-ChuqsZ3x.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-orzPqq0L.js} +2 -2
  4. package/dist/{EmployeeList-CynhLV-L.js → EmployeeList-h0fWCjea.js} +8 -8
  5. package/dist/{FormSection.vue_vue_type_script_setup_true_lang-CiFif3c3.js → FormSection.vue_vue_type_script_setup_true_lang-rg4r9aRR.js} +1 -1
  6. package/dist/{GrantUserList-DeWVTGuy.js → GrantUserList-DqeHBPqr.js} +8 -8
  7. package/dist/{Main-DZGRjkR3.js → Main-8SeOYhVr.js} +5 -5
  8. package/dist/{Main-DnryPI7f.js → Main-DnWIkti6.js} +12 -12
  9. package/dist/{Main-B3Leg_L0.js → Main-s-s803fq.js} +10 -10
  10. package/dist/{MyPosProfile-Dm93oppE.js → MyPosProfile-ChVMjpLY.js} +1 -1
  11. package/dist/{PermissionSetList-ecBXd3ag.js → PermissionSetList-Bh0o_HFX.js} +17 -17
  12. package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BLMb_4xS.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-05XZu7a9.js} +987 -987
  13. package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-2XEgCaw_.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-rb5MPBnA.js} +29 -29
  14. package/dist/{RoleForm.vue_vue_type_script_setup_true_lang-BWwZEK1N.js → RoleForm.vue_vue_type_script_setup_true_lang-CwzYGZNY.js} +31 -31
  15. package/dist/{RoleList-V02s5IFg.js → RoleList-BjcuUCyF.js} +7 -7
  16. package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-D4EmiXpK.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-BSmFLxZS.js} +1 -1
  17. package/dist/{ScheduleGeneralPage-B19huvz7.js → ScheduleGeneralPage-C0Y9XHXR.js} +2 -2
  18. package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-DpHkFE_N.js → ScheduleModal.vue_vue_type_script_setup_true_lang-B1293tLU.js} +4 -4
  19. package/dist/{SchedulePage-DatMj0FX.js → SchedulePage-Cqp0mIOQ.js} +9 -9
  20. package/dist/{SchedulePositionPage-weHCiVXF.js → SchedulePositionPage-DpF7fZ2G.js} +3 -3
  21. package/dist/{SelectFilter-VzroQ6nY.js → SelectFilter-jjUAj29l.js} +1 -1
  22. package/dist/TeamMemberList-B2wxF6Yn.js +2082 -0
  23. package/dist/{TimesheetList-tA58dMKW.js → TimesheetList-CzUVfPGT.js} +8 -8
  24. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-B0kMSBDL.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-CZ6axjWg.js} +3 -3
  25. package/dist/{app-v2fOFcO4.js → app-IdmhLBBn.js} +1388 -1345
  26. package/dist/app.js +1 -1
  27. package/dist/{approval-code-DXtjIgqA.js → approval-code-BOfGQEGW.js} +1 -1
  28. package/dist/{dayjs.min-DxlOWUZ1.js → dayjs.min-DkHZ47ah.js} +17 -17
  29. package/dist/{employee-RT04bxj-.js → employee-CJXt2fuN.js} +5 -5
  30. package/dist/{grant-user-6LflFpNK.js → grant-user-Bj6DpBWc.js} +1 -1
  31. package/dist/{iteration-Ce8Ag6An.js → iteration-BRk48OAH.js} +1 -1
  32. package/dist/{lodash-CKvwb5V-.js → lodash-CDREeRGa.js} +1 -1
  33. package/dist/{member-grant-CmrGFbhy.js → member-grant-BkZ_oF44.js} +5 -5
  34. package/dist/{restaurant-B8fppQ6A.js → restaurant-BEdgW6Se.js} +1 -1
  35. package/dist/{role-BtVKxf2F.js → role-CtYVs62K.js} +3 -3
  36. package/dist/{rule-Cd1olm_T.js → rule-CWR80AmG.js} +11 -11
  37. package/dist/src/views/audit-log/constants.d.ts +1 -1
  38. package/dist/src/views/audit-log/locales/index.d.ts +16 -0
  39. package/dist/tsconfig.app.tsbuildinfo +1 -1
  40. package/dist/{useAppStore-CgesqYqb.js → useAppStore-DAW1zVPH.js} +1 -1
  41. package/dist/{useLoading-nOeAHeTr.js → useLoading-C-AZgSLr.js} +1 -1
  42. package/dist/{useReportPermissions-CB_JGPpt.js → useReportPermissions-ld6buoVe.js} +20 -20
  43. package/dist/{useSsoProviders-9r2i0iR9.js → useSsoProviders-DeTogbyW.js} +1 -1
  44. package/package.json +1 -1
  45. package/dist/TeamMemberList-Ckh78JzV.js +0 -2083
@@ -1,19 +1,19 @@
1
- import { defineComponent as $t, ref as S, computed as A, onMounted as No, onBeforeUnmount as Ko, watch as se, resolveComponent as R, createElementBlock as g, openBlock as v, createBlock as Te, createCommentVNode as F, createElementVNode as s, Fragment as z, renderList as ce, withCtx as B, createVNode as y, toDisplayString as l, unref as u, nextTick as Yo, onUnmounted as Bo, createTextVNode as ye, normalizeClass as zo } from "vue";
2
- import { d as V } from "./dayjs.min-DxlOWUZ1.js";
1
+ import { defineComponent as Vt, ref as S, computed as A, onMounted as No, onBeforeUnmount as Ko, watch as ae, resolveComponent as R, createElementBlock as g, openBlock as v, createBlock as Te, createCommentVNode as F, createElementVNode as a, Fragment as z, renderList as ce, withCtx as B, createVNode as y, toDisplayString as l, unref as u, nextTick as Yo, onUnmounted as Bo, createTextVNode as ye, normalizeClass as zo } from "vue";
2
+ import { d as P } from "./dayjs.min-DkHZ47ah.js";
3
3
  import { defineStore as qo, storeToRefs as Jo } from "pinia";
4
4
  import { useI18n as dt, useCoreStore as Ho } from "@feedmepos/mf-common";
5
- import { g as at, b as st, u as Wo, F as Mt, _ as Go, a as Xo } from "./app-v2fOFcO4.js";
5
+ import { g as st, b as at, u as Wo, B as Mt, _ as Go, a as Xo } from "./app-IdmhLBBn.js";
6
6
  import { components as ve } from "@feedmepos/ui-library";
7
- import { S as Me } from "./SelectFilter-VzroQ6nY.js";
7
+ import { S as Me } from "./SelectFilter-jjUAj29l.js";
8
8
  import { _ as Qo } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
9
9
  import { _ as Zo } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
10
- import { t as ea, p as Dt } from "./rule-Cd1olm_T.js";
11
- import { u as ta } from "./restaurant-B8fppQ6A.js";
12
- import { u as oa } from "./useDebounce-B8ZPVS5C.js";
13
- import { n as aa } from "./string-DZQ1uNjn.js";
14
- import { useRoute as sa, useRouter as na } from "vue-router";
15
- import { u as la } from "./useMessage-_ywT_N9X.js";
16
- const ra = {
10
+ import { t as es, p as Dt } from "./rule-CWR80AmG.js";
11
+ import { u as ts } from "./restaurant-BEdgW6Se.js";
12
+ import { u as os } from "./useDebounce-B8ZPVS5C.js";
13
+ import { n as ss } from "./string-DZQ1uNjn.js";
14
+ import { useRoute as as, useRouter as ns } from "vue-router";
15
+ import { u as ls } from "./useMessage-_ywT_N9X.js";
16
+ const rs = {
17
17
  order: "Order",
18
18
  refund: "Refund",
19
19
  drawer: "Cash drawer",
@@ -42,6 +42,11 @@ const ra = {
42
42
  { key: "payment", label: "Payment", subjectPrefixes: ["business::payment", "payment"], sources: ["portal"] },
43
43
  { key: "menu", label: "Menu", subjectPrefixes: ["business::menu", "menu"], sources: ["portal"] },
44
44
  { key: "crm", label: "CRM", subjectPrefixes: ["business::crm", "crm"], sources: ["portal"] },
45
+ { key: "operation", label: "Operation", subjectPrefixes: ["business::operation", "operation"], sources: ["portal"] },
46
+ // Settings spans the mdm, kiosk and eInvoice namespaces (PermissionCategory.settings).
47
+ { key: "settings", label: "Settings", subjectPrefixes: ["business::mdm", "business::kiosk", "business::eInvoice", "mdm", "kiosk", "eInvoice"], sources: ["portal"] },
48
+ { key: "miniProgram", label: "Mini Program", subjectPrefixes: ["business::miniProgram", "miniProgram"], sources: ["portal"] },
49
+ { key: "media", label: "Media", subjectPrefixes: ["business::media", "media"], sources: ["portal"] },
45
50
  { key: "pos", label: "POS", subjectPrefixes: [], sources: ["pos-v8", "hrm-validate"] }
46
51
  ], nt = "/audit-logs", Ce = {
47
52
  async count(t) {
@@ -62,12 +67,12 @@ const ra = {
62
67
  ...(i = t == null ? void 0 : t.restaurantIds) != null && i.length ? { restaurantIds: t.restaurantIds } : {},
63
68
  ...t != null && t.traceId ? { traceId: t.traceId } : {}
64
69
  };
65
- return (await at(
66
- await st().get(`${nt}/count`, {
70
+ return (await st(
71
+ await at().get(`${nt}/count`, {
67
72
  params: o,
68
- paramsSerializer: ($) => {
73
+ paramsSerializer: (V) => {
69
74
  const L = new URLSearchParams();
70
- for (const [f, M] of Object.entries($))
75
+ for (const [f, M] of Object.entries(V))
71
76
  if (Array.isArray(M))
72
77
  for (const C of M) L.append(f, String(C));
73
78
  else M != null && L.append(f, String(M));
@@ -96,18 +101,18 @@ const ra = {
96
101
  ...(O = t == null ? void 0 : t.restaurantIds) != null && O.length ? { restaurantIds: t.restaurantIds } : {},
97
102
  ...t != null && t.traceId ? { traceId: t.traceId } : {}
98
103
  };
99
- return at(
100
- await st().get(nt, {
104
+ return st(
105
+ await at().get(nt, {
101
106
  params: o,
102
107
  // Serialize arrays as repeated params: key=val1&key=val2
103
108
  // (NestJS @Query expects this; axios default adds brackets which break matching)
104
109
  paramsSerializer: (i) => {
105
- const $ = new URLSearchParams();
110
+ const V = new URLSearchParams();
106
111
  for (const [L, f] of Object.entries(i))
107
112
  if (Array.isArray(f))
108
- for (const M of f) $.append(L, String(M));
109
- else f != null && $.append(L, String(f));
110
- return $.toString();
113
+ for (const M of f) V.append(L, String(M));
114
+ else f != null && V.append(L, String(f));
115
+ return V.toString();
111
116
  }
112
117
  })
113
118
  );
@@ -122,14 +127,14 @@ const ra = {
122
127
  ...t != null && t.from ? { from: t.from } : {},
123
128
  ...t != null && t.to ? { to: t.to } : {}
124
129
  };
125
- return at(
126
- await st().get(`${nt}/actors`, { params: o })
130
+ return st(
131
+ await at().get(`${nt}/actors`, { params: o })
127
132
  );
128
133
  }
129
- }, ia = { class: "flex h-[46px] items-center gap-8 rounded-sm px-16 hover:bg-fm-color-opacity-sm" }, ua = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, da = {
134
+ }, is = { class: "flex h-[46px] items-center gap-8 rounded-sm px-16 hover:bg-fm-color-opacity-sm" }, us = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ds = {
130
135
  "data-more-measure": "",
131
136
  class: "flex h-[46px] items-center gap-8 rounded-sm px-16"
132
- }, ca = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, fa = /* @__PURE__ */ $t({
137
+ }, cs = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, fs = /* @__PURE__ */ Vt({
133
138
  __name: "AuditLogModuleTabs",
134
139
  props: {
135
140
  modelValue: {},
@@ -139,7 +144,7 @@ const ra = {
139
144
  setup(t, { emit: o }) {
140
145
  const n = t, r = o, { t: c } = dt(), d = S(!1), b = S(null), _ = S(null), w = S([]), D = S(0), O = S(0);
141
146
  let i = null;
142
- async function $() {
147
+ async function V() {
143
148
  if (await Yo(), !_.value) return;
144
149
  const p = _.value.querySelectorAll("[data-tab-measure]");
145
150
  w.value = Array.from(p).map((K) => K.offsetWidth);
@@ -176,15 +181,15 @@ const ra = {
176
181
  d.value = !1, r("update:modelValue", p);
177
182
  }
178
183
  return No(async () => {
179
- await $(), b.value && (O.value = b.value.clientWidth, i = new ResizeObserver(() => {
184
+ await V(), b.value && (O.value = b.value.clientWidth, i = new ResizeObserver(() => {
180
185
  b.value && (O.value = b.value.clientWidth);
181
186
  }), i.observe(b.value));
182
187
  }), Ko(() => {
183
188
  i == null || i.disconnect(), i = null;
184
- }), se(
189
+ }), ae(
185
190
  () => n.items,
186
191
  () => {
187
- $();
192
+ V();
188
193
  },
189
194
  { deep: !0 }
190
195
  ), (p, j) => {
@@ -211,9 +216,9 @@ const ra = {
211
216
  onMenuChanged: j[0] || (j[0] = (I) => d.value = I)
212
217
  }, {
213
218
  "menu-button": B(() => [
214
- s("div", ia, [
219
+ a("div", is, [
215
220
  y(E, { name: "more_vert" }),
216
- s("span", ua, l(u(c)("auditLog.modules.more")), 1)
221
+ a("span", us, l(u(c)("auditLog.modules.more")), 1)
217
222
  ])
218
223
  ]),
219
224
  default: B(() => [
@@ -227,7 +232,7 @@ const ra = {
227
232
  ]),
228
233
  _: 1
229
234
  }, 8, ["show-menu"])) : F("", !0),
230
- s("div", {
235
+ a("div", {
231
236
  ref_key: "measurerRef",
232
237
  ref: _,
233
238
  "aria-hidden": "true",
@@ -245,15 +250,15 @@ const ra = {
245
250
  value: I.value
246
251
  }, null, 8, ["model-value", "label", "badge", "disabled", "value"])
247
252
  ]))), 128)),
248
- s("div", da, [
253
+ a("div", ds, [
249
254
  y(E, { name: "more_vert" }),
250
- s("span", ca, l(u(c)("auditLog.modules.more")), 1)
255
+ a("span", cs, l(u(c)("auditLog.modules.more")), 1)
251
256
  ])
252
257
  ], 512)
253
258
  ], 512);
254
259
  };
255
260
  }
256
- }), ma = qo("hrm-team", () => {
261
+ }), ms = qo("hrm-team", () => {
257
262
  const t = S([]), o = S(!1), n = S(!1), r = A(
258
263
  () => Object.fromEntries(t.value.map((_) => [_.doc.userId, _.name]))
259
264
  ), c = A(
@@ -265,7 +270,7 @@ const ra = {
265
270
  if (!(!_ && t.value.length > 0))
266
271
  try {
267
272
  o.value = !0;
268
- const w = await ea.readTeamMembers();
273
+ const w = await es.readTeamMembers();
269
274
  t.value = w.sort((D, O) => D.doc.isOwner ? -1 : D.name.localeCompare(O.name)), n.value = !0;
270
275
  } finally {
271
276
  o.value = !1;
@@ -281,7 +286,7 @@ const ra = {
281
286
  readTeamMembers: b
282
287
  };
283
288
  });
284
- function va(t) {
289
+ function vs(t) {
285
290
  const o = t.indexOf(".");
286
291
  return o <= 0 || o === t.length - 1 ? null : { entity: t.slice(0, o), verb: t.slice(o + 1) };
287
292
  }
@@ -289,16 +294,16 @@ function Ot(t) {
289
294
  const o = t.split("-").join(" ");
290
295
  return o.charAt(0).toUpperCase() + o.slice(1);
291
296
  }
292
- function pa(t, o, n) {
297
+ function ps(t, o, n) {
293
298
  const r = t(o, n);
294
299
  return r === o ? null : r;
295
300
  }
296
301
  function ut(t, o) {
297
302
  const { eventKey: n, params: r, operationLabel: c } = o;
298
303
  if (n) {
299
- const d = pa(t, `auditLog.event.sentence.${n}`, r);
304
+ const d = ps(t, `auditLog.event.sentence.${n}`, r);
300
305
  if (d) return d;
301
- const b = va(n);
306
+ const b = vs(n);
302
307
  if (b) {
303
308
  const _ = `${Ot(b.verb)} ${Ot(b.entity)}`, w = (r == null ? void 0 : r.label) ?? (r == null ? void 0 : r.name);
304
309
  return w !== void 0 && w !== "" ? `${_} — ${w}` : _;
@@ -306,8 +311,8 @@ function ut(t, o) {
306
311
  }
307
312
  return c ?? "";
308
313
  }
309
- function ga({ logs: t, selectedLog: o, isSheetOpen: n, businessId: r }) {
310
- const c = sa(), d = na(), { t: b } = dt(), _ = la();
314
+ function gs({ logs: t, selectedLog: o, isSheetOpen: n, businessId: r }) {
315
+ const c = as(), d = ns(), { t: b } = dt(), _ = ls();
311
316
  let w = 0;
312
317
  function D(f) {
313
318
  const { traceId: M, ...C } = c.query;
@@ -319,7 +324,7 @@ function ga({ logs: t, selectedLog: o, isSheetOpen: n, businessId: r }) {
319
324
  function i() {
320
325
  w++, D(void 0);
321
326
  }
322
- async function $(f) {
327
+ async function V(f) {
323
328
  var p;
324
329
  if (((p = o.value) == null ? void 0 : p.traceId) === f) return;
325
330
  const M = ++w;
@@ -339,7 +344,7 @@ function ga({ logs: t, selectedLog: o, isSheetOpen: n, businessId: r }) {
339
344
  }
340
345
  o.value = C, n.value = !0;
341
346
  }
342
- se(
347
+ ae(
343
348
  () => [c.query.traceId, r()],
344
349
  ([f, M], C) => {
345
350
  var p;
@@ -347,7 +352,7 @@ function ga({ logs: t, selectedLog: o, isSheetOpen: n, businessId: r }) {
347
352
  w++, n.value = !1, o.value = null, D(void 0);
348
353
  return;
349
354
  }
350
- typeof f == "string" && f ? M && $(f) : (w++, (p = o.value) != null && p.traceId && n.value && (n.value = !1, o.value = null));
355
+ typeof f == "string" && f ? M && V(f) : (w++, (p = o.value) != null && p.traceId && n.value && (n.value = !1, o.value = null));
351
356
  },
352
357
  { immediate: !0 }
353
358
  );
@@ -376,7 +381,7 @@ function Ke(t) {
376
381
  }
377
382
  return String(t);
378
383
  }
379
- function ha(t, o) {
384
+ function hs(t, o) {
380
385
  return t ? `${t}.${o}` : o;
381
386
  }
382
387
  function Ct(t) {
@@ -390,33 +395,33 @@ function Ct(t) {
390
395
  return { ok: !1, value: void 0 };
391
396
  }
392
397
  }
393
- const ya = ["_id", "id", "subject", "key", "name"];
394
- function ba(t, o) {
398
+ const ys = ["_id", "id", "subject", "key", "name"];
399
+ function bs(t, o) {
395
400
  if (t.length === 0 || o.length === 0) return null;
396
401
  const n = (c, d) => c.every((b) => _e(b) && b[d] !== void 0), r = (c, d) => {
397
402
  const b = c.map((_) => _[d]);
398
403
  return b.length === new Set(b).size;
399
404
  };
400
- for (const c of ya)
405
+ for (const c of ys)
401
406
  if (n(t, c) && n(o, c) && r(t, c) && r(o, c))
402
407
  return c;
403
408
  return null;
404
409
  }
405
- function Pt(t, o, n) {
410
+ function $t(t, o, n) {
406
411
  n.push({ path: t, type: "added", before: null, after: Ke(o) });
407
412
  }
408
413
  function Et(t, o, n) {
409
414
  n.push({ path: t, type: "removed", before: Ke(o), after: null });
410
415
  }
411
- function _a(t, o, n, r) {
416
+ function _s(t, o, n, r) {
412
417
  const c = /* @__PURE__ */ new Set([...Object.keys(o), ...Object.keys(n)]);
413
418
  for (const d of Array.from(c)) {
414
419
  const b = Object.prototype.hasOwnProperty.call(o, d), _ = Object.prototype.hasOwnProperty.call(n, d);
415
- Ye(ha(t, d), o[d], b, n[d], _, r);
420
+ Ye(hs(t, d), o[d], b, n[d], _, r);
416
421
  }
417
422
  }
418
- function xa(t, o, n, r) {
419
- const c = ba(o, n);
423
+ function xs(t, o, n, r) {
424
+ const c = bs(o, n);
420
425
  if (c) {
421
426
  const L = new Map(
422
427
  o.map((p) => [p[c], p])
@@ -441,8 +446,8 @@ function xa(t, o, n, r) {
441
446
  _.has(L.sig) || _.set(L.sig, []), _.get(L.sig).push(L);
442
447
  for (const L of b)
443
448
  w.has(L.sig) || w.set(L.sig, []), w.get(L.sig).push(L);
444
- const D = [], O = [], i = Array.from(_.keys()).concat(Array.from(w.keys())), $ = Array.from(new Set(i));
445
- for (const L of $) {
449
+ const D = [], O = [], i = Array.from(_.keys()).concat(Array.from(w.keys())), V = Array.from(new Set(i));
450
+ for (const L of V) {
446
451
  const f = _.get(L) || [], M = w.get(L) || [], C = Math.min(f.length, M.length);
447
452
  for (let p = C; p < f.length; p++)
448
453
  D.push({ idx: f[p].idx, item: f[p].item });
@@ -452,7 +457,7 @@ function xa(t, o, n, r) {
452
457
  for (const { idx: L, item: f } of D)
453
458
  Et(`${t}[${L}]`, f, r);
454
459
  for (const { idx: L, item: f } of O)
455
- Pt(`${t}[${L}]`, f, r);
460
+ $t(`${t}[${L}]`, f, r);
456
461
  }
457
462
  function Ye(t, o, n, r, c, d) {
458
463
  if (!n && !c) return;
@@ -461,16 +466,16 @@ function Ye(t, o, n, r, c, d) {
461
466
  return;
462
467
  }
463
468
  if (!n && c) {
464
- Pt(t, r, d);
469
+ $t(t, r, d);
465
470
  return;
466
471
  }
467
472
  if (JSON.stringify(o) === JSON.stringify(r)) return;
468
473
  if (_e(o) && _e(r)) {
469
- _a(t, o, r, d);
474
+ _s(t, o, r, d);
470
475
  return;
471
476
  }
472
477
  if (je(o) && je(r)) {
473
- xa(t, o, r, d);
478
+ xs(t, o, r, d);
474
479
  return;
475
480
  }
476
481
  const b = Ct(o), _ = Ct(r);
@@ -485,7 +490,7 @@ function Ye(t, o, n, r, c, d) {
485
490
  after: Ke(r)
486
491
  });
487
492
  }
488
- function La(t, o) {
493
+ function Ls(t, o) {
489
494
  if (JSON.stringify(t) === JSON.stringify(o)) return [];
490
495
  const n = t == null, r = o == null;
491
496
  let c = t;
@@ -505,7 +510,7 @@ function lt(t, o) {
505
510
  const n = (d = (c = t.metadata) == null ? void 0 : c.pos) == null ? void 0 : d.posMode, r = t.deviceId || "-";
506
511
  return n ? `${r} · ${o(`auditLog.pos.mode.${n}`)}` : r;
507
512
  }
508
- function ka(t, o) {
513
+ function ks(t, o) {
509
514
  var r;
510
515
  const n = t.actorName || t.userId || "-";
511
516
  return ((r = t.metadata) == null ? void 0 : r.actorKnown) === !1 ? `${n} (${o("auditLog.pos.unverified")})` : n;
@@ -518,11 +523,11 @@ function jt(t, o) {
518
523
  const r = ((c = t.metadata) == null ? void 0 : c.approverKnown) === !1 ? `${n} (${o("auditLog.pos.unverified")})` : n;
519
524
  return t.source === "hrm-validate" ? `${r} · ${o("auditLog.pos.viaCode")}` : r;
520
525
  }
521
- function Sa(t, o) {
526
+ function Ss(t, o) {
522
527
  const n = t.approverName || t.approverId;
523
528
  return n ? ` · ${o("auditLog.pos.approverInline", { name: n })}` : "";
524
529
  }
525
- function wa(t, o, n) {
530
+ function ws(t, o, n) {
526
531
  return o || !(t != null && t.length) ? { userIds: [], feedmeAdminActors: !1 } : {
527
532
  userIds: t.filter((r) => r !== n),
528
533
  feedmeAdminActors: t.includes(n)
@@ -531,7 +536,7 @@ function wa(t, o, n) {
531
536
  function be(t) {
532
537
  return t === void 0 ? "—" : Array.isArray(t) ? t.length > 0 ? t.join(", ") : "—" : t || "—";
533
538
  }
534
- function Ia(t) {
539
+ function Is(t) {
535
540
  return {
536
541
  label: t.label,
537
542
  labelKey: t.labelKey,
@@ -540,7 +545,7 @@ function Ia(t) {
540
545
  afterDisplay: be(t.after)
541
546
  };
542
547
  }
543
- function Aa(t) {
548
+ function As(t) {
544
549
  return Array.isArray(t) && t.length > 0;
545
550
  }
546
551
  function Rt(t, o, n) {
@@ -549,7 +554,7 @@ function Rt(t, o, n) {
549
554
  function Ut(t, o) {
550
555
  return ut(t, o) || t("auditLog.operation.unlabeled");
551
556
  }
552
- function Fa(t, o) {
557
+ function Fs(t, o) {
553
558
  return !o || o.length === 0 ? "" : o.map((n) => {
554
559
  const r = Ut(t, n), c = t(`auditLog.outcome.${n.status}`);
555
560
  let d = `${r}: ${c}`;
@@ -557,185 +562,185 @@ function Fa(t, o) {
557
562
  }).join(`
558
563
  `);
559
564
  }
560
- function Ma(t, o, n) {
565
+ function Ms(t, o, n) {
561
566
  const r = Rt(t, o, n);
562
567
  return n.type === "add" ? `${r}: + ${be(n.after)}` : n.type === "remove" ? `${r}: - ${be(n.before)}` : `${r}: ${be(n.before)} → ${be(n.after)}`;
563
568
  }
564
- function Da(t, o, n) {
569
+ function Ds(t, o, n) {
565
570
  if (!n || n.length === 0) return "";
566
571
  const r = n.filter((b) => b.changeNodes && b.changeNodes.length > 0);
567
572
  if (r.length === 0) return "";
568
573
  const c = r.length > 1;
569
574
  return r.map((b) => {
570
- const _ = (b.changeNodes ?? []).map((w) => Ma(t, o, w));
575
+ const _ = (b.changeNodes ?? []).map((w) => Ms(t, o, w));
571
576
  return c ? [`[${Ut(t, b)}]`, ..._].join(`
572
577
  `) : _.join(`
573
578
  `);
574
579
  }).join(`
575
580
  `);
576
581
  }
577
- const Oa = {
582
+ const Os = {
578
583
  class: "flex flex-col gap-4 p-12 w-[260px]"
579
- }, Ca = {
584
+ }, Cs = {
580
585
  class: "text-xs font-semibold text-fm-color-typo-secondary mb-4"
581
- }, Ta = {
586
+ }, Ts = {
582
587
  class: "flex min-h-0 flex-1 flex-col gap-16"
583
- }, ja = {
588
+ }, js = {
584
589
  class: "space-y-16"
585
- }, Va = {
590
+ }, Ps = {
586
591
  class: "flex flex-wrap items-center gap-8"
587
- }, $a = {
592
+ }, Vs = {
588
593
  key: 0,
589
594
  class: "w-fit"
590
- }, Pa = {
595
+ }, $s = {
591
596
  key: 1,
592
597
  class: "w-fit"
593
- }, Ea = {
598
+ }, Es = {
594
599
  class: "w-fit"
595
- }, Ra = {
600
+ }, Rs = {
596
601
  class: "w-fit"
597
- }, Ua = {
602
+ }, Us = {
598
603
  key: 2,
599
604
  class: "w-fit"
600
- }, Na = {
605
+ }, Ns = {
601
606
  class: "flex h-full flex-col overflow-auto"
602
- }, Ka = {
607
+ }, Ks = {
603
608
  key: 0,
604
609
  class: "space-y-12 p-4 text-sm"
605
- }, Ya = {
610
+ }, Ys = {
606
611
  class: "flex items-start justify-between gap-8 rounded-lg border border-fm-color-border-default p-12"
607
- }, Ba = {
612
+ }, Bs = {
608
613
  class: "min-w-0 flex-1"
609
- }, za = {
614
+ }, zs = {
610
615
  class: "audit-log-operation-label-detail text-base font-bold leading-snug text-fm-color-typo-primary"
611
- }, qa = {
616
+ }, qs = {
612
617
  key: 0,
613
618
  class: "mt-4 break-all font-mono text-xs text-fm-color-typo-secondary"
614
- }, Ja = {
619
+ }, Js = {
615
620
  key: 1,
616
621
  class: "mt-2 break-all font-mono text-xs text-fm-color-typo-secondary"
617
- }, Ha = {
622
+ }, Hs = {
618
623
  class: "flex items-center gap-4"
619
- }, Wa = {
624
+ }, Ws = {
620
625
  class: "rounded-lg border border-fm-color-border-default p-12"
621
- }, Ga = {
626
+ }, Gs = {
622
627
  class: "space-y-12"
623
- }, Xa = {
628
+ }, Xs = {
624
629
  class: "text-xs text-fm-color-typo-secondary"
625
- }, Qa = {
630
+ }, Qs = {
626
631
  class: "font-semibold"
627
- }, Za = {
632
+ }, Zs = {
628
633
  class: "text-xs text-fm-color-typo-secondary"
629
- }, es = {
634
+ }, ea = {
630
635
  class: "font-semibold"
631
- }, ts = {
636
+ }, ta = {
632
637
  class: "text-xs text-fm-color-typo-secondary"
633
- }, os = {
638
+ }, oa = {
634
639
  class: "break-all font-semibold"
635
- }, as = {
640
+ }, sa = {
636
641
  key: 0
637
- }, ss = {
642
+ }, aa = {
638
643
  class: "text-xs text-fm-color-typo-secondary"
639
- }, ns = {
644
+ }, na = {
640
645
  class: "break-all font-mono text-xs font-semibold"
641
- }, ls = {
646
+ }, la = {
642
647
  class: "text-xs text-fm-color-typo-secondary"
643
- }, rs = {
648
+ }, ra = {
644
649
  class: "break-all font-mono text-xs font-semibold"
645
- }, is = {
650
+ }, ia = {
646
651
  class: "text-xs text-fm-color-typo-secondary"
647
- }, us = {
652
+ }, ua = {
648
653
  class: "font-semibold"
649
- }, ds = {
654
+ }, da = {
650
655
  class: "rounded-lg border border-fm-color-border-default"
651
- }, cs = {
656
+ }, ca = {
652
657
  class: "p-12"
653
- }, fs = {
658
+ }, fa = {
654
659
  class: "text-base font-bold text-fm-color-typo-primary"
655
- }, ms = {
660
+ }, ma = {
656
661
  class: "space-y-12 p-12"
657
- }, vs = {
662
+ }, va = {
658
663
  class: "text-xs text-fm-color-typo-secondary"
659
- }, ps = {
664
+ }, pa = {
660
665
  class: "font-semibold"
661
- }, gs = {
666
+ }, ga = {
662
667
  class: "rounded-lg border border-fm-color-border-default"
663
- }, hs = {
668
+ }, ha = {
664
669
  class: "p-12"
665
- }, ys = {
670
+ }, ya = {
666
671
  class: "text-base font-bold text-fm-color-typo-primary"
667
- }, bs = {
672
+ }, ba = {
668
673
  class: "space-y-12 p-12"
669
- }, _s = {
674
+ }, _a = {
670
675
  class: "text-xs text-fm-color-typo-secondary"
671
- }, xs = {
676
+ }, xa = {
672
677
  class: "font-semibold"
673
- }, Ls = {
678
+ }, La = {
674
679
  key: 0
675
- }, ks = {
680
+ }, ka = {
676
681
  class: "text-xs text-fm-color-typo-secondary"
677
- }, Ss = {
682
+ }, Sa = {
678
683
  key: 0,
679
684
  class: "font-semibold"
680
- }, ws = {
685
+ }, wa = {
681
686
  key: 1,
682
687
  class: "break-all font-mono text-xs text-fm-color-typo-secondary"
683
- }, Is = {
688
+ }, Ia = {
684
689
  key: 1
685
- }, As = {
690
+ }, Aa = {
686
691
  class: "text-xs text-fm-color-typo-secondary"
687
- }, Fs = {
692
+ }, Fa = {
688
693
  class: "font-semibold whitespace-pre-line"
689
- }, Ms = {
694
+ }, Ma = {
690
695
  class: "text-xs text-fm-color-typo-secondary"
691
- }, Ds = {
696
+ }, Da = {
692
697
  class: "font-semibold"
693
- }, Os = {
698
+ }, Oa = {
694
699
  class: "text-xs text-fm-color-typo-secondary"
695
- }, Cs = {
700
+ }, Ca = {
696
701
  class: "break-all font-mono text-xs font-semibold"
697
- }, Ts = {
702
+ }, Ta = {
698
703
  class: "text-xs text-fm-color-typo-secondary"
699
- }, js = {
704
+ }, ja = {
700
705
  class: "break-all font-mono text-xs font-semibold"
701
- }, Vs = {
706
+ }, Pa = {
702
707
  class: "text-xs text-fm-color-typo-secondary"
703
- }, $s = {
708
+ }, Va = {
704
709
  class: "font-semibold"
705
- }, Ps = {
710
+ }, $a = {
706
711
  key: 0,
707
712
  class: "break-all font-mono text-xs"
708
- }, Es = {
713
+ }, Ea = {
709
714
  key: 0
710
- }, Rs = {
715
+ }, Ra = {
711
716
  class: "text-xs text-fm-color-typo-secondary"
712
- }, Us = {
717
+ }, Ua = {
713
718
  class: "font-semibold"
714
- }, Ns = {
719
+ }, Na = {
715
720
  class: "text-xs text-fm-color-typo-secondary"
716
- }, Ks = {
721
+ }, Ka = {
717
722
  class: "font-semibold"
718
- }, Ys = {
723
+ }, Ya = {
719
724
  class: "text-xs text-fm-color-typo-secondary"
720
- }, Bs = {
725
+ }, Ba = {
721
726
  class: "font-semibold"
722
- }, zs = {
727
+ }, za = {
723
728
  key: 0
724
- }, qs = {
729
+ }, qa = {
725
730
  key: 1
726
- }, Js = {
731
+ }, Ja = {
727
732
  class: "text-xs text-fm-color-typo-secondary"
728
- }, Hs = {
733
+ }, Ha = {
729
734
  class: "whitespace-pre-wrap break-all font-mono text-xs"
730
- }, Ws = {
735
+ }, Wa = {
731
736
  key: 3
732
- }, Gs = {
737
+ }, Ga = {
733
738
  class: "text-xs text-fm-color-typo-secondary"
734
- }, Xs = {
739
+ }, Xa = {
735
740
  class: "mt-4 space-y-4"
736
- }, Qs = {
741
+ }, Qa = {
737
742
  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"
738
- }, Zs = {
743
+ }, Za = {
739
744
  class: "text-xs font-semibold"
740
745
  }, en = {
741
746
  key: 0,
@@ -744,9 +749,9 @@ const Oa = {
744
749
  key: 4
745
750
  }, on = {
746
751
  class: "text-xs text-fm-color-typo-secondary"
747
- }, an = {
748
- class: "mt-4 max-h-[400px] overflow-auto rounded bg-gray-100 p-8 font-mono text-xs leading-relaxed shadow-inner whitespace-pre-wrap break-all"
749
752
  }, sn = {
753
+ class: "mt-4 max-h-[400px] overflow-auto rounded bg-gray-100 p-8 font-mono text-xs leading-relaxed shadow-inner whitespace-pre-wrap break-all"
754
+ }, an = {
750
755
  key: 0,
751
756
  class: "space-y-12 p-4 text-sm"
752
757
  }, nn = {
@@ -812,12 +817,12 @@ const Oa = {
812
817
  class: "text-fm-color-typo-error"
813
818
  }, jn = {
814
819
  class: "text-fm-color-typo-success"
815
- }, Vn = {
820
+ }, Pn = {
816
821
  key: 1,
817
822
  class: "divide-y divide-fm-color-border-default"
818
- }, $n = {
823
+ }, Vn = {
819
824
  class: "flex flex-wrap items-center gap-8"
820
- }, Pn = {
825
+ }, $n = {
821
826
  class: "break-all font-mono text-xs"
822
827
  }, En = {
823
828
  class: "space-y-4"
@@ -853,26 +858,26 @@ const Oa = {
853
858
  class: "text-xs text-fm-color-typo-secondary"
854
859
  }, Qn = {
855
860
  class: "mt-4 max-h-[400px] overflow-auto rounded bg-gray-100 p-8 font-mono text-xs leading-relaxed shadow-inner whitespace-pre-wrap break-all"
856
- }, Oe = 100, rt = 1e3, it = "__feedmeAdmin__", Zn = "D MMM YYYY h:mm A", el = "YYYY-MM-DD HH:mm", N = "YYYY-MM-DD", Vt = "audit-log-export-fields-v3", tl = /* @__PURE__ */ $t({
861
+ }, Oe = 100, rt = 1e3, it = "__feedmeAdmin__", Zn = "D MMM YYYY h:mm A", el = "YYYY-MM-DD HH:mm", N = "YYYY-MM-DD", Pt = "audit-log-export-fields-v3", tl = /* @__PURE__ */ Vt({
857
862
  __name: "AuditLogList",
858
863
  setup(t) {
859
864
  const {
860
865
  t: o,
861
866
  te: n
862
- } = dt(), r = Ho(), c = Wo(), d = ma(), b = ta(), {
867
+ } = dt(), r = Ho(), c = Wo(), d = ms(), b = ts(), {
863
868
  restaurants: _
864
- } = Jo(b), w = S(!1), D = S(!1), O = S([]), i = S(null), $ = S(!1), L = S({}), f = S(null), M = S(!1);
869
+ } = Jo(b), w = S(!1), D = S(!1), O = S([]), i = S(null), V = S(!1), L = S({}), f = S(null), M = S(!1);
865
870
  async function C(e) {
866
- const a = Uint8Array.from(atob(e), (k) => k.charCodeAt(0)), m = new DecompressionStream("gzip"), x = m.writable.getWriter();
867
- return await x.write(a), await x.close(), new Response(m.readable).text();
871
+ const s = Uint8Array.from(atob(e), (k) => k.charCodeAt(0)), m = new DecompressionStream("gzip"), x = m.writable.getWriter();
872
+ return await x.write(s), await x.close(), new Response(m.readable).text();
868
873
  }
869
874
  const p = S("");
870
875
  let j = 0;
871
- se(() => {
872
- var e, a;
873
- return (a = (e = i.value) == null ? void 0 : e.metadata) == null ? void 0 : a.requestBody;
876
+ ae(() => {
877
+ var e, s;
878
+ return (s = (e = i.value) == null ? void 0 : e.metadata) == null ? void 0 : s.requestBody;
874
879
  }, async (e) => {
875
- const a = ++j;
880
+ const s = ++j;
876
881
  if (!e) {
877
882
  p.value = "";
878
883
  return;
@@ -884,10 +889,10 @@ const Oa = {
884
889
  if (e.startsWith("gzip:")) {
885
890
  try {
886
891
  const m = await C(e.slice(5));
887
- if (a !== j) return;
892
+ if (s !== j) return;
888
893
  p.value = JSON.stringify(JSON.parse(m), null, 2);
889
894
  } catch {
890
- if (a !== j) return;
895
+ if (s !== j) return;
891
896
  p.value = e;
892
897
  }
893
898
  return;
@@ -902,17 +907,17 @@ const Oa = {
902
907
  });
903
908
  async function K(e) {
904
909
  if (!e) return;
905
- let a = e;
910
+ let s = e;
906
911
  if (e.startsWith("gzip:"))
907
912
  try {
908
- a = await C(e.slice(5));
913
+ s = await C(e.slice(5));
909
914
  } catch {
910
915
  return e;
911
916
  }
912
917
  try {
913
- return JSON.parse(a);
918
+ return JSON.parse(s);
914
919
  } catch {
915
- return a;
920
+ return s;
916
921
  }
917
922
  }
918
923
  function E(e) {
@@ -927,11 +932,11 @@ const Oa = {
927
932
  }
928
933
  const X = S([]), Y = S([]), I = S(""), Q = S(""), H = S(!1);
929
934
  let xe = 0;
930
- se(f, async (e) => {
931
- const a = ++xe;
935
+ ae(f, async (e) => {
936
+ const s = ++xe;
932
937
  if (X.value = [], Y.value = [], I.value = "", Q.value = "", H.value = !1, !e) return;
933
938
  const [m, x] = await Promise.all([K(e.before), K(e.after)]);
934
- a === xe && (Aa(e.changeNodes) ? Y.value = e.changeNodes.map(Ia) : X.value = La(m, x), I.value = E(m), Q.value = E(x));
939
+ s === xe && (As(e.changeNodes) ? Y.value = e.changeNodes.map(Is) : X.value = Ls(m, x), I.value = E(m), Q.value = E(x));
935
940
  });
936
941
  function ct(e) {
937
942
  return e === "added" ? "success" : e === "removed" ? "critical" : "warning";
@@ -952,33 +957,33 @@ const Oa = {
952
957
  return Rt(o, n, e);
953
958
  }
954
959
  const ft = A(() => {
955
- const e = [], a = /* @__PURE__ */ new Map();
960
+ const e = [], s = /* @__PURE__ */ new Map();
956
961
  for (const m of X.value) {
957
962
  const x = Le(m.path), k = `${m.type}::${x}`;
958
- let T = a.get(k);
963
+ let T = s.get(k);
959
964
  T || (T = {
960
965
  groupKey: k,
961
966
  displayKey: x,
962
967
  type: m.type,
963
968
  rows: []
964
- }, a.set(k, T), e.push(T)), T.rows.push(m);
969
+ }, s.set(k, T), e.push(T)), T.rows.push(m);
965
970
  }
966
971
  return e;
967
- }), Ve = S(1), Bt = S(!1), Be = S(0), mt = A(() => Math.max(1, Math.ceil(Be.value / Oe))), vt = V().format("YYYY-MM-DD"), ne = S({
972
+ }), Pe = S(1), Bt = S(!1), Be = S(0), mt = A(() => Math.max(1, Math.ceil(Be.value / Oe))), vt = P().format("YYYY-MM-DD"), ne = S({
968
973
  startDate: `${vt} 00:00`,
969
974
  endDate: `${vt} 23:59`
970
975
  }), fe = S(), Z = S(), le = S(), re = S(), ie = S("all");
971
976
  function zt(e) {
972
- return typeof e == "string" ? [e] : Array.isArray(e) ? e.filter((a) => typeof a == "string") : [];
977
+ return typeof e == "string" ? [e] : Array.isArray(e) ? e.filter((s) => typeof s == "string") : [];
973
978
  }
974
979
  const pt = De.filter((e) => e.key !== "all").map((e) => e.key);
975
- function $e(e) {
976
- const a = De.find((m) => m.key !== "all" && m.subjectPrefixes.some((x) => e.startsWith(x)));
977
- return (a == null ? void 0 : a.key) ?? "other";
980
+ function Ve(e) {
981
+ const s = De.find((m) => m.key !== "all" && m.subjectPrefixes.some((x) => e.startsWith(x)));
982
+ return (s == null ? void 0 : s.key) ?? "other";
978
983
  }
979
984
  function gt(e) {
980
- const a = pt.indexOf(e);
981
- return a === -1 ? pt.length : a;
985
+ const s = pt.indexOf(e);
986
+ return s === -1 ? pt.length : s;
982
987
  }
983
988
  const qt = ["all", "report", "hrm", "payment"], Jt = A(() => De.filter(({
984
989
  key: e
@@ -987,8 +992,8 @@ const Oa = {
987
992
  }) => ({
988
993
  label: o(`auditLog.modules.${e}`),
989
994
  value: e
990
- }))), Pe = A(() => De.find((e) => e.key === ie.value) ?? De[0]), Ht = A(() => ie.value === "all"), q = A(() => ie.value === "pos"), pe = A(() => Pe.value.sources ?? []);
991
- se(q, (e) => {
995
+ }))), $e = A(() => De.find((e) => e.key === ie.value) ?? De[0]), Ht = A(() => ie.value === "all"), q = A(() => ie.value === "pos"), pe = A(() => $e.value.sources ?? []);
996
+ ae(q, (e) => {
992
997
  e && b.readRestaurants();
993
998
  }, {
994
999
  immediate: !0
@@ -997,7 +1002,7 @@ const Oa = {
997
1002
  label: e.profile.name,
998
1003
  value: String(e._id)
999
1004
  }))), Gt = A(() => Object.fromEntries(_.value.map((e) => [String(e._id), e.profile.name])));
1000
- se(ie, () => {
1005
+ ae(ie, () => {
1001
1006
  ee.value = [];
1002
1007
  });
1003
1008
  const ke = S([]), Ee = S(!1), Xt = A(() => [...Ee.value ? [{
@@ -1009,7 +1014,7 @@ const Oa = {
1009
1014
  })), ...ke.value.map((e) => ({
1010
1015
  label: `${e.name} (${o("auditLog.user.feedmeAdmin")})`,
1011
1016
  value: e.userId
1012
- }))]), ue = A(() => wa(fe.value, q.value, it)), ze = S(""), te = S(""), Qt = oa(ze, (e) => {
1017
+ }))]), ue = A(() => ws(fe.value, q.value, it)), ze = S(""), te = S(""), Qt = os(ze, (e) => {
1013
1018
  te.value = e.trim();
1014
1019
  });
1015
1020
  Bo(Qt);
@@ -1017,50 +1022,50 @@ const Oa = {
1017
1022
  onSheetOpened: Zt,
1018
1023
  onSheetClosed: eo,
1019
1024
  copyLink: to
1020
- } = ga({
1025
+ } = gs({
1021
1026
  logs: O,
1022
1027
  selectedLog: i,
1023
- isSheetOpen: $,
1028
+ isSheetOpen: V,
1024
1029
  businessId: () => c.id.value
1025
1030
  }), me = A(() => {
1026
1031
  const e = te.value.toLowerCase();
1027
1032
  if (!e) return [];
1028
- const a = /* @__PURE__ */ new Set();
1033
+ const s = /* @__PURE__ */ new Set();
1029
1034
  for (const m of d.members) {
1030
1035
  const x = m.doc.userId;
1031
- ((d.userIdToName[x] ?? "").toLowerCase().includes(e) || (d.userIdToEmail[x] ?? "").toLowerCase().includes(e) || (d.userIdToPhone[x] ?? "").toLowerCase().includes(e)) && a.add(x);
1036
+ ((d.userIdToName[x] ?? "").toLowerCase().includes(e) || (d.userIdToEmail[x] ?? "").toLowerCase().includes(e) || (d.userIdToPhone[x] ?? "").toLowerCase().includes(e)) && s.add(x);
1032
1037
  }
1033
1038
  for (const m of ke.value)
1034
- m.name.toLowerCase().includes(e) && a.add(m.userId);
1035
- return [...a];
1039
+ m.name.toLowerCase().includes(e) && s.add(m.userId);
1040
+ return [...s];
1036
1041
  }), qe = A(() => {
1037
1042
  const e = Dt.flatMap((k) => zt(k.subject).map((T) => ({
1038
1043
  label: k.label,
1039
1044
  value: T
1040
- }))), a = Object.entries(Mt).map(([k, T]) => ({
1045
+ }))), s = Object.entries(Mt).map(([k, T]) => ({
1041
1046
  label: T,
1042
1047
  value: k
1043
1048
  })), m = /* @__PURE__ */ new Set(), x = [];
1044
- for (const k of [...e, ...a])
1049
+ for (const k of [...e, ...s])
1045
1050
  if (!m.has(k.value)) {
1046
1051
  m.add(k.value);
1047
- const T = $e(k.value);
1052
+ const T = Ve(k.value);
1048
1053
  x.push({
1049
1054
  ...k,
1050
1055
  group: o(`auditLog.modules.${T}`)
1051
1056
  });
1052
1057
  }
1053
- return x.sort((k, T) => gt($e(k.value)) - gt($e(T.value)));
1058
+ return x.sort((k, T) => gt(Ve(k.value)) - gt(Ve(T.value)));
1054
1059
  }), ge = A(() => {
1055
1060
  const e = te.value.toLowerCase();
1056
1061
  if (!e) return [];
1057
- const a = /* @__PURE__ */ new Set();
1062
+ const s = /* @__PURE__ */ new Set();
1058
1063
  for (const m of qe.value)
1059
- m.label.toLowerCase().includes(e) && a.add(m.value);
1060
- return [...a];
1061
- }), oo = A(() => Ht.value ? qe.value : qe.value.filter((e) => $e(e.value) === ie.value));
1062
- function ao(e, a) {
1063
- const m = a.toLowerCase();
1064
+ m.label.toLowerCase().includes(e) && s.add(m.value);
1065
+ return [...s];
1066
+ }), oo = A(() => Ht.value ? qe.value : qe.value.filter((e) => Ve(e.value) === ie.value));
1067
+ function so(e, s) {
1068
+ const m = s.toLowerCase();
1064
1069
  return e.label.toLowerCase().includes(m) || e.value.replace(/^business::/, "").toLowerCase().includes(m) ? !0 : e.value.toLowerCase().includes(m);
1065
1070
  }
1066
1071
  const G = A(() => ({
@@ -1069,7 +1074,7 @@ const Oa = {
1069
1074
  read: o("auditLog.action.read"),
1070
1075
  update: o("auditLog.action.update"),
1071
1076
  delete: o("auditLog.action.delete")
1072
- })), so = A(() => [{
1077
+ })), ao = A(() => [{
1073
1078
  label: G.value.manage,
1074
1079
  value: "manage"
1075
1080
  }, {
@@ -1127,71 +1132,71 @@ const Oa = {
1127
1132
  skipped: "warning"
1128
1133
  };
1129
1134
  function Ue(e) {
1130
- return V(e).format(Zn);
1135
+ return P(e).format(Zn);
1131
1136
  }
1132
1137
  const uo = A(() => {
1133
1138
  const {
1134
1139
  startDate: e,
1135
- endDate: a
1140
+ endDate: s
1136
1141
  } = ne.value;
1137
- return e && a ? `${Ue(e)} – ${Ue(a)}` : e ? Ue(e) : a ? Ue(a) : o("auditLog.dateRange.placeholder");
1142
+ return e && s ? `${Ue(e)} – ${Ue(s)}` : e ? Ue(e) : s ? Ue(s) : o("auditLog.dateRange.placeholder");
1138
1143
  }), co = A(() => [{
1139
1144
  label: o("date.predefinedRanges.today"),
1140
1145
  value: {
1141
- startDate: V().format(N),
1142
- endDate: V().format(N)
1146
+ startDate: P().format(N),
1147
+ endDate: P().format(N)
1143
1148
  }
1144
1149
  }, {
1145
1150
  label: o("date.predefinedRanges.yesterday"),
1146
1151
  value: {
1147
- startDate: V().subtract(1, "day").format(N),
1148
- endDate: V().subtract(1, "day").format(N)
1152
+ startDate: P().subtract(1, "day").format(N),
1153
+ endDate: P().subtract(1, "day").format(N)
1149
1154
  }
1150
1155
  }, {
1151
1156
  label: o("date.predefinedRanges.thisWeek"),
1152
1157
  value: {
1153
- startDate: V().startOf("week").format(N),
1154
- endDate: V().endOf("week").format(N)
1158
+ startDate: P().startOf("week").format(N),
1159
+ endDate: P().endOf("week").format(N)
1155
1160
  }
1156
1161
  }, {
1157
1162
  label: o("date.predefinedRanges.lastWeek"),
1158
1163
  value: {
1159
- startDate: V().subtract(1, "week").startOf("week").format(N),
1160
- endDate: V().subtract(1, "week").endOf("week").format(N)
1164
+ startDate: P().subtract(1, "week").startOf("week").format(N),
1165
+ endDate: P().subtract(1, "week").endOf("week").format(N)
1161
1166
  }
1162
1167
  }, {
1163
1168
  label: o("date.predefinedRanges.last7Days"),
1164
1169
  value: {
1165
- startDate: V().subtract(7, "day").format(N),
1166
- endDate: V().subtract(1, "day").format(N)
1170
+ startDate: P().subtract(7, "day").format(N),
1171
+ endDate: P().subtract(1, "day").format(N)
1167
1172
  }
1168
1173
  }, {
1169
1174
  label: o("date.predefinedRanges.thisMonth"),
1170
1175
  value: {
1171
- startDate: V().startOf("month").format(N),
1172
- endDate: V().endOf("month").format(N)
1176
+ startDate: P().startOf("month").format(N),
1177
+ endDate: P().endOf("month").format(N)
1173
1178
  }
1174
1179
  }, {
1175
1180
  label: o("date.predefinedRanges.lastMonth"),
1176
1181
  value: {
1177
- startDate: V().subtract(1, "month").startOf("month").format(N),
1178
- endDate: V().subtract(1, "month").endOf("month").format(N)
1182
+ startDate: P().subtract(1, "month").startOf("month").format(N),
1183
+ endDate: P().subtract(1, "month").endOf("month").format(N)
1179
1184
  }
1180
1185
  }]);
1181
1186
  function We(e) {
1182
- var a;
1183
- return ((a = Dt.find((m) => m.subject === e)) == null ? void 0 : a.label) ?? Mt[e] ?? ra[e];
1187
+ var s;
1188
+ return ((s = Dt.find((m) => m.subject === e)) == null ? void 0 : s.label) ?? Mt[e] ?? rs[e];
1184
1189
  }
1185
1190
  function Se(e) {
1186
1191
  var m, x;
1187
1192
  if (e.actorType === "posUser")
1188
- return ka(e, o);
1193
+ return ks(e, o);
1189
1194
  if (e.actorType === "portalUser")
1190
1195
  return e.actorName ?? e.userId;
1191
1196
  if (e.actorType === "feedmeAdmin")
1192
1197
  return (m = r.sessionUser.value) != null && m.isInternal ? `${e.actorName ?? e.userId} (${o("auditLog.user.feedmeAdmin")})` : o("auditLog.user.feedmeAdmin");
1193
- const a = d.userIdToName[e.userId];
1194
- return a || (d.hasLoaded ? (x = r.sessionUser.value) != null && x.isInternal ? `${e.actorName ?? e.userId} (${o("auditLog.user.feedmeAdmin")})` : o("auditLog.user.feedmeAdmin") : e.userId);
1198
+ const s = d.userIdToName[e.userId];
1199
+ return s || (d.hasLoaded ? (x = r.sessionUser.value) != null && x.isInternal ? `${e.actorName ?? e.userId} (${o("auditLog.user.feedmeAdmin")})` : o("auditLog.user.feedmeAdmin") : e.userId);
1195
1200
  }
1196
1201
  function yt(e) {
1197
1202
  return e.actorType === "posUser" ? q.value ? "" : lt(e, o) : d.userIdToPhone[e.userId] || "-";
@@ -1200,21 +1205,21 @@ const Oa = {
1200
1205
  return d.userIdToEmail[e.userId] || "-";
1201
1206
  }
1202
1207
  function bt(e) {
1203
- return V(e).format("DD MMM YYYY, HH:mm");
1208
+ return P(e).format("DD MMM YYYY, HH:mm");
1204
1209
  }
1205
1210
  function Ge(e) {
1206
- return V(e).format("DD MMM YYYY, HH:mm:ss").toUpperCase();
1211
+ return P(e).format("DD MMM YYYY, HH:mm:ss").toUpperCase();
1207
1212
  }
1208
1213
  function _t(e) {
1209
1214
  return G.value[e] ?? e;
1210
1215
  }
1211
1216
  function xt(e) {
1212
- const a = ut(o, {
1217
+ const s = ut(o, {
1213
1218
  eventKey: e.eventKey,
1214
1219
  params: e.params,
1215
1220
  operationLabel: e.metadata.operationLabel ?? _t(e.action)
1216
1221
  });
1217
- return e.actorType === "posUser" && !q.value ? a + Sa(e, o) : a;
1222
+ return e.actorType === "posUser" && !q.value ? s + Ss(e, o) : s;
1218
1223
  }
1219
1224
  function Lt(e) {
1220
1225
  return ut(o, e) || o("auditLog.operation.unlabeled");
@@ -1235,8 +1240,8 @@ const Oa = {
1235
1240
  return e.metadata.requestMethod ? ro.value[e.metadata.requestMethod] ?? e.metadata.requestMethod : _t(e.action);
1236
1241
  }
1237
1242
  function St(e) {
1238
- const a = String(e ?? "");
1239
- return `"${(/^[=+\-@\t\r]/.test(a) ? `'${a}` : a).replace(/"/g, '""')}"`;
1243
+ const s = String(e ?? "");
1244
+ return `"${(/^[=+\-@\t\r]/.test(s) ? `'${s}` : s).replace(/"/g, '""')}"`;
1240
1245
  }
1241
1246
  const Qe = [{
1242
1247
  key: "timestamp",
@@ -1276,12 +1281,12 @@ const Oa = {
1276
1281
  }, {
1277
1282
  key: "operationEvents",
1278
1283
  labelKey: "auditLog.exportFields.operationEvents",
1279
- getValue: (e) => Fa(o, e.operations),
1284
+ getValue: (e) => Fs(o, e.operations),
1280
1285
  defaultSelected: !0
1281
1286
  }, {
1282
1287
  key: "changes",
1283
1288
  labelKey: "auditLog.exportFields.changes",
1284
- getValue: (e) => Da(o, n, e.operations),
1289
+ getValue: (e) => Ds(o, n, e.operations),
1285
1290
  defaultSelected: !1
1286
1291
  }, {
1287
1292
  key: "businessId",
@@ -1302,24 +1307,24 @@ const Oa = {
1302
1307
  key: "resolvedFrom",
1303
1308
  labelKey: "auditLog.exportFields.resolvedFrom",
1304
1309
  getValue: (e) => {
1305
- var a;
1306
- return (a = e.metadata) == null ? void 0 : a.resolvedFrom;
1310
+ var s;
1311
+ return (s = e.metadata) == null ? void 0 : s.resolvedFrom;
1307
1312
  },
1308
1313
  defaultSelected: !1
1309
1314
  }, {
1310
1315
  key: "requestMethod",
1311
1316
  labelKey: "auditLog.exportFields.requestMethod",
1312
1317
  getValue: (e) => {
1313
- var a;
1314
- return (a = e.metadata) == null ? void 0 : a.requestMethod;
1318
+ var s;
1319
+ return (s = e.metadata) == null ? void 0 : s.requestMethod;
1315
1320
  },
1316
1321
  defaultSelected: !1
1317
1322
  }, {
1318
1323
  key: "requestPath",
1319
1324
  labelKey: "auditLog.exportFields.requestPath",
1320
1325
  getValue: (e) => {
1321
- var a;
1322
- return (a = e.metadata) == null ? void 0 : a.requestPath;
1326
+ var s;
1327
+ return (s = e.metadata) == null ? void 0 : s.requestPath;
1323
1328
  },
1324
1329
  defaultSelected: !1
1325
1330
  }, {
@@ -1330,10 +1335,10 @@ const Oa = {
1330
1335
  }];
1331
1336
  function go() {
1332
1337
  try {
1333
- const e = localStorage.getItem(Vt);
1338
+ const e = localStorage.getItem(Pt);
1334
1339
  if (e) {
1335
- const a = JSON.parse(e);
1336
- if (Array.isArray(a) && a.length > 0) return new Set(a);
1340
+ const s = JSON.parse(e);
1341
+ if (Array.isArray(s) && s.length > 0) return new Set(s);
1337
1342
  }
1338
1343
  } catch {
1339
1344
  }
@@ -1341,27 +1346,27 @@ const Oa = {
1341
1346
  }
1342
1347
  const he = S(go());
1343
1348
  function ho(e) {
1344
- const a = new Set(he.value);
1345
- if (a.has(e)) {
1346
- if (a.size <= 1) return;
1347
- a.delete(e);
1349
+ const s = new Set(he.value);
1350
+ if (s.has(e)) {
1351
+ if (s.size <= 1) return;
1352
+ s.delete(e);
1348
1353
  } else
1349
- a.add(e);
1350
- he.value = a;
1354
+ s.add(e);
1355
+ he.value = s;
1351
1356
  try {
1352
- localStorage.setItem(Vt, JSON.stringify([...a]));
1357
+ localStorage.setItem(Pt, JSON.stringify([...s]));
1353
1358
  } catch {
1354
1359
  }
1355
1360
  }
1356
1361
  async function yo() {
1357
- var e, a, m;
1362
+ var e, s, m;
1358
1363
  if (!D.value) {
1359
1364
  D.value = !0;
1360
1365
  try {
1361
1366
  const {
1362
1367
  startDate: x,
1363
1368
  endDate: k
1364
- } = ne.value, T = Pe.value.subjectPrefixes, U = (/* @__PURE__ */ new Date()).toISOString().slice(0, 19).replace("T", " "), ae = k ? de(k) : null, et = ae && ae < U ? ae : U, tt = {
1369
+ } = ne.value, T = $e.value.subjectPrefixes, U = (/* @__PURE__ */ new Date()).toISOString().slice(0, 19).replace("T", " "), se = k ? de(k) : null, et = se && se < U ? se : U, tt = {
1365
1370
  ...x ? {
1366
1371
  from: de(x)
1367
1372
  } : {},
@@ -1384,7 +1389,7 @@ const Oa = {
1384
1389
  ...q.value && ee.value.length ? {
1385
1390
  restaurantIds: [...ee.value]
1386
1391
  } : {},
1387
- ...(a = re.value) != null && a.length ? {
1392
+ ...(s = re.value) != null && s.length ? {
1388
1393
  actions: re.value
1389
1394
  } : {},
1390
1395
  ...(m = le.value) != null && m.length ? {
@@ -1410,8 +1415,8 @@ const Oa = {
1410
1415
  if (Ie.push(...J), J.length < rt) break;
1411
1416
  Ne += rt;
1412
1417
  }
1413
- const Ae = Qe.filter((J) => he.value.has(J.key)), h = Ae.map((J) => o(J.labelKey)), P = Ie.map((J) => Ae.map((Uo) => Uo.getValue(J) ?? "")), ot = -(/* @__PURE__ */ new Date()).getTimezoneOffset(), Co = ot >= 0 ? "+" : "-", To = String(Math.floor(Math.abs(ot) / 60)).padStart(2, "0"), jo = String(Math.abs(ot) % 60).padStart(2, "0"), Vo = `UTC${Co}${To}:${jo}`, At = c.name.value || "", $o = [x, k].filter(Boolean).join(" – "), Po = [...[[o("auditLog.title")], [`${o("auditLog.frontMatter.date")}: ${$o}`], ...At ? [[`${o("auditLog.frontMatter.business")}: ${At}`]] : [], [`${o("auditLog.frontMatter.generatedBy")}: ${V().format("DD MMM YYYY, HH:mm")} (${Vo})`], []].map((J) => J.map(St).join(",")), ...[h, ...P].map((J) => J.map(St).join(","))].join(`
1414
- `), Eo = `audit-log_${(c.name.value || "business").replace(/[^a-z0-9_-]+/gi, "_")}_${V().format("YYYYMMDD_HHmmss")}.csv`, Ro = new Blob([`\uFEFF${Po}`], {
1418
+ const Ae = Qe.filter((J) => he.value.has(J.key)), h = Ae.map((J) => o(J.labelKey)), $ = Ie.map((J) => Ae.map((Uo) => Uo.getValue(J) ?? "")), ot = -(/* @__PURE__ */ new Date()).getTimezoneOffset(), Co = ot >= 0 ? "+" : "-", To = String(Math.floor(Math.abs(ot) / 60)).padStart(2, "0"), jo = String(Math.abs(ot) % 60).padStart(2, "0"), Po = `UTC${Co}${To}:${jo}`, At = c.name.value || "", Vo = [x, k].filter(Boolean).join(" – "), $o = [...[[o("auditLog.title")], [`${o("auditLog.frontMatter.date")}: ${Vo}`], ...At ? [[`${o("auditLog.frontMatter.business")}: ${At}`]] : [], [`${o("auditLog.frontMatter.generatedBy")}: ${P().format("DD MMM YYYY, HH:mm")} (${Po})`], []].map((J) => J.map(St).join(",")), ...[h, ...$].map((J) => J.map(St).join(","))].join(`
1419
+ `), Eo = `audit-log_${(c.name.value || "business").replace(/[^a-z0-9_-]+/gi, "_")}_${P().format("YYYYMMDD_HHmmss")}.csv`, Ro = new Blob([`\uFEFF${$o}`], {
1415
1420
  type: "text/csv;charset=utf-8;"
1416
1421
  }), Ft = window.URL.createObjectURL(Ro), Fe = document.createElement("a");
1417
1422
  Fe.href = Ft, Fe.download = Eo, document.body.appendChild(Fe), Fe.click(), Fe.remove(), window.URL.revokeObjectURL(Ft);
@@ -1438,8 +1443,8 @@ const Oa = {
1438
1443
  }
1439
1444
  function _o(e) {
1440
1445
  var m;
1441
- const a = e.original;
1442
- return e.depth === 0 && !oe(a) && !!((m = a.operations) != null && m.length);
1446
+ const s = e.original;
1447
+ return e.depth === 0 && !oe(s) && !!((m = s.operations) != null && m.length);
1443
1448
  }
1444
1449
  function xo(e) {
1445
1450
  return oe(e) ? void 0 : e.operations;
@@ -1456,30 +1461,30 @@ const Oa = {
1456
1461
  enableSorting: !1,
1457
1462
  size: 220,
1458
1463
  cell(e) {
1459
- const a = e.row.original;
1460
- return oe(a) ? null : y("div", {
1464
+ const s = e.row.original;
1465
+ return oe(s) ? null : y("div", {
1461
1466
  class: "flex items-center gap-8"
1462
1467
  }, [y(ve.FmAvatar, {
1463
- name: Se(a),
1464
- initials: aa(Se(a)),
1468
+ name: Se(s),
1469
+ initials: ss(Se(s)),
1465
1470
  size: "sm",
1466
1471
  class: "shrink-0"
1467
1472
  }, null), y("div", {
1468
1473
  class: "min-w-0"
1469
1474
  }, [y("p", {
1470
1475
  class: "truncate font-semibold"
1471
- }, [Se(a)]), y("p", {
1476
+ }, [Se(s)]), y("p", {
1472
1477
  class: "truncate text-fm-color-typo-secondary"
1473
- }, [yt(a)])])]);
1478
+ }, [yt(s)])])]);
1474
1479
  }
1475
1480
  }, {
1476
1481
  accessorKey: "subject",
1477
1482
  header: () => o("auditLog.columns.subject"),
1478
1483
  cell(e) {
1479
- const a = e.row.original;
1480
- return oe(a) ? y("span", {
1484
+ const s = e.row.original;
1485
+ return oe(s) ? y("span", {
1481
1486
  class: "text-fm-color-typo-secondary"
1482
- }, [o("auditLog.operation.rowHint")]) : We(a.subject) ?? a.subject;
1487
+ }, [o("auditLog.operation.rowHint")]) : We(s.subject) ?? s.subject;
1483
1488
  }
1484
1489
  }, {
1485
1490
  accessorKey: "action",
@@ -1491,21 +1496,21 @@ const Oa = {
1491
1496
  },
1492
1497
  cell(e) {
1493
1498
  var U;
1494
- const a = e.row.original;
1495
- if (oe(a))
1499
+ const s = e.row.original;
1500
+ if (oe(s))
1496
1501
  return y("span", {
1497
1502
  class: "audit-op-marker flex flex-wrap items-baseline gap-4"
1498
1503
  }, [y("span", {
1499
1504
  class: "text-fm-color-typo-secondary"
1500
1505
  }, [ye("↳")]), y("span", {
1501
1506
  class: "font-semibold"
1502
- }, [Lt(a)]), a.entityId ? y("span", {
1507
+ }, [Lt(s)]), s.entityId ? y("span", {
1503
1508
  class: "text-fm-color-typo-secondary"
1504
- }, [ye("· "), a.entityId]) : null, a.status === "failed" && a.errorMessage ? y("span", {
1509
+ }, [ye("· "), s.entityId]) : null, s.status === "failed" && s.errorMessage ? y("span", {
1505
1510
  class: "text-fm-color-typo-error"
1506
- }, [ye("· "), a.errorMessage]) : null]);
1507
- const m = ((U = a.operations) == null ? void 0 : U.length) ?? 0, x = (ae) => {
1508
- ae.stopPropagation(), e.row.getToggleExpandedHandler()();
1511
+ }, [ye("· "), s.errorMessage]) : null]);
1512
+ const m = ((U = s.operations) == null ? void 0 : U.length) ?? 0, x = (se) => {
1513
+ se.stopPropagation(), e.row.getToggleExpandedHandler()();
1509
1514
  }, k = {
1510
1515
  variant: "tertiary",
1511
1516
  icon: e.row.getIsExpanded() ? "keyboard_arrow_up" : "keyboard_arrow_down",
@@ -1515,7 +1520,7 @@ const Oa = {
1515
1520
  }, T = ve.FmButton;
1516
1521
  return y("span", {
1517
1522
  class: "flex items-center gap-8"
1518
- }, [y("span", null, [xt(a)]), m > 0 ? y("span", {
1523
+ }, [y("span", null, [xt(s)]), m > 0 ? y("span", {
1519
1524
  class: "cursor-pointer",
1520
1525
  onClick: x
1521
1526
  }, [y(ve.FmChip, {
@@ -1531,18 +1536,18 @@ const Oa = {
1531
1536
  header: () => o("auditLog.columns.outcome"),
1532
1537
  enableSorting: !1,
1533
1538
  cell(e) {
1534
- const a = e.row.original;
1535
- return oe(a) ? y(ve.FmChip, {
1536
- variant: a.status === "failed" ? "critical" : "success",
1537
- label: a.status === "failed" ? o("auditLog.outcome.failed") : o("auditLog.outcome.success"),
1539
+ const s = e.row.original;
1540
+ return oe(s) ? y(ve.FmChip, {
1541
+ variant: s.status === "failed" ? "critical" : "success",
1542
+ label: s.status === "failed" ? o("auditLog.outcome.failed") : o("auditLog.outcome.success"),
1538
1543
  compact: !0
1539
1544
  }, null) : y("span", {
1540
1545
  class: "flex items-center gap-4"
1541
1546
  }, [y(ve.FmChip, {
1542
- variant: kt(a.outcome),
1543
- label: Xe(a.outcome),
1547
+ variant: kt(s.outcome),
1548
+ label: Xe(s.outcome),
1544
1549
  compact: !0
1545
- }, null), bo(a)]);
1550
+ }, null), bo(s)]);
1546
1551
  }
1547
1552
  }], Lo = [
1548
1553
  we[0],
@@ -1554,8 +1559,8 @@ const Oa = {
1554
1559
  header: () => o("auditLog.columns.restaurant"),
1555
1560
  enableSorting: !1,
1556
1561
  cell(e) {
1557
- const a = e.row.original;
1558
- return oe(a) ? null : a.restaurantId && Gt.value[a.restaurantId] || a.restaurantId || "-";
1562
+ const s = e.row.original;
1563
+ return oe(s) ? null : s.restaurantId && Gt.value[s.restaurantId] || s.restaurantId || "-";
1559
1564
  }
1560
1565
  },
1561
1566
  {
@@ -1563,8 +1568,8 @@ const Oa = {
1563
1568
  header: () => o("auditLog.columns.device"),
1564
1569
  enableSorting: !1,
1565
1570
  cell(e) {
1566
- const a = e.row.original;
1567
- return oe(a) ? null : lt(a, o);
1571
+ const s = e.row.original;
1572
+ return oe(s) ? null : lt(s, o);
1568
1573
  }
1569
1574
  },
1570
1575
  {
@@ -1572,8 +1577,8 @@ const Oa = {
1572
1577
  header: () => o("auditLog.columns.approver"),
1573
1578
  enableSorting: !1,
1574
1579
  cell(e) {
1575
- const a = e.row.original;
1576
- return oe(a) ? null : jt(a, o);
1580
+ const s = e.row.original;
1581
+ return oe(s) ? null : jt(s, o);
1577
1582
  }
1578
1583
  },
1579
1584
  we.find((e) => e.accessorKey === "action"),
@@ -1582,17 +1587,17 @@ const Oa = {
1582
1587
  // Status
1583
1588
  ], ko = A(() => q.value ? Lo : we);
1584
1589
  function de(e) {
1585
- const a = V(e, el);
1586
- return new Date(a.year(), a.month(), a.date(), a.hour(), a.minute(), 0).toISOString().slice(0, 19).replace("T", " ");
1590
+ const s = P(e, el);
1591
+ return new Date(s.year(), s.month(), s.date(), s.hour(), s.minute(), 0).toISOString().slice(0, 19).replace("T", " ");
1587
1592
  }
1588
1593
  async function wt() {
1589
- var e, a, m;
1594
+ var e, s, m;
1590
1595
  w.value = !0;
1591
1596
  try {
1592
1597
  const {
1593
1598
  startDate: x,
1594
1599
  endDate: k
1595
- } = ne.value, T = (Ve.value - 1) * Oe, U = Pe.value.subjectPrefixes, ae = await Ce.read({
1600
+ } = ne.value, T = (Pe.value - 1) * Oe, U = $e.value.subjectPrefixes, se = await Ce.read({
1596
1601
  limit: Oe,
1597
1602
  offset: T,
1598
1603
  ...x ? {
@@ -1619,7 +1624,7 @@ const Oa = {
1619
1624
  ...q.value && ee.value.length ? {
1620
1625
  restaurantIds: [...ee.value]
1621
1626
  } : {},
1622
- ...(a = re.value) != null && a.length ? {
1627
+ ...(s = re.value) != null && s.length ? {
1623
1628
  actions: re.value
1624
1629
  } : {},
1625
1630
  ...(m = le.value) != null && m.length ? {
@@ -1635,7 +1640,7 @@ const Oa = {
1635
1640
  searchSubjects: ge.value
1636
1641
  } : {}
1637
1642
  });
1638
- O.value = ae, Bt.value = ae.length === Oe, L.value = {};
1643
+ O.value = se, Bt.value = se.length === Oe, L.value = {};
1639
1644
  } finally {
1640
1645
  w.value = !1;
1641
1646
  }
@@ -1659,14 +1664,14 @@ const Oa = {
1659
1664
  var x, k, T;
1660
1665
  const {
1661
1666
  startDate: e,
1662
- endDate: a
1663
- } = ne.value, m = Pe.value.subjectPrefixes;
1667
+ endDate: s
1668
+ } = ne.value, m = $e.value.subjectPrefixes;
1664
1669
  Be.value = await Ce.count({
1665
1670
  ...e ? {
1666
1671
  from: de(e)
1667
1672
  } : {},
1668
- ...a ? {
1669
- to: de(a)
1673
+ ...s ? {
1674
+ to: de(s)
1670
1675
  } : {},
1671
1676
  ...ue.value.userIds.length ? {
1672
1677
  userIds: ue.value.userIds
@@ -1703,19 +1708,19 @@ const Oa = {
1703
1708
  } : {}
1704
1709
  });
1705
1710
  }
1706
- se(It, async () => {
1707
- Ve.value = 1, c.id.value && await Promise.all([So(), wt()]);
1711
+ ae(It, async () => {
1712
+ Pe.value = 1, c.id.value && await Promise.all([So(), wt()]);
1708
1713
  }, {
1709
1714
  immediate: !0
1710
- }), se(ie, () => {
1715
+ }), ae(ie, () => {
1711
1716
  Z.value = void 0, q.value && (fe.value = void 0);
1712
1717
  });
1713
1718
  let Ze = !1;
1714
1719
  async function wo({
1715
1720
  pageIndex: e
1716
1721
  }) {
1717
- if (c.id.value && !(e === 0 && Ve.value === 1) && !Ze) {
1718
- Ze = !0, Ve.value = e + 1;
1722
+ if (c.id.value && !(e === 0 && Pe.value === 1) && !Ze) {
1723
+ Ze = !0, Pe.value = e + 1;
1719
1724
  try {
1720
1725
  await wt();
1721
1726
  } finally {
@@ -1728,10 +1733,10 @@ const Oa = {
1728
1733
  Fo(e);
1729
1734
  return;
1730
1735
  }
1731
- i.value = e, $.value = !0, Zt(e);
1736
+ i.value = e, V.value = !0, Zt(e);
1732
1737
  }
1733
1738
  function Ao() {
1734
- $.value = !1, i.value = null, eo();
1739
+ V.value = !1, i.value = null, eo();
1735
1740
  }
1736
1741
  function Fo(e) {
1737
1742
  f.value = e, M.value = !0;
@@ -1739,7 +1744,7 @@ const Oa = {
1739
1744
  function Mo() {
1740
1745
  M.value = !1, f.value = null;
1741
1746
  }
1742
- se(c.id, (e) => {
1747
+ ae(c.id, (e) => {
1743
1748
  e && d.readTeamMembers();
1744
1749
  }, {
1745
1750
  immediate: !0
@@ -1747,14 +1752,14 @@ const Oa = {
1747
1752
  function Do() {
1748
1753
  const e = fe.value;
1749
1754
  if (!(e != null && e.length)) return;
1750
- const a = new Set(ke.value.map((k) => k.userId)), m = new Set(d.members.map((k) => k.doc.userId)), x = e.filter((k) => k === it ? Ee.value : d.hasLoaded ? m.has(k) || a.has(k) : !0);
1755
+ const s = new Set(ke.value.map((k) => k.userId)), m = new Set(d.members.map((k) => k.doc.userId)), x = e.filter((k) => k === it ? Ee.value : d.hasLoaded ? m.has(k) || s.has(k) : !0);
1751
1756
  x.length !== e.length && (fe.value = x.length ? x : void 0);
1752
1757
  }
1753
1758
  async function Oo() {
1754
1759
  if (!c.id.value) return;
1755
1760
  const {
1756
1761
  startDate: e,
1757
- endDate: a
1762
+ endDate: s
1758
1763
  } = ne.value;
1759
1764
  try {
1760
1765
  const {
@@ -1764,8 +1769,8 @@ const Oa = {
1764
1769
  ...e ? {
1765
1770
  from: de(e)
1766
1771
  } : {},
1767
- ...a ? {
1768
- to: de(a)
1772
+ ...s ? {
1773
+ to: de(s)
1769
1774
  } : {}
1770
1775
  });
1771
1776
  ke.value = m, Ee.value = x;
@@ -1774,14 +1779,14 @@ const Oa = {
1774
1779
  }
1775
1780
  Do();
1776
1781
  }
1777
- return se(() => ({
1782
+ return ae(() => ({
1778
1783
  businessId: c.id.value,
1779
1784
  range: ne.value
1780
1785
  }), () => Oo(), {
1781
1786
  immediate: !0,
1782
1787
  deep: !0
1783
- }), (e, a) => {
1784
- const m = R("FmSpacer"), x = R("FmButton"), k = R("FmMenuItem"), T = R("FmMenu"), U = R("FmChip"), ae = R("FmDateRangePicker"), et = R("FmSearch"), tt = R("FmTable"), Ie = R("FmIcon"), Ne = R("FmTooltip"), Ae = R("FmSideSheet");
1788
+ }), (e, s) => {
1789
+ const m = R("FmSpacer"), x = R("FmButton"), k = R("FmMenuItem"), T = R("FmMenu"), U = R("FmChip"), se = R("FmDateRangePicker"), et = R("FmSearch"), tt = R("FmTable"), Ie = R("FmIcon"), Ne = R("FmTooltip"), Ae = R("FmSideSheet");
1785
1790
  return v(), g(z, null, [y(Qo, {
1786
1791
  heading: u(o)("auditLog.title")
1787
1792
  }, {
@@ -1802,23 +1807,23 @@ const Oa = {
1802
1807
  "aria-label": u(o)("auditLog.exportSettings.title"),
1803
1808
  disabled: D.value
1804
1809
  }, null, 8, ["aria-label", "disabled"])]),
1805
- default: B(() => [s("div", Oa, [s("p", Ca, l(u(o)("auditLog.exportSettings.title")), 1), (v(), g(z, null, ce(Qe, (h) => y(k, {
1810
+ default: B(() => [a("div", Os, [a("p", Cs, l(u(o)("auditLog.exportSettings.title")), 1), (v(), g(z, null, ce(Qe, (h) => y(k, {
1806
1811
  key: h.key,
1807
1812
  label: u(o)(h.labelKey),
1808
1813
  "has-checkbox": "",
1809
1814
  "model-value": he.value.has(h.key),
1810
1815
  disabled: he.value.has(h.key) && he.value.size === 1,
1811
- onClick: (P) => ho(h.key)
1816
+ onClick: ($) => ho(h.key)
1812
1817
  }, null, 8, ["label", "model-value", "disabled", "onClick"])), 64))])]),
1813
1818
  _: 1
1814
1819
  })]),
1815
- default: B(() => [s("div", Ta, [s("div", ja, [y(fa, {
1820
+ default: B(() => [a("div", Ts, [a("div", js, [y(fs, {
1816
1821
  modelValue: ie.value,
1817
- "onUpdate:modelValue": a[0] || (a[0] = (h) => ie.value = h),
1822
+ "onUpdate:modelValue": s[0] || (s[0] = (h) => ie.value = h),
1818
1823
  items: Jt.value
1819
- }, null, 8, ["modelValue", "items"]), s("div", Va, [y(ae, {
1824
+ }, null, 8, ["modelValue", "items"]), a("div", Ps, [y(se, {
1820
1825
  modelValue: ne.value,
1821
- "onUpdate:modelValue": a[1] || (a[1] = (h) => ne.value = h),
1826
+ "onUpdate:modelValue": s[1] || (s[1] = (h) => ne.value = h),
1822
1827
  "show-predefined-range": "",
1823
1828
  "show-time": "",
1824
1829
  "predefined-range": co.value
@@ -1828,37 +1833,37 @@ const Oa = {
1828
1833
  icon: "calendar_month"
1829
1834
  }, null, 8, ["label"])]),
1830
1835
  _: 1
1831
- }, 8, ["modelValue", "predefined-range"]), q.value ? F("", !0) : (v(), g("div", $a, [y(Me, {
1836
+ }, 8, ["modelValue", "predefined-range"]), q.value ? F("", !0) : (v(), g("div", Vs, [y(Me, {
1832
1837
  modelValue: fe.value,
1833
- "onUpdate:modelValue": a[2] || (a[2] = (h) => fe.value = h),
1838
+ "onUpdate:modelValue": s[2] || (s[2] = (h) => fe.value = h),
1834
1839
  items: Xt.value,
1835
1840
  multiple: "",
1836
1841
  variant: "dark",
1837
1842
  placeholder: u(o)("auditLog.filter.user_placeholder"),
1838
1843
  "selected-prefix": u(o)("auditLog.filter.selected_user_prefix"),
1839
1844
  "chip-icon": "account_circle"
1840
- }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])), q.value ? F("", !0) : (v(), g("div", Pa, [y(Me, {
1845
+ }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])), q.value ? F("", !0) : (v(), g("div", $s, [y(Me, {
1841
1846
  modelValue: Z.value,
1842
- "onUpdate:modelValue": a[3] || (a[3] = (h) => Z.value = h),
1847
+ "onUpdate:modelValue": s[3] || (s[3] = (h) => Z.value = h),
1843
1848
  items: oo.value,
1844
- "filter-fn": ao,
1849
+ "filter-fn": so,
1845
1850
  multiple: "",
1846
1851
  variant: "dark",
1847
1852
  placeholder: u(o)("auditLog.filter.subject_placeholder"),
1848
1853
  "selected-prefix": u(o)("auditLog.filter.selected_subject_prefix"),
1849
1854
  "chip-icon": "badge"
1850
- }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])), s("div", Ea, [y(Me, {
1855
+ }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])), a("div", Es, [y(Me, {
1851
1856
  modelValue: re.value,
1852
- "onUpdate:modelValue": a[4] || (a[4] = (h) => re.value = h),
1853
- items: so.value,
1857
+ "onUpdate:modelValue": s[4] || (s[4] = (h) => re.value = h),
1858
+ items: ao.value,
1854
1859
  multiple: "",
1855
1860
  variant: "dark",
1856
1861
  placeholder: u(o)("auditLog.filter.action_placeholder"),
1857
1862
  "selected-prefix": u(o)("auditLog.filter.selected_action_prefix"),
1858
1863
  searchable: !1
1859
- }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), s("div", Ra, [y(Me, {
1864
+ }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div", Rs, [y(Me, {
1860
1865
  modelValue: le.value,
1861
- "onUpdate:modelValue": a[5] || (a[5] = (h) => le.value = h),
1866
+ "onUpdate:modelValue": s[5] || (s[5] = (h) => le.value = h),
1862
1867
  items: no.value,
1863
1868
  multiple: "",
1864
1869
  variant: "dark",
@@ -1866,9 +1871,9 @@ const Oa = {
1866
1871
  "selected-prefix": u(o)("auditLog.filter.selected_status_prefix"),
1867
1872
  searchable: !1,
1868
1873
  "chip-icon": "check_circle"
1869
- }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), q.value ? (v(), g("div", Ua, [y(Me, {
1874
+ }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), q.value ? (v(), g("div", Us, [y(Me, {
1870
1875
  modelValue: ee.value,
1871
- "onUpdate:modelValue": a[6] || (a[6] = (h) => ee.value = h),
1876
+ "onUpdate:modelValue": s[6] || (s[6] = (h) => ee.value = h),
1872
1877
  items: Wt.value,
1873
1878
  multiple: "",
1874
1879
  variant: "dark",
@@ -1877,11 +1882,11 @@ const Oa = {
1877
1882
  "chip-icon": "storefront"
1878
1883
  }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])) : F("", !0), y(et, {
1879
1884
  modelValue: ze.value,
1880
- "onUpdate:modelValue": a[7] || (a[7] = (h) => ze.value = h),
1885
+ "onUpdate:modelValue": s[7] || (s[7] = (h) => ze.value = h),
1881
1886
  class: "ml-auto w-[280px]",
1882
1887
  placeholder: u(o)("auditLog.search.placeholder")
1883
1888
  }, null, 8, ["modelValue", "placeholder"])])]), y(Go, null, {
1884
- default: B(() => [s("div", Na, [y(Zo, {
1889
+ default: B(() => [a("div", Ns, [y(Zo, {
1885
1890
  "is-loading": w.value,
1886
1891
  "is-empty": O.value.length === 0,
1887
1892
  title: u(o)("auditLog.noData.title"),
@@ -1902,8 +1907,8 @@ const Oa = {
1902
1907
  "get-sub-row": xo,
1903
1908
  "pin-header-row": "",
1904
1909
  class: "audit-log-list-table cursor-pointer",
1905
- "onUpdate:expandedState": a[8] || (a[8] = (h) => L.value = h),
1906
- onRowClick: a[9] || (a[9] = (h) => Io(h.original))
1910
+ "onUpdate:expandedState": s[8] || (s[8] = (h) => L.value = h),
1911
+ onRowClick: s[9] || (s[9] = (h) => Io(h.original))
1907
1912
  }, null, 8, ["column-defs", "row-data", "page-count", "row-count", "hide-footer", "loading", "expanded-state"]))]),
1908
1913
  _: 1
1909
1914
  }, 8, ["is-loading", "is-empty", "title", "subtitle"])])]),
@@ -1912,20 +1917,20 @@ const Oa = {
1912
1917
  _: 1
1913
1918
  }, 8, ["heading"]), y(Ae, {
1914
1919
  header: u(o)("auditLog.detail.header"),
1915
- "model-value": $.value,
1920
+ "model-value": V.value,
1916
1921
  "max-width": 768,
1917
1922
  "dismiss-away": "",
1918
- "onUpdate:modelValue": a[10] || (a[10] = (h) => {
1923
+ "onUpdate:modelValue": s[10] || (s[10] = (h) => {
1919
1924
  h || Ao();
1920
1925
  })
1921
1926
  }, {
1922
- default: B(() => [i.value ? (v(), g("div", Ka, [s("div", Ya, [s("div", Ba, [s("p", za, l(mo(i.value)), 1), i.value.traceId ? (v(), g("p", qa, [ye(" Trace ID: " + l(i.value.traceId) + " ", 1), y(x, {
1927
+ default: B(() => [i.value ? (v(), g("div", Ks, [a("div", Ys, [a("div", Bs, [a("p", zs, l(mo(i.value)), 1), i.value.traceId ? (v(), g("p", qs, [ye(" Trace ID: " + l(i.value.traceId) + " ", 1), y(x, {
1923
1928
  variant: "tertiary",
1924
1929
  icon: "link",
1925
1930
  class: "ml-4 align-middle",
1926
1931
  "aria-label": u(o)("auditLog.detail.copyLink"),
1927
1932
  onClick: u(to)
1928
- }, null, 8, ["aria-label", "onClick"])])) : F("", !0), i.value.eventId ? (v(), g("p", Ja, " Event ID: " + l(i.value.eventId), 1)) : F("", !0)]), s("div", Ha, [y(U, {
1933
+ }, null, 8, ["aria-label", "onClick"])])) : F("", !0), i.value.eventId ? (v(), g("p", Js, " Event ID: " + l(i.value.eventId), 1)) : F("", !0)]), a("div", Hs, [y(U, {
1929
1934
  variant: kt(i.value.outcome),
1930
1935
  label: Xe(i.value.outcome),
1931
1936
  compact: ""
@@ -1941,71 +1946,71 @@ const Oa = {
1941
1946
  class: "cursor-help text-fm-color-typo-error"
1942
1947
  })]),
1943
1948
  _: 1
1944
- })) : F("", !0)])]), s("div", Wa, [s("div", Ga, [s("div", null, [s("p", Xa, l(u(o)("auditLog.detail.date")), 1), s("p", Qa, l(Ge(i.value.timestamp)), 1)]), s("div", null, [s("p", Za, l(u(o)("auditLog.detail.user")), 1), s("p", es, l(Se(i.value)), 1)]), s("div", null, [s("p", ts, l(u(o)("auditLog.detail.email")), 1), s("p", os, l(fo(i.value)), 1)]), i.value.field ? (v(), g("div", as, [s("p", ss, l(u(o)("auditLog.detail.field")), 1), s("p", ns, l(i.value.field), 1)])) : F("", !0), s("div", null, [s("p", ls, l(u(o)("auditLog.detail.business")), 1), s("p", rs, l(i.value.businessId || "-"), 1)]), s("div", null, [s("p", is, l(u(o)("auditLog.detail.restaurant")), 1), s("p", us, l(i.value.restaurantId || "-"), 1)])])]), s("div", ds, [s("div", cs, [s("p", fs, l(u(o)("auditLog.detail.eventDetails")), 1)]), a[13] || (a[13] = s("hr", {
1949
+ })) : F("", !0)])]), a("div", Ws, [a("div", Gs, [a("div", null, [a("p", Xs, l(u(o)("auditLog.detail.date")), 1), a("p", Qs, l(Ge(i.value.timestamp)), 1)]), a("div", null, [a("p", Zs, l(u(o)("auditLog.detail.user")), 1), a("p", ea, l(Se(i.value)), 1)]), a("div", null, [a("p", ta, l(u(o)("auditLog.detail.email")), 1), a("p", oa, l(fo(i.value)), 1)]), i.value.field ? (v(), g("div", sa, [a("p", aa, l(u(o)("auditLog.detail.field")), 1), a("p", na, l(i.value.field), 1)])) : F("", !0), a("div", null, [a("p", la, l(u(o)("auditLog.detail.business")), 1), a("p", ra, l(i.value.businessId || "-"), 1)]), a("div", null, [a("p", ia, l(u(o)("auditLog.detail.restaurant")), 1), a("p", ua, l(i.value.restaurantId || "-"), 1)])])]), a("div", da, [a("div", ca, [a("p", fa, l(u(o)("auditLog.detail.eventDetails")), 1)]), s[13] || (s[13] = a("hr", {
1945
1950
  class: "border-fm-color-border-default"
1946
- }, null, -1)), s("div", ms, [s("div", null, [s("p", vs, l(u(o)("auditLog.detail.actionDescription")), 1), s("p", ps, l(i.value.metadata.operationLabel || "-"), 1)])])]), s("div", gs, [s("div", hs, [s("p", ys, l(u(o)("auditLog.detail.metadata")), 1)]), a[14] || (a[14] = s("hr", {
1951
+ }, null, -1)), a("div", ma, [a("div", null, [a("p", va, l(u(o)("auditLog.detail.actionDescription")), 1), a("p", pa, l(i.value.metadata.operationLabel || "-"), 1)])])]), a("div", ga, [a("div", ha, [a("p", ya, l(u(o)("auditLog.detail.metadata")), 1)]), s[14] || (s[14] = a("hr", {
1947
1952
  class: "border-fm-color-border-default"
1948
- }, null, -1)), s("div", bs, [s("div", null, [s("p", _s, l(u(o)("auditLog.detail.resolvedFrom")), 1), s("p", xs, l(vo(i.value.metadata.resolvedFrom)), 1)]), (i.value.metadata.resolvedFrom === "permissionSet" || i.value.metadata.resolvedFrom === "systemPermissionSet") && (i.value.metadata.permissionSetName || i.value.metadata.permissionSetId) ? (v(), g("div", Ls, [s("p", ks, l(u(o)("auditLog.detail.permissionSet")), 1), i.value.metadata.permissionSetName ? (v(), g("p", Ss, l(i.value.metadata.permissionSetName), 1)) : F("", !0), i.value.metadata.permissionSetId ? (v(), g("p", ws, l(i.value.metadata.permissionSetId), 1)) : F("", !0)])) : F("", !0), i.value.metadata.reason ? (v(), g("div", Is, [s("p", As, l(u(o)("auditLog.detail.reason")), 1), s("p", Fs, l(i.value.metadata.reason), 1)])) : F("", !0), s("div", null, [s("p", Ms, l(u(o)("auditLog.detail.requestMethod")), 1), s("p", Ds, l(po(i.value)), 1)]), s("div", null, [s("p", Os, l(u(o)("auditLog.detail.requestPath")), 1), s("p", Cs, l(i.value.metadata.requestPath || "-"), 1)]), i.value.metadata.pos ? (v(), g(z, {
1953
+ }, null, -1)), a("div", ba, [a("div", null, [a("p", _a, l(u(o)("auditLog.detail.resolvedFrom")), 1), a("p", xa, l(vo(i.value.metadata.resolvedFrom)), 1)]), (i.value.metadata.resolvedFrom === "permissionSet" || i.value.metadata.resolvedFrom === "systemPermissionSet") && (i.value.metadata.permissionSetName || i.value.metadata.permissionSetId) ? (v(), g("div", La, [a("p", ka, l(u(o)("auditLog.detail.permissionSet")), 1), i.value.metadata.permissionSetName ? (v(), g("p", Sa, l(i.value.metadata.permissionSetName), 1)) : F("", !0), i.value.metadata.permissionSetId ? (v(), g("p", wa, l(i.value.metadata.permissionSetId), 1)) : F("", !0)])) : F("", !0), i.value.metadata.reason ? (v(), g("div", Ia, [a("p", Aa, l(u(o)("auditLog.detail.reason")), 1), a("p", Fa, l(i.value.metadata.reason), 1)])) : F("", !0), a("div", null, [a("p", Ma, l(u(o)("auditLog.detail.requestMethod")), 1), a("p", Da, l(po(i.value)), 1)]), a("div", null, [a("p", Oa, l(u(o)("auditLog.detail.requestPath")), 1), a("p", Ca, l(i.value.metadata.requestPath || "-"), 1)]), i.value.metadata.pos ? (v(), g(z, {
1949
1954
  key: 2
1950
- }, [s("div", null, [s("p", Ts, l(u(o)("auditLog.pos.details.eventKey")), 1), s("p", js, l(i.value.eventKey || "-"), 1)]), s("div", null, [s("p", Vs, l(u(o)("auditLog.columns.device")), 1), s("p", $s, l(u(lt)(i.value, u(o))), 1), i.value.metadata.pos.machineId ? (v(), g("p", Ps, l(i.value.metadata.pos.machineId), 1)) : F("", !0)]), i.value.metadata.pos.appVersion ? (v(), g("div", Es, [s("p", Rs, l(u(o)("auditLog.pos.details.appVersion")), 1), s("p", Us, l(i.value.metadata.pos.appVersion), 1)])) : F("", !0), s("div", null, [s("p", Ns, l(u(o)("auditLog.columns.approver")), 1), s("p", Ks, l(u(jt)(i.value, u(o))), 1)]), s("div", null, [s("p", Ys, l(u(o)("auditLog.pos.details.clock")), 1), s("p", Bs, [ye(l(Ge(new Date(i.value.metadata.pos.occurredAt))) + " · " + l(i.value.metadata.pos.clockSkewMs) + " ms", 1), i.value.metadata.pos.clockClamped ? (v(), g("span", zs, " · " + l(u(o)("auditLog.pos.details.clamped")), 1)) : F("", !0)])]), i.value.params ? (v(), g("div", qs, [s("p", Js, l(u(o)("auditLog.pos.details.params")), 1), s("pre", Hs, l(i.value.params), 1)])) : F("", !0)], 64)) : F("", !0), i.value.metadata.trace && i.value.metadata.trace.length > 0 ? (v(), g("div", Ws, [s("p", Gs, l(u(o)("auditLog.detail.permissionTrace")), 1), s("ol", Xs, [(v(!0), g(z, null, ce(i.value.metadata.trace, (h, P) => (v(), g("li", {
1951
- key: P,
1955
+ }, [a("div", null, [a("p", Ta, l(u(o)("auditLog.pos.details.eventKey")), 1), a("p", ja, l(i.value.eventKey || "-"), 1)]), a("div", null, [a("p", Pa, l(u(o)("auditLog.columns.device")), 1), a("p", Va, l(u(lt)(i.value, u(o))), 1), i.value.metadata.pos.machineId ? (v(), g("p", $a, l(i.value.metadata.pos.machineId), 1)) : F("", !0)]), i.value.metadata.pos.appVersion ? (v(), g("div", Ea, [a("p", Ra, l(u(o)("auditLog.pos.details.appVersion")), 1), a("p", Ua, l(i.value.metadata.pos.appVersion), 1)])) : F("", !0), a("div", null, [a("p", Na, l(u(o)("auditLog.columns.approver")), 1), a("p", Ka, l(u(jt)(i.value, u(o))), 1)]), a("div", null, [a("p", Ya, l(u(o)("auditLog.pos.details.clock")), 1), a("p", Ba, [ye(l(Ge(new Date(i.value.metadata.pos.occurredAt))) + " · " + l(i.value.metadata.pos.clockSkewMs) + " ms", 1), i.value.metadata.pos.clockClamped ? (v(), g("span", za, " · " + l(u(o)("auditLog.pos.details.clamped")), 1)) : F("", !0)])]), i.value.params ? (v(), g("div", qa, [a("p", Ja, l(u(o)("auditLog.pos.details.params")), 1), a("pre", Ha, l(i.value.params), 1)])) : F("", !0)], 64)) : F("", !0), i.value.metadata.trace && i.value.metadata.trace.length > 0 ? (v(), g("div", Wa, [a("p", Ga, l(u(o)("auditLog.detail.permissionTrace")), 1), a("ol", Xa, [(v(!0), g(z, null, ce(i.value.metadata.trace, (h, $) => (v(), g("li", {
1956
+ key: $,
1952
1957
  class: "flex items-center gap-6"
1953
- }, [s("span", Qs, l(P + 1), 1), s("span", Zs, l(h), 1), P < i.value.metadata.trace.length - 1 ? (v(), g("span", en, "→")) : F("", !0)]))), 128))])])) : F("", !0), p.value ? (v(), g("div", tn, [s("p", on, l(u(o)("auditLog.detail.requestBody")), 1), s("pre", an, l(p.value), 1)])) : F("", !0)])])])) : F("", !0)]),
1958
+ }, [a("span", Qa, l($ + 1), 1), a("span", Za, l(h), 1), $ < i.value.metadata.trace.length - 1 ? (v(), g("span", en, "→")) : F("", !0)]))), 128))])])) : F("", !0), p.value ? (v(), g("div", tn, [a("p", on, l(u(o)("auditLog.detail.requestBody")), 1), a("pre", sn, l(p.value), 1)])) : F("", !0)])])])) : F("", !0)]),
1954
1959
  _: 1
1955
1960
  }, 8, ["header", "model-value"]), y(Ae, {
1956
1961
  header: u(o)("auditLog.operation.sheetHeader"),
1957
1962
  "model-value": M.value,
1958
1963
  "max-width": 768,
1959
1964
  "dismiss-away": "",
1960
- "onUpdate:modelValue": a[12] || (a[12] = (h) => {
1965
+ "onUpdate:modelValue": s[12] || (s[12] = (h) => {
1961
1966
  h || Mo();
1962
1967
  })
1963
1968
  }, {
1964
- default: B(() => [f.value ? (v(), g("div", sn, [s("div", nn, [s("div", ln, [s("p", rn, l(Lt(f.value)), 1), f.value.entityId ? (v(), g("p", un, l(f.value.entityId), 1)) : F("", !0)]), y(U, {
1969
+ default: B(() => [f.value ? (v(), g("div", an, [a("div", nn, [a("div", ln, [a("p", rn, l(Lt(f.value)), 1), f.value.entityId ? (v(), g("p", un, l(f.value.entityId), 1)) : F("", !0)]), y(U, {
1965
1970
  variant: f.value.status === "failed" ? "critical" : "success",
1966
1971
  label: f.value.status === "failed" ? u(o)("auditLog.outcome.failed") : u(o)("auditLog.outcome.success"),
1967
1972
  compact: ""
1968
- }, null, 8, ["variant", "label"])]), s("div", dn, [s("div", cn, [s("div", null, [s("p", fn, l(u(o)("auditLog.detail.date")), 1), s("p", mn, l(Ge(f.value.timestamp)), 1)]), f.value.entityId ? (v(), g("div", vn, [s("p", pn, l(u(o)("auditLog.operation.entity")), 1), s("p", gn, l(f.value.entityId), 1)])) : F("", !0), f.value.durationMs !== void 0 ? (v(), g("div", hn, [s("p", yn, l(u(o)("auditLog.operation.duration")), 1), s("p", bn, l(u(o)("auditLog.operation.durationValue", {
1973
+ }, null, 8, ["variant", "label"])]), a("div", dn, [a("div", cn, [a("div", null, [a("p", fn, l(u(o)("auditLog.detail.date")), 1), a("p", mn, l(Ge(f.value.timestamp)), 1)]), f.value.entityId ? (v(), g("div", vn, [a("p", pn, l(u(o)("auditLog.operation.entity")), 1), a("p", gn, l(f.value.entityId), 1)])) : F("", !0), f.value.durationMs !== void 0 ? (v(), g("div", hn, [a("p", yn, l(u(o)("auditLog.operation.duration")), 1), a("p", bn, l(u(o)("auditLog.operation.durationValue", {
1969
1974
  ms: f.value.durationMs
1970
- })), 1)])) : F("", !0)])]), f.value.status === "failed" ? (v(), g("div", _n, [s("p", xn, l(u(o)("auditLog.operation.error")), 1), s("p", Ln, l(f.value.errorMessage || "-"), 1)])) : F("", !0), s("div", kn, [s("div", Sn, [s("p", wn, l(u(o)("auditLog.operation.changes")), 1)]), a[17] || (a[17] = s("hr", {
1975
+ })), 1)])) : F("", !0)])]), f.value.status === "failed" ? (v(), g("div", _n, [a("p", xn, l(u(o)("auditLog.operation.error")), 1), a("p", Ln, l(f.value.errorMessage || "-"), 1)])) : F("", !0), a("div", kn, [a("div", Sn, [a("p", wn, l(u(o)("auditLog.operation.changes")), 1)]), s[17] || (s[17] = a("hr", {
1971
1976
  class: "border-fm-color-border-default"
1972
- }, null, -1)), s("div", In, [Y.value.length ? (v(), g("div", An, [(v(!0), g(z, null, ce(Y.value, (h, P) => (v(), g("div", {
1973
- key: P,
1977
+ }, null, -1)), a("div", In, [Y.value.length ? (v(), g("div", An, [(v(!0), g(z, null, ce(Y.value, (h, $) => (v(), g("div", {
1978
+ key: $,
1974
1979
  class: "space-y-4 py-8 first:pt-0 last:pb-0"
1975
- }, [s("div", Fn, [y(U, {
1980
+ }, [a("div", Fn, [y(U, {
1976
1981
  variant: Nt(h.type),
1977
1982
  label: Kt(h.type),
1978
1983
  compact: ""
1979
- }, null, 8, ["variant", "label"]), s("span", Mn, l(Yt(h)), 1)]), s("p", Dn, [h.type === "add" ? (v(), g("span", On, l(h.afterDisplay), 1)) : h.type === "remove" ? (v(), g("span", Cn, l(h.beforeDisplay), 1)) : (v(), g(z, {
1984
+ }, null, 8, ["variant", "label"]), a("span", Mn, l(Yt(h)), 1)]), a("p", Dn, [h.type === "add" ? (v(), g("span", On, l(h.afterDisplay), 1)) : h.type === "remove" ? (v(), g("span", Cn, l(h.beforeDisplay), 1)) : (v(), g(z, {
1980
1985
  key: 2
1981
- }, [s("span", Tn, l(h.beforeDisplay), 1), a[15] || (a[15] = s("span", {
1986
+ }, [a("span", Tn, l(h.beforeDisplay), 1), s[15] || (s[15] = a("span", {
1982
1987
  class: "text-fm-color-typo-secondary"
1983
- }, " → ", -1)), s("span", jn, l(h.afterDisplay), 1)], 64))])]))), 128))])) : ft.value.length ? (v(), g("div", Vn, [(v(!0), g(z, null, ce(ft.value, (h) => (v(), g("div", {
1988
+ }, " → ", -1)), a("span", jn, l(h.afterDisplay), 1)], 64))])]))), 128))])) : ft.value.length ? (v(), g("div", Pn, [(v(!0), g(z, null, ce(ft.value, (h) => (v(), g("div", {
1984
1989
  key: h.groupKey,
1985
1990
  class: "space-y-4 py-8 first:pt-0 last:pb-0"
1986
- }, [s("div", $n, [y(U, {
1991
+ }, [a("div", Vn, [y(U, {
1987
1992
  variant: ct(h.type),
1988
1993
  label: W(h.type),
1989
1994
  compact: ""
1990
- }, null, 8, ["variant", "label"]), s("span", Pn, l(h.displayKey), 1)]), s("div", En, [(v(!0), g(z, null, ce(h.rows, (P) => (v(), g("p", {
1991
- key: P.path,
1995
+ }, null, 8, ["variant", "label"]), a("span", $n, l(h.displayKey), 1)]), a("div", En, [(v(!0), g(z, null, ce(h.rows, ($) => (v(), g("p", {
1996
+ key: $.path,
1992
1997
  class: "break-all font-mono text-xs"
1993
- }, [P.type === "added" ? (v(), g("span", Rn, l(P.after ?? "—"), 1)) : P.type === "removed" ? (v(), g("span", Un, l(P.before ?? "—"), 1)) : (v(), g(z, {
1998
+ }, [$.type === "added" ? (v(), g("span", Rn, l($.after ?? "—"), 1)) : $.type === "removed" ? (v(), g("span", Un, l($.before ?? "—"), 1)) : (v(), g(z, {
1994
1999
  key: 2
1995
- }, [s("span", Nn, l(P.before ?? "—"), 1), a[16] || (a[16] = s("span", {
2000
+ }, [a("span", Nn, l($.before ?? "—"), 1), s[16] || (s[16] = a("span", {
1996
2001
  class: "text-fm-color-typo-secondary"
1997
- }, " → ", -1)), s("span", Kn, l(P.after ?? "—"), 1)], 64))]))), 128))])]))), 128))])) : (v(), g("p", Yn, l(u(o)("auditLog.operation.noChanges")), 1))])]), I.value || Q.value ? (v(), g("div", Bn, [s("button", {
2002
+ }, " → ", -1)), a("span", Kn, l($.after ?? "—"), 1)], 64))]))), 128))])]))), 128))])) : (v(), g("p", Yn, l(u(o)("auditLog.operation.noChanges")), 1))])]), I.value || Q.value ? (v(), g("div", Bn, [a("button", {
1998
2003
  type: "button",
1999
2004
  class: "flex w-full items-center justify-between p-12 text-left",
2000
- onClick: a[11] || (a[11] = (h) => H.value = !H.value)
2001
- }, [s("p", zn, l(u(o)("auditLog.operation.showData")), 1), y(Ie, {
2005
+ onClick: s[11] || (s[11] = (h) => H.value = !H.value)
2006
+ }, [a("p", zn, l(u(o)("auditLog.operation.showData")), 1), y(Ie, {
2002
2007
  name: "keyboard_arrow_down",
2003
2008
  class: zo(["shrink-0 transition-transform", H.value ? "rotate-180" : ""])
2004
2009
  }, null, 8, ["class"])]), H.value ? (v(), g(z, {
2005
2010
  key: 0
2006
- }, [a[18] || (a[18] = s("hr", {
2011
+ }, [s[18] || (s[18] = a("hr", {
2007
2012
  class: "border-fm-color-border-default"
2008
- }, null, -1)), s("div", qn, [I.value ? (v(), g("div", Jn, [s("p", Hn, l(u(o)("auditLog.operation.before")), 1), s("pre", Wn, l(I.value), 1)])) : F("", !0), Q.value ? (v(), g("div", Gn, [s("p", Xn, l(u(o)("auditLog.operation.after")), 1), s("pre", Qn, l(Q.value), 1)])) : F("", !0)])], 64)) : F("", !0)])) : F("", !0)])) : F("", !0)]),
2013
+ }, null, -1)), a("div", qn, [I.value ? (v(), g("div", Jn, [a("p", Hn, l(u(o)("auditLog.operation.before")), 1), a("pre", Wn, l(I.value), 1)])) : F("", !0), Q.value ? (v(), g("div", Gn, [a("p", Xn, l(u(o)("auditLog.operation.after")), 1), a("pre", Qn, l(Q.value), 1)])) : F("", !0)])], 64)) : F("", !0)])) : F("", !0)])) : F("", !0)]),
2009
2014
  _: 1
2010
2015
  }, 8, ["header", "model-value"])], 64);
2011
2016
  };