@feedmepos/mf-report 5.19.23-beta.0 → 5.19.24-beta.0

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 (19) hide show
  1. package/dist/{App-Dl4FEwnr.js → App-ChOsyC6V.js} +3 -3
  2. package/dist/{BaseDialog.vue_vue_type_script_setup_true_lang-BMUdA00d.js → BaseDialog.vue_vue_type_script_setup_true_lang-DQg0AdC9.js} +2 -2
  3. package/dist/{Default.vue_vue_type_script_setup_true_lang-B4KGPc-A.js → Default.vue_vue_type_script_setup_true_lang-BJl8wpy8.js} +1 -1
  4. package/dist/{FilterSelector.vue_vue_type_script_setup_true_lang-Bp0VTpqx.js → FilterSelector.vue_vue_type_script_setup_true_lang-CLX1VnmB.js} +221 -221
  5. package/dist/{InsightView-VRhKOgcg.js → InsightView-DZv9LOkh.js} +2 -2
  6. package/dist/{Layout-Djm1HkoE.js → Layout-CGewTKq4.js} +1 -1
  7. package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-BRCHCYha.js → MenuTab.vue_vue_type_script_setup_true_lang-DSEmCasr.js} +3 -3
  8. package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-BRpEu6MW.js → NavigationTab.vue_vue_type_script_setup_true_lang-CghXyTqi.js} +1 -1
  9. package/dist/{OverviewView-BNle5SLL.js → OverviewView-CqIlzBhG.js} +4 -4
  10. package/dist/{Report-DUK8tWB1.js → Report-93_p2p_Y.js} +162 -151
  11. package/dist/{ReportEditor-C55X4vz_.js → ReportEditor-sKAoWQu8.js} +3 -3
  12. package/dist/{ReportView-DAmVomKW.js → ReportView-suBIJBWN.js} +5 -5
  13. package/dist/{Setting-DgU3IvCo.js → Setting-Bfk6TybW.js} +2 -2
  14. package/dist/{TileEditor-UfdRj82z.js → TileEditor-DIUcwxSj.js} +3 -3
  15. package/dist/{TransitionFade-Cqa0p_nG.js → TransitionFade-B00nCVsI.js} +2 -2
  16. package/dist/app.js +9 -9
  17. package/dist/assets/{formatChartData.worker-Cb40k96i.js → formatChartData.worker-DmEF8HW6.js} +1 -1
  18. package/dist/assets/{processTableData.worker-DS6uNX_h.js → processTableData.worker-BsdnWDQK.js} +1 -1
  19. package/package.json +1 -1
