@feedmepos/mf-hrm-portal 2.3.2-dev.9 → 2.3.2

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 (114) hide show
  1. package/dist/{ApprovalCodeList-gb0bre9J.js → ApprovalCodeList-C9r8CGNH.js} +15 -14
  2. package/dist/{AuditLogList-9cwS6bL7.js → AuditLogList-Cu-KcQKa.js} +152 -147
  3. package/dist/ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BQ-uIsTN.js +438 -0
  4. package/dist/EmployeeList-BaFqZnFM.js +776 -0
  5. package/dist/FormItem.vue_vue_type_script_setup_true_lang-Be1OU1_r.js +45 -0
  6. package/dist/FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js +49 -0
  7. package/dist/{GrantUserList-yU2NqFVO.js → GrantUserList-Bjhx60M7.js} +16 -15
  8. package/dist/Main-CJQpjOgY.js +96 -0
  9. package/dist/{Main-4KwMqF3h.js → Main-DHiTgiDR.js} +5 -5
  10. package/dist/{Main-BS_Lk_eB.js → Main-LpfQqR_u.js} +999 -1005
  11. package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-CqG0v0Sz.js +243 -0
  12. package/dist/{PermissionSetList-D7SS1iAr.js → PermissionSetList-C0OZ_dvE.js} +80 -80
  13. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-T7dkd5Uv.js +4167 -0
  14. package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-EwU7gHP7.js +35 -0
  15. package/dist/RoleList-DpyW5XLs.js +740 -0
  16. package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang--dsZOhnv.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-CqP-Dn1X.js} +1 -1
  17. package/dist/{ScheduleGeneralPage-Pq6ufiDu.js → ScheduleGeneralPage-BNHi5jGf.js} +2 -2
  18. package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-DKFJLsTW.js → ScheduleModal.vue_vue_type_script_setup_true_lang-B609MZoP.js} +186 -187
  19. package/dist/{SchedulePage-8EAOfiJx.js → SchedulePage-CrP5_m3p.js} +13 -13
  20. package/dist/{SchedulePositionPage-CGXeUnju.js → SchedulePositionPage-ei_NKAUw.js} +3 -3
  21. package/dist/{SelectFilter-C-UEVLla.js → SelectFilter-CEYQ-ViE.js} +1 -1
  22. package/dist/TeamMemberList-rPiKKu2b.js +1154 -0
  23. package/dist/TimesheetList-B1L4WkNh.js +402 -0
  24. package/dist/TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-By6YR-k2.js +58 -0
  25. package/dist/{app-BohKQtlz.js → app-BzlH-2cN.js} +4015 -7796
  26. package/dist/app.js +3 -3
  27. package/dist/{approval-code-Bfvxsg8h.js → approval-code-CWq2ce3u.js} +1 -1
  28. package/dist/{dayjs.min-C0MqTPg1.js → dayjs.min-D6T4JzVv.js} +21 -21
  29. package/dist/employee-Bw7kRokg.js +209 -0
  30. package/dist/{grant-user-LZ3b6siI.js → grant-user-q_mkj3Vh.js} +1 -1
  31. package/dist/{index-DDDG-LHm.js → iteration-Dz0e08VH.js} +726 -698
  32. package/dist/{lodash-BRqMda7F.js → lodash-DGG_-VgI.js} +1 -1
  33. package/dist/restaurant-DJBQY9N5.js +2688 -0
  34. package/dist/role-CiRbkZSm.js +92 -0
  35. package/dist/rule-DMgkHpva.js +783 -0
  36. package/dist/src/api/employee/index.d.ts +2 -1
  37. package/dist/src/api/timesheet/index.d.ts +1 -1
  38. package/dist/src/components/CollapsibleWrapper.vue.d.ts +3 -11
  39. package/dist/src/helpers/permission-set.d.ts +102 -1
  40. package/dist/src/helpers/rule.d.ts +2 -2
  41. package/dist/src/helpers/string.d.ts +1 -10
  42. package/dist/src/router/shared.d.ts +1 -3
  43. package/dist/src/stores/employee.d.ts +7 -1
  44. package/dist/src/stores/restaurant.d.ts +8 -68
  45. package/dist/src/stores/team.d.ts +0 -30
  46. package/dist/src/stores/timesheet.d.ts +51 -66
  47. package/dist/src/types/team.d.ts +1 -17
  48. package/dist/src/types/timesheet.d.ts +0 -3
  49. package/dist/src/views/audit-log/constants.d.ts +1 -1
  50. package/dist/src/views/audit-log/locales/index.d.ts +16 -12
  51. package/dist/src/views/hr/locales/index.d.ts +0 -20
  52. package/dist/src/views/hr/role/RoleForm.vue.d.ts +2 -29
  53. package/dist/src/views/scheduling/composables/useScheduleOnboardingAvailability.d.ts +1 -1
  54. package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +1 -1
  55. package/dist/src/views/scheduling/composables/useScheduleShiftDraft.d.ts +1 -1
  56. package/dist/src/views/scheduling/composables/useScheduleShiftPopover.d.ts +1 -1
  57. package/dist/src/views/team/components/BasePermission.vue.d.ts +0 -11
  58. package/dist/src/views/team/components/ConditionPermission.vue.d.ts +0 -11
  59. package/dist/src/views/team/components/PortalPermissionEditor.vue.d.ts +0 -21
  60. package/dist/src/views/team/components/PosRolePermission.vue.d.ts +0 -11
  61. package/dist/src/views/team/locales/index.d.ts +0 -716
  62. package/dist/src/views/team/member/AddMemberForm.vue.d.ts +3 -48
  63. package/dist/src/views/team/{components/MemberStatusBadge.vue.d.ts → member/MemberInfo.vue.d.ts} +2 -2
  64. package/dist/src/views/team/member/TeamMemberList.vue.d.ts +0 -1
  65. package/dist/string-VNuQNweN.js +15 -0
  66. package/dist/style.css +1 -1
  67. package/dist/tsconfig.app.tsbuildinfo +1 -1
  68. package/dist/{useAppStore-DV13z6oc.js → useAppStore-TRX-PQD4.js} +1 -1
  69. package/dist/{useLoading-Fcnnfywt.js → useLoading-W3YSF8OB.js} +1 -1
  70. package/dist/{useReportPermissions-BcyVoKVq.js → useReportPermissions-CCkCAaGO.js} +13 -13
  71. package/package.json +3 -3
  72. package/dist/ConditionBuilderForm.vue_vue_type_script_setup_true_lang-DR-c15gr.js +0 -459
  73. package/dist/EmployeeList-DjyoW1we.js +0 -896
  74. package/dist/FormSection.vue_vue_type_script_setup_true_lang-BBWlADve.js +0 -90
  75. package/dist/Main-BuG7SPnC.js +0 -101
  76. package/dist/MyPosProfile-CuDzRaRS.js +0 -360
  77. package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-TXPEqa46.js +0 -126
  78. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-u1UlV2Aw.js +0 -4208
  79. package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-CYkv2x_y.js +0 -1831
  80. package/dist/RoleForm.vue_vue_type_script_setup_true_lang-hiMgwiya.js +0 -547
  81. package/dist/RoleList-B3P-LQYV.js +0 -265
  82. package/dist/TeamMemberList-Bd1O44Ur.js +0 -2087
  83. package/dist/TimesheetList-CSCmigCM.js +0 -437
  84. package/dist/employee-DWxT78W2.js +0 -172
  85. package/dist/iteration-CcXrOMQe.js +0 -30
  86. package/dist/member-grant-a3AGCWfT.js +0 -54
  87. package/dist/restaurant-pL7vHt-H.js +0 -52
  88. package/dist/role--EKCVqho.js +0 -98
  89. package/dist/rule-Db3gFVHx.js +0 -843
  90. package/dist/src/api/my-pos-profile/index.d.ts +0 -3
  91. package/dist/src/api/sso-provider/index.d.ts +0 -5
  92. package/dist/src/api/staff-invite/index.d.ts +0 -16
  93. package/dist/src/components/form/SegmentedTabs.vue.d.ts +0 -23
  94. package/dist/src/composables/useMenuAccess.d.ts +0 -56
  95. package/dist/src/composables/useSsoProviders.d.ts +0 -19
  96. package/dist/src/composables/useStaffInviteProviders.d.ts +0 -8
  97. package/dist/src/helpers/member-grant.d.ts +0 -36
  98. package/dist/src/helpers/my-pos-profile.d.ts +0 -37
  99. package/dist/src/helpers/pos-assignment-rows.d.ts +0 -28
  100. package/dist/src/helpers/staff-invite.d.ts +0 -54
  101. package/dist/src/router/menu-access-guard.d.ts +0 -17
  102. package/dist/src/types/my-pos-profile.d.ts +0 -24
  103. package/dist/src/types/sso-provider.d.ts +0 -10
  104. package/dist/src/types/staff-invite.d.ts +0 -100
  105. package/dist/src/views/my-pos-profile/MyPosProfile.vue.d.ts +0 -2
  106. package/dist/src/views/my-pos-profile/components/PasscodeChangedDialog.vue.d.ts +0 -4
  107. package/dist/src/views/my-pos-profile/locales/index.d.ts +0 -236
  108. package/dist/src/views/team/components/MemberGrantFields.vue.d.ts +0 -51
  109. package/dist/src/views/team/components/PosAssignmentRows.vue.d.ts +0 -44
  110. package/dist/src/views/team/member/ExistingMemberNotice.vue.d.ts +0 -11
  111. package/dist/src/views/team/member/MemberDetailsCard.vue.d.ts +0 -35
  112. package/dist/src/views/team/member/MemberHeaderCard.vue.d.ts +0 -19
  113. package/dist/string-DZQ1uNjn.js +0 -22
  114. package/dist/timesheet-NYW1P4rf.js +0 -76
