@feedmepos/mf-report 5.20.0 → 5.21.0-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-CsaGDMec.js → App-H4qTrOhm.js} +31 -31
- package/dist/{BaseDialog.vue_vue_type_script_setup_true_lang-Bjybaft4.js → BaseDialog.vue_vue_type_script_setup_true_lang-PrNxsye6.js} +7 -8
- package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-cfshXMB2.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-BeBr4VIF.js} +1 -1
- package/dist/{Default.vue_vue_type_script_setup_true_lang-DfNwCPM2.js → Default.vue_vue_type_script_setup_true_lang-DPYuS630.js} +2 -2
- package/dist/{FilterSelector.vue_vue_type_script_setup_true_lang-D2sJ7wd-.js → FilterSelector.vue_vue_type_script_setup_true_lang-lhcRFv_m.js} +91 -91
- package/dist/{InsightView-BulSbsiF.js → InsightView-A2RMHh9M.js} +5 -5
- package/dist/{Integration-D93eQCHy.js → Integration-Czc6q14E.js} +2 -2
- package/dist/{Integrations-jn20KmcD.js → Integrations-DIXSWGS_.js} +3 -3
- package/dist/{Layout-ClXNPXk7.js → Layout-DypUMIa7.js} +1 -1
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-DcTTUqUk.js → MenuTab.vue_vue_type_script_setup_true_lang-DDk9OhF-.js} +5 -5
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-CmVGQAeI.js → NavigationTab.vue_vue_type_script_setup_true_lang-C4NFUekp.js} +4 -4
- package/dist/{NoData.vue_vue_type_script_setup_true_lang-BUoYdn5S.js → NoData.vue_vue_type_script_setup_true_lang-CtN7oqXx.js} +1 -1
- package/dist/{OverviewView-DjqXHmvv.js → OverviewView-DBWJ04u3.js} +5 -5
- package/dist/{Report-D0sujnam.js → Report-CzdpyMiY.js} +102 -94
- package/dist/{ReportEditor-DSpGmZTl.js → ReportEditor-DozloMSJ.js} +207 -201
- package/dist/{ReportView-DGIeZUWs.js → ReportView-C9-upOW0.js} +7 -7
- package/dist/{SelectComponent.vue_vue_type_script_setup_true_lang-B2oCOTUH.js → SelectComponent.vue_vue_type_script_setup_true_lang-BcQEW5MO.js} +1 -1
- package/dist/{Setting-CqZ-HJH1.js → Setting-DJRh5073.js} +4 -4
- package/dist/{TileEditor-CCv4bJbJ.js → TileEditor-BRVBRjwj.js} +7 -7
- package/dist/{TransitionFade-BhI9kEGy.js → TransitionFade-CbhV6xur.js} +5 -5
- package/dist/app.js +19 -19
- package/dist/assets/{formatChartData.worker-BQkqrr7j.js → formatChartData.worker-CJVlLdXW.js} +2 -2
- package/dist/assets/{processTableData.worker-DFxLNXJc.js → processTableData.worker-DRkxI8qA.js} +2 -2
- package/dist/{vue-i18n-BQN8HgvD.js → vue-i18n-BJW_sJot.js} +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
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
|
|
2
|
-
import { detectLocale as
|
|
3
|
-
import { u as Le, d as i, a as _e, b as X, c as
|
|
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 K, createVNode as z, toDisplayString as P, createTextVNode as he, onMounted as ae, watch as R, ref as E, computed as H, onBeforeMount as Re, onBeforeUnmount as qe, createElementBlock as A, Fragment as Oe } from "vue";
|
|
2
|
+
import { detectLocale as k, useCoreStore as T } from "@feedmepos/mf-common";
|
|
3
|
+
import { u as Le, d as i, a as _e, b as X, c as be, e as we, f as Ce, s as Ee, g as ke } from "./vue-i18n-BJW_sJot.js";
|
|
4
4
|
import { storeToRefs as q } from "pinia";
|
|
5
|
-
import { u as Y, a as Ne, b as Be } from "./BaseDialog.vue_vue_type_script_setup_true_lang-
|
|
6
|
-
import { _ as Fe, u as $e } from "./NavigationTab.vue_vue_type_script_setup_true_lang-
|
|
5
|
+
import { u as Y, a as Ne, b as Be } from "./BaseDialog.vue_vue_type_script_setup_true_lang-PrNxsye6.js";
|
|
6
|
+
import { _ as Fe, u as $e } from "./NavigationTab.vue_vue_type_script_setup_true_lang-C4NFUekp.js";
|
|
7
7
|
import { u as Z } from "./message-dialog-UoMWOnil.js";
|
|
8
8
|
import { useRoute as xe, useRouter as Je } from "vue-router";
|
|
9
9
|
const Ae = { class: "fm-typo-en-body-md-400 text-ellipsis overflow-hidden" }, Te = /* @__PURE__ */ ee({
|
|
@@ -19,13 +19,13 @@ const Ae = { class: "fm-typo-en-body-md-400 text-ellipsis overflow-hidden" }, Te
|
|
|
19
19
|
"close-button": !1
|
|
20
20
|
}, {
|
|
21
21
|
"dialog-header": J(() => [
|
|
22
|
-
he(
|
|
22
|
+
he(P(u(D)), 1)
|
|
23
23
|
]),
|
|
24
24
|
default: J(() => [
|
|
25
|
-
|
|
25
|
+
K("p", Ae, P(u(S)), 1)
|
|
26
26
|
]),
|
|
27
27
|
"dialog-footer": J(() => [
|
|
28
|
-
g[1] || (g[1] =
|
|
28
|
+
g[1] || (g[1] = K("div", { class: "grow" }, null, -1)),
|
|
29
29
|
z(_, {
|
|
30
30
|
label: u(r)("report.common.cancel"),
|
|
31
31
|
variant: "tertiary",
|
|
@@ -40,7 +40,7 @@ const Ae = { class: "fm-typo-en-body-md-400 text-ellipsis overflow-hidden" }, Te
|
|
|
40
40
|
}, 8, ["modelValue"]);
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
|
-
}), M = k(
|
|
43
|
+
}), M = E(k());
|
|
44
44
|
function Ue() {
|
|
45
45
|
const O = (r) => {
|
|
46
46
|
switch (M.value = r, r) {
|
|
@@ -53,22 +53,22 @@ function Ue() {
|
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
55
|
return ae(() => {
|
|
56
|
-
O(
|
|
57
|
-
}), R(() =>
|
|
56
|
+
O(k());
|
|
57
|
+
}), R(() => k(), O, { deep: !0, immediate: !0 }), {
|
|
58
58
|
currentLocale: M
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
i.locale(
|
|
61
|
+
i.locale(k() === "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 } = be(), { version: p } = q(Y()), { getSettings: oe } = we(), { promptLoader: se } = Ce(), e = xe(), F = Je(), ie = Y(), { suppressReportRouteSync: b } = q(ie), ue = H(() => `https://portal-v1.feedmedev.cc/b/${r.value}/report/CLOSE_UP?showHeader=false&country=${l.value.toUpperCase()}&menuOption=business-report&token=${f.value}&v2=true&reportV5Button=true`), le = H(() => `https://report-v4.feedmedev.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
|
() => {
|
|
69
69
|
var t, o;
|
|
70
70
|
const a = ((t = D.value) == null ? void 0 : t.id) ?? "";
|
|
71
|
-
D.value && S.value && L.value && (
|
|
71
|
+
D.value && S.value && L.value && (Ee(l.value), r.value !== a && (r.value = a), f.value = ((o = S.value) == null ? void 0 : o.token) ?? "", l.value = L.value ?? "", e.query.businessId !== r.value && F.replace({
|
|
72
72
|
name: e.name,
|
|
73
73
|
params: e.params,
|
|
74
74
|
query: { ...e.query, businessId: r.value }
|
|
@@ -85,7 +85,7 @@ const ze = ["src"], Qe = ["src"], et = /* @__PURE__ */ ee({
|
|
|
85
85
|
console.error(t);
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function V(a) {
|
|
89
89
|
if (typeof a.data == "string")
|
|
90
90
|
try {
|
|
91
91
|
const t = JSON.parse(a.data);
|
|
@@ -99,19 +99,19 @@ const ze = ["src"], Qe = ["src"], et = /* @__PURE__ */ ee({
|
|
|
99
99
|
}), Re(() => {
|
|
100
100
|
g(Fe);
|
|
101
101
|
}), ae(() => {
|
|
102
|
-
console.log("5.
|
|
102
|
+
console.log("5.21.0-beta.0", !0), window.addEventListener("message", Q), window.addEventListener("message", V);
|
|
103
103
|
});
|
|
104
|
-
const I = Ne(),
|
|
104
|
+
const I = Ne(), W = $e(), n = X();
|
|
105
105
|
qe(() => {
|
|
106
|
-
window.removeEventListener("message", Q), window.removeEventListener("message",
|
|
106
|
+
window.removeEventListener("message", Q), window.removeEventListener("message", V), I.$dispose(), W.$dispose();
|
|
107
107
|
});
|
|
108
|
-
const { getReports: ce, getOverviewReport: de, getReportConfig:
|
|
108
|
+
const { getReports: ce, getOverviewReport: de, getReportConfig: j, currentReportId: G } = I, { currentReportId: me, reports: fe } = q(I), { getSchema: pe } = Be(), { fetchSchedules: ge } = W, { init: ve } = ke(), $ = E("v5"), w = E(!1), x = E(!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 = [];
|
|
112
112
|
C ? m = n.selectedLocationIds : m = e.query.locationIds ? JSON.parse(e.query.locationIds) : void 0;
|
|
113
|
-
let y = e.query.reportId ||
|
|
114
|
-
if (fe.value.find((s) => s.id === y) || (y =
|
|
113
|
+
let y = e.query.reportId || G;
|
|
114
|
+
if (fe.value.find((s) => s.id === y) || (y = G), y && y !== I.currentReportId && I.updateCurrentReportId(y), a || t) {
|
|
115
115
|
const s = n.dateRange;
|
|
116
116
|
(s.startDate !== a || s.endDate !== t) && n.setDateRange({ startDate: a, endDate: t });
|
|
117
117
|
}
|
|
@@ -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 !== "" && (w.value = !1, B(a), x.value || (n.setSelectedLocationIds([]), F.replace({
|
|
150
150
|
name: e.name,
|
|
151
151
|
params: e.params,
|
|
152
152
|
query: {
|
|
@@ -154,17 +154,17 @@ const ze = ["src"], Qe = ["src"], et = /* @__PURE__ */ ee({
|
|
|
154
154
|
locationIds: void 0,
|
|
155
155
|
isAllLocation: "true"
|
|
156
156
|
}
|
|
157
|
-
})),
|
|
157
|
+
})), b.value !== void 0 && (b.value = !0), await se(async () => {
|
|
158
158
|
await ve({
|
|
159
|
-
apiKey: "
|
|
159
|
+
apiKey: "MaGoXrEWuEJNpWgKTqseee",
|
|
160
160
|
url: "https://flag.feedme.farm/api/v1/",
|
|
161
161
|
enableAnalytics: !1,
|
|
162
162
|
cacheFlags: !1
|
|
163
163
|
});
|
|
164
|
-
const t = await
|
|
164
|
+
const t = await j();
|
|
165
165
|
$.value = t.version, p.value = $.value, await Promise.all([
|
|
166
166
|
re(),
|
|
167
|
-
|
|
167
|
+
j(),
|
|
168
168
|
de(),
|
|
169
169
|
ce(),
|
|
170
170
|
pe(),
|
|
@@ -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
|
+
}), w.value = !0, x.value && (x.value = !1));
|
|
178
178
|
},
|
|
179
179
|
{
|
|
180
180
|
immediate: !0
|
|
181
181
|
}
|
|
182
182
|
), R(
|
|
183
|
-
() => (
|
|
183
|
+
() => (w.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 (!w.value || !a.reportId) return;
|
|
192
|
+
if (b.value) {
|
|
193
|
+
b.value = !1;
|
|
194
194
|
return;
|
|
195
195
|
}
|
|
196
196
|
const t = a.selectedLocationIds, o = a.dateRange, c = a.timeRange, d = a.compareDateRange, v = {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { a as m0, F as y0, w as g0, b as k0, c as Ae, v as Te, e as Ce, d as h0, r as K0, m as be, u as Fe } from "./vue-i18n-
|
|
1
|
+
import { a as m0, F as y0, w as g0, b as k0, c as Ae, v as Te, e as Ce, d as h0, r as K0, m as be, u as Fe } from "./vue-i18n-BJW_sJot.js";
|
|
2
2
|
import { storeToRefs as p0, defineStore as B0 } from "pinia";
|
|
3
3
|
import { ref as o0, computed as C0, watch as U0, h as Ie, defineComponent as se, mergeModels as N0, useModel as z0, resolveComponent as A0, createElementBlock as V0, openBlock as P0, createVNode as S0, withCtx as b0, createElementVNode as E0, createCommentVNode as Me, Fragment as re, renderList as Re, createBlock as le, createTextVNode as _e, withDirectives as xe, toDisplayString as T0, unref as $0, vShow as Le, renderSlot as Oe } from "vue";
|
|
4
4
|
import { useSnackbar as De, components as we } from "@feedmepos/ui-library";
|
|
5
5
|
import { useRouter as ve } from "vue-router";
|
|
6
6
|
import { detectLocale as F0 } from "@feedmepos/mf-common";
|
|
7
|
-
import { c as Pe, a as Be } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-
|
|
7
|
+
import { c as Pe, a as Be } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-BeBr4VIF.js";
|
|
8
8
|
function de(T) {
|
|
9
9
|
throw new Error('Could not dynamically require "' + T + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
10
10
|
}
|
|
@@ -8393,7 +8393,7 @@ Arguments: [` + D + "]";
|
|
|
8393
8393
|
}, t.billSchema_closure.prototype = {
|
|
8394
8394
|
call$1(n) {
|
|
8395
8395
|
var e = null, r = "seqNumber", i = "deliveryName", u = "isRefund", o = "isPickup", s = "isInHouseDelivery", l = "isDelivery", D = "completedAt", d = "integratedOrderId", c = "itemCount", p = "taxTotal", y = "discountTotal", g = "grossTotal", m = "rounding", h = "takeawayPrice", A = "thirdPartyExtraCharge", b = "deliveryFee", M = "nettTotal", F = "deliveryFeeWithTax", I = "deliveryFeeWithoutTax", R = "otherChargeWithTax", w = "otherChargeWithoutTax", L = "discountInclusiveTaxTotal";
|
|
8396
|
-
return t._setArrayType([t.Field_Field$string(e, !1, "ID", "id", "_id", e, n), t.Field_Field$string(e, !0, e, "docId", "_docId", e, n), t.Field_Field$timestamp(e, !0, e, "publishedAt", "_publishedAt", e, n), t.Field_Field$timestamp(e, !1, "Time", "createdAt", "_createdAt", e, n), t.Field_Field$string(e, !1, "Restaurant ID", "restaurantId", "_restaurantId", e, n), t.Field_Field$string(e, !1, "Status", "status", "status", e, n), t.Field_Field$string(e, !1, "No.", r, r, e, n), t.Field_Field$string(e, !1, "Table", "slot", "slot", e, n), t.Field_Field$string(e, !1, "Delivery", i, i, e, n), t.Field_Field$string(e, !1, "Refund ID", "refundFrom", "refundedFrom", e, n), t.Field_Field$bool(e, !1, "Refund", u, u, e, n), t.Field_Field$string(e, !0, e, "refundApprovedById", "refund.approvedBy.id", e, n), t.Field_Field$string(e, !1, "Refund approver", "refundApprovedByName", "refund.approvedBy.name", e, n), t.Field_Field$string(e, !0, e, "refundedById", "refund.by.id", e, n), t.Field_Field$string(e, !1, "Refund user", "refundedByName", "refund.by.name", e, n), t.Field_Field$string(e, !1, "Refund reason", "refundReason", "refund.reason", e, n), t.Field_Field$string(e, !1, "Member ID", "memberId", "membership.id", e, n), t.Field_Field$string(e, !1, "Member user ID", "memberUserId", "membership.userId", e, n), t.Field_Field$string(e, !1, "Member name", "memberUserName", "membership.name", e, n), t.Field_Field$string(e, !0, "Member phone", "memberPhoneNumber", "membership.phoneNumber", e, n), t.Field_Field$timestamp(e, !1, "Member birthday", "memberBirthday", "membership.birthday", e, n), t.Field_Field$string(e, !1, "Remark", "remark", "remark", e, n), t.Field_Field$string(e, !1, "Source", "source", "source", E.
|
|
8396
|
+
return t._setArrayType([t.Field_Field$string(e, !1, "ID", "id", "_id", e, n), t.Field_Field$string(e, !0, e, "docId", "_docId", e, n), t.Field_Field$timestamp(e, !0, e, "publishedAt", "_publishedAt", e, n), t.Field_Field$timestamp(e, !1, "Time", "createdAt", "_createdAt", e, n), t.Field_Field$string(e, !1, "Restaurant ID", "restaurantId", "_restaurantId", e, n), t.Field_Field$string(e, !1, "Status", "status", "status", e, n), t.Field_Field$string(e, !1, "No.", r, r, e, n), t.Field_Field$string(e, !1, "Table", "slot", "slot", e, n), t.Field_Field$string(e, !1, "Delivery", i, i, e, n), t.Field_Field$string(e, !1, "Refund ID", "refundFrom", "refundedFrom", e, n), t.Field_Field$bool(e, !1, "Refund", u, u, e, n), t.Field_Field$string(e, !0, e, "refundApprovedById", "refund.approvedBy.id", e, n), t.Field_Field$string(e, !1, "Refund approver", "refundApprovedByName", "refund.approvedBy.name", e, n), t.Field_Field$string(e, !0, e, "refundedById", "refund.by.id", e, n), t.Field_Field$string(e, !1, "Refund user", "refundedByName", "refund.by.name", e, n), t.Field_Field$string(e, !1, "Refund reason", "refundReason", "refund.reason", e, n), t.Field_Field$string(e, !1, "Member ID", "memberId", "membership.id", e, n), t.Field_Field$string(e, !1, "Member user ID", "memberUserId", "membership.userId", e, n), t.Field_Field$string(e, !1, "Member name", "memberUserName", "membership.name", e, n), t.Field_Field$string(e, !0, "Member phone", "memberPhoneNumber", "membership.phoneNumber", e, n), t.Field_Field$timestamp(e, !1, "Member birthday", "memberBirthday", "membership.birthday", e, n), t.Field_Field$string(e, !1, "Remark", "remark", "remark", e, n), t.Field_Field$string(e, !1, "Source", "source", "source", E.x28case_, n), t.Field_Field$string(e, !1, "Type", "type", "type", "(case when upper(@type)='PICKUP' then upper(@type) when upper(@type)='DELIVERY' then upper(@type) when upper(@type)='DRIVE THRU' then upper(@type) when @is_takeaway is true then 'TAKEAWAY' else upper(@type) end)", n), t.Field_Field$bool(e, !0, "Pickup", o, o, e, n), t.Field_Field$bool(e, !0, "Is in house delivery", s, s, e, n), t.Field_Field$bool(e, !0, "Is other delivery", l, l, e, n), t.Field_Field$bool(e, !0, "Is takeaway", "isTakeaway", "is.takeaway", e, n), t.Field_Field$timestamp(e, !1, "Closed at", D, D, e, n), t.Field_Field$string(e, !0, "Inclusive SST", "sstInclusive", "nettTaxes.SST.inclusive", e, n), t.Field_Field$string(e, !0, "SST before discount", "sstBeforeDiscount", "nettTaxes.SST.beforeDiscount", e, n), t.Field_Field$string(e, !0, "Inclusive SC", "serviceChargeInclusive", "nettTaxes.SERVICE_CHARGE.inclusive", e, n), t.Field_Field$string(e, !0, "SC before discount", "serviceChargeBeforeDiscount", "nettTaxes.SERVICE_CHARGE.beforeDiscount", e, n), t.Field_Field$numeric("IF(@status = 'VOIDED', 0, IFNULL(@pax,0)*IF(@isRefund, -1, 1))", !1, "Pax", "pax", "person", "(CASE WHEN @status = 'VOIDED' THEN 0 ELSE (COALESCE(@pax,0)*CASE WHEN @is_refund THEN -1 ELSE 1 END) END)", n), t.Field_Field$string(e, !1, "Integrated order ID", d, d, e, n), t.Field_Field$numeric(E.IFNULLi, !0, "Item count", c, c, E.COALESi, n), t.Field_Field$numeric("IFNULL(@taxTotal,0)*IF(@isRefund, -1, 1)", !1, "Tax", p, p, E.COALEStax, n), t.Field_Field$numeric(E.IFNULLdiT, !1, "Discount", y, y, E.COALESdit, n), t.Field_Field$numeric(E.IFNULLg, !1, "Item gross", g, g, E.COALESg, n), t.Field_Field$numeric(E.x28IFNULnI, !1, "Bill gross", "billGrossTotal", e, E.x28COALEnC, n), t.Field_Field$numeric("IFNULL(@rounding,0)*IF(@isRefund, -1, 1)", !1, "Rounding", m, m, E.COALESr, n), t.Field_Field$numeric("IFNULL(@sstTotal,0)*IF(@isRefund, -1, 1)", !0, "SST", "sstTotal", "nettTaxes.SST.total", E.COALESss, n), t.Field_Field$string(e, !0, "SST %", "sstPercentage", "nettTaxes.SST.percentage", e, n), t.Field_Field$numeric(E.IFNULLs, !1, "SC", "serviceChargeTotal", "nettTaxes.SERVICE_CHARGE.total", E.COALESse, n), t.Field_Field$string(e, !0, "SC %", "serviceChargePercentage", "nettTaxes.SERVICE_CHARGE.percentage", e, n), t.Field_Field$numeric(E.x28IFNULo, !1, "Other charge", "otherChargeTotal", "nettTaxes.OTHER_CHARGE.total", E.x28COALEo, n), t.Field_Field$numeric(E.x28IFNULgx2d, !1, "Gross w/ takeaway", "subTotalWithoutTakeaway", e, E.x28COALEgx2d, n), t.Field_Field$numeric(E.IFNULLta, !1, "Takeaway", h, h, E.COALEStak, n), t.Field_Field$numeric(E.IFNULLth, !1, "Extra charge", A, A, E.COALESth, n), t.Field_Field$numeric(E.IFNULLde_, !1, "Delivery fee", b, b, E.COALESdex2c, n), t.Field_Field$numeric(E.IFNULLn, !1, "Nett", M, M, E.COALESn, n), t.Field_Field$numeric(E.x28IFNULgx2bd, !1, "Item gross before charges", "grossBeforeCharges", e, E.x28COALEgx2bd, n), t.Field_Field$numeric(E.x28IFNULn_, !1, "Bill gross before charges", "billGrossBeforeCharges", e, E.x28COALEn_, n), t.Field_Field$numeric(e, !1, "Member Recency", "recency", e, E.MIN_EX, n), t.Field_Field$numeric(e, !1, "Member frequency", "frequency", e, E.COUNT_, n), t.Field_Field$numeric(e, !1, "Member monetary", "monetary", e, E.SUM__n, n), t.Field_Field$numeric(E.IFNULLdeWT, !1, "Delivery fee with tax", F, F, E.COALESdex5f_, n), t.Field_Field$numeric(E.IFNULLdeWo, !1, "Delivery fee without tax", I, I, E.COALESdex5fo, n), t.Field_Field$numeric(E.IFNULLoT, !1, "Other charge with tax", R, R, E.COALESo_, n), t.Field_Field$numeric(E.IFNULLoo, !1, "Other charge without tax", w, w, E.COALESoo, n), t.Field_Field$numeric(e, !1, "Duration", "duration", e, E.EXTRAC, n), t.Field_Field$string(e, !1, "Restaurant", "restaurantName", e, E.x28selecn, n), t.Field_Field$numeric(e, !1, "Labour hour", "labourHour", e, E.x28selecS, n), t.Field_Field$string(e, !1, "Payments", "payments", e, E.x28selecstdn, n), t.Field_Field$string(e, !1, "Items", "items", e, E.x28selecstC, n), t.Field_Field$string(e, !1, "Discount reasons", "discountReasons", e, E.x28selecstda, n), t.Field_Field$numeric(E.IFNULLdiI, !1, "Discount inc tax", L, L, E.COALESdii, n), t.Field_Field$string(e, !1, "Payment Summaries", "paymentSummaries", e, E.x28selecstdC, n)], $.JSArray_Field);
|
|
8397
8397
|
},
|
|
8398
8398
|
$signature: 0
|
|
8399
8399
|
}, t.billSchema_closure0.prototype = {
|
|
@@ -8521,7 +8521,7 @@ Arguments: [` + D + "]";
|
|
|
8521
8521
|
}, t.completeTimeBillSchema_closure.prototype = {
|
|
8522
8522
|
call$1(n) {
|
|
8523
8523
|
var e = null, r = "seqNumber", i = "deliveryName", u = "isRefund", o = "isPickup", s = "isInHouseDelivery", l = "isDelivery", D = "completedAt", d = "integratedOrderId", c = "itemCount", p = "taxTotal", y = "discountTotal", g = "grossTotal", m = "rounding", h = "takeawayPrice", A = "thirdPartyExtraCharge", b = "deliveryFee", M = "nettTotal", F = "deliveryFeeWithTax", I = "deliveryFeeWithoutTax", R = "otherChargeWithTax", w = "otherChargeWithoutTax", L = "discountInclusiveTaxTotal";
|
|
8524
|
-
return t._setArrayType([t.Field_Field$string(e, !1, "ID", "id", "_id", e, n), t.Field_Field$string(e, !0, e, "docId", "_docId", e, n), t.Field_Field$timestamp(e, !0, e, "publishedAt", "_publishedAt", e, n), t.Field_Field$timestamp(e, !1, "Time", "createdAt", "_createdAt", e, n), t.Field_Field$string(e, !1, "Restaurant ID", "restaurantId", "_restaurantId", e, n), t.Field_Field$string(e, !1, "Status", "status", "status", e, n), t.Field_Field$string(e, !1, "No.", r, r, e, n), t.Field_Field$string(e, !1, "Table", "slot", "slot", e, n), t.Field_Field$string(e, !1, "Delivery", i, i, e, n), t.Field_Field$string(e, !1, "Refund ID", "refundFrom", "refundedFrom", e, n), t.Field_Field$bool(e, !1, "Refund", u, u, e, n), t.Field_Field$string(e, !0, e, "refundApprovedById", "refund.approvedBy.id", e, n), t.Field_Field$string(e, !1, "Refund approver", "refundApprovedByName", "refund.approvedBy.name", e, n), t.Field_Field$string(e, !0, e, "refundedById", "refund.by.id", e, n), t.Field_Field$string(e, !1, "Refund user", "refundedByName", "refund.by.name", e, n), t.Field_Field$string(e, !1, "Refund reason", "refundReason", "refund.reason", e, n), t.Field_Field$string(e, !1, "Member ID", "memberId", "membership.id", e, n), t.Field_Field$string(e, !1, "Member user ID", "memberUserId", "membership.userId", e, n), t.Field_Field$string(e, !1, "Member name", "memberUserName", "membership.name", e, n), t.Field_Field$string(e, !0, "Member phone", "memberPhoneNumber", "membership.phoneNumber", e, n), t.Field_Field$timestamp(e, !1, "Member birthday", "memberBirthday", "membership.birthday", e, n), t.Field_Field$string(e, !1, "Remark", "remark", "remark", e, n), t.Field_Field$string(e, !1, "Source", "source", "source", E.
|
|
8524
|
+
return t._setArrayType([t.Field_Field$string(e, !1, "ID", "id", "_id", e, n), t.Field_Field$string(e, !0, e, "docId", "_docId", e, n), t.Field_Field$timestamp(e, !0, e, "publishedAt", "_publishedAt", e, n), t.Field_Field$timestamp(e, !1, "Time", "createdAt", "_createdAt", e, n), t.Field_Field$string(e, !1, "Restaurant ID", "restaurantId", "_restaurantId", e, n), t.Field_Field$string(e, !1, "Status", "status", "status", e, n), t.Field_Field$string(e, !1, "No.", r, r, e, n), t.Field_Field$string(e, !1, "Table", "slot", "slot", e, n), t.Field_Field$string(e, !1, "Delivery", i, i, e, n), t.Field_Field$string(e, !1, "Refund ID", "refundFrom", "refundedFrom", e, n), t.Field_Field$bool(e, !1, "Refund", u, u, e, n), t.Field_Field$string(e, !0, e, "refundApprovedById", "refund.approvedBy.id", e, n), t.Field_Field$string(e, !1, "Refund approver", "refundApprovedByName", "refund.approvedBy.name", e, n), t.Field_Field$string(e, !0, e, "refundedById", "refund.by.id", e, n), t.Field_Field$string(e, !1, "Refund user", "refundedByName", "refund.by.name", e, n), t.Field_Field$string(e, !1, "Refund reason", "refundReason", "refund.reason", e, n), t.Field_Field$string(e, !1, "Member ID", "memberId", "membership.id", e, n), t.Field_Field$string(e, !1, "Member user ID", "memberUserId", "membership.userId", e, n), t.Field_Field$string(e, !1, "Member name", "memberUserName", "membership.name", e, n), t.Field_Field$string(e, !0, "Member phone", "memberPhoneNumber", "membership.phoneNumber", e, n), t.Field_Field$timestamp(e, !1, "Member birthday", "memberBirthday", "membership.birthday", e, n), t.Field_Field$string(e, !1, "Remark", "remark", "remark", e, n), t.Field_Field$string(e, !1, "Source", "source", "source", E.x28case_, n), t.Field_Field$string(e, !1, "Type", "type", "type", "(case when upper(@type)='PICKUP' then upper(@type) when upper(@type)='DELIVERY' then upper(@type) when @is_takeaway is true then 'TAKEAWAY' else upper(@type) end)", n), t.Field_Field$bool(e, !0, "Pickup", o, o, e, n), t.Field_Field$bool(e, !0, "Is in house delivery", s, s, e, n), t.Field_Field$bool(e, !0, "Is other delivery", l, l, e, n), t.Field_Field$bool(e, !0, "Is takeaway", "isTakeaway", "is.takeaway", e, n), t.Field_Field$timestamp(e, !1, "Closed at", D, D, e, n), t.Field_Field$string(e, !0, "Inclusive SST", "sstInclusive", "nettTaxes.SST.inclusive", e, n), t.Field_Field$string(e, !0, "SST before discount", "sstBeforeDiscount", "nettTaxes.SST.beforeDiscount", e, n), t.Field_Field$string(e, !0, "Inclusive SC", "serviceChargeInclusive", "nettTaxes.SERVICE_CHARGE.inclusive", e, n), t.Field_Field$string(e, !0, "SC before discount", "serviceChargeBeforeDiscount", "nettTaxes.SERVICE_CHARGE.beforeDiscount", e, n), t.Field_Field$numeric("IFNULL(@pax,0)*IF(@isRefund, -1, 1)", !1, "Pax", "pax", "person", E.COALESp, n), t.Field_Field$string(e, !1, "Integrated order ID", d, d, e, n), t.Field_Field$numeric(E.IFNULLi, !0, "Item count", c, c, E.COALESi, n), t.Field_Field$numeric("IFNULL(@taxTotal,0)*IF(@isRefund, -1, 1)", !1, "Tax", p, p, E.COALEStax, n), t.Field_Field$numeric(E.IFNULLdiT, !1, "Discount", y, y, E.COALESdit, n), t.Field_Field$numeric(E.IFNULLg, !1, "Item gross", g, g, E.COALESg, n), t.Field_Field$numeric(E.x28IFNULnI, !1, "Bill gross", "billGrossTotal", e, E.x28COALEnC, n), t.Field_Field$numeric("IFNULL(@rounding,0)*IF(@isRefund, -1, 1)", !1, "Rounding", m, m, E.COALESr, n), t.Field_Field$numeric("IFNULL(@sstTotal,0)*IF(@isRefund, -1, 1)", !0, "SST", "sstTotal", "nettTaxes.SST.total", E.COALESss, n), t.Field_Field$string(e, !0, "SST %", "sstPercentage", "nettTaxes.SST.percentage", e, n), t.Field_Field$numeric(E.IFNULLs, !1, "SC", "serviceChargeTotal", "nettTaxes.SERVICE_CHARGE.total", E.COALESse, n), t.Field_Field$string(e, !0, "SC %", "serviceChargePercentage", "nettTaxes.SERVICE_CHARGE.percentage", e, n), t.Field_Field$numeric(E.x28IFNULo, !1, "Other charge", "otherChargeTotal", "nettTaxes.OTHER_CHARGE.total", E.x28COALEo, n), t.Field_Field$numeric(E.x28IFNULgx2d, !1, "Gross w/ takeaway", "subTotalWithoutTakeaway", e, E.x28COALEgx2d, n), t.Field_Field$numeric(E.IFNULLta, !1, "Takeaway", h, h, E.COALEStak, n), t.Field_Field$numeric(E.IFNULLth, !1, "Extra charge", A, A, E.COALESth, n), t.Field_Field$numeric(E.IFNULLde_, !1, "Delivery fee", b, b, E.COALESdex2c, n), t.Field_Field$numeric(E.IFNULLn, !1, "Nett", M, M, E.COALESn, n), t.Field_Field$numeric(E.x28IFNULgx2bd, !1, "Item gross before charges", "grossBeforeCharges", e, E.x28COALEgx2bd, n), t.Field_Field$numeric(E.x28IFNULn_, !1, "Bill gross before charges", "billGrossBeforeCharges", e, E.x28COALEn_, n), t.Field_Field$numeric(e, !1, "Member Recency", "recency", e, E.MIN_EX, n), t.Field_Field$numeric(e, !1, "Member frequency", "frequency", e, E.COUNT_, n), t.Field_Field$numeric(e, !1, "Member monetary", "monetary", e, E.SUM__n, n), t.Field_Field$numeric(E.IFNULLdeWT, !1, "Delivery fee with tax", F, F, E.COALESdex5f_, n), t.Field_Field$numeric(E.IFNULLdeWo, !1, "Delivery fee without tax", I, I, E.COALESdex5fo, n), t.Field_Field$numeric(E.IFNULLoT, !1, "Other charge with tax", R, R, E.COALESo_, n), t.Field_Field$numeric(E.IFNULLoo, !1, "Other charge without tax", w, w, E.COALESoo, n), t.Field_Field$numeric(e, !1, "Duration", "duration", e, E.EXTRAC, n), t.Field_Field$string(e, !1, "Restaurant", "restaurantName", e, E.x28selecn, n), t.Field_Field$numeric(e, !1, "Labour hour", "labourHour", e, E.x28selecS, n), t.Field_Field$string(e, !1, "Payments", "payments", e, E.x28selecstdn, n), t.Field_Field$string(e, !1, "Items", "items", e, E.x28selecstC, n), t.Field_Field$string(e, !1, "Discount reasons", "discountReasons", e, E.x28selecstda, n), t.Field_Field$numeric(E.IFNULLdiI, !1, "Discount inc tax", L, L, E.COALESdii, n), t.Field_Field$string(e, !1, "Payment Summaries", "paymentSummaries", e, E.x28selecstdC, n)], $.JSArray_Field);
|
|
8525
8525
|
},
|
|
8526
8526
|
$signature: 0
|
|
8527
8527
|
}, t.completeTimeBillSchema_closure0.prototype = {
|
|
@@ -9211,7 +9211,7 @@ Arguments: [` + D + "]";
|
|
|
9211
9211
|
}, t.voucherClaimSchema_closure0.prototype = {
|
|
9212
9212
|
call$1(n) {
|
|
9213
9213
|
var e = "id", r = null, i = $.JSArray_String, u = $.JSArray_JoinCondition;
|
|
9214
|
-
return t._setArrayType([new t.Join(_.SCHEMA_NAME_2, t._setArrayType([new t.JoinCondition(e, t._setArrayType(["businessId"], i), _.COMPARISON_OPERATOR_0, r)], u), !1, n, r), new t.Join(_.SCHEMA_NAME_14, t._setArrayType([new t.JoinCondition(e, t._setArrayType(["restaurantId"], i), _.COMPARISON_OPERATOR_0, r)], u), !1, n, r), new t.Join(_.SCHEMA_NAME_41, t._setArrayType([new t.JoinCondition(e, t._setArrayType(["userId"], i), _.COMPARISON_OPERATOR_0, r)], u), !1, n, r), new t.Join(_.SCHEMA_NAME_0, t._setArrayType([new t.JoinCondition(e, t._setArrayType(["billId"], i), _.COMPARISON_OPERATOR_0, r)], u), !
|
|
9214
|
+
return t._setArrayType([new t.Join(_.SCHEMA_NAME_2, t._setArrayType([new t.JoinCondition(e, t._setArrayType(["businessId"], i), _.COMPARISON_OPERATOR_0, r)], u), !1, n, r), new t.Join(_.SCHEMA_NAME_14, t._setArrayType([new t.JoinCondition(e, t._setArrayType(["restaurantId"], i), _.COMPARISON_OPERATOR_0, r)], u), !1, n, r), new t.Join(_.SCHEMA_NAME_41, t._setArrayType([new t.JoinCondition(e, t._setArrayType(["userId"], i), _.COMPARISON_OPERATOR_0, r)], u), !1, n, r), new t.Join(_.SCHEMA_NAME_0, t._setArrayType([new t.JoinCondition(e, t._setArrayType(["billId"], i), _.COMPARISON_OPERATOR_0, r)], u), !1, n, r), new t.Join(_.SCHEMA_NAME_40, t._setArrayType([new t.JoinCondition("voucherClaimId", t._setArrayType(["id"], i), _.COMPARISON_OPERATOR_0, r)], u), !1, n, r)], $.JSArray_Join);
|
|
9215
9215
|
},
|
|
9216
9216
|
$signature: 1
|
|
9217
9217
|
}, t.voucherClaimRedemptionSchema_closure.prototype = {
|
|
@@ -9969,8 +9969,7 @@ Arguments: [` + D + "]";
|
|
|
9969
9969
|
x28IFNULn_: "(IFNULL(@nettTotal,0)-IFNULL(@rounding,0)-(case when @otherChargeWithTax>0 then 0 else IFNULL(@thirdPartyExtraCharge,0) end)-(case when @deliveryFeeWithTax>0 then 0 else IFNULL(@deliveryFee,0) end)-IFNULL(@taxTotal,0)-IFNULL(@serviceChargeTotal,0))*IF(@isRefund, -1, 1)",
|
|
9970
9970
|
x28IFNULnI: "(IFNULL(@nettTotal,0)-IFNULL(@rounding,0)-IFNULL(@discountTotal,0)-IFNULL(@thirdPartyExtraCharge,0)-IFNULL(@deliveryFee,0)-IFNULL(@taxTotal,0)-IFNULL(@serviceChargeTotal,0))*IF(@isRefund, -1, 1)",
|
|
9971
9971
|
x28IFNULo: "(IFNULL(@otherChargeTotal,0)+IFNULL(@thirdPartyExtraCharge,0))*IF(@isRefund, -1, 1)",
|
|
9972
|
-
|
|
9973
|
-
x28case_u: "(case when upper(@type)='PICKUP' then upper(@type) when upper(@type)='DELIVERY' then upper(@type) when @is_takeaway is true then 'TAKEAWAY' else upper(@type) end)",
|
|
9972
|
+
x28case_: "(case when (@source='' or @source='POS') then 'FEEDME' else @source end)",
|
|
9974
9973
|
x28selecS: `(select SUM(ROUND(
|
|
9975
9974
|
(case when EXTRACT(EPOCH FROM COALESCE(timesheets.ended_at,!end)-(timesheets.created_at))<86400
|
|
9976
9975
|
then EXTRACT(EPOCH FROM COALESCE(timesheets.ended_at,!end)-(timesheets.created_at)) else 86400 end)/3600,2)) from timesheets where restaurant_id=@restaurant_id and timesheets.created_at < !end and coalesce(timesheets.ended_at,!end) > !start and DATE_TRUNC('day',@created_at AT TIME ZONE 'Asia/Kuala_Lumpur') between DATE_TRUNC('day',timesheets.created_at AT TIME ZONE 'Asia/Kuala_Lumpur') and DATE_TRUNC('day',COALESCE(timesheets.ended_at,!end) AT TIME ZONE 'Asia/Kuala_Lumpur')+INTERVAL '1 day'-INTERVAL '1 second')`,
|
|
@@ -19307,7 +19306,7 @@ const v0 = {
|
|
|
19307
19306
|
};
|
|
19308
19307
|
});
|
|
19309
19308
|
var ye = /* @__PURE__ */ ((T) => (T.generating = "GENERATING", T.completed = "COMPLETED", T.failed = "FAILED", T.canceled = "CANCELLED", T))(ye || {});
|
|
19310
|
-
const pt = "/assets/formatChartData.worker-
|
|
19309
|
+
const pt = "/assets/formatChartData.worker-CJVlLdXW.js", Y0 = /* @__PURE__ */ new Map();
|
|
19311
19310
|
function ie(T) {
|
|
19312
19311
|
return new Worker(T, { type: "module" });
|
|
19313
19312
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as V, resolveComponent as S, createBlock as p, openBlock as y, withCtx as I, createCommentVNode as Y, createElementVNode as M, toDisplayString as j, renderSlot as A, mergeModels as $, useModel as R, ref as O, watch as k, createElementBlock as U, createVNode as b, unref as D } from "vue";
|
|
2
|
-
import { d as r, m as B, t as W, u as q, b as G, U as H, C as K } from "./vue-i18n-
|
|
2
|
+
import { d as r, m as B, t as W, u as q, b as G, U as H, C as K } from "./vue-i18n-BJW_sJot.js";
|
|
3
3
|
import { detectLocale as z } from "@feedmepos/mf-common";
|
|
4
4
|
import { storeToRefs as L } from "pinia";
|
|
5
5
|
var g = /* @__PURE__ */ ((e) => (e.Year = "YEAR", e.Month = "MONTH", e.Week = "WEEK", e.Day = "DAY", e))(g || {});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as u, computed as f, resolveComponent as p, createElementBlock as s, openBlock as t, normalizeStyle as n, normalizeClass as d, unref as e, createBlock as y, createCommentVNode as _, createVNode as h, createElementVNode as k, toDisplayString as g, renderSlot as x } from "vue";
|
|
2
|
-
import { _ as v } from "./NavigationTab.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { _ as v } from "./NavigationTab.vue_vue_type_script_setup_true_lang-C4NFUekp.js";
|
|
3
3
|
import { useBreakpoints as b } from "@feedmepos/ui-library";
|
|
4
4
|
import { storeToRefs as C } from "pinia";
|
|
5
|
-
import { u as q, f as w } from "./vue-i18n-
|
|
5
|
+
import { u as q, f as w } from "./vue-i18n-BJW_sJot.js";
|
|
6
6
|
import { useRoute as B } from "vue-router";
|
|
7
7
|
const $ = {
|
|
8
8
|
key: 1,
|