@feedmepos/mf-report 5.19.30-beta.0 → 5.20.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-XEjh_Xrl.js → App-BdDt90_S.js} +3 -3
- package/dist/{BaseDialog.vue_vue_type_script_setup_true_lang-CYBD2WwJ.js → BaseDialog.vue_vue_type_script_setup_true_lang-B_DRp5Jk.js} +1 -1
- package/dist/{Default.vue_vue_type_script_setup_true_lang-BLpaR5va.js → Default.vue_vue_type_script_setup_true_lang-BdqhFB8u.js} +1 -1
- package/dist/{FilterSelector.vue_vue_type_script_setup_true_lang-C1KHdQQJ.js → FilterSelector.vue_vue_type_script_setup_true_lang-CutuEMyo.js} +1 -1
- package/dist/{InsightView-CZ9UrUHm.js → InsightView-DT-uBPVt.js} +2 -2
- package/dist/{Layout-DmQngDnf.js → Layout-B_Ac7nYA.js} +1 -1
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-DAXaI1gI.js → MenuTab.vue_vue_type_script_setup_true_lang-Bs-m2m-I.js} +3 -3
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-DQwgX6st.js → NavigationTab.vue_vue_type_script_setup_true_lang-DvIiZm-J.js} +1 -1
- package/dist/{OverviewView-CNCOg7uB.js → OverviewView-ByPB0h3-.js} +23 -22
- package/dist/{Report-Bii8vfvw.js → Report-BB76YTf7.js} +194 -174
- package/dist/{ReportEditor-CwN1k2Cb.js → ReportEditor-BzIQcu_6.js} +3 -3
- package/dist/ReportView-C6-SKiiL.js +194 -0
- package/dist/{Setting-Cn7ZHArF.js → Setting-DsU_Tn9Y.js} +2 -2
- package/dist/{TileEditor-BP3HHjvK.js → TileEditor-CryYSc8X.js} +3 -3
- package/dist/{TransitionFade-B2Bg3oRF.js → TransitionFade-CZ_9hsfO.js} +2 -2
- package/dist/app.js +17 -9
- package/package.json +1 -1
- package/dist/ReportView-D_beb2er.js +0 -194
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { defineComponent as H, computed as g, resolveComponent as M, createBlock as y, openBlock as u, withCtx as Y, createVNode as R, createElementVNode as O, unref as r, normalizeStyle as G, normalizeClass as $, createElementBlock as D, Fragment as Q, renderList as U } from "vue";
|
|
2
|
+
import { _ as W } from "./MenuTab.vue_vue_type_script_setup_true_lang-Bs-m2m-I.js";
|
|
3
|
+
import { _ as K } from "./FilterSelector.vue_vue_type_script_setup_true_lang-CutuEMyo.js";
|
|
4
|
+
import { useRouter as X, useRoute as Z } from "vue-router";
|
|
5
|
+
import { _ as ee } from "./Default.vue_vue_type_script_setup_true_lang-BdqhFB8u.js";
|
|
6
|
+
import { a as oe } from "./BaseDialog.vue_vue_type_script_setup_true_lang-B_DRp5Jk.js";
|
|
7
|
+
import { storeToRefs as v } from "pinia";
|
|
8
|
+
import { b as te, c as re, u as ae } from "./NavigationTab.vue_vue_type_script_setup_true_lang-DvIiZm-J.js";
|
|
9
|
+
import { _ as le } from "./NoData.vue_vue_type_script_setup_true_lang-CtN7oqXx.js";
|
|
10
|
+
import { useSnackbar as se, useBreakpoints as ne } from "@feedmepos/ui-library";
|
|
11
|
+
import { u as ie, f as ue, e as ce } from "./vue-i18n-BJW_sJot.js";
|
|
12
|
+
import { u as pe } from "./message-dialog-UoMWOnil.js";
|
|
13
|
+
import { r as me } from "./i18n-DQxDgiLO.js";
|
|
14
|
+
const de = { class: "sticky top-0 z-10 bg-white" }, $e = /* @__PURE__ */ H({
|
|
15
|
+
__name: "ReportView",
|
|
16
|
+
setup(ve) {
|
|
17
|
+
const { t: e, te: E } = ie(), f = X(), c = Z(), i = se(), { promptMessage: P } = pe(), p = oe(), b = te(), { promptLoader: _ } = ue(), { breakpoints: n } = ne(), {
|
|
18
|
+
currentReport: t,
|
|
19
|
+
overviewReport: I,
|
|
20
|
+
currentReportId: m,
|
|
21
|
+
isOpenDownloadDialog: J,
|
|
22
|
+
isOpenEmailDialog: N,
|
|
23
|
+
editingReport: q,
|
|
24
|
+
canCreateCustomReport: A,
|
|
25
|
+
customReportQuota: w
|
|
26
|
+
} = v(p), { isOpenAccountingDialog: B } = v(re()), { isOpenScheduleDialog: k } = v(ae()), { disabled: L } = v(ce()), T = g(() => {
|
|
27
|
+
var s;
|
|
28
|
+
const a = m.value === ((s = I.value) == null ? void 0 : s.id), o = [
|
|
29
|
+
{
|
|
30
|
+
icon: "mail",
|
|
31
|
+
label: e("report.common.emailSchedule"),
|
|
32
|
+
onClick: () => {
|
|
33
|
+
k.value = !0;
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
icon: "article",
|
|
38
|
+
label: e(a ? "report.common.unsetAsOverview" : "report.common.setAsOverview"),
|
|
39
|
+
onClick: async () => {
|
|
40
|
+
await _(async () => {
|
|
41
|
+
if (t.value)
|
|
42
|
+
try {
|
|
43
|
+
await p.updateDefaultReport(a ? null : t.value.id), i.open({
|
|
44
|
+
message: `Successfully ${a ? "unset" : "set"} ${t.value.name} as Overview`,
|
|
45
|
+
type: "success"
|
|
46
|
+
});
|
|
47
|
+
} catch (d) {
|
|
48
|
+
i.open({ message: JSON.stringify(d), type: "error" });
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
icon: "content_copy",
|
|
55
|
+
label: e("report.common.copyID"),
|
|
56
|
+
onClick: () => {
|
|
57
|
+
t.value && (navigator.clipboard.writeText(m.value), i.open({ message: e("report.messages.copiedReportIdToClipboard"), type: "success" }));
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
icon: "report_jobs",
|
|
62
|
+
label: e("report.common.reportStatus"),
|
|
63
|
+
onClick: () => {
|
|
64
|
+
C();
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
];
|
|
68
|
+
return L.value || o.splice(1, 0, {
|
|
69
|
+
icon: "download",
|
|
70
|
+
label: e("report.common.accountingExport"),
|
|
71
|
+
onClick: S
|
|
72
|
+
}), o;
|
|
73
|
+
});
|
|
74
|
+
async function C() {
|
|
75
|
+
b.isOpenJobDialog = !0, await b.getJobs();
|
|
76
|
+
}
|
|
77
|
+
function j() {
|
|
78
|
+
q.value = JSON.parse(JSON.stringify(t.value)), f.push({
|
|
79
|
+
name: "reportEditor",
|
|
80
|
+
query: c.query
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
async function F() {
|
|
84
|
+
if (!A.value) {
|
|
85
|
+
let o = `Your current plan only support up to ${w.value} custom reports.`;
|
|
86
|
+
w.value === 0 && (o = "Your current plan does not support custom report."), i.open({
|
|
87
|
+
message: o,
|
|
88
|
+
type: "error"
|
|
89
|
+
});
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
if (!t.value) {
|
|
93
|
+
i.open({ message: "No Widget", type: "error" });
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
if (await P({
|
|
97
|
+
title: `${e("report.messages.saveReport")}`,
|
|
98
|
+
message: e("report.messages.confirmAction", {
|
|
99
|
+
action: e("report.common.duplicate"),
|
|
100
|
+
name: t.value.name
|
|
101
|
+
})
|
|
102
|
+
}) && t.value) {
|
|
103
|
+
const o = JSON.parse(JSON.stringify(t.value));
|
|
104
|
+
o.editable = !0, o.id = "", o.name = `${o.name} duplicate`;
|
|
105
|
+
try {
|
|
106
|
+
await _(async () => {
|
|
107
|
+
const s = await p.createOrUpdateReport(o);
|
|
108
|
+
p.updateCurrentReportId(s.id), f.push({
|
|
109
|
+
name: "reportView",
|
|
110
|
+
params: c.params,
|
|
111
|
+
query: c.query
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
} catch (s) {
|
|
115
|
+
console.log(s), i.open({ message: "Failed to clone report", type: "error" });
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
function S() {
|
|
120
|
+
B.value = !0;
|
|
121
|
+
}
|
|
122
|
+
function V() {
|
|
123
|
+
t.value && (navigator.clipboard.writeText(m.value), i.open({ message: "Copied report ID to clipboard", type: "success" }));
|
|
124
|
+
}
|
|
125
|
+
const x = g(() => t.value ? t.value.tiles : []), z = g(() => {
|
|
126
|
+
var o;
|
|
127
|
+
let a = [
|
|
128
|
+
(o = t == null ? void 0 : t.value) != null && o.editable ? { label: e("report.common.edit"), value: "edit", isPrimary: !1 } : {
|
|
129
|
+
label: e("report.common.duplicate"),
|
|
130
|
+
value: "duplicate",
|
|
131
|
+
isPrimary: !1
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
label: e("report.common.download"),
|
|
135
|
+
value: "download",
|
|
136
|
+
isPrimary: !0,
|
|
137
|
+
prependIcon: "download"
|
|
138
|
+
},
|
|
139
|
+
{ label: e("report.schedule.sendEmail"), value: "email", isPrimary: !0 }
|
|
140
|
+
];
|
|
141
|
+
return n.value.xs && (a = [
|
|
142
|
+
...a,
|
|
143
|
+
{ label: e("report.schedule.sendEmail"), value: "email", isPrimary: !1 },
|
|
144
|
+
{ label: e("report.common.reportStatus"), value: "report_jobs", isPrimary: !1 },
|
|
145
|
+
{ label: e("report.schedule.sendEmail"), value: "schedule_email", isPrimary: !1 },
|
|
146
|
+
{ label: e("report.common.accountingExport"), value: "export", isPrimary: !1 },
|
|
147
|
+
{ label: e("report.common.copyID"), value: "content_copy", isPrimary: !1 }
|
|
148
|
+
], a = a.filter((s) => s.value !== "edit")), a;
|
|
149
|
+
});
|
|
150
|
+
return (a, o) => {
|
|
151
|
+
const s = M("FmPageHead");
|
|
152
|
+
return u(), y(ee, null, {
|
|
153
|
+
default: Y(() => {
|
|
154
|
+
var d;
|
|
155
|
+
return [
|
|
156
|
+
R(s, {
|
|
157
|
+
title: r(me)(r(e), r(E), (d = r(t)) == null ? void 0 : d.name, "other"),
|
|
158
|
+
"back-button": !0,
|
|
159
|
+
actions: z.value,
|
|
160
|
+
"onClick:back": o[0] || (o[0] = (l) => r(f).push({ name: "reports", query: r(c).query })),
|
|
161
|
+
"onClick:action": o[1] || (o[1] = (l) => {
|
|
162
|
+
l === "duplicate" && F(), l === "download" && (J.value = !0), l === "email" && (N.value = !0), l === "edit" && j(), l === "schedule_email" && (k.value = !0), l === "content_copy" && V(), l === "export" && S(), l === "report_jobs" && C();
|
|
163
|
+
})
|
|
164
|
+
}, null, 8, ["title", "actions"]),
|
|
165
|
+
O("div", {
|
|
166
|
+
class: $(`flex flex-col overflow-y-auto ${r(n).xs || r(n).sm ? "pb-20" : ""}`),
|
|
167
|
+
style: G({ height: `calc(100% - ${r(n).lg || r(n).md ? 72 : 64}px)` })
|
|
168
|
+
}, [
|
|
169
|
+
O("div", de, [
|
|
170
|
+
R(W, {
|
|
171
|
+
"model-value": r(n).lg || r(n).md ? T.value : []
|
|
172
|
+
}, null, 8, ["model-value"])
|
|
173
|
+
]),
|
|
174
|
+
r(t) && x.value.length > 0 ? (u(), D("div", {
|
|
175
|
+
key: 0,
|
|
176
|
+
class: $(["grid grid-cols-12", r(n).sm || r(n).xs ? "px-3 gap-[16px]" : "px-24 gap-[24px]"])
|
|
177
|
+
}, [
|
|
178
|
+
(u(!0), D(Q, null, U(x.value, (l, h) => (u(), y(K, {
|
|
179
|
+
key: `widget_${r(m)}_${h}`,
|
|
180
|
+
"model-value": l,
|
|
181
|
+
index: h
|
|
182
|
+
}, null, 8, ["model-value", "index"]))), 128))
|
|
183
|
+
], 2)) : (u(), y(le, { key: 1 }))
|
|
184
|
+
], 6)
|
|
185
|
+
];
|
|
186
|
+
}),
|
|
187
|
+
_: 1
|
|
188
|
+
});
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
export {
|
|
193
|
+
$e as default
|
|
194
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as B, ref as H, useModel as J, resolveComponent as h, createElementBlock as k, openBlock as x, createBlock as P, createElementVNode as t, resolveDynamicComponent as ne, unref as e, withCtx as y, createVNode as a, normalizeClass as O, toDisplayString as s, Fragment as K, renderList as Q, withDirectives as M, createTextVNode as ie, vShow as j, watch as me, normalizeStyle as ue } from "vue";
|
|
2
|
-
import { _ as de } from "./Default.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { _ as de } from "./Default.vue_vue_type_script_setup_true_lang-BdqhFB8u.js";
|
|
3
3
|
import { u as U, d as z, C as I, D as pe, b as ce } from "./vue-i18n-BJW_sJot.js";
|
|
4
4
|
import { components as A, useSnackbar as W, useBreakpoints as X, FmButtonColorThemeVariant as G } from "@feedmepos/ui-library";
|
|
5
|
-
import { t as N, s as fe } from "./BaseDialog.vue_vue_type_script_setup_true_lang-
|
|
5
|
+
import { t as N, s as fe } from "./BaseDialog.vue_vue_type_script_setup_true_lang-B_DRp5Jk.js";
|
|
6
6
|
import { u as ve } from "./message-dialog-UoMWOnil.js";
|
|
7
7
|
import { detectLocale as F } from "@feedmepos/mf-common";
|
|
8
8
|
import { _ as Y } from "./SelectComponent.vue_vue_type_script_setup_true_lang-BcQEW5MO.js";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { defineComponent as X, mergeModels as G, useModel as le, computed as _, ref as q, resolveComponent as x, createElementBlock as I, openBlock as h, createVNode as u, createElementVNode as C, unref as l, withCtx as $, toDisplayString as j, Fragment as ee, renderList as de, withModifiers as ae, createTextVNode as me, watch as se, createCommentVNode as U, createBlock as T, onMounted as ke, onUnmounted as Xe, renderSlot as Ne, onBeforeUnmount as We, resolveDynamicComponent as Oe, normalizeClass as Ie, withDirectives as te, vShow as ne, normalizeStyle as qe, isRef as He } from "vue";
|
|
2
2
|
import { useRoute as Ye, useRouter as Ee } from "vue-router";
|
|
3
|
-
import { h as Je, d as _e, S as we, _ as Ge, W as Ke, b as Qe, T as Ze, a as el } from "./TransitionFade-
|
|
4
|
-
import { W as B, b as Be, d as pe, D as ll, S as Te, C as ol, P as Ue, a as al } from "./BaseDialog.vue_vue_type_script_setup_true_lang-
|
|
3
|
+
import { h as Je, d as _e, S as we, _ as Ge, W as Ke, b as Qe, T as Ze, a as el } from "./TransitionFade-CZ_9hsfO.js";
|
|
4
|
+
import { W as B, b as Be, d as pe, D as ll, S as Te, C as ol, P as Ue, a as al } from "./BaseDialog.vue_vue_type_script_setup_true_lang-B_DRp5Jk.js";
|
|
5
5
|
import { storeToRefs as ue } from "pinia";
|
|
6
6
|
import { u as Le } from "./message-dialog-UoMWOnil.js";
|
|
7
7
|
import { u as Y, h as je, p as tl, b as Re, d as ce } from "./vue-i18n-BJW_sJot.js";
|
|
8
8
|
import { useSnackbar as nl, useBreakpoints as Me, FmButtonColorThemeVariant as ve } from "@feedmepos/ui-library";
|
|
9
9
|
import { _ as Q } from "./SelectComponent.vue_vue_type_script_setup_true_lang-BcQEW5MO.js";
|
|
10
10
|
import { r as Z } from "./i18n-DQxDgiLO.js";
|
|
11
|
-
import { g as fe, u as ge, L as ie, b as Ve, _ as ze, a as il } from "./FilterSelector.vue_vue_type_script_setup_true_lang-
|
|
11
|
+
import { g as fe, u as ge, L as ie, b as Ve, _ as ze, a as il } from "./FilterSelector.vue_vue_type_script_setup_true_lang-CutuEMyo.js";
|
|
12
12
|
import { d as be } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-BeBr4VIF.js";
|
|
13
13
|
import { _ as Pe } from "./NoData.vue_vue_type_script_setup_true_lang-CtN7oqXx.js";
|
|
14
14
|
const he = [
|
|
@@ -3,9 +3,9 @@ import { u as Nt, f as Nn, p as Pn, d as pt, j as on, h as Vn } from "./vue-i18n
|
|
|
3
3
|
import { useCoreStore as Mn } from "@feedmepos/mf-common";
|
|
4
4
|
import { storeToRefs as Ln } from "pinia";
|
|
5
5
|
import { useRoute as $n } from "vue-router";
|
|
6
|
-
import { W as L, c as Ce, d as Bn } from "./BaseDialog.vue_vue_type_script_setup_true_lang-
|
|
6
|
+
import { W as L, c as Ce, d as Bn } from "./BaseDialog.vue_vue_type_script_setup_true_lang-B_DRp5Jk.js";
|
|
7
7
|
import { a as Pt, _ as Xt } from "./SelectComponent.vue_vue_type_script_setup_true_lang-BcQEW5MO.js";
|
|
8
|
-
import { R as Rn, I as Le, c as rn, d as an, e as Xn } from "./FilterSelector.vue_vue_type_script_setup_true_lang-
|
|
8
|
+
import { R as Rn, I as Le, c as rn, d as an, e as Xn } from "./FilterSelector.vue_vue_type_script_setup_true_lang-CutuEMyo.js";
|
|
9
9
|
import { useSnackbar as Yn } from "@feedmepos/ui-library";
|
|
10
10
|
import { d as Wn } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-BeBr4VIF.js";
|
|
11
11
|
const Un = {
|
package/dist/app.js
CHANGED
|
@@ -31,6 +31,8 @@ const a = {
|
|
|
31
31
|
download: "Download",
|
|
32
32
|
custom: "Custom",
|
|
33
33
|
emailSchedule: "@:report.common.email schedule",
|
|
34
|
+
setAsOverview: "Set as Overview",
|
|
35
|
+
unsetAsOverview: "Unset as Overview",
|
|
34
36
|
export: "Export",
|
|
35
37
|
copyID: "Copy ID",
|
|
36
38
|
accountingExport: "Accounting export",
|
|
@@ -1309,6 +1311,8 @@ const a = {
|
|
|
1309
1311
|
download: "下载",
|
|
1310
1312
|
custom: "自定义",
|
|
1311
1313
|
emailSchedule: "@:{'report.common.email'}计划",
|
|
1314
|
+
setAsOverview: "设为概览",
|
|
1315
|
+
unsetAsOverview: "取消概览设置",
|
|
1312
1316
|
export: "导出",
|
|
1313
1317
|
copyID: "复制ID",
|
|
1314
1318
|
accountingExport: "会计导出",
|
|
@@ -2585,6 +2589,8 @@ const a = {
|
|
|
2585
2589
|
download: "ดาวน์โหลด",
|
|
2586
2590
|
custom: "กำหนดเอง",
|
|
2587
2591
|
emailSchedule: "@:report.common.email schedule",
|
|
2592
|
+
setAsOverview: "ตั้งเป็นภาพรวม",
|
|
2593
|
+
unsetAsOverview: "ยกเลิกการตั้งเป็นภาพรวม",
|
|
2588
2594
|
export: "ส่งออก",
|
|
2589
2595
|
copyID: "คัดลอก ID",
|
|
2590
2596
|
accountingExport: "ส่งออกบัญชี",
|
|
@@ -3862,6 +3868,8 @@ const a = {
|
|
|
3862
3868
|
download: "下載",
|
|
3863
3869
|
custom: "自定義",
|
|
3864
3870
|
emailSchedule: "@:{'report.common.email'}計劃",
|
|
3871
|
+
setAsOverview: "設為概覽",
|
|
3872
|
+
unsetAsOverview: "取消概覽設置",
|
|
3865
3873
|
export: "導出",
|
|
3866
3874
|
copyID: "複製ID",
|
|
3867
3875
|
accountingExport: "會計導出",
|
|
@@ -5102,41 +5110,41 @@ const a = {
|
|
|
5102
5110
|
path: "/overview",
|
|
5103
5111
|
alias: ["/"],
|
|
5104
5112
|
name: "overview",
|
|
5105
|
-
component: () => import("./OverviewView-
|
|
5113
|
+
component: () => import("./OverviewView-ByPB0h3-.js")
|
|
5106
5114
|
},
|
|
5107
5115
|
{
|
|
5108
5116
|
path: "/report",
|
|
5109
5117
|
name: "reports",
|
|
5110
|
-
component: () => import("./Report-
|
|
5118
|
+
component: () => import("./Report-BB76YTf7.js")
|
|
5111
5119
|
},
|
|
5112
5120
|
{
|
|
5113
5121
|
path: "/insights",
|
|
5114
5122
|
name: "insights",
|
|
5115
|
-
component: () => import("./InsightView-
|
|
5123
|
+
component: () => import("./InsightView-DT-uBPVt.js")
|
|
5116
5124
|
},
|
|
5117
5125
|
{
|
|
5118
5126
|
path: "/report-view",
|
|
5119
5127
|
name: "reportView",
|
|
5120
|
-
component: () => import("./ReportView-
|
|
5128
|
+
component: () => import("./ReportView-C6-SKiiL.js")
|
|
5121
5129
|
},
|
|
5122
5130
|
{
|
|
5123
5131
|
path: "/report-editor",
|
|
5124
5132
|
name: "reportEditor",
|
|
5125
|
-
component: () => import("./ReportEditor-
|
|
5133
|
+
component: () => import("./ReportEditor-BzIQcu_6.js")
|
|
5126
5134
|
},
|
|
5127
5135
|
{
|
|
5128
5136
|
path: "/report-editor/tile-editor",
|
|
5129
5137
|
name: "tileEditor",
|
|
5130
|
-
component: () => import("./TileEditor-
|
|
5138
|
+
component: () => import("./TileEditor-CryYSc8X.js")
|
|
5131
5139
|
},
|
|
5132
5140
|
{
|
|
5133
5141
|
path: "/setting",
|
|
5134
5142
|
name: "setting",
|
|
5135
|
-
component: () => import("./Setting-
|
|
5143
|
+
component: () => import("./Setting-DsU_Tn9Y.js")
|
|
5136
5144
|
},
|
|
5137
5145
|
{
|
|
5138
5146
|
path: "/integration",
|
|
5139
|
-
component: () => import("./Layout-
|
|
5147
|
+
component: () => import("./Layout-B_Ac7nYA.js"),
|
|
5140
5148
|
children: [
|
|
5141
5149
|
{
|
|
5142
5150
|
name: "integrations",
|
|
@@ -5170,7 +5178,7 @@ const u = {
|
|
|
5170
5178
|
"zh-CN": m,
|
|
5171
5179
|
"th-TH": c,
|
|
5172
5180
|
"zh-Hant": p
|
|
5173
|
-
}, h = e(() => import("./App-
|
|
5181
|
+
}, h = e(() => import("./App-BdDt90_S.js"));
|
|
5174
5182
|
export {
|
|
5175
5183
|
h as FmApp,
|
|
5176
5184
|
u as i18nMessages,
|
package/package.json
CHANGED
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
import { defineComponent as z, computed as v, resolveComponent as H, createBlock as g, openBlock as u, withCtx as M, createVNode as h, createElementVNode as R, unref as t, normalizeStyle as Y, normalizeClass as D, createElementBlock as $, Fragment as G, renderList as Q } from "vue";
|
|
2
|
-
import { _ as U } from "./MenuTab.vue_vue_type_script_setup_true_lang-DAXaI1gI.js";
|
|
3
|
-
import { _ as W } from "./FilterSelector.vue_vue_type_script_setup_true_lang-C1KHdQQJ.js";
|
|
4
|
-
import { useRouter as K, useRoute as X } from "vue-router";
|
|
5
|
-
import { _ as Z } from "./Default.vue_vue_type_script_setup_true_lang-BLpaR5va.js";
|
|
6
|
-
import { a as ee } from "./BaseDialog.vue_vue_type_script_setup_true_lang-CYBD2WwJ.js";
|
|
7
|
-
import { storeToRefs as p } from "pinia";
|
|
8
|
-
import { b as oe, c as te, u as re } from "./NavigationTab.vue_vue_type_script_setup_true_lang-DQwgX6st.js";
|
|
9
|
-
import { _ as ae } from "./NoData.vue_vue_type_script_setup_true_lang-CtN7oqXx.js";
|
|
10
|
-
import { useSnackbar as le, useBreakpoints as ne } from "@feedmepos/ui-library";
|
|
11
|
-
import { u as se, f as ie, e as ue } from "./vue-i18n-BJW_sJot.js";
|
|
12
|
-
import { u as ce } from "./message-dialog-UoMWOnil.js";
|
|
13
|
-
import { r as pe } from "./i18n-DQxDgiLO.js";
|
|
14
|
-
const me = { class: "sticky top-0 z-10 bg-white" }, De = /* @__PURE__ */ z({
|
|
15
|
-
__name: "ReportView",
|
|
16
|
-
setup(de) {
|
|
17
|
-
const { t: e, te: E } = se(), m = K(), c = X(), i = le(), { promptMessage: P } = ce(), d = ee(), b = oe(), { promptLoader: I } = ie(), { breakpoints: n } = ne(), {
|
|
18
|
-
currentReport: r,
|
|
19
|
-
currentReportId: f,
|
|
20
|
-
isOpenDownloadDialog: O,
|
|
21
|
-
isOpenEmailDialog: J,
|
|
22
|
-
editingReport: N,
|
|
23
|
-
canCreateCustomReport: q,
|
|
24
|
-
customReportQuota: y
|
|
25
|
-
} = p(d), { isOpenAccountingDialog: B } = p(te()), { isOpenScheduleDialog: _ } = p(re()), { disabled: L } = p(ue()), T = v(() => {
|
|
26
|
-
const l = [
|
|
27
|
-
{
|
|
28
|
-
icon: "mail",
|
|
29
|
-
label: e("report.common.emailSchedule"),
|
|
30
|
-
onClick: () => {
|
|
31
|
-
_.value = !0;
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
// {
|
|
35
|
-
// icon: "article",
|
|
36
|
-
// label: "Set as Default",
|
|
37
|
-
// onClick: async () => {
|
|
38
|
-
// await promptLoader(async () => {
|
|
39
|
-
// if (currentReport.value) {
|
|
40
|
-
// try {
|
|
41
|
-
// await reportStore.updateDefaultReport(currentReport.value.id)
|
|
42
|
-
// snackbar.open({
|
|
43
|
-
// message: `Set ${currentReport.value.name} as default successful`,
|
|
44
|
-
// type: "success"
|
|
45
|
-
// })
|
|
46
|
-
// } catch (err) {
|
|
47
|
-
// snackbar.open({ message: JSON.stringify(err), type: "error" })
|
|
48
|
-
// }
|
|
49
|
-
// }
|
|
50
|
-
// })
|
|
51
|
-
// }
|
|
52
|
-
// },
|
|
53
|
-
{
|
|
54
|
-
icon: "content_copy",
|
|
55
|
-
label: e("report.common.copyID"),
|
|
56
|
-
onClick: () => {
|
|
57
|
-
r.value && (navigator.clipboard.writeText(f.value), i.open({ message: e("report.messages.copiedReportIdToClipboard"), type: "success" }));
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
icon: "report_jobs",
|
|
62
|
-
label: e("report.common.reportStatus"),
|
|
63
|
-
onClick: () => {
|
|
64
|
-
k();
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
];
|
|
68
|
-
return L.value || l.splice(1, 0, {
|
|
69
|
-
icon: "download",
|
|
70
|
-
label: e("report.common.accountingExport"),
|
|
71
|
-
onClick: C
|
|
72
|
-
}), l;
|
|
73
|
-
});
|
|
74
|
-
async function k() {
|
|
75
|
-
b.isOpenJobDialog = !0, await b.getJobs();
|
|
76
|
-
}
|
|
77
|
-
function j() {
|
|
78
|
-
N.value = JSON.parse(JSON.stringify(r.value)), m.push({
|
|
79
|
-
name: "reportEditor",
|
|
80
|
-
query: c.query
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
async function A() {
|
|
84
|
-
if (!q.value) {
|
|
85
|
-
let o = `Your current plan only support up to ${y.value} custom reports.`;
|
|
86
|
-
y.value === 0 && (o = "Your current plan does not support custom report."), i.open({
|
|
87
|
-
message: o,
|
|
88
|
-
type: "error"
|
|
89
|
-
});
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
if (!r.value) {
|
|
93
|
-
i.open({ message: "No Widget", type: "error" });
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
if (await P({
|
|
97
|
-
title: `${e("report.messages.saveReport")}`,
|
|
98
|
-
message: e("report.messages.confirmAction", {
|
|
99
|
-
action: e("report.common.duplicate"),
|
|
100
|
-
name: r.value.name
|
|
101
|
-
})
|
|
102
|
-
}) && r.value) {
|
|
103
|
-
const o = JSON.parse(JSON.stringify(r.value));
|
|
104
|
-
o.editable = !0, o.id = "", o.name = `${o.name} duplicate`;
|
|
105
|
-
try {
|
|
106
|
-
await I(async () => {
|
|
107
|
-
const s = await d.createOrUpdateReport(o);
|
|
108
|
-
d.updateCurrentReportId(s.id), m.push({
|
|
109
|
-
name: "reportView",
|
|
110
|
-
params: c.params,
|
|
111
|
-
query: c.query
|
|
112
|
-
});
|
|
113
|
-
});
|
|
114
|
-
} catch (s) {
|
|
115
|
-
console.log(s), i.open({ message: "Failed to clone report", type: "error" });
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
function C() {
|
|
120
|
-
B.value = !0;
|
|
121
|
-
}
|
|
122
|
-
function F() {
|
|
123
|
-
r.value && (navigator.clipboard.writeText(f.value), i.open({ message: "Copied report ID to clipboard", type: "success" }));
|
|
124
|
-
}
|
|
125
|
-
const x = v(() => r.value ? r.value.tiles : []), V = v(() => {
|
|
126
|
-
var o;
|
|
127
|
-
let l = [
|
|
128
|
-
(o = r == null ? void 0 : r.value) != null && o.editable ? { label: e("report.common.edit"), value: "edit", isPrimary: !1 } : {
|
|
129
|
-
label: e("report.common.duplicate"),
|
|
130
|
-
value: "duplicate",
|
|
131
|
-
isPrimary: !1
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
label: e("report.common.download"),
|
|
135
|
-
value: "download",
|
|
136
|
-
isPrimary: !0,
|
|
137
|
-
prependIcon: "download"
|
|
138
|
-
},
|
|
139
|
-
{ label: e("report.schedule.sendEmail"), value: "email", isPrimary: !0 }
|
|
140
|
-
];
|
|
141
|
-
return n.value.xs && (l = [
|
|
142
|
-
...l,
|
|
143
|
-
{ label: e("report.schedule.sendEmail"), value: "email", isPrimary: !1 },
|
|
144
|
-
{ label: e("report.common.reportStatus"), value: "report_jobs", isPrimary: !1 },
|
|
145
|
-
{ label: e("report.schedule.sendEmail"), value: "schedule_email", isPrimary: !1 },
|
|
146
|
-
{ label: e("report.common.accountingExport"), value: "export", isPrimary: !1 },
|
|
147
|
-
{ label: e("report.common.copyID"), value: "content_copy", isPrimary: !1 }
|
|
148
|
-
], l = l.filter((s) => s.value !== "edit")), l;
|
|
149
|
-
});
|
|
150
|
-
return (l, o) => {
|
|
151
|
-
const s = H("FmPageHead");
|
|
152
|
-
return u(), g(Z, null, {
|
|
153
|
-
default: M(() => {
|
|
154
|
-
var S;
|
|
155
|
-
return [
|
|
156
|
-
h(s, {
|
|
157
|
-
title: t(pe)(t(e), t(E), (S = t(r)) == null ? void 0 : S.name, "other"),
|
|
158
|
-
"back-button": !0,
|
|
159
|
-
actions: V.value,
|
|
160
|
-
"onClick:back": o[0] || (o[0] = (a) => t(m).push({ name: "reports", query: t(c).query })),
|
|
161
|
-
"onClick:action": o[1] || (o[1] = (a) => {
|
|
162
|
-
a === "duplicate" && A(), a === "download" && (O.value = !0), a === "email" && (J.value = !0), a === "edit" && j(), a === "schedule_email" && (_.value = !0), a === "content_copy" && F(), a === "export" && C(), a === "report_jobs" && k();
|
|
163
|
-
})
|
|
164
|
-
}, null, 8, ["title", "actions"]),
|
|
165
|
-
R("div", {
|
|
166
|
-
class: D(`flex flex-col overflow-y-auto ${t(n).xs || t(n).sm ? "pb-20" : ""}`),
|
|
167
|
-
style: Y({ height: `calc(100% - ${t(n).lg || t(n).md ? 72 : 64}px)` })
|
|
168
|
-
}, [
|
|
169
|
-
R("div", me, [
|
|
170
|
-
h(U, {
|
|
171
|
-
"model-value": t(n).lg || t(n).md ? T.value : []
|
|
172
|
-
}, null, 8, ["model-value"])
|
|
173
|
-
]),
|
|
174
|
-
t(r) && x.value.length > 0 ? (u(), $("div", {
|
|
175
|
-
key: 0,
|
|
176
|
-
class: D(["grid grid-cols-12", t(n).sm || t(n).xs ? "px-3 gap-[16px]" : "px-24 gap-[24px]"])
|
|
177
|
-
}, [
|
|
178
|
-
(u(!0), $(G, null, Q(x.value, (a, w) => (u(), g(W, {
|
|
179
|
-
key: `widget_${t(f)}_${w}`,
|
|
180
|
-
"model-value": a,
|
|
181
|
-
index: w
|
|
182
|
-
}, null, 8, ["model-value", "index"]))), 128))
|
|
183
|
-
], 2)) : (u(), g(ae, { key: 1 }))
|
|
184
|
-
], 6)
|
|
185
|
-
];
|
|
186
|
-
}),
|
|
187
|
-
_: 1
|
|
188
|
-
});
|
|
189
|
-
};
|
|
190
|
-
}
|
|
191
|
-
});
|
|
192
|
-
export {
|
|
193
|
-
De as default
|
|
194
|
-
};
|