@feedmepos/mf-menu 0.31.48-prod → 0.31.49-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-D-dcqNRb.js → App-BCvjUJrr.js} +8 -8
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-na_OOlYX.js → ApplyProduct.vue_vue_type_script_setup_true_lang-BAGyzIXV.js} +3 -3
- package/dist/{Catalog-BT_NvH4H.js → Catalog-DRt6a0Hu.js} +6 -6
- package/dist/{Category-bsYxspvu.js → Category-DwbfyQnV.js} +6 -6
- package/dist/{Category-CIlVNPov.js → Category-UpQORikA.js} +4 -4
- package/dist/{CookingGuide-C7IxQzTM.js → CookingGuide-BHRvOQoG.js} +4 -4
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-CJnE543q.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-hkbDY7UX.js} +1 -1
- package/dist/{Group-CuQ0gDgC.js → Group-BUqKXHlt.js} +3 -3
- package/dist/{Group-B5882UFx.js → Group-CnuitV91.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-Btk8J3Tp.js → Group.vue_vue_type_script_setup_true_lang-BGxKuJj_.js} +7 -7
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-yIXsPtY4.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-B55U1U2R.js} +5 -5
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-DFSHCb9I.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-CrDOvrLz.js} +806 -825
- package/dist/{Ingredient-24hSAj8Z.js → Ingredient-C33muX5K.js} +3 -3
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-BVcdOrDO.js → InventoryBinding.vue_vue_type_script_setup_true_lang-DTf5ToCI.js} +2 -2
- package/dist/{LinkProductSideSheet-CD9mIEpc.js → LinkProductSideSheet-DqvyWHBu.js} +3 -3
- package/dist/{MenuSetting-CVySuMK8.js → MenuSetting-y4NiAJzS.js} +5 -5
- package/dist/{PrintRoute-CT0-6o2w.js → PrintRoute-CG2FSbUe.js} +4 -4
- package/dist/{Product-C2CtWFM5.js → Product-922r5opL.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-Ts0KnCTU.js → Product.vue_vue_type_script_setup_true_lang-BRqGEw_D.js} +13 -13
- package/dist/{ProductInternalTools-CyKeO24R.js → ProductInternalTools-BdMo9x7F.js} +5 -5
- package/dist/{Products-wRIs1LNY.js → Products-BH31aJ9e.js} +11 -11
- package/dist/{Publish-BKRVvye3.js → Publish-CTy1zn-Y.js} +150 -150
- package/dist/{Recipe-BQvRhIeZ.js → Recipe-UDTeSLNm.js} +4 -4
- package/dist/{Scheduler-CaQu66-9.js → Scheduler-BhoZSHCj.js} +3 -3
- package/dist/{ServingSequence-BlUi0Hzb.js → ServingSequence-DMYPGT8a.js} +3 -3
- package/dist/{Setting-DFsZYxSB.js → Setting-8ZdJPpK6.js} +5 -5
- package/dist/{Subcategory-BYnb9L7M.js → Subcategory-D5ZEbMPA.js} +4 -4
- package/dist/{Takeaway-DYiN0Yws.js → Takeaway-CSEAXFqW.js} +1 -1
- package/dist/{Takeaway-BQINJijW.js → Takeaway-D8fHGTrU.js} +4 -4
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-CnMEeZrd.js → Takeaway.vue_vue_type_script_setup_true_lang-DLT3gCtI.js} +5 -5
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-Bp40RcvB.js → Thumbnail.vue_vue_type_script_setup_true_lang-C08yzPpg.js} +4 -4
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-jzJLp-Ac.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DbAU1_31.js} +14 -14
- package/dist/{Unit-rT9SjnsI.js → Unit-BbPwl3JY.js} +2 -2
- package/dist/{Variant-B7aqcbez.js → Variant-DY5asTaZ.js} +3 -3
- package/dist/{_id_-DY1Fitul.js → _id_-D6d25cIW.js} +10 -10
- package/dist/{app-BO6bn7uh.js → app-CHeKRxK0.js} +26 -26
- package/dist/{app-RULuHy55.js → app-D3_p6wZb.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/api/menu.d.ts +1 -0
- package/dist/apps/mf-menu/src/stores/menu.d.ts +1 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-DRWIBDK1.js → linked-status-C-QT-kN0.js} +2 -2
- package/dist/assets/{override-menu-BLjzPUsy.js → override-menu-Dmy0Go_f.js} +2 -2
- package/dist/assets/{validate-menu-5sybvnwS.js → validate-menu-C9xQT-dc.js} +2 -2
- package/dist/{catalog-bwlWW8PZ.js → catalog-D1FQMY-4.js} +1 -1
- package/dist/{catalogSetting-DzX172wP.js → catalogSetting-R2Crvv26.js} +1 -1
- package/dist/{category-B28CLR_r.js → category-CR6xc-mv.js} +1 -1
- package/dist/{currency-SjGU_s1p.js → currency-ncd8jX_d.js} +1 -1
- package/dist/{customAttributes-D8y8beXk.js → customAttributes-BJ_nXSEm.js} +1 -1
- package/dist/{dayjs.min-CUujDjy2.js → dayjs.min-B0R5C5Bq.js} +1 -1
- package/dist/{index-Dc0tIOma.js → index-CbobnRVv.js} +1 -1
- package/dist/{index-BjlPBJit.js → index-DHn8Z9E_.js} +4 -4
- package/dist/{index-TqIfnnRh.js → index-DPMNoAcE.js} +3 -3
- package/dist/{index-KiKL6590.js → index-gBPAIvsu.js} +1 -1
- package/dist/{item-Bk4ePGsA.js → item-BsHP4Grd.js} +16 -16
- package/dist/iteration-BoeoXAHD.js +23 -0
- package/dist/{jszip.min-Cb0oLCRU.js → jszip.min-BoUqi0w4.js} +2 -2
- package/dist/{menu-J976EXhb.js → menu-BB63uHnZ.js} +1 -1
- package/dist/{menu-CKvTLOA7.js → menu-CJqAy1Hj.js} +694 -686
- package/dist/{menuV2-BWSBAnVp.js → menuV2-BC_P47Fa.js} +68 -68
- package/dist/{priceTier-BpWKl-29.js → priceTier-CIslTSpH.js} +1 -1
- package/dist/{scheduler-CnU_uh6T.js → scheduler-BJm0GcvS.js} +4 -4
- package/dist/{subcategory-Bn1Jr1uy.js → subcategory-SxLhtFLI.js} +2 -2
- package/dist/{toExcel-DxAn19PY.js → toExcel-CcnjN66I.js} +2 -2
- package/dist/{unit-BzHG0aHZ.js → unit-DGPM95z2.js} +2 -2
- package/package.json +1 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { an as L, H as
|
|
2
|
-
import { defineStore as
|
|
3
|
-
import { shallowRef as
|
|
1
|
+
import { an as L, H as E, D as I, A as J, ao as B, J as U, I as Y, a8 as w, c as V, X as k, ai as j, ap as Me, aq as ke, B as Ee, aa as Ie, ar as Re, as as Te, a7 as Fe } from "./menu-CJqAy1Hj.js";
|
|
2
|
+
import { defineStore as Ae } from "pinia";
|
|
3
|
+
import { shallowRef as Q, ref as D, computed as h, shallowReactive as Pe, effectScope as Ke, watch as Ne } from "vue";
|
|
4
4
|
import { useCoreStore as z } from "@feedmepos/mf-common";
|
|
5
|
-
import { useSnackbar as
|
|
6
|
-
const
|
|
5
|
+
import { useSnackbar as Oe } from "@feedmepos/ui-library";
|
|
6
|
+
const Ve = "/assets/linked-status-C-QT-kN0.js", xe = "/assets/override-menu-Dmy0Go_f.js";
|
|
7
7
|
function $e(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 =
|
|
13
|
+
const r = E(n), l = o ? r.modules.catalog.find((_) => _._id === o) : null, d = a ? r.modules.scheduler.find((_) => _._id === a) : null, i = l ? E(l) : void 0, c = o ? r.modules.catalog.filter((_) => _._id !== o) : [], m = d ? E(d) : void 0, f = e.reduce((_, y) => (_[y._id] = $e(y), _), {});
|
|
14
14
|
function v(_ = []) {
|
|
15
15
|
const y = e.map((C) => C._id);
|
|
16
16
|
return [
|
|
@@ -35,9 +35,9 @@ function Ue(e, n, o, a) {
|
|
|
35
35
|
...r.modules.scheduler.filter((_) => _._id !== a),
|
|
36
36
|
m
|
|
37
37
|
], r) : {
|
|
38
|
-
...
|
|
38
|
+
...B(),
|
|
39
39
|
modules: {
|
|
40
|
-
...
|
|
40
|
+
...B().modules,
|
|
41
41
|
catalog: r.modules.catalog,
|
|
42
42
|
item: r.modules.item,
|
|
43
43
|
group: r.modules.group,
|
|
@@ -59,7 +59,7 @@ function T(e, n, o) {
|
|
|
59
59
|
return i ? c = ((f = d.items) == null ? void 0 : f.map((_) => {
|
|
60
60
|
var C;
|
|
61
61
|
const y = (C = i.items) == null ? void 0 : C.find(
|
|
62
|
-
(
|
|
62
|
+
(R) => R._id === _._id && R.combinationKey === _.combinationKey
|
|
63
63
|
);
|
|
64
64
|
return T(y || _, n, o + 1);
|
|
65
65
|
})) ?? [] : c = ((v = d.items) == null ? void 0 : v.map((_) => T(_, n, o + 1))) ?? [], {
|
|
@@ -85,7 +85,7 @@ function De(e, n) {
|
|
|
85
85
|
if (m)
|
|
86
86
|
return T(m, n, 1);
|
|
87
87
|
const f = {
|
|
88
|
-
...
|
|
88
|
+
...I.generator.initMenuV4ItemOverrider(),
|
|
89
89
|
_id: c._id,
|
|
90
90
|
combinationKey: c.combinationKey
|
|
91
91
|
};
|
|
@@ -93,7 +93,7 @@ function De(e, n) {
|
|
|
93
93
|
});
|
|
94
94
|
return { ...l, items: i };
|
|
95
95
|
}), a = e.variant ? e.variant.variantCombinations.map((l) => T(l, n, 1)) : [], r = {
|
|
96
|
-
...
|
|
96
|
+
...I.generator.initMenuV4ItemOverrider(),
|
|
97
97
|
_id: e._id,
|
|
98
98
|
name: e.name,
|
|
99
99
|
code: e.code,
|
|
@@ -150,10 +150,10 @@ function He(e, n) {
|
|
|
150
150
|
};
|
|
151
151
|
}
|
|
152
152
|
async function et(e, n, o, a, r, l = !0) {
|
|
153
|
-
const d =
|
|
153
|
+
const d = E(o), i = l ? Ue(n, d, a, r) : d, c = n.reduce((v, _) => (v[_._id] = i.modules.item.find((y) => y._id === _._id), v), {}), m = n.reduce((v, _) => {
|
|
154
154
|
const y = _._id;
|
|
155
155
|
return v[y] = De(c[y], e), v;
|
|
156
|
-
}, {}), f =
|
|
156
|
+
}, {}), f = I.getFallbackPrices({
|
|
157
157
|
rawMenu: i,
|
|
158
158
|
items: m,
|
|
159
159
|
catalogId: a || void 0,
|
|
@@ -186,7 +186,7 @@ async function nt(e, n) {
|
|
|
186
186
|
if (x.has(o))
|
|
187
187
|
return x.get(o);
|
|
188
188
|
const a = await L(
|
|
189
|
-
|
|
189
|
+
Ve,
|
|
190
190
|
JSON.stringify({
|
|
191
191
|
menu: e,
|
|
192
192
|
itemId: n
|
|
@@ -194,7 +194,7 @@ async function nt(e, n) {
|
|
|
194
194
|
);
|
|
195
195
|
return x.set(o, a), a;
|
|
196
196
|
}
|
|
197
|
-
async function
|
|
197
|
+
async function X(e, n, o) {
|
|
198
198
|
return await L(xe, {
|
|
199
199
|
menu: e,
|
|
200
200
|
catalogId: n,
|
|
@@ -232,17 +232,17 @@ function ot(e, n, o) {
|
|
|
232
232
|
return r(n, o);
|
|
233
233
|
}
|
|
234
234
|
const $ = /* @__PURE__ */ new Map();
|
|
235
|
-
async function
|
|
235
|
+
async function Ge(e, n, o) {
|
|
236
236
|
const a = `${e._id}-${e.updatedAt}-${n || "null"}-${o || "null"}`;
|
|
237
237
|
if ($.has(a))
|
|
238
238
|
return $.get(a);
|
|
239
|
-
const r = await
|
|
239
|
+
const r = await X(e, n, o);
|
|
240
240
|
return $.set(a, r), r;
|
|
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 Ge(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;
|
|
@@ -251,11 +251,11 @@ async function st(e, n, o) {
|
|
|
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
253
|
const v = (i = c.items) == null ? void 0 : i.filter((y) => y._id === o && y.combinationKey), _ = [m, ...v].map((y) => {
|
|
254
|
-
var F,
|
|
255
|
-
const C = y.combinationKey ? (
|
|
256
|
-
(
|
|
257
|
-
) : f,
|
|
258
|
-
return l(
|
|
254
|
+
var F, A;
|
|
255
|
+
const C = y.combinationKey ? (A = (F = f == null ? void 0 : f.variant) == null ? void 0 : F.variantCombinations) == null ? void 0 : A.find(
|
|
256
|
+
(P) => P.combinationKey === y.combinationKey
|
|
257
|
+
) : f, R = C && f ? l(f, C) : y;
|
|
258
|
+
return l(R, y);
|
|
259
259
|
});
|
|
260
260
|
r.push({
|
|
261
261
|
group: c,
|
|
@@ -268,7 +268,7 @@ async function st(e, n, o) {
|
|
|
268
268
|
function We({
|
|
269
269
|
maxHistorySize: e = 50
|
|
270
270
|
}) {
|
|
271
|
-
const n =
|
|
271
|
+
const n = Q([]), o = D(-1), a = h(() => o.value > 0), r = h(() => o.value < n.value.length - 1);
|
|
272
272
|
function l(m) {
|
|
273
273
|
n.value.push(m), o.value++, n.value.length > e && (n.value.shift(), o.value--);
|
|
274
274
|
}
|
|
@@ -292,7 +292,7 @@ function We({
|
|
|
292
292
|
clear: c
|
|
293
293
|
};
|
|
294
294
|
}
|
|
295
|
-
const
|
|
295
|
+
const qe = {
|
|
296
296
|
async updateMenuModule(e, n) {
|
|
297
297
|
const o = U.RequestRunner.operation(n, e.modules);
|
|
298
298
|
if (o.validateError.length > 0)
|
|
@@ -329,7 +329,7 @@ function Z() {
|
|
|
329
329
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
330
330
|
};
|
|
331
331
|
}
|
|
332
|
-
function
|
|
332
|
+
function Be() {
|
|
333
333
|
return {
|
|
334
334
|
restaurants: [],
|
|
335
335
|
menu: { ...Z(), _rev: "" },
|
|
@@ -342,15 +342,15 @@ function je() {
|
|
|
342
342
|
}
|
|
343
343
|
};
|
|
344
344
|
}
|
|
345
|
-
const at =
|
|
345
|
+
const at = Ae(
|
|
346
346
|
"mf-menu-store-v2",
|
|
347
347
|
() => {
|
|
348
|
-
const e =
|
|
348
|
+
const e = Pe(Be()), n = z(), o = Oe(), a = h(() => e.menu.modules.serveSequence ? w(e.menu.modules.serveSequence, {
|
|
349
349
|
selector: "position"
|
|
350
350
|
}) : []), r = h(() => {
|
|
351
351
|
var t;
|
|
352
|
-
return ((t = n.currentBusiness.value) == null ? void 0 : t.menuVersion) ||
|
|
353
|
-
}), l = h(() => r.value ===
|
|
352
|
+
return ((t = n.currentBusiness.value) == null ? void 0 : t.menuVersion) || V.F_MENU_VERSION.v3;
|
|
353
|
+
}), l = h(() => r.value === V.F_MENU_VERSION.v4), d = h(() => {
|
|
354
354
|
const t = e.menu.modules.catalog;
|
|
355
355
|
return w(t, { selector: "name" });
|
|
356
356
|
}), i = h(() => {
|
|
@@ -358,7 +358,7 @@ const at = Pe(
|
|
|
358
358
|
let t = e.menu.modules.catalog.find(
|
|
359
359
|
(u) => u._id === e.currentCatalogId
|
|
360
360
|
);
|
|
361
|
-
return t && ((s = t.linkItemRules) != null && s.length) && (t =
|
|
361
|
+
return t && ((s = t.linkItemRules) != null && s.length) && (t = I.populateCatalog({
|
|
362
362
|
catalog: t,
|
|
363
363
|
ruleGroupSettings: e.menu.ruleGroupSettings,
|
|
364
364
|
items: e.menu.modules.item,
|
|
@@ -370,13 +370,13 @@ const at = Pe(
|
|
|
370
370
|
function f(t, s = !0) {
|
|
371
371
|
e.menu = { ...t, _rev: e.menu._rev }, s && M.push(e.menu);
|
|
372
372
|
}
|
|
373
|
-
const v =
|
|
373
|
+
const v = Q(Z()), _ = D(!1), y = D(1);
|
|
374
374
|
async function C() {
|
|
375
375
|
var u;
|
|
376
376
|
_.value = !0;
|
|
377
377
|
let t = e.menu.modules.catalog;
|
|
378
378
|
if (i.value && ((u = i.value.linkItemRules) != null && u.length)) {
|
|
379
|
-
const p =
|
|
379
|
+
const p = I.populateCatalog({
|
|
380
380
|
catalog: i.value,
|
|
381
381
|
ruleGroupSettings: e.menu.ruleGroupSettings,
|
|
382
382
|
items: e.menu.modules.item,
|
|
@@ -384,7 +384,7 @@ const at = Pe(
|
|
|
384
384
|
});
|
|
385
385
|
t = e.menu.modules.catalog.map((g) => g._id === (p == null ? void 0 : p._id) ? p : g);
|
|
386
386
|
}
|
|
387
|
-
const s = await
|
|
387
|
+
const s = await X(
|
|
388
388
|
{
|
|
389
389
|
...e.menu,
|
|
390
390
|
modules: {
|
|
@@ -407,14 +407,14 @@ const at = Pe(
|
|
|
407
407
|
}
|
|
408
408
|
const F = Y.debounce(C, 200);
|
|
409
409
|
Ke(!0).run(() => {
|
|
410
|
-
|
|
410
|
+
Ne(
|
|
411
411
|
() => [e.menu, e.currentCatalogId, e.currentSchedulerId],
|
|
412
412
|
() => {
|
|
413
413
|
_.value || F();
|
|
414
414
|
}
|
|
415
415
|
);
|
|
416
416
|
});
|
|
417
|
-
const
|
|
417
|
+
const P = h(() => [
|
|
418
418
|
{
|
|
419
419
|
label: "Main",
|
|
420
420
|
value: null
|
|
@@ -423,21 +423,21 @@ const at = Pe(
|
|
|
423
423
|
label: t.name,
|
|
424
424
|
value: t._id
|
|
425
425
|
}))
|
|
426
|
-
]),
|
|
426
|
+
]), G = h(() => {
|
|
427
427
|
const t = v.value.modules.category;
|
|
428
428
|
return [
|
|
429
|
-
...
|
|
429
|
+
...N.value.item.addon ? [
|
|
430
430
|
{
|
|
431
431
|
_id: e.currentCatalogId ? "" : null,
|
|
432
432
|
name: "Addon",
|
|
433
433
|
position: 0
|
|
434
434
|
}
|
|
435
435
|
] : [],
|
|
436
|
-
...
|
|
436
|
+
...k(t, (s) => s.name)
|
|
437
437
|
];
|
|
438
438
|
}), ee = h(() => {
|
|
439
439
|
const t = v.value.modules.subCategory || [];
|
|
440
|
-
return
|
|
440
|
+
return k(t, (s) => s.name);
|
|
441
441
|
}), W = h(() => {
|
|
442
442
|
var s;
|
|
443
443
|
let t = v.value.modules.item;
|
|
@@ -451,18 +451,18 @@ const at = Pe(
|
|
|
451
451
|
return (g == null ? void 0 : g.orderFrom) !== J.F_ORDER_FROM.enum.NONE;
|
|
452
452
|
});
|
|
453
453
|
}
|
|
454
|
-
return
|
|
454
|
+
return k(t, (u) => u.code || u.name);
|
|
455
455
|
}), te = h(() => {
|
|
456
|
-
const t = e.menu.modules.category, s =
|
|
456
|
+
const t = e.menu.modules.category, s = k(t, (p) => p.name).reduce(
|
|
457
457
|
(p, g, S) => (p[g._id] = S, p),
|
|
458
458
|
{ "": 0 }
|
|
459
459
|
), u = e.menu.modules.item;
|
|
460
|
-
return
|
|
460
|
+
return k(
|
|
461
461
|
u,
|
|
462
462
|
(p) => p.code || p.name
|
|
463
463
|
).reduce((p, g, S) => (p[g._id] = S + s[g.category || ""], p), {});
|
|
464
|
-
}), ne = h(() =>
|
|
465
|
-
const t =
|
|
464
|
+
}), ne = h(() => j(K.value, G.value, W.value)), re = h(() => {
|
|
465
|
+
const t = N.value.item.addon ? [
|
|
466
466
|
{
|
|
467
467
|
_id: e.currentCatalogId ? "" : null,
|
|
468
468
|
name: "Addon",
|
|
@@ -470,7 +470,7 @@ const at = Pe(
|
|
|
470
470
|
},
|
|
471
471
|
...e.menu.modules.category
|
|
472
472
|
] : e.menu.modules.category;
|
|
473
|
-
return
|
|
473
|
+
return j(
|
|
474
474
|
e.menu.modules.variant,
|
|
475
475
|
t,
|
|
476
476
|
e.menu.modules.item
|
|
@@ -481,17 +481,17 @@ const at = Pe(
|
|
|
481
481
|
});
|
|
482
482
|
function oe(t = []) {
|
|
483
483
|
const s = t.map((p) => K.value.find((g) => g._id === p)).filter((p) => !!p);
|
|
484
|
-
return
|
|
484
|
+
return I.fullVariantCombination(s).reduce((p, g) => (p[g.combinationKey] = g.selectionName.join(" / "), p), {});
|
|
485
485
|
}
|
|
486
|
-
const se = h(() =>
|
|
486
|
+
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 || [], {
|
|
487
487
|
selector: "name"
|
|
488
488
|
})), ie = h(() => w(e.menu.modules.unit, { selector: "name" })), ce = h(() => w(Me(e.menu.modules.recipe, e.menu.modules.sku), {
|
|
489
489
|
selector: "name"
|
|
490
490
|
})), le = h(() => e.menu.modules.cookingGuide), de = h(() => {
|
|
491
|
-
const t =
|
|
491
|
+
const t = ke(e.menu.modules.sku);
|
|
492
492
|
return w(t, { selector: "code" });
|
|
493
|
-
}),
|
|
494
|
-
const t = !e.currentCatalogId, s = r.value ===
|
|
493
|
+
}), N = h(() => {
|
|
494
|
+
const t = !e.currentCatalogId, s = r.value === V.F_MENU_VERSION.v4, u = !e.currentSchedulerId, p = {
|
|
495
495
|
create: t && u,
|
|
496
496
|
edit: t && u,
|
|
497
497
|
delete: t && u
|
|
@@ -559,7 +559,7 @@ const at = Pe(
|
|
|
559
559
|
}
|
|
560
560
|
};
|
|
561
561
|
});
|
|
562
|
-
function
|
|
562
|
+
function O(t) {
|
|
563
563
|
return `${t.systemCode}/${t.taxCode}`;
|
|
564
564
|
}
|
|
565
565
|
function me(t) {
|
|
@@ -567,15 +567,15 @@ const at = Pe(
|
|
|
567
567
|
return { systemCode: s, taxCode: u };
|
|
568
568
|
}
|
|
569
569
|
function fe(t, s, u) {
|
|
570
|
-
return (t ?? s ?? []).map((p) =>
|
|
570
|
+
return (t ?? s ?? []).map((p) => O(p)).find((p) => u.some((g) => g.value === p));
|
|
571
571
|
}
|
|
572
572
|
const pe = h(() => {
|
|
573
573
|
var p;
|
|
574
|
-
const t = ["SV5", "SV10"], s =
|
|
574
|
+
const t = ["SV5", "SV10"], s = Ee.Country.getCountryFlattenTaxes(
|
|
575
575
|
z().currentCountry.value
|
|
576
576
|
), u = s.filter((g) => l.value || !t.includes(g.taxCode)).map((g) => ({
|
|
577
|
-
label: `${g.name} (${
|
|
578
|
-
value:
|
|
577
|
+
label: `${g.name} (${Ie(g.rate)}%)`,
|
|
578
|
+
value: O(g),
|
|
579
579
|
meta: {
|
|
580
580
|
rate: g.rate
|
|
581
581
|
}
|
|
@@ -586,7 +586,7 @@ const at = Pe(
|
|
|
586
586
|
};
|
|
587
587
|
}), ve = async () => {
|
|
588
588
|
const t = await Fe.readMenu();
|
|
589
|
-
e.menu = t ?? e.menu,
|
|
589
|
+
e.menu = t ?? e.menu, q(null);
|
|
590
590
|
}, ge = async () => {
|
|
591
591
|
const { fetchAllRestaurants: t } = Te();
|
|
592
592
|
await t({
|
|
@@ -594,7 +594,7 @@ const at = Pe(
|
|
|
594
594
|
e.restaurants = s;
|
|
595
595
|
}
|
|
596
596
|
});
|
|
597
|
-
},
|
|
597
|
+
}, q = (t) => {
|
|
598
598
|
e.currentCatalogId = t;
|
|
599
599
|
}, _e = (t) => {
|
|
600
600
|
e.currentSchedulerId = t;
|
|
@@ -614,10 +614,10 @@ const at = Pe(
|
|
|
614
614
|
if (s || p.some(
|
|
615
615
|
(S) => [U.F_OPERATION_TYPE.delete, U.F_OPERATION_TYPE.deleteMany].includes(S.operation)
|
|
616
616
|
)) {
|
|
617
|
-
const S = await
|
|
617
|
+
const S = await Re(p, e.menu.modules);
|
|
618
618
|
if (S !== !0) throw new Error(S);
|
|
619
619
|
}
|
|
620
|
-
const g = await
|
|
620
|
+
const g = await qe.updateMenuModule(e.menu, p);
|
|
621
621
|
return f(g.menu), g;
|
|
622
622
|
} catch (g) {
|
|
623
623
|
o.open({
|
|
@@ -650,8 +650,8 @@ const at = Pe(
|
|
|
650
650
|
currentCatalog: i,
|
|
651
651
|
schedulers: c,
|
|
652
652
|
currentScheduler: m,
|
|
653
|
-
catalogOptions:
|
|
654
|
-
categories:
|
|
653
|
+
catalogOptions: P,
|
|
654
|
+
categories: G,
|
|
655
655
|
subcategories: ee,
|
|
656
656
|
items: W,
|
|
657
657
|
sortedItems: te,
|
|
@@ -665,13 +665,13 @@ const at = Pe(
|
|
|
665
665
|
recipes: ce,
|
|
666
666
|
cookingGuide: le,
|
|
667
667
|
skus: de,
|
|
668
|
-
rules:
|
|
668
|
+
rules: N,
|
|
669
669
|
taxSetting: pe,
|
|
670
670
|
// Action
|
|
671
671
|
setMenu: f,
|
|
672
672
|
readMenu: ve,
|
|
673
673
|
readRestaurants: ge,
|
|
674
|
-
selectCatalog:
|
|
674
|
+
selectCatalog: q,
|
|
675
675
|
selectScheduler: _e,
|
|
676
676
|
selectCategory: ye,
|
|
677
677
|
setRestaurantAttrParams: he,
|
|
@@ -679,7 +679,7 @@ const at = Pe(
|
|
|
679
679
|
updateMenuSetting: Ce,
|
|
680
680
|
computeMergedMenu: C,
|
|
681
681
|
// helper
|
|
682
|
-
encodeTax:
|
|
682
|
+
encodeTax: O,
|
|
683
683
|
decodeTax: me,
|
|
684
684
|
getSelectedTax: fe,
|
|
685
685
|
mapVariant: oe,
|
|
@@ -707,6 +707,6 @@ export {
|
|
|
707
707
|
st as f,
|
|
708
708
|
tt as g,
|
|
709
709
|
et as m,
|
|
710
|
-
|
|
710
|
+
Ge as o,
|
|
711
711
|
at as u
|
|
712
712
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as d, ref as g, watch as _, resolveComponent as S, createBlock as T, openBlock as f, unref as y, computed as h } from "vue";
|
|
2
2
|
import { useI18n as m } from "@feedmepos/mf-common";
|
|
3
3
|
import { useDialogChild as w, useDialog as x, useSnackbar as C } from "@feedmepos/ui-library";
|
|
4
|
-
import { u as k, G as M } from "./menu-
|
|
4
|
+
import { u as k, G as M } from "./menu-CJqAy1Hj.js";
|
|
5
5
|
const v = /* @__PURE__ */ d({
|
|
6
6
|
__name: "AddPriceGroupDialog",
|
|
7
7
|
setup(s) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { defineComponent as ie, computed as Y, resolveComponent as _, createElementBlock as d, openBlock as u, createVNode as t, createCommentVNode as F, unref as n, toDisplayString as L, createElementVNode as h, withCtx as v, Fragment as N, renderList as M, createBlock as I, ref as H, Transition as se, createTextVNode as me } from "vue";
|
|
2
|
-
import { H as S, A as r, u as pe, I as ve, J as ue } from "./menu-
|
|
2
|
+
import { H as S, A as r, u as pe, I as ve, J as ue } from "./menu-CJqAy1Hj.js";
|
|
3
3
|
import { useI18n as de } from "@feedmepos/mf-common";
|
|
4
4
|
import { components as _e } from "@feedmepos/ui-library";
|
|
5
|
-
import { _ as ne, a as fe } from "./customAttributes-
|
|
5
|
+
import { _ as ne, a as fe } from "./customAttributes-BJ_nXSEm.js";
|
|
6
6
|
import { u as ye } from "./discardConfirm-BHni0LNu.js";
|
|
7
|
-
import { u as he } from "./menu-
|
|
8
|
-
import { L as ge } from "./LinkProductSideSheet-
|
|
7
|
+
import { u as he } from "./menu-BB63uHnZ.js";
|
|
8
|
+
import { L as ge } from "./LinkProductSideSheet-DqvyWHBu.js";
|
|
9
9
|
const Ve = { class: "space-y-8" }, Fe = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "space-y-16"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as M, watch as _, ref as E, resolveComponent as f, createBlock as x, openBlock as A, unref as c, withCtx as C, createVNode as V } from "vue";
|
|
2
|
-
import { J as l, A as d, u as F } from "./menu-
|
|
2
|
+
import { J as l, A as d, u as F } from "./menu-CJqAy1Hj.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-BC_P47Fa.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-CrDOvrLz.js";
|
|
2
|
+
import "./menu-CJqAy1Hj.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 { a5 as P, a6 as te, a3 as B, H as k, O as $, G as I, D as E, a4 as ne, J as C, A as D, I as oe, u as ae } from "./menu-
|
|
3
|
+
import { a5 as P, a6 as te, a3 as B, H as k, O as $, G as I, D as E, a4 as ne, J as C, A as D, I as oe, u as ae } from "./menu-CJqAy1Hj.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 "./app-CiBqmBzO.js";
|
|
10
|
-
import "./menuV2-
|
|
10
|
+
import "./menuV2-BC_P47Fa.js";
|
|
11
11
|
/* empty css */
|
|
12
12
|
import { c as me } from "./createComponentProgrammatically-Bt2rn1IQ.js";
|
|
13
13
|
const de = ["value", "disabled"], ce = /* @__PURE__ */ O({
|