@feedmepos/mf-report 5.28.4-beta.5 → 5.28.4-beta.6

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 (28) hide show
  1. package/dist/{App-DCSVXVKp.js → App-c2BxKgqk.js} +4 -4
  2. package/dist/{DateRangeSelect-DmVGFLJV.js → DateRangeSelect-BpBpNlAF.js} +1 -1
  3. package/dist/{Default.vue_vue_type_script_setup_true_lang-CL8aGE3a.js → Default.vue_vue_type_script_setup_true_lang-D-Se8EHw.js} +1 -1
  4. package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-uuZ1QWYc.js → DynamicWidget.vue_vue_type_script_setup_true_lang-CUomxbbm.js} +4 -4
  5. package/dist/{GlobalFilterSelect.vue_vue_type_script_setup_true_lang-BtndPeRM.js → GlobalFilterSelect.vue_vue_type_script_setup_true_lang-D43rK-ar.js} +3 -3
  6. package/dist/{InsightView-BZkxncj_.js → InsightView-DPRA524-.js} +5 -5
  7. package/dist/{Integration-CVRENAx6.js → Integration-BayS_wae.js} +3 -3
  8. package/dist/{Integrations-C0wgIfD9.js → Integrations-6UBvLfz6.js} +2 -2
  9. package/dist/{Layout-Bisg9_zh.js → Layout-CvY-cS3c.js} +1 -1
  10. package/dist/{LocationSelect.vue_vue_type_script_setup_true_lang-Cb16EEvq.js → LocationSelect.vue_vue_type_script_setup_true_lang-CGAnWHiG.js} +2 -2
  11. package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-CXmfdMyF.js → MenuTab.vue_vue_type_script_setup_true_lang-DeQo93qA.js} +5 -5
  12. package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-DDh4VLdN.js → NavigationTab.vue_vue_type_script_setup_true_lang-Dl2ZSI8f.js} +5 -5
  13. package/dist/{OverviewView-DeCiFfCo.js → OverviewView-SxYadRgK.js} +4 -4
  14. package/dist/{Report-BHKBocSb.js → Report-OGP3775t.js} +154 -154
  15. package/dist/{ReportCanvasView-RDSCKd-W.js → ReportCanvasView-5pLCE58u.js} +3 -3
  16. package/dist/{ReportEditor-C35Jnh8K.js → ReportEditor-C3r_5wKe.js} +7 -7
  17. package/dist/{ReportView-HasEQZ87.js → ReportView-BeNILR1t.js} +6 -6
  18. package/dist/{ReportViewRoute-DHuOc8Us.js → ReportViewRoute-Cw8EbetI.js} +2 -2
  19. package/dist/{Setting-BXX853ip.js → Setting-_scvQJEC.js} +3 -3
  20. package/dist/{Template-aJmM3Zv-.js → Template-CnDYWRaV.js} +3 -3
  21. package/dist/{TileEditor-CsLmrIQs.js → TileEditor-Caal9QVe.js} +6 -6
  22. package/dist/{TilePageStack.vue_vue_type_script_setup_true_lang-H0nTAZus.js → TilePageStack.vue_vue_type_script_setup_true_lang-4IWIJo_S.js} +2 -2
  23. package/dist/{TransitionFade-2Mh-U8Rh.js → TransitionFade-DSsnM6J9.js} +5 -5
  24. package/dist/{app-D2nsPc-w.js → app-e8Pud10z.js} +12 -12
  25. package/dist/app.js +1 -1
  26. package/dist/{report-TzuKTx8E.js → report-AhRrPMU6.js} +1 -1
  27. package/dist/{useRestaurantPermission-C54NQ2lx.js → useRestaurantPermission-D2RhNs5d.js} +1 -1
  28. package/package.json +1 -1
@@ -1,33 +1,33 @@
1
- import { defineComponent as Te, ref as $, watch as Se, computed as R, h as d, withModifiers as he, resolveComponent as I, createBlock as ee, openBlock as z, withCtx as m, createVNode as i, createElementVNode as v, unref as t, normalizeStyle as Ae, normalizeClass as g, withDirectives as we, createElementBlock as ze, Fragment as Je, renderList as Be, toDisplayString as _, createTextVNode as Ke, vShow as Re } from "vue";
2
- import { storeToRefs as Pe } from "pinia";
3
- import { u as Ee, s as je } from "./report-TzuKTx8E.js";
4
- import { _ as Ye } from "./Default.vue_vue_type_script_setup_true_lang-CL8aGE3a.js";
1
+ import { defineComponent as Te, ref as $, watch as Se, computed as R, h as d, withModifiers as we, resolveComponent as I, createBlock as ee, openBlock as z, withCtx as m, createVNode as c, createElementVNode as v, unref as t, normalizeStyle as Ae, normalizeClass as g, withDirectives as he, createElementBlock as ze, Fragment as Je, renderList as Be, toDisplayString as k, createTextVNode as Ke, vShow as Re } from "vue";
2
+ import { storeToRefs as xe } from "pinia";
3
+ import { u as Ee, s as je } from "./report-AhRrPMU6.js";
4
+ import { _ as Ye } from "./Default.vue_vue_type_script_setup_true_lang-D-Se8EHw.js";
5
5
  import { u as qe } from "./message-dialog-UoMWOnil.js";
