@feedmepos/mf-report 5.15.5 → 5.16.0-beta.1
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-DkQbgn4j.js → App-BsQKS0mH.js} +33 -33
- package/dist/{BaseDialog.vue_vue_type_script_setup_true_lang-DZQ6Qnqt.js → BaseDialog.vue_vue_type_script_setup_true_lang-4ProJ47u.js} +192 -192
- package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-DLIFD-zH.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-Yv4mU3CA.js} +13 -13
- package/dist/{Default.vue_vue_type_script_setup_true_lang-D37AaUwY.js → Default.vue_vue_type_script_setup_true_lang-Be1zUefG.js} +2 -2
- package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-5m_HO6Li.js → DynamicWidget.vue_vue_type_script_setup_true_lang-BouULeLr.js} +516 -509
- package/dist/{InsightView-DWqsJTar.js → InsightView-BMdULXxB.js} +5 -5
- package/dist/{Integration-CnjjTn4s.js → Integration-BNi4axp4.js} +2 -2
- package/dist/{Integrations-i39Rog5w.js → Integrations-NlOsDssY.js} +3 -3
- package/dist/{Layout-2xPNU79v.js → Layout-Bj0UH9g4.js} +1 -1
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-DAKj2U35.js → MenuTab.vue_vue_type_script_setup_true_lang-VZzP3ioV.js} +15 -15
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-DttVIIFQ.js → NavigationTab.vue_vue_type_script_setup_true_lang-DB0u1Tyc.js} +7113 -7133
- package/dist/{NoData.vue_vue_type_script_setup_true_lang-D8TQd5xZ.js → NoData.vue_vue_type_script_setup_true_lang-BF1MLXsF.js} +1 -1
- package/dist/{OverviewView-DIV-c719.js → OverviewView-Bc_LHFuc.js} +5 -5
- package/dist/{Report-CwIXa0uX.js → Report-Dm5yvNtt.js} +4 -4
- package/dist/{ReportEditor-B9VtrKLn.js → ReportEditor-CJW_8r_X.js} +6 -6
- package/dist/{ReportView-vhuYnD21.js → ReportView-BY2yuFlE.js} +7 -7
- package/dist/{SelectComponent.vue_vue_type_script_setup_true_lang-C6I6eTgv.js → SelectComponent.vue_vue_type_script_setup_true_lang-nAU0NNg5.js} +1 -1
- package/dist/{Setting-__fjcx43.js → Setting-CtJiTvSy.js} +4 -4
- package/dist/{TileEditor-BqeSfGqx.js → TileEditor-RppSHYuT.js} +7 -7
- package/dist/{TransitionFade-BG1kcUbz.js → TransitionFade-j_XBbJri.js} +5 -5
- package/dist/app.js +200 -24
- package/dist/{helper-CjlOhf8H.js → helper-DJZfVXf0.js} +1 -1
- package/dist/{vue-i18n-CA7n5PbM.js → vue-i18n-CHLsTHGb.js} +1528 -1522
- package/package.json +1 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { k as Ne, a as te, F as Z, s as ee, b as Ce, c as at, o as st, d as ye, e as lt, r as Je, l as ot } from "./vue-i18n-CHLsTHGb.js";
|
|
2
2
|
import { storeToRefs as V, defineStore as Me } from "pinia";
|
|
3
|
-
import { ref as B, computed as Ae, watch as
|
|
4
|
-
import { useSnackbar as
|
|
5
|
-
import { useRouter as
|
|
6
|
-
import { detectLocale as
|
|
7
|
-
function
|
|
3
|
+
import { ref as B, computed as Ae, watch as De, h as _t, defineComponent as ut, mergeModels as qe, useModel as dt, resolveComponent as ke, createBlock as ct, openBlock as pt, withCtx as be, createElementVNode as yt, createVNode as He, renderSlot as ft, createTextVNode as $t, toDisplayString as St } from "vue";
|
|
4
|
+
import { useSnackbar as Ge, components as gt } from "@feedmepos/ui-library";
|
|
5
|
+
import { useRouter as mt } from "vue-router";
|
|
6
|
+
import { detectLocale as Pe } from "@feedmepos/mf-common";
|
|
7
|
+
function At(g) {
|
|
8
8
|
throw new Error('Could not dynamically require "' + g + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
9
9
|
}
|
|
10
10
|
var Re = {};
|
|
11
11
|
(function(g) {
|
|
12
|
-
var I = typeof
|
|
12
|
+
var I = typeof Ne < "u" ? Ne : window, C = Object.create(I);
|
|
13
13
|
C.scheduleImmediate = typeof setImmediate < "u" ? function(M) {
|
|
14
14
|
setImmediate(M);
|
|
15
15
|
} : function(M) {
|
|
@@ -21,7 +21,7 @@ var Re = {};
|
|
|
21
21
|
} catch {
|
|
22
22
|
}
|
|
23
23
|
if (b) {
|
|
24
|
-
var L = (typeof __webpack_require__ < "u" ? __non_webpack_require__ :
|
|
24
|
+
var L = (typeof __webpack_require__ < "u" ? __non_webpack_require__ : At)("url");
|
|
25
25
|
Object.defineProperty(C, "location", {
|
|
26
26
|
value: {
|
|
27
27
|
get href() {
|
|
@@ -109,10 +109,10 @@ var Re = {};
|
|
|
109
109
|
for (var i = 0; i < t.length; i++)
|
|
110
110
|
Q(t[i], r);
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function z(r, t) {
|
|
113
113
|
x(t.prototype, r.prototype), r.prototype.constructor = r;
|
|
114
114
|
}
|
|
115
|
-
function
|
|
115
|
+
function X(r, t) {
|
|
116
116
|
P(t.prototype, r.prototype), r.prototype.constructor = r;
|
|
117
117
|
}
|
|
118
118
|
function _e(r, t, i, n) {
|
|
@@ -163,7 +163,7 @@ var Re = {};
|
|
|
163
163
|
for (var t = 0; t < r.length; ++t)
|
|
164
164
|
r[t];
|
|
165
165
|
}
|
|
166
|
-
function
|
|
166
|
+
function K(r, t) {
|
|
167
167
|
var i = null;
|
|
168
168
|
return r ? function(n) {
|
|
169
169
|
return i === null && (i = e.closureFromTearOff(t)), new i(n, this);
|
|
@@ -181,13 +181,13 @@ var Re = {};
|
|
|
181
181
|
function ne(r, t, i, n, a, s, o, _, d, c) {
|
|
182
182
|
return typeof _ == "number" && (_ += le), { co: r, iS: t, iI: i, rC: n, dV: a, cs: s, fs: o, fT: _, aI: d || 0, nDA: c };
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function Y(r, t, i, n, a, s, o, _) {
|
|
185
185
|
var d = ne(r, !0, !1, i, n, a, s, o, _, !1), c = de(d);
|
|
186
186
|
r[t] = c;
|
|
187
187
|
}
|
|
188
188
|
function oe(r, t, i, n, a, s, o, _, d, c) {
|
|
189
189
|
i = !!i;
|
|
190
|
-
var p = ne(r, !1, i, n, a, s, o, _, d, !!c), y =
|
|
190
|
+
var p = ne(r, !1, i, n, a, s, o, _, d, !!c), y = K(i, p);
|
|
191
191
|
r[t] = y;
|
|
192
192
|
}
|
|
193
193
|
function ie(r) {
|
|
@@ -220,10 +220,10 @@ var Re = {};
|
|
|
220
220
|
};
|
|
221
221
|
}, t = function(i, n, a, s) {
|
|
222
222
|
return function(o, _, d, c) {
|
|
223
|
-
return
|
|
223
|
+
return Y(o, _, i, n, a, [d], c, s);
|
|
224
224
|
};
|
|
225
225
|
};
|
|
226
|
-
return { inherit: Q, inheritMany: U, mixin:
|
|
226
|
+
return { inherit: Q, inheritMany: U, mixin: z, mixinHard: X, installStaticTearOff: Y, installInstanceTearOff: oe, _instance_0u: r(0, 0, null, ["call$0"], 0), _instance_1u: r(0, 1, null, ["call$1"], 0), _instance_2u: r(0, 2, null, ["call$2"], 0), _instance_0i: r(1, 0, null, ["call$0"], 0), _instance_1i: r(1, 1, null, ["call$1"], 0), _instance_2i: r(1, 2, null, ["call$2"], 0), _static_0: t(0, null, ["call$0"], 0), _static_1: t(1, null, ["call$1"], 0), _static_2: t(2, null, ["call$2"], 0), makeConstList: re, lazy: ae, lazyFinal: se, lazyOld: _e, updateHolder: me, convertToFastObject: ue, updateTypes: pe, setOrUpdateInterceptorsByTag: ie, setOrUpdateLeafTags: ce };
|
|
227
227
|
}(), e = {
|
|
228
228
|
JS_CONST: function() {
|
|
229
229
|
},
|
|
@@ -9880,8 +9880,8 @@ then EXTRACT(EPOCH FROM COALESCE(timesheets.ended_at,!end)-(timesheets.created_a
|
|
|
9880
9880
|
return n.message;
|
|
9881
9881
|
}
|
|
9882
9882
|
}())), t(f, "DateTime__parseFormat", "$get$DateTime__parseFormat", () => e.RegExp_RegExp("^([+-]?\\d{4,6})-?(\\d\\d)-?(\\d\\d)(?:[ T](\\d\\d)(?::?(\\d\\d)(?::?(\\d\\d)(?:[.,](\\d+))?)?)?( ?[zZ]| ?([-+])(\\d\\d)(?::?(\\d\\d))?)?)?$", !1)), t(f, "_hashSeed", "$get$_hashSeed", () => e.objectHashCode(l.Type_Object_xQ6)), t(f, "Endian_host", "$get$Endian_host", () => e.NativeByteData_NativeByteData$view(e.NativeUint16List__create1(e._ensureNativeList(e._setArrayType([1], u.JSArray_int))).buffer, 0, null).getInt8(0) === 1 ? l.C_Endian0 : l.C_Endian), t(f, "_clockKey", "$get$_clockKey", () => new e.Object()), t(f, "en_USSymbols", "$get$en_USSymbols", () => new e.DateSymbols("en_US", l.List_BC_AD, l.List_6xs, l.List_qpm, l.List_qpm, l.List_cIc, l.List_cIc, l.List_h8w, l.List_h8w, l.List_wMy, l.List_wMy, l.List_gc6, l.List_gc6, l.List_3US, l.List_AM_PM)), i(f, "_dateTimeSymbols", "$get$_dateTimeSymbols", () => e.UninitializedLocaleData$("initializeDateFormatting(<locale>)", f.$get$en_USSymbols())), i(f, "dateTimePatterns", "$get$dateTimePatterns", () => e.UninitializedLocaleData$("initializeDateFormatting(<locale>)", l.Map_EQ6TW)), t(f, "asciiZeroCodeUnit", "$get$asciiZeroCodeUnit", () => 48), t(f, "DateFormat__matchers", "$get$DateFormat__matchers", () => e._setArrayType([e.RegExp_RegExp("^'(?:[^']|'')*'", !1), e.RegExp_RegExp("^(?:G+|y+|M+|k+|S+|E+|a+|h+|K+|H+|c+|L+|Q+|d+|D+|m+|s+|v+|z+|Z+)", !1), e.RegExp_RegExp("^[^'GyMkSEahKHcLQdDmsvzZ]+", !1)], e.findType("JSArray<RegExp>"))), t(f, "_DateFormatQuotedField__twoEscapedQuotes", "$get$_DateFormatQuotedField__twoEscapedQuotes", () => e.RegExp_RegExp("''", !1)), t(f, "asciiDigitMatcher", "$get$asciiDigitMatcher", () => e.RegExp_RegExp("^\\d+", !1)), i(f, "_availableLocales", "$get$_availableLocales", () => {
|
|
9883
|
-
var n, a, s = e.EnLocale$(l.StartOfWeek_1), o = e.EnLocale$(l.StartOfWeek_1), _ = e.EnLocale$(l.StartOfWeek_1), d = e.EnLocale$(l.StartOfWeek_1), c = e.EnLocale$(l.StartOfWeek_1), p = e.EnLocale$(l.StartOfWeek_2), y = e.EnLocale$(l.StartOfWeek_2), S = e.EnLocale$(l.StartOfWeek_1), m = e.EnLocale$(l.StartOfWeek_1), A = e.EsLocale$(l.StartOfWeek_2), E = e.EsLocale$(l.StartOfWeek_2), F = e.EsLocale$(l.StartOfWeek_1), R = e.FrLocale$(l.StartOfWeek_2), O = e.FrLocale$(l.StartOfWeek_2), v = e.FrLocale$(l.StartOfWeek_1), T = e.ZhCnLocale$(l.StartOfWeek_1), H = e.ZhCnLocale$(l.StartOfWeek_1), w = e.ZhLocale$(l.StartOfWeek_1), N = e.ZhLocale$(l.StartOfWeek_1), q = e.DeLocale$(l.StartOfWeek_2), G = e.DeLocale$(l.StartOfWeek_2), $e = e.DeLocale$(l.StartOfWeek_2), Te = e.DeLocale$(l.StartOfWeek_2), Ie = e.ItLocale$(l.StartOfWeek_2), Ee = e.ItLocale$(l.StartOfWeek_2),
|
|
9884
|
-
return e.createSentinel(), e.createSentinel(), e.createSentinel(), e.createSentinel(), e.createSentinel(), e.createSentinel(), e.createSentinel(), n = e.PtLocale$(l.StartOfWeek_2), a = e.PtLocale$(l.StartOfWeek_1), e.createSentinel(), e.createSentinel(), e.createSentinel(), e.createSentinel(), e.createSentinel(), e.createSentinel(), e.createSentinel(), e.createSentinel(), e.LinkedHashMap_LinkedHashMap$_literal(["en", s, "en_us", o, "en_sg", _, "en_au", d, "en_ca", c, "en_gb", p, "en_ie", y, "en_il", S, "en_nz", m, "es", A, "es_do", E, "es_us", F, "fr", R, "fr_ch", O, "fr_ca", v, "zh", T, "zh_cn", H, "zh_hk", w, "zh_tw", N, "de", q, "de_de", G, "de_at", $e, "de_ch", Te, "it", Ie, "it_ch", Ee, "ar",
|
|
9883
|
+
var n, a, s = e.EnLocale$(l.StartOfWeek_1), o = e.EnLocale$(l.StartOfWeek_1), _ = e.EnLocale$(l.StartOfWeek_1), d = e.EnLocale$(l.StartOfWeek_1), c = e.EnLocale$(l.StartOfWeek_1), p = e.EnLocale$(l.StartOfWeek_2), y = e.EnLocale$(l.StartOfWeek_2), S = e.EnLocale$(l.StartOfWeek_1), m = e.EnLocale$(l.StartOfWeek_1), A = e.EsLocale$(l.StartOfWeek_2), E = e.EsLocale$(l.StartOfWeek_2), F = e.EsLocale$(l.StartOfWeek_1), R = e.FrLocale$(l.StartOfWeek_2), O = e.FrLocale$(l.StartOfWeek_2), v = e.FrLocale$(l.StartOfWeek_1), T = e.ZhCnLocale$(l.StartOfWeek_1), H = e.ZhCnLocale$(l.StartOfWeek_1), w = e.ZhLocale$(l.StartOfWeek_1), N = e.ZhLocale$(l.StartOfWeek_1), q = e.DeLocale$(l.StartOfWeek_2), G = e.DeLocale$(l.StartOfWeek_2), $e = e.DeLocale$(l.StartOfWeek_2), Te = e.DeLocale$(l.StartOfWeek_2), Ie = e.ItLocale$(l.StartOfWeek_2), Ee = e.ItLocale$(l.StartOfWeek_2), Ze = e.ArLyLocale$(!0, l.StartOfWeek_0), Xe = e.ArLyLocale$(!1, l.StartOfWeek_0), et = e.ArSaMaDzKwTnLocale$(!1, l.StartOfWeek_1), tt = e.ArSaMaDzKwTnLocale$(!1, l.StartOfWeek_1), rt = e.ArSaMaDzKwTnLocale$(!0, l.StartOfWeek_1), it = e.ArSaMaDzKwTnLocale$(!1, l.StartOfWeek_0), nt = e.ArSaMaDzKwTnLocale$(!1, l.StartOfWeek_0);
|
|
9884
|
+
return e.createSentinel(), e.createSentinel(), e.createSentinel(), e.createSentinel(), e.createSentinel(), e.createSentinel(), e.createSentinel(), n = e.PtLocale$(l.StartOfWeek_2), a = e.PtLocale$(l.StartOfWeek_1), e.createSentinel(), e.createSentinel(), e.createSentinel(), e.createSentinel(), e.createSentinel(), e.createSentinel(), e.createSentinel(), e.createSentinel(), e.LinkedHashMap_LinkedHashMap$_literal(["en", s, "en_us", o, "en_sg", _, "en_au", d, "en_ca", c, "en_gb", p, "en_ie", y, "en_il", S, "en_nz", m, "es", A, "es_do", E, "es_us", F, "fr", R, "fr_ch", O, "fr_ca", v, "zh", T, "zh_cn", H, "zh_hk", w, "zh_tw", N, "de", q, "de_de", G, "de_at", $e, "de_ch", Te, "it", Ie, "it_ch", Ee, "ar", Ze, "ar_ly", Xe, "ar_dz", et, "ar_kw", tt, "ar_sa", rt, "ar_ma", it, "ar_tn", nt, "az", new e.AzLocale(l.StartOfWeek_2), "id", new e.IdLocale(l.StartOfWeek_1), "ja", new e.JaLocale(l.StartOfWeek_1), "ko", new e.KoLocale(l.StartOfWeek_1), "ru", new e.RuLocale(l.StartOfWeek_2), "uk", new e.UkLocale(l.StartOfWeek_2), "hi", new e.HiLocale(l.StartOfWeek_1), "pt", n, "pt_br", a, "pl", new e.PlLocale(l.StartOfWeek_2), "tr", new e.TrLocale(l.StartOfWeek_2), "sv", new e.SvLocale(l.StartOfWeek_2), "nb", new e.NbLocale(l.StartOfWeek_2), "fa", new e.FaLocale(l.StartOfWeek_0), "bn", new e.BnLocale(l.StartOfWeek_1), "nl", new e.NlLocale(l.StartOfWeek_2), "th", new e.ThLocale(l.StartOfWeek_1)], u.String, e.findType("Locale"));
|
|
9885
9885
|
}), t(f, "addonFlattenItemSchema", "$get$addonFlattenItemSchema", () => {
|
|
9886
9886
|
var n = "createdAt", a = e.Source_Source$couchdb("", ""), s = e.TopLevelFilters$(e._setArrayType([e.Permission_Permission$restaurant("restaurantId")], u.JSArray_Permission), n);
|
|
9887
9887
|
return e.Schema_Schema$build(e._setArrayType(["restaurantId"], u.JSArray_String), null, new e.addonFlattenItemSchema_closure(), l.List_empty, null, null, !1, !1, !0, !1, new e.addonFlattenItemSchema_closure0(), "Addon", "flatten_items", "flatten_item", l.SCHEMA_NAME_6, n, "", a, s);
|
|
@@ -10156,8 +10156,8 @@ then EXTRACT(EPOCH FROM COALESCE(timesheets.ended_at,!end)-(timesheets.created_a
|
|
|
10156
10156
|
});
|
|
10157
10157
|
})();
|
|
10158
10158
|
})(Re);
|
|
10159
|
-
var we = /* @__PURE__ */ ((g) => (g.DateTime = "DATE_TIME", g.Hour = "HOUR", g.Day = "DAY", g.Week = "WEEK", g.Month = "MONTH", g.TimeOfDay = "TIME_OF_DAY", g.HourOfDay = "HOUR_OF_DAY", g.DayOfWeek = "DAY_OF_WEEK", g.DayOfMonth = "DAY_OF_MONTH", g.MonthOfYear = "MONTH_OF_YEAR", g.Year = "YEAR", g))(we || {}),
|
|
10160
|
-
function
|
|
10159
|
+
var we = /* @__PURE__ */ ((g) => (g.DateTime = "DATE_TIME", g.Hour = "HOUR", g.Day = "DAY", g.Week = "WEEK", g.Month = "MONTH", g.TimeOfDay = "TIME_OF_DAY", g.HourOfDay = "HOUR_OF_DAY", g.DayOfWeek = "DAY_OF_WEEK", g.DayOfMonth = "DAY_OF_MONTH", g.MonthOfYear = "MONTH_OF_YEAR", g.Year = "YEAR", g))(we || {}), ht = /* @__PURE__ */ ((g) => (g.Asc = "ASC", g.Desc = "DESC", g))(ht || {}), Le = /* @__PURE__ */ ((g) => (g.Equal = "EQUAL", g.NotEqual = "NOT_EQUAL", g.GreaterThan = "GREATER_THAN", g.LessThan = "LESS_THAN", g.GreaterThanOrEqual = "GREATER_THAN_OR_EQUAL", g.LessThanOrEqual = "LESS_THAN_OR_EQUAL", g.Between = "BETWEEN", g.Like = "LIKE", g.NotLike = "NOT_LIKE", g.And = "AND", g.Or = "OR", g))(Le || {}), Tt = /* @__PURE__ */ ((g) => (g.String = "STRING", g.Timestamp = "TIMESTAMP", g.Bool = "BOOL", g.Numeric = "NUMERIC", g))(Tt || {}), It = /* @__PURE__ */ ((g) => (g.MTD = "MTD", g))(It || {}), Et = /* @__PURE__ */ ((g) => (g.Scorecard = "SCORECARD", g.Spacer = "SPACER", g.Table = "TABLE", g.BarChart = "BARCHART", g.StackBarChart = "STACKBARCHART", g.LineChart = "LINECHART", g.StackLineChart = "STACKLINECHART", g.Circular = "CIRCULAR", g))(Et || {}), Ft = /* @__PURE__ */ ((g) => (g.EXCEL = "excel", g.PDF = "pdf", g.PDFFULLSIZE = "pdfFullSize", g.PDFRECEIPT = "pdfReceipt", g))(Ft || {}), Ct = /* @__PURE__ */ ((g) => (g.LANDSCAPE = "landscape", g.PORTRAIT = "portrait", g))(Ct || {});
|
|
10160
|
+
function nr(g) {
|
|
10161
10161
|
switch (g) {
|
|
10162
10162
|
case "excel":
|
|
10163
10163
|
return "Excel";
|
|
@@ -10171,7 +10171,7 @@ function ir(g) {
|
|
|
10171
10171
|
return "Unknown";
|
|
10172
10172
|
}
|
|
10173
10173
|
}
|
|
10174
|
-
function
|
|
10174
|
+
function ar(g) {
|
|
10175
10175
|
switch (g) {
|
|
10176
10176
|
case "landscape":
|
|
10177
10177
|
return "report.common.landscape";
|
|
@@ -10181,82 +10181,82 @@ function nr(g) {
|
|
|
10181
10181
|
return "report.input.unknown";
|
|
10182
10182
|
}
|
|
10183
10183
|
}
|
|
10184
|
-
const ge = "/report-settings",
|
|
10184
|
+
const ge = "/report-settings", Mt = async () => {
|
|
10185
10185
|
const { businessId: g } = V(te());
|
|
10186
10186
|
if (g) {
|
|
10187
10187
|
const I = {
|
|
10188
|
-
fetchType:
|
|
10188
|
+
fetchType: Z.Get,
|
|
10189
10189
|
url: `${ge}/${g.value}/reports`
|
|
10190
10190
|
};
|
|
10191
|
-
return
|
|
10191
|
+
return ee.fetch(I);
|
|
10192
10192
|
} else
|
|
10193
10193
|
return Promise.reject(new Error("Business Id is not defined"));
|
|
10194
|
-
},
|
|
10194
|
+
}, Rt = (g) => {
|
|
10195
10195
|
const { businessId: I } = V(te()), C = {
|
|
10196
|
-
fetchType:
|
|
10196
|
+
fetchType: Z.Put,
|
|
10197
10197
|
url: `${ge}/${I.value}/reports/${g.id}`,
|
|
10198
10198
|
data: g
|
|
10199
10199
|
};
|
|
10200
|
-
return
|
|
10201
|
-
},
|
|
10200
|
+
return ee.fetch(C);
|
|
10201
|
+
}, bt = (g) => {
|
|
10202
10202
|
const { businessId: I } = V(te()), C = {
|
|
10203
|
-
fetchType:
|
|
10203
|
+
fetchType: Z.Post,
|
|
10204
10204
|
url: `${ge}/${I.value}/reports`,
|
|
10205
10205
|
data: g
|
|
10206
10206
|
};
|
|
10207
|
-
return
|
|
10208
|
-
},
|
|
10207
|
+
return ee.fetch(C);
|
|
10208
|
+
}, Ot = (g) => {
|
|
10209
10209
|
const { businessId: I } = V(te()), C = {
|
|
10210
|
-
fetchType:
|
|
10210
|
+
fetchType: Z.Delete,
|
|
10211
10211
|
url: `${ge}/${I.value}/reports/${g.id}`
|
|
10212
10212
|
};
|
|
10213
|
-
return
|
|
10214
|
-
},
|
|
10213
|
+
return ee.fetch(C);
|
|
10214
|
+
}, vt = (g) => {
|
|
10215
10215
|
const { businessId: I } = V(te()), C = {
|
|
10216
|
-
fetchType:
|
|
10216
|
+
fetchType: Z.Put,
|
|
10217
10217
|
url: `${ge}/${I.value}/reports/default`,
|
|
10218
10218
|
data: { defaultReport: g }
|
|
10219
10219
|
};
|
|
10220
|
-
return
|
|
10221
|
-
},
|
|
10220
|
+
return ee.fetch(C);
|
|
10221
|
+
}, wt = async () => {
|
|
10222
10222
|
const { businessId: g } = V(te());
|
|
10223
10223
|
if (g) {
|
|
10224
10224
|
const I = {
|
|
10225
|
-
fetchType:
|
|
10225
|
+
fetchType: Z.Get,
|
|
10226
10226
|
url: `${ge}/${g.value}/overview-report`
|
|
10227
10227
|
};
|
|
10228
|
-
return
|
|
10228
|
+
return ee.fetch(I);
|
|
10229
10229
|
} else
|
|
10230
10230
|
return Promise.reject(new Error("Business Id is not defined"));
|
|
10231
|
-
},
|
|
10231
|
+
}, Lt = async () => {
|
|
10232
10232
|
const { businessId: g } = V(te());
|
|
10233
10233
|
if (g) {
|
|
10234
10234
|
const I = {
|
|
10235
|
-
fetchType:
|
|
10235
|
+
fetchType: Z.Get,
|
|
10236
10236
|
url: `${ge}/${g.value}/config`
|
|
10237
10237
|
};
|
|
10238
|
-
return
|
|
10238
|
+
return ee.fetch(I);
|
|
10239
10239
|
} else
|
|
10240
10240
|
return Promise.reject(new Error("Business Id is not defined"));
|
|
10241
|
-
},
|
|
10241
|
+
}, Jt = "/report-settings", Dt = async () => {
|
|
10242
10242
|
const { businessId: g } = V(te());
|
|
10243
10243
|
if (g) {
|
|
10244
10244
|
const I = {
|
|
10245
|
-
fetchType:
|
|
10246
|
-
url: `${
|
|
10245
|
+
fetchType: Z.Get,
|
|
10246
|
+
url: `${Jt}/${g.value}/categories`
|
|
10247
10247
|
};
|
|
10248
|
-
return
|
|
10248
|
+
return ee.fetch(I);
|
|
10249
10249
|
} else
|
|
10250
10250
|
return Promise.reject(new Error("Business Id is not defined"));
|
|
10251
|
-
},
|
|
10251
|
+
}, Pt = (g) => {
|
|
10252
10252
|
const { businessId: I } = V(te()), C = {
|
|
10253
|
-
fetchType:
|
|
10253
|
+
fetchType: Z.Post,
|
|
10254
10254
|
url: `/report-settings/${I.value}/date-settings`,
|
|
10255
10255
|
data: {
|
|
10256
10256
|
...g
|
|
10257
10257
|
}
|
|
10258
10258
|
};
|
|
10259
|
-
return
|
|
10259
|
+
return ee.fetch(C);
|
|
10260
10260
|
};
|
|
10261
10261
|
function Oe(g, I = {}) {
|
|
10262
10262
|
const C = localStorage.getItem(g);
|
|
@@ -10276,17 +10276,17 @@ const Se = {
|
|
|
10276
10276
|
setJson: (g, I) => {
|
|
10277
10277
|
localStorage.setItem(g, JSON.stringify(I));
|
|
10278
10278
|
}
|
|
10279
|
-
},
|
|
10279
|
+
}, xt = () => {
|
|
10280
10280
|
const g = {
|
|
10281
|
-
fetchType:
|
|
10281
|
+
fetchType: Z.Get,
|
|
10282
10282
|
url: "/schemas"
|
|
10283
10283
|
};
|
|
10284
|
-
return
|
|
10285
|
-
},
|
|
10286
|
-
const g = B([]), I =
|
|
10284
|
+
return ee.fetch(g);
|
|
10285
|
+
}, Nt = "mf-reportschema-store", qt = Me(Nt, () => {
|
|
10286
|
+
const g = B([]), I = Ge();
|
|
10287
10287
|
async function C() {
|
|
10288
10288
|
try {
|
|
10289
|
-
g.value = await
|
|
10289
|
+
g.value = await xt();
|
|
10290
10290
|
} catch (b) {
|
|
10291
10291
|
console.log(b), I.open({
|
|
10292
10292
|
title: "Get Schema Error",
|
|
@@ -10299,20 +10299,20 @@ const Se = {
|
|
|
10299
10299
|
schemas: g,
|
|
10300
10300
|
getSchema: C
|
|
10301
10301
|
};
|
|
10302
|
-
}),
|
|
10303
|
-
const { business: g, globalFilters: I } = V(Ce()), { schemas: C } = V(
|
|
10302
|
+
}), kt = "mf-reportreport-store", Ve = Me(kt, () => {
|
|
10303
|
+
const { business: g, globalFilters: I } = V(Ce()), { schemas: C } = V(qt()), { flags: b } = V(at()), L = B([]), M = B([]), J = B(0), P = Ge(), x = Ae(() => L.value.filter((r) => r.editable)), k = Ae(() => L.value.filter((r) => !r.editable)), Q = B(!1), U = B(""), z = B(), X = B(), _e = Ae(() => {
|
|
10304
10304
|
const r = b.value.find(
|
|
10305
|
-
(t) => t.key ===
|
|
10305
|
+
(t) => t.key === st.report_portal_integration_custom_report
|
|
10306
10306
|
);
|
|
10307
10307
|
return typeof (r == null ? void 0 : r.value) == "number" ? r.value : null;
|
|
10308
10308
|
}), ae = Ae(() => _e.value === null ? !0 : _e.value - x.value.length > 0);
|
|
10309
10309
|
async function se() {
|
|
10310
|
-
return
|
|
10310
|
+
return X.value = await wt(), X.value;
|
|
10311
10311
|
}
|
|
10312
10312
|
async function re() {
|
|
10313
10313
|
var r;
|
|
10314
10314
|
try {
|
|
10315
|
-
L.value = await
|
|
10315
|
+
L.value = await Mt(), M.value = await Dt(), L.value.find((i) => i.id === U.value) || (U.value = ((r = L.value.find((i) => i.isDefault)) == null ? void 0 : r.id) || L.value[0].id);
|
|
10316
10316
|
} catch (t) {
|
|
10317
10317
|
console.log(t), P.open({
|
|
10318
10318
|
title: "Report Fetch Error",
|
|
@@ -10329,7 +10329,7 @@ const Se = {
|
|
|
10329
10329
|
const t = (i = C.value.find((n) => n.name === r.schemaName)) == null ? void 0 : i.fields.find((n) => n.name === r.name);
|
|
10330
10330
|
return t == null ? void 0 : t.type;
|
|
10331
10331
|
}
|
|
10332
|
-
|
|
10332
|
+
De(
|
|
10333
10333
|
() => {
|
|
10334
10334
|
var r;
|
|
10335
10335
|
return (r = ue.value) == null ? void 0 : r.globalFilters;
|
|
@@ -10344,20 +10344,20 @@ const Se = {
|
|
|
10344
10344
|
},
|
|
10345
10345
|
{ deep: !0 }
|
|
10346
10346
|
);
|
|
10347
|
-
const
|
|
10347
|
+
const K = B(), de = B(0), le = B(), ne = B(null), Y = B(null), oe = B(!1), ie = B(!1), ce = B(!1);
|
|
10348
10348
|
async function pe(r) {
|
|
10349
10349
|
const t = x.value.findIndex((n) => n.id === r.id);
|
|
10350
10350
|
let i;
|
|
10351
|
-
t >= 0 ? i = (await
|
|
10351
|
+
t >= 0 ? i = (await Rt(r)).id : i = (await bt(r)).id, await re(), $(i);
|
|
10352
10352
|
}
|
|
10353
10353
|
async function me(r) {
|
|
10354
|
-
return await
|
|
10354
|
+
return await Pt(r);
|
|
10355
10355
|
}
|
|
10356
10356
|
async function W(r) {
|
|
10357
|
-
await
|
|
10357
|
+
await Ot(r), await re();
|
|
10358
10358
|
}
|
|
10359
10359
|
async function e(r) {
|
|
10360
|
-
await
|
|
10360
|
+
await vt(r), await re();
|
|
10361
10361
|
}
|
|
10362
10362
|
function $(r) {
|
|
10363
10363
|
L.value.findIndex((i) => i.id === r) !== -1 && (U.value = r);
|
|
@@ -10405,26 +10405,26 @@ const Se = {
|
|
|
10405
10405
|
}
|
|
10406
10406
|
}
|
|
10407
10407
|
async function u() {
|
|
10408
|
-
return await
|
|
10408
|
+
return await Lt();
|
|
10409
10409
|
}
|
|
10410
10410
|
return {
|
|
10411
10411
|
isOpenDownloadDialog: oe,
|
|
10412
10412
|
isOpenFeedbackDialog: ie,
|
|
10413
10413
|
isOpenEmailDialog: ce,
|
|
10414
|
-
currentSelectWidgetType:
|
|
10414
|
+
currentSelectWidgetType: z,
|
|
10415
10415
|
reports: L,
|
|
10416
10416
|
categories: M,
|
|
10417
10417
|
currentReport: ue,
|
|
10418
|
-
editingReport:
|
|
10418
|
+
editingReport: K,
|
|
10419
10419
|
editingTileIndex: de,
|
|
10420
10420
|
editingTile: le,
|
|
10421
10421
|
editingGlobalFilterIndex: ne,
|
|
10422
|
-
editingGlobalFilter:
|
|
10422
|
+
editingGlobalFilter: Y,
|
|
10423
10423
|
currentReportId: U,
|
|
10424
10424
|
editableReports: x,
|
|
10425
10425
|
nonEditableReports: k,
|
|
10426
10426
|
isOpenAddReportDialog: Q,
|
|
10427
|
-
overviewReport:
|
|
10427
|
+
overviewReport: X,
|
|
10428
10428
|
pinReport: l,
|
|
10429
10429
|
scrollPositionY: J,
|
|
10430
10430
|
customReportQuota: _e,
|
|
@@ -10442,8 +10442,8 @@ const Se = {
|
|
|
10442
10442
|
getReportConfig: u,
|
|
10443
10443
|
submitFeedback: me
|
|
10444
10444
|
};
|
|
10445
|
-
}),
|
|
10446
|
-
const { disabled: g } = V(
|
|
10445
|
+
}), Ht = "mf-reportnavigation", We = Me(Ht, () => {
|
|
10446
|
+
const { disabled: g } = V(lt()), I = B("v5"), C = Ae(() => {
|
|
10447
10447
|
const J = [
|
|
10448
10448
|
{
|
|
10449
10449
|
label: "overview",
|
|
@@ -10459,7 +10459,7 @@ const Se = {
|
|
|
10459
10459
|
label: "insight",
|
|
10460
10460
|
value: "insight",
|
|
10461
10461
|
route: "insights",
|
|
10462
|
-
badge: () =>
|
|
10462
|
+
badge: () => _t(gt.FmPill, { variant: "beta" })
|
|
10463
10463
|
},
|
|
10464
10464
|
{
|
|
10465
10465
|
label: "setting",
|
|
@@ -10472,7 +10472,7 @@ const Se = {
|
|
|
10472
10472
|
value: "integration",
|
|
10473
10473
|
route: "integrations"
|
|
10474
10474
|
}), J;
|
|
10475
|
-
}), b = B(""), { currentRoute: L } =
|
|
10475
|
+
}), b = B(""), { currentRoute: L } = mt();
|
|
10476
10476
|
function M(J) {
|
|
10477
10477
|
switch (J.name) {
|
|
10478
10478
|
case "report":
|
|
@@ -10494,7 +10494,7 @@ const Se = {
|
|
|
10494
10494
|
break;
|
|
10495
10495
|
}
|
|
10496
10496
|
}
|
|
10497
|
-
return
|
|
10497
|
+
return De(
|
|
10498
10498
|
L,
|
|
10499
10499
|
(J) => {
|
|
10500
10500
|
M(J);
|
|
@@ -10506,24 +10506,24 @@ const Se = {
|
|
|
10506
10506
|
version: I
|
|
10507
10507
|
};
|
|
10508
10508
|
});
|
|
10509
|
-
var
|
|
10510
|
-
const
|
|
10511
|
-
function
|
|
10509
|
+
var ze = /* @__PURE__ */ ((g) => (g.generating = "GENERATING", g.completed = "COMPLETED", g.failed = "FAILED", g.canceled = "CANCELLED", g))(ze || {});
|
|
10510
|
+
const Ut = "/assets/formatChartData.worker-DThPQ5tB.js", ve = /* @__PURE__ */ new Map();
|
|
10511
|
+
function Ue(g) {
|
|
10512
10512
|
return new Worker(g, { type: "module" });
|
|
10513
10513
|
}
|
|
10514
|
-
async function
|
|
10514
|
+
async function Qt(g) {
|
|
10515
10515
|
if (ve.has(g))
|
|
10516
|
-
return
|
|
10516
|
+
return Ue(ve.get(g));
|
|
10517
10517
|
let I = g;
|
|
10518
10518
|
if (location.hostname !== new URL(import.meta.url).hostname) {
|
|
10519
10519
|
const L = new URL(g.replace(/^\//, ""), import.meta.url).href, M = await fetch(L).then((P) => P.text()), J = new Blob([M], { type: "application/javascript" });
|
|
10520
10520
|
I = URL.createObjectURL(J);
|
|
10521
10521
|
}
|
|
10522
|
-
const b =
|
|
10522
|
+
const b = Ue(I);
|
|
10523
10523
|
return ve.set(g, I), b;
|
|
10524
10524
|
}
|
|
10525
|
-
async function
|
|
10526
|
-
const C = await
|
|
10525
|
+
async function Bt(g, I) {
|
|
10526
|
+
const C = await Qt(g);
|
|
10527
10527
|
return C.postMessage(I), await new Promise((b) => {
|
|
10528
10528
|
C.onmessage = async (L) => {
|
|
10529
10529
|
const M = L.data;
|
|
@@ -10531,7 +10531,7 @@ async function Qt(g, I) {
|
|
|
10531
10531
|
};
|
|
10532
10532
|
});
|
|
10533
10533
|
}
|
|
10534
|
-
const
|
|
10534
|
+
const Gt = "mf-reportwidget-size", Ye = Me(Gt, () => {
|
|
10535
10535
|
const g = B([]);
|
|
10536
10536
|
function I(C, b) {
|
|
10537
10537
|
var L;
|
|
@@ -10551,8 +10551,8 @@ const Bt = "mf-reportwidget-size", ze = Me(Bt, () => {
|
|
|
10551
10551
|
}
|
|
10552
10552
|
return { sizes: g, extractChartSize: I };
|
|
10553
10553
|
});
|
|
10554
|
-
ye.extend(
|
|
10555
|
-
async function
|
|
10554
|
+
ye.extend(ot);
|
|
10555
|
+
async function Vt(g, I) {
|
|
10556
10556
|
for (let C = 0; C < g.length; C++)
|
|
10557
10557
|
try {
|
|
10558
10558
|
return await g[C]();
|
|
@@ -10562,7 +10562,7 @@ async function Gt(g, I) {
|
|
|
10562
10562
|
}
|
|
10563
10563
|
throw new Error("No callback");
|
|
10564
10564
|
}
|
|
10565
|
-
const
|
|
10565
|
+
const sr = async (g, I, C) => {
|
|
10566
10566
|
var ae, se, re, ue;
|
|
10567
10567
|
const { businessId: b, country: L } = V(te()), {
|
|
10568
10568
|
selectedRestaurantIds: M,
|
|
@@ -10575,11 +10575,11 @@ const ar = async (g, I, C) => {
|
|
|
10575
10575
|
} = Ce();
|
|
10576
10576
|
if (P.length === 0)
|
|
10577
10577
|
return null;
|
|
10578
|
-
const
|
|
10579
|
-
fetchType:
|
|
10578
|
+
const z = xe(g, U, C ?? ""), X = {
|
|
10579
|
+
fetchType: Z.Post,
|
|
10580
10580
|
url: `/${b.value}/postgres-query`,
|
|
10581
10581
|
data: Re.getQueryRequests({
|
|
10582
|
-
widget:
|
|
10582
|
+
widget: z,
|
|
10583
10583
|
dateRange: [x.startDate, x.endDate],
|
|
10584
10584
|
compareDateRange: k.startDate && k.endDate ? [k.startDate, k.endDate] : void 0,
|
|
10585
10585
|
timeRange: [
|
|
@@ -10590,8 +10590,8 @@ const ar = async (g, I, C) => {
|
|
|
10590
10590
|
restaurantIds: M,
|
|
10591
10591
|
warehouseIds: J,
|
|
10592
10592
|
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
10593
|
-
}).map((fe,
|
|
10594
|
-
const de =
|
|
10593
|
+
}).map((fe, K) => {
|
|
10594
|
+
const de = K === 0 ? 3e3 : 12e3;
|
|
10595
10595
|
return {
|
|
10596
10596
|
...fe,
|
|
10597
10597
|
limit: M.length > 50 ? g.config.limit || de : g.config.limit
|
|
@@ -10601,21 +10601,21 @@ const ar = async (g, I, C) => {
|
|
|
10601
10601
|
timeout: 1e3 * 60 * 5,
|
|
10602
10602
|
signal: I
|
|
10603
10603
|
}
|
|
10604
|
-
}, _e = await
|
|
10604
|
+
}, _e = await Vt(
|
|
10605
10605
|
[
|
|
10606
|
-
() =>
|
|
10607
|
-
() =>
|
|
10608
|
-
() => (
|
|
10606
|
+
() => ee.fetch(X),
|
|
10607
|
+
() => ee.fetch(X),
|
|
10608
|
+
() => (X.url = X.url.replace("postgres-query", "query"), ee.fetch(X))
|
|
10609
10609
|
],
|
|
10610
10610
|
2e3
|
|
10611
10611
|
);
|
|
10612
|
-
return (await
|
|
10612
|
+
return (await Bt(Ut, {
|
|
10613
10613
|
responses: _e,
|
|
10614
10614
|
widget: JSON.parse(JSON.stringify(g)),
|
|
10615
10615
|
country: L.value
|
|
10616
10616
|
})).data;
|
|
10617
10617
|
};
|
|
10618
|
-
function
|
|
10618
|
+
function je(g) {
|
|
10619
10619
|
const I = g.config;
|
|
10620
10620
|
return {
|
|
10621
10621
|
showTitle: I.showTitle,
|
|
@@ -10646,14 +10646,14 @@ function Ye(g) {
|
|
|
10646
10646
|
legendMaxWidth: I.legendMaxWidth
|
|
10647
10647
|
};
|
|
10648
10648
|
}
|
|
10649
|
-
function
|
|
10649
|
+
function Ke(g) {
|
|
10650
10650
|
const I = g.config;
|
|
10651
10651
|
return {
|
|
10652
10652
|
rowHeight: I.rowHeight,
|
|
10653
10653
|
colWidths: I.colWidths
|
|
10654
10654
|
};
|
|
10655
10655
|
}
|
|
10656
|
-
const
|
|
10656
|
+
const lr = async ({
|
|
10657
10657
|
reportType: g,
|
|
10658
10658
|
index: I,
|
|
10659
10659
|
orientationTypes: C,
|
|
@@ -10662,20 +10662,20 @@ const sr = async ({
|
|
|
10662
10662
|
timeRange: M,
|
|
10663
10663
|
dateRange: J
|
|
10664
10664
|
}) => {
|
|
10665
|
-
const { businessId: P } = V(te()), { restaurants: x, warehouses: k, globalFilters: Q } = Ce(), { currentReport: U, overviewReport:
|
|
10665
|
+
const { businessId: P } = V(te()), { restaurants: x, warehouses: k, globalFilters: Q } = Ce(), { currentReport: U, overviewReport: z } = Ve(), { selectedNavigationTab: X } = We(), { sizes: _e } = Ye();
|
|
10666
10666
|
let ae = U == null ? void 0 : U.id, se = (U == null ? void 0 : U.tiles) ?? [];
|
|
10667
|
-
|
|
10668
|
-
const re = se.filter((
|
|
10669
|
-
fetchType:
|
|
10670
|
-
url: `/${P.value}/file?lang=${
|
|
10667
|
+
X === "overview" && z && (ae = z == null ? void 0 : z.id, se = (z == null ? void 0 : z.tiles) ?? []);
|
|
10668
|
+
const re = se.filter((Y, oe) => typeof I == "number" ? oe === I : !0).map((Y) => xe(Y.widget, Q, Y.id)), ue = {
|
|
10669
|
+
fetchType: Z.Post,
|
|
10670
|
+
url: `/${P.value}/file?lang=${Pe()}`,
|
|
10671
10671
|
data: {
|
|
10672
10672
|
configs: [
|
|
10673
|
-
...re.map((
|
|
10673
|
+
...re.map((Y, oe) => {
|
|
10674
10674
|
var ce, pe, me, W;
|
|
10675
10675
|
const ie = _e[I ?? oe];
|
|
10676
10676
|
return {
|
|
10677
10677
|
requests: Re.getQueryRequests({
|
|
10678
|
-
widget:
|
|
10678
|
+
widget: Y,
|
|
10679
10679
|
dateRange: [J.startDate, J.endDate],
|
|
10680
10680
|
timeRange: [
|
|
10681
10681
|
ye().set("hour", Number((ce = M.start) == null ? void 0 : ce.hour)).set("minute", Number((pe = M.start) == null ? void 0 : pe.minute)).toISOString(),
|
|
@@ -10692,10 +10692,10 @@ const sr = async ({
|
|
|
10692
10692
|
}),
|
|
10693
10693
|
index: I || oe,
|
|
10694
10694
|
drillDimension: null,
|
|
10695
|
-
chartWidth: (ie == null ? void 0 : ie.width) ??
|
|
10696
|
-
chartHeight: (ie == null ? void 0 : ie.height) ??
|
|
10697
|
-
...
|
|
10698
|
-
...
|
|
10695
|
+
chartWidth: (ie == null ? void 0 : ie.width) ?? Y.config.chartWidth,
|
|
10696
|
+
chartHeight: (ie == null ? void 0 : ie.height) ?? Y.config.chartHeight,
|
|
10697
|
+
...je(Y),
|
|
10698
|
+
...Ke(Y)
|
|
10699
10699
|
};
|
|
10700
10700
|
})
|
|
10701
10701
|
],
|
|
@@ -10708,9 +10708,9 @@ const sr = async ({
|
|
|
10708
10708
|
responseType: "arraybuffer",
|
|
10709
10709
|
timeout: 1e3 * 60 * 60 * 24
|
|
10710
10710
|
}
|
|
10711
|
-
}, { headers: fe, data:
|
|
10711
|
+
}, { headers: fe, data: K } = await Je.rawFetch(ue), de = fe["content-disposition"].split("filename=")[1].replaceAll('"', ""), le = window.URL.createObjectURL(new Blob([new Uint8Array(K).buffer])), ne = document.createElement("a");
|
|
10712
10712
|
ne.href = le, ne.setAttribute("download", decodeURIComponent(de)), document.body.appendChild(ne), ne.click(), ne.remove();
|
|
10713
|
-
},
|
|
10713
|
+
}, or = async ({
|
|
10714
10714
|
emails: g,
|
|
10715
10715
|
types: I,
|
|
10716
10716
|
dateRange: C,
|
|
@@ -10719,31 +10719,31 @@ const sr = async ({
|
|
|
10719
10719
|
orientationTypes: M,
|
|
10720
10720
|
isCombinedLocationLayout: J
|
|
10721
10721
|
}) => {
|
|
10722
|
-
const { businessId: P } = V(te()), { currentReport: x, overviewReport: k } =
|
|
10722
|
+
const { businessId: P } = V(te()), { currentReport: x, overviewReport: k } = Ve(), { selectedNavigationTab: Q } = We(), { restaurants: U, warehouses: z, globalFilters: X } = Ce(), { sizes: _e } = Ye();
|
|
10723
10723
|
if (g.length === 0) {
|
|
10724
10724
|
console.error("No email addresses provided.");
|
|
10725
10725
|
return;
|
|
10726
10726
|
}
|
|
10727
10727
|
let ae = (x == null ? void 0 : x.id) || "", se = (x == null ? void 0 : x.name) || "", re = (x == null ? void 0 : x.tiles) ?? [];
|
|
10728
10728
|
Q === "overview" && k && (ae = k == null ? void 0 : k.id, se = k.name, re = (k == null ? void 0 : k.tiles) ?? []);
|
|
10729
|
-
const ue = re.map((
|
|
10729
|
+
const ue = re.map((K) => xe(K.widget, X, K.id)), fe = {
|
|
10730
10730
|
businessId: P.value,
|
|
10731
|
-
status:
|
|
10731
|
+
status: ze.generating,
|
|
10732
10732
|
dateRange: {
|
|
10733
10733
|
start: C.startDate,
|
|
10734
10734
|
end: C.endDate
|
|
10735
10735
|
},
|
|
10736
10736
|
reportName: se,
|
|
10737
10737
|
emails: g,
|
|
10738
|
-
configs: ue.map((
|
|
10739
|
-
var ne,
|
|
10738
|
+
configs: ue.map((K, de) => {
|
|
10739
|
+
var ne, Y, oe, ie;
|
|
10740
10740
|
const le = _e[de];
|
|
10741
10741
|
return {
|
|
10742
10742
|
requests: Re.getQueryRequests({
|
|
10743
|
-
widget:
|
|
10743
|
+
widget: K,
|
|
10744
10744
|
dateRange: [C.startDate, C.endDate],
|
|
10745
10745
|
timeRange: [
|
|
10746
|
-
ye().hour(Number((ne = b.start) == null ? void 0 : ne.hour)).minute(Number((
|
|
10746
|
+
ye().hour(Number((ne = b.start) == null ? void 0 : ne.hour)).minute(Number((Y = b.start) == null ? void 0 : Y.minute)).toISOString(),
|
|
10747
10747
|
ye().hour(Number((oe = b.end) == null ? void 0 : oe.hour)).minute(Number((ie = b.end) == null ? void 0 : ie.minute)).toISOString()
|
|
10748
10748
|
],
|
|
10749
10749
|
businessIds: P ? [P.value] : [],
|
|
@@ -10751,16 +10751,16 @@ const sr = async ({
|
|
|
10751
10751
|
(ce) => U.find((pe) => pe.id === ce)
|
|
10752
10752
|
),
|
|
10753
10753
|
warehouseIds: L.filter(
|
|
10754
|
-
(ce) =>
|
|
10754
|
+
(ce) => z.find((pe) => pe.id === ce)
|
|
10755
10755
|
),
|
|
10756
10756
|
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
10757
10757
|
}),
|
|
10758
10758
|
index: de,
|
|
10759
10759
|
drillDimension: null,
|
|
10760
|
-
chartWidth: (le == null ? void 0 : le.width) ??
|
|
10761
|
-
chartHeight: (le == null ? void 0 : le.height) ??
|
|
10762
|
-
...
|
|
10763
|
-
...
|
|
10760
|
+
chartWidth: (le == null ? void 0 : le.width) ?? K.config.chartWidth,
|
|
10761
|
+
chartHeight: (le == null ? void 0 : le.height) ?? K.config.chartHeight,
|
|
10762
|
+
...je(K),
|
|
10763
|
+
...Ke(K)
|
|
10764
10764
|
};
|
|
10765
10765
|
}),
|
|
10766
10766
|
reportId: ae,
|
|
@@ -10768,35 +10768,35 @@ const sr = async ({
|
|
|
10768
10768
|
orientationTypes: M,
|
|
10769
10769
|
isCombinedLocationLayout: J
|
|
10770
10770
|
};
|
|
10771
|
-
await
|
|
10772
|
-
fetchType:
|
|
10773
|
-
url: `/${P.value}/reports/email?lang=${
|
|
10771
|
+
await Je.fetch({
|
|
10772
|
+
fetchType: Z.Post,
|
|
10773
|
+
url: `/${P.value}/reports/email?lang=${Pe()}`,
|
|
10774
10774
|
data: fe,
|
|
10775
10775
|
requestConfig: { timeout: 1e3 * 60 * 3 }
|
|
10776
10776
|
});
|
|
10777
|
-
},
|
|
10777
|
+
}, _r = async (g) => {
|
|
10778
10778
|
const { businessId: I } = V(te());
|
|
10779
|
-
await
|
|
10780
|
-
fetchType:
|
|
10781
|
-
url: `/${I.value}/reports/resend-email?lang=${
|
|
10779
|
+
await Je.fetch({
|
|
10780
|
+
fetchType: Z.Post,
|
|
10781
|
+
url: `/${I.value}/reports/resend-email?lang=${Pe()}`,
|
|
10782
10782
|
data: { jobId: g },
|
|
10783
10783
|
requestConfig: { timeout: 1e3 * 60 * 3 }
|
|
10784
10784
|
});
|
|
10785
|
-
},
|
|
10785
|
+
}, ur = async () => {
|
|
10786
10786
|
const { businessId: g } = V(te());
|
|
10787
|
-
return await
|
|
10788
|
-
fetchType:
|
|
10787
|
+
return await ee.fetch({
|
|
10788
|
+
fetchType: Z.Get,
|
|
10789
10789
|
url: `/${g.value}/reports/email-recipients`
|
|
10790
10790
|
});
|
|
10791
|
-
},
|
|
10791
|
+
}, dr = async (g) => {
|
|
10792
10792
|
const { businessId: I } = V(te());
|
|
10793
|
-
await
|
|
10794
|
-
fetchType:
|
|
10793
|
+
await ee.fetch({
|
|
10794
|
+
fetchType: Z.Post,
|
|
10795
10795
|
url: `/${I.value}/reports/email-recipient/delete`,
|
|
10796
10796
|
data: { email: g }
|
|
10797
10797
|
});
|
|
10798
10798
|
};
|
|
10799
|
-
function
|
|
10799
|
+
function Qe(g = [], I = []) {
|
|
10800
10800
|
const C = (M) => `${M.schemaName}:${M.name}:${M.operator}`, b = /* @__PURE__ */ new Map(), L = [];
|
|
10801
10801
|
for (const M of g) {
|
|
10802
10802
|
if (!M || !Array.isArray(M.values) || M.values.length === 0) continue;
|
|
@@ -10824,7 +10824,7 @@ function Ue(g = [], I = []) {
|
|
|
10824
10824
|
}
|
|
10825
10825
|
return [...Array.from(b.values()), ...L];
|
|
10826
10826
|
}
|
|
10827
|
-
function
|
|
10827
|
+
function Wt(g, I, C) {
|
|
10828
10828
|
const b = [], L = /* @__PURE__ */ new Map();
|
|
10829
10829
|
return g.forEach((M) => {
|
|
10830
10830
|
M && (I.includes(M.schemaName) && b.push(M), C.forEach((J, P) => {
|
|
@@ -10833,12 +10833,12 @@ function Vt(g, I, C) {
|
|
|
10833
10833
|
}));
|
|
10834
10834
|
}), { mainFilters: b, joinFilters: L };
|
|
10835
10835
|
}
|
|
10836
|
-
function
|
|
10836
|
+
function xe(g, I, C) {
|
|
10837
10837
|
var x, k;
|
|
10838
10838
|
const b = JSON.parse(JSON.stringify(g)), L = I.filter((Q) => {
|
|
10839
10839
|
var U;
|
|
10840
|
-
return (U = Q.tileIds) == null ? void 0 : U.some((
|
|
10841
|
-
}), M = ((x = b.config.joinDatasources) == null ? void 0 : x.map((Q) => Q.schemaNames ?? [])) ?? [], { mainFilters: J, joinFilters: P } =
|
|
10840
|
+
return (U = Q.tileIds) == null ? void 0 : U.some((z) => z === C);
|
|
10841
|
+
}), M = ((x = b.config.joinDatasources) == null ? void 0 : x.map((Q) => Q.schemaNames ?? [])) ?? [], { mainFilters: J, joinFilters: P } = Wt(
|
|
10842
10842
|
L,
|
|
10843
10843
|
b.config.schemaNames,
|
|
10844
10844
|
M
|
|
@@ -10847,46 +10847,46 @@ function Pe(g, I, C) {
|
|
|
10847
10847
|
...b,
|
|
10848
10848
|
config: {
|
|
10849
10849
|
...b.config,
|
|
10850
|
-
filters:
|
|
10850
|
+
filters: Qe(b.config.filters ?? [], J),
|
|
10851
10851
|
joinDatasources: ((k = b.config.joinDatasources) == null ? void 0 : k.map((Q, U) => ({
|
|
10852
10852
|
...Q,
|
|
10853
|
-
filters:
|
|
10853
|
+
filters: Qe(Q.filters ?? [], P.get(U) ?? [])
|
|
10854
10854
|
}))) ?? []
|
|
10855
10855
|
}
|
|
10856
10856
|
};
|
|
10857
10857
|
}
|
|
10858
10858
|
let Fe;
|
|
10859
|
-
const
|
|
10860
|
-
function
|
|
10859
|
+
const zt = new Uint8Array(16);
|
|
10860
|
+
function Yt() {
|
|
10861
10861
|
if (!Fe && (Fe = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !Fe))
|
|
10862
10862
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
10863
|
-
return Fe(
|
|
10863
|
+
return Fe(zt);
|
|
10864
10864
|
}
|
|
10865
|
-
const
|
|
10865
|
+
const j = [];
|
|
10866
10866
|
for (let g = 0; g < 256; ++g)
|
|
10867
|
-
|
|
10868
|
-
function
|
|
10869
|
-
return
|
|
10867
|
+
j.push((g + 256).toString(16).slice(1));
|
|
10868
|
+
function jt(g, I = 0) {
|
|
10869
|
+
return j[g[I + 0]] + j[g[I + 1]] + j[g[I + 2]] + j[g[I + 3]] + "-" + j[g[I + 4]] + j[g[I + 5]] + "-" + j[g[I + 6]] + j[g[I + 7]] + "-" + j[g[I + 8]] + j[g[I + 9]] + "-" + j[g[I + 10]] + j[g[I + 11]] + j[g[I + 12]] + j[g[I + 13]] + j[g[I + 14]] + j[g[I + 15]];
|
|
10870
10870
|
}
|
|
10871
|
-
const
|
|
10872
|
-
randomUUID:
|
|
10871
|
+
const Kt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Be = {
|
|
10872
|
+
randomUUID: Kt
|
|
10873
10873
|
};
|
|
10874
|
-
function
|
|
10875
|
-
if (
|
|
10876
|
-
return
|
|
10874
|
+
function cr(g, I, C) {
|
|
10875
|
+
if (Be.randomUUID && !I && !g)
|
|
10876
|
+
return Be.randomUUID();
|
|
10877
10877
|
g = g || {};
|
|
10878
|
-
const b = g.random || (g.rng ||
|
|
10878
|
+
const b = g.random || (g.rng || Yt)();
|
|
10879
10879
|
if (b[6] = b[6] & 15 | 64, b[8] = b[8] & 63 | 128, I) {
|
|
10880
10880
|
C = C || 0;
|
|
10881
10881
|
for (let L = 0; L < 16; ++L)
|
|
10882
10882
|
I[C + L] = b[L];
|
|
10883
10883
|
return I;
|
|
10884
10884
|
}
|
|
10885
|
-
return
|
|
10885
|
+
return jt(b);
|
|
10886
10886
|
}
|
|
10887
|
-
const
|
|
10887
|
+
const pr = /* @__PURE__ */ ut({
|
|
10888
10888
|
__name: "BaseDialog",
|
|
10889
|
-
props: /* @__PURE__ */
|
|
10889
|
+
props: /* @__PURE__ */ qe({
|
|
10890
10890
|
title: {
|
|
10891
10891
|
type: String,
|
|
10892
10892
|
default: "Title"
|
|
@@ -10903,32 +10903,32 @@ const cr = /* @__PURE__ */ _t({
|
|
|
10903
10903
|
modelValue: { type: Boolean, required: !0 },
|
|
10904
10904
|
modelModifiers: {}
|
|
10905
10905
|
}),
|
|
10906
|
-
emits: /* @__PURE__ */
|
|
10906
|
+
emits: /* @__PURE__ */ qe(["confirm"], ["update:modelValue"]),
|
|
10907
10907
|
setup(g, { emit: I }) {
|
|
10908
|
-
const C =
|
|
10909
|
-
return
|
|
10908
|
+
const C = dt(g, "modelValue"), b = g, L = I;
|
|
10909
|
+
return De(C, () => {
|
|
10910
10910
|
C.value ? document.body.style.overflow = "hidden" : document.body.style.overflow = "scroll";
|
|
10911
10911
|
}), (M, J) => {
|
|
10912
|
-
const P =
|
|
10913
|
-
return
|
|
10912
|
+
const P = ke("FmButton"), x = ke("FmDialog");
|
|
10913
|
+
return pt(), ct(x, {
|
|
10914
10914
|
modelValue: C.value,
|
|
10915
10915
|
"onUpdate:modelValue": J[2] || (J[2] = (k) => C.value = k),
|
|
10916
10916
|
overlay: ""
|
|
10917
10917
|
}, {
|
|
10918
10918
|
"dialog-header": be(() => [
|
|
10919
|
-
|
|
10919
|
+
$t(St(b.title), 1)
|
|
10920
10920
|
]),
|
|
10921
10921
|
default: be(() => [
|
|
10922
|
-
|
|
10922
|
+
ft(M.$slots, "content")
|
|
10923
10923
|
]),
|
|
10924
10924
|
"dialog-footer": be(() => [
|
|
10925
|
-
J[3] || (J[3] =
|
|
10926
|
-
|
|
10925
|
+
J[3] || (J[3] = yt("div", { class: "grow" }, null, -1)),
|
|
10926
|
+
He(P, {
|
|
10927
10927
|
label: b.secondaryButtonLabel,
|
|
10928
10928
|
variant: "tertiary",
|
|
10929
10929
|
onClick: J[0] || (J[0] = (k) => C.value = !1)
|
|
10930
10930
|
}, null, 8, ["label"]),
|
|
10931
|
-
|
|
10931
|
+
He(P, {
|
|
10932
10932
|
label: b.primaryButtonLabel,
|
|
10933
10933
|
variant: "primary",
|
|
10934
10934
|
onClick: J[1] || (J[1] = (k) => L("confirm"))
|
|
@@ -10941,26 +10941,26 @@ const cr = /* @__PURE__ */ _t({
|
|
|
10941
10941
|
});
|
|
10942
10942
|
export {
|
|
10943
10943
|
Le as C,
|
|
10944
|
-
|
|
10945
|
-
|
|
10946
|
-
|
|
10947
|
-
|
|
10948
|
-
|
|
10949
|
-
|
|
10950
|
-
|
|
10951
|
-
|
|
10944
|
+
Tt as D,
|
|
10945
|
+
It as P,
|
|
10946
|
+
Ft as R,
|
|
10947
|
+
ht as S,
|
|
10948
|
+
Et as W,
|
|
10949
|
+
pr as _,
|
|
10950
|
+
Ve as a,
|
|
10951
|
+
qt as b,
|
|
10952
10952
|
we as c,
|
|
10953
|
-
|
|
10954
|
-
|
|
10955
|
-
|
|
10956
|
-
|
|
10957
|
-
|
|
10958
|
-
|
|
10959
|
-
|
|
10960
|
-
|
|
10961
|
-
|
|
10962
|
-
|
|
10963
|
-
|
|
10964
|
-
|
|
10965
|
-
|
|
10953
|
+
Ye as d,
|
|
10954
|
+
Ct as e,
|
|
10955
|
+
lr as f,
|
|
10956
|
+
nr as g,
|
|
10957
|
+
ze as h,
|
|
10958
|
+
ur as i,
|
|
10959
|
+
ar as j,
|
|
10960
|
+
dr as k,
|
|
10961
|
+
sr as q,
|
|
10962
|
+
_r as r,
|
|
10963
|
+
or as s,
|
|
10964
|
+
We as u,
|
|
10965
|
+
cr as v
|
|
10966
10966
|
};
|