@feedmepos/mf-report 5.22.15 → 5.22.16
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-CdZlnXKI.js → App-BVF7QlD0.js} +5 -5
- package/dist/{BaseDialog.vue_vue_type_script_setup_true_lang-CLwzdS2Q.js → BaseDialog.vue_vue_type_script_setup_true_lang-C0TNaWyV.js} +1504 -1367
- package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-CsDelr-w.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-BZ-wqf61.js} +2 -2
- package/dist/{Default.vue_vue_type_script_setup_true_lang-DzDO-bfn.js → Default.vue_vue_type_script_setup_true_lang-CfIy5eDd.js} +2 -2
- package/dist/FilterSelector.vue_vue_type_script_setup_true_lang-DTyjD4Ns.js +5500 -0
- package/dist/{InsightView--U8YNngJ.js → InsightView-CcULarZa.js} +6 -6
- package/dist/{Integration-BECzMkNu.js → Integration-B4e12DEq.js} +4 -4
- package/dist/{Integrations-CKTqvI1_.js → Integrations-DKefC_8Q.js} +4 -4
- package/dist/{Layout-Cnc8ppRk.js → Layout-fFxDWyHb.js} +1 -1
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-DwTrXeDM.js → MenuTab.vue_vue_type_script_setup_true_lang-BMmuP39v.js} +5 -5
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-DU__tSUF.js → NavigationTab.vue_vue_type_script_setup_true_lang-DcX8TQAm.js} +1432 -1426
- package/dist/{NoData.vue_vue_type_script_setup_true_lang-yT3rD3v6.js → NoData.vue_vue_type_script_setup_true_lang-DRlDgLPG.js} +1 -1
- package/dist/{OverviewView-x9wDh9Ri.js → OverviewView-C0vzEN7-.js} +5 -5
- package/dist/{Report-CK_isrIW.js → Report-CsjhpzLP.js} +4 -4
- package/dist/ReportEditor-UEUbwEwl.js +1392 -0
- package/dist/ReportView-5nihWNrb.js +264 -0
- package/dist/{SelectComponent.vue_vue_type_script_setup_true_lang-COi1XhYD.js → SelectComponent.vue_vue_type_script_setup_true_lang-BDvVGWuB.js} +1 -1
- package/dist/{Setting-DyrGukYa.js → Setting-REox7q25.js} +5 -5
- package/dist/TileEditor-D23dVPsy.js +3820 -0
- package/dist/{TransitionFade-D4Rp-fR9.js → TransitionFade-CFT50m56.js} +11 -10
- package/dist/{app-Dd6GUk_Q.js → app-Bp5urT4H.js} +156 -116
- package/dist/app.js +1 -1
- package/dist/assets/{formatChartData.worker-CxcSukKp.js → formatChartData.worker-BMafyqs1.js} +22 -22
- package/dist/assets/{processTableData.worker-MkLoF0u4.js → processTableData.worker-SW0HOvM7.js} +7 -7
- package/dist/style.css +1 -1
- package/dist/{useRestaurantPermission-Dw-A2QGb.js → useRestaurantPermission-4IKyXsvY.js} +1 -1
- package/dist/{vue-i18n-Dwv_B0_J.js → vue-i18n-pKrrGi-M.js} +1 -1
- package/package.json +1 -1
- package/dist/FilterSelector.vue_vue_type_script_setup_true_lang-DgagC5F1.js +0 -5405
- package/dist/ReportEditor-T12VzOJa.js +0 -1104
- package/dist/ReportView-BC77AQD8.js +0 -264
- package/dist/TileEditor-B-sEmK-X.js +0 -3789
|
@@ -1,264 +0,0 @@
|
|
|
1
|
-
import { defineComponent as ne, ref as y, computed as m, watch as J, onMounted as se, onUnmounted as le, resolveComponent as ie, createBlock as k, openBlock as v, withCtx as ue, createVNode as N, createElementVNode as T, unref as a, normalizeStyle as ce, normalizeClass as q, createElementBlock as L, Fragment as pe, renderList as me } from "vue";
|
|
2
|
-
import { _ as de } from "./MenuTab.vue_vue_type_script_setup_true_lang-DwTrXeDM.js";
|
|
3
|
-
import { _ as ve } from "./FilterSelector.vue_vue_type_script_setup_true_lang-DgagC5F1.js";
|
|
4
|
-
import { useRouter as fe, useRoute as ge } from "vue-router";
|
|
5
|
-
import { _ as ye } from "./Default.vue_vue_type_script_setup_true_lang-DzDO-bfn.js";
|
|
6
|
-
import { a as be, c as _e, s as we } from "./BaseDialog.vue_vue_type_script_setup_true_lang-CLwzdS2Q.js";
|
|
7
|
-
import { storeToRefs as b } from "pinia";
|
|
8
|
-
import { b as Se, c as ke, u as he, g as Re } from "./NavigationTab.vue_vue_type_script_setup_true_lang-DU__tSUF.js";
|
|
9
|
-
import { _ as Ce } from "./NoData.vue_vue_type_script_setup_true_lang-yT3rD3v6.js";
|
|
10
|
-
import { useSnackbar as xe, useBreakpoints as Pe } from "@feedmepos/ui-library";
|
|
11
|
-
import { u as De, e as Oe, d as Ie } from "./vue-i18n-Dwv_B0_J.js";
|
|
12
|
-
import { u as $e } from "./message-dialog-UoMWOnil.js";
|
|
13
|
-
import { r as Ee } from "./i18n-CI_sQ5d_.js";
|
|
14
|
-
import { _ as Ae } from "./SelectComponent.vue_vue_type_script_setup_true_lang-COi1XhYD.js";
|
|
15
|
-
const Be = /* @__PURE__ */ ne({
|
|
16
|
-
__name: "ReportView",
|
|
17
|
-
setup(Je) {
|
|
18
|
-
const { t: e, te: V } = De(), _ = fe(), f = ge(), i = xe(), { promptMessage: j } = $e(), d = be(), h = Se(), { promptLoader: w } = Oe(), { breakpoints: s } = Pe(), { isOpenAccountingDialog: F } = b(ke()), { isOpenScheduleDialog: R } = b(he()), { disabled: C } = b(Ie()), g = y(null), H = y(0), x = y(0);
|
|
19
|
-
let u = null;
|
|
20
|
-
const P = y(null), D = m(() => {
|
|
21
|
-
var r;
|
|
22
|
-
return ((r = P.value) == null ? void 0 : r.reportId) === c.value;
|
|
23
|
-
}), M = m(
|
|
24
|
-
() => {
|
|
25
|
-
var r;
|
|
26
|
-
return !!((r = t.value) != null && r.isSupportPos);
|
|
27
|
-
}
|
|
28
|
-
), {
|
|
29
|
-
currentReport: t,
|
|
30
|
-
overviewReport: U,
|
|
31
|
-
currentReportId: c,
|
|
32
|
-
isOpenDownloadDialog: Y,
|
|
33
|
-
isOpenEmailDialog: z,
|
|
34
|
-
editingReport: G,
|
|
35
|
-
canCreateCustomReport: Q,
|
|
36
|
-
customReportQuota: O
|
|
37
|
-
} = b(d), { canUpdate: W, canDuplicate: K } = _e();
|
|
38
|
-
J(g, (r) => {
|
|
39
|
-
u == null || u.disconnect(), r && (u = new ResizeObserver(() => {
|
|
40
|
-
S();
|
|
41
|
-
}), u.observe(r), S());
|
|
42
|
-
}), J(
|
|
43
|
-
() => c.value,
|
|
44
|
-
async () => P.value = await Re(c.value),
|
|
45
|
-
{ immediate: !0 }
|
|
46
|
-
), se(() => {
|
|
47
|
-
S();
|
|
48
|
-
}), le(() => {
|
|
49
|
-
u == null || u.disconnect();
|
|
50
|
-
});
|
|
51
|
-
function S() {
|
|
52
|
-
if (g.value) {
|
|
53
|
-
const r = g.value.getBoundingClientRect();
|
|
54
|
-
H.value = r.height, x.value = r.bottom;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
const X = m(() => s.value.xs || s.value.sm ? 1 : x.value), Z = m(() => {
|
|
58
|
-
var l;
|
|
59
|
-
const r = c.value === ((l = U.value) == null ? void 0 : l.id), o = [
|
|
60
|
-
{
|
|
61
|
-
icon: "mail",
|
|
62
|
-
label: e("report.common.emailSchedule"),
|
|
63
|
-
onClick: () => {
|
|
64
|
-
R.value = !0;
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
icon: "article",
|
|
69
|
-
label: e(r ? "report.common.unsetAsOverview" : "report.common.setAsOverview"),
|
|
70
|
-
onClick: async () => {
|
|
71
|
-
await w(async () => {
|
|
72
|
-
if (t.value)
|
|
73
|
-
try {
|
|
74
|
-
await d.updateDefaultReport(r ? null : t.value.id), i.open({
|
|
75
|
-
message: `Successfully ${r ? "unset" : "set"} ${t.value.name} as Overview`,
|
|
76
|
-
type: "success"
|
|
77
|
-
});
|
|
78
|
-
} catch (p) {
|
|
79
|
-
i.open({ message: JSON.stringify(p), type: "error" });
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
icon: "content_copy",
|
|
86
|
-
label: e("report.common.copyID"),
|
|
87
|
-
onClick: () => {
|
|
88
|
-
t.value && (navigator.clipboard.writeText(c.value), i.open({ message: e("report.messages.copiedReportIdToClipboard"), type: "success" }));
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
icon: "report_jobs",
|
|
93
|
-
label: e("report.common.reportStatus"),
|
|
94
|
-
onClick: () => {
|
|
95
|
-
I();
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
];
|
|
99
|
-
return !C.value && D.value && o.splice(1, 0, {
|
|
100
|
-
icon: "download",
|
|
101
|
-
label: e("report.common.accountingExport"),
|
|
102
|
-
onClick: $
|
|
103
|
-
}), o;
|
|
104
|
-
});
|
|
105
|
-
async function I() {
|
|
106
|
-
h.isOpenJobDialog = !0, await h.getJobs();
|
|
107
|
-
}
|
|
108
|
-
function ee() {
|
|
109
|
-
if (!t.value || !W(t.value)) {
|
|
110
|
-
i.open({
|
|
111
|
-
message: e("report.messages.noPermissionUpdateReport"),
|
|
112
|
-
type: "error"
|
|
113
|
-
});
|
|
114
|
-
return;
|
|
115
|
-
}
|
|
116
|
-
G.value = JSON.parse(JSON.stringify(t.value)), _.push({
|
|
117
|
-
name: "reportEditor",
|
|
118
|
-
query: f.query
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
async function oe() {
|
|
122
|
-
if (!t.value || !K(t.value)) {
|
|
123
|
-
i.open({
|
|
124
|
-
message: e("report.messages.noPermissionDuplicateReport"),
|
|
125
|
-
type: "error"
|
|
126
|
-
});
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
if (!Q.value) {
|
|
130
|
-
let o = `Your current plan only support up to ${O.value} custom reports.`;
|
|
131
|
-
O.value === 0 && (o = "Your current plan does not support custom report."), i.open({
|
|
132
|
-
message: o,
|
|
133
|
-
type: "error"
|
|
134
|
-
});
|
|
135
|
-
return;
|
|
136
|
-
}
|
|
137
|
-
if (!t.value) {
|
|
138
|
-
i.open({ message: "No Widget", type: "error" });
|
|
139
|
-
return;
|
|
140
|
-
}
|
|
141
|
-
if (await j({
|
|
142
|
-
title: `${e("report.messages.saveReport")}`,
|
|
143
|
-
message: e("report.messages.confirmAction", {
|
|
144
|
-
action: e("report.common.duplicate"),
|
|
145
|
-
name: t.value.name
|
|
146
|
-
})
|
|
147
|
-
}) && t.value) {
|
|
148
|
-
const o = JSON.parse(JSON.stringify(t.value));
|
|
149
|
-
o.editable = !0, o.id = "", o.name = `${o.name} duplicate`, o.isDefault = !1;
|
|
150
|
-
try {
|
|
151
|
-
await w(async () => {
|
|
152
|
-
const l = await d.createOrUpdateReport(o);
|
|
153
|
-
d.updateCurrentReportId(l.id), _.push({
|
|
154
|
-
name: "reportView",
|
|
155
|
-
params: f.params,
|
|
156
|
-
query: f.query
|
|
157
|
-
});
|
|
158
|
-
});
|
|
159
|
-
} catch (l) {
|
|
160
|
-
console.log(l), i.open({ message: "Failed to clone report", type: "error" });
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
function $() {
|
|
165
|
-
F.value = !0;
|
|
166
|
-
}
|
|
167
|
-
function te() {
|
|
168
|
-
t.value && (navigator.clipboard.writeText(c.value), i.open({ message: "Copied report ID to clipboard", type: "success" }));
|
|
169
|
-
}
|
|
170
|
-
async function re() {
|
|
171
|
-
if (t.value)
|
|
172
|
-
try {
|
|
173
|
-
await w(async () => {
|
|
174
|
-
await we(c.value, !M.value), await d.getReports();
|
|
175
|
-
});
|
|
176
|
-
} catch (r) {
|
|
177
|
-
console.log(r), i.open({ message: e("report.messages.failedToAction", { action: e("report.common.update") }), type: "error" });
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
const E = m(() => t.value ? t.value.tiles : []), ae = m(() => {
|
|
181
|
-
var l;
|
|
182
|
-
let o = [
|
|
183
|
-
// TODO: In future once decided to support report showing configuration for POS,
|
|
184
|
-
// uncomment this:
|
|
185
|
-
// {
|
|
186
|
-
// label: t("report.common.showInPOS"),
|
|
187
|
-
// value: "show_in_pos",
|
|
188
|
-
// isPrimary: false,
|
|
189
|
-
// appendIcon: isCurrentReportShownInPOS.value
|
|
190
|
-
// ? "radio_button_checked"
|
|
191
|
-
// : "radio_button_unchecked"
|
|
192
|
-
// },
|
|
193
|
-
!!((l = t.value) != null && l.editable) ? { label: e("report.common.edit"), value: "edit", isPrimary: !1 } : {
|
|
194
|
-
label: e("report.common.duplicate"),
|
|
195
|
-
value: "duplicate",
|
|
196
|
-
isPrimary: !1
|
|
197
|
-
},
|
|
198
|
-
{
|
|
199
|
-
label: e("report.common.download"),
|
|
200
|
-
value: "download",
|
|
201
|
-
isPrimary: !0,
|
|
202
|
-
prependIcon: "download"
|
|
203
|
-
},
|
|
204
|
-
{ label: e("report.schedule.sendEmail"), value: "email", isPrimary: !0 }
|
|
205
|
-
];
|
|
206
|
-
return s.value.xs && (o = [
|
|
207
|
-
...o,
|
|
208
|
-
{ label: e("report.schedule.sendEmail"), value: "email", isPrimary: !1 },
|
|
209
|
-
{ label: e("report.common.reportStatus"), value: "report_jobs", isPrimary: !1 },
|
|
210
|
-
{ label: e("report.common.emailSchedule"), value: "schedule_email", isPrimary: !1 },
|
|
211
|
-
{ label: e("report.common.copyID"), value: "content_copy", isPrimary: !1 }
|
|
212
|
-
], !C.value && D.value && o.push({ label: e("report.common.accountingExport"), value: "export", isPrimary: !1 }), o = o.filter((p) => p.value !== "edit")), o;
|
|
213
|
-
});
|
|
214
|
-
return (r, o) => {
|
|
215
|
-
const l = ie("FmPageHead");
|
|
216
|
-
return v(), k(ye, null, {
|
|
217
|
-
default: ue(() => {
|
|
218
|
-
var p, A;
|
|
219
|
-
return [
|
|
220
|
-
N(l, {
|
|
221
|
-
title: a(Ee)(a(e), a(V), (p = a(t)) == null ? void 0 : p.name, "other"),
|
|
222
|
-
"back-button": !0,
|
|
223
|
-
actions: ae.value,
|
|
224
|
-
"onClick:back": o[0] || (o[0] = (n) => a(_).push({ name: "reports", query: a(f).query })),
|
|
225
|
-
"onClick:action": o[1] || (o[1] = (n) => {
|
|
226
|
-
n === "show_in_pos" && re(), n === "duplicate" && oe(), n === "download" && (Y.value = !0), n === "email" && (z.value = !0), n === "edit" && ee(), n === "schedule_email" && (R.value = !0), n === "content_copy" && te(), n === "export" && $(), n === "report_jobs" && I();
|
|
227
|
-
}),
|
|
228
|
-
class: "remove-line-clamping"
|
|
229
|
-
}, null, 8, ["title", "actions"]),
|
|
230
|
-
T("div", {
|
|
231
|
-
class: q(`flex flex-col overflow-y-auto ${a(s).xs || a(s).sm ? "pb-20" : ""}`),
|
|
232
|
-
style: ce({ height: `calc(100% - ${a(s).lg || a(s).md ? 72 : 64}px)` })
|
|
233
|
-
}, [
|
|
234
|
-
T("div", {
|
|
235
|
-
ref_key: "menuTabRef",
|
|
236
|
-
ref: g,
|
|
237
|
-
class: "sticky top-0 z-10 bg-white"
|
|
238
|
-
}, [
|
|
239
|
-
N(de, {
|
|
240
|
-
"model-value": a(s).lg || a(s).md ? Z.value : []
|
|
241
|
-
}, null, 8, ["model-value"])
|
|
242
|
-
], 512),
|
|
243
|
-
a(t) && ((A = E.value) == null ? void 0 : A.length) > 0 ? (v(), L("div", {
|
|
244
|
-
key: 0,
|
|
245
|
-
class: q(["grid grid-cols-12", a(s).sm || a(s).xs ? "px-3 gap-[16px]" : "px-24 gap-[24px]"])
|
|
246
|
-
}, [
|
|
247
|
-
(v(!0), L(pe, null, me(E.value, (n, B) => (v(), k(ve, {
|
|
248
|
-
key: `widget_${a(c)}_${B}`,
|
|
249
|
-
"model-value": n,
|
|
250
|
-
index: B,
|
|
251
|
-
"sticky-header-offset": X.value
|
|
252
|
-
}, null, 8, ["model-value", "index", "sticky-header-offset"]))), 128))
|
|
253
|
-
], 2)) : (v(), k(Ce, { key: 1 }))
|
|
254
|
-
], 6)
|
|
255
|
-
];
|
|
256
|
-
}),
|
|
257
|
-
_: 1
|
|
258
|
-
});
|
|
259
|
-
};
|
|
260
|
-
}
|
|
261
|
-
}), We = /* @__PURE__ */ Ae(Be, [["__scopeId", "data-v-c7321b3d"]]);
|
|
262
|
-
export {
|
|
263
|
-
We as default
|
|
264
|
-
};
|