@feedmepos/mf-report 5.25.10 → 5.26.0-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-BhsZn2MD.js → App-DAdj49u8.js} +60 -60
- package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-DfuZDdaV.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-2Vg_kCAp.js} +1 -1
- package/dist/{Default.vue_vue_type_script_setup_true_lang-C0Qb1wJK.js → Default.vue_vue_type_script_setup_true_lang-hNq60-4a.js} +1 -1
- package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-DvVjYNQ7.js → DynamicWidget.vue_vue_type_script_setup_true_lang-DQyuIexX.js} +4 -4
- package/dist/{GlobalFilterSelect.vue_vue_type_script_setup_true_lang-B2X7xq6g.js → GlobalFilterSelect.vue_vue_type_script_setup_true_lang-DlXK3vKk.js} +2565 -2562
- package/dist/{InsightView-Dm6MO7Ho.js → InsightView-D1W_Qw1x.js} +4 -4
- package/dist/{Integration-DG4YwKEL.js → Integration-0kV2yMal.js} +3 -3
- package/dist/{Integrations-OvZDkFZc.js → Integrations-Z93zJ5Dr.js} +2 -2
- package/dist/{Layout-CahHPo0j.js → Layout-BMXhdCFW.js} +1 -1
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-D5YWK8Mk.js → MenuTab.vue_vue_type_script_setup_true_lang-B7I_SD0X.js} +4 -4
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-Dd-0rrvQ.js → NavigationTab.vue_vue_type_script_setup_true_lang-YfKpvynH.js} +3 -3
- package/dist/{OverviewView-Dc0UE_r7.js → OverviewView-CAiT1fX7.js} +4 -4
- package/dist/{Report-BkZz2vFr.js → Report-D8gy29Ab.js} +3 -3
- package/dist/ReportEditor-CeAkjcrz.js +1469 -0
- package/dist/{ReportView-CM5xkkR0.js → ReportView-DTFzeI5O.js} +91 -89
- package/dist/{Setting-7P1BCJ7o.js → Setting-DALn8nF6.js} +3 -3
- package/dist/{Template-8z-BrPns.js → Template-CmPDm8rq.js} +19 -19
- package/dist/{TileEditor-R6S8j4QX.js → TileEditor-DZ0ijTc6.js} +5 -5
- package/dist/{TransitionFade-B8-J4J4a.js → TransitionFade-BF6eUEkd.js} +4 -4
- package/dist/{app-99BOSacG.js → app-BqaaLhp5.js} +37 -17
- package/dist/app.js +1 -1
- package/dist/assets/{processTableData.worker-CQMw9rvu.js → formatChartData.worker-CNDzXYxy.js} +21 -21
- package/dist/assets/{formatChartData.worker-BlVUDagT.js → processTableData.worker-DAFyU7Y8.js} +21 -21
- package/dist/style.css +1 -1
- package/dist/{useRestaurantPermission-CQV9Husi.js → useRestaurantPermission-DBOmOQRv.js} +1 -1
- package/package.json +1 -1
- package/dist/ReportEditor-Bs605LL5.js +0 -1440
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { _ as
|
|
3
|
-
import { _ as
|
|
4
|
-
import { useRouter as
|
|
5
|
-
import { _ as
|
|
6
|
-
import { u as
|
|
1
|
+
import { defineComponent as ae, ref as re, computed as p, watch as se, resolveComponent as B, createBlock as w, openBlock as d, withCtx as S, createVNode as C, createElementVNode as h, unref as n, toDisplayString as le, normalizeStyle as ne, normalizeClass as q, createElementBlock as F, Fragment as ie, renderList as ce } from "vue";
|
|
2
|
+
import { _ as pe } from "./MenuTab.vue_vue_type_script_setup_true_lang-B7I_SD0X.js";
|
|
3
|
+
import { _ as ue } from "./DynamicWidget.vue_vue_type_script_setup_true_lang-DQyuIexX.js";
|
|
4
|
+
import { useRouter as me, useRoute as de } from "vue-router";
|
|
5
|
+
import { _ as ve } from "./Default.vue_vue_type_script_setup_true_lang-hNq60-4a.js";
|
|
6
|
+
import { u as fe, s as ge } from "./GlobalFilterSelect.vue_vue_type_script_setup_true_lang-DlXK3vKk.js";
|
|
7
7
|
import { storeToRefs as g } from "pinia";
|
|
8
|
-
import { b as
|
|
9
|
-
import { _ as
|
|
8
|
+
import { b as ye, c as be, u as _e, g as we } from "./NavigationTab.vue_vue_type_script_setup_true_lang-YfKpvynH.js";
|
|
9
|
+
import { _ as Se, b as Ce } from "./SelectComponent.vue_vue_type_script_setup_true_lang-BL1jpiXN.js";
|
|
10
10
|
import { useSnackbar as he, useBreakpoints as ke } from "@feedmepos/ui-library";
|
|
11
|
-
import { u as
|
|
12
|
-
import { u as
|
|
13
|
-
import { e as
|
|
14
|
-
import { r as
|
|
15
|
-
const
|
|
11
|
+
import { u as xe, a as Te } from "./vue-i18n-DVWuTfed.js";
|
|
12
|
+
import { u as Re } from "./message-dialog-UoMWOnil.js";
|
|
13
|
+
import { e as Pe, g as De } from "./app-BqaaLhp5.js";
|
|
14
|
+
import { r as Oe } from "./i18n-CI_sQ5d_.js";
|
|
15
|
+
const $e = { class: "fm-typo-en-title-md-600 block min-w-0 max-w-full overflow-hidden text-ellipsis whitespace-nowrap" }, Ie = { class: "sticky top-0 z-10 bg-white" }, Ae = /* @__PURE__ */ ae({
|
|
16
16
|
__name: "ReportView",
|
|
17
|
-
setup(
|
|
18
|
-
const { t: e, te: j } =
|
|
17
|
+
setup(Ee) {
|
|
18
|
+
const { t: e, te: j } = xe(), y = me(), v = de(), s = he(), { promptMessage: k } = Re(), u = fe(), x = ye(), { promptLoader: f } = Te(), { breakpoints: i } = ke(), { isOpenAccountingDialog: L } = g(be()), { isOpenScheduleDialog: T } = g(_e()), { disabled: R } = g(Pe()), P = re(null), D = p(
|
|
19
19
|
() => {
|
|
20
20
|
var a;
|
|
21
21
|
return ((a = P.value) == null ? void 0 : a.reportId) === c.value;
|
|
22
22
|
}
|
|
23
|
-
), V =
|
|
23
|
+
), V = p(() => {
|
|
24
24
|
var a;
|
|
25
|
-
return !!((a =
|
|
25
|
+
return !!((a = o.value) != null && a.isSupportPos);
|
|
26
26
|
}), {
|
|
27
|
-
currentReport:
|
|
27
|
+
currentReport: o,
|
|
28
28
|
overviewReport: z,
|
|
29
29
|
currentReportId: c,
|
|
30
30
|
isOpenDownloadDialog: U,
|
|
@@ -32,15 +32,17 @@ const Oe = { class: "fm-typo-en-title-md-600 block min-w-0 max-w-full overflow-h
|
|
|
32
32
|
editingReport: M,
|
|
33
33
|
canCreateCustomReport: W,
|
|
34
34
|
customReportQuota: O
|
|
35
|
-
} = g(
|
|
36
|
-
|
|
35
|
+
} = g(u), { canUpdate: Y, canDuplicate: G, isAdmin: Q } = De(), b = p(
|
|
36
|
+
() => Q.value && !!o.value && !o.value.isDefault
|
|
37
|
+
);
|
|
38
|
+
se(
|
|
37
39
|
() => c.value,
|
|
38
|
-
async () => P.value = await
|
|
40
|
+
async () => P.value = await we(c.value),
|
|
39
41
|
{ immediate: !0 }
|
|
40
42
|
);
|
|
41
|
-
const
|
|
43
|
+
const K = p(() => {
|
|
42
44
|
var r;
|
|
43
|
-
const a = c.value === ((r = z.value) == null ? void 0 : r.id),
|
|
45
|
+
const a = c.value === ((r = z.value) == null ? void 0 : r.id), t = [
|
|
44
46
|
{
|
|
45
47
|
icon: "mail",
|
|
46
48
|
label: e("report.common.emailSchedule"),
|
|
@@ -53,10 +55,10 @@ const Oe = { class: "fm-typo-en-title-md-600 block min-w-0 max-w-full overflow-h
|
|
|
53
55
|
label: e(a ? "report.common.unsetAsOverview" : "report.common.setAsOverview"),
|
|
54
56
|
onClick: async () => {
|
|
55
57
|
await f(async () => {
|
|
56
|
-
if (
|
|
58
|
+
if (o.value)
|
|
57
59
|
try {
|
|
58
|
-
await
|
|
59
|
-
message: `Successfully ${a ? "unset" : "set"} ${
|
|
60
|
+
await u.updateDefaultReport(a ? null : o.value.id), s.open({
|
|
61
|
+
message: `Successfully ${a ? "unset" : "set"} ${o.value.name} as Overview`,
|
|
60
62
|
type: "success"
|
|
61
63
|
});
|
|
62
64
|
} catch (m) {
|
|
@@ -69,7 +71,7 @@ const Oe = { class: "fm-typo-en-title-md-600 block min-w-0 max-w-full overflow-h
|
|
|
69
71
|
icon: "content_copy",
|
|
70
72
|
label: e("report.common.copyID"),
|
|
71
73
|
onClick: () => {
|
|
72
|
-
|
|
74
|
+
o.value && (navigator.clipboard.writeText(c.value), s.open({ message: e("report.messages.copiedReportIdToClipboard"), type: "success" }));
|
|
73
75
|
}
|
|
74
76
|
},
|
|
75
77
|
{
|
|
@@ -80,36 +82,36 @@ const Oe = { class: "fm-typo-en-title-md-600 block min-w-0 max-w-full overflow-h
|
|
|
80
82
|
}
|
|
81
83
|
}
|
|
82
84
|
];
|
|
83
|
-
return !R.value && D.value &&
|
|
85
|
+
return !R.value && D.value && t.splice(1, 0, {
|
|
84
86
|
icon: "download",
|
|
85
87
|
label: e("report.common.accountingExport"),
|
|
86
88
|
onClick: A
|
|
87
|
-
}), b.value &&
|
|
89
|
+
}), b.value && t.splice(t.length - 1, 0, {
|
|
88
90
|
icon: "library_add",
|
|
89
91
|
label: e("report.common.copyToTemplate"),
|
|
90
92
|
onClick: () => {
|
|
91
93
|
I();
|
|
92
94
|
}
|
|
93
|
-
}),
|
|
95
|
+
}), t;
|
|
94
96
|
});
|
|
95
97
|
async function $() {
|
|
96
98
|
x.isOpenJobDialog = !0, await x.getJobs();
|
|
97
99
|
}
|
|
98
|
-
function
|
|
99
|
-
if (!
|
|
100
|
+
function X() {
|
|
101
|
+
if (!o.value || !Y(o.value)) {
|
|
100
102
|
s.open({
|
|
101
103
|
message: e("report.messages.noPermissionUpdateReport"),
|
|
102
104
|
type: "error"
|
|
103
105
|
});
|
|
104
106
|
return;
|
|
105
107
|
}
|
|
106
|
-
M.value = JSON.parse(JSON.stringify(
|
|
108
|
+
M.value = JSON.parse(JSON.stringify(o.value)), y.push({
|
|
107
109
|
name: "reportEditor",
|
|
108
110
|
query: v.query
|
|
109
111
|
});
|
|
110
112
|
}
|
|
111
|
-
async function
|
|
112
|
-
if (!
|
|
113
|
+
async function Z() {
|
|
114
|
+
if (!o.value || !G(o.value)) {
|
|
113
115
|
s.open({
|
|
114
116
|
message: e("report.messages.noPermissionDuplicateReport"),
|
|
115
117
|
type: "error"
|
|
@@ -117,30 +119,30 @@ const Oe = { class: "fm-typo-en-title-md-600 block min-w-0 max-w-full overflow-h
|
|
|
117
119
|
return;
|
|
118
120
|
}
|
|
119
121
|
if (!W.value) {
|
|
120
|
-
let
|
|
121
|
-
O.value === 0 && (
|
|
122
|
-
message:
|
|
122
|
+
let t = `Your current plan only support up to ${O.value} custom reports.`;
|
|
123
|
+
O.value === 0 && (t = "Your current plan does not support custom report."), s.open({
|
|
124
|
+
message: t,
|
|
123
125
|
type: "error"
|
|
124
126
|
});
|
|
125
127
|
return;
|
|
126
128
|
}
|
|
127
|
-
if (!
|
|
129
|
+
if (!o.value) {
|
|
128
130
|
s.open({ message: "No Widget", type: "error" });
|
|
129
131
|
return;
|
|
130
132
|
}
|
|
131
|
-
if (await
|
|
133
|
+
if (await k({
|
|
132
134
|
title: `${e("report.messages.duplicateReport")}`,
|
|
133
135
|
message: e("report.messages.confirmAction", {
|
|
134
136
|
action: e("report.common.duplicate"),
|
|
135
|
-
name:
|
|
137
|
+
name: o.value.name
|
|
136
138
|
})
|
|
137
|
-
}) &&
|
|
138
|
-
const
|
|
139
|
-
|
|
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;
|
|
140
142
|
try {
|
|
141
143
|
await f(async () => {
|
|
142
|
-
const r = await
|
|
143
|
-
|
|
144
|
+
const r = await u.createOrUpdateReport(t);
|
|
145
|
+
u.updateCurrentReportId(r.id), y.push({
|
|
144
146
|
name: "reportView",
|
|
145
147
|
params: v.params,
|
|
146
148
|
query: v.query
|
|
@@ -152,7 +154,7 @@ const Oe = { class: "fm-typo-en-title-md-600 block min-w-0 max-w-full overflow-h
|
|
|
152
154
|
}
|
|
153
155
|
}
|
|
154
156
|
async function I() {
|
|
155
|
-
var
|
|
157
|
+
var t;
|
|
156
158
|
if (!b.value) {
|
|
157
159
|
s.open({
|
|
158
160
|
message: e("report.messages.noPermission"),
|
|
@@ -160,22 +162,22 @@ const Oe = { class: "fm-typo-en-title-md-600 block min-w-0 max-w-full overflow-h
|
|
|
160
162
|
});
|
|
161
163
|
return;
|
|
162
164
|
}
|
|
163
|
-
if (!
|
|
165
|
+
if (!o.value) {
|
|
164
166
|
s.open({ message: "No Widget", type: "error" });
|
|
165
167
|
return;
|
|
166
168
|
}
|
|
167
|
-
if (await
|
|
169
|
+
if (await k({
|
|
168
170
|
title: `${e("report.common.copyToTemplate")}`,
|
|
169
171
|
message: e("report.messages.confirmAction", {
|
|
170
172
|
action: e("report.common.copyToTemplate"),
|
|
171
|
-
name: (
|
|
173
|
+
name: (t = o == null ? void 0 : o.value) == null ? void 0 : t.name
|
|
172
174
|
})
|
|
173
175
|
}))
|
|
174
176
|
try {
|
|
175
177
|
await f(async () => {
|
|
176
178
|
var r;
|
|
177
|
-
await
|
|
178
|
-
message: e("report.messages.copyTemplateSuccess", { name: (r =
|
|
179
|
+
await u.createReportTemplate(o.value), s.open({
|
|
180
|
+
message: e("report.messages.copyTemplateSuccess", { name: (r = o.value) == null ? void 0 : r.name }),
|
|
179
181
|
type: "success"
|
|
180
182
|
});
|
|
181
183
|
});
|
|
@@ -189,14 +191,14 @@ const Oe = { class: "fm-typo-en-title-md-600 block min-w-0 max-w-full overflow-h
|
|
|
189
191
|
function A() {
|
|
190
192
|
L.value = !0;
|
|
191
193
|
}
|
|
192
|
-
function
|
|
193
|
-
|
|
194
|
+
function ee() {
|
|
195
|
+
o.value && (navigator.clipboard.writeText(c.value), s.open({ message: "Copied report ID to clipboard", type: "success" }));
|
|
194
196
|
}
|
|
195
|
-
async function
|
|
196
|
-
if (
|
|
197
|
+
async function oe() {
|
|
198
|
+
if (o.value)
|
|
197
199
|
try {
|
|
198
200
|
await f(async () => {
|
|
199
|
-
await
|
|
201
|
+
await ge(c.value, !V.value), await u.getReports();
|
|
200
202
|
});
|
|
201
203
|
} catch (a) {
|
|
202
204
|
console.log(a), s.open({
|
|
@@ -205,9 +207,9 @@ const Oe = { class: "fm-typo-en-title-md-600 block min-w-0 max-w-full overflow-h
|
|
|
205
207
|
});
|
|
206
208
|
}
|
|
207
209
|
}
|
|
208
|
-
const E =
|
|
210
|
+
const E = p(() => o.value ? o.value.tiles : []), te = p(() => {
|
|
209
211
|
var r;
|
|
210
|
-
let
|
|
212
|
+
let t = [
|
|
211
213
|
// TODO: In future once decided to support report showing configuration for POS,
|
|
212
214
|
// uncomment this:
|
|
213
215
|
// {
|
|
@@ -218,7 +220,7 @@ const Oe = { class: "fm-typo-en-title-md-600 block min-w-0 max-w-full overflow-h
|
|
|
218
220
|
// ? "radio_button_checked"
|
|
219
221
|
// : "radio_button_unchecked"
|
|
220
222
|
// },
|
|
221
|
-
!!((r =
|
|
223
|
+
!!((r = o.value) != null && r.editable) ? { label: e("report.common.edit"), value: "edit", isPrimary: !1 } : {
|
|
222
224
|
label: e("report.common.duplicate"),
|
|
223
225
|
value: "duplicate",
|
|
224
226
|
isPrimary: !1
|
|
@@ -231,71 +233,71 @@ const Oe = { class: "fm-typo-en-title-md-600 block min-w-0 max-w-full overflow-h
|
|
|
231
233
|
},
|
|
232
234
|
{ label: e("report.schedule.sendEmail"), value: "email", isPrimary: !0 }
|
|
233
235
|
];
|
|
234
|
-
return i.value.xs && (
|
|
235
|
-
...
|
|
236
|
+
return i.value.xs && (t = [
|
|
237
|
+
...t,
|
|
236
238
|
{ label: e("report.schedule.sendEmail"), value: "email", isPrimary: !1 },
|
|
237
239
|
{ label: e("report.common.reportStatus"), value: "report_jobs", isPrimary: !1 },
|
|
238
240
|
{ label: e("report.common.emailSchedule"), value: "schedule_email", isPrimary: !1 },
|
|
239
241
|
{ label: e("report.common.copyID"), value: "content_copy", isPrimary: !1 }
|
|
240
|
-
], b.value &&
|
|
242
|
+
], b.value && t.push({
|
|
241
243
|
label: e("report.common.copyToTemplate"),
|
|
242
244
|
value: "copy_to_template",
|
|
243
245
|
isPrimary: !1
|
|
244
|
-
}), !R.value && D.value &&
|
|
245
|
-
}), _ =
|
|
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
|
+
}), _ = p(() => {
|
|
246
248
|
var a;
|
|
247
|
-
return
|
|
249
|
+
return Oe(e, j, (a = o == null ? void 0 : o.value) == null ? void 0 : a.name, "other");
|
|
248
250
|
});
|
|
249
|
-
return (a,
|
|
251
|
+
return (a, t) => {
|
|
250
252
|
const r = B("FmTooltip"), m = B("FmPageHead");
|
|
251
|
-
return d(), w(
|
|
253
|
+
return d(), w(ve, null, {
|
|
252
254
|
default: S(() => {
|
|
253
255
|
var J;
|
|
254
256
|
return [
|
|
255
|
-
|
|
257
|
+
C(m, {
|
|
256
258
|
title: _.value,
|
|
257
259
|
"back-button": !0,
|
|
258
|
-
actions:
|
|
259
|
-
"onClick:back":
|
|
260
|
-
"onClick:action":
|
|
261
|
-
|
|
260
|
+
actions: te.value,
|
|
261
|
+
"onClick:back": t[0] || (t[0] = (l) => n(y).push({ name: "reports", query: n(v).query })),
|
|
262
|
+
"onClick:action": t[1] || (t[1] = (l) => {
|
|
263
|
+
l === "show_in_pos" && oe(), l === "duplicate" && Z(), l === "download" && (U.value = !0), l === "email" && (H.value = !0), l === "edit" && X(), l === "schedule_email" && (T.value = !0), l === "content_copy" && ee(), l === "copy_to_template" && I(), l === "export" && A(), l === "report_jobs" && $();
|
|
262
264
|
}),
|
|
263
265
|
class: "remove-line-clamping"
|
|
264
266
|
}, {
|
|
265
267
|
title: S(() => [
|
|
266
|
-
|
|
268
|
+
C(r, {
|
|
267
269
|
content: _.value,
|
|
268
270
|
placement: "bottom",
|
|
269
271
|
"z-index": 2e3,
|
|
270
272
|
class: "flex min-w-0 max-w-full justify-start"
|
|
271
273
|
}, {
|
|
272
274
|
default: S(() => [
|
|
273
|
-
|
|
275
|
+
h("p", $e, le(_.value), 1)
|
|
274
276
|
]),
|
|
275
277
|
_: 1
|
|
276
278
|
}, 8, ["content"])
|
|
277
279
|
]),
|
|
278
280
|
_: 1
|
|
279
281
|
}, 8, ["title", "actions"]),
|
|
280
|
-
|
|
281
|
-
class: q(`flex flex-col overflow-y-auto ${
|
|
282
|
-
style: ne({ height: `calc(100% - ${
|
|
282
|
+
h("div", {
|
|
283
|
+
class: q(`flex flex-col overflow-y-auto ${n(i).xs || n(i).sm ? "pb-20" : ""}`),
|
|
284
|
+
style: ne({ height: `calc(100% - ${n(i).lg || n(i).md ? 72 : 64}px)` })
|
|
283
285
|
}, [
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
"model-value":
|
|
286
|
+
h("div", Ie, [
|
|
287
|
+
C(pe, {
|
|
288
|
+
"model-value": n(i).lg || n(i).md ? K.value : []
|
|
287
289
|
}, null, 8, ["model-value"])
|
|
288
290
|
]),
|
|
289
|
-
|
|
291
|
+
n(o) && ((J = E.value) == null ? void 0 : J.length) > 0 ? (d(), F("div", {
|
|
290
292
|
key: 0,
|
|
291
|
-
class: q(["grid grid-cols-12",
|
|
293
|
+
class: q(["grid grid-cols-12", n(i).sm || n(i).xs ? "px-3 gap-[16px]" : "px-24 gap-[24px]"])
|
|
292
294
|
}, [
|
|
293
|
-
(d(!0), F(
|
|
294
|
-
key: `widget_${
|
|
295
|
-
"model-value":
|
|
295
|
+
(d(!0), F(ie, null, ce(E.value, (l, N) => (d(), w(ue, {
|
|
296
|
+
key: `widget_${n(c)}_${N}`,
|
|
297
|
+
"model-value": l,
|
|
296
298
|
index: N
|
|
297
299
|
}, null, 8, ["model-value", "index"]))), 128))
|
|
298
|
-
], 2)) : (d(), w(
|
|
300
|
+
], 2)) : (d(), w(Se, { key: 1 }))
|
|
299
301
|
], 6)
|
|
300
302
|
];
|
|
301
303
|
}),
|
|
@@ -303,7 +305,7 @@ const Oe = { class: "fm-typo-en-title-md-600 block min-w-0 max-w-full overflow-h
|
|
|
303
305
|
});
|
|
304
306
|
};
|
|
305
307
|
}
|
|
306
|
-
}),
|
|
308
|
+
}), Ge = /* @__PURE__ */ Ce(Ae, [["__scopeId", "data-v-0974b3bd"]]);
|
|
307
309
|
export {
|
|
308
|
-
|
|
310
|
+
Ge as default
|
|
309
311
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
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-hNq60-4a.js";
|
|
3
|
+
import { d as L, C as q, D as pe, a as ce } from "./app-BqaaLhp5.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-DlXK3vKk.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";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as re, computed as p, resolveComponent as g, createElementBlock as H, openBlock as _, renderSlot as
|
|
1
|
+
import { defineComponent as re, computed as p, resolveComponent as g, createElementBlock as H, openBlock as _, renderSlot as Te, createVNode as n, withCtx as s, createCommentVNode as ne, createElementVNode as m, toDisplayString as y, ref as b, h as v, onMounted as Ce, createBlock as z, unref as l, normalizeStyle as ke, normalizeClass as T, withDirectives as te, Fragment as Fe, renderList as Le, withModifiers as oe, vShow as le } from "vue";
|
|
2
2
|
import { a as Ve } from "./SelectComponent.vue_vue_type_script_setup_true_lang-BL1jpiXN.js";
|
|
3
3
|
import { u as se, a as $e } from "./vue-i18n-DVWuTfed.js";
|
|
4
|
-
import { _ as Se } from "./Default.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { _ as Se } from "./Default.vue_vue_type_script_setup_true_lang-hNq60-4a.js";
|
|
5
5
|
import { u as Re } from "./message-dialog-UoMWOnil.js";
|
|
6
|
-
import { u as Pe } from "./GlobalFilterSelect.vue_vue_type_script_setup_true_lang-
|
|
6
|
+
import { u as Pe } from "./GlobalFilterSelect.vue_vue_type_script_setup_true_lang-DlXK3vKk.js";
|
|
7
7
|
import { r as ae } from "./i18n-CI_sQ5d_.js";
|
|
8
8
|
import { useBreakpoints as ze, useSnackbar as De, components as Ie, FmButtonColorThemeVariant as Ne } from "@feedmepos/ui-library";
|
|
9
9
|
import { useRouter as Oe, useRoute as Be } from "vue-router";
|
|
10
10
|
import { storeToRefs as Ee } from "pinia";
|
|
11
|
-
import { g as Ke } from "./app-
|
|
11
|
+
import { g as Ke } from "./app-BqaaLhp5.js";
|
|
12
12
|
const Me = { class: "flex flex-col h-full" }, Ue = ["src"], je = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Ae = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary text-center" }, He = /* @__PURE__ */ re({
|
|
13
13
|
__name: "NoTemplate",
|
|
14
14
|
props: {
|
|
@@ -21,11 +21,11 @@ const Me = { class: "flex flex-col h-full" }, Ue = ["src"], je = { class: "fm-ty
|
|
|
21
21
|
function o(d) {
|
|
22
22
|
return c(d) ? w(d) : d;
|
|
23
23
|
}
|
|
24
|
-
const
|
|
24
|
+
const C = p(() => o(i.title)), D = p(() => o(i.subTitle));
|
|
25
25
|
return (d, u) => {
|
|
26
26
|
const $ = g("FmCard");
|
|
27
27
|
return _(), H("div", Me, [
|
|
28
|
-
|
|
28
|
+
Te(d.$slots, "menu"),
|
|
29
29
|
n($, {
|
|
30
30
|
class: "p-24 h-full flex flex-col gap-2 items-center justify-center",
|
|
31
31
|
variant: "flat"
|
|
@@ -37,7 +37,7 @@ const Me = { class: "flex flex-col h-full" }, Ue = ["src"], je = { class: "fm-ty
|
|
|
37
37
|
alt: "No data illustration",
|
|
38
38
|
class: "mb-4 w-80 h-80"
|
|
39
39
|
}, null, 8, Ue)) : ne("", !0),
|
|
40
|
-
m("p", je, y(
|
|
40
|
+
m("p", je, y(C.value), 1),
|
|
41
41
|
m("p", Ae, y(D.value), 1)
|
|
42
42
|
]),
|
|
43
43
|
_: 1
|
|
@@ -48,7 +48,7 @@ const Me = { class: "flex flex-col h-full" }, Ue = ["src"], je = { class: "fm-ty
|
|
|
48
48
|
}), qe = { class: "flex items-center gap-2" }, Ge = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Je = { class: "w-[343px]" }, Qe = { class: "flex items-center gap-2" }, We = { class: "fm-typo-en-body-md-600" }, Xe = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ye = { class: "fm-typo-en-title-sm-600" }, Ze = { class: "flex flex-col gap-3" }, ut = /* @__PURE__ */ re({
|
|
49
49
|
__name: "Template",
|
|
50
50
|
setup(q) {
|
|
51
|
-
const w = Pe(), { isAdmin: c } = Ke(), { breakpoints: i } = ze(), { t: o, te:
|
|
51
|
+
const w = Pe(), { isAdmin: c } = Ke(), { breakpoints: i } = ze(), { t: o, te: C } = se(), D = Oe(), d = Be(), u = De(), { promptLoader: $ } = $e(), { promptMessage: G } = Re(), { FmButton: I, FmMenu: N, FmMenuItem: k, FmIcon: O, FmChip: B, FmSearch: ie, FmTooltip: me } = Ie, { editingReport: ce, reportTemplates: ue, categories: pe } = Ee(w), E = p(() => pe.value ?? []), J = p(() => ue.value ?? []), K = p(() => [
|
|
52
52
|
{
|
|
53
53
|
label: o("report.common.all"),
|
|
54
54
|
value: void 0
|
|
@@ -77,8 +77,8 @@ const Me = { class: "flex flex-col h-full" }, Ue = ["src"], je = { class: "fm-ty
|
|
|
77
77
|
const f = E.value.find((j) => j.id === a.category);
|
|
78
78
|
return {
|
|
79
79
|
id: a.id,
|
|
80
|
-
name: ae(o,
|
|
81
|
-
description: ae(o,
|
|
80
|
+
name: ae(o, C, Q(a), "other"),
|
|
81
|
+
description: ae(o, C, a.description || "", "other"),
|
|
82
82
|
categoryId: a.category || "",
|
|
83
83
|
categoryLabel: f ? M(f.name) : e,
|
|
84
84
|
isOwner: a.isOwner ?? !1
|
|
@@ -168,7 +168,7 @@ const Me = { class: "flex flex-col h-full" }, Ue = ["src"], je = { class: "fm-ty
|
|
|
168
168
|
]);
|
|
169
169
|
function M(t) {
|
|
170
170
|
const e = `report.category.${t}`;
|
|
171
|
-
return
|
|
171
|
+
return C(e) ? o(e) : t;
|
|
172
172
|
}
|
|
173
173
|
function ye(t) {
|
|
174
174
|
return t.id;
|
|
@@ -222,7 +222,7 @@ const Me = { class: "flex flex-col h-full" }, Ue = ["src"], je = { class: "fm-ty
|
|
|
222
222
|
return;
|
|
223
223
|
}
|
|
224
224
|
await G({
|
|
225
|
-
title: o("report.messages.
|
|
225
|
+
title: o("report.messages.deleteTemplate"),
|
|
226
226
|
message: o("report.messages.confirmDelete", { name: e.name })
|
|
227
227
|
}) && await $(async () => {
|
|
228
228
|
await w.removeReportTemplates(e), u.open({
|
|
@@ -271,7 +271,7 @@ const Me = { class: "flex flex-col h-full" }, Ue = ["src"], je = { class: "fm-ty
|
|
|
271
271
|
});
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
|
-
return
|
|
274
|
+
return Ce(async () => {
|
|
275
275
|
await w.getReportTemplates();
|
|
276
276
|
}), (t, e) => {
|
|
277
277
|
const a = g("FmPageHead"), f = g("FmForm"), j = g("FmListItem"), we = g("FmList"), xe = g("FmTable"), ee = g("FmTextField"), he = g("FmDialog");
|
|
@@ -303,11 +303,11 @@ const Me = { class: "flex flex-col h-full" }, Ue = ["src"], je = { class: "fm-ty
|
|
|
303
303
|
_: 1
|
|
304
304
|
}, 8, ["title"]),
|
|
305
305
|
m("div", {
|
|
306
|
-
class:
|
|
306
|
+
class: T(`overflow-y-hidden flex flex-col gap-8 ${l(i).sm || l(i).xs ? "mb-20" : ""}`),
|
|
307
307
|
style: ke({ height: `calc(100% - ${l(i).lg || l(i).md ? 72 : 64}px)` })
|
|
308
308
|
}, [
|
|
309
309
|
n(f, {
|
|
310
|
-
class:
|
|
310
|
+
class: T(`flex items-center gap-2 ${l(i).sm || l(i).xs ? "px-3" : "px-24"}`)
|
|
311
311
|
}, {
|
|
312
312
|
default: s(() => [
|
|
313
313
|
n(l(N), null, {
|
|
@@ -330,7 +330,7 @@ const Me = { class: "flex flex-col h-full" }, Ue = ["src"], je = { class: "fm-ty
|
|
|
330
330
|
_: 1
|
|
331
331
|
}),
|
|
332
332
|
m("div", {
|
|
333
|
-
class:
|
|
333
|
+
class: T(`flex ${l(i).sm || l(i).xs ? "justify-center items-center" : ""}`)
|
|
334
334
|
}, [
|
|
335
335
|
m("p", Ge, y(l(o)("report.common.results", { count: h.value.length })), 1)
|
|
336
336
|
], 2),
|
|
@@ -339,7 +339,7 @@ const Me = { class: "flex flex-col h-full" }, Ue = ["src"], je = { class: "fm-ty
|
|
|
339
339
|
n(l(ie), {
|
|
340
340
|
modelValue: P.value,
|
|
341
341
|
"onUpdate:modelValue": e[0] || (e[0] = (r) => P.value = r),
|
|
342
|
-
class:
|
|
342
|
+
class: T(`${l(i).lg || l(i).md ? "grow" : ""}`)
|
|
343
343
|
}, null, 8, ["modelValue", "class"])
|
|
344
344
|
])
|
|
345
345
|
]),
|
|
@@ -348,7 +348,7 @@ const Me = { class: "flex flex-col h-full" }, Ue = ["src"], je = { class: "fm-ty
|
|
|
348
348
|
te((_(), z(xe, {
|
|
349
349
|
key: ve.value,
|
|
350
350
|
ref: "table",
|
|
351
|
-
class:
|
|
351
|
+
class: T([l(i).sm || l(i).xs ? "px-0" : "px-24", "report-table"]),
|
|
352
352
|
style: { height: "calc(100% - 40px)" },
|
|
353
353
|
"column-defs": ge.value,
|
|
354
354
|
"row-data": h.value,
|
|
@@ -370,7 +370,7 @@ const Me = { class: "flex flex-col h-full" }, Ue = ["src"], je = { class: "fm-ty
|
|
|
370
370
|
append: s(() => [
|
|
371
371
|
m("div", Qe, [
|
|
372
372
|
n(l(B), {
|
|
373
|
-
class:
|
|
373
|
+
class: T(
|
|
374
374
|
r.categoryLabel !== l(o)("report.common.uncategorized") ? "bg-fm-color-system-info-100 text-fm-color-typo-info" : "text-fm-color-typo-secondary"
|
|
375
375
|
),
|
|
376
376
|
compact: !0
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { defineComponent as ie, mergeModels as pe, useModel as fe, computed as T, ref as oe, resolveComponent as $, createElementBlock as H, openBlock as f, createVNode as u, createElementVNode as C, unref as l, withCtx as G, toDisplayString as Q, Fragment as ue, renderList as xe, withModifiers as ye, createTextVNode as Le, watch as he, createCommentVNode as O, createBlock as N, onUnmounted as Nl, renderSlot as dl, onMounted as Ke, onBeforeUnmount as ml, resolveDynamicComponent as cl, normalizeClass as ke, withDirectives as Ce, vShow as we, withKeys as ol, vModelText as jl, normalizeStyle as He, isRef as zl } from "vue";
|
|
2
2
|
import { useRoute as Rl, useRouter as Il } from "vue-router";
|
|
3
|
-
import { h as Pl, d as Ie, S as Ye, a as El, W as Xl, c as Wl, T as ql, b as Hl } from "./TransitionFade-
|
|
4
|
-
import { W as K, a as pl, e as Ae, D as Yl, S as tl, C as Gl, u as vl, P as al, d as Jl, b as Kl } from "./GlobalFilterSelect.vue_vue_type_script_setup_true_lang-
|
|
3
|
+
import { h as Pl, d as Ie, S as Ye, a as El, W as Xl, c as Wl, T as ql, b as Hl } from "./TransitionFade-BF6eUEkd.js";
|
|
4
|
+
import { W as K, a as pl, e as Ae, D as Yl, S as tl, C as Gl, u as vl, P as al, d as Jl, b as Kl } from "./GlobalFilterSelect.vue_vue_type_script_setup_true_lang-DlXK3vKk.js";
|
|
5
5
|
import { storeToRefs as _e } from "pinia";
|
|
6
6
|
import { u as fl } from "./message-dialog-UoMWOnil.js";
|
|
7
7
|
import { useSnackbar as Ql, useBreakpoints as gl, FmButtonColorThemeVariant as nl } from "@feedmepos/ui-library";
|
|
8
8
|
import { a as ve, b as yl, _ as bl } from "./SelectComponent.vue_vue_type_script_setup_true_lang-BL1jpiXN.js";
|
|
9
9
|
import { u as me } from "./vue-i18n-DVWuTfed.js";
|
|
10
10
|
import { r as de } from "./i18n-CI_sQ5d_.js";
|
|
11
|
-
import { g as Se, u as je, R as il, L as Fe, a as Ne, S as ae, d as ce, b as We, c as sl, e as Zl, Y as eo, X as lo, _ as hl } from "./DynamicWidget.vue_vue_type_script_setup_true_lang-
|
|
12
|
-
import { a as De, d as ze } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-
|
|
13
|
-
import { a as oo, d as Oe } from "./app-
|
|
11
|
+
import { g as Se, u as je, R as il, L as Fe, a as Ne, S as ae, d as ce, b as We, c as sl, e as Zl, Y as eo, X as lo, _ as hl } from "./DynamicWidget.vue_vue_type_script_setup_true_lang-DQyuIexX.js";
|
|
12
|
+
import { a as De, d as ze } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-2Vg_kCAp.js";
|
|
13
|
+
import { a as oo, d as Oe } from "./app-BqaaLhp5.js";
|
|
14
14
|
const Pe = [
|
|
15
15
|
{
|
|
16
16
|
type: K.Circular,
|
|
@@ -3,11 +3,11 @@ import { u as Pt, a as Pn } from "./vue-i18n-DVWuTfed.js";
|
|
|
3
3
|
import { useCoreStore as Vn } from "@feedmepos/mf-common";
|
|
4
4
|
import { storeToRefs as Mn } from "pinia";
|
|
5
5
|
import { useRoute as Ln } from "vue-router";
|
|
6
|
-
import { W as F, I as Be, f as rn, h as an, c as De, g as Bn, e as $n } from "./GlobalFilterSelect.vue_vue_type_script_setup_true_lang-
|
|
7
|
-
import { p as Rn, a as ln, d as Xn } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-
|
|
6
|
+
import { W as F, I as Be, f as rn, h as an, c as De, g as Bn, e as $n } from "./GlobalFilterSelect.vue_vue_type_script_setup_true_lang-DlXK3vKk.js";
|
|
7
|
+
import { p as Rn, a as ln, d as Xn } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-2Vg_kCAp.js";
|
|
8
8
|
import { b as Vt, a as Wt } from "./SelectComponent.vue_vue_type_script_setup_true_lang-BL1jpiXN.js";
|
|
9
|
-
import { R as Yn } from "./DynamicWidget.vue_vue_type_script_setup_true_lang-
|
|
10
|
-
import { d as ht } from "./app-
|
|
9
|
+
import { R as Yn } from "./DynamicWidget.vue_vue_type_script_setup_true_lang-DQyuIexX.js";
|
|
10
|
+
import { d as ht } from "./app-BqaaLhp5.js";
|
|
11
11
|
import { r as Wn } from "./i18n-CI_sQ5d_.js";
|
|
12
12
|
import { useSnackbar as Un } from "@feedmepos/ui-library";
|
|
13
13
|
const jn = {
|