6
6
  import { u as He } from "./global-loader-BuxFfehu.js";
7
7
  import { useSnackbar as Ge, useBreakpoints as Qe, components as We, FmButtonColorThemeVariant as Xe } from "@feedmepos/ui-library";
8
8
  import { _ as Ze } from "./SelectComponent.vue_vue_type_script_setup_true_lang-DW7Dk7iQ.js";
9
- import { c as et, a as xe, h as tt } from "./app-D2nsPc-w.js";
10
- import { useRouter as ot, useRoute as st, onBeforeRouteLeave as at } from "vue-router";
9
+ import { c as et, a as Pe, h as tt } from "./app-e8Pud10z.js";
10
+ import { useRouter as ot, useRoute as at, onBeforeRouteLeave as st } from "vue-router";
11
11
  import { useI18n as rt } from "@feedmepos/mf-common";
12
12
  import { r as te } from "./i18n-DbyciK4x.js";
13
- const nt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, lt = { class: "w-[343px]" }, it = { class: "fm-typo-en-body-md-600" }, ct = ["tabindex", "aria-disabled", "onClick"], pt = { class: "fm-menu-item--left" }, dt = { class: "fm-menu-item--right" }, Ct = /* @__PURE__ */ Te({
13
+ const nt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, lt = { class: "w-[343px]" }, ct = { class: "fm-typo-en-body-md-600" }, it = ["tabindex", "aria-disabled", "onClick"], pt = { class: "fm-typo-en-body-md-400 max-w-[240px]" }, Pt = /* @__PURE__ */ Te({
14
14
  __name: "Report",
15
- setup(ut) {
16
- const { t: s, te: J } = rt(), oe = ot(), se = st(), S = Ee(), Ce = et(), { business: Ie } = Pe(xe()), {
15
+ setup(dt) {
16
+ const { t: a, te: J } = rt(), oe = ot(), ae = at(), S = Ee(), Ce = et(), { business: Ie } = xe(Pe()), {
17
17
  reports: f,
18
18
  overviewReport: B,
19
19
  categories: O,
20
20
  pinReport: F,
21
- isOpenAddReportDialog: _e,
22
- scrollPositionY: ae,
21
+ isOpenAddReportDialog: ke,
22
+ scrollPositionY: se,
23
23
  customReportQuota: L,
24
24
  canCreateCustomReport: re
25
- } = Pe(S), { promptMessage: ne } = qe(), { promptLoader: K } = He(), l = Ge(), { breakpoints: p } = Qe(), { canRead: le, canUpdate: ie, canDuplicate: ce, canDelete: E, canCreateReport: ke } = tt(), w = $();
26
- at(() => {
27
- w.value && (ae.value = w.value.$el.children[0].scrollTop);
28
- }), Se(w, () => {
29
- w.value && setTimeout(() => {
30
- w.value && (w.value.$el.children[0].scrollTop = ae.value);
25
+ } = xe(S), { promptMessage: ne } = qe(), { promptLoader: K } = He(), l = Ge(), { breakpoints: p } = Qe(), { canRead: le, canUpdate: ce, canDuplicate: ie, canDelete: E, canCreateReport: _e } = tt(), h = $();
26
+ st(() => {
27
+ h.value && (se.value = h.value.$el.children[0].scrollTop);
28
+ }), Se(h, () => {
29
+ h.value && setTimeout(() => {
30
+ h.value && (h.value.$el.children[0].scrollTop = se.value);
31
31
  }, 200);
32
32
  });
33
33
  const j = R(() => F.value && f.value ? f.value.filter((o) => {
@@ -43,7 +43,7 @@ const nt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, lt
43
43
  );
44
44
  const pe = R(() => j.value.length > 0 ? f.value.filter(
45
45
  (o) => j.value.findIndex((e) => e.id === o.id) === -1
46
- ) : f.value), { FmButton: De, FmMenu: Y, FmMenuItem: P, FmIcon: q, FmChip: H, FmTooltip: $e, FmSwitch: de } = We, b = $(/* @__PURE__ */ new Set()), G = $(/* @__PURE__ */ new Map()), ue = /* @__PURE__ */ new Set([
46
+ ) : f.value), { FmButton: De, FmMenu: Y, FmMenuItem: x, FmIcon: q, FmChip: H, FmTooltip: $e, FmSwitch: de } = We, b = $(/* @__PURE__ */ new Set()), G = $(/* @__PURE__ */ new Map()), ue = /* @__PURE__ */ new Set([
47
47
  "closeup",
48
48
  "dailySales",
49
49
  "hourlySales",
@@ -65,18 +65,18 @@ const nt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, lt
65
65
  value: o.id,
66
66
  label: o.name
67
67
  }))
68
- ]), V = $(me.value[0]), Q = $(""), x = R(() => pe.value.length === 0 || O.value.length === 0 ? [] : [
68
+ ]), V = $(me.value[0]), Q = $(""), P = R(() => pe.value.length === 0 || O.value.length === 0 ? [] : [
69
69
  ...j.value.map((e) => {
70
70
  const r = O.value.find((n) => n.id === e.category);
71
71
  return {
72
- name: te(s, J, e.name, "other"),
72
+ name: te(a, J, e.name, "other"),
73
73
  categoryId: (r == null ? void 0 : r.id) ?? "",
74
- category: r != null && r.name ? s(`report.category.${r.name}`) : s("report.common.uncategorized"),
74
+ category: r != null && r.name ? a(`report.category.${r.name}`) : a("report.common.uncategorized"),
75
75
  reportId: e.id,
76
76
  editable: e.editable,
77
77
  description: e.description || "",
78
78
  pin: !0,
79
- canUpdate: ie(e),
79
+ canUpdate: ce(e),
80
80
  canRead: le(e),
81
81
  isSupportPos: !!e.isSupportPos,
82
82
  isMandatoryPosReport: e.isDefault && ue.has(e.permissionKey ?? ""),
@@ -86,14 +86,14 @@ const nt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, lt
86
86
  ...pe.value.map((e) => {
87
87
  const r = O.value.find((n) => n.id === e.category);
88
88
  return {
89
- name: te(s, J, e.name, "other"),
89
+ name: te(a, J, e.name, "other"),
90
90
  categoryId: (r == null ? void 0 : r.id) ?? "",
91
- category: r != null && r.name ? s(`report.category.${r.name}`) : s("report.common.uncategorized"),
91
+ category: r != null && r.name ? a(`report.category.${r.name}`) : a("report.common.uncategorized"),
92
92
  reportId: e.id,
93
93
  editable: e.editable,
94
94
  description: e.description || "",
95
95
  pin: !1,
96
- canUpdate: ie(e),
96
+ canUpdate: ce(e),
97
97
  canRead: le(e),
98
98
  isSupportPos: !!e.isSupportPos,
99
99
  isMandatoryPosReport: e.isDefault && ue.has(e.permissionKey ?? ""),
@@ -101,11 +101,11 @@ const nt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, lt
101
101
  };
102
102
  })
103
103
  ].filter((e) => V.value.value && e.categoryId !== V.value.value ? !1 : `${(e == null ? void 0 : e.name) || ""}${(e == null ? void 0 : e.description) || ""}`.toLowerCase().indexOf(Q.value.toLowerCase()) !== -1)), Oe = R(
104
- () => x.value.map((o) => `${o.name}${o.category}`).toString()
104
+ () => P.value.map((o) => `${o.name}${o.category}`).toString()
105
105
  ), Fe = R(() => [
106
106
  {
107
107
  accessorKey: "name",
108
- header: s("report.common.name"),
108
+ header: a("report.common.name"),
109
109
  enableSorting: !1,
110
110
  cell: (o) => {
111
111
  const e = o.row.original;
@@ -118,7 +118,7 @@ const nt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, lt
118
118
  },
119
119
  {
120
120
  accessorKey: "category",
121
- header: s("report.common.category"),
121
+ header: a("report.common.category"),
122
122
  enableSorting: !1,
123
123
  meta: {
124
124
  width: "100px"
@@ -127,7 +127,7 @@ const nt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, lt
127
127
  H,
128
128
  {
129
129
  // grey out chip text when user cannot read report
130
- class: `${o.getValue() !== s("report.common.uncategorized") ? "bg-fm-color-system-info-100 text-fm-color-typo-info" : "text-fm-color-typo-secondary"} ${o.row.original.canRead ? "" : "opacity-40 cursor-not-allowed"} fm-typo-en-body-sm-600`,
130
+ class: `${o.getValue() !== a("report.common.uncategorized") ? "bg-fm-color-system-info-100 text-fm-color-typo-info" : "text-fm-color-typo-secondary"} ${o.row.original.canRead ? "" : "opacity-40 cursor-not-allowed"} fm-typo-en-body-sm-600`,
131
131
  compact: !0
132
132
  },
133
133
  { default: () => o.getValue() }
@@ -135,7 +135,7 @@ const nt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, lt
135
135
  },
136
136
  {
137
137
  accessorKey: "description",
138
- header: s("report.common.description"),
138
+ header: a("report.common.description"),
139
139
  enableSorting: !1,
140
140
  cell: (o) => {
141
141
  const e = o.row.original;
@@ -149,18 +149,18 @@ const nt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, lt
149
149
  {
150
150
  accessorKey: "",
151
151
  id: "Action",
152
- header: s("report.common.actions"),
152
+ header: a("report.common.actions"),
153
153
  meta: {
154
154
  width: "130px"
155
155
  },
156
156
  cell: (o) => {
157
157
  var u;
158
- const e = o.row.original, r = e.reportId, n = f.value.find((y) => y.id === r), Z = r === ((u = B.value) == null ? void 0 : u.id), T = !e.canRead, D = n ? ce(n) : !1, A = n ? E(n) : !1, a = !e.canUpdate || e.isMandatoryPosReport || b.value.has(r), C = e.isMandatoryPosReport ? s("reportV5.reportList.mandatoryPosReportHint") : s("reportV5.reportList.posV8Hint"), c = [
158
+ const e = o.row.original, r = e.reportId, n = f.value.find((y) => y.id === r), Z = r === ((u = B.value) == null ? void 0 : u.id), T = !e.canRead, D = n ? ie(n) : !1, A = n ? E(n) : !1, s = !e.canUpdate || e.isMandatoryPosReport || b.value.has(r), C = e.isMandatoryPosReport ? a("reportV5.reportList.mandatoryPosReportHint") : a("reportV5.reportList.posV8Hint"), i = [
159
159
  {
160
- label: s("report.common.duplicate"),
160
+ label: a("report.common.duplicate"),
161
161
  onClick: () => {
162
162
  n && D ? be(n) : D || l.open({
163
- message: s("report.messages.noPermissionDuplicateReport"),
163
+ message: a("report.messages.noPermissionDuplicateReport"),
164
164
  type: "error"
165
165
  });
166
166
  },
@@ -168,7 +168,7 @@ const nt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, lt
168
168
  disabled: !D
169
169
  },
170
170
  {
171
- label: s(Z ? "report.common.unsetAsOverview" : "report.common.setAsOverview"),
171
+ label: a(Z ? "report.common.unsetAsOverview" : "report.common.setAsOverview"),
172
172
  onClick: async () => {
173
173
  n && fe(n);
174
174
  },
@@ -176,10 +176,10 @@ const nt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, lt
176
176
  disabled: !1
177
177
  },
178
178
  {
179
- label: s("report.common.remove"),
179
+ label: a("report.common.remove"),
180
180
  onClick: () => {
181
181
  n && (A ? ve(n) : l.open({
182
- message: s("report.messages.noPermissionDeleteReport"),
182
+ message: a("report.messages.noPermissionDeleteReport"),
183
183
  type: "error"
184
184
  }));
185
185
  },
@@ -198,17 +198,17 @@ const nt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, lt
198
198
  $e,
199
199
  { content: C, placement: "bottom", zIndex: 2e3 },
200
200
  {
201
- default: () => d("div", { class: "mr-2 flex items-center gap-2" }, [
201
+ default: () => d("div", { class: "mr-2 flex items-center" }, [
202
202
  d("span", { class: "fm-typo-en-body-sm-400 whitespace-nowrap" }, "POS v8"),
203
203
  d(de, {
204
204
  modelValue: e.isSupportPos,
205
- disabled: a,
206
- "aria-label": s("report.common.showInPOS"),
205
+ disabled: s,
206
+ "aria-label": a("report.common.showInPOS"),
207
207
  class: "pos-v8-switch",
208
208
  "onUpdate:modelValue": () => {
209
209
  n && ye(n);
210
210
  },
211
- onClick: he(() => {
211
+ onClick: we(() => {
212
212
  }, ["stop"])
213
213
  })
214
214
  ])
@@ -218,9 +218,9 @@ const nt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, lt
218
218
  "button",
219
219
  {
220
220
  disabled: T,
221
- title: T ? s("report.messages.noPermission") : void 0,
221
+ title: T ? a("report.messages.noPermission") : void 0,
222
222
  "aria-label": e.pin ? "Unpin" : "Pin",
223
- onClick: he(() => {
223
+ onClick: we(() => {
224
224
  n && ge(n);
225
225
  }, ["stop"]),
226
226
  class: "text-fm-color-neutral-gray-400 hover:bg-fm-color-opacity-sm rounded-lg flex items-center justify-center"
@@ -248,9 +248,9 @@ const nt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, lt
248
248
  disabled: !1
249
249
  },
250
250
  {
251
- default: () => c.map(
251
+ default: () => i.map(
252
252
  (y) => d(
253
- P,
253
+ x,
254
254
  {
255
255
  onClick: y.disabled ? {} : y.onClick,
256
256
  label: y.label,
@@ -306,7 +306,7 @@ const nt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, lt
306
306
  );
307
307
  } catch (e) {
308
308
  console.log(e), l.open({
309
- message: s("report.messages.failedToAction", { action: s("report.common.update") }),
309
+ message: a("report.messages.failedToAction", { action: a("report.common.update") }),
310
310
  type: "error"
311
311
  });
312
312
  } finally {
@@ -320,17 +320,17 @@ const nt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, lt
320
320
  }
321
321
  async function Ve(o) {
322
322
  if (await ne({
323
- title: s("report.common.duplicate"),
324
- message: s("report.messages.confirmAction", {
325
- action: s("report.common.duplicate"),
323
+ title: a("report.common.duplicate"),
324
+ message: a("report.messages.confirmAction", {
325
+ action: a("report.common.duplicate"),
326
326
  name: o.name
327
327
  })
328
328
  })) {
329
329
  const r = JSON.parse(JSON.stringify(o));
330
- r.editable = !0, r.id = "", r.name = `${r.name} ${s("report.common.duplicate")}`, r.isDefault = !1, K(async () => {
330
+ r.editable = !0, r.id = "", r.name = `${r.name} ${a("report.common.duplicate")}`, r.isDefault = !1, K(async () => {
331
331
  try {
332
332
  await S.createOrUpdateReport(r), l.open({
333
- message: `${s("report.messages.duplicateSuccess", { name: r.name })}`,
333
+ message: `${a("report.messages.duplicateSuccess", { name: r.name })}`,
334
334
  type: "success"
335
335
  });
336
336
  } catch (n) {
@@ -341,7 +341,7 @@ const nt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, lt
341
341
  }
342
342
  function W(o) {
343
343
  const e = f.value.find((r) => r.id === o.reportId);
344
- return !e || !ce(e);
344
+ return !e || !ie(e);
345
345
  }
346
346
  function X(o) {
347
347
  const e = f.value.find((r) => r.id === o.reportId);
@@ -350,18 +350,18 @@ const nt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, lt
350
350
  async function ve(o) {
351
351
  if (!E(o)) {
352
352
  l.open({
353
- message: s("report.messages.noPermissionDeleteReport"),
353
+ message: a("report.messages.noPermissionDeleteReport"),
354
354
  type: "error"
355
355
  });
356
356
  return;
357
357
  }
358
358
  await ne({
359
- title: s("report.messages.deleteReport"),
360
- message: s("report.messages.confirmDelete", { name: o.name })
359
+ title: a("report.messages.deleteReport"),
360
+ message: a("report.messages.confirmDelete", { name: o.name })
361
361
  }) && K(async () => {
362
362
  try {
363
363
  await S.removeReport(o), l.open({
364
- message: s("report.messages.deleteSuccess", { name: o.name }),
364
+ message: a("report.messages.deleteSuccess", { name: o.name }),
365
365
  type: "success"
366
366
  });
367
367
  } catch (r) {
@@ -381,15 +381,15 @@ const nt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, lt
381
381
  }
382
382
  }
383
383
  function Ne() {
384
- if (!ke.value) {
384
+ if (!_e.value) {
385
385
  l.open({
386
- message: s("report.messages.noPermission"),
386
+ message: a("report.messages.noPermission"),
387
387
  type: "error"
388
388
  });
389
389
  return;
390
390
  }
391
391
  if (re.value)
392
- _e.value = !0;
392
+ ke.value = !0;
393
393
  else {
394
394
  let o = `Your current plan only support up to ${L.value} custom reports.`;
395
395
  L.value === 0 && (o = "Your current plan does not support custom report."), l.open({
@@ -399,59 +399,59 @@ const nt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, lt
399
399
  }
400
400
  }
401
401
  function ge(o) {
402
- const e = te(s, J, o.name, "other") ?? "";
402
+ const e = te(a, J, o.name, "other") ?? "";
403
403
  F.value && F.value.includes(o.id) ? (l.open({
404
- message: `${s("report.common.unpin")} ${e} ${s("report.common.successful")}`,
404
+ message: `${a("report.common.unpin")} ${e} ${a("report.common.successful")}`,
405
405
  type: "success"
406
406
  }), S.clearPinReport(o.id)) : (l.open({
407
- message: `${s("report.common.pin")} ${e} ${s("report.common.successful")}`,
407
+ message: `${a("report.common.pin")} ${e} ${a("report.common.successful")}`,
408
408
  type: "success"
409
409
  }), S.cachePinReport(o));
410
410
  }
411
411
  function Ue(o) {
412
412
  V.value = o;
413
413
  }
414
- const { selectedLocationIds: k, dateRange: N, compareDateRange: U, timeRange: h, locations: Me } = xe(), M = R(() => k.length === Me.length);
414
+ const { selectedLocationIds: _, dateRange: N, compareDateRange: U, timeRange: w, locations: Me } = Pe(), M = R(() => _.length === Me.length);
415
415
  return (o, e) => {
416
416
  const r = I("FmPageHead"), n = I("FmSearch"), Z = I("FmForm"), T = I("FmListItem"), D = I("FmList"), A = I("FmTable");
417
417
  return z(), ee(Ye, null, {
418
418
  default: m(() => [
419
- i(r, {
420
- title: t(s)("report.common.report", 1),
419
+ c(r, {
420
+ title: t(a)("report.common.report", 1),
421
421
  class: "h-[68px]",
422
422
  actions: [
423
423
  {
424
- label: `${t(s)("report.view.report.add")}`,
424
+ label: `${t(a)("report.view.report.add")}`,
425
425
  value: "add",
426
426
  isPrimary: !0,
427
427
  prependIcon: "add"
428
428
  }
429
429
  ],
430
- "onClick:action": e[0] || (e[0] = (a) => Ne())
430
+ "onClick:action": e[0] || (e[0] = (s) => Ne())
431
431
  }, null, 8, ["title", "actions"]),
432
432
  v("div", {
433
433
  class: g(`overflow-y-hidden flex flex-col gap-8 ${t(p).sm || t(p).xs ? "mb-20" : ""}`),
434
434
  style: Ae({ height: `calc(100% - ${t(p).lg || t(p).md ? 72 : 64}px)` })
435
435
  }, [
436
- i(Z, {
436
+ c(Z, {
437
437
  class: g(`flex items-center gap-2 ${t(p).sm || t(p).xs ? "px-3" : "px-24"}`)
438
438
  }, {
439
439
  default: m(() => [
440
- i(t(Y), null, {
440
+ c(t(Y), null, {
441
441
  "menu-button": m(() => [
442
- i(t(H), { class: "fm-typo-en-body-md-600 text-fm-color-neutral-gray-400" }, {
442
+ c(t(H), { class: "fm-typo-en-body-md-600 text-fm-color-neutral-gray-400" }, {
443
443
  default: m(() => [
444
- v("p", null, _(t(s)(`report.category.${V.value.label}`)), 1),
445
- i(t(q), { name: "expand_more" })
444
+ v("p", null, k(t(a)(`report.category.${V.value.label}`)), 1),
445
+ c(t(q), { name: "expand_more" })
446
446
  ]),
447
447
  _: 1
448
448
  })
449
449
  ]),
450
450
  default: m(() => [
451
- (z(!0), ze(Je, null, Be(me.value, (a, C) => (z(), ee(t(P), {
451
+ (z(!0), ze(Je, null, Be(me.value, (s, C) => (z(), ee(t(x), {
452
452
  key: C,
453
- label: t(s)(`report.category.${a.label}`),
454
- onClick: () => Ue(a)
453
+ label: t(a)(`report.category.${s.label}`),
454
+ onClick: () => Ue(s)
455
455
  }, null, 8, ["label", "onClick"]))), 128))
456
456
  ]),
457
457
  _: 1
@@ -459,103 +459,103 @@ const nt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, lt
459
459
  v("div", {
460
460
  class: g(`flex ${t(p).sm || t(p).xs ? "justify-center items-center" : ""}`)
461
461
  }, [
462
- v("p", nt, _(t(s)("report.common.results", { count: x.value.length })), 1)
462
+ v("p", nt, k(t(a)("report.common.results", { count: P.value.length })), 1)
463
463
  ], 2),
464
464
  e[3] || (e[3] = v("div", { class: "grow" }, null, -1)),
465
465
  v("div", lt, [
466
- i(n, {
466
+ c(n, {
467
467
  modelValue: Q.value,
468
- "onUpdate:modelValue": e[1] || (e[1] = (a) => Q.value = a),
468
+ "onUpdate:modelValue": e[1] || (e[1] = (s) => Q.value = s),
469
469
  class: g(`${t(p).lg || t(p).md ? "grow" : ""}`)
470
470
  }, null, 8, ["modelValue", "class"])
471
471
  ])
472
472
  ]),
473
473
  _: 1
474
474
  }, 8, ["class"]),
475
- we((z(), ee(A, {
475
+ he((z(), ee(A, {
476
476
  key: Oe.value,
477
477
  ref_key: "table",
478
- ref: w,
478
+ ref: h,
479
479
  class: g([t(p).sm || t(p).xs ? "px-0" : "px-24", "report-table"]),
480
480
  style: { height: "calc(100% - 40px)" },
481
481
  "column-defs": Fe.value,
482
- "row-data": x.value,
483
- "page-size": x.value.length,
482
+ "row-data": P.value,
483
+ "page-size": P.value.length,
484
484
  "hide-footer": !0,
485
485
  "row-class-name": "row",
486
- onRowClick: e[2] || (e[2] = (a) => {
487
- if (!a.original.canRead) {
486
+ onRowClick: e[2] || (e[2] = (s) => {
487
+ if (!s.original.canRead) {
488
488
  t(l).open({
489
- message: t(s)("report.messages.noPermission"),
489
+ message: t(a)("report.messages.noPermission"),
490
490
  type: "error"
491
491
  });
492
492
  return;
493
493
  }
494
- t(Ce).suppressReportRouteSync = !0, t(S).updateCurrentReportId(a.original.reportId), t(oe).push({
494
+ t(Ce).suppressReportRouteSync = !0, t(S).updateCurrentReportId(s.original.reportId), t(oe).push({
495
495
  name: "reportView",
496
496
  query: {
497
- ...t(se).query,
498
- reportId: a.original.reportId,
497
+ ...t(ae).query,
498
+ reportId: s.original.reportId,
499
499
  startDate: t(N).startDate,
500
500
  endDate: t(N).endDate,
501
501
  compareStartDate: t(U).startDate,
502
502
  compareEndDate: t(U).endDate,
503
- timeStart: t(h).start ? JSON.stringify(t(h).start) : null,
504
- timeEnd: t(h).end ? JSON.stringify(t(h).end) : null,
503
+ timeStart: t(w).start ? JSON.stringify(t(w).start) : null,
504
+ timeEnd: t(w).end ? JSON.stringify(t(w).end) : null,
505
505
  isAllLocation: M.value.toString(),
506
- locationIds: M.value ? void 0 : t(k) ? JSON.stringify(t(k)) : void 0
506
+ locationIds: M.value ? void 0 : t(_) ? JSON.stringify(t(_)) : void 0
507
507
  }
508
508
  });
509
509
  })
510
510
  }, {
511
- "list-row": m(({ original: a }) => [
512
- i(D, {
511
+ "list-row": m(({ original: s }) => [
512
+ c(D, {
513
513
  onClick: () => {
514
- if (!a.canRead) {
514
+ if (!s.canRead) {
515
515
  t(l).open({
516
- message: t(s)("report.messages.noPermission"),
516
+ message: t(a)("report.messages.noPermission"),
517
517
  type: "error"
518
518
  });
519
519
  return;
520
520
  }
521
- a.reportId && (t(S).updateCurrentReportId(a.reportId), t(oe).push({
521
+ s.reportId && (t(S).updateCurrentReportId(s.reportId), t(oe).push({
522
522
  name: "reportView",
523
523
  query: {
524
- ...t(se).query,
525
- reportId: a.reportId,
524
+ ...t(ae).query,
525
+ reportId: s.reportId,
526
526
  startDate: t(N).startDate,
527
527
  endDate: t(N).endDate,
528
528
  compareStartDate: t(U).startDate,
529
529
  compareEndDate: t(U).endDate,
530
- timeStart: t(h).start ? JSON.stringify(t(h).start) : null,
531
- timeEnd: t(h).end ? JSON.stringify(t(h).end) : null,
530
+ timeStart: t(w).start ? JSON.stringify(t(w).start) : null,
531
+ timeEnd: t(w).end ? JSON.stringify(t(w).end) : null,
532
532
  isAllLocation: M.value.toString(),
533
- locationIds: M.value ? void 0 : t(k) ? JSON.stringify(t(k)) : void 0
533
+ locationIds: M.value ? void 0 : t(_) ? JSON.stringify(t(_)) : void 0
534
534
  }
535
535
  }));
536
536
  }
537
537
  }, {
538
538
  default: m(() => [
539
- i(T, {
539
+ c(T, {
540
540
  tag: "label",
541
541
  clickable: ""
542
542
  }, {
543
543
  append: m(() => [
544
- i(t(H), {
545
- class: g(`${a.category !== "Uncategorized" ? "bg-fm-color-system-info-100 text-fm-color-typo-info" : "text-fm-color-typo-secondary"} ${a.canRead ? "" : "opacity-40 cursor-not-allowed"}`),
544
+ c(t(H), {
545
+ class: g(`${s.category !== "Uncategorized" ? "bg-fm-color-system-info-100 text-fm-color-typo-info" : "text-fm-color-typo-secondary"} ${s.canRead ? "" : "opacity-40 cursor-not-allowed"}`),
546
546
  compact: !0
547
547
  }, {
548
548
  default: m(() => [
549
- v("p", it, _(a.category), 1)
549
+ v("p", ct, k(s.category), 1)
550
550
  ]),
551
551
  _: 2
552
552
  }, 1032, ["class"]),
553
- i(t(Y), {
553
+ c(t(Y), {
554
554
  placement: "left",
555
555
  "stop-click-propagation": !0
556
556
  }, {
557
557
  "menu-button": m(() => [
558
- i(t(q), {
558
+ c(t(q), {
559
559
  name: "more_vert",
560
560
  class: "btn-color"
561
561
  })
@@ -563,92 +563,92 @@ const nt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, lt
563
563
  default: m(() => {
564
564
  var C;
565
565
  return [
566
- i(t(P), {
567
- label: a.pin ? "Unpin" : "Pin",
566
+ c(t(x), {
567
+ label: s.pin ? "Unpin" : "Pin",
568
568
  onClick: () => {
569
- const c = t(f).find(
570
- (u) => u.id === a.reportId
569
+ const i = t(f).find(
570
+ (u) => u.id === s.reportId
571
571
  );
572
- c && ge(c);
572
+ i && ge(i);
573
573
  }
574
574
  }, null, 8, ["label", "onClick"]),
575
575
  v("div", {
576
576
  role: "menuitem",
577
577
  "data-testid": "mobile-pos-v8-toggle",
578
- tabindex: !a.canUpdate || a.isMandatoryPosReport || b.value.has(a.reportId) ? void 0 : -1,
579
- "aria-disabled": !a.canUpdate || a.isMandatoryPosReport || b.value.has(a.reportId),
578
+ tabindex: !s.canUpdate || s.isMandatoryPosReport || b.value.has(s.reportId) ? void 0 : -1,
579
+ "aria-disabled": !s.canUpdate || s.isMandatoryPosReport || b.value.has(s.reportId),
580
580
  class: g(
581
- !a.canUpdate || a.isMandatoryPosReport || b.value.has(a.reportId) ? "fm-menu-item fm-menu-item--disabled flex w-full items-center justify-between text-fm-color-typo-disabled" : "fm-menu-item flex w-full items-center justify-between hover:bg-fm-color-opacity-sm"
581
+ !s.canUpdate || s.isMandatoryPosReport || b.value.has(s.reportId) ? "flex max-h-[78px] w-full cursor-not-allowed items-center justify-between gap-2 rounded px-3 py-2 pl-12 text-fm-color-typo-disabled" : "flex max-h-[78px] w-full cursor-pointer items-center justify-between gap-2 rounded px-3 py-2 pl-12 hover:bg-fm-color-opacity-sm"
582
582
  ),
583
- onClick: (c) => {
584
- if (c.stopPropagation(), !a.canUpdate) {
583
+ onClick: (i) => {
584
+ if (i.stopPropagation(), !s.canUpdate) {
585
585
  t(l).open({
586
- message: t(s)("report.messages.noPermissionUpdateReport"),
586
+ message: t(a)("report.messages.noPermissionUpdateReport"),
587
587
  type: "error"
588
588
  });
589
589
  return;
590
590
  }
591
591
  const u = t(f).find(
592
- (y) => y.id === a.reportId
592
+ (y) => y.id === s.reportId
593
593
  );
594
594
  u && ye(u);
595
595
  }
596
596
  }, [
597
- v("span", pt, _(t(s)("report.common.showInPOS")), 1),
598
- v("span", dt, [
599
- i(t(de), {
597
+ v("span", pt, k(t(a)("report.common.showInPOS")), 1),
598
+ v("span", null, [
599
+ c(t(de), {
600
600
  "model-value": Le(
601
- a.reportId,
602
- a.isSupportPos
601
+ s.reportId,
602
+ s.isSupportPos
603
603
  ),
604
- disabled: !a.canUpdate || a.isMandatoryPosReport || b.value.has(a.reportId),
604
+ disabled: !s.canUpdate || s.isMandatoryPosReport || b.value.has(s.reportId),
605
605
  "aria-label": "Show in POS v8",
606
606
  class: "pointer-events-none"
607
607
  }, null, 8, ["model-value", "disabled"])
608
608
  ])
609
- ], 10, ct),
610
- i(t(P), {
611
- label: t(s)("report.common.duplicate"),
612
- disabled: W(a),
609
+ ], 10, it),
610
+ c(t(x), {
611
+ label: t(a)("report.common.duplicate"),
612
+ disabled: W(s),
613
613
  class: g(
614
- W(a) ? "text-fm-color-typo-disabled" : ""
614
+ W(s) ? "text-fm-color-typo-disabled" : ""
615
615
  ),
616
616
  onClick: () => {
617
- const c = t(f).find(
618
- (u) => u.id === a.reportId
617
+ const i = t(f).find(
618
+ (u) => u.id === s.reportId
619
619
  );
620
- c && !W(a) ? be(c) : t(l).open({
621
- message: t(s)("report.messages.noPermissionDuplicateReport"),
620
+ i && !W(s) ? be(i) : t(l).open({
621
+ message: t(a)("report.messages.noPermissionDuplicateReport"),
622
622
  type: "error"
623
623
  });
624
624
  }
625
625
  }, null, 8, ["label", "disabled", "class", "onClick"]),
626
- i(t(P), {
627
- label: t(s)(
628
- a.reportId === ((C = t(B)) == null ? void 0 : C.id) ? "report.common.unsetAsOverview" : "report.common.setAsOverview"
626
+ c(t(x), {
627
+ label: t(a)(
628
+ s.reportId === ((C = t(B)) == null ? void 0 : C.id) ? "report.common.unsetAsOverview" : "report.common.setAsOverview"
629
629
  ),
630
630
  onClick: () => {
631
- const c = t(f).find(
632
- (u) => u.id === a.reportId
631
+ const i = t(f).find(
632
+ (u) => u.id === s.reportId
633
633
  );
634
- c && fe(c);
634
+ i && fe(i);
635
635
  }
636
636
  }, null, 8, ["label", "onClick"]),
637
- i(t(P), {
638
- label: t(s)("report.common.delete"),
639
- disabled: X(a),
637
+ c(t(x), {
638
+ label: t(a)("report.common.delete"),
639
+ disabled: X(s),
640
640
  class: g(
641
- X(a) ? "text-fm-color-typo-disabled" : "text-fm-color-typo-error"
641
+ X(s) ? "text-fm-color-typo-disabled" : "text-fm-color-typo-error"
642
642
  ),
643
643
  onClick: () => {
644
- const c = t(f).find(
645
- (u) => u.id === a.reportId
644
+ const i = t(f).find(
645
+ (u) => u.id === s.reportId
646
646
  );
647
- c && !X(a) && ve(c);
647
+ i && !X(s) && ve(i);
648
648
  }
649
649
  }, {
650
650
  label: m(() => [
651
- Ke(_(t(s)("report.common.delete")), 1)
651
+ Ke(k(t(a)("report.common.delete")), 1)
652
652
  ]),
653
653
  _: 2
654
654
  }, 1032, ["label", "disabled", "class", "onClick"])
@@ -659,8 +659,8 @@ const nt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, lt
659
659
  ]),
660
660
  default: m(() => [
661
661
  v("span", {
662
- class: g(["fm-typo-en-body-lg-400 line-clamp-1 break-all text-fm-color-typo-primary", a.canRead ? "" : "opacity-40 cursor-not-allowed"])
663
- }, _(a.name), 3)
662
+ class: g(["fm-typo-en-body-lg-400 line-clamp-1 break-all text-fm-color-typo-primary", s.canRead ? "" : "opacity-40 cursor-not-allowed"])
663
+ }, k(s.name), 3)
664
664
  ]),
665
665
  _: 2
666
666
  }, 1024)
@@ -670,10 +670,10 @@ const nt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, lt
670
670
  ]),
671
671
  _: 1
672
672
  }, 8, ["class", "column-defs", "row-data", "page-size"])), [
673
- [Re, x.value.length > 0]
673
+ [Re, P.value.length > 0]
674
674
  ]),
675
- we(i(Ze, null, null, 512), [
676
- [Re, x.value.length === 0]
675
+ he(c(Ze, null, null, 512), [
676
+ [Re, P.value.length === 0]
677
677
  ])
678
678
  ], 6)
679
679
  ]),
@@ -683,5 +683,5 @@ const nt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, lt
683
683
  }
684
684
  });
685
685
  export {
686
- Ct as default
686
+ Pt as default
687
687
  };