@feedmepos/mf-hrm-portal 2.0.24-dev.12 → 2.0.24-dev.14

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 (25) hide show
  1. package/dist/{AuditLogList-_OSOwJVi.js → AuditLogList-CtneTBoV.js} +378 -365
  2. package/dist/{EmployeeList-DrBO8Kk6.js → EmployeeList-C7dIO8gr.js} +6 -6
  3. package/dist/{Main-CuFC87ma.js → Main-3gbHRwy4.js} +6 -6
  4. package/dist/{Main-3j9ReeYP.js → Main-CU92m_i1.js} +9 -9
  5. package/dist/{Main-CB8WXm4L.js → Main-D5PmpNiB.js} +4 -4
  6. package/dist/{PermissionSetList-DRyugr1w.js → PermissionSetList-Dej3hhUp.js} +6 -6
  7. package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BpI_IJIp.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-C9fM3DpC.js} +744 -744
  8. package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_a439fdd8_lang-Dj0pRX1U.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_a439fdd8_lang-DiCE_AYD.js} +1 -1
  9. package/dist/{RoleList-B7kXklX5.js → RoleList-B98ExzJE.js} +7 -7
  10. package/dist/{TeamMemberList-CbqkMiT6.js → TeamMemberList-YTHgBCoO.js} +8 -8
  11. package/dist/{TimesheetList-Cr74-E32.js → TimesheetList-2HclOof1.js} +6 -6
  12. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_91afda4e_lang-Cdd6GpKp.js → TimesheetList.vue_vue_type_style_index_0_scoped_91afda4e_lang-BBHwVX-k.js} +2 -2
  13. package/dist/{app-Bn7c7G7J.js → app-CoIsLUsi.js} +190 -172
  14. package/dist/app.js +1 -1
  15. package/dist/{dayjs.min-D9tKWmYV.js → dayjs.min-JqoERYFc.js} +1 -1
  16. package/dist/{employee-VNw8J2OI.js → employee-D_oJJt4e.js} +3 -3
  17. package/dist/{iteration-xEBe_nnw.js → iteration-CmwYwOHJ.js} +1 -1
  18. package/dist/{lodash-BSzlmur1.js → lodash-DISd2c6W.js} +1 -1
  19. package/dist/{rule-DUXHgPce.js → rule-B4b6tRUV.js} +2 -2
  20. package/dist/style.css +1 -1
  21. package/dist/tsconfig.app.tsbuildinfo +1 -1
  22. package/dist/{useAppStore-Cj44joeR.js → useAppStore-m4x4qFHC.js} +1 -1
  23. package/dist/{useLoading-DCVDPJRt.js → useLoading-BcujhoYe.js} +1 -1
  24. package/dist/{useReportPermissions-DUDF9brn.js → useReportPermissions-bHlIA-k-.js} +3 -3
  25. package/package.json +2 -2
