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