@feedmepos/mf-report 5.25.7 → 5.25.8
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-DVBc1rc0.js +302 -0
- package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-r5JrwnWY.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-BRmKJJvc.js} +1 -1
- package/dist/{Default.vue_vue_type_script_setup_true_lang-D9MR-Tyr.js → Default.vue_vue_type_script_setup_true_lang-BUtavZIl.js} +1 -1
- package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-D3zN3tqo.js → DynamicWidget.vue_vue_type_script_setup_true_lang-OIREDq6T.js} +1549 -1563
- package/dist/{GlobalFilterSelect.vue_vue_type_script_setup_true_lang-Ds2Rd7nK.js → GlobalFilterSelect.vue_vue_type_script_setup_true_lang-ZAOWE1vp.js} +3263 -3161
- package/dist/{InsightView-CLkhmik2.js → InsightView-DctjGEzr.js} +5 -5
- package/dist/{Integration-BLjTOunk.js → Integration-CRd2_O5E.js} +3 -3
- package/dist/{Integrations-C_htzgLO.js → Integrations-CpMUHiCw.js} +3 -3
- package/dist/{Layout-B9AfrRso.js → Layout-DSXNbHHe.js} +1 -1
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-1G6ZNWRO.js → MenuTab.vue_vue_type_script_setup_true_lang-YjXH8vPq.js} +4 -4
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-CBYyjcaw.js → NavigationTab.vue_vue_type_script_setup_true_lang-Ck7HaJRh.js} +4 -4
- package/dist/{OverviewView-CGen9md5.js → OverviewView-CLICdzyH.js} +5 -5
- package/dist/{Report-CujIJ861.js → Report-BvGQUoQF.js} +4 -4
- package/dist/{ReportEditor-cI0knIcX.js → ReportEditor-CIV7Sd_d.js} +4 -4
- package/dist/ReportView-ClTsRfJG.js +309 -0
- package/dist/{SelectComponent.vue_vue_type_script_setup_true_lang-Af_Z54a4.js → SelectComponent.vue_vue_type_script_setup_true_lang-BL1jpiXN.js} +2 -2
- package/dist/{Setting-C_mFfeHY.js → Setting-BYtSIDjs.js} +4 -4
- package/dist/Template-BVGvD8vx.js +482 -0
- package/dist/{TileEditor-Ra6Pw4Hb.js → TileEditor-n1lS7iNk.js} +274 -282
- package/dist/{TransitionFade-BjG4BHLj.js → TransitionFade-Dfm-zjeX.js} +5 -5
- package/dist/{app-CYlbtwt9.js → app-DMXIz8ol.js} +2693 -2360
- package/dist/app.js +1 -1
- package/dist/assets/{formatChartData.worker-BzuADGYi.js → formatChartData.worker-BlVUDagT.js} +15 -11
- package/dist/assets/{processTableData.worker-DTnbVu-a.js → processTableData.worker-CQMw9rvu.js} +15 -11
- package/dist/style.css +1 -1
- package/dist/{useRestaurantPermission-BoIwOw0q.js → useRestaurantPermission-DV3xL5r9.js} +1 -1
- package/package.json +1 -1
- package/dist/App-BMj1o_t6.js +0 -298
- package/dist/ReportView-BNCAume3.js +0 -264
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as o, resolveComponent as t, createBlock as r, openBlock as n, withCtx as _, createVNode as c } from "vue";
|
|
2
|
-
import { _ as a } from "./Default.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { _ as a } from "./Default.vue_vue_type_script_setup_true_lang-BUtavZIl.js";
|
|
3
3
|
const f = /* @__PURE__ */ o({
|
|
4
4
|
__name: "Layout",
|
|
5
5
|
setup(m) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as R, computed as V, createElementBlock as x, openBlock as a, createElementVNode as y, createVNode as p, unref as e, isRef as i, withCtx as _, createBlock as g, createCommentVNode as k, useModel as $, resolveComponent as f, normalizeClass as C, Fragment as w, renderList as M, toDisplayString as T } from "vue";
|
|
2
|
-
import { a as B } from "./app-
|
|
2
|
+
import { a as B } from "./app-DMXIz8ol.js";
|
|
3
3
|
import { storeToRefs as D } from "pinia";
|
|
4
|
-
import { a as I } from "./NavigationTab.vue_vue_type_script_setup_true_lang-
|
|
5
|
-
import { _ as U } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-
|
|
6
|
-
import { _ as N, b as S } from "./GlobalFilterSelect.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { a as I } from "./NavigationTab.vue_vue_type_script_setup_true_lang-Ck7HaJRh.js";
|
|
5
|
+
import { _ as U } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-BRmKJJvc.js";
|
|
6
|
+
import { _ as N, b as S } from "./GlobalFilterSelect.vue_vue_type_script_setup_true_lang-ZAOWE1vp.js";
|
|
7
7
|
import { useRoute as z } from "vue-router";
|
|
8
8
|
import { useBreakpoints as E } from "@feedmepos/ui-library";
|
|
9
9
|
const L = { class: "flex flex-col gap-2 overflow-x-auto overflow-y-hidden scrollbar-hide" }, O = { class: "flex flex-col gap-2 py-2" }, q = /* @__PURE__ */ R({
|
|
@@ -4,12 +4,12 @@ var Dl = (e, r, t) => I5(e, typeof r != "symbol" ? r + "" : r, t);
|
|
|
4
4
|
import { defineComponent as tr, computed as Ge, useModel as Sn, ref as Fe, watch as Nr, resolveComponent as me, createBlock as Ke, unref as V, openBlock as re, withCtx as je, createElementVNode as Q, createVNode as _, toDisplayString as Ne, withDirectives as Ii, createElementBlock as Pe, Fragment as gt, renderList as Xt, vShow as Gs, createTextVNode as _r, mergeModels as fi, createCommentVNode as at, normalizeClass as ci, onMounted as o0, withKeys as zh, withModifiers as ii, isRef as wa, vModelText as Xh, normalizeStyle as ac, renderSlot as Hh, mergeProps as F5, nextTick as V5, resolveDynamicComponent as Hu, createSlots as L5 } from "vue";
|
|
5
5
|
import { useRouter as qh, useRoute as Wh } from "vue-router";
|
|
6
6
|
import { storeToRefs as Lr, defineStore as f0 } from "pinia";
|
|
7
|
-
import { u as ol, p as kd, r as N5, l as ai, R as Wa, n as Qs, w as Gl, _ as c0, e as M5, v as R5, d as B5, x as z5, b as jh, m as X5, y as H5, z as wn, A as q5 } from "./GlobalFilterSelect.vue_vue_type_script_setup_true_lang-
|
|
7
|
+
import { u as ol, p as kd, r as N5, l as ai, R as Wa, n as Qs, w as Gl, _ as c0, e as M5, v as R5, d as B5, x as z5, b as jh, m as X5, y as H5, z as wn, A as q5 } from "./GlobalFilterSelect.vue_vue_type_script_setup_true_lang-ZAOWE1vp.js";
|
|
8
8
|
import { useBreakpoints as ko, components as Fi, useSnackbar as Xi, useDialog as W5, useDialogChild as j5, FmButtonVariant as xd } from "@feedmepos/ui-library";
|
|
9
9
|
import { u as ha } from "./vue-i18n-DVWuTfed.js";
|
|
10
|
-
import {
|
|
11
|
-
import { C as hr, g as U5, b as ti, e as Zh, f as Z5, _ as Yh, p as Y5 } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-
|
|
12
|
-
import { u as Za, F as Ya, r as fl, a as Hi, d as Ot, q as xo, h as Gh, j as G5, k as Q5, e as K5, l as Il, m as Qh, c as J5, n as _5 } from "./app-
|
|
10
|
+
import { a as Td, b as Uh } from "./SelectComponent.vue_vue_type_script_setup_true_lang-BL1jpiXN.js";
|
|
11
|
+
import { C as hr, g as U5, b as ti, e as Zh, f as Z5, _ as Yh, p as Y5 } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-BRmKJJvc.js";
|
|
12
|
+
import { u as Za, F as Ya, r as fl, a as Hi, d as Ot, q as xo, h as Gh, j as G5, k as Q5, e as K5, l as Il, m as Qh, c as J5, n as _5 } from "./app-DMXIz8ol.js";
|
|
13
13
|
import { detectLocale as $5, useCoreStore as e8 } from "@feedmepos/mf-common";
|
|
14
14
|
const t8 = { class: "flex flex-col" }, r8 = { class: "fm-typo-en-title-sm-600" }, a8 = { class: "grow" }, n8 = { class: "flex flex-col gap-8" }, i8 = { class: "flex flex-col w-full" }, s8 = { class: "flex flex-col gap-5 p-6" }, l8 = { class: "flex" }, Cd = {
|
|
15
15
|
// sales: [
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { defineComponent as w, computed as c, resolveComponent as $, createBlock as l, openBlock as r, withCtx as y, createVNode as u, createElementVNode as h, unref as e, normalizeStyle as C, normalizeClass as d, createElementBlock as _, Fragment as b, renderList as B } from "vue";
|
|
2
|
-
import { _ as F } from "./DynamicWidget.vue_vue_type_script_setup_true_lang-
|
|
3
|
-
import { _ as L } from "./Default.vue_vue_type_script_setup_true_lang-
|
|
4
|
-
import { u as P } from "./GlobalFilterSelect.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { _ as F } from "./DynamicWidget.vue_vue_type_script_setup_true_lang-OIREDq6T.js";
|
|
3
|
+
import { _ as L } from "./Default.vue_vue_type_script_setup_true_lang-BUtavZIl.js";
|
|
4
|
+
import { u as P } from "./GlobalFilterSelect.vue_vue_type_script_setup_true_lang-ZAOWE1vp.js";
|
|
5
5
|
import { storeToRefs as R } from "pinia";
|
|
6
|
-
import { _ as S } from "./SelectComponent.vue_vue_type_script_setup_true_lang-
|
|
6
|
+
import { _ as S } from "./SelectComponent.vue_vue_type_script_setup_true_lang-BL1jpiXN.js";
|
|
7
7
|
import { useBreakpoints as V } from "@feedmepos/ui-library";
|
|
8
|
-
import { _ as z } from "./MenuTab.vue_vue_type_script_setup_true_lang-
|
|
8
|
+
import { _ as z } from "./MenuTab.vue_vue_type_script_setup_true_lang-YjXH8vPq.js";
|
|
9
9
|
import { useI18n as D } from "@feedmepos/mf-common";
|
|
10
10
|
import { r as E } from "./i18n-CI_sQ5d_.js";
|
|
11
11
|
const M = /* @__PURE__ */ w({
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineComponent as $e, ref as j, watch as pe, computed as b, h as p, withModifiers as De, resolveComponent as S, createBlock as G, openBlock as A, withCtx as m, createVNode as c, createElementVNode as w, unref as e, normalizeStyle as Ie, normalizeClass as k, withDirectives as H, createElementBlock as Fe, Fragment as Oe, renderList as Le, toDisplayString as J, createTextVNode as Pe, vShow as Q } from "vue";
|
|
2
2
|
import { storeToRefs as de } from "pinia";
|
|
3
|
-
import { u as Ne } from "./GlobalFilterSelect.vue_vue_type_script_setup_true_lang-
|
|
4
|
-
import { _ as Ve } from "./Default.vue_vue_type_script_setup_true_lang-
|
|
3
|
+
import { u as Ne } from "./GlobalFilterSelect.vue_vue_type_script_setup_true_lang-ZAOWE1vp.js";
|
|
4
|
+
import { _ as Ve } from "./Default.vue_vue_type_script_setup_true_lang-BUtavZIl.js";
|
|
5
5
|
import { u as Ae } from "./message-dialog-UoMWOnil.js";
|
|
6
6
|
import { a as Je } from "./vue-i18n-DVWuTfed.js";
|
|
7
7
|
import { useSnackbar as ze, useBreakpoints as Be, components as Te, FmButtonColorThemeVariant as Ue } from "@feedmepos/ui-library";
|
|
8
|
-
import { _ as Ee } from "./SelectComponent.vue_vue_type_script_setup_true_lang-
|
|
9
|
-
import { c as Ke, a as fe, g as Me } from "./app-
|
|
8
|
+
import { _ as Ee } from "./SelectComponent.vue_vue_type_script_setup_true_lang-BL1jpiXN.js";
|
|
9
|
+
import { c as Ke, a as fe, g as Me } from "./app-DMXIz8ol.js";
|
|
10
10
|
import { useRouter as Ye, useRoute as qe, onBeforeRouteLeave as je } from "vue-router";
|
|
11
11
|
import { useI18n as Ge } from "@feedmepos/mf-common";
|
|
12
12
|
import { r as W } from "./i18n-CI_sQ5d_.js";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { defineComponent as ye, mergeModels as ge, useModel as be, ref as I, computed as S, resolveComponent as _, createBlock as T, openBlock as s, withCtx as p, createElementVNode as h, createVNode as a, unref as o, normalizeClass as ke, createTextVNode as Le, toDisplayString as Y, createElementBlock as C, Fragment as ee, renderSlot as Ye, createCommentVNode as A, watch as fe, renderList as ce, resolveDynamicComponent as sl, isRef as Ze, normalizeStyle as He, onMounted as ul } from "vue";
|
|
2
|
-
import { W as dl, g as ml, _ as cl, a as pl, i as vl, S as Ae, d as Ge, T as fl, b as gl } from "./TransitionFade-
|
|
3
|
-
import { C as ve, D as X, c as Ve, g as bl, u as el, a as yl, d as Ke, v as Oe, b as Qe } from "./GlobalFilterSelect.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { W as dl, g as ml, _ as cl, a as pl, i as vl, S as Ae, d as Ge, T as fl, b as gl } from "./TransitionFade-Dfm-zjeX.js";
|
|
3
|
+
import { C as ve, D as X, c as Ve, g as bl, u as el, a as yl, d as Ke, v as Oe, b as Qe } from "./GlobalFilterSelect.vue_vue_type_script_setup_true_lang-ZAOWE1vp.js";
|
|
4
4
|
import { storeToRefs as Re } from "pinia";
|
|
5
5
|
import { useRouter as ll, useRoute as tl } from "vue-router";
|
|
6
6
|
import { useBreakpoints as Ie, useSnackbar as ol, FmButtonColorThemeVariant as xe } from "@feedmepos/ui-library";
|
|
7
7
|
import { u as al } from "./message-dialog-UoMWOnil.js";
|
|
8
8
|
import { u as Ne, a as hl } from "./vue-i18n-DVWuTfed.js";
|
|
9
9
|
import { r as $e } from "./i18n-CI_sQ5d_.js";
|
|
10
|
-
import { _ as Ee } from "./DynamicWidget.vue_vue_type_script_setup_true_lang-
|
|
11
|
-
import {
|
|
10
|
+
import { _ as Ee } from "./DynamicWidget.vue_vue_type_script_setup_true_lang-OIREDq6T.js";
|
|
11
|
+
import { a as Pe, _ as Je } from "./SelectComponent.vue_vue_type_script_setup_true_lang-BL1jpiXN.js";
|
|
12
12
|
import { useCoreStore as _l } from "@feedmepos/mf-common";
|
|
13
13
|
const wl = /* @__PURE__ */ ye({
|
|
14
14
|
__name: "WidgetDialog",
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
import { defineComponent as te, ref as ae, computed as u, watch as re, resolveComponent as B, createBlock as w, openBlock as d, withCtx as S, createVNode as h, createElementVNode as k, unref as l, toDisplayString as se, normalizeStyle as ne, normalizeClass as q, createElementBlock as F, Fragment as le, renderList as ie } from "vue";
|
|
2
|
+
import { _ as ce } from "./MenuTab.vue_vue_type_script_setup_true_lang-YjXH8vPq.js";
|
|
3
|
+
import { _ as pe } from "./DynamicWidget.vue_vue_type_script_setup_true_lang-OIREDq6T.js";
|
|
4
|
+
import { useRouter as ue, useRoute as me } from "vue-router";
|
|
5
|
+
import { _ as de } from "./Default.vue_vue_type_script_setup_true_lang-BUtavZIl.js";
|
|
6
|
+
import { u as ve, s as fe } from "./GlobalFilterSelect.vue_vue_type_script_setup_true_lang-ZAOWE1vp.js";
|
|
7
|
+
import { storeToRefs as g } from "pinia";
|
|
8
|
+
import { b as ge, c as ye, u as be, g as _e } from "./NavigationTab.vue_vue_type_script_setup_true_lang-Ck7HaJRh.js";
|
|
9
|
+
import { _ as we, b as Se } from "./SelectComponent.vue_vue_type_script_setup_true_lang-BL1jpiXN.js";
|
|
10
|
+
import { useSnackbar as he, useBreakpoints as ke } from "@feedmepos/ui-library";
|
|
11
|
+
import { u as Ce, a as xe } from "./vue-i18n-DVWuTfed.js";
|
|
12
|
+
import { u as Te } from "./message-dialog-UoMWOnil.js";
|
|
13
|
+
import { e as Re, g as Pe } from "./app-DMXIz8ol.js";
|
|
14
|
+
import { r as De } from "./i18n-CI_sQ5d_.js";
|
|
15
|
+
const Oe = { class: "fm-typo-en-title-md-600 block min-w-0 max-w-full overflow-hidden text-ellipsis whitespace-nowrap" }, $e = { class: "sticky top-0 z-10 bg-white" }, Ie = /* @__PURE__ */ te({
|
|
16
|
+
__name: "ReportView",
|
|
17
|
+
setup(Ae) {
|
|
18
|
+
const { t: e, te: j } = Ce(), y = ue(), v = me(), s = he(), { promptMessage: C } = Te(), p = ve(), x = ge(), { promptLoader: f } = xe(), { breakpoints: i } = ke(), { isOpenAccountingDialog: L } = g(ye()), { isOpenScheduleDialog: T } = g(be()), { disabled: R } = g(Re()), P = ae(null), D = u(
|
|
19
|
+
() => {
|
|
20
|
+
var a;
|
|
21
|
+
return ((a = P.value) == null ? void 0 : a.reportId) === c.value;
|
|
22
|
+
}
|
|
23
|
+
), V = u(() => {
|
|
24
|
+
var a;
|
|
25
|
+
return !!((a = t.value) != null && a.isSupportPos);
|
|
26
|
+
}), {
|
|
27
|
+
currentReport: t,
|
|
28
|
+
overviewReport: z,
|
|
29
|
+
currentReportId: c,
|
|
30
|
+
isOpenDownloadDialog: U,
|
|
31
|
+
isOpenEmailDialog: H,
|
|
32
|
+
editingReport: M,
|
|
33
|
+
canCreateCustomReport: W,
|
|
34
|
+
customReportQuota: O
|
|
35
|
+
} = g(p), { canUpdate: Y, canDuplicate: G, isAdmin: b } = Pe();
|
|
36
|
+
re(
|
|
37
|
+
() => c.value,
|
|
38
|
+
async () => P.value = await _e(c.value),
|
|
39
|
+
{ immediate: !0 }
|
|
40
|
+
);
|
|
41
|
+
const Q = u(() => {
|
|
42
|
+
var r;
|
|
43
|
+
const a = c.value === ((r = z.value) == null ? void 0 : r.id), o = [
|
|
44
|
+
{
|
|
45
|
+
icon: "mail",
|
|
46
|
+
label: e("report.common.emailSchedule"),
|
|
47
|
+
onClick: () => {
|
|
48
|
+
T.value = !0;
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
icon: "article",
|
|
53
|
+
label: e(a ? "report.common.unsetAsOverview" : "report.common.setAsOverview"),
|
|
54
|
+
onClick: async () => {
|
|
55
|
+
await f(async () => {
|
|
56
|
+
if (t.value)
|
|
57
|
+
try {
|
|
58
|
+
await p.updateDefaultReport(a ? null : t.value.id), s.open({
|
|
59
|
+
message: `Successfully ${a ? "unset" : "set"} ${t.value.name} as Overview`,
|
|
60
|
+
type: "success"
|
|
61
|
+
});
|
|
62
|
+
} catch (m) {
|
|
63
|
+
s.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(c.value), s.open({ message: e("report.messages.copiedReportIdToClipboard"), type: "success" }));
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
icon: "report_jobs",
|
|
77
|
+
label: e("report.common.reportStatus"),
|
|
78
|
+
onClick: () => {
|
|
79
|
+
$();
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
];
|
|
83
|
+
return !R.value && D.value && o.splice(1, 0, {
|
|
84
|
+
icon: "download",
|
|
85
|
+
label: e("report.common.accountingExport"),
|
|
86
|
+
onClick: A
|
|
87
|
+
}), b.value && o.splice(o.length - 1, 0, {
|
|
88
|
+
icon: "library_add",
|
|
89
|
+
label: e("report.common.copyToTemplate"),
|
|
90
|
+
onClick: () => {
|
|
91
|
+
I();
|
|
92
|
+
}
|
|
93
|
+
}), o;
|
|
94
|
+
});
|
|
95
|
+
async function $() {
|
|
96
|
+
x.isOpenJobDialog = !0, await x.getJobs();
|
|
97
|
+
}
|
|
98
|
+
function K() {
|
|
99
|
+
if (!t.value || !Y(t.value)) {
|
|
100
|
+
s.open({
|
|
101
|
+
message: e("report.messages.noPermissionUpdateReport"),
|
|
102
|
+
type: "error"
|
|
103
|
+
});
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
M.value = JSON.parse(JSON.stringify(t.value)), y.push({
|
|
107
|
+
name: "reportEditor",
|
|
108
|
+
query: v.query
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
async function X() {
|
|
112
|
+
if (!t.value || !G(t.value)) {
|
|
113
|
+
s.open({
|
|
114
|
+
message: e("report.messages.noPermissionDuplicateReport"),
|
|
115
|
+
type: "error"
|
|
116
|
+
});
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
if (!W.value) {
|
|
120
|
+
let o = `Your current plan only support up to ${O.value} custom reports.`;
|
|
121
|
+
O.value === 0 && (o = "Your current plan does not support custom report."), s.open({
|
|
122
|
+
message: o,
|
|
123
|
+
type: "error"
|
|
124
|
+
});
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
if (!t.value) {
|
|
128
|
+
s.open({ message: "No Widget", type: "error" });
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
if (await C({
|
|
132
|
+
title: `${e("report.messages.duplicateReport")}`,
|
|
133
|
+
message: e("report.messages.confirmAction", {
|
|
134
|
+
action: e("report.common.duplicate"),
|
|
135
|
+
name: t.value.name
|
|
136
|
+
})
|
|
137
|
+
}) && t.value) {
|
|
138
|
+
const o = JSON.parse(JSON.stringify(t.value));
|
|
139
|
+
o.editable = !0, o.id = "", o.name = `${o.name} duplicate`, o.isDefault = !1;
|
|
140
|
+
try {
|
|
141
|
+
await f(async () => {
|
|
142
|
+
const r = await p.createOrUpdateReport(o);
|
|
143
|
+
p.updateCurrentReportId(r.id), y.push({
|
|
144
|
+
name: "reportView",
|
|
145
|
+
params: v.params,
|
|
146
|
+
query: v.query
|
|
147
|
+
});
|
|
148
|
+
});
|
|
149
|
+
} catch (r) {
|
|
150
|
+
console.log(r), s.open({ message: "Failed to clone report", type: "error" });
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
async function I() {
|
|
155
|
+
var o;
|
|
156
|
+
if (!b.value) {
|
|
157
|
+
s.open({
|
|
158
|
+
message: e("report.messages.noPermission"),
|
|
159
|
+
type: "error"
|
|
160
|
+
});
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
if (!t.value) {
|
|
164
|
+
s.open({ message: "No Widget", type: "error" });
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
if (await C({
|
|
168
|
+
title: `${e("report.common.copyToTemplate")}`,
|
|
169
|
+
message: e("report.messages.confirmAction", {
|
|
170
|
+
action: e("report.common.copyToTemplate"),
|
|
171
|
+
name: (o = t == null ? void 0 : t.value) == null ? void 0 : o.name
|
|
172
|
+
})
|
|
173
|
+
}))
|
|
174
|
+
try {
|
|
175
|
+
await f(async () => {
|
|
176
|
+
var r;
|
|
177
|
+
await p.createReportTemplate(t.value), s.open({
|
|
178
|
+
message: e("report.messages.copyTemplateSuccess", { name: (r = t.value) == null ? void 0 : r.name }),
|
|
179
|
+
type: "success"
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
} catch (r) {
|
|
183
|
+
console.log(r), s.open({
|
|
184
|
+
message: e("report.messages.failedToAction", { action: e("report.common.copyToTemplate") }),
|
|
185
|
+
type: "error"
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
function A() {
|
|
190
|
+
L.value = !0;
|
|
191
|
+
}
|
|
192
|
+
function Z() {
|
|
193
|
+
t.value && (navigator.clipboard.writeText(c.value), s.open({ message: "Copied report ID to clipboard", type: "success" }));
|
|
194
|
+
}
|
|
195
|
+
async function ee() {
|
|
196
|
+
if (t.value)
|
|
197
|
+
try {
|
|
198
|
+
await f(async () => {
|
|
199
|
+
await fe(c.value, !V.value), await p.getReports();
|
|
200
|
+
});
|
|
201
|
+
} catch (a) {
|
|
202
|
+
console.log(a), s.open({
|
|
203
|
+
message: e("report.messages.failedToAction", { action: e("report.common.update") }),
|
|
204
|
+
type: "error"
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
const E = u(() => t.value ? t.value.tiles : []), oe = u(() => {
|
|
209
|
+
var r;
|
|
210
|
+
let o = [
|
|
211
|
+
// TODO: In future once decided to support report showing configuration for POS,
|
|
212
|
+
// uncomment this:
|
|
213
|
+
// {
|
|
214
|
+
// label: t("report.common.showInPOS"),
|
|
215
|
+
// value: "show_in_pos",
|
|
216
|
+
// isPrimary: false,
|
|
217
|
+
// appendIcon: isCurrentReportShownInPOS.value
|
|
218
|
+
// ? "radio_button_checked"
|
|
219
|
+
// : "radio_button_unchecked"
|
|
220
|
+
// },
|
|
221
|
+
!!((r = t.value) != null && r.editable) ? { label: e("report.common.edit"), value: "edit", isPrimary: !1 } : {
|
|
222
|
+
label: e("report.common.duplicate"),
|
|
223
|
+
value: "duplicate",
|
|
224
|
+
isPrimary: !1
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
label: e("report.common.download"),
|
|
228
|
+
value: "download",
|
|
229
|
+
isPrimary: !0,
|
|
230
|
+
prependIcon: "download"
|
|
231
|
+
},
|
|
232
|
+
{ label: e("report.schedule.sendEmail"), value: "email", isPrimary: !0 }
|
|
233
|
+
];
|
|
234
|
+
return i.value.xs && (o = [
|
|
235
|
+
...o,
|
|
236
|
+
{ label: e("report.schedule.sendEmail"), value: "email", isPrimary: !1 },
|
|
237
|
+
{ label: e("report.common.reportStatus"), value: "report_jobs", isPrimary: !1 },
|
|
238
|
+
{ label: e("report.common.emailSchedule"), value: "schedule_email", isPrimary: !1 },
|
|
239
|
+
{ label: e("report.common.copyID"), value: "content_copy", isPrimary: !1 }
|
|
240
|
+
], b.value && o.push({
|
|
241
|
+
label: e("report.common.copyToTemplate"),
|
|
242
|
+
value: "copy_to_template",
|
|
243
|
+
isPrimary: !1
|
|
244
|
+
}), !R.value && D.value && o.push({ label: e("report.common.accountingExport"), value: "export", isPrimary: !1 }), o = o.filter((m) => m.value !== "edit")), o;
|
|
245
|
+
}), _ = u(() => {
|
|
246
|
+
var a;
|
|
247
|
+
return De(e, j, (a = t == null ? void 0 : t.value) == null ? void 0 : a.name, "other");
|
|
248
|
+
});
|
|
249
|
+
return (a, o) => {
|
|
250
|
+
const r = B("FmTooltip"), m = B("FmPageHead");
|
|
251
|
+
return d(), w(de, null, {
|
|
252
|
+
default: S(() => {
|
|
253
|
+
var J;
|
|
254
|
+
return [
|
|
255
|
+
h(m, {
|
|
256
|
+
title: _.value,
|
|
257
|
+
"back-button": !0,
|
|
258
|
+
actions: oe.value,
|
|
259
|
+
"onClick:back": o[0] || (o[0] = (n) => l(y).push({ name: "reports", query: l(v).query })),
|
|
260
|
+
"onClick:action": o[1] || (o[1] = (n) => {
|
|
261
|
+
n === "show_in_pos" && ee(), n === "duplicate" && X(), n === "download" && (U.value = !0), n === "email" && (H.value = !0), n === "edit" && K(), n === "schedule_email" && (T.value = !0), n === "content_copy" && Z(), n === "copy_to_template" && I(), n === "export" && A(), n === "report_jobs" && $();
|
|
262
|
+
}),
|
|
263
|
+
class: "remove-line-clamping"
|
|
264
|
+
}, {
|
|
265
|
+
title: S(() => [
|
|
266
|
+
h(r, {
|
|
267
|
+
content: _.value,
|
|
268
|
+
placement: "bottom",
|
|
269
|
+
"z-index": 2e3,
|
|
270
|
+
class: "flex min-w-0 max-w-full justify-start"
|
|
271
|
+
}, {
|
|
272
|
+
default: S(() => [
|
|
273
|
+
k("p", Oe, se(_.value), 1)
|
|
274
|
+
]),
|
|
275
|
+
_: 1
|
|
276
|
+
}, 8, ["content"])
|
|
277
|
+
]),
|
|
278
|
+
_: 1
|
|
279
|
+
}, 8, ["title", "actions"]),
|
|
280
|
+
k("div", {
|
|
281
|
+
class: q(`flex flex-col overflow-y-auto ${l(i).xs || l(i).sm ? "pb-20" : ""}`),
|
|
282
|
+
style: ne({ height: `calc(100% - ${l(i).lg || l(i).md ? 72 : 64}px)` })
|
|
283
|
+
}, [
|
|
284
|
+
k("div", $e, [
|
|
285
|
+
h(ce, {
|
|
286
|
+
"model-value": l(i).lg || l(i).md ? Q.value : []
|
|
287
|
+
}, null, 8, ["model-value"])
|
|
288
|
+
]),
|
|
289
|
+
l(t) && ((J = E.value) == null ? void 0 : J.length) > 0 ? (d(), F("div", {
|
|
290
|
+
key: 0,
|
|
291
|
+
class: q(["grid grid-cols-12", l(i).sm || l(i).xs ? "px-3 gap-[16px]" : "px-24 gap-[24px]"])
|
|
292
|
+
}, [
|
|
293
|
+
(d(!0), F(le, null, ie(E.value, (n, N) => (d(), w(pe, {
|
|
294
|
+
key: `widget_${l(c)}_${N}`,
|
|
295
|
+
"model-value": n,
|
|
296
|
+
index: N
|
|
297
|
+
}, null, 8, ["model-value", "index"]))), 128))
|
|
298
|
+
], 2)) : (d(), w(we, { key: 1 }))
|
|
299
|
+
], 6)
|
|
300
|
+
];
|
|
301
|
+
}),
|
|
302
|
+
_: 1
|
|
303
|
+
});
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
}), Ye = /* @__PURE__ */ Se(Ie, [["__scopeId", "data-v-0e7efa03"]]);
|
|
307
|
+
export {
|
|
308
|
+
Ye as default
|
|
309
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineComponent as B, ref as H, useModel as M, 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 A, renderList as G, createTextVNode as ie, withDirectives as K, vShow as Q, watch as me, normalizeStyle as ue } from "vue";
|
|
2
|
-
import { _ as de } from "./Default.vue_vue_type_script_setup_true_lang-
|
|
3
|
-
import { d as L, C as q, D as pe, a as ce } from "./app-
|
|
2
|
+
import { _ as de } from "./Default.vue_vue_type_script_setup_true_lang-BUtavZIl.js";
|
|
3
|
+
import { d as L, C as q, D as pe, a as ce } from "./app-DMXIz8ol.js";
|
|
4
4
|
import { components as z, useSnackbar as W, useBreakpoints as X, FmButtonColorThemeVariant as I } from "@feedmepos/ui-library";
|
|
5
|
-
import { t as N, o as fe } from "./GlobalFilterSelect.vue_vue_type_script_setup_true_lang-
|
|
5
|
+
import { t as N, o as fe } from "./GlobalFilterSelect.vue_vue_type_script_setup_true_lang-ZAOWE1vp.js";
|
|
6
6
|
import { u as ve } from "./message-dialog-UoMWOnil.js";
|
|
7
7
|
import { u as U } from "./vue-i18n-DVWuTfed.js";
|
|
8
8
|
import { detectLocale as F } from "@feedmepos/mf-common";
|
|
9
|
-
import {
|
|
9
|
+
import { a as Y } from "./SelectComponent.vue_vue_type_script_setup_true_lang-BL1jpiXN.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" }, De = { class: "flex items-center w-full gap-3" }, Te = { 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",
|