@feedmepos/mf-report 5.22.30 → 5.22.31-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.
Files changed (24) hide show
  1. package/dist/{App-Cof-X-OX.js → App-B7zdIRXH.js} +61 -61
  2. package/dist/{BaseDialog.vue_vue_type_script_setup_true_lang-Cn_mVx9D.js → BaseDialog.vue_vue_type_script_setup_true_lang-CsfK9p2M.js} +4 -4
  3. package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-CJOaN-RA.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-EbsXr6lI.js} +1 -1
  4. package/dist/{Default.vue_vue_type_script_setup_true_lang-Dz_5iNus.js → Default.vue_vue_type_script_setup_true_lang-CGxlzZJ8.js} +1 -1
  5. package/dist/{FilterSelector.vue_vue_type_script_setup_true_lang-Lnxc9CzU.js → FilterSelector.vue_vue_type_script_setup_true_lang-DRyw5SRY.js} +221 -221
  6. package/dist/{InsightView-DktFtdy9.js → InsightView-Wd8eUqHl.js} +4 -4
  7. package/dist/{Integration-CFtbFghr.js → Integration-DoCseYiq.js} +908 -897
  8. package/dist/{Integrations-fSWspKwj.js → Integrations-CGNcCVVf.js} +2 -2
  9. package/dist/{Layout-CcunW_mF.js → Layout-Aq4iKvz6.js} +1 -1
  10. package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-Bwq0tcXV.js → MenuTab.vue_vue_type_script_setup_true_lang-CtOxEz-l.js} +5 -5
  11. package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-C5bwFbZj.js → NavigationTab.vue_vue_type_script_setup_true_lang-BtsLlMjx.js} +3 -3
  12. package/dist/{OverviewView-Dq5tvKOF.js → OverviewView-awV29qh4.js} +4 -4
  13. package/dist/{Report-CHlX2qrM.js → Report-DKU_IMEc.js} +3 -3
  14. package/dist/{ReportEditor-Dj3PktxT.js → ReportEditor-ch3oWmLL.js} +4 -4
  15. package/dist/{ReportView-lwvhOIVg.js → ReportView-Cs-sJi8s.js} +6 -6
  16. package/dist/{Setting-BhK2ktyL.js → Setting-DKBmOhLI.js} +3 -3
  17. package/dist/{TileEditor-B_JDpB3I.js → TileEditor-BQCmBEOj.js} +5 -5
  18. package/dist/{TransitionFade-D7Yi5DZW.js → TransitionFade-D0Hy2Ybt.js} +4 -4
  19. package/dist/{app-DlT1RNrY.js → app-CSnuYvs5.js} +12 -12
  20. package/dist/app.js +1 -1
  21. package/dist/assets/{formatChartData.worker-CKB5if5c.js → formatChartData.worker-DR8QpYfd.js} +1 -1
  22. package/dist/assets/{processTableData.worker-C1Lshb3k.js → processTableData.worker-V2pxR4IU.js} +1 -1
  23. package/dist/{useRestaurantPermission-DB3sRIJN.js → useRestaurantPermission-DqwIrQUV.js} +1 -1
  24. package/package.json +1 -1
@@ -1,38 +1,38 @@
1
- import { defineComponent as ue, resolveComponent as H, createBlock as de, openBlock as A, unref as d, isRef as Ee, withCtx as P, createElementVNode as ne, createVNode as X, toDisplayString as oe, createTextVNode as ke, onMounted as le, watch as C, ref as J, computed as re, onBeforeMount as Te, onBeforeUnmount as Ne, createElementBlock as G, Fragment as $e } from "vue";
2
- import { detectLocale as Q, useCoreStore as K } from "@feedmepos/mf-common";
3
- import { d as u, u as Be, a as ae, b as Fe, c as se, e as qe, f as xe, s as Je, t as W } from "./app-DlT1RNrY.js";
4
- import { storeToRefs as E } from "pinia";
1
+ import { defineComponent as ue, resolveComponent as H, createBlock as de, openBlock as A, unref as d, isRef as Ce, withCtx as W, createElementVNode as ne, createVNode as X, toDisplayString as oe, createTextVNode as ke, onMounted as le, watch as E, ref as J, computed as ae, onBeforeMount as Ne, onBeforeUnmount as Te, createElementBlock as K, Fragment as $e } from "vue";
2
+ import { detectLocale as Q, useCoreStore as P } from "@feedmepos/mf-common";
3
+ import { d as u, u as Be, a as re, b as Fe, c as se, e as qe, f as xe, s as Je, t as G } from "./app-CSnuYvs5.js";
4
+ import { storeToRefs as C } from "pinia";
5
5
  import { u as Qe, a as Ue } from "./vue-i18n-DVWuTfed.js";
6
- import { u as je, a as ze } from "./BaseDialog.vue_vue_type_script_setup_true_lang-Cn_mVx9D.js";
7
- import { u as Ve, _ as Pe } from "./NavigationTab.vue_vue_type_script_setup_true_lang-C5bwFbZj.js";
6
+ import { u as ze, a as je } from "./BaseDialog.vue_vue_type_script_setup_true_lang-CsfK9p2M.js";
7
+ import { u as Ve, _ as We } from "./NavigationTab.vue_vue_type_script_setup_true_lang-BtsLlMjx.js";
8
8
  import { u as ie } from "./message-dialog-UoMWOnil.js";
