@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.
- package/dist/{App-Dl4FEwnr.js → App-ChOsyC6V.js} +3 -3
- package/dist/{BaseDialog.vue_vue_type_script_setup_true_lang-BMUdA00d.js → BaseDialog.vue_vue_type_script_setup_true_lang-DQg0AdC9.js} +2 -2
- 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
- package/dist/{FilterSelector.vue_vue_type_script_setup_true_lang-Bp0VTpqx.js → FilterSelector.vue_vue_type_script_setup_true_lang-CLX1VnmB.js} +221 -221
- package/dist/{InsightView-VRhKOgcg.js → InsightView-DZv9LOkh.js} +2 -2
- package/dist/{Layout-Djm1HkoE.js → Layout-CGewTKq4.js} +1 -1
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-BRCHCYha.js → MenuTab.vue_vue_type_script_setup_true_lang-DSEmCasr.js} +3 -3
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-BRpEu6MW.js → NavigationTab.vue_vue_type_script_setup_true_lang-CghXyTqi.js} +1 -1
- package/dist/{OverviewView-BNle5SLL.js → OverviewView-CqIlzBhG.js} +4 -4
- package/dist/{Report-DUK8tWB1.js → Report-93_p2p_Y.js} +162 -151
- package/dist/{ReportEditor-C55X4vz_.js → ReportEditor-sKAoWQu8.js} +3 -3
- package/dist/{ReportView-DAmVomKW.js → ReportView-suBIJBWN.js} +5 -5
- package/dist/{Setting-DgU3IvCo.js → Setting-Bfk6TybW.js} +2 -2
- package/dist/{TileEditor-UfdRj82z.js → TileEditor-DIUcwxSj.js} +3 -3
- package/dist/{TransitionFade-Cqa0p_nG.js → TransitionFade-B00nCVsI.js} +2 -2
- package/dist/app.js +9 -9
- package/dist/assets/{formatChartData.worker-Cb40k96i.js → formatChartData.worker-DmEF8HW6.js} +1 -1
- package/dist/assets/{processTableData.worker-DS6uNX_h.js → processTableData.worker-BsdnWDQK.js} +1 -1
- 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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
7
|
-
import { a as S } from "./FilterSelector.vue_vue_type_script_setup_true_lang-
|
|
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-
|
|
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-
|
|
3
|
-
import { _ as F } from "./Default.vue_vue_type_script_setup_true_lang-
|
|
4
|
-
import { a as P } from "./BaseDialog.vue_vue_type_script_setup_true_lang-
|
|
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-
|
|
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
|
|
2
|
-
import { storeToRefs as
|
|
3
|
-
import { a as
|
|
4
|
-
import { _ as
|
|
5
|
-
import { u as
|
|
6
|
-
import { b as
|
|
7
|
-
import { useSnackbar as
|
|
8
|
-
import { _ as
|
|
9
|
-
import { useRouter as
|
|
10
|
-
import { useI18n as
|
|
11
|
-
import { r as
|
|
12
|
-
const
|
|
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(
|
|
15
|
-
const { t: a, te: K } =
|
|
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:
|
|
20
|
-
scrollPositionY:
|
|
21
|
-
customReportQuota:
|
|
22
|
-
canCreateCustomReport:
|
|
23
|
-
} =
|
|
24
|
-
|
|
25
|
-
b.value && (
|
|
26
|
-
}),
|
|
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 =
|
|
28
|
+
b.value.$el.children[0].scrollTop = G.value;
|
|
29
29
|
}, 200);
|
|
30
30
|
});
|
|
31
|
-
const
|
|
32
|
-
var
|
|
33
|
-
return (
|
|
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
|
-
|
|
36
|
-
[() =>
|
|
35
|
+
ae(
|
|
36
|
+
[() => ce.value],
|
|
37
37
|
() => {
|
|
38
38
|
p.refreshPinReport();
|
|
39
39
|
},
|
|
40
40
|
{ immediate: !0 }
|
|
41
41
|
);
|
|
42
|
-
const
|
|
43
|
-
(
|
|
44
|
-
) : d.value), { FmButton: ue, FmMenu:
|
|
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((
|
|
47
|
-
value:
|
|
48
|
-
label:
|
|
46
|
+
...$.value.map((o) => ({
|
|
47
|
+
value: o.id,
|
|
48
|
+
label: o.name
|
|
49
49
|
}))
|
|
50
|
-
]), h =
|
|
51
|
-
...
|
|
52
|
-
const r = $.value.find((c) => c.id ===
|
|
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:
|
|
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:
|
|
58
|
-
editable:
|
|
57
|
+
reportId: t.id,
|
|
58
|
+
editable: t.editable,
|
|
59
59
|
pin: !0
|
|
60
60
|
};
|
|
61
|
-
}).filter((
|
|
62
|
-
...
|
|
63
|
-
const r = $.value.find((c) => c.id ===
|
|
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:
|
|
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:
|
|
69
|
-
editable:
|
|
68
|
+
reportId: t.id,
|
|
69
|
+
editable: t.editable,
|
|
70
70
|
pin: !1
|
|
71
71
|
};
|
|
72
|
-
}).filter((
|
|
73
|
-
]), me =
|
|
74
|
-
() =>
|
|
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: (
|
|
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: (
|
|
90
|
-
|
|
89
|
+
cell: (o) => g(
|
|
90
|
+
T,
|
|
91
91
|
{
|
|
92
|
-
class: `${
|
|
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: () =>
|
|
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: (
|
|
106
|
-
const
|
|
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 &&
|
|
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: !
|
|
121
|
+
disabled: !t.editable
|
|
122
122
|
}
|
|
123
123
|
];
|
|
124
|
-
return
|
|
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
|
-
|
|
131
|
+
g(
|
|
132
132
|
"button",
|
|
133
133
|
{
|
|
134
|
-
onClick:
|
|
135
|
-
c &&
|
|
134
|
+
onClick: Ce(() => {
|
|
135
|
+
c && oe(c);
|
|
136
136
|
}, ["stop"]),
|
|
137
|
-
class: `text-fm-color-neutral-gray-400 ${
|
|
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
|
-
|
|
142
|
-
|
|
141
|
+
g(
|
|
142
|
+
A,
|
|
143
143
|
{
|
|
144
144
|
name: "keep",
|
|
145
145
|
class: "px-12 p-8",
|
|
146
|
-
outline: !
|
|
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
|
-
|
|
155
|
-
|
|
154
|
+
g(
|
|
155
|
+
P,
|
|
156
156
|
{ stopClickPropagation: !0, shift: !0 },
|
|
157
157
|
{
|
|
158
|
-
default: () =>
|
|
159
|
-
(u) =>
|
|
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: () =>
|
|
168
|
+
label: () => g("p", u.label)
|
|
169
169
|
}
|
|
170
170
|
)
|
|
171
171
|
),
|
|
172
|
-
"menu-button": () =>
|
|
172
|
+
"menu-button": () => g(
|
|
173
173
|
ue,
|
|
174
174
|
{
|
|
175
175
|
variant: "tertiary",
|
|
176
176
|
size: "md",
|
|
177
177
|
icon: "more_vert",
|
|
178
|
-
iconColor:
|
|
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
|
|
191
|
-
if (await
|
|
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:
|
|
195
|
+
name: o.name
|
|
196
196
|
})
|
|
197
197
|
})) {
|
|
198
|
-
const r = JSON.parse(JSON.stringify(
|
|
199
|
-
r.editable = !0, r.id = "", r.name = `${r.name} ${a("report.common.duplicate")}`,
|
|
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),
|
|
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
|
-
|
|
206
|
+
f.open({ message: JSON.stringify(c), type: "error" });
|
|
207
207
|
}
|
|
208
208
|
});
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
|
-
async function ee(
|
|
212
|
-
await
|
|
211
|
+
async function ee(o) {
|
|
212
|
+
await Q({
|
|
213
213
|
title: a("report.messages.deleteReport"),
|
|
214
|
-
message: a("report.messages.confirmDelete", { name:
|
|
215
|
-
}) &&
|
|
214
|
+
message: a("report.messages.confirmDelete", { name: o.name })
|
|
215
|
+
}) && W(async () => {
|
|
216
216
|
try {
|
|
217
|
-
await p.removeReport(
|
|
218
|
-
message: a("report.messages.deleteSuccess", { 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
|
-
|
|
222
|
+
f.open({ message: JSON.stringify(r), type: "error" });
|
|
223
223
|
}
|
|
224
224
|
});
|
|
225
225
|
}
|
|
226
|
-
function
|
|
227
|
-
if (
|
|
228
|
-
|
|
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 ${
|
|
231
|
-
|
|
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
|
|
238
|
-
|
|
239
|
-
|
|
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(
|
|
242
|
-
message: `${a("report.common.pin")} ${
|
|
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(
|
|
255
|
+
}), p.cachePinReport(o));
|
|
245
256
|
}
|
|
246
|
-
function
|
|
247
|
-
h.value =
|
|
257
|
+
function ve(o) {
|
|
258
|
+
h.value = o;
|
|
248
259
|
}
|
|
249
|
-
const { selectedLocationIds: I, dateRange:
|
|
250
|
-
return (
|
|
251
|
-
const r = S("FmPageHead"), c = S("FmSearch"),
|
|
252
|
-
return
|
|
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":
|
|
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(
|
|
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(
|
|
286
|
+
l(e(P), null, {
|
|
276
287
|
"menu-button": i(() => [
|
|
277
|
-
l(e(
|
|
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,
|
|
280
|
-
l(e(
|
|
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
|
-
(
|
|
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: () =>
|
|
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",
|
|
308
|
+
y("p", Be, z(e(a)("report.common.results", { count: C.value.length })), 1)
|
|
298
309
|
], 2),
|
|
299
|
-
|
|
300
|
-
y("div",
|
|
310
|
+
t[3] || (t[3] = y("div", { class: "grow" }, null, -1)),
|
|
311
|
+
y("div", Ee, [
|
|
301
312
|
l(c, {
|
|
302
|
-
modelValue:
|
|
303
|
-
"onUpdate:modelValue":
|
|
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
|
-
|
|
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":
|
|
318
|
-
"page-size":
|
|
328
|
+
"row-data": C.value,
|
|
329
|
+
"page-size": C.value.length,
|
|
319
330
|
"hide-footer": !0,
|
|
320
331
|
"row-class-name": "row",
|
|
321
|
-
onRowClick:
|
|
322
|
-
e(
|
|
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(
|
|
328
|
-
endDate: e(
|
|
329
|
-
compareStartDate: e(
|
|
330
|
-
compareEndDate: e(
|
|
331
|
-
timeStart: e(
|
|
332
|
-
timeEnd: e(
|
|
333
|
-
isAllLocation:
|
|
334
|
-
locationIds:
|
|
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(
|
|
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(
|
|
348
|
-
endDate: e(
|
|
349
|
-
compareStartDate: e(
|
|
350
|
-
compareEndDate: e(
|
|
351
|
-
timeStart: e(
|
|
352
|
-
timeEnd: e(
|
|
353
|
-
isAllLocation:
|
|
354
|
-
locationIds:
|
|
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(
|
|
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",
|
|
384
|
+
y("p", Me, z(n.category), 1)
|
|
374
385
|
]),
|
|
375
386
|
_: 2
|
|
376
387
|
}, 1032, ["class"]),
|
|
377
|
-
l(e(
|
|
388
|
+
l(e(P), {
|
|
378
389
|
placement: "left",
|
|
379
390
|
"stop-click-propagation": !0
|
|
380
391
|
}, {
|
|
381
392
|
"menu-button": i(() => [
|
|
382
|
-
l(e(
|
|
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 &&
|
|
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 &&
|
|
414
|
+
m && te(m);
|
|
404
415
|
}
|
|
405
416
|
}, null, 8, ["label", "onClick"]),
|
|
406
|
-
|
|
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
|
-
|
|
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,
|
|
446
|
+
[q, C.value.length > 0]
|
|
436
447
|
]),
|
|
437
|
-
|
|
438
|
-
[q,
|
|
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
|
-
|
|
459
|
+
tt as default
|
|
449
460
|
};
|