@feedmepos/mf-report 5.28.3 → 5.28.4-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-D6KNCk3U.js → App-BMuIFkZp.js} +37 -37
- package/dist/{DateRangeSelect-DD_hwlxu.js → DateRangeSelect-BcFNAiP2.js} +1 -1
- package/dist/{Default.vue_vue_type_script_setup_true_lang-C7SaR61j.js → Default.vue_vue_type_script_setup_true_lang-zrGNDnBJ.js} +1 -1
- package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-Bm1OooCI.js → DynamicWidget.vue_vue_type_script_setup_true_lang-Bj8q32if.js} +5 -5
- package/dist/{GlobalFilterSelect.vue_vue_type_script_setup_true_lang-DJ393ci2.js → GlobalFilterSelect.vue_vue_type_script_setup_true_lang-DLl0Smpg.js} +623 -604
- package/dist/{InsightView-BTFlNqxu.js → InsightView-DfJ12343.js} +5 -5
- package/dist/{Integration-CTxhJq_Z.js → Integration-DAEhKE4f.js} +3 -3
- package/dist/{Integrations-BYGlfohx.js → Integrations-8b1zB9XX.js} +2 -2
- package/dist/{Layout-CStIZUX-.js → Layout-B5VlBrqA.js} +1 -1
- package/dist/{LocationSelect.vue_vue_type_script_setup_true_lang-D6apLFYw.js → LocationSelect.vue_vue_type_script_setup_true_lang-R13mIsrh.js} +2 -2
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-A_VbksPH.js → MenuTab.vue_vue_type_script_setup_true_lang-D7AU_s8g.js} +5 -5
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-CSMc0jtK.js → NavigationTab.vue_vue_type_script_setup_true_lang-CacaNzx_.js} +5 -5
- package/dist/{OverviewView-BXnlGK7f.js → OverviewView-BGtir-m6.js} +4 -4
- package/dist/Report-BAKreW0-.js +682 -0
- package/dist/{ReportCanvasView-CBbsxv--.js → ReportCanvasView-DLVppEQE.js} +3 -3
- package/dist/{ReportEditor-duj_-Q1M.js → ReportEditor-DAZHakgE.js} +7 -7
- package/dist/ReportView-CcIBctoI.js +307 -0
- package/dist/{ReportViewRoute-BUNwCFLs.js → ReportViewRoute-Cxp21_CC.js} +2 -2
- package/dist/{Setting-XMsaZeLK.js → Setting-DbKP30rF.js} +3 -3
- package/dist/{Template-DQcQXA94.js → Template-lzCS_aWv.js} +3 -3
- package/dist/{TileEditor-1lFcdBWl.js → TileEditor-DwKZZgYN.js} +6 -6
- package/dist/{TilePageStack.vue_vue_type_script_setup_true_lang-D4KbxrPX.js → TilePageStack.vue_vue_type_script_setup_true_lang-CJOoh4wX.js} +2 -2
- package/dist/{TransitionFade-qsqa6Mnc.js → TransitionFade-BcYwBfZV.js} +5 -5
- package/dist/{app-Cf5HuvZS.js → app-z-voggLY.js} +396 -376
- package/dist/app.js +1 -1
- package/dist/assets/{formatChartData.worker-Dx1USoTn.js → formatChartData.worker-DYtOUTAT.js} +31 -31
- package/dist/assets/{processTableData.worker-clNopMr8.js → processTableData.worker-XtLK-E3T.js} +31 -31
- package/dist/{report-DhhomBCB.js → report-DSXB-7r9.js} +3 -3
- package/dist/style.css +1 -1
- package/dist/{useRestaurantPermission-CABpuml7.js → useRestaurantPermission-CVoe7qGo.js} +1 -1
- package/package.json +1 -1
- package/dist/Report-DGkT9no2.js +0 -588
- package/dist/ReportView-C1N7pmiQ.js +0 -333
|
@@ -1,333 +0,0 @@
|
|
|
1
|
-
import { defineComponent as Q, computed as l, createBlock as f, openBlock as y, withCtx as S, renderSlot as ce, ref as pe, watch as me, resolveComponent as U, createVNode as T, createElementVNode as R, unref as n, toDisplayString as de, normalizeStyle as ve, normalizeClass as fe } from "vue";
|
|
2
|
-
import { _ as ye } from "./MenuTab.vue_vue_type_script_setup_true_lang-A_VbksPH.js";
|
|
3
|
-
import { _ as ge } from "./TilePageStack.vue_vue_type_script_setup_true_lang-D4KbxrPX.js";
|
|
4
|
-
import { u as be, l as _e, t as we } from "./report-DhhomBCB.js";
|
|
5
|
-
import { useRouter as Se, useRoute as he } from "vue-router";
|
|
6
|
-
import { _ as Ce } from "./Default.vue_vue_type_script_setup_true_lang-C7SaR61j.js";
|
|
7
|
-
import { storeToRefs as w } from "pinia";
|
|
8
|
-
import { a as ke, b as xe, u as Te, g as Re } from "./NavigationTab.vue_vue_type_script_setup_true_lang-CSMc0jtK.js";
|
|
9
|
-
import { _ as H } from "./SelectComponent.vue_vue_type_script_setup_true_lang-DW7Dk7iQ.js";
|
|
10
|
-
import { useSnackbar as Pe, useBreakpoints as Ie } from "@feedmepos/ui-library";
|
|
11
|
-
import { u as Oe } from "./global-loader-BuxFfehu.js";
|
|
12
|
-
import { u as De } from "./message-dialog-UoMWOnil.js";
|
|
13
|
-
import { e as Ee, h as $e } from "./app-Cf5HuvZS.js";
|
|
14
|
-
import { u as M, _ as Ae } from "./_plugin-vue_export-helper-C6QDExPN.js";
|
|
15
|
-
import { r as Ne } from "./i18n-DbyciK4x.js";
|
|
16
|
-
const Je = /* @__PURE__ */ Q({
|
|
17
|
-
__name: "NoPermission",
|
|
18
|
-
props: {
|
|
19
|
-
title: { default: "report.messages.noPermission" },
|
|
20
|
-
subTitle: { default: "report.messages.noPermissionPageAccess" }
|
|
21
|
-
},
|
|
22
|
-
setup(P) {
|
|
23
|
-
const o = P, { t: g } = M(), m = l(() => g(o.title)), p = l(() => g(o.subTitle));
|
|
24
|
-
return (r, h) => (y(), f(H, {
|
|
25
|
-
title: m.value,
|
|
26
|
-
"sub-title": p.value
|
|
27
|
-
}, {
|
|
28
|
-
menu: S(() => [
|
|
29
|
-
ce(r.$slots, "menu")
|
|
30
|
-
]),
|
|
31
|
-
_: 3
|
|
32
|
-
}, 8, ["title", "sub-title"]));
|
|
33
|
-
}
|
|
34
|
-
}), qe = { class: "fm-typo-en-title-md-600 block min-w-0 max-w-full overflow-hidden text-ellipsis whitespace-nowrap" }, Be = { class: "sticky top-0 z-10 bg-white" }, je = /* @__PURE__ */ Q({
|
|
35
|
-
__name: "ReportView",
|
|
36
|
-
setup(P) {
|
|
37
|
-
const { t: o, te: g } = M(), m = Se(), p = he(), r = Pe(), { promptMessage: h } = De(), d = be(), I = ke(), { promptLoader: b } = Oe(), { breakpoints: u } = Ie(), { isOpenAccountingDialog: W } = w(xe()), { isOpenScheduleDialog: O } = w(Te()), { disabled: D } = w(Ee()), E = pe(null), $ = l(
|
|
38
|
-
() => {
|
|
39
|
-
var a;
|
|
40
|
-
return ((a = E.value) == null ? void 0 : a.reportId) === c.value;
|
|
41
|
-
}
|
|
42
|
-
), A = l(() => {
|
|
43
|
-
var a;
|
|
44
|
-
return !!((a = e.value) != null && a.isSupportPos);
|
|
45
|
-
}), {
|
|
46
|
-
currentReport: e,
|
|
47
|
-
overviewReport: Y,
|
|
48
|
-
currentReportId: c,
|
|
49
|
-
isOpenDownloadDialog: G,
|
|
50
|
-
isOpenEmailDialog: K,
|
|
51
|
-
editingReport: N,
|
|
52
|
-
canCreateCustomReport: X,
|
|
53
|
-
customReportQuota: J
|
|
54
|
-
} = w(d), { canRead: Z, canUpdate: q, canDuplicate: ee, canEditQueryEngine: oe, isAdmin: te } = $e(), B = l(
|
|
55
|
-
() => !!e.value && oe(e.value)
|
|
56
|
-
), _ = l(() => e.value ? Z(e.value) : !0), j = l(
|
|
57
|
-
() => !!e.value && q(e.value)
|
|
58
|
-
), C = l(
|
|
59
|
-
() => _.value && te.value && !!e.value && !e.value.isDefault
|
|
60
|
-
);
|
|
61
|
-
me(
|
|
62
|
-
() => c.value,
|
|
63
|
-
async () => E.value = await Re(c.value),
|
|
64
|
-
{ immediate: !0 }
|
|
65
|
-
);
|
|
66
|
-
const ae = l(() => {
|
|
67
|
-
var s;
|
|
68
|
-
if (!_.value) return [];
|
|
69
|
-
const a = c.value === ((s = Y.value) == null ? void 0 : s.id), t = [
|
|
70
|
-
{
|
|
71
|
-
icon: "mail",
|
|
72
|
-
label: o("report.common.emailSchedule"),
|
|
73
|
-
onClick: () => {
|
|
74
|
-
O.value = !0;
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
icon: "article",
|
|
79
|
-
label: o(a ? "report.common.unsetAsOverview" : "report.common.setAsOverview"),
|
|
80
|
-
onClick: async () => {
|
|
81
|
-
await b(async () => {
|
|
82
|
-
if (e.value)
|
|
83
|
-
try {
|
|
84
|
-
await d.updateDefaultReport(a ? null : e.value.id), r.open({
|
|
85
|
-
message: `Successfully ${a ? "unset" : "set"} ${e.value.name} as Overview`,
|
|
86
|
-
type: "success"
|
|
87
|
-
});
|
|
88
|
-
} catch (v) {
|
|
89
|
-
r.open({ message: JSON.stringify(v), type: "error" });
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
icon: "content_copy",
|
|
96
|
-
label: o("report.common.copyID"),
|
|
97
|
-
onClick: () => {
|
|
98
|
-
e.value && (navigator.clipboard.writeText(c.value), r.open({ message: o("report.messages.copiedReportIdToClipboard"), type: "success" }));
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
icon: "report_jobs",
|
|
103
|
-
label: o("report.common.reportStatus"),
|
|
104
|
-
onClick: () => {
|
|
105
|
-
F();
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
];
|
|
109
|
-
return !D.value && $.value && t.splice(1, 0, {
|
|
110
|
-
icon: "download",
|
|
111
|
-
label: o("report.common.accountingExport"),
|
|
112
|
-
onClick: z
|
|
113
|
-
}), C.value && t.splice(t.length - 1, 0, {
|
|
114
|
-
icon: "library_add",
|
|
115
|
-
label: o("report.common.copyToTemplate"),
|
|
116
|
-
onClick: () => {
|
|
117
|
-
V();
|
|
118
|
-
}
|
|
119
|
-
}), t;
|
|
120
|
-
});
|
|
121
|
-
async function F() {
|
|
122
|
-
I.isOpenJobDialog = !0, await I.getJobs();
|
|
123
|
-
}
|
|
124
|
-
function re() {
|
|
125
|
-
if (e.value && B.value) {
|
|
126
|
-
N.value = JSON.parse(JSON.stringify(e.value)), m.push({ name: "reportEditor", query: p.query });
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
if (!e.value || !q(e.value)) {
|
|
130
|
-
r.open({
|
|
131
|
-
message: o("report.messages.noPermissionUpdateReport"),
|
|
132
|
-
type: "error"
|
|
133
|
-
});
|
|
134
|
-
return;
|
|
135
|
-
}
|
|
136
|
-
N.value = JSON.parse(JSON.stringify(e.value)), m.push({
|
|
137
|
-
name: "reportEditor",
|
|
138
|
-
query: p.query
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
|
-
async function se() {
|
|
142
|
-
if (!e.value || !ee(e.value)) {
|
|
143
|
-
r.open({
|
|
144
|
-
message: o("report.messages.noPermissionDuplicateReport"),
|
|
145
|
-
type: "error"
|
|
146
|
-
});
|
|
147
|
-
return;
|
|
148
|
-
}
|
|
149
|
-
if (!X.value) {
|
|
150
|
-
let t = `Your current plan only support up to ${J.value} custom reports.`;
|
|
151
|
-
J.value === 0 && (t = "Your current plan does not support custom report."), r.open({
|
|
152
|
-
message: t,
|
|
153
|
-
type: "error"
|
|
154
|
-
});
|
|
155
|
-
return;
|
|
156
|
-
}
|
|
157
|
-
if (!e.value) {
|
|
158
|
-
r.open({ message: "No Widget", type: "error" });
|
|
159
|
-
return;
|
|
160
|
-
}
|
|
161
|
-
if (await h({
|
|
162
|
-
title: `${o("report.messages.duplicateReport")}`,
|
|
163
|
-
message: o("report.messages.confirmAction", {
|
|
164
|
-
action: o("report.common.duplicate"),
|
|
165
|
-
name: e.value.name
|
|
166
|
-
})
|
|
167
|
-
}) && e.value) {
|
|
168
|
-
const t = JSON.parse(JSON.stringify(e.value));
|
|
169
|
-
t.editable = !0, t.id = "", t.name = `${t.name} duplicate`, t.isDefault = !1;
|
|
170
|
-
try {
|
|
171
|
-
await b(async () => {
|
|
172
|
-
const s = await d.createOrUpdateReport(t);
|
|
173
|
-
d.updateCurrentReportId(s.id), m.push({
|
|
174
|
-
name: "reportView",
|
|
175
|
-
params: p.params,
|
|
176
|
-
query: p.query
|
|
177
|
-
});
|
|
178
|
-
});
|
|
179
|
-
} catch (s) {
|
|
180
|
-
console.log(s), r.open({ message: "Failed to clone report", type: "error" });
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
async function V() {
|
|
185
|
-
var t;
|
|
186
|
-
if (!C.value) {
|
|
187
|
-
r.open({
|
|
188
|
-
message: o("report.messages.noPermission"),
|
|
189
|
-
type: "error"
|
|
190
|
-
});
|
|
191
|
-
return;
|
|
192
|
-
}
|
|
193
|
-
if (!e.value) {
|
|
194
|
-
r.open({ message: "No Widget", type: "error" });
|
|
195
|
-
return;
|
|
196
|
-
}
|
|
197
|
-
if (await h({
|
|
198
|
-
title: `${o("report.common.copyToTemplate")}`,
|
|
199
|
-
message: o("report.messages.confirmAction", {
|
|
200
|
-
action: o("report.common.copyToTemplate"),
|
|
201
|
-
name: (t = e == null ? void 0 : e.value) == null ? void 0 : t.name
|
|
202
|
-
})
|
|
203
|
-
}))
|
|
204
|
-
try {
|
|
205
|
-
await b(async () => {
|
|
206
|
-
var s;
|
|
207
|
-
await d.createReportTemplate(e.value), r.open({
|
|
208
|
-
message: o("report.messages.copyTemplateSuccess", { name: (s = e.value) == null ? void 0 : s.name }),
|
|
209
|
-
type: "success"
|
|
210
|
-
});
|
|
211
|
-
});
|
|
212
|
-
} catch (s) {
|
|
213
|
-
console.log(s), r.open({
|
|
214
|
-
message: o("report.messages.failedToAction", { action: o("report.common.copyToTemplate") }),
|
|
215
|
-
type: "error"
|
|
216
|
-
});
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
function z() {
|
|
220
|
-
W.value = !0;
|
|
221
|
-
}
|
|
222
|
-
function ne() {
|
|
223
|
-
e.value && (navigator.clipboard.writeText(c.value), r.open({ message: "Copied report ID to clipboard", type: "success" }));
|
|
224
|
-
}
|
|
225
|
-
async function le() {
|
|
226
|
-
if (!(!e.value || !j.value))
|
|
227
|
-
try {
|
|
228
|
-
await b(async () => {
|
|
229
|
-
await we(c.value, !A.value), await d.getReports();
|
|
230
|
-
});
|
|
231
|
-
} catch (a) {
|
|
232
|
-
console.log(a), r.open({
|
|
233
|
-
message: o("report.messages.failedToAction", { action: o("report.common.update") }),
|
|
234
|
-
type: "error"
|
|
235
|
-
});
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
const k = l(() => e.value ? e.value.tiles : []), ie = l(() => _e(k.value)), ue = l(() => {
|
|
239
|
-
var s;
|
|
240
|
-
if (!_.value) return [];
|
|
241
|
-
const a = !!((s = e.value) != null && s.editable);
|
|
242
|
-
let t = [
|
|
243
|
-
...j.value ? [
|
|
244
|
-
{
|
|
245
|
-
label: o("report.common.showInPOS"),
|
|
246
|
-
value: "show_in_pos",
|
|
247
|
-
isPrimary: !1,
|
|
248
|
-
appendIcon: A.value ? "radio_button_checked" : "radio_button_unchecked"
|
|
249
|
-
}
|
|
250
|
-
] : [],
|
|
251
|
-
...a || B.value ? [{ label: o("report.common.edit"), value: "edit", isPrimary: !1 }] : [],
|
|
252
|
-
...a ? [] : [{ label: o("report.common.duplicate"), value: "duplicate", isPrimary: !1 }],
|
|
253
|
-
{
|
|
254
|
-
label: o("report.common.download"),
|
|
255
|
-
value: "download",
|
|
256
|
-
isPrimary: !0,
|
|
257
|
-
prependIcon: "download"
|
|
258
|
-
},
|
|
259
|
-
{ label: o("report.schedule.sendEmail"), value: "email", isPrimary: !0 }
|
|
260
|
-
];
|
|
261
|
-
return u.value.xs && (t = [
|
|
262
|
-
...t,
|
|
263
|
-
{ label: o("report.schedule.sendEmail"), value: "email", isPrimary: !1 },
|
|
264
|
-
{ label: o("report.common.reportStatus"), value: "report_jobs", isPrimary: !1 },
|
|
265
|
-
{ label: o("report.common.emailSchedule"), value: "schedule_email", isPrimary: !1 },
|
|
266
|
-
{ label: o("report.common.copyID"), value: "content_copy", isPrimary: !1 }
|
|
267
|
-
], C.value && t.push({
|
|
268
|
-
label: o("report.common.copyToTemplate"),
|
|
269
|
-
value: "copy_to_template",
|
|
270
|
-
isPrimary: !1
|
|
271
|
-
}), !D.value && $.value && t.push({ label: o("report.common.accountingExport"), value: "export", isPrimary: !1 }), t = t.filter((v) => v.value !== "edit")), t;
|
|
272
|
-
}), x = l(() => {
|
|
273
|
-
var a;
|
|
274
|
-
return Ne(o, g, (a = e == null ? void 0 : e.value) == null ? void 0 : a.name, "other");
|
|
275
|
-
});
|
|
276
|
-
return (a, t) => {
|
|
277
|
-
const s = U("FmTooltip"), v = U("FmPageHead");
|
|
278
|
-
return y(), f(Ce, null, {
|
|
279
|
-
default: S(() => {
|
|
280
|
-
var L;
|
|
281
|
-
return [
|
|
282
|
-
T(v, {
|
|
283
|
-
title: x.value,
|
|
284
|
-
"back-button": !0,
|
|
285
|
-
actions: ue.value,
|
|
286
|
-
class: "remove-line-clamping",
|
|
287
|
-
"onClick:back": t[0] || (t[0] = (i) => n(m).push({ name: "reports", query: n(p).query })),
|
|
288
|
-
"onClick:action": t[1] || (t[1] = (i) => {
|
|
289
|
-
i === "show_in_pos" && le(), i === "duplicate" && se(), i === "download" && (G.value = !0), i === "email" && (K.value = !0), i === "edit" && re(), i === "schedule_email" && (O.value = !0), i === "content_copy" && ne(), i === "copy_to_template" && V(), i === "export" && z(), i === "report_jobs" && F();
|
|
290
|
-
})
|
|
291
|
-
}, {
|
|
292
|
-
title: S(() => [
|
|
293
|
-
T(s, {
|
|
294
|
-
content: x.value,
|
|
295
|
-
placement: "bottom",
|
|
296
|
-
"z-index": 2e3,
|
|
297
|
-
class: "flex min-w-0 max-w-full justify-start"
|
|
298
|
-
}, {
|
|
299
|
-
default: S(() => [
|
|
300
|
-
R("p", qe, de(x.value), 1)
|
|
301
|
-
]),
|
|
302
|
-
_: 1
|
|
303
|
-
}, 8, ["content"])
|
|
304
|
-
]),
|
|
305
|
-
_: 1
|
|
306
|
-
}, 8, ["title", "actions"]),
|
|
307
|
-
R("div", {
|
|
308
|
-
class: fe(`flex flex-col overflow-y-auto ${n(u).xs || n(u).sm ? "pb-20" : ""}`),
|
|
309
|
-
style: ve({ height: `calc(100% - ${n(u).lg || n(u).md ? 72 : 64}px)` })
|
|
310
|
-
}, [
|
|
311
|
-
R("div", Be, [
|
|
312
|
-
T(ye, {
|
|
313
|
-
"model-value": n(u).lg || n(u).md ? ae.value : []
|
|
314
|
-
}, null, 8, ["model-value"])
|
|
315
|
-
]),
|
|
316
|
-
n(e) && !_.value ? (y(), f(Je, { key: 0 })) : n(e) && ((L = k.value) == null ? void 0 : L.length) > 0 ? (y(), f(ge, {
|
|
317
|
-
key: 1,
|
|
318
|
-
tiles: k.value,
|
|
319
|
-
"report-id": n(c),
|
|
320
|
-
"leaf-index-by-id": ie.value,
|
|
321
|
-
"grid-class": n(u).sm || n(u).xs ? "px-3 gap-[16px]" : "px-24 gap-[24px]"
|
|
322
|
-
}, null, 8, ["tiles", "report-id", "leaf-index-by-id", "grid-class"])) : (y(), f(H, { key: 2 }))
|
|
323
|
-
], 6)
|
|
324
|
-
];
|
|
325
|
-
}),
|
|
326
|
-
_: 1
|
|
327
|
-
});
|
|
328
|
-
};
|
|
329
|
-
}
|
|
330
|
-
}), oo = /* @__PURE__ */ Ae(je, [["__scopeId", "data-v-2d4d3abc"]]);
|
|
331
|
-
export {
|
|
332
|
-
oo as default
|
|
333
|
-
};
|