@feedmepos/mf-menu 0.31.57-prod → 0.31.58-prod
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-BWnYrgSU.js → App-CEwyPSKB.js} +8 -8
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-Cablfr4b.js → ApplyProduct.vue_vue_type_script_setup_true_lang-B1PaP0os.js} +3 -3
- package/dist/{Catalog-0-s4Hs5O.js → Catalog-CrgKBjTt.js} +6 -6
- package/dist/{Category-CDOTTdYz.js → Category-Brt03UVR.js} +4 -4
- package/dist/{Category-BF40su4h.js → Category-Do3tDNNq.js} +6 -6
- package/dist/{CookingGuide-BdjDObjP.js → CookingGuide-DtkAi9bK.js} +4 -4
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-QnzOuwOb.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-8ObJv2LZ.js} +1 -1
- package/dist/{Group-BnRpzm_K.js → Group-CX1rH4Ba.js} +1 -1
- package/dist/{Group-D292KrzI.js → Group-gQPAHr2A.js} +3 -3
- package/dist/{Group.vue_vue_type_script_setup_true_lang-B7Ms48v5.js → Group.vue_vue_type_script_setup_true_lang-DWVGPzwc.js} +7 -7
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-4j-PyUrF.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-PQJm4GbD.js} +5 -5
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-Bx93YqHv.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-DLVjK7wR.js} +4107 -4075
- package/dist/{Ingredient-BBT7zzIm.js → Ingredient-_nl97wdl.js} +3 -3
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-BojJh80b.js → InventoryBinding.vue_vue_type_script_setup_true_lang-DAO5hp3N.js} +2 -2
- package/dist/{LinkProductSideSheet-CQECcvWg.js → LinkProductSideSheet-0p5Z66Ua.js} +3 -3
- package/dist/{MenuSetting-C8PBPHOv.js → MenuSetting-CHOMVwXS.js} +5 -5
- package/dist/{PrintRoute-dTkMyEHm.js → PrintRoute-PR9yqoD5.js} +4 -4
- package/dist/{Product-Dkzq_6Cz.js → Product-D74PpxCy.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-CVUCY68d.js → Product.vue_vue_type_script_setup_true_lang-CW6W8Ros.js} +13 -13
- package/dist/{ProductInternalTools-Cv0xS7du.js → ProductInternalTools-BH4Rtb8s.js} +5 -5
- package/dist/{Products-DM8IW9Jn.js → Products-BoP_Sfwi.js} +248 -234
- package/dist/{Publish-Bv3JoNMU.js → Publish-B82vhm2_.js} +3 -3
- package/dist/{Recipe-9ROHWlwr.js → Recipe-C8KXjAzg.js} +4 -4
- package/dist/{Scheduler-BJUOJYhh.js → Scheduler-CkAclfQw.js} +3 -3
- package/dist/{ServingSequence-CNnGYksh.js → ServingSequence-BlUDI5uT.js} +3 -3
- package/dist/{Setting-79njp0t2.js → Setting-B7jaIIPx.js} +5 -5
- package/dist/{Subcategory-Bijs3Olt.js → Subcategory-ZoTKyleD.js} +4 -4
- package/dist/{Takeaway-BztOhncW.js → Takeaway-bOnEUU7z.js} +1 -1
- package/dist/{Takeaway-CabdtF3Z.js → Takeaway-hSioiPLy.js} +4 -4
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-CvXZJX0b.js → Takeaway.vue_vue_type_script_setup_true_lang-B5HjkmRS.js} +5 -5
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-DSuNtZkm.js → Thumbnail.vue_vue_type_script_setup_true_lang-SR02hz_g.js} +4 -4
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-B2bjDghV.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-D6_okQqi.js} +14 -14
- package/dist/{Unit-B0hRSazK.js → Unit-iVeouD8Q.js} +2 -2
- package/dist/{Variant-Khx4MvQ1.js → Variant-09Ayb-LB.js} +3 -3
- package/dist/{_id_-CejDAH9A.js → _id_-T4NFKO76.js} +10 -10
- package/dist/{app-BHhkNQJL.js → app-BeeqJ5ia.js} +1 -1
- package/dist/{app-r_PLzQPv.js → app-G1eIeNve.js} +26 -26
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/helper/import-export-utils.d.ts +3 -0
- package/dist/apps/mf-menu/src/helper/menuExport.d.ts +5 -1
- package/dist/apps/mf-menu/src/helper/menuImport.d.ts +5 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{validate-menu-XSARGuLs.js → linked-status-D54oQ8ty.js} +7 -7
- package/dist/assets/{override-menu-D9Pp7JwO.js → override-menu-CTzTh4oF.js} +2 -2
- package/dist/assets/{linked-status-B6J14c_0.js → validate-menu-DEP4gzNo.js} +7 -7
- package/dist/{catalog-DJAomoNt.js → catalog-DireBPbe.js} +1 -1
- package/dist/{catalogSetting-CUNMIE44.js → catalogSetting-8687T4sf.js} +1 -1
- package/dist/{category-BQOeVhVK.js → category-CxZ7l7TH.js} +1 -1
- package/dist/{currency-B-jPRiWC.js → currency-C-x74Ihc.js} +1 -1
- package/dist/{customAttributes-BfGQfRtM.js → customAttributes-PLOo5TFF.js} +1 -1
- package/dist/{dayjs.min-B2n-XPGe.js → dayjs.min-D4oh6LGN.js} +1 -1
- package/dist/{index-BWa11nqo.js → index-B6y1Idp6.js} +3 -3
- package/dist/{index-Lc84U-0z.js → index-CWlWCkLQ.js} +1 -1
- package/dist/{index-B0YrxBOA.js → index-Deb8Se9C.js} +4 -4
- package/dist/{index-C7xEyPoA.js → index-Dr70dTcK.js} +1 -1
- package/dist/{item-Dg-056O8.js → item-8v-mL4Tk.js} +16 -16
- package/dist/{jszip.min-DIzwB7QO.js → jszip.min-BlCVvZNl.js} +2 -2
- package/dist/{menu-Bw7rj5bt.js → menu-CbIzWmhP.js} +4 -4
- package/dist/{menu-BghVVLGg.js → menu-DhH8YWvV.js} +1 -1
- package/dist/{menuV2-Big1rjS7.js → menuV2-B3QHrvzJ.js} +164 -164
- package/dist/{priceTier-icYK6X_C.js → priceTier-BHuvA89h.js} +1 -1
- package/dist/{scheduler-DKxyet-8.js → scheduler-PDDah5xR.js} +4 -4
- package/dist/{subcategory-YCdzS5hb.js → subcategory-B-usgK3T.js} +2 -2
- package/dist/{toExcel-DDiQLisy.js → toExcel-C6kSxe7z.js} +2 -2
- package/dist/{unit-BHpJzCJq.js → unit-CtG4RVnF.js} +2 -2
- package/package.json +1 -1
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
var Ue = Object.defineProperty;
|
|
2
2
|
var We = (e, t, n) => t in e ? Ue(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var ne = (e, t, n) => We(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
import { an as ue, H as
|
|
4
|
+
import { an as ue, H as C, D as V, A as ae, ao as re, J as G, I as ie, a8 as x, c as L, X as T, ai as oe, ap as Le, aq as ze, B as qe, aa as Ge, ar as He, as as Be, a7 as Je } from "./menu-CbIzWmhP.js";
|
|
5
5
|
import { defineStore as Ye } from "pinia";
|
|
6
|
-
import { shallowRef as j, ref as
|
|
6
|
+
import { shallowRef as j, ref as H, computed as S, shallowReactive as Qe, effectScope as Xe, watch as Ze } from "vue";
|
|
7
7
|
import { useCoreStore as se } from "@feedmepos/mf-common";
|
|
8
8
|
import { useSnackbar as et } from "@feedmepos/ui-library";
|
|
9
|
-
const tt = "/assets/linked-status-
|
|
9
|
+
const tt = "/assets/linked-status-D54oQ8ty.js", nt = "/assets/override-menu-CTzTh4oF.js";
|
|
10
10
|
function rt(e) {
|
|
11
11
|
var o;
|
|
12
|
-
const t =
|
|
12
|
+
const t = C(e), n = (o = t.variant) == null ? void 0 : o.variantCombinations;
|
|
13
13
|
return delete t.variant, delete t.thumbnail, [t, ...n || []];
|
|
14
14
|
}
|
|
15
15
|
function ot(e, t, n, o) {
|
|
16
|
-
const r =
|
|
17
|
-
function
|
|
18
|
-
const v = e.map((
|
|
16
|
+
const r = C(t), a = n ? r.modules.catalog.find((m) => m._id === n) : null, l = o ? r.modules.scheduler.find((m) => m._id === o) : null, u = a ? C(a) : void 0, c = n ? r.modules.catalog.filter((m) => m._id !== n) : [], i = l ? C(l) : void 0, f = e.reduce((m, v) => (m[v._id] = rt(v), m), {});
|
|
17
|
+
function h(m = []) {
|
|
18
|
+
const v = e.map((p) => p._id);
|
|
19
19
|
return [
|
|
20
|
-
...m.filter((
|
|
21
|
-
...Object.values(f).flatMap((
|
|
20
|
+
...m.filter((p) => !v.includes(p._id)),
|
|
21
|
+
...Object.values(f).flatMap((p) => p)
|
|
22
22
|
];
|
|
23
23
|
}
|
|
24
24
|
return u && o ? (u.override.scheduler = {
|
|
@@ -26,7 +26,7 @@ function ot(e, t, n, o) {
|
|
|
26
26
|
[o]: {
|
|
27
27
|
...u.override.scheduler[o],
|
|
28
28
|
_id: o,
|
|
29
|
-
items:
|
|
29
|
+
items: h(i == null ? void 0 : i.items).map((m) => ({
|
|
30
30
|
...m,
|
|
31
31
|
orderFrom: ae.F_ORDER_FROM.enum.ALL
|
|
32
32
|
}))
|
|
@@ -34,7 +34,7 @@ function ot(e, t, n, o) {
|
|
|
34
34
|
}, r.modules.catalog = [...c, u], r) : u ? (u.override.items = {
|
|
35
35
|
...u.override.items,
|
|
36
36
|
...f
|
|
37
|
-
}, r.modules.catalog = [...c, u], r) : i ? (i.items =
|
|
37
|
+
}, r.modules.catalog = [...c, u], r) : i ? (i.items = h(i.items), r.modules.scheduler = [
|
|
38
38
|
...r.modules.scheduler.filter((m) => m._id !== o),
|
|
39
39
|
i
|
|
40
40
|
], r) : {
|
|
@@ -56,16 +56,16 @@ function $(e, t, n) {
|
|
|
56
56
|
if (!o)
|
|
57
57
|
throw new Error(`_insertItemOverriders - Item not found - ${e._id}`);
|
|
58
58
|
const r = (a = o.groups) == null ? void 0 : a.map((l) => {
|
|
59
|
-
var i, f,
|
|
59
|
+
var i, f, h;
|
|
60
60
|
const u = (i = e == null ? void 0 : e.groups) == null ? void 0 : i.find((m) => m._id === l._id);
|
|
61
61
|
let c;
|
|
62
62
|
return u ? c = ((f = l.items) == null ? void 0 : f.map((m) => {
|
|
63
|
-
var
|
|
64
|
-
const v = (
|
|
63
|
+
var p;
|
|
64
|
+
const v = (p = u.items) == null ? void 0 : p.find(
|
|
65
65
|
(b) => b._id === m._id && b.combinationKey === m.combinationKey
|
|
66
66
|
);
|
|
67
67
|
return $(v || m, t, n + 1);
|
|
68
|
-
})) ?? [] : c = ((
|
|
68
|
+
})) ?? [] : c = ((h = l.items) == null ? void 0 : h.map((m) => $(m, t, n + 1))) ?? [], {
|
|
69
69
|
...l,
|
|
70
70
|
items: c
|
|
71
71
|
};
|
|
@@ -81,14 +81,14 @@ function $(e, t, n) {
|
|
|
81
81
|
function st(e, t) {
|
|
82
82
|
const n = e.groups.map((a) => {
|
|
83
83
|
const l = t.modules.group.find((c) => c._id === a._id), u = ((l == null ? void 0 : l.items) || []).map((c) => {
|
|
84
|
-
var
|
|
85
|
-
const i = (
|
|
84
|
+
var h;
|
|
85
|
+
const i = (h = a.items) == null ? void 0 : h.find(
|
|
86
86
|
(m) => m._id === c._id && m.combinationKey === c.combinationKey
|
|
87
87
|
);
|
|
88
88
|
if (i)
|
|
89
89
|
return $(i, t, 1);
|
|
90
90
|
const f = {
|
|
91
|
-
...
|
|
91
|
+
...V.generator.initMenuV4ItemOverrider(),
|
|
92
92
|
_id: c._id,
|
|
93
93
|
combinationKey: c.combinationKey
|
|
94
94
|
};
|
|
@@ -96,7 +96,7 @@ function st(e, t) {
|
|
|
96
96
|
});
|
|
97
97
|
return { ...a, items: u };
|
|
98
98
|
}), o = e.variant ? e.variant.variantCombinations.map((a) => $(a, t, 1)) : [], r = {
|
|
99
|
-
...
|
|
99
|
+
...V.generator.initMenuV4ItemOverrider(),
|
|
100
100
|
_id: e._id,
|
|
101
101
|
name: e.name,
|
|
102
102
|
code: e.code,
|
|
@@ -104,7 +104,7 @@ function st(e, t) {
|
|
|
104
104
|
};
|
|
105
105
|
return [...o, r];
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function B(e, t) {
|
|
108
108
|
var o;
|
|
109
109
|
if (!t)
|
|
110
110
|
return e;
|
|
@@ -115,9 +115,9 @@ function H(e, t) {
|
|
|
115
115
|
return r.items = (u = r.items) == null ? void 0 : u.map((c) => {
|
|
116
116
|
var f;
|
|
117
117
|
const i = (f = a == null ? void 0 : a.items) == null ? void 0 : f.find(
|
|
118
|
-
(
|
|
118
|
+
(h) => h._id === c._id && h.combinationKey === c.combinationKey
|
|
119
119
|
);
|
|
120
|
-
return
|
|
120
|
+
return B(c, i);
|
|
121
121
|
}), r;
|
|
122
122
|
}), n;
|
|
123
123
|
}
|
|
@@ -131,7 +131,7 @@ function ut(e, t) {
|
|
|
131
131
|
);
|
|
132
132
|
if (!a)
|
|
133
133
|
throw new Error(`Item overrider not found - ${r._id} - ${r.combinationKey}`);
|
|
134
|
-
return
|
|
134
|
+
return B(a, r);
|
|
135
135
|
})
|
|
136
136
|
});
|
|
137
137
|
const o = n.find((r) => !r.combinationKey);
|
|
@@ -145,7 +145,7 @@ function ut(e, t) {
|
|
|
145
145
|
const c = (i = a == null ? void 0 : a.items) == null ? void 0 : i.find(
|
|
146
146
|
(f) => f._id === u._id && f.combinationKey === u.combinationKey
|
|
147
147
|
);
|
|
148
|
-
return
|
|
148
|
+
return B(u, c);
|
|
149
149
|
}), r;
|
|
150
150
|
}), {
|
|
151
151
|
...t,
|
|
@@ -153,17 +153,17 @@ function ut(e, t) {
|
|
|
153
153
|
};
|
|
154
154
|
}
|
|
155
155
|
async function Ot(e, t, n, o, r, a = !0) {
|
|
156
|
-
const l =
|
|
156
|
+
const l = C(n), u = a ? ot(t, l, o, r) : l, c = t.reduce((h, m) => (h[m._id] = u.modules.item.find((v) => v._id === m._id), h), {}), i = t.reduce((h, m) => {
|
|
157
157
|
const v = m._id;
|
|
158
|
-
return
|
|
159
|
-
}, {}), f =
|
|
158
|
+
return h[v] = st(c[v], e), h;
|
|
159
|
+
}, {}), f = V.getFallbackPrices({
|
|
160
160
|
rawMenu: u,
|
|
161
161
|
items: i,
|
|
162
162
|
catalogId: o || void 0,
|
|
163
163
|
schedulerId: r
|
|
164
164
|
});
|
|
165
|
-
return t.map((
|
|
166
|
-
const m =
|
|
165
|
+
return t.map((h) => {
|
|
166
|
+
const m = h._id, v = c[m];
|
|
167
167
|
return {
|
|
168
168
|
...ut(f, v),
|
|
169
169
|
category: o || r ? v == null ? void 0 : v.category : null
|
|
@@ -183,11 +183,11 @@ function Dt(e, t) {
|
|
|
183
183
|
return r;
|
|
184
184
|
}, [])) || []).join(" / ");
|
|
185
185
|
}
|
|
186
|
-
const
|
|
187
|
-
async function
|
|
186
|
+
const z = /* @__PURE__ */ new Map();
|
|
187
|
+
async function Tt(e, t) {
|
|
188
188
|
const n = `${e._id}-${e.updatedAt}-${t}`;
|
|
189
|
-
if (
|
|
190
|
-
return
|
|
189
|
+
if (z.has(n))
|
|
190
|
+
return z.get(n);
|
|
191
191
|
const o = await ue(
|
|
192
192
|
tt,
|
|
193
193
|
JSON.stringify({
|
|
@@ -195,7 +195,7 @@ async function Vt(e, t) {
|
|
|
195
195
|
itemId: t
|
|
196
196
|
})
|
|
197
197
|
);
|
|
198
|
-
return
|
|
198
|
+
return z.set(n, o), o;
|
|
199
199
|
}
|
|
200
200
|
async function ce(e, t, n) {
|
|
201
201
|
return await ue(nt, {
|
|
@@ -204,7 +204,7 @@ async function ce(e, t, n) {
|
|
|
204
204
|
schedulerId: n
|
|
205
205
|
});
|
|
206
206
|
}
|
|
207
|
-
function
|
|
207
|
+
function Vt(e, t, n) {
|
|
208
208
|
const o = /* @__PURE__ */ new Set();
|
|
209
209
|
function r(a, l) {
|
|
210
210
|
if (!e || !a || !l || o.has(l)) return !1;
|
|
@@ -219,7 +219,7 @@ function Tt(e, t, n) {
|
|
|
219
219
|
}
|
|
220
220
|
return r(t, n);
|
|
221
221
|
}
|
|
222
|
-
function
|
|
222
|
+
function Ft(e, t, n) {
|
|
223
223
|
const o = /* @__PURE__ */ new Set();
|
|
224
224
|
function r(a, l) {
|
|
225
225
|
if (!e || !a || !l || o.has(a)) return !1;
|
|
@@ -234,30 +234,30 @@ function Pt(e, t, n) {
|
|
|
234
234
|
}
|
|
235
235
|
return r(t, n);
|
|
236
236
|
}
|
|
237
|
-
const
|
|
237
|
+
const q = /* @__PURE__ */ new Map();
|
|
238
238
|
async function at(e, t, n) {
|
|
239
239
|
const o = `${e._id}-${e.updatedAt}-${t || "null"}-${n || "null"}`;
|
|
240
|
-
if (
|
|
241
|
-
return
|
|
240
|
+
if (q.has(o))
|
|
241
|
+
return q.get(o);
|
|
242
242
|
const r = await ce(e, t, n);
|
|
243
|
-
return
|
|
243
|
+
return q.set(o, r), r;
|
|
244
244
|
}
|
|
245
|
-
async function
|
|
245
|
+
async function Kt(e, t, n) {
|
|
246
246
|
var l, u;
|
|
247
247
|
const o = await at(e, t, null), r = [], a = (c, i) => {
|
|
248
|
-
const f =
|
|
249
|
-
for (const
|
|
250
|
-
i[
|
|
248
|
+
const f = C(c);
|
|
249
|
+
for (const h in i)
|
|
250
|
+
i[h] && (f[h] = i[h]);
|
|
251
251
|
return f;
|
|
252
252
|
};
|
|
253
253
|
for (const c of o.modules.group) {
|
|
254
|
-
const i = (l = c.items) == null ? void 0 : l.find((
|
|
254
|
+
const i = (l = c.items) == null ? void 0 : l.find((h) => h._id === n && !h.combinationKey), f = e.modules.item.find((h) => h._id === n);
|
|
255
255
|
if (i) {
|
|
256
|
-
const
|
|
257
|
-
var w,
|
|
258
|
-
const
|
|
256
|
+
const h = (u = c.items) == null ? void 0 : u.filter((v) => v._id === n && v.combinationKey), m = [i, ...h].map((v) => {
|
|
257
|
+
var w, I;
|
|
258
|
+
const p = v.combinationKey ? (I = (w = f == null ? void 0 : f.variant) == null ? void 0 : w.variantCombinations) == null ? void 0 : I.find(
|
|
259
259
|
(R) => R.combinationKey === v.combinationKey
|
|
260
|
-
) : f, b =
|
|
260
|
+
) : f, b = p && f ? a(f, p) : v;
|
|
261
261
|
return a(b, v);
|
|
262
262
|
});
|
|
263
263
|
r.push({
|
|
@@ -268,7 +268,7 @@ async function Ft(e, t, n) {
|
|
|
268
268
|
}
|
|
269
269
|
return r;
|
|
270
270
|
}
|
|
271
|
-
const M = 0,
|
|
271
|
+
const M = 0, F = 3;
|
|
272
272
|
function it(e) {
|
|
273
273
|
const t = /^\/(.*)\/([gimyu]*)$/.exec(e.toString());
|
|
274
274
|
if (!t)
|
|
@@ -291,13 +291,13 @@ function O(e) {
|
|
|
291
291
|
Object.prototype.hasOwnProperty.call(e, n) && (t[n] = O(e[n]));
|
|
292
292
|
return t;
|
|
293
293
|
}
|
|
294
|
-
function
|
|
294
|
+
function P(e) {
|
|
295
295
|
return e instanceof RegExp ? e.toString() : e;
|
|
296
296
|
}
|
|
297
297
|
function k(e) {
|
|
298
298
|
return typeof e == "object" && e !== null && !Array.isArray(e) && !(e instanceof Date) && !(e instanceof RegExp);
|
|
299
299
|
}
|
|
300
|
-
function
|
|
300
|
+
function K(e, t) {
|
|
301
301
|
if (e === t) return !0;
|
|
302
302
|
if (typeof e != typeof t) return !1;
|
|
303
303
|
if (e instanceof Date && t instanceof Date)
|
|
@@ -307,14 +307,14 @@ function F(e, t) {
|
|
|
307
307
|
if (Array.isArray(e) && Array.isArray(t)) {
|
|
308
308
|
if (e.length !== t.length) return !1;
|
|
309
309
|
for (let n = 0; n < e.length; n++)
|
|
310
|
-
if (!
|
|
310
|
+
if (!K(e[n], t[n])) return !1;
|
|
311
311
|
return !0;
|
|
312
312
|
}
|
|
313
313
|
if (k(e) && k(t)) {
|
|
314
314
|
const n = Object.keys(e), o = Object.keys(t);
|
|
315
315
|
if (n.length !== o.length) return !1;
|
|
316
316
|
for (const r of n)
|
|
317
|
-
if (!Object.prototype.hasOwnProperty.call(t, r) || !
|
|
317
|
+
if (!Object.prototype.hasOwnProperty.call(t, r) || !K(e[r], t[r])) return !1;
|
|
318
318
|
return !0;
|
|
319
319
|
}
|
|
320
320
|
return !1;
|
|
@@ -327,10 +327,10 @@ function ct(e, t, n) {
|
|
|
327
327
|
}
|
|
328
328
|
const l = [], u = /* @__PURE__ */ new Set();
|
|
329
329
|
for (let c = 0; c < o; c++) {
|
|
330
|
-
const i = e[c], f = n ? n(i) : JSON.stringify(i),
|
|
331
|
-
if (
|
|
332
|
-
for (const m of
|
|
333
|
-
if (!u.has(m) &&
|
|
330
|
+
const i = e[c], f = n ? n(i) : JSON.stringify(i), h = a.get(f);
|
|
331
|
+
if (h) {
|
|
332
|
+
for (const m of h)
|
|
333
|
+
if (!u.has(m) && K(i, t[m])) {
|
|
334
334
|
l.push({ leftIndex: c, rightIndex: m }), u.add(m);
|
|
335
335
|
break;
|
|
336
336
|
}
|
|
@@ -340,42 +340,42 @@ function ct(e, t, n) {
|
|
|
340
340
|
}
|
|
341
341
|
function lt(e, t, n) {
|
|
342
342
|
var m, v;
|
|
343
|
-
if (
|
|
343
|
+
if (K(e, t)) return;
|
|
344
344
|
const o = { _t: "a" }, r = ((m = n == null ? void 0 : n.arrays) == null ? void 0 : m.detectMove) !== !1, a = ((v = n == null ? void 0 : n.arrays) == null ? void 0 : v.includeValueOnMove) === !0, l = n == null ? void 0 : n.objectHash;
|
|
345
345
|
let u = r ? ct(e, t, l) : [];
|
|
346
346
|
if (!l && e.length === t.length && e.length > 0 && u.length < e.length) {
|
|
347
|
-
const
|
|
348
|
-
if (
|
|
347
|
+
const p = k(e[0]) || Array.isArray(e[0]), b = u.length > 0;
|
|
348
|
+
if (p || b) {
|
|
349
349
|
u = [];
|
|
350
350
|
for (let w = 0; w < e.length; w++)
|
|
351
351
|
u.push({ leftIndex: w, rightIndex: w });
|
|
352
352
|
}
|
|
353
353
|
}
|
|
354
|
-
new Set(u.map((
|
|
355
|
-
const c = new Set(u.map((
|
|
356
|
-
for (const
|
|
357
|
-
i.set(
|
|
358
|
-
for (let
|
|
359
|
-
const b = i.get(
|
|
354
|
+
new Set(u.map((p) => p.leftIndex));
|
|
355
|
+
const c = new Set(u.map((p) => p.rightIndex)), i = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map();
|
|
356
|
+
for (const p of u)
|
|
357
|
+
i.set(p.leftIndex, p.rightIndex), f.set(p.rightIndex, p.leftIndex);
|
|
358
|
+
for (let p = 0; p < e.length; p++) {
|
|
359
|
+
const b = i.get(p);
|
|
360
360
|
if (b !== void 0) {
|
|
361
|
-
const w = J(e[
|
|
362
|
-
if (w !== void 0 && (o[b] = w), r && b !==
|
|
363
|
-
const
|
|
364
|
-
o[
|
|
361
|
+
const w = J(e[p], t[b], n);
|
|
362
|
+
if (w !== void 0 && (o[b] = w), r && b !== p) {
|
|
363
|
+
const I = `_${p}`, R = a ? [e[p], b, F] : ["", b, F];
|
|
364
|
+
o[I] = R;
|
|
365
365
|
}
|
|
366
366
|
} else {
|
|
367
|
-
const w = `_${
|
|
368
|
-
o[w] = [e[
|
|
367
|
+
const w = `_${p}`;
|
|
368
|
+
o[w] = [e[p], M, M];
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
|
-
for (let
|
|
372
|
-
c.has(
|
|
373
|
-
const
|
|
374
|
-
if (!(
|
|
371
|
+
for (let p = 0; p < t.length; p++)
|
|
372
|
+
c.has(p) || (o[p] = [t[p]]);
|
|
373
|
+
const h = Object.keys(o);
|
|
374
|
+
if (!(h.length === 1 && h[0] === "_t"))
|
|
375
375
|
return o;
|
|
376
376
|
}
|
|
377
377
|
function dt(e, t, n) {
|
|
378
|
-
if (
|
|
378
|
+
if (K(e, t)) return;
|
|
379
379
|
const o = {}, r = Object.keys(e), a = Object.keys(t), l = /* @__PURE__ */ new Set([...r, ...a]);
|
|
380
380
|
for (const u of l) {
|
|
381
381
|
if (n != null && n.propertyFilter && !n.propertyFilter(u, { left: e, right: t }))
|
|
@@ -392,21 +392,21 @@ function dt(e, t, n) {
|
|
|
392
392
|
return Object.keys(o).length > 0 ? o : void 0;
|
|
393
393
|
}
|
|
394
394
|
function J(e, t, n) {
|
|
395
|
-
if (
|
|
395
|
+
if (K(e, t)) return;
|
|
396
396
|
if (e === void 0 && t !== void 0) {
|
|
397
397
|
const u = n != null && n.cloneDiffValues ? O(t) : t;
|
|
398
|
-
return [
|
|
398
|
+
return [P(u)];
|
|
399
399
|
}
|
|
400
400
|
if (typeof e !== typeof t || e instanceof Date != t instanceof Date || e instanceof RegExp != t instanceof RegExp || Array.isArray(e) !== Array.isArray(t)) {
|
|
401
401
|
const u = n != null && n.cloneDiffValues ? O(e) : e, c = n != null && n.cloneDiffValues ? O(t) : t;
|
|
402
|
-
return [
|
|
402
|
+
return [P(u), P(c)];
|
|
403
403
|
}
|
|
404
404
|
if (Array.isArray(e) && Array.isArray(t))
|
|
405
405
|
return lt(e, t, n);
|
|
406
406
|
if (k(e) && k(t))
|
|
407
407
|
return dt(e, t, n);
|
|
408
408
|
const a = n != null && n.cloneDiffValues ? O(e) : e, l = n != null && n.cloneDiffValues ? O(t) : t;
|
|
409
|
-
return [
|
|
409
|
+
return [P(a), P(l)];
|
|
410
410
|
}
|
|
411
411
|
function ft(e, t, n) {
|
|
412
412
|
return J(e, t, n);
|
|
@@ -416,7 +416,7 @@ function mt(e, t, n) {
|
|
|
416
416
|
for (const u in t) {
|
|
417
417
|
if (u === "_t" || !u.startsWith("_")) continue;
|
|
418
418
|
const c = parseInt(u.slice(1)), i = t[u];
|
|
419
|
-
Array.isArray(i) && (i.length === 3 && i[2] === M ? o.add(c) : i.length === 3 && i[2] ===
|
|
419
|
+
Array.isArray(i) && (i.length === 3 && i[2] === M ? o.add(c) : i.length === 3 && i[2] === F && r.set(c, i[1]));
|
|
420
420
|
}
|
|
421
421
|
const a = [];
|
|
422
422
|
let l = 0;
|
|
@@ -432,9 +432,9 @@ function mt(e, t, n) {
|
|
|
432
432
|
}
|
|
433
433
|
else {
|
|
434
434
|
let f = !1;
|
|
435
|
-
for (const [
|
|
435
|
+
for (const [h, m] of r.entries())
|
|
436
436
|
if (m === u) {
|
|
437
|
-
a.push(e[
|
|
437
|
+
a.push(e[h]), f = !0;
|
|
438
438
|
break;
|
|
439
439
|
}
|
|
440
440
|
if (!f) {
|
|
@@ -481,9 +481,9 @@ function yt(e) {
|
|
|
481
481
|
if (Array.isArray(r)) {
|
|
482
482
|
if (r.length === 3 && r[2] === M)
|
|
483
483
|
t[o] = [r[0]];
|
|
484
|
-
else if (r.length === 3 && r[2] ===
|
|
484
|
+
else if (r.length === 3 && r[2] === F) {
|
|
485
485
|
const a = r[1];
|
|
486
|
-
t[`_${a}`] = [r[0], o,
|
|
486
|
+
t[`_${a}`] = [r[0], o, F];
|
|
487
487
|
}
|
|
488
488
|
}
|
|
489
489
|
} else {
|
|
@@ -491,26 +491,26 @@ function yt(e) {
|
|
|
491
491
|
if (Array.isArray(r) && r.length === 1)
|
|
492
492
|
t[`_${o}`] = [r[0], M, M];
|
|
493
493
|
else {
|
|
494
|
-
const a =
|
|
494
|
+
const a = Q(r);
|
|
495
495
|
a !== void 0 && (t[n] = a);
|
|
496
496
|
}
|
|
497
497
|
}
|
|
498
498
|
return t;
|
|
499
499
|
}
|
|
500
|
-
function
|
|
500
|
+
function ht(e) {
|
|
501
501
|
const t = {};
|
|
502
502
|
for (const n in e) {
|
|
503
503
|
const o = e[n];
|
|
504
504
|
if (Array.isArray(o))
|
|
505
505
|
o.length === 1 ? t[n] = [o[0], M, M] : o.length === 3 && o[2] === M ? t[n] = [o[0]] : o.length === 2 && (t[n] = [o[1], o[0]]);
|
|
506
506
|
else {
|
|
507
|
-
const r =
|
|
507
|
+
const r = Q(o);
|
|
508
508
|
r !== void 0 && (t[n] = r);
|
|
509
509
|
}
|
|
510
510
|
}
|
|
511
511
|
return t;
|
|
512
512
|
}
|
|
513
|
-
function
|
|
513
|
+
function Q(e) {
|
|
514
514
|
if (e !== void 0) {
|
|
515
515
|
if (Array.isArray(e)) {
|
|
516
516
|
if (e.length === 1)
|
|
@@ -519,16 +519,16 @@ function X(e) {
|
|
|
519
519
|
return [e[1], e[0]];
|
|
520
520
|
if (e.length === 3 && e[2] === M)
|
|
521
521
|
return [e[0]];
|
|
522
|
-
if (e.length === 3 && e[2] ===
|
|
522
|
+
if (e.length === 3 && e[2] === F)
|
|
523
523
|
return e;
|
|
524
524
|
}
|
|
525
|
-
return k(e) && e._t === "a" ? yt(e) : k(e) ?
|
|
525
|
+
return k(e) && e._t === "a" ? yt(e) : k(e) ? ht(e) : e;
|
|
526
526
|
}
|
|
527
527
|
}
|
|
528
528
|
function de(e) {
|
|
529
|
-
return
|
|
529
|
+
return Q(e);
|
|
530
530
|
}
|
|
531
|
-
function
|
|
531
|
+
function pt(e, t, n) {
|
|
532
532
|
const o = de(t);
|
|
533
533
|
return le(e, o);
|
|
534
534
|
}
|
|
@@ -547,7 +547,7 @@ class gt {
|
|
|
547
547
|
return de(t);
|
|
548
548
|
}
|
|
549
549
|
unpatch(t, n) {
|
|
550
|
-
return
|
|
550
|
+
return pt(t, n, this.options);
|
|
551
551
|
}
|
|
552
552
|
clone(t) {
|
|
553
553
|
return O(t);
|
|
@@ -566,40 +566,40 @@ function St({
|
|
|
566
566
|
includeValueOnMove: !1
|
|
567
567
|
},
|
|
568
568
|
cloneDiffValues: !1
|
|
569
|
-
}), n = j(null), o = j([]), r =
|
|
569
|
+
}), n = j(null), o = j([]), r = H(-1), a = j(null), l = S(() => r.value > 0), u = S(() => r.value < o.value.length - 1);
|
|
570
570
|
function c(v) {
|
|
571
571
|
if (n.value === null) {
|
|
572
|
-
n.value =
|
|
572
|
+
n.value = C(v), a.value = C(v), o.value = [{ delta: null }], r.value = 0;
|
|
573
573
|
return;
|
|
574
574
|
}
|
|
575
|
-
const
|
|
576
|
-
if (r.value < o.value.length - 1 && (o.value = o.value.slice(0, r.value + 1)), o.value.push({ delta:
|
|
575
|
+
const p = t.diff(a.value, v);
|
|
576
|
+
if (r.value < o.value.length - 1 && (o.value = o.value.slice(0, r.value + 1)), o.value.push({ delta: p }), r.value++, a.value = C(v), o.value.length > e) {
|
|
577
577
|
const b = o.value[1].delta;
|
|
578
|
-
b && n.value && (n.value = t.patch(
|
|
578
|
+
b && n.value && (n.value = t.patch(C(n.value), b)), o.value.shift(), r.value--;
|
|
579
579
|
}
|
|
580
580
|
}
|
|
581
581
|
function i(v) {
|
|
582
582
|
if (!n.value || v < 0 || v >= o.value.length)
|
|
583
583
|
return;
|
|
584
|
-
let
|
|
584
|
+
let p = C(n.value);
|
|
585
585
|
for (let b = 1; b <= v; b++) {
|
|
586
586
|
const w = o.value[b];
|
|
587
|
-
w.delta && (
|
|
587
|
+
w.delta && (p = t.patch(p, w.delta));
|
|
588
588
|
}
|
|
589
|
-
return
|
|
589
|
+
return p;
|
|
590
590
|
}
|
|
591
591
|
function f() {
|
|
592
592
|
if (l.value) {
|
|
593
593
|
r.value--;
|
|
594
594
|
const v = i(r.value);
|
|
595
|
-
return v && (a.value =
|
|
595
|
+
return v && (a.value = C(v)), v;
|
|
596
596
|
}
|
|
597
597
|
}
|
|
598
|
-
function
|
|
598
|
+
function h() {
|
|
599
599
|
if (u.value) {
|
|
600
600
|
r.value++;
|
|
601
601
|
const v = i(r.value);
|
|
602
|
-
return v && (a.value =
|
|
602
|
+
return v && (a.value = C(v)), v;
|
|
603
603
|
}
|
|
604
604
|
}
|
|
605
605
|
function m() {
|
|
@@ -610,13 +610,13 @@ function St({
|
|
|
610
610
|
canUndo: l,
|
|
611
611
|
canRedo: u,
|
|
612
612
|
undo: f,
|
|
613
|
-
redo:
|
|
613
|
+
redo: h,
|
|
614
614
|
clear: m
|
|
615
615
|
};
|
|
616
616
|
}
|
|
617
617
|
const bt = {
|
|
618
618
|
async updateMenuModule(e, t) {
|
|
619
|
-
const n =
|
|
619
|
+
const n = G.RequestRunner.operation(t, e.modules);
|
|
620
620
|
if (n.validateError.length > 0)
|
|
621
621
|
throw new Error(n.validateError.join(`
|
|
622
622
|
`));
|
|
@@ -664,10 +664,10 @@ function wt() {
|
|
|
664
664
|
}
|
|
665
665
|
};
|
|
666
666
|
}
|
|
667
|
-
const
|
|
667
|
+
const Pt = Ye(
|
|
668
668
|
"mf-menu-store-v2",
|
|
669
669
|
() => {
|
|
670
|
-
const e =
|
|
670
|
+
const e = Qe(wt()), t = se(), n = et(), o = S(() => e.menu.modules.serveSequence ? x(e.menu.modules.serveSequence, {
|
|
671
671
|
selector: "position"
|
|
672
672
|
}) : []), r = S(() => {
|
|
673
673
|
var s;
|
|
@@ -680,25 +680,25 @@ const Kt = Ye(
|
|
|
680
680
|
let s = e.menu.modules.catalog.find(
|
|
681
681
|
(y) => y._id === e.currentCatalogId
|
|
682
682
|
);
|
|
683
|
-
return s && ((d = s.linkItemRules) != null && d.length) && (s =
|
|
683
|
+
return s && ((d = s.linkItemRules) != null && d.length) && (s = V.populateCatalog({
|
|
684
684
|
catalog: s,
|
|
685
685
|
ruleGroupSettings: e.menu.ruleGroupSettings,
|
|
686
686
|
items: e.menu.modules.item,
|
|
687
687
|
...e.currentRestaurantAttrParams ?? {}
|
|
688
688
|
})), s;
|
|
689
|
-
}), c = S(() => x(
|
|
689
|
+
}), c = S(() => x(h.value.modules.scheduler, { selector: "name" })), i = S(() => e.menu.modules.scheduler.find(
|
|
690
690
|
(s) => s._id === e.currentSchedulerId
|
|
691
691
|
));
|
|
692
692
|
function f(s, d = !0) {
|
|
693
693
|
e.menu = { ...s, _rev: e.menu._rev }, d && D.push(e.menu);
|
|
694
694
|
}
|
|
695
|
-
const
|
|
696
|
-
async function
|
|
695
|
+
const h = j(fe()), m = H(!1), v = H(1);
|
|
696
|
+
async function p() {
|
|
697
697
|
var y;
|
|
698
698
|
m.value = !0;
|
|
699
699
|
let s = e.menu.modules.catalog;
|
|
700
700
|
if (u.value && ((y = u.value.linkItemRules) != null && y.length)) {
|
|
701
|
-
const g =
|
|
701
|
+
const g = V.populateCatalog({
|
|
702
702
|
catalog: u.value,
|
|
703
703
|
ruleGroupSettings: e.menu.ruleGroupSettings,
|
|
704
704
|
items: e.menu.modules.item,
|
|
@@ -725,19 +725,19 @@ const Kt = Ye(
|
|
|
725
725
|
), A = new Set(((_ == null ? void 0 : _.items) || []).map((E) => E._id));
|
|
726
726
|
d.modules.item = d.modules.item.filter((E) => A.has(E._id));
|
|
727
727
|
}
|
|
728
|
-
return
|
|
728
|
+
return h.value = d, m.value = !1, v.value = v.value + 1, d;
|
|
729
729
|
}
|
|
730
|
-
const w = ie.debounce(
|
|
731
|
-
let
|
|
732
|
-
function
|
|
733
|
-
R && (R(), R = null),
|
|
730
|
+
const w = ie.debounce(p, 200);
|
|
731
|
+
let I = null, R = null;
|
|
732
|
+
function X() {
|
|
733
|
+
R && (R(), R = null), I && I.stop(), I = Xe(!0), R = I.run(() => Ze(
|
|
734
734
|
() => [e.menu, e.currentCatalogId, e.currentSchedulerId],
|
|
735
735
|
() => {
|
|
736
736
|
m.value || w();
|
|
737
737
|
}
|
|
738
738
|
)) || null;
|
|
739
739
|
}
|
|
740
|
-
|
|
740
|
+
X();
|
|
741
741
|
const me = S(() => [
|
|
742
742
|
{
|
|
743
743
|
label: "Main",
|
|
@@ -748,7 +748,7 @@ const Kt = Ye(
|
|
|
748
748
|
value: s._id
|
|
749
749
|
}))
|
|
750
750
|
]), Z = S(() => {
|
|
751
|
-
const s =
|
|
751
|
+
const s = h.value.modules.category;
|
|
752
752
|
return [
|
|
753
753
|
...U.value.item.addon ? [
|
|
754
754
|
{
|
|
@@ -757,14 +757,14 @@ const Kt = Ye(
|
|
|
757
757
|
position: 0
|
|
758
758
|
}
|
|
759
759
|
] : [],
|
|
760
|
-
...
|
|
760
|
+
...T(s, (d) => d.name)
|
|
761
761
|
];
|
|
762
762
|
}), ve = S(() => {
|
|
763
|
-
const s =
|
|
764
|
-
return
|
|
763
|
+
const s = h.value.modules.subCategory || [];
|
|
764
|
+
return T(s, (d) => d.name);
|
|
765
765
|
}), ee = S(() => {
|
|
766
766
|
var d;
|
|
767
|
-
let s =
|
|
767
|
+
let s = h.value.modules.item;
|
|
768
768
|
if (u.value) {
|
|
769
769
|
const y = (d = u.value) == null ? void 0 : d.override.items;
|
|
770
770
|
s = s.filter((g) => {
|
|
@@ -775,17 +775,17 @@ const Kt = Ye(
|
|
|
775
775
|
return (_ == null ? void 0 : _.orderFrom) !== ae.F_ORDER_FROM.enum.NONE;
|
|
776
776
|
});
|
|
777
777
|
}
|
|
778
|
-
return
|
|
778
|
+
return T(s, (y) => y.code || y.name);
|
|
779
779
|
}), ye = S(() => {
|
|
780
|
-
const s = e.menu.modules.category, d =
|
|
780
|
+
const s = e.menu.modules.category, d = T(s, (g) => g.name).reduce(
|
|
781
781
|
(g, _, A) => (g[_._id] = A, g),
|
|
782
782
|
{ "": 0 }
|
|
783
783
|
), y = e.menu.modules.item;
|
|
784
|
-
return
|
|
784
|
+
return T(
|
|
785
785
|
y,
|
|
786
786
|
(g) => g.code || g.name
|
|
787
787
|
).reduce((g, _, A) => (g[_._id] = A + d[_.category || ""], g), {});
|
|
788
|
-
}),
|
|
788
|
+
}), he = S(() => oe(N.value, Z.value, ee.value)), pe = S(() => {
|
|
789
789
|
const s = U.value.item.addon ? [
|
|
790
790
|
{
|
|
791
791
|
_id: e.currentCatalogId ? "" : null,
|
|
@@ -800,19 +800,19 @@ const Kt = Ye(
|
|
|
800
800
|
e.menu.modules.item
|
|
801
801
|
);
|
|
802
802
|
}), N = S(() => {
|
|
803
|
-
const s =
|
|
803
|
+
const s = h.value.modules.variant;
|
|
804
804
|
return x(s, { selector: "name" });
|
|
805
805
|
});
|
|
806
806
|
function ge(s = []) {
|
|
807
807
|
const d = s.map((g) => N.value.find((_) => _._id === g)).filter((g) => !!g);
|
|
808
|
-
return
|
|
808
|
+
return V.fullVariantCombination(d).reduce((g, _) => (g[_.combinationKey] = _.selectionName.join(" / "), g), {});
|
|
809
809
|
}
|
|
810
|
-
const _e = S(() =>
|
|
810
|
+
const _e = S(() => T(h.value.modules.group, (s) => s.name)), Se = S(() => x(h.value.modules.takeaway, { selector: "name" })), be = S(() => x(e.menu.modules.printDepartment || [], {
|
|
811
811
|
selector: "name"
|
|
812
812
|
})), we = S(() => x(e.menu.modules.unit, { selector: "name" })), Me = S(() => x(Le(e.menu.modules.recipe, e.menu.modules.sku), {
|
|
813
813
|
selector: "name"
|
|
814
|
-
})), Ae = S(() => e.menu.modules.cookingGuide),
|
|
815
|
-
const s =
|
|
814
|
+
})), Ae = S(() => e.menu.modules.cookingGuide), Ce = S(() => {
|
|
815
|
+
const s = ze(e.menu.modules.sku);
|
|
816
816
|
return x(s, { selector: "code" });
|
|
817
817
|
}), U = S(() => {
|
|
818
818
|
const s = !e.currentCatalogId, d = r.value === L.F_MENU_VERSION.v4, y = !e.currentSchedulerId, g = {
|
|
@@ -886,7 +886,7 @@ const Kt = Ye(
|
|
|
886
886
|
function W(s) {
|
|
887
887
|
return `${s.systemCode}/${s.taxCode}`;
|
|
888
888
|
}
|
|
889
|
-
function
|
|
889
|
+
function Ie(s) {
|
|
890
890
|
const [d, y] = s.split("/");
|
|
891
891
|
return { systemCode: d, taxCode: y };
|
|
892
892
|
}
|
|
@@ -895,10 +895,10 @@ const Kt = Ye(
|
|
|
895
895
|
}
|
|
896
896
|
const ke = S(() => {
|
|
897
897
|
var g;
|
|
898
|
-
const s = ["SV5", "SV10"], d =
|
|
898
|
+
const s = ["SV5", "SV10"], d = qe.Country.getCountryFlattenTaxes(
|
|
899
899
|
se().currentCountry.value
|
|
900
900
|
), y = d.filter((_) => a.value || !s.includes(_.taxCode)).map((_) => ({
|
|
901
|
-
label: `${_.name} (${
|
|
901
|
+
label: `${_.name} (${Ge(_.rate)}%)`,
|
|
902
902
|
value: W(_),
|
|
903
903
|
meta: {
|
|
904
904
|
rate: _.rate
|
|
@@ -912,7 +912,7 @@ const Kt = Ye(
|
|
|
912
912
|
const s = await Je.readMenu();
|
|
913
913
|
e.menu = s ?? e.menu, te(null);
|
|
914
914
|
}, xe = async () => {
|
|
915
|
-
const { fetchAllRestaurants: s } =
|
|
915
|
+
const { fetchAllRestaurants: s } = Be();
|
|
916
916
|
await s({
|
|
917
917
|
onBatchEnd: (d) => {
|
|
918
918
|
e.restaurants = d;
|
|
@@ -924,9 +924,9 @@ const Kt = Ye(
|
|
|
924
924
|
e.currentSchedulerId = s;
|
|
925
925
|
}, De = (s) => {
|
|
926
926
|
e.currentCategoryIds = s;
|
|
927
|
-
},
|
|
927
|
+
}, Te = (s) => {
|
|
928
928
|
e.currentRestaurantAttrParams = s;
|
|
929
|
-
},
|
|
929
|
+
}, Ve = async (s, d) => {
|
|
930
930
|
const y = Array.isArray(s) ? s : [s];
|
|
931
931
|
if (!y.length) return;
|
|
932
932
|
const g = y.map((_) => ({
|
|
@@ -936,9 +936,9 @@ const Kt = Ye(
|
|
|
936
936
|
}));
|
|
937
937
|
try {
|
|
938
938
|
if (d || g.some(
|
|
939
|
-
(A) => [
|
|
939
|
+
(A) => [G.F_OPERATION_TYPE.delete, G.F_OPERATION_TYPE.deleteMany].includes(A.operation)
|
|
940
940
|
)) {
|
|
941
|
-
const A = await
|
|
941
|
+
const A = await He(g, e.menu.modules);
|
|
942
942
|
if (A !== !0) throw new Error(A);
|
|
943
943
|
}
|
|
944
944
|
const _ = await bt.updateMenuModule(e.menu, g);
|
|
@@ -950,7 +950,7 @@ const Kt = Ye(
|
|
|
950
950
|
message: _
|
|
951
951
|
});
|
|
952
952
|
}
|
|
953
|
-
},
|
|
953
|
+
}, Fe = async (s) => {
|
|
954
954
|
const d = {
|
|
955
955
|
...e.menu,
|
|
956
956
|
masterCatalogSetting: s.masterCatalogSetting,
|
|
@@ -958,7 +958,7 @@ const Kt = Ye(
|
|
|
958
958
|
priceTierSettings: s.priceTierSettings
|
|
959
959
|
};
|
|
960
960
|
return f(d), d;
|
|
961
|
-
}, D = St({ maxHistorySize: 50 }),
|
|
961
|
+
}, D = St({ maxHistorySize: 50 }), Ke = S(() => D.canUndo.value), Pe = S(() => D.canRedo.value), $e = () => {
|
|
962
962
|
const s = D.undo();
|
|
963
963
|
s && f(s, !1);
|
|
964
964
|
}, je = () => {
|
|
@@ -973,7 +973,7 @@ const Kt = Ye(
|
|
|
973
973
|
workerIsComputing: m,
|
|
974
974
|
mergedMenuChangeId: v,
|
|
975
975
|
// async computed state
|
|
976
|
-
mergedMenu:
|
|
976
|
+
mergedMenu: h,
|
|
977
977
|
// Computed
|
|
978
978
|
version: r,
|
|
979
979
|
isV4: a,
|
|
@@ -987,8 +987,8 @@ const Kt = Ye(
|
|
|
987
987
|
subcategories: ve,
|
|
988
988
|
items: ee,
|
|
989
989
|
sortedItems: ye,
|
|
990
|
-
categorizedItems:
|
|
991
|
-
categorizedRawMenuItems:
|
|
990
|
+
categorizedItems: he,
|
|
991
|
+
categorizedRawMenuItems: pe,
|
|
992
992
|
variants: N,
|
|
993
993
|
groups: _e,
|
|
994
994
|
takeaways: Se,
|
|
@@ -996,7 +996,7 @@ const Kt = Ye(
|
|
|
996
996
|
units: we,
|
|
997
997
|
recipes: Me,
|
|
998
998
|
cookingGuide: Ae,
|
|
999
|
-
skus:
|
|
999
|
+
skus: Ce,
|
|
1000
1000
|
rules: U,
|
|
1001
1001
|
taxSetting: ke,
|
|
1002
1002
|
// Action
|
|
@@ -1006,37 +1006,37 @@ const Kt = Ye(
|
|
|
1006
1006
|
selectCatalog: te,
|
|
1007
1007
|
selectScheduler: Oe,
|
|
1008
1008
|
selectCategory: De,
|
|
1009
|
-
setRestaurantAttrParams:
|
|
1010
|
-
updateMenu:
|
|
1011
|
-
updateMenuSetting:
|
|
1012
|
-
computeMergedMenu:
|
|
1009
|
+
setRestaurantAttrParams: Te,
|
|
1010
|
+
updateMenu: Ve,
|
|
1011
|
+
updateMenuSetting: Fe,
|
|
1012
|
+
computeMergedMenu: p,
|
|
1013
1013
|
// helper
|
|
1014
1014
|
encodeTax: W,
|
|
1015
|
-
decodeTax:
|
|
1015
|
+
decodeTax: Ie,
|
|
1016
1016
|
getSelectedTax: Re,
|
|
1017
1017
|
mapVariant: ge,
|
|
1018
1018
|
// history
|
|
1019
|
-
canUndoHistory:
|
|
1020
|
-
canRedoHistory:
|
|
1019
|
+
canUndoHistory: Ke,
|
|
1020
|
+
canRedoHistory: Pe,
|
|
1021
1021
|
undoHistory: $e,
|
|
1022
1022
|
redoHistory: je,
|
|
1023
1023
|
// cleanup
|
|
1024
1024
|
$dispose: () => {
|
|
1025
|
-
w.cancel(), R && (R(), R = null),
|
|
1025
|
+
w.cancel(), R && (R(), R = null), I && (I.stop(), I = null), Ne();
|
|
1026
1026
|
},
|
|
1027
1027
|
$reinitialize: () => {
|
|
1028
|
-
|
|
1028
|
+
X();
|
|
1029
1029
|
}
|
|
1030
1030
|
};
|
|
1031
1031
|
}
|
|
1032
1032
|
);
|
|
1033
1033
|
export {
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1034
|
+
Tt as a,
|
|
1035
|
+
Vt as b,
|
|
1036
|
+
Ft as c,
|
|
1037
|
+
Kt as f,
|
|
1038
1038
|
Dt as g,
|
|
1039
1039
|
Ot as m,
|
|
1040
1040
|
at as o,
|
|
1041
|
-
|
|
1041
|
+
Pt as u
|
|
1042
1042
|
};
|