9
- import { useRoute as Ge, useRouter as Ke } from "vue-router";
10
- const We = { class: "fm-typo-en-body-md-400 text-ellipsis overflow-hidden" }, He = /* @__PURE__ */ ue({
9
+ import { useRoute as Ke, useRouter as Pe } from "vue-router";
10
+ const Ge = { class: "fm-typo-en-body-md-400 text-ellipsis overflow-hidden" }, He = /* @__PURE__ */ ue({
11
11
  __name: "Dialog",
12
12
  setup(k) {
13
- const { t: c } = Qe(), p = ie(), { isOpened: g, message: _, title: L } = E(ie());
13
+ const { t: c } = Qe(), p = ie(), { isOpened: g, message: _, title: L } = C(ie());
14
14
  return (O, I) => {
15
- const T = H("FmButton"), U = H("FmDialog");
15
+ const N = H("FmButton"), U = H("FmDialog");
16
16
  return A(), de(U, {
17
17
  modelValue: d(g),
18
- "onUpdate:modelValue": I[0] || (I[0] = (j) => Ee(g) ? g.value = j : null),
18
+ "onUpdate:modelValue": I[0] || (I[0] = (z) => Ce(g) ? g.value = z : null),
19
19
  overlay: "",
20
20
  "close-button": !1
21
21
  }, {
22
- "dialog-header": P(() => [
22
+ "dialog-header": W(() => [
23
23
  ke(oe(d(L)), 1)
24
24
  ]),
25
- default: P(() => [
26
- ne("p", We, oe(d(_)), 1)
25
+ default: W(() => [
26
+ ne("p", Ge, oe(d(_)), 1)
27
27
  ]),
28
- "dialog-footer": P(() => [
28
+ "dialog-footer": W(() => [
29
29
  I[1] || (I[1] = ne("div", { class: "grow" }, null, -1)),
30
- X(T, {
30
+ X(N, {
31
31
  label: d(c)("report.common.cancel"),
32
32
  variant: "tertiary",
33
33
  onClick: d(p).dismiss
34
34
  }, null, 8, ["label", "onClick"]),
35
- X(T, {
35
+ X(N, {
36
36
  label: d(c)("report.common.confirm"),
37
37
  onClick: d(p).confirm
38
38
  }, null, 8, ["label", "onClick"])
@@ -55,7 +55,7 @@ function Xe() {
55
55
  };
56
56
  return le(() => {
57
57
  k(Q());
58
- }), C(() => Q(), k, { deep: !0, immediate: !0 }), {
58
+ }), E(() => Q(), k, { deep: !0, immediate: !0 }), {
59
59
  currentLocale: ce
60
60
  };
61
61
  }
@@ -63,8 +63,8 @@ u.locale(Q() === "zh-CN" ? "zh-cn" : "en");
63
63
  const Ye = ["src"], Ze = ["src"], lt = /* @__PURE__ */ ue({
64
64
  __name: "App",
65
65
  setup(k) {
66
- const { businessId: c, token: p, country: g } = E(Be()), { sessionUser: _, currentBusiness: L, currentCountry: O, registerSidebarComponent: I } = K(), { getRestaurantAndWarehouse: T, getBusinessSetting: U, beginBusinessLoad: j, completeBusinessLoad: fe } = ae(), { getFeatureFlags: me } = Fe(), { version: v } = E(se()), { getSettings: pe } = qe(), { promptLoader: ge } = Ue(), s = Ge(), z = Ke(), w = je(), Y = Ve(), a = ae(), N = se(), { suppressReportRouteSync: $ } = E(N), { getReports: ve, getOverviewReport: ye, getReportConfig: Se, currentReportId: Z } = w, { currentReportId: De, reports: Ie } = E(w), { getSchema: he } = ze(), { fetchSchedules: Re } = Y, { init: _e } = xe(), V = J("v5"), B = J(!1), F = J(!0), Le = re(() => `https://portal-v1.feedme.cc/b/${c.value}/report/CLOSE_UP?showHeader=false&country=${g.value.toUpperCase()}&menuOption=business-report&token=${p.value}&v2=true&reportV5Button=true`), Oe = re(() => `https://report-v4.feedme.cc?businessId=${c.value}&country=${g.value}&token=${p.value}&reportV3Button=true`);
67
- C(
66
+ const { businessId: c, token: p, country: g } = C(Be()), { sessionUser: _, currentBusiness: L, currentCountry: O, registerSidebarComponent: I } = P(), { getRestaurantAndWarehouse: N, getBusinessSetting: U, beginBusinessLoad: z, completeBusinessLoad: fe } = re(), { getFeatureFlags: me } = Fe(), { version: v } = C(se()), { getSettings: pe } = qe(), { promptLoader: ge } = Ue(), s = Ke(), j = Pe(), w = ze(), Y = Ve(), r = re(), T = se(), { suppressReportRouteSync: $ } = C(T), { getReports: ve, getOverviewReport: ye, getReportConfig: Se, currentReportId: Z } = w, { currentReportId: De, reports: Ie } = C(w), { getSchema: he } = je(), { fetchSchedules: Re } = Y, { init: _e } = xe(), V = J("v5"), B = J(!1), F = J(!0), Le = ae(() => `https://portal-v1.feedmedev.cc/b/${c.value}/report/CLOSE_UP?showHeader=false&country=${g.value.toUpperCase()}&menuOption=business-report&token=${p.value}&v2=true&reportV5Button=true`), Oe = ae(() => `https://report-v4.feedmedev.cc?businessId=${c.value}&country=${g.value}&token=${p.value}&reportV3Button=true`);
67
+ E(
68
68
  [() => L.value, () => _.value, () => O.value],
69
69
  () => {
70
70
  var e, n;
@@ -91,13 +91,13 @@ const Ye = ["src"], Ze = ["src"], lt = /* @__PURE__ */ ue({
91
91
  console.error(e);
92
92
  }
93
93
  }
94
- C(v, () => {
95
- ["v3", "v4"].includes(v.value) ? K().hideSidebarToggle(!0) : K().hideSidebarToggle(!1);
96
- }), Te(() => {
97
- I(Pe);
98
- }), le(() => {
99
- console.log("5.22.30", !0), window.addEventListener("message", M), window.addEventListener("message", ee);
94
+ E(v, () => {
95
+ ["v3", "v4"].includes(v.value) ? P().hideSidebarToggle(!0) : P().hideSidebarToggle(!1);
100
96
  }), Ne(() => {
97
+ I(We);
98
+ }), le(() => {
99
+ console.log("5.22.31-beta.0", !0), window.addEventListener("message", M), window.addEventListener("message", ee);
100
+ }), Te(() => {
101
101
  window.removeEventListener("message", M), window.removeEventListener("message", ee), w.$dispose(), Y.$dispose();
102
102
  });
103
103
  function we(t) {
@@ -132,30 +132,30 @@ const Ye = ["src"], Ze = ["src"], lt = /* @__PURE__ */ ue({
132
132
  const e = t, n = e.startDate ? u(e.startDate).startOf("day").toISOString() : void 0, o = e.endDate ? u(e.endDate).endOf("day").toISOString() : void 0, l = typeof e.timeStart == "string", i = typeof e.timeEnd == "string", f = q(e.timeStart), y = q(e.timeEnd), m = te(f) ? f : null, x = te(y) ? y : null, b = e.compareStartDate ? u(e.compareStartDate).startOf("day").toISOString() : void 0, S = e.compareEndDate ? u(e.compareEndDate).endOf("day").toISOString() : void 0, h = e.isAllLocation === "true" || e.isAllLocation === void 0;
133
133
  let D = [];
134
134
  if (h)
135
- D = a.selectedLocationIds ?? [];
135
+ D = r.selectedLocationIds ?? [];
136
136
  else {
137
- const r = q(e.locationIds);
138
- D = Array.isArray(r) ? r : [];
137
+ const a = q(e.locationIds);
138
+ D = Array.isArray(a) ? a : [];
139
139
  }
140
140
  let R = e.reportId || Z;
141
- if (Ie.value.find((r) => r.id === R) || (R = Z), R && R !== w.currentReportId && w.updateCurrentReportId(R), n || o) {
142
- const r = a.dateRange;
143
- (r.startDate !== n || r.endDate !== o) && a.setDateRange({ startDate: n, endDate: o });
141
+ if (Ie.value.find((a) => a.id === R) || (R = Z), R && R !== w.currentReportId && w.updateCurrentReportId(R), n || o) {
142
+ const a = r.dateRange;
143
+ (a.startDate !== n || a.endDate !== o) && r.setDateRange({ startDate: n, endDate: o });
144
144
  }
145
145
  if (l || i) {
146
- const r = a.timeRange;
147
- (r.start !== m || r.end !== x) && a.setTimeRange({ start: m, end: x });
146
+ const a = r.timeRange;
147
+ (a.start !== m || a.end !== x) && r.setTimeRange({ start: m, end: x });
148
148
  }
149
149
  if (b || S) {
150
- const r = a.compareDateRange;
151
- (r.startDate !== b || r.endDate !== S) && a.setCompareDateRange({
150
+ const a = r.compareDateRange;
151
+ (a.startDate !== b || a.endDate !== S) && r.setCompareDateRange({
152
152
  startDate: b,
153
153
  endDate: S
154
154
  });
155
155
  }
156
156
  if (!h) {
157
- const r = a.selectedLocationIds;
158
- r.length === D.length && r.every((Ae, Ce) => Ae === D[Ce]) || a.setSelectedLocationIds(D);
157
+ const a = r.selectedLocationIds;
158
+ a.length === D.length && a.every((Ae, Ee) => Ae === D[Ee]) || r.setSelectedLocationIds(D);
159
159
  }
160
160
  return {
161
161
  // TODO: this returned value can used for getBusinessSetting
@@ -170,11 +170,11 @@ const Ye = ["src"], Ze = ["src"], lt = /* @__PURE__ */ ue({
170
170
  isAllLocation: e.isAllLocation
171
171
  };
172
172
  }
173
- return C(
173
+ return E(
174
174
  () => c.value,
175
175
  async (t, e) => {
176
176
  if (t !== "") {
177
- B.value = !1, j(t);
177
+ B.value = !1, z(t);
178
178
  const n = "mf-report-prev-business-id", o = (() => {
179
179
  try {
180
180
  return sessionStorage.getItem(n);
@@ -184,12 +184,12 @@ const Ye = ["src"], Ze = ["src"], lt = /* @__PURE__ */ ue({
184
184
  })(), l = !!o && o !== t;
185
185
  let i = { ...s.query }, f = !1;
186
186
  if (!F.value || e !== void 0 || l) {
187
- a.setSelectedLocationIds([]);
187
+ r.setSelectedLocationIds([]);
188
188
  const { locationIds: y, ...m } = s.query;
189
189
  i = {
190
190
  ...m,
191
191
  isAllLocation: "true"
192
- }, f = !0, await z.replace({
192
+ }, f = !0, await j.replace({
193
193
  name: s.name,
194
194
  params: s.params,
195
195
  query: i
@@ -197,24 +197,24 @@ const Ye = ["src"], Ze = ["src"], lt = /* @__PURE__ */ ue({
197
197
  }
198
198
  $.value !== void 0 && ($.value = !0), await ge(async () => {
199
199
  await _e({
200
- apiKey: "6GhcttsJ9Rj9cTevcdrpin",
200
+ apiKey: "MaGoXrEWuEJNpWgKTqseee",
201
201
  url: "https://flag.feedme.farm/api/v1/",
202
202
  enableAnalytics: !1,
203
203
  cacheFlags: !1
204
204
  });
205
205
  const y = await Se();
206
206
  V.value = y.version, v.value = V.value, await me();
207
- const m = N.canAccess(
208
- W.report_accessOverview
209
- ), x = N.canAccess(
210
- W.report_accessSetting
211
- ), b = N.canAccess(
212
- W.report_accessIntegration
207
+ const m = T.canAccess(
208
+ G.report_accessOverview
209
+ ), x = T.canAccess(
210
+ G.report_accessSetting
211
+ ), b = T.canAccess(
212
+ G.report_accessIntegration
213
213
  ), S = [
214
214
  he(),
215
215
  Re(),
216
216
  ve(),
217
- T(
217
+ N(
218
218
  (() => {
219
219
  const h = q(i.locationIds);
220
220
  return Array.isArray(h) ? h : void 0;
@@ -223,7 +223,7 @@ const Ye = ["src"], Ze = ["src"], lt = /* @__PURE__ */ ue({
223
223
  ];
224
224
  if (m && S.push(ye()), b && S.push(pe()), await Promise.all(S), x && await U(), be(i), f) {
225
225
  const { locationIds: h, ...D } = s.query;
226
- (s.query.locationIds !== void 0 || s.query.isAllLocation !== "true") && await z.replace({
226
+ (s.query.locationIds !== void 0 || s.query.isAllLocation !== "true") && await j.replace({
227
227
  name: s.name,
228
228
  params: s.params,
229
229
  query: {
@@ -243,13 +243,13 @@ const Ye = ["src"], Ze = ["src"], lt = /* @__PURE__ */ ue({
243
243
  {
244
244
  immediate: !0
245
245
  }
246
- ), C(
246
+ ), E(
247
247
  () => (B.value, {
248
248
  reportId: De.value,
249
- selectedLocationIds: a.selectedLocationIds,
250
- dateRange: a.dateRange,
251
- timeRange: a.timeRange,
252
- compareDateRange: a.compareDateRange
249
+ selectedLocationIds: r.selectedLocationIds,
250
+ dateRange: r.dateRange,
251
+ timeRange: r.timeRange,
252
+ compareDateRange: r.compareDateRange
253
253
  }),
254
254
  (t) => {
255
255
  if (!B.value || !t.reportId || F.value) return;
@@ -266,10 +266,10 @@ const Ye = ["src"], Ze = ["src"], lt = /* @__PURE__ */ ue({
266
266
  compareEndDate: l.endDate ? u(l.endDate).endOf("day").toISOString() : void 0,
267
267
  timeStart: o.start ? JSON.stringify(o.start) : void 0,
268
268
  timeEnd: o.end ? JSON.stringify(o.end) : void 0
269
- }, f = e.length === a.locations.length;
269
+ }, f = e.length === r.locations.length;
270
270
  i.isAllLocation = String(f), f ? delete i.locationIds : e.length > 0 ? i.locationIds = JSON.stringify(e) : delete i.locationIds;
271
271
  const y = JSON.stringify(s.query), m = JSON.stringify(i);
272
- y !== m && z.replace({
272
+ y !== m && j.replace({
273
273
  name: s.name,
274
274
  params: s.params,
275
275
  query: i
@@ -278,13 +278,13 @@ const Ye = ["src"], Ze = ["src"], lt = /* @__PURE__ */ ue({
278
278
  { deep: !0 }
279
279
  ), Xe(), (t, e) => {
280
280
  const n = H("router-view");
281
- return A(), G($e, null, [
281
+ return A(), K($e, null, [
282
282
  X(He),
283
- d(v) === "v3" ? (A(), G("iframe", {
283
+ d(v) === "v3" ? (A(), K("iframe", {
284
284
  key: 0,
285
285
  class: "bg-white h-full w-full",
286
286
  src: Le.value
287
- }, null, 8, Ye)) : d(v) === "v4" ? (A(), G("iframe", {
287
+ }, null, 8, Ye)) : d(v) === "v4" ? (A(), K("iframe", {
288
288
  key: 1,
289
289
  class: "bg-white h-full w-full",
290
290
  src: Oe.value
@@ -1,10 +1,10 @@
1
- import { u as y0, F as m0, x as A0, y as Ie, a as V0, b as Fe, w as Me, g as Re, d as E0, c as De, r as K0 } from "./app-DlT1RNrY.js";
1
+ import { u as y0, F as m0, x as A0, y as Ie, a as V0, b as Fe, w as Me, g as Re, d as E0, c as De, r as K0 } from "./app-CSnuYvs5.js";
2
2
  import { storeToRefs as D0, defineStore as Y0 } from "pinia";
3
3
  import { ref as d0, computed as H0, watch as Z0, defineComponent as ce, mergeModels as X0, useModel as j0, resolveComponent as O0, createElementBlock as G0, openBlock as k0, createVNode as C0, withCtx as B0, createElementVNode as L0, createCommentVNode as xe, Fragment as ie, renderList as Le, createBlock as fe, createTextVNode as pe, withDirectives as Oe, toDisplayString as v0, unref as S0, vShow as we, renderSlot as ve } from "vue";
4
4
  import { useSnackbar as $e } from "@feedmepos/ui-library";
5
5
  import { u as Be } from "./vue-i18n-DVWuTfed.js";
6
6
  import { useCoreStore as Pe, detectLocale as P0 } from "@feedmepos/mf-common";
7
- import { c as Je, a as He } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-CJOaN-RA.js";
7
+ import { c as Je, a as He } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-EbsXr6lI.js";
8
8
  function ye(E) {
9
9
  throw new Error('Could not dynamically require "' + E + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
10
10
  }
@@ -8868,7 +8868,7 @@ Arguments: [` + d + "]";
8868
8868
  }, t.billSchema_closure.prototype = {
8869
8869
  call$1(r) {
8870
8870
  var e = null, n = "seqNumber", i = "deliveryName", a = "isRefund", s = "isPickup", o = "isInHouseDelivery", l = "isDelivery", d = "completedAt", D = "integratedOrderId", f = "itemCount", p = "taxTotal", y = "discountTotal", m = "grossTotal", g = "rounding", h = "takeawayPrice", A = "thirdPartyExtraCharge", C = "deliveryFee", I = "nettTotal", M = "deliveryFeeWithTax", x = "deliveryFeeWithoutTax", R = "otherChargeWithTax", L = "otherChargeWithoutTax", O = "discountInclusiveTaxTotal";
8871
- return t._setArrayType([t.Field_Field$string(e, e, !1, !1, !1, "ID", "id", "_id", e, r), t.Field_Field$string(e, e, !0, !1, !1, e, "docId", "_docId", e, r), t.Field_Field$timestamp(e, e, !0, !1, e, "publishedAt", "_publishedAt", e, r), t.Field_Field$timestamp(e, e, !1, !1, "Time", "createdAt", "_createdAt", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Restaurant ID", "restaurantId", "_restaurantId", e, r), t.Field_Field$string("Values: COMPLETED, DRAFT, VOIDED, REFUNDED", e, !1, !1, !1, "Status", "status", "status", e, r), t.Field_Field$string(e, e, !1, !1, !1, "No.", n, n, e, r), t.Field_Field$string("Dine-in table name/identifier", e, !1, !1, !1, "Table", "slot", "slot", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Delivery", i, i, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Refund ID", "refundFrom", "refundedFrom", e, r), t.Field_Field$bool(e, e, !1, !1, "Refund", a, a, e, r), t.Field_Field$string(e, e, !0, !1, !1, e, "refundApprovedById", "refund.approvedBy.id", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Refund approver", "refundApprovedByName", "refund.approvedBy.name", e, r), t.Field_Field$string(e, e, !0, !1, !1, e, "refundedById", "refund.by.id", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Refund user", "refundedByName", "refund.by.name", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Refund reason", "refundReason", "refund.reason", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Member ID", "memberId", "membership.id", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Member user ID", "memberUserId", "membership.userId", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Member name", "memberUserName", "membership.name", e, r), t.Field_Field$string(e, e, !0, !1, !1, "Member phone", "memberPhoneNumber", "membership.phoneNumber", e, r), t.Field_Field$timestamp(e, e, !1, !1, "Member birthday", "memberBirthday", "membership.birthday", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Remark", "remark", "remark", e, r), t.Field_Field$string("Order source. Values: FEEDME (POS), GRABFOOD, FOODPANDA, SHOPEEFOOD, etc.", e, !1, !1, !1, "Source", "source", "source", T.x28case_, r), t.Field_Field$string("Order type. Values: DINE IN, TAKEAWAY, PICKUP, DELIVERY, DRIVE THRU", e, !1, !1, !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)", r), t.Field_Field$bool(e, e, !0, !1, "Pickup", s, s, e, r), t.Field_Field$bool(e, e, !0, !1, "Is in house delivery", o, o, e, r), t.Field_Field$bool(e, e, !0, !1, "Is other delivery", l, l, e, r), t.Field_Field$bool(e, e, !0, !1, "Is takeaway", "isTakeaway", "is.takeaway", e, r), t.Field_Field$timestamp(e, e, !1, !1, "Closed at", d, d, e, r), t.Field_Field$string(e, e, !0, !1, !1, "Inclusive SST", "sstInclusive", "nettTaxes.SST.inclusive", e, r), t.Field_Field$string(e, e, !0, !1, !1, "SST before discount", "sstBeforeDiscount", "nettTaxes.SST.beforeDiscount", e, r), t.Field_Field$string(e, e, !0, !1, !1, "Inclusive SC", "serviceChargeInclusive", "nettTaxes.SERVICE_CHARGE.inclusive", e, r), t.Field_Field$string(e, e, !0, !1, !1, "SC before discount", "serviceChargeBeforeDiscount", "nettTaxes.SERVICE_CHARGE.beforeDiscount", e, r), t.Field_Field$numeric("Number of guests. Negated for refund, 0 for voided", "IF(@status = 'VOIDED', 0, IFNULL(@pax,0)*IF(@isRefund, -1, 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)", r), t.Field_Field$string(e, e, !1, !1, !1, "Integrated order ID", D, D, e, r), t.Field_Field$numeric(e, T.IFNULLi, !0, !1, "Item count", f, f, T.COALESi, r), t.Field_Field$numeric(e, "IFNULL(@taxTotal,0)*IF(@isRefund, -1, 1)", !1, !1, "Tax", p, p, T.COALEStax, r), t.Field_Field$numeric(e, T.IFNULLdiT, !1, !1, "Discount", y, y, T.COALESdit, r), t.Field_Field$numeric(e, T.IFNULLg, !1, !1, "Item gross", m, m, T.COALESg, r), t.Field_Field$numeric(e, T.x28IFNULnI, !1, !1, "Bill gross", "billGrossTotal", e, T.x28COALEnC, r), t.Field_Field$numeric(e, "IFNULL(@rounding,0)*IF(@isRefund, -1, 1)", !1, !1, "Rounding", g, g, T.COALESr, r), t.Field_Field$numeric(e, "IFNULL(@sstTotal,0)*IF(@isRefund, -1, 1)", !0, !1, "SST", "sstTotal", "nettTaxes.SST.total", T.COALESss, r), t.Field_Field$string(e, e, !0, !1, !1, "SST %", "sstPercentage", "nettTaxes.SST.percentage", e, r), t.Field_Field$numeric(e, T.IFNULLs, !1, !1, "SC", "serviceChargeTotal", "nettTaxes.SERVICE_CHARGE.total", T.COALESse, r), t.Field_Field$string(e, e, !0, !1, !1, "SC %", "serviceChargePercentage", "nettTaxes.SERVICE_CHARGE.percentage", e, r), t.Field_Field$numeric(e, T.x28IFNULo, !1, !1, "Other charge", "otherChargeTotal", "nettTaxes.OTHER_CHARGE.total", T.x28COALEo, r), t.Field_Field$numeric(e, T.x28IFNULgx2d, !1, !1, "Gross w/ takeaway", "subTotalWithoutTakeaway", e, T.x28COALEgx2d, r), t.Field_Field$numeric(e, T.IFNULLta, !1, !1, "Takeaway", h, h, T.COALEStak, r), t.Field_Field$numeric(e, T.IFNULLth, !1, !1, "Extra charge", A, A, T.COALESth, r), t.Field_Field$numeric(e, T.IFNULLde_, !1, !1, "Delivery fee", C, C, T.COALESdex2c, r), t.Field_Field$numeric(e, T.IFNULLn, !1, !1, "Nett", I, I, T.COALESn, r), t.Field_Field$numeric(e, "(IFNULL(@grossTotal,0)+(case when @deliveryFeeWithTax>0 then IFNULL(@deliveryFee,0) else 0 end)+IFNULL(case when @otherChargeWithTax>0 then IFNULL(@thirdPartyExtraCharge,0) else 0 end)+IFNULL(@discountTotal,0))*IF(@isRefund, -1, 1)", !1, !1, "Item gross before charges", "grossBeforeCharges", e, "(COALESCE(@gross_total,0)+(case when @delivery_fee_with_tax>0 then COALESCE(@delivery_fee,0) else 0 end)+(case when @other_charge_with_tax>0 then COALESCE(@third_party_extra_charge,0) else 0 end)+COALESCE(@discount_total,0))*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$numeric(e, T.x28IFNULn_, !1, !1, "Bill gross before charges", "billGrossBeforeCharges", e, T.x28COALEn_, r), t.Field_Field$numeric(e, e, !1, !1, "Member Recency", "recency", e, T.MIN_EX, r), t.Field_Field$numeric(e, e, !1, !1, "Member frequency", "frequency", e, T.COUNT_, r), t.Field_Field$numeric(e, e, !1, !1, "Member monetary", "monetary", e, T.SUM__n, r), t.Field_Field$numeric(e, T.IFNULLdeWT, !1, !1, "Delivery fee with tax", M, M, T.COALESdex5f_, r), t.Field_Field$numeric(e, T.IFNULLdeWo, !1, !1, "Delivery fee without tax", x, x, T.COALESdex5fo, r), t.Field_Field$numeric(e, T.IFNULLoT, !1, !1, "Other charge with tax", R, R, T.COALESo_, r), t.Field_Field$numeric(e, T.IFNULLoo, !1, !1, "Other charge without tax", L, L, T.COALESoo, r), t.Field_Field$numeric("Bill duration in seconds from creation to completion", e, !1, !1, "Duration", "duration", e, T.EXTRAC, r), t.Field_Field$string(e, e, !1, !1, !1, "Restaurant", "restaurantName", e, T.x28selecn, r), t.Field_Field$numeric(e, e, !1, !1, "Labour hour", "labourHour", e, T.x28selecS, r), t.Field_Field$string(e, e, !1, !1, !1, "Payments", "payments", e, T.x28selecstn, r), t.Field_Field$string(e, e, !1, !1, !1, "Items", "items", e, "(select string_agg(CONCAT(flatten_items.quantity,'x ',ARRAY_TO_STRING(ARRAY[CASE WHEN flatten_items.code='' THEN NULL ELSE flatten_items.code END, flatten_items.name], ' ')), ',') from flatten_items where flatten_items.bill_id=@id and flatten_items.restaurant_id=@restaurant_id and flatten_items.layer=0 and flatten_items.status!='VOIDED')", r), t.Field_Field$string(e, e, !1, !1, !1, "Discount reasons", "discountReasons", e, T.x28selecsta, r), t.Field_Field$numeric(e, T.IFNULLdiI, !1, !1, "Discount inc tax", O, O, T.COALESdii, r), t.Field_Field$string(e, e, !1, !1, !1, "Payment Summaries", "paymentSummaries", e, T.x28selecstC, r), t.Field_Field$numeric(e, e, !1, !1, "Is new member", "isNewMember", e, "(CASE WHEN EXISTS (SELECT 1 FROM members WHERE members.id=@member_id AND members.created_at::date = @created_at::date) THEN 1 ELSE 0 END)", r), t.Field_Field$numeric(e, e, !1, !1, "Is 30 days recency", "is30DaysRecency", e, "(CASE WHEN EXISTS (SELECT 1 FROM bills WHERE bills.member_id = @member_id AND bills.status != 'VOIDED' AND bills.restaurant_id = @restaurant_id AND bills.created_at >= @created_at - INTERVAL '30 days' AND bills.created_at < @created_at) THEN 1 ELSE 0 END)", r), t.Field_Field$numeric("Bill count flag: 1 normal, -1 refund, 0 voided. Use SUM to count bills", "IF(@status = 'VOIDED', 0, IF(@isRefund, -1, 1))", !1, !1, "Table count", "tableCount", e, "(CASE WHEN @status = 'VOIDED' THEN 0 ELSE (CASE WHEN @is_refund THEN -1 ELSE 1 END) END)", r)], c.JSArray_Field);
8871
+ return t._setArrayType([t.Field_Field$string(e, e, !1, !1, !1, "ID", "id", "_id", e, r), t.Field_Field$string(e, e, !0, !1, !1, e, "docId", "_docId", e, r), t.Field_Field$timestamp(e, e, !0, !1, e, "publishedAt", "_publishedAt", e, r), t.Field_Field$timestamp(e, e, !1, !1, "Time", "createdAt", "_createdAt", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Restaurant ID", "restaurantId", "_restaurantId", e, r), t.Field_Field$string("Values: COMPLETED, DRAFT, VOIDED, REFUNDED", e, !1, !1, !1, "Status", "status", "status", e, r), t.Field_Field$string(e, e, !1, !1, !1, "No.", n, n, e, r), t.Field_Field$string("Dine-in table name/identifier", e, !1, !1, !1, "Table", "slot", "slot", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Delivery", i, i, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Refund ID", "refundFrom", "refundedFrom", e, r), t.Field_Field$bool(e, e, !1, !1, "Refund", a, a, e, r), t.Field_Field$string(e, e, !0, !1, !1, e, "refundApprovedById", "refund.approvedBy.id", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Refund approver", "refundApprovedByName", "refund.approvedBy.name", e, r), t.Field_Field$string(e, e, !0, !1, !1, e, "refundedById", "refund.by.id", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Refund user", "refundedByName", "refund.by.name", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Refund reason", "refundReason", "refund.reason", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Member ID", "memberId", "membership.id", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Member user ID", "memberUserId", "membership.userId", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Member name", "memberUserName", "membership.name", e, r), t.Field_Field$string(e, e, !0, !1, !1, "Member phone", "memberPhoneNumber", "membership.phoneNumber", e, r), t.Field_Field$timestamp(e, e, !1, !1, "Member birthday", "memberBirthday", "membership.birthday", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Remark", "remark", "remark", e, r), t.Field_Field$string("Order source. Values: FEEDME (POS), GRABFOOD, FOODPANDA, SHOPEEFOOD, etc.", e, !1, !1, !1, "Source", "source", "source", T.x28case_, r), t.Field_Field$string("Order type. Values: DINE IN, TAKEAWAY, PICKUP, DELIVERY, DRIVE THRU", e, !1, !1, !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)", r), t.Field_Field$bool(e, e, !0, !1, "Pickup", s, s, e, r), t.Field_Field$bool(e, e, !0, !1, "Is in house delivery", o, o, e, r), t.Field_Field$bool(e, e, !0, !1, "Is other delivery", l, l, e, r), t.Field_Field$bool(e, e, !0, !1, "Is takeaway", "isTakeaway", "is.takeaway", e, r), t.Field_Field$timestamp(e, e, !1, !1, "Closed at", d, d, e, r), t.Field_Field$string(e, e, !0, !1, !1, "Inclusive SST", "sstInclusive", "nettTaxes.SST.inclusive", e, r), t.Field_Field$string(e, e, !0, !1, !1, "SST before discount", "sstBeforeDiscount", "nettTaxes.SST.beforeDiscount", e, r), t.Field_Field$string(e, e, !0, !1, !1, "Inclusive SC", "serviceChargeInclusive", "nettTaxes.SERVICE_CHARGE.inclusive", e, r), t.Field_Field$string(e, e, !0, !1, !1, "SC before discount", "serviceChargeBeforeDiscount", "nettTaxes.SERVICE_CHARGE.beforeDiscount", e, r), t.Field_Field$numeric("Number of guests. Negated for refund, 0 for voided", "IF(@status = 'VOIDED', 0, IFNULL(@pax,0)*IF(@isRefund, -1, 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)", r), t.Field_Field$string(e, e, !1, !1, !1, "Integrated order ID", D, D, e, r), t.Field_Field$numeric(e, T.IFNULLi, !0, !1, "Item count", f, f, T.COALESi, r), t.Field_Field$numeric(e, "IFNULL(@taxTotal,0)*IF(@isRefund, -1, 1)", !1, !1, "Tax", p, p, T.COALEStax, r), t.Field_Field$numeric(e, T.IFNULLdiT, !1, !1, "Discount", y, y, T.COALESdit, r), t.Field_Field$numeric(e, T.IFNULLg, !1, !1, "Item gross", m, m, T.COALESg, r), t.Field_Field$numeric(e, T.x28IFNULnI, !1, !1, "Bill gross", "billGrossTotal", e, T.x28COALEnC, r), t.Field_Field$numeric(e, "IFNULL(@rounding,0)*IF(@isRefund, -1, 1)", !1, !1, "Rounding", g, g, T.COALESr, r), t.Field_Field$numeric(e, "IFNULL(@sstTotal,0)*IF(@isRefund, -1, 1)", !0, !1, "SST", "sstTotal", "nettTaxes.SST.total", T.COALESss, r), t.Field_Field$string(e, e, !0, !1, !1, "SST %", "sstPercentage", "nettTaxes.SST.percentage", e, r), t.Field_Field$numeric(e, T.IFNULLs, !1, !1, "SC", "serviceChargeTotal", "nettTaxes.SERVICE_CHARGE.total", T.COALESse, r), t.Field_Field$string(e, e, !0, !1, !1, "SC %", "serviceChargePercentage", "nettTaxes.SERVICE_CHARGE.percentage", e, r), t.Field_Field$numeric(e, T.x28IFNULo, !1, !1, "Other charge", "otherChargeTotal", "nettTaxes.OTHER_CHARGE.total", T.x28COALEo, r), t.Field_Field$numeric(e, T.x28IFNULgx2d, !1, !1, "Gross w/ takeaway", "subTotalWithoutTakeaway", e, T.x28COALEgx2d, r), t.Field_Field$numeric(e, T.IFNULLta, !1, !1, "Takeaway", h, h, T.COALEStak, r), t.Field_Field$numeric(e, T.IFNULLth, !1, !1, "Extra charge", A, A, T.COALESth, r), t.Field_Field$numeric(e, T.IFNULLde_, !1, !1, "Delivery fee", C, C, T.COALESdex2c, r), t.Field_Field$numeric(e, T.IFNULLn, !1, !1, "Nett", I, I, T.COALESn, r), t.Field_Field$numeric(e, "(IFNULL(@grossTotal,0)+(case when @deliveryFeeWithTax>0 then IFNULL(@deliveryFee,0) else 0 end)+IFNULL(case when @otherChargeWithTax>0 then IFNULL(@thirdPartyExtraCharge,0) else 0 end)+IFNULL(@discountTotal,0))*IF(@isRefund, -1, 1)", !1, !1, "Item gross before charges", "grossBeforeCharges", e, "(COALESCE(@gross_total,0)+(case when @delivery_fee_with_tax>0 then COALESCE(@delivery_fee,0) else 0 end)+(case when @other_charge_with_tax>0 then COALESCE(@third_party_extra_charge,0) else 0 end)+COALESCE(@discount_total,0))*CASE WHEN @is_refund THEN -1 ELSE 1 END", r), t.Field_Field$numeric(e, T.x28IFNULn_, !1, !1, "Bill gross before charges", "billGrossBeforeCharges", e, T.x28COALEn_, r), t.Field_Field$numeric(e, e, !1, !1, "Member Recency", "recency", e, T.MIN_EX, r), t.Field_Field$numeric(e, e, !1, !1, "Member frequency", "frequency", e, T.COUNT_, r), t.Field_Field$numeric(e, e, !1, !1, "Member monetary", "monetary", e, T.SUM__n, r), t.Field_Field$numeric(e, T.IFNULLdeWT, !1, !1, "Delivery fee with tax", M, M, T.COALESdex5f_, r), t.Field_Field$numeric(e, T.IFNULLdeWo, !1, !1, "Delivery fee without tax", x, x, T.COALESdex5fo, r), t.Field_Field$numeric(e, T.IFNULLoT, !1, !1, "Other charge with tax", R, R, T.COALESo_, r), t.Field_Field$numeric(e, T.IFNULLoo, !1, !1, "Other charge without tax", L, L, T.COALESoo, r), t.Field_Field$numeric("Bill duration in seconds from creation to completion", e, !1, !1, "Duration", "duration", e, T.EXTRAC, r), t.Field_Field$string(e, e, !1, !1, !1, "Restaurant", "restaurantName", e, T.x28selecn, r), t.Field_Field$numeric(e, e, !1, !1, "Labour hour", "labourHour", e, T.x28selecS, r), t.Field_Field$string(e, e, !1, !1, !1, "Payments", "payments", e, T.x28selecstn, r), t.Field_Field$string(e, e, !1, !1, !1, "Items", "items", e, "(select string_agg(CONCAT(flatten_items.quantity,'x ',ARRAY_TO_STRING(ARRAY[CASE WHEN flatten_items.code='' THEN NULL ELSE flatten_items.code END, flatten_items.name], ' ')), ',') from flatten_items where flatten_items.bill_id=@id and flatten_items.restaurant_id=@restaurant_id and flatten_items.layer=0 and flatten_items.status!='VOIDED')", r), t.Field_Field$string(e, e, !1, !1, !1, "Discount reasons", "discountReasons", e, T.x28selecsta, r), t.Field_Field$numeric(e, T.IFNULLdiI, !1, !1, "Discount inc tax", O, O, T.COALESdii, r), t.Field_Field$string(e, e, !1, !1, !1, "Payment Summaries", "paymentSummaries", e, T.x28selecstC, r), t.Field_Field$numeric(e, e, !1, !1, "Is new member", "isNewMember", e, "(CASE WHEN EXISTS (SELECT 1 FROM members WHERE members.id=@member_id AND members.created_at::date = @created_at::date) THEN 1 ELSE 0 END)", r), t.Field_Field$numeric(e, e, !1, !1, "Is 30 days recency", "is30DaysRecency", e, "(CASE WHEN EXISTS (SELECT 1 FROM bills WHERE bills.member_id = @member_id AND bills.status != 'VOIDED' AND bills.restaurant_id = @restaurant_id AND bills.created_at >= @created_at - INTERVAL '30 days' AND bills.created_at < @created_at) THEN 1 ELSE 0 END)", r), t.Field_Field$numeric("Bill count flag: 1 normal, -1 refund, 0 voided. Use SUM to count bills", "IF(@status = 'VOIDED', 0, IF(@isRefund, -1, 1))", !1, !1, "Table count", "tableCount", e, "(CASE WHEN @status = 'VOIDED' THEN 0 ELSE (CASE WHEN @is_refund THEN -1 ELSE 1 END) END)", r), t.Field_Field$numeric("Member count flag: 1 normal, -1 refund, 0 voided. Use SUM to count members", "IF((@status = 'VOIDED' OR @memberId is null), 0, IF(@isRefund, -1, 1))", !1, !1, "Member count", "memberCount", e, "(CASE WHEN (@status = 'VOIDED' OR @member_id is null) THEN 0 ELSE (CASE WHEN @is_refund THEN -1 ELSE 1 END) END)", r)], c.JSArray_Field);
8872
8872
  },
8873
8873
  $signature: 0
8874
8874
  }, t.billSchema_closure0.prototype = {
@@ -20362,7 +20362,7 @@ const $t = "mf-reportreport-store", re = Y0($t, () => {
20362
20362
  };
20363
20363
  });
20364
20364
  var Se = /* @__PURE__ */ ((E) => (E.generating = "GENERATING", E.completed = "COMPLETED", E.failed = "FAILED", E.canceled = "CANCELLED", E))(Se || {});
20365
- const yt = "/assets/formatChartData.worker-CKB5if5c.js", W0 = /* @__PURE__ */ new Map();
20365
+ const yt = "/assets/formatChartData.worker-DR8QpYfd.js", W0 = /* @__PURE__ */ new Map();
20366
20366
  function oe(E) {
20367
20367
  return new Worker(E, { type: "module" });
20368
20368
  }
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as A, resolveComponent as S, createBlock as p, openBlock as y, withCtx as T, createCommentVNode as R, createElementVNode as M, toDisplayString as j, renderSlot as B, mergeModels as k, useModel as b, ref as C, watch as x, createElementBlock as U, unref as f, createVNode as O } from "vue";
2
- import { d as r, a as W, _ as q, C as G } from "./app-DlT1RNrY.js";
2
+ import { d as r, a as W, _ as q, C as G } from "./app-CSnuYvs5.js";
3
3
  import { detectLocale as E } from "@feedmepos/mf-common";
4
4
  import { u as H } from "./vue-i18n-DVWuTfed.js";
5
5
  import { storeToRefs as K } from "pinia";
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as u, computed as p, resolveComponent as f, 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-C5bwFbZj.js";
2
+ import { _ as v } from "./NavigationTab.vue_vue_type_script_setup_true_lang-BtsLlMjx.js";
3
3
  import { useBreakpoints as b } from "@feedmepos/ui-library";
4
4
  import { storeToRefs as C } from "pinia";
5
5
  import { u as q, a as w } from "./vue-i18n-DVWuTfed.js";