@feedmepos/mf-report 5.21.45 → 5.21.46
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-DUh6U-OB.js +272 -0
- package/dist/{BaseDialog.vue_vue_type_script_setup_true_lang-CcZBwZrG.js → BaseDialog.vue_vue_type_script_setup_true_lang-yBoJyNC8.js} +35 -6
- package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-FajTQaEF.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-tB8numVw.js} +2 -2
- package/dist/{Default.vue_vue_type_script_setup_true_lang-D8Anmn3U.js → Default.vue_vue_type_script_setup_true_lang-Cfl5Ct4b.js} +2 -2
- package/dist/{FilterSelector.vue_vue_type_script_setup_true_lang-C3dnlKD1.js → FilterSelector.vue_vue_type_script_setup_true_lang-DuhjAzQP.js} +1000 -988
- package/dist/{InsightView-BcaNLAio.js → InsightView-DkIcQpCD.js} +6 -6
- package/dist/{Integration-B2oUigBV.js → Integration-C0f0Q2os.js} +3 -3
- package/dist/{Integrations-BXs7ebr_.js → Integrations-BM_vRj0F.js} +3 -3
- package/dist/{Layout-B7UzdpMO.js → Layout-C4YVePzi.js} +1 -1
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-CxcGWRnH.js → MenuTab.vue_vue_type_script_setup_true_lang-a72Tflwl.js} +5 -5
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-DRC8oo7m.js → NavigationTab.vue_vue_type_script_setup_true_lang-5oGeza_s.js} +5 -5
- package/dist/{NoData.vue_vue_type_script_setup_true_lang-COEmI1sC.js → NoData.vue_vue_type_script_setup_true_lang-DYFzIaeX.js} +1 -1
- package/dist/{OverviewView-CylqH3pr.js → OverviewView-AKRzXwKb.js} +5 -5
- package/dist/{Report-YSloja2n.js → Report-aKG6wWUi.js} +4 -4
- package/dist/{ReportEditor-D4uSvRt1.js → ReportEditor-ZRBQHo6K.js} +6 -6
- package/dist/{ReportView-Dzd79Cmz.js → ReportView-cWqrG_Nd.js} +8 -8
- package/dist/{SelectComponent.vue_vue_type_script_setup_true_lang-Bx_tLA09.js → SelectComponent.vue_vue_type_script_setup_true_lang-J0guqNmX.js} +1 -1
- package/dist/{Setting-BFXBp6DS.js → Setting-BXEPHSGB.js} +5 -5
- package/dist/TileEditor-Bqhu78EZ.js +2919 -0
- package/dist/{TransitionFade-CdTx6vpZ.js → TransitionFade-CXHZsIPF.js} +6 -6
- package/dist/{app-Doxhqiyk.js → app-Fb6OY58U.js} +74 -74
- package/dist/app.js +1 -1
- package/dist/assets/{formatChartData.worker-Bf22-3_a.js → formatChartData.worker-DAwFx8Qz.js} +31 -2
- package/dist/assets/{processTableData.worker-GbyPQNAF.js → processTableData.worker-CGM71S-g.js} +31 -2
- package/dist/{vue-i18n-DViZeYne.js → vue-i18n-DLsuRxx8.js} +1 -1
- package/package.json +1 -1
- package/dist/App-YB3K2Pla.js +0 -270
- package/dist/TileEditor-DcuHmPe3.js +0 -2899
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
import { defineComponent as se, resolveComponent as Q, createBlock as ie, openBlock as R, unref as d, isRef as Oe, withCtx as U, createElementVNode as M, createVNode as V, toDisplayString as ee, createTextVNode as Ce, onMounted as ue, watch as q, ref as $, computed as te, onBeforeMount as we, onBeforeUnmount as Ee, createElementBlock as j, Fragment as ke } from "vue";
|
|
2
|
+
import { detectLocale as B, useCoreStore as z } from "@feedmepos/mf-common";
|
|
3
|
+
import { u as Ae, a as $e, b as ne, c as Be, d as Ne, e as Te, f as Fe, s as xe } from "./vue-i18n-DLsuRxx8.js";
|
|
4
|
+
import { storeToRefs as b } from "pinia";
|
|
5
|
+
import { u as re, a as Je, b as Ue } from "./BaseDialog.vue_vue_type_script_setup_true_lang-yBoJyNC8.js";
|
|
6
|
+
import { u as je, _ as ze } from "./NavigationTab.vue_vue_type_script_setup_true_lang-5oGeza_s.js";
|
|
7
|
+
import { u as oe } from "./message-dialog-UoMWOnil.js";
|
|
8
|
+
import { d as u } from "./app-Fb6OY58U.js";
|
|
9
|
+
import { useRoute as Qe, useRouter as Ve } from "vue-router";
|
|
10
|
+
const Pe = { class: "fm-typo-en-body-md-400 text-ellipsis overflow-hidden" }, We = /* @__PURE__ */ se({
|
|
11
|
+
__name: "Dialog",
|
|
12
|
+
setup(L) {
|
|
13
|
+
const { t: a } = Ae(), m = oe(), { isOpened: l, message: S, title: D } = b(oe());
|
|
14
|
+
return (f, g) => {
|
|
15
|
+
const _ = Q("FmButton"), N = Q("FmDialog");
|
|
16
|
+
return R(), ie(N, {
|
|
17
|
+
modelValue: d(l),
|
|
18
|
+
"onUpdate:modelValue": g[0] || (g[0] = (T) => Oe(l) ? l.value = T : null),
|
|
19
|
+
overlay: "",
|
|
20
|
+
"close-button": !1
|
|
21
|
+
}, {
|
|
22
|
+
"dialog-header": U(() => [
|
|
23
|
+
Ce(ee(d(D)), 1)
|
|
24
|
+
]),
|
|
25
|
+
default: U(() => [
|
|
26
|
+
M("p", Pe, ee(d(S)), 1)
|
|
27
|
+
]),
|
|
28
|
+
"dialog-footer": U(() => [
|
|
29
|
+
g[1] || (g[1] = M("div", { class: "grow" }, null, -1)),
|
|
30
|
+
V(_, {
|
|
31
|
+
label: d(a)("report.common.cancel"),
|
|
32
|
+
variant: "tertiary",
|
|
33
|
+
onClick: d(m).dismiss
|
|
34
|
+
}, null, 8, ["label", "onClick"]),
|
|
35
|
+
V(_, {
|
|
36
|
+
label: d(a)("report.common.confirm"),
|
|
37
|
+
onClick: d(m).confirm
|
|
38
|
+
}, null, 8, ["label", "onClick"])
|
|
39
|
+
]),
|
|
40
|
+
_: 1
|
|
41
|
+
}, 8, ["modelValue"]);
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
}), ae = $(B());
|
|
45
|
+
function Ge() {
|
|
46
|
+
const L = (a) => {
|
|
47
|
+
switch (ae.value = a, a) {
|
|
48
|
+
case "zh-CN":
|
|
49
|
+
u.locale("zh-cn");
|
|
50
|
+
break;
|
|
51
|
+
default:
|
|
52
|
+
u.locale("en");
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
return ue(() => {
|
|
57
|
+
L(B());
|
|
58
|
+
}), q(() => B(), L, { deep: !0, immediate: !0 }), {
|
|
59
|
+
currentLocale: ae
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
u.locale(B() === "zh-CN" ? "zh-cn" : "en");
|
|
63
|
+
const He = ["src"], Ke = ["src"], ut = /* @__PURE__ */ se({
|
|
64
|
+
__name: "App",
|
|
65
|
+
setup(L) {
|
|
66
|
+
const { businessId: a, token: m, country: l } = b($e()), { sessionUser: S, currentBusiness: D, currentCountry: f, registerSidebarComponent: g } = z(), { getRestaurantAndWarehouse: _, getBusinessSetting: N, beginBusinessLoad: T, completeBusinessLoad: ce } = ne(), { getFeatureFlags: le } = Be(), { version: p } = b(re()), { getSettings: de } = Ne(), { promptLoader: fe } = Te(), e = Qe(), P = Ve(), I = Je(), W = je(), s = ne(), me = re(), { suppressReportRouteSync: O } = b(me), { getReports: pe, getOverviewReport: ge, getReportConfig: G, currentReportId: H } = I, { currentReportId: ye, reports: ve } = b(I), { getSchema: Se } = Ue(), { fetchSchedules: De } = W, { init: Ie } = Fe(), F = $("v5"), C = $(!1), w = $(!0), he = te(() => `https://portal-v1.feedme.cc/b/${a.value}/report/CLOSE_UP?showHeader=false&country=${l.value.toUpperCase()}&menuOption=business-report&token=${m.value}&v2=true&reportV5Button=true`), Re = te(() => `https://report-v4.feedme.cc?businessId=${a.value}&country=${l.value}&token=${m.value}&reportV3Button=true`);
|
|
67
|
+
q(
|
|
68
|
+
[() => D.value, () => S.value, () => f.value],
|
|
69
|
+
() => {
|
|
70
|
+
var n, r;
|
|
71
|
+
const t = ((n = D.value) == null ? void 0 : n.id) ?? "";
|
|
72
|
+
if (D.value && S.value && f.value) {
|
|
73
|
+
xe(f.value), a.value !== t && (a.value = t);
|
|
74
|
+
let i = !1;
|
|
75
|
+
l.value !== f.value && (i = !0), m.value = ((r = S.value) == null ? void 0 : r.token) ?? "", l.value = f.value ?? "";
|
|
76
|
+
const c = i && !w.value;
|
|
77
|
+
console.log(`route.query.businessId!==businessId.value: ${e.query.businessId !== a.value}`, `isCountryChanged: ${i}`, `isInitialBusinessWatch.value: ${w.value}`), e.query.businessId !== a.value && (console.log("[debug 1 detail]: country.value: ", l.value, "currentCountry.value: ", f.value), console.log("[debug 1 detail]: route.query.businessId: ", e.query.businessId, "businessId.value: ", a.value), P.replace({
|
|
78
|
+
name: e.name,
|
|
79
|
+
params: e.params,
|
|
80
|
+
query: {
|
|
81
|
+
...e.query,
|
|
82
|
+
businessId: a.value,
|
|
83
|
+
country: f.value,
|
|
84
|
+
isAllLocation: c ? "true" : e.query.isAllLocation,
|
|
85
|
+
locationIds: c ? void 0 : e.query.locationIds
|
|
86
|
+
}
|
|
87
|
+
}));
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
{ immediate: !0 }
|
|
91
|
+
);
|
|
92
|
+
function K(t) {
|
|
93
|
+
if (typeof t.data == "string")
|
|
94
|
+
try {
|
|
95
|
+
const n = JSON.parse(t.data);
|
|
96
|
+
(n == null ? void 0 : n.token) !== "" && (n == null ? void 0 : n.token) !== void 0 && (m.value = n.token);
|
|
97
|
+
} catch (n) {
|
|
98
|
+
console.error(n);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
function X(t) {
|
|
102
|
+
if (typeof t.data == "string")
|
|
103
|
+
try {
|
|
104
|
+
const n = JSON.parse(t.data);
|
|
105
|
+
(n == null ? void 0 : n.v5) === !0 ? p.value = F.value : (n == null ? void 0 : n.v3) === !0 && (p.value = "v3");
|
|
106
|
+
} catch (n) {
|
|
107
|
+
console.error(n);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
q(p, () => {
|
|
111
|
+
["v3", "v4"].includes(p.value) ? z().hideSidebarToggle(!0) : z().hideSidebarToggle(!1);
|
|
112
|
+
}), we(() => {
|
|
113
|
+
g(ze);
|
|
114
|
+
}), ue(() => {
|
|
115
|
+
console.log("5.21.46", !0), window.addEventListener("message", K), window.addEventListener("message", X);
|
|
116
|
+
}), Ee(() => {
|
|
117
|
+
window.removeEventListener("message", K), window.removeEventListener("message", X), I.$dispose(), W.$dispose();
|
|
118
|
+
});
|
|
119
|
+
function qe(t) {
|
|
120
|
+
try {
|
|
121
|
+
return decodeURIComponent(t);
|
|
122
|
+
} catch {
|
|
123
|
+
return t;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
function E(t) {
|
|
127
|
+
if (typeof t != "string" || t.length === 0) return;
|
|
128
|
+
const n = t.includes("%") ? [t, qe(t)] : [t];
|
|
129
|
+
for (const r of n)
|
|
130
|
+
try {
|
|
131
|
+
const i = JSON.parse(r);
|
|
132
|
+
if (typeof i == "string")
|
|
133
|
+
try {
|
|
134
|
+
return JSON.parse(i);
|
|
135
|
+
} catch {
|
|
136
|
+
return i;
|
|
137
|
+
}
|
|
138
|
+
return i;
|
|
139
|
+
} catch {
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
function Y(t) {
|
|
143
|
+
if (!t || typeof t != "object") return !1;
|
|
144
|
+
const n = t;
|
|
145
|
+
return typeof n.hour == "number" && typeof n.minute == "number";
|
|
146
|
+
}
|
|
147
|
+
function be() {
|
|
148
|
+
const t = e.query.startDate ? u(e.query.startDate).startOf("day").toISOString() : void 0, n = e.query.endDate ? u(e.query.endDate).endOf("day").toISOString() : void 0, r = typeof e.query.timeStart == "string", i = typeof e.query.timeEnd == "string", c = E(e.query.timeStart), h = E(e.query.timeEnd), k = Y(c) ? c : null, A = Y(h) ? h : null, x = e.query.compareStartDate ? u(e.query.compareStartDate).startOf("day").toISOString() : void 0, J = e.query.compareEndDate ? u(e.query.compareEndDate).endOf("day").toISOString() : void 0, Z = e.query.isAllLocation === "true" || e.query.isAllLocation === void 0;
|
|
149
|
+
let y = [];
|
|
150
|
+
if (Z)
|
|
151
|
+
y = s.selectedLocationIds;
|
|
152
|
+
else {
|
|
153
|
+
const o = E(e.query.locationIds);
|
|
154
|
+
y = Array.isArray(o) ? o : [];
|
|
155
|
+
}
|
|
156
|
+
let v = e.query.reportId || H;
|
|
157
|
+
if (ve.value.find((o) => o.id === v) || (v = H), v && v !== I.currentReportId && I.updateCurrentReportId(v), t || n) {
|
|
158
|
+
const o = s.dateRange;
|
|
159
|
+
(o.startDate !== t || o.endDate !== n) && s.setDateRange({ startDate: t, endDate: n });
|
|
160
|
+
}
|
|
161
|
+
if (r || i) {
|
|
162
|
+
const o = s.timeRange;
|
|
163
|
+
(o.start !== k || o.end !== A) && s.setTimeRange({ start: k, end: A });
|
|
164
|
+
}
|
|
165
|
+
if (x || J) {
|
|
166
|
+
const o = s.compareDateRange;
|
|
167
|
+
(o.startDate !== x || o.endDate !== J) && s.setCompareDateRange({
|
|
168
|
+
startDate: x,
|
|
169
|
+
endDate: J
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
if (!Z && Array.isArray(y)) {
|
|
173
|
+
const o = s.selectedLocationIds;
|
|
174
|
+
o.length === y.length && o.every((Le, _e) => Le === y[_e]) || s.setSelectedLocationIds(y);
|
|
175
|
+
}
|
|
176
|
+
return {
|
|
177
|
+
// TODO: this returned value can used for getBusinessSetting
|
|
178
|
+
reportId: v,
|
|
179
|
+
startDate: e.query.startDate,
|
|
180
|
+
endDate: e.query.endDate,
|
|
181
|
+
timeStart: e.query.timeStart,
|
|
182
|
+
timeEnd: e.query.timeEnd,
|
|
183
|
+
compareStartDate: e.query.compareStartDate,
|
|
184
|
+
compareEndDate: e.query.compareEndDate,
|
|
185
|
+
locationIds: typeof e.query.locationIds == "string" ? e.query.locationIds : void 0,
|
|
186
|
+
isAllLocation: e.query.isAllLocation
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
return q(
|
|
190
|
+
() => a.value,
|
|
191
|
+
async (t) => {
|
|
192
|
+
t !== "" && (C.value = !1, T(t), O.value !== void 0 && (O.value = !0), await fe(async () => {
|
|
193
|
+
await Ie({
|
|
194
|
+
apiKey: "6GhcttsJ9Rj9cTevcdrpin",
|
|
195
|
+
url: "https://flag.feedme.farm/api/v1/",
|
|
196
|
+
enableAnalytics: !1,
|
|
197
|
+
cacheFlags: !1
|
|
198
|
+
});
|
|
199
|
+
const n = await G();
|
|
200
|
+
F.value = n.version, p.value = F.value, await Promise.all([
|
|
201
|
+
le(),
|
|
202
|
+
G(),
|
|
203
|
+
ge(),
|
|
204
|
+
pe(),
|
|
205
|
+
Se(),
|
|
206
|
+
De(),
|
|
207
|
+
_(
|
|
208
|
+
(() => {
|
|
209
|
+
const r = E(e.query.locationIds);
|
|
210
|
+
return Array.isArray(r) ? r : void 0;
|
|
211
|
+
})()
|
|
212
|
+
),
|
|
213
|
+
de()
|
|
214
|
+
]), await N(), be(), ce(t);
|
|
215
|
+
}), C.value = !0, w.value && (w.value = !1));
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
immediate: !0
|
|
219
|
+
}
|
|
220
|
+
), q(
|
|
221
|
+
() => (C.value, {
|
|
222
|
+
reportId: ye.value,
|
|
223
|
+
selectedLocationIds: s.selectedLocationIds,
|
|
224
|
+
dateRange: s.dateRange,
|
|
225
|
+
timeRange: s.timeRange,
|
|
226
|
+
compareDateRange: s.compareDateRange
|
|
227
|
+
}),
|
|
228
|
+
(t) => {
|
|
229
|
+
if (!C.value || !t.reportId) return;
|
|
230
|
+
if (O.value) {
|
|
231
|
+
O.value = !1;
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
const n = t.selectedLocationIds, r = t.dateRange, i = t.timeRange, c = t.compareDateRange, h = {
|
|
235
|
+
...e.query,
|
|
236
|
+
reportId: t.reportId,
|
|
237
|
+
startDate: r.startDate ? u(r.startDate).startOf("day").toISOString() : void 0,
|
|
238
|
+
endDate: r.endDate ? u(r.endDate).endOf("day").toISOString() : void 0,
|
|
239
|
+
compareStartDate: c.startDate ? u(c.startDate).startOf("day").toISOString() : void 0,
|
|
240
|
+
compareEndDate: c.endDate ? u(c.endDate).endOf("day").toISOString() : void 0,
|
|
241
|
+
timeStart: i.start ? JSON.stringify(i.start) : void 0,
|
|
242
|
+
timeEnd: i.end ? JSON.stringify(i.end) : void 0,
|
|
243
|
+
locationIds: n.length === s.locations.length ? void 0 : n.length > 0 ? JSON.stringify(n) : void 0,
|
|
244
|
+
isAllLocation: String(n.length === s.locations.length)
|
|
245
|
+
}, k = JSON.stringify(e.query), A = JSON.stringify(h);
|
|
246
|
+
k !== A && P.replace({
|
|
247
|
+
name: e.name,
|
|
248
|
+
params: e.params,
|
|
249
|
+
query: h
|
|
250
|
+
});
|
|
251
|
+
},
|
|
252
|
+
{ deep: !0 }
|
|
253
|
+
), Ge(), (t, n) => {
|
|
254
|
+
const r = Q("router-view");
|
|
255
|
+
return R(), j(ke, null, [
|
|
256
|
+
V(We),
|
|
257
|
+
d(p) === "v3" ? (R(), j("iframe", {
|
|
258
|
+
key: 0,
|
|
259
|
+
class: "bg-white h-full w-full",
|
|
260
|
+
src: he.value
|
|
261
|
+
}, null, 8, He)) : d(p) === "v4" ? (R(), j("iframe", {
|
|
262
|
+
key: 1,
|
|
263
|
+
class: "bg-white h-full w-full",
|
|
264
|
+
src: Re.value
|
|
265
|
+
}, null, 8, Ke)) : (R(), ie(r, { key: 2 }))
|
|
266
|
+
], 64);
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
export {
|
|
271
|
+
ut as default
|
|
272
|
+
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { a as m0, F as y0, l as g0, b as k0, c as Ce, k as be, d as Fe, r as K0, u as Ie } from "./vue-i18n-
|
|
1
|
+
import { a as m0, F as y0, l as g0, b as k0, c as Ce, k as be, d as Fe, r as K0, u as Ie } from "./vue-i18n-DLsuRxx8.js";
|
|
2
2
|
import { storeToRefs as p0, defineStore as B0 } from "pinia";
|
|
3
3
|
import { ref as s0, computed as C0, watch as U0, h as Me, defineComponent as _e, mergeModels as N0, useModel as z0, resolveComponent as A0, createElementBlock as V0, openBlock as P0, createVNode as h0, withCtx as b0, createElementVNode as E0, createCommentVNode as Re, Fragment as re, renderList as xe, createBlock as De, createTextVNode as de, withDirectives as Le, toDisplayString as T0, unref as $0, vShow as Oe, renderSlot as we } from "vue";
|
|
4
4
|
import { useSnackbar as ce, components as ve } from "@feedmepos/ui-library";
|
|
5
|
-
import { d as S0 } from "./app-
|
|
5
|
+
import { d as S0 } from "./app-Fb6OY58U.js";
|
|
6
6
|
import { useRouter as Pe } from "vue-router";
|
|
7
7
|
import { detectLocale as F0 } from "@feedmepos/mf-common";
|
|
8
|
-
import { c as Be, a as Je } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-
|
|
8
|
+
import { c as Be, a as Je } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-tB8numVw.js";
|
|
9
9
|
function pe(T) {
|
|
10
10
|
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.');
|
|
11
11
|
}
|
|
@@ -8816,7 +8816,7 @@ Arguments: [` + D + "]";
|
|
|
8816
8816
|
}, t.closingDraftSchema_closure.prototype = {
|
|
8817
8817
|
call$1(r) {
|
|
8818
8818
|
var e = null, n = "locationId", i = "closingId", a = "closingAdjustmentId", s = "approveRemark", o = "effectiveAt", l = "approvedAt", D = "updatedAt";
|
|
8819
|
-
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$string(e, e, !1, !1, !1, "Restaurant ID", "restaurantId", "_restaurantId", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Warehouse ID", "warehouseId", "_warehouseId", e, r), t.Field_Field$timestamp(e, e, !1, !1, "Time", "createdAt", "_createdAt", e, r), t.Field_Field$timestamp(e, e, !0, !1, e, "publishedAt", "_publishedAt", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Location ID", n, n, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Closing ID", i, i, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Adjustment ID", a, a, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Remark", "remark", "remark", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Approved remark", s, s, e, r), t.Field_Field$timestamp(e, e, !1, !1, "Effective time", o, o, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Status", "status", "status", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Create user", "createdByName", "createdBy.name", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Create user ID", "createdById", "createdBy.id", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Approve user", "approvedByName", "approvedBy.name", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Approve user ID", "approvedById", "approvedBy.id", e, r), t.Field_Field$timestamp(e, e, !1, !1, "Approve time", l, l, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Update user", "updatedByName", "updatedBy.name", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Update user ID", "updatedById", "updatedBy.id", e, r), t.Field_Field$timestamp(e, e, !1, !1, "Update time", D, D, e, r)], $.JSArray_Field);
|
|
8819
|
+
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$string(e, e, !1, !1, !1, "Restaurant ID", "restaurantId", "_restaurantId", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Warehouse ID", "warehouseId", "_warehouseId", e, r), t.Field_Field$timestamp(e, e, !1, !1, "Time", "createdAt", "_createdAt", e, r), t.Field_Field$timestamp(e, e, !0, !1, e, "publishedAt", "_publishedAt", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Location ID", n, n, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Closing ID", i, i, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Adjustment ID", a, a, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Remark", "remark", "remark", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Approved remark", s, s, e, r), t.Field_Field$timestamp(e, e, !1, !1, "Effective time", o, o, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Status", "status", "status", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Create user", "createdByName", "createdBy.name", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Create user ID", "createdById", "createdBy.id", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Approve user", "approvedByName", "approvedBy.name", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Approve user ID", "approvedById", "approvedBy.id", e, r), t.Field_Field$timestamp(e, e, !1, !1, "Approve time", l, l, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Update user", "updatedByName", "updatedBy.name", e, r), t.Field_Field$string(e, e, !1, !1, !1, "Update user ID", "updatedById", "updatedBy.id", e, r), t.Field_Field$timestamp(e, e, !1, !1, "Update time", D, D, e, r), t.Field_Field$string(e, e, !1, !1, !1, "Formatted ID", "formattedId", e, e, r)], $.JSArray_Field);
|
|
8820
8820
|
},
|
|
8821
8821
|
$signature: 0
|
|
8822
8822
|
}, t.closingDraftSchema_closure0.prototype = {
|
|
@@ -10651,7 +10651,36 @@ then EXTRACT(EPOCH FROM COALESCE(timesheets.ended_at,!end)-(timesheets.created_a
|
|
|
10651
10651
|
return t.Schema_Schema$build("sales", t._setArrayType(["charge", "service charge", "tax", "gst", "sst", "fee"], l), 2, d, a, new t.chargeSchema_closure(), _.List_empty0, D, 900, !1, !0, !1, !1, !1, new t.chargeSchema_closure0(), "Charge", "charges", "charge", _.SCHEMA_NAME_12, i, "couchdb_bill", s, o);
|
|
10652
10652
|
}), e(S, "closingDraftSchema", "$get$closingDraftSchema", () => {
|
|
10653
10653
|
var i = null, a = "createdAt", s = t.Source_Source$couchdb(i, "closingDraft"), o = t.TopLevelFilters$(t._setArrayType([t.Permission_Permission$restaurant("restaurantId"), t.Permission_Permission$warehouse("warehouseId")], $.JSArray_Permission), a), l = $.JSArray_String, D = t._setArrayType([t.Index$(t._setArrayType(["id"], l), i, i), t.Index$(t._setArrayType(["doc_id"], l), i, i), t.Index$(t._setArrayType(["location_id", "created_at"], l), "idx_closing_draft_select_index", i), t.Index$(t._setArrayType(["published_at"], l), i, i), t.Index$(t._setArrayType(["closing_adjustment_id"], l), i, i)], $.JSArray_Index);
|
|
10654
|
-
return t.Schema_Schema$build(i, _.List_empty, 3, t._setArrayType(["restaurantId"], l),
|
|
10654
|
+
return t.Schema_Schema$build(i, _.List_empty, 3, t._setArrayType(["restaurantId"], l), `select *
|
|
10655
|
+
from (
|
|
10656
|
+
select
|
|
10657
|
+
*,
|
|
10658
|
+
to_char(
|
|
10659
|
+
(
|
|
10660
|
+
substring(id from 'closingDraft_([0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9:.]+Z)')::timestamptz
|
|
10661
|
+
at time zone @TIMEZONE
|
|
10662
|
+
)::date,
|
|
10663
|
+
'YYYYMMDD'
|
|
10664
|
+
)
|
|
10665
|
+
|| '-'
|
|
10666
|
+
|| lpad(
|
|
10667
|
+
row_number() over (
|
|
10668
|
+
partition by
|
|
10669
|
+
location_id,
|
|
10670
|
+
(
|
|
10671
|
+
substring(id from 'closingDraft_([0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9:.]+Z)')::timestamptz
|
|
10672
|
+
at time zone @TIMEZONE
|
|
10673
|
+
)::date
|
|
10674
|
+
order by
|
|
10675
|
+
substring(id from 'closingDraft_([0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9:.]+Z)')::timestamptz,
|
|
10676
|
+
id
|
|
10677
|
+
)::text,
|
|
10678
|
+
4,
|
|
10679
|
+
'0'
|
|
10680
|
+
) as formatted_id
|
|
10681
|
+
from closing_drafts
|
|
10682
|
+
) t
|
|
10683
|
+
`, new t.closingDraftSchema_closure(), _.List_empty0, D, i, !0, !0, !1, !1, !1, new t.closingDraftSchema_closure0(), "Closing draft", "closing_drafts", "closing_draft", _.SCHEMA_NAME_25, a, "couchdb_closing_draft", s, o);
|
|
10655
10684
|
}), e(S, "closingDraftSkuSchema", "$get$closingDraftSkuSchema", () => {
|
|
10656
10685
|
var i = "createdAt", a = null, s = t.Source_Source$couchdb("skus", "closingDraft"), o = t.TopLevelFilters$(t._setArrayType([t.Permission_Permission$restaurant("restaurantId"), t.Permission_Permission$warehouse("warehouseId")], $.JSArray_Permission), i), l = $.JSArray_String, D = t._setArrayType([t.Index$(t._setArrayType(["id"], l), a, a), t.Index$(t._setArrayType(["doc_id"], l), a, a), t.Index$(t._setArrayType(["published_at"], l), a, a), t.Index$(t._setArrayType(["location_id", "created_at"], l), "idx_cds_select_index", a), t.Index$(t._setArrayType(["closing_adjustment_id", "sku_id"], l), "idx_cds_closing_sku_index", a)], $.JSArray_Index);
|
|
10657
10686
|
return t.Schema_Schema$build(a, _.List_empty, 3, t._setArrayType(["restaurantId"], l), a, new t.closingDraftSkuSchema_closure(), _.List_empty0, D, a, !0, !0, !1, !0, !0, new t.closingDraftSkuSchema_closure0(), "Closing draft sku", "closing_draft_skus", "closing_draft_sku", _.SCHEMA_NAME_26, i, "couchdb_closing_draft", s, o);
|
|
@@ -19746,7 +19775,7 @@ const v0 = {
|
|
|
19746
19775
|
};
|
|
19747
19776
|
});
|
|
19748
19777
|
var me = /* @__PURE__ */ ((T) => (T.generating = "GENERATING", T.completed = "COMPLETED", T.failed = "FAILED", T.canceled = "CANCELLED", T))(me || {});
|
|
19749
|
-
const $t = "/assets/formatChartData.worker-
|
|
19778
|
+
const $t = "/assets/formatChartData.worker-DAwFx8Qz.js", Y0 = /* @__PURE__ */ new Map();
|
|
19750
19779
|
function ue(T) {
|
|
19751
19780
|
return new Worker(T, { type: "module" });
|
|
19752
19781
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
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 O, createElementBlock as U, unref as f, createVNode as x } from "vue";
|
|
2
|
-
import { u as W, b as q, O as G, C as H } from "./vue-i18n-
|
|
3
|
-
import { d as r } from "./app-
|
|
2
|
+
import { u as W, b as q, O as G, C as H } from "./vue-i18n-DLsuRxx8.js";
|
|
3
|
+
import { d as r } from "./app-Fb6OY58U.js";
|
|
4
4
|
import { detectLocale as E } from "@feedmepos/mf-common";
|
|
5
5
|
import { storeToRefs as K } from "pinia";
|
|
6
6
|
var v = /* @__PURE__ */ ((e) => (e.Year = "YEAR", e.Month = "MONTH", e.Week = "WEEK", e.Day = "DAY", e))(v || {}), L = /* @__PURE__ */ ((e) => (e.Yesterday = "YESTERDAY", e.Today = "TODAY", e))(L || {});
|
|
@@ -1,8 +1,8 @@
|
|
|
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-
|
|
2
|
+
import { _ as v } from "./NavigationTab.vue_vue_type_script_setup_true_lang-5oGeza_s.js";
|
|
3
3
|
import { useBreakpoints as b } from "@feedmepos/ui-library";
|
|
4
4
|
import { storeToRefs as C } from "pinia";
|
|
5
|
-
import { u as q, e as w } from "./vue-i18n-
|
|
5
|
+
import { u as q, e as w } from "./vue-i18n-DLsuRxx8.js";
|
|
6
6
|
import { useRoute as B } from "vue-router";
|
|
7
7
|
const $ = {
|
|
8
8
|
key: 1,
|