@feedmepos/mf-report 5.20.0 → 5.21.0-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-CsaGDMec.js → App-H4qTrOhm.js} +31 -31
- package/dist/{BaseDialog.vue_vue_type_script_setup_true_lang-Bjybaft4.js → BaseDialog.vue_vue_type_script_setup_true_lang-PrNxsye6.js} +7 -8
- package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-cfshXMB2.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-BeBr4VIF.js} +1 -1
- package/dist/{Default.vue_vue_type_script_setup_true_lang-DfNwCPM2.js → Default.vue_vue_type_script_setup_true_lang-DPYuS630.js} +2 -2
- package/dist/{FilterSelector.vue_vue_type_script_setup_true_lang-D2sJ7wd-.js → FilterSelector.vue_vue_type_script_setup_true_lang-lhcRFv_m.js} +91 -91
- package/dist/{InsightView-BulSbsiF.js → InsightView-A2RMHh9M.js} +5 -5
- package/dist/{Integration-D93eQCHy.js → Integration-Czc6q14E.js} +2 -2
- package/dist/{Integrations-jn20KmcD.js → Integrations-DIXSWGS_.js} +3 -3
- package/dist/{Layout-ClXNPXk7.js → Layout-DypUMIa7.js} +1 -1
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-DcTTUqUk.js → MenuTab.vue_vue_type_script_setup_true_lang-DDk9OhF-.js} +5 -5
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-CmVGQAeI.js → NavigationTab.vue_vue_type_script_setup_true_lang-C4NFUekp.js} +4 -4
- package/dist/{NoData.vue_vue_type_script_setup_true_lang-BUoYdn5S.js → NoData.vue_vue_type_script_setup_true_lang-CtN7oqXx.js} +1 -1
- package/dist/{OverviewView-DjqXHmvv.js → OverviewView-DBWJ04u3.js} +5 -5
- package/dist/{Report-D0sujnam.js → Report-CzdpyMiY.js} +102 -94
- package/dist/{ReportEditor-DSpGmZTl.js → ReportEditor-DozloMSJ.js} +207 -201
- package/dist/{ReportView-DGIeZUWs.js → ReportView-C9-upOW0.js} +7 -7
- package/dist/{SelectComponent.vue_vue_type_script_setup_true_lang-B2oCOTUH.js → SelectComponent.vue_vue_type_script_setup_true_lang-BcQEW5MO.js} +1 -1
- package/dist/{Setting-CqZ-HJH1.js → Setting-DJRh5073.js} +4 -4
- package/dist/{TileEditor-CCv4bJbJ.js → TileEditor-BRVBRjwj.js} +7 -7
- package/dist/{TransitionFade-BhI9kEGy.js → TransitionFade-CbhV6xur.js} +5 -5
- package/dist/app.js +19 -19
- package/dist/assets/{formatChartData.worker-BQkqrr7j.js → formatChartData.worker-CJVlLdXW.js} +2 -2
- package/dist/assets/{processTableData.worker-DFxLNXJc.js → processTableData.worker-DRkxI8qA.js} +2 -2
- package/dist/{vue-i18n-BQN8HgvD.js → vue-i18n-BJW_sJot.js} +1 -1
- package/package.json +1 -1
|
@@ -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-DPYuS630.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
|
-
import { b as B } from "./vue-i18n-
|
|
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-
|
|
5
|
-
import { _ as U } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-
|
|
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-
|
|
4
|
+
import { a as I } from "./NavigationTab.vue_vue_type_script_setup_true_lang-C4NFUekp.js";
|
|
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-PrNxsye6.js";
|
|
7
|
+
import { a as S } from "./FilterSelector.vue_vue_type_script_setup_true_lang-lhcRFv_m.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,11 +4,11 @@ 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-PrNxsye6.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
|
-
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-
|
|
10
|
-
import { _ as Pd, a as _5 } from "./SelectComponent.vue_vue_type_script_setup_true_lang-
|
|
11
|
-
import { C as fa, g as $5, e as Gh, a as e8, _ as Qh } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-
|
|
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
|
+
import { _ as Pd, a as _5 } from "./SelectComponent.vue_vue_type_script_setup_true_lang-BcQEW5MO.js";
|
|
11
|
+
import { C as fa, g as $5, e as Gh, a as e8, _ as Qh } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-BeBr4VIF.js";
|
|
12
12
|
import { detectLocale as t8, useCoreStore as r8 } from "@feedmepos/mf-common";
|
|
13
13
|
const a8 = { class: "flex flex-col" }, n8 = { class: "fm-typo-en-title-sm-600" }, i8 = { class: "grow" }, s8 = { class: "flex flex-col gap-8" }, l8 = { class: "flex flex-col w-full" }, o8 = { class: "flex flex-col gap-5 p-6" }, f8 = { class: "flex" }, Sd = {
|
|
14
14
|
// sales: [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as u, computed as o, resolveComponent as d, createElementBlock as r, openBlock as a, renderSlot as f, createVNode as g, withCtx as _, createCommentVNode as y, createElementVNode as l, toDisplayString as n } from "vue";
|
|
2
|
-
import { u as h } from "./vue-i18n-
|
|
2
|
+
import { u as h } from "./vue-i18n-BJW_sJot.js";
|
|
3
3
|
const v = { class: "flex flex-col h-full" }, D = ["src"], T = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, b = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary text-center" }, F = /* @__PURE__ */ u({
|
|
4
4
|
__name: "NoData",
|
|
5
5
|
props: {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { defineComponent as k, computed as w, resolveComponent as $, createBlock as n, openBlock as t, withCtx as y, createVNode as d, createElementVNode as h, unref as e, normalizeStyle as C, normalizeClass as u, createElementBlock as _, Fragment as b, renderList as B } from "vue";
|
|
2
|
-
import { _ as F } from "./FilterSelector.vue_vue_type_script_setup_true_lang-
|
|
3
|
-
import { _ as L } 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 F } from "./FilterSelector.vue_vue_type_script_setup_true_lang-lhcRFv_m.js";
|
|
3
|
+
import { _ as L } from "./Default.vue_vue_type_script_setup_true_lang-DPYuS630.js";
|
|
4
|
+
import { a as P } from "./BaseDialog.vue_vue_type_script_setup_true_lang-PrNxsye6.js";
|
|
5
5
|
import { storeToRefs as R } from "pinia";
|
|
6
|
-
import { _ as S } from "./NoData.vue_vue_type_script_setup_true_lang-
|
|
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-DDk9OhF-.js";
|
|
9
9
|
import { useI18n as D } from "@feedmepos/mf-common";
|
|
10
10
|
import { r as E } from "./i18n-DQxDgiLO.js";
|
|
11
11
|
const M = /* @__PURE__ */ k({
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as Se, ref as Y, watch as ne, computed as S, h as y, withModifiers as Ce, resolveComponent as C, createBlock as q, openBlock as J, withCtx as u, createVNode as s, createElementVNode as g, unref as e, normalizeStyle as xe, normalizeClass as x, withDirectives as U, createElementBlock as _e, Fragment as ke, renderList as we, toDisplayString as z, createTextVNode as $e, vShow as j } from "vue";
|
|
2
2
|
import { storeToRefs as le } from "pinia";
|
|
3
|
-
import { a as
|
|
4
|
-
import { _ as De } from "./Default.vue_vue_type_script_setup_true_lang-
|
|
3
|
+
import { a as Ie, u as Re } from "./BaseDialog.vue_vue_type_script_setup_true_lang-PrNxsye6.js";
|
|
4
|
+
import { _ as De } from "./Default.vue_vue_type_script_setup_true_lang-DPYuS630.js";
|
|
5
5
|
import { u as Fe } from "./message-dialog-UoMWOnil.js";
|
|
6
|
-
import { b as se, f as Le } from "./vue-i18n-
|
|
6
|
+
import { b as se, f as Le } from "./vue-i18n-BJW_sJot.js";
|
|
7
7
|
import { useSnackbar as Oe, useBreakpoints as Ne, components as Ve, FmButtonColorThemeVariant as Je } from "@feedmepos/ui-library";
|
|
8
|
-
import { _ as ze } from "./NoData.vue_vue_type_script_setup_true_lang-
|
|
8
|
+
import { _ as ze } from "./NoData.vue_vue_type_script_setup_true_lang-CtN7oqXx.js";
|
|
9
9
|
import { useRouter as Ae, useRoute as Pe, onBeforeRouteLeave as Te } from "vue-router";
|
|
10
10
|
import { useI18n as Be } from "@feedmepos/mf-common";
|
|
11
11
|
import { r as ce } from "./i18n-DQxDgiLO.js";
|
|
12
|
-
const Ee = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" },
|
|
12
|
+
const Ee = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ke = { class: "w-[343px]" }, Me = { class: "fm-typo-en-body-md-600" }, ot = /* @__PURE__ */ Se({
|
|
13
13
|
__name: "Report",
|
|
14
|
-
setup(
|
|
15
|
-
const { t: a, te: G } = Be(), H = Ae(), Q = Pe(), d =
|
|
14
|
+
setup(Ye) {
|
|
15
|
+
const { t: a, te: G } = Be(), H = Ae(), Q = Pe(), d = Ie(), ie = Re(), { business: ue } = le(se()), {
|
|
16
16
|
reports: f,
|
|
17
17
|
overviewReport: me,
|
|
18
|
-
categories:
|
|
19
|
-
pinReport:
|
|
18
|
+
categories: I,
|
|
19
|
+
pinReport: R,
|
|
20
20
|
isOpenAddReportDialog: pe,
|
|
21
21
|
scrollPositionY: W,
|
|
22
|
-
customReportQuota:
|
|
22
|
+
customReportQuota: D,
|
|
23
23
|
canCreateCustomReport: X
|
|
24
|
-
} = le(d), { promptMessage: Z } = Fe(), { promptLoader:
|
|
24
|
+
} = le(d), { promptMessage: Z } = Fe(), { promptLoader: A } = Le(), m = Oe(), { breakpoints: c } = Ne(), b = Y();
|
|
25
25
|
Te(() => {
|
|
26
26
|
b.value && (W.value = b.value.$el.children[0].scrollTop);
|
|
27
27
|
}), ne(b, () => {
|
|
@@ -29,9 +29,9 @@ const Ee = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Me
|
|
|
29
29
|
b.value.$el.children[0].scrollTop = W.value;
|
|
30
30
|
}, 200);
|
|
31
31
|
});
|
|
32
|
-
const
|
|
32
|
+
const P = S(() => R.value && f.value ? f.value.filter((o) => {
|
|
33
33
|
var t;
|
|
34
|
-
return (t =
|
|
34
|
+
return (t = R.value) == null ? void 0 : t.includes(o.id);
|
|
35
35
|
}) : []);
|
|
36
36
|
ne(
|
|
37
37
|
[() => ue.value],
|
|
@@ -40,39 +40,41 @@ const Ee = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Me
|
|
|
40
40
|
},
|
|
41
41
|
{ immediate: !0 }
|
|
42
42
|
);
|
|
43
|
-
const ee = S(() =>
|
|
44
|
-
(o) =>
|
|
45
|
-
) : f.value), { FmButton: de, FmMenu:
|
|
43
|
+
const ee = S(() => P.value.length > 0 ? f.value.filter(
|
|
44
|
+
(o) => P.value.findIndex((t) => t.id === o.id) === -1
|
|
45
|
+
) : f.value), { FmButton: de, FmMenu: T, FmMenuItem: _, FmIcon: B, FmChip: E } = Ve, te = S(() => [
|
|
46
46
|
{ value: void 0, label: "All" },
|
|
47
|
-
...
|
|
47
|
+
...I.value.map((o) => ({
|
|
48
48
|
value: o.id,
|
|
49
49
|
label: o.name
|
|
50
50
|
}))
|
|
51
|
-
]),
|
|
52
|
-
...
|
|
53
|
-
const r =
|
|
51
|
+
]), F = Y(te.value[0]), K = Y(""), h = S(() => ee.value.length === 0 || I.value.length === 0 ? [] : [
|
|
52
|
+
...P.value.map((t) => {
|
|
53
|
+
const r = I.value.find((l) => l.id === t.category);
|
|
54
54
|
return {
|
|
55
55
|
name: ce(a, G, t.name, "other"),
|
|
56
56
|
categoryId: (r == null ? void 0 : r.id) ?? "",
|
|
57
57
|
category: r != null && r.name ? a(`report.category.${r.name}`) : a("report.common.uncategorized"),
|
|
58
58
|
reportId: t.id,
|
|
59
59
|
editable: t.editable,
|
|
60
|
+
description: t.description || "",
|
|
60
61
|
pin: !0
|
|
61
62
|
};
|
|
62
|
-
})
|
|
63
|
+
}),
|
|
63
64
|
...ee.value.map((t) => {
|
|
64
|
-
const r =
|
|
65
|
+
const r = I.value.find((l) => l.id === t.category);
|
|
65
66
|
return {
|
|
66
67
|
name: ce(a, G, t.name, "other"),
|
|
67
68
|
categoryId: (r == null ? void 0 : r.id) ?? "",
|
|
68
69
|
category: r != null && r.name ? a(`report.category.${r.name}`) : a("report.common.uncategorized"),
|
|
69
70
|
reportId: t.id,
|
|
70
71
|
editable: t.editable,
|
|
72
|
+
description: t.description || "",
|
|
71
73
|
pin: !1
|
|
72
74
|
};
|
|
73
|
-
})
|
|
74
|
-
]), fe = S(
|
|
75
|
-
() =>
|
|
75
|
+
})
|
|
76
|
+
].filter((t) => F.value.value && t.categoryId !== F.value.value ? !1 : `${(t == null ? void 0 : t.name) || ""}${(t == null ? void 0 : t.description) || ""}`.toLowerCase().indexOf(K.value.toLowerCase()) !== -1)), fe = S(
|
|
77
|
+
() => h.value.map((o) => `${o.name}${o.category}`).toString()
|
|
76
78
|
), ve = [
|
|
77
79
|
{
|
|
78
80
|
accessorKey: "name",
|
|
@@ -85,10 +87,10 @@ const Ee = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Me
|
|
|
85
87
|
header: a("report.common.category"),
|
|
86
88
|
enableSorting: !1,
|
|
87
89
|
meta: {
|
|
88
|
-
width: "
|
|
90
|
+
width: "100px"
|
|
89
91
|
},
|
|
90
92
|
cell: (o) => y(
|
|
91
|
-
|
|
93
|
+
E,
|
|
92
94
|
{
|
|
93
95
|
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`,
|
|
94
96
|
compact: !0
|
|
@@ -96,16 +98,22 @@ const Ee = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Me
|
|
|
96
98
|
{ default: () => o.getValue() }
|
|
97
99
|
)
|
|
98
100
|
},
|
|
101
|
+
{
|
|
102
|
+
accessorKey: "description",
|
|
103
|
+
header: a("report.common.description"),
|
|
104
|
+
enableSorting: !1,
|
|
105
|
+
cell: (o) => o.getValue()
|
|
106
|
+
},
|
|
99
107
|
{
|
|
100
108
|
accessorKey: "",
|
|
101
109
|
id: "Action",
|
|
102
110
|
header: a("report.common.actions"),
|
|
103
111
|
meta: {
|
|
104
|
-
width: "
|
|
112
|
+
width: "80px"
|
|
105
113
|
},
|
|
106
114
|
cell: (o) => {
|
|
107
|
-
var
|
|
108
|
-
const t = o.row.original, r = t.reportId, l = f.value.find((i) => i.id === r),
|
|
115
|
+
var V;
|
|
116
|
+
const t = o.row.original, r = t.reportId, l = f.value.find((i) => i.id === r), w = r === ((V = me.value) == null ? void 0 : V.id), M = [
|
|
109
117
|
{
|
|
110
118
|
label: a("report.common.duplicate"),
|
|
111
119
|
onClick: () => {
|
|
@@ -115,13 +123,13 @@ const Ee = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Me
|
|
|
115
123
|
disabled: !1
|
|
116
124
|
},
|
|
117
125
|
{
|
|
118
|
-
label: a(
|
|
126
|
+
label: a(w ? "report.common.unsetAsOverview" : "report.common.setAsOverview"),
|
|
119
127
|
onClick: async () => {
|
|
120
|
-
await
|
|
128
|
+
await A(async () => {
|
|
121
129
|
if (l)
|
|
122
130
|
try {
|
|
123
|
-
await d.updateDefaultReport(
|
|
124
|
-
message: `Successfully ${
|
|
131
|
+
await d.updateDefaultReport(w ? null : l.id), m.open({
|
|
132
|
+
message: `Successfully ${w ? "unset" : "set"} ${l.name} as Overview`,
|
|
125
133
|
type: "success"
|
|
126
134
|
});
|
|
127
135
|
} catch (i) {
|
|
@@ -151,7 +159,7 @@ const Ee = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Me
|
|
|
151
159
|
y(
|
|
152
160
|
"button",
|
|
153
161
|
{
|
|
154
|
-
onClick:
|
|
162
|
+
onClick: Ce(() => {
|
|
155
163
|
l && re(l);
|
|
156
164
|
}, ["stop"]),
|
|
157
165
|
class: `text-fm-color-neutral-gray-400 ${t.pin ? "" : "show-pin"} hover:bg-fm-color-opacity-sm rounded-lg flex items-center justify-center`
|
|
@@ -159,7 +167,7 @@ const Ee = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Me
|
|
|
159
167
|
{
|
|
160
168
|
default: () => [
|
|
161
169
|
y(
|
|
162
|
-
|
|
170
|
+
B,
|
|
163
171
|
{
|
|
164
172
|
name: "keep",
|
|
165
173
|
class: "px-12 p-8",
|
|
@@ -172,12 +180,12 @@ const Ee = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Me
|
|
|
172
180
|
}
|
|
173
181
|
),
|
|
174
182
|
y(
|
|
175
|
-
|
|
183
|
+
T,
|
|
176
184
|
{ stopClickPropagation: !0, shift: !0 },
|
|
177
185
|
{
|
|
178
|
-
default: () =>
|
|
186
|
+
default: () => M.map(
|
|
179
187
|
(i) => y(
|
|
180
|
-
|
|
188
|
+
_,
|
|
181
189
|
{
|
|
182
190
|
onClick: i.disabled ? {} : i.onClick,
|
|
183
191
|
label: i.label,
|
|
@@ -216,7 +224,7 @@ const Ee = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Me
|
|
|
216
224
|
})
|
|
217
225
|
})) {
|
|
218
226
|
const r = JSON.parse(JSON.stringify(o));
|
|
219
|
-
r.editable = !0, r.id = "", r.name = `${r.name} ${a("report.common.duplicate")}`,
|
|
227
|
+
r.editable = !0, r.id = "", r.name = `${r.name} ${a("report.common.duplicate")}`, A(async () => {
|
|
220
228
|
try {
|
|
221
229
|
await d.createOrUpdateReport(r), m.open({
|
|
222
230
|
message: `${a("report.messages.duplicateSuccess", { name: r.name })}`,
|
|
@@ -232,7 +240,7 @@ const Ee = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Me
|
|
|
232
240
|
await Z({
|
|
233
241
|
title: a("report.messages.deleteReport"),
|
|
234
242
|
message: a("report.messages.confirmDelete", { name: o.name })
|
|
235
|
-
}) &&
|
|
243
|
+
}) && A(async () => {
|
|
236
244
|
try {
|
|
237
245
|
await d.removeReport(o), m.open({
|
|
238
246
|
message: a("report.messages.deleteSuccess", { name: o.name }),
|
|
@@ -247,8 +255,8 @@ const Ee = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Me
|
|
|
247
255
|
if (X.value)
|
|
248
256
|
await ye(o);
|
|
249
257
|
else {
|
|
250
|
-
let t = `Your current plan only support up to ${
|
|
251
|
-
|
|
258
|
+
let t = `Your current plan only support up to ${D.value} custom reports.`;
|
|
259
|
+
D.value === 0 && (t = "Your current plan does not support custom report."), m.open({
|
|
252
260
|
message: t,
|
|
253
261
|
type: "error"
|
|
254
262
|
});
|
|
@@ -258,15 +266,15 @@ const Ee = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Me
|
|
|
258
266
|
if (X.value)
|
|
259
267
|
pe.value = !0;
|
|
260
268
|
else {
|
|
261
|
-
let o = `Your current plan only support up to ${
|
|
262
|
-
|
|
269
|
+
let o = `Your current plan only support up to ${D.value} custom reports.`;
|
|
270
|
+
D.value === 0 && (o = "Your current plan does not support custom report."), m.open({
|
|
263
271
|
message: o,
|
|
264
272
|
type: "error"
|
|
265
273
|
});
|
|
266
274
|
}
|
|
267
275
|
}
|
|
268
276
|
function re(o) {
|
|
269
|
-
|
|
277
|
+
R.value && R.value.includes(o.id) ? (m.open({
|
|
270
278
|
message: `${a("report.common.unpin")} ${o.name} ${a("report.common.successful")}`,
|
|
271
279
|
type: "success"
|
|
272
280
|
}), d.clearPinReport(o.id)) : (m.open({
|
|
@@ -275,12 +283,12 @@ const Ee = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Me
|
|
|
275
283
|
}), d.cachePinReport(o));
|
|
276
284
|
}
|
|
277
285
|
function be(o) {
|
|
278
|
-
|
|
286
|
+
F.value = o;
|
|
279
287
|
}
|
|
280
|
-
const { selectedLocationIds: k, dateRange:
|
|
288
|
+
const { selectedLocationIds: k, dateRange: L, compareDateRange: O, timeRange: v, locations: he } = se(), N = S(() => k.length === he.length);
|
|
281
289
|
return (o, t) => {
|
|
282
|
-
const r =
|
|
283
|
-
return
|
|
290
|
+
const r = C("FmPageHead"), l = C("FmSearch"), w = C("FmForm"), M = C("FmListItem"), V = C("FmList"), i = C("FmTable");
|
|
291
|
+
return J(), q(De, null, {
|
|
284
292
|
default: u(() => [
|
|
285
293
|
s(r, {
|
|
286
294
|
title: e(a)("report.common.report", 1),
|
|
@@ -296,25 +304,25 @@ const Ee = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Me
|
|
|
296
304
|
"onClick:action": t[0] || (t[0] = (n) => ge())
|
|
297
305
|
}, null, 8, ["title", "actions"]),
|
|
298
306
|
g("div", {
|
|
299
|
-
class:
|
|
307
|
+
class: x(`overflow-y-hidden flex flex-col gap-8 ${e(c).sm || e(c).xs ? "mb-20" : ""}`),
|
|
300
308
|
style: xe({ height: `calc(100% - ${e(c).lg || e(c).md ? 72 : 64}px)` })
|
|
301
309
|
}, [
|
|
302
|
-
s(
|
|
303
|
-
class:
|
|
310
|
+
s(w, {
|
|
311
|
+
class: x(`flex items-center gap-2 ${e(c).sm || e(c).xs ? "px-3" : "px-24"}`)
|
|
304
312
|
}, {
|
|
305
313
|
default: u(() => [
|
|
306
|
-
s(e(
|
|
314
|
+
s(e(T), null, {
|
|
307
315
|
"menu-button": u(() => [
|
|
308
|
-
s(e(
|
|
316
|
+
s(e(E), { class: "fm-typo-en-body-md-600 text-fm-color-neutral-gray-400" }, {
|
|
309
317
|
default: u(() => [
|
|
310
|
-
g("p", null,
|
|
311
|
-
s(e(
|
|
318
|
+
g("p", null, z(e(a)(`report.category.${F.value.label}`)), 1),
|
|
319
|
+
s(e(B), { name: "expand_more" })
|
|
312
320
|
]),
|
|
313
321
|
_: 1
|
|
314
322
|
})
|
|
315
323
|
]),
|
|
316
324
|
default: u(() => [
|
|
317
|
-
(
|
|
325
|
+
(J(!0), _e(ke, null, we(te.value, (n, p) => (J(), q(e(_), {
|
|
318
326
|
key: p,
|
|
319
327
|
label: e(a)(`report.category.${n.label}`),
|
|
320
328
|
onClick: () => be(n)
|
|
@@ -323,30 +331,30 @@ const Ee = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Me
|
|
|
323
331
|
_: 1
|
|
324
332
|
}),
|
|
325
333
|
g("div", {
|
|
326
|
-
class:
|
|
334
|
+
class: x(`flex ${e(c).sm || e(c).xs ? "justify-center items-center" : ""}`)
|
|
327
335
|
}, [
|
|
328
|
-
g("p", Ee,
|
|
336
|
+
g("p", Ee, z(e(a)("report.common.results", { count: h.value.length })), 1)
|
|
329
337
|
], 2),
|
|
330
338
|
t[3] || (t[3] = g("div", { class: "grow" }, null, -1)),
|
|
331
|
-
g("div",
|
|
339
|
+
g("div", Ke, [
|
|
332
340
|
s(l, {
|
|
333
|
-
modelValue:
|
|
334
|
-
"onUpdate:modelValue": t[1] || (t[1] = (n) =>
|
|
335
|
-
class:
|
|
341
|
+
modelValue: K.value,
|
|
342
|
+
"onUpdate:modelValue": t[1] || (t[1] = (n) => K.value = n),
|
|
343
|
+
class: x(`${e(c).lg || e(c).md ? "grow" : ""}`)
|
|
336
344
|
}, null, 8, ["modelValue", "class"])
|
|
337
345
|
])
|
|
338
346
|
]),
|
|
339
347
|
_: 1
|
|
340
348
|
}, 8, ["class"]),
|
|
341
|
-
U((
|
|
349
|
+
U((J(), q(i, {
|
|
342
350
|
key: fe.value,
|
|
343
351
|
ref_key: "table",
|
|
344
352
|
ref: b,
|
|
345
|
-
class:
|
|
353
|
+
class: x([e(c).sm || e(c).xs ? "px-0" : "px-24", "report-table"]),
|
|
346
354
|
style: { height: "calc(100% - 40px)" },
|
|
347
355
|
"column-defs": ve,
|
|
348
|
-
"row-data":
|
|
349
|
-
"page-size":
|
|
356
|
+
"row-data": h.value,
|
|
357
|
+
"page-size": h.value.length,
|
|
350
358
|
"hide-footer": !0,
|
|
351
359
|
"row-class-name": "row",
|
|
352
360
|
onRowClick: t[2] || (t[2] = (n) => {
|
|
@@ -355,68 +363,68 @@ const Ee = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Me
|
|
|
355
363
|
query: {
|
|
356
364
|
...e(Q).query,
|
|
357
365
|
reportId: n.original.reportId,
|
|
358
|
-
startDate: e(
|
|
359
|
-
endDate: e(
|
|
360
|
-
compareStartDate: e(
|
|
361
|
-
compareEndDate: e(
|
|
366
|
+
startDate: e(L).startDate,
|
|
367
|
+
endDate: e(L).endDate,
|
|
368
|
+
compareStartDate: e(O).startDate,
|
|
369
|
+
compareEndDate: e(O).endDate,
|
|
362
370
|
timeStart: e(v).start ? JSON.stringify(e(v).start) : null,
|
|
363
371
|
timeEnd: e(v).end ? JSON.stringify(e(v).end) : null,
|
|
364
|
-
isAllLocation:
|
|
365
|
-
locationIds:
|
|
372
|
+
isAllLocation: N.value.toString(),
|
|
373
|
+
locationIds: N.value ? null : e(k) ? JSON.stringify(e(k)) : null
|
|
366
374
|
}
|
|
367
375
|
});
|
|
368
376
|
})
|
|
369
377
|
}, {
|
|
370
378
|
"list-row": u(({ original: n }) => [
|
|
371
|
-
s(
|
|
379
|
+
s(V, {
|
|
372
380
|
onClick: () => {
|
|
373
381
|
n.reportId && (e(d).updateCurrentReportId(n.reportId), e(H).push({
|
|
374
382
|
name: "reportView",
|
|
375
383
|
query: {
|
|
376
384
|
...e(Q).query,
|
|
377
385
|
reportId: n.reportId,
|
|
378
|
-
startDate: e(
|
|
379
|
-
endDate: e(
|
|
380
|
-
compareStartDate: e(
|
|
381
|
-
compareEndDate: e(
|
|
386
|
+
startDate: e(L).startDate,
|
|
387
|
+
endDate: e(L).endDate,
|
|
388
|
+
compareStartDate: e(O).startDate,
|
|
389
|
+
compareEndDate: e(O).endDate,
|
|
382
390
|
timeStart: e(v).start ? JSON.stringify(e(v).start) : null,
|
|
383
391
|
timeEnd: e(v).end ? JSON.stringify(e(v).end) : null,
|
|
384
|
-
isAllLocation:
|
|
385
|
-
locationIds:
|
|
392
|
+
isAllLocation: N.value.toString(),
|
|
393
|
+
locationIds: N.value ? null : e(k) ? JSON.stringify(e(k)) : null
|
|
386
394
|
}
|
|
387
395
|
}));
|
|
388
396
|
}
|
|
389
397
|
}, {
|
|
390
398
|
default: u(() => [
|
|
391
|
-
s(
|
|
399
|
+
s(M, {
|
|
392
400
|
tag: "label",
|
|
393
401
|
label: n.name,
|
|
394
402
|
clickable: ""
|
|
395
403
|
}, {
|
|
396
404
|
append: u(() => [
|
|
397
|
-
s(e(
|
|
398
|
-
class:
|
|
405
|
+
s(e(E), {
|
|
406
|
+
class: x(
|
|
399
407
|
n.category !== "Uncategorized" ? "bg-fm-color-system-info-100 text-fm-color-typo-info" : "text-fm-color-typo-secondary"
|
|
400
408
|
),
|
|
401
409
|
compact: !0
|
|
402
410
|
}, {
|
|
403
411
|
default: u(() => [
|
|
404
|
-
g("p",
|
|
412
|
+
g("p", Me, z(n.category), 1)
|
|
405
413
|
]),
|
|
406
414
|
_: 2
|
|
407
415
|
}, 1032, ["class"]),
|
|
408
|
-
s(e(
|
|
416
|
+
s(e(T), {
|
|
409
417
|
placement: "left",
|
|
410
418
|
"stop-click-propagation": !0
|
|
411
419
|
}, {
|
|
412
420
|
"menu-button": u(() => [
|
|
413
|
-
s(e(
|
|
421
|
+
s(e(B), {
|
|
414
422
|
name: "more_vert",
|
|
415
423
|
class: "btn-color"
|
|
416
424
|
})
|
|
417
425
|
]),
|
|
418
426
|
default: u(() => [
|
|
419
|
-
s(e(
|
|
427
|
+
s(e(_), {
|
|
420
428
|
label: n.pin ? "Unpin" : "Pin",
|
|
421
429
|
onClick: () => {
|
|
422
430
|
const p = e(f).find(
|
|
@@ -425,7 +433,7 @@ const Ee = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Me
|
|
|
425
433
|
p && re(p);
|
|
426
434
|
}
|
|
427
435
|
}, null, 8, ["label", "onClick"]),
|
|
428
|
-
s(e(
|
|
436
|
+
s(e(_), {
|
|
429
437
|
label: e(a)("report.common.duplicate"),
|
|
430
438
|
onClick: () => {
|
|
431
439
|
const p = e(f).find(
|
|
@@ -434,7 +442,7 @@ const Ee = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Me
|
|
|
434
442
|
p && ae(p);
|
|
435
443
|
}
|
|
436
444
|
}, null, 8, ["label", "onClick"]),
|
|
437
|
-
U(s(e(
|
|
445
|
+
U(s(e(_), {
|
|
438
446
|
label: e(a)("report.common.delete"),
|
|
439
447
|
class: "text-fm-color-typo-error",
|
|
440
448
|
onClick: () => {
|
|
@@ -445,7 +453,7 @@ const Ee = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Me
|
|
|
445
453
|
}
|
|
446
454
|
}, {
|
|
447
455
|
label: u(() => [
|
|
448
|
-
|
|
456
|
+
$e(z(e(a)("report.common.delete")), 1)
|
|
449
457
|
]),
|
|
450
458
|
_: 2
|
|
451
459
|
}, 1032, ["label", "onClick"]), [
|
|
@@ -463,10 +471,10 @@ const Ee = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Me
|
|
|
463
471
|
]),
|
|
464
472
|
_: 1
|
|
465
473
|
}, 8, ["class", "row-data", "page-size"])), [
|
|
466
|
-
[j,
|
|
474
|
+
[j, h.value.length > 0]
|
|
467
475
|
]),
|
|
468
476
|
U(s(ze, null, null, 512), [
|
|
469
|
-
[j,
|
|
477
|
+
[j, h.value.length === 0]
|
|
470
478
|
])
|
|
471
479
|
], 6)
|
|
472
480
|
]),
|