@feedmepos/mf-menu 0.31.1 → 0.31.3
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-DwnuSB_K.js → App-DEtLv77t.js} +6 -6
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-SnnMP9af.js → ApplyProduct.vue_vue_type_script_setup_true_lang-CLdzAPFw.js} +2 -2
- package/dist/{Catalog-BCC1fHsR.js → Catalog-DQd_53jm.js} +5 -5
- package/dist/{Category-SbAKJCcC.js → Category-GnHGz6vU.js} +5 -5
- package/dist/{CookingGuide-R8YZTG7U.js → CookingGuide-B1qrjYEM.js} +4 -4
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-BQjmbaYU.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-CQZRtZ9m.js} +1 -1
- package/dist/{Group-Dpulnp4G.js → Group-Bp0Bz82V.js} +3 -3
- package/dist/{Group-BfPYqEKe.js → Group-Dlm3QCDH.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-DO7pYTqD.js → Group.vue_vue_type_script_setup_true_lang-DRX0z8HA.js} +30 -21
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-C6kvir14.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D4SwsCnk.js} +3 -3
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-Dq_FQClG.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-H43LPcLH.js} +1459 -1459
- package/dist/{Ingredient-DyVBg2OH.js → Ingredient-B9jNFufj.js} +4 -4
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-CMn_OBtt.js → InventoryBinding.vue_vue_type_script_setup_true_lang-juskHdZV.js} +1052 -1052
- package/dist/{LinkProductSideSheet-O1S1WQrf.js → LinkProductSideSheet-BBQXucIi.js} +2 -2
- package/dist/{MenuSetting-Bd7M9CZd.js → MenuSetting-BhgzzYd7.js} +4 -4
- package/dist/{PrintRoute-CJgh1UQS.js → PrintRoute-m1UT4GCU.js} +4 -4
- package/dist/{Product-C-HBK83E.js → Product-Crvvmvzc.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-6WBb0jig.js → Product.vue_vue_type_script_setup_true_lang-DYPuj8x7.js} +12 -12
- package/dist/{Products-C-l0f6Xx.js → Products-MIWkrTBO.js} +683 -683
- package/dist/{Publish-CEGsOIz4.js → Publish-DVLy5QVv.js} +4 -4
- package/dist/{Recipe-DKcBkq3P.js → Recipe-DL7QeByP.js} +5 -5
- package/dist/{Scheduler-CilYmlpA.js → Scheduler-eCRbMD3X.js} +3 -3
- package/dist/{ServingSequence-Dh3xZ4-y.js → ServingSequence-uUgvVSwD.js} +3 -3
- package/dist/{Setting-VAVGQ9ef.js → Setting-Dixt6Q05.js} +4 -4
- package/dist/{Subcategory-DIuYpxUb.js → Subcategory-5rIawEAV.js} +5 -5
- package/dist/{Takeaway-BceUdDxJ.js → Takeaway-CN7Pq4uh.js} +1 -1
- package/dist/{Takeaway-CqI0yaY4.js → Takeaway-CSDtSM2J.js} +4 -4
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-T89RHk_U.js → Takeaway.vue_vue_type_script_setup_true_lang-mkkSuPOc.js} +5 -5
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-D6A3zbo8.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-mQFPlOAK.js} +13 -13
- package/dist/{Unit-Dk01i08e.js → Unit-C_4_pM1N.js} +2 -2
- package/dist/{Variant-DmJrq2PR.js → Variant-BKXt8cqU.js} +3 -3
- package/dist/{_id_-BwxqdG6o.js → _id_-DpxalU5t.js} +9 -9
- package/dist/{app-BlIOILFy.js → app-B_mKaOSC.js} +22 -22
- package/dist/{app-a9LAWXty.js → app-BnCf5y7j.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/components/feature/ApplyProduct/index.d.ts +36 -6
- package/dist/apps/mf-menu/src/components/feature/PriceTier/PriceTierButton.vue.d.ts +36 -6
- package/dist/apps/mf-menu/src/components/feature/PriceTier/PriceTierForm.vue.d.ts +36 -6
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/item.d.ts +36 -6
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/scheduler.d.ts +18 -3
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/useItemFormManagement.d.ts +18 -3
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/item/ItemForm.vue.d.ts +54 -9
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/menuUtils.d.ts +18 -3
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/store/menuV2.d.ts +291 -264
- package/dist/apps/mf-menu/src/helper/import-export.d.ts +291 -264
- package/dist/apps/mf-menu/src/helper/menu.d.ts +309 -267
- package/dist/apps/mf-menu/src/manager/menu/item.d.ts +291 -264
- package/dist/apps/mf-menu/src/stores/manager/item.d.ts +54 -9
- package/dist/apps/mf-menu/src/stores/manager/scheduler.d.ts +18 -3
- package/dist/apps/mf-menu/src/stores/menu.d.ts +291 -264
- package/dist/apps/mf-menu/src/views/Catalog/Edit/AddProductPopup/Form.vue.d.ts +36 -6
- package/dist/apps/mf-menu/src/views/Catalog/Edit/AddProductPopup/index.d.ts +90 -15
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/linked-status-D7y8kfPP.js +24 -0
- package/dist/assets/{override-menu-BubUiLib.js → override-menu-CfNbmBqj.js} +5 -5
- package/dist/assets/{validate-menu-DN9Ey6OQ.js → validate-menu--Fb2HTF9.js} +9 -9
- package/dist/{catalog-K4kAIsu7.js → catalog-CVqSLZH-.js} +1 -1
- package/dist/{catalogSetting-DDKgp65J.js → catalogSetting-BCbSVqYf.js} +1 -1
- package/dist/{currency-COpU9Mja.js → currency-rD-pSMdo.js} +1 -1
- package/dist/{dayjs.min-2jRm92uU.js → dayjs.min-BJK73AAj.js} +1 -1
- package/dist/{discardConfirm-DsdKGlvZ.js → discardConfirm-BVEi30ai.js} +1 -1
- package/dist/{index-BwbmJvNX.js → index-B7hzbpy5.js} +4 -4
- package/dist/{index-CGkAqunh.js → index-COIRrFqc.js} +3 -3
- package/dist/{index-DbQfFN--.js → index-CrjBBFyR.js} +1 -1
- package/dist/{item-DpYa7eg3.js → item-CicrpOGz.js} +575 -572
- package/dist/{menu-BPmnKKbJ.js → menu-9WeEUMFB.js} +1 -1
- package/dist/{menu-CvTofl1n.js → menu-B7qykxcB.js} +6505 -6450
- package/dist/{priceTier-B8RMnKFM.js → priceTier-DTJmPHsL.js} +1 -1
- package/dist/{scheduler-L5jlbRBz.js → scheduler-CbjAGyjm.js} +4 -4
- package/dist/{subcategory-B5eia0LL.js → subcategory-CXtaSWNi.js} +69 -69
- package/dist/{toExcel--y9nBfGO.js → toExcel-DSmn9_xz.js} +2 -2
- package/dist/{unit-EnjuHwBI.js → unit-C0rHx8Bw.js} +2 -2
- package/package.json +2 -2
- package/dist/assets/linked-status-DM7ouyu_.js +0 -24
|
@@ -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-B7qykxcB.js";
|
|
5
5
|
const v = /* @__PURE__ */ d({
|
|
6
6
|
__name: "AddPriceGroupDialog",
|
|
7
7
|
setup(s) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineComponent as le, computed as Y, resolveComponent as v, createElementBlock as i, openBlock as u, createVNode as l, createCommentVNode as g, unref as a, toDisplayString as P, createElementVNode as y, withCtx as _, Fragment as D, renderList as A, createBlock as N, ref as T, Transition as ee, createTextVNode as se } from "vue";
|
|
2
|
-
import { u as ie, l as de } from "./discardConfirm-
|
|
3
|
-
import { J as b, I as d, u as re, K as X } from "./menu-
|
|
2
|
+
import { u as ie, l as de } from "./discardConfirm-BVEi30ai.js";
|
|
3
|
+
import { J as b, I as d, u as re, K as X } from "./menu-B7qykxcB.js";
|
|
4
4
|
import { useI18n as te } from "@feedmepos/mf-common";
|
|
5
5
|
import { components as ce } from "@feedmepos/ui-library";
|
|
6
6
|
import { _ as me } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
|
|
7
7
|
import { _ as W } from "./FormSection.vue_vue_type_script_setup_true_lang-CO4YGYLB.js";
|
|
8
|
-
import { u as pe } from "./menu-
|
|
9
|
-
import { L as _e } from "./LinkProductSideSheet-
|
|
8
|
+
import { u as pe } from "./menu-9WeEUMFB.js";
|
|
9
|
+
import { L as _e } from "./LinkProductSideSheet-BBQXucIi.js";
|
|
10
10
|
const ve = { class: "space-y-8" }, fe = {
|
|
11
11
|
key: 0,
|
|
12
12
|
class: "space-y-16"
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { shallowRef as X, ref as R, computed as h, shallowReactive as Fe, watch as H, defineComponent as Te, resolveComponent as
|
|
2
|
-
import { J as k, A as x, a9 as Z, I, aa as z, K as S, a2 as
|
|
1
|
+
import { shallowRef as X, ref as R, computed as h, shallowReactive as Fe, watch as H, defineComponent as Te, resolveComponent as B, createBlock as Re, openBlock as Ne, unref as O, withCtx as Pe, createVNode as Ve } from "vue";
|
|
2
|
+
import { J as k, A as x, a9 as Z, I, aa as z, K as S, a2 as M, c as D, W as w, a8 as G, ab as Oe, ac as xe, z as Ae, a3 as Ke, ad as Ue, a1 as L, u as De } from "./menu-B7qykxcB.js";
|
|
3
3
|
import { useCoreStore as J, useI18n as ee } from "@feedmepos/mf-common";
|
|
4
4
|
import { useSnackbar as $e, useDialogChild as qe } from "@feedmepos/ui-library";
|
|
5
|
-
import { l as te } from "./discardConfirm-
|
|
5
|
+
import { l as te } from "./discardConfirm-BVEi30ai.js";
|
|
6
6
|
import { defineStore as He } from "pinia";
|
|
7
|
-
const We = "/assets/linked-status-
|
|
8
|
-
function
|
|
7
|
+
const We = "/assets/linked-status-D7y8kfPP.js", Ye = "/assets/override-menu-CfNbmBqj.js";
|
|
8
|
+
function je(e) {
|
|
9
9
|
var o;
|
|
10
10
|
const n = k(e), a = (o = n.variant) == null ? void 0 : o.variantCombinations;
|
|
11
11
|
return delete n.variant, delete n.thumbnail, [n, ...a || []];
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
const r = k(n), f = a ? r.modules.catalog.find((_) => _._id === a) : null, d = o ? r.modules.scheduler.find((_) => _._id === o) : null, i = f ? k(f) : void 0, m = a ? r.modules.catalog.filter((_) => _._id !== a) : [], u = d ? k(d) : void 0, s = e.reduce((_, y) => (_[y._id] =
|
|
13
|
+
function Be(e, n, a, o) {
|
|
14
|
+
const r = k(n), f = a ? r.modules.catalog.find((_) => _._id === a) : null, d = o ? r.modules.scheduler.find((_) => _._id === o) : null, i = f ? k(f) : void 0, m = a ? r.modules.catalog.filter((_) => _._id !== a) : [], u = d ? k(d) : void 0, s = e.reduce((_, y) => (_[y._id] = je(y), _), {});
|
|
15
15
|
function p(_ = []) {
|
|
16
16
|
const y = e.map((b) => b._id);
|
|
17
17
|
return [
|
|
@@ -119,7 +119,7 @@ function W(e, n) {
|
|
|
119
119
|
}), r;
|
|
120
120
|
}), a;
|
|
121
121
|
}
|
|
122
|
-
function
|
|
122
|
+
function Ge(e, n) {
|
|
123
123
|
const a = e.items[n._id];
|
|
124
124
|
n.variant && (n.variant = {
|
|
125
125
|
...n.variant,
|
|
@@ -151,7 +151,7 @@ function Le(e, n) {
|
|
|
151
151
|
};
|
|
152
152
|
}
|
|
153
153
|
async function ct(e, n, a, o, r, f = !0) {
|
|
154
|
-
const d = k(a), i = f ?
|
|
154
|
+
const d = k(a), i = f ? Be(n, d, o, r) : d, m = n.reduce((p, _) => (p[_._id] = i.modules.item.find((y) => y._id === _._id), p), {}), u = n.reduce((p, _) => {
|
|
155
155
|
const y = _._id;
|
|
156
156
|
return p[y] = ze(m[y], e), p;
|
|
157
157
|
}, {}), s = x.getFallbackPrices({
|
|
@@ -163,7 +163,7 @@ async function ct(e, n, a, o, r, f = !0) {
|
|
|
163
163
|
return n.map((p) => {
|
|
164
164
|
const _ = p._id, y = m[_];
|
|
165
165
|
return {
|
|
166
|
-
...
|
|
166
|
+
...Ge(s, y),
|
|
167
167
|
category: o || r ? y == null ? void 0 : y.category : null
|
|
168
168
|
};
|
|
169
169
|
});
|
|
@@ -233,7 +233,7 @@ function ft(e, n, a) {
|
|
|
233
233
|
return r(n, a);
|
|
234
234
|
}
|
|
235
235
|
const q = /* @__PURE__ */ new Map();
|
|
236
|
-
async function
|
|
236
|
+
async function Le(e, n, a) {
|
|
237
237
|
const o = `${e._id}-${e.updatedAt}-${n || "null"}-${a || "null"}`;
|
|
238
238
|
if (q.has(o))
|
|
239
239
|
return q.get(o);
|
|
@@ -242,7 +242,7 @@ async function Ge(e, n, a) {
|
|
|
242
242
|
}
|
|
243
243
|
async function pt(e, n, a) {
|
|
244
244
|
var d, i;
|
|
245
|
-
const o = await
|
|
245
|
+
const o = await Le(e, n, null), r = [], f = (m, u) => {
|
|
246
246
|
const s = k(m);
|
|
247
247
|
for (const p in u)
|
|
248
248
|
u[p] && (s[p] = u[p]);
|
|
@@ -252,9 +252,9 @@ async function pt(e, n, a) {
|
|
|
252
252
|
const u = (d = m.items) == null ? void 0 : d.find((p) => p._id === a && !p.combinationKey), s = e.modules.item.find((p) => p._id === a);
|
|
253
253
|
if (u) {
|
|
254
254
|
const p = (i = m.items) == null ? void 0 : i.filter((y) => y._id === a && y.combinationKey), _ = [u, ...p].map((y) => {
|
|
255
|
-
var
|
|
256
|
-
const b = y.combinationKey ? (
|
|
257
|
-
(
|
|
255
|
+
var N, P;
|
|
256
|
+
const b = y.combinationKey ? (P = (N = s == null ? void 0 : s.variant) == null ? void 0 : N.variantCombinations) == null ? void 0 : P.find(
|
|
257
|
+
(V) => V.combinationKey === y.combinationKey
|
|
258
258
|
) : s, F = b && s ? f(s, b) : y;
|
|
259
259
|
return f(F, y);
|
|
260
260
|
});
|
|
@@ -342,15 +342,15 @@ function Xe() {
|
|
|
342
342
|
const Ze = He(
|
|
343
343
|
"mf-menu-store-v2",
|
|
344
344
|
() => {
|
|
345
|
-
const e = Fe(Xe()), n = J(), a = $e(), o = h(() => e.menu.modules.serveSequence ?
|
|
345
|
+
const e = Fe(Xe()), n = J(), a = $e(), o = h(() => e.menu.modules.serveSequence ? M(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) || D.F_MENU_VERSION.v3;
|
|
350
350
|
}), f = h(() => r.value === D.F_MENU_VERSION.v4), d = h(() => {
|
|
351
351
|
const t = p.value.modules.catalog;
|
|
352
|
-
return
|
|
353
|
-
}), i = h(() => e.menu.modules.catalog.find((t) => t._id === e.currentCatalogId)), m = h(() =>
|
|
352
|
+
return M(t, { selector: "name" });
|
|
353
|
+
}), i = h(() => e.menu.modules.catalog.find((t) => t._id === e.currentCatalogId)), m = h(() => M(p.value.modules.scheduler, { selector: "name" })), u = h(() => e.menu.modules.scheduler.find(
|
|
354
354
|
(t) => t._id === e.currentSchedulerId
|
|
355
355
|
));
|
|
356
356
|
function s(t, l = !0) {
|
|
@@ -374,14 +374,14 @@ const Ze = He(
|
|
|
374
374
|
}
|
|
375
375
|
return p.value = t, _.value = !1, y.value = y.value + 1, t;
|
|
376
376
|
}
|
|
377
|
-
const
|
|
377
|
+
const N = te.debounce(b, 200);
|
|
378
378
|
H(
|
|
379
379
|
() => [e.menu, e.currentCatalogId, e.currentSchedulerId],
|
|
380
380
|
() => {
|
|
381
|
-
_.value ||
|
|
381
|
+
_.value || N();
|
|
382
382
|
}
|
|
383
383
|
);
|
|
384
|
-
const
|
|
384
|
+
const P = h(() => [
|
|
385
385
|
{
|
|
386
386
|
label: "Main",
|
|
387
387
|
value: null
|
|
@@ -390,10 +390,10 @@ const Ze = He(
|
|
|
390
390
|
label: t.name,
|
|
391
391
|
value: t._id
|
|
392
392
|
}))
|
|
393
|
-
]),
|
|
393
|
+
]), V = h(() => {
|
|
394
394
|
const t = p.value.modules.category;
|
|
395
395
|
return [
|
|
396
|
-
...
|
|
396
|
+
...K.value.item.addon ? [
|
|
397
397
|
{
|
|
398
398
|
_id: e.currentCatalogId ? "" : null,
|
|
399
399
|
name: "Addon",
|
|
@@ -411,8 +411,8 @@ const Ze = He(
|
|
|
411
411
|
if (i.value) {
|
|
412
412
|
const c = (l = i.value) == null ? void 0 : l.override.items;
|
|
413
413
|
t = t.filter((g) => {
|
|
414
|
-
var
|
|
415
|
-
const v = (
|
|
414
|
+
var C;
|
|
415
|
+
const v = (C = c == null ? void 0 : c[g._id]) == null ? void 0 : C.find(
|
|
416
416
|
(ke) => !ke.combinationKey
|
|
417
417
|
);
|
|
418
418
|
return (v == null ? void 0 : v.orderFrom) !== I.F_ORDER_FROM.enum.NONE;
|
|
@@ -421,15 +421,15 @@ const Ze = He(
|
|
|
421
421
|
return w(t, (c) => c.code || c.name);
|
|
422
422
|
}), ae = h(() => {
|
|
423
423
|
const t = e.menu.modules.category, l = w(t, (g) => g.name).reduce(
|
|
424
|
-
(g, v,
|
|
424
|
+
(g, v, C) => (g[v._id] = C, g),
|
|
425
425
|
{ "": 0 }
|
|
426
426
|
), c = e.menu.modules.item;
|
|
427
427
|
return w(
|
|
428
428
|
c,
|
|
429
429
|
(g) => g.code || g.name
|
|
430
|
-
).reduce((g, v,
|
|
431
|
-
}), se = h(() =>
|
|
432
|
-
const t =
|
|
430
|
+
).reduce((g, v, C) => (g[v._id] = C + l[v.category || ""], g), {});
|
|
431
|
+
}), se = h(() => G(A.value, V.value, Y.value)), ue = h(() => {
|
|
432
|
+
const t = K.value.item.addon ? [
|
|
433
433
|
{
|
|
434
434
|
_id: e.currentCatalogId ? "" : null,
|
|
435
435
|
name: "Addon",
|
|
@@ -437,27 +437,27 @@ const Ze = He(
|
|
|
437
437
|
},
|
|
438
438
|
...e.menu.modules.category
|
|
439
439
|
] : e.menu.modules.category;
|
|
440
|
-
return
|
|
440
|
+
return G(
|
|
441
441
|
e.menu.modules.variant,
|
|
442
442
|
t,
|
|
443
443
|
e.menu.modules.item
|
|
444
444
|
);
|
|
445
|
-
}),
|
|
445
|
+
}), A = h(() => {
|
|
446
446
|
const t = p.value.modules.variant;
|
|
447
|
-
return
|
|
447
|
+
return M(t, { selector: "name" });
|
|
448
448
|
});
|
|
449
449
|
function ie(t = []) {
|
|
450
|
-
const l = t.map((g) =>
|
|
450
|
+
const l = t.map((g) => A.value.find((v) => v._id === g)).filter((g) => !!g);
|
|
451
451
|
return x.fullVariantCombination(l).reduce((g, v) => (g[v.combinationKey] = v.selectionName.join(" / "), g), {});
|
|
452
452
|
}
|
|
453
|
-
const ce = h(() => w(p.value.modules.group, (t) => t.name)), le = h(() =>
|
|
453
|
+
const ce = h(() => w(p.value.modules.group, (t) => t.name)), le = h(() => M(p.value.modules.takeaway, { selector: "name" })), de = h(() => M(e.menu.modules.printDepartment || [], {
|
|
454
454
|
selector: "name"
|
|
455
|
-
})), me = h(() =>
|
|
455
|
+
})), me = h(() => M(e.menu.modules.unit, { selector: "name" })), fe = h(() => M(Oe(e.menu.modules.recipe, e.menu.modules.sku), {
|
|
456
456
|
selector: "name"
|
|
457
457
|
})), pe = h(() => e.menu.modules.cookingGuide), _e = h(() => {
|
|
458
458
|
const t = xe(e.menu.modules.sku);
|
|
459
|
-
return
|
|
460
|
-
}),
|
|
459
|
+
return M(t, { selector: "code" });
|
|
460
|
+
}), K = h(() => {
|
|
461
461
|
const t = !e.currentCatalogId, l = r.value === D.F_MENU_VERSION.v4, c = !e.currentSchedulerId, g = {
|
|
462
462
|
create: t && c,
|
|
463
463
|
edit: t && c,
|
|
@@ -526,7 +526,7 @@ const Ze = He(
|
|
|
526
526
|
}
|
|
527
527
|
};
|
|
528
528
|
});
|
|
529
|
-
function
|
|
529
|
+
function U(t) {
|
|
530
530
|
return `${t.systemCode}/${t.taxCode}`;
|
|
531
531
|
}
|
|
532
532
|
function ge(t) {
|
|
@@ -534,34 +534,34 @@ const Ze = He(
|
|
|
534
534
|
return { systemCode: l, taxCode: c };
|
|
535
535
|
}
|
|
536
536
|
function ve(t, l, c) {
|
|
537
|
-
return (t ?? l ?? []).map((g) =>
|
|
537
|
+
return (t ?? l ?? []).map((g) => U(g)).find((g) => c.some((v) => v.value === g));
|
|
538
538
|
}
|
|
539
539
|
const ye = h(() => {
|
|
540
540
|
var l;
|
|
541
|
-
const t =
|
|
541
|
+
const t = Ae.Country.getCountryFlattenTaxes(
|
|
542
542
|
J().currentCountry.value
|
|
543
543
|
);
|
|
544
544
|
return {
|
|
545
545
|
systemCode: (l = t[0]) == null ? void 0 : l.systemCode,
|
|
546
546
|
countryTaxOptions: t.map((c) => ({
|
|
547
|
-
label: `${c.name} (${
|
|
548
|
-
value:
|
|
547
|
+
label: `${c.name} (${Ke(c.rate)}%)`,
|
|
548
|
+
value: U(c),
|
|
549
549
|
meta: {
|
|
550
550
|
rate: c.rate
|
|
551
551
|
}
|
|
552
552
|
}))
|
|
553
553
|
};
|
|
554
554
|
}), he = async () => {
|
|
555
|
-
const t = await
|
|
556
|
-
e.menu = t ?? e.menu,
|
|
555
|
+
const t = await L.readMenu();
|
|
556
|
+
e.menu = t ?? e.menu, j(null);
|
|
557
557
|
}, be = async () => {
|
|
558
|
-
const t = await
|
|
559
|
-
e.restaurants =
|
|
560
|
-
},
|
|
558
|
+
const t = await L.readRestaurantsWithMenu();
|
|
559
|
+
e.restaurants = M(t, { selector: "name" });
|
|
560
|
+
}, j = (t) => {
|
|
561
561
|
e.currentCatalogId = t;
|
|
562
|
-
}, Me = (t) => {
|
|
563
|
-
e.currentSchedulerId = t;
|
|
564
562
|
}, Ce = (t) => {
|
|
563
|
+
e.currentSchedulerId = t;
|
|
564
|
+
}, Me = (t) => {
|
|
565
565
|
e.currentCategoryIds = t;
|
|
566
566
|
}, Se = async (t, l) => {
|
|
567
567
|
const c = Array.isArray(t) ? t : [t];
|
|
@@ -573,10 +573,10 @@ const Ze = He(
|
|
|
573
573
|
}));
|
|
574
574
|
try {
|
|
575
575
|
if (l || g.some(
|
|
576
|
-
(
|
|
576
|
+
(C) => [S.F_OPERATION_TYPE.delete, S.F_OPERATION_TYPE.deleteMany].includes(C.operation)
|
|
577
577
|
)) {
|
|
578
|
-
const
|
|
579
|
-
if (
|
|
578
|
+
const C = await Ue(g, e.menu.modules);
|
|
579
|
+
if (C !== !0) throw new Error(C);
|
|
580
580
|
}
|
|
581
581
|
const v = await Qe.updateMenuModule(e.menu, g);
|
|
582
582
|
return s(v.menu), v;
|
|
@@ -611,14 +611,14 @@ const Ze = He(
|
|
|
611
611
|
currentCatalog: i,
|
|
612
612
|
schedulers: m,
|
|
613
613
|
currentScheduler: u,
|
|
614
|
-
catalogOptions:
|
|
615
|
-
categories:
|
|
614
|
+
catalogOptions: P,
|
|
615
|
+
categories: V,
|
|
616
616
|
subcategories: re,
|
|
617
617
|
items: Y,
|
|
618
618
|
sortedItems: ae,
|
|
619
619
|
categorizedItems: se,
|
|
620
620
|
categorizedRawMenuItems: ue,
|
|
621
|
-
variants:
|
|
621
|
+
variants: A,
|
|
622
622
|
groups: ce,
|
|
623
623
|
takeaways: le,
|
|
624
624
|
printDepartments: de,
|
|
@@ -626,20 +626,20 @@ const Ze = He(
|
|
|
626
626
|
recipes: fe,
|
|
627
627
|
cookingGuide: pe,
|
|
628
628
|
skus: _e,
|
|
629
|
-
rules:
|
|
629
|
+
rules: K,
|
|
630
630
|
taxSetting: ye,
|
|
631
631
|
// Action
|
|
632
632
|
setMenu: s,
|
|
633
633
|
readMenu: he,
|
|
634
634
|
readRestaurants: be,
|
|
635
|
-
selectCatalog:
|
|
636
|
-
selectScheduler:
|
|
637
|
-
selectCategory:
|
|
635
|
+
selectCatalog: j,
|
|
636
|
+
selectScheduler: Ce,
|
|
637
|
+
selectCategory: Me,
|
|
638
638
|
updateMenu: Se,
|
|
639
639
|
updateMenuSetting: Ee,
|
|
640
640
|
computeMergedMenu: b,
|
|
641
641
|
// helper
|
|
642
|
-
encodeTax:
|
|
642
|
+
encodeTax: U,
|
|
643
643
|
decodeTax: ge,
|
|
644
644
|
getSelectedTax: ve,
|
|
645
645
|
mapVariant: ie,
|
|
@@ -682,18 +682,18 @@ const Ze = He(
|
|
|
682
682
|
immediate: !0
|
|
683
683
|
}
|
|
684
684
|
), (d, i) => {
|
|
685
|
-
const m =
|
|
686
|
-
return
|
|
687
|
-
onValidationSuccess: i[1] || (i[1] = (s) =>
|
|
685
|
+
const m = B("fm-text-field"), u = B("FmForm");
|
|
686
|
+
return Ne(), Re(u, {
|
|
687
|
+
onValidationSuccess: i[1] || (i[1] = (s) => O(f)("primary"))
|
|
688
688
|
}, {
|
|
689
|
-
default:
|
|
690
|
-
|
|
689
|
+
default: Pe(() => [
|
|
690
|
+
Ve(m, {
|
|
691
691
|
modelValue: o.value,
|
|
692
692
|
"onUpdate:modelValue": i[0] || (i[0] = (s) => o.value = s),
|
|
693
|
-
rules: [(s) => !!s ||
|
|
693
|
+
rules: [(s) => !!s || O(a)("menu.subcategory.dialog.add.name.required")],
|
|
694
694
|
autofocus: "",
|
|
695
|
-
label:
|
|
696
|
-
placeholder:
|
|
695
|
+
label: O(a)("menu.subcategory.dialog.add.name.label"),
|
|
696
|
+
placeholder: O(a)("menu.subcategory.dialog.add.name.placeholder")
|
|
697
697
|
}, null, 8, ["modelValue", "rules", "label", "placeholder"])
|
|
698
698
|
]),
|
|
699
699
|
_: 1
|
|
@@ -807,6 +807,6 @@ export {
|
|
|
807
807
|
pt as f,
|
|
808
808
|
lt as g,
|
|
809
809
|
ct as m,
|
|
810
|
-
|
|
810
|
+
Le as o,
|
|
811
811
|
Ze as u
|
|
812
812
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as C } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import "./discardConfirm-
|
|
1
|
+
import { c as C } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-H43LPcLH.js";
|
|
2
|
+
import "./discardConfirm-BVEi30ai.js";
|
|
3
3
|
var Z = {
|
|
4
4
|
defaultAmount: 0,
|
|
5
5
|
defaultCurrency: "USD",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineStore as W } from "pinia";
|
|
2
2
|
import { defineComponent as T, computed as U, ref as h, watch as L, resolveComponent as V, createBlock as Z, openBlock as F, withCtx as w, createVNode as m, createElementVNode as f, normalizeClass as H, createElementBlock as A, toDisplayString as M, unref as l, Fragment as P, renderSlot as Q, renderList as X, getCurrentInstance as ee } from "vue";
|
|
3
|
-
import { $ as q, a0 as te, Y as $, J as k, P as B, G as I, A as E, Z as ne, K as C, I as D, u as oe } from "./menu-
|
|
3
|
+
import { $ as q, a0 as te, Y as $, J as k, P as B, G as I, A as E, Z as ne, K as C, I as D, u as oe } from "./menu-B7qykxcB.js";
|
|
4
4
|
import { useI18n as N } from "@feedmepos/mf-common";
|
|
5
5
|
import { useSnackbar as j, components as ae, useDialog as le, FmButtonVariant as ue } from "@feedmepos/ui-library";
|
|
6
|
-
import { u as ie, l as se } from "./discardConfirm-
|
|
6
|
+
import { u as ie, l as se } from "./discardConfirm-BVEi30ai.js";
|
|
7
7
|
import { c as re } from "./check-C9mY6LiX.js";
|
|
8
8
|
import "./vuedraggable-CK8z7qA8.js";
|
|
9
9
|
/* empty css */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@feedmepos/mf-menu",
|
|
3
|
-
"version": "0.31.
|
|
3
|
+
"version": "0.31.3",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"@feedmepos/core": "2.14.16",
|
|
21
21
|
"@feedmepos/core-dart": "^0.2.6",
|
|
22
22
|
"@feedmepos/core-legacy": "file:../../core-legacy-0.7.tar.gz",
|
|
23
|
-
"@feedmepos/menu": "1.5.
|
|
23
|
+
"@feedmepos/menu": "1.5.18",
|
|
24
24
|
"@feedmepos/remy-vue-client": "0.1.3-beta.8",
|
|
25
25
|
"@feedmepos/zod-entity": "0.0.4-alpha.9",
|
|
26
26
|
"@feedmepos/inventory-core": "^0.2.6",
|