@@ -1,16 +1,16 @@
1
- import { defineComponent as $t, ref as w, computed as A, onMounted as Uo, onBeforeUnmount as Ko, watch as oe, resolveComponent as N, createElementBlock as v, openBlock as f, createBlock as Ce, createCommentVNode as M, createElementVNode as a, Fragment as z, renderList as ce, withCtx as Y, createVNode as h, toDisplayString as l, unref as u, nextTick as Bo, onUnmounted as Yo, createTextVNode as ye, normalizeClass as zo } from "vue";
2
- import { d as j } from "./dayjs.min-C0MqTPg1.js";
1
+ import { defineComponent as Vt, ref as w, computed as A, onMounted as Uo, onBeforeUnmount as Ko, watch as oe, resolveComponent as N, createElementBlock as v, openBlock as f, createBlock as Ce, createCommentVNode as M, createElementVNode as a, Fragment as z, renderList as ce, withCtx as Y, createVNode as h, toDisplayString as l, unref as u, nextTick as Bo, onUnmounted as Yo, createTextVNode as ye, normalizeClass as zo } from "vue";
2
+ import { d as T } from "./dayjs.min-D6T4JzVv.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 st, b as at, G as Mt, _ as Wo, a as Go } from "./app-BohKQtlz.js";
5
+ import { B as Mt, _ as Wo, a as Go } from "./app-BzlH-2cN.js";
6
6
  import { components as ve } from "@feedmepos/ui-library";
7
- import { S as Fe } from "./SelectFilter-C-UEVLla.js";
8
- import { _ as Xo } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
9
- import { _ as Qo } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
10
- import { t as Zo, p as Dt } from "./rule-Db3gFVHx.js";
11
- import { u as es } from "./restaurant-pL7vHt-H.js";
7
+ import { g as st, b as at, u as Xo } from "./restaurant-DJBQY9N5.js";
8
+ import { S as Fe } from "./SelectFilter-CEYQ-ViE.js";
9
+ import { _ as Qo } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
10
+ import { _ as Zo } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
11
+ import { t as es, p as Dt } from "./rule-DMgkHpva.js";
12
12
  import { u as ts } from "./useDebounce-B8ZPVS5C.js";
13
- import { n as os } from "./string-DZQ1uNjn.js";
13
+ import { n as os } from "./string-VNuQNweN.js";
14
14
  import { useRoute as ss, useRouter as as } from "vue-router";
15
15
  import { u as ns } from "./useMessage-_ywT_N9X.js";
