@feedmepos/mf-report 5.22.25 → 5.22.26
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-3HFmWp7u.js +298 -0
- package/dist/{BaseDialog.vue_vue_type_script_setup_true_lang-CD7LSCLM.js → BaseDialog.vue_vue_type_script_setup_true_lang-B2CdeeFj.js} +1128 -1292
- package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-BP474uxj.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-DlpbyWWd.js} +5 -5
- package/dist/{Default.vue_vue_type_script_setup_true_lang-C55xh4bx.js → Default.vue_vue_type_script_setup_true_lang-BUIcdcLn.js} +2 -2
- package/dist/{FilterSelector.vue_vue_type_script_setup_true_lang-D2K2ghV_.js → FilterSelector.vue_vue_type_script_setup_true_lang-jDZZAdUQ.js} +19 -19
- package/dist/InsightView-B8Wrd2SX.js +664 -0
- package/dist/{Integration-CAsNSCR4.js → Integration-D_jZxPMn.js} +40 -40
- package/dist/{Integrations-CIeyn0dF.js → Integrations-B1igzxZG.js} +14 -13
- package/dist/Layout-Dt6yE5XC.js +19 -0
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-CBY5Meyc.js → MenuTab.vue_vue_type_script_setup_true_lang-Dtv5xe0O.js} +13 -13
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-DsOmTqFV.js → NavigationTab.vue_vue_type_script_setup_true_lang-lfncwvdP.js} +24 -24
- package/dist/{NoData.vue_vue_type_script_setup_true_lang-BcdcgnzD.js → NoData.vue_vue_type_script_setup_true_lang-CDKHIlF2.js} +1 -1
- package/dist/OverviewView-hz2kZmm7.js +62 -0
- package/dist/{Report-CMYhrVbI.js → Report-nrJWlkN-.js} +15 -14
- package/dist/{ReportEditor-BU6Hq9yx.js → ReportEditor-YV-2UXDU.js} +24 -23
- package/dist/{ReportView-8F14F_jz.js → ReportView-CM1PfMk6.js} +18 -17
- package/dist/{SelectComponent.vue_vue_type_script_setup_true_lang-SWjNNZ_J.js → SelectComponent.vue_vue_type_script_setup_true_lang-Df40itH5.js} +1 -1
- package/dist/Setting-B1Xrl09c.js +326 -0
- package/dist/{TileEditor-BRHXTLEK.js → TileEditor-CF0aNTKV.js} +131 -131
- package/dist/{TransitionFade-DbsPAg2T.js → TransitionFade-D2bsz2iV.js} +12 -12
- package/dist/app-C2vt2B-i.js +11540 -0
- package/dist/app.js +1 -1
- package/dist/useRestaurantPermission-DRvKGVtO.js +65 -0
- package/dist/vue-i18n-DVWuTfed.js +2727 -0
- package/package.json +1 -1
- package/dist/App-C5_KJN8G.js +0 -294
- package/dist/InsightView-BCZKzqRM.js +0 -670
- package/dist/Layout-BFvrEBq5.js +0 -29
- package/dist/NoPermission.vue_vue_type_script_setup_true_lang-obph7BUZ.js +0 -25
- package/dist/OverviewView-gvsp6532.js +0 -63
- package/dist/Setting-BtWmZpk0.js +0 -328
- package/dist/app-WBPZfxon.js +0 -6658
- package/dist/useRestaurantPermission-BtPLwoC9.js +0 -64
- package/dist/vue-i18n-CvU0g5WR.js +0 -7253
|
@@ -1,670 +0,0 @@
|
|
|
1
|
-
import { ref as V, defineComponent as S, watch as T, computed as $, onMounted as oe, createElementBlock as u, openBlock as o, createElementVNode as a, renderSlot as X, toDisplayString as x, resolveDirective as G, createCommentVNode as F, Fragment as j, renderList as P, createBlock as A, withDirectives as M, resolveDynamicComponent as E, unref as f, withCtx as B, createVNode as p, normalizeClass as L, resolveComponent as R, useModel as se, createTextVNode as ne, isRef as z, nextTick as ie } from "vue";
|
|
2
|
-
import { _ as re } from "./Default.vue_vue_type_script_setup_true_lang-C55xh4bx.js";
|
|
3
|
-
import { _ as de } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-BP474uxj.js";
|
|
4
|
-
import { a as O, q as J, F as K, u as Q, g as Z, b as ce } from "./vue-i18n-CvU0g5WR.js";
|
|
5
|
-
import { storeToRefs as N } from "pinia";
|
|
6
|
-
import { d as W } from "./app-WBPZfxon.js";
|
|
7
|
-
import { C as ee, r as ue } from "./chart-DDDh8zNk.js";
|
|
8
|
-
import { components as U, useSnackbar as fe } from "@feedmepos/ui-library";
|
|
9
|
-
import { _ as me } from "./NoData.vue_vue_type_script_setup_true_lang-BcdcgnzD.js";
|
|
10
|
-
import { a as ge, G as pe } from "./NavigationTab.vue_vue_type_script_setup_true_lang-DsOmTqFV.js";
|
|
11
|
-
import { useCoreStore as ye } from "@feedmepos/mf-common";
|
|
12
|
-
import { _ as he } from "./NoPermission.vue_vue_type_script_setup_true_lang-obph7BUZ.js";
|
|
13
|
-
import { u as ve } from "./BaseDialog.vue_vue_type_script_setup_true_lang-CD7LSCLM.js";
|
|
14
|
-
function xe({ start: e, end: t }) {
|
|
15
|
-
return `${W(t).format("DD MMM")}, ${W(t).format("YYYY")}`;
|
|
16
|
-
}
|
|
17
|
-
V(!0);
|
|
18
|
-
const we = async (e) => {
|
|
19
|
-
const { businessId: t } = N(O());
|
|
20
|
-
if (t) {
|
|
21
|
-
const l = {
|
|
22
|
-
fetchType: K.Post,
|
|
23
|
-
url: `${t.value}/insights`,
|
|
24
|
-
data: {
|
|
25
|
-
...e,
|
|
26
|
-
isAnomaly: !0
|
|
27
|
-
// isAnomaly: anomaly.value
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
return J.fetch(l);
|
|
31
|
-
} else
|
|
32
|
-
return Promise.reject(new Error("Business Id is not defined"));
|
|
33
|
-
}, be = async (e) => {
|
|
34
|
-
const { businessId: t } = O(), l = {
|
|
35
|
-
fetchType: K.Post,
|
|
36
|
-
url: `${t}/insights/feedbacks`,
|
|
37
|
-
data: e
|
|
38
|
-
};
|
|
39
|
-
return J.fetch(l);
|
|
40
|
-
};
|
|
41
|
-
ee.register(...ue);
|
|
42
|
-
const ke = { class: "flex flex-col h-full overflow-hidden" }, Ce = { class: "flex flex-col gap-8" }, _e = { class: "fm-color-typo-primary fm-typo-en-body-lg-400" }, $e = { class: "fm-color-typo-secondary fm-typo-en-body-md-400" }, Ae = { class: "grow" }, Fe = /* @__PURE__ */ S({
|
|
43
|
-
__name: "LineChart",
|
|
44
|
-
props: {
|
|
45
|
-
name: { default: void 0 },
|
|
46
|
-
paragraph: { default: void 0 },
|
|
47
|
-
datasets: {},
|
|
48
|
-
xAxis: {},
|
|
49
|
-
transpose: { type: Boolean, default: !1 },
|
|
50
|
-
stacked: { type: Boolean },
|
|
51
|
-
maintainAspectRatio: { type: Boolean },
|
|
52
|
-
hideXAxis: { type: Boolean, default: void 0 },
|
|
53
|
-
hideYAxis: { type: Boolean, default: void 0 },
|
|
54
|
-
legend: { default: void 0 }
|
|
55
|
-
},
|
|
56
|
-
setup(e) {
|
|
57
|
-
const t = e, l = V(null);
|
|
58
|
-
let i = null;
|
|
59
|
-
T(
|
|
60
|
-
[
|
|
61
|
-
() => t.transpose,
|
|
62
|
-
() => t.maintainAspectRatio,
|
|
63
|
-
() => t.hideXAxis,
|
|
64
|
-
() => t.hideYAxis,
|
|
65
|
-
() => t.legend
|
|
66
|
-
],
|
|
67
|
-
() => {
|
|
68
|
-
i && i.config.options && (i.destroy(), m());
|
|
69
|
-
}
|
|
70
|
-
);
|
|
71
|
-
const n = $(() => t.transpose ? "y" : "x"), y = $(() => ({
|
|
72
|
-
labels: t.xAxis.categories,
|
|
73
|
-
datasets: t.datasets.map((r) => ({
|
|
74
|
-
...r,
|
|
75
|
-
borderDash: r.dash ? [5, 5] : void 0,
|
|
76
|
-
tension: r.tension || 0.1
|
|
77
|
-
}))
|
|
78
|
-
}));
|
|
79
|
-
T(
|
|
80
|
-
y,
|
|
81
|
-
() => {
|
|
82
|
-
i && (i.data = y.value, i.update());
|
|
83
|
-
},
|
|
84
|
-
{ deep: !0 }
|
|
85
|
-
);
|
|
86
|
-
function m() {
|
|
87
|
-
l.value && (i = new ee(l.value, {
|
|
88
|
-
type: "line",
|
|
89
|
-
data: y.value,
|
|
90
|
-
options: {
|
|
91
|
-
plugins: {
|
|
92
|
-
legend: t.legend || {
|
|
93
|
-
display: !0,
|
|
94
|
-
position: "bottom",
|
|
95
|
-
maxHeight: 60,
|
|
96
|
-
labels: {
|
|
97
|
-
usePointStyle: !0,
|
|
98
|
-
pointStyle: "line"
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
maintainAspectRatio: t.maintainAspectRatio,
|
|
103
|
-
responsive: !0,
|
|
104
|
-
indexAxis: n.value,
|
|
105
|
-
scales: {
|
|
106
|
-
x: {
|
|
107
|
-
display: !t.hideXAxis,
|
|
108
|
-
stacked: t.stacked,
|
|
109
|
-
grid: {
|
|
110
|
-
display: !1
|
|
111
|
-
},
|
|
112
|
-
beginAtZero: !0
|
|
113
|
-
},
|
|
114
|
-
y: {
|
|
115
|
-
display: !t.hideYAxis,
|
|
116
|
-
stacked: t.stacked,
|
|
117
|
-
grid: {
|
|
118
|
-
display: !0
|
|
119
|
-
},
|
|
120
|
-
position: "right",
|
|
121
|
-
beginAtZero: !0
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
elements: {
|
|
125
|
-
line: {
|
|
126
|
-
borderWidth: 1.5
|
|
127
|
-
},
|
|
128
|
-
point: {
|
|
129
|
-
radius: 0,
|
|
130
|
-
hitRadius: 30,
|
|
131
|
-
hoverRadius: 6,
|
|
132
|
-
hoverBackgroundColor: "#FFFFFF",
|
|
133
|
-
hoverBorderWidth: 3
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}));
|
|
138
|
-
}
|
|
139
|
-
return oe(() => {
|
|
140
|
-
m();
|
|
141
|
-
}), (r, w) => (o(), u("div", ke, [
|
|
142
|
-
a("div", Ce, [
|
|
143
|
-
X(r.$slots, "title"),
|
|
144
|
-
a("div", _e, x(r.name), 1),
|
|
145
|
-
a("div", $e, x(r.paragraph), 1)
|
|
146
|
-
]),
|
|
147
|
-
a("div", Ae, [
|
|
148
|
-
a("canvas", {
|
|
149
|
-
ref_key: "canvas",
|
|
150
|
-
ref: l
|
|
151
|
-
}, null, 512)
|
|
152
|
-
])
|
|
153
|
-
]));
|
|
154
|
-
}
|
|
155
|
-
}), Ie = ["width", "height"], Ve = ["fill"], Be = ["fill"], Se = ["stroke"], Re = ["stroke"], te = /* @__PURE__ */ S({
|
|
156
|
-
__name: "SparkIcon",
|
|
157
|
-
props: {
|
|
158
|
-
size: {
|
|
159
|
-
type: Number,
|
|
160
|
-
default: 24
|
|
161
|
-
},
|
|
162
|
-
color: {
|
|
163
|
-
type: String,
|
|
164
|
-
default: "#6B6B6B"
|
|
165
|
-
}
|
|
166
|
-
},
|
|
167
|
-
setup(e) {
|
|
168
|
-
const t = e, l = $(() => `${t.size}px`);
|
|
169
|
-
return (i, n) => (o(), u("svg", {
|
|
170
|
-
width: l.value,
|
|
171
|
-
height: l.value,
|
|
172
|
-
viewBox: "0 0 24 24",
|
|
173
|
-
fill: "none",
|
|
174
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
175
|
-
}, [
|
|
176
|
-
a("path", {
|
|
177
|
-
d: "M7.6 7.6C8.17076 6.94229 8.5 5.5 8.5 5.5C8.5 5.5 8.81356 6.87361 9.35714 7.5C9.92948 8.15953 11.5 8.5 11.5 8.5C11.5 8.5 9.92948 8.69761 9.35714 9.35714C8.81356 9.98354 8.5 11.5 8.5 11.5C8.5 11.5 8.32076 10.1888 7.75 9.59091C7.14905 8.96136 5.5 8.5 5.5 8.5C5.5 8.5 6.99905 8.29251 7.6 7.6Z",
|
|
178
|
-
fill: t.color
|
|
179
|
-
}, null, 8, Ve),
|
|
180
|
-
a("path", {
|
|
181
|
-
d: "M12.2 12.2C13.3415 10.8846 14 8 14 8C14 8 14.6271 10.7472 15.7143 12C16.859 13.3191 20 14 20 14C20 14 16.859 14.3952 15.7143 15.7143C14.6271 16.9671 14 20 14 20C14 20 13.6415 17.3777 12.5 16.1818C11.2981 14.9227 8 14 8 14C8 14 10.9981 13.585 12.2 12.2Z",
|
|
182
|
-
fill: t.color
|
|
183
|
-
}, null, 8, Be),
|
|
184
|
-
a("path", {
|
|
185
|
-
d: "M7.6 7.6C8.17076 6.94229 8.5 5.5 8.5 5.5C8.5 5.5 8.81356 6.87361 9.35714 7.5C9.92948 8.15953 11.5 8.5 11.5 8.5C11.5 8.5 9.92948 8.69761 9.35714 9.35714C8.81356 9.98354 8.5 11.5 8.5 11.5C8.5 11.5 8.32076 10.1888 7.75 9.59091C7.14905 8.96136 5.5 8.5 5.5 8.5C5.5 8.5 6.99905 8.29251 7.6 7.6Z",
|
|
186
|
-
stroke: t.color,
|
|
187
|
-
"stroke-width": "1.5",
|
|
188
|
-
"stroke-linecap": "round",
|
|
189
|
-
"stroke-linejoin": "round"
|
|
190
|
-
}, null, 8, Se),
|
|
191
|
-
a("path", {
|
|
192
|
-
d: "M12.2 12.2C13.3415 10.8846 14 8 14 8C14 8 14.6271 10.7472 15.7143 12C16.859 13.3191 20 14 20 14C20 14 16.859 14.3952 15.7143 15.7143C14.6271 16.9671 14 20 14 20C14 20 13.6415 17.3777 12.5 16.1818C11.2981 14.9227 8 14 8 14C8 14 10.9981 13.585 12.2 12.2Z",
|
|
193
|
-
stroke: t.color,
|
|
194
|
-
"stroke-width": "1.5",
|
|
195
|
-
"stroke-linecap": "round",
|
|
196
|
-
"stroke-linejoin": "round"
|
|
197
|
-
}, null, 8, Re)
|
|
198
|
-
], 8, Ie));
|
|
199
|
-
}
|
|
200
|
-
}), De = { class: "flex flex-col gap-16" }, Me = { class: "fm-typo-en-title-sm-600" }, Le = { class: "flex justify-center items-center" }, Te = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, je = {
|
|
201
|
-
key: 0,
|
|
202
|
-
class: "rounded-lg p-2"
|
|
203
|
-
}, ze = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary text-wrap" }, Pe = { key: 0 }, Ne = {
|
|
204
|
-
key: 0,
|
|
205
|
-
class: "flex justify-center w-full gap-8"
|
|
206
|
-
}, We = ["onClick"], q = /* @__PURE__ */ S({
|
|
207
|
-
__name: "CarouselCard",
|
|
208
|
-
props: {
|
|
209
|
-
title: {
|
|
210
|
-
type: String,
|
|
211
|
-
default: ""
|
|
212
|
-
},
|
|
213
|
-
items: {
|
|
214
|
-
type: Array,
|
|
215
|
-
default: () => []
|
|
216
|
-
}
|
|
217
|
-
},
|
|
218
|
-
setup(e) {
|
|
219
|
-
const t = V(0), l = V(), i = e;
|
|
220
|
-
function n(m) {
|
|
221
|
-
var r;
|
|
222
|
-
if (l.value) {
|
|
223
|
-
const w = (((r = l.value) == null ? void 0 : r.scrollWidth) ?? 1) / i.items.length;
|
|
224
|
-
l.value.scrollLeft = w * m;
|
|
225
|
-
}
|
|
226
|
-
t.value = m;
|
|
227
|
-
}
|
|
228
|
-
T(
|
|
229
|
-
() => l.value,
|
|
230
|
-
() => {
|
|
231
|
-
var m;
|
|
232
|
-
if (l.value) {
|
|
233
|
-
const r = ((((m = l.value) == null ? void 0 : m.scrollWidth) ?? 1) - 400) / i.items.length;
|
|
234
|
-
l.value.addEventListener("scroll", () => {
|
|
235
|
-
var h;
|
|
236
|
-
const w = Math.floor((((h = l.value) == null ? void 0 : h.scrollLeft) ?? 1) / r);
|
|
237
|
-
t.value = w;
|
|
238
|
-
});
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
);
|
|
242
|
-
const { FmTooltip: y } = U;
|
|
243
|
-
return (m, r) => {
|
|
244
|
-
const w = G("wave");
|
|
245
|
-
return o(), u("div", De, [
|
|
246
|
-
a("p", Me, x(i.title), 1),
|
|
247
|
-
a("div", {
|
|
248
|
-
ref_key: "scroll",
|
|
249
|
-
ref: l,
|
|
250
|
-
class: "flex gap-8 overflow-x-scroll snap-x snap-mandatory w-full scrollbar-hide"
|
|
251
|
-
}, [
|
|
252
|
-
(o(!0), u(j, null, P(i.items, (h, b) => (o(), u("div", {
|
|
253
|
-
key: `reason_${b}`,
|
|
254
|
-
class: "min-w-[368px] border rounded-lg p-16 snap-always snap-center flex gap-8 flex-col"
|
|
255
|
-
}, [
|
|
256
|
-
a("div", Le, [
|
|
257
|
-
(o(), A(E(h.defination ? f(y) : "div"), {
|
|
258
|
-
content: h.defination,
|
|
259
|
-
"z-index": 100
|
|
260
|
-
}, {
|
|
261
|
-
default: B(() => [
|
|
262
|
-
a("p", Te, x(h.header), 1)
|
|
263
|
-
]),
|
|
264
|
-
_: 2
|
|
265
|
-
}, 1032, ["content"])),
|
|
266
|
-
r[0] || (r[0] = a("div", { class: "grow" }, null, -1)),
|
|
267
|
-
h.header === "Introduce Kid-Friendly Menu Items" ? M((o(), u("button", je, [
|
|
268
|
-
p(te, { size: 22 })
|
|
269
|
-
])), [
|
|
270
|
-
[w, !0]
|
|
271
|
-
]) : F("", !0)
|
|
272
|
-
]),
|
|
273
|
-
a("p", ze, x(h.subLabel), 1)
|
|
274
|
-
]))), 128)),
|
|
275
|
-
i.items.length === 0 ? (o(), u("div", Pe, [
|
|
276
|
-
a("p", null, "No " + x(i.title.toLowerCase()) + " at the moment", 1)
|
|
277
|
-
])) : F("", !0)
|
|
278
|
-
], 512),
|
|
279
|
-
e.items.length > 1 ? (o(), u("div", Ne, [
|
|
280
|
-
(o(!0), u(j, null, P(e.items, (h, b) => (o(), u("span", {
|
|
281
|
-
key: `carousel_${b}`,
|
|
282
|
-
class: L([
|
|
283
|
-
"w-[11px] h-[11px] rounded-lg cursor-pointer",
|
|
284
|
-
b === t.value ? " bg-fm-color-neutral-gray-300" : "bg-fm-color-neutral-gray-100"
|
|
285
|
-
]),
|
|
286
|
-
onClick: (v) => n(b)
|
|
287
|
-
}, null, 10, We))), 128))
|
|
288
|
-
])) : F("", !0)
|
|
289
|
-
]);
|
|
290
|
-
};
|
|
291
|
-
}
|
|
292
|
-
}), Ee = { class: "flex flex-col flex-grow gap-16" }, Ue = { class: "flex flex-row items-center gap-2" }, Ye = { class: "flex flex-row items-center justify-center gap-1" }, Ze = { class: "text-fm-color-typo-secondary fm-typo-en-body-lg-400" }, qe = { class: "flex flex-col fm-typo-en-body-lg-600" }, He = { class: "flex flex-col" }, Xe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ge = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Oe = {
|
|
293
|
-
key: 0,
|
|
294
|
-
style: { height: "240px" }
|
|
295
|
-
}, Je = {
|
|
296
|
-
key: 1,
|
|
297
|
-
class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
298
|
-
}, Ke = {
|
|
299
|
-
key: 0,
|
|
300
|
-
class: "flex flex-col gap-40"
|
|
301
|
-
}, Qe = {
|
|
302
|
-
key: 1,
|
|
303
|
-
class: "flex flex-row items-center justify-between"
|
|
304
|
-
}, et = { class: "fm-typo-en-body-lg-600" }, tt = { class: "flex flex-row items-center gap-8" }, H = /* @__PURE__ */ S({
|
|
305
|
-
__name: "InsightCard",
|
|
306
|
-
props: {
|
|
307
|
-
widget: {
|
|
308
|
-
type: Object,
|
|
309
|
-
default: () => null
|
|
310
|
-
},
|
|
311
|
-
detail: {
|
|
312
|
-
type: Boolean,
|
|
313
|
-
default: !1
|
|
314
|
-
}
|
|
315
|
-
},
|
|
316
|
-
emits: ["click-feedback"],
|
|
317
|
-
setup(e, { emit: t }) {
|
|
318
|
-
const { t: l } = Q(), i = $(() => e.widget.data.isAnomaly > 0 ? "bg-fm-color-system-success-100 text-fm-color-typo-success" : e.widget.data.isAnomaly < 0 ? "bg-fm-color-system-error-100 text-fm-color-typo-error" : ""), n = t;
|
|
319
|
-
function y(d) {
|
|
320
|
-
d === e.widget.feedback.reaction ? n("click-feedback", null) : n("click-feedback", d);
|
|
321
|
-
}
|
|
322
|
-
const m = $(() => {
|
|
323
|
-
const d = "rgb(66, 133, 244)";
|
|
324
|
-
let c = d;
|
|
325
|
-
return e.widget.data.isAnomaly > 0 ? c = "#1F7735" : e.widget.data.isAnomaly < 0 && (c = "#99231D"), [
|
|
326
|
-
{
|
|
327
|
-
label: "Anomaly",
|
|
328
|
-
data: e.widget.data.actualValues.map(
|
|
329
|
-
(g, C) => C >= e.widget.data.actualValues.length - 2 ? g : null
|
|
330
|
-
),
|
|
331
|
-
fill: !1,
|
|
332
|
-
borderColor: c,
|
|
333
|
-
borderWidth: 2,
|
|
334
|
-
pointRadius: function(g) {
|
|
335
|
-
return g.dataIndex === e.widget.data.actualValues.length - 1 ? 5 : 0;
|
|
336
|
-
},
|
|
337
|
-
pointStyle: "circle",
|
|
338
|
-
pointBackgroundColor: c
|
|
339
|
-
},
|
|
340
|
-
{
|
|
341
|
-
label: "Actual",
|
|
342
|
-
data: e.widget.data.actualValues.map(
|
|
343
|
-
(g, C) => C !== e.widget.data.actualValues.length - 1 ? g : null
|
|
344
|
-
),
|
|
345
|
-
fill: !1,
|
|
346
|
-
borderColor: d,
|
|
347
|
-
borderWidth: 2
|
|
348
|
-
},
|
|
349
|
-
{
|
|
350
|
-
label: "Expected",
|
|
351
|
-
data: e.widget.data.forecastValues,
|
|
352
|
-
fill: !1,
|
|
353
|
-
borderColor: "white",
|
|
354
|
-
borderWidth: 2
|
|
355
|
-
},
|
|
356
|
-
{
|
|
357
|
-
label: "Upper",
|
|
358
|
-
data: e.widget.data.upperBoundValues,
|
|
359
|
-
fill: 4,
|
|
360
|
-
backgroundColor: "rgba(66, 133, 244, 0.3)",
|
|
361
|
-
borderColor: "white"
|
|
362
|
-
},
|
|
363
|
-
{
|
|
364
|
-
label: "Lower",
|
|
365
|
-
legend: !1,
|
|
366
|
-
data: e.widget.data.lowerBoundValues,
|
|
367
|
-
color: "",
|
|
368
|
-
fill: !1,
|
|
369
|
-
borderColor: "white"
|
|
370
|
-
}
|
|
371
|
-
];
|
|
372
|
-
}), r = $(
|
|
373
|
-
() => e.widget.data.labels.map((d) => {
|
|
374
|
-
const c = W(d), _ = [c.format("DD MMM")], g = c.format("d");
|
|
375
|
-
return (g === "6" || g === "0") && _.push(c.format("ddd")), _;
|
|
376
|
-
})
|
|
377
|
-
), w = {
|
|
378
|
-
display: !0,
|
|
379
|
-
position: "bottom",
|
|
380
|
-
maxHeight: 54,
|
|
381
|
-
onClick: (d) => d.stopPropagation(),
|
|
382
|
-
labels: {
|
|
383
|
-
usePointStyle: !0,
|
|
384
|
-
filter: function(d, c) {
|
|
385
|
-
return !["Upper", "Lower", "Actual"].includes(
|
|
386
|
-
c.datasets[d.datasetIndex].label
|
|
387
|
-
);
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
}, h = $(() => ({ categories: r.value }));
|
|
391
|
-
$(() => Z(e.widget.category));
|
|
392
|
-
const b = $(() => "The total money earned from all customer purchases, including sales, service charges, rounding, and delivery fees, minus any discounts. Revenue = gross sales - discounts + SST + service charge + rounding + delivery fee"), { FmTooltip: v } = U;
|
|
393
|
-
return (d, c) => {
|
|
394
|
-
var D, k;
|
|
395
|
-
const _ = R("FmChip"), g = R("FmIcon"), C = G("wave");
|
|
396
|
-
return o(), u("div", {
|
|
397
|
-
class: L(["flex flex-col gap-40 overflow-y-scroll relative scrollbar-hide", e.detail ? "max-w-[515px]" : "max-w-[368px]"])
|
|
398
|
-
}, [
|
|
399
|
-
M((o(), u("div", {
|
|
400
|
-
variant: "outlined",
|
|
401
|
-
class: L(["flex flex-col p-16 gap-16 relative border rounded-lg", e.detail ? "" : "cursor-pointer"])
|
|
402
|
-
}, [
|
|
403
|
-
a("div", Ee, [
|
|
404
|
-
a("div", Ue, [
|
|
405
|
-
a("div", Ye, [
|
|
406
|
-
p(te, { size: 22 }),
|
|
407
|
-
a("div", Ze, x(f(l)("report.view.insight.title")), 1)
|
|
408
|
-
]),
|
|
409
|
-
p(_, {
|
|
410
|
-
compact: "",
|
|
411
|
-
label: f(l)(`report.category.${f(Z)(e.widget.category)}`),
|
|
412
|
-
class: "bg-fm-color-system-info-100 text-fm-color-typo-info"
|
|
413
|
-
}, null, 8, ["label"]),
|
|
414
|
-
p(_, {
|
|
415
|
-
class: L(i.value),
|
|
416
|
-
compact: "",
|
|
417
|
-
label: e.widget.data.isAnomaly !== 0 ? f(l)("report.view.insight.status.abnormal") : f(l)("report.view.insight.status.normal")
|
|
418
|
-
}, null, 8, ["class", "label"])
|
|
419
|
-
]),
|
|
420
|
-
(o(), A(E(e.detail ? f(v) : "div"), {
|
|
421
|
-
content: b.value,
|
|
422
|
-
"z-index": 100
|
|
423
|
-
}, {
|
|
424
|
-
default: B(() => [
|
|
425
|
-
a("div", qe, x(e.widget.title), 1)
|
|
426
|
-
]),
|
|
427
|
-
_: 1
|
|
428
|
-
}, 8, ["content"])),
|
|
429
|
-
a("div", He, [
|
|
430
|
-
a("div", Xe, x(e.widget.restaurantName), 1),
|
|
431
|
-
a("div", Ge, x(f(xe)(e.widget.dateRange)), 1)
|
|
432
|
-
])
|
|
433
|
-
]),
|
|
434
|
-
e.detail ? (o(), u("div", Oe, [
|
|
435
|
-
p(Fe, {
|
|
436
|
-
datasets: m.value,
|
|
437
|
-
"x-axis": h.value,
|
|
438
|
-
legend: w,
|
|
439
|
-
"maintain-aspect-ratio": !1
|
|
440
|
-
}, null, 8, ["datasets", "x-axis"])
|
|
441
|
-
])) : F("", !0),
|
|
442
|
-
e.detail ? (o(), u("div", Je, x(e.widget.description), 1)) : F("", !0)
|
|
443
|
-
], 2)), [
|
|
444
|
-
[C, !e.detail]
|
|
445
|
-
]),
|
|
446
|
-
e.detail && e.widget.data.isAnomaly < 0 ? (o(), u("div", Ke, [
|
|
447
|
-
p(q, {
|
|
448
|
-
title: f(l)("report.view.insight.reason"),
|
|
449
|
-
items: (D = e.widget.data.recommendations) == null ? void 0 : D.map((s) => ({
|
|
450
|
-
header: s.label,
|
|
451
|
-
subLabel: s.reason.replace(s.metric, s.label),
|
|
452
|
-
defination: s.definition
|
|
453
|
-
}))
|
|
454
|
-
}, null, 8, ["title", "items"]),
|
|
455
|
-
p(q, {
|
|
456
|
-
title: f(l)("report.view.insight.recommendation"),
|
|
457
|
-
items: (k = e.widget.data.recommendations) == null ? void 0 : k.map((s) => ({
|
|
458
|
-
header: s.label,
|
|
459
|
-
subLabel: s.recommendation,
|
|
460
|
-
defination: s.definition
|
|
461
|
-
}))
|
|
462
|
-
}, null, 8, ["title", "items"])
|
|
463
|
-
])) : F("", !0),
|
|
464
|
-
e.detail ? (o(), u("div", Qe, [
|
|
465
|
-
a("div", et, x(f(l)("report.view.insight.feedback.question")), 1),
|
|
466
|
-
a("div", tt, [
|
|
467
|
-
M(p(g, {
|
|
468
|
-
class: "cursor-pointer p-4 icon-btn",
|
|
469
|
-
name: "thumb_up",
|
|
470
|
-
size: "md",
|
|
471
|
-
outline: e.widget.feedback.reaction !== !0,
|
|
472
|
-
onClick: c[0] || (c[0] = () => y(!0))
|
|
473
|
-
}, null, 8, ["outline"]), [
|
|
474
|
-
[C, !0]
|
|
475
|
-
]),
|
|
476
|
-
M(p(g, {
|
|
477
|
-
class: "cursor-pointer p-4 icon-btn",
|
|
478
|
-
name: "thumb_down",
|
|
479
|
-
size: "md",
|
|
480
|
-
outline: e.widget.feedback.reaction !== !1,
|
|
481
|
-
onClick: c[1] || (c[1] = () => y(!1))
|
|
482
|
-
}, null, 8, ["outline"]), [
|
|
483
|
-
[C, !0]
|
|
484
|
-
])
|
|
485
|
-
])
|
|
486
|
-
])) : F("", !0)
|
|
487
|
-
], 2);
|
|
488
|
-
};
|
|
489
|
-
}
|
|
490
|
-
}), lt = { class: "flex w-full justify-between items-center" }, at = /* @__PURE__ */ S({
|
|
491
|
-
__name: "SidePanel",
|
|
492
|
-
props: {
|
|
493
|
-
modelValue: { type: Boolean, required: !0 },
|
|
494
|
-
modelModifiers: {}
|
|
495
|
-
},
|
|
496
|
-
emits: ["update:modelValue"],
|
|
497
|
-
setup(e) {
|
|
498
|
-
const t = se(e, "modelValue"), { FmSideSheet: l } = U;
|
|
499
|
-
return (i, n) => {
|
|
500
|
-
const y = R("FmButton");
|
|
501
|
-
return o(), A(E(f(l)), {
|
|
502
|
-
modelValue: t.value,
|
|
503
|
-
"onUpdate:modelValue": n[1] || (n[1] = (m) => t.value = m),
|
|
504
|
-
"fullscreen-size": "sm",
|
|
505
|
-
"dismiss-away": !0,
|
|
506
|
-
"max-width": 512
|
|
507
|
-
}, {
|
|
508
|
-
"side-sheet-header": B(() => n[2] || (n[2] = [
|
|
509
|
-
ne("Insight")
|
|
510
|
-
])),
|
|
511
|
-
"top-sheet-header": B(() => [
|
|
512
|
-
a("div", lt, [
|
|
513
|
-
n[3] || (n[3] = a("p", null, "Insight", -1)),
|
|
514
|
-
p(y, {
|
|
515
|
-
icon: "close",
|
|
516
|
-
variant: "tertiary",
|
|
517
|
-
onClick: n[0] || (n[0] = (m) => t.value = !1)
|
|
518
|
-
})
|
|
519
|
-
])
|
|
520
|
-
]),
|
|
521
|
-
default: B(() => [
|
|
522
|
-
X(i.$slots, "default")
|
|
523
|
-
]),
|
|
524
|
-
_: 3
|
|
525
|
-
}, 8, ["modelValue"]);
|
|
526
|
-
};
|
|
527
|
-
}
|
|
528
|
-
}), ot = { class: "flex flex-row px-24 justify-between items-center" }, st = { class: "flex flex-row items-center gap-2" }, nt = {
|
|
529
|
-
key: 0,
|
|
530
|
-
class: "h-full w-full flex items-center justify-center"
|
|
531
|
-
}, it = {
|
|
532
|
-
key: 1,
|
|
533
|
-
class: "h-full"
|
|
534
|
-
}, rt = {
|
|
535
|
-
key: 0,
|
|
536
|
-
class: "flex flex-row flex-wrap gap-24 px-24 py-16"
|
|
537
|
-
}, kt = /* @__PURE__ */ S({
|
|
538
|
-
__name: "InsightView",
|
|
539
|
-
setup(e) {
|
|
540
|
-
const { t } = Q(), l = ye(), i = ve(), {
|
|
541
|
-
dateRange: n,
|
|
542
|
-
compareDateRange: y,
|
|
543
|
-
locations: m,
|
|
544
|
-
selectedLocationIds: r,
|
|
545
|
-
selectedRestaurantIds: w,
|
|
546
|
-
business: h
|
|
547
|
-
} = N(ce()), { isInsightAccessible: b } = N(i), v = V([]), d = V(null), c = V(!1), _ = fe();
|
|
548
|
-
T(
|
|
549
|
-
h,
|
|
550
|
-
() => {
|
|
551
|
-
h.value && b.value && g();
|
|
552
|
-
},
|
|
553
|
-
{ immediate: !0 }
|
|
554
|
-
);
|
|
555
|
-
async function g() {
|
|
556
|
-
if (!b.value) {
|
|
557
|
-
v.value = [];
|
|
558
|
-
return;
|
|
559
|
-
}
|
|
560
|
-
try {
|
|
561
|
-
c.value = !0, w.value.length === 0 ? v.value = [] : v.value = await we({
|
|
562
|
-
start: n.value.startDate,
|
|
563
|
-
end: n.value.endDate,
|
|
564
|
-
restaurantIds: w.value
|
|
565
|
-
});
|
|
566
|
-
} catch (k) {
|
|
567
|
-
_.open({ message: k, type: "error" }), v.value = [];
|
|
568
|
-
} finally {
|
|
569
|
-
c.value = !1;
|
|
570
|
-
}
|
|
571
|
-
}
|
|
572
|
-
function C(k) {
|
|
573
|
-
if (k !== null) {
|
|
574
|
-
try {
|
|
575
|
-
l.pushDataLayer(
|
|
576
|
-
{
|
|
577
|
-
event: pe.report_insight_click_insight_card,
|
|
578
|
-
insight: JSON.stringify(v.value[k])
|
|
579
|
-
},
|
|
580
|
-
"insight"
|
|
581
|
-
);
|
|
582
|
-
} catch (s) {
|
|
583
|
-
console.warn(s);
|
|
584
|
-
}
|
|
585
|
-
d.value = null;
|
|
586
|
-
}
|
|
587
|
-
ie(() => {
|
|
588
|
-
d.value = k;
|
|
589
|
-
});
|
|
590
|
-
}
|
|
591
|
-
async function D(k) {
|
|
592
|
-
if (d.value !== null)
|
|
593
|
-
try {
|
|
594
|
-
c.value = !0;
|
|
595
|
-
const s = await be({
|
|
596
|
-
...v.value[d.value].feedback,
|
|
597
|
-
reaction: k
|
|
598
|
-
});
|
|
599
|
-
v.value[d.value].feedback = s;
|
|
600
|
-
} catch (s) {
|
|
601
|
-
_.open({ message: s, type: "error" });
|
|
602
|
-
} finally {
|
|
603
|
-
c.value = !1;
|
|
604
|
-
}
|
|
605
|
-
}
|
|
606
|
-
return (k, s) => {
|
|
607
|
-
const le = R("FmPageHead"), ae = R("FmCircularProgress");
|
|
608
|
-
return o(), A(re, null, {
|
|
609
|
-
default: B(() => [
|
|
610
|
-
p(le, {
|
|
611
|
-
title: f(t)("report.view.insight.title")
|
|
612
|
-
}, null, 8, ["title"]),
|
|
613
|
-
f(b) ? (o(), u(j, { key: 1 }, [
|
|
614
|
-
a("div", ot, [
|
|
615
|
-
a("div", st, [
|
|
616
|
-
p(ge, {
|
|
617
|
-
modelValue: f(r),
|
|
618
|
-
"onUpdate:modelValue": [
|
|
619
|
-
s[0] || (s[0] = (I) => z(r) ? r.value = I : null),
|
|
620
|
-
g
|
|
621
|
-
],
|
|
622
|
-
options: f(m)
|
|
623
|
-
}, null, 8, ["modelValue", "options"]),
|
|
624
|
-
p(de, {
|
|
625
|
-
"date-range": f(n),
|
|
626
|
-
"onUpdate:dateRange": [
|
|
627
|
-
s[1] || (s[1] = (I) => z(n) ? n.value = I : null),
|
|
628
|
-
g
|
|
629
|
-
],
|
|
630
|
-
"compare-date-range": f(y),
|
|
631
|
-
"onUpdate:compareDateRange": s[2] || (s[2] = (I) => z(y) ? y.value = I : null),
|
|
632
|
-
compare: !1
|
|
633
|
-
}, null, 8, ["date-range", "compare-date-range"])
|
|
634
|
-
])
|
|
635
|
-
]),
|
|
636
|
-
c.value ? (o(), u("div", nt, [
|
|
637
|
-
p(ae, { size: "xl" })
|
|
638
|
-
])) : (o(), u("div", it, [
|
|
639
|
-
v.value.length > 0 ? (o(), u("div", rt, [
|
|
640
|
-
(o(!0), u(j, null, P(v.value, (I, Y) => (o(), A(H, {
|
|
641
|
-
key: Y,
|
|
642
|
-
widget: I,
|
|
643
|
-
onClick: () => C(Y)
|
|
644
|
-
}, null, 8, ["widget", "onClick"]))), 128))
|
|
645
|
-
])) : (o(), A(me, { key: 1 }))
|
|
646
|
-
])),
|
|
647
|
-
p(at, {
|
|
648
|
-
"model-value": d.value !== null,
|
|
649
|
-
onBack: s[3] || (s[3] = () => C(null))
|
|
650
|
-
}, {
|
|
651
|
-
default: B(() => [
|
|
652
|
-
d.value !== null ? (o(), A(H, {
|
|
653
|
-
key: 0,
|
|
654
|
-
widget: v.value[d.value],
|
|
655
|
-
detail: "",
|
|
656
|
-
onClickFeedback: D
|
|
657
|
-
}, null, 8, ["widget"])) : F("", !0)
|
|
658
|
-
]),
|
|
659
|
-
_: 1
|
|
660
|
-
}, 8, ["model-value"])
|
|
661
|
-
], 64)) : (o(), A(he, { key: 0 }))
|
|
662
|
-
]),
|
|
663
|
-
_: 1
|
|
664
|
-
});
|
|
665
|
-
};
|
|
666
|
-
}
|
|
667
|
-
});
|
|
668
|
-
export {
|
|
669
|
-
kt as default
|
|
670
|
-
};
|
package/dist/Layout-BFvrEBq5.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { defineComponent as _, resolveComponent as t, createBlock as o, openBlock as e, withCtx as p, createElementBlock as l, unref as n, Fragment as u, createVNode as r } from "vue";
|
|
2
|
-
import { _ as f } from "./Default.vue_vue_type_script_setup_true_lang-C55xh4bx.js";
|
|
3
|
-
import { _ as g } from "./NoPermission.vue_vue_type_script_setup_true_lang-obph7BUZ.js";
|
|
4
|
-
import { u as d } from "./BaseDialog.vue_vue_type_script_setup_true_lang-CD7LSCLM.js";
|
|
5
|
-
import { storeToRefs as v } from "pinia";
|
|
6
|
-
import { u as k } from "./vue-i18n-CvU0g5WR.js";
|
|
7
|
-
const N = /* @__PURE__ */ _({
|
|
8
|
-
__name: "Layout",
|
|
9
|
-
setup(w) {
|
|
10
|
-
const { t: a } = k(), i = d(), { isIntegrationAccessible: m } = v(i);
|
|
11
|
-
return (x, y) => {
|
|
12
|
-
const s = t("router-view"), c = t("FmPageHead");
|
|
13
|
-
return e(), o(f, null, {
|
|
14
|
-
default: p(() => [
|
|
15
|
-
n(m) ? (e(), o(s, { key: 0 })) : (e(), l(u, { key: 1 }, [
|
|
16
|
-
r(c, {
|
|
17
|
-
title: n(a)("report.view.integration.title")
|
|
18
|
-
}, null, 8, ["title"]),
|
|
19
|
-
r(g)
|
|
20
|
-
], 64))
|
|
21
|
-
]),
|
|
22
|
-
_: 1
|
|
23
|
-
});
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
export {
|
|
28
|
-
N as default
|
|
29
|
-
};
|