@feedmepos/mf-report 5.25.7-beta.0 → 5.25.8-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-gHghnXVv.js → App-Bf0aor2N.js} +105 -101
- package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-DNA5N91t.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-Pi8dxsZB.js} +1 -1
- package/dist/{Default.vue_vue_type_script_setup_true_lang-D6Gy1vgv.js → Default.vue_vue_type_script_setup_true_lang-D3_780WC.js} +1 -1
- package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-DJ6rvvHv.js → DynamicWidget.vue_vue_type_script_setup_true_lang-DVUsMsQ_.js} +1549 -1563
- package/dist/{GlobalFilterSelect.vue_vue_type_script_setup_true_lang-BgRqSRmF.js → GlobalFilterSelect.vue_vue_type_script_setup_true_lang-DtqKlOMY.js} +3263 -3161
- package/dist/{InsightView-BsdAAgRZ.js → InsightView-b87hirKo.js} +5 -5
- package/dist/{Integration-B8cFqUeq.js → Integration-1xVvqpR9.js} +3 -3
- package/dist/{Integrations-BjbzzNzo.js → Integrations-DRyBjbzQ.js} +3 -3
- package/dist/{Layout-ZaDAeDuB.js → Layout-BMzYemst.js} +1 -1
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-IFfHx1DE.js → MenuTab.vue_vue_type_script_setup_true_lang-Da1Gn2bZ.js} +4 -4
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-BmX9xtKP.js → NavigationTab.vue_vue_type_script_setup_true_lang-B6eTZCAI.js} +4 -4
- package/dist/{OverviewView--bmm8Bpw.js → OverviewView-CkR-L3L_.js} +5 -5
- package/dist/{Report-DlVStJzk.js → Report-aWItqZEn.js} +4 -4
- package/dist/{ReportEditor-DKFh0x3n.js → ReportEditor-DENfrm0X.js} +4 -4
- package/dist/ReportView-2lVjNU0x.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-RVTiGH53.js → Setting-yKwX201x.js} +4 -4
- package/dist/Template-CQqtVjZo.js +482 -0
- package/dist/{TileEditor-BjfFS0tl.js → TileEditor-Bq7g2E1s.js} +274 -282
- package/dist/{TransitionFade-D2O_Adv6.js → TransitionFade-DaOt5oN7.js} +5 -5
- package/dist/{app-CuihnbMq.js → app-CMuJ9xn3.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-DA_3RCjb.js → useRestaurantPermission-dPvQepPN.js} +1 -1
- package/package.json +1 -1
- package/dist/ReportView-Dioy3fJC.js +0 -264
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.glassmorphism{background:linear-gradient(135deg,#fffffff5,#fffffff5);box-shadow:0 8px 24px #0f172a2e}.chart-legend-text[data-v-a258ca90]{color:var(--legend-text-color);font-size:var(--legend-font-size)}.chart-legend-list[data-v-a258ca90]{scrollbar-width:none;-ms-overflow-style:none}.chart-legend-list[data-v-a258ca90]::-webkit-scrollbar{display:none;width:0;height:0}.circular{flex:1 1 auto;min-height:0;min-width:0;max-height:100%;overflow:hidden;padding:0;width:var(--chart-width);height:var(--chart-height)}.circular .flex-col.gap-8{gap:0!important}.circular .fm-color-typo-primary:empty,.circular .fm-color-typo-secondary:empty{display:none}.circular .grow{height:100%}.sparkline{margin:0;padding:0}.sparkline .grow{height:50px;flex-grow:0}.scrollbar-hide-table>div{scrollbar-width:thin}.bar-chart{flex:1 1 auto;min-height:0;min-width:0;max-height:100%;overflow:hidden;padding:0;width:var(--chart-width);height:var(--chart-height)}.bar-chart .grow{height:100%}.bar-chart .flex-col{gap:0}.widget-content{display:flex;flex-direction:column;width:100%;height:100%;min-height:0}.chart-layout{display:flex;flex-direction:column;flex:1 1 auto;width:100%;min-height:0}.chart-layout--side{flex-direction:row;align-items:stretch;gap:0;min-height:0}.line-chart{flex:1 1 auto;min-height:0;min-width:0;max-height:100%;overflow:hidden;margin:0;padding:8px 0 0;width:var(--chart-width);height:var(--chart-height)}.line-chart .grow{height:100%}.line-chart .flex-col{gap:0}.card-container[data-v-818eab25]{overflow-y:auto;overflow-x:hidden}.fm-progress-linear-custom span[data-v-2f6d52e6]{width:auto;height:100%;position:absolute;display:inline-block;top:0;left:0}.fm-progress-linear-custom span.dash-1[data-v-2f6d52e6]{left:-35%;animation:progress-linear-dash-1-2f6d52e6 2.1s cubic-bezier(.65,.815,.735,.395) infinite}.fm-progress-linear-custom span.dash-2[data-v-2f6d52e6]{left:100%;animation:progress-linear-dash-2-2f6d52e6 2.1s cubic-bezier(.165,.84,.44,1) 1.15s infinite}@keyframes progress-linear-dash-1-2f6d52e6{0%{left:-35%;right:100%}60%{left:100%;right:-90%}to{left:100%;right:-90%}}@keyframes progress-linear-dash-2-2f6d52e6{0%{left:-200%;right:100%}60%{left:107%;right:-8%}to{left:107%;right:-8%}}@keyframes shimmer-2f6d52e6{0%{transform:translate(-100%)}to{transform:translate(400%)}}.progress-bar-fill[data-v-2f6d52e6]{position:relative;overflow:hidden}.progress-bar-fill[data-v-2f6d52e6]:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;width:50%;background:linear-gradient(90deg,transparent 0%,rgba(255,255,255,.12) 30%,rgba(255,255,255,.28) 50%,rgba(255,255,255,.12) 70%,transparent 100%);animation:shimmer-2f6d52e6 1.5s infinite linear}.show-pin{visibility:hidden}.row:hover .show-pin{visibility:visible}.icon-btn{border-radius:100%}.overlay{background:#0006;position:absolute;top:0;left:0;height:100vh;width:100vw}.side-panel{position:fixed;right:0;top:0;height:100%;background:#fff}.fade-enter-active,.fade-leave-active{transition:opacity .2s ease}.fade-enter-from,.fade-leave-to{opacity:0}.slide-enter-active,.slide-leave-active{transition:all .3s ease-out}.slide-enter-from,.slide-leave-to{transform:translate(100%)}.remove-line-clamping[data-v-
|
|
1
|
+
.glassmorphism{background:linear-gradient(135deg,#fffffff5,#fffffff5);box-shadow:0 8px 24px #0f172a2e}.chart-legend-text[data-v-a258ca90]{color:var(--legend-text-color);font-size:var(--legend-font-size)}.chart-legend-list[data-v-a258ca90]{scrollbar-width:none;-ms-overflow-style:none}.chart-legend-list[data-v-a258ca90]::-webkit-scrollbar{display:none;width:0;height:0}.circular{flex:1 1 auto;min-height:0;min-width:0;max-height:100%;overflow:hidden;padding:0;width:var(--chart-width);height:var(--chart-height)}.circular .flex-col.gap-8{gap:0!important}.circular .fm-color-typo-primary:empty,.circular .fm-color-typo-secondary:empty{display:none}.circular .grow{height:100%}.sparkline{margin:0;padding:0}.sparkline .grow{height:50px;flex-grow:0}.scrollbar-hide-table>div{scrollbar-width:thin}.bar-chart{flex:1 1 auto;min-height:0;min-width:0;max-height:100%;overflow:hidden;padding:0;width:var(--chart-width);height:var(--chart-height)}.bar-chart .grow{height:100%}.bar-chart .flex-col{gap:0}.widget-content{display:flex;flex-direction:column;width:100%;height:100%;min-height:0}.chart-layout{display:flex;flex-direction:column;flex:1 1 auto;width:100%;min-height:0}.chart-layout--side{flex-direction:row;align-items:stretch;gap:0;min-height:0}.line-chart{flex:1 1 auto;min-height:0;min-width:0;max-height:100%;overflow:hidden;margin:0;padding:8px 0 0;width:var(--chart-width);height:var(--chart-height)}.line-chart .grow{height:100%}.line-chart .flex-col{gap:0}.card-container[data-v-818eab25]{overflow-y:auto;overflow-x:hidden}.fm-progress-linear-custom span[data-v-2f6d52e6]{width:auto;height:100%;position:absolute;display:inline-block;top:0;left:0}.fm-progress-linear-custom span.dash-1[data-v-2f6d52e6]{left:-35%;animation:progress-linear-dash-1-2f6d52e6 2.1s cubic-bezier(.65,.815,.735,.395) infinite}.fm-progress-linear-custom span.dash-2[data-v-2f6d52e6]{left:100%;animation:progress-linear-dash-2-2f6d52e6 2.1s cubic-bezier(.165,.84,.44,1) 1.15s infinite}@keyframes progress-linear-dash-1-2f6d52e6{0%{left:-35%;right:100%}60%{left:100%;right:-90%}to{left:100%;right:-90%}}@keyframes progress-linear-dash-2-2f6d52e6{0%{left:-200%;right:100%}60%{left:107%;right:-8%}to{left:107%;right:-8%}}@keyframes shimmer-2f6d52e6{0%{transform:translate(-100%)}to{transform:translate(400%)}}.progress-bar-fill[data-v-2f6d52e6]{position:relative;overflow:hidden}.progress-bar-fill[data-v-2f6d52e6]:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;width:50%;background:linear-gradient(90deg,transparent 0%,rgba(255,255,255,.12) 30%,rgba(255,255,255,.28) 50%,rgba(255,255,255,.12) 70%,transparent 100%);animation:shimmer-2f6d52e6 1.5s infinite linear}.show-pin{visibility:hidden}.row:hover .show-pin,.row:hover .show-actions{visibility:visible}.icon-btn{border-radius:100%}.overlay{background:#0006;position:absolute;top:0;left:0;height:100vh;width:100vw}.side-panel{position:fixed;right:0;top:0;height:100%;background:#fff}.fade-enter-active,.fade-leave-active{transition:opacity .2s ease}.fade-enter-from,.fade-leave-to{opacity:0}.slide-enter-active,.slide-leave-active{transition:all .3s ease-out}.slide-enter-from,.slide-leave-to{transform:translate(100%)}.remove-line-clamping[data-v-0e7efa03] .line-clamp-1,.remove-line-clamping[data-v-0e7efa03] .line-clamp-2{display:block!important;-webkit-line-clamp:unset!important;line-clamp:unset!important;-webkit-box-orient:unset!important;overflow:visible!important;white-space:normal!important}.remove-line-clamping[data-v-0e7efa03] .flex.flex-col.flex-grow{min-width:0}.remove-line-clamping[data-v-0e7efa03] .cursor-pointer.flex.items-center.justify-center.relative{min-width:0;max-width:100%;overflow:hidden}.selected-widget[data-v-0535b07b]{background-color:#fff4e6;border-color:#ff7823}.slide-fade-enter-active[data-v-fa67a3a4],.slide-fade-leave-active[data-v-fa67a3a4]{transition:all .3s ease-in-out}.slide-fade-enter-from[data-v-fa67a3a4],.slide-fade-leave-to[data-v-fa67a3a4]{transform:translateY(-50px);opacity:0}.slide-fade-right-enter-active[data-v-a98ca9bc],.slide-fade-right-leave-active[data-v-a98ca9bc]{transition:all .3s ease-in-out}.slide-fade-right-enter-from[data-v-a98ca9bc],.slide-fade-right-leave-to[data-v-a98ca9bc]{position:absolute;transform:translate(-50px);opacity:.4}.slide-fade-left-enter-active[data-v-a98ca9bc]{transition-delay:.3s;transition:all .3s ease-in-out}.slide-fade-left-leave-active[data-v-a98ca9bc]{transition:all .3s ease-in-out}.slide-fade-left-enter-from[data-v-a98ca9bc],.slide-fade-left-leave-to[data-v-a98ca9bc]{position:absolute;transform:translate(-50px);opacity:.1}.toggleEditResize{border:2px dashed #3b82f6!important;position:relative}th:hover,td:hover{cursor:default}.col-resize-handle{position:absolute;top:0;right:0;width:6px;height:100%;cursor:col-resize;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:10}.highlight-hover-col,.highlight-col{border-right:2px solid #3b82f6!important}.row-resize-handle{position:absolute;bottom:0;left:0;width:100%;height:6px;cursor:row-resize;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:10}.highlight-hover-row,.highlight-row{border-bottom:2px solid #3b82f6!important}.legend-color-input[data-v-0e072961]{-moz-appearance:none;appearance:none;-webkit-appearance:none;width:40px;height:24px;border:0;background:transparent;padding:0}.legend-color-input[data-v-0e072961]::-webkit-color-swatch-wrapper{padding:0}.legend-color-input[data-v-0e072961]::-webkit-color-swatch{border:1px solid rgb(var(--fm-color-neutral-gray-200));border-radius:4px}.legend-color-input[data-v-0e072961]::-moz-color-swatch{border:1px solid rgb(var(--fm-color-neutral-gray-200));border-radius:4px}.line-style-icon[data-v-f1c35513]{width:28px;border-top:2px solid currentColor;color:rgb(var(--fm-color-neutral-gray-300));flex-shrink:0}.line-style-icon--solid[data-v-f1c35513]{border-top-style:solid}.line-style-icon--dashed[data-v-f1c35513]{border-top-style:dashed}.line-style-icon--dotted[data-v-f1c35513]{border-top-style:dotted}.fm-top-sheet{height:100%}.integration-card[data-v-60c3aea9]{height:140px;width:140px;padding:0}.integration-card .logo-card[data-v-60c3aea9]{width:100%;padding:24px;background:#fff}.integration-card .title-card[data-v-60c3aea9]{height:36px;color:#fff}.scrollbar-hide::-webkit-scrollbar{display:none}.scrollbar-hide{-ms-overflow-style:none;scrollbar-width:none}
|
|
@@ -2,7 +2,7 @@ import { computed as u } from "vue";
|
|
|
2
2
|
import { u as c } from "./vue-i18n-DVWuTfed.js";
|
|
3
3
|
import { useSnackbar as f } from "@feedmepos/ui-library";
|
|
4
4
|
import { useCoreStore as d } from "@feedmepos/mf-common";
|
|
5
|
-
import { V as l, W as i } from "./app-
|
|
5
|
+
import { V as l, W as i } from "./app-CMuJ9xn3.js";
|
|
6
6
|
function g(t) {
|
|
7
7
|
return Array.isArray(t) ? t : [];
|
|
8
8
|
}
|
package/package.json
CHANGED
|
@@ -1,264 +0,0 @@
|
|
|
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-IFfHx1DE.js";
|
|
3
|
-
import { _ as ie } from "./DynamicWidget.vue_vue_type_script_setup_true_lang-DJ6rvvHv.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-D6Gy1vgv.js";
|
|
6
|
-
import { u as me, s as de } from "./GlobalFilterSelect.vue_vue_type_script_setup_true_lang-BgRqSRmF.js";
|
|
7
|
-
import { storeToRefs as f } from "pinia";
|
|
8
|
-
import { b as ve, c as fe, u as ge, g as ye } from "./NavigationTab.vue_vue_type_script_setup_true_lang-BmX9xtKP.js";
|
|
9
|
-
import { _ as be, a as _e } from "./SelectComponent.vue_vue_type_script_setup_true_lang-Af_Z54a4.js";
|
|
10
|
-
import { useSnackbar as we, useBreakpoints as Se } from "@feedmepos/ui-library";
|
|
11
|
-
import { u as ke, a as xe } from "./vue-i18n-DVWuTfed.js";
|
|
12
|
-
import { u as he } from "./message-dialog-UoMWOnil.js";
|
|
13
|
-
import { e as Ce, g as Re } from "./app-CuihnbMq.js";
|
|
14
|
-
import { r as Pe } from "./i18n-CI_sQ5d_.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 } = he(), p = me(), x = ve(), { promptLoader: y } = xe(), { breakpoints: i } = Se(), { isOpenAccountingDialog: F } = f(fe()), { isOpenScheduleDialog: h } = f(ge()), { disabled: C } = f(Ce()), 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 } = Re();
|
|
36
|
-
te(
|
|
37
|
-
() => u.value,
|
|
38
|
-
async () => R.value = await ye(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.duplicateReport")}`,
|
|
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 de(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 Pe(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(), _(be, { key: 1 }))
|
|
254
|
-
], 6)
|
|
255
|
-
];
|
|
256
|
-
}),
|
|
257
|
-
_: 1
|
|
258
|
-
});
|
|
259
|
-
};
|
|
260
|
-
}
|
|
261
|
-
}), Me = /* @__PURE__ */ _e(Ie, [["__scopeId", "data-v-8fe2479c"]]);
|
|
262
|
-
export {
|
|
263
|
-
Me as default
|
|
264
|
-
};
|