@feedmepos/mf-menu 0.32.64-dev.1 → 0.32.64
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-CcCpnDUd.js → App-W8bH6kiT.js} +8 -8
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-uCZ06pwL.js → ApplyProduct.vue_vue_type_script_setup_true_lang-DvHmwIP2.js} +3 -3
- package/dist/{ApplyProductDialog.vue_vue_type_script_setup_true_lang-YlaEocnO.js → ApplyProductDialog.vue_vue_type_script_setup_true_lang-2nFIpZv4.js} +3 -3
- package/dist/{Catalog-BLpYToaa.js → Catalog-pywklogh.js} +6 -6
- package/dist/{Category-slad1Kl9.js → Category-CLs58F_F.js} +4 -4
- package/dist/{Category-huIVx-Pq.js → Category-UMDcymDA.js} +4 -4
- package/dist/{CookingGuide-k6g5-DZS.js → CookingGuide-Cefv83hr.js} +5 -5
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-Be5sbD3J.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-C9CvjWEO.js} +1 -1
- package/dist/{Group-DuclGQ8D.js → Group-CfxNpgp7.js} +1 -1
- package/dist/{Group-B8QPt_Mf.js → Group-Ujeo9noG.js} +3 -3
- package/dist/{Group.vue_vue_type_script_setup_true_lang-DvBL8b_Z.js → Group.vue_vue_type_script_setup_true_lang-C-eZ5PGS.js} +7 -7
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-C9na_pxa.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-qTEz4XWJ.js} +5 -5
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-C7y1o_cK.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-Kf10i_T2.js} +2697 -2697
- package/dist/{Ingredient-Z1niNy7S.js → Ingredient-CsHbFizZ.js} +4 -4
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-BtM5R-5S.js → InventoryBinding.vue_vue_type_script_setup_true_lang-NKoRT-LI.js} +2 -2
- package/dist/{LinkProductSideSheet-CUx5qi-A.js → LinkProductSideSheet-B-Trz4a6.js} +4 -4
- package/dist/{MenuSetting-CQzIlzZp.js → MenuSetting-BNWjJAp4.js} +7 -7
- package/dist/{OrderPacing-BiL0cgx1.js → OrderPacing-DhKmymC7.js} +5 -5
- package/dist/{PrintRoute-D1pZkpH_.js → PrintRoute-DaIY94Ts.js} +5 -5
- package/dist/{Product-Bg-dwe6e.js → Product-SBeMVZBU.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-BVQVhWAh.js → Product.vue_vue_type_script_setup_true_lang-CDoJwAFZ.js} +13 -13
- package/dist/{ProductInternalTools-B0kk7L-u.js → ProductInternalTools-BAHMukHo.js} +7 -7
- package/dist/{Products-Y7qUSXGq.js → Products-CvUK4ngP.js} +71 -71
- package/dist/{Publish-BgBw1yYD.js → Publish-BqI8LP_Y.js} +4 -4
- package/dist/{Recipe-BQWy65kw.js → Recipe--LCvPofA.js} +5 -5
- package/dist/{RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-DN09681x.js → RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-DaqG3ZEC.js} +1 -1
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-C7kaYvTF.js → RuleView.vue_vue_type_script_setup_true_lang-DsCNLIVd.js} +595 -595
- package/dist/{Scheduler-3c53XS3M.js → Scheduler-BkXNha9_.js} +3 -3
- package/dist/{ServingSequence-COJkc08j.js → ServingSequence-DvF8yZTp.js} +3 -3
- package/dist/{Setting-DY-P5PAu.js → Setting-dfdQhacG.js} +5 -5
- package/dist/{Subcategory-1-uYipz9.js → Subcategory-DoiEnCY-.js} +6 -6
- package/dist/{Takeaway-C3dwSDye.js → Takeaway-CfTKoZgq.js} +1 -1
- package/dist/{Takeaway-DTcdrd4N.js → Takeaway-Pyol2JIm.js} +4 -4
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-BQ60zhzJ.js → Takeaway.vue_vue_type_script_setup_true_lang-A2Uz3Vx5.js} +5 -5
- package/dist/{TranslationFieldSection.vue_vue_type_script_setup_true_lang-DOQjcZde.js → TranslationFieldSection.vue_vue_type_script_setup_true_lang-BAMLQtFW.js} +1 -1
- package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-CoK2Y57Z.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-Bx6Dfb9q.js} +2 -2
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BM1nnTTV.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Bex1NCnU.js} +14 -14
- package/dist/{Unit-CkJp-MxR.js → Unit-ODy76xeS.js} +2 -2
- package/dist/{Variant-Ck8V9o_n.js → Variant-BFUqQyub.js} +3 -3
- package/dist/{_id_-DVko2hJ3.js → _id_-DQO6Zi8b.js} +9 -9
- package/dist/{app-idZd8GBJ.js → app-BNF3d7ks.js} +1 -1
- package/dist/{app-CMpNs1Lv.js → app-BNqI06Lw.js} +32 -32
- package/dist/app.js +1 -1
- package/dist/assets/{linked-status-Oe5zalYU.js → linked-status-OJYsf1K1.js} +3 -3
- package/dist/assets/{menu-export-BZTDjkcV.js → menu-export-oSHHIKfH.js} +34 -34
- package/dist/assets/{override-menu-2ehtF8h1.js → override-menu-BCrsilnp.js} +3 -3
- package/dist/assets/{validate-menu-wNmLgJZW.js → validate-menu-CoDW8e4r.js} +2 -2
- package/dist/{catalog-C4zqfdRz.js → catalog-BiUOGVhu.js} +1 -1
- package/dist/{catalogSetting-CdrKAkWc.js → catalogSetting-Dt03eB79.js} +1 -1
- package/dist/{currency-zP5t_q3e.js → currency-I2Plgz6g.js} +1 -1
- package/dist/{dayjs.min-CVaDPO4u.js → dayjs.min-CVgq1MI5.js} +2 -2
- package/dist/{discardConfirm-D5TZC0up.js → discardConfirm-CU5H7XLz.js} +1 -1
- package/dist/{index-Bdjp_HoJ.js → index-D79td5bo.js} +6 -6
- package/dist/{index-CY_PF4JI.js → index-OUaL4kl7.js} +5 -5
- package/dist/{index.vue_vue_type_script_setup_true_lang-Cxq1w0By.js → index.vue_vue_type_script_setup_true_lang-BJ5dPd5h.js} +895 -895
- package/dist/{item-DF4sY8Lz.js → item-BPryyFAB.js} +19 -19
- package/dist/{jszip.min-CfredHU3.js → jszip.min-D3CS7h7J.js} +167 -167
- package/dist/{linkProducts-_ZMDyksQ.js → linkProducts-ClCfYWFx.js} +4 -4
- package/dist/{memberPricing-K5VG3VIu.js → memberPricing-CLr-Y_7e.js} +1 -1
- package/dist/{menu-CZxNlbpe.js → menu-gBc-za7C.js} +1 -1
- package/dist/{menuV2-BHwuCExt.js → menuV2-D7O1K9Ej.js} +84 -84
- package/dist/{order_pacing-Cme5qoFR.js → order_pacing-DVn2Kb9a.js} +5 -5
- package/dist/{priceTier-DSYN-IAO.js → priceTier-33L1xIZW.js} +1 -1
- package/dist/{rules-D4rAL20Q.js → rules-C7ujXDzl.js} +3 -3
- package/dist/{scheduler-J5Ea4WSr.js → scheduler-Dzj2Ed1a.js} +5 -5
- package/dist/{toExcel-XoL9W3Ev.js → toExcel-CGOr53pl.js} +2 -2
- package/dist/{unit-Bi2EnEOF.js → unit-CfREeFuX.js} +3 -3
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { computed as m } from "vue";
|
|
2
|
-
import { F, g as h, h as S, b as v, i as C, k as N, T, u as P, c as z } from "./index.vue_vue_type_script_setup_true_lang-
|
|
3
|
-
import { u as R } from "./menuV2-
|
|
4
|
-
import { C as w, h as E } from "./catalog-
|
|
2
|
+
import { F, g as h, h as S, b as v, i as C, k as N, T, u as P, c as z } from "./index.vue_vue_type_script_setup_true_lang-BJ5dPd5h.js";
|
|
3
|
+
import { u as R } from "./menuV2-D7O1K9Ej.js";
|
|
4
|
+
import { C as w, h as E } from "./catalog-BiUOGVhu.js";
|
|
5
5
|
import { useSnackbar as O, useDialog as A } from "@feedmepos/ui-library";
|
|
6
|
-
import { a as b } from "./LinkProductSideSheet-
|
|
6
|
+
import { a as b } from "./LinkProductSideSheet-B-Trz4a6.js";
|
|
7
7
|
function D() {
|
|
8
8
|
const e = R(), p = m(() => e.categorizedRawMenuItems.filter((o) => o.items.length > 0)), l = m(() => {
|
|
9
9
|
const o = e.currentCatalog;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as d, ref as _, watch as S, resolveComponent as b, createBlock as f, openBlock as y, unref as M, computed as T } from "vue";
|
|
2
|
-
import { u as h, b as w } from "./index.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { u as h, b as w } from "./index.vue_vue_type_script_setup_true_lang-BJ5dPd5h.js";
|
|
3
3
|
import { useI18n as l } from "@feedmepos/mf-common";
|
|
4
4
|
import { useDialogChild as x, useDialog as C, useSnackbar as P } from "@feedmepos/ui-library";
|
|
5
5
|
const k = /* @__PURE__ */ d({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed as n, onMounted as d, onBeforeUnmount as m } from "vue";
|
|
2
|
-
import { u as c } from "./index.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { u as c } from "./index.vue_vue_type_script_setup_true_lang-BJ5dPd5h.js";
|
|
3
3
|
import "@feedmepos/mf-common";
|
|
4
4
|
import "@feedmepos/ui-library";
|
|
5
5
|
function p() {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
var We = Object.defineProperty;
|
|
2
2
|
var Le = (e, t, n) => t in e ? We(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var ne = (e, t, n) => Le(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
import { l as ae } from "./discardConfirm-
|
|
5
|
-
import { defineStore as
|
|
6
|
-
import { shallowRef as N, ref as
|
|
7
|
-
import { d as C, f as ue, m as T, k as ie, ak as re, g as
|
|
4
|
+
import { l as ae } from "./discardConfirm-CU5H7XLz.js";
|
|
5
|
+
import { defineStore as qe } from "pinia";
|
|
6
|
+
import { shallowRef as N, ref as B, computed as S, shallowReactive as ze, effectScope as Be, watch as He } from "vue";
|
|
7
|
+
import { d as C, f as ue, m as T, k as ie, ak as re, g as H, O as x, c as L, s as V, X as oe, al as Ge, am as Je, a as Ye, Q as Qe, an as Xe, ao as Ze, M as et } from "./index.vue_vue_type_script_setup_true_lang-BJ5dPd5h.js";
|
|
8
8
|
import { useCoreStore as se } from "@feedmepos/mf-common";
|
|
9
9
|
import { useSnackbar as tt } from "@feedmepos/ui-library";
|
|
10
10
|
function nt(e) {
|
|
@@ -16,14 +16,14 @@ function nt(e) {
|
|
|
16
16
|
}
|
|
17
17
|
return delete t.variant, delete t.thumbnail, delete t.images, [t, ...n || []];
|
|
18
18
|
}
|
|
19
|
-
const rt = "/assets/linked-status-
|
|
19
|
+
const rt = "/assets/linked-status-OJYsf1K1.js", ot = "/assets/override-menu-BCrsilnp.js";
|
|
20
20
|
function st(e, t, n, s) {
|
|
21
21
|
const r = C(t), u = n ? r.modules.catalog.find((f) => f._id === n) : null, c = s ? r.modules.scheduler.find((f) => f._id === s) : null, a = u ? C(u) : void 0, d = n ? r.modules.catalog.filter((f) => f._id !== n) : [], l = c ? C(c) : void 0, g = e.reduce((f, v) => (f[v._id] = nt(v), f), {});
|
|
22
22
|
function y(f = []) {
|
|
23
|
-
const v = e.map((
|
|
23
|
+
const v = e.map((p) => p._id);
|
|
24
24
|
return [
|
|
25
|
-
...f.filter((
|
|
26
|
-
...Object.values(g).flatMap((
|
|
25
|
+
...f.filter((p) => !v.includes(p._id)),
|
|
26
|
+
...Object.values(g).flatMap((p) => p)
|
|
27
27
|
];
|
|
28
28
|
}
|
|
29
29
|
return a && s ? (a.override.scheduler = {
|
|
@@ -65,8 +65,8 @@ function F(e, t, n) {
|
|
|
65
65
|
const a = (l = e == null ? void 0 : e.groups) == null ? void 0 : l.find((f) => f._id === c._id);
|
|
66
66
|
let d;
|
|
67
67
|
return a ? d = ((g = c.items) == null ? void 0 : g.map((f) => {
|
|
68
|
-
var
|
|
69
|
-
const v = (
|
|
68
|
+
var p;
|
|
69
|
+
const v = (p = a.items) == null ? void 0 : p.find(
|
|
70
70
|
(b) => b._id === f._id && b.combinationKey === f.combinationKey
|
|
71
71
|
);
|
|
72
72
|
return F(v || f, t, n + 1);
|
|
@@ -188,11 +188,11 @@ function Tt(e, t) {
|
|
|
188
188
|
return r;
|
|
189
189
|
}, [])) || []).join(" / ");
|
|
190
190
|
}
|
|
191
|
-
const
|
|
191
|
+
const q = /* @__PURE__ */ new Map();
|
|
192
192
|
async function Kt(e, t) {
|
|
193
193
|
const n = `${e._id}-${e.updatedAt}-${t}`;
|
|
194
|
-
if (
|
|
195
|
-
return
|
|
194
|
+
if (q.has(n))
|
|
195
|
+
return q.get(n);
|
|
196
196
|
const s = await ue(
|
|
197
197
|
rt,
|
|
198
198
|
JSON.stringify({
|
|
@@ -200,7 +200,7 @@ async function Kt(e, t) {
|
|
|
200
200
|
itemId: t
|
|
201
201
|
})
|
|
202
202
|
);
|
|
203
|
-
return
|
|
203
|
+
return q.set(n, s), s;
|
|
204
204
|
}
|
|
205
205
|
async function ce(e, t, n) {
|
|
206
206
|
return await ue(ot, {
|
|
@@ -209,13 +209,13 @@ async function ce(e, t, n) {
|
|
|
209
209
|
schedulerId: n
|
|
210
210
|
});
|
|
211
211
|
}
|
|
212
|
-
const
|
|
212
|
+
const z = /* @__PURE__ */ new Map();
|
|
213
213
|
async function it(e, t, n) {
|
|
214
214
|
const s = `${e._id}-${e.updatedAt}-${t || "null"}-${n || "null"}`;
|
|
215
|
-
if (
|
|
216
|
-
return
|
|
215
|
+
if (z.has(s))
|
|
216
|
+
return z.get(s);
|
|
217
217
|
const r = await ce(e, t, n);
|
|
218
|
-
return
|
|
218
|
+
return z.set(s, r), r;
|
|
219
219
|
}
|
|
220
220
|
async function Pt(e, t, n) {
|
|
221
221
|
var c, a;
|
|
@@ -230,9 +230,9 @@ async function Pt(e, t, n) {
|
|
|
230
230
|
if (l) {
|
|
231
231
|
const y = (a = d.items) == null ? void 0 : a.filter((v) => v._id === n && v.combinationKey), f = [l, ...y].map((v) => {
|
|
232
232
|
var M, I;
|
|
233
|
-
const
|
|
233
|
+
const p = v.combinationKey ? (I = (M = g == null ? void 0 : g.variant) == null ? void 0 : M.variantCombinations) == null ? void 0 : I.find(
|
|
234
234
|
(k) => k.combinationKey === v.combinationKey
|
|
235
|
-
) : g, b =
|
|
235
|
+
) : g, b = p && g ? u(g, p) : v;
|
|
236
236
|
return u(b, v);
|
|
237
237
|
});
|
|
238
238
|
r.push({
|
|
@@ -319,32 +319,32 @@ function dt(e, t, n) {
|
|
|
319
319
|
const s = { _t: "a" }, r = ((f = n == null ? void 0 : n.arrays) == null ? void 0 : f.detectMove) !== !1, u = ((v = n == null ? void 0 : n.arrays) == null ? void 0 : v.includeValueOnMove) === !0, c = n == null ? void 0 : n.objectHash;
|
|
320
320
|
let a = r ? lt(e, t, c) : [];
|
|
321
321
|
if (!c && e.length === t.length && e.length > 0 && a.length < e.length) {
|
|
322
|
-
const
|
|
323
|
-
if (
|
|
322
|
+
const p = E(e[0]) || Array.isArray(e[0]), b = a.length > 0;
|
|
323
|
+
if (p || b) {
|
|
324
324
|
a = [];
|
|
325
325
|
for (let M = 0; M < e.length; M++)
|
|
326
326
|
a.push({ leftIndex: M, rightIndex: M });
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
|
-
new Set(a.map((
|
|
330
|
-
const d = new Set(a.map((
|
|
331
|
-
for (const
|
|
332
|
-
l.set(
|
|
333
|
-
for (let
|
|
334
|
-
const b = l.get(
|
|
329
|
+
new Set(a.map((p) => p.leftIndex));
|
|
330
|
+
const d = new Set(a.map((p) => p.rightIndex)), l = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map();
|
|
331
|
+
for (const p of a)
|
|
332
|
+
l.set(p.leftIndex, p.rightIndex), g.set(p.rightIndex, p.leftIndex);
|
|
333
|
+
for (let p = 0; p < e.length; p++) {
|
|
334
|
+
const b = l.get(p);
|
|
335
335
|
if (b !== void 0) {
|
|
336
|
-
const M = J(e[
|
|
337
|
-
if (M !== void 0 && (s[b] = M), r && b !==
|
|
338
|
-
const I = `_${
|
|
336
|
+
const M = J(e[p], t[b], n);
|
|
337
|
+
if (M !== void 0 && (s[b] = M), r && b !== p) {
|
|
338
|
+
const I = `_${p}`, k = u ? [e[p], b, K] : ["", b, K];
|
|
339
339
|
s[I] = k;
|
|
340
340
|
}
|
|
341
341
|
} else {
|
|
342
|
-
const M = `_${
|
|
343
|
-
s[M] = [e[
|
|
342
|
+
const M = `_${p}`;
|
|
343
|
+
s[M] = [e[p], w, w];
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
|
-
for (let
|
|
347
|
-
d.has(
|
|
346
|
+
for (let p = 0; p < t.length; p++)
|
|
347
|
+
d.has(p) || (s[p] = [t[p]]);
|
|
348
348
|
const y = Object.keys(s);
|
|
349
349
|
if (!(y.length === 1 && y[0] === "_t"))
|
|
350
350
|
return s;
|
|
@@ -472,7 +472,7 @@ function gt(e) {
|
|
|
472
472
|
}
|
|
473
473
|
return t;
|
|
474
474
|
}
|
|
475
|
-
function
|
|
475
|
+
function pt(e) {
|
|
476
476
|
const t = {};
|
|
477
477
|
for (const n in e) {
|
|
478
478
|
const s = e[n];
|
|
@@ -497,13 +497,13 @@ function Q(e) {
|
|
|
497
497
|
if (e.length === 3 && e[2] === K)
|
|
498
498
|
return e;
|
|
499
499
|
}
|
|
500
|
-
return E(e) && e._t === "a" ? gt(e) : E(e) ?
|
|
500
|
+
return E(e) && e._t === "a" ? gt(e) : E(e) ? pt(e) : e;
|
|
501
501
|
}
|
|
502
502
|
}
|
|
503
503
|
function de(e) {
|
|
504
504
|
return Q(e);
|
|
505
505
|
}
|
|
506
|
-
function
|
|
506
|
+
function ht(e, t, n) {
|
|
507
507
|
const s = de(t);
|
|
508
508
|
return le(e, s);
|
|
509
509
|
}
|
|
@@ -522,7 +522,7 @@ class _t {
|
|
|
522
522
|
return de(t);
|
|
523
523
|
}
|
|
524
524
|
unpatch(t, n) {
|
|
525
|
-
return
|
|
525
|
+
return ht(t, n, this.options);
|
|
526
526
|
}
|
|
527
527
|
clone(t) {
|
|
528
528
|
return O(t);
|
|
@@ -541,14 +541,14 @@ function bt({
|
|
|
541
541
|
includeValueOnMove: !1
|
|
542
542
|
},
|
|
543
543
|
cloneDiffValues: !1
|
|
544
|
-
}), n = N(null), s = N([]), r =
|
|
544
|
+
}), n = N(null), s = N([]), r = B(-1), u = N(null), c = S(() => r.value > 0), a = S(() => r.value < s.value.length - 1);
|
|
545
545
|
function d(v) {
|
|
546
546
|
if (n.value === null) {
|
|
547
547
|
n.value = C(v), u.value = C(v), s.value = [{ delta: null }], r.value = 0;
|
|
548
548
|
return;
|
|
549
549
|
}
|
|
550
|
-
const
|
|
551
|
-
if (r.value < s.value.length - 1 && (s.value = s.value.slice(0, r.value + 1)), s.value.push({ delta:
|
|
550
|
+
const p = t.diff(u.value, v);
|
|
551
|
+
if (r.value < s.value.length - 1 && (s.value = s.value.slice(0, r.value + 1)), s.value.push({ delta: p }), r.value++, u.value = C(v), s.value.length > e) {
|
|
552
552
|
const b = s.value[1].delta;
|
|
553
553
|
b && n.value && (n.value = t.patch(C(n.value), b)), s.value.shift(), r.value--;
|
|
554
554
|
}
|
|
@@ -556,12 +556,12 @@ function bt({
|
|
|
556
556
|
function l(v) {
|
|
557
557
|
if (!n.value || v < 0 || v >= s.value.length)
|
|
558
558
|
return;
|
|
559
|
-
let
|
|
559
|
+
let p = C(n.value);
|
|
560
560
|
for (let b = 1; b <= v; b++) {
|
|
561
561
|
const M = s.value[b];
|
|
562
|
-
M.delta && (
|
|
562
|
+
M.delta && (p = t.patch(p, M.delta));
|
|
563
563
|
}
|
|
564
|
-
return
|
|
564
|
+
return p;
|
|
565
565
|
}
|
|
566
566
|
function g() {
|
|
567
567
|
if (c.value) {
|
|
@@ -591,7 +591,7 @@ function bt({
|
|
|
591
591
|
}
|
|
592
592
|
const Mt = {
|
|
593
593
|
async updateMenuModule(e, t) {
|
|
594
|
-
const n =
|
|
594
|
+
const n = H.RequestRunner.operation(t, e.modules);
|
|
595
595
|
if (n.validateError.length > 0)
|
|
596
596
|
throw new Error(n.validateError.join(`
|
|
597
597
|
`));
|
|
@@ -639,10 +639,10 @@ function wt() {
|
|
|
639
639
|
}
|
|
640
640
|
};
|
|
641
641
|
}
|
|
642
|
-
const $t =
|
|
642
|
+
const $t = qe(
|
|
643
643
|
"mf-menu-store-v2",
|
|
644
644
|
() => {
|
|
645
|
-
const e =
|
|
645
|
+
const e = ze(wt()), t = se(), n = tt(), s = S(() => e.menu.modules.serveSequence ? x(e.menu.modules.serveSequence, {
|
|
646
646
|
selector: "position"
|
|
647
647
|
}) : []), r = S(() => {
|
|
648
648
|
var o;
|
|
@@ -667,19 +667,19 @@ const $t = ze(
|
|
|
667
667
|
function g(o, i = !0) {
|
|
668
668
|
e.menu = { ...o, _rev: e.menu._rev }, i && D.push(e.menu);
|
|
669
669
|
}
|
|
670
|
-
const y = N(me()), f =
|
|
671
|
-
async function
|
|
670
|
+
const y = N(me()), f = B(!1), v = B(1);
|
|
671
|
+
async function p() {
|
|
672
672
|
var m;
|
|
673
673
|
f.value = !0;
|
|
674
674
|
let o = e.menu.modules.catalog;
|
|
675
675
|
if (a.value && ((m = a.value.linkItemRules) != null && m.length)) {
|
|
676
|
-
const
|
|
676
|
+
const h = T.populateCatalog({
|
|
677
677
|
catalog: a.value,
|
|
678
678
|
ruleGroupSettings: e.menu.ruleGroupSettings,
|
|
679
679
|
items: e.menu.modules.item,
|
|
680
680
|
...e.currentRestaurantAttrParams ?? {}
|
|
681
681
|
});
|
|
682
|
-
o = e.menu.modules.catalog.map((_) => _._id === (
|
|
682
|
+
o = e.menu.modules.catalog.map((_) => _._id === (h == null ? void 0 : h._id) ? h : _);
|
|
683
683
|
}
|
|
684
684
|
const i = await ce(
|
|
685
685
|
{
|
|
@@ -693,19 +693,19 @@ const $t = ze(
|
|
|
693
693
|
e.currentSchedulerId
|
|
694
694
|
);
|
|
695
695
|
if (e.currentSchedulerId != null) {
|
|
696
|
-
const
|
|
696
|
+
const h = e.menu.modules.catalog.find(
|
|
697
697
|
(R) => R._id === e.currentCatalogId
|
|
698
|
-
), _ =
|
|
698
|
+
), _ = h ? h.override.scheduler[e.currentSchedulerId] : e.menu.modules.scheduler.find(
|
|
699
699
|
(R) => R._id === e.currentSchedulerId
|
|
700
700
|
), A = new Set(((_ == null ? void 0 : _.items) || []).map((R) => R._id));
|
|
701
701
|
i.modules.item = i.modules.item.filter((R) => A.has(R._id));
|
|
702
702
|
}
|
|
703
703
|
return y.value = i, f.value = !1, v.value = v.value + 1, i;
|
|
704
704
|
}
|
|
705
|
-
const M = ae.debounce(
|
|
705
|
+
const M = ae.debounce(p, 200);
|
|
706
706
|
let I = null, k = null;
|
|
707
707
|
function X() {
|
|
708
|
-
k && (k(), k = null), I && I.stop(), I =
|
|
708
|
+
k && (k(), k = null), I && I.stop(), I = Be(!0), k = I.run(() => He(
|
|
709
709
|
() => [e.menu, e.currentCatalogId, e.currentSchedulerId],
|
|
710
710
|
() => {
|
|
711
711
|
f.value || M();
|
|
@@ -742,9 +742,9 @@ const $t = ze(
|
|
|
742
742
|
let o = y.value.modules.item;
|
|
743
743
|
if (a.value) {
|
|
744
744
|
const m = (i = a.value) == null ? void 0 : i.override.items;
|
|
745
|
-
o = o.filter((
|
|
745
|
+
o = o.filter((h) => {
|
|
746
746
|
var A;
|
|
747
|
-
const _ = (A = m == null ? void 0 : m[
|
|
747
|
+
const _ = (A = m == null ? void 0 : m[h._id]) == null ? void 0 : A.find(
|
|
748
748
|
(R) => !R.combinationKey
|
|
749
749
|
);
|
|
750
750
|
return (_ == null ? void 0 : _.orderFrom) !== ie.enum.NONE;
|
|
@@ -752,15 +752,15 @@ const $t = ze(
|
|
|
752
752
|
}
|
|
753
753
|
return V(o, (m) => m.code || m.name);
|
|
754
754
|
}), ye = S(() => {
|
|
755
|
-
const o = e.menu.modules.category, i = V(o, (
|
|
756
|
-
(
|
|
755
|
+
const o = e.menu.modules.category, i = V(o, (h) => h.name).reduce(
|
|
756
|
+
(h, _, A) => (h[_._id] = A, h),
|
|
757
757
|
{ "": 0 }
|
|
758
758
|
), m = e.menu.modules.item;
|
|
759
759
|
return V(
|
|
760
760
|
m,
|
|
761
|
-
(
|
|
762
|
-
).reduce((
|
|
763
|
-
}), ge = S(() => oe(j.value, Z.value, ee.value)),
|
|
761
|
+
(h) => h.code || h.name
|
|
762
|
+
).reduce((h, _, A) => (h[_._id] = A + i[_.category || ""], h), {});
|
|
763
|
+
}), ge = S(() => oe(j.value, Z.value, ee.value)), pe = S(() => {
|
|
764
764
|
const o = U.value.item.addon ? [
|
|
765
765
|
{
|
|
766
766
|
_id: e.currentCatalogId ? "" : null,
|
|
@@ -778,9 +778,9 @@ const $t = ze(
|
|
|
778
778
|
const o = y.value.modules.variant;
|
|
779
779
|
return x(o, { selector: "name" });
|
|
780
780
|
});
|
|
781
|
-
function
|
|
782
|
-
const i = o.map((
|
|
783
|
-
return T.fullVariantCombination(i).reduce((
|
|
781
|
+
function he(o = []) {
|
|
782
|
+
const i = o.map((h) => j.value.find((_) => _._id === h)).filter((h) => !!h);
|
|
783
|
+
return T.fullVariantCombination(i).reduce((h, _) => (h[_.combinationKey] = _.selectionName.join(" / "), h), {});
|
|
784
784
|
}
|
|
785
785
|
const _e = S(() => V(y.value.modules.group, (o) => o.name)), Se = S(() => x(y.value.modules.takeaway, { selector: "name" })), be = S(() => x(e.menu.modules.printDepartment || [], {
|
|
786
786
|
selector: "name"
|
|
@@ -792,20 +792,20 @@ const $t = ze(
|
|
|
792
792
|
}), Ie = S(() => {
|
|
793
793
|
const o = /* @__PURE__ */ new Map();
|
|
794
794
|
return e.menu.modules.item.forEach((i) => {
|
|
795
|
-
var m,
|
|
796
|
-
i.code && o.set(i.code, (o.get(i.code) || 0) + 1), (
|
|
795
|
+
var m, h;
|
|
796
|
+
i.code && o.set(i.code, (o.get(i.code) || 0) + 1), (h = (m = i.variant) == null ? void 0 : m.variantCombinations) == null || h.forEach((_) => {
|
|
797
797
|
_.code && o.set(_.code, (o.get(_.code) || 0) + 1);
|
|
798
798
|
});
|
|
799
799
|
}), o;
|
|
800
800
|
}), U = S(() => {
|
|
801
|
-
const o = !e.currentCatalogId, i = r.value === L.F_MENU_VERSION.v4, m = !e.currentSchedulerId,
|
|
801
|
+
const o = !e.currentCatalogId, i = r.value === L.F_MENU_VERSION.v4, m = !e.currentSchedulerId, h = {
|
|
802
802
|
create: o && m,
|
|
803
803
|
edit: o && m,
|
|
804
804
|
delete: o && m
|
|
805
805
|
};
|
|
806
806
|
return {
|
|
807
807
|
item: {
|
|
808
|
-
...
|
|
808
|
+
...h,
|
|
809
809
|
edit: i || m,
|
|
810
810
|
sort: i && o && m,
|
|
811
811
|
addon: i,
|
|
@@ -841,12 +841,12 @@ const $t = ze(
|
|
|
841
841
|
takeawayConfig: i
|
|
842
842
|
},
|
|
843
843
|
category: {
|
|
844
|
-
...
|
|
844
|
+
...h,
|
|
845
845
|
sort: o,
|
|
846
846
|
overrideSequence: i
|
|
847
847
|
},
|
|
848
848
|
group: {
|
|
849
|
-
...
|
|
849
|
+
...h,
|
|
850
850
|
edit: i || m,
|
|
851
851
|
sort: o,
|
|
852
852
|
applyProduct: o,
|
|
@@ -860,7 +860,7 @@ const $t = ze(
|
|
|
860
860
|
override: i
|
|
861
861
|
},
|
|
862
862
|
takeaway: {
|
|
863
|
-
...
|
|
863
|
+
...h,
|
|
864
864
|
edit: (i || o) && m,
|
|
865
865
|
name: o
|
|
866
866
|
},
|
|
@@ -879,10 +879,10 @@ const $t = ze(
|
|
|
879
879
|
return { systemCode: i, taxCode: m };
|
|
880
880
|
}
|
|
881
881
|
function Ee(o, i, m) {
|
|
882
|
-
return (o ?? i ?? []).map((
|
|
882
|
+
return (o ?? i ?? []).map((h) => W(h)).find((h) => m.some((_) => _.value === h));
|
|
883
883
|
}
|
|
884
884
|
const Re = S(() => {
|
|
885
|
-
var
|
|
885
|
+
var h;
|
|
886
886
|
const o = ["SV5", "SV10"], i = Ye.Country.getCountryFlattenTaxes(
|
|
887
887
|
se().currentCountry.value
|
|
888
888
|
), m = i.filter((_) => u.value || !o.includes(_.taxCode)).map((_) => ({
|
|
@@ -893,7 +893,7 @@ const $t = ze(
|
|
|
893
893
|
}
|
|
894
894
|
}));
|
|
895
895
|
return m.sort((_, A) => _.label.localeCompare(A.label, void 0, { numeric: !0 })), {
|
|
896
|
-
systemCode: (
|
|
896
|
+
systemCode: (h = i[0]) == null ? void 0 : h.systemCode,
|
|
897
897
|
countryTaxOptions: m
|
|
898
898
|
};
|
|
899
899
|
}), xe = async () => {
|
|
@@ -921,19 +921,19 @@ const $t = ze(
|
|
|
921
921
|
}, Ke = async (o, i) => {
|
|
922
922
|
const m = Array.isArray(o) ? o : [o];
|
|
923
923
|
if (!m.length) return;
|
|
924
|
-
const
|
|
924
|
+
const h = m.map((_) => ({
|
|
925
925
|
..._,
|
|
926
926
|
_id: e.menu._id,
|
|
927
927
|
_rev: e.menu._rev
|
|
928
928
|
}));
|
|
929
929
|
try {
|
|
930
|
-
if (i ||
|
|
931
|
-
(A) => [
|
|
930
|
+
if (i || h.some(
|
|
931
|
+
(A) => [H.F_OPERATION_TYPE.delete, H.F_OPERATION_TYPE.deleteMany].includes(A.operation)
|
|
932
932
|
)) {
|
|
933
|
-
const A = await Xe(
|
|
933
|
+
const A = await Xe(h, e.menu.modules);
|
|
934
934
|
if (A !== !0) throw new Error(A);
|
|
935
935
|
}
|
|
936
|
-
const _ = await Mt.updateMenuModule(e.menu,
|
|
936
|
+
const _ = await Mt.updateMenuModule(e.menu, h);
|
|
937
937
|
return g(_.menu), _;
|
|
938
938
|
} catch (_) {
|
|
939
939
|
n.open({
|
|
@@ -981,7 +981,7 @@ const $t = ze(
|
|
|
981
981
|
sortedItems: ye,
|
|
982
982
|
itemCodeMap: Ie,
|
|
983
983
|
categorizedItems: ge,
|
|
984
|
-
categorizedRawMenuItems:
|
|
984
|
+
categorizedRawMenuItems: pe,
|
|
985
985
|
variants: j,
|
|
986
986
|
groups: _e,
|
|
987
987
|
takeaways: Se,
|
|
@@ -1002,12 +1002,12 @@ const $t = ze(
|
|
|
1002
1002
|
setRestaurantAttrParams: Te,
|
|
1003
1003
|
updateMenu: Ke,
|
|
1004
1004
|
updateMenuSetting: Pe,
|
|
1005
|
-
computeMergedMenu:
|
|
1005
|
+
computeMergedMenu: p,
|
|
1006
1006
|
// helper
|
|
1007
1007
|
encodeTax: W,
|
|
1008
1008
|
decodeTax: ke,
|
|
1009
1009
|
getSelectedTax: Ee,
|
|
1010
|
-
mapVariant:
|
|
1010
|
+
mapVariant: he,
|
|
1011
1011
|
// history
|
|
1012
1012
|
canUndoHistory: $e,
|
|
1013
1013
|
canRedoHistory: Fe,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { defineComponent as q, ref as V, h as S, computed as N, resolveComponent as I, createBlock as X, openBlock as w, unref as l, withCtx as x, createElementVNode as k, createVNode as v, watch as Z, createElementBlock as L, Fragment as M, renderSlot as ee, renderList as H, toDisplayString as $, createCommentVNode as ae, getCurrentInstance as te, render as ne } from "vue";
|
|
2
|
-
import { u as Y, i as oe, b as le, g as B, h as K } from "./index.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { u as Y, i as oe, b as le, g as B, h as K } from "./index.vue_vue_type_script_setup_true_lang-BJ5dPd5h.js";
|
|
3
3
|
import { useI18n as R } from "@feedmepos/mf-common";
|
|
4
4
|
import { components as A, FmButtonVariant as re, FmButtonColorThemeVariant as j, useSnackbar as ie } from "@feedmepos/ui-library";
|
|
5
|
-
import { _ as J, u as se } from "./RuleView.vue_vue_type_script_setup_true_lang-
|
|
5
|
+
import { _ as J, u as se } from "./RuleView.vue_vue_type_script_setup_true_lang-DsCNLIVd.js";
|
|
6
6
|
import { c as de } from "./object-DVUNCr7w.js";
|
|
7
|
-
import { _ as ue } from "./app-
|
|
8
|
-
import { L as ce } from "./LinkProductSideSheet-
|
|
7
|
+
import { _ as ue } from "./app-BNqI06Lw.js";
|
|
8
|
+
import { L as ce } from "./LinkProductSideSheet-B-Trz4a6.js";
|
|
9
9
|
import { u as me } from "./search-BAPEUu1R.js";
|
|
10
|
-
import { _ as pe } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-
|
|
10
|
+
import { _ as pe } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-Bx6Dfb9q.js";
|
|
11
11
|
import { c as ge } from "./check-C9mY6LiX.js";
|
|
12
12
|
import { g as G } from "./translation-fNx6yEpy.js";
|
|
13
13
|
import { c as _e } from "./createComponentProgrammatically-Bt2rn1IQ.js";
|
|
@@ -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, b as M } from "./index.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { u as k, b as M } from "./index.vue_vue_type_script_setup_true_lang-BJ5dPd5h.js";
|
|
5
5
|
const b = /* @__PURE__ */ d({
|
|
6
6
|
__name: "AddPriceGroupDialog",
|
|
7
7
|
setup(s) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as I, watch as P, ref as E, computed as w, resolveComponent as _, createElementBlock as h, openBlock as F, Fragment as M, createVNode as f, unref as g, withCtx as b, createElementVNode as O, renderList as q, toDisplayString as S } from "vue";
|
|
2
|
-
import { g as v, h as C, u as Y } from "./index.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { g as v, h as C, u as Y } from "./index.vue_vue_type_script_setup_true_lang-BJ5dPd5h.js";
|
|
3
3
|
import { useI18n as D } from "@feedmepos/mf-common";
|
|
4
4
|
import { useDialogChild as k } from "@feedmepos/ui-library";
|
|
5
|
-
import { u as R } from "./menuV2-
|
|
6
|
-
import { _ as $ } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-
|
|
5
|
+
import { u as R } from "./menuV2-D7O1K9Ej.js";
|
|
6
|
+
import { _ as $ } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-Bx6Dfb9q.js";
|
|
7
7
|
import { g as N } from "./translation-fNx6yEpy.js";
|
|
8
8
|
const B = { class: "py-12 px-16 space-y-4" }, U = /* @__PURE__ */ I({
|
|
9
9
|
__name: "AddSubcategoryDialogContentComponent",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineComponent as re, computed as N, resolveComponent as v, createElementBlock as d, openBlock as u, createVNode as t, createCommentVNode as V, unref as n, toDisplayString as O, createElementVNode as _, withCtx as p, Fragment as R, renderList as I, createBlock as q, ref as B, Transition as de, createTextVNode as fe } from "vue";
|
|
2
|
-
import { u as ye, l as _e } from "./discardConfirm-
|
|
3
|
-
import { d as w, z as $, u as he, F as ge, A as L, g as se, h as ie, P as ce } from "./index.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { u as ye, l as _e } from "./discardConfirm-CU5H7XLz.js";
|
|
3
|
+
import { d as w, z as $, u as he, F as ge, A as L, g as se, h as ie, P as ce } from "./index.vue_vue_type_script_setup_true_lang-BJ5dPd5h.js";
|
|
4
4
|
import { useI18n as me } from "@feedmepos/mf-common";
|
|
5
5
|
import { components as Ve } from "@feedmepos/ui-library";
|
|
6
6
|
import { _ as ke } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
|
|
7
|
-
import { _ as ue } from "./RuleView.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
import { u as Fe } from "./menu-
|
|
9
|
-
import { L as be } from "./LinkProductSideSheet-
|
|
7
|
+
import { _ as ue } from "./RuleView.vue_vue_type_script_setup_true_lang-DsCNLIVd.js";
|
|
8
|
+
import { u as Fe } from "./menu-gBc-za7C.js";
|
|
9
|
+
import { L as be } from "./LinkProductSideSheet-B-Trz4a6.js";
|
|
10
10
|
const xe = { class: "space-y-8" }, Ce = {
|
|
11
11
|
key: 0,
|
|
12
12
|
class: "space-y-16"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { u as C } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import "./discardConfirm-
|
|
1
|
+
import { u as C } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-Kf10i_T2.js";
|
|
2
|
+
import "./discardConfirm-CU5H7XLz.js";
|
|
3
3
|
var Z = {
|
|
4
4
|
defaultAmount: 0,
|
|
5
5
|
defaultCurrency: "USD",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineStore as H } from "pinia";
|
|
2
2
|
import { defineComponent as M, computed as x, ref as A, watch as S, resolveComponent as V, createBlock as J, openBlock as F, withCtx as w, createVNode as m, createElementVNode as f, normalizeClass as Q, createElementBlock as C, toDisplayString as k, unref as l, Fragment as N, renderSlot as X, renderList as Z, getCurrentInstance as ee } from "vue";
|
|
3
|
-
import { D as O, E as te, B as P, d as E, i as $, b as j, m as h, C as ne, g as T, h as D, u as oe } from "./index.vue_vue_type_script_setup_true_lang-
|
|
3
|
+
import { D as O, E as te, B as P, d as E, i as $, b as j, m as h, C as ne, g as T, h as D, u as oe } from "./index.vue_vue_type_script_setup_true_lang-BJ5dPd5h.js";
|
|
4
4
|
import { useI18n as q } from "@feedmepos/mf-common";
|
|
5
5
|
import { useSnackbar as I, components as ae, useDialog as le, FmButtonVariant as ue } from "@feedmepos/ui-library";
|
|
6
|
-
import { u as ie, l as se } from "./discardConfirm-
|
|
6
|
+
import { u as ie, l as se } from "./discardConfirm-CU5H7XLz.js";
|
|
7
7
|
import { c as re } from "./check-C9mY6LiX.js";
|
|
8
8
|
import "./RuleConditionSelector.vue_vue_type_style_index_0_lang-CK8z7qA8.js";
|
|
9
|
-
import "./menuV2-
|
|
9
|
+
import "./menuV2-D7O1K9Ej.js";
|
|
10
10
|
import "./app-5fxKLAzS.js";
|
|
11
11
|
/* empty css */
|
|
12
12
|
import { c as me } from "./createComponentProgrammatically-Bt2rn1IQ.js";
|