16
16
  const ls = {
@@ -42,10 +42,15 @@ const ls = {
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", Oe = {
47
52
  async count(t) {
48
- var r, d, y, _, g, S, O, i, V;
53
+ var r, d, y, _, g, S, O, i, P;
49
54
  const o = {
50
55
  ...t != null && t.from ? { from: t.from } : {},
51
56
  ...t != null && t.to ? { to: t.to } : {},
@@ -59,15 +64,15 @@ const ls = {
59
64
  ...(S = t == null ? void 0 : t.searchUserIds) != null && S.length ? { searchUserIds: t.searchUserIds } : {},
60
65
  ...(O = t == null ? void 0 : t.searchSubjects) != null && O.length ? { searchSubjects: t.searchSubjects } : {},
61
66
  ...(i = t == null ? void 0 : t.sources) != null && i.length ? { sources: t.sources } : {},
62
- ...(V = t == null ? void 0 : t.restaurantIds) != null && V.length ? { restaurantIds: t.restaurantIds } : {},
67
+ ...(P = t == null ? void 0 : t.restaurantIds) != null && P.length ? { restaurantIds: t.restaurantIds } : {},
63
68
  ...t != null && t.traceId ? { traceId: t.traceId } : {}
64
69
  };
65
70
  return (await st(
66
71
  await at().get(`${nt}/count`, {
67
72
  params: o,
68
- paramsSerializer: (P) => {
73
+ paramsSerializer: ($) => {
69
74
  const m = new URLSearchParams();
70
- for (const [x, D] of Object.entries(P))
75
+ for (const [x, D] of Object.entries($))
71
76
  if (Array.isArray(D))
72
77
  for (const F of D) m.append(x, String(F));
73
78
  else D != null && m.append(x, String(D));
@@ -101,13 +106,13 @@ const ls = {
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
- paramsSerializer: (V) => {
105
- const P = new URLSearchParams();
106
- for (const [m, x] of Object.entries(V))
109
+ paramsSerializer: (P) => {
110
+ const $ = new URLSearchParams();
111
+ for (const [m, x] of Object.entries(P))
107
112
  if (Array.isArray(x))
108
- for (const D of x) P.append(m, String(D));
109
- else x != null && P.append(m, String(x));
110
- return P.toString();
113
+ for (const D of x) $.append(m, String(D));
114
+ else x != null && $.append(m, String(x));
115
+ return $.toString();
111
116
  }
112
117
  })
113
118
  );
@@ -129,7 +134,7 @@ const ls = {
129
134
  }, rs = { class: "flex h-[46px] items-center gap-8 rounded-sm px-16 hover:bg-fm-color-opacity-sm" }, is = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, us = {
130
135
  "data-more-measure": "",
131
136
  class: "flex h-[46px] items-center gap-8 rounded-sm px-16"
132
- }, ds = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, cs = /* @__PURE__ */ $t({
137
+ }, ds = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, cs = /* @__PURE__ */ Vt({
133
138
  __name: "AuditLogModuleTabs",
134
139
  props: {
135
140
  modelValue: {},
@@ -138,56 +143,56 @@ const ls = {
138
143
  emits: ["update:modelValue"],
139
144
  setup(t, { emit: o }) {
140
145
  const n = t, r = o, { t: d } = dt(), y = w(!1), _ = w(null), g = w(null), S = w([]), O = w(0), i = w(0);
141
- let V = null;
142
- async function P() {
146
+ let P = null;
147
+ async function $() {
143
148
  if (await Bo(), !g.value) return;
144
149
  const b = g.value.querySelectorAll("[data-tab-measure]");
145
150
  S.value = Array.from(b).map((B) => B.offsetWidth);
146
- const T = g.value.querySelector("[data-more-measure]");
147
- O.value = (T == null ? void 0 : T.offsetWidth) ?? 0;
151
+ const j = g.value.querySelector("[data-more-measure]");
152
+ O.value = (j == null ? void 0 : j.offsetWidth) ?? 0;
148
153
  }
149
154
  const m = A(() => {
150
155
  const b = n.items.length;
151
156
  if (b === 0) return 0;
152
157
  if (!i.value || S.value.length !== b) return b;
153
- const T = S.value;
154
- if (T.reduce((I, X) => I + X, 0) <= i.value) return b;
158
+ const j = S.value;
159
+ if (j.reduce((I, X) => I + X, 0) <= i.value) return b;
155
160
  const E = O.value;
156
161
  let H = 0, U = 0;
157
- for (let I = 0; I < b && !(H + T[I] + E > i.value); I++)
158
- H += T[I], U++;
162
+ for (let I = 0; I < b && !(H + j[I] + E > i.value); I++)
163
+ H += j[I], U++;
159
164
  return U;
160
165
  }), x = A(() => {
161
- const b = m.value, T = n.items.length;
162
- if (b >= T) return [...n.items];
166
+ const b = m.value, j = n.items.length;
167
+ if (b >= j) return [...n.items];
163
168
  const B = n.items.slice(0, b), E = n.items.find((W) => W.value === n.modelValue);
164
169
  if (!E || B.some((W) => W.value === E.value)) return B;
165
170
  if (b === 0) return [E];
166
171
  const H = n.items.findIndex((W) => W.value === E.value), U = S.value, I = O.value, X = U[H] ?? 0;
167
- let ue = b, je = U.slice(0, ue - 1).reduce((W, xe) => W + xe, 0);
168
- for (; ue > 1 && je + X + I > i.value; )
169
- ue--, je = U.slice(0, ue - 1).reduce((W, xe) => W + xe, 0);
172
+ let ue = b, Te = U.slice(0, ue - 1).reduce((W, xe) => W + xe, 0);
173
+ for (; ue > 1 && Te + X + I > i.value; )
174
+ ue--, Te = U.slice(0, ue - 1).reduce((W, xe) => W + xe, 0);
170
175
  return [...n.items.slice(0, Math.max(ue - 1, 0)), E];
171
176
  }), D = A(() => {
172
- const b = new Set(x.value.map((T) => T.value));
173
- return n.items.filter((T) => !b.has(T.value));
177
+ const b = new Set(x.value.map((j) => j.value));
178
+ return n.items.filter((j) => !b.has(j.value));
174
179
  });
175
180
  function F(b) {
176
181
  y.value = !1, r("update:modelValue", b);
177
182
  }
178
183
  return Uo(async () => {
179
- await P(), _.value && (i.value = _.value.clientWidth, V = new ResizeObserver(() => {
184
+ await $(), _.value && (i.value = _.value.clientWidth, P = new ResizeObserver(() => {
180
185
  _.value && (i.value = _.value.clientWidth);
181
- }), V.observe(_.value));
186
+ }), P.observe(_.value));
182
187
  }), Ko(() => {
183
- V == null || V.disconnect(), V = null;
188
+ P == null || P.disconnect(), P = null;
184
189
  }), oe(
185
190
  () => n.items,
186
191
  () => {
187
- P();
192
+ $();
188
193
  },
189
194
  { deep: !0 }
190
- ), (b, T) => {
195
+ ), (b, j) => {
191
196
  const B = N("FmTab"), E = N("FmIcon"), H = N("FmMenuItem"), U = N("FmMenu");
192
197
  return f(), v("div", {
193
198
  ref_key: "containerRef",
@@ -208,7 +213,7 @@ const ls = {
208
213
  "show-menu": y.value,
209
214
  class: "max-w-[360px] min-w-[90px] rounded-sm",
210
215
  placement: "bottom-start",
211
- onMenuChanged: T[0] || (T[0] = (I) => y.value = I)
216
+ onMenuChanged: j[0] || (j[0] = (I) => y.value = I)
212
217
  }, {
213
218
  "menu-button": Y(() => [
214
219
  a("div", rs, [
@@ -265,7 +270,7 @@ const ls = {
265
270
  if (!(!g && t.value.length > 0))
266
271
  try {
267
272
  o.value = !0;
268
- const S = await Zo.readTeamMembers();
273
+ const S = await es.readTeamMembers();
269
274
  t.value = S.sort((O, i) => O.doc.isOwner ? -1 : O.name.localeCompare(i.name)), n.value = !0;
270
275
  } finally {
271
276
  o.value = !1;
@@ -316,14 +321,14 @@ function ps({ logs: t, selectedLog: o, isSheetOpen: n, businessId: r }) {
316
321
  function i(x) {
317
322
  O(x.traceId || void 0);
318
323
  }
319
- function V() {
324
+ function P() {
320
325
  S++, O(void 0);
321
326
  }
322
- async function P(x) {
327
+ async function $(x) {
323
328
  var b;
324
329
  if (((b = o.value) == null ? void 0 : b.traceId) === x) return;
325
330
  const D = ++S;
326
- let F = t.value.find((T) => T.traceId === x);
331
+ let F = t.value.find((j) => j.traceId === x);
327
332
  if (!F) {
328
333
  try {
329
334
  [F] = await Oe.read({ traceId: x, limit: 1 });
@@ -347,7 +352,7 @@ function ps({ logs: t, selectedLog: o, isSheetOpen: n, businessId: r }) {
347
352
  S++, n.value = !1, o.value = null, O(void 0);
348
353
  return;
349
354
  }
350
- typeof x == "string" && x ? D && P(x) : (S++, (b = o.value) != null && b.traceId && n.value && (n.value = !1, o.value = null));
355
+ typeof x == "string" && x ? D && $(x) : (S++, (b = o.value) != null && b.traceId && n.value && (n.value = !1, o.value = null));
351
356
  },
352
357
  { immediate: !0 }
353
358
  );
@@ -358,12 +363,12 @@ function ps({ logs: t, selectedLog: o, isSheetOpen: n, businessId: r }) {
358
363
  g.error(_("auditLog.detail.linkCopyFailed"));
359
364
  }
360
365
  }
361
- return { onSheetOpened: i, onSheetClosed: V, copyLink: m };
366
+ return { onSheetOpened: i, onSheetClosed: P, copyLink: m };
362
367
  }
363
368
  function _e(t) {
364
369
  return typeof t == "object" && t !== null && !Array.isArray(t);
365
370
  }
366
- function Te(t) {
371
+ function je(t) {
367
372
  return Array.isArray(t);
368
373
  }
369
374
  function Be(t) {
@@ -385,7 +390,7 @@ function Ct(t) {
385
390
  if (!o.startsWith("{") && !o.startsWith("[")) return { ok: !1, value: void 0 };
386
391
  try {
387
392
  const n = JSON.parse(o);
388
- return _e(n) || Te(n) ? { ok: !0, value: n } : { ok: !1, value: void 0 };
393
+ return _e(n) || je(n) ? { ok: !0, value: n } : { ok: !1, value: void 0 };
389
394
  } catch {
390
395
  return { ok: !1, value: void 0 };
391
396
  }
@@ -402,7 +407,7 @@ function ys(t, o) {
402
407
  return d;
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: Be(o) });
407
412
  }
408
413
  function Et(t, o, n) {
@@ -424,11 +429,11 @@ function _s(t, o, n, r) {
424
429
  n.map((b) => [b[d], b])
425
430
  ), D = Array.from(m.keys()).concat(Array.from(x.keys())), F = Array.from(new Set(D));
426
431
  for (const b of F) {
427
- const T = m.has(b), B = x.has(b), E = `${t}[${String(b)}]`;
432
+ const j = m.has(b), B = x.has(b), E = `${t}[${String(b)}]`;
428
433
  Ye(
429
434
  E,
430
435
  m.get(b),
431
- T,
436
+ j,
432
437
  x.get(b),
433
438
  B,
434
439
  r
@@ -441,8 +446,8 @@ function _s(t, o, n, r) {
441
446
  g.has(m.sig) || g.set(m.sig, []), g.get(m.sig).push(m);
442
447
  for (const m of _)
443
448
  S.has(m.sig) || S.set(m.sig, []), S.get(m.sig).push(m);
444
- const O = [], i = [], V = Array.from(g.keys()).concat(Array.from(S.keys())), P = Array.from(new Set(V));
445
- for (const m of P) {
449
+ const O = [], i = [], P = Array.from(g.keys()).concat(Array.from(S.keys())), $ = Array.from(new Set(P));
450
+ for (const m of $) {
446
451
  const x = g.get(m) || [], D = S.get(m) || [], F = Math.min(x.length, D.length);
447
452
  for (let b = F; b < x.length; b++)
448
453
  O.push({ idx: x[b].idx, item: x[b].item });
@@ -452,7 +457,7 @@ function _s(t, o, n, r) {
452
457
  for (const { idx: m, item: x } of O)
453
458
  Et(`${t}[${m}]`, x, r);
454
459
  for (const { idx: m, item: x } of i)
455
- Pt(`${t}[${m}]`, x, r);
460
+ $t(`${t}[${m}]`, x, r);
456
461
  }
457
462
  function Ye(t, o, n, r, d, y) {
458
463
  if (!n && !d) return;
@@ -461,7 +466,7 @@ function Ye(t, o, n, r, d, y) {
461
466
  return;
462
467
  }
463
468
  if (!n && d) {
464
- Pt(t, r, y);
469
+ $t(t, r, y);
465
470
  return;
466
471
  }
467
472
  if (JSON.stringify(o) === JSON.stringify(r)) return;
@@ -469,7 +474,7 @@ function Ye(t, o, n, r, d, y) {
469
474
  bs(t, o, r, y);
470
475
  return;
471
476
  }
472
- if (Te(o) && Te(r)) {
477
+ if (je(o) && je(r)) {
473
478
  _s(t, o, r, y);
474
479
  return;
475
480
  }
@@ -489,13 +494,13 @@ function xs(t, o) {
489
494
  if (JSON.stringify(t) === JSON.stringify(o)) return [];
490
495
  const n = t == null, r = o == null;
491
496
  let d = t;
492
- n && (_e(o) ? d = {} : Te(o) && (d = []));
497
+ n && (_e(o) ? d = {} : je(o) && (d = []));
493
498
  let y = o;
494
- r && (_e(t) ? y = {} : Te(t) && (y = []));
499
+ r && (_e(t) ? y = {} : je(t) && (y = []));
495
500
  const _ = [];
496
501
  return Ye("", d, !0, y, !0, _), _;
497
502
  }
498
- function Tt(t) {
503
+ function jt(t) {
499
504
  const o = t.operations;
500
505
  return !o || o.length === 0 ? !1 : o.some((n) => n.status === "failed");
501
506
  }
@@ -510,7 +515,7 @@ function Ls(t, o) {
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;
512
517
  }
513
- function jt(t, o) {
518
+ function Tt(t, o) {
514
519
  var d;
515
520
  const n = t.approverName || t.approverId;
516
521
  if (!n)
@@ -580,17 +585,17 @@ const Ds = {
580
585
  class: "text-xs font-semibold text-fm-color-typo-secondary mb-4"
581
586
  }, Cs = {
582
587
  class: "flex min-h-0 flex-1 flex-col gap-16"
583
- }, Ts = {
584
- class: "space-y-16"
585
588
  }, js = {
589
+ class: "space-y-16"
590
+ }, Ts = {
586
591
  class: "flex flex-wrap items-center gap-8"
587
- }, Vs = {
592
+ }, Ps = {
588
593
  key: 0,
589
594
  class: "w-fit"
590
- }, $s = {
595
+ }, Vs = {
591
596
  key: 1,
592
597
  class: "w-fit"
593
- }, Ps = {
598
+ }, $s = {
594
599
  class: "w-fit"
595
600
  }, Es = {
596
601
  class: "w-fit"
@@ -696,16 +701,16 @@ const Ds = {
696
701
  class: "break-all font-mono text-xs font-semibold"
697
702
  }, Ca = {
698
703
  class: "text-xs text-fm-color-typo-secondary"
699
- }, Ta = {
700
- class: "break-all font-mono text-xs font-semibold"
701
704
  }, ja = {
705
+ class: "break-all font-mono text-xs font-semibold"
706
+ }, Ta = {
702
707
  class: "text-xs text-fm-color-typo-secondary"
703
- }, Va = {
708
+ }, Pa = {
704
709
  class: "font-semibold"
705
- }, $a = {
710
+ }, Va = {
706
711
  key: 0,
707
712
  class: "break-all font-mono text-xs"
708
- }, Pa = {
713
+ }, $a = {
709
714
  key: 0
710
715
  }, Ea = {
711
716
  class: "text-xs text-fm-color-typo-secondary"
@@ -810,16 +815,16 @@ const Ds = {
810
815
  class: "text-fm-color-typo-error"
811
816
  }, Cn = {
812
817
  class: "text-fm-color-typo-error"
813
- }, Tn = {
814
- class: "text-fm-color-typo-success"
815
818
  }, jn = {
819
+ class: "text-fm-color-typo-success"
820
+ }, Tn = {
816
821
  key: 1,
817
822
  class: "divide-y divide-fm-color-border-default"
818
- }, Vn = {
823
+ }, Pn = {
819
824
  class: "flex flex-wrap items-center gap-8"
820
- }, $n = {
825
+ }, Vn = {
821
826
  class: "break-all font-mono text-xs"
822
- }, Pn = {
827
+ }, $n = {
823
828
  class: "space-y-4"
824
829
  }, En = {
825
830
  key: 0,
@@ -853,15 +858,15 @@ const Ds = {
853
858
  class: "text-xs text-fm-color-typo-secondary"
854
859
  }, Xn = {
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
- }, De = 100, rt = 1e3, it = "__feedmeAdmin__", Qn = "D MMM YYYY h:mm A", Zn = "YYYY-MM-DD HH:mm", K = "YYYY-MM-DD", Vt = "audit-log-export-fields-v3", el = /* @__PURE__ */ $t({
861
+ }, De = 100, rt = 1e3, it = "__feedmeAdmin__", Qn = "D MMM YYYY h:mm A", Zn = "YYYY-MM-DD HH:mm", K = "YYYY-MM-DD", Pt = "audit-log-export-fields-v3", el = /* @__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(), d = fs(), y = es(), {
867
+ } = dt(), r = Ho(), d = fs(), y = Xo(), {
863
868
  restaurants: _
864
- } = Jo(y), g = w(!1), S = w(!1), O = w([]), i = w(null), V = w(!1), P = w({}), m = w(null), x = w(!1);
869
+ } = Jo(y), g = w(!1), S = w(!1), O = w([]), i = w(null), P = w(!1), $ = w({}), m = w(null), x = w(!1);
865
870
  async function D(e) {
866
871
  const s = Uint8Array.from(atob(e), (k) => k.charCodeAt(0)), c = new DecompressionStream("gzip"), L = c.writable.getWriter();
867
872
  return await L.write(s), await L.close(), new Response(c.readable).text();
@@ -900,7 +905,7 @@ const Ds = {
900
905
  }, {
901
906
  immediate: !0
902
907
  });
903
- async function T(e) {
908
+ async function j(e) {
904
909
  if (!e) return;
905
910
  let s = e;
906
911
  if (e.startsWith("gzip:"))
@@ -930,10 +935,10 @@ const Ds = {
930
935
  oe(m, async (e) => {
931
936
  const s = ++ue;
932
937
  if (E.value = [], H.value = [], U.value = "", I.value = "", X.value = !1, !e) return;
933
- const [c, L] = await Promise.all([T(e.before), T(e.after)]);
938
+ const [c, L] = await Promise.all([j(e.before), j(e.after)]);
934
939
  s === ue && (Is(e.changeNodes) ? H.value = e.changeNodes.map(ws) : E.value = xs(c, L), U.value = B(c), I.value = B(L));
935
940
  });
936
- function je(e) {
941
+ function Te(e) {
937
942
  return e === "added" ? "success" : e === "removed" ? "critical" : "warning";
938
943
  }
939
944
  function ct(e) {
@@ -964,7 +969,7 @@ const Ds = {
964
969
  }, s.set(k, C), e.push(C)), C.rows.push(c);
965
970
  }
966
971
  return e;
967
- }), Ve = w(1), Bt = w(!1), ze = w(0), mt = A(() => Math.max(1, Math.ceil(ze.value / De))), vt = j().format("YYYY-MM-DD"), se = w({
972
+ }), Pe = w(1), Bt = w(!1), ze = w(0), mt = A(() => Math.max(1, Math.ceil(ze.value / De))), vt = T().format("YYYY-MM-DD"), se = w({
968
973
  startDate: `${vt} 00:00`,
969
974
  endDate: `${vt} 23:59`
970
975
  }), fe = w(), Q = w(), ae = w(), ne = w(), le = w("all");
@@ -972,7 +977,7 @@ const Ds = {
972
977
  return typeof e == "string" ? [e] : Array.isArray(e) ? e.filter((s) => typeof s == "string") : [];
973
978
  }
974
979
  const pt = Me.filter((e) => e.key !== "all").map((e) => e.key);
975
- function $e(e) {
980
+ function Ve(e) {
976
981
  const s = Me.find((c) => c.key !== "all" && c.subjectPrefixes.some((L) => e.startsWith(L)));
977
982
  return (s == null ? void 0 : s.key) ?? "other";
978
983
  }
@@ -985,7 +990,7 @@ const Ds = {
985
990
  }) => ({
986
991
  label: o(`auditLog.modules.${e}`),
987
992
  value: e
988
- }))), Pe = A(() => Me.find((e) => e.key === le.value) ?? Me[0]), qt = A(() => le.value === "all"), q = A(() => le.value === "pos"), pe = A(() => Pe.value.sources ?? []);
993
+ }))), $e = A(() => Me.find((e) => e.key === le.value) ?? Me[0]), qt = A(() => le.value === "all"), q = A(() => le.value === "pos"), pe = A(() => $e.value.sources ?? []);
989
994
  oe(q, (e) => {
990
995
  e && y.readRestaurants();
991
996
  }, {
@@ -1018,7 +1023,7 @@ const Ds = {
1018
1023
  } = ps({
1019
1024
  logs: O,
1020
1025
  selectedLog: i,
1021
- isSheetOpen: V,
1026
+ isSheetOpen: P,
1022
1027
  businessId: () => {
1023
1028
  var e;
1024
1029
  return (e = r.currentBusiness.value) == null ? void 0 : e._id;
@@ -1045,13 +1050,13 @@ const Ds = {
1045
1050
  for (const k of [...e, ...s])
1046
1051
  if (!c.has(k.value)) {
1047
1052
  c.add(k.value);
1048
- const C = $e(k.value);
1053
+ const C = Ve(k.value);
1049
1054
  L.push({
1050
1055
  ...k,
1051
1056
  group: o(`auditLog.modules.${C}`)
1052
1057
  });
1053
1058
  }
1054
- return L.sort((k, C) => gt($e(k.value)) - gt($e(C.value)));
1059
+ return L.sort((k, C) => gt(Ve(k.value)) - gt(Ve(C.value)));
1055
1060
  }), ge = A(() => {
1056
1061
  const e = ee.value.toLowerCase();
1057
1062
  if (!e) return [];
@@ -1059,7 +1064,7 @@ const Ds = {
1059
1064
  for (const c of Je.value)
1060
1065
  c.label.toLowerCase().includes(e) && s.add(c.value);
1061
1066
  return [...s];
1062
- }), eo = A(() => qt.value ? Je.value : Je.value.filter((e) => $e(e.value) === le.value));
1067
+ }), eo = A(() => qt.value ? Je.value : Je.value.filter((e) => Ve(e.value) === le.value));
1063
1068
  function to(e, s) {
1064
1069
  const c = s.toLowerCase();
1065
1070
  return e.label.toLowerCase().includes(c) || e.value.replace(/^business::/, "").toLowerCase().includes(c) ? !0 : e.value.toLowerCase().includes(c);
@@ -1128,7 +1133,7 @@ const Ds = {
1128
1133
  skipped: "warning"
1129
1134
  };
1130
1135
  function Ne(e) {
1131
- return j(e).format(Qn);
1136
+ return T(e).format(Qn);
1132
1137
  }
1133
1138
  const ro = A(() => {
1134
1139
  const {
@@ -1139,44 +1144,44 @@ const Ds = {
1139
1144
  }), io = A(() => [{
1140
1145
  label: o("date.predefinedRanges.today"),
1141
1146
  value: {
1142
- startDate: j().format(K),
1143
- endDate: j().format(K)
1147
+ startDate: T().format(K),
1148
+ endDate: T().format(K)
1144
1149
  }
1145
1150
  }, {
1146
1151
  label: o("date.predefinedRanges.yesterday"),
1147
1152
  value: {
1148
- startDate: j().subtract(1, "day").format(K),
1149
- endDate: j().subtract(1, "day").format(K)
1153
+ startDate: T().subtract(1, "day").format(K),
1154
+ endDate: T().subtract(1, "day").format(K)
1150
1155
  }
1151
1156
  }, {
1152
1157
  label: o("date.predefinedRanges.thisWeek"),
1153
1158
  value: {
1154
- startDate: j().startOf("week").format(K),
1155
- endDate: j().endOf("week").format(K)
1159
+ startDate: T().startOf("week").format(K),
1160
+ endDate: T().endOf("week").format(K)
1156
1161
  }
1157
1162
  }, {
1158
1163
  label: o("date.predefinedRanges.lastWeek"),
1159
1164
  value: {
1160
- startDate: j().subtract(1, "week").startOf("week").format(K),
1161
- endDate: j().subtract(1, "week").endOf("week").format(K)
1165
+ startDate: T().subtract(1, "week").startOf("week").format(K),
1166
+ endDate: T().subtract(1, "week").endOf("week").format(K)
1162
1167
  }
1163
1168
  }, {
1164
1169
  label: o("date.predefinedRanges.last7Days"),
1165
1170
  value: {
1166
- startDate: j().subtract(7, "day").format(K),
1167
- endDate: j().subtract(1, "day").format(K)
1171
+ startDate: T().subtract(7, "day").format(K),
1172
+ endDate: T().subtract(1, "day").format(K)
1168
1173
  }
1169
1174
  }, {
1170
1175
  label: o("date.predefinedRanges.thisMonth"),
1171
1176
  value: {
1172
- startDate: j().startOf("month").format(K),
1173
- endDate: j().endOf("month").format(K)
1177
+ startDate: T().startOf("month").format(K),
1178
+ endDate: T().endOf("month").format(K)
1174
1179
  }
1175
1180
  }, {
1176
1181
  label: o("date.predefinedRanges.lastMonth"),
1177
1182
  value: {
1178
- startDate: j().subtract(1, "month").startOf("month").format(K),
1179
- endDate: j().subtract(1, "month").endOf("month").format(K)
1183
+ startDate: T().subtract(1, "month").startOf("month").format(K),
1184
+ endDate: T().subtract(1, "month").endOf("month").format(K)
1180
1185
  }
1181
1186
  }]);
1182
1187
  function Ge(e) {
@@ -1201,10 +1206,10 @@ const Ds = {
1201
1206
  return d.userIdToEmail[e.userId] || "-";
1202
1207
  }
1203
1208
  function bt(e) {
1204
- return j(e).format("DD MMM YYYY, HH:mm");
1209
+ return T(e).format("DD MMM YYYY, HH:mm");
1205
1210
  }
1206
1211
  function Xe(e) {
1207
- return j(e).format("DD MMM YYYY, HH:mm:ss").toUpperCase();
1212
+ return T(e).format("DD MMM YYYY, HH:mm:ss").toUpperCase();
1208
1213
  }
1209
1214
  function _t(e) {
1210
1215
  return G.value[e] ?? e;
@@ -1331,7 +1336,7 @@ const Ds = {
1331
1336
  }];
1332
1337
  function vo() {
1333
1338
  try {
1334
- const e = localStorage.getItem(Vt);
1339
+ const e = localStorage.getItem(Pt);
1335
1340
  if (e) {
1336
1341
  const s = JSON.parse(e);
1337
1342
  if (Array.isArray(s) && s.length > 0) return new Set(s);
@@ -1350,7 +1355,7 @@ const Ds = {
1350
1355
  s.add(e);
1351
1356
  he.value = s;
1352
1357
  try {
1353
- localStorage.setItem(Vt, JSON.stringify([...s]));
1358
+ localStorage.setItem(Pt, JSON.stringify([...s]));
1354
1359
  } catch {
1355
1360
  }
1356
1361
  }
@@ -1362,7 +1367,7 @@ const Ds = {
1362
1367
  const {
1363
1368
  startDate: C,
1364
1369
  endDate: R
1365
- } = se.value, ie = Pe.value.subjectPrefixes, Ue = (/* @__PURE__ */ new Date()).toISOString().slice(0, 19).replace("T", " "), we = R ? de(R) : null, Ke = we && we < Ue ? we : Ue, tt = {
1370
+ } = se.value, ie = $e.value.subjectPrefixes, Ue = (/* @__PURE__ */ new Date()).toISOString().slice(0, 19).replace("T", " "), we = R ? de(R) : null, Ke = we && we < Ue ? we : Ue, tt = {
1366
1371
  ...C ? {
1367
1372
  from: de(C)
1368
1373
  } : {},
@@ -1411,8 +1416,8 @@ const Ds = {
1411
1416
  if (Ie.push(...J), J.length < rt) break;
1412
1417
  p += rt;
1413
1418
  }
1414
- const $ = Ze.filter((J) => he.value.has(J.key)), Do = $.map((J) => o(J.labelKey)), Oo = Ie.map((J) => $.map((No) => No.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 = ((L = r.currentBusiness.value) == null ? void 0 : L.name) || "", $o = [C, R].filter(Boolean).join(" – "), Po = [...[[o("auditLog.title")], [`${o("auditLog.frontMatter.date")}: ${$o}`], ...At ? [[`${o("auditLog.frontMatter.business")}: ${At}`]] : [], [`${o("auditLog.frontMatter.generatedBy")}: ${j().format("DD MMM YYYY, HH:mm")} (${Vo})`], []].map((J) => J.map(St).join(",")), ...[Do, ...Oo].map((J) => J.map(St).join(","))].join(`
1415
- `), Eo = `audit-log_${(((k = r.currentBusiness.value) == null ? void 0 : k.name) || "business").replace(/[^a-z0-9_-]+/gi, "_")}_${j().format("YYYYMMDD_HHmmss")}.csv`, Ro = new Blob([`\uFEFF${Po}`], {
1419
+ const V = Ze.filter((J) => he.value.has(J.key)), Do = V.map((J) => o(J.labelKey)), Oo = Ie.map((J) => V.map((No) => No.getValue(J) ?? "")), ot = -(/* @__PURE__ */ new Date()).getTimezoneOffset(), Co = ot >= 0 ? "+" : "-", jo = String(Math.floor(Math.abs(ot) / 60)).padStart(2, "0"), To = String(Math.abs(ot) % 60).padStart(2, "0"), Po = `UTC${Co}${jo}:${To}`, At = ((L = r.currentBusiness.value) == null ? void 0 : L.name) || "", Vo = [C, R].filter(Boolean).join(" – "), $o = [...[[o("auditLog.title")], [`${o("auditLog.frontMatter.date")}: ${Vo}`], ...At ? [[`${o("auditLog.frontMatter.business")}: ${At}`]] : [], [`${o("auditLog.frontMatter.generatedBy")}: ${T().format("DD MMM YYYY, HH:mm")} (${Po})`], []].map((J) => J.map(St).join(",")), ...[Do, ...Oo].map((J) => J.map(St).join(","))].join(`
1420
+ `), Eo = `audit-log_${(((k = r.currentBusiness.value) == null ? void 0 : k.name) || "business").replace(/[^a-z0-9_-]+/gi, "_")}_${T().format("YYYYMMDD_HHmmss")}.csv`, Ro = new Blob([`\uFEFF${$o}`], {
1416
1421
  type: "text/csv;charset=utf-8;"
1417
1422
  }), Ft = window.URL.createObjectURL(Ro), Ae = document.createElement("a");
1418
1423
  Ae.href = Ft, Ae.download = Eo, document.body.appendChild(Ae), Ae.click(), Ae.remove(), window.URL.revokeObjectURL(Ft);
@@ -1425,7 +1430,7 @@ const Ds = {
1425
1430
  return "status" in e;
1426
1431
  }
1427
1432
  function ho(e) {
1428
- return Tt(e) ? h(ve.FmTooltip, {
1433
+ return jt(e) ? h(ve.FmTooltip, {
1429
1434
  variant: "plain",
1430
1435
  placement: "top"
1431
1436
  }, {
@@ -1574,7 +1579,7 @@ const Ds = {
1574
1579
  enableSorting: !1,
1575
1580
  cell(e) {
1576
1581
  const s = e.row.original;
1577
- return te(s) ? null : jt(s, o);
1582
+ return te(s) ? null : Tt(s, o);
1578
1583
  }
1579
1584
  },
1580
1585
  Se.find((e) => e.accessorKey === "action"),
@@ -1583,7 +1588,7 @@ const Ds = {
1583
1588
  // Status
1584
1589
  ], xo = A(() => q.value ? _o : Se);
1585
1590
  function de(e) {
1586
- const s = j(e, Zn);
1591
+ const s = T(e, Zn);
1587
1592
  return new Date(s.year(), s.month(), s.date(), s.hour(), s.minute(), 0).toISOString().slice(0, 19).replace("T", " ");
1588
1593
  }
1589
1594
  async function wt() {
@@ -1593,7 +1598,7 @@ const Ds = {
1593
1598
  const {
1594
1599
  startDate: L,
1595
1600
  endDate: k
1596
- } = se.value, C = (Ve.value - 1) * De, R = Pe.value.subjectPrefixes, ie = await Oe.read({
1601
+ } = se.value, C = (Pe.value - 1) * De, R = $e.value.subjectPrefixes, ie = await Oe.read({
1597
1602
  limit: De,
1598
1603
  offset: C,
1599
1604
  ...L ? {
@@ -1636,7 +1641,7 @@ const Ds = {
1636
1641
  searchSubjects: ge.value
1637
1642
  } : {}
1638
1643
  });
1639
- O.value = ie, Bt.value = ie.length === De, P.value = {};
1644
+ O.value = ie, Bt.value = ie.length === De, $.value = {};
1640
1645
  } finally {
1641
1646
  g.value = !1;
1642
1647
  }
@@ -1664,7 +1669,7 @@ const Ds = {
1664
1669
  const {
1665
1670
  startDate: e,
1666
1671
  endDate: s
1667
- } = se.value, c = Pe.value.subjectPrefixes;
1672
+ } = se.value, c = $e.value.subjectPrefixes;
1668
1673
  ze.value = await Oe.count({
1669
1674
  ...e ? {
1670
1675
  from: de(e)
@@ -1709,7 +1714,7 @@ const Ds = {
1709
1714
  }
1710
1715
  oe(It, async () => {
1711
1716
  var e;
1712
- Ve.value = 1, (e = r.currentBusiness.value) != null && e._id && await Promise.all([Lo(), wt()]);
1717
+ Pe.value = 1, (e = r.currentBusiness.value) != null && e._id && await Promise.all([Lo(), wt()]);
1713
1718
  }, {
1714
1719
  immediate: !0
1715
1720
  }), oe(le, () => {
@@ -1720,8 +1725,8 @@ const Ds = {
1720
1725
  pageIndex: e
1721
1726
  }) {
1722
1727
  var s;
1723
- if ((s = r.currentBusiness.value) != null && s._id && !(e === 0 && Ve.value === 1) && !et) {
1724
- et = !0, Ve.value = e + 1;
1728
+ if ((s = r.currentBusiness.value) != null && s._id && !(e === 0 && Pe.value === 1) && !et) {
1729
+ et = !0, Pe.value = e + 1;
1725
1730
  try {
1726
1731
  await wt();
1727
1732
  } finally {
@@ -1734,10 +1739,10 @@ const Ds = {
1734
1739
  Io(e);
1735
1740
  return;
1736
1741
  }
1737
- i.value = e, V.value = !0, Xt(e);
1742
+ i.value = e, P.value = !0, Xt(e);
1738
1743
  }
1739
1744
  function wo() {
1740
- V.value = !1, i.value = null, Qt();
1745
+ P.value = !1, i.value = null, Qt();
1741
1746
  }
1742
1747
  function Io(e) {
1743
1748
  m.value = e, x.value = !0;
@@ -1792,7 +1797,7 @@ const Ds = {
1792
1797
  deep: !0
1793
1798
  }), (e, s) => {
1794
1799
  const c = N("FmSpacer"), L = N("FmButton"), k = N("FmMenuItem"), C = N("FmMenu"), R = N("FmChip"), ie = N("FmDateRangePicker"), Ue = N("FmSearch"), we = N("FmTable"), Ke = N("FmIcon"), tt = N("FmTooltip"), Ie = N("FmSideSheet");
1795
- return f(), v(z, null, [h(Xo, {
1800
+ return f(), v(z, null, [h(Qo, {
1796
1801
  heading: u(o)("auditLog.title")
1797
1802
  }, {
1798
1803
  "append-heading": Y(() => [h(c), h(L, {
@@ -1818,15 +1823,15 @@ const Ds = {
1818
1823
  "has-checkbox": "",
1819
1824
  "model-value": he.value.has(p.key),
1820
1825
  disabled: he.value.has(p.key) && he.value.size === 1,
1821
- onClick: ($) => po(p.key)
1826
+ onClick: (V) => po(p.key)
1822
1827
  }, null, 8, ["label", "model-value", "disabled", "onClick"])), 64))])]),
1823
1828
  _: 1
1824
1829
  })]),
1825
- default: Y(() => [a("div", Cs, [a("div", Ts, [h(cs, {
1830
+ default: Y(() => [a("div", Cs, [a("div", js, [h(cs, {
1826
1831
  modelValue: le.value,
1827
1832
  "onUpdate:modelValue": s[0] || (s[0] = (p) => le.value = p),
1828
1833
  items: zt.value
1829
- }, null, 8, ["modelValue", "items"]), a("div", js, [h(ie, {
1834
+ }, null, 8, ["modelValue", "items"]), a("div", Ts, [h(ie, {
1830
1835
  modelValue: se.value,
1831
1836
  "onUpdate:modelValue": s[1] || (s[1] = (p) => se.value = p),
1832
1837
  "show-predefined-range": "",
@@ -1838,7 +1843,7 @@ const Ds = {
1838
1843
  icon: "calendar_month"
1839
1844
  }, null, 8, ["label"])]),
1840
1845
  _: 1
1841
- }, 8, ["modelValue", "predefined-range"]), q.value ? M("", !0) : (f(), v("div", Vs, [h(Fe, {
1846
+ }, 8, ["modelValue", "predefined-range"]), q.value ? M("", !0) : (f(), v("div", Ps, [h(Fe, {
1842
1847
  modelValue: fe.value,
1843
1848
  "onUpdate:modelValue": s[2] || (s[2] = (p) => fe.value = p),
1844
1849
  items: Wt.value,
@@ -1847,7 +1852,7 @@ const Ds = {
1847
1852
  placeholder: u(o)("auditLog.filter.user_placeholder"),
1848
1853
  "selected-prefix": u(o)("auditLog.filter.selected_user_prefix"),
1849
1854
  "chip-icon": "account_circle"
1850
- }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])), q.value ? M("", !0) : (f(), v("div", $s, [h(Fe, {
1855
+ }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])), q.value ? M("", !0) : (f(), v("div", Vs, [h(Fe, {
1851
1856
  modelValue: Q.value,
1852
1857
  "onUpdate:modelValue": s[3] || (s[3] = (p) => Q.value = p),
1853
1858
  items: eo.value,
@@ -1857,7 +1862,7 @@ const Ds = {
1857
1862
  placeholder: u(o)("auditLog.filter.subject_placeholder"),
1858
1863
  "selected-prefix": u(o)("auditLog.filter.selected_subject_prefix"),
1859
1864
  "chip-icon": "badge"
1860
- }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])), a("div", Ps, [h(Fe, {
1865
+ }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])), a("div", $s, [h(Fe, {
1861
1866
  modelValue: ne.value,
1862
1867
  "onUpdate:modelValue": s[4] || (s[4] = (p) => ne.value = p),
1863
1868
  items: oo.value,
@@ -1891,7 +1896,7 @@ const Ds = {
1891
1896
  class: "ml-auto w-[280px]",
1892
1897
  placeholder: u(o)("auditLog.search.placeholder")
1893
1898
  }, null, 8, ["modelValue", "placeholder"])])]), h(Wo, null, {
1894
- default: Y(() => [a("div", Ns, [h(Qo, {
1899
+ default: Y(() => [a("div", Ns, [h(Zo, {
1895
1900
  "is-loading": g.value,
1896
1901
  "is-empty": O.value.length === 0,
1897
1902
  title: u(o)("auditLog.noData.title"),
@@ -1907,12 +1912,12 @@ const Ds = {
1907
1912
  "fetch-fn": ko,
1908
1913
  "hide-footer": mt.value <= 1,
1909
1914
  loading: g.value,
1910
- "expanded-state": P.value,
1915
+ "expanded-state": $.value,
1911
1916
  "get-row-can-expand": yo,
1912
1917
  "get-sub-row": bo,
1913
1918
  "pin-header-row": "",
1914
1919
  class: "audit-log-list-table cursor-pointer",
1915
- "onUpdate:expandedState": s[8] || (s[8] = (p) => P.value = p),
1920
+ "onUpdate:expandedState": s[8] || (s[8] = (p) => $.value = p),
1916
1921
  onRowClick: s[9] || (s[9] = (p) => So(p.original))
1917
1922
  }, null, 8, ["column-defs", "row-data", "page-count", "row-count", "hide-footer", "loading", "expanded-state"]))]),
1918
1923
  _: 1
@@ -1922,7 +1927,7 @@ const Ds = {
1922
1927
  _: 1
1923
1928
  }, 8, ["heading"]), h(Ie, {
1924
1929
  header: u(o)("auditLog.detail.header"),
1925
- "model-value": V.value,
1930
+ "model-value": P.value,
1926
1931
  "max-width": 768,
1927
1932
  "dismiss-away": "",
1928
1933
  "onUpdate:modelValue": s[10] || (s[10] = (p) => {
@@ -1939,7 +1944,7 @@ const Ds = {
1939
1944
  variant: kt(i.value.outcome),
1940
1945
  label: Qe(i.value.outcome),
1941
1946
  compact: ""
1942
- }, null, 8, ["variant", "label"]), u(Tt)(i.value) ? (f(), Ce(tt, {
1947
+ }, null, 8, ["variant", "label"]), u(jt)(i.value) ? (f(), Ce(tt, {
1943
1948
  key: 0,
1944
1949
  variant: "plain",
1945
1950
  placement: "top"
@@ -1957,10 +1962,10 @@ const Ds = {
1957
1962
  class: "border-fm-color-border-default"
1958
1963
  }, null, -1)), a("div", ya, [a("div", null, [a("p", ba, l(u(o)("auditLog.detail.resolvedFrom")), 1), a("p", _a, l(fo(i.value.metadata.resolvedFrom)), 1)]), (i.value.metadata.resolvedFrom === "permissionSet" || i.value.metadata.resolvedFrom === "systemPermissionSet") && (i.value.metadata.permissionSetName || i.value.metadata.permissionSetId) ? (f(), v("div", xa, [a("p", La, l(u(o)("auditLog.detail.permissionSet")), 1), i.value.metadata.permissionSetName ? (f(), v("p", ka, l(i.value.metadata.permissionSetName), 1)) : M("", !0), i.value.metadata.permissionSetId ? (f(), v("p", Sa, l(i.value.metadata.permissionSetId), 1)) : M("", !0)])) : M("", !0), i.value.metadata.reason ? (f(), v("div", wa, [a("p", Ia, l(u(o)("auditLog.detail.reason")), 1), a("p", Aa, l(i.value.metadata.reason), 1)])) : M("", !0), a("div", null, [a("p", Fa, l(u(o)("auditLog.detail.requestMethod")), 1), a("p", Ma, l(mo(i.value)), 1)]), a("div", null, [a("p", Da, l(u(o)("auditLog.detail.requestPath")), 1), a("p", Oa, l(i.value.metadata.requestPath || "-"), 1)]), i.value.metadata.pos ? (f(), v(z, {
1959
1964
  key: 2
1960
- }, [a("div", null, [a("p", Ca, l(u(o)("auditLog.pos.details.eventKey")), 1), a("p", Ta, l(i.value.eventKey || "-"), 1)]), a("div", null, [a("p", ja, l(u(o)("auditLog.columns.device")), 1), a("p", Va, l(u(lt)(i.value, u(o))), 1), i.value.metadata.pos.machineId ? (f(), v("p", $a, l(i.value.metadata.pos.machineId), 1)) : M("", !0)]), i.value.metadata.pos.appVersion ? (f(), v("div", Pa, [a("p", Ea, l(u(o)("auditLog.pos.details.appVersion")), 1), a("p", Ra, l(i.value.metadata.pos.appVersion), 1)])) : M("", !0), a("div", null, [a("p", Na, l(u(o)("auditLog.columns.approver")), 1), a("p", Ua, l(u(jt)(i.value, u(o))), 1)]), a("div", null, [a("p", Ka, l(u(o)("auditLog.pos.details.clock")), 1), a("p", Ba, [ye(l(Xe(new Date(i.value.metadata.pos.occurredAt))) + " · " + l(i.value.metadata.pos.clockSkewMs) + " ms", 1), i.value.metadata.pos.clockClamped ? (f(), v("span", Ya, " · " + l(u(o)("auditLog.pos.details.clamped")), 1)) : M("", !0)])]), i.value.params ? (f(), v("div", za, [a("p", qa, l(u(o)("auditLog.pos.details.params")), 1), a("pre", Ja, l(i.value.params), 1)])) : M("", !0)], 64)) : M("", !0), i.value.metadata.trace && i.value.metadata.trace.length > 0 ? (f(), v("div", Ha, [a("p", Wa, l(u(o)("auditLog.detail.permissionTrace")), 1), a("ol", Ga, [(f(!0), v(z, null, ce(i.value.metadata.trace, (p, $) => (f(), v("li", {
1961
- key: $,
1965
+ }, [a("div", null, [a("p", Ca, l(u(o)("auditLog.pos.details.eventKey")), 1), a("p", ja, l(i.value.eventKey || "-"), 1)]), a("div", null, [a("p", Ta, l(u(o)("auditLog.columns.device")), 1), a("p", Pa, l(u(lt)(i.value, u(o))), 1), i.value.metadata.pos.machineId ? (f(), v("p", Va, l(i.value.metadata.pos.machineId), 1)) : M("", !0)]), i.value.metadata.pos.appVersion ? (f(), v("div", $a, [a("p", Ea, l(u(o)("auditLog.pos.details.appVersion")), 1), a("p", Ra, l(i.value.metadata.pos.appVersion), 1)])) : M("", !0), a("div", null, [a("p", Na, l(u(o)("auditLog.columns.approver")), 1), a("p", Ua, l(u(Tt)(i.value, u(o))), 1)]), a("div", null, [a("p", Ka, l(u(o)("auditLog.pos.details.clock")), 1), a("p", Ba, [ye(l(Xe(new Date(i.value.metadata.pos.occurredAt))) + " · " + l(i.value.metadata.pos.clockSkewMs) + " ms", 1), i.value.metadata.pos.clockClamped ? (f(), v("span", Ya, " · " + l(u(o)("auditLog.pos.details.clamped")), 1)) : M("", !0)])]), i.value.params ? (f(), v("div", za, [a("p", qa, l(u(o)("auditLog.pos.details.params")), 1), a("pre", Ja, l(i.value.params), 1)])) : M("", !0)], 64)) : M("", !0), i.value.metadata.trace && i.value.metadata.trace.length > 0 ? (f(), v("div", Ha, [a("p", Wa, l(u(o)("auditLog.detail.permissionTrace")), 1), a("ol", Ga, [(f(!0), v(z, null, ce(i.value.metadata.trace, (p, V) => (f(), v("li", {
1966
+ key: V,
1962
1967
  class: "flex items-center gap-6"
1963
- }, [a("span", Xa, l($ + 1), 1), a("span", Qa, l(p), 1), $ < i.value.metadata.trace.length - 1 ? (f(), v("span", Za, "→")) : M("", !0)]))), 128))])])) : M("", !0), F.value ? (f(), v("div", en, [a("p", tn, l(u(o)("auditLog.detail.requestBody")), 1), a("pre", on, l(F.value), 1)])) : M("", !0)])])])) : M("", !0)]),
1968
+ }, [a("span", Xa, l(V + 1), 1), a("span", Qa, l(p), 1), V < i.value.metadata.trace.length - 1 ? (f(), v("span", Za, "→")) : M("", !0)]))), 128))])])) : M("", !0), F.value ? (f(), v("div", en, [a("p", tn, l(u(o)("auditLog.detail.requestBody")), 1), a("pre", on, l(F.value), 1)])) : M("", !0)])])])) : M("", !0)]),
1964
1969
  _: 1
1965
1970
  }, 8, ["header", "model-value"]), h(Ie, {
1966
1971
  header: u(o)("auditLog.operation.sheetHeader"),
@@ -1979,8 +1984,8 @@ const Ds = {
1979
1984
  ms: m.value.durationMs
1980
1985
  })), 1)])) : M("", !0)])]), m.value.status === "failed" ? (f(), v("div", bn, [a("p", _n, l(u(o)("auditLog.operation.error")), 1), a("p", xn, l(m.value.errorMessage || "-"), 1)])) : M("", !0), a("div", Ln, [a("div", kn, [a("p", Sn, l(u(o)("auditLog.operation.changes")), 1)]), s[17] || (s[17] = a("hr", {
1981
1986
  class: "border-fm-color-border-default"
1982
- }, null, -1)), a("div", wn, [H.value.length ? (f(), v("div", In, [(f(!0), v(z, null, ce(H.value, (p, $) => (f(), v("div", {
1983
- key: $,
1987
+ }, null, -1)), a("div", wn, [H.value.length ? (f(), v("div", In, [(f(!0), v(z, null, ce(H.value, (p, V) => (f(), v("div", {
1988
+ key: V,
1984
1989
  class: "space-y-4 py-8 first:pt-0 last:pb-0"
1985
1990
  }, [a("div", An, [h(R, {
1986
1991
  variant: xe(p.type),
@@ -1990,21 +1995,21 @@ const Ds = {
1990
1995
  key: 2
1991
1996
  }, [a("span", Cn, l(p.beforeDisplay), 1), s[15] || (s[15] = a("span", {
1992
1997
  class: "text-fm-color-typo-secondary"
1993
- }, " → ", -1)), a("span", Tn, l(p.afterDisplay), 1)], 64))])]))), 128))])) : ft.value.length ? (f(), v("div", jn, [(f(!0), v(z, null, ce(ft.value, (p) => (f(), v("div", {
1998
+ }, " → ", -1)), a("span", jn, l(p.afterDisplay), 1)], 64))])]))), 128))])) : ft.value.length ? (f(), v("div", Tn, [(f(!0), v(z, null, ce(ft.value, (p) => (f(), v("div", {
1994
1999
  key: p.groupKey,
1995
2000
  class: "space-y-4 py-8 first:pt-0 last:pb-0"
1996
- }, [a("div", Vn, [h(R, {
1997
- variant: je(p.type),
2001
+ }, [a("div", Pn, [h(R, {
2002
+ variant: Te(p.type),
1998
2003
  label: ct(p.type),
1999
2004
  compact: ""
2000
- }, null, 8, ["variant", "label"]), a("span", $n, l(p.displayKey), 1)]), a("div", Pn, [(f(!0), v(z, null, ce(p.rows, ($) => (f(), v("p", {
2001
- key: $.path,
2005
+ }, null, 8, ["variant", "label"]), a("span", Vn, l(p.displayKey), 1)]), a("div", $n, [(f(!0), v(z, null, ce(p.rows, (V) => (f(), v("p", {
2006
+ key: V.path,
2002
2007
  class: "break-all font-mono text-xs"
2003
- }, [$.type === "added" ? (f(), v("span", En, l($.after ?? "—"), 1)) : $.type === "removed" ? (f(), v("span", Rn, l($.before ?? "—"), 1)) : (f(), v(z, {
2008
+ }, [V.type === "added" ? (f(), v("span", En, l(V.after ?? "—"), 1)) : V.type === "removed" ? (f(), v("span", Rn, l(V.before ?? "—"), 1)) : (f(), v(z, {
2004
2009
  key: 2
2005
- }, [a("span", Nn, l($.before ?? "—"), 1), s[16] || (s[16] = a("span", {
2010
+ }, [a("span", Nn, l(V.before ?? "—"), 1), s[16] || (s[16] = a("span", {
2006
2011
  class: "text-fm-color-typo-secondary"
2007
- }, " → ", -1)), a("span", Un, l($.after ?? "—"), 1)], 64))]))), 128))])]))), 128))])) : (f(), v("p", Kn, l(u(o)("auditLog.operation.noChanges")), 1))])]), U.value || I.value ? (f(), v("div", Bn, [a("button", {
2012
+ }, " → ", -1)), a("span", Un, l(V.after ?? "—"), 1)], 64))]))), 128))])]))), 128))])) : (f(), v("p", Kn, l(u(o)("auditLog.operation.noChanges")), 1))])]), U.value || I.value ? (f(), v("div", Bn, [a("button", {
2008
2013
  type: "button",
2009
2014
  class: "flex w-full items-center justify-between p-12 text-left",
2010
2015
  onClick: s[11] || (s[11] = (p) => X.value = !X.value)