@feedmepos/mf-report 5.21.4-beta.0 → 5.21.5
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-Gn93NYJZ.js → App-vEEsnXzW.js} +11 -11
- package/dist/app.js +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as ee, resolveComponent as U, createBlock as te, openBlock as h, unref as u, isRef as Ie, withCtx as J, createElementVNode as W, createVNode as z, toDisplayString as H, createTextVNode as he, onMounted as ae, watch as R, ref as k, computed as K, onBeforeMount as Re, onBeforeUnmount as qe, createElementBlock as A, Fragment as Oe } from "vue";
|
|
2
2
|
import { detectLocale as E, useCoreStore as T } from "@feedmepos/mf-common";
|
|
3
|
-
import { u as Le, d as i, a as _e, b as X, c as
|
|
3
|
+
import { u as Le, d as i, a as _e, b as X, c as we, e as be, f as Ce, s as ke, g as Ee } from "./vue-i18n-BQN8HgvD.js";
|
|
4
4
|
import { storeToRefs as q } from "pinia";
|
|
5
5
|
import { u as Y, a as Ne, b as Be } from "./BaseDialog.vue_vue_type_script_setup_true_lang-03nmej58.js";
|
|
6
6
|
import { _ as Fe, u as $e } from "./NavigationTab.vue_vue_type_script_setup_true_lang-BZVeEoDt.js";
|
|
@@ -62,7 +62,7 @@ i.locale(E() === "zh-CN" ? "zh-cn" : "en");
|
|
|
62
62
|
const ze = ["src"], Qe = ["src"], et = /* @__PURE__ */ ee({
|
|
63
63
|
__name: "App",
|
|
64
64
|
setup(O) {
|
|
65
|
-
const { businessId: r, token: f, country: l } = q(_e()), { sessionUser: S, currentBusiness: D, currentCountry: L, registerSidebarComponent: g } = T(), { getRestaurantAndWarehouse: _, getBusinessSetting: N, beginBusinessLoad: B, completeBusinessLoad: ne } = X(), { getFeatureFlags: re } =
|
|
65
|
+
const { businessId: r, token: f, country: l } = q(_e()), { sessionUser: S, currentBusiness: D, currentCountry: L, registerSidebarComponent: g } = T(), { getRestaurantAndWarehouse: _, getBusinessSetting: N, beginBusinessLoad: B, completeBusinessLoad: ne } = X(), { getFeatureFlags: re } = we(), { version: p } = q(Y()), { getSettings: oe } = be(), { promptLoader: se } = Ce(), e = xe(), F = Je(), ie = Y(), { suppressReportRouteSync: w } = q(ie), ue = K(() => `https://portal-v1.feedme.cc/b/${r.value}/report/CLOSE_UP?showHeader=false&country=${l.value.toUpperCase()}&menuOption=business-report&token=${f.value}&v2=true&reportV5Button=true`), le = K(() => `https://report-v4.feedme.cc?businessId=${r.value}&country=${l.value}&token=${f.value}&reportV3Button=true`);
|
|
66
66
|
R(
|
|
67
67
|
[() => D.value, () => S.value, () => L.value],
|
|
68
68
|
() => {
|
|
@@ -99,13 +99,13 @@ const ze = ["src"], Qe = ["src"], et = /* @__PURE__ */ ee({
|
|
|
99
99
|
}), Re(() => {
|
|
100
100
|
g(Fe);
|
|
101
101
|
}), ae(() => {
|
|
102
|
-
console.log("5.21.
|
|
102
|
+
console.log("5.21.5", !0), window.addEventListener("message", Q), window.addEventListener("message", j);
|
|
103
103
|
});
|
|
104
104
|
const I = Ne(), V = $e(), n = X();
|
|
105
105
|
qe(() => {
|
|
106
106
|
window.removeEventListener("message", Q), window.removeEventListener("message", j), I.$dispose(), V.$dispose();
|
|
107
107
|
});
|
|
108
|
-
const { getReports: ce, getOverviewReport: de, getReportConfig: G, currentReportId: P } = I, { currentReportId: me, reports: fe } = q(I), { getSchema: pe } = Be(), { fetchSchedules: ge } = V, { init: ve } = Ee(), $ = k("v5"),
|
|
108
|
+
const { getReports: ce, getOverviewReport: de, getReportConfig: G, currentReportId: P } = I, { currentReportId: me, reports: fe } = q(I), { getSchema: pe } = Be(), { fetchSchedules: ge } = V, { init: ve } = Ee(), $ = k("v5"), b = k(!1), x = k(!0);
|
|
109
109
|
function ye() {
|
|
110
110
|
const a = e.query.startDate ? i(e.query.startDate).startOf("day").toISOString() : void 0, t = e.query.endDate ? i(e.query.endDate).endOf("day").toISOString() : void 0, o = e.query.timeStart ? JSON.parse(e.query.timeStart) : void 0, c = e.query.timeEnd ? JSON.parse(e.query.timeEnd) : void 0, d = e.query.compareStartDate ? i(e.query.compareStartDate).startOf("day").toISOString() : void 0, v = e.query.compareEndDate ? i(e.query.compareEndDate).endOf("day").toISOString() : void 0, C = e.query.isAllLocation === "true";
|
|
111
111
|
let m = [];
|
|
@@ -146,7 +146,7 @@ const ze = ["src"], Qe = ["src"], et = /* @__PURE__ */ ee({
|
|
|
146
146
|
return R(
|
|
147
147
|
() => r.value,
|
|
148
148
|
async (a) => {
|
|
149
|
-
a !== "" && (
|
|
149
|
+
a !== "" && (b.value = !1, B(a), x.value || (n.setSelectedLocationIds([]), F.replace({
|
|
150
150
|
name: e.name,
|
|
151
151
|
params: e.params,
|
|
152
152
|
query: {
|
|
@@ -154,7 +154,7 @@ const ze = ["src"], Qe = ["src"], et = /* @__PURE__ */ ee({
|
|
|
154
154
|
locationIds: void 0,
|
|
155
155
|
isAllLocation: "true"
|
|
156
156
|
}
|
|
157
|
-
})),
|
|
157
|
+
})), w.value !== void 0 && (w.value = !0), await se(async () => {
|
|
158
158
|
await ve({
|
|
159
159
|
apiKey: "6GhcttsJ9Rj9cTevcdrpin",
|
|
160
160
|
url: "https://flag.feedme.farm/api/v1/",
|
|
@@ -174,13 +174,13 @@ const ze = ["src"], Qe = ["src"], et = /* @__PURE__ */ ee({
|
|
|
174
174
|
),
|
|
175
175
|
oe()
|
|
176
176
|
]), await N(), ye(), ne(a);
|
|
177
|
-
}),
|
|
177
|
+
}), b.value = !0, x.value && (x.value = !1));
|
|
178
178
|
},
|
|
179
179
|
{
|
|
180
180
|
immediate: !0
|
|
181
181
|
}
|
|
182
182
|
), R(
|
|
183
|
-
() => (
|
|
183
|
+
() => (b.value, {
|
|
184
184
|
reportId: me.value,
|
|
185
185
|
selectedLocationIds: n.selectedLocationIds,
|
|
186
186
|
dateRange: n.dateRange,
|
|
@@ -188,9 +188,9 @@ const ze = ["src"], Qe = ["src"], et = /* @__PURE__ */ ee({
|
|
|
188
188
|
compareDateRange: n.compareDateRange
|
|
189
189
|
}),
|
|
190
190
|
(a) => {
|
|
191
|
-
if (!
|
|
192
|
-
if (
|
|
193
|
-
|
|
191
|
+
if (!b.value || !a.reportId) return;
|
|
192
|
+
if (w.value) {
|
|
193
|
+
w.value = !1;
|
|
194
194
|
return;
|
|
195
195
|
}
|
|
196
196
|
const t = a.selectedLocationIds, o = a.dateRange, c = a.timeRange, d = a.compareDateRange, v = {
|
package/dist/app.js
CHANGED