@feedmepos/mf-menu 0.31.48-beta.1 → 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-DqaxtxJK.js → App-BCvjUJrr.js} +9 -9
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-CKb6F6yF.js → ApplyProduct.vue_vue_type_script_setup_true_lang-BAGyzIXV.js} +20 -20
- package/dist/{Catalog-C6hW1N0j.js → Catalog-DRt6a0Hu.js} +6 -6
- package/dist/{Category-CP0eack4.js → Category-DwbfyQnV.js} +6 -6
- package/dist/{Category-BZ06AfX_.js → Category-UpQORikA.js} +4 -4
- package/dist/{CookingGuide-BbjDjhF2.js → CookingGuide-BHRvOQoG.js} +4 -4
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-DARKrU5I.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-hkbDY7UX.js} +1 -1
- package/dist/{Group-HHJ5xT_Z.js → Group-BUqKXHlt.js} +3 -3
- package/dist/{Group-BqZYoYAN.js → Group-CnuitV91.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-gVv3L3aP.js → Group.vue_vue_type_script_setup_true_lang-BGxKuJj_.js} +7 -7
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BOHeg9pv.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-B55U1U2R.js} +9 -9
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-Dxdu18qG.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-CrDOvrLz.js} +806 -825
- package/dist/{Ingredient-BCft-dGL.js → Ingredient-C33muX5K.js} +3 -3
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-C03AF5zB.js → InventoryBinding.vue_vue_type_script_setup_true_lang-DTf5ToCI.js} +2 -2
- package/dist/{LinkProductSideSheet-3MBW9XxA.js → LinkProductSideSheet-DqvyWHBu.js} +3 -3
- package/dist/{MenuSetting-D7gIUm15.js → MenuSetting-y4NiAJzS.js} +5 -5
- package/dist/{PrintRoute-DTC1VckQ.js → PrintRoute-CG2FSbUe.js} +4 -4
- package/dist/{Product-Bl6y4YQK.js → Product-922r5opL.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-D99nWJzA.js → Product.vue_vue_type_script_setup_true_lang-BRqGEw_D.js} +14 -14
- package/dist/{ProductInternalTools-YXyxrYyk.js → ProductInternalTools-BdMo9x7F.js} +33 -32
- package/dist/{Products-DtxWQT5j.js → Products-BH31aJ9e.js} +11 -11
- package/dist/{Publish-Di483Zh0.js → Publish-CTy1zn-Y.js} +148 -148
- package/dist/{Recipe-BLx2oMBS.js → Recipe-UDTeSLNm.js} +4 -4
- package/dist/{Scheduler-DHLSQyD5.js → Scheduler-BhoZSHCj.js} +3 -3
- package/dist/{ServingSequence-BBbZ2F7Q.js → ServingSequence-DMYPGT8a.js} +3 -3
- package/dist/{Setting-DS3wGywo.js → Setting-8ZdJPpK6.js} +5 -5
- package/dist/{Subcategory-DGl8k9dv.js → Subcategory-D5ZEbMPA.js} +4 -4
- package/dist/{Takeaway-oR-Vwx4b.js → Takeaway-CSEAXFqW.js} +1 -1
- package/dist/{Takeaway-CN2iYpYz.js → Takeaway-D8fHGTrU.js} +4 -4
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-DB9JiHBV.js → Takeaway.vue_vue_type_script_setup_true_lang-DLT3gCtI.js} +5 -5
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-zORaCVRY.js → Thumbnail.vue_vue_type_script_setup_true_lang-C08yzPpg.js} +4 -4
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BwAdC7FF.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DbAU1_31.js} +16 -16
- package/dist/{Unit-5-aI9G84.js → Unit-BbPwl3JY.js} +2 -2
- package/dist/{Variant-CnChCn6y.js → Variant-DY5asTaZ.js} +3 -3
- package/dist/{_id_-7XqzOD2a.js → _id_-D6d25cIW.js} +10 -10
- package/dist/{app-BHd48ptL.js → app-CHeKRxK0.js} +26 -26
- package/dist/{app-DN1egfMq.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/components/feature/TreeEditor/store/menuV2.d.ts +1 -1
- 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-CyPUqGcf.js → linked-status-C-QT-kN0.js} +2 -2
- package/dist/assets/{override-menu-DTTkR82H.js → override-menu-Dmy0Go_f.js} +2 -2
- package/dist/assets/{validate-menu-DvETGMF0.js → validate-menu-C9xQT-dc.js} +2 -2
- package/dist/{catalog-Dc6iQ5O8.js → catalog-D1FQMY-4.js} +4 -4
- package/dist/{catalogSetting-C4WoJxdP.js → catalogSetting-R2Crvv26.js} +1 -1
- package/dist/{category-CYPnYGYD.js → category-CR6xc-mv.js} +1 -1
- package/dist/{currency-SYc_bz_9.js → currency-ncd8jX_d.js} +1 -1
- package/dist/{customAttributes-DgnkFhNM.js → customAttributes-BJ_nXSEm.js} +1 -1
- package/dist/{dayjs.min-Dz-DcSsk.js → dayjs.min-B0R5C5Bq.js} +1 -1
- package/dist/{index-CIiuL7KY.js → index-CbobnRVv.js} +1 -1
- package/dist/{index-CQmcIv1Z.js → index-DHn8Z9E_.js} +4 -4
- package/dist/{index-7uCie6ZA.js → index-DPMNoAcE.js} +3 -3
- package/dist/{index-Wlgw4uYJ.js → index-gBPAIvsu.js} +1 -1
- package/dist/{item-BO-XkhED.js → item-BsHP4Grd.js} +394 -394
- package/dist/iteration-BoeoXAHD.js +23 -0
- package/dist/{jszip.min-BQTVHKlp.js → jszip.min-BoUqi0w4.js} +353 -353
- package/dist/{menu-xpxg5zG3.js → menu-BB63uHnZ.js} +1 -1
- package/dist/{menu-CvpqXXRv.js → menu-CJqAy1Hj.js} +2790 -2828
- package/dist/{menuV2-Drc6xmjY.js → menuV2-BC_P47Fa.js} +55 -55
- package/dist/{priceTier-yPJt7fty.js → priceTier-CIslTSpH.js} +1 -1
- package/dist/{scheduler-v8bTRhv1.js → scheduler-BJm0GcvS.js} +4 -4
- package/dist/{subcategory-DzW3tzot.js → subcategory-SxLhtFLI.js} +2 -2
- package/dist/{toExcel-DU7ZV6__.js → toExcel-CcnjN66I.js} +2 -2
- package/dist/tooltip-CQW9YRO5.js +60 -0
- package/dist/{unit-CQOHOhyJ.js → unit-DGPM95z2.js} +2 -2
- package/package.json +1 -1
- package/dist/tooltip-B5BiPMx9.js +0 -32
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
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
9
|
const n = E(e), o = (a = n.variant) == null ? void 0 : a.variantCombinations;
|
|
@@ -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,
|
|
@@ -153,7 +153,7 @@ async function et(e, n, o, a, r, l = !0) {
|
|
|
153
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,
|
|
@@ -236,7 +236,7 @@ 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) {
|
|
@@ -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,
|
|
@@ -265,10 +265,10 @@ async function st(e, n, o) {
|
|
|
265
265
|
}
|
|
266
266
|
return r;
|
|
267
267
|
}
|
|
268
|
-
function
|
|
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 qe({
|
|
|
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
|
|
@@ -426,7 +426,7 @@ const at = Pe(
|
|
|
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",
|
|
@@ -438,7 +438,7 @@ const at = Pe(
|
|
|
438
438
|
}), ee = h(() => {
|
|
439
439
|
const t = v.value.modules.subCategory || [];
|
|
440
440
|
return k(t, (s) => s.name);
|
|
441
|
-
}),
|
|
441
|
+
}), W = h(() => {
|
|
442
442
|
var s;
|
|
443
443
|
let t = v.value.modules.item;
|
|
444
444
|
if (i.value) {
|
|
@@ -461,8 +461,8 @@ const at = Pe(
|
|
|
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,7 +481,7 @@ 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
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"
|
|
@@ -490,8 +490,8 @@ const at = Pe(
|
|
|
490
490
|
})), le = h(() => e.menu.modules.cookingGuide), de = h(() => {
|
|
491
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
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({
|
|
@@ -634,7 +634,7 @@ const at = Pe(
|
|
|
634
634
|
priceTierSettings: t.priceTierSettings
|
|
635
635
|
};
|
|
636
636
|
return f(s), s;
|
|
637
|
-
}, M =
|
|
637
|
+
}, M = We({ maxHistorySize: 50 }), be = h(() => M.canUndo.value), we = h(() => M.canRedo.value);
|
|
638
638
|
return {
|
|
639
639
|
state: e,
|
|
640
640
|
// loading state
|
|
@@ -650,10 +650,10 @@ const at = Pe(
|
|
|
650
650
|
currentCatalog: i,
|
|
651
651
|
schedulers: c,
|
|
652
652
|
currentScheduler: m,
|
|
653
|
-
catalogOptions:
|
|
653
|
+
catalogOptions: P,
|
|
654
654
|
categories: G,
|
|
655
655
|
subcategories: ee,
|
|
656
|
-
items:
|
|
656
|
+
items: W,
|
|
657
657
|
sortedItems: te,
|
|
658
658
|
categorizedItems: ne,
|
|
659
659
|
categorizedRawMenuItems: re,
|
|
@@ -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,
|
|
@@ -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",
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { defineComponent as v, createElementBlock as w, openBlock as B, createElementVNode as d, toDisplayString as f, resolveDirective as P, withDirectives as S } from "vue";
|
|
2
|
+
const x = { class: "space-y-4" }, D = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, E = { class: "fm-typo-en-body-lg-600" }, I = /* @__PURE__ */ v({
|
|
3
|
+
__name: "InfoBasic",
|
|
4
|
+
props: {
|
|
5
|
+
name: {
|
|
6
|
+
type: String,
|
|
7
|
+
required: !0
|
|
8
|
+
},
|
|
9
|
+
value: {
|
|
10
|
+
type: String,
|
|
11
|
+
required: !0
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
setup(s) {
|
|
15
|
+
return (t, n) => (B(), w("div", x, [
|
|
16
|
+
d("div", D, f(s.name), 1),
|
|
17
|
+
d("div", E, f(s.value), 1)
|
|
18
|
+
]));
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
async function M(s) {
|
|
22
|
+
const {
|
|
23
|
+
items: t,
|
|
24
|
+
processor: n,
|
|
25
|
+
batchSize: o = 5,
|
|
26
|
+
batchDelay: g = 200,
|
|
27
|
+
onProgress: c,
|
|
28
|
+
progressMessage: a,
|
|
29
|
+
onBatchEnd: r
|
|
30
|
+
} = s, i = t.length, l = [];
|
|
31
|
+
for (let e = 0; e < t.length; e += o) {
|
|
32
|
+
const y = t.slice(e, e + o), h = e + 1, m = Math.min(e + o, t.length), u = `Processing items ${h}-${m}/${i}...`;
|
|
33
|
+
a && (a.value = u), c && c({
|
|
34
|
+
current: e,
|
|
35
|
+
total: i,
|
|
36
|
+
batchStart: h,
|
|
37
|
+
batchEnd: m,
|
|
38
|
+
message: u
|
|
39
|
+
});
|
|
40
|
+
const _ = y.map(n), p = await Promise.all(_);
|
|
41
|
+
l.push(...p), r && r({
|
|
42
|
+
batchIndex: Math.floor(e / o),
|
|
43
|
+
results: p
|
|
44
|
+
}), e + o < t.length && await new Promise((b) => setTimeout(b, g));
|
|
45
|
+
}
|
|
46
|
+
return l;
|
|
47
|
+
}
|
|
48
|
+
function $(s, t, n = 110) {
|
|
49
|
+
const o = P("tooltip");
|
|
50
|
+
return S(s, [[o, { content: t, zIndex: n }]]);
|
|
51
|
+
}
|
|
52
|
+
function k(s, t = 110) {
|
|
53
|
+
return { content: s, zIndex: t };
|
|
54
|
+
}
|
|
55
|
+
export {
|
|
56
|
+
k as _,
|
|
57
|
+
I as a,
|
|
58
|
+
M as p,
|
|
59
|
+
$ as w
|
|
60
|
+
};
|
|
@@ -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 {
|
|
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({
|
package/package.json
CHANGED
package/dist/tooltip-B5BiPMx9.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { defineComponent as c, createElementBlock as s, openBlock as a, createElementVNode as n, toDisplayString as i, resolveDirective as l, withDirectives as p } from "vue";
|
|
2
|
-
const d = { class: "space-y-4" }, u = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, m = { class: "fm-typo-en-body-lg-600" }, y = /* @__PURE__ */ c({
|
|
3
|
-
__name: "InfoBasic",
|
|
4
|
-
props: {
|
|
5
|
-
name: {
|
|
6
|
-
type: String,
|
|
7
|
-
required: !0
|
|
8
|
-
},
|
|
9
|
-
value: {
|
|
10
|
-
type: String,
|
|
11
|
-
required: !0
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
setup(e) {
|
|
15
|
-
return (t, o) => (a(), s("div", d, [
|
|
16
|
-
n("div", u, i(e.name), 1),
|
|
17
|
-
n("div", m, i(e.value), 1)
|
|
18
|
-
]));
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
function f(e, t, o = 110) {
|
|
22
|
-
const r = l("tooltip");
|
|
23
|
-
return p(e, [[r, { content: t, zIndex: o }]]);
|
|
24
|
-
}
|
|
25
|
-
function v(e, t = 110) {
|
|
26
|
-
return { content: e, zIndex: t };
|
|
27
|
-
}
|
|
28
|
-
export {
|
|
29
|
-
v as _,
|
|
30
|
-
y as a,
|
|
31
|
-
f as w
|
|
32
|
-
};
|