@feedmepos/mf-report 5.5.10-beta.0 → 5.5.11-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-CqTD3tlo.js → App-BCCZItsv.js} +1 -1
- package/dist/DynamicWidget.vue_vue_type_script_setup_true_lang-Blu98Lu7.js +1082 -0
- package/dist/{OverviewView-BzWZLPJs.js → OverviewView-D7wq9voi.js} +1 -1
- package/dist/{Report-DpH4_M5Q.js → Report-St-N-XGu.js} +90 -89
- package/dist/{ReportEditor-CH4T6kS6.js → ReportEditor-BhaqAf-H.js} +176 -175
- package/dist/ReportView-BqHk2OOl.js +190 -0
- package/dist/TileEditor-Dh1OSYsO.js +2538 -0
- package/dist/{TransitionFade-DWYWoDXe.js → TransitionFade-z9aoIr9s.js} +2 -2
- package/dist/app.js +1611 -66
- package/dist/i18n-Cif1I9J2.js +11 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/DynamicWidget.vue_vue_type_script_setup_true_lang-ByYEvziC.js +0 -1074
- package/dist/ReportView-DavVXS9v.js +0 -180
- package/dist/TileEditor-i1mNoczr.js +0 -2514
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { defineComponent as V, computed as v, resolveComponent as z, createBlock as g, openBlock as u, withCtx as H, createVNode as h, createElementVNode as M, unref as o, normalizeStyle as Y, normalizeClass as D, createElementBlock as R, Fragment as G, renderList as Q } from "vue";
|
|
2
|
+
import { _ as U } from "./MenuTab.vue_vue_type_script_setup_true_lang-AopNmaX1.js";
|
|
3
|
+
import { _ as W } from "./DynamicWidget.vue_vue_type_script_setup_true_lang-Blu98Lu7.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-D7TqpbQ9.js";
|
|
6
|
+
import { a as ee } from "./v4-HCTsB306.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-4LIEfrJG.js";
|
|
9
|
+
import { _ as ae } from "./NoData.vue_vue_type_script_setup_true_lang-DI4X_DSc.js";
|
|
10
|
+
import { useSnackbar as le, useBreakpoints as ne } from "@feedmepos/ui-library";
|
|
11
|
+
import { u as ie, f as se, e as ue } from "./global-loader-BqFQzk46.js";
|
|
12
|
+
import { u as ce } from "./message-dialog-UoMWOnil.js";
|
|
13
|
+
import { r as pe } from "./i18n-Cif1I9J2.js";
|
|
14
|
+
const De = /* @__PURE__ */ V({
|
|
15
|
+
__name: "ReportView",
|
|
16
|
+
setup(me) {
|
|
17
|
+
const { t: r, te: $ } = ie(), m = K(), d = X(), i = le(), { promptMessage: P } = ce(), f = ee(), b = oe(), { promptLoader: E } = se(), { breakpoints: n } = ne(), {
|
|
18
|
+
currentReport: t,
|
|
19
|
+
currentReportId: c,
|
|
20
|
+
isOpenDownloadDialog: I,
|
|
21
|
+
isOpenEmailDialog: O,
|
|
22
|
+
editingReport: J,
|
|
23
|
+
canCreateCustomReport: N,
|
|
24
|
+
customReportQuota: y
|
|
25
|
+
} = p(f), { isOpenAccountingDialog: q } = p(te()), { isOpenScheduleDialog: _ } = p(re()), { disabled: A } = p(ue()), B = v(() => {
|
|
26
|
+
const l = [
|
|
27
|
+
{
|
|
28
|
+
icon: "mail",
|
|
29
|
+
label: r("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: r("report.common.copyID"),
|
|
56
|
+
onClick: () => {
|
|
57
|
+
t.value && (navigator.clipboard.writeText(c.value), i.open({ message: r("report.messages.copiedReportIdToClipboard"), type: "success" }));
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
icon: "report_jobs",
|
|
62
|
+
label: r("report.common.reportStatus"),
|
|
63
|
+
onClick: () => {
|
|
64
|
+
k();
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
];
|
|
68
|
+
return A.value || l.splice(1, 0, {
|
|
69
|
+
icon: "download",
|
|
70
|
+
label: r("report.common.accountingExport"),
|
|
71
|
+
onClick: C
|
|
72
|
+
}), l;
|
|
73
|
+
});
|
|
74
|
+
async function k() {
|
|
75
|
+
b.isOpenJobDialog = !0, await b.getJobs();
|
|
76
|
+
}
|
|
77
|
+
function L() {
|
|
78
|
+
J.value = JSON.parse(JSON.stringify(t.value)), m.push({
|
|
79
|
+
name: "reportEditor",
|
|
80
|
+
query: d.query
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
async function T() {
|
|
84
|
+
if (!N.value) {
|
|
85
|
+
let e = `Your current plan only support up to ${y.value} custom reports.`;
|
|
86
|
+
y.value === 0 && (e = "Your current plan does not support custom report."), i.open({
|
|
87
|
+
message: e,
|
|
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: `${r("report.messages.saveReport")}`,
|
|
98
|
+
message: r("report.messages.confirmAction", {
|
|
99
|
+
action: r("report.common.duplicate"),
|
|
100
|
+
name: t.value.name
|
|
101
|
+
})
|
|
102
|
+
}) && t.value) {
|
|
103
|
+
const e = JSON.parse(JSON.stringify(t.value));
|
|
104
|
+
e.editable = !0, e.id = "", e.name = `${e.name} duplicate`;
|
|
105
|
+
try {
|
|
106
|
+
await E(async () => {
|
|
107
|
+
await f.createOrUpdateReport(e), f.updateCurrentReportId(c.value), m.push({
|
|
108
|
+
name: "reportView",
|
|
109
|
+
query: d.query
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
} catch (s) {
|
|
113
|
+
console.log(s), i.open({ message: "Failed to clone report", type: "error" });
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
function C() {
|
|
118
|
+
q.value = !0;
|
|
119
|
+
}
|
|
120
|
+
function j() {
|
|
121
|
+
t.value && (navigator.clipboard.writeText(c.value), i.open({ message: "Copied report ID to clipboard", type: "success" }));
|
|
122
|
+
}
|
|
123
|
+
const x = v(() => t.value ? t.value.tiles : []), F = v(() => {
|
|
124
|
+
var e;
|
|
125
|
+
let l = [
|
|
126
|
+
(e = t == null ? void 0 : t.value) != null && e.editable ? { label: r("report.common.edit"), value: "edit", isPrimary: !1 } : {
|
|
127
|
+
label: r("report.common.duplicate"),
|
|
128
|
+
value: "duplicate",
|
|
129
|
+
isPrimary: !1
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
label: r("report.common.download"),
|
|
133
|
+
value: "download",
|
|
134
|
+
isPrimary: !0,
|
|
135
|
+
prependIcon: "download"
|
|
136
|
+
},
|
|
137
|
+
{ label: r("report.schedule.sendEmail"), value: "email", isPrimary: !0 }
|
|
138
|
+
];
|
|
139
|
+
return n.value.xs && (l = [
|
|
140
|
+
...l,
|
|
141
|
+
{ label: "Send Email", value: "email", isPrimary: !1 },
|
|
142
|
+
{ label: "Job Delivery Status", value: "report_jobs", isPrimary: !1 },
|
|
143
|
+
{ label: "Email schedule", value: "schedule_email", isPrimary: !1 },
|
|
144
|
+
{ label: "Accounting export", value: "export", isPrimary: !1 },
|
|
145
|
+
{ label: "Copy ID", value: "content_copy", isPrimary: !1 }
|
|
146
|
+
], l = l.filter((s) => s.value !== "edit")), l;
|
|
147
|
+
});
|
|
148
|
+
return (l, e) => {
|
|
149
|
+
const s = z("FmPageHead");
|
|
150
|
+
return u(), g(Z, null, {
|
|
151
|
+
default: H(() => {
|
|
152
|
+
var S;
|
|
153
|
+
return [
|
|
154
|
+
h(s, {
|
|
155
|
+
title: o(pe)(o(r), o($), (S = o(t)) == null ? void 0 : S.name, "other"),
|
|
156
|
+
"back-button": !0,
|
|
157
|
+
actions: F.value,
|
|
158
|
+
"onClick:back": e[0] || (e[0] = (a) => o(m).push({ name: "reports", query: o(d).query })),
|
|
159
|
+
"onClick:action": e[1] || (e[1] = (a) => {
|
|
160
|
+
a === "duplicate" && T(), a === "download" && (I.value = !0), a === "email" && (O.value = !0), a === "edit" && L(), a === "schedule_email" && (_.value = !0), a === "content_copy" && j(), a === "export" && C(), a === "report_jobs" && k();
|
|
161
|
+
})
|
|
162
|
+
}, null, 8, ["title", "actions"]),
|
|
163
|
+
M("div", {
|
|
164
|
+
class: D(`flex flex-col overflow-y-auto ${o(n).xs || o(n).sm ? "pb-20" : ""}`),
|
|
165
|
+
style: Y({ height: `calc(100% - ${o(n).lg || o(n).md ? 72 : 64}px)` })
|
|
166
|
+
}, [
|
|
167
|
+
h(U, {
|
|
168
|
+
"model-value": o(n).lg || o(n).md ? B.value : []
|
|
169
|
+
}, null, 8, ["model-value"]),
|
|
170
|
+
o(t) && x.value.length > 0 ? (u(), R("div", {
|
|
171
|
+
key: 0,
|
|
172
|
+
class: D(["grid grid-cols-12", o(n).sm || o(n).xs ? "px-3 gap-[16px]" : "px-24 gap-[24px]"])
|
|
173
|
+
}, [
|
|
174
|
+
(u(!0), R(G, null, Q(x.value, (a, w) => (u(), g(W, {
|
|
175
|
+
key: `widget_${o(c)}_${w}`,
|
|
176
|
+
"model-value": a,
|
|
177
|
+
index: w
|
|
178
|
+
}, null, 8, ["model-value", "index"]))), 128))
|
|
179
|
+
], 2)) : (u(), g(ae, { key: 1 }))
|
|
180
|
+
], 6)
|
|
181
|
+
];
|
|
182
|
+
}),
|
|
183
|
+
_: 1
|
|
184
|
+
});
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
export {
|
|
189
|
+
De as default
|
|
190
|
+
};
|