@feedmepos/mf-menu 0.31.33-beta.9 → 0.31.33-prod
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-WQChaTIO.js → App-Ckk1s5Yi.js} +20 -20
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-t1K3plXk.js → ApplyProduct.vue_vue_type_script_setup_true_lang-BgCJJKVy.js} +2 -2
- package/dist/{Catalog-BX_1g0ru.js → Catalog-CjVIJjh6.js} +6 -6
- package/dist/{Category-COTd0h8i.js → Category-BAD0RzNU.js} +4 -4
- package/dist/{Category-C6BSLYTZ.js → Category-CEheZjjx.js} +5 -5
- package/dist/{CookingGuide-DTTGVOtZ.js → CookingGuide-kaK5dxiM.js} +3 -3
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-UQQSF2Fv.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-Bd4IBeSK.js} +1 -1
- package/dist/{Group-tv4NRLFA.js → Group-Bl0YTPgr.js} +1 -1
- package/dist/{Group-BKhYr_XK.js → Group-Bvk50gsC.js} +3 -3
- package/dist/{Group.vue_vue_type_script_setup_true_lang-Cql0J4TN.js → Group.vue_vue_type_script_setup_true_lang-C9quQw7f.js} +7 -7
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-DIUX09XZ.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-Cf1_4Srx.js} +4 -4
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-azTd9oJY.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-oUoUXguS.js} +7 -7
- package/dist/{Ingredient-EhrV45jG.js → Ingredient-CY15AYC2.js} +3 -3
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-DNLOCn6Z.js → InventoryBinding.vue_vue_type_script_setup_true_lang-C_ZH0ga3.js} +1052 -1052
- package/dist/{LinkProductSideSheet-CLUkYMJx.js → LinkProductSideSheet-CCW73uQb.js} +2 -2
- package/dist/{MenuSetting-DMYnqQqF.js → MenuSetting-DCIebynX.js} +4 -4
- package/dist/{PrintRoute-Ct0vYBI0.js → PrintRoute-DkksjGj8.js} +3 -3
- package/dist/{Product-CVOGBfGP.js → Product-DQ8dRTJW.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-3qo4KHwM.js → Product.vue_vue_type_script_setup_true_lang-B61A77iy.js} +12 -12
- package/dist/{ProductInternalTools-BD4pbpTq.js → ProductInternalTools-BtAJLyib.js} +6 -6
- package/dist/{Products-DiqJJi0G.js → Products-KtdrJG8K.js} +11 -11
- package/dist/{Publish-DNW7kAyt.js → Publish-D3uc61V1.js} +3 -3
- package/dist/{Recipe-DB59Oilo.js → Recipe-BLzezqGH.js} +4 -4
- package/dist/{Scheduler-CdvXOmD9.js → Scheduler-BLn2Uy9H.js} +3 -3
- package/dist/{ServingSequence-BJidBanx.js → ServingSequence-BtCpa6km.js} +3 -3
- package/dist/{Setting-CT0-ErCV.js → Setting-zO16rQvb.js} +5 -5
- package/dist/{Subcategory-Qss-q16J.js → Subcategory-BmNMReGL.js} +4 -4
- package/dist/{Takeaway-Cco68UWM.js → Takeaway-DIf1hfIp.js} +1 -1
- package/dist/{Takeaway-DJZrAOhK.js → Takeaway-Dt0oedp_.js} +4 -4
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-_UIxFm40.js → Takeaway.vue_vue_type_script_setup_true_lang-CnB08FG9.js} +5 -5
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-DQ8A_b8N.js → Thumbnail.vue_vue_type_script_setup_true_lang-Cox2bpkp.js} +4 -4
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-C-GQNgOs.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-IYC4KukD.js} +13 -13
- package/dist/{Unit-jNMtjCqg.js → Unit-COwjhka0.js} +2 -2
- package/dist/{Variant-vgkCtn6k.js → Variant-BY1OZuk8.js} +3 -3
- package/dist/{_id_-VWD7FuB8.js → _id_-CNE0nt2C.js} +10 -10
- package/dist/{app-DCfZrw5q.js → app-BYTfYZ_L.js} +1 -1
- package/dist/{app-FT-17pdN.js → app-d86JiqNI.js} +24 -24
- package/dist/app.js +1 -1
- package/dist/assets/{linked-status-CgdauMC-.js → linked-status-ClGks19H.js} +8 -8
- package/dist/assets/{override-menu-BjjuzKpf.js → override-menu-DDzUoiJB.js} +8 -8
- package/dist/assets/{validate-menu-C0NftO2y.js → validate-menu-CvdVVGBq.js} +2 -2
- package/dist/{catalog-Cu3xX3Ij.js → catalog-D5llyR6I.js} +1 -1
- package/dist/{catalogSetting-MeAAWjBX.js → catalogSetting-C5DEsGFp.js} +1 -1
- package/dist/{category-D5yCmLTw.js → category-D_nwrQ4v.js} +1 -1
- package/dist/{currency-DQtVpVAB.js → currency-Bs7DX91b.js} +1 -1
- package/dist/{dayjs.min-B17nF95f.js → dayjs.min-CQ8q2Qks.js} +1 -1
- package/dist/{index-1CsXkVcJ.js → index-BImqd4SS.js} +1 -1
- package/dist/{index-CAsg0n3_.js → index-DSbd1qYp.js} +3 -3
- package/dist/{index-B6mBc4vZ.js → index-QioLRJ5c.js} +3 -3
- package/dist/{item-BXuPBp61.js → item-DJvTdIna.js} +16 -16
- package/dist/{jszip.min-Dzj1bdkj.js → jszip.min-jJP0SQy6.js} +246 -246
- package/dist/{menu-CpOCeOvo.js → menu-BHr0A_kn.js} +7 -7
- package/dist/{menu-CzQXSBCu.js → menu-CvdQTq54.js} +1 -1
- package/dist/{menuV2-Cw9jPRug.js → menuV2-C3Ade0y6.js} +85 -85
- package/dist/{priceTier-DmDrpMES.js → priceTier-BAw2NlRW.js} +1 -1
- package/dist/{scheduler-f8MIyGun.js → scheduler-DuUrXPi7.js} +3 -3
- package/dist/{subcategory-C3sMuoGj.js → subcategory-C5Ok0bI2.js} +2 -2
- package/dist/{toExcel-BoLqUKHC.js → toExcel-wKTHcPda.js} +2 -2
- package/dist/{unit-CAKmah7M.js → unit-D78XXPbI.js} +2 -2
- package/package.json +2 -2
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { H as
|
|
1
|
+
import { H as E, B as I, ao as L, G as J, ap as q, J as U, I as Y, a9 as w, c as x, X as k, aj as z, aq as Me, ar as ke, A as Ee, ab as Ie, as as Re, at as Te, a8 as Fe } from "./menu-BHr0A_kn.js";
|
|
2
2
|
import { defineStore as Ae } from "pinia";
|
|
3
3
|
import { shallowRef as X, ref as D, computed as h, shallowReactive as Ke, effectScope as Oe, watch as Ve } from "vue";
|
|
4
4
|
import { useCoreStore as G } from "@feedmepos/mf-common";
|
|
5
5
|
import { useSnackbar as Ne } from "@feedmepos/ui-library";
|
|
6
|
-
const xe = "/assets/linked-status-
|
|
6
|
+
const xe = "/assets/linked-status-ClGks19H.js", $e = "/assets/override-menu-DDzUoiJB.js";
|
|
7
7
|
function Pe(e) {
|
|
8
8
|
var a;
|
|
9
|
-
const n =
|
|
9
|
+
const n = E(e), o = (a = n.variant) == null ? void 0 : a.variantCombinations;
|
|
10
10
|
return delete n.variant, delete n.thumbnail, [n, ...o || []];
|
|
11
11
|
}
|
|
12
12
|
function Ue(e, n, o, a) {
|
|
13
|
-
const r =
|
|
14
|
-
function v(
|
|
13
|
+
const r = E(n), l = o ? r.modules.catalog.find((g) => g._id === o) : null, d = a ? r.modules.scheduler.find((g) => g._id === a) : null, i = l ? E(l) : void 0, c = o ? r.modules.catalog.filter((g) => g._id !== o) : [], m = d ? E(d) : void 0, f = e.reduce((g, y) => (g[y._id] = Pe(y), g), {});
|
|
14
|
+
function v(g = []) {
|
|
15
15
|
const y = e.map((b) => b._id);
|
|
16
16
|
return [
|
|
17
|
-
...
|
|
17
|
+
...g.filter((b) => !y.includes(b._id)),
|
|
18
18
|
...Object.values(f).flatMap((b) => b)
|
|
19
19
|
];
|
|
20
20
|
}
|
|
@@ -23,8 +23,8 @@ function Ue(e, n, o, a) {
|
|
|
23
23
|
[a]: {
|
|
24
24
|
...i.override.scheduler[a],
|
|
25
25
|
_id: a,
|
|
26
|
-
items: v(m == null ? void 0 : m.items).map((
|
|
27
|
-
...
|
|
26
|
+
items: v(m == null ? void 0 : m.items).map((g) => ({
|
|
27
|
+
...g,
|
|
28
28
|
orderFrom: J.F_ORDER_FROM.enum.ALL
|
|
29
29
|
}))
|
|
30
30
|
}
|
|
@@ -32,7 +32,7 @@ function Ue(e, n, o, a) {
|
|
|
32
32
|
...i.override.items,
|
|
33
33
|
...f
|
|
34
34
|
}, r.modules.catalog = [...c, i], r) : m ? (m.items = v(m.items), r.modules.scheduler = [
|
|
35
|
-
...r.modules.scheduler.filter((
|
|
35
|
+
...r.modules.scheduler.filter((g) => g._id !== a),
|
|
36
36
|
m
|
|
37
37
|
], r) : {
|
|
38
38
|
...q(),
|
|
@@ -54,15 +54,15 @@ function T(e, n, o) {
|
|
|
54
54
|
throw new Error(`_insertItemOverriders - Item not found - ${e._id}`);
|
|
55
55
|
const r = (l = a.groups) == null ? void 0 : l.map((d) => {
|
|
56
56
|
var m, f, v;
|
|
57
|
-
const i = (m = e == null ? void 0 : e.groups) == null ? void 0 : m.find((
|
|
57
|
+
const i = (m = e == null ? void 0 : e.groups) == null ? void 0 : m.find((g) => g._id === d._id);
|
|
58
58
|
let c;
|
|
59
|
-
return i ? c = ((f = d.items) == null ? void 0 : f.map((
|
|
59
|
+
return i ? c = ((f = d.items) == null ? void 0 : f.map((g) => {
|
|
60
60
|
var b;
|
|
61
61
|
const y = (b = i.items) == null ? void 0 : b.find(
|
|
62
|
-
(R) => R._id ===
|
|
62
|
+
(R) => R._id === g._id && R.combinationKey === g.combinationKey
|
|
63
63
|
);
|
|
64
|
-
return T(y ||
|
|
65
|
-
})) ?? [] : c = ((v = d.items) == null ? void 0 : v.map((
|
|
64
|
+
return T(y || g, n, o + 1);
|
|
65
|
+
})) ?? [] : c = ((v = d.items) == null ? void 0 : v.map((g) => T(g, n, o + 1))) ?? [], {
|
|
66
66
|
...d,
|
|
67
67
|
items: c
|
|
68
68
|
};
|
|
@@ -80,7 +80,7 @@ function De(e, n) {
|
|
|
80
80
|
const d = n.modules.group.find((c) => c._id === l._id), i = ((d == null ? void 0 : d.items) || []).map((c) => {
|
|
81
81
|
var v;
|
|
82
82
|
const m = (v = l.items) == null ? void 0 : v.find(
|
|
83
|
-
(
|
|
83
|
+
(g) => g._id === c._id && g.combinationKey === c.combinationKey
|
|
84
84
|
);
|
|
85
85
|
if (m)
|
|
86
86
|
return T(m, n, 1);
|
|
@@ -150,8 +150,8 @@ function He(e, n) {
|
|
|
150
150
|
};
|
|
151
151
|
}
|
|
152
152
|
async function et(e, n, o, a, r, l = !0) {
|
|
153
|
-
const d =
|
|
154
|
-
const y =
|
|
153
|
+
const d = E(o), i = l ? Ue(n, d, a, r) : d, c = n.reduce((v, g) => (v[g._id] = i.modules.item.find((y) => y._id === g._id), v), {}), m = n.reduce((v, g) => {
|
|
154
|
+
const y = g._id;
|
|
155
155
|
return v[y] = De(c[y], e), v;
|
|
156
156
|
}, {}), f = I.getFallbackPrices({
|
|
157
157
|
rawMenu: i,
|
|
@@ -160,7 +160,7 @@ async function et(e, n, o, a, r, l = !0) {
|
|
|
160
160
|
schedulerId: r
|
|
161
161
|
});
|
|
162
162
|
return n.map((v) => {
|
|
163
|
-
const
|
|
163
|
+
const g = v._id, y = c[g];
|
|
164
164
|
return {
|
|
165
165
|
...He(f, y),
|
|
166
166
|
category: a || r ? y == null ? void 0 : y.category : null
|
|
@@ -232,7 +232,7 @@ function ot(e, n, o) {
|
|
|
232
232
|
return r(n, o);
|
|
233
233
|
}
|
|
234
234
|
const P = /* @__PURE__ */ new Map();
|
|
235
|
-
async function
|
|
235
|
+
async function Be(e, n, o) {
|
|
236
236
|
const a = `${e._id}-${e.updatedAt}-${n || "null"}-${o || "null"}`;
|
|
237
237
|
if (P.has(a))
|
|
238
238
|
return P.get(a);
|
|
@@ -241,8 +241,8 @@ async function je(e, n, o) {
|
|
|
241
241
|
}
|
|
242
242
|
async function st(e, n, o) {
|
|
243
243
|
var d, i;
|
|
244
|
-
const a = await
|
|
245
|
-
const f =
|
|
244
|
+
const a = await Be(e, n, null), r = [], l = (c, m) => {
|
|
245
|
+
const f = E(c);
|
|
246
246
|
for (const v in m)
|
|
247
247
|
m[v] && (f[v] = m[v]);
|
|
248
248
|
return f;
|
|
@@ -250,7 +250,7 @@ async function st(e, n, o) {
|
|
|
250
250
|
for (const c of a.modules.group) {
|
|
251
251
|
const m = (d = c.items) == null ? void 0 : d.find((v) => v._id === o && !v.combinationKey), f = e.modules.item.find((v) => v._id === o);
|
|
252
252
|
if (m) {
|
|
253
|
-
const v = (i = c.items) == null ? void 0 : i.filter((y) => y._id === o && y.combinationKey),
|
|
253
|
+
const v = (i = c.items) == null ? void 0 : i.filter((y) => y._id === o && y.combinationKey), g = [m, ...v].map((y) => {
|
|
254
254
|
var F, A;
|
|
255
255
|
const b = y.combinationKey ? (A = (F = f == null ? void 0 : f.variant) == null ? void 0 : F.variantCombinations) == null ? void 0 : A.find(
|
|
256
256
|
(K) => K.combinationKey === y.combinationKey
|
|
@@ -259,13 +259,13 @@ async function st(e, n, o) {
|
|
|
259
259
|
});
|
|
260
260
|
r.push({
|
|
261
261
|
group: c,
|
|
262
|
-
items:
|
|
262
|
+
items: g
|
|
263
263
|
});
|
|
264
264
|
}
|
|
265
265
|
}
|
|
266
266
|
return r;
|
|
267
267
|
}
|
|
268
|
-
function
|
|
268
|
+
function We({
|
|
269
269
|
maxHistorySize: e = 50
|
|
270
270
|
}) {
|
|
271
271
|
const n = X([]), o = D(-1), a = h(() => o.value > 0), r = h(() => o.value < n.value.length - 1);
|
|
@@ -292,7 +292,7 @@ function Be({
|
|
|
292
292
|
clear: c
|
|
293
293
|
};
|
|
294
294
|
}
|
|
295
|
-
const
|
|
295
|
+
const je = {
|
|
296
296
|
async updateMenuModule(e, n) {
|
|
297
297
|
const o = U.RequestRunner.operation(n, e.modules);
|
|
298
298
|
if (o.validateError.length > 0)
|
|
@@ -342,14 +342,14 @@ function qe() {
|
|
|
342
342
|
const at = Ae(
|
|
343
343
|
"mf-menu-store-v2",
|
|
344
344
|
() => {
|
|
345
|
-
const e = Ke(qe()), n = G(), o = Ne(), a = h(() => e.menu.modules.serveSequence ?
|
|
345
|
+
const e = Ke(qe()), n = G(), o = Ne(), a = h(() => e.menu.modules.serveSequence ? w(e.menu.modules.serveSequence, {
|
|
346
346
|
selector: "position"
|
|
347
347
|
}) : []), r = h(() => {
|
|
348
348
|
var t;
|
|
349
349
|
return ((t = n.currentBusiness.value) == null ? void 0 : t.menuVersion) || x.F_MENU_VERSION.v3;
|
|
350
350
|
}), l = h(() => r.value === x.F_MENU_VERSION.v4), d = h(() => {
|
|
351
351
|
const t = e.menu.modules.catalog;
|
|
352
|
-
return
|
|
352
|
+
return w(t, { selector: "name" });
|
|
353
353
|
}), i = h(() => {
|
|
354
354
|
var s;
|
|
355
355
|
let t = e.menu.modules.catalog.find(
|
|
@@ -360,16 +360,16 @@ const at = Ae(
|
|
|
360
360
|
items: e.menu.modules.item,
|
|
361
361
|
restaurantCustomAttributes: e.currentRestaurantCustomAttributes || {}
|
|
362
362
|
})), t;
|
|
363
|
-
}), c = h(() =>
|
|
363
|
+
}), c = h(() => w(v.value.modules.scheduler, { selector: "name" })), m = h(() => e.menu.modules.scheduler.find(
|
|
364
364
|
(t) => t._id === e.currentSchedulerId
|
|
365
365
|
));
|
|
366
366
|
function f(t, s = !0) {
|
|
367
|
-
e.menu = { ...t, _rev: e.menu._rev }, s &&
|
|
367
|
+
e.menu = { ...t, _rev: e.menu._rev }, s && M.push(e.menu);
|
|
368
368
|
}
|
|
369
|
-
const v = X(Z()),
|
|
369
|
+
const v = X(Z()), g = D(!1), y = D(1);
|
|
370
370
|
async function b() {
|
|
371
371
|
var u;
|
|
372
|
-
|
|
372
|
+
g.value = !0;
|
|
373
373
|
let t = e.menu.modules.catalog;
|
|
374
374
|
if (i.value && ((u = i.value.linkItemRules) != null && u.length)) {
|
|
375
375
|
const p = I.populateCatalog({
|
|
@@ -377,7 +377,7 @@ const at = Ae(
|
|
|
377
377
|
items: e.menu.modules.item,
|
|
378
378
|
restaurantCustomAttributes: e.currentRestaurantCustomAttributes || {}
|
|
379
379
|
});
|
|
380
|
-
t = e.menu.modules.catalog.map((
|
|
380
|
+
t = e.menu.modules.catalog.map((_) => _._id === (p == null ? void 0 : p._id) ? p : _);
|
|
381
381
|
}
|
|
382
382
|
const s = await Q(
|
|
383
383
|
{
|
|
@@ -393,19 +393,19 @@ const at = Ae(
|
|
|
393
393
|
if (e.currentSchedulerId != null) {
|
|
394
394
|
const p = e.menu.modules.catalog.find(
|
|
395
395
|
(S) => S._id === e.currentCatalogId
|
|
396
|
-
),
|
|
396
|
+
), _ = p ? p.override.scheduler[e.currentSchedulerId] : e.menu.modules.scheduler.find(
|
|
397
397
|
(S) => S._id === e.currentSchedulerId
|
|
398
|
-
), C = new Set(((
|
|
398
|
+
), C = new Set(((_ == null ? void 0 : _.items) || []).map((S) => S._id));
|
|
399
399
|
s.modules.item = s.modules.item.filter((S) => C.has(S._id));
|
|
400
400
|
}
|
|
401
|
-
return v.value = s,
|
|
401
|
+
return v.value = s, g.value = !1, y.value = y.value + 1, s;
|
|
402
402
|
}
|
|
403
403
|
const F = Y.debounce(b, 200);
|
|
404
404
|
Oe(!0).run(() => {
|
|
405
405
|
Ve(
|
|
406
406
|
() => [e.menu, e.currentCatalogId, e.currentSchedulerId],
|
|
407
407
|
() => {
|
|
408
|
-
|
|
408
|
+
g.value || F();
|
|
409
409
|
}
|
|
410
410
|
);
|
|
411
411
|
});
|
|
@@ -418,7 +418,7 @@ const at = Ae(
|
|
|
418
418
|
label: t.name,
|
|
419
419
|
value: t._id
|
|
420
420
|
}))
|
|
421
|
-
]),
|
|
421
|
+
]), B = h(() => {
|
|
422
422
|
const t = v.value.modules.category;
|
|
423
423
|
return [
|
|
424
424
|
...V.value.item.addon ? [
|
|
@@ -428,35 +428,35 @@ const at = Ae(
|
|
|
428
428
|
position: 0
|
|
429
429
|
}
|
|
430
430
|
] : [],
|
|
431
|
-
...
|
|
431
|
+
...k(t, (s) => s.name)
|
|
432
432
|
];
|
|
433
433
|
}), ee = h(() => {
|
|
434
434
|
const t = v.value.modules.subCategory || [];
|
|
435
|
-
return
|
|
436
|
-
}),
|
|
435
|
+
return k(t, (s) => s.name);
|
|
436
|
+
}), W = h(() => {
|
|
437
437
|
var s;
|
|
438
438
|
let t = v.value.modules.item;
|
|
439
439
|
if (i.value) {
|
|
440
440
|
const u = (s = i.value) == null ? void 0 : s.override.items;
|
|
441
441
|
t = t.filter((p) => {
|
|
442
442
|
var C;
|
|
443
|
-
const
|
|
443
|
+
const _ = (C = u == null ? void 0 : u[p._id]) == null ? void 0 : C.find(
|
|
444
444
|
(S) => !S.combinationKey
|
|
445
445
|
);
|
|
446
|
-
return (
|
|
446
|
+
return (_ == null ? void 0 : _.orderFrom) !== J.F_ORDER_FROM.enum.NONE;
|
|
447
447
|
});
|
|
448
448
|
}
|
|
449
|
-
return
|
|
449
|
+
return k(t, (u) => u.code || u.name);
|
|
450
450
|
}), te = h(() => {
|
|
451
|
-
const t = e.menu.modules.category, s =
|
|
452
|
-
(p,
|
|
451
|
+
const t = e.menu.modules.category, s = k(t, (p) => p.name).reduce(
|
|
452
|
+
(p, _, C) => (p[_._id] = C, p),
|
|
453
453
|
{ "": 0 }
|
|
454
454
|
), u = e.menu.modules.item;
|
|
455
|
-
return
|
|
455
|
+
return k(
|
|
456
456
|
u,
|
|
457
457
|
(p) => p.code || p.name
|
|
458
|
-
).reduce((p,
|
|
459
|
-
}), ne = h(() => z(O.value,
|
|
458
|
+
).reduce((p, _, C) => (p[_._id] = C + s[_.category || ""], p), {});
|
|
459
|
+
}), ne = h(() => z(O.value, B.value, W.value)), re = h(() => {
|
|
460
460
|
const t = V.value.item.addon ? [
|
|
461
461
|
{
|
|
462
462
|
_id: e.currentCatalogId ? "" : null,
|
|
@@ -472,19 +472,19 @@ const at = Ae(
|
|
|
472
472
|
);
|
|
473
473
|
}), O = h(() => {
|
|
474
474
|
const t = v.value.modules.variant;
|
|
475
|
-
return
|
|
475
|
+
return w(t, { selector: "name" });
|
|
476
476
|
});
|
|
477
477
|
function oe(t = []) {
|
|
478
|
-
const s = t.map((p) => O.value.find((
|
|
479
|
-
return I.fullVariantCombination(s).reduce((p,
|
|
478
|
+
const s = t.map((p) => O.value.find((_) => _._id === p)).filter((p) => !!p);
|
|
479
|
+
return I.fullVariantCombination(s).reduce((p, _) => (p[_.combinationKey] = _.selectionName.join(" / "), p), {});
|
|
480
480
|
}
|
|
481
|
-
const se = h(() =>
|
|
481
|
+
const se = h(() => k(v.value.modules.group, (t) => t.name)), ae = h(() => w(v.value.modules.takeaway, { selector: "name" })), ue = h(() => w(e.menu.modules.printDepartment || [], {
|
|
482
482
|
selector: "name"
|
|
483
|
-
})), ie = h(() =>
|
|
483
|
+
})), ie = h(() => w(e.menu.modules.unit, { selector: "name" })), ce = h(() => w(Me(e.menu.modules.recipe, e.menu.modules.sku), {
|
|
484
484
|
selector: "name"
|
|
485
485
|
})), le = h(() => e.menu.modules.cookingGuide), de = h(() => {
|
|
486
|
-
const t =
|
|
487
|
-
return
|
|
486
|
+
const t = ke(e.menu.modules.sku);
|
|
487
|
+
return w(t, { selector: "code" });
|
|
488
488
|
}), V = h(() => {
|
|
489
489
|
const t = !e.currentCatalogId, s = r.value === x.F_MENU_VERSION.v4, u = !e.currentSchedulerId, p = {
|
|
490
490
|
create: t && u,
|
|
@@ -520,7 +520,7 @@ const at = Ae(
|
|
|
520
520
|
bindToVariant: s,
|
|
521
521
|
print: t && u,
|
|
522
522
|
toRoot: s && u,
|
|
523
|
-
takeaway: (
|
|
523
|
+
takeaway: (_) => !!_ && (s || t) && u,
|
|
524
524
|
multiScheduler: s,
|
|
525
525
|
canRearrange: s,
|
|
526
526
|
printConfig: s
|
|
@@ -562,36 +562,36 @@ const at = Ae(
|
|
|
562
562
|
return { systemCode: s, taxCode: u };
|
|
563
563
|
}
|
|
564
564
|
function fe(t, s, u) {
|
|
565
|
-
return (t ?? s ?? []).map((p) => N(p)).find((p) => u.some((
|
|
565
|
+
return (t ?? s ?? []).map((p) => N(p)).find((p) => u.some((_) => _.value === p));
|
|
566
566
|
}
|
|
567
567
|
const pe = h(() => {
|
|
568
568
|
var p;
|
|
569
|
-
const t = ["SV5", "SV10"], s =
|
|
569
|
+
const t = ["SV5", "SV10"], s = Ee.Country.getCountryFlattenTaxes(
|
|
570
570
|
G().currentCountry.value
|
|
571
|
-
), u = s.filter((
|
|
572
|
-
label: `${
|
|
573
|
-
value: N(
|
|
571
|
+
), u = s.filter((_) => l.value || !t.includes(_.taxCode)).map((_) => ({
|
|
572
|
+
label: `${_.name} (${Ie(_.rate)}%)`,
|
|
573
|
+
value: N(_),
|
|
574
574
|
meta: {
|
|
575
|
-
rate:
|
|
575
|
+
rate: _.rate
|
|
576
576
|
}
|
|
577
577
|
}));
|
|
578
|
-
return u.sort((
|
|
578
|
+
return u.sort((_, C) => _.label.localeCompare(C.label, void 0, { numeric: !0 })), {
|
|
579
579
|
systemCode: (p = s[0]) == null ? void 0 : p.systemCode,
|
|
580
580
|
countryTaxOptions: u
|
|
581
581
|
};
|
|
582
582
|
}), ve = async () => {
|
|
583
583
|
const t = await Fe.readMenu();
|
|
584
|
-
e.menu = t ?? e.menu,
|
|
585
|
-
},
|
|
584
|
+
e.menu = t ?? e.menu, j(null);
|
|
585
|
+
}, _e = async () => {
|
|
586
586
|
const { fetchAllRestaurants: t } = Te();
|
|
587
587
|
await t({
|
|
588
588
|
onBatchEnd: (s) => {
|
|
589
589
|
e.restaurants = s;
|
|
590
590
|
}
|
|
591
591
|
});
|
|
592
|
-
},
|
|
592
|
+
}, j = (t) => {
|
|
593
593
|
e.currentCatalogId = t;
|
|
594
|
-
},
|
|
594
|
+
}, ge = (t) => {
|
|
595
595
|
e.currentSchedulerId = t;
|
|
596
596
|
}, ye = (t) => {
|
|
597
597
|
e.currentCategoryIds = t;
|
|
@@ -600,8 +600,8 @@ const at = Ae(
|
|
|
600
600
|
}, Ce = async (t, s) => {
|
|
601
601
|
const u = Array.isArray(t) ? t : [t];
|
|
602
602
|
if (!u.length) return;
|
|
603
|
-
const p = u.map((
|
|
604
|
-
...
|
|
603
|
+
const p = u.map((_) => ({
|
|
604
|
+
..._,
|
|
605
605
|
_id: e.menu._id,
|
|
606
606
|
_rev: e.menu._rev
|
|
607
607
|
}));
|
|
@@ -612,13 +612,13 @@ const at = Ae(
|
|
|
612
612
|
const C = await Re(p, e.menu.modules);
|
|
613
613
|
if (C !== !0) throw new Error(C);
|
|
614
614
|
}
|
|
615
|
-
const
|
|
616
|
-
return f(
|
|
617
|
-
} catch (
|
|
615
|
+
const _ = await je.updateMenuModule(e.menu, p);
|
|
616
|
+
return f(_.menu), _;
|
|
617
|
+
} catch (_) {
|
|
618
618
|
o.open({
|
|
619
619
|
type: "error",
|
|
620
620
|
title: "Failed to update menu",
|
|
621
|
-
message:
|
|
621
|
+
message: _
|
|
622
622
|
});
|
|
623
623
|
}
|
|
624
624
|
}, be = async (t) => {
|
|
@@ -629,11 +629,11 @@ const at = Ae(
|
|
|
629
629
|
priceTierSettings: t.priceTierSettings
|
|
630
630
|
};
|
|
631
631
|
return f(s), s;
|
|
632
|
-
},
|
|
632
|
+
}, M = We({ maxHistorySize: 50 }), Se = h(() => M.canUndo.value), we = h(() => M.canRedo.value);
|
|
633
633
|
return {
|
|
634
634
|
state: e,
|
|
635
635
|
// loading state
|
|
636
|
-
workerIsComputing:
|
|
636
|
+
workerIsComputing: g,
|
|
637
637
|
mergedMenuChangeId: y,
|
|
638
638
|
// async computed state
|
|
639
639
|
mergedMenu: v,
|
|
@@ -646,9 +646,9 @@ const at = Ae(
|
|
|
646
646
|
schedulers: c,
|
|
647
647
|
currentScheduler: m,
|
|
648
648
|
catalogOptions: K,
|
|
649
|
-
categories:
|
|
649
|
+
categories: B,
|
|
650
650
|
subcategories: ee,
|
|
651
|
-
items:
|
|
651
|
+
items: W,
|
|
652
652
|
sortedItems: te,
|
|
653
653
|
categorizedItems: ne,
|
|
654
654
|
categorizedRawMenuItems: re,
|
|
@@ -665,9 +665,9 @@ const at = Ae(
|
|
|
665
665
|
// Action
|
|
666
666
|
setMenu: f,
|
|
667
667
|
readMenu: ve,
|
|
668
|
-
readRestaurants:
|
|
669
|
-
selectCatalog:
|
|
670
|
-
selectScheduler:
|
|
668
|
+
readRestaurants: _e,
|
|
669
|
+
selectCatalog: j,
|
|
670
|
+
selectScheduler: ge,
|
|
671
671
|
selectCategory: ye,
|
|
672
672
|
setRestaurantCustomAttributes: he,
|
|
673
673
|
updateMenu: Ce,
|
|
@@ -680,17 +680,17 @@ const at = Ae(
|
|
|
680
680
|
mapVariant: oe,
|
|
681
681
|
// history
|
|
682
682
|
canUndoHistory: Se,
|
|
683
|
-
canRedoHistory:
|
|
683
|
+
canRedoHistory: we,
|
|
684
684
|
undoHistory: () => {
|
|
685
|
-
const t =
|
|
685
|
+
const t = M.undo();
|
|
686
686
|
t && f(t, !1);
|
|
687
687
|
},
|
|
688
688
|
redoHistory: () => {
|
|
689
|
-
const t =
|
|
689
|
+
const t = M.redo();
|
|
690
690
|
t && f(t, !1);
|
|
691
691
|
},
|
|
692
692
|
clearHistory: () => {
|
|
693
|
-
|
|
693
|
+
M.clear();
|
|
694
694
|
}
|
|
695
695
|
};
|
|
696
696
|
}
|
|
@@ -702,6 +702,6 @@ export {
|
|
|
702
702
|
st as f,
|
|
703
703
|
tt as g,
|
|
704
704
|
et as m,
|
|
705
|
-
|
|
705
|
+
Be as o,
|
|
706
706
|
at as u
|
|
707
707
|
};
|
|
@@ -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, D as M } from "./menu-
|
|
4
|
+
import { u as k, D as M } from "./menu-BHr0A_kn.js";
|
|
5
5
|
const v = /* @__PURE__ */ d({
|
|
6
6
|
__name: "AddPriceGroupDialog",
|
|
7
7
|
setup(s) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { defineComponent as ie, computed as Y, resolveComponent as _, createElementBlock as d, openBlock as u, createVNode as t, createCommentVNode as F, unref as n, toDisplayString as 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 { H as S, G as r, u as pe, I as ve, J as ue } from "./menu-
|
|
2
|
+
import { H as S, G as r, u as pe, I as ve, J as ue } from "./menu-BHr0A_kn.js";
|
|
3
3
|
import { useI18n as de } from "@feedmepos/mf-common";
|
|
4
4
|
import { components as _e } from "@feedmepos/ui-library";
|
|
5
|
-
import { a as fe, L as ye } from "./LinkProductSideSheet-
|
|
5
|
+
import { a as fe, L as ye } from "./LinkProductSideSheet-CCW73uQb.js";
|
|
6
6
|
import { _ as ne } from "./FormSection.vue_vue_type_script_setup_true_lang-CO4YGYLB.js";
|
|
7
7
|
import { u as he } from "./discardConfirm-BHni0LNu.js";
|
|
8
|
-
import { u as ge } from "./menu-
|
|
8
|
+
import { u as ge } from "./menu-CvdQTq54.js";
|
|
9
9
|
const Ve = { class: "space-y-8" }, Fe = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "space-y-16"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as M, watch as _, ref as E, resolveComponent as f, createBlock as x, openBlock as C, unref as c, withCtx as V, createVNode as A } from "vue";
|
|
2
|
-
import { J as l, G as d, u as F } from "./menu-
|
|
2
|
+
import { J as l, G as d, u as F } from "./menu-BHr0A_kn.js";
|
|
3
3
|
import { useI18n as b } from "@feedmepos/mf-common";
|
|
4
4
|
import { useDialogChild as P } from "@feedmepos/ui-library";
|
|
5
|
-
import { u as v } from "./menuV2-
|
|
5
|
+
import { u as v } from "./menuV2-C3Ade0y6.js";
|
|
6
6
|
const y = /* @__PURE__ */ M({
|
|
7
7
|
__name: "AddSubcategoryDialogContentComponent",
|
|
8
8
|
props: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { u as C } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import "./menu-
|
|
1
|
+
import { u as C } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-oUoUXguS.js";
|
|
2
|
+
import "./menu-BHr0A_kn.js";
|
|
3
3
|
var Z = {
|
|
4
4
|
defaultAmount: 0,
|
|
5
5
|
defaultCurrency: "USD",
|
|
@@ -1,13 +1,13 @@
|
|
|
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 V, 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 { a6 as B, a7 as te, a4 as P, H as k, O as $, D as I, B as E, I as ne, a5 as ae, J as C, G as D, u as oe } from "./menu-
|
|
3
|
+
import { a6 as B, a7 as te, a4 as P, H as k, O as $, D as I, B as E, I as ne, a5 as ae, J as C, G as D, u as oe } from "./menu-BHr0A_kn.js";
|
|
4
4
|
import { useI18n as L } from "@feedmepos/mf-common";
|
|
5
5
|
import { useSnackbar as j, 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
9
|
import "./LinkProductSideSheet.vue_vue_type_style_index_0_scoped_97fa9d58_lang-DvG3mOom.js";
|
|
10
|
-
import "./menuV2-
|
|
10
|
+
import "./menuV2-C3Ade0y6.js";
|
|
11
11
|
import { c as me } from "./createComponentProgrammatically-Bt2rn1IQ.js";
|
|
12
12
|
const de = ["value", "disabled"], ce = /* @__PURE__ */ O({
|
|
13
13
|
__name: "NumberPrecisionInput",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@feedmepos/mf-menu",
|
|
3
|
-
"version": "0.31.33-
|
|
3
|
+
"version": "0.31.33-prod",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"vue3-lottie": "^3.3.0",
|
|
54
54
|
"vuedraggable": "^4.1.0",
|
|
55
55
|
"xlsx": "^0.18.5",
|
|
56
|
-
"@feedmepos/mf-common": "^1.27.
|
|
56
|
+
"@feedmepos/mf-common": "^1.27.2"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@rollup/plugin-commonjs": "^28.0.2",
|