@feedmepos/mf-report 5.15.1-beta.0 → 5.15.2-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-qPSv57Xk.js → App-CkETvuoa.js} +4 -4
- package/dist/{BaseDialog.vue_vue_type_script_setup_true_lang-B8EGdLfw.js → BaseDialog.vue_vue_type_script_setup_true_lang-CqcJLejU.js} +190 -190
- package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-B7dDfhUL.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-Yv4mU3CA.js} +13 -13
- package/dist/{Default.vue_vue_type_script_setup_true_lang-DNY8Wqv1.js → Default.vue_vue_type_script_setup_true_lang-Byp4oGQ0.js} +2 -2
- package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-HmNUALxj.js → DynamicWidget.vue_vue_type_script_setup_true_lang-C3xwBjlz.js} +5 -5
- package/dist/{InsightView-DdVyodyh.js → InsightView-DJ3DfNst.js} +5 -5
- package/dist/{Integration-U7ndOhIi.js → Integration-CM0LDEnL.js} +2 -2
- package/dist/{Integrations-DnCHL8tj.js → Integrations-NlOsDssY.js} +3 -3
- package/dist/{Layout-irDeVwGU.js → Layout-ChtULxvj.js} +1 -1
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-hMxqVj1i.js → MenuTab.vue_vue_type_script_setup_true_lang-DQg7BMuM.js} +15 -15
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-BiEygoc2.js → NavigationTab.vue_vue_type_script_setup_true_lang-FWQoMCXv.js} +4499 -4499
- package/dist/{NoData.vue_vue_type_script_setup_true_lang-COhOCC1a.js → NoData.vue_vue_type_script_setup_true_lang-BF1MLXsF.js} +1 -1
- package/dist/{OverviewView-82LTm8GW.js → OverviewView-CxcHjEPw.js} +5 -5
- package/dist/{Report-Bi8FkOJN.js → Report-y76yRVez.js} +4 -4
- package/dist/{ReportEditor-DYdNyDyH.js → ReportEditor-BEHzZo7f.js} +6 -6
- package/dist/{ReportView-CHic0zoP.js → ReportView-CmTZ0AuM.js} +7 -7
- package/dist/{SelectComponent.vue_vue_type_script_setup_true_lang-BYGtFlSO.js → SelectComponent.vue_vue_type_script_setup_true_lang-nAU0NNg5.js} +1 -1
- package/dist/{Setting-DUvAi17u.js → Setting-DrQCoq7d.js} +4 -4
- package/dist/{TileEditor-DHTTt17I.js → TileEditor-m2EtFkHR.js} +7 -7
- package/dist/{TransitionFade-DClsBhrj.js → TransitionFade-DEF953Zt.js} +5 -5
- package/dist/app.js +11 -11
- package/dist/{helper-BM7X3i6X.js → helper-DJZfVXf0.js} +1 -1
- package/dist/{vue-i18n-DjcW-hhZ.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 ee, F as K, s as X, 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 W, 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(R) {
|
|
14
14
|
setImmediate(R);
|
|
15
15
|
} : function(R) {
|
|
@@ -21,7 +21,7 @@ var Re = {};
|
|
|
21
21
|
} catch {
|
|
22
22
|
}
|
|
23
23
|
if (b) {
|
|
24
|
-
var J = (typeof __webpack_require__ < "u" ? __non_webpack_require__ :
|
|
24
|
+
var J = (typeof __webpack_require__ < "u" ? __non_webpack_require__ : At)("url");
|
|
25
25
|
Object.defineProperty(C, "location", {
|
|
26
26
|
value: {
|
|
27
27
|
get href() {
|
|
@@ -112,7 +112,7 @@ var Re = {};
|
|
|
112
112
|
function oe(r, t) {
|
|
113
113
|
N(t.prototype, r.prototype), r.prototype.constructor = r;
|
|
114
114
|
}
|
|
115
|
-
function
|
|
115
|
+
function Z(r, t) {
|
|
116
116
|
P(t.prototype, r.prototype), r.prototype.constructor = r;
|
|
117
117
|
}
|
|
118
118
|
function ie(r, t, i, n) {
|
|
@@ -159,7 +159,7 @@ var Re = {};
|
|
|
159
159
|
function ue(r) {
|
|
160
160
|
return r;
|
|
161
161
|
}
|
|
162
|
-
function
|
|
162
|
+
function j(r) {
|
|
163
163
|
for (var t = 0; t < r.length; ++t)
|
|
164
164
|
r[t];
|
|
165
165
|
}
|
|
@@ -178,16 +178,16 @@ var Re = {};
|
|
|
178
178
|
};
|
|
179
179
|
}
|
|
180
180
|
var se = 0;
|
|
181
|
-
function
|
|
181
|
+
function z(r, t, i, n, a, s, o, _, d, c) {
|
|
182
182
|
return typeof _ == "number" && (_ += se), { co: r, iS: t, iI: i, rC: n, dV: a, cs: s, fs: o, fT: _, aI: d || 0, nDA: c };
|
|
183
183
|
}
|
|
184
184
|
function le(r, t, i, n, a, s, o, _) {
|
|
185
|
-
var d =
|
|
185
|
+
var d = z(r, !0, !1, i, n, a, s, o, _, !1), c = te(d);
|
|
186
186
|
r[t] = c;
|
|
187
187
|
}
|
|
188
188
|
function re(r, t, i, n, a, s, o, _, d, c) {
|
|
189
189
|
i = !!i;
|
|
190
|
-
var p =
|
|
190
|
+
var p = z(r, !1, i, n, a, s, o, _, d, !!c), y = ce(i, p);
|
|
191
191
|
r[t] = y;
|
|
192
192
|
}
|
|
193
193
|
function de(r) {
|
|
@@ -223,7 +223,7 @@ var Re = {};
|
|
|
223
223
|
return le(o, _, i, n, a, [d], c, s);
|
|
224
224
|
};
|
|
225
225
|
};
|
|
226
|
-
return { inherit: k, inheritMany: U, mixin: oe, mixinHard:
|
|
226
|
+
return { inherit: k, inheritMany: U, mixin: oe, mixinHard: Z, installStaticTearOff: le, installInstanceTearOff: re, _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: ne, lazy: ae, lazyFinal: _e, lazyOld: ie, updateHolder: me, convertToFastObject: ue, updateTypes: ge, setOrUpdateInterceptorsByTag: de, setOrUpdateLeafTags: pe };
|
|
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))?)?)?$")), 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("^'(?:[^']|'')*'"), e.RegExp_RegExp("^(?:G+|y+|M+|k+|S+|E+|a+|h+|K+|H+|c+|L+|Q+|d+|D+|m+|s+|v+|z+|Z+)"), e.RegExp_RegExp("^[^'GyMkSEahKHcLQdDmsvzZ]+")], e.findType("JSArray<RegExp>"))), t(f, "_DateFormatQuotedField__twoEscapedQuotes", "$get$_DateFormatQuotedField__twoEscapedQuotes", () => e.RegExp_RegExp("''")), t(f, "asciiDigitMatcher", "$get$asciiDigitMatcher", () => e.RegExp_RegExp("^\\d+")), 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), M = e.FrLocale$(l.StartOfWeek_2), O = e.FrLocale$(l.StartOfWeek_2), w = e.FrLocale$(l.StartOfWeek_1), T = e.ZhCnLocale$(l.StartOfWeek_1), H = e.ZhCnLocale$(l.StartOfWeek_1), L = e.ZhLocale$(l.StartOfWeek_1), x = e.ZhLocale$(l.StartOfWeek_1), q = e.DeLocale$(l.StartOfWeek_2), V = e.DeLocale$(l.StartOfWeek_2), fe = 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", M, "fr_ch", O, "fr_ca", w, "zh", T, "zh_cn", H, "zh_hk", L, "zh_tw", x, "de", q, "de_de", V, "de_at", fe, "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), M = e.FrLocale$(l.StartOfWeek_2), O = e.FrLocale$(l.StartOfWeek_2), w = e.FrLocale$(l.StartOfWeek_1), T = e.ZhCnLocale$(l.StartOfWeek_1), H = e.ZhCnLocale$(l.StartOfWeek_1), L = e.ZhLocale$(l.StartOfWeek_1), x = e.ZhLocale$(l.StartOfWeek_1), q = e.DeLocale$(l.StartOfWeek_2), V = e.DeLocale$(l.StartOfWeek_2), fe = 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", M, "fr_ch", O, "fr_ca", w, "zh", T, "zh_cn", H, "zh_hk", L, "zh_tw", x, "de", q, "de_de", V, "de_at", fe, "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);
|
|
@@ -10132,7 +10132,7 @@ then EXTRACT(EPOCH FROM COALESCE(timesheets.ended_at,!end)-(timesheets.created_a
|
|
|
10132
10132
|
return this(r, t, i);
|
|
10133
10133
|
}, Function.prototype.call$8 = function(r, t, i, n, a, s, o, _) {
|
|
10134
10134
|
return this(r, t, i, n, a, s, o, _);
|
|
10135
|
-
},
|
|
10135
|
+
}, j(he), function(r) {
|
|
10136
10136
|
if (typeof document > "u") {
|
|
10137
10137
|
r(null);
|
|
10138
10138
|
return;
|
|
@@ -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))(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";
|
|
@@ -10169,7 +10169,7 @@ function ir(g) {
|
|
|
10169
10169
|
return "Unknown";
|
|
10170
10170
|
}
|
|
10171
10171
|
}
|
|
10172
|
-
function
|
|
10172
|
+
function ar(g) {
|
|
10173
10173
|
switch (g) {
|
|
10174
10174
|
case "landscape":
|
|
10175
10175
|
return "Landscape";
|
|
@@ -10179,82 +10179,82 @@ function nr(g) {
|
|
|
10179
10179
|
return "Unknown";
|
|
10180
10180
|
}
|
|
10181
10181
|
}
|
|
10182
|
-
const Se = "/report-settings",
|
|
10182
|
+
const Se = "/report-settings", Mt = async () => {
|
|
10183
10183
|
const { businessId: g } = W(ee());
|
|
10184
10184
|
if (g) {
|
|
10185
10185
|
const I = {
|
|
10186
|
-
fetchType:
|
|
10186
|
+
fetchType: K.Get,
|
|
10187
10187
|
url: `${Se}/${g.value}/reports`
|
|
10188
10188
|
};
|
|
10189
|
-
return
|
|
10189
|
+
return X.fetch(I);
|
|
10190
10190
|
} else
|
|
10191
10191
|
return Promise.reject(new Error("Business Id is not defined"));
|
|
10192
|
-
},
|
|
10192
|
+
}, Rt = (g) => {
|
|
10193
10193
|
const { businessId: I } = W(ee()), C = {
|
|
10194
|
-
fetchType:
|
|
10194
|
+
fetchType: K.Put,
|
|
10195
10195
|
url: `${Se}/${I.value}/reports/${g.id}`,
|
|
10196
10196
|
data: g
|
|
10197
10197
|
};
|
|
10198
|
-
return
|
|
10199
|
-
},
|
|
10198
|
+
return X.fetch(C);
|
|
10199
|
+
}, bt = (g) => {
|
|
10200
10200
|
const { businessId: I } = W(ee()), C = {
|
|
10201
|
-
fetchType:
|
|
10201
|
+
fetchType: K.Post,
|
|
10202
10202
|
url: `${Se}/${I.value}/reports`,
|
|
10203
10203
|
data: g
|
|
10204
10204
|
};
|
|
10205
|
-
return
|
|
10206
|
-
},
|
|
10205
|
+
return X.fetch(C);
|
|
10206
|
+
}, Ot = (g) => {
|
|
10207
10207
|
const { businessId: I } = W(ee()), C = {
|
|
10208
|
-
fetchType:
|
|
10208
|
+
fetchType: K.Delete,
|
|
10209
10209
|
url: `${Se}/${I.value}/reports/${g.id}`
|
|
10210
10210
|
};
|
|
10211
|
-
return
|
|
10212
|
-
},
|
|
10211
|
+
return X.fetch(C);
|
|
10212
|
+
}, vt = (g) => {
|
|
10213
10213
|
const { businessId: I } = W(ee()), C = {
|
|
10214
|
-
fetchType:
|
|
10214
|
+
fetchType: K.Put,
|
|
10215
10215
|
url: `${Se}/${I.value}/reports/default`,
|
|
10216
10216
|
data: { defaultReport: g }
|
|
10217
10217
|
};
|
|
10218
|
-
return
|
|
10219
|
-
},
|
|
10218
|
+
return X.fetch(C);
|
|
10219
|
+
}, wt = async () => {
|
|
10220
10220
|
const { businessId: g } = W(ee());
|
|
10221
10221
|
if (g) {
|
|
10222
10222
|
const I = {
|
|
10223
|
-
fetchType:
|
|
10223
|
+
fetchType: K.Get,
|
|
10224
10224
|
url: `${Se}/${g.value}/overview-report`
|
|
10225
10225
|
};
|
|
10226
|
-
return
|
|
10226
|
+
return X.fetch(I);
|
|
10227
10227
|
} else
|
|
10228
10228
|
return Promise.reject(new Error("Business Id is not defined"));
|
|
10229
|
-
},
|
|
10229
|
+
}, Lt = async () => {
|
|
10230
10230
|
const { businessId: g } = W(ee());
|
|
10231
10231
|
if (g) {
|
|
10232
10232
|
const I = {
|
|
10233
|
-
fetchType:
|
|
10233
|
+
fetchType: K.Get,
|
|
10234
10234
|
url: `${Se}/${g.value}/config`
|
|
10235
10235
|
};
|
|
10236
|
-
return
|
|
10236
|
+
return X.fetch(I);
|
|
10237
10237
|
} else
|
|
10238
10238
|
return Promise.reject(new Error("Business Id is not defined"));
|
|
10239
|
-
},
|
|
10239
|
+
}, Jt = "/report-settings", Dt = async () => {
|
|
10240
10240
|
const { businessId: g } = W(ee());
|
|
10241
10241
|
if (g) {
|
|
10242
10242
|
const I = {
|
|
10243
|
-
fetchType:
|
|
10244
|
-
url: `${
|
|
10243
|
+
fetchType: K.Get,
|
|
10244
|
+
url: `${Jt}/${g.value}/categories`
|
|
10245
10245
|
};
|
|
10246
|
-
return
|
|
10246
|
+
return X.fetch(I);
|
|
10247
10247
|
} else
|
|
10248
10248
|
return Promise.reject(new Error("Business Id is not defined"));
|
|
10249
|
-
},
|
|
10249
|
+
}, Pt = (g) => {
|
|
10250
10250
|
const { businessId: I } = W(ee()), C = {
|
|
10251
|
-
fetchType:
|
|
10251
|
+
fetchType: K.Post,
|
|
10252
10252
|
url: `/report-settings/${I.value}/date-settings`,
|
|
10253
10253
|
data: {
|
|
10254
10254
|
...g
|
|
10255
10255
|
}
|
|
10256
10256
|
};
|
|
10257
|
-
return
|
|
10257
|
+
return X.fetch(C);
|
|
10258
10258
|
};
|
|
10259
10259
|
function Oe(g, I = {}) {
|
|
10260
10260
|
const C = localStorage.getItem(g);
|
|
@@ -10274,17 +10274,17 @@ const $e = {
|
|
|
10274
10274
|
setJson: (g, I) => {
|
|
10275
10275
|
localStorage.setItem(g, JSON.stringify(I));
|
|
10276
10276
|
}
|
|
10277
|
-
},
|
|
10277
|
+
}, xt = () => {
|
|
10278
10278
|
const g = {
|
|
10279
|
-
fetchType:
|
|
10279
|
+
fetchType: K.Get,
|
|
10280
10280
|
url: "/schemas"
|
|
10281
10281
|
};
|
|
10282
|
-
return
|
|
10283
|
-
},
|
|
10284
|
-
const g = B([]), I =
|
|
10282
|
+
return X.fetch(g);
|
|
10283
|
+
}, Nt = "mf-reportschema-store", qt = Me(Nt, () => {
|
|
10284
|
+
const g = B([]), I = Ge();
|
|
10285
10285
|
async function C() {
|
|
10286
10286
|
try {
|
|
10287
|
-
g.value = await
|
|
10287
|
+
g.value = await xt();
|
|
10288
10288
|
} catch (b) {
|
|
10289
10289
|
console.log(b), I.open({
|
|
10290
10290
|
title: "Get Schema Error",
|
|
@@ -10297,20 +10297,20 @@ const $e = {
|
|
|
10297
10297
|
schemas: g,
|
|
10298
10298
|
getSchema: C
|
|
10299
10299
|
};
|
|
10300
|
-
}),
|
|
10301
|
-
const { business: g, globalFilters: I } = W(Ce()), { schemas: C } = W(
|
|
10300
|
+
}), kt = "mf-reportreport-store", Ve = Me(kt, () => {
|
|
10301
|
+
const { business: g, globalFilters: I } = W(Ce()), { schemas: C } = W(qt()), { flags: b } = W(at()), J = B([]), R = B([]), v = B(0), P = Ge(), N = Ae(() => J.value.filter((r) => r.editable)), Q = Ae(() => J.value.filter((r) => !r.editable)), k = B(!1), U = B(""), oe = B(), Z = B(), ie = Ae(() => {
|
|
10302
10302
|
const r = b.value.find(
|
|
10303
|
-
(t) => t.key ===
|
|
10303
|
+
(t) => t.key === st.report_portal_integration_custom_report
|
|
10304
10304
|
);
|
|
10305
10305
|
return typeof (r == null ? void 0 : r.value) == "number" ? r.value : null;
|
|
10306
10306
|
}), ae = Ae(() => ie.value === null ? !0 : ie.value - N.value.length > 0);
|
|
10307
10307
|
async function _e() {
|
|
10308
|
-
return
|
|
10308
|
+
return Z.value = await wt(), Z.value;
|
|
10309
10309
|
}
|
|
10310
10310
|
async function ne() {
|
|
10311
10311
|
var r;
|
|
10312
10312
|
try {
|
|
10313
|
-
J.value = await
|
|
10313
|
+
J.value = await Mt(), R.value = await Dt(), J.value.find((i) => i.id === U.value) || (U.value = ((r = J.value.find((i) => i.isDefault)) == null ? void 0 : r.id) || J.value[0].id);
|
|
10314
10314
|
} catch (t) {
|
|
10315
10315
|
console.log(t), P.open({
|
|
10316
10316
|
title: "Report Fetch Error",
|
|
@@ -10322,12 +10322,12 @@ const $e = {
|
|
|
10322
10322
|
const ue = Ae(
|
|
10323
10323
|
() => J.value.find((r) => r.id === U.value)
|
|
10324
10324
|
);
|
|
10325
|
-
function
|
|
10325
|
+
function j(r) {
|
|
10326
10326
|
var i;
|
|
10327
10327
|
const t = (i = C.value.find((n) => n.name === r.schemaName)) == null ? void 0 : i.fields.find((n) => n.name === r.name);
|
|
10328
10328
|
return t == null ? void 0 : t.type;
|
|
10329
10329
|
}
|
|
10330
|
-
|
|
10330
|
+
De(
|
|
10331
10331
|
() => {
|
|
10332
10332
|
var r;
|
|
10333
10333
|
return (r = ue.value) == null ? void 0 : r.globalFilters;
|
|
@@ -10337,25 +10337,25 @@ const $e = {
|
|
|
10337
10337
|
...t,
|
|
10338
10338
|
options: [],
|
|
10339
10339
|
values: [],
|
|
10340
|
-
type:
|
|
10340
|
+
type: j(t)
|
|
10341
10341
|
}));
|
|
10342
10342
|
},
|
|
10343
10343
|
{ deep: !0 }
|
|
10344
10344
|
);
|
|
10345
|
-
const ce = B(), te = B(0), se = B(),
|
|
10345
|
+
const ce = B(), te = B(0), se = B(), z = B(null), le = B(null), re = B(!1), de = B(!1), pe = B(!1);
|
|
10346
10346
|
async function ge(r) {
|
|
10347
10347
|
const t = N.value.findIndex((n) => n.id === r.id);
|
|
10348
10348
|
let i;
|
|
10349
|
-
t >= 0 ? i = (await
|
|
10349
|
+
t >= 0 ? i = (await Rt(r)).id : i = (await bt(r)).id, await ne(), $(i);
|
|
10350
10350
|
}
|
|
10351
10351
|
async function me(r) {
|
|
10352
|
-
return await
|
|
10352
|
+
return await Pt(r);
|
|
10353
10353
|
}
|
|
10354
10354
|
async function G(r) {
|
|
10355
|
-
await
|
|
10355
|
+
await Ot(r), await ne();
|
|
10356
10356
|
}
|
|
10357
10357
|
async function e(r) {
|
|
10358
|
-
await
|
|
10358
|
+
await vt(r), await ne();
|
|
10359
10359
|
}
|
|
10360
10360
|
function $(r) {
|
|
10361
10361
|
J.value.findIndex((i) => i.id === r) !== -1 && (U.value = r);
|
|
@@ -10403,7 +10403,7 @@ const $e = {
|
|
|
10403
10403
|
}
|
|
10404
10404
|
}
|
|
10405
10405
|
async function u() {
|
|
10406
|
-
return await
|
|
10406
|
+
return await Lt();
|
|
10407
10407
|
}
|
|
10408
10408
|
return {
|
|
10409
10409
|
isOpenDownloadDialog: re,
|
|
@@ -10416,13 +10416,13 @@ const $e = {
|
|
|
10416
10416
|
editingReport: ce,
|
|
10417
10417
|
editingTileIndex: te,
|
|
10418
10418
|
editingTile: se,
|
|
10419
|
-
editingGlobalFilterIndex:
|
|
10419
|
+
editingGlobalFilterIndex: z,
|
|
10420
10420
|
editingGlobalFilter: le,
|
|
10421
10421
|
currentReportId: U,
|
|
10422
10422
|
editableReports: N,
|
|
10423
10423
|
nonEditableReports: Q,
|
|
10424
10424
|
isOpenAddReportDialog: k,
|
|
10425
|
-
overviewReport:
|
|
10425
|
+
overviewReport: Z,
|
|
10426
10426
|
pinReport: l,
|
|
10427
10427
|
scrollPositionY: v,
|
|
10428
10428
|
customReportQuota: ie,
|
|
@@ -10440,8 +10440,8 @@ const $e = {
|
|
|
10440
10440
|
getReportConfig: u,
|
|
10441
10441
|
submitFeedback: me
|
|
10442
10442
|
};
|
|
10443
|
-
}),
|
|
10444
|
-
const { disabled: g } = W(
|
|
10443
|
+
}), Ht = "mf-reportnavigation", We = Me(Ht, () => {
|
|
10444
|
+
const { disabled: g } = W(lt()), I = B("v5"), C = Ae(() => {
|
|
10445
10445
|
const v = [
|
|
10446
10446
|
{
|
|
10447
10447
|
label: "overview",
|
|
@@ -10457,7 +10457,7 @@ const $e = {
|
|
|
10457
10457
|
label: "insight",
|
|
10458
10458
|
value: "insight",
|
|
10459
10459
|
route: "insights",
|
|
10460
|
-
badge: () =>
|
|
10460
|
+
badge: () => _t(gt.FmPill, { variant: "beta" })
|
|
10461
10461
|
},
|
|
10462
10462
|
{
|
|
10463
10463
|
label: "setting",
|
|
@@ -10470,7 +10470,7 @@ const $e = {
|
|
|
10470
10470
|
value: "integration",
|
|
10471
10471
|
route: "integrations"
|
|
10472
10472
|
}), v;
|
|
10473
|
-
}), b = B(""), { currentRoute: J } =
|
|
10473
|
+
}), b = B(""), { currentRoute: J } = mt();
|
|
10474
10474
|
function R(v) {
|
|
10475
10475
|
switch (v.name) {
|
|
10476
10476
|
case "report":
|
|
@@ -10492,7 +10492,7 @@ const $e = {
|
|
|
10492
10492
|
break;
|
|
10493
10493
|
}
|
|
10494
10494
|
}
|
|
10495
|
-
return
|
|
10495
|
+
return De(
|
|
10496
10496
|
J,
|
|
10497
10497
|
(v) => {
|
|
10498
10498
|
R(v);
|
|
@@ -10504,24 +10504,24 @@ const $e = {
|
|
|
10504
10504
|
version: I
|
|
10505
10505
|
};
|
|
10506
10506
|
});
|
|
10507
|
-
var
|
|
10508
|
-
const
|
|
10509
|
-
function
|
|
10507
|
+
var ze = /* @__PURE__ */ ((g) => (g.generating = "GENERATING", g.completed = "COMPLETED", g.failed = "FAILED", g.canceled = "CANCELLED", g))(ze || {});
|
|
10508
|
+
const Ut = "/assets/formatChartData.worker-ChVu86RF.js", ve = /* @__PURE__ */ new Map();
|
|
10509
|
+
function Ue(g) {
|
|
10510
10510
|
return new Worker(g, { type: "module" });
|
|
10511
10511
|
}
|
|
10512
|
-
async function
|
|
10512
|
+
async function Qt(g) {
|
|
10513
10513
|
if (ve.has(g))
|
|
10514
|
-
return
|
|
10514
|
+
return Ue(ve.get(g));
|
|
10515
10515
|
let I = g;
|
|
10516
10516
|
if (location.hostname !== new URL(import.meta.url).hostname) {
|
|
10517
10517
|
const J = new URL(g.replace(/^\//, ""), import.meta.url).href, R = await fetch(J).then((P) => P.text()), v = new Blob([R], { type: "application/javascript" });
|
|
10518
10518
|
I = URL.createObjectURL(v);
|
|
10519
10519
|
}
|
|
10520
|
-
const b =
|
|
10520
|
+
const b = Ue(I);
|
|
10521
10521
|
return ve.set(g, I), b;
|
|
10522
10522
|
}
|
|
10523
|
-
async function
|
|
10524
|
-
const C = await
|
|
10523
|
+
async function Bt(g, I) {
|
|
10524
|
+
const C = await Qt(g);
|
|
10525
10525
|
return C.postMessage(I), await new Promise((b) => {
|
|
10526
10526
|
C.onmessage = async (J) => {
|
|
10527
10527
|
const R = J.data;
|
|
@@ -10529,7 +10529,7 @@ async function Qt(g, I) {
|
|
|
10529
10529
|
};
|
|
10530
10530
|
});
|
|
10531
10531
|
}
|
|
10532
|
-
const
|
|
10532
|
+
const Gt = "mf-reportwidget-size", Ye = Me(Gt, () => {
|
|
10533
10533
|
const g = B([]);
|
|
10534
10534
|
function I(C, b) {
|
|
10535
10535
|
var J;
|
|
@@ -10549,8 +10549,8 @@ const Bt = "mf-reportwidget-size", ze = Me(Bt, () => {
|
|
|
10549
10549
|
}
|
|
10550
10550
|
return { sizes: g, extractChartSize: I };
|
|
10551
10551
|
});
|
|
10552
|
-
ye.extend(
|
|
10553
|
-
async function
|
|
10552
|
+
ye.extend(ot);
|
|
10553
|
+
async function Vt(g, I) {
|
|
10554
10554
|
for (let C = 0; C < g.length; C++)
|
|
10555
10555
|
try {
|
|
10556
10556
|
return await g[C]();
|
|
@@ -10560,7 +10560,7 @@ async function Gt(g, I) {
|
|
|
10560
10560
|
}
|
|
10561
10561
|
throw new Error("No callback");
|
|
10562
10562
|
}
|
|
10563
|
-
const
|
|
10563
|
+
const sr = async (g, I, C) => {
|
|
10564
10564
|
var ae, _e, ne, ue;
|
|
10565
10565
|
const { businessId: b, country: J } = W(ee()), {
|
|
10566
10566
|
selectedRestaurantIds: R,
|
|
@@ -10573,8 +10573,8 @@ const ar = async (g, I, C) => {
|
|
|
10573
10573
|
} = Ce();
|
|
10574
10574
|
if (P.length === 0)
|
|
10575
10575
|
return null;
|
|
10576
|
-
const oe =
|
|
10577
|
-
fetchType:
|
|
10576
|
+
const oe = xe(g, U, C ?? ""), Z = {
|
|
10577
|
+
fetchType: K.Post,
|
|
10578
10578
|
url: `/${b.value}/postgres-query`,
|
|
10579
10579
|
data: Re.getQueryRequests({
|
|
10580
10580
|
widget: oe,
|
|
@@ -10588,10 +10588,10 @@ const ar = async (g, I, C) => {
|
|
|
10588
10588
|
restaurantIds: R,
|
|
10589
10589
|
warehouseIds: v,
|
|
10590
10590
|
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
10591
|
-
}).map((
|
|
10591
|
+
}).map((j, ce) => {
|
|
10592
10592
|
const te = ce === 0 ? 3e3 : 12e3;
|
|
10593
10593
|
return {
|
|
10594
|
-
...
|
|
10594
|
+
...j,
|
|
10595
10595
|
limit: R.length > 50 ? g.config.limit || te : g.config.limit
|
|
10596
10596
|
};
|
|
10597
10597
|
}),
|
|
@@ -10599,21 +10599,21 @@ const ar = async (g, I, C) => {
|
|
|
10599
10599
|
timeout: 1e3 * 60 * 5,
|
|
10600
10600
|
signal: I
|
|
10601
10601
|
}
|
|
10602
|
-
}, ie = await
|
|
10602
|
+
}, ie = await Vt(
|
|
10603
10603
|
[
|
|
10604
|
-
() =>
|
|
10605
|
-
() =>
|
|
10606
|
-
() => (
|
|
10604
|
+
() => X.fetch(Z),
|
|
10605
|
+
() => X.fetch(Z),
|
|
10606
|
+
() => (Z.url = Z.url.replace("postgres-query", "query"), X.fetch(Z))
|
|
10607
10607
|
],
|
|
10608
10608
|
2e3
|
|
10609
10609
|
);
|
|
10610
|
-
return (await
|
|
10610
|
+
return (await Bt(Ut, {
|
|
10611
10611
|
responses: ie,
|
|
10612
10612
|
widget: JSON.parse(JSON.stringify(g)),
|
|
10613
10613
|
country: J.value
|
|
10614
10614
|
})).data;
|
|
10615
10615
|
};
|
|
10616
|
-
function
|
|
10616
|
+
function je(g) {
|
|
10617
10617
|
const I = g.config;
|
|
10618
10618
|
return {
|
|
10619
10619
|
showTitle: I.showTitle,
|
|
@@ -10644,14 +10644,14 @@ function Ye(g) {
|
|
|
10644
10644
|
legendMaxWidth: I.legendMaxWidth
|
|
10645
10645
|
};
|
|
10646
10646
|
}
|
|
10647
|
-
function
|
|
10647
|
+
function Ke(g) {
|
|
10648
10648
|
const I = g.config;
|
|
10649
10649
|
return {
|
|
10650
10650
|
rowHeight: I.rowHeight,
|
|
10651
10651
|
colWidths: I.colWidths
|
|
10652
10652
|
};
|
|
10653
10653
|
}
|
|
10654
|
-
const
|
|
10654
|
+
const lr = async ({
|
|
10655
10655
|
reportType: g,
|
|
10656
10656
|
index: I,
|
|
10657
10657
|
orientationTypes: C,
|
|
@@ -10659,20 +10659,20 @@ const sr = async ({
|
|
|
10659
10659
|
timeRange: J,
|
|
10660
10660
|
dateRange: R
|
|
10661
10661
|
}) => {
|
|
10662
|
-
const { businessId: v } = W(ee()), { restaurants: P, warehouses: N, globalFilters: Q } = Ce(), { currentReport: k, overviewReport: U } =
|
|
10662
|
+
const { businessId: v } = W(ee()), { restaurants: P, warehouses: N, globalFilters: Q } = Ce(), { currentReport: k, overviewReport: U } = Ve(), { selectedNavigationTab: oe } = We(), { sizes: Z } = Ye();
|
|
10663
10663
|
let ie = k == null ? void 0 : k.id, ae = (k == null ? void 0 : k.tiles) ?? [];
|
|
10664
10664
|
oe === "overview" && U && (ie = U == null ? void 0 : U.id, ae = (U == null ? void 0 : U.tiles) ?? []);
|
|
10665
|
-
const _e = ae.filter((
|
|
10666
|
-
fetchType:
|
|
10667
|
-
url: `/${v.value}/file?lang=${
|
|
10665
|
+
const _e = ae.filter((z, le) => typeof I == "number" ? le === I : !0).map((z) => xe(z.widget, Q, z.id)), ne = {
|
|
10666
|
+
fetchType: K.Post,
|
|
10667
|
+
url: `/${v.value}/file?lang=${Pe()}`,
|
|
10668
10668
|
data: {
|
|
10669
10669
|
configs: [
|
|
10670
|
-
..._e.map((
|
|
10670
|
+
..._e.map((z, le) => {
|
|
10671
10671
|
var de, pe, ge, me;
|
|
10672
|
-
const re =
|
|
10672
|
+
const re = Z[I ?? le];
|
|
10673
10673
|
return {
|
|
10674
10674
|
requests: Re.getQueryRequests({
|
|
10675
|
-
widget:
|
|
10675
|
+
widget: z,
|
|
10676
10676
|
dateRange: [R.startDate, R.endDate],
|
|
10677
10677
|
timeRange: [
|
|
10678
10678
|
ye().set("hour", Number((de = J.start) == null ? void 0 : de.hour)).set("minute", Number((pe = J.start) == null ? void 0 : pe.minute)).toISOString(),
|
|
@@ -10689,10 +10689,10 @@ const sr = async ({
|
|
|
10689
10689
|
}),
|
|
10690
10690
|
index: I || le,
|
|
10691
10691
|
drillDimension: null,
|
|
10692
|
-
chartWidth: (re == null ? void 0 : re.width) ??
|
|
10693
|
-
chartHeight: (re == null ? void 0 : re.height) ??
|
|
10694
|
-
...
|
|
10695
|
-
...
|
|
10692
|
+
chartWidth: (re == null ? void 0 : re.width) ?? z.config.chartWidth,
|
|
10693
|
+
chartHeight: (re == null ? void 0 : re.height) ?? z.config.chartHeight,
|
|
10694
|
+
...je(z),
|
|
10695
|
+
...Ke(z)
|
|
10696
10696
|
};
|
|
10697
10697
|
})
|
|
10698
10698
|
],
|
|
@@ -10704,9 +10704,9 @@ const sr = async ({
|
|
|
10704
10704
|
responseType: "arraybuffer",
|
|
10705
10705
|
timeout: 1e3 * 60 * 60 * 24
|
|
10706
10706
|
}
|
|
10707
|
-
}, { headers: ue, data:
|
|
10707
|
+
}, { headers: ue, data: j } = await Je.rawFetch(ne), ce = ue["content-disposition"].split("filename=")[1].replaceAll('"', ""), te = window.URL.createObjectURL(new Blob([new Uint8Array(j).buffer])), se = document.createElement("a");
|
|
10708
10708
|
se.href = te, se.setAttribute("download", decodeURIComponent(ce)), document.body.appendChild(se), se.click(), se.remove();
|
|
10709
|
-
},
|
|
10709
|
+
}, or = async ({
|
|
10710
10710
|
emails: g,
|
|
10711
10711
|
types: I,
|
|
10712
10712
|
dateRange: C,
|
|
@@ -10714,31 +10714,31 @@ const sr = async ({
|
|
|
10714
10714
|
locationIds: J,
|
|
10715
10715
|
orientationTypes: R
|
|
10716
10716
|
}) => {
|
|
10717
|
-
const { businessId: v } = W(ee()), { currentReport: P, overviewReport: N } =
|
|
10717
|
+
const { businessId: v } = W(ee()), { currentReport: P, overviewReport: N } = Ve(), { selectedNavigationTab: Q } = We(), { restaurants: k, warehouses: U, globalFilters: oe } = Ce(), { sizes: Z } = Ye();
|
|
10718
10718
|
if (g.length === 0) {
|
|
10719
10719
|
console.error("No email addresses provided.");
|
|
10720
10720
|
return;
|
|
10721
10721
|
}
|
|
10722
10722
|
let ie = (P == null ? void 0 : P.id) || "", ae = (P == null ? void 0 : P.name) || "", _e = (P == null ? void 0 : P.tiles) ?? [];
|
|
10723
10723
|
Q === "overview" && N && (ie = N == null ? void 0 : N.id, ae = N.name, _e = (N == null ? void 0 : N.tiles) ?? []);
|
|
10724
|
-
const ne = _e.map((
|
|
10724
|
+
const ne = _e.map((j) => xe(j.widget, oe, j.id)), ue = {
|
|
10725
10725
|
businessId: v.value,
|
|
10726
|
-
status:
|
|
10726
|
+
status: ze.generating,
|
|
10727
10727
|
dateRange: {
|
|
10728
10728
|
start: C.startDate,
|
|
10729
10729
|
end: C.endDate
|
|
10730
10730
|
},
|
|
10731
10731
|
reportName: ae,
|
|
10732
10732
|
emails: g,
|
|
10733
|
-
configs: ne.map((
|
|
10734
|
-
var se,
|
|
10735
|
-
const te =
|
|
10733
|
+
configs: ne.map((j, ce) => {
|
|
10734
|
+
var se, z, le, re;
|
|
10735
|
+
const te = Z[ce];
|
|
10736
10736
|
return {
|
|
10737
10737
|
requests: Re.getQueryRequests({
|
|
10738
|
-
widget:
|
|
10738
|
+
widget: j,
|
|
10739
10739
|
dateRange: [C.startDate, C.endDate],
|
|
10740
10740
|
timeRange: [
|
|
10741
|
-
ye().hour(Number((se = b.start) == null ? void 0 : se.hour)).minute(Number((
|
|
10741
|
+
ye().hour(Number((se = b.start) == null ? void 0 : se.hour)).minute(Number((z = b.start) == null ? void 0 : z.minute)).toISOString(),
|
|
10742
10742
|
ye().hour(Number((le = b.end) == null ? void 0 : le.hour)).minute(Number((re = b.end) == null ? void 0 : re.minute)).toISOString()
|
|
10743
10743
|
],
|
|
10744
10744
|
businessIds: v ? [v.value] : [],
|
|
@@ -10752,45 +10752,45 @@ const sr = async ({
|
|
|
10752
10752
|
}),
|
|
10753
10753
|
index: ce,
|
|
10754
10754
|
drillDimension: null,
|
|
10755
|
-
chartWidth: (te == null ? void 0 : te.width) ??
|
|
10756
|
-
chartHeight: (te == null ? void 0 : te.height) ??
|
|
10757
|
-
...
|
|
10758
|
-
...
|
|
10755
|
+
chartWidth: (te == null ? void 0 : te.width) ?? j.config.chartWidth,
|
|
10756
|
+
chartHeight: (te == null ? void 0 : te.height) ?? j.config.chartHeight,
|
|
10757
|
+
...je(j),
|
|
10758
|
+
...Ke(j)
|
|
10759
10759
|
};
|
|
10760
10760
|
}),
|
|
10761
10761
|
reportId: ie,
|
|
10762
10762
|
type: I,
|
|
10763
10763
|
orientationTypes: R
|
|
10764
10764
|
};
|
|
10765
|
-
await
|
|
10766
|
-
fetchType:
|
|
10767
|
-
url: `/${v.value}/reports/email?lang=${
|
|
10765
|
+
await Je.fetch({
|
|
10766
|
+
fetchType: K.Post,
|
|
10767
|
+
url: `/${v.value}/reports/email?lang=${Pe()}`,
|
|
10768
10768
|
data: ue,
|
|
10769
10769
|
requestConfig: { timeout: 1e3 * 60 * 3 }
|
|
10770
10770
|
});
|
|
10771
|
-
},
|
|
10771
|
+
}, _r = async (g) => {
|
|
10772
10772
|
const { businessId: I } = W(ee());
|
|
10773
|
-
await
|
|
10774
|
-
fetchType:
|
|
10775
|
-
url: `/${I.value}/reports/resend-email?lang=${
|
|
10773
|
+
await Je.fetch({
|
|
10774
|
+
fetchType: K.Post,
|
|
10775
|
+
url: `/${I.value}/reports/resend-email?lang=${Pe()}`,
|
|
10776
10776
|
data: { jobId: g },
|
|
10777
10777
|
requestConfig: { timeout: 1e3 * 60 * 3 }
|
|
10778
10778
|
});
|
|
10779
|
-
},
|
|
10779
|
+
}, ur = async () => {
|
|
10780
10780
|
const { businessId: g } = W(ee());
|
|
10781
|
-
return await
|
|
10782
|
-
fetchType:
|
|
10781
|
+
return await X.fetch({
|
|
10782
|
+
fetchType: K.Get,
|
|
10783
10783
|
url: `/${g.value}/reports/email-recipients`
|
|
10784
10784
|
});
|
|
10785
|
-
},
|
|
10785
|
+
}, dr = async (g) => {
|
|
10786
10786
|
const { businessId: I } = W(ee());
|
|
10787
|
-
await
|
|
10788
|
-
fetchType:
|
|
10787
|
+
await X.fetch({
|
|
10788
|
+
fetchType: K.Post,
|
|
10789
10789
|
url: `/${I.value}/reports/email-recipient/delete`,
|
|
10790
10790
|
data: { email: g }
|
|
10791
10791
|
});
|
|
10792
10792
|
};
|
|
10793
|
-
function
|
|
10793
|
+
function Qe(g = [], I = []) {
|
|
10794
10794
|
const C = (R) => `${R.schemaName}:${R.name}:${R.operator}`, b = /* @__PURE__ */ new Map(), J = [];
|
|
10795
10795
|
for (const R of g) {
|
|
10796
10796
|
if (!R || !Array.isArray(R.values) || R.values.length === 0) continue;
|
|
@@ -10818,7 +10818,7 @@ function Ue(g = [], I = []) {
|
|
|
10818
10818
|
}
|
|
10819
10819
|
return [...Array.from(b.values()), ...J];
|
|
10820
10820
|
}
|
|
10821
|
-
function
|
|
10821
|
+
function Wt(g, I, C) {
|
|
10822
10822
|
const b = [], J = /* @__PURE__ */ new Map();
|
|
10823
10823
|
return g.forEach((R) => {
|
|
10824
10824
|
R && (I.includes(R.schemaName) && b.push(R), C.forEach((v, P) => {
|
|
@@ -10827,12 +10827,12 @@ function Vt(g, I, C) {
|
|
|
10827
10827
|
}));
|
|
10828
10828
|
}), { mainFilters: b, joinFilters: J };
|
|
10829
10829
|
}
|
|
10830
|
-
function
|
|
10830
|
+
function xe(g, I, C) {
|
|
10831
10831
|
var N, Q;
|
|
10832
10832
|
const b = JSON.parse(JSON.stringify(g)), J = I.filter((k) => {
|
|
10833
10833
|
var U;
|
|
10834
10834
|
return (U = k.tileIds) == null ? void 0 : U.some((oe) => oe === C);
|
|
10835
|
-
}), R = ((N = b.config.joinDatasources) == null ? void 0 : N.map((k) => k.schemaNames ?? [])) ?? [], { mainFilters: v, joinFilters: P } =
|
|
10835
|
+
}), R = ((N = b.config.joinDatasources) == null ? void 0 : N.map((k) => k.schemaNames ?? [])) ?? [], { mainFilters: v, joinFilters: P } = Wt(
|
|
10836
10836
|
J,
|
|
10837
10837
|
b.config.schemaNames,
|
|
10838
10838
|
R
|
|
@@ -10841,46 +10841,46 @@ function Pe(g, I, C) {
|
|
|
10841
10841
|
...b,
|
|
10842
10842
|
config: {
|
|
10843
10843
|
...b.config,
|
|
10844
|
-
filters:
|
|
10844
|
+
filters: Qe(b.config.filters ?? [], v),
|
|
10845
10845
|
joinDatasources: ((Q = b.config.joinDatasources) == null ? void 0 : Q.map((k, U) => ({
|
|
10846
10846
|
...k,
|
|
10847
|
-
filters:
|
|
10847
|
+
filters: Qe(k.filters ?? [], P.get(U) ?? [])
|
|
10848
10848
|
}))) ?? []
|
|
10849
10849
|
}
|
|
10850
10850
|
};
|
|
10851
10851
|
}
|
|
10852
10852
|
let Fe;
|
|
10853
|
-
const
|
|
10854
|
-
function
|
|
10853
|
+
const zt = new Uint8Array(16);
|
|
10854
|
+
function Yt() {
|
|
10855
10855
|
if (!Fe && (Fe = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !Fe))
|
|
10856
10856
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
10857
|
-
return Fe(
|
|
10857
|
+
return Fe(zt);
|
|
10858
10858
|
}
|
|
10859
|
-
const
|
|
10859
|
+
const Y = [];
|
|
10860
10860
|
for (let g = 0; g < 256; ++g)
|
|
10861
|
-
|
|
10862
|
-
function
|
|
10863
|
-
return
|
|
10861
|
+
Y.push((g + 256).toString(16).slice(1));
|
|
10862
|
+
function jt(g, I = 0) {
|
|
10863
|
+
return Y[g[I + 0]] + Y[g[I + 1]] + Y[g[I + 2]] + Y[g[I + 3]] + "-" + Y[g[I + 4]] + Y[g[I + 5]] + "-" + Y[g[I + 6]] + Y[g[I + 7]] + "-" + Y[g[I + 8]] + Y[g[I + 9]] + "-" + Y[g[I + 10]] + Y[g[I + 11]] + Y[g[I + 12]] + Y[g[I + 13]] + Y[g[I + 14]] + Y[g[I + 15]];
|
|
10864
10864
|
}
|
|
10865
|
-
const
|
|
10866
|
-
randomUUID:
|
|
10865
|
+
const Kt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Be = {
|
|
10866
|
+
randomUUID: Kt
|
|
10867
10867
|
};
|
|
10868
|
-
function
|
|
10869
|
-
if (
|
|
10870
|
-
return
|
|
10868
|
+
function cr(g, I, C) {
|
|
10869
|
+
if (Be.randomUUID && !I && !g)
|
|
10870
|
+
return Be.randomUUID();
|
|
10871
10871
|
g = g || {};
|
|
10872
|
-
const b = g.random || (g.rng ||
|
|
10872
|
+
const b = g.random || (g.rng || Yt)();
|
|
10873
10873
|
if (b[6] = b[6] & 15 | 64, b[8] = b[8] & 63 | 128, I) {
|
|
10874
10874
|
C = C || 0;
|
|
10875
10875
|
for (let J = 0; J < 16; ++J)
|
|
10876
10876
|
I[C + J] = b[J];
|
|
10877
10877
|
return I;
|
|
10878
10878
|
}
|
|
10879
|
-
return
|
|
10879
|
+
return jt(b);
|
|
10880
10880
|
}
|
|
10881
|
-
const
|
|
10881
|
+
const pr = /* @__PURE__ */ ut({
|
|
10882
10882
|
__name: "BaseDialog",
|
|
10883
|
-
props: /* @__PURE__ */
|
|
10883
|
+
props: /* @__PURE__ */ qe({
|
|
10884
10884
|
title: {
|
|
10885
10885
|
type: String,
|
|
10886
10886
|
default: "Title"
|
|
@@ -10897,32 +10897,32 @@ const cr = /* @__PURE__ */ _t({
|
|
|
10897
10897
|
modelValue: { type: Boolean, required: !0 },
|
|
10898
10898
|
modelModifiers: {}
|
|
10899
10899
|
}),
|
|
10900
|
-
emits: /* @__PURE__ */
|
|
10900
|
+
emits: /* @__PURE__ */ qe(["confirm"], ["update:modelValue"]),
|
|
10901
10901
|
setup(g, { emit: I }) {
|
|
10902
|
-
const C =
|
|
10903
|
-
return
|
|
10902
|
+
const C = dt(g, "modelValue"), b = g, J = I;
|
|
10903
|
+
return De(C, () => {
|
|
10904
10904
|
C.value ? document.body.style.overflow = "hidden" : document.body.style.overflow = "scroll";
|
|
10905
10905
|
}), (R, v) => {
|
|
10906
|
-
const P =
|
|
10907
|
-
return
|
|
10906
|
+
const P = ke("FmButton"), N = ke("FmDialog");
|
|
10907
|
+
return pt(), ct(N, {
|
|
10908
10908
|
modelValue: C.value,
|
|
10909
10909
|
"onUpdate:modelValue": v[2] || (v[2] = (Q) => C.value = Q),
|
|
10910
10910
|
overlay: ""
|
|
10911
10911
|
}, {
|
|
10912
10912
|
"dialog-header": be(() => [
|
|
10913
|
-
|
|
10913
|
+
$t(St(b.title), 1)
|
|
10914
10914
|
]),
|
|
10915
10915
|
default: be(() => [
|
|
10916
|
-
|
|
10916
|
+
ft(R.$slots, "content")
|
|
10917
10917
|
]),
|
|
10918
10918
|
"dialog-footer": be(() => [
|
|
10919
|
-
v[3] || (v[3] =
|
|
10920
|
-
|
|
10919
|
+
v[3] || (v[3] = yt("div", { class: "grow" }, null, -1)),
|
|
10920
|
+
He(P, {
|
|
10921
10921
|
label: b.secondaryButtonLabel,
|
|
10922
10922
|
variant: "tertiary",
|
|
10923
10923
|
onClick: v[0] || (v[0] = (Q) => C.value = !1)
|
|
10924
10924
|
}, null, 8, ["label"]),
|
|
10925
|
-
|
|
10925
|
+
He(P, {
|
|
10926
10926
|
label: b.primaryButtonLabel,
|
|
10927
10927
|
variant: "primary",
|
|
10928
10928
|
onClick: v[1] || (v[1] = (Q) => J("confirm"))
|
|
@@ -10935,26 +10935,26 @@ const cr = /* @__PURE__ */ _t({
|
|
|
10935
10935
|
});
|
|
10936
10936
|
export {
|
|
10937
10937
|
Le as C,
|
|
10938
|
-
|
|
10939
|
-
|
|
10940
|
-
|
|
10941
|
-
|
|
10942
|
-
|
|
10943
|
-
|
|
10944
|
-
|
|
10945
|
-
|
|
10938
|
+
Tt as D,
|
|
10939
|
+
It as P,
|
|
10940
|
+
Ft as R,
|
|
10941
|
+
ht as S,
|
|
10942
|
+
Et as W,
|
|
10943
|
+
pr as _,
|
|
10944
|
+
Ve as a,
|
|
10945
|
+
qt as b,
|
|
10946
10946
|
we as c,
|
|
10947
|
-
|
|
10948
|
-
|
|
10949
|
-
|
|
10950
|
-
|
|
10951
|
-
|
|
10952
|
-
|
|
10953
|
-
|
|
10954
|
-
|
|
10955
|
-
|
|
10956
|
-
|
|
10957
|
-
|
|
10958
|
-
|
|
10959
|
-
|
|
10947
|
+
Ye as d,
|
|
10948
|
+
Ct as e,
|
|
10949
|
+
lr as f,
|
|
10950
|
+
nr as g,
|
|
10951
|
+
ze as h,
|
|
10952
|
+
ur as i,
|
|
10953
|
+
ar as j,
|
|
10954
|
+
dr as k,
|
|
10955
|
+
sr as q,
|
|
10956
|
+
_r as r,
|
|
10957
|
+
or as s,
|
|
10958
|
+
We as u,
|
|
10959
|
+
cr as v
|
|
10960
10960
|
};
|