@feedmepos/mf-report 5.22.13-beta.1 → 5.22.14-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/dist/App-Cwppqefm.js +294 -0
  2. package/dist/{BaseDialog.vue_vue_type_script_setup_true_lang-CzbeFyTt.js → BaseDialog.vue_vue_type_script_setup_true_lang-CcKWqqNP.js} +471 -464
  3. package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-B06jDFgJ.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-CryPHoYr.js} +2 -2
  4. package/dist/{Default.vue_vue_type_script_setup_true_lang-BTCBYTaC.js → Default.vue_vue_type_script_setup_true_lang-DU3zkEF1.js} +2 -2
  5. package/dist/{FilterSelector.vue_vue_type_script_setup_true_lang-Ccr5PmzE.js → FilterSelector.vue_vue_type_script_setup_true_lang-CyW-5xr4.js} +7 -7
  6. package/dist/{InsightView-C0TwLCJv.js → InsightView-DAnaBH3D.js} +6 -6
  7. package/dist/{Integration-BFEaM0Wz.js → Integration-DiNs52W5.js} +5 -5
  8. package/dist/{Integrations-CG-ygqKI.js → Integrations-BvgLRF5N.js} +5 -5
  9. package/dist/{Layout-D6kcGEx6.js → Layout-BAYV4nCo.js} +1 -1
  10. package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-D3EZc4Vp.js → MenuTab.vue_vue_type_script_setup_true_lang-BZphMQGv.js} +5 -5
  11. package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-CpMCe0cN.js → NavigationTab.vue_vue_type_script_setup_true_lang-DSTG-gQ3.js} +5 -5
  12. package/dist/{NoData.vue_vue_type_script_setup_true_lang-DdX25Qgn.js → NoData.vue_vue_type_script_setup_true_lang-zS79GrjC.js} +1 -1
  13. package/dist/{OverviewView-ATC5S46N.js → OverviewView-CvRMdLbB.js} +5 -5
  14. package/dist/{Report-CVNA4oKn.js → Report-C6445626.js} +164 -154
  15. package/dist/{ReportEditor-ZXjzIVWj.js → ReportEditor-Cy8f2WFu.js} +6 -6
  16. package/dist/{ReportView-C0vzCbYY.js → ReportView-D-T3b10U.js} +9 -9
  17. package/dist/{SelectComponent.vue_vue_type_script_setup_true_lang-BHVPbR3l.js → SelectComponent.vue_vue_type_script_setup_true_lang-CYDZzbCU.js} +1 -1
  18. package/dist/{Setting-BfR6T0tE.js → Setting-DBzyuCx-.js} +5 -5
  19. package/dist/{TileEditor-BQDzUwav.js → TileEditor-CWYE5X71.js} +275 -268
  20. package/dist/{TransitionFade-DlAa1-mg.js → TransitionFade-DwQjFIYA.js} +101 -99
  21. package/dist/{access-Dw5cDt65-DpLiFTpm.js → access-Dw5cDt65-C2c0R9q4.js} +1 -1
  22. package/dist/{app-tS9-0m0b.js → app-BRv3iLF1.js} +11 -11
  23. package/dist/app.js +1 -1
  24. package/dist/assets/{formatChartData.worker-CtCG_oop.js → formatChartData.worker-Df5ziPQ2.js} +7 -7
  25. package/dist/assets/{processTableData.worker-BN2TZ-50.js → processTableData.worker-qpA30azs.js} +7 -7
  26. package/dist/style.css +1 -1
  27. package/dist/{useReportPermission-DEI1PTJT.js → useReportPermission-CDWkdi6R.js} +2 -2
  28. package/dist/{useRestaurantPermission-DTzkzgml.js → useRestaurantPermission-CjG_t7dK.js} +2 -2
  29. package/dist/{vue-i18n-BxRs360O.js → vue-i18n-ComGWqEb.js} +1 -1
  30. package/package.json +1 -1
  31. package/dist/App-pXGWlg3l.js +0 -264
