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