@feedmepos/mf-report 5.4.13-beta.11 → 5.4.13-beta.12
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-BKjML9b5.js → App-Dd7z1gP_.js} +3 -3
- package/dist/{Default.vue_vue_type_script_setup_true_lang-C8D-g7iV.js → Default.vue_vue_type_script_setup_true_lang-CR_7iYM6.js} +1 -1
- package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-BJ2ONZu7.js → DynamicWidget.vue_vue_type_script_setup_true_lang-BPOlWXT2.js} +1 -1
- package/dist/{InsightView-4RcvFHuS.js → InsightView-Cna295Im.js} +1 -1
- package/dist/{Layout-CBUdj19T.js → Layout-DUyw6WCL.js} +1 -1
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-xNApGkjV.js → NavigationTab.vue_vue_type_script_setup_true_lang-5ir_fs2W.js} +1 -1
- package/dist/{OverviewView-FsY7FOJd.js → OverviewView-DqaNBCKp.js} +3 -3
- package/dist/{Report-qMvys8pj.js → Report-DUB88HkV.js} +2 -2
- package/dist/{ReportEditor-DTLBtoEW.js → ReportEditor-CTZk4JKN.js} +3 -3
- package/dist/ReportView-BIWqFZUc.js +270 -0
- package/dist/{Setting-Ce24y09O.js → Setting-DLaUbbV_.js} +1 -1
- package/dist/{TileEditor-r6_sjUBG.js → TileEditor-CppzjlG5.js} +3 -3
- package/dist/{TransitionFade-D5YKobBi.js → TransitionFade-CHzQVPym.js} +2 -2
- package/dist/app.js +9 -9
- package/dist/{v4-C_JpAi5p.js → v4-CTTwiIw-.js} +317 -276
- package/package.json +1 -1
- package/dist/ReportView-C_a0CecU.js +0 -163
package/package.json
CHANGED
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
import { defineComponent as F, computed as f, resolveComponent as J, createBlock as v, openBlock as s, withCtx as L, createVNode as x, createElementVNode as T, unref as t, normalizeStyle as V, normalizeClass as w, createElementBlock as S, Fragment as z, renderList as H } from "vue";
|
|
2
|
-
import { useSnackbar as M, useBreakpoints as Y } from "@feedmepos/ui-library";
|
|
3
|
-
import { _ as G } from "./MenuTab.vue_vue_type_script_setup_true_lang-h87kWy1E.js";
|
|
4
|
-
import { _ as Q } from "./DynamicWidget.vue_vue_type_script_setup_true_lang-BJ2ONZu7.js";
|
|
5
|
-
import { useRouter as U, useRoute as W } from "vue-router";
|
|
6
|
-
import { _ as j } from "./Default.vue_vue_type_script_setup_true_lang-C8D-g7iV.js";
|
|
7
|
-
import { a as K } from "./v4-C_JpAi5p.js";
|
|
8
|
-
import { storeToRefs as c } from "pinia";
|
|
9
|
-
import { a as X, u as Z } from "./NavigationTab.vue_vue_type_script_setup_true_lang-xNApGkjV.js";
|
|
10
|
-
import { _ as ee } from "./NoData.vue_vue_type_script_setup_true_lang-DlBNFLa3.js";
|
|
11
|
-
import { d as oe, c as te } from "./global-loader-CMC9fgBi.js";
|
|
12
|
-
import { u as re } from "./message-dialog-UoMWOnil.js";
|
|
13
|
-
const ye = /* @__PURE__ */ F({
|
|
14
|
-
__name: "ReportView",
|
|
15
|
-
setup(ae) {
|
|
16
|
-
const p = U(), m = W(), n = M(), { promptMessage: D } = re(), d = K(), { promptLoader: $ } = oe(), { breakpoints: a } = Y(), {
|
|
17
|
-
currentReport: o,
|
|
18
|
-
currentReportId: u,
|
|
19
|
-
isOpenDownloadDialog: R,
|
|
20
|
-
editingReport: h,
|
|
21
|
-
canCreateCustomReport: E,
|
|
22
|
-
customReportQuota: g
|
|
23
|
-
} = c(d), { isOpenAccountingDialog: I } = c(X()), { isOpenScheduleDialog: y } = c(Z()), { disabled: O } = c(te()), P = f(() => {
|
|
24
|
-
const r = [
|
|
25
|
-
{
|
|
26
|
-
icon: "mail",
|
|
27
|
-
label: "Email schedule",
|
|
28
|
-
onClick: () => {
|
|
29
|
-
y.value = !0;
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
// {
|
|
33
|
-
// icon: "article",
|
|
34
|
-
// label: "Set as Default",
|
|
35
|
-
// onClick: async () => {
|
|
36
|
-
// await promptLoader(async () => {
|
|
37
|
-
// if (currentReport.value) {
|
|
38
|
-
// try {
|
|
39
|
-
// await reportStore.updateDefaultReport(currentReport.value.id)
|
|
40
|
-
// snackbar.open({
|
|
41
|
-
// message: `Set ${currentReport.value.name} as default successful`,
|
|
42
|
-
// type: "success"
|
|
43
|
-
// })
|
|
44
|
-
// } catch (err) {
|
|
45
|
-
// snackbar.open({ message: JSON.stringify(err), type: "error" })
|
|
46
|
-
// }
|
|
47
|
-
// }
|
|
48
|
-
// })
|
|
49
|
-
// }
|
|
50
|
-
// },
|
|
51
|
-
{
|
|
52
|
-
icon: "content_copy",
|
|
53
|
-
label: "Copy ID",
|
|
54
|
-
onClick: () => {
|
|
55
|
-
o.value && (navigator.clipboard.writeText(u.value), n.open({ message: "Copied report ID to clipboard", type: "success" }));
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
];
|
|
59
|
-
return O.value || r.splice(1, 0, {
|
|
60
|
-
icon: "download",
|
|
61
|
-
label: "Accounting export",
|
|
62
|
-
onClick: b
|
|
63
|
-
}), r;
|
|
64
|
-
});
|
|
65
|
-
function N() {
|
|
66
|
-
h.value = JSON.parse(JSON.stringify(o.value)), p.push({
|
|
67
|
-
name: "reportEditor",
|
|
68
|
-
query: m.query
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
async function q() {
|
|
72
|
-
if (!E.value) {
|
|
73
|
-
let e = `Your current plan only support up to ${g.value} custom reports.`;
|
|
74
|
-
g.value === 0 && (e = "Your current plan does not support custom report."), n.open({
|
|
75
|
-
message: e,
|
|
76
|
-
type: "error"
|
|
77
|
-
});
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
if (!o.value) {
|
|
81
|
-
n.open({ message: "No Widget", type: "error" });
|
|
82
|
-
return;
|
|
83
|
-
}
|
|
84
|
-
if (await D({
|
|
85
|
-
title: "Save report",
|
|
86
|
-
message: `Do you really want to duplicate ${o.value.name} ?`
|
|
87
|
-
}) && o.value) {
|
|
88
|
-
const e = JSON.parse(JSON.stringify(o.value));
|
|
89
|
-
e.editable = !0, e.id = "", e.name = `${e.name} duplicate`;
|
|
90
|
-
try {
|
|
91
|
-
await $(async () => {
|
|
92
|
-
await d.createOrUpdateReport(e), d.updateCurrentReportId(u.value), p.push({
|
|
93
|
-
name: "reportView",
|
|
94
|
-
query: m.query
|
|
95
|
-
});
|
|
96
|
-
});
|
|
97
|
-
} catch (i) {
|
|
98
|
-
console.log(i), n.open({ message: "Failed to clone report", type: "error" });
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
function b() {
|
|
103
|
-
I.value = !0;
|
|
104
|
-
}
|
|
105
|
-
function A() {
|
|
106
|
-
o.value && (navigator.clipboard.writeText(u.value), n.open({ message: "Copied report ID to clipboard", type: "success" }));
|
|
107
|
-
}
|
|
108
|
-
const _ = f(() => o.value ? o.value.tiles : []), B = f(() => {
|
|
109
|
-
var e;
|
|
110
|
-
let r = [
|
|
111
|
-
(e = o == null ? void 0 : o.value) != null && e.editable ? { label: "Edit", value: "edit", isPrimary: !1 } : { label: "Duplicate", value: "duplicate", isPrimary: !1 },
|
|
112
|
-
{ label: "Download", value: "download", isPrimary: !0, prependIcon: "download" }
|
|
113
|
-
];
|
|
114
|
-
return a.value.xs && (r = [
|
|
115
|
-
...r,
|
|
116
|
-
{ label: "Email schedule", value: "email", isPrimary: !1 },
|
|
117
|
-
{ label: "Copy ID", value: "content_copy", isPrimary: !1 },
|
|
118
|
-
{ label: "Accounting export", value: "export", isPrimary: !1 }
|
|
119
|
-
], r = r.filter((i) => i.value !== "edit")), r;
|
|
120
|
-
});
|
|
121
|
-
return (r, e) => {
|
|
122
|
-
const i = J("FmPageHead");
|
|
123
|
-
return s(), v(j, null, {
|
|
124
|
-
default: L(() => {
|
|
125
|
-
var C;
|
|
126
|
-
return [
|
|
127
|
-
x(i, {
|
|
128
|
-
title: (C = t(o)) == null ? void 0 : C.name,
|
|
129
|
-
"back-button": !0,
|
|
130
|
-
actions: B.value,
|
|
131
|
-
"onClick:back": e[0] || (e[0] = (l) => t(p).push({ name: "reports", query: t(m).query })),
|
|
132
|
-
"onClick:action": e[1] || (e[1] = (l) => {
|
|
133
|
-
l === "duplicate" && q(), l === "download" && (R.value = !0), l === "edit" && N(), l === "mail" && (y.value = !0), l === "content_copy" && A(), l === "export" && b();
|
|
134
|
-
})
|
|
135
|
-
}, null, 8, ["title", "actions"]),
|
|
136
|
-
T("div", {
|
|
137
|
-
class: w(`flex flex-col overflow-y-auto ${t(a).xs || t(a).sm ? "pb-20" : ""}`),
|
|
138
|
-
style: V({ height: `calc(100% - ${t(a).lg || t(a).md ? 72 : 64}px)` })
|
|
139
|
-
}, [
|
|
140
|
-
x(G, {
|
|
141
|
-
"model-value": t(a).lg || t(a).md ? P.value : []
|
|
142
|
-
}, null, 8, ["model-value"]),
|
|
143
|
-
t(o) && _.value.length > 0 ? (s(), S("div", {
|
|
144
|
-
key: 0,
|
|
145
|
-
class: w(["grid grid-cols-12", t(a).sm || t(a).xs ? "px-3 gap-[16px]" : "px-24 gap-[24px]"])
|
|
146
|
-
}, [
|
|
147
|
-
(s(!0), S(z, null, H(_.value, (l, k) => (s(), v(Q, {
|
|
148
|
-
key: `widget_${t(u)}_${k}`,
|
|
149
|
-
"model-value": l,
|
|
150
|
-
index: k
|
|
151
|
-
}, null, 8, ["model-value", "index"]))), 128))
|
|
152
|
-
], 2)) : (s(), v(ee, { key: 1 }))
|
|
153
|
-
], 6)
|
|
154
|
-
];
|
|
155
|
-
}),
|
|
156
|
-
_: 1
|
|
157
|
-
});
|
|
158
|
-
};
|
|
159
|
-
}
|
|
160
|
-
});
|
|
161
|
-
export {
|
|
162
|
-
ye as default
|
|
163
|
-
};
|