@@ -2,13 +2,13 @@ var Zo = Object.defineProperty;
2
2
  var Jo = (i, t, e) => t in i ? Zo(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
3
3
  var k = (i, t, e) => Jo(i, typeof t != "symbol" ? t + "" : t, e);
4
4
  import { ref as $t, defineComponent as oe, watch as ri, computed as _t, onMounted as Qo, createElementBlock as U, openBlock as I, createElementVNode as R, renderSlot as Un, toDisplayString as lt, resolveDirective as Xn, createCommentVNode as St, Fragment as Ii, renderList as zi, createBlock as Ht, withDirectives as Ge, resolveDynamicComponent as es, unref as G, withCtx as Yt, createVNode as et, normalizeClass as Ze, resolveComponent as Me, useModel as ta, createTextVNode as ea, isRef as ki, nextTick as ia } from "vue";
5
- import { _ as sa } from "./Default.vue_vue_type_script_setup_true_lang-B4KGPc-A.js";
5
+ import { _ as sa } from "./Default.vue_vue_type_script_setup_true_lang-BJl8wpy8.js";
6
6
  import { _ as na } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-BeBr4VIF.js";
7
7
  import { d as Bi, a as Kn, q as qn, F as Gn, u as Zn, h as ys, b as oa } from "./vue-i18n-BJW_sJot.js";
8
8
  import { storeToRefs as Jn } from "pinia";
9
9
  import { components as is, useSnackbar as aa } from "@feedmepos/ui-library";
10
10
  import { _ as ra } from "./NoData.vue_vue_type_script_setup_true_lang-CtN7oqXx.js";
11
- import { a as la, G as ca } from "./NavigationTab.vue_vue_type_script_setup_true_lang-BRpEu6MW.js";
11
+ import { a as la, G as ca } from "./NavigationTab.vue_vue_type_script_setup_true_lang-CghXyTqi.js";
12
12
  import { useCoreStore as ha } from "@feedmepos/mf-common";
13
13
  function da({ start: i, end: t }) {
14
14
  return `${Bi(t).format("DD MMM")}, ${Bi(t).format("YYYY")}`;
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as o, resolveComponent as t, createBlock as r, openBlock as n, withCtx as _, createVNode as c } from "vue";
2
- import { _ as a } from "./Default.vue_vue_type_script_setup_true_lang-B4KGPc-A.js";
2
+ import { _ as a } from "./Default.vue_vue_type_script_setup_true_lang-BJl8wpy8.js";
3
3
  const f = /* @__PURE__ */ o({
4
4
  __name: "Layout",
5
5
  setup(m) {
@@ -1,10 +1,10 @@
1
1
  import { defineComponent as b, computed as V, createElementBlock as x, openBlock as a, createElementVNode as y, createVNode as u, unref as e, isRef as p, withCtx as _, createBlock as g, createCommentVNode as k, useModel as $, resolveComponent as f, normalizeClass as R, Fragment as w, renderList as M, toDisplayString as T } from "vue";
2
2
  import { b as B } from "./vue-i18n-BJW_sJot.js";
3
3
  import { storeToRefs as D } from "pinia";
4
- import { a as I } from "./NavigationTab.vue_vue_type_script_setup_true_lang-BRpEu6MW.js";
4
+ import { a as I } from "./NavigationTab.vue_vue_type_script_setup_true_lang-CghXyTqi.js";
5
5
  import { _ as U } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-BeBr4VIF.js";
6
- import { _ as N } from "./BaseDialog.vue_vue_type_script_setup_true_lang-BMUdA00d.js";
7
- import { a as S } from "./FilterSelector.vue_vue_type_script_setup_true_lang-Bp0VTpqx.js";
6
+ import { _ as N } from "./BaseDialog.vue_vue_type_script_setup_true_lang-DQg0AdC9.js";
7
+ import { a as S } from "./FilterSelector.vue_vue_type_script_setup_true_lang-CLX1VnmB.js";
8
8
  import { useRoute as z } from "vue-router";
9
9
  import { useBreakpoints as E } from "@feedmepos/ui-library";
10
10
  const L = { class: "flex flex-col gap-2 overflow-x-auto overflow-y-hidden scrollbar-hide" }, O = { class: "flex flex-col gap-2 py-2" }, q = /* @__PURE__ */ b({
@@ -4,7 +4,7 @@ var ml = (e, r, t) => F5(e, typeof r != "symbol" ? r + "" : r, t);
4
4
  import { defineComponent as $t, computed as nt, useModel as pn, ref as Ve, watch as ra, resolveComponent as me, createBlock as Ze, unref as q, openBlock as ne, withCtx as qe, createElementVNode as _, createVNode as J, toDisplayString as Ge, withDirectives as Un, createElementBlock as Fe, Fragment as vt, renderList as Bt, vShow as Ui, createTextVNode as jr, mergeModels as Kn, createCommentVNode as dt, normalizeClass as Jn, onMounted as i0, withKeys as qh, withModifiers as Yn, isRef as qn, vModelText as Wh, normalizeStyle as s0, renderSlot as jh, mergeProps as N5, nextTick as L5, resolveDynamicComponent as Td, createSlots as M5 } from "vue";
5
5
  import { useRouter as Uh, useRoute as Yh } from "vue-router";
6
6
  import { storeToRefs as xr, defineStore as l0 } from "pinia";
7
- import { a as Zs, k as Cd, l as R5, h as Ll, R as ln, j as o0, m as f0, _ as c0, d as B5, v as X5, i as z5, r as H5, n as wn, o as q5, u as W5 } from "./BaseDialog.vue_vue_type_script_setup_true_lang-BMUdA00d.js";
7
+ import { a as Zs, k as Cd, l as R5, h as Ll, R as ln, j as o0, m as f0, _ as c0, d as B5, v as X5, i as z5, r as H5, n as wn, o as q5, u as W5 } from "./BaseDialog.vue_vue_type_script_setup_true_lang-DQg0AdC9.js";
8
8
  import { useBreakpoints as oo, components as yi, useSnackbar as ss, useDialog as j5, useDialogChild as U5, FmButtonVariant as Ed } from "@feedmepos/ui-library";
9
9
  import { u as Ka, k as u0, l as fo, a as Ja, F as _a, r as co, d as ct, m as ls, t as Y5, b as Pi, q as uo, n as Z5, o as G5, e as Q5, v as gl, w as Zh, x as K5, p as J5 } from "./vue-i18n-BJW_sJot.js";
10
10
  import { _ as Pd, a as _5 } from "./SelectComponent.vue_vue_type_script_setup_true_lang-BcQEW5MO.js";
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as g, computed as w, resolveComponent as k, createBlock as a, openBlock as t, withCtx as $, createVNode as d, createElementVNode as y, unref as e, normalizeStyle as C, normalizeClass as u, createElementBlock as _, Fragment as h, renderList as B } from "vue";
2
- import { _ as b } from "./FilterSelector.vue_vue_type_script_setup_true_lang-Bp0VTpqx.js";
3
- import { _ as F } from "./Default.vue_vue_type_script_setup_true_lang-B4KGPc-A.js";
4
- import { a as P } from "./BaseDialog.vue_vue_type_script_setup_true_lang-BMUdA00d.js";
2
+ import { _ as b } from "./FilterSelector.vue_vue_type_script_setup_true_lang-CLX1VnmB.js";
3
+ import { _ as F } from "./Default.vue_vue_type_script_setup_true_lang-BJl8wpy8.js";
4
+ import { a as P } from "./BaseDialog.vue_vue_type_script_setup_true_lang-DQg0AdC9.js";
5
5
  import { storeToRefs as R } from "pinia";
6
6
  import { _ as S } from "./NoData.vue_vue_type_script_setup_true_lang-CtN7oqXx.js";
7
7
  import { useBreakpoints as V } from "@feedmepos/ui-library";
8
- import { _ as z } from "./MenuTab.vue_vue_type_script_setup_true_lang-BRCHCYha.js";
8
+ import { _ as z } from "./MenuTab.vue_vue_type_script_setup_true_lang-DSEmCasr.js";
9
9
  import { useI18n as D } from "@feedmepos/mf-common";
10
10
  const G = /* @__PURE__ */ g({
11
11
  __name: "OverviewView",
@@ -1,83 +1,83 @@
1
- import { defineComponent as be, ref as B, watch as oe, computed as C, h as v, withModifiers as he, resolveComponent as S, createBlock as E, openBlock as O, withCtx as i, createVNode as l, createElementVNode as y, unref as e, normalizeStyle as xe, normalizeClass as _, withDirectives as M, createElementBlock as Ce, Fragment as Se, renderList as _e, toDisplayString as V, createTextVNode as ke, vShow as q } from "vue";
2
- import { storeToRefs as ae } from "pinia";
3
- import { a as Ie, u as we } from "./BaseDialog.vue_vue_type_script_setup_true_lang-BMUdA00d.js";
4
- import { _ as $e } from "./Default.vue_vue_type_script_setup_true_lang-B4KGPc-A.js";
5
- import { u as Re } from "./message-dialog-UoMWOnil.js";
6
- import { b as re, f as De } from "./vue-i18n-BJW_sJot.js";
7
- import { useSnackbar as Fe, useBreakpoints as Le, components as Ne, FmButtonColorThemeVariant as Oe } from "@feedmepos/ui-library";
8
- import { _ as Ve } from "./NoData.vue_vue_type_script_setup_true_lang-CtN7oqXx.js";
9
- import { useRouter as ze, useRoute as Je, onBeforeRouteLeave as Pe } from "vue-router";
10
- import { useI18n as Ae } from "@feedmepos/mf-common";
11
- import { r as ne } from "./i18n-DQxDgiLO.js";
12
- const Te = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Be = { class: "w-[343px]" }, Ee = { class: "fm-typo-en-body-md-600" }, et = /* @__PURE__ */ be({
1
+ import { defineComponent as he, ref as E, watch as ae, computed as x, h as g, withModifiers as Ce, resolveComponent as S, createBlock as M, openBlock as V, withCtx as i, createVNode as l, createElementVNode as y, unref as e, normalizeStyle as xe, normalizeClass as _, withDirectives as Y, createElementBlock as Se, Fragment as _e, renderList as ke, toDisplayString as z, createTextVNode as Ie, vShow as q } from "vue";
2
+ import { storeToRefs as re } from "pinia";
3
+ import { a as we, u as $e } from "./BaseDialog.vue_vue_type_script_setup_true_lang-DQg0AdC9.js";
4
+ import { _ as Re } from "./Default.vue_vue_type_script_setup_true_lang-BJl8wpy8.js";
5
+ import { u as De } from "./message-dialog-UoMWOnil.js";
6
+ import { b as ne, f as Fe } from "./vue-i18n-BJW_sJot.js";
7
+ import { useSnackbar as Le, useBreakpoints as Ne, components as Oe, FmButtonColorThemeVariant as Ve } from "@feedmepos/ui-library";
8
+ import { _ as ze } from "./NoData.vue_vue_type_script_setup_true_lang-CtN7oqXx.js";
9
+ import { useRouter as Je, useRoute as Pe, onBeforeRouteLeave as Ae } from "vue-router";
10
+ import { useI18n as Te } from "@feedmepos/mf-common";
11
+ import { r as le } from "./i18n-DQxDgiLO.js";
12
+ const Be = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ee = { class: "w-[343px]" }, Me = { class: "fm-typo-en-body-md-600" }, tt = /* @__PURE__ */ he({
13
13
  __name: "Report",
14
- setup(Me) {
15
- const { t: a, te: K } = Ae(), U = ze(), j = Je(), p = Ie(), le = we(), { business: se } = ae(re()), {
14
+ setup(Ye) {
15
+ const { t: a, te: K } = Te(), U = Je(), j = Pe(), p = we(), se = $e(), { business: ce } = re(ne()), {
16
16
  reports: d,
17
17
  categories: $,
18
18
  pinReport: R,
19
- isOpenAddReportDialog: ce,
20
- scrollPositionY: Y,
21
- customReportQuota: G,
22
- canCreateCustomReport: ie
23
- } = ae(p), { promptMessage: H } = Re(), { promptLoader: Q } = De(), g = Fe(), { breakpoints: s } = Le(), b = B();
24
- Pe(() => {
25
- b.value && (Y.value = b.value.$el.children[0].scrollTop);
26
- }), oe(b, () => {
19
+ isOpenAddReportDialog: ie,
20
+ scrollPositionY: G,
21
+ customReportQuota: D,
22
+ canCreateCustomReport: H
23
+ } = re(p), { promptMessage: Q } = De(), { promptLoader: W } = Fe(), f = Le(), { breakpoints: s } = Ne(), b = E();
24
+ Ae(() => {
25
+ b.value && (G.value = b.value.$el.children[0].scrollTop);
26
+ }), ae(b, () => {
27
27
  b.value && setTimeout(() => {
28
- b.value.$el.children[0].scrollTop = Y.value;
28
+ b.value.$el.children[0].scrollTop = G.value;
29
29
  }, 200);
30
30
  });
31
- const z = C(() => R.value && d.value ? d.value.filter((t) => {
32
- var o;
33
- return (o = R.value) == null ? void 0 : o.includes(t.id);
31
+ const J = x(() => R.value && d.value ? d.value.filter((o) => {
32
+ var t;
33
+ return (t = R.value) == null ? void 0 : t.includes(o.id);
34
34
  }) : []);
35
- oe(
36
- [() => se.value],
35
+ ae(
36
+ [() => ce.value],
37
37
  () => {
38
38
  p.refreshPinReport();
39
39
  },
40
40
  { immediate: !0 }
41
41
  );
42
- const W = C(() => z.value.length > 0 ? d.value.filter(
43
- (t) => z.value.findIndex((o) => o.id === t.id) === -1
44
- ) : d.value), { FmButton: ue, FmMenu: J, FmMenuItem: k, FmIcon: P, FmChip: A } = Ne, X = C(() => [
42
+ const X = x(() => J.value.length > 0 ? d.value.filter(
43
+ (o) => J.value.findIndex((t) => t.id === o.id) === -1
44
+ ) : d.value), { FmButton: ue, FmMenu: P, FmMenuItem: k, FmIcon: A, FmChip: T } = Oe, Z = x(() => [
45
45
  { value: void 0, label: "All" },
46
- ...$.value.map((t) => ({
47
- value: t.id,
48
- label: t.name
46
+ ...$.value.map((o) => ({
47
+ value: o.id,
48
+ label: o.name
49
49
  }))
50
- ]), h = B(X.value[0]), D = B(""), x = C(() => W.value.length === 0 || $.value.length === 0 ? [] : [
51
- ...z.value.map((o) => {
52
- const r = $.value.find((c) => c.id === o.category);
50
+ ]), h = E(Z.value[0]), F = E(""), C = x(() => X.value.length === 0 || $.value.length === 0 ? [] : [
51
+ ...J.value.map((t) => {
52
+ const r = $.value.find((c) => c.id === t.category);
53
53
  return {
54
- name: ne(a, K, o.name, "other"),
54
+ name: le(a, K, t.name, "other"),
55
55
  categoryId: (r == null ? void 0 : r.id) ?? "",
56
56
  category: r != null && r.name ? a(`report.category.${r.name}`) : a("report.common.uncategorized"),
57
- reportId: o.id,
58
- editable: o.editable,
57
+ reportId: t.id,
58
+ editable: t.editable,
59
59
  pin: !0
60
60
  };
61
- }).filter((o) => h.value.value && o.categoryId !== h.value.value ? !1 : o.name.toLowerCase().indexOf(D.value.toLowerCase()) !== -1),
62
- ...W.value.map((o) => {
63
- const r = $.value.find((c) => c.id === o.category);
61
+ }).filter((t) => h.value.value && t.categoryId !== h.value.value ? !1 : t.name.toLowerCase().indexOf(F.value.toLowerCase()) !== -1),
62
+ ...X.value.map((t) => {
63
+ const r = $.value.find((c) => c.id === t.category);
64
64
  return {
65
- name: ne(a, K, o.name, "other"),
65
+ name: le(a, K, t.name, "other"),
66
66
  categoryId: (r == null ? void 0 : r.id) ?? "",
67
67
  category: r != null && r.name ? a(`report.category.${r.name}`) : a("report.common.uncategorized"),
68
- reportId: o.id,
69
- editable: o.editable,
68
+ reportId: t.id,
69
+ editable: t.editable,
70
70
  pin: !1
71
71
  };
72
- }).filter((o) => h.value.value && o.categoryId !== h.value.value ? !1 : o.name.toLowerCase().indexOf(D.value.toLowerCase()) !== -1)
73
- ]), me = C(
74
- () => x.value.map((t) => `${t.name}${t.category}`).toString()
72
+ }).filter((t) => h.value.value && t.categoryId !== h.value.value ? !1 : t.name.toLowerCase().indexOf(F.value.toLowerCase()) !== -1)
73
+ ]), me = x(
74
+ () => C.value.map((o) => `${o.name}${o.category}`).toString()
75
75
  ), pe = [
76
76
  {
77
77
  accessorKey: "name",
78
78
  header: a("report.common.name"),
79
79
  enableSorting: !1,
80
- cell: (t) => t.getValue()
80
+ cell: (o) => o.getValue()
81
81
  },
82
82
  {
83
83
  accessorKey: "category",
@@ -86,13 +86,13 @@ const Te = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Be
86
86
  meta: {
87
87
  width: "200px"
88
88
  },
89
- cell: (t) => v(
90
- A,
89
+ cell: (o) => g(
90
+ T,
91
91
  {
92
- class: `${t.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`,
92
+ 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`,
93
93
  compact: !0
94
94
  },
95
- { default: () => t.getValue() }
95
+ { default: () => o.getValue() }
96
96
  )
97
97
  },
98
98
  {
@@ -102,12 +102,12 @@ const Te = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Be
102
102
  meta: {
103
103
  width: "100px"
104
104
  },
105
- cell: (t) => {
106
- const o = t.row.original, r = o.reportId, c = d.value.find((u) => u.id === r), T = [
105
+ cell: (o) => {
106
+ const t = o.row.original, r = t.reportId, c = d.value.find((u) => u.id === r), B = [
107
107
  {
108
108
  label: a("report.common.duplicate"),
109
109
  onClick: () => {
110
- c && Z(c);
110
+ c && te(c);
111
111
  },
112
112
  variant: "",
113
113
  disabled: !1
@@ -118,32 +118,32 @@ const Te = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Be
118
118
  c && ee(c);
119
119
  },
120
120
  variant: "destructive",
121
- disabled: !o.editable
121
+ disabled: !t.editable
122
122
  }
123
123
  ];
124
- return v(
124
+ return g(
125
125
  "div",
126
126
  {
127
127
  class: `flex ${s.value.lg || s.value.md ? "justify-end" : ""} items-center`
128
128
  },
129
129
  {
130
130
  default: () => [
131
- v(
131
+ g(
132
132
  "button",
133
133
  {
134
- onClick: he(() => {
135
- c && te(c);
134
+ onClick: Ce(() => {
135
+ c && oe(c);
136
136
  }, ["stop"]),
137
- class: `text-fm-color-neutral-gray-400 ${o.pin ? "" : "show-pin"} hover:bg-fm-color-opacity-sm rounded-lg flex items-center justify-center`
137
+ class: `text-fm-color-neutral-gray-400 ${t.pin ? "" : "show-pin"} hover:bg-fm-color-opacity-sm rounded-lg flex items-center justify-center`
138
138
  },
139
139
  {
140
140
  default: () => [
141
- v(
142
- P,
141
+ g(
142
+ A,
143
143
  {
144
144
  name: "keep",
145
145
  class: "px-12 p-8",
146
- outline: !o.pin,
146
+ outline: !t.pin,
147
147
  size: "md"
148
148
  },
149
149
  {}
@@ -151,12 +151,12 @@ const Te = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Be
151
151
  ]
152
152
  }
153
153
  ),
154
- v(
155
- J,
154
+ g(
155
+ P,
156
156
  { stopClickPropagation: !0, shift: !0 },
157
157
  {
158
- default: () => T.map(
159
- (u) => v(
158
+ default: () => B.map(
159
+ (u) => g(
160
160
  k,
161
161
  {
162
162
  onClick: u.disabled ? {} : u.onClick,
@@ -165,17 +165,17 @@ const Te = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Be
165
165
  disabled: u.disabled
166
166
  },
167
167
  {
168
- label: () => v("p", u.label)
168
+ label: () => g("p", u.label)
169
169
  }
170
170
  )
171
171
  ),
172
- "menu-button": () => v(
172
+ "menu-button": () => g(
173
173
  ue,
174
174
  {
175
175
  variant: "tertiary",
176
176
  size: "md",
177
177
  icon: "more_vert",
178
- iconColor: Oe.NeutralGray400
178
+ iconColor: Ve.NeutralGray400
179
179
  },
180
180
  {}
181
181
  )
@@ -187,69 +187,80 @@ const Te = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Be
187
187
  }
188
188
  }
189
189
  ];
190
- async function Z(t) {
191
- if (await H({
190
+ async function de(o) {
191
+ if (await Q({
192
192
  title: a("report.common.duplicate"),
193
193
  message: a("report.messages.confirmAction", {
194
194
  action: a("report.common.duplicate"),
195
- name: t.name
195
+ name: o.name
196
196
  })
197
197
  })) {
198
- const r = JSON.parse(JSON.stringify(t));
199
- r.editable = !0, r.id = "", r.name = `${r.name} ${a("report.common.duplicate")}`, Q(async () => {
198
+ const r = JSON.parse(JSON.stringify(o));
199
+ r.editable = !0, r.id = "", r.name = `${r.name} ${a("report.common.duplicate")}`, W(async () => {
200
200
  try {
201
- await p.createOrUpdateReport(r), g.open({
201
+ await p.createOrUpdateReport(r), f.open({
202
202
  message: `${a("report.messages.duplicateSuccess", { name: r.name })}`,
203
203
  type: "success"
204
204
  });
205
205
  } catch (c) {
206
- g.open({ message: JSON.stringify(c), type: "error" });
206
+ f.open({ message: JSON.stringify(c), type: "error" });
207
207
  }
208
208
  });
209
209
  }
210
210
  }
211
- async function ee(t) {
212
- await H({
211
+ async function ee(o) {
212
+ await Q({
213
213
  title: a("report.messages.deleteReport"),
214
- message: a("report.messages.confirmDelete", { name: t.name })
215
- }) && Q(async () => {
214
+ message: a("report.messages.confirmDelete", { name: o.name })
215
+ }) && W(async () => {
216
216
  try {
217
- await p.removeReport(t), g.open({
218
- message: a("report.messages.deleteSuccess", { name: t.name }),
217
+ await p.removeReport(o), f.open({
218
+ message: a("report.messages.deleteSuccess", { name: o.name }),
219
219
  type: "success"
220
220
  });
221
221
  } catch (r) {
222
- g.open({ message: JSON.stringify(r), type: "error" });
222
+ f.open({ message: JSON.stringify(r), type: "error" });
223
223
  }
224
224
  });
225
225
  }
226
- function de() {
227
- if (ie.value)
228
- ce.value = !0;
226
+ async function te(o) {
227
+ if (H.value)
228
+ await de(o);
229
229
  else {
230
- let t = `Your current plan only support up to ${G.value} custom reports.`;
231
- G.value === 0 && (t = "Your current plan does not support custom report."), g.open({
230
+ let t = `Your current plan only support up to ${D.value} custom reports.`;
231
+ D.value === 0 && (t = "Your current plan does not support custom report."), f.open({
232
232
  message: t,
233
233
  type: "error"
234
234
  });
235
235
  }
236
236
  }
237
- function te(t) {
238
- R.value && R.value.includes(t.id) ? (g.open({
239
- message: `${a("report.common.unpin")} ${t.name} ${a("report.common.successful")}`,
237
+ function fe() {
238
+ if (H.value)
239
+ ie.value = !0;
240
+ else {
241
+ let o = `Your current plan only support up to ${D.value} custom reports.`;
242
+ D.value === 0 && (o = "Your current plan does not support custom report."), f.open({
243
+ message: o,
244
+ type: "error"
245
+ });
246
+ }
247
+ }
248
+ function oe(o) {
249
+ R.value && R.value.includes(o.id) ? (f.open({
250
+ message: `${a("report.common.unpin")} ${o.name} ${a("report.common.successful")}`,
240
251
  type: "success"
241
- }), p.clearPinReport(t.id)) : (g.open({
242
- message: `${a("report.common.pin")} ${t.name} ${a("report.common.successful")}`,
252
+ }), p.clearPinReport(o.id)) : (f.open({
253
+ message: `${a("report.common.pin")} ${o.name} ${a("report.common.successful")}`,
243
254
  type: "success"
244
- }), p.cachePinReport(t));
255
+ }), p.cachePinReport(o));
245
256
  }
246
- function fe(t) {
247
- h.value = t;
257
+ function ve(o) {
258
+ h.value = o;
248
259
  }
249
- const { selectedLocationIds: I, dateRange: F, compareDateRange: L, timeRange: f, locations: ve } = re(), N = C(() => I.length === ve.length);
250
- return (t, o) => {
251
- const r = S("FmPageHead"), c = S("FmSearch"), T = S("FmForm"), u = S("FmListItem"), ge = S("FmList"), ye = S("FmTable");
252
- return O(), E($e, null, {
260
+ const { selectedLocationIds: I, dateRange: L, compareDateRange: N, timeRange: v, locations: ge } = ne(), O = x(() => I.length === ge.length);
261
+ return (o, t) => {
262
+ const r = S("FmPageHead"), c = S("FmSearch"), B = S("FmForm"), u = S("FmListItem"), ye = S("FmList"), be = S("FmTable");
263
+ return V(), M(Re, null, {
253
264
  default: i(() => [
254
265
  l(r, {
255
266
  title: e(a)("report.common.report", 1),
@@ -262,31 +273,31 @@ const Te = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Be
262
273
  prependIcon: "add"
263
274
  }
264
275
  ],
265
- "onClick:action": o[0] || (o[0] = (n) => de())
276
+ "onClick:action": t[0] || (t[0] = (n) => fe())
266
277
  }, null, 8, ["title", "actions"]),
267
278
  y("div", {
268
279
  class: _(`overflow-y-hidden flex flex-col gap-8 ${e(s).sm || e(s).xs ? "mb-20" : ""}`),
269
280
  style: xe({ height: `calc(100% - ${e(s).lg || e(s).md ? 72 : 64}px)` })
270
281
  }, [
271
- l(T, {
282
+ l(B, {
272
283
  class: _(`flex items-center gap-2 ${e(s).sm || e(s).xs ? "px-3" : "px-24"}`)
273
284
  }, {
274
285
  default: i(() => [
275
- l(e(J), null, {
286
+ l(e(P), null, {
276
287
  "menu-button": i(() => [
277
- l(e(A), { class: "fm-typo-en-body-md-600 text-fm-color-neutral-gray-400" }, {
288
+ l(e(T), { class: "fm-typo-en-body-md-600 text-fm-color-neutral-gray-400" }, {
278
289
  default: i(() => [
279
- y("p", null, V(e(a)(`report.category.${h.value.label}`)), 1),
280
- l(e(P), { name: "expand_more" })
290
+ y("p", null, z(e(a)(`report.category.${h.value.label}`)), 1),
291
+ l(e(A), { name: "expand_more" })
281
292
  ]),
282
293
  _: 1
283
294
  })
284
295
  ]),
285
296
  default: i(() => [
286
- (O(!0), Ce(Se, null, _e(X.value, (n, m) => (O(), E(e(k), {
297
+ (V(!0), Se(_e, null, ke(Z.value, (n, m) => (V(), M(e(k), {
287
298
  key: m,
288
299
  label: e(a)(`report.category.${n.label}`),
289
- onClick: () => fe(n)
300
+ onClick: () => ve(n)
290
301
  }, null, 8, ["label", "onClick"]))), 128))
291
302
  ]),
292
303
  _: 1
@@ -294,64 +305,64 @@ const Te = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Be
294
305
  y("div", {
295
306
  class: _(`flex ${e(s).sm || e(s).xs ? "justify-center items-center" : ""}`)
296
307
  }, [
297
- y("p", Te, V(e(a)("report.common.results", { count: x.value.length })), 1)
308
+ y("p", Be, z(e(a)("report.common.results", { count: C.value.length })), 1)
298
309
  ], 2),
299
- o[3] || (o[3] = y("div", { class: "grow" }, null, -1)),
300
- y("div", Be, [
310
+ t[3] || (t[3] = y("div", { class: "grow" }, null, -1)),
311
+ y("div", Ee, [
301
312
  l(c, {
302
- modelValue: D.value,
303
- "onUpdate:modelValue": o[1] || (o[1] = (n) => D.value = n),
313
+ modelValue: F.value,
314
+ "onUpdate:modelValue": t[1] || (t[1] = (n) => F.value = n),
304
315
  class: _(`${e(s).lg || e(s).md ? "grow" : ""}`)
305
316
  }, null, 8, ["modelValue", "class"])
306
317
  ])
307
318
  ]),
308
319
  _: 1
309
320
  }, 8, ["class"]),
310
- M((O(), E(ye, {
321
+ Y((V(), M(be, {
311
322
  key: me.value,
312
323
  ref_key: "table",
313
324
  ref: b,
314
325
  class: _([e(s).sm || e(s).xs ? "px-0" : "px-24", "report-table"]),
315
326
  style: { height: "calc(100% - 40px)" },
316
327
  "column-defs": pe,
317
- "row-data": x.value,
318
- "page-size": x.value.length,
328
+ "row-data": C.value,
329
+ "page-size": C.value.length,
319
330
  "hide-footer": !0,
320
331
  "row-class-name": "row",
321
- onRowClick: o[2] || (o[2] = (n) => {
322
- e(le).suppressReportRouteSync = !0, e(p).updateCurrentReportId(n.original.reportId), e(U).push({
332
+ onRowClick: t[2] || (t[2] = (n) => {
333
+ e(se).suppressReportRouteSync = !0, e(p).updateCurrentReportId(n.original.reportId), e(U).push({
323
334
  name: "reportView",
324
335
  query: {
325
336
  ...e(j).query,
326
337
  reportId: n.original.reportId,
327
- startDate: e(F).startDate,
328
- endDate: e(F).endDate,
329
- compareStartDate: e(L).startDate,
330
- compareEndDate: e(L).endDate,
331
- timeStart: e(f).start ? JSON.stringify(e(f).start) : null,
332
- timeEnd: e(f).end ? JSON.stringify(e(f).end) : null,
333
- isAllLocation: N.value.toString(),
334
- locationIds: N.value ? null : e(I) ? JSON.stringify(e(I)) : null
338
+ startDate: e(L).startDate,
339
+ endDate: e(L).endDate,
340
+ compareStartDate: e(N).startDate,
341
+ compareEndDate: e(N).endDate,
342
+ timeStart: e(v).start ? JSON.stringify(e(v).start) : null,
343
+ timeEnd: e(v).end ? JSON.stringify(e(v).end) : null,
344
+ isAllLocation: O.value.toString(),
345
+ locationIds: O.value ? null : e(I) ? JSON.stringify(e(I)) : null
335
346
  }
336
347
  });
337
348
  })
338
349
  }, {
339
350
  "list-row": i(({ original: n }) => [
340
- l(ge, {
351
+ l(ye, {
341
352
  onClick: () => {
342
353
  n.reportId && (e(p).updateCurrentReportId(n.reportId), e(U).push({
343
354
  name: "reportView",
344
355
  query: {
345
356
  ...e(j).query,
346
357
  reportId: n.reportId,
347
- startDate: e(F).startDate,
348
- endDate: e(F).endDate,
349
- compareStartDate: e(L).startDate,
350
- compareEndDate: e(L).endDate,
351
- timeStart: e(f).start ? JSON.stringify(e(f).start) : null,
352
- timeEnd: e(f).end ? JSON.stringify(e(f).end) : null,
353
- isAllLocation: N.value.toString(),
354
- locationIds: N.value ? null : e(I) ? JSON.stringify(e(I)) : null
358
+ startDate: e(L).startDate,
359
+ endDate: e(L).endDate,
360
+ compareStartDate: e(N).startDate,
361
+ compareEndDate: e(N).endDate,
362
+ timeStart: e(v).start ? JSON.stringify(e(v).start) : null,
363
+ timeEnd: e(v).end ? JSON.stringify(e(v).end) : null,
364
+ isAllLocation: O.value.toString(),
365
+ locationIds: O.value ? null : e(I) ? JSON.stringify(e(I)) : null
355
366
  }
356
367
  }));
357
368
  }
@@ -363,23 +374,23 @@ const Te = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Be
363
374
  clickable: ""
364
375
  }, {
365
376
  append: i(() => [
366
- l(e(A), {
377
+ l(e(T), {
367
378
  class: _(
368
379
  n.category !== "Uncategorized" ? "bg-fm-color-system-info-100 text-fm-color-typo-info" : "text-fm-color-typo-secondary"
369
380
  ),
370
381
  compact: !0
371
382
  }, {
372
383
  default: i(() => [
373
- y("p", Ee, V(n.category), 1)
384
+ y("p", Me, z(n.category), 1)
374
385
  ]),
375
386
  _: 2
376
387
  }, 1032, ["class"]),
377
- l(e(J), {
388
+ l(e(P), {
378
389
  placement: "left",
379
390
  "stop-click-propagation": !0
380
391
  }, {
381
392
  "menu-button": i(() => [
382
- l(e(P), {
393
+ l(e(A), {
383
394
  name: "more_vert",
384
395
  class: "btn-color"
385
396
  })
@@ -391,7 +402,7 @@ const Te = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Be
391
402
  const m = e(d).find(
392
403
  (w) => w.id === n.reportId
393
404
  );
394
- m && te(m);
405
+ m && oe(m);
395
406
  }
396
407
  }, null, 8, ["label", "onClick"]),
397
408
  l(e(k), {
@@ -400,10 +411,10 @@ const Te = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Be
400
411
  const m = e(d).find(
401
412
  (w) => w.id === n.reportId
402
413
  );
403
- m && Z(m);
414
+ m && te(m);
404
415
  }
405
416
  }, null, 8, ["label", "onClick"]),
406
- M(l(e(k), {
417
+ Y(l(e(k), {
407
418
  label: e(a)("report.common.delete"),
408
419
  class: "text-fm-color-typo-error",
409
420
  onClick: () => {
@@ -414,7 +425,7 @@ const Te = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Be
414
425
  }
415
426
  }, {
416
427
  label: i(() => [
417
- ke(V(e(a)("report.common.delete")), 1)
428
+ Ie(z(e(a)("report.common.delete")), 1)
418
429
  ]),
419
430
  _: 2
420
431
  }, 1032, ["label", "onClick"]), [
@@ -432,10 +443,10 @@ const Te = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Be
432
443
  ]),
433
444
  _: 1
434
445
  }, 8, ["class", "row-data", "page-size"])), [
435
- [q, x.value.length > 0]
446
+ [q, C.value.length > 0]
436
447
  ]),
437
- M(l(Ve, null, null, 512), [
438
- [q, x.value.length === 0]
448
+ Y(l(ze, null, null, 512), [
449
+ [q, C.value.length === 0]
439
450
  ])
440
451
  ], 6)
441
452
  ]),
@@ -445,5 +456,5 @@ const Te = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Be
445
456
  }
446
457
  });
447
458
  export {
448
- et as default
459
+ tt as default
449
460
  };