@feedmepos/mf-menu 0.31.56-beta.1 → 0.31.57-beta.1
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-B0HEqrcp.js → App-aAKiJnh0.js} +8 -8
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-DLc4NdYQ.js → ApplyProduct.vue_vue_type_script_setup_true_lang-NXGiy_Vi.js} +3 -3
- package/dist/{Catalog-DwcArpSt.js → Catalog-C10xa9eC.js} +6 -6
- package/dist/{Category-CG50p5I2.js → Category-Bl2XO9Gw.js} +6 -6
- package/dist/{Category-B6KsXWPN.js → Category-D8pSAVyA.js} +4 -4
- package/dist/{CookingGuide-Cyz97VhM.js → CookingGuide-CMuLuYac.js} +4 -4
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-CwL1JNRJ.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-D3HyvX87.js} +1 -1
- package/dist/{Group-B35wXTaJ.js → Group-BXQwwY0b.js} +3 -3
- package/dist/{Group-Cx7KSYz_.js → Group-Bj0bEvqc.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-i09o3F9W.js → Group.vue_vue_type_script_setup_true_lang-qY3jdMS5.js} +7 -7
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-R5DMYDX7.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-DB-tcwBf.js} +5 -5
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-CIBEaI0q.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-dygqJ3VG.js} +8 -8
- package/dist/{Ingredient-CHWeJMHZ.js → Ingredient-Bjh831zB.js} +3 -3
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-BMmmI1-0.js → InventoryBinding.vue_vue_type_script_setup_true_lang-Dx6kizk9.js} +1052 -1052
- package/dist/{LinkProductSideSheet-CezO3teB.js → LinkProductSideSheet-Dl7ZCKLX.js} +3 -3
- package/dist/{MenuSetting-B4E34HQd.js → MenuSetting-789QTAVy.js} +5 -5
- package/dist/{PrintRoute-CufI0gWa.js → PrintRoute-BYMvZbDY.js} +4 -4
- package/dist/{Product-CAvWJViZ.js → Product-CksVbnED.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-DUHKaKm8.js → Product.vue_vue_type_script_setup_true_lang-CtvxpNXr.js} +13 -13
- package/dist/{ProductInternalTools-KBojevK5.js → ProductInternalTools-DguHTMPE.js} +5 -5
- package/dist/{Products-DBF-YSNW.js → Products-BMX_DEfq.js} +11 -11
- package/dist/{Publish-Cf_0Ai-W.js → Publish-D4pG8ROv.js} +3 -3
- package/dist/{Recipe-6PdvXn7t.js → Recipe-Bb2cvtQl.js} +4 -4
- package/dist/{Scheduler-CSub5oxB.js → Scheduler-3mB7sbUy.js} +3 -3
- package/dist/{ServingSequence-BfRy7MHY.js → ServingSequence-jqZltK35.js} +3 -3
- package/dist/{Setting-OCsl3sML.js → Setting-4ajIRdjS.js} +5 -5
- package/dist/{Subcategory-CIqnRvoM.js → Subcategory-Co2dVm-d.js} +4 -4
- package/dist/{Takeaway-CtkRv_Nr.js → Takeaway-CI6sUy3N.js} +1 -1
- package/dist/{Takeaway-BwTl6Vgs.js → Takeaway-CUMp76j-.js} +4 -4
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-cyUI8gM_.js → Takeaway.vue_vue_type_script_setup_true_lang-RZnNkRB-.js} +5 -5
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-LvyWqBwR.js → Thumbnail.vue_vue_type_script_setup_true_lang-BIeEXn3K.js} +4 -4
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BMHq9-mH.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-C4TSckYQ.js} +14 -14
- package/dist/{Unit-C6vwvdq-.js → Unit-Cw1aS6gI.js} +2 -2
- package/dist/{Variant-DuYcGJHd.js → Variant-BH3zII_W.js} +3 -3
- package/dist/{_id_-CUOOQBsr.js → _id_-GHpxvMJq.js} +10 -10
- package/dist/{app-CQthPQyO.js → app-B9SuCjTJ.js} +1 -1
- package/dist/{app-LEKg4CTA.js → app-CE8Yjb5N.js} +26 -26
- package/dist/app.js +1 -1
- package/dist/assets/{linked-status-CCGMxUNZ.js → linked-status-vxHdMTuo.js} +2 -2
- package/dist/assets/{override-menu-C0epzgBj.js → override-menu-DHz7zcGn.js} +2 -2
- package/dist/assets/{validate-menu-DZ_ndyKR.js → validate-menu-BATWO60n.js} +2 -2
- package/dist/{catalog-1xAdRM_D.js → catalog-D9AmUcSy.js} +1 -1
- package/dist/{catalogSetting-r_Mar7Qr.js → catalogSetting-BJO4QrOF.js} +1 -1
- package/dist/{category-DnIIXWYZ.js → category-D37cZ_Dk.js} +1 -1
- package/dist/{currency-BDSz1Qej.js → currency-Zqm_LWL_.js} +1 -1
- package/dist/{customAttributes-DxkVa9ut.js → customAttributes-D9-zftG3.js} +1 -1
- package/dist/{dayjs.min-BauFQDpa.js → dayjs.min-B9jKkSFx.js} +1 -1
- package/dist/{index-PmYkh8hb.js → index-0TfxxmDg.js} +4 -4
- package/dist/{index-Dk25C0Lm.js → index-BVoSUbUK.js} +3 -3
- package/dist/{index-D5u1uK-r.js → index-D1Ochoxn.js} +1 -1
- package/dist/{index-DGcXfI4E.js → index-Du_lEFBb.js} +1 -1
- package/dist/{item-C2UfEM4v.js → item-BADDeXCY.js} +375 -375
- package/dist/{jszip.min-CbZicoRb.js → jszip.min-Dyeexk5v.js} +245 -245
- package/dist/{menu-Co5crXDd.js → menu-U8mwR2QD.js} +157 -157
- package/dist/{menu-y24b_8Dk.js → menu-dIq2-n2M.js} +1 -1
- package/dist/{menuV2-D6Xl69-X.js → menuV2-G2IOgnAS.js} +119 -119
- package/dist/{priceTier-_30dwIeo.js → priceTier-Bwd3ibGM.js} +1 -1
- package/dist/{scheduler-BOMJDxnA.js → scheduler-mB0AE2bM.js} +4 -4
- package/dist/{subcategory-DQlNiz6t.js → subcategory-C6rKZbqO.js} +2 -2
- package/dist/{toExcel-Bf7kNuCZ.js → toExcel-CPZ73Gdw.js} +2 -2
- package/dist/{unit-CF2Z8aR5.js → unit-Dori0VKd.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 I, D as T, A as ae, ao as re, J as G, I as ie, a8 as x, c as z, X as V, ai as oe, ap as ze, aq as He, B as Le, aa as Ge, ar as qe, as as Be, a7 as Je } from "./menu-U8mwR2QD.js";
|
|
5
5
|
import { defineStore as Ye } from "pinia";
|
|
6
|
-
import { shallowRef as j, ref as
|
|
6
|
+
import { shallowRef as j, ref as q, computed as S, shallowReactive as Xe, effectScope as Qe, 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-vxHdMTuo.js", nt = "/assets/override-menu-DHz7zcGn.js";
|
|
10
10
|
function rt(e) {
|
|
11
11
|
var o;
|
|
12
|
-
const t =
|
|
12
|
+
const t = I(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 = I(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 ? I(a) : void 0, c = n ? r.modules.catalog.filter((m) => m._id !== n) : [], i = l ? I(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,8 +81,8 @@ 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)
|
|
@@ -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 = I(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
|
|
158
|
+
return h[v] = st(c[v], e), h;
|
|
159
159
|
}, {}), f = T.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
|
|
186
|
+
const H = /* @__PURE__ */ new Map();
|
|
187
187
|
async function Vt(e, t) {
|
|
188
188
|
const n = `${e._id}-${e.updatedAt}-${t}`;
|
|
189
|
-
if (
|
|
190
|
-
return
|
|
189
|
+
if (H.has(n))
|
|
190
|
+
return H.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 H.set(n, o), o;
|
|
199
199
|
}
|
|
200
200
|
async function ce(e, t, n) {
|
|
201
201
|
return await ue(nt, {
|
|
@@ -234,30 +234,30 @@ function Ft(e, t, n) {
|
|
|
234
234
|
}
|
|
235
235
|
return r(t, n);
|
|
236
236
|
}
|
|
237
|
-
const
|
|
237
|
+
const L = /* @__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 (L.has(o))
|
|
241
|
+
return L.get(o);
|
|
242
242
|
const r = await ce(e, t, n);
|
|
243
|
-
return
|
|
243
|
+
return L.set(o, r), r;
|
|
244
244
|
}
|
|
245
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 = I(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, C;
|
|
258
|
+
const p = v.combinationKey ? (C = (w = f == null ? void 0 : f.variant) == null ? void 0 : w.variantCombinations) == null ? void 0 : C.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({
|
|
@@ -327,9 +327,9 @@ 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
|
|
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
333
|
if (!u.has(m) && K(i, t[m])) {
|
|
334
334
|
l.push({ leftIndex: c, rightIndex: m }), u.add(m);
|
|
335
335
|
break;
|
|
@@ -344,34 +344,34 @@ function lt(e, t, n) {
|
|
|
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 C = `_${p}`, R = a ? [e[p], b, F] : ["", b, F];
|
|
364
|
+
o[C] = 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) {
|
|
@@ -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) {
|
|
@@ -497,7 +497,7 @@ function yt(e) {
|
|
|
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];
|
|
@@ -522,13 +522,13 @@ function X(e) {
|
|
|
522
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
529
|
return X(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 = q(-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 = I(v), a.value = I(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 = I(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(I(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 = I(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 = I(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 = I(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
|
`));
|
|
@@ -671,8 +671,8 @@ const Pt = Ye(
|
|
|
671
671
|
selector: "position"
|
|
672
672
|
}) : []), r = S(() => {
|
|
673
673
|
var s;
|
|
674
|
-
return ((s = t.currentBusiness.value) == null ? void 0 : s.menuVersion) ||
|
|
675
|
-
}), a = S(() => r.value ===
|
|
674
|
+
return ((s = t.currentBusiness.value) == null ? void 0 : s.menuVersion) || z.F_MENU_VERSION.v3;
|
|
675
|
+
}), a = S(() => r.value === z.F_MENU_VERSION.v4), l = S(() => {
|
|
676
676
|
const s = e.menu.modules.catalog;
|
|
677
677
|
return x(s, { selector: "name" });
|
|
678
678
|
}), u = S(() => {
|
|
@@ -686,14 +686,14 @@ const Pt = Ye(
|
|
|
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 = q(!1), v = q(1);
|
|
696
|
+
async function p() {
|
|
697
697
|
var y;
|
|
698
698
|
m.value = !0;
|
|
699
699
|
let s = e.menu.modules.catalog;
|
|
@@ -725,19 +725,19 @@ const Pt = 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 C = null, R = null;
|
|
732
|
+
function Q() {
|
|
733
|
+
R && (R(), R = null), C && C.stop(), C = Qe(!0), R = C.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
|
+
Q();
|
|
741
741
|
const me = S(() => [
|
|
742
742
|
{
|
|
743
743
|
label: "Main",
|
|
@@ -747,8 +747,8 @@ const Pt = Ye(
|
|
|
747
747
|
label: s.name,
|
|
748
748
|
value: s._id
|
|
749
749
|
}))
|
|
750
|
-
]),
|
|
751
|
-
const s =
|
|
750
|
+
]), Z = S(() => {
|
|
751
|
+
const s = h.value.modules.category;
|
|
752
752
|
return [
|
|
753
753
|
...U.value.item.addon ? [
|
|
754
754
|
{
|
|
@@ -760,11 +760,11 @@ const Pt = Ye(
|
|
|
760
760
|
...V(s, (d) => d.name)
|
|
761
761
|
];
|
|
762
762
|
}), ve = S(() => {
|
|
763
|
-
const s =
|
|
763
|
+
const s = h.value.modules.subCategory || [];
|
|
764
764
|
return V(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) => {
|
|
@@ -785,7 +785,7 @@ const Pt = Ye(
|
|
|
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,22 +800,22 @@ const Pt = 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
808
|
return T.fullVariantCombination(d).reduce((g, _) => (g[_.combinationKey] = _.selectionName.join(" / "), g), {});
|
|
809
809
|
}
|
|
810
|
-
const _e = S(() => V(
|
|
810
|
+
const _e = S(() => V(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
|
-
})), we = S(() => x(e.menu.modules.unit, { selector: "name" })), Me = S(() => x(
|
|
812
|
+
})), we = S(() => x(e.menu.modules.unit, { selector: "name" })), Me = S(() => x(ze(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), Ie = S(() => {
|
|
815
|
+
const s = He(e.menu.modules.sku);
|
|
816
816
|
return x(s, { selector: "code" });
|
|
817
817
|
}), U = S(() => {
|
|
818
|
-
const s = !e.currentCatalogId, d = r.value ===
|
|
818
|
+
const s = !e.currentCatalogId, d = r.value === z.F_MENU_VERSION.v4, y = !e.currentSchedulerId, g = {
|
|
819
819
|
create: s && y,
|
|
820
820
|
edit: s && y,
|
|
821
821
|
delete: s && y
|
|
@@ -886,7 +886,7 @@ const Pt = Ye(
|
|
|
886
886
|
function W(s) {
|
|
887
887
|
return `${s.systemCode}/${s.taxCode}`;
|
|
888
888
|
}
|
|
889
|
-
function
|
|
889
|
+
function Ce(s) {
|
|
890
890
|
const [d, y] = s.split("/");
|
|
891
891
|
return { systemCode: d, taxCode: y };
|
|
892
892
|
}
|
|
@@ -895,10 +895,10 @@ const Pt = Ye(
|
|
|
895
895
|
}
|
|
896
896
|
const ke = S(() => {
|
|
897
897
|
var g;
|
|
898
|
-
const s = ["SV5", "SV10"], d =
|
|
898
|
+
const s = ["SV5", "SV10"], d = Le.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 Pt = 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;
|
|
@@ -936,9 +936,9 @@ const Pt = 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 qe(g, e.menu.modules);
|
|
942
942
|
if (A !== !0) throw new Error(A);
|
|
943
943
|
}
|
|
944
944
|
const _ = await bt.updateMenuModule(e.menu, g);
|
|
@@ -973,7 +973,7 @@ const Pt = 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,
|
|
@@ -983,12 +983,12 @@ const Pt = Ye(
|
|
|
983
983
|
schedulers: c,
|
|
984
984
|
currentScheduler: i,
|
|
985
985
|
catalogOptions: me,
|
|
986
|
-
categories:
|
|
986
|
+
categories: Z,
|
|
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 Pt = Ye(
|
|
|
996
996
|
units: we,
|
|
997
997
|
recipes: Me,
|
|
998
998
|
cookingGuide: Ae,
|
|
999
|
-
skus:
|
|
999
|
+
skus: Ie,
|
|
1000
1000
|
rules: U,
|
|
1001
1001
|
taxSetting: ke,
|
|
1002
1002
|
// Action
|
|
@@ -1009,10 +1009,10 @@ const Pt = Ye(
|
|
|
1009
1009
|
setRestaurantAttrParams: Ve,
|
|
1010
1010
|
updateMenu: Te,
|
|
1011
1011
|
updateMenuSetting: Fe,
|
|
1012
|
-
computeMergedMenu:
|
|
1012
|
+
computeMergedMenu: p,
|
|
1013
1013
|
// helper
|
|
1014
1014
|
encodeTax: W,
|
|
1015
|
-
decodeTax:
|
|
1015
|
+
decodeTax: Ce,
|
|
1016
1016
|
getSelectedTax: Re,
|
|
1017
1017
|
mapVariant: ge,
|
|
1018
1018
|
// history
|
|
@@ -1022,10 +1022,10 @@ const Pt = Ye(
|
|
|
1022
1022
|
redoHistory: je,
|
|
1023
1023
|
// cleanup
|
|
1024
1024
|
$dispose: () => {
|
|
1025
|
-
w.cancel(), R && (R(), R = null),
|
|
1025
|
+
w.cancel(), R && (R(), R = null), C && (C.stop(), C = null), Ne();
|
|
1026
1026
|
},
|
|
1027
1027
|
$reinitialize: () => {
|
|
1028
|
-
|
|
1028
|
+
Q();
|
|
1029
1029
|
}
|
|
1030
1030
|
};
|
|
1031
1031
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as d, ref as g, watch as _, resolveComponent as S, createBlock as T, openBlock as f, unref as y, computed as h } from "vue";
|
|
2
2
|
import { useI18n as m } from "@feedmepos/mf-common";
|
|
3
3
|
import { useDialogChild as w, useDialog as x, useSnackbar as C } from "@feedmepos/ui-library";
|
|
4
|
-
import { u as k, G as M } from "./menu-
|
|
4
|
+
import { u as k, G as M } from "./menu-U8mwR2QD.js";
|
|
5
5
|
const v = /* @__PURE__ */ d({
|
|
6
6
|
__name: "AddPriceGroupDialog",
|
|
7
7
|
setup(s) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { defineComponent as ie, computed as Y, resolveComponent as _, createElementBlock as d, openBlock as u, createVNode as t, createCommentVNode as F, unref as n, toDisplayString as L, createElementVNode as h, withCtx as v, Fragment as N, renderList as M, createBlock as I, ref as H, Transition as se, createTextVNode as me } from "vue";
|
|
2
|
-
import { H as S, A as r, u as pe, I as ve, J as ue } from "./menu-
|
|
2
|
+
import { H as S, A as r, u as pe, I as ve, J as ue } from "./menu-U8mwR2QD.js";
|
|
3
3
|
import { useI18n as de } from "@feedmepos/mf-common";
|
|
4
4
|
import { components as _e } from "@feedmepos/ui-library";
|
|
5
|
-
import { _ as ne, a as fe } from "./customAttributes-
|
|
5
|
+
import { _ as ne, a as fe } from "./customAttributes-D9-zftG3.js";
|
|
6
6
|
import { u as ye } from "./discardConfirm-BHni0LNu.js";
|
|
7
|
-
import { u as he } from "./menu-
|
|
8
|
-
import { L as ge } from "./LinkProductSideSheet-
|
|
7
|
+
import { u as he } from "./menu-dIq2-n2M.js";
|
|
8
|
+
import { L as ge } from "./LinkProductSideSheet-Dl7ZCKLX.js";
|
|
9
9
|
const Ve = { class: "space-y-8" }, Fe = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "space-y-16"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as M, watch as _, ref as E, resolveComponent as f, createBlock as x, openBlock as A, unref as c, withCtx as C, createVNode as V } from "vue";
|
|
2
|
-
import { J as l, A as d, u as F } from "./menu-
|
|
2
|
+
import { J as l, A as d, u as F } from "./menu-U8mwR2QD.js";
|
|
3
3
|
import { useI18n as b } from "@feedmepos/mf-common";
|
|
4
4
|
import { useDialogChild as P } from "@feedmepos/ui-library";
|
|
5
|
-
import { u as v } from "./menuV2-
|
|
5
|
+
import { u as v } from "./menuV2-G2IOgnAS.js";
|
|
6
6
|
const y = /* @__PURE__ */ M({
|
|
7
7
|
__name: "AddSubcategoryDialogContentComponent",
|
|
8
8
|
props: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { u as C } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import "./menu-
|
|
1
|
+
import { u as C } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-dygqJ3VG.js";
|
|
2
|
+
import "./menu-U8mwR2QD.js";
|
|
3
3
|
var Z = {
|
|
4
4
|
defaultAmount: 0,
|
|
5
5
|
defaultCurrency: "USD",
|