@feedmepos/mf-menu 0.32.53-dev → 0.32.53
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-PbFbM-b9.js → App-opl8VW_R.js} +7 -7
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-DRl0F9ex.js → ApplyProduct.vue_vue_type_script_setup_true_lang-CI685o_y.js} +3 -3
- package/dist/{ApplyProductDialog.vue_vue_type_script_setup_true_lang-Dxaiz_KJ.js → ApplyProductDialog.vue_vue_type_script_setup_true_lang-BE37wS9F.js} +2 -2
- package/dist/{Catalog-BV1mgE-z.js → Catalog-CFgFi7F4.js} +6 -6
- package/dist/{Category-C5RNTUST.js → Category-C-QIBnv4.js} +4 -4
- package/dist/{Category-C2ymwzxI.js → Category-C9D0g8il.js} +4 -4
- package/dist/{CookingGuide-Byn0p1cx.js → CookingGuide-miSijISx.js} +4 -4
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-CftleIRB.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-CNXLlPC4.js} +1 -1
- package/dist/{Group-CAOu7mTu.js → Group-C1sw05Nm.js} +3 -3
- package/dist/{Group-B-Z1yY_a.js → Group-DetasO-_.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-CMfGMwA5.js → Group.vue_vue_type_script_setup_true_lang-DiKZMMau.js} +7 -7
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-DEzXdEtH.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BY1jcgZ2.js} +5 -5
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-BtZtkQHn.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-Bjk8zzYz.js} +7 -7
- package/dist/{Ingredient-_-Z-auCy.js → Ingredient-CyZHvNUy.js} +3 -3
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-rBo5MgKk.js → InventoryBinding.vue_vue_type_script_setup_true_lang-5YtnqTmW.js} +2 -2
- package/dist/{LinkProductSideSheet-Cpr-OzhV.js → LinkProductSideSheet-CwW76B20.js} +3 -3
- package/dist/{MenuSetting-BHAYHNoL.js → MenuSetting-DAchuXJ6.js} +6 -6
- package/dist/{OrderPacing-0xP2FLqE.js → OrderPacing-BVIQnDTl.js} +5 -5
- package/dist/{PrintRoute-BXqPWXr-.js → PrintRoute-70IyWjgJ.js} +4 -4
- package/dist/{Product-CCwCq0oF.js → Product-DctvRQlQ.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-BHjCwlbX.js → Product.vue_vue_type_script_setup_true_lang-mJYcstbm.js} +12 -12
- package/dist/{ProductInternalTools-BsUazT7k.js → ProductInternalTools-D_iKLDbw.js} +6 -6
- package/dist/{Products-Y2h_hLvm.js → Products-B0DlF5sy.js} +58 -58
- package/dist/{Publish-10DtltRY.js → Publish-DGsHCtxz.js} +3 -3
- package/dist/{Recipe-BKCEiBY4.js → Recipe-Cu8NbZR7.js} +4 -4
- package/dist/{RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-Y2Ei1h4p.js → RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-DO8Z3QJ3.js} +1 -1
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-Bc-WFsaf.js → RuleView.vue_vue_type_script_setup_true_lang-avzZyXl2.js} +302 -302
- package/dist/{Scheduler-D1WnpvQd.js → Scheduler-CY8eSvsu.js} +3 -3
- package/dist/{ServingSequence-DZ4MchF3.js → ServingSequence-C4gh5jvR.js} +3 -3
- package/dist/{Setting-BgO-a6VG.js → Setting-CwCP1uIf.js} +5 -5
- package/dist/{Subcategory-mLhMiNx9.js → Subcategory-Chcr9PWi.js} +5 -5
- package/dist/{Takeaway-BN8itU_F.js → Takeaway-C6vyEwBR.js} +4 -4
- package/dist/{Takeaway-B9fVwXW3.js → Takeaway-C8ohkkYR.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-CNNtpfY0.js → Takeaway.vue_vue_type_script_setup_true_lang-BqKRwZNT.js} +5 -5
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-IEPm4c9G.js → Thumbnail.vue_vue_type_script_setup_true_lang-_dnxm97U.js} +4 -4
- package/dist/{TranslationFieldSection.vue_vue_type_script_setup_true_lang-BWq9E3Pr.js → TranslationFieldSection.vue_vue_type_script_setup_true_lang-Bm4W6NHD.js} +1 -1
- package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-D2Mdr76E.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-DD-vqSBo.js} +2 -2
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CgEcWKsF.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DXhITV7s.js} +14 -14
- package/dist/{Unit-CJTyfSaA.js → Unit-BJOTS840.js} +2 -2
- package/dist/{Variant-CSR0PyJt.js → Variant-1yx-tba5.js} +3 -3
- package/dist/{_id_-B-uZfPBS.js → _id_-Bli_eaaw.js} +9 -9
- package/dist/{app-vpEeMZuq.js → app-CEjAGMYK.js} +1 -1
- package/dist/{app-nRTse_K5.js → app-Df2OaMeW.js} +32 -32
- package/dist/app.js +1 -1
- package/dist/assets/{linked-status-kcewbkLn.js → linked-status-gnRlCKBX.js} +2 -2
- package/dist/assets/{menu-export-LL-Hfzyk.js → menu-export-DVgG2q3T.js} +2 -2
- package/dist/assets/{override-menu-kO9kvtlN.js → override-menu-B5Xlrlwf.js} +2 -2
- package/dist/assets/{validate-menu-Bv0NTZv1.js → validate-menu-Ce8h_1g0.js} +2 -2
- package/dist/{catalog-CVMKoUf8.js → catalog-CKUQEphe.js} +1 -1
- package/dist/{catalogSetting-CJofGu7O.js → catalogSetting-D1cRj-bD.js} +1 -1
- package/dist/{currency-DeBYT9j_.js → currency-BVe0-Ftm.js} +1 -1
- package/dist/{dayjs.min-Ws3b1WxF.js → dayjs.min-Cky8XfOQ.js} +2 -2
- package/dist/{index-v56nMLPD.js → index-CGHFswp3.js} +4 -4
- package/dist/{index-OUJmHOAU.js → index-DLC-j2RG.js} +5 -5
- package/dist/{index.vue_vue_type_script_setup_true_lang-DPaHA1bp.js → index.vue_vue_type_script_setup_true_lang-D8icZ01s.js} +6 -6
- package/dist/{item-D5rytEqk.js → item-C2zRGcji.js} +18 -18
- package/dist/{jszip.min-C6uUCcnL.js → jszip.min-Cw0XEEly.js} +153 -153
- package/dist/{memberPricing-CBzr9qLU.js → memberPricing-vGotpgxh.js} +1 -1
- package/dist/{menu-BhxWRy0N.js → menu-33fQZyJt.js} +1 -1
- package/dist/{menuV2-Ds1f3a8P.js → menuV2-BolaQLav.js} +76 -76
- package/dist/{order_pacing-CYuEj5Sb.js → order_pacing-By6jv8HG.js} +5 -5
- package/dist/{priceTier-KEgRA3RV.js → priceTier-DhA6Ve0R.js} +1 -1
- package/dist/{rules-C1xA7rwc.js → rules-glZCxFHS.js} +3 -3
- package/dist/{scheduler-C5YdAro0.js → scheduler-Cnzgnk6d.js} +4 -4
- package/dist/{toExcel-Dv-vcMzg.js → toExcel-Bym1fMDm.js} +2 -2
- package/dist/{unit-WEAw3qgL.js → unit-BWwoKT39.js} +2 -2
- package/package.json +1 -1
|
@@ -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-D8icZ01s.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-D8icZ01s.js";
|
|
3
3
|
import "@feedmepos/mf-common";
|
|
4
4
|
import "@feedmepos/ui-library";
|
|
5
5
|
function p() {
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
var We = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var ne = (e, t, n) =>
|
|
4
|
-
import { I as ae, G as
|
|
5
|
-
import { defineStore as
|
|
6
|
-
import { shallowRef as
|
|
2
|
+
var ze = (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) => ze(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { I as ae, G as C, A as T, U as ue, ax as re, J as G, H as ie, aj as x, c as z, a0 as D, au as oe, ay as Le, az as Be, z as Ge, am as qe, aA as He, aB as Je, ah as Xe } from "./index.vue_vue_type_script_setup_true_lang-D8icZ01s.js";
|
|
5
|
+
import { defineStore as Ye } from "pinia";
|
|
6
|
+
import { shallowRef as j, ref as q, computed as S, shallowReactive as Qe, 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-gnRlCKBX.js", rt = "/assets/override-menu-B5Xlrlwf.js";
|
|
10
10
|
function ot(e) {
|
|
11
11
|
var o;
|
|
12
|
-
const t =
|
|
12
|
+
const t = C(e), n = (o = t.variant) == null ? void 0 : o.variantCombinations;
|
|
13
13
|
return delete t.variant, delete t.thumbnail, [t, ...n || []];
|
|
14
14
|
}
|
|
15
15
|
function st(e, t, n, o) {
|
|
16
|
-
const r =
|
|
16
|
+
const r = C(t), u = n ? r.modules.catalog.find((v) => v._id === n) : null, l = o ? r.modules.scheduler.find((v) => v._id === o) : null, a = u ? C(u) : void 0, c = n ? r.modules.catalog.filter((v) => v._id !== n) : [], i = l ? C(l) : void 0, f = e.reduce((v, y) => (v[y._id] = ot(y), v), {});
|
|
17
17
|
function h(v = []) {
|
|
18
18
|
const y = e.map((p) => p._id);
|
|
19
19
|
return [
|
|
@@ -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
|
(h) => h._id === c._id && h.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,7 +145,7 @@ 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,
|
|
@@ -153,7 +153,7 @@ function ut(e, t) {
|
|
|
153
153
|
};
|
|
154
154
|
}
|
|
155
155
|
async function Vt(e, t, n, o, r, u = !0) {
|
|
156
|
-
const l =
|
|
156
|
+
const l = C(n), a = u ? st(t, l, o, r) : l, c = t.reduce((h, v) => (h[v._id] = a.modules.item.find((y) => y._id === v._id), h), {}), i = t.reduce((h, v) => {
|
|
157
157
|
const y = v._id;
|
|
158
158
|
return h[y] = at(c[y], e), h;
|
|
159
159
|
}, {}), f = T.getFallbackPrices({
|
|
@@ -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,18 +234,18 @@ function Pt(e, t, n) {
|
|
|
234
234
|
}
|
|
235
235
|
return r(t, n);
|
|
236
236
|
}
|
|
237
|
-
const
|
|
237
|
+
const B = /* @__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 (B.has(o))
|
|
241
|
+
return B.get(o);
|
|
242
242
|
const r = await ce(e, t, n);
|
|
243
|
-
return
|
|
243
|
+
return B.set(o, r), r;
|
|
244
244
|
}
|
|
245
245
|
async function $t(e, t, n) {
|
|
246
246
|
var l, a;
|
|
247
247
|
const o = await it(e, t, null), r = [], u = (c, i) => {
|
|
248
|
-
const f =
|
|
248
|
+
const f = C(c);
|
|
249
249
|
for (const h in i)
|
|
250
250
|
i[h] && (f[h] = i[h]);
|
|
251
251
|
return f;
|
|
@@ -254,9 +254,9 @@ async function $t(e, t, n) {
|
|
|
254
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
256
|
const h = (a = c.items) == null ? void 0 : a.filter((y) => y._id === n && y.combinationKey), v = [i, ...h].map((y) => {
|
|
257
|
-
var w,
|
|
258
|
-
const p = y.combinationKey ? (
|
|
259
|
-
(
|
|
257
|
+
var w, I;
|
|
258
|
+
const p = y.combinationKey ? (I = (w = f == null ? void 0 : f.variant) == null ? void 0 : w.variantCombinations) == null ? void 0 : I.find(
|
|
259
|
+
(k) => k.combinationKey === y.combinationKey
|
|
260
260
|
) : f, b = p && f ? u(f, p) : y;
|
|
261
261
|
return u(b, y);
|
|
262
262
|
});
|
|
@@ -360,8 +360,8 @@ function dt(e, t, n) {
|
|
|
360
360
|
if (b !== void 0) {
|
|
361
361
|
const w = J(e[p], t[b], n);
|
|
362
362
|
if (w !== void 0 && (o[b] = w), r && b !== p) {
|
|
363
|
-
const
|
|
364
|
-
o[
|
|
363
|
+
const I = `_${p}`, k = u ? [e[p], b, K] : ["", b, K];
|
|
364
|
+
o[I] = k;
|
|
365
365
|
}
|
|
366
366
|
} else {
|
|
367
367
|
const w = `_${p}`;
|
|
@@ -428,7 +428,7 @@ function vt(e, t, n) {
|
|
|
428
428
|
else {
|
|
429
429
|
for (; l < e.length && o.has(l); )
|
|
430
430
|
l++;
|
|
431
|
-
l < e.length && (u.push(
|
|
431
|
+
l < e.length && (u.push(X(e[l], i)), l++);
|
|
432
432
|
}
|
|
433
433
|
else {
|
|
434
434
|
let f = !1;
|
|
@@ -453,11 +453,11 @@ function yt(e, t, n) {
|
|
|
453
453
|
const o = { ...e };
|
|
454
454
|
for (const r in t) {
|
|
455
455
|
const u = t[r];
|
|
456
|
-
Array.isArray(u) ? u.length === 1 ? o[r] = u[0] : u.length === 3 && u[2] === M ? delete o[r] : u.length === 2 && (o[r] = u[1]) : o[r] =
|
|
456
|
+
Array.isArray(u) ? u.length === 1 ? o[r] = u[0] : u.length === 3 && u[2] === M ? delete o[r] : u.length === 2 && (o[r] = u[1]) : o[r] = X(o[r], u);
|
|
457
457
|
}
|
|
458
458
|
return o;
|
|
459
459
|
}
|
|
460
|
-
function
|
|
460
|
+
function X(e, t, n) {
|
|
461
461
|
if (t === void 0) return e;
|
|
462
462
|
if (Array.isArray(t)) {
|
|
463
463
|
if (t.length === 1)
|
|
@@ -470,7 +470,7 @@ function Y(e, t, n) {
|
|
|
470
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
|
-
return
|
|
473
|
+
return X(e, t);
|
|
474
474
|
}
|
|
475
475
|
function ht(e) {
|
|
476
476
|
const t = { _t: "a" };
|
|
@@ -491,7 +491,7 @@ function ht(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 = Y(r);
|
|
495
495
|
u !== void 0 && (t[n] = u);
|
|
496
496
|
}
|
|
497
497
|
}
|
|
@@ -504,13 +504,13 @@ function pt(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 = Y(o);
|
|
508
508
|
r !== void 0 && (t[n] = r);
|
|
509
509
|
}
|
|
510
510
|
}
|
|
511
511
|
return t;
|
|
512
512
|
}
|
|
513
|
-
function
|
|
513
|
+
function Y(e) {
|
|
514
514
|
if (e !== void 0) {
|
|
515
515
|
if (Array.isArray(e)) {
|
|
516
516
|
if (e.length === 1)
|
|
@@ -526,7 +526,7 @@ function Q(e) {
|
|
|
526
526
|
}
|
|
527
527
|
}
|
|
528
528
|
function de(e) {
|
|
529
|
-
return
|
|
529
|
+
return Y(e);
|
|
530
530
|
}
|
|
531
531
|
function gt(e, t, n) {
|
|
532
532
|
const o = de(t);
|
|
@@ -566,22 +566,22 @@ function bt({
|
|
|
566
566
|
includeValueOnMove: !1
|
|
567
567
|
},
|
|
568
568
|
cloneDiffValues: !1
|
|
569
|
-
}), n =
|
|
569
|
+
}), n = j(null), o = j([]), r = q(-1), u = j(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
|
-
n.value =
|
|
572
|
+
n.value = C(y), u.value = C(y), o.value = [{ delta: null }], r.value = 0;
|
|
573
573
|
return;
|
|
574
574
|
}
|
|
575
575
|
const p = t.diff(u.value, y);
|
|
576
|
-
if (r.value < o.value.length - 1 && (o.value = o.value.slice(0, r.value + 1)), o.value.push({ delta: p }), r.value++, u.value =
|
|
576
|
+
if (r.value < o.value.length - 1 && (o.value = o.value.slice(0, r.value + 1)), o.value.push({ delta: p }), r.value++, u.value = C(y), o.value.length > e) {
|
|
577
577
|
const b = o.value[1].delta;
|
|
578
|
-
b && n.value && (n.value = t.patch(
|
|
578
|
+
b && n.value && (n.value = t.patch(C(n.value), b)), o.value.shift(), r.value--;
|
|
579
579
|
}
|
|
580
580
|
}
|
|
581
581
|
function i(y) {
|
|
582
582
|
if (!n.value || y < 0 || y >= o.value.length)
|
|
583
583
|
return;
|
|
584
|
-
let p =
|
|
584
|
+
let p = C(n.value);
|
|
585
585
|
for (let b = 1; b <= y; b++) {
|
|
586
586
|
const w = o.value[b];
|
|
587
587
|
w.delta && (p = t.patch(p, w.delta));
|
|
@@ -592,14 +592,14 @@ function bt({
|
|
|
592
592
|
if (l.value) {
|
|
593
593
|
r.value--;
|
|
594
594
|
const y = i(r.value);
|
|
595
|
-
return y && (u.value =
|
|
595
|
+
return y && (u.value = C(y)), y;
|
|
596
596
|
}
|
|
597
597
|
}
|
|
598
598
|
function h() {
|
|
599
599
|
if (a.value) {
|
|
600
600
|
r.value++;
|
|
601
601
|
const y = i(r.value);
|
|
602
|
-
return y && (u.value =
|
|
602
|
+
return y && (u.value = C(y)), y;
|
|
603
603
|
}
|
|
604
604
|
}
|
|
605
605
|
function v() {
|
|
@@ -616,7 +616,7 @@ function bt({
|
|
|
616
616
|
}
|
|
617
617
|
const wt = {
|
|
618
618
|
async updateMenuModule(e, t) {
|
|
619
|
-
const n =
|
|
619
|
+
const n = G.RequestRunner.operation(t, e.modules);
|
|
620
620
|
if (n.validateError.length > 0)
|
|
621
621
|
throw new Error(n.validateError.join(`
|
|
622
622
|
`));
|
|
@@ -664,15 +664,15 @@ function Mt() {
|
|
|
664
664
|
}
|
|
665
665
|
};
|
|
666
666
|
}
|
|
667
|
-
const Ft =
|
|
667
|
+
const Ft = Ye(
|
|
668
668
|
"mf-menu-store-v2",
|
|
669
669
|
() => {
|
|
670
|
-
const e =
|
|
670
|
+
const e = Qe(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) || z.F_MENU_VERSION.v3;
|
|
675
|
+
}), u = 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
|
}), a = S(() => {
|
|
@@ -692,7 +692,7 @@ const Ft = Qe(
|
|
|
692
692
|
function f(s, d = !0) {
|
|
693
693
|
e.menu = { ...s, _rev: e.menu._rev }, d && V.push(e.menu);
|
|
694
694
|
}
|
|
695
|
-
const h =
|
|
695
|
+
const h = j(fe()), v = q(!1), y = q(1);
|
|
696
696
|
async function p() {
|
|
697
697
|
var m;
|
|
698
698
|
v.value = !0;
|
|
@@ -728,16 +728,16 @@ const Ft = Qe(
|
|
|
728
728
|
return h.value = d, v.value = !1, y.value = y.value + 1, d;
|
|
729
729
|
}
|
|
730
730
|
const w = ie.debounce(p, 200);
|
|
731
|
-
let
|
|
732
|
-
function
|
|
733
|
-
|
|
731
|
+
let I = null, k = null;
|
|
732
|
+
function Q() {
|
|
733
|
+
k && (k(), k = null), I && I.stop(), I = Ze(!0), k = I.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
|
+
Q();
|
|
741
741
|
const me = S(() => [
|
|
742
742
|
{
|
|
743
743
|
label: "Main",
|
|
@@ -785,7 +785,7 @@ const Ft = Qe(
|
|
|
785
785
|
m,
|
|
786
786
|
(g) => g.code || g.name
|
|
787
787
|
).reduce((g, _, A) => (g[_._id] = A + d[_.category || ""], g), {});
|
|
788
|
-
}), he = S(() => oe(
|
|
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,
|
|
@@ -799,22 +799,22 @@ const Ft = Qe(
|
|
|
799
799
|
s,
|
|
800
800
|
e.menu.modules.item
|
|
801
801
|
);
|
|
802
|
-
}),
|
|
802
|
+
}), N = S(() => {
|
|
803
803
|
const s = h.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) => N.value.find((_) => _._id === g)).filter((g) => !!g);
|
|
808
808
|
return T.fullVariantCombination(d).reduce((g, _) => (g[_.combinationKey] = _.selectionName.join(" / "), g), {});
|
|
809
809
|
}
|
|
810
810
|
const _e = S(() => D(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(Le(e.menu.modules.recipe, e.menu.modules.sku), {
|
|
813
813
|
selector: "name"
|
|
814
|
-
})), Ae = S(() => e.menu.modules.cookingGuide),
|
|
815
|
-
const s =
|
|
814
|
+
})), Ae = S(() => e.menu.modules.cookingGuide), Ce = S(() => {
|
|
815
|
+
const s = Be(e.menu.modules.sku);
|
|
816
816
|
return x(s, { selector: "code" });
|
|
817
|
-
}),
|
|
817
|
+
}), Ie = S(() => {
|
|
818
818
|
const s = /* @__PURE__ */ new Map();
|
|
819
819
|
return e.menu.modules.item.forEach((d) => {
|
|
820
820
|
var m, g;
|
|
@@ -823,7 +823,7 @@ const Ft = Qe(
|
|
|
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 === z.F_MENU_VERSION.v4, m = !e.currentSchedulerId, g = {
|
|
827
827
|
create: s && m,
|
|
828
828
|
edit: s && m,
|
|
829
829
|
delete: s && m
|
|
@@ -898,7 +898,7 @@ const Ft = Qe(
|
|
|
898
898
|
function W(s) {
|
|
899
899
|
return `${s.systemCode}/${s.taxCode}`;
|
|
900
900
|
}
|
|
901
|
-
function
|
|
901
|
+
function ke(s) {
|
|
902
902
|
const [d, m] = s.split("/");
|
|
903
903
|
return { systemCode: d, taxCode: m };
|
|
904
904
|
}
|
|
@@ -907,10 +907,10 @@ const Ft = Qe(
|
|
|
907
907
|
}
|
|
908
908
|
const Re = S(() => {
|
|
909
909
|
var g;
|
|
910
|
-
const s = ["SV5", "SV10"], d =
|
|
910
|
+
const s = ["SV5", "SV10"], d = Ge.Country.getCountryFlattenTaxes(
|
|
911
911
|
se().currentCountry.value
|
|
912
912
|
), m = d.filter((_) => u.value || !s.includes(_.taxCode)).map((_) => ({
|
|
913
|
-
label: `${_.name} (${
|
|
913
|
+
label: `${_.name} (${qe(_.rate)}%)`,
|
|
914
914
|
value: W(_),
|
|
915
915
|
meta: {
|
|
916
916
|
rate: _.rate
|
|
@@ -921,7 +921,7 @@ const Ft = Qe(
|
|
|
921
921
|
countryTaxOptions: m
|
|
922
922
|
};
|
|
923
923
|
}), xe = async () => {
|
|
924
|
-
const s = await
|
|
924
|
+
const s = await Xe.readMenu();
|
|
925
925
|
e.menu = s ?? e.menu, te(null);
|
|
926
926
|
}, Oe = async () => {
|
|
927
927
|
const { fetchAllRestaurants: s } = Je();
|
|
@@ -948,9 +948,9 @@ const Ft = Qe(
|
|
|
948
948
|
}));
|
|
949
949
|
try {
|
|
950
950
|
if (d || g.some(
|
|
951
|
-
(A) => [
|
|
951
|
+
(A) => [G.F_OPERATION_TYPE.delete, G.F_OPERATION_TYPE.deleteMany].includes(A.operation)
|
|
952
952
|
)) {
|
|
953
|
-
const A = await
|
|
953
|
+
const A = await He(g, e.menu.modules);
|
|
954
954
|
if (A !== !0) throw new Error(A);
|
|
955
955
|
}
|
|
956
956
|
const _ = await wt.updateMenuModule(e.menu, g);
|
|
@@ -970,10 +970,10 @@ const Ft = Qe(
|
|
|
970
970
|
priceTierSettings: s.priceTierSettings
|
|
971
971
|
};
|
|
972
972
|
return f(d), d;
|
|
973
|
-
}, V = bt({ maxHistorySize: 50 }), $e = S(() => V.canUndo.value), Fe = S(() => V.canRedo.value),
|
|
973
|
+
}, V = bt({ maxHistorySize: 50 }), $e = S(() => V.canUndo.value), Fe = S(() => V.canRedo.value), je = () => {
|
|
974
974
|
const s = V.undo();
|
|
975
975
|
s && f(s, !1);
|
|
976
|
-
},
|
|
976
|
+
}, Ne = () => {
|
|
977
977
|
const s = V.redo();
|
|
978
978
|
s && f(s, !1);
|
|
979
979
|
}, Ue = () => {
|
|
@@ -999,17 +999,17 @@ const Ft = Qe(
|
|
|
999
999
|
subcategories: ve,
|
|
1000
1000
|
items: ee,
|
|
1001
1001
|
sortedItems: ye,
|
|
1002
|
-
itemCodeMap:
|
|
1002
|
+
itemCodeMap: Ie,
|
|
1003
1003
|
categorizedItems: he,
|
|
1004
1004
|
categorizedRawMenuItems: pe,
|
|
1005
|
-
variants:
|
|
1005
|
+
variants: N,
|
|
1006
1006
|
groups: _e,
|
|
1007
1007
|
takeaways: Se,
|
|
1008
1008
|
printDepartments: be,
|
|
1009
1009
|
units: we,
|
|
1010
1010
|
recipes: Me,
|
|
1011
1011
|
cookingGuide: Ae,
|
|
1012
|
-
skus:
|
|
1012
|
+
skus: Ce,
|
|
1013
1013
|
rules: U,
|
|
1014
1014
|
taxSetting: Re,
|
|
1015
1015
|
// Action
|
|
@@ -1025,20 +1025,20 @@ const Ft = Qe(
|
|
|
1025
1025
|
computeMergedMenu: p,
|
|
1026
1026
|
// helper
|
|
1027
1027
|
encodeTax: W,
|
|
1028
|
-
decodeTax:
|
|
1028
|
+
decodeTax: ke,
|
|
1029
1029
|
getSelectedTax: Ee,
|
|
1030
1030
|
mapVariant: ge,
|
|
1031
1031
|
// history
|
|
1032
1032
|
canUndoHistory: $e,
|
|
1033
1033
|
canRedoHistory: Fe,
|
|
1034
|
-
undoHistory:
|
|
1035
|
-
redoHistory:
|
|
1034
|
+
undoHistory: je,
|
|
1035
|
+
redoHistory: Ne,
|
|
1036
1036
|
// cleanup
|
|
1037
1037
|
$dispose: () => {
|
|
1038
|
-
w.cancel(),
|
|
1038
|
+
w.cancel(), k && (k(), k = null), I && (I.stop(), I = null), Ue();
|
|
1039
1039
|
},
|
|
1040
1040
|
$reinitialize: () => {
|
|
1041
|
-
|
|
1041
|
+
Q();
|
|
1042
1042
|
}
|
|
1043
1043
|
};
|
|
1044
1044
|
}
|
|
@@ -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 B, renderSlot as ee, renderList as G, toDisplayString as $, createCommentVNode as ae, getCurrentInstance as te, render as ne } from "vue";
|
|
2
|
-
import { u as Y, P as oe, B as le, J as M, K } from "./index.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { u as Y, P as oe, B as le, J as M, K } from "./index.vue_vue_type_script_setup_true_lang-D8icZ01s.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 H, u as se } from "./RuleView.vue_vue_type_script_setup_true_lang-
|
|
5
|
+
import { _ as H, u as se } from "./RuleView.vue_vue_type_script_setup_true_lang-avzZyXl2.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-Df2OaMeW.js";
|
|
8
|
+
import { L as ce } from "./LinkProductSideSheet-CwW76B20.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-DD-vqSBo.js";
|
|
11
11
|
import { c as ge } from "./check-C9mY6LiX.js";
|
|
12
12
|
import { g as J } 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-D8icZ01s.js";
|
|
5
5
|
const v = /* @__PURE__ */ d({
|
|
6
6
|
__name: "AddPriceGroupDialog",
|
|
7
7
|
setup(s) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as I, watch as h, ref as E, computed as w, resolveComponent as _, createElementBlock as F, openBlock as P, 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 { J as v, K as C, u as Y } from "./index.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { J as v, K as C, u as Y } from "./index.vue_vue_type_script_setup_true_lang-D8icZ01s.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-BolaQLav.js";
|
|
6
|
+
import { _ as $ } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-DD-vqSBo.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 { G as w, a6 as $, u as ye, y as _e, a7 as L, H as he, J as se, K as ie, ak as ce } from "./index.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { G as w, a6 as $, u as ye, y as _e, a7 as L, H as he, J as se, K as ie, ak as ce } from "./index.vue_vue_type_script_setup_true_lang-D8icZ01s.js";
|
|
3
3
|
import { useI18n as me } from "@feedmepos/mf-common";
|
|
4
4
|
import { components as ge } from "@feedmepos/ui-library";
|
|
5
5
|
import { _ as Ve } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
|
|
6
|
-
import { _ as ue } from "./RuleView.vue_vue_type_script_setup_true_lang-
|
|
6
|
+
import { _ as ue } from "./RuleView.vue_vue_type_script_setup_true_lang-avzZyXl2.js";
|
|
7
7
|
import { u as ke } from "./discardConfirm-BHni0LNu.js";
|
|
8
|
-
import { u as be } from "./menu-
|
|
9
|
-
import { L as Fe } from "./LinkProductSideSheet-
|
|
8
|
+
import { u as be } from "./menu-33fQZyJt.js";
|
|
9
|
+
import { L as Fe } from "./LinkProductSideSheet-CwW76B20.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 "./index.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { u as C } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-Bjk8zzYz.js";
|
|
2
|
+
import "./index.vue_vue_type_script_setup_true_lang-D8icZ01s.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 S, computed as x, ref as A, watch as D, resolveComponent as V, createBlock as W, openBlock as F, withCtx as w, createVNode as m, createElementVNode as f, normalizeClass as Q, createElementBlock as k, toDisplayString as C, unref as l, Fragment as L, renderSlot as X, renderList as Z, getCurrentInstance as ee } from "vue";
|
|
3
|
-
import { aa as N, ab as te, a8 as O, G as E, P as $, B as j, A as h, a9 as ne, J as T, K as M, H as ae, u as oe } from "./index.vue_vue_type_script_setup_true_lang-
|
|
3
|
+
import { aa as N, ab as te, a8 as O, G as E, P as $, B as j, A as h, a9 as ne, J as T, K as M, H as ae, u as oe } from "./index.vue_vue_type_script_setup_true_lang-D8icZ01s.js";
|
|
4
4
|
import { useI18n as P } 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-BolaQLav.js";
|
|
10
10
|
import "./app-5fxKLAzS.js";
|
|
11
11
|
/* empty css */
|
|
12
12
|
import { c as me } from "./createComponentProgrammatically-Bt2rn1IQ.js";
|