@feedmepos/mf-report 5.27.35 → 5.27.36-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-4_GHdc0c.js → App-BUjquvOU.js} +39 -39
- package/dist/{DateRangeSelect-Cvxqh6KE.js → DateRangeSelect-CObZob0B.js} +1 -1
- package/dist/{Default.vue_vue_type_script_setup_true_lang-FvTBswXI.js → Default.vue_vue_type_script_setup_true_lang-DCAzWBlF.js} +1 -1
- package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-PhthswCX.js → DynamicWidget.vue_vue_type_script_setup_true_lang-Dyu98iNt.js} +949 -879
- package/dist/{GlobalFilterSelect.vue_vue_type_script_setup_true_lang-CoI3PFYF.js → GlobalFilterSelect.vue_vue_type_script_setup_true_lang-B_T5TTMd.js} +3886 -3841
- package/dist/InsightView-Cg5TDSBe.js +689 -0
- package/dist/{Integration-BmtzVBU8.js → Integration-QlvrG4DE.js} +3 -3
- package/dist/{Integrations-FKTHYjkY.js → Integrations-D3SXXgba.js} +2 -2
- package/dist/{Layout-Dn9c-gMi.js → Layout-C_-iCenV.js} +1 -1
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-H1iroFEV.js → MenuTab.vue_vue_type_script_setup_true_lang-DWmuP9uz.js} +49 -46
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-cPTLcF06.js → NavigationTab.vue_vue_type_script_setup_true_lang-CnayPkbz.js} +3 -3
- package/dist/{OverviewView-DQs-PWBo.js → OverviewView-C4sWum04.js} +4 -4
- package/dist/{Report-gLUTNmHm.js → Report-cEODZK5v.js} +3 -3
- package/dist/ReportEditor-HlaXmRf-.js +2032 -0
- package/dist/ReportView-WEDWHNXn.js +331 -0
- package/dist/{Setting-zldr38s7.js → Setting-g1fhvyXM.js} +11 -11
- package/dist/{Template-nAGq9Il6.js → Template-7Io1C_pv.js} +3 -3
- package/dist/TileEditor-CrTPOVAG.js +4154 -0
- package/dist/TileGrid.vue_vue_type_script_setup_true_lang-C3OypfQ5.js +257 -0
- package/dist/{TransitionFade-Cq7jxuTO.js → TransitionFade-BqySCbDi.js} +4 -4
- package/dist/{app-L5Gs2RN0.js → app-cM3Hvapy.js} +3577 -3371
- package/dist/app.js +1 -1
- package/dist/assets/{formatChartData.worker-GhwszhPe.js → formatChartData.worker-Ci7ZpIYk.js} +6 -6
- package/dist/assets/{processTableData.worker-C4hgpe0l.js → processTableData.worker-C2Ubh_e0.js} +6 -6
- package/dist/style.css +1 -1
- package/dist/{useRestaurantPermission-D9GFgNLW.js → useRestaurantPermission-BLISBUwG.js} +1 -1
- package/package.json +2 -2
- package/dist/InsightView-D8Jpwge7.js +0 -664
- package/dist/ReportEditor-kp63cCQT.js +0 -1831
- package/dist/ReportView-0m23WbFa.js +0 -311
- package/dist/TileEditor-CcwBUuaS.js +0 -4093
- package/dist/TileGrid.vue_vue_type_script_setup_true_lang-707n8i-y.js +0 -154
|
@@ -1,311 +0,0 @@
|
|
|
1
|
-
import { defineComponent as te, ref as ae, computed as p, watch as re, resolveComponent as J, createBlock as N, openBlock as S, withCtx as h, createVNode as f, createElementVNode as x, unref as l, toDisplayString as se, normalizeStyle as le, normalizeClass as B, createElementBlock as ne } from "vue";
|
|
2
|
-
import { _ as ie } from "./MenuTab.vue_vue_type_script_setup_true_lang-H1iroFEV.js";
|
|
3
|
-
import { _ as ce } from "./TileGrid.vue_vue_type_script_setup_true_lang-707n8i-y.js";
|
|
4
|
-
import { u as pe, l as ue, s as me } from "./GlobalFilterSelect.vue_vue_type_script_setup_true_lang-CoI3PFYF.js";
|
|
5
|
-
import { useRouter as de, useRoute as ve } from "vue-router";
|
|
6
|
-
import { _ as fe } from "./Default.vue_vue_type_script_setup_true_lang-FvTBswXI.js";
|
|
7
|
-
import { storeToRefs as y } from "pinia";
|
|
8
|
-
import { b as ye, c as ge, u as be, g as _e } from "./NavigationTab.vue_vue_type_script_setup_true_lang-cPTLcF06.js";
|
|
9
|
-
import { _ as we } from "./SelectComponent.vue_vue_type_script_setup_true_lang-CGbb3b5G.js";
|
|
10
|
-
import { useSnackbar as Se, useBreakpoints as he } from "@feedmepos/ui-library";
|
|
11
|
-
import { u as xe, a as Ce, _ as ke } from "./_plugin-vue_export-helper-onplcgja.js";
|
|
12
|
-
import { u as Te } from "./message-dialog-UoMWOnil.js";
|
|
13
|
-
import { e as Re, h as Pe } from "./app-L5Gs2RN0.js";
|
|
14
|
-
import { r as De } from "./i18n-CI_sQ5d_.js";
|
|
15
|
-
const Ie = { class: "fm-typo-en-title-md-600 block min-w-0 max-w-full overflow-hidden text-ellipsis whitespace-nowrap" }, Oe = { class: "sticky top-0 z-10 bg-white" }, $e = /* @__PURE__ */ te({
|
|
16
|
-
__name: "ReportView",
|
|
17
|
-
setup(Ae) {
|
|
18
|
-
const { t: e, te: q } = xe(), g = de(), d = ve(), s = Se(), { promptMessage: C } = Te(), u = pe(), k = ye(), { promptLoader: v } = Ce(), { breakpoints: i } = he(), { isOpenAccountingDialog: j } = y(ge()), { isOpenScheduleDialog: T } = y(be()), { disabled: R } = y(Re()), P = ae(null), D = p(
|
|
19
|
-
() => {
|
|
20
|
-
var a;
|
|
21
|
-
return ((a = P.value) == null ? void 0 : a.reportId) === c.value;
|
|
22
|
-
}
|
|
23
|
-
), F = p(() => {
|
|
24
|
-
var a;
|
|
25
|
-
return !!((a = o.value) != null && a.isSupportPos);
|
|
26
|
-
}), {
|
|
27
|
-
currentReport: o,
|
|
28
|
-
overviewReport: V,
|
|
29
|
-
currentReportId: c,
|
|
30
|
-
isOpenDownloadDialog: z,
|
|
31
|
-
isOpenEmailDialog: L,
|
|
32
|
-
editingReport: U,
|
|
33
|
-
canCreateCustomReport: H,
|
|
34
|
-
customReportQuota: I
|
|
35
|
-
} = y(u), { canUpdate: M, canDuplicate: W, isAdmin: Y } = Pe(), b = p(
|
|
36
|
-
() => Y.value && !!o.value && !o.value.isDefault
|
|
37
|
-
);
|
|
38
|
-
re(
|
|
39
|
-
() => c.value,
|
|
40
|
-
async () => P.value = await _e(c.value),
|
|
41
|
-
{ immediate: !0 }
|
|
42
|
-
);
|
|
43
|
-
const G = p(() => {
|
|
44
|
-
var r;
|
|
45
|
-
const a = c.value === ((r = V.value) == null ? void 0 : r.id), t = [
|
|
46
|
-
{
|
|
47
|
-
icon: "mail",
|
|
48
|
-
label: e("report.common.emailSchedule"),
|
|
49
|
-
onClick: () => {
|
|
50
|
-
T.value = !0;
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
icon: "article",
|
|
55
|
-
label: e(a ? "report.common.unsetAsOverview" : "report.common.setAsOverview"),
|
|
56
|
-
onClick: async () => {
|
|
57
|
-
await v(async () => {
|
|
58
|
-
if (o.value)
|
|
59
|
-
try {
|
|
60
|
-
await u.updateDefaultReport(a ? null : o.value.id), s.open({
|
|
61
|
-
message: `Successfully ${a ? "unset" : "set"} ${o.value.name} as Overview`,
|
|
62
|
-
type: "success"
|
|
63
|
-
});
|
|
64
|
-
} catch (m) {
|
|
65
|
-
s.open({ message: JSON.stringify(m), type: "error" });
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
icon: "content_copy",
|
|
72
|
-
label: e("report.common.copyID"),
|
|
73
|
-
onClick: () => {
|
|
74
|
-
o.value && (navigator.clipboard.writeText(c.value), s.open({ message: e("report.messages.copiedReportIdToClipboard"), type: "success" }));
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
icon: "report_jobs",
|
|
79
|
-
label: e("report.common.reportStatus"),
|
|
80
|
-
onClick: () => {
|
|
81
|
-
O();
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
];
|
|
85
|
-
return !R.value && D.value && t.splice(1, 0, {
|
|
86
|
-
icon: "download",
|
|
87
|
-
label: e("report.common.accountingExport"),
|
|
88
|
-
onClick: A
|
|
89
|
-
}), b.value && t.splice(t.length - 1, 0, {
|
|
90
|
-
icon: "library_add",
|
|
91
|
-
label: e("report.common.copyToTemplate"),
|
|
92
|
-
onClick: () => {
|
|
93
|
-
$();
|
|
94
|
-
}
|
|
95
|
-
}), t;
|
|
96
|
-
});
|
|
97
|
-
async function O() {
|
|
98
|
-
k.isOpenJobDialog = !0, await k.getJobs();
|
|
99
|
-
}
|
|
100
|
-
function Q() {
|
|
101
|
-
if (!o.value || !M(o.value)) {
|
|
102
|
-
s.open({
|
|
103
|
-
message: e("report.messages.noPermissionUpdateReport"),
|
|
104
|
-
type: "error"
|
|
105
|
-
});
|
|
106
|
-
return;
|
|
107
|
-
}
|
|
108
|
-
U.value = JSON.parse(JSON.stringify(o.value)), g.push({
|
|
109
|
-
name: "reportEditor",
|
|
110
|
-
query: d.query
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
async function K() {
|
|
114
|
-
if (!o.value || !W(o.value)) {
|
|
115
|
-
s.open({
|
|
116
|
-
message: e("report.messages.noPermissionDuplicateReport"),
|
|
117
|
-
type: "error"
|
|
118
|
-
});
|
|
119
|
-
return;
|
|
120
|
-
}
|
|
121
|
-
if (!H.value) {
|
|
122
|
-
let t = `Your current plan only support up to ${I.value} custom reports.`;
|
|
123
|
-
I.value === 0 && (t = "Your current plan does not support custom report."), s.open({
|
|
124
|
-
message: t,
|
|
125
|
-
type: "error"
|
|
126
|
-
});
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
if (!o.value) {
|
|
130
|
-
s.open({ message: "No Widget", type: "error" });
|
|
131
|
-
return;
|
|
132
|
-
}
|
|
133
|
-
if (await C({
|
|
134
|
-
title: `${e("report.messages.duplicateReport")}`,
|
|
135
|
-
message: e("report.messages.confirmAction", {
|
|
136
|
-
action: e("report.common.duplicate"),
|
|
137
|
-
name: o.value.name
|
|
138
|
-
})
|
|
139
|
-
}) && o.value) {
|
|
140
|
-
const t = JSON.parse(JSON.stringify(o.value));
|
|
141
|
-
t.editable = !0, t.id = "", t.name = `${t.name} duplicate`, t.isDefault = !1;
|
|
142
|
-
try {
|
|
143
|
-
await v(async () => {
|
|
144
|
-
const r = await u.createOrUpdateReport(t);
|
|
145
|
-
u.updateCurrentReportId(r.id), g.push({
|
|
146
|
-
name: "reportView",
|
|
147
|
-
params: d.params,
|
|
148
|
-
query: d.query
|
|
149
|
-
});
|
|
150
|
-
});
|
|
151
|
-
} catch (r) {
|
|
152
|
-
console.log(r), s.open({ message: "Failed to clone report", type: "error" });
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
async function $() {
|
|
157
|
-
var t;
|
|
158
|
-
if (!b.value) {
|
|
159
|
-
s.open({
|
|
160
|
-
message: e("report.messages.noPermission"),
|
|
161
|
-
type: "error"
|
|
162
|
-
});
|
|
163
|
-
return;
|
|
164
|
-
}
|
|
165
|
-
if (!o.value) {
|
|
166
|
-
s.open({ message: "No Widget", type: "error" });
|
|
167
|
-
return;
|
|
168
|
-
}
|
|
169
|
-
if (await C({
|
|
170
|
-
title: `${e("report.common.copyToTemplate")}`,
|
|
171
|
-
message: e("report.messages.confirmAction", {
|
|
172
|
-
action: e("report.common.copyToTemplate"),
|
|
173
|
-
name: (t = o == null ? void 0 : o.value) == null ? void 0 : t.name
|
|
174
|
-
})
|
|
175
|
-
}))
|
|
176
|
-
try {
|
|
177
|
-
await v(async () => {
|
|
178
|
-
var r;
|
|
179
|
-
await u.createReportTemplate(o.value), s.open({
|
|
180
|
-
message: e("report.messages.copyTemplateSuccess", { name: (r = o.value) == null ? void 0 : r.name }),
|
|
181
|
-
type: "success"
|
|
182
|
-
});
|
|
183
|
-
});
|
|
184
|
-
} catch (r) {
|
|
185
|
-
console.log(r), s.open({
|
|
186
|
-
message: e("report.messages.failedToAction", { action: e("report.common.copyToTemplate") }),
|
|
187
|
-
type: "error"
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
function A() {
|
|
192
|
-
j.value = !0;
|
|
193
|
-
}
|
|
194
|
-
function X() {
|
|
195
|
-
o.value && (navigator.clipboard.writeText(c.value), s.open({ message: "Copied report ID to clipboard", type: "success" }));
|
|
196
|
-
}
|
|
197
|
-
async function Z() {
|
|
198
|
-
if (o.value)
|
|
199
|
-
try {
|
|
200
|
-
await v(async () => {
|
|
201
|
-
await me(c.value, !F.value), await u.getReports();
|
|
202
|
-
});
|
|
203
|
-
} catch (a) {
|
|
204
|
-
console.log(a), s.open({
|
|
205
|
-
message: e("report.messages.failedToAction", { action: e("report.common.update") }),
|
|
206
|
-
type: "error"
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
const _ = p(() => o.value ? o.value.tiles : []), ee = p(() => ue(_.value)), oe = p(() => {
|
|
211
|
-
var r;
|
|
212
|
-
let t = [
|
|
213
|
-
// TODO: In future once decided to support report showing configuration for POS,
|
|
214
|
-
// uncomment this:
|
|
215
|
-
// {
|
|
216
|
-
// label: t("report.common.showInPOS"),
|
|
217
|
-
// value: "show_in_pos",
|
|
218
|
-
// isPrimary: false,
|
|
219
|
-
// appendIcon: isCurrentReportShownInPOS.value
|
|
220
|
-
// ? "radio_button_checked"
|
|
221
|
-
// : "radio_button_unchecked"
|
|
222
|
-
// },
|
|
223
|
-
!!((r = o.value) != null && r.editable) ? { label: e("report.common.edit"), value: "edit", isPrimary: !1 } : {
|
|
224
|
-
label: e("report.common.duplicate"),
|
|
225
|
-
value: "duplicate",
|
|
226
|
-
isPrimary: !1
|
|
227
|
-
},
|
|
228
|
-
{
|
|
229
|
-
label: e("report.common.download"),
|
|
230
|
-
value: "download",
|
|
231
|
-
isPrimary: !0,
|
|
232
|
-
prependIcon: "download"
|
|
233
|
-
},
|
|
234
|
-
{ label: e("report.schedule.sendEmail"), value: "email", isPrimary: !0 }
|
|
235
|
-
];
|
|
236
|
-
return i.value.xs && (t = [
|
|
237
|
-
...t,
|
|
238
|
-
{ label: e("report.schedule.sendEmail"), value: "email", isPrimary: !1 },
|
|
239
|
-
{ label: e("report.common.reportStatus"), value: "report_jobs", isPrimary: !1 },
|
|
240
|
-
{ label: e("report.common.emailSchedule"), value: "schedule_email", isPrimary: !1 },
|
|
241
|
-
{ label: e("report.common.copyID"), value: "content_copy", isPrimary: !1 }
|
|
242
|
-
], b.value && t.push({
|
|
243
|
-
label: e("report.common.copyToTemplate"),
|
|
244
|
-
value: "copy_to_template",
|
|
245
|
-
isPrimary: !1
|
|
246
|
-
}), !R.value && D.value && t.push({ label: e("report.common.accountingExport"), value: "export", isPrimary: !1 }), t = t.filter((m) => m.value !== "edit")), t;
|
|
247
|
-
}), w = p(() => {
|
|
248
|
-
var a;
|
|
249
|
-
return De(e, q, (a = o == null ? void 0 : o.value) == null ? void 0 : a.name, "other");
|
|
250
|
-
});
|
|
251
|
-
return (a, t) => {
|
|
252
|
-
const r = J("FmTooltip"), m = J("FmPageHead");
|
|
253
|
-
return S(), N(fe, null, {
|
|
254
|
-
default: h(() => {
|
|
255
|
-
var E;
|
|
256
|
-
return [
|
|
257
|
-
f(m, {
|
|
258
|
-
title: w.value,
|
|
259
|
-
"back-button": !0,
|
|
260
|
-
actions: oe.value,
|
|
261
|
-
class: "remove-line-clamping",
|
|
262
|
-
"onClick:back": t[0] || (t[0] = (n) => l(g).push({ name: "reports", query: l(d).query })),
|
|
263
|
-
"onClick:action": t[1] || (t[1] = (n) => {
|
|
264
|
-
n === "show_in_pos" && Z(), n === "duplicate" && K(), n === "download" && (z.value = !0), n === "email" && (L.value = !0), n === "edit" && Q(), n === "schedule_email" && (T.value = !0), n === "content_copy" && X(), n === "copy_to_template" && $(), n === "export" && A(), n === "report_jobs" && O();
|
|
265
|
-
})
|
|
266
|
-
}, {
|
|
267
|
-
title: h(() => [
|
|
268
|
-
f(r, {
|
|
269
|
-
content: w.value,
|
|
270
|
-
placement: "bottom",
|
|
271
|
-
"z-index": 2e3,
|
|
272
|
-
class: "flex min-w-0 max-w-full justify-start"
|
|
273
|
-
}, {
|
|
274
|
-
default: h(() => [
|
|
275
|
-
x("p", Ie, se(w.value), 1)
|
|
276
|
-
]),
|
|
277
|
-
_: 1
|
|
278
|
-
}, 8, ["content"])
|
|
279
|
-
]),
|
|
280
|
-
_: 1
|
|
281
|
-
}, 8, ["title", "actions"]),
|
|
282
|
-
x("div", {
|
|
283
|
-
class: B(`flex flex-col overflow-y-auto ${l(i).xs || l(i).sm ? "pb-20" : ""}`),
|
|
284
|
-
style: le({ height: `calc(100% - ${l(i).lg || l(i).md ? 72 : 64}px)` })
|
|
285
|
-
}, [
|
|
286
|
-
x("div", Oe, [
|
|
287
|
-
f(ie, {
|
|
288
|
-
"model-value": l(i).lg || l(i).md ? G.value : []
|
|
289
|
-
}, null, 8, ["model-value"])
|
|
290
|
-
]),
|
|
291
|
-
l(o) && ((E = _.value) == null ? void 0 : E.length) > 0 ? (S(), ne("div", {
|
|
292
|
-
key: 0,
|
|
293
|
-
class: B(["grid grid-cols-12", l(i).sm || l(i).xs ? "px-3 gap-[16px]" : "px-24 gap-[24px]"])
|
|
294
|
-
}, [
|
|
295
|
-
f(ce, {
|
|
296
|
-
tiles: _.value,
|
|
297
|
-
"report-id": l(c),
|
|
298
|
-
"leaf-index-by-id": ee.value
|
|
299
|
-
}, null, 8, ["tiles", "report-id", "leaf-index-by-id"])
|
|
300
|
-
], 2)) : (S(), N(we, { key: 1 }))
|
|
301
|
-
], 6)
|
|
302
|
-
];
|
|
303
|
-
}),
|
|
304
|
-
_: 1
|
|
305
|
-
});
|
|
306
|
-
};
|
|
307
|
-
}
|
|
308
|
-
}), Ye = /* @__PURE__ */ ke($e, [["__scopeId", "data-v-a22ca746"]]);
|
|
309
|
-
export {
|
|
310
|
-
Ye as default
|
|
311
|
-
};
|