@feedmepos/mf-menu 0.32.46-dev.2 → 0.32.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-DnmPW7GQ.js → App-CNSCmSlO.js} +7 -7
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-BN_pomak.js → ApplyProduct.vue_vue_type_script_setup_true_lang-Dfp2ANHQ.js} +3 -3
- package/dist/{Catalog-gxj-MZB8.js → Catalog-beKeWiZH.js} +6 -6
- package/dist/{Category-CqWHFR6I.js → Category-BFLuZkJe.js} +5 -5
- package/dist/{Category-JHb56PfQ.js → Category-DUbQ4H7b.js} +4 -4
- package/dist/{CookingGuide-DNMfIDDf.js → CookingGuide-DFfSrALI.js} +4 -4
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-BYdToHa3.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-Bdwyjy4v.js} +1 -1
- package/dist/{Group-DXEgfQ_e.js → Group-DOwOFlWe.js} +3 -3
- package/dist/{Group-bxjyN23A.js → Group-Dd2aZOB4.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-DPhYCl15.js → Group.vue_vue_type_script_setup_true_lang-_KWjLLDJ.js} +8 -8
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-DAsxXqGu.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-C8eQ7e1r.js} +5 -5
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-BuD8TeFi.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-Ckv9GH8J.js} +3208 -3208
- package/dist/{Ingredient-BAnjcaO0.js → Ingredient-DmMRcId1.js} +3 -3
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-CppjxcTA.js → InventoryBinding.vue_vue_type_script_setup_true_lang-BCYTY2mq.js} +2 -2
- package/dist/{LinkProductSideSheet-CvWcioxX.js → LinkProductSideSheet-ClQgUxuK.js} +3 -3
- package/dist/{MenuSetting-DCQM7rh6.js → MenuSetting-BvcvlLdQ.js} +5 -5
- package/dist/{PrintRoute-Be0WG4oQ.js → PrintRoute-CkBY25oP.js} +4 -4
- package/dist/{Product-DfYmo4vJ.js → Product-BaBnkf6b.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-BsRZ0VVW.js → Product.vue_vue_type_script_setup_true_lang-Cp6mMmyN.js} +13 -13
- package/dist/{ProductInternalTools-D2QTAjE7.js → ProductInternalTools-DSUvws12.js} +6 -6
- package/dist/Products-DFIdy__F.js +307 -0
- package/dist/{Publish-BfEtLeeh.js → Publish-DHdq__q3.js} +3 -3
- package/dist/{Recipe-ssNUNy2j.js → Recipe-BMRmhxa7.js} +4 -4
- package/dist/{RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-DHnuxBck.js → RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-BG9ShMmO.js} +1 -1
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-CkpwtUSB.js → RuleView.vue_vue_type_script_setup_true_lang-DvlHPa_5.js} +366 -366
- package/dist/{Scheduler-CAUHWrZs.js → Scheduler-BJvpYBQS.js} +3 -3
- package/dist/{ServingSequence-D12rqxa8.js → ServingSequence-BIt86YO4.js} +3 -3
- package/dist/{Setting-pJ06C7wS.js → Setting-DrfwhTG3.js} +5 -5
- package/dist/{Subcategory-Dfd-qx6m.js → Subcategory-wVEIoIa-.js} +7 -7
- package/dist/{Takeaway-Bnat0taD.js → Takeaway-3yve0nwN.js} +4 -4
- package/dist/{Takeaway-Cv-kA3M_.js → Takeaway-DpG5pggY.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-9aZi7wvY.js → Takeaway.vue_vue_type_script_setup_true_lang-CDrDWuLP.js} +6 -6
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-C3Sk0LVd.js → Thumbnail.vue_vue_type_script_setup_true_lang-DgKx0aBJ.js} +4 -4
- package/dist/{TranslationFieldSection.vue_vue_type_script_setup_true_lang-5RV7_0Wc.js → TranslationFieldSection.vue_vue_type_script_setup_true_lang-DGzGvWli.js} +1 -1
- package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-BBXAoJje.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-Cg1_gsJZ.js} +2 -2
- package/dist/{TranslationViewChip.vue_vue_type_script_setup_true_lang-CIGgeuKb.js → TranslationViewChip.vue_vue_type_script_setup_true_lang-w63nUs1m.js} +1 -1
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-D9EEpjV6.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-D4q-luQO.js} +14 -14
- package/dist/{Unit-DeegDDRz.js → Unit-BTKfmyIp.js} +2 -2
- package/dist/{Variant-D8WwGu3E.js → Variant-w-2yYwaD.js} +5 -5
- package/dist/{_id_-BfOGbmqs.js → _id_-CDuA4GHw.js} +9 -9
- package/dist/{app-DhZxk0zL.js → app-CK_a6mY6.js} +1 -1
- package/dist/{app-BmAr9vNI.js → app-D8o1IXBC.js} +35 -32
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-CxpcEFX9.js → linked-status-DbomyNrO.js} +5 -5
- package/dist/assets/{menu-export-C09ZbTRq.js → menu-export-CW4q2pkh.js} +2 -2
- package/dist/assets/{override-menu-0rFjySh6.js → override-menu-B_mBG1eT.js} +5 -5
- package/dist/assets/{validate-menu-cO19zy8y.js → validate-menu-DbDPxacI.js} +2 -2
- package/dist/{catalog-tNpB0Dhn.js → catalog-DldA6Q9b.js} +1 -1
- package/dist/{catalogSetting-BRnA4v49.js → catalogSetting-B-_kbwka.js} +1 -1
- package/dist/{currency-CyKauaRc.js → currency-BykSseoo.js} +1 -1
- package/dist/{dayjs.min-ipgoM27T.js → dayjs.min-DHfnEad1.js} +2 -2
- package/dist/{index-CXquA22H.js → index-CcpNd77G.js} +4 -4
- package/dist/{index-BGm2uHNk.js → index-DvCo6KWo.js} +6 -6
- package/dist/{index.vue_vue_type_script_setup_true_lang-D6HyeIid.js → index.vue_vue_type_script_setup_true_lang-BaJS8yWr.js} +169 -169
- package/dist/{item-Cik-YX-L.js → item-0l56gmoR.js} +16 -16
- package/dist/{jszip.min-D22BefT1.js → jszip.min-D-L87l7W.js} +384 -384
- package/dist/{menu-ag-37Ofg.js → menu-PgW6AVCf.js} +1 -1
- package/dist/{menuV2-DZDWxmas.js → menuV2-Ddb0Onkc.js} +81 -81
- package/dist/{priceTier-BmDl3J-3.js → priceTier-DuXEtDOE.js} +1 -1
- package/dist/{rules-pJdF9REd.js → rules-BU13b5QQ.js} +4 -4
- package/dist/{scheduler-DRHXK6kX.js → scheduler-CGODPah6.js} +4 -4
- package/dist/{toExcel-5kDfvPVG.js → toExcel-YqRbHTty.js} +2 -2
- package/dist/{unit-CIlgFZ50.js → unit-CumoTkJV.js} +2 -2
- package/package.json +1 -1
- package/dist/Products-BhY4Cwaz.js +0 -291
|
@@ -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-BaJS8yWr.js";
|
|
3
3
|
import "@feedmepos/mf-common";
|
|
4
4
|
import "@feedmepos/ui-library";
|
|
5
5
|
function p() {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var We = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var ne = (e, t, n) =>
|
|
4
|
-
import { I as ae, G as C, A as T, y as ue, an as re, J as
|
|
5
|
-
import { defineStore as
|
|
6
|
-
import { shallowRef as
|
|
2
|
+
var Ge = (e, t, n) => t in e ? We(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var ne = (e, t, n) => Ge(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { I as ae, G as C, A as T, y as ue, an as re, J as z, H as ie, ab as x, c as G, Y as V, ak as oe, ao as Le, ap as qe, z as ze, ad as Be, aq as He, ar as Je, aa as Ye } from "./index.vue_vue_type_script_setup_true_lang-BaJS8yWr.js";
|
|
5
|
+
import { defineStore as Qe } from "pinia";
|
|
6
|
+
import { shallowRef as N, ref as B, computed as S, shallowReactive as Xe, effectScope as Ze, watch as et } from "vue";
|
|
7
7
|
import { useCoreStore as se } from "@feedmepos/mf-common";
|
|
8
8
|
import { useSnackbar as tt } from "@feedmepos/ui-library";
|
|
9
|
-
const nt = "/assets/linked-status-
|
|
9
|
+
const nt = "/assets/linked-status-DbomyNrO.js", rt = "/assets/override-menu-B_mBG1eT.js";
|
|
10
10
|
function ot(e) {
|
|
11
11
|
var o;
|
|
12
12
|
const t = C(e), n = (o = t.variant) == null ? void 0 : o.variantCombinations;
|
|
@@ -104,7 +104,7 @@ function at(e, t) {
|
|
|
104
104
|
};
|
|
105
105
|
return [...o, r];
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function H(e, t) {
|
|
108
108
|
var o;
|
|
109
109
|
if (!t)
|
|
110
110
|
return e;
|
|
@@ -117,7 +117,7 @@ function B(e, t) {
|
|
|
117
117
|
const i = (f = u == null ? void 0 : u.items) == null ? void 0 : f.find(
|
|
118
118
|
(p) => p._id === c._id && p.combinationKey === c.combinationKey
|
|
119
119
|
);
|
|
120
|
-
return
|
|
120
|
+
return H(c, i);
|
|
121
121
|
}), r;
|
|
122
122
|
}), n;
|
|
123
123
|
}
|
|
@@ -131,7 +131,7 @@ function ut(e, t) {
|
|
|
131
131
|
);
|
|
132
132
|
if (!u)
|
|
133
133
|
throw new Error(`Item overrider not found - ${r._id} - ${r.combinationKey}`);
|
|
134
|
-
return
|
|
134
|
+
return H(u, r);
|
|
135
135
|
})
|
|
136
136
|
});
|
|
137
137
|
const o = n.find((r) => !r.combinationKey);
|
|
@@ -145,14 +145,14 @@ function ut(e, t) {
|
|
|
145
145
|
const c = (i = u == null ? void 0 : u.items) == null ? void 0 : i.find(
|
|
146
146
|
(f) => f._id === a._id && f.combinationKey === a.combinationKey
|
|
147
147
|
);
|
|
148
|
-
return
|
|
148
|
+
return H(a, c);
|
|
149
149
|
}), r;
|
|
150
150
|
}), {
|
|
151
151
|
...t,
|
|
152
152
|
price: (o == null ? void 0 : o.price) || t.price
|
|
153
153
|
};
|
|
154
154
|
}
|
|
155
|
-
async function
|
|
155
|
+
async function Dt(e, t, n, o, r, u = !0) {
|
|
156
156
|
const l = C(n), a = u ? st(t, l, o, r) : l, c = t.reduce((p, v) => (p[v._id] = a.modules.item.find((y) => y._id === v._id), p), {}), i = t.reduce((p, v) => {
|
|
157
157
|
const y = v._id;
|
|
158
158
|
return p[y] = at(c[y], e), p;
|
|
@@ -170,7 +170,7 @@ async function Vt(e, t, n, o, r, u = !0) {
|
|
|
170
170
|
};
|
|
171
171
|
});
|
|
172
172
|
}
|
|
173
|
-
function
|
|
173
|
+
function Vt(e, t) {
|
|
174
174
|
if (e.length === 0) return "";
|
|
175
175
|
const n = e == null ? void 0 : e.split("variant");
|
|
176
176
|
return ((n == null ? void 0 : n.reduce((r, u) => {
|
|
@@ -183,11 +183,11 @@ function Dt(e, t) {
|
|
|
183
183
|
return r;
|
|
184
184
|
}, [])) || []).join(" / ");
|
|
185
185
|
}
|
|
186
|
-
const
|
|
186
|
+
const L = /* @__PURE__ */ new Map();
|
|
187
187
|
async function Tt(e, t) {
|
|
188
188
|
const n = `${e._id}-${e.updatedAt}-${t}`;
|
|
189
|
-
if (
|
|
190
|
-
return
|
|
189
|
+
if (L.has(n))
|
|
190
|
+
return L.get(n);
|
|
191
191
|
const o = await ae(
|
|
192
192
|
nt,
|
|
193
193
|
JSON.stringify({
|
|
@@ -195,7 +195,7 @@ async function Tt(e, t) {
|
|
|
195
195
|
itemId: t
|
|
196
196
|
})
|
|
197
197
|
);
|
|
198
|
-
return
|
|
198
|
+
return L.set(n, o), o;
|
|
199
199
|
}
|
|
200
200
|
async function ce(e, t, n) {
|
|
201
201
|
return await ae(rt, {
|
|
@@ -234,13 +234,13 @@ function Kt(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 it(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
245
|
async function Pt(e, t, n) {
|
|
246
246
|
var l, a;
|
|
@@ -256,7 +256,7 @@ async function Pt(e, t, n) {
|
|
|
256
256
|
const p = (a = c.items) == null ? void 0 : a.filter((y) => y._id === n && y.combinationKey), v = [i, ...p].map((y) => {
|
|
257
257
|
var w, k;
|
|
258
258
|
const h = y.combinationKey ? (k = (w = f == null ? void 0 : f.variant) == null ? void 0 : w.variantCombinations) == null ? void 0 : k.find(
|
|
259
|
-
(
|
|
259
|
+
(I) => I.combinationKey === y.combinationKey
|
|
260
260
|
) : f, b = h && f ? u(f, h) : y;
|
|
261
261
|
return u(b, y);
|
|
262
262
|
});
|
|
@@ -294,7 +294,7 @@ function O(e) {
|
|
|
294
294
|
function P(e) {
|
|
295
295
|
return e instanceof RegExp ? e.toString() : e;
|
|
296
296
|
}
|
|
297
|
-
function
|
|
297
|
+
function E(e) {
|
|
298
298
|
return typeof e == "object" && e !== null && !Array.isArray(e) && !(e instanceof Date) && !(e instanceof RegExp);
|
|
299
299
|
}
|
|
300
300
|
function K(e, t) {
|
|
@@ -310,7 +310,7 @@ function K(e, t) {
|
|
|
310
310
|
if (!K(e[n], t[n])) return !1;
|
|
311
311
|
return !0;
|
|
312
312
|
}
|
|
313
|
-
if (
|
|
313
|
+
if (E(e) && E(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)
|
|
@@ -344,7 +344,7 @@ function dt(e, t, n) {
|
|
|
344
344
|
const o = { _t: "a" }, r = ((v = n == null ? void 0 : n.arrays) == null ? void 0 : v.detectMove) !== !1, u = ((y = n == null ? void 0 : n.arrays) == null ? void 0 : y.includeValueOnMove) === !0, l = n == null ? void 0 : n.objectHash;
|
|
345
345
|
let a = r ? lt(e, t, l) : [];
|
|
346
346
|
if (!l && e.length === t.length && e.length > 0 && a.length < e.length) {
|
|
347
|
-
const h =
|
|
347
|
+
const h = E(e[0]) || Array.isArray(e[0]), b = a.length > 0;
|
|
348
348
|
if (h || b) {
|
|
349
349
|
a = [];
|
|
350
350
|
for (let w = 0; w < e.length; w++)
|
|
@@ -360,8 +360,8 @@ function dt(e, t, n) {
|
|
|
360
360
|
if (b !== void 0) {
|
|
361
361
|
const w = J(e[h], t[b], n);
|
|
362
362
|
if (w !== void 0 && (o[b] = w), r && b !== h) {
|
|
363
|
-
const k = `_${h}`,
|
|
364
|
-
o[k] =
|
|
363
|
+
const k = `_${h}`, I = u ? [e[h], b, F] : ["", b, F];
|
|
364
|
+
o[k] = I;
|
|
365
365
|
}
|
|
366
366
|
} else {
|
|
367
367
|
const w = `_${h}`;
|
|
@@ -403,7 +403,7 @@ function J(e, t, n) {
|
|
|
403
403
|
}
|
|
404
404
|
if (Array.isArray(e) && Array.isArray(t))
|
|
405
405
|
return dt(e, t, n);
|
|
406
|
-
if (
|
|
406
|
+
if (E(e) && E(t))
|
|
407
407
|
return ft(e, t, n);
|
|
408
408
|
const u = n != null && n.cloneDiffValues ? O(e) : e, l = n != null && n.cloneDiffValues ? O(t) : t;
|
|
409
409
|
return [P(u), P(l)];
|
|
@@ -467,7 +467,7 @@ function Y(e, t, n) {
|
|
|
467
467
|
if (t.length === 3 && t[2] === M)
|
|
468
468
|
return;
|
|
469
469
|
}
|
|
470
|
-
return
|
|
470
|
+
return E(t) && t._t === "a" ? vt(e, t) : E(t) && E(e) ? yt(e, t) : e;
|
|
471
471
|
}
|
|
472
472
|
function le(e, t, n) {
|
|
473
473
|
return Y(e, t);
|
|
@@ -491,7 +491,7 @@ function pt(e) {
|
|
|
491
491
|
if (Array.isArray(r) && r.length === 1)
|
|
492
492
|
t[`_${o}`] = [r[0], M, M];
|
|
493
493
|
else {
|
|
494
|
-
const u =
|
|
494
|
+
const u = Q(r);
|
|
495
495
|
u !== void 0 && (t[n] = u);
|
|
496
496
|
}
|
|
497
497
|
}
|
|
@@ -504,13 +504,13 @@ function ht(e) {
|
|
|
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)
|
|
@@ -522,11 +522,11 @@ function X(e) {
|
|
|
522
522
|
if (e.length === 3 && e[2] === F)
|
|
523
523
|
return e;
|
|
524
524
|
}
|
|
525
|
-
return
|
|
525
|
+
return E(e) && e._t === "a" ? pt(e) : E(e) ? ht(e) : e;
|
|
526
526
|
}
|
|
527
527
|
}
|
|
528
528
|
function de(e) {
|
|
529
|
-
return
|
|
529
|
+
return Q(e);
|
|
530
530
|
}
|
|
531
531
|
function gt(e, t, n) {
|
|
532
532
|
const o = de(t);
|
|
@@ -566,7 +566,7 @@ function bt({
|
|
|
566
566
|
includeValueOnMove: !1
|
|
567
567
|
},
|
|
568
568
|
cloneDiffValues: !1
|
|
569
|
-
}), n =
|
|
569
|
+
}), n = N(null), o = N([]), r = B(-1), u = N(null), l = S(() => r.value > 0), a = S(() => r.value < o.value.length - 1);
|
|
570
570
|
function c(y) {
|
|
571
571
|
if (n.value === null) {
|
|
572
572
|
n.value = C(y), u.value = C(y), o.value = [{ delta: null }], r.value = 0;
|
|
@@ -616,7 +616,7 @@ function bt({
|
|
|
616
616
|
}
|
|
617
617
|
const wt = {
|
|
618
618
|
async updateMenuModule(e, t) {
|
|
619
|
-
const n =
|
|
619
|
+
const n = z.RequestRunner.operation(t, e.modules);
|
|
620
620
|
if (n.validateError.length > 0)
|
|
621
621
|
throw new Error(n.validateError.join(`
|
|
622
622
|
`));
|
|
@@ -664,15 +664,15 @@ function Mt() {
|
|
|
664
664
|
}
|
|
665
665
|
};
|
|
666
666
|
}
|
|
667
|
-
const $t =
|
|
667
|
+
const $t = Qe(
|
|
668
668
|
"mf-menu-store-v2",
|
|
669
669
|
() => {
|
|
670
|
-
const e =
|
|
670
|
+
const e = Xe(Mt()), t = se(), n = tt(), o = S(() => e.menu.modules.serveSequence ? x(e.menu.modules.serveSequence, {
|
|
671
671
|
selector: "position"
|
|
672
672
|
}) : []), r = S(() => {
|
|
673
673
|
var s;
|
|
674
|
-
return ((s = t.currentBusiness.value) == null ? void 0 : s.menuVersion) ||
|
|
675
|
-
}), u = S(() => r.value ===
|
|
674
|
+
return ((s = t.currentBusiness.value) == null ? void 0 : s.menuVersion) || G.F_MENU_VERSION.v3;
|
|
675
|
+
}), u = S(() => r.value === G.F_MENU_VERSION.v4), l = S(() => {
|
|
676
676
|
const s = e.menu.modules.catalog;
|
|
677
677
|
return x(s, { selector: "name" });
|
|
678
678
|
}), a = S(() => {
|
|
@@ -690,9 +690,9 @@ const $t = Xe(
|
|
|
690
690
|
(s) => s._id === e.currentSchedulerId
|
|
691
691
|
));
|
|
692
692
|
function f(s, d = !0) {
|
|
693
|
-
e.menu = { ...s, _rev: e.menu._rev }, d &&
|
|
693
|
+
e.menu = { ...s, _rev: e.menu._rev }, d && D.push(e.menu);
|
|
694
694
|
}
|
|
695
|
-
const p =
|
|
695
|
+
const p = N(fe()), v = B(!1), y = B(1);
|
|
696
696
|
async function h() {
|
|
697
697
|
var m;
|
|
698
698
|
v.value = !0;
|
|
@@ -728,16 +728,16 @@ const $t = Xe(
|
|
|
728
728
|
return p.value = d, v.value = !1, y.value = y.value + 1, d;
|
|
729
729
|
}
|
|
730
730
|
const w = ie.debounce(h, 200);
|
|
731
|
-
let k = null,
|
|
732
|
-
function
|
|
733
|
-
|
|
731
|
+
let k = null, I = null;
|
|
732
|
+
function X() {
|
|
733
|
+
I && (I(), I = null), k && k.stop(), k = Ze(!0), I = k.run(() => et(
|
|
734
734
|
() => [e.menu, e.currentCatalogId, e.currentSchedulerId],
|
|
735
735
|
() => {
|
|
736
736
|
v.value || w();
|
|
737
737
|
}
|
|
738
738
|
)) || null;
|
|
739
739
|
}
|
|
740
|
-
|
|
740
|
+
X();
|
|
741
741
|
const me = S(() => [
|
|
742
742
|
{
|
|
743
743
|
label: "Main",
|
|
@@ -757,11 +757,11 @@ const $t = Xe(
|
|
|
757
757
|
position: 0
|
|
758
758
|
}
|
|
759
759
|
] : [],
|
|
760
|
-
...
|
|
760
|
+
...V(s, (d) => d.name)
|
|
761
761
|
];
|
|
762
762
|
}), ve = S(() => {
|
|
763
763
|
const s = p.value.modules.subCategory || [];
|
|
764
|
-
return
|
|
764
|
+
return V(s, (d) => d.name);
|
|
765
765
|
}), ee = S(() => {
|
|
766
766
|
var d;
|
|
767
767
|
let s = p.value.modules.item;
|
|
@@ -775,17 +775,17 @@ const $t = Xe(
|
|
|
775
775
|
return (_ == null ? void 0 : _.orderFrom) !== ue.F_ORDER_FROM.enum.NONE;
|
|
776
776
|
});
|
|
777
777
|
}
|
|
778
|
-
return
|
|
778
|
+
return V(s, (m) => m.code || m.name);
|
|
779
779
|
}), ye = S(() => {
|
|
780
|
-
const s = e.menu.modules.category, d =
|
|
780
|
+
const s = e.menu.modules.category, d = V(s, (g) => g.name).reduce(
|
|
781
781
|
(g, _, A) => (g[_._id] = A, g),
|
|
782
782
|
{ "": 0 }
|
|
783
783
|
), m = e.menu.modules.item;
|
|
784
|
-
return
|
|
784
|
+
return V(
|
|
785
785
|
m,
|
|
786
786
|
(g) => g.code || g.name
|
|
787
787
|
).reduce((g, _, A) => (g[_._id] = A + d[_.category || ""], g), {});
|
|
788
|
-
}), pe = S(() => oe(
|
|
788
|
+
}), pe = S(() => oe(j.value, Z.value, ee.value)), he = S(() => {
|
|
789
789
|
const s = U.value.item.addon ? [
|
|
790
790
|
{
|
|
791
791
|
_id: e.currentCatalogId ? "" : null,
|
|
@@ -799,20 +799,20 @@ const $t = Xe(
|
|
|
799
799
|
s,
|
|
800
800
|
e.menu.modules.item
|
|
801
801
|
);
|
|
802
|
-
}),
|
|
802
|
+
}), j = S(() => {
|
|
803
803
|
const s = p.value.modules.variant;
|
|
804
804
|
return x(s, { selector: "name" });
|
|
805
805
|
});
|
|
806
806
|
function ge(s = []) {
|
|
807
|
-
const d = s.map((g) =>
|
|
807
|
+
const d = s.map((g) => j.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(() =>
|
|
810
|
+
const _e = S(() => V(p.value.modules.group, (s) => s.name)), Se = S(() => x(p.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(Le(e.menu.modules.recipe, e.menu.modules.sku), {
|
|
813
813
|
selector: "name"
|
|
814
814
|
})), Ae = S(() => e.menu.modules.cookingGuide), Ce = S(() => {
|
|
815
|
-
const s =
|
|
815
|
+
const s = qe(e.menu.modules.sku);
|
|
816
816
|
return x(s, { selector: "code" });
|
|
817
817
|
}), ke = S(() => {
|
|
818
818
|
const s = /* @__PURE__ */ new Map();
|
|
@@ -823,7 +823,7 @@ const $t = Xe(
|
|
|
823
823
|
});
|
|
824
824
|
}), s;
|
|
825
825
|
}), U = S(() => {
|
|
826
|
-
const s = !e.currentCatalogId, d = r.value ===
|
|
826
|
+
const s = !e.currentCatalogId, d = r.value === G.F_MENU_VERSION.v4, m = !e.currentSchedulerId, g = {
|
|
827
827
|
create: s && m,
|
|
828
828
|
edit: s && m,
|
|
829
829
|
delete: s && m
|
|
@@ -897,19 +897,19 @@ const $t = Xe(
|
|
|
897
897
|
function W(s) {
|
|
898
898
|
return `${s.systemCode}/${s.taxCode}`;
|
|
899
899
|
}
|
|
900
|
-
function
|
|
900
|
+
function Ie(s) {
|
|
901
901
|
const [d, m] = s.split("/");
|
|
902
902
|
return { systemCode: d, taxCode: m };
|
|
903
903
|
}
|
|
904
|
-
function
|
|
904
|
+
function Ee(s, d, m) {
|
|
905
905
|
return (s ?? d ?? []).map((g) => W(g)).find((g) => m.some((_) => _.value === g));
|
|
906
906
|
}
|
|
907
907
|
const Re = S(() => {
|
|
908
908
|
var g;
|
|
909
|
-
const s = ["SV5", "SV10"], d =
|
|
909
|
+
const s = ["SV5", "SV10"], d = ze.Country.getCountryFlattenTaxes(
|
|
910
910
|
se().currentCountry.value
|
|
911
911
|
), m = d.filter((_) => u.value || !s.includes(_.taxCode)).map((_) => ({
|
|
912
|
-
label: `${_.name} (${
|
|
912
|
+
label: `${_.name} (${Be(_.rate)}%)`,
|
|
913
913
|
value: W(_),
|
|
914
914
|
meta: {
|
|
915
915
|
rate: _.rate
|
|
@@ -931,9 +931,9 @@ const $t = Xe(
|
|
|
931
931
|
});
|
|
932
932
|
}, te = (s) => {
|
|
933
933
|
e.currentCatalogId = s;
|
|
934
|
-
}, Ve = (s) => {
|
|
935
|
-
e.currentSchedulerId = s;
|
|
936
934
|
}, De = (s) => {
|
|
935
|
+
e.currentSchedulerId = s;
|
|
936
|
+
}, Ve = (s) => {
|
|
937
937
|
e.currentCategoryIds = s;
|
|
938
938
|
}, Te = (s) => {
|
|
939
939
|
e.currentRestaurantAttrParams = s;
|
|
@@ -947,9 +947,9 @@ const $t = Xe(
|
|
|
947
947
|
}));
|
|
948
948
|
try {
|
|
949
949
|
if (d || g.some(
|
|
950
|
-
(A) => [
|
|
950
|
+
(A) => [z.F_OPERATION_TYPE.delete, z.F_OPERATION_TYPE.deleteMany].includes(A.operation)
|
|
951
951
|
)) {
|
|
952
|
-
const A = await
|
|
952
|
+
const A = await He(g, e.menu.modules);
|
|
953
953
|
if (A !== !0) throw new Error(A);
|
|
954
954
|
}
|
|
955
955
|
const _ = await wt.updateMenuModule(e.menu, g);
|
|
@@ -969,14 +969,14 @@ const $t = Xe(
|
|
|
969
969
|
priceTierSettings: s.priceTierSettings
|
|
970
970
|
};
|
|
971
971
|
return f(d), d;
|
|
972
|
-
},
|
|
973
|
-
const s =
|
|
972
|
+
}, D = bt({ maxHistorySize: 50 }), Pe = S(() => D.canUndo.value), $e = S(() => D.canRedo.value), Ne = () => {
|
|
973
|
+
const s = D.undo();
|
|
974
974
|
s && f(s, !1);
|
|
975
|
-
},
|
|
976
|
-
const s =
|
|
975
|
+
}, je = () => {
|
|
976
|
+
const s = D.redo();
|
|
977
977
|
s && f(s, !1);
|
|
978
978
|
}, Ue = () => {
|
|
979
|
-
|
|
979
|
+
D.clear();
|
|
980
980
|
};
|
|
981
981
|
return {
|
|
982
982
|
state: e,
|
|
@@ -1001,7 +1001,7 @@ const $t = Xe(
|
|
|
1001
1001
|
itemCodeMap: ke,
|
|
1002
1002
|
categorizedItems: pe,
|
|
1003
1003
|
categorizedRawMenuItems: he,
|
|
1004
|
-
variants:
|
|
1004
|
+
variants: j,
|
|
1005
1005
|
groups: _e,
|
|
1006
1006
|
takeaways: Se,
|
|
1007
1007
|
printDepartments: be,
|
|
@@ -1016,28 +1016,28 @@ const $t = Xe(
|
|
|
1016
1016
|
readMenu: xe,
|
|
1017
1017
|
readRestaurants: Oe,
|
|
1018
1018
|
selectCatalog: te,
|
|
1019
|
-
selectScheduler:
|
|
1020
|
-
selectCategory:
|
|
1019
|
+
selectScheduler: De,
|
|
1020
|
+
selectCategory: Ve,
|
|
1021
1021
|
setRestaurantAttrParams: Te,
|
|
1022
1022
|
updateMenu: Fe,
|
|
1023
1023
|
updateMenuSetting: Ke,
|
|
1024
1024
|
computeMergedMenu: h,
|
|
1025
1025
|
// helper
|
|
1026
1026
|
encodeTax: W,
|
|
1027
|
-
decodeTax:
|
|
1028
|
-
getSelectedTax:
|
|
1027
|
+
decodeTax: Ie,
|
|
1028
|
+
getSelectedTax: Ee,
|
|
1029
1029
|
mapVariant: ge,
|
|
1030
1030
|
// history
|
|
1031
1031
|
canUndoHistory: Pe,
|
|
1032
1032
|
canRedoHistory: $e,
|
|
1033
|
-
undoHistory:
|
|
1034
|
-
redoHistory:
|
|
1033
|
+
undoHistory: Ne,
|
|
1034
|
+
redoHistory: je,
|
|
1035
1035
|
// cleanup
|
|
1036
1036
|
$dispose: () => {
|
|
1037
|
-
w.cancel(),
|
|
1037
|
+
w.cancel(), I && (I(), I = null), k && (k.stop(), k = null), Ue();
|
|
1038
1038
|
},
|
|
1039
1039
|
$reinitialize: () => {
|
|
1040
|
-
|
|
1040
|
+
X();
|
|
1041
1041
|
}
|
|
1042
1042
|
};
|
|
1043
1043
|
}
|
|
@@ -1047,8 +1047,8 @@ export {
|
|
|
1047
1047
|
Ft as b,
|
|
1048
1048
|
Kt as c,
|
|
1049
1049
|
Pt as f,
|
|
1050
|
-
|
|
1051
|
-
|
|
1050
|
+
Vt as g,
|
|
1051
|
+
Dt as m,
|
|
1052
1052
|
it as o,
|
|
1053
1053
|
$t as u
|
|
1054
1054
|
};
|
|
@@ -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-BaJS8yWr.js";
|
|
5
5
|
const v = /* @__PURE__ */ d({
|
|
6
6
|
__name: "AddPriceGroupDialog",
|
|
7
7
|
setup(s) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineComponent as O, watch as T, ref as V, computed as N, resolveComponent as g, createElementBlock as F, openBlock as A, Fragment as P, createVNode as f, unref as _, withCtx as b, createElementVNode as Y, renderList as I, toDisplayString as h } from "vue";
|
|
2
|
-
import { J as v, y as E, u as q } from "./index.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { J as v, y as E, u as q } from "./index.vue_vue_type_script_setup_true_lang-BaJS8yWr.js";
|
|
3
3
|
import { useI18n as S } from "@feedmepos/mf-common";
|
|
4
4
|
import { useDialogChild as L } from "@feedmepos/ui-library";
|
|
5
|
-
import { u as k } from "./menuV2-
|
|
6
|
-
import { _ as K } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-
|
|
7
|
-
import { g as w } from "./TranslationFieldSection.vue_vue_type_script_setup_true_lang-
|
|
5
|
+
import { u as k } from "./menuV2-Ddb0Onkc.js";
|
|
6
|
+
import { _ as K } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-Cg1_gsJZ.js";
|
|
7
|
+
import { g as w } from "./TranslationFieldSection.vue_vue_type_script_setup_true_lang-DGzGvWli.js";
|
|
8
8
|
const R = { class: "py-12 px-16 space-y-4" }, D = /* @__PURE__ */ O({
|
|
9
9
|
__name: "AddSubcategoryDialogContentComponent",
|
|
10
10
|
props: {
|
|
@@ -1,12 +1,12 @@
|
|
|
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 A, 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 { G as S, y as r, u as pe, H as ve, J as ue } from "./index.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { G as S, y as r, u as pe, H as ve, J as ue } from "./index.vue_vue_type_script_setup_true_lang-BaJS8yWr.js";
|
|
3
3
|
import { useI18n as de } from "@feedmepos/mf-common";
|
|
4
4
|
import { components as _e } from "@feedmepos/ui-library";
|
|
5
5
|
import { _ as fe } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
|
|
6
|
-
import { _ as ne } from "./RuleView.vue_vue_type_script_setup_true_lang-
|
|
6
|
+
import { _ as ne } from "./RuleView.vue_vue_type_script_setup_true_lang-DvlHPa_5.js";
|
|
7
7
|
import { u as ye } from "./discardConfirm-BHni0LNu.js";
|
|
8
|
-
import { u as he } from "./menu-
|
|
9
|
-
import { L as ge } from "./LinkProductSideSheet-
|
|
8
|
+
import { u as he } from "./menu-PgW6AVCf.js";
|
|
9
|
+
import { L as ge } from "./LinkProductSideSheet-ClQgUxuK.js";
|
|
10
10
|
const Ve = { class: "space-y-8" }, Fe = {
|
|
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 "./index.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { u as C } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-Ckv9GH8J.js";
|
|
2
|
+
import "./index.vue_vue_type_script_setup_true_lang-BaJS8yWr.js";
|
|
3
3
|
var Z = {
|
|
4
4
|
defaultAmount: 0,
|
|
5
5
|
defaultCurrency: "USD",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineStore as J } from "pinia";
|
|
2
2
|
import { defineComponent as O, computed as U, ref as h, watch as T, resolveComponent as y, createBlock as W, openBlock as F, withCtx as w, createVNode as m, createElementVNode as f, normalizeClass as Q, createElementBlock as A, toDisplayString as M, unref as l, Fragment as q, renderSlot as X, renderList as Z, getCurrentInstance as ee } from "vue";
|
|
3
|
-
import { a5 as B, a6 as te, a3 as P, G as k, O as $, B as j, A as E, a4 as ne, J as C, y as D, H as oe, u as ae } from "./index.vue_vue_type_script_setup_true_lang-
|
|
3
|
+
import { a5 as B, a6 as te, a3 as P, G as k, O as $, B as j, A as E, a4 as ne, J as C, y as D, H as oe, u as ae } from "./index.vue_vue_type_script_setup_true_lang-BaJS8yWr.js";
|
|
4
4
|
import { useI18n as L } from "@feedmepos/mf-common";
|
|
5
5
|
import { useSnackbar as I, components as le, useDialog as ue, FmButtonVariant as ie } from "@feedmepos/ui-library";
|
|
6
6
|
import { u as se } from "./discardConfirm-BHni0LNu.js";
|
|
7
7
|
import { c as re } from "./check-C9mY6LiX.js";
|
|
8
8
|
import "./vuedraggable-CK8z7qA8.js";
|
|
9
|
-
import "./menuV2-
|
|
9
|
+
import "./menuV2-Ddb0Onkc.js";
|
|
10
10
|
import "./app-5fxKLAzS.js";
|
|
11
11
|
/* empty css */
|
|
12
12
|
import { c as me } from "./createComponentProgrammatically-Bt2rn1IQ.js";
|