@@ -1,14 +1,14 @@
1
- import { defineComponent as We, ref as f, computed as y, onMounted as Ot, onBeforeUnmount as Tt, watch as Q, resolveComponent as C, createElementBlock as M, openBlock as h, createBlock as Z, createCommentVNode as N, createElementVNode as a, Fragment as ee, renderList as re, withCtx as K, createVNode as p, toDisplayString as i, unref as n, nextTick as jt } from "vue";
2
- import { d as x } from "./dayjs.min-D9tKWmYV.js";
3
- import { useI18n as Je, useCoreStore as Pt } from "@feedmepos/mf-common";
4
- import { G as Ke, _ as Vt } from "./app-Bn7c7G7J.js";
5
- import { components as ze } from "@feedmepos/ui-library";
6
- import { g as ke, b as Ae } from "./iteration-xEBe_nnw.js";
7
- import { S as be, _ as Et } from "./SelectFilter-C61IZSID.js";
8
- import { _ as Rt } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
9
- import { _ as Ct } from "./index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js";
10
- import { t as Ut, p as qe } from "./rule-DUXHgPce.js";
11
- import { defineStore as $t } from "pinia";
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 K, createVNode as p, toDisplayString as i, unref as n, nextTick as Rt } from "vue";
2
+ import { d as x } from "./dayjs.min-JqoERYFc.js";
3
+ import { useI18n as Qe, useCoreStore as Ct } from "@feedmepos/mf-common";
4
+ import { G as He, _ as Ut } from "./app-CoIsLUsi.js";
5
+ import { components as We } from "@feedmepos/ui-library";
6
+ import { g as Ie, b as Ae } from "./iteration-CmwYwOHJ.js";
7
+ import { S as be, _ as $t } from "./SelectFilter-C61IZSID.js";
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-Vc5ARO29.js";
10
+ import { t as Bt, p as Je } from "./rule-B4b6tRUV.js";
11
+ import { defineStore as Kt } from "pinia";
12
12
  const ue = [
13
13
  { key: "all", label: "All", subjectPrefixes: [] },
14
14
  { key: "inventory", label: "Inventory", subjectPrefixes: ["business::inventory", "inventory"] },
@@ -20,56 +20,56 @@ const ue = [
20
20
  // Add more as modules are revamped with new actionguard:
21
21
  // { key: 'restaurantOperation', label: 'Restaurant Operation', subjectPrefixes: ['restaurant'] },
22
22
  ], Fe = "/audit-logs", pe = {
23
- async count(o) {
24
- var L, j, A, w, s;
25
- const l = {
26
- ...o != null && o.from ? { from: o.from } : {},
27
- ...o != null && o.to ? { to: o.to } : {},
28
- ...(L = o == null ? void 0 : o.userIds) != null && L.length ? { userIds: o.userIds } : {},
29
- ...(j = o == null ? void 0 : o.subjects) != null && j.length ? { subjects: o.subjects } : {},
30
- ...(A = o == null ? void 0 : o.subjectPrefixes) != null && A.length ? { subjectPrefixes: o.subjectPrefixes } : {},
31
- ...(w = o == null ? void 0 : o.actions) != null && w.length ? { actions: o.actions } : {},
32
- ...(s = o == null ? void 0 : o.outcomes) != null && s.length ? { outcomes: o.outcomes } : {},
33
- ...o != null && o.feedmeAdminActors ? { feedmeAdminActors: !0 } : {}
23
+ async count(l) {
24
+ var L, j, I, w, s;
25
+ const o = {
26
+ ...l != null && l.from ? { from: l.from } : {},
27
+ ...l != null && l.to ? { to: l.to } : {},
28
+ ...(L = l == null ? void 0 : l.userIds) != null && L.length ? { userIds: l.userIds } : {},
29
+ ...(j = l == null ? void 0 : l.subjects) != null && j.length ? { subjects: l.subjects } : {},
30
+ ...(I = l == null ? void 0 : l.subjectPrefixes) != null && I.length ? { subjectPrefixes: l.subjectPrefixes } : {},
31
+ ...(w = l == null ? void 0 : l.actions) != null && w.length ? { actions: l.actions } : {},
32
+ ...(s = l == null ? void 0 : l.outcomes) != null && s.length ? { outcomes: l.outcomes } : {},
33
+ ...l != null && l.feedmeAdminActors ? { feedmeAdminActors: !0 } : {}
34
34
  };
35
- return (await ke(
35
+ return (await Ie(
36
36
  await Ae().get(`${Fe}/count`, {
37
- params: l,
37
+ params: o,
38
38
  paramsSerializer: (D) => {
39
39
  const P = new URLSearchParams();
40
- for (const [v, F] of Object.entries(D))
41
- if (Array.isArray(F))
42
- for (const z of F) P.append(v, String(z));
43
- else F != null && P.append(v, String(F));
40
+ for (const [v, A] of Object.entries(D))
41
+ if (Array.isArray(A))
42
+ for (const z of A) P.append(v, String(z));
43
+ else A != null && P.append(v, String(A));
44
44
  return P.toString();
45
45
  }
46
46
  })
47
47
  )).total;
48
48
  },
49
- async read(o) {
50
- var c, L, j, A, w;
51
- const l = {
52
- limit: (o == null ? void 0 : o.limit) ?? 100,
53
- offset: (o == null ? void 0 : o.offset) ?? 0,
54
- ...o != null && o.from ? { from: o.from } : {},
55
- ...o != null && o.to ? { to: o.to } : {},
56
- ...(c = o == null ? void 0 : o.userIds) != null && c.length ? { userIds: o.userIds } : {},
57
- ...o != null && o.feedmeAdminActors ? { feedmeAdminActors: !0 } : {},
58
- ...(L = o == null ? void 0 : o.subjects) != null && L.length ? { subjects: o.subjects } : {},
59
- ...(j = o == null ? void 0 : o.subjectPrefixes) != null && j.length ? { subjectPrefixes: o.subjectPrefixes } : {},
60
- ...(A = o == null ? void 0 : o.actions) != null && A.length ? { actions: o.actions } : {},
61
- ...(w = o == null ? void 0 : o.outcomes) != null && w.length ? { outcomes: o.outcomes } : {}
49
+ async read(l) {
50
+ var c, L, j, I, w;
51
+ const o = {
52
+ limit: (l == null ? void 0 : l.limit) ?? 100,
53
+ offset: (l == null ? void 0 : l.offset) ?? 0,
54
+ ...l != null && l.from ? { from: l.from } : {},
55
+ ...l != null && l.to ? { to: l.to } : {},
56
+ ...(c = l == null ? void 0 : l.userIds) != null && c.length ? { userIds: l.userIds } : {},
57
+ ...l != null && l.feedmeAdminActors ? { feedmeAdminActors: !0 } : {},
58
+ ...(L = l == null ? void 0 : l.subjects) != null && L.length ? { subjects: l.subjects } : {},
59
+ ...(j = l == null ? void 0 : l.subjectPrefixes) != null && j.length ? { subjectPrefixes: l.subjectPrefixes } : {},
60
+ ...(I = l == null ? void 0 : l.actions) != null && I.length ? { actions: l.actions } : {},
61
+ ...(w = l == null ? void 0 : l.outcomes) != null && w.length ? { outcomes: l.outcomes } : {}
62
62
  };
63
- return ke(
63
+ return Ie(
64
64
  await Ae().get(Fe, {
65
- params: l,
65
+ params: o,
66
66
  // Serialize arrays as repeated params: key=val1&key=val2
67
67
  // (NestJS @Query expects this; axios default adds brackets which break matching)
68
68
  paramsSerializer: (s) => {
69
69
  const D = new URLSearchParams();
70
70
  for (const [P, v] of Object.entries(s))
71
71
  if (Array.isArray(v))
72
- for (const F of v) D.append(P, String(F));
72
+ for (const A of v) D.append(P, String(A));
73
73
  else v != null && D.append(P, String(v));
74
74
  return D.toString();
75
75
  }
@@ -81,36 +81,36 @@ const ue = [
81
81
  * viewers only; empty for merchants). `showFeedmeAdminFilter` indicates whether to offer
82
82
  * the "FeedMe Admin" catch-all (only when the business has relevant admin activity).
83
83
  */
84
- async getFeedmeAdminFilter(o) {
85
- const l = {
86
- ...o != null && o.from ? { from: o.from } : {},
87
- ...o != null && o.to ? { to: o.to } : {}
84
+ async getFeedmeAdminFilter(l) {
85
+ const o = {
86
+ ...l != null && l.from ? { from: l.from } : {},
87
+ ...l != null && l.to ? { to: l.to } : {}
88
88
  };
89
- return ke(
90
- await Ae().get(`${Fe}/actors`, { params: l })
89
+ return Ie(
90
+ await Ae().get(`${Fe}/actors`, { params: o })
91
91
  );
92
92
  }
93
- }, Nt = { class: "flex h-[46px] items-center gap-8 rounded-sm px-16 hover:bg-fm-color-opacity-sm" }, Yt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Bt = {
93
+ }, zt = { class: "flex h-[46px] items-center gap-8 rounded-sm px-16 hover:bg-fm-color-opacity-sm" }, qt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ht = {
94
94
  "data-more-measure": "",
95
95
  class: "flex h-[46px] items-center gap-8 rounded-sm px-16"
96
- }, Kt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, zt = /* @__PURE__ */ We({
96
+ }, Wt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Jt = /* @__PURE__ */ Xe({
97
97
  __name: "AuditLogModuleTabs",
98
98
  props: {
99
99
  modelValue: {},
100
100
  items: {}
101
101
  },
102
102
  emits: ["update:modelValue"],
103
- setup(o, { emit: l }) {
104
- const c = o, L = l, { t: j } = Je(), A = f(!1), w = f(null), s = f(null), D = f([]), P = f(0), v = f(0);
105
- let F = null;
103
+ setup(l, { emit: o }) {
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
+ let A = null;
106
106
  async function z() {
107
- if (await jt(), !s.value) return;
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 _e = y(() => {
113
+ const ye = 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;
@@ -121,30 +121,30 @@ const ue = [
121
121
  for (let d = 0; d < m && !(O + _[d] + S > v.value); d++)
122
122
  O += _[d], T++;
123
123
  return T;
124
- }), J = y(() => {
125
- const m = _e.value, _ = c.items.length;
124
+ }), J = h(() => {
125
+ const m = ye.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, le = T.slice(0, $ - 1).reduce((E, ae) => E + ae, 0);
132
- for (; $ > 1 && le + H + d > v.value; )
133
- $--, le = T.slice(0, $ - 1).reduce((E, ae) => E + ae, 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);
134
134
  return [...c.items.slice(0, Math.max($ - 1, 0)), S];
135
- }), te = y(() => {
135
+ }), te = h(() => {
136
136
  const m = new Set(J.value.map((_) => _.value));
137
137
  return c.items.filter((_) => !m.has(_.value));
138
138
  });
139
- function oe(m) {
140
- A.value = !1, L("update:modelValue", m);
139
+ function le(m) {
140
+ I.value = !1, L("update:modelValue", m);
141
141
  }
142
- return Ot(async () => {
143
- await z(), w.value && (v.value = w.value.clientWidth, F = new ResizeObserver(() => {
142
+ return Vt(async () => {
143
+ await z(), w.value && (v.value = w.value.clientWidth, A = new ResizeObserver(() => {
144
144
  w.value && (v.value = w.value.clientWidth);
145
- }), F.observe(w.value));
146
- }), Tt(() => {
147
- F == null || F.disconnect(), F = null;
145
+ }), A.observe(w.value));
146
+ }), Et(() => {
147
+ A == null || A.disconnect(), A = null;
148
148
  }), Q(
149
149
  () => c.items,
150
150
  () => {
@@ -153,40 +153,40 @@ const ue = [
153
153
  { deep: !0 }
154
154
  ), (m, _) => {
155
155
  const k = C("FmTab"), S = C("FmIcon"), O = C("FmMenuItem"), T = C("FmMenu");
156
- return h(), M("div", {
156
+ return y(), M("div", {
157
157
  ref_key: "containerRef",
158
158
  ref: w,
159
159
  class: "relative flex w-full flex-row items-center"
160
160
  }, [
161
- (h(!0), M(ee, null, re(J.value, (d) => (h(), Z(k, {
161
+ (y(!0), M(ee, null, re(J.value, (d) => (y(), Z(k, {
162
162
  key: d.value,
163
- "model-value": o.modelValue,
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": oe
168
+ "onUpdate:modelValue": le
169
169
  }, null, 8, ["model-value", "label", "badge", "disabled", "value"]))), 128)),
170
- te.value.length > 0 ? (h(), Z(T, {
170
+ te.value.length > 0 ? (y(), Z(T, {
171
171
  key: 0,
172
- "show-menu": A.value,
172
+ "show-menu": I.value,
173
173
  class: "max-w-[360px] min-w-[90px] rounded-sm",
174
174
  placement: "bottom-start",
175
- onMenuChanged: _[0] || (_[0] = (d) => A.value = d)
175
+ onMenuChanged: _[0] || (_[0] = (d) => I.value = d)
176
176
  }, {
177
177
  "menu-button": K(() => [
178
- a("div", Nt, [
178
+ a("div", zt, [
179
179
  p(S, { name: "more_vert" }),
180
- a("span", Yt, i(n(j)("auditLog.modules.more")), 1)
180
+ a("span", qt, i(n(j)("auditLog.modules.more")), 1)
181
181
  ])
182
182
  ]),
183
183
  default: K(() => [
184
- (h(!0), M(ee, null, re(te.value, (d) => (h(), Z(O, {
184
+ (y(!0), M(ee, null, re(te.value, (d) => (y(), Z(O, {
185
185
  key: d.value,
186
- "model-value": o.modelValue === d.value,
186
+ "model-value": l.modelValue === d.value,
187
187
  label: d.label,
188
188
  disabled: d.disabled,
189
- onClick: (H) => oe(d.value)
189
+ onClick: (H) => le(d.value)
190
190
  }, null, 8, ["model-value", "label", "disabled", "onClick"]))), 128))
191
191
  ]),
192
192
  _: 1
@@ -197,194 +197,194 @@ 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
- (h(!0), M(ee, null, re(o.items, (d) => (h(), M("div", {
200
+ (y(!0), M(ee, null, re(l.items, (d) => (y(), M("div", {
201
201
  key: `measure-${d.value}`,
202
202
  "data-tab-measure": ""
203
203
  }, [
204
204
  p(k, {
205
- "model-value": o.modelValue,
205
+ "model-value": l.modelValue,
206
206
  label: d.label,
207
207
  badge: d.badge,
208
208
  disabled: d.disabled,
209
209
  value: d.value
210
210
  }, null, 8, ["model-value", "label", "badge", "disabled", "value"])
211
211
  ]))), 128)),
212
- a("div", Bt, [
212
+ a("div", Ht, [
213
213
  p(S, { name: "more_vert" }),
214
- a("span", Kt, i(n(j)("auditLog.modules.more")), 1)
214
+ a("span", Wt, i(n(j)("auditLog.modules.more")), 1)
215
215
  ])
216
216
  ], 512)
217
217
  ], 512);
218
218
  };
219
219
  }
220
- }), qt = $t("team", () => {
221
- const o = f([]), l = f(!1), c = f(!1), L = y(
222
- () => Object.fromEntries(o.value.map((s) => [s.doc.userId, s.name]))
223
- ), j = y(
224
- () => Object.fromEntries(o.value.map((s) => [s.doc.userId, s.email]))
225
- ), A = y(
226
- () => Object.fromEntries(o.value.map((s) => [s.doc.userId, s.phoneNumber]))
220
+ }), Gt = Kt("team", () => {
221
+ const l = f([]), o = f(!1), c = f(!1), L = h(
222
+ () => Object.fromEntries(l.value.map((s) => [s.doc.userId, s.name]))
223
+ ), j = h(
224
+ () => Object.fromEntries(l.value.map((s) => [s.doc.userId, s.email]))
225
+ ), I = h(
226
+ () => Object.fromEntries(l.value.map((s) => [s.doc.userId, s.phoneNumber]))
227
227
  );
228
228
  async function w({ force: s = !1 } = {}) {
229
- if (!(!s && o.value.length > 0))
229
+ if (!(!s && l.value.length > 0))
230
230
  try {
231
- l.value = !0;
232
- const D = await Ut.readTeamMembers();
233
- o.value = D.sort((P, v) => P.doc.isOwner ? -1 : P.name.localeCompare(v.name)), c.value = !0;
231
+ o.value = !0;
232
+ const D = await Bt.readTeamMembers();
233
+ l.value = D.sort((P, v) => P.doc.isOwner ? -1 : P.name.localeCompare(v.name)), c.value = !0;
234
234
  } finally {
235
- l.value = !1;
235
+ o.value = !1;
236
236
  }
237
237
  }
238
238
  return {
239
- members: o,
240
- isLoading: l,
239
+ members: l,
240
+ isLoading: o,
241
241
  hasLoaded: c,
242
242
  userIdToName: L,
243
243
  userIdToEmail: j,
244
- userIdToPhone: A,
244
+ userIdToPhone: I,
245
245
  readTeamMembers: w
246
246
  };
247
- }), Ht = {
247
+ }), Xt = {
248
248
  class: "flex flex-col gap-4 p-12 w-[260px]"
249
- }, Wt = {
249
+ }, Qt = {
250
250
  class: "text-xs font-semibold text-fm-color-typo-secondary mb-4"
251
- }, Jt = {
251
+ }, Zt = {
252
252
  class: "flex min-h-0 flex-1 flex-col gap-16"
253
- }, Gt = {
253
+ }, el = {
254
254
  class: "space-y-16"
255
- }, Xt = {
255
+ }, tl = {
256
256
  class: "flex flex-wrap items-center gap-8"
257
- }, Qt = {
257
+ }, ll = {
258
258
  class: "w-fit"
259
- }, Zt = {
259
+ }, ol = {
260
260
  class: "w-fit"
261
- }, eo = {
261
+ }, al = {
262
262
  class: "w-fit"
263
- }, to = {
263
+ }, sl = {
264
264
  class: "w-fit"
265
- }, oo = {
265
+ }, nl = {
266
266
  key: 0,
267
267
  class: "space-y-12 p-4 text-sm"
268
- }, lo = {
268
+ }, ul = {
269
269
  class: "flex items-start justify-between gap-8 rounded-lg border border-fm-color-border-default p-12"
270
- }, ao = {
270
+ }, il = {
271
271
  class: "min-w-0 flex-1"
272
- }, so = {
272
+ }, rl = {
273
273
  class: "audit-log-operation-label-detail text-base font-bold leading-snug text-fm-color-typo-primary"
274
- }, no = {
274
+ }, dl = {
275
275
  class: "rounded-lg border border-fm-color-border-default p-12"
276
- }, uo = {
276
+ }, cl = {
277
277
  class: "space-y-12"
278
- }, io = {
278
+ }, ml = {
279
279
  class: "text-xs text-fm-color-typo-secondary"
280
- }, ro = {
280
+ }, fl = {
281
281
  class: "font-semibold"
282
- }, co = {
282
+ }, vl = {
283
283
  class: "text-xs text-fm-color-typo-secondary"
284
- }, mo = {
284
+ }, gl = {
285
285
  class: "font-semibold"
286
- }, fo = {
286
+ }, bl = {
287
287
  class: "text-xs text-fm-color-typo-secondary"
288
- }, vo = {
288
+ }, pl = {
289
289
  class: "break-all font-semibold"
290
- }, go = {
290
+ }, hl = {
291
291
  key: 0
292
- }, bo = {
292
+ }, yl = {
293
293
  class: "text-xs text-fm-color-typo-secondary"
294
- }, po = {
294
+ }, _l = {
295
295
  class: "break-all font-mono text-xs font-semibold"
296
- }, ho = {
296
+ }, xl = {
297
297
  class: "text-xs text-fm-color-typo-secondary"
298
- }, _o = {
298
+ }, Ll = {
299
299
  class: "break-all font-mono text-xs font-semibold"
300
- }, yo = {
300
+ }, Sl = {
301
301
  class: "text-xs text-fm-color-typo-secondary"
302
- }, xo = {
302
+ }, wl = {
303
303
  class: "font-semibold"
304
- }, Lo = {
304
+ }, kl = {
305
305
  class: "rounded-lg border border-fm-color-border-default"
306
- }, So = {
306
+ }, Il = {
307
307
  class: "p-12"
308
- }, wo = {
308
+ }, Al = {
309
309
  class: "text-base font-bold text-fm-color-typo-primary"
310
- }, ko = {
310
+ }, Fl = {
311
311
  class: "space-y-12 p-12"
312
- }, Ao = {
312
+ }, Ml = {
313
313
  class: "text-xs text-fm-color-typo-secondary"
314
- }, Fo = {
314
+ }, Dl = {
315
315
  class: "font-semibold"
316
- }, Io = {
316
+ }, Ol = {
317
317
  class: "rounded-lg border border-fm-color-border-default"
318
- }, Mo = {
318
+ }, Tl = {
319
319
  class: "p-12"
320
- }, Do = {
320
+ }, jl = {
321
321
  class: "text-base font-bold text-fm-color-typo-primary"
322
- }, Oo = {
322
+ }, Pl = {
323
323
  class: "space-y-12 p-12"
324
- }, To = {
324
+ }, Vl = {
325
325
  class: "text-xs text-fm-color-typo-secondary"
326
- }, jo = {
326
+ }, El = {
327
327
  class: "font-semibold"
328
- }, Po = {
328
+ }, Rl = {
329
329
  key: 0
330
- }, Vo = {
330
+ }, Cl = {
331
331
  class: "text-xs text-fm-color-typo-secondary"
332
- }, Eo = {
332
+ }, Ul = {
333
333
  key: 0,
334
334
  class: "font-semibold"
335
- }, Ro = {
335
+ }, $l = {
336
336
  key: 1,
337
337
  class: "break-all font-mono text-xs text-fm-color-typo-secondary"
338
- }, Co = {
338
+ }, Nl = {
339
339
  key: 1
340
- }, Uo = {
340
+ }, Yl = {
341
341
  class: "text-xs text-fm-color-typo-secondary"
342
- }, $o = {
342
+ }, Bl = {
343
343
  class: "font-semibold whitespace-pre-line"
344
- }, No = {
344
+ }, Kl = {
345
345
  class: "text-xs text-fm-color-typo-secondary"
346
- }, Yo = {
346
+ }, zl = {
347
347
  class: "font-semibold"
348
- }, Bo = {
348
+ }, ql = {
349
349
  class: "text-xs text-fm-color-typo-secondary"
350
- }, Ko = {
350
+ }, Hl = {
351
351
  class: "break-all font-mono text-xs font-semibold"
352
- }, zo = {
352
+ }, Wl = {
353
353
  key: 2
354
- }, qo = {
354
+ }, Jl = {
355
355
  class: "text-xs text-fm-color-typo-secondary"
356
- }, Ho = {
356
+ }, Gl = {
357
357
  class: "mt-4 space-y-4"
358
- }, Wo = {
358
+ }, Xl = {
359
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"
360
- }, Jo = {
360
+ }, Ql = {
361
361
  class: "text-xs font-semibold"
362
- }, Go = {
362
+ }, Zl = {
363
363
  key: 0,
364
364
  class: "text-fm-color-typo-secondary"
365
- }, Xo = {
365
+ }, eo = {
366
366
  key: 3
367
- }, Qo = {
367
+ }, to = {
368
368
  class: "text-xs text-fm-color-typo-secondary"
369
- }, Zo = {
369
+ }, lo = {
370
370
  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, Ie = 1e3, he = "__feedmeAdmin__", el = "D MMM YYYY h:mm A", tl = "YYYY-MM-DD HH:mm", V = "YYYY-MM-DD", He = "audit-log-export-fields", ol = /* @__PURE__ */ We({
371
+ }, ie = 100, Me = 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({
372
372
  __name: "AuditLogList",
373
- setup(o) {
373
+ setup(l) {
374
374
  const {
375
- t: l
376
- } = Je(), c = Pt(), L = qt(), j = f(!1), A = f(!1), w = f([]), s = f(null), D = f(!1);
375
+ t: o
376
+ } = Qe(), c = Ct(), L = Gt(), j = f(!1), I = f(!1), w = f([]), s = f(null), D = f(!1);
377
377
  async function P(e) {
378
378
  const t = Uint8Array.from(atob(e), (r) => r.charCodeAt(0)), u = new DecompressionStream("gzip"), g = u.writable.getWriter();
379
379
  return await g.write(t), await g.close(), new Response(u.readable).text();
380
380
  }
381
381
  const v = f("");
382
- let F = 0;
382
+ let A = 0;
383
383
  Q(() => {
384
384
  var e, t;
385
385
  return (t = (e = s.value) == null ? void 0 : e.metadata) == null ? void 0 : t.requestBody;
386
386
  }, async (e) => {
387
- const t = ++F;
387
+ const t = ++A;
388
388
  if (!e) {
389
389
  v.value = "";
390
390
  return;
@@ -396,10 +396,10 @@ const ue = [
396
396
  if (e.startsWith("gzip:")) {
397
397
  try {
398
398
  const u = await P(e.slice(5));
399
- if (t !== F) return;
399
+ if (t !== A) return;
400
400
  v.value = JSON.stringify(JSON.parse(u), null, 2);
401
401
  } catch {
402
- if (t !== F) return;
402
+ if (t !== A) return;
403
403
  v.value = e;
404
404
  }
405
405
  return;
@@ -412,9 +412,9 @@ const ue = [
412
412
  }, {
413
413
  immediate: !0
414
414
  });
415
- const z = f(1), _e = f(!1), J = f(0), te = y(() => Math.max(1, Math.ceil(J.value / ie))), oe = x().format("YYYY-MM-DD"), m = f({
416
- startDate: `${oe} 00:00`,
417
- endDate: `${oe} 23:59`
415
+ const z = 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`
418
418
  }), _ = f(), k = f(), S = f(), O = f(), T = f("all");
419
419
  function d(e) {
420
420
  return typeof e == "string" ? [e] : Array.isArray(e) ? e.filter((t) => typeof t == "string") : [];
@@ -424,60 +424,60 @@ const ue = [
424
424
  const t = ue.find((u) => u.key !== "all" && u.subjectPrefixes.some((g) => e.startsWith(g)));
425
425
  return (t == null ? void 0 : t.key) ?? "other";
426
426
  }
427
- function le(e) {
427
+ function oe(e) {
428
428
  const t = H.indexOf(e);
429
429
  return t === -1 ? H.length : t;
430
430
  }
431
- const Me = y(() => ue.map(({
431
+ const De = h(() => ue.map(({
432
432
  key: e
433
433
  }) => ({
434
- label: l(`auditLog.modules.${e}`),
434
+ label: o(`auditLog.modules.${e}`),
435
435
  value: e
436
- }))), E = y(() => ue.find((e) => e.key === T.value) ?? ue[0]), ae = y(() => T.value === "all"), de = f([]), ce = f(!1), Ge = y(() => [...ce.value ? [{
437
- label: l("auditLog.user.feedmeAdmin"),
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 ? [{
437
+ label: o("auditLog.user.feedmeAdmin"),
438
438
  value: he
439
439
  }] : [], ...L.members.map((e) => ({
440
440
  label: e.name,
441
441
  value: e.doc.userId
442
442
  })), ...de.value.map((e) => ({
443
- label: `${e.name} (${l("auditLog.user.feedmeAdmin")})`,
443
+ label: `${e.name} (${o("auditLog.user.feedmeAdmin")})`,
444
444
  value: e.userId
445
- }))]), Y = y(() => {
445
+ }))]), Y = h(() => {
446
446
  const e = _.value ?? [];
447
447
  return {
448
448
  userIds: e.filter((t) => t !== he),
449
449
  feedmeAdminActors: e.includes(he)
450
450
  };
451
- }), De = y(() => {
452
- const e = qe.flatMap((r) => d(r.subject).map((I) => ({
451
+ }), Oe = h(() => {
452
+ const e = Je.flatMap((r) => d(r.subject).map((F) => ({
453
453
  label: r.label,
454
- value: I
455
- }))), t = Object.entries(Ke).map(([r, I]) => ({
456
- label: I,
454
+ value: F
455
+ }))), t = Object.entries(He).map(([r, F]) => ({
456
+ label: F,
457
457
  value: r
458
458
  })), u = /* @__PURE__ */ new Set(), g = [];
459
459
  for (const r of [...e, ...t])
460
460
  if (!u.has(r.value)) {
461
461
  u.add(r.value);
462
- const I = $(r.value);
462
+ const F = $(r.value);
463
463
  g.push({
464
464
  ...r,
465
- group: l(`auditLog.modules.${I}`)
465
+ group: o(`auditLog.modules.${F}`)
466
466
  });
467
467
  }
468
- return g.sort((r, I) => le($(r.value)) - le($(I.value)));
469
- }), Xe = y(() => ae.value ? De.value : De.value.filter((e) => $(e.value) === T.value));
470
- function Qe(e, t) {
468
+ return g.sort((r, F) => oe($(r.value)) - oe($(F.value)));
469
+ }), et = h(() => ae.value ? Oe.value : Oe.value.filter((e) => $(e.value) === T.value));
470
+ function tt(e, t) {
471
471
  const u = t.toLowerCase();
472
472
  return e.label.toLowerCase().includes(u) || e.value.replace(/^business::/, "").toLowerCase().includes(u) ? !0 : e.value.toLowerCase().includes(u);
473
473
  }
474
- const U = y(() => ({
475
- manage: l("auditLog.action.manage"),
476
- create: l("auditLog.action.create"),
477
- read: l("auditLog.action.read"),
478
- update: l("auditLog.action.update"),
479
- delete: l("auditLog.action.delete")
480
- })), Ze = y(() => [{
474
+ const U = h(() => ({
475
+ manage: o("auditLog.action.manage"),
476
+ create: o("auditLog.action.create"),
477
+ read: o("auditLog.action.read"),
478
+ update: o("auditLog.action.update"),
479
+ delete: o("auditLog.action.delete")
480
+ })), lt = h(() => [{
481
481
  label: U.value.manage,
482
482
  value: "manage"
483
483
  }, {
@@ -492,137 +492,150 @@ const ue = [
492
492
  }, {
493
493
  label: U.value.delete,
494
494
  value: "delete"
495
- }]), me = y(() => ({
496
- allowed: l("auditLog.outcome.success"),
497
- denied: l("auditLog.outcome.failed"),
498
- skipped: l("auditLog.outcome.skipped")
499
- })), et = y(() => [{
495
+ }]), me = h(() => ({
496
+ allowed: o("auditLog.outcome.success"),
497
+ denied: o("auditLog.outcome.failed"),
498
+ skipped: o("auditLog.outcome.skipped")
499
+ })), _e = h(() => {
500
+ var e;
501
+ return ((e = c.sessionUser.value) == null ? void 0 : e.isInternal) ?? !1;
502
+ });
503
+ function Te(e) {
504
+ return !_e.value && e === "skipped" ? "allowed" : e;
505
+ }
506
+ function je(e) {
507
+ return !(e != null && e.length) || _e.value ? e : e.includes("allowed") ? [.../* @__PURE__ */ new Set([...e, "skipped"])] : e;
508
+ }
509
+ const ot = h(() => [{
500
510
  label: me.value.allowed,
501
511
  value: "allowed"
502
512
  }, {
503
513
  label: me.value.denied,
504
514
  value: "denied"
505
- }, {
515
+ }, ..._e.value ? [{
506
516
  label: me.value.skipped,
507
517
  value: "skipped"
508
- }]), tt = y(() => ({
509
- admin: l("auditLog.detail.resolvedFromValue.admin"),
510
- staff: l("auditLog.detail.resolvedFromValue.staff"),
511
- permissionSet: l("auditLog.detail.resolvedFromValue.permissionSet"),
512
- systemPermissionSet: l("auditLog.detail.resolvedFromValue.systemPermissionSet"),
513
- custom: l("auditLog.detail.resolvedFromValue.custom"),
514
- "no-match": l("auditLog.detail.resolvedFromValue.noMatch"),
515
- unknown: l("auditLog.detail.resolvedFromValue.unknown")
516
- })), ot = y(() => ({
518
+ }] : []]), at = h(() => ({
519
+ admin: o("auditLog.detail.resolvedFromValue.admin"),
520
+ staff: o("auditLog.detail.resolvedFromValue.staff"),
521
+ permissionSet: o("auditLog.detail.resolvedFromValue.permissionSet"),
522
+ systemPermissionSet: o("auditLog.detail.resolvedFromValue.systemPermissionSet"),
523
+ custom: o("auditLog.detail.resolvedFromValue.custom"),
524
+ "no-match": o("auditLog.detail.resolvedFromValue.noMatch"),
525
+ unknown: o("auditLog.detail.resolvedFromValue.unknown")
526
+ })), st = h(() => ({
517
527
  GET: U.value.read,
518
528
  POST: U.value.create,
519
529
  PUT: U.value.update,
520
530
  PATCH: U.value.update,
521
531
  DELETE: U.value.delete
522
- })), Oe = {
532
+ })), nt = {
523
533
  allowed: "success",
524
534
  denied: "critical",
525
535
  skipped: "warning"
526
536
  };
527
537
  function fe(e) {
528
- return x(e).format(el);
538
+ return x(e).format(oo);
529
539
  }
530
- const lt = y(() => {
540
+ const ut = h(() => {
531
541
  const {
532
542
  startDate: e,
533
543
  endDate: t
534
544
  } = m.value;
535
- return e && t ? `${fe(e)} – ${fe(t)}` : e ? fe(e) : t ? fe(t) : l("auditLog.dateRange.placeholder");
536
- }), at = y(() => [{
537
- label: l("date.predefinedRanges.today"),
545
+ return e && t ? `${fe(e)} – ${fe(t)}` : e ? fe(e) : t ? fe(t) : o("auditLog.dateRange.placeholder");
546
+ }), it = h(() => [{
547
+ label: o("date.predefinedRanges.today"),
538
548
  value: {
539
549
  startDate: x().format(V),
540
550
  endDate: x().format(V)
541
551
  }
542
552
  }, {
543
- label: l("date.predefinedRanges.yesterday"),
553
+ label: o("date.predefinedRanges.yesterday"),
544
554
  value: {
545
555
  startDate: x().subtract(1, "day").format(V),
546
556
  endDate: x().subtract(1, "day").format(V)
547
557
  }
548
558
  }, {
549
- label: l("date.predefinedRanges.thisWeek"),
559
+ label: o("date.predefinedRanges.thisWeek"),
550
560
  value: {
551
561
  startDate: x().startOf("week").format(V),
552
562
  endDate: x().endOf("week").format(V)
553
563
  }
554
564
  }, {
555
- label: l("date.predefinedRanges.lastWeek"),
565
+ label: o("date.predefinedRanges.lastWeek"),
556
566
  value: {
557
567
  startDate: x().subtract(1, "week").startOf("week").format(V),
558
568
  endDate: x().subtract(1, "week").endOf("week").format(V)
559
569
  }
560
570
  }, {
561
- label: l("date.predefinedRanges.last7Days"),
571
+ label: o("date.predefinedRanges.last7Days"),
562
572
  value: {
563
573
  startDate: x().subtract(7, "day").format(V),
564
574
  endDate: x().subtract(1, "day").format(V)
565
575
  }
566
576
  }, {
567
- label: l("date.predefinedRanges.thisMonth"),
577
+ label: o("date.predefinedRanges.thisMonth"),
568
578
  value: {
569
579
  startDate: x().startOf("month").format(V),
570
580
  endDate: x().endOf("month").format(V)
571
581
  }
572
582
  }, {
573
- label: l("date.predefinedRanges.lastMonth"),
583
+ label: o("date.predefinedRanges.lastMonth"),
574
584
  value: {
575
585
  startDate: x().subtract(1, "month").startOf("month").format(V),
576
586
  endDate: x().subtract(1, "month").endOf("month").format(V)
577
587
  }
578
588
  }]);
579
- function ye(e) {
589
+ function xe(e) {
580
590
  var t;
581
- return ((t = qe.find((u) => u.subject === e)) == null ? void 0 : t.label) ?? Ke[e];
591
+ return ((t = Je.find((u) => u.subject === e)) == null ? void 0 : t.label) ?? He[e];
582
592
  }
583
593
  function ve(e) {
584
594
  var u;
585
595
  const t = L.userIdToName[e.userId];
586
- return t || (L.hasLoaded ? (u = c.sessionUser.value) != null && u.isInternal ? `${e.actorName ?? e.userId} (${l("auditLog.user.feedmeAdmin")})` : l("auditLog.user.feedmeAdmin") : 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);
587
597
  }
588
- function Te(e) {
598
+ function Pe(e) {
589
599
  return L.userIdToPhone[e.userId] || "-";
590
600
  }
591
- function st(e) {
601
+ function rt(e) {
592
602
  return L.userIdToEmail[e.userId] || "-";
593
603
  }
594
- function je(e) {
604
+ function Ve(e) {
595
605
  return x(e).format("DD MMM YYYY, HH:mm");
596
606
  }
597
- function nt(e) {
607
+ function dt(e) {
598
608
  return x(e).format("DD MMM YYYY, HH:mm:ss").toUpperCase();
599
609
  }
600
- function Pe(e) {
610
+ function Ee(e) {
601
611
  return U.value[e] ?? e;
602
612
  }
603
- function Ve(e) {
604
- return e.metadata.operationLabel ?? Pe(e.action);
613
+ function Re(e) {
614
+ return e.metadata.operationLabel ?? Ee(e.action);
615
+ }
616
+ function ct(e) {
617
+ return xe(e.subject) ?? e.subject;
605
618
  }
606
- function ut(e) {
607
- return ye(e.subject) ?? e.subject;
619
+ function Le(e) {
620
+ return me.value[Te(e)];
608
621
  }
609
- function xe(e) {
610
- return me.value[e];
622
+ function Ce(e) {
623
+ return nt[Te(e)] ?? "neutral";
611
624
  }
612
- function it(e) {
613
- return tt.value[e] ?? e;
625
+ function mt(e) {
626
+ return at.value[e] ?? e;
614
627
  }
615
- function rt(e) {
616
- return e.metadata.requestMethod ? ot.value[e.metadata.requestMethod] ?? e.metadata.requestMethod : Pe(e.action);
628
+ function ft(e) {
629
+ return e.metadata.requestMethod ? st.value[e.metadata.requestMethod] ?? e.metadata.requestMethod : Ee(e.action);
617
630
  }
618
- function Ee(e) {
631
+ function Ue(e) {
619
632
  const t = String(e ?? "");
620
633
  return `"${(/^[=+\-@\t\r]/.test(t) ? `'${t}` : t).replace(/"/g, '""')}"`;
621
634
  }
622
- const Le = [{
635
+ const Se = [{
623
636
  key: "timestamp",
624
637
  labelKey: "auditLog.exportFields.timestamp",
625
- getValue: (e) => je(e.timestamp),
638
+ getValue: (e) => Ve(e.timestamp),
626
639
  defaultSelected: !0
627
640
  }, {
628
641
  key: "userName",
@@ -632,12 +645,12 @@ const ue = [
632
645
  }, {
633
646
  key: "userPhone",
634
647
  labelKey: "auditLog.exportFields.userPhone",
635
- getValue: (e) => Te(e),
648
+ getValue: (e) => Pe(e),
636
649
  defaultSelected: !0
637
650
  }, {
638
651
  key: "subject",
639
652
  labelKey: "auditLog.exportFields.subject",
640
- getValue: (e) => ye(e.subject) ?? e.subject,
653
+ getValue: (e) => xe(e.subject) ?? e.subject,
641
654
  defaultSelected: !0
642
655
  }, {
643
656
  key: "action",
@@ -647,12 +660,12 @@ const ue = [
647
660
  }, {
648
661
  key: "operation",
649
662
  labelKey: "auditLog.exportFields.operation",
650
- getValue: (e) => Ve(e),
663
+ getValue: (e) => Re(e),
651
664
  defaultSelected: !0
652
665
  }, {
653
666
  key: "outcome",
654
667
  labelKey: "auditLog.exportFields.outcome",
655
- getValue: (e) => xe(e.outcome),
668
+ getValue: (e) => Le(e.outcome),
656
669
  defaultSelected: !0
657
670
  }, {
658
671
  key: "businessId",
@@ -694,19 +707,19 @@ const ue = [
694
707
  },
695
708
  defaultSelected: !1
696
709
  }];
697
- function dt() {
710
+ function vt() {
698
711
  try {
699
- const e = localStorage.getItem(He);
712
+ const e = localStorage.getItem(Ge);
700
713
  if (e) {
701
714
  const t = JSON.parse(e);
702
715
  if (Array.isArray(t) && t.length > 0) return new Set(t);
703
716
  }
704
717
  } catch {
705
718
  }
706
- return new Set(Le.filter((e) => e.defaultSelected).map((e) => e.key));
719
+ return new Set(Se.filter((e) => e.defaultSelected).map((e) => e.key));
707
720
  }
708
- const G = f(dt());
709
- function ct(e) {
721
+ const G = f(vt());
722
+ function gt(e) {
710
723
  const t = new Set(G.value);
711
724
  if (t.has(e)) {
712
725
  if (t.size <= 1) return;
@@ -715,21 +728,21 @@ const ue = [
715
728
  t.add(e);
716
729
  G.value = t;
717
730
  try {
718
- localStorage.setItem(He, JSON.stringify([...t]));
731
+ localStorage.setItem(Ge, JSON.stringify([...t]));
719
732
  } catch {
720
733
  }
721
734
  }
722
- async function mt() {
735
+ async function bt() {
723
736
  var e, t, u, g, r;
724
- if (!A.value) {
725
- A.value = !0;
737
+ if (!I.value) {
738
+ I.value = !0;
726
739
  try {
727
740
  const {
728
- startDate: I,
741
+ startDate: F,
729
742
  endDate: B
730
743
  } = m.value, W = E.value.subjectPrefixes, ge = (/* @__PURE__ */ new Date()).toISOString().slice(0, 19).replace("T", " "), se = B ? q(B) : null, b = se && se < ge ? se : ge, X = {
731
- ...I ? {
732
- from: q(I)
744
+ ...F ? {
745
+ from: q(F)
733
746
  } : {},
734
747
  to: b,
735
748
  ...Y.value.userIds.length ? {
@@ -748,45 +761,45 @@ const ue = [
748
761
  actions: O.value
749
762
  } : {},
750
763
  ...(u = S.value) != null && u.length ? {
751
- outcomes: S.value
764
+ outcomes: je(S.value)
752
765
  } : {}
753
- }, Ue = [];
754
- let $e = 0;
766
+ }, Ye = [];
767
+ let Be = 0;
755
768
  for (; ; ) {
756
769
  const R = await pe.read({
757
770
  ...X,
758
- limit: Ie,
759
- offset: $e
771
+ limit: Me,
772
+ offset: Be
760
773
  });
761
- if (Ue.push(...R), R.length < Ie) break;
762
- $e += Ie;
774
+ if (Ye.push(...R), R.length < Me) break;
775
+ Be += Me;
763
776
  }
764
- const Ne = Le.filter((R) => G.value.has(R.key)), yt = Ne.map((R) => l(R.labelKey)), xt = Ue.map((R) => Ne.map((Dt) => Dt.getValue(R) ?? "")), we = -(/* @__PURE__ */ new Date()).getTimezoneOffset(), Lt = we >= 0 ? "+" : "-", St = String(Math.floor(Math.abs(we) / 60)).padStart(2, "0"), wt = String(Math.abs(we) % 60).padStart(2, "0"), kt = `UTC${Lt}${St}:${wt}`, Ye = ((g = c.currentBusiness.value) == null ? void 0 : g.name) || "", At = [I, B].filter(Boolean).join(" – "), Ft = [...[[l("auditLog.title")], [`${l("auditLog.frontMatter.date")}: ${At}`], ...Ye ? [[`${l("auditLog.frontMatter.business")}: ${Ye}`]] : [], [`${l("auditLog.frontMatter.generatedBy")}: ${x().format("DD MMM YYYY, HH:mm")} (${kt})`], []].map((R) => R.map(Ee).join(",")), ...[yt, ...xt].map((R) => R.map(Ee).join(","))].join(`
765
- `), It = `audit-log_${(((r = c.currentBusiness.value) == null ? void 0 : r.name) || "business").replace(/[^a-z0-9_-]+/gi, "_")}_${x().format("YYYYMMDD_HHmmss")}.csv`, Mt = new Blob([`\uFEFF${Ft}`], {
777
+ const Ke = Se.filter((R) => G.value.has(R.key)), wt = Ke.map((R) => o(R.labelKey)), kt = Ye.map((R) => Ke.map((Pt) => Pt.getValue(R) ?? "")), ke = -(/* @__PURE__ */ new Date()).getTimezoneOffset(), It = ke >= 0 ? "+" : "-", At = String(Math.floor(Math.abs(ke) / 60)).padStart(2, "0"), Ft = String(Math.abs(ke) % 60).padStart(2, "0"), Mt = `UTC${It}${At}:${Ft}`, ze = ((g = c.currentBusiness.value) == null ? void 0 : g.name) || "", Dt = [F, B].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
+ `), 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}`], {
766
779
  type: "text/csv;charset=utf-8;"
767
- }), Be = window.URL.createObjectURL(Mt), ne = document.createElement("a");
768
- ne.href = Be, ne.download = It, document.body.appendChild(ne), ne.click(), ne.remove(), window.URL.revokeObjectURL(Be);
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);
769
782
  } finally {
770
- A.value = !1;
783
+ I.value = !1;
771
784
  }
772
785
  }
773
786
  }
774
- const ft = [{
787
+ const pt = [{
775
788
  accessorKey: "timestamp",
776
- header: () => l("auditLog.columns.timestamp"),
789
+ header: () => o("auditLog.columns.timestamp"),
777
790
  cell(e) {
778
- return je(e.row.original.timestamp);
791
+ return Ve(e.row.original.timestamp);
779
792
  }
780
793
  }, {
781
794
  accessorKey: "userId",
782
- header: () => l("auditLog.columns.user"),
795
+ header: () => o("auditLog.columns.user"),
783
796
  enableSorting: !1,
784
797
  size: 220,
785
798
  cell(e) {
786
799
  const t = e.row.original;
787
800
  return p("div", {
788
801
  class: "flex items-center gap-8"
789
- }, [p(ze.FmAvatar, {
802
+ }, [p(We.FmAvatar, {
790
803
  name: ve(t),
791
804
  size: "sm",
792
805
  class: "shrink-0"
@@ -796,53 +809,53 @@ const ue = [
796
809
  class: "truncate font-semibold"
797
810
  }, [ve(t)]), p("p", {
798
811
  class: "truncate text-fm-color-typo-secondary"
799
- }, [Te(t)])])]);
812
+ }, [Pe(t)])])]);
800
813
  }
801
814
  }, {
802
815
  accessorKey: "subject",
803
- header: () => l("auditLog.columns.subject"),
816
+ header: () => o("auditLog.columns.subject"),
804
817
  cell(e) {
805
818
  const t = e.row.original;
806
- return ye(t.subject) ?? t.subject;
819
+ return xe(t.subject) ?? t.subject;
807
820
  }
808
821
  }, {
809
822
  accessorKey: "action",
810
- header: () => l("auditLog.columns.action"),
823
+ header: () => o("auditLog.columns.action"),
811
824
  enableSorting: !1,
812
825
  size: 280,
813
826
  meta: {
814
827
  cellSpanClass: "audit-log-action-label"
815
828
  },
816
829
  cell(e) {
817
- return Ve(e.row.original);
830
+ return Re(e.row.original);
818
831
  }
819
832
  }, {
820
833
  accessorKey: "outcome",
821
- header: () => l("auditLog.columns.outcome"),
834
+ header: () => o("auditLog.columns.outcome"),
822
835
  enableSorting: !1,
823
836
  cell(e) {
824
837
  const t = e.row.original;
825
- return p(ze.FmChip, {
826
- variant: Oe[t.outcome] ?? "neutral",
827
- label: xe(t.outcome),
838
+ return p(We.FmChip, {
839
+ variant: Ce(t.outcome),
840
+ label: Le(t.outcome),
828
841
  compact: !0
829
842
  }, null);
830
843
  }
831
844
  }];
832
845
  function q(e) {
833
- const t = x(e, tl);
846
+ const t = x(e, ao);
834
847
  return new Date(t.year(), t.month(), t.date(), t.hour(), t.minute(), 0).toISOString().slice(0, 19).replace("T", " ");
835
848
  }
836
- async function Re() {
849
+ async function $e() {
837
850
  var e, t, u;
838
851
  j.value = !0;
839
852
  try {
840
853
  const {
841
854
  startDate: g,
842
855
  endDate: r
843
- } = m.value, I = (z.value - 1) * ie, B = E.value.subjectPrefixes, W = await pe.read({
856
+ } = m.value, F = (z.value - 1) * ie, B = E.value.subjectPrefixes, W = await pe.read({
844
857
  limit: ie,
845
- offset: I,
858
+ offset: F,
846
859
  ...g ? {
847
860
  from: q(g)
848
861
  } : {},
@@ -865,15 +878,15 @@ const ue = [
865
878
  actions: O.value
866
879
  } : {},
867
880
  ...(u = S.value) != null && u.length ? {
868
- outcomes: S.value
881
+ outcomes: je(S.value)
869
882
  } : {}
870
883
  });
871
- w.value = W, _e.value = W.length === ie;
884
+ w.value = W, ye.value = W.length === ie;
872
885
  } finally {
873
886
  j.value = !1;
874
887
  }
875
888
  }
876
- const Ce = y(() => {
889
+ const Ne = h(() => {
877
890
  var e;
878
891
  return JSON.stringify({
879
892
  businessId: ((e = c.currentBusiness.value) == null ? void 0 : e._id) ?? "",
@@ -885,8 +898,8 @@ const ue = [
885
898
  moduleKey: T.value
886
899
  });
887
900
  });
888
- async function vt() {
889
- var g, r, I;
901
+ async function ht() {
902
+ var g, r, F;
890
903
  const {
891
904
  startDate: e,
892
905
  endDate: t
@@ -913,37 +926,37 @@ const ue = [
913
926
  ...(r = O.value) != null && r.length ? {
914
927
  actions: O.value
915
928
  } : {},
916
- ...(I = S.value) != null && I.length ? {
929
+ ...(F = S.value) != null && F.length ? {
917
930
  outcomes: S.value
918
931
  } : {}
919
932
  });
920
933
  }
921
- Q(Ce, async () => {
934
+ Q(Ne, async () => {
922
935
  var e;
923
- z.value = 1, (e = c.currentBusiness.value) != null && e._id && await Promise.all([vt(), Re()]);
936
+ z.value = 1, (e = c.currentBusiness.value) != null && e._id && await Promise.all([ht(), $e()]);
924
937
  }, {
925
938
  immediate: !0
926
939
  }), Q(T, () => {
927
940
  k.value = void 0;
928
941
  });
929
- let Se = !1;
930
- async function gt({
942
+ let we = !1;
943
+ async function yt({
931
944
  pageIndex: e
932
945
  }) {
933
946
  var t;
934
- if ((t = c.currentBusiness.value) != null && t._id && e !== 0 && !Se) {
935
- Se = !0, z.value = e + 1;
947
+ if ((t = c.currentBusiness.value) != null && t._id && e !== 0 && !we) {
948
+ we = !0, z.value = e + 1;
936
949
  try {
937
- await Re();
950
+ await $e();
938
951
  } finally {
939
- Se = !1;
952
+ we = !1;
940
953
  }
941
954
  }
942
955
  }
943
- function bt(e) {
956
+ function _t(e) {
944
957
  s.value = e, D.value = !0;
945
958
  }
946
- function pt() {
959
+ function xt() {
947
960
  D.value = !1, s.value = null;
948
961
  }
949
962
  Q(c.currentBusiness, (e) => {
@@ -951,13 +964,13 @@ const ue = [
951
964
  }, {
952
965
  immediate: !0
953
966
  });
954
- function ht() {
967
+ function Lt() {
955
968
  const e = _.value;
956
969
  if (!(e != null && e.length)) return;
957
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);
958
971
  g.length !== e.length && (_.value = g.length ? g : void 0);
959
972
  }
960
- async function _t() {
973
+ async function St() {
961
974
  var u;
962
975
  if (!((u = c.currentBusiness.value) != null && u._id)) return;
963
976
  const {
@@ -980,7 +993,7 @@ const ue = [
980
993
  } catch {
981
994
  de.value = [], ce.value = !1;
982
995
  }
983
- ht();
996
+ Lt();
984
997
  }
985
998
  return Q(() => {
986
999
  var e;
@@ -988,145 +1001,145 @@ const ue = [
988
1001
  businessId: (e = c.currentBusiness.value) == null ? void 0 : e._id,
989
1002
  range: m.value
990
1003
  };
991
- }, () => _t(), {
1004
+ }, () => St(), {
992
1005
  immediate: !0,
993
1006
  deep: !0
994
1007
  }), (e, t) => {
995
- const u = C("FmSpacer"), g = C("FmButton"), r = C("FmMenuItem"), I = C("FmMenu"), B = C("FmChip"), W = C("FmDateRangePicker"), ge = C("FmTable"), se = C("FmSideSheet");
996
- return h(), M(ee, null, [p(Rt, {
997
- heading: n(l)("auditLog.title")
1008
+ const u = C("FmSpacer"), g = C("FmButton"), r = C("FmMenuItem"), F = C("FmMenu"), B = 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")
998
1011
  }, {
999
1012
  "append-heading": K(() => [p(u), p(g, {
1000
1013
  variant: "primary",
1001
1014
  "prepend-icon": "upload",
1002
- label: n(l)("auditLog.export"),
1003
- disabled: w.value.length === 0 || A.value || n(L).isLoading || n(L).members.length === 0,
1004
- loading: A.value,
1005
- onClick: mt
1006
- }, null, 8, ["label", "disabled", "loading"]), p(I, {
1015
+ label: n(o)("auditLog.export"),
1016
+ disabled: w.value.length === 0 || I.value || n(L).isLoading || n(L).members.length === 0,
1017
+ loading: I.value,
1018
+ onClick: bt
1019
+ }, null, 8, ["label", "disabled", "loading"]), p(F, {
1007
1020
  "close-on-click": !1,
1008
1021
  "z-index": 50
1009
1022
  }, {
1010
1023
  "menu-button": K(() => [p(g, {
1011
1024
  variant: "tertiary",
1012
1025
  icon: "settings",
1013
- "aria-label": n(l)("auditLog.exportSettings.title"),
1014
- disabled: A.value
1026
+ "aria-label": n(o)("auditLog.exportSettings.title"),
1027
+ disabled: I.value
1015
1028
  }, null, 8, ["aria-label", "disabled"])]),
1016
- default: K(() => [a("div", Ht, [a("p", Wt, i(n(l)("auditLog.exportSettings.title")), 1), (h(), M(ee, null, re(Le, (b) => p(r, {
1029
+ default: K(() => [a("div", Xt, [a("p", Qt, i(n(o)("auditLog.exportSettings.title")), 1), (y(), M(ee, null, re(Se, (b) => p(r, {
1017
1030
  key: b.key,
1018
- label: n(l)(b.labelKey),
1031
+ label: n(o)(b.labelKey),
1019
1032
  "has-checkbox": "",
1020
1033
  "model-value": G.value.has(b.key),
1021
1034
  disabled: G.value.has(b.key) && G.value.size === 1,
1022
- onClick: (X) => ct(b.key)
1035
+ onClick: (X) => gt(b.key)
1023
1036
  }, null, 8, ["label", "model-value", "disabled", "onClick"])), 64))])]),
1024
1037
  _: 1
1025
1038
  })]),
1026
- default: K(() => [a("div", Jt, [a("div", Gt, [p(zt, {
1039
+ default: K(() => [a("div", Zt, [a("div", el, [p(Jt, {
1027
1040
  modelValue: T.value,
1028
1041
  "onUpdate:modelValue": t[0] || (t[0] = (b) => T.value = b),
1029
- items: Me.value
1030
- }, null, 8, ["modelValue", "items"]), a("div", Xt, [p(W, {
1042
+ items: De.value
1043
+ }, null, 8, ["modelValue", "items"]), a("div", tl, [p(W, {
1031
1044
  modelValue: m.value,
1032
1045
  "onUpdate:modelValue": t[1] || (t[1] = (b) => m.value = b),
1033
1046
  "show-predefined-range": "",
1034
1047
  "show-time": "",
1035
- "predefined-range": at.value
1048
+ "predefined-range": it.value
1036
1049
  }, {
1037
1050
  "trigger-button": K(() => [p(B, {
1038
- label: lt.value,
1051
+ label: ut.value,
1039
1052
  icon: "calendar_month"
1040
1053
  }, null, 8, ["label"])]),
1041
1054
  _: 1
1042
- }, 8, ["modelValue", "predefined-range"]), a("div", Qt, [p(be, {
1055
+ }, 8, ["modelValue", "predefined-range"]), a("div", ll, [p(be, {
1043
1056
  modelValue: _.value,
1044
1057
  "onUpdate:modelValue": t[2] || (t[2] = (b) => _.value = b),
1045
- items: Ge.value,
1058
+ items: Ze.value,
1046
1059
  multiple: "",
1047
1060
  variant: "dark",
1048
- placeholder: n(l)("auditLog.filter.user_placeholder"),
1049
- "selected-prefix": n(l)("auditLog.filter.selected_user_prefix"),
1061
+ placeholder: n(o)("auditLog.filter.user_placeholder"),
1062
+ "selected-prefix": n(o)("auditLog.filter.selected_user_prefix"),
1050
1063
  "chip-icon": "account_circle"
1051
- }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div", Zt, [p(be, {
1064
+ }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div", ol, [p(be, {
1052
1065
  modelValue: k.value,
1053
1066
  "onUpdate:modelValue": t[3] || (t[3] = (b) => k.value = b),
1054
- items: Xe.value,
1055
- "filter-fn": Qe,
1067
+ items: et.value,
1068
+ "filter-fn": tt,
1056
1069
  multiple: "",
1057
1070
  variant: "dark",
1058
- placeholder: n(l)("auditLog.filter.subject_placeholder"),
1059
- "selected-prefix": n(l)("auditLog.filter.selected_subject_prefix"),
1071
+ placeholder: n(o)("auditLog.filter.subject_placeholder"),
1072
+ "selected-prefix": n(o)("auditLog.filter.selected_subject_prefix"),
1060
1073
  "chip-icon": "badge"
1061
- }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div", eo, [p(be, {
1074
+ }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div", al, [p(be, {
1062
1075
  modelValue: O.value,
1063
1076
  "onUpdate:modelValue": t[4] || (t[4] = (b) => O.value = b),
1064
- items: Ze.value,
1077
+ items: lt.value,
1065
1078
  multiple: "",
1066
1079
  variant: "dark",
1067
- placeholder: n(l)("auditLog.filter.action_placeholder"),
1068
- "selected-prefix": n(l)("auditLog.filter.selected_action_prefix"),
1080
+ placeholder: n(o)("auditLog.filter.action_placeholder"),
1081
+ "selected-prefix": n(o)("auditLog.filter.selected_action_prefix"),
1069
1082
  searchable: !1
1070
- }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div", to, [p(be, {
1083
+ }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div", sl, [p(be, {
1071
1084
  modelValue: S.value,
1072
1085
  "onUpdate:modelValue": t[5] || (t[5] = (b) => S.value = b),
1073
- items: et.value,
1086
+ items: ot.value,
1074
1087
  multiple: "",
1075
1088
  variant: "dark",
1076
- placeholder: n(l)("auditLog.filter.status_placeholder"),
1077
- "selected-prefix": n(l)("auditLog.filter.selected_status_prefix"),
1089
+ placeholder: n(o)("auditLog.filter.status_placeholder"),
1090
+ "selected-prefix": n(o)("auditLog.filter.selected_status_prefix"),
1078
1091
  searchable: !1,
1079
1092
  "chip-icon": "check_circle"
1080
- }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])])]), !j.value && w.value.length === 0 ? (h(), Z(n(Ct), {
1093
+ }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])])]), !j.value && w.value.length === 0 ? (y(), Z(n(Yt), {
1081
1094
  key: 0,
1082
- title: n(l)("auditLog.noData.title"),
1083
- subtitle: n(l)("auditLog.noData.subtitle")
1084
- }, null, 8, ["title", "subtitle"])) : (h(), Z(Vt, {
1095
+ title: n(o)("auditLog.noData.title"),
1096
+ subtitle: n(o)("auditLog.noData.subtitle")
1097
+ }, null, 8, ["title", "subtitle"])) : (y(), Z(Ut, {
1085
1098
  key: 1
1086
1099
  }, {
1087
- default: K(() => [(h(), Z(ge, {
1088
- key: Ce.value,
1089
- "column-defs": ft,
1100
+ default: K(() => [(y(), Z(ge, {
1101
+ key: Ne.value,
1102
+ "column-defs": pt,
1090
1103
  "row-data": w.value,
1091
1104
  "page-size": ie,
1092
1105
  "page-count": te.value,
1093
1106
  "row-count": J.value,
1094
- "fetch-fn": gt,
1107
+ "fetch-fn": yt,
1095
1108
  "hide-footer": te.value <= 1,
1096
1109
  loading: j.value,
1097
1110
  "pin-header-row": "",
1098
1111
  class: "audit-log-list-table min-h-0 flex-1 cursor-pointer",
1099
- onRowClick: t[6] || (t[6] = (b) => bt(b.original))
1112
+ onRowClick: t[6] || (t[6] = (b) => _t(b.original))
1100
1113
  }, null, 8, ["row-data", "page-count", "row-count", "hide-footer", "loading"]))]),
1101
1114
  _: 1
1102
1115
  }))])]),
1103
1116
  _: 1
1104
1117
  }, 8, ["heading"]), p(se, {
1105
- header: n(l)("auditLog.detail.header"),
1118
+ header: n(o)("auditLog.detail.header"),
1106
1119
  "model-value": D.value,
1107
1120
  "max-width": 480,
1108
1121
  "dismiss-away": "",
1109
1122
  "onUpdate:modelValue": t[7] || (t[7] = (b) => {
1110
- b || pt();
1123
+ b || xt();
1111
1124
  })
1112
1125
  }, {
1113
- default: K(() => [s.value ? (h(), M("div", oo, [a("div", lo, [a("div", ao, [a("p", so, i(ut(s.value)), 1)]), p(B, {
1114
- variant: Oe[s.value.outcome] ?? "neutral",
1115
- label: xe(s.value.outcome),
1126
+ default: K(() => [s.value ? (y(), M("div", nl, [a("div", ul, [a("div", il, [a("p", rl, i(ct(s.value)), 1)]), p(B, {
1127
+ variant: Ce(s.value.outcome),
1128
+ label: Le(s.value.outcome),
1116
1129
  compact: ""
1117
- }, null, 8, ["variant", "label"])]), a("div", no, [a("div", uo, [a("div", null, [a("p", io, i(n(l)("auditLog.detail.date")), 1), a("p", ro, i(nt(s.value.timestamp)), 1)]), a("div", null, [a("p", co, i(n(l)("auditLog.detail.user")), 1), a("p", mo, i(ve(s.value)), 1)]), a("div", null, [a("p", fo, i(n(l)("auditLog.detail.email")), 1), a("p", vo, i(st(s.value)), 1)]), s.value.field ? (h(), M("div", go, [a("p", bo, i(n(l)("auditLog.detail.field")), 1), a("p", po, i(s.value.field), 1)])) : N("", !0), a("div", null, [a("p", ho, i(n(l)("auditLog.detail.business")), 1), a("p", _o, i(s.value.businessId || "-"), 1)]), a("div", null, [a("p", yo, i(n(l)("auditLog.detail.restaurant")), 1), a("p", xo, i(s.value.restaurantId || "-"), 1)])])]), a("div", Lo, [a("div", So, [a("p", wo, i(n(l)("auditLog.detail.eventDetails")), 1)]), t[8] || (t[8] = a("hr", {
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", {
1118
1131
  class: "border-fm-color-border-default"
1119
- }, null, -1)), a("div", ko, [a("div", null, [a("p", Ao, i(n(l)("auditLog.detail.actionDescription")), 1), a("p", Fo, i(s.value.metadata.operationLabel || "-"), 1)])])]), a("div", Io, [a("div", Mo, [a("p", Do, i(n(l)("auditLog.detail.metadata")), 1)]), t[9] || (t[9] = a("hr", {
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", {
1120
1133
  class: "border-fm-color-border-default"
1121
- }, null, -1)), a("div", Oo, [a("div", null, [a("p", To, i(n(l)("auditLog.detail.resolvedFrom")), 1), a("p", jo, i(it(s.value.metadata.resolvedFrom)), 1)]), (s.value.metadata.resolvedFrom === "permissionSet" || s.value.metadata.resolvedFrom === "systemPermissionSet") && (s.value.metadata.permissionSetName || s.value.metadata.permissionSetId) ? (h(), M("div", Po, [a("p", Vo, i(n(l)("auditLog.detail.permissionSet")), 1), s.value.metadata.permissionSetName ? (h(), M("p", Eo, i(s.value.metadata.permissionSetName), 1)) : N("", !0), s.value.metadata.permissionSetId ? (h(), M("p", Ro, i(s.value.metadata.permissionSetId), 1)) : N("", !0)])) : N("", !0), s.value.metadata.reason ? (h(), M("div", Co, [a("p", Uo, i(n(l)("auditLog.detail.reason")), 1), a("p", $o, i(s.value.metadata.reason), 1)])) : N("", !0), a("div", null, [a("p", No, i(n(l)("auditLog.detail.requestMethod")), 1), a("p", Yo, i(rt(s.value)), 1)]), a("div", null, [a("p", Bo, i(n(l)("auditLog.detail.requestPath")), 1), a("p", Ko, i(s.value.metadata.requestPath || "-"), 1)]), s.value.metadata.trace && s.value.metadata.trace.length > 0 ? (h(), M("div", zo, [a("p", qo, i(n(l)("auditLog.detail.permissionTrace")), 1), a("ol", Ho, [(h(!0), M(ee, null, re(s.value.metadata.trace, (b, X) => (h(), M("li", {
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", {
1122
1135
  key: X,
1123
1136
  class: "flex items-center gap-6"
1124
- }, [a("span", Wo, i(X + 1), 1), a("span", Jo, i(b), 1), X < s.value.metadata.trace.length - 1 ? (h(), M("span", Go, "→")) : N("", !0)]))), 128))])])) : N("", !0), v.value ? (h(), M("div", Xo, [a("p", Qo, i(n(l)("auditLog.detail.requestBody")), 1), a("pre", Zo, i(v.value), 1)])) : N("", !0)])])])) : N("", !0)]),
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)]),
1125
1138
  _: 1
1126
1139
  }, 8, ["header", "model-value"])], 64);
1127
1140
  };
1128
1141
  }
1129
- }), bl = /* @__PURE__ */ Et(ol, [["__scopeId", "data-v-b6a77eea"]]);
1142
+ }), _o = /* @__PURE__ */ $t(so, [["__scopeId", "data-v-a0d27858"]]);
1130
1143
  export {
1131
- bl as default
1144
+ _o as default
1132
1145
  };