@feedmepos/mf-hrm-portal 2.1.1-dev.5 → 2.1.1-dev.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/dist/ApprovalCodeList-CQApO-t4.js +728 -0
  2. package/dist/{AuditLogList-CXUkbDyT.js → AuditLogList-DH2ZvAVE.js} +244 -240
  3. package/dist/ConditionFormHost.vue_vue_type_script_setup_true_lang-B5OgqCR0.js +387 -0
  4. package/dist/EmployeeList-B1Q4RH2r.js +883 -0
  5. package/dist/{GrantUserList-DKP4MBQM.js → GrantUserList-DURXYzRs.js} +140 -137
  6. package/dist/{Main-CyCfz4ka.js → Main-B06aoNy1.js} +1033 -1029
  7. package/dist/{Main-Cz1pfe2k.js → Main-BC7IPhbz.js} +7 -7
  8. package/dist/Main-BRrcfqXc.js +121 -0
  9. package/dist/PermissionSetList-CiVFvnlW.js +393 -0
  10. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BAmLIGEn.js +4122 -0
  11. package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_a439fdd8_lang-BJp9hEfv.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DVVSBIx2.js} +1 -0
  12. package/dist/ResponsiveFabButton.vue_vue_type_script_setup_true_lang-QrqYEy8i.js +42 -0
  13. package/dist/RoleList-BVFWURdS.js +685 -0
  14. package/dist/TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js +37 -0
  15. package/dist/TeamMemberList-DlurP2WR.js +1215 -0
  16. package/dist/{TimesheetList-s_bP5OGA.js → TimesheetList-C4G2Va4m.js} +118 -112
  17. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_91afda4e_lang-BCLv-2Re.js → TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-BJujYg6e.js} +2 -2
  18. package/dist/{app-BP0oihBR.js → app-CGL_lSgW.js} +5073 -2360
  19. package/dist/app.js +1 -1
  20. package/dist/{dayjs.min-BTSZLci9.js → dayjs.min-BXDtus8O.js} +1 -1
  21. package/dist/{employee-BPv1j6T4.js → employee-CVZUQI_y.js} +3 -3
  22. package/dist/{iteration-BNA1cEos.js → iteration-BXcl549C.js} +1 -1
  23. package/dist/{lodash-DKG9IyB-.js → lodash-CmrNrQXn.js} +1 -1
  24. package/dist/{role-BS3LFO8u.js → role-Ct8MPQeS.js} +1 -1
  25. package/dist/rule-M8SC_Jhl.js +1058 -0
  26. package/dist/src/components/CheckboxInput.vue.d.ts +1 -1
  27. package/dist/src/components/button/ResponsiveFabButton.vue.d.ts +7 -1
  28. package/dist/src/components/table/TableEmptyState.vue.d.ts +7 -15
  29. package/dist/src/composables/useBasePermission.d.ts +2 -1
  30. package/dist/src/composables/useConditionDraft.d.ts +40 -0
  31. package/dist/src/composables/useCoverConditionOverride.d.ts +61 -0
  32. package/dist/src/helpers/business-timezone.d.ts +22 -0
  33. package/dist/src/helpers/filter.d.ts +15 -0
  34. package/dist/src/helpers/permission-reconcile.d.ts +15 -0
  35. package/dist/src/helpers/permission-reconcile.test.d.ts +1 -0
  36. package/dist/src/helpers/permission-set.d.ts +8 -4
  37. package/dist/src/helpers/rule.d.ts +2 -1
  38. package/dist/src/stores/permission-set.d.ts +12 -3
  39. package/dist/src/types/approval-code.d.ts +29 -48
  40. package/dist/src/views/hr/employee/EmployeeList.vue.d.ts +1 -0
  41. package/dist/src/views/team/components/BasePermission.vue.d.ts +13 -0
  42. package/dist/src/views/team/condition-builders/ConditionFormHost.vue.d.ts +22 -0
  43. package/dist/src/views/team/condition-builders/ConditionFormRenderer.vue.d.ts +23 -0
  44. package/dist/src/views/team/condition-builders/component-map.d.ts +4 -0
  45. package/dist/src/views/team/condition-builders/condition-form-dedupe.d.ts +23 -0
  46. package/dist/src/views/team/locales/index.d.ts +80 -0
  47. package/dist/style.css +1 -1
  48. package/dist/tsconfig.app.tsbuildinfo +1 -1
  49. package/dist/{useReportPermissions-J3-DjopO.js → useReportPermissions-COONOIe1.js} +3 -3
  50. package/package.json +2 -2
  51. package/dist/ApprovalCodeList-CXJyMKEg.js +0 -757
  52. package/dist/CollapsibleWrapper.vue_vue_type_script_setup_true_lang-BLJlmPVa.js +0 -58
  53. package/dist/EmployeeList-BSfUFTcN.js +0 -899
  54. package/dist/Main-CblWfQk_.js +0 -122
  55. package/dist/PermissionSetList-BwyblSeE.js +0 -357
  56. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BJ-PZ2Nv.js +0 -3458
  57. package/dist/ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js +0 -38
  58. package/dist/RoleList-CXYgCmHp.js +0 -567
  59. package/dist/TeamMemberList-CnLbqaPS.js +0 -1131
  60. package/dist/rule-DaSLVZWm.js +0 -996
@@ -1,15 +1,15 @@
1
- import { defineComponent as Xe, ref as f, computed as h, onMounted as Vt, onBeforeUnmount as Et, watch as Q, resolveComponent as C, createElementBlock as M, openBlock as y, createBlock as Z, createCommentVNode as N, createElementVNode as a, Fragment as ee, renderList as re, withCtx as z, createVNode as p, toDisplayString as i, unref as n, nextTick as Rt } from "vue";
2
- import { d as x } from "./dayjs.min-BTSZLci9.js";
1
+ import { defineComponent as Xe, ref as f, computed as h, onMounted as Vt, onBeforeUnmount as Et, watch as Q, resolveComponent as C, createElementBlock as M, openBlock as y, createBlock as he, createCommentVNode as N, createElementVNode as a, Fragment as Z, renderList as ie, withCtx as Y, createVNode as b, toDisplayString as u, unref as i, nextTick as Rt } from "vue";
2
+ import { d as x } from "./dayjs.min-BXDtus8O.js";
3
3
  import { useI18n as Qe, useCoreStore as Ct } from "@feedmepos/mf-common";
4
- import { G as He, _ as Ut } from "./app-BP0oihBR.js";
4
+ import { G as He, _ as Ut } from "./app-CGL_lSgW.js";
5
5
  import { components as We } from "@feedmepos/ui-library";
6
6
  import { g as Ae, b as Fe } from "./restaurant-YOVMuuFY.js";
7
- import { S as be, _ as $t } from "./SelectFilter-ATOm0hdn.js";
7
+ import { S as ge, _ as $t } from "./SelectFilter-ATOm0hdn.js";
8
8
  import { _ as Nt } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
9
- import { _ as Yt } from "./index.vue_vue_type_script_setup_true_lang-BVVwfd7B.js";
10
- import { t as Bt, p as Je } from "./rule-DaSLVZWm.js";
9
+ import { _ as Yt } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
10
+ import { t as Bt, p as Je } from "./rule-M8SC_Jhl.js";
11
11
  import { defineStore as Kt } from "pinia";
12
- const ue = [
12
+ const ne = [
13
13
  { key: "all", label: "All", subjectPrefixes: [] },
14
14
  { key: "inventory", label: "Inventory", subjectPrefixes: ["business::inventory", "inventory"] },
15
15
  { key: "report", label: "Report", subjectPrefixes: ["business::report", "report"] },
@@ -19,7 +19,7 @@ const ue = [
19
19
  { key: "crm", label: "CRM", subjectPrefixes: ["business::crm", "crm"] }
20
20
  // Add more as modules are revamped with new actionguard:
21
21
  // { key: 'restaurantOperation', label: 'Restaurant Operation', subjectPrefixes: ['restaurant'] },
22
- ], Me = "/audit-logs", pe = {
22
+ ], Me = "/audit-logs", be = {
23
23
  async count(l) {
24
24
  var L, j, I, w, s;
25
25
  const o = {
@@ -39,7 +39,7 @@ const ue = [
39
39
  const P = new URLSearchParams();
40
40
  for (const [v, A] of Object.entries(D))
41
41
  if (Array.isArray(A))
42
- for (const Y of A) P.append(v, String(Y));
42
+ for (const B of A) P.append(v, String(B));
43
43
  else A != null && P.append(v, String(A));
44
44
  return P.toString();
45
45
  }
@@ -103,14 +103,14 @@ const ue = [
103
103
  setup(l, { emit: o }) {
104
104
  const c = l, L = o, { t: j } = Qe(), I = f(!1), w = f(null), s = f(null), D = f([]), P = f(0), v = f(0);
105
105
  let A = null;
106
- async function Y() {
106
+ async function B() {
107
107
  if (await Rt(), !s.value) return;
108
108
  const m = s.value.querySelectorAll("[data-tab-measure]");
109
109
  D.value = Array.from(m).map((k) => k.offsetWidth);
110
110
  const _ = s.value.querySelector("[data-more-measure]");
111
111
  P.value = (_ == null ? void 0 : _.offsetWidth) ?? 0;
112
112
  }
113
- const ye = h(() => {
113
+ const _e = h(() => {
114
114
  const m = c.items.length;
115
115
  if (m === 0) return 0;
116
116
  if (!v.value || D.value.length !== m) return m;
@@ -122,25 +122,25 @@ const ue = [
122
122
  O += _[d], T++;
123
123
  return T;
124
124
  }), J = h(() => {
125
- const m = ye.value, _ = c.items.length;
125
+ const m = _e.value, _ = c.items.length;
126
126
  if (m >= _) return [...c.items];
127
127
  const k = c.items.slice(0, m), S = c.items.find((E) => E.value === c.modelValue);
128
128
  if (!S || k.some((E) => E.value === S.value)) return k;
129
129
  if (m === 0) return [S];
130
130
  const O = c.items.findIndex((E) => E.value === S.value), T = D.value, d = P.value, H = T[O] ?? 0;
131
- let $ = m, oe = T.slice(0, $ - 1).reduce((E, ae) => E + ae, 0);
132
- for (; $ > 1 && oe + H + d > v.value; )
133
- $--, oe = T.slice(0, $ - 1).reduce((E, ae) => E + ae, 0);
131
+ let $ = m, le = T.slice(0, $ - 1).reduce((E, oe) => E + oe, 0);
132
+ for (; $ > 1 && le + H + d > v.value; )
133
+ $--, le = T.slice(0, $ - 1).reduce((E, oe) => E + oe, 0);
134
134
  return [...c.items.slice(0, Math.max($ - 1, 0)), S];
135
- }), te = h(() => {
135
+ }), ee = h(() => {
136
136
  const m = new Set(J.value.map((_) => _.value));
137
137
  return c.items.filter((_) => !m.has(_.value));
138
138
  });
139
- function le(m) {
139
+ function te(m) {
140
140
  I.value = !1, L("update:modelValue", m);
141
141
  }
142
142
  return Vt(async () => {
143
- await Y(), w.value && (v.value = w.value.clientWidth, A = new ResizeObserver(() => {
143
+ await B(), w.value && (v.value = w.value.clientWidth, A = new ResizeObserver(() => {
144
144
  w.value && (v.value = w.value.clientWidth);
145
145
  }), A.observe(w.value));
146
146
  }), Et(() => {
@@ -148,7 +148,7 @@ const ue = [
148
148
  }), Q(
149
149
  () => c.items,
150
150
  () => {
151
- Y();
151
+ B();
152
152
  },
153
153
  { deep: !0 }
154
154
  ), (m, _) => {
@@ -158,35 +158,35 @@ const ue = [
158
158
  ref: w,
159
159
  class: "relative flex w-full flex-row items-center"
160
160
  }, [
161
- (y(!0), M(ee, null, re(J.value, (d) => (y(), Z(k, {
161
+ (y(!0), M(Z, null, ie(J.value, (d) => (y(), he(k, {
162
162
  key: d.value,
163
163
  "model-value": l.modelValue,
164
164
  label: d.label,
165
165
  badge: d.badge,
166
166
  disabled: d.disabled,
167
167
  value: d.value,
168
- "onUpdate:modelValue": le
168
+ "onUpdate:modelValue": te
169
169
  }, null, 8, ["model-value", "label", "badge", "disabled", "value"]))), 128)),
170
- te.value.length > 0 ? (y(), Z(T, {
170
+ ee.value.length > 0 ? (y(), he(T, {
171
171
  key: 0,
172
172
  "show-menu": I.value,
173
173
  class: "max-w-[360px] min-w-[90px] rounded-sm",
174
174
  placement: "bottom-start",
175
175
  onMenuChanged: _[0] || (_[0] = (d) => I.value = d)
176
176
  }, {
177
- "menu-button": z(() => [
177
+ "menu-button": Y(() => [
178
178
  a("div", zt, [
179
- p(S, { name: "more_vert" }),
180
- a("span", qt, i(n(j)("auditLog.modules.more")), 1)
179
+ b(S, { name: "more_vert" }),
180
+ a("span", qt, u(i(j)("auditLog.modules.more")), 1)
181
181
  ])
182
182
  ]),
183
- default: z(() => [
184
- (y(!0), M(ee, null, re(te.value, (d) => (y(), Z(O, {
183
+ default: Y(() => [
184
+ (y(!0), M(Z, null, ie(ee.value, (d) => (y(), he(O, {
185
185
  key: d.value,
186
186
  "model-value": l.modelValue === d.value,
187
187
  label: d.label,
188
188
  disabled: d.disabled,
189
- onClick: (H) => le(d.value)
189
+ onClick: (H) => te(d.value)
190
190
  }, null, 8, ["model-value", "label", "disabled", "onClick"]))), 128))
191
191
  ]),
192
192
  _: 1
@@ -197,11 +197,11 @@ const ue = [
197
197
  "aria-hidden": "true",
198
198
  class: "pointer-events-none invisible absolute -left-[9999px] -top-[9999px] flex flex-row items-center"
199
199
  }, [
200
- (y(!0), M(ee, null, re(l.items, (d) => (y(), M("div", {
200
+ (y(!0), M(Z, null, ie(l.items, (d) => (y(), M("div", {
201
201
  key: `measure-${d.value}`,
202
202
  "data-tab-measure": ""
203
203
  }, [
204
- p(k, {
204
+ b(k, {
205
205
  "model-value": l.modelValue,
206
206
  label: d.label,
207
207
  badge: d.badge,
@@ -210,8 +210,8 @@ const ue = [
210
210
  }, null, 8, ["model-value", "label", "badge", "disabled", "value"])
211
211
  ]))), 128)),
212
212
  a("div", Ht, [
213
- p(S, { name: "more_vert" }),
214
- a("span", Wt, i(n(j)("auditLog.modules.more")), 1)
213
+ b(S, { name: "more_vert" }),
214
+ a("span", Wt, u(i(j)("auditLog.modules.more")), 1)
215
215
  ])
216
216
  ], 512)
217
217
  ], 512);
@@ -263,120 +263,122 @@ const ue = [
263
263
  }, sl = {
264
264
  class: "w-fit"
265
265
  }, nl = {
266
+ class: "flex h-full flex-col overflow-auto"
267
+ }, ul = {
266
268
  key: 0,
267
269
  class: "space-y-12 p-4 text-sm"
268
- }, ul = {
269
- class: "flex items-start justify-between gap-8 rounded-lg border border-fm-color-border-default p-12"
270
270
  }, il = {
271
- class: "min-w-0 flex-1"
271
+ class: "flex items-start justify-between gap-8 rounded-lg border border-fm-color-border-default p-12"
272
272
  }, rl = {
273
- class: "audit-log-operation-label-detail text-base font-bold leading-snug text-fm-color-typo-primary"
273
+ class: "min-w-0 flex-1"
274
274
  }, dl = {
275
- class: "rounded-lg border border-fm-color-border-default p-12"
275
+ class: "audit-log-operation-label-detail text-base font-bold leading-snug text-fm-color-typo-primary"
276
276
  }, cl = {
277
- class: "space-y-12"
277
+ class: "rounded-lg border border-fm-color-border-default p-12"
278
278
  }, ml = {
279
- class: "text-xs text-fm-color-typo-secondary"
279
+ class: "space-y-12"
280
280
  }, fl = {
281
- class: "font-semibold"
282
- }, vl = {
283
281
  class: "text-xs text-fm-color-typo-secondary"
284
- }, gl = {
282
+ }, vl = {
285
283
  class: "font-semibold"
286
- }, bl = {
284
+ }, gl = {
287
285
  class: "text-xs text-fm-color-typo-secondary"
286
+ }, bl = {
287
+ class: "font-semibold"
288
288
  }, pl = {
289
- class: "break-all font-semibold"
289
+ class: "text-xs text-fm-color-typo-secondary"
290
290
  }, hl = {
291
+ class: "break-all font-semibold"
292
+ }, _l = {
291
293
  key: 0
292
294
  }, yl = {
293
295
  class: "text-xs text-fm-color-typo-secondary"
294
- }, _l = {
295
- class: "break-all font-mono text-xs font-semibold"
296
296
  }, xl = {
297
- class: "text-xs text-fm-color-typo-secondary"
298
- }, Ll = {
299
297
  class: "break-all font-mono text-xs font-semibold"
300
- }, Sl = {
298
+ }, Ll = {
301
299
  class: "text-xs text-fm-color-typo-secondary"
300
+ }, Sl = {
301
+ class: "break-all font-mono text-xs font-semibold"
302
302
  }, wl = {
303
- class: "font-semibold"
303
+ class: "text-xs text-fm-color-typo-secondary"
304
304
  }, kl = {
305
- class: "rounded-lg border border-fm-color-border-default"
305
+ class: "font-semibold"
306
306
  }, Il = {
307
- class: "p-12"
307
+ class: "rounded-lg border border-fm-color-border-default"
308
308
  }, Al = {
309
- class: "text-base font-bold text-fm-color-typo-primary"
309
+ class: "p-12"
310
310
  }, Fl = {
311
- class: "space-y-12 p-12"
311
+ class: "text-base font-bold text-fm-color-typo-primary"
312
312
  }, Ml = {
313
- class: "text-xs text-fm-color-typo-secondary"
313
+ class: "space-y-12 p-12"
314
314
  }, Dl = {
315
- class: "font-semibold"
315
+ class: "text-xs text-fm-color-typo-secondary"
316
316
  }, Ol = {
317
- class: "rounded-lg border border-fm-color-border-default"
317
+ class: "font-semibold"
318
318
  }, Tl = {
319
- class: "p-12"
319
+ class: "rounded-lg border border-fm-color-border-default"
320
320
  }, jl = {
321
- class: "text-base font-bold text-fm-color-typo-primary"
321
+ class: "p-12"
322
322
  }, Pl = {
323
- class: "space-y-12 p-12"
323
+ class: "text-base font-bold text-fm-color-typo-primary"
324
324
  }, Vl = {
325
- class: "text-xs text-fm-color-typo-secondary"
325
+ class: "space-y-12 p-12"
326
326
  }, El = {
327
- class: "font-semibold"
327
+ class: "text-xs text-fm-color-typo-secondary"
328
328
  }, Rl = {
329
- key: 0
329
+ class: "font-semibold"
330
330
  }, Cl = {
331
- class: "text-xs text-fm-color-typo-secondary"
331
+ key: 0
332
332
  }, Ul = {
333
+ class: "text-xs text-fm-color-typo-secondary"
334
+ }, $l = {
333
335
  key: 0,
334
336
  class: "font-semibold"
335
- }, $l = {
337
+ }, Nl = {
336
338
  key: 1,
337
339
  class: "break-all font-mono text-xs text-fm-color-typo-secondary"
338
- }, Nl = {
339
- key: 1
340
340
  }, Yl = {
341
- class: "text-xs text-fm-color-typo-secondary"
341
+ key: 1
342
342
  }, Bl = {
343
- class: "font-semibold whitespace-pre-line"
344
- }, Kl = {
345
343
  class: "text-xs text-fm-color-typo-secondary"
344
+ }, Kl = {
345
+ class: "font-semibold whitespace-pre-line"
346
346
  }, zl = {
347
- class: "font-semibold"
348
- }, ql = {
349
347
  class: "text-xs text-fm-color-typo-secondary"
348
+ }, ql = {
349
+ class: "font-semibold"
350
350
  }, Hl = {
351
- class: "break-all font-mono text-xs font-semibold"
351
+ class: "text-xs text-fm-color-typo-secondary"
352
352
  }, Wl = {
353
- key: 2
353
+ class: "break-all font-mono text-xs font-semibold"
354
354
  }, Jl = {
355
- class: "text-xs text-fm-color-typo-secondary"
355
+ key: 2
356
356
  }, Gl = {
357
- class: "mt-4 space-y-4"
357
+ class: "text-xs text-fm-color-typo-secondary"
358
358
  }, Xl = {
359
- 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"
359
+ class: "mt-4 space-y-4"
360
360
  }, Ql = {
361
- class: "text-xs font-semibold"
361
+ 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"
362
362
  }, Zl = {
363
+ class: "text-xs font-semibold"
364
+ }, eo = {
363
365
  key: 0,
364
366
  class: "text-fm-color-typo-secondary"
365
- }, eo = {
366
- key: 3
367
367
  }, to = {
368
- class: "text-xs text-fm-color-typo-secondary"
368
+ key: 3
369
369
  }, lo = {
370
+ class: "text-xs text-fm-color-typo-secondary"
371
+ }, oo = {
370
372
  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"
371
- }, ie = 100, De = 1e3, he = "__feedmeAdmin__", oo = "D MMM YYYY h:mm A", ao = "YYYY-MM-DD HH:mm", V = "YYYY-MM-DD", Ge = "audit-log-export-fields", so = /* @__PURE__ */ Xe({
373
+ }, ue = 100, De = 1e3, pe = "__feedmeAdmin__", ao = "D MMM YYYY h:mm A", so = "YYYY-MM-DD HH:mm", V = "YYYY-MM-DD", Ge = "audit-log-export-fields", no = /* @__PURE__ */ Xe({
372
374
  __name: "AuditLogList",
373
375
  setup(l) {
374
376
  const {
375
377
  t: o
376
378
  } = Qe(), c = Ct(), L = Gt(), j = f(!1), I = f(!1), w = f([]), s = f(null), D = f(!1);
377
379
  async function P(e) {
378
- const t = Uint8Array.from(atob(e), (r) => r.charCodeAt(0)), u = new DecompressionStream("gzip"), g = u.writable.getWriter();
379
- return await g.write(t), await g.close(), new Response(u.readable).text();
380
+ const t = Uint8Array.from(atob(e), (r) => r.charCodeAt(0)), n = new DecompressionStream("gzip"), g = n.writable.getWriter();
381
+ return await g.write(t), await g.close(), new Response(n.readable).text();
380
382
  }
381
383
  const v = f("");
382
384
  let A = 0;
@@ -395,9 +397,9 @@ const ue = [
395
397
  }
396
398
  if (e.startsWith("gzip:")) {
397
399
  try {
398
- const u = await P(e.slice(5));
400
+ const n = await P(e.slice(5));
399
401
  if (t !== A) return;
400
- v.value = JSON.stringify(JSON.parse(u), null, 2);
402
+ v.value = JSON.stringify(JSON.parse(n), null, 2);
401
403
  } catch {
402
404
  if (t !== A) return;
403
405
  v.value = e;
@@ -412,41 +414,41 @@ const ue = [
412
414
  }, {
413
415
  immediate: !0
414
416
  });
415
- const Y = f(1), ye = f(!1), J = f(0), te = h(() => Math.max(1, Math.ceil(J.value / ie))), le = x().format("YYYY-MM-DD"), m = f({
416
- startDate: `${le} 00:00`,
417
- endDate: `${le} 23:59`
417
+ const B = f(1), _e = f(!1), J = f(0), ee = h(() => Math.max(1, Math.ceil(J.value / ue))), te = x().format("YYYY-MM-DD"), m = f({
418
+ startDate: `${te} 00:00`,
419
+ endDate: `${te} 23:59`
418
420
  }), _ = f(), k = f(), S = f(), O = f(), T = f("all");
419
421
  function d(e) {
420
422
  return typeof e == "string" ? [e] : Array.isArray(e) ? e.filter((t) => typeof t == "string") : [];
421
423
  }
422
- const H = ue.filter((e) => e.key !== "all").map((e) => e.key);
424
+ const H = ne.filter((e) => e.key !== "all").map((e) => e.key);
423
425
  function $(e) {
424
- const t = ue.find((u) => u.key !== "all" && u.subjectPrefixes.some((g) => e.startsWith(g)));
426
+ const t = ne.find((n) => n.key !== "all" && n.subjectPrefixes.some((g) => e.startsWith(g)));
425
427
  return (t == null ? void 0 : t.key) ?? "other";
426
428
  }
427
- function oe(e) {
429
+ function le(e) {
428
430
  const t = H.indexOf(e);
429
431
  return t === -1 ? H.length : t;
430
432
  }
431
- const Oe = h(() => ue.map(({
433
+ const Oe = h(() => ne.map(({
432
434
  key: e
433
435
  }) => ({
434
436
  label: o(`auditLog.modules.${e}`),
435
437
  value: e
436
- }))), E = h(() => ue.find((e) => e.key === T.value) ?? ue[0]), ae = h(() => T.value === "all"), de = f([]), ce = f(!1), Ze = h(() => [...ce.value ? [{
438
+ }))), E = h(() => ne.find((e) => e.key === T.value) ?? ne[0]), oe = h(() => T.value === "all"), re = f([]), de = f(!1), Ze = h(() => [...de.value ? [{
437
439
  label: o("auditLog.user.feedmeAdmin"),
438
- value: he
440
+ value: pe
439
441
  }] : [], ...L.members.map((e) => ({
440
442
  label: e.name,
441
443
  value: e.doc.userId
442
- })), ...de.value.map((e) => ({
444
+ })), ...re.value.map((e) => ({
443
445
  label: `${e.name} (${o("auditLog.user.feedmeAdmin")})`,
444
446
  value: e.userId
445
- }))]), B = h(() => {
447
+ }))]), K = h(() => {
446
448
  const e = _.value ?? [];
447
449
  return {
448
- userIds: e.filter((t) => t !== he),
449
- feedmeAdminActors: e.includes(he)
450
+ userIds: e.filter((t) => t !== pe),
451
+ feedmeAdminActors: e.includes(pe)
450
452
  };
451
453
  }), Te = h(() => {
452
454
  const e = Je.flatMap((r) => d(r.subject).map((F) => ({
@@ -455,21 +457,21 @@ const ue = [
455
457
  }))), t = Object.entries(He).map(([r, F]) => ({
456
458
  label: F,
457
459
  value: r
458
- })), u = /* @__PURE__ */ new Set(), g = [];
460
+ })), n = /* @__PURE__ */ new Set(), g = [];
459
461
  for (const r of [...e, ...t])
460
- if (!u.has(r.value)) {
461
- u.add(r.value);
462
+ if (!n.has(r.value)) {
463
+ n.add(r.value);
462
464
  const F = $(r.value);
463
465
  g.push({
464
466
  ...r,
465
467
  group: o(`auditLog.modules.${F}`)
466
468
  });
467
469
  }
468
- return g.sort((r, F) => oe($(r.value)) - oe($(F.value)));
469
- }), et = h(() => ae.value ? Te.value : Te.value.filter((e) => $(e.value) === T.value));
470
+ return g.sort((r, F) => le($(r.value)) - le($(F.value)));
471
+ }), et = h(() => oe.value ? Te.value : Te.value.filter((e) => $(e.value) === T.value));
470
472
  function tt(e, t) {
471
- const u = t.toLowerCase();
472
- return e.label.toLowerCase().includes(u) || e.value.replace(/^business::/, "").toLowerCase().includes(u) ? !0 : e.value.toLowerCase().includes(u);
473
+ const n = t.toLowerCase();
474
+ return e.label.toLowerCase().includes(n) || e.value.replace(/^business::/, "").toLowerCase().includes(n) ? !0 : e.value.toLowerCase().includes(n);
473
475
  }
474
476
  const U = h(() => ({
475
477
  manage: o("auditLog.action.manage"),
@@ -492,28 +494,28 @@ const ue = [
492
494
  }, {
493
495
  label: U.value.delete,
494
496
  value: "delete"
495
- }]), me = h(() => ({
497
+ }]), ce = h(() => ({
496
498
  allowed: o("auditLog.outcome.success"),
497
499
  denied: o("auditLog.outcome.failed"),
498
500
  skipped: o("auditLog.outcome.skipped")
499
- })), _e = h(() => {
501
+ })), ye = h(() => {
500
502
  var e;
501
503
  return ((e = c.sessionUser.value) == null ? void 0 : e.isInternal) ?? !1;
502
504
  });
503
505
  function je(e) {
504
- return !_e.value && e === "skipped" ? "allowed" : e;
506
+ return !ye.value && e === "skipped" ? "allowed" : e;
505
507
  }
506
508
  function xe(e) {
507
- return !(e != null && e.length) || _e.value ? e : e.includes("allowed") ? [.../* @__PURE__ */ new Set([...e, "skipped"])] : e;
509
+ return !(e != null && e.length) || ye.value ? e : e.includes("allowed") ? [.../* @__PURE__ */ new Set([...e, "skipped"])] : e;
508
510
  }
509
511
  const ot = h(() => [{
510
- label: me.value.allowed,
512
+ label: ce.value.allowed,
511
513
  value: "allowed"
512
514
  }, {
513
- label: me.value.denied,
515
+ label: ce.value.denied,
514
516
  value: "denied"
515
- }, ..._e.value ? [{
516
- label: me.value.skipped,
517
+ }, ...ye.value ? [{
518
+ label: ce.value.skipped,
517
519
  value: "skipped"
518
520
  }] : []]), at = h(() => ({
519
521
  admin: o("auditLog.detail.resolvedFromValue.admin"),
@@ -534,15 +536,15 @@ const ue = [
534
536
  denied: "critical",
535
537
  skipped: "warning"
536
538
  };
537
- function fe(e) {
538
- return x(e).format(oo);
539
+ function me(e) {
540
+ return x(e).format(ao);
539
541
  }
540
542
  const ut = h(() => {
541
543
  const {
542
544
  startDate: e,
543
545
  endDate: t
544
546
  } = m.value;
545
- return e && t ? `${fe(e)} – ${fe(t)}` : e ? fe(e) : t ? fe(t) : o("auditLog.dateRange.placeholder");
547
+ return e && t ? `${me(e)} – ${me(t)}` : e ? me(e) : t ? me(t) : o("auditLog.dateRange.placeholder");
546
548
  }), it = h(() => [{
547
549
  label: o("date.predefinedRanges.today"),
548
550
  value: {
@@ -588,12 +590,12 @@ const ue = [
588
590
  }]);
589
591
  function Le(e) {
590
592
  var t;
591
- return ((t = Je.find((u) => u.subject === e)) == null ? void 0 : t.label) ?? He[e];
593
+ return ((t = Je.find((n) => n.subject === e)) == null ? void 0 : t.label) ?? He[e];
592
594
  }
593
- function ve(e) {
594
- var u;
595
+ function fe(e) {
596
+ var n;
595
597
  const t = L.userIdToName[e.userId];
596
- return t || (L.hasLoaded ? (u = c.sessionUser.value) != null && u.isInternal ? `${e.actorName ?? e.userId} (${o("auditLog.user.feedmeAdmin")})` : o("auditLog.user.feedmeAdmin") : e.userId);
598
+ return t || (L.hasLoaded ? (n = c.sessionUser.value) != null && n.isInternal ? `${e.actorName ?? e.userId} (${o("auditLog.user.feedmeAdmin")})` : o("auditLog.user.feedmeAdmin") : e.userId);
597
599
  }
598
600
  function Pe(e) {
599
601
  return L.userIdToPhone[e.userId] || "-";
@@ -617,7 +619,7 @@ const ue = [
617
619
  return Le(e.subject) ?? e.subject;
618
620
  }
619
621
  function Se(e) {
620
- return me.value[je(e)];
622
+ return ce.value[je(e)];
621
623
  }
622
624
  function Ce(e) {
623
625
  return nt[je(e)] ?? "neutral";
@@ -640,7 +642,7 @@ const ue = [
640
642
  }, {
641
643
  key: "userName",
642
644
  labelKey: "auditLog.exportFields.userName",
643
- getValue: (e) => ve(e),
645
+ getValue: (e) => fe(e),
644
646
  defaultSelected: !0
645
647
  }, {
646
648
  key: "userPhone",
@@ -733,22 +735,22 @@ const ue = [
733
735
  }
734
736
  }
735
737
  async function bt() {
736
- var e, t, u, g, r;
738
+ var e, t, n, g, r;
737
739
  if (!I.value) {
738
740
  I.value = !0;
739
741
  try {
740
742
  const {
741
743
  startDate: F,
742
- endDate: K
743
- } = m.value, W = E.value.subjectPrefixes, ge = (/* @__PURE__ */ new Date()).toISOString().slice(0, 19).replace("T", " "), se = K ? q(K) : null, b = se && se < ge ? se : ge, X = {
744
+ endDate: z
745
+ } = m.value, W = E.value.subjectPrefixes, ve = (/* @__PURE__ */ new Date()).toISOString().slice(0, 19).replace("T", " "), ae = z ? q(z) : null, p = ae && ae < ve ? ae : ve, X = {
744
746
  ...F ? {
745
747
  from: q(F)
746
748
  } : {},
747
- to: b,
748
- ...B.value.userIds.length ? {
749
- userIds: B.value.userIds
749
+ to: p,
750
+ ...K.value.userIds.length ? {
751
+ userIds: K.value.userIds
750
752
  } : {},
751
- ...B.value.feedmeAdminActors ? {
753
+ ...K.value.feedmeAdminActors ? {
752
754
  feedmeAdminActors: !0
753
755
  } : {},
754
756
  ...(e = k.value) != null && e.length ? {
@@ -760,13 +762,13 @@ const ue = [
760
762
  ...(t = O.value) != null && t.length ? {
761
763
  actions: O.value
762
764
  } : {},
763
- ...(u = S.value) != null && u.length ? {
765
+ ...(n = S.value) != null && n.length ? {
764
766
  outcomes: xe(S.value)
765
767
  } : {}
766
768
  }, Ye = [];
767
769
  let Be = 0;
768
770
  for (; ; ) {
769
- const R = await pe.read({
771
+ const R = await be.read({
770
772
  ...X,
771
773
  limit: De,
772
774
  offset: Be
@@ -774,11 +776,11 @@ const ue = [
774
776
  if (Ye.push(...R), R.length < De) break;
775
777
  Be += De;
776
778
  }
777
- const Ke = we.filter((R) => G.value.has(R.key)), wt = Ke.map((R) => o(R.labelKey)), kt = Ye.map((R) => Ke.map((Pt) => Pt.getValue(R) ?? "")), Ie = -(/* @__PURE__ */ new Date()).getTimezoneOffset(), It = Ie >= 0 ? "+" : "-", At = String(Math.floor(Math.abs(Ie) / 60)).padStart(2, "0"), Ft = String(Math.abs(Ie) % 60).padStart(2, "0"), Mt = `UTC${It}${At}:${Ft}`, ze = ((g = c.currentBusiness.value) == null ? void 0 : g.name) || "", Dt = [F, K].filter(Boolean).join(" – "), Ot = [...[[o("auditLog.title")], [`${o("auditLog.frontMatter.date")}: ${Dt}`], ...ze ? [[`${o("auditLog.frontMatter.business")}: ${ze}`]] : [], [`${o("auditLog.frontMatter.generatedBy")}: ${x().format("DD MMM YYYY, HH:mm")} (${Mt})`], []].map((R) => R.map(Ue).join(",")), ...[wt, ...kt].map((R) => R.map(Ue).join(","))].join(`
779
+ const Ke = we.filter((R) => G.value.has(R.key)), wt = Ke.map((R) => o(R.labelKey)), kt = Ye.map((R) => Ke.map((Pt) => Pt.getValue(R) ?? "")), Ie = -(/* @__PURE__ */ new Date()).getTimezoneOffset(), It = Ie >= 0 ? "+" : "-", At = String(Math.floor(Math.abs(Ie) / 60)).padStart(2, "0"), Ft = String(Math.abs(Ie) % 60).padStart(2, "0"), Mt = `UTC${It}${At}:${Ft}`, ze = ((g = c.currentBusiness.value) == null ? void 0 : g.name) || "", Dt = [F, z].filter(Boolean).join(" – "), Ot = [...[[o("auditLog.title")], [`${o("auditLog.frontMatter.date")}: ${Dt}`], ...ze ? [[`${o("auditLog.frontMatter.business")}: ${ze}`]] : [], [`${o("auditLog.frontMatter.generatedBy")}: ${x().format("DD MMM YYYY, HH:mm")} (${Mt})`], []].map((R) => R.map(Ue).join(",")), ...[wt, ...kt].map((R) => R.map(Ue).join(","))].join(`
778
780
  `), Tt = `audit-log_${(((r = c.currentBusiness.value) == null ? void 0 : r.name) || "business").replace(/[^a-z0-9_-]+/gi, "_")}_${x().format("YYYYMMDD_HHmmss")}.csv`, jt = new Blob([`\uFEFF${Ot}`], {
779
781
  type: "text/csv;charset=utf-8;"
780
- }), qe = window.URL.createObjectURL(jt), ne = document.createElement("a");
781
- ne.href = qe, ne.download = Tt, document.body.appendChild(ne), ne.click(), ne.remove(), window.URL.revokeObjectURL(qe);
782
+ }), qe = window.URL.createObjectURL(jt), se = document.createElement("a");
783
+ se.href = qe, se.download = Tt, document.body.appendChild(se), se.click(), se.remove(), window.URL.revokeObjectURL(qe);
782
784
  } finally {
783
785
  I.value = !1;
784
786
  }
@@ -797,17 +799,17 @@ const ue = [
797
799
  size: 220,
798
800
  cell(e) {
799
801
  const t = e.row.original;
800
- return p("div", {
802
+ return b("div", {
801
803
  class: "flex items-center gap-8"
802
- }, [p(We.FmAvatar, {
803
- name: ve(t),
804
+ }, [b(We.FmAvatar, {
805
+ name: fe(t),
804
806
  size: "sm",
805
807
  class: "shrink-0"
806
- }, null), p("div", {
808
+ }, null), b("div", {
807
809
  class: "min-w-0"
808
- }, [p("p", {
810
+ }, [b("p", {
809
811
  class: "truncate font-semibold"
810
- }, [ve(t)]), p("p", {
812
+ }, [fe(t)]), b("p", {
811
813
  class: "truncate text-fm-color-typo-secondary"
812
814
  }, [Pe(t)])])]);
813
815
  }
@@ -835,7 +837,7 @@ const ue = [
835
837
  enableSorting: !1,
836
838
  cell(e) {
837
839
  const t = e.row.original;
838
- return p(We.FmChip, {
840
+ return b(We.FmChip, {
839
841
  variant: Ce(t.outcome),
840
842
  label: Se(t.outcome),
841
843
  compact: !0
@@ -843,18 +845,18 @@ const ue = [
843
845
  }
844
846
  }];
845
847
  function q(e) {
846
- const t = x(e, ao);
848
+ const t = x(e, so);
847
849
  return new Date(t.year(), t.month(), t.date(), t.hour(), t.minute(), 0).toISOString().slice(0, 19).replace("T", " ");
848
850
  }
849
851
  async function $e() {
850
- var e, t, u;
852
+ var e, t, n;
851
853
  j.value = !0;
852
854
  try {
853
855
  const {
854
856
  startDate: g,
855
857
  endDate: r
856
- } = m.value, F = (Y.value - 1) * ie, K = E.value.subjectPrefixes, W = await pe.read({
857
- limit: ie,
858
+ } = m.value, F = (B.value - 1) * ue, z = E.value.subjectPrefixes, W = await be.read({
859
+ limit: ue,
858
860
  offset: F,
859
861
  ...g ? {
860
862
  from: q(g)
@@ -862,26 +864,26 @@ const ue = [
862
864
  ...r ? {
863
865
  to: q(r)
864
866
  } : {},
865
- ...B.value.userIds.length ? {
866
- userIds: B.value.userIds
867
+ ...K.value.userIds.length ? {
868
+ userIds: K.value.userIds
867
869
  } : {},
868
- ...B.value.feedmeAdminActors ? {
870
+ ...K.value.feedmeAdminActors ? {
869
871
  feedmeAdminActors: !0
870
872
  } : {},
871
873
  ...(e = k.value) != null && e.length ? {
872
874
  subjects: k.value
873
875
  } : {},
874
- ...K.length ? {
875
- subjectPrefixes: [...K]
876
+ ...z.length ? {
877
+ subjectPrefixes: [...z]
876
878
  } : {},
877
879
  ...(t = O.value) != null && t.length ? {
878
880
  actions: O.value
879
881
  } : {},
880
- ...(u = S.value) != null && u.length ? {
882
+ ...(n = S.value) != null && n.length ? {
881
883
  outcomes: xe(S.value)
882
884
  } : {}
883
885
  });
884
- w.value = W, ye.value = W.length === ie;
886
+ w.value = W, _e.value = W.length === ue;
885
887
  } finally {
886
888
  j.value = !1;
887
889
  }
@@ -903,25 +905,25 @@ const ue = [
903
905
  const {
904
906
  startDate: e,
905
907
  endDate: t
906
- } = m.value, u = E.value.subjectPrefixes;
907
- J.value = await pe.count({
908
+ } = m.value, n = E.value.subjectPrefixes;
909
+ J.value = await be.count({
908
910
  ...e ? {
909
911
  from: q(e)
910
912
  } : {},
911
913
  ...t ? {
912
914
  to: q(t)
913
915
  } : {},
914
- ...B.value.userIds.length ? {
915
- userIds: B.value.userIds
916
+ ...K.value.userIds.length ? {
917
+ userIds: K.value.userIds
916
918
  } : {},
917
- ...B.value.feedmeAdminActors ? {
919
+ ...K.value.feedmeAdminActors ? {
918
920
  feedmeAdminActors: !0
919
921
  } : {},
920
922
  ...(g = k.value) != null && g.length ? {
921
923
  subjects: k.value
922
924
  } : {},
923
- ...u.length ? {
924
- subjectPrefixes: [...u]
925
+ ...n.length ? {
926
+ subjectPrefixes: [...n]
925
927
  } : {},
926
928
  ...(r = O.value) != null && r.length ? {
927
929
  actions: O.value
@@ -933,19 +935,19 @@ const ue = [
933
935
  }
934
936
  Q(Ne, async () => {
935
937
  var e;
936
- Y.value = 1, (e = c.currentBusiness.value) != null && e._id && await Promise.all([ht(), $e()]);
938
+ B.value = 1, (e = c.currentBusiness.value) != null && e._id && await Promise.all([ht(), $e()]);
937
939
  }, {
938
940
  immediate: !0
939
941
  }), Q(T, () => {
940
942
  k.value = void 0;
941
943
  });
942
944
  let ke = !1;
943
- async function yt({
945
+ async function _t({
944
946
  pageIndex: e
945
947
  }) {
946
948
  var t;
947
- if ((t = c.currentBusiness.value) != null && t._id && !(e === 0 && Y.value === 1) && !ke) {
948
- ke = !0, Y.value = e + 1;
949
+ if ((t = c.currentBusiness.value) != null && t._id && !(e === 0 && B.value === 1) && !ke) {
950
+ ke = !0, B.value = e + 1;
949
951
  try {
950
952
  await $e();
951
953
  } finally {
@@ -953,7 +955,7 @@ const ue = [
953
955
  }
954
956
  }
955
957
  }
956
- function _t(e) {
958
+ function yt(e) {
957
959
  s.value = e, D.value = !0;
958
960
  }
959
961
  function xt() {
@@ -967,12 +969,12 @@ const ue = [
967
969
  function Lt() {
968
970
  const e = _.value;
969
971
  if (!(e != null && e.length)) return;
970
- const t = new Set(de.value.map((r) => r.userId)), u = new Set(L.members.map((r) => r.doc.userId)), g = e.filter((r) => r === he ? ce.value : L.hasLoaded ? u.has(r) || t.has(r) : !0);
972
+ const t = new Set(re.value.map((r) => r.userId)), n = new Set(L.members.map((r) => r.doc.userId)), g = e.filter((r) => r === pe ? de.value : L.hasLoaded ? n.has(r) || t.has(r) : !0);
971
973
  g.length !== e.length && (_.value = g.length ? g : void 0);
972
974
  }
973
975
  async function St() {
974
- var u;
975
- if (!((u = c.currentBusiness.value) != null && u._id)) return;
976
+ var n;
977
+ if (!((n = c.currentBusiness.value) != null && n._id)) return;
976
978
  const {
977
979
  startDate: e,
978
980
  endDate: t
@@ -981,7 +983,7 @@ const ue = [
981
983
  const {
982
984
  actors: g,
983
985
  showFeedmeAdminFilter: r
984
- } = await pe.getFeedmeAdminFilter({
986
+ } = await be.getFeedmeAdminFilter({
985
987
  ...e ? {
986
988
  from: q(e)
987
989
  } : {},
@@ -989,9 +991,9 @@ const ue = [
989
991
  to: q(t)
990
992
  } : {}
991
993
  });
992
- de.value = g, ce.value = r;
994
+ re.value = g, de.value = r;
993
995
  } catch {
994
- de.value = [], ce.value = !1;
996
+ re.value = [], de.value = !1;
995
997
  }
996
998
  Lt();
997
999
  }
@@ -1005,141 +1007,143 @@ const ue = [
1005
1007
  immediate: !0,
1006
1008
  deep: !0
1007
1009
  }), (e, t) => {
1008
- const u = C("FmSpacer"), g = C("FmButton"), r = C("FmMenuItem"), F = C("FmMenu"), K = C("FmChip"), W = C("FmDateRangePicker"), ge = C("FmTable"), se = C("FmSideSheet");
1009
- return y(), M(ee, null, [p(Nt, {
1010
- heading: n(o)("auditLog.title")
1010
+ const n = C("FmSpacer"), g = C("FmButton"), r = C("FmMenuItem"), F = C("FmMenu"), z = C("FmChip"), W = C("FmDateRangePicker"), ve = C("FmTable"), ae = C("FmSideSheet");
1011
+ return y(), M(Z, null, [b(Nt, {
1012
+ heading: i(o)("auditLog.title")
1011
1013
  }, {
1012
- "append-heading": z(() => [p(u), p(g, {
1014
+ "append-heading": Y(() => [b(n), b(g, {
1013
1015
  variant: "primary",
1014
1016
  "prepend-icon": "upload",
1015
- label: n(o)("auditLog.export"),
1016
- disabled: w.value.length === 0 || I.value || n(L).isLoading || n(L).members.length === 0,
1017
+ label: i(o)("auditLog.export"),
1018
+ disabled: w.value.length === 0 || I.value || i(L).isLoading || i(L).members.length === 0,
1017
1019
  loading: I.value,
1018
1020
  onClick: bt
1019
- }, null, 8, ["label", "disabled", "loading"]), p(F, {
1021
+ }, null, 8, ["label", "disabled", "loading"]), b(F, {
1020
1022
  "close-on-click": !1,
1021
1023
  "z-index": 50
1022
1024
  }, {
1023
- "menu-button": z(() => [p(g, {
1025
+ "menu-button": Y(() => [b(g, {
1024
1026
  variant: "tertiary",
1025
1027
  icon: "settings",
1026
- "aria-label": n(o)("auditLog.exportSettings.title"),
1028
+ "aria-label": i(o)("auditLog.exportSettings.title"),
1027
1029
  disabled: I.value
1028
1030
  }, null, 8, ["aria-label", "disabled"])]),
1029
- default: z(() => [a("div", Xt, [a("p", Qt, i(n(o)("auditLog.exportSettings.title")), 1), (y(), M(ee, null, re(we, (b) => p(r, {
1030
- key: b.key,
1031
- label: n(o)(b.labelKey),
1031
+ default: Y(() => [a("div", Xt, [a("p", Qt, u(i(o)("auditLog.exportSettings.title")), 1), (y(), M(Z, null, ie(we, (p) => b(r, {
1032
+ key: p.key,
1033
+ label: i(o)(p.labelKey),
1032
1034
  "has-checkbox": "",
1033
- "model-value": G.value.has(b.key),
1034
- disabled: G.value.has(b.key) && G.value.size === 1,
1035
- onClick: (X) => gt(b.key)
1035
+ "model-value": G.value.has(p.key),
1036
+ disabled: G.value.has(p.key) && G.value.size === 1,
1037
+ onClick: (X) => gt(p.key)
1036
1038
  }, null, 8, ["label", "model-value", "disabled", "onClick"])), 64))])]),
1037
1039
  _: 1
1038
1040
  })]),
1039
- default: z(() => [a("div", Zt, [a("div", el, [p(Jt, {
1041
+ default: Y(() => [a("div", Zt, [a("div", el, [b(Jt, {
1040
1042
  modelValue: T.value,
1041
- "onUpdate:modelValue": t[0] || (t[0] = (b) => T.value = b),
1043
+ "onUpdate:modelValue": t[0] || (t[0] = (p) => T.value = p),
1042
1044
  items: Oe.value
1043
- }, null, 8, ["modelValue", "items"]), a("div", tl, [p(W, {
1045
+ }, null, 8, ["modelValue", "items"]), a("div", tl, [b(W, {
1044
1046
  modelValue: m.value,
1045
- "onUpdate:modelValue": t[1] || (t[1] = (b) => m.value = b),
1047
+ "onUpdate:modelValue": t[1] || (t[1] = (p) => m.value = p),
1046
1048
  "show-predefined-range": "",
1047
1049
  "show-time": "",
1048
1050
  "predefined-range": it.value
1049
1051
  }, {
1050
- "trigger-button": z(() => [p(K, {
1052
+ "trigger-button": Y(() => [b(z, {
1051
1053
  label: ut.value,
1052
1054
  icon: "calendar_month"
1053
1055
  }, null, 8, ["label"])]),
1054
1056
  _: 1
1055
- }, 8, ["modelValue", "predefined-range"]), a("div", ll, [p(be, {
1057
+ }, 8, ["modelValue", "predefined-range"]), a("div", ll, [b(ge, {
1056
1058
  modelValue: _.value,
1057
- "onUpdate:modelValue": t[2] || (t[2] = (b) => _.value = b),
1059
+ "onUpdate:modelValue": t[2] || (t[2] = (p) => _.value = p),
1058
1060
  items: Ze.value,
1059
1061
  multiple: "",
1060
1062
  variant: "dark",
1061
- placeholder: n(o)("auditLog.filter.user_placeholder"),
1062
- "selected-prefix": n(o)("auditLog.filter.selected_user_prefix"),
1063
+ placeholder: i(o)("auditLog.filter.user_placeholder"),
1064
+ "selected-prefix": i(o)("auditLog.filter.selected_user_prefix"),
1063
1065
  "chip-icon": "account_circle"
1064
- }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div", ol, [p(be, {
1066
+ }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div", ol, [b(ge, {
1065
1067
  modelValue: k.value,
1066
- "onUpdate:modelValue": t[3] || (t[3] = (b) => k.value = b),
1068
+ "onUpdate:modelValue": t[3] || (t[3] = (p) => k.value = p),
1067
1069
  items: et.value,
1068
1070
  "filter-fn": tt,
1069
1071
  multiple: "",
1070
1072
  variant: "dark",
1071
- placeholder: n(o)("auditLog.filter.subject_placeholder"),
1072
- "selected-prefix": n(o)("auditLog.filter.selected_subject_prefix"),
1073
+ placeholder: i(o)("auditLog.filter.subject_placeholder"),
1074
+ "selected-prefix": i(o)("auditLog.filter.selected_subject_prefix"),
1073
1075
  "chip-icon": "badge"
1074
- }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div", al, [p(be, {
1076
+ }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div", al, [b(ge, {
1075
1077
  modelValue: O.value,
1076
- "onUpdate:modelValue": t[4] || (t[4] = (b) => O.value = b),
1078
+ "onUpdate:modelValue": t[4] || (t[4] = (p) => O.value = p),
1077
1079
  items: lt.value,
1078
1080
  multiple: "",
1079
1081
  variant: "dark",
1080
- placeholder: n(o)("auditLog.filter.action_placeholder"),
1081
- "selected-prefix": n(o)("auditLog.filter.selected_action_prefix"),
1082
+ placeholder: i(o)("auditLog.filter.action_placeholder"),
1083
+ "selected-prefix": i(o)("auditLog.filter.selected_action_prefix"),
1082
1084
  searchable: !1
1083
- }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div", sl, [p(be, {
1085
+ }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div", sl, [b(ge, {
1084
1086
  modelValue: S.value,
1085
- "onUpdate:modelValue": t[5] || (t[5] = (b) => S.value = b),
1087
+ "onUpdate:modelValue": t[5] || (t[5] = (p) => S.value = p),
1086
1088
  items: ot.value,
1087
1089
  multiple: "",
1088
1090
  variant: "dark",
1089
- placeholder: n(o)("auditLog.filter.status_placeholder"),
1090
- "selected-prefix": n(o)("auditLog.filter.selected_status_prefix"),
1091
+ placeholder: i(o)("auditLog.filter.status_placeholder"),
1092
+ "selected-prefix": i(o)("auditLog.filter.selected_status_prefix"),
1091
1093
  searchable: !1,
1092
1094
  "chip-icon": "check_circle"
1093
- }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])])]), !j.value && w.value.length === 0 ? (y(), Z(n(Yt), {
1094
- key: 0,
1095
- title: n(o)("auditLog.noData.title"),
1096
- subtitle: n(o)("auditLog.noData.subtitle")
1097
- }, null, 8, ["title", "subtitle"])) : (y(), Z(Ut, {
1098
- key: 1
1099
- }, {
1100
- default: z(() => [(y(), Z(ge, {
1101
- key: Ne.value,
1102
- "column-defs": pt,
1103
- "row-data": w.value,
1104
- "page-size": ie,
1105
- "page-count": te.value,
1106
- "row-count": J.value,
1107
- "fetch-fn": yt,
1108
- "hide-footer": te.value <= 1,
1109
- loading: j.value,
1110
- "pin-header-row": "",
1111
- class: "audit-log-list-table min-h-0 flex-1 cursor-pointer",
1112
- onRowClick: t[6] || (t[6] = (b) => _t(b.original))
1113
- }, null, 8, ["row-data", "page-count", "row-count", "hide-footer", "loading"]))]),
1095
+ }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])])]), b(Ut, null, {
1096
+ default: Y(() => [a("div", nl, [b(Yt, {
1097
+ "is-loading": j.value,
1098
+ "is-empty": w.value.length === 0,
1099
+ title: i(o)("auditLog.noData.title"),
1100
+ subtitle: i(o)("auditLog.noData.subtitle")
1101
+ }, {
1102
+ default: Y(() => [(y(), he(ve, {
1103
+ key: Ne.value,
1104
+ "column-defs": pt,
1105
+ "row-data": w.value,
1106
+ "page-size": ue,
1107
+ "page-count": ee.value,
1108
+ "row-count": J.value,
1109
+ "fetch-fn": _t,
1110
+ "hide-footer": ee.value <= 1,
1111
+ loading: j.value,
1112
+ "pin-header-row": "",
1113
+ class: "audit-log-list-table cursor-pointer",
1114
+ onRowClick: t[6] || (t[6] = (p) => yt(p.original))
1115
+ }, null, 8, ["row-data", "page-count", "row-count", "hide-footer", "loading"]))]),
1116
+ _: 1
1117
+ }, 8, ["is-loading", "is-empty", "title", "subtitle"])])]),
1114
1118
  _: 1
1115
- }))])]),
1119
+ })])]),
1116
1120
  _: 1
1117
- }, 8, ["heading"]), p(se, {
1118
- header: n(o)("auditLog.detail.header"),
1121
+ }, 8, ["heading"]), b(ae, {
1122
+ header: i(o)("auditLog.detail.header"),
1119
1123
  "model-value": D.value,
1120
1124
  "max-width": 480,
1121
1125
  "dismiss-away": "",
1122
- "onUpdate:modelValue": t[7] || (t[7] = (b) => {
1123
- b || xt();
1126
+ "onUpdate:modelValue": t[7] || (t[7] = (p) => {
1127
+ p || xt();
1124
1128
  })
1125
1129
  }, {
1126
- default: z(() => [s.value ? (y(), M("div", nl, [a("div", ul, [a("div", il, [a("p", rl, i(ct(s.value)), 1)]), p(K, {
1130
+ default: Y(() => [s.value ? (y(), M("div", ul, [a("div", il, [a("div", rl, [a("p", dl, u(ct(s.value)), 1)]), b(z, {
1127
1131
  variant: Ce(s.value.outcome),
1128
1132
  label: Se(s.value.outcome),
1129
1133
  compact: ""
1130
- }, null, 8, ["variant", "label"])]), a("div", dl, [a("div", cl, [a("div", null, [a("p", ml, i(n(o)("auditLog.detail.date")), 1), a("p", fl, i(dt(s.value.timestamp)), 1)]), a("div", null, [a("p", vl, i(n(o)("auditLog.detail.user")), 1), a("p", gl, i(ve(s.value)), 1)]), a("div", null, [a("p", bl, i(n(o)("auditLog.detail.email")), 1), a("p", pl, i(rt(s.value)), 1)]), s.value.field ? (y(), M("div", hl, [a("p", yl, i(n(o)("auditLog.detail.field")), 1), a("p", _l, i(s.value.field), 1)])) : N("", !0), a("div", null, [a("p", xl, i(n(o)("auditLog.detail.business")), 1), a("p", Ll, i(s.value.businessId || "-"), 1)]), a("div", null, [a("p", Sl, i(n(o)("auditLog.detail.restaurant")), 1), a("p", wl, i(s.value.restaurantId || "-"), 1)])])]), a("div", kl, [a("div", Il, [a("p", Al, i(n(o)("auditLog.detail.eventDetails")), 1)]), t[8] || (t[8] = a("hr", {
1134
+ }, null, 8, ["variant", "label"])]), a("div", cl, [a("div", ml, [a("div", null, [a("p", fl, u(i(o)("auditLog.detail.date")), 1), a("p", vl, u(dt(s.value.timestamp)), 1)]), a("div", null, [a("p", gl, u(i(o)("auditLog.detail.user")), 1), a("p", bl, u(fe(s.value)), 1)]), a("div", null, [a("p", pl, u(i(o)("auditLog.detail.email")), 1), a("p", hl, u(rt(s.value)), 1)]), s.value.field ? (y(), M("div", _l, [a("p", yl, u(i(o)("auditLog.detail.field")), 1), a("p", xl, u(s.value.field), 1)])) : N("", !0), a("div", null, [a("p", Ll, u(i(o)("auditLog.detail.business")), 1), a("p", Sl, u(s.value.businessId || "-"), 1)]), a("div", null, [a("p", wl, u(i(o)("auditLog.detail.restaurant")), 1), a("p", kl, u(s.value.restaurantId || "-"), 1)])])]), a("div", Il, [a("div", Al, [a("p", Fl, u(i(o)("auditLog.detail.eventDetails")), 1)]), t[8] || (t[8] = a("hr", {
1131
1135
  class: "border-fm-color-border-default"
1132
- }, null, -1)), a("div", Fl, [a("div", null, [a("p", Ml, i(n(o)("auditLog.detail.actionDescription")), 1), a("p", Dl, i(s.value.metadata.operationLabel || "-"), 1)])])]), a("div", Ol, [a("div", Tl, [a("p", jl, i(n(o)("auditLog.detail.metadata")), 1)]), t[9] || (t[9] = a("hr", {
1136
+ }, null, -1)), a("div", Ml, [a("div", null, [a("p", Dl, u(i(o)("auditLog.detail.actionDescription")), 1), a("p", Ol, u(s.value.metadata.operationLabel || "-"), 1)])])]), a("div", Tl, [a("div", jl, [a("p", Pl, u(i(o)("auditLog.detail.metadata")), 1)]), t[9] || (t[9] = a("hr", {
1133
1137
  class: "border-fm-color-border-default"
1134
- }, null, -1)), a("div", Pl, [a("div", null, [a("p", Vl, i(n(o)("auditLog.detail.resolvedFrom")), 1), a("p", El, i(mt(s.value.metadata.resolvedFrom)), 1)]), (s.value.metadata.resolvedFrom === "permissionSet" || s.value.metadata.resolvedFrom === "systemPermissionSet") && (s.value.metadata.permissionSetName || s.value.metadata.permissionSetId) ? (y(), M("div", Rl, [a("p", Cl, i(n(o)("auditLog.detail.permissionSet")), 1), s.value.metadata.permissionSetName ? (y(), M("p", Ul, i(s.value.metadata.permissionSetName), 1)) : N("", !0), s.value.metadata.permissionSetId ? (y(), M("p", $l, i(s.value.metadata.permissionSetId), 1)) : N("", !0)])) : N("", !0), s.value.metadata.reason ? (y(), M("div", Nl, [a("p", Yl, i(n(o)("auditLog.detail.reason")), 1), a("p", Bl, i(s.value.metadata.reason), 1)])) : N("", !0), a("div", null, [a("p", Kl, i(n(o)("auditLog.detail.requestMethod")), 1), a("p", zl, i(ft(s.value)), 1)]), a("div", null, [a("p", ql, i(n(o)("auditLog.detail.requestPath")), 1), a("p", Hl, i(s.value.metadata.requestPath || "-"), 1)]), s.value.metadata.trace && s.value.metadata.trace.length > 0 ? (y(), M("div", Wl, [a("p", Jl, i(n(o)("auditLog.detail.permissionTrace")), 1), a("ol", Gl, [(y(!0), M(ee, null, re(s.value.metadata.trace, (b, X) => (y(), M("li", {
1138
+ }, null, -1)), a("div", Vl, [a("div", null, [a("p", El, u(i(o)("auditLog.detail.resolvedFrom")), 1), a("p", Rl, u(mt(s.value.metadata.resolvedFrom)), 1)]), (s.value.metadata.resolvedFrom === "permissionSet" || s.value.metadata.resolvedFrom === "systemPermissionSet") && (s.value.metadata.permissionSetName || s.value.metadata.permissionSetId) ? (y(), M("div", Cl, [a("p", Ul, u(i(o)("auditLog.detail.permissionSet")), 1), s.value.metadata.permissionSetName ? (y(), M("p", $l, u(s.value.metadata.permissionSetName), 1)) : N("", !0), s.value.metadata.permissionSetId ? (y(), M("p", Nl, u(s.value.metadata.permissionSetId), 1)) : N("", !0)])) : N("", !0), s.value.metadata.reason ? (y(), M("div", Yl, [a("p", Bl, u(i(o)("auditLog.detail.reason")), 1), a("p", Kl, u(s.value.metadata.reason), 1)])) : N("", !0), a("div", null, [a("p", zl, u(i(o)("auditLog.detail.requestMethod")), 1), a("p", ql, u(ft(s.value)), 1)]), a("div", null, [a("p", Hl, u(i(o)("auditLog.detail.requestPath")), 1), a("p", Wl, u(s.value.metadata.requestPath || "-"), 1)]), s.value.metadata.trace && s.value.metadata.trace.length > 0 ? (y(), M("div", Jl, [a("p", Gl, u(i(o)("auditLog.detail.permissionTrace")), 1), a("ol", Xl, [(y(!0), M(Z, null, ie(s.value.metadata.trace, (p, X) => (y(), M("li", {
1135
1139
  key: X,
1136
1140
  class: "flex items-center gap-6"
1137
- }, [a("span", Xl, i(X + 1), 1), a("span", Ql, i(b), 1), X < s.value.metadata.trace.length - 1 ? (y(), M("span", Zl, "→")) : N("", !0)]))), 128))])])) : N("", !0), v.value ? (y(), M("div", eo, [a("p", to, i(n(o)("auditLog.detail.requestBody")), 1), a("pre", lo, i(v.value), 1)])) : N("", !0)])])])) : N("", !0)]),
1141
+ }, [a("span", Ql, u(X + 1), 1), a("span", Zl, u(p), 1), X < s.value.metadata.trace.length - 1 ? (y(), M("span", eo, "→")) : N("", !0)]))), 128))])])) : N("", !0), v.value ? (y(), M("div", to, [a("p", lo, u(i(o)("auditLog.detail.requestBody")), 1), a("pre", oo, u(v.value), 1)])) : N("", !0)])])])) : N("", !0)]),
1138
1142
  _: 1
1139
1143
  }, 8, ["header", "model-value"])], 64);
1140
1144
  };
1141
1145
  }
1142
- }), _o = /* @__PURE__ */ $t(so, [["__scopeId", "data-v-e7bff8e8"]]);
1146
+ }), xo = /* @__PURE__ */ $t(no, [["__scopeId", "data-v-ab237027"]]);
1143
1147
  export {
1144
- _o as default
1148
+ xo as default
1145
1149
  };