@@ -1,59 +1,59 @@
1
- import { defineComponent as _e, ref as j, watch as ue, computed as b, h as y, withModifiers as Ie, resolveComponent as x, createBlock as G, openBlock as V, withCtx as m, createVNode as l, createElementVNode as h, unref as e, normalizeStyle as $e, normalizeClass as _, withDirectives as H, createElementBlock as Re, Fragment as De, renderList as Fe, toDisplayString as A, createTextVNode as Oe, vShow as Q } from "vue";
2
- import { storeToRefs as me } from "pinia";
3
- import { a as Le, u as Ne } from "./BaseDialog.vue_vue_type_script_setup_true_lang-CzbeFyTt.js";
4
- import { _ as Pe } from "./Default.vue_vue_type_script_setup_true_lang-BTCBYTaC.js";
5
- import { u as Ve } from "./message-dialog-UoMWOnil.js";
6
- import { b as de, e as Ae } from "./vue-i18n-BxRs360O.js";
7
- import { useSnackbar as Je, useBreakpoints as ze, components as Be, FmButtonColorThemeVariant as Te } from "@feedmepos/ui-library";
8
- import { _ as Ue } from "./NoData.vue_vue_type_script_setup_true_lang-DdX25Qgn.js";
9
- import { useRouter as Ee, useRoute as Ke, onBeforeRouteLeave as Me } from "vue-router";
10
- import { useI18n as Ye } from "@feedmepos/mf-common";
1
+ import { defineComponent as Ie, ref as j, watch as me, computed as b, h as v, withModifiers as Re, resolveComponent as x, createBlock as G, openBlock as A, withCtx as m, createVNode as i, createElementVNode as C, unref as e, normalizeStyle as $e, normalizeClass as _, withDirectives as H, createElementBlock as De, Fragment as Fe, renderList as Oe, toDisplayString as J, createTextVNode as Le, vShow as Q } from "vue";
2
+ import { storeToRefs as pe } from "pinia";
3
+ import { a as Ne, u as Pe } from "./BaseDialog.vue_vue_type_script_setup_true_lang-CcKWqqNP.js";
4
+ import { _ as Ve } from "./Default.vue_vue_type_script_setup_true_lang-DU3zkEF1.js";
5
+ import { u as Ae } from "./message-dialog-UoMWOnil.js";
6
+ import { b as de, e as Je } from "./vue-i18n-ComGWqEb.js";
7
+ import { useSnackbar as ze, useBreakpoints as Be, components as Te, FmButtonColorThemeVariant as Ue } from "@feedmepos/ui-library";
8
+ import { _ as Ee } from "./NoData.vue_vue_type_script_setup_true_lang-zS79GrjC.js";
9
+ import { useRouter as Ke, useRoute as Me, onBeforeRouteLeave as Ye } from "vue-router";
10
+ import { useI18n as qe } from "@feedmepos/mf-common";
11
11
  import { r as W } from "./i18n-CI_sQ5d_.js";
12
- import { u as qe } from "./useReportPermission-DEI1PTJT.js";
13
- const je = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ge = { class: "w-[343px]" }, He = { class: "fm-typo-en-body-md-600" }, ct = /* @__PURE__ */ _e({
12
+ import { u as je } from "./useReportPermission-CDWkdi6R.js";
13
+ const Ge = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, He = { class: "w-[343px]" }, Qe = { class: "fm-typo-en-body-md-600" }, ut = /* @__PURE__ */ Ie({
14
14
  __name: "Report",
15
- setup(Qe) {
16
- const { t: a, te: J } = Ye(), X = Ee(), Z = Ke(), p = Le(), pe = Ne(), { business: fe } = me(de()), {
17
- reports: f,
18
- overviewReport: z,
19
- categories: R,
15
+ setup(We) {
16
+ const { t: a, te: z } = qe(), X = Ke(), Z = Me(), p = Ne(), fe = Pe(), { business: ve } = pe(de()), {
17
+ reports: d,
18
+ overviewReport: B,
19
+ categories: $,
20
20
  pinReport: D,
21
- isOpenAddReportDialog: ve,
21
+ isOpenAddReportDialog: ye,
22
22
  scrollPositionY: ee,
23
23
  customReportQuota: F,
24
24
  canCreateCustomReport: te
25
- } = me(p), { promptMessage: oe } = Ve(), { promptLoader: B } = Ae(), u = Je(), { breakpoints: i } = ze(), { canUpdate: ae, canDuplicate: ye, canCreateReport: ge } = qe(), C = j();
26
- Me(() => {
27
- C.value && (ee.value = C.value.$el.children[0].scrollTop);
28
- }), ue(C, () => {
29
- C.value && setTimeout(() => {
30
- C.value.$el.children[0].scrollTop = ee.value;
25
+ } = pe(p), { promptMessage: oe } = Ae(), { promptLoader: T } = Je(), c = ze(), { breakpoints: u } = Be(), { canUpdate: ae, canDuplicate: ge, canDelete: ne, canCreateReport: be } = je(), h = j();
26
+ Ye(() => {
27
+ h.value && (ee.value = h.value.$el.children[0].scrollTop);
28
+ }), me(h, () => {
29
+ h.value && setTimeout(() => {
30
+ h.value.$el.children[0].scrollTop = ee.value;
31
31
  }, 200);
32
32
  });
33
- const T = b(() => D.value && f.value ? f.value.filter((o) => {
33
+ const U = b(() => D.value && d.value ? d.value.filter((o) => {
34
34
  var t;
35
35
  return (t = D.value) == null ? void 0 : t.includes(o.id);
36
36
  }) : []);
37
- ue(
38
- [() => fe.value],
37
+ me(
38
+ [() => ve.value],
39
39
  () => {
40
40
  p.refreshPinReport();
41
41
  },
42
42
  { immediate: !0 }
43
43
  );
44
- const ne = b(() => T.value.length > 0 ? f.value.filter(
45
- (o) => T.value.findIndex((t) => t.id === o.id) === -1
46
- ) : f.value), { FmButton: be, FmMenu: U, FmMenuItem: S, FmIcon: E, FmChip: K } = Be, re = b(() => [
44
+ const re = b(() => U.value.length > 0 ? d.value.filter(
45
+ (o) => U.value.findIndex((t) => t.id === o.id) === -1
46
+ ) : d.value), { FmButton: Ce, FmMenu: E, FmMenuItem: S, FmIcon: K, FmChip: M } = Te, se = b(() => [
47
47
  { value: void 0, label: "All" },
48
- ...R.value.map((o) => ({
48
+ ...$.value.map((o) => ({
49
49
  value: o.id,
50
50
  label: o.name
51
51
  }))
52
- ]), O = j(re.value[0]), M = j(""), k = b(() => ne.value.length === 0 || R.value.length === 0 ? [] : [
53
- ...T.value.map((t) => {
54
- const n = R.value.find((s) => s.id === t.category);
52
+ ]), O = j(se.value[0]), Y = j(""), k = b(() => re.value.length === 0 || $.value.length === 0 ? [] : [
53
+ ...U.value.map((t) => {
54
+ const n = $.value.find((l) => l.id === t.category);
55
55
  return {
56
- name: W(a, J, t.name, "other"),
56
+ name: W(a, z, t.name, "other"),
57
57
  categoryId: (n == null ? void 0 : n.id) ?? "",
58
58
  category: n != null && n.name ? a(`report.category.${n.name}`) : a("report.common.uncategorized"),
59
59
  reportId: t.id,
@@ -63,10 +63,10 @@ const je = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ge
63
63
  canUpdate: ae(t)
64
64
  };
65
65
  }),
66
- ...ne.value.map((t) => {
67
- const n = R.value.find((s) => s.id === t.category);
66
+ ...re.value.map((t) => {
67
+ const n = $.value.find((l) => l.id === t.category);
68
68
  return {
69
- name: W(a, J, t.name, "other"),
69
+ name: W(a, z, t.name, "other"),
70
70
  categoryId: (n == null ? void 0 : n.id) ?? "",
71
71
  category: n != null && n.name ? a(`report.category.${n.name}`) : a("report.common.uncategorized"),
72
72
  reportId: t.id,
@@ -76,9 +76,9 @@ const je = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ge
76
76
  canUpdate: ae(t)
77
77
  };
78
78
  })
79
- ].filter((t) => O.value.value && t.categoryId !== O.value.value ? !1 : `${(t == null ? void 0 : t.name) || ""}${(t == null ? void 0 : t.description) || ""}`.toLowerCase().indexOf(M.value.toLowerCase()) !== -1)), he = b(
79
+ ].filter((t) => O.value.value && t.categoryId !== O.value.value ? !1 : `${(t == null ? void 0 : t.name) || ""}${(t == null ? void 0 : t.description) || ""}`.toLowerCase().indexOf(Y.value.toLowerCase()) !== -1)), he = b(
80
80
  () => k.value.map((o) => `${o.name}${o.category}`).toString()
81
- ), Ce = b(() => [
81
+ ), Se = b(() => [
82
82
  {
83
83
  accessorKey: "name",
84
84
  header: a("report.common.name"),
@@ -92,8 +92,8 @@ const je = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ge
92
92
  meta: {
93
93
  width: "100px"
94
94
  },
95
- cell: (o) => y(
96
- K,
95
+ cell: (o) => v(
96
+ M,
97
97
  {
98
98
  class: `${o.getValue() !== a("report.common.uncategorized") ? "bg-fm-color-system-info-100 text-fm-color-typo-info" : "text-fm-color-typo-secondary"} fm-typo-en-body-sm-600`,
99
99
  compact: !0
@@ -115,23 +115,23 @@ const je = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ge
115
115
  width: "80px"
116
116
  },
117
117
  cell: (o) => {
118
- var r;
119
- const t = o.row.original, n = t.reportId, s = f.value.find((c) => c.id === n), Y = n === ((r = z.value) == null ? void 0 : r.id), w = !1, $ = s ? ye(s) : !1, q = [
118
+ var y;
119
+ const t = o.row.original, n = t.reportId, l = d.value.find((s) => s.id === n), q = n === ((y = B.value) == null ? void 0 : y.id), w = !1, R = l ? ge(l) : !1, V = l ? ne(l) : !1, r = [
120
120
  {
121
121
  label: a("report.common.duplicate"),
122
122
  onClick: () => {
123
- s && $ ? ie(s) : $ || u.open({
123
+ l && R ? ce(l) : R || c.open({
124
124
  message: a("report.messages.noPermissionDuplicateReport"),
125
125
  type: "error"
126
126
  });
127
127
  },
128
128
  variant: "",
129
- disabled: !$
129
+ disabled: !R
130
130
  },
131
131
  {
132
- label: a(Y ? "report.common.unsetAsOverview" : "report.common.setAsOverview"),
132
+ label: a(q ? "report.common.unsetAsOverview" : "report.common.setAsOverview"),
133
133
  onClick: async () => {
134
- s && se(s);
134
+ l && le(l);
135
135
  },
136
136
  variant: "",
137
137
  disabled: !1
@@ -139,26 +139,29 @@ const je = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ge
139
139
  {
140
140
  label: a("report.common.remove"),
141
141
  onClick: () => {
142
- s && le(s);
142
+ l && (V ? ie(l) : c.open({
143
+ message: a("report.messages.noPermissionDeleteReport"),
144
+ type: "error"
145
+ }));
143
146
  },
144
147
  variant: "destructive",
145
- disabled: !t.editable
148
+ disabled: !t.editable || !V
146
149
  }
147
150
  ];
148
- return y(
151
+ return v(
149
152
  "div",
150
153
  {
151
- class: `flex ${i.value.lg || i.value.md ? "justify-end" : ""} items-center`
154
+ class: `flex ${u.value.lg || u.value.md ? "justify-end" : ""} items-center`
152
155
  },
153
156
  {
154
157
  default: () => [
155
- y(
158
+ v(
156
159
  "button",
157
160
  {
158
161
  disabled: w,
159
162
  title: void 0,
160
- onClick: Ie(() => {
161
- s && ce(s);
163
+ onClick: Re(() => {
164
+ l && ue(l);
162
165
  }, ["stop"]),
163
166
  class: `text-fm-color-neutral-gray-400 ${t.pin ? "" : "show-pin"} hover:bg-fm-color-opacity-sm rounded-lg flex items-center justify-center`,
164
167
  disabled: w,
@@ -166,8 +169,8 @@ const je = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ge
166
169
  },
167
170
  {
168
171
  default: () => [
169
- y(
170
- E,
172
+ v(
173
+ K,
171
174
  {
172
175
  name: "keep",
173
176
  class: "px-12 p-8",
@@ -179,8 +182,8 @@ const je = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ge
179
182
  ]
180
183
  }
181
184
  ),
182
- y(
183
- U,
185
+ v(
186
+ E,
184
187
  {
185
188
  stopClickPropagation: !0,
186
189
  shift: !0,
@@ -188,27 +191,27 @@ const je = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ge
188
191
  title: void 0
189
192
  },
190
193
  {
191
- default: () => q.map(
192
- (c) => y(
194
+ default: () => r.map(
195
+ (s) => v(
193
196
  S,
194
197
  {
195
- onClick: c.disabled ? {} : c.onClick,
196
- label: c.label,
197
- class: c.disabled ? "text-fm-color-typo-disabled" : c.variant === "destructive" ? "text-fm-color-typo-error" : "",
198
- disabled: c.disabled
198
+ onClick: s.disabled ? {} : s.onClick,
199
+ label: s.label,
200
+ class: s.disabled ? "text-fm-color-typo-disabled" : s.variant === "destructive" ? "text-fm-color-typo-error" : "",
201
+ disabled: s.disabled
199
202
  },
200
203
  {
201
- label: () => y("p", c.label)
204
+ label: () => v("p", s.label)
202
205
  }
203
206
  )
204
207
  ),
205
- "menu-button": () => y(
206
- be,
208
+ "menu-button": () => v(
209
+ Ce,
207
210
  {
208
211
  variant: "tertiary",
209
212
  size: "md",
210
213
  icon: "more_vert",
211
- iconColor: Te.NeutralGray400,
214
+ iconColor: Ue.NeutralGray400,
212
215
  disabled: w,
213
216
  title: void 0
214
217
  },
@@ -222,21 +225,21 @@ const je = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ge
222
225
  }
223
226
  }
224
227
  ]);
225
- async function se(o) {
226
- await B(async () => {
228
+ async function le(o) {
229
+ await T(async () => {
227
230
  var t;
228
231
  try {
229
- const n = o.id === ((t = z.value) == null ? void 0 : t.id);
230
- await p.updateDefaultReport(n ? null : o.id), u.open({
232
+ const n = o.id === ((t = B.value) == null ? void 0 : t.id);
233
+ await p.updateDefaultReport(n ? null : o.id), c.open({
231
234
  message: `Successfully ${n ? "unset" : "set"} ${o.name} as Overview`,
232
235
  type: "success"
233
236
  });
234
237
  } catch (n) {
235
- u.open({ message: JSON.stringify(n), type: "error" });
238
+ c.open({ message: JSON.stringify(n), type: "error" });
236
239
  }
237
240
  });
238
241
  }
239
- async function Se(o) {
242
+ async function ke(o) {
240
243
  if (await oe({
241
244
  title: a("report.common.duplicate"),
242
245
  message: a("report.messages.confirmAction", {
@@ -245,81 +248,88 @@ const je = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ge
245
248
  })
246
249
  })) {
247
250
  const n = JSON.parse(JSON.stringify(o));
248
- n.editable = !0, n.id = "", n.name = `${n.name} ${a("report.common.duplicate")}`, B(async () => {
251
+ n.editable = !0, n.id = "", n.name = `${n.name} ${a("report.common.duplicate")}`, T(async () => {
249
252
  try {
250
- await p.createOrUpdateReport(n), u.open({
253
+ await p.createOrUpdateReport(n), c.open({
251
254
  message: `${a("report.messages.duplicateSuccess", { name: n.name })}`,
252
255
  type: "success"
253
256
  });
254
- } catch (s) {
255
- u.open({ message: JSON.stringify(s), type: "error" });
257
+ } catch (l) {
258
+ c.open({ message: JSON.stringify(l), type: "error" });
256
259
  }
257
260
  });
258
261
  }
259
262
  }
260
- async function le(o) {
263
+ async function ie(o) {
264
+ if (!ne(o)) {
265
+ c.open({
266
+ message: a("report.messages.noPermissionDeleteReport"),
267
+ type: "error"
268
+ });
269
+ return;
270
+ }
261
271
  await oe({
262
272
  title: a("report.messages.deleteReport"),
263
273
  message: a("report.messages.confirmDelete", { name: o.name })
264
- }) && B(async () => {
274
+ }) && T(async () => {
265
275
  try {
266
- await p.removeReport(o), u.open({
276
+ await p.removeReport(o), c.open({
267
277
  message: a("report.messages.deleteSuccess", { name: o.name }),
268
278
  type: "success"
269
279
  });
270
280
  } catch (n) {
271
- u.open({ message: JSON.stringify(n), type: "error" });
281
+ c.open({ message: JSON.stringify(n), type: "error" });
272
282
  }
273
283
  });
274
284
  }
275
- async function ie(o) {
285
+ async function ce(o) {
276
286
  if (te.value)
277
- await Se(o);
287
+ await ke(o);
278
288
  else {
279
289
  let t = `Your current plan only support up to ${F.value} custom reports.`;
280
- F.value === 0 && (t = "Your current plan does not support custom report."), u.open({
290
+ F.value === 0 && (t = "Your current plan does not support custom report."), c.open({
281
291
  message: t,
282
292
  type: "error"
283
293
  });
284
294
  }
285
295
  }
286
- function ke() {
287
- if (!ge.value) {
288
- u.open({
296
+ function we() {
297
+ if (!be.value) {
298
+ c.open({
289
299
  message: a("report.messages.noPermission"),
290
300
  type: "error"
291
301
  });
292
302
  return;
293
303
  }
294
304
  if (te.value)
295
- ve.value = !0;
305
+ ye.value = !0;
296
306
  else {
297
307
  let o = `Your current plan only support up to ${F.value} custom reports.`;
298
- F.value === 0 && (o = "Your current plan does not support custom report."), u.open({
308
+ F.value === 0 && (o = "Your current plan does not support custom report."), c.open({
299
309
  message: o,
300
310
  type: "error"
301
311
  });
302
312
  }
303
313
  }
304
- function ce(o) {
305
- const t = W(a, J, o.name, "other") ?? "";
306
- D.value && D.value.includes(o.id) ? (u.open({
314
+ function ue(o) {
315
+ const t = W(a, z, o.name, "other") ?? "";
316
+ D.value && D.value.includes(o.id) ? (c.open({
307
317
  message: `${a("report.common.unpin")} ${t} ${a("report.common.successful")}`,
308
318
  type: "success"
309
- }), p.clearPinReport(o.id)) : (u.open({
319
+ }), p.clearPinReport(o.id)) : (c.open({
310
320
  message: `${a("report.common.pin")} ${t} ${a("report.common.successful")}`,
311
321
  type: "success"
312
322
  }), p.cachePinReport(o));
313
323
  }
314
- function we(o) {
324
+ function xe(o) {
315
325
  O.value = o;
316
326
  }
317
- const { selectedLocationIds: I, dateRange: L, compareDateRange: N, timeRange: v, locations: xe } = de(), P = b(() => I.length === xe.length);
327
+ const { selectedLocationIds: I, dateRange: L, compareDateRange: N, timeRange: f, locations: _e } = de(), P = b(() => I.length === _e.length);
318
328
  return (o, t) => {
319
- const n = x("FmPageHead"), s = x("FmSearch"), Y = x("FmForm"), w = x("FmListItem"), $ = x("FmList"), q = x("FmTable");
320
- return V(), G(Pe, null, {
329
+ const n = x("FmPageHead"), l = x("FmSearch"), q = x("FmForm"), w = x("FmListItem"), R = x("FmList"), V = x("FmTable");
330
+ return A(), G(Ve, null, {
321
331
  default: m(() => [
322
- l(n, {
332
+ i(n, {
323
333
  title: e(a)("report.common.report", 1),
324
334
  class: "h-[68px]",
325
335
  actions: [
@@ -330,64 +340,64 @@ const je = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ge
330
340
  prependIcon: "add"
331
341
  }
332
342
  ],
333
- "onClick:action": t[0] || (t[0] = (r) => ke())
343
+ "onClick:action": t[0] || (t[0] = (r) => we())
334
344
  }, null, 8, ["title", "actions"]),
335
- h("div", {
336
- class: _(`overflow-y-hidden flex flex-col gap-8 ${e(i).sm || e(i).xs ? "mb-20" : ""}`),
337
- style: $e({ height: `calc(100% - ${e(i).lg || e(i).md ? 72 : 64}px)` })
345
+ C("div", {
346
+ class: _(`overflow-y-hidden flex flex-col gap-8 ${e(u).sm || e(u).xs ? "mb-20" : ""}`),
347
+ style: $e({ height: `calc(100% - ${e(u).lg || e(u).md ? 72 : 64}px)` })
338
348
  }, [
339
- l(Y, {
340
- class: _(`flex items-center gap-2 ${e(i).sm || e(i).xs ? "px-3" : "px-24"}`)
349
+ i(q, {
350
+ class: _(`flex items-center gap-2 ${e(u).sm || e(u).xs ? "px-3" : "px-24"}`)
341
351
  }, {
342
352
  default: m(() => [
343
- l(e(U), null, {
353
+ i(e(E), null, {
344
354
  "menu-button": m(() => [
345
- l(e(K), { class: "fm-typo-en-body-md-600 text-fm-color-neutral-gray-400" }, {
355
+ i(e(M), { class: "fm-typo-en-body-md-600 text-fm-color-neutral-gray-400" }, {
346
356
  default: m(() => [
347
- h("p", null, A(e(a)(`report.category.${O.value.label}`)), 1),
348
- l(e(E), { name: "expand_more" })
357
+ C("p", null, J(e(a)(`report.category.${O.value.label}`)), 1),
358
+ i(e(K), { name: "expand_more" })
349
359
  ]),
350
360
  _: 1
351
361
  })
352
362
  ]),
353
363
  default: m(() => [
354
- (V(!0), Re(De, null, Fe(re.value, (r, c) => (V(), G(e(S), {
355
- key: c,
364
+ (A(!0), De(Fe, null, Oe(se.value, (r, y) => (A(), G(e(S), {
365
+ key: y,
356
366
  label: e(a)(`report.category.${r.label}`),
357
- onClick: () => we(r)
367
+ onClick: () => xe(r)
358
368
  }, null, 8, ["label", "onClick"]))), 128))
359
369
  ]),
360
370
  _: 1
361
371
  }),
362
- h("div", {
363
- class: _(`flex ${e(i).sm || e(i).xs ? "justify-center items-center" : ""}`)
372
+ C("div", {
373
+ class: _(`flex ${e(u).sm || e(u).xs ? "justify-center items-center" : ""}`)
364
374
  }, [
365
- h("p", je, A(e(a)("report.common.results", { count: k.value.length })), 1)
375
+ C("p", Ge, J(e(a)("report.common.results", { count: k.value.length })), 1)
366
376
  ], 2),
367
- t[3] || (t[3] = h("div", { class: "grow" }, null, -1)),
368
- h("div", Ge, [
369
- l(s, {
370
- modelValue: M.value,
371
- "onUpdate:modelValue": t[1] || (t[1] = (r) => M.value = r),
372
- class: _(`${e(i).lg || e(i).md ? "grow" : ""}`)
377
+ t[3] || (t[3] = C("div", { class: "grow" }, null, -1)),
378
+ C("div", He, [
379
+ i(l, {
380
+ modelValue: Y.value,
381
+ "onUpdate:modelValue": t[1] || (t[1] = (r) => Y.value = r),
382
+ class: _(`${e(u).lg || e(u).md ? "grow" : ""}`)
373
383
  }, null, 8, ["modelValue", "class"])
374
384
  ])
375
385
  ]),
376
386
  _: 1
377
387
  }, 8, ["class"]),
378
- H((V(), G(q, {
388
+ H((A(), G(V, {
379
389
  key: he.value,
380
390
  ref_key: "table",
381
- ref: C,
382
- class: _([e(i).sm || e(i).xs ? "px-0" : "px-24", "report-table"]),
391
+ ref: h,
392
+ class: _([e(u).sm || e(u).xs ? "px-0" : "px-24", "report-table"]),
383
393
  style: { height: "calc(100% - 40px)" },
384
- "column-defs": Ce.value,
394
+ "column-defs": Se.value,
385
395
  "row-data": k.value,
386
396
  "page-size": k.value.length,
387
397
  "hide-footer": !0,
388
398
  "row-class-name": "row",
389
399
  onRowClick: t[2] || (t[2] = (r) => {
390
- e(pe).suppressReportRouteSync = !0, e(p).updateCurrentReportId(r.original.reportId), e(X).push({
400
+ e(fe).suppressReportRouteSync = !0, e(p).updateCurrentReportId(r.original.reportId), e(X).push({
391
401
  name: "reportView",
392
402
  query: {
393
403
  ...e(Z).query,
@@ -396,8 +406,8 @@ const je = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ge
396
406
  endDate: e(L).endDate,
397
407
  compareStartDate: e(N).startDate,
398
408
  compareEndDate: e(N).endDate,
399
- timeStart: e(v).start ? JSON.stringify(e(v).start) : null,
400
- timeEnd: e(v).end ? JSON.stringify(e(v).end) : null,
409
+ timeStart: e(f).start ? JSON.stringify(e(f).start) : null,
410
+ timeEnd: e(f).end ? JSON.stringify(e(f).end) : null,
401
411
  isAllLocation: P.value.toString(),
402
412
  locationIds: P.value ? void 0 : e(I) ? JSON.stringify(e(I)) : void 0
403
413
  }
@@ -405,7 +415,7 @@ const je = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ge
405
415
  })
406
416
  }, {
407
417
  "list-row": m(({ original: r }) => [
408
- l($, {
418
+ i(R, {
409
419
  onClick: () => {
410
420
  r.reportId && (e(p).updateCurrentReportId(r.reportId), e(X).push({
411
421
  name: "reportView",
@@ -416,8 +426,8 @@ const je = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ge
416
426
  endDate: e(L).endDate,
417
427
  compareStartDate: e(N).startDate,
418
428
  compareEndDate: e(N).endDate,
419
- timeStart: e(v).start ? JSON.stringify(e(v).start) : null,
420
- timeEnd: e(v).end ? JSON.stringify(e(v).end) : null,
429
+ timeStart: e(f).start ? JSON.stringify(e(f).start) : null,
430
+ timeEnd: e(f).end ? JSON.stringify(e(f).end) : null,
421
431
  isAllLocation: P.value.toString(),
422
432
  locationIds: P.value ? void 0 : e(I) ? JSON.stringify(e(I)) : void 0
423
433
  }
@@ -425,77 +435,77 @@ const je = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ge
425
435
  }
426
436
  }, {
427
437
  default: m(() => [
428
- l(w, {
438
+ i(w, {
429
439
  tag: "label",
430
440
  label: r.name,
431
441
  clickable: ""
432
442
  }, {
433
443
  append: m(() => [
434
- l(e(K), {
444
+ i(e(M), {
435
445
  class: _(
436
446
  r.category !== "Uncategorized" ? "bg-fm-color-system-info-100 text-fm-color-typo-info" : "text-fm-color-typo-secondary"
437
447
  ),
438
448
  compact: !0
439
449
  }, {
440
450
  default: m(() => [
441
- h("p", He, A(r.category), 1)
451
+ C("p", Qe, J(r.category), 1)
442
452
  ]),
443
453
  _: 2
444
454
  }, 1032, ["class"]),
445
- l(e(U), {
455
+ i(e(E), {
446
456
  placement: "left",
447
457
  "stop-click-propagation": !0
448
458
  }, {
449
459
  "menu-button": m(() => [
450
- l(e(E), {
460
+ i(e(K), {
451
461
  name: "more_vert",
452
462
  class: "btn-color"
453
463
  })
454
464
  ]),
455
465
  default: m(() => {
456
- var c;
466
+ var y;
457
467
  return [
458
- l(e(S), {
468
+ i(e(S), {
459
469
  label: r.pin ? "Unpin" : "Pin",
460
470
  onClick: () => {
461
- const d = e(f).find(
471
+ const s = e(d).find(
462
472
  (g) => g.id === r.reportId
463
473
  );
464
- d && ce(d);
474
+ s && ue(s);
465
475
  }
466
476
  }, null, 8, ["label", "onClick"]),
467
- l(e(S), {
477
+ i(e(S), {
468
478
  label: e(a)("report.common.duplicate"),
469
479
  onClick: () => {
470
- const d = e(f).find(
480
+ const s = e(d).find(
471
481
  (g) => g.id === r.reportId
472
482
  );
473
- d && ie(d);
483
+ s && ce(s);
474
484
  }
475
485
  }, null, 8, ["label", "onClick"]),
476
- l(e(S), {
486
+ i(e(S), {
477
487
  label: e(a)(
478
- r.reportId === ((c = e(z)) == null ? void 0 : c.id) ? "report.common.unsetAsOverview" : "report.common.setAsOverview"
488
+ r.reportId === ((y = e(B)) == null ? void 0 : y.id) ? "report.common.unsetAsOverview" : "report.common.setAsOverview"
479
489
  ),
480
490
  onClick: () => {
481
- const d = e(f).find(
491
+ const s = e(d).find(
482
492
  (g) => g.id === r.reportId
483
493
  );
484
- d && se(d);
494
+ s && le(s);
485
495
  }
486
496
  }, null, 8, ["label", "onClick"]),
487
- H(l(e(S), {
497
+ H(i(e(S), {
488
498
  label: e(a)("report.common.delete"),
489
499
  class: "text-fm-color-typo-error",
490
500
  onClick: () => {
491
- const d = e(f).find(
501
+ const s = e(d).find(
492
502
  (g) => g.id === r.reportId
493
503
  );
494
- d && le(d);
504
+ s && ie(s);
495
505
  }
496
506
  }, {
497
507
  label: m(() => [
498
- Oe(A(e(a)("report.common.delete")), 1)
508
+ Le(J(e(a)("report.common.delete")), 1)
499
509
  ]),
500
510
  _: 2
501
511
  }, 1032, ["label", "onClick"]), [
@@ -516,7 +526,7 @@ const je = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ge
516
526
  }, 8, ["class", "column-defs", "row-data", "page-size"])), [
517
527
  [Q, k.value.length > 0]
518
528
  ]),
519
- H(l(Ue, null, null, 512), [
529
+ H(i(Ee, null, null, 512), [
520
530
  [Q, k.value.length === 0]
521
531
  ])
522
532
  ], 6)
@@ -527,5 +537,5 @@ const je = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ge
527
537
  }
528
538
  });
529
539
  export {
530
- ct as default
540
+ ut as default
531
541
  };