@feedmepos/mf-menu 0.19.0-beta.9 → 0.19.2
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/{ApplyProduct.vue_vue_type_script_setup_true_lang-Xba9MwkY.js → ApplyProduct.vue_vue_type_script_setup_true_lang-W3ALTrsj.js} +11 -10
- package/dist/{ApplyProducts.vue_vue_type_script_setup_true_lang-C4235zyV.js → ApplyProducts.vue_vue_type_script_setup_true_lang-TE9kAVkO.js} +2 -2
- package/dist/{Catalog-0ckjo6Cm.js → Catalog-BL63lK7R.js} +8 -8
- package/dist/{Category-B5TbJTp7.js → Category-sJPghhZ_.js} +59 -58
- package/dist/{CookingGuide-BJcMPrI5.js → CookingGuide-DAE7bgcU.js} +4 -4
- package/dist/{Group-BdY6d9w2.js → Group-BxNeMr8F.js} +13 -12
- package/dist/{Group-RL9hvzCS.js → Group-DDxRUmm4.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-DKj2wxnf.js → Group.vue_vue_type_script_setup_true_lang-D_YJ5tL_.js} +31 -30
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BADCN2fe.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-B9CLSWLu.js} +20 -19
- package/dist/{Ingredient-DABna2iN.js → Ingredient-ClwK8EGA.js} +23 -15
- package/dist/{LinkProductSideSheet-KUKMnlt9.js → LinkProductSideSheet-Dr54Si8e.js} +19 -19
- package/dist/{PrintRoute-BGpV9629.js → PrintRoute-N_fICtn8.js} +9 -9
- package/dist/{Product-Cjoo-ZZ8.js → Product-BDwny0B3.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-Vg7fo3g6.js → Product.vue_vue_type_script_setup_true_lang-DCypQ1N4.js} +46 -46
- package/dist/{Products-BJM8ZBcg.js → Products-B9jzE3MQ.js} +43 -43
- package/dist/{Publish-BZN3JO3j.js → Publish-D8xPK5PZ.js} +29 -29
- package/dist/{Recipe-DeMEAf7r.js → Recipe-CTrKvEiB.js} +40 -34
- package/dist/{Scheduler-BKUCHyac.js → Scheduler-Bw4Wjlnx.js} +35 -34
- package/dist/{SchedulerSelector.vue_vue_type_script_setup_true_lang-Bn3WzWmr.js → SchedulerSelector.vue_vue_type_script_setup_true_lang-cU85Ebal.js} +12 -11
- package/dist/ServingSequence-CjrJ1oDe.js +4 -0
- package/dist/{Setting-C84nHhbB.js → Setting-lrWK1aCr.js} +1 -1
- package/dist/{Setting.vue_vue_type_script_setup_true_lang-BVUe_2pD.js → Setting.vue_vue_type_script_setup_true_lang-BIKArP-6.js} +11 -11
- package/dist/{Takeaway-Brt9qfX4.js → Takeaway-BliapyfQ.js} +14 -14
- package/dist/{Takeaway-DDJp9sI2.js → Takeaway-C6ESjI6a.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-BuxnExYT.js → Takeaway.vue_vue_type_script_setup_true_lang-_uYXHAgk.js} +17 -17
- package/dist/TaxSetting-B_OVaxnK.js +26 -0
- package/dist/{Unit-E9NLW5VO.js → Unit-BpPwsq-R.js} +25 -25
- package/dist/{Variant-CZkvJh72.js → Variant-DLnFjrKX.js} +14 -13
- package/dist/{_id_-DfPGsfBR.js → _id_-CpB9sDXs.js} +21 -20
- package/dist/{app-Cq-DFOLO.js → app-DnjfTTyH.js} +25203 -27930
- package/dist/app.js +4 -4
- package/dist/assets/{linked-status-CYjwveRv.js → linked-status-DS5Y3Qmg.js} +3 -3
- package/dist/assets/{validate-menu-ZRJOzM1B.js → validate-menu-B5z7rBbO.js} +3 -3
- package/dist/{catalog-DYX_c6bm.js → catalog-B3zKEMGs.js} +16 -16
- package/dist/{catalog-DjrR8z64.js → catalog-DEU4EW82.js} +1 -1
- package/dist/{category-LskjLp5B.js → category-CBXUkjZW.js} +7 -7
- package/dist/{currency-okf6Zpjf.js → currency-CyIMAuaF.js} +1 -1
- package/dist/{index-CYb95BT2.js → index-C0KmJcH7.js} +5 -4
- package/dist/{index-Db0m_jtN.js → index-F3JoSMjg.js} +19 -18
- package/dist/{item-BBueZjbb.js → item-BVtbX-DR.js} +369 -361
- package/dist/{lodash-tlbvqPuY.js → lodash-Dum3fDW4.js} +1 -1
- package/dist/{menu-BHHnot9G.js → menu-Bxe-VCgS.js} +1 -1
- package/dist/{object-CpqdRN0U.js → object-BNFM25tr.js} +4 -4
- package/dist/{scheduler-BrghaQlc.js → scheduler-DPTNLoCR.js} +5 -5
- package/dist/style.css +1 -1
- package/dist/{takeaway-IUqhoO1E.js → takeaway-GxwSTX8A.js} +18 -13
- package/dist/{toExcel-dpwLFARW.js → toExcel-B35ESJnK.js} +2 -2
- package/dist/{unit-CNRH1cAq.js → unit-zvgjgaPU.js} +37 -18
- package/package.json +2 -3
- package/dist/ServingSequence-DNESVxF_.js +0 -4
- package/dist/TaxSetting-Cwuof9KZ.js +0 -25
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { ref as A, computed as b, defineComponent as ce, resolveComponent as Y, openBlock as v, createBlock as G, withCtx as M, createVNode as i, createElementVNode as g, toDisplayString as se, unref as l, createElementBlock as z, Fragment as he, renderList as ze, createTextVNode as Ye, mergeModels as He, useModel as Ze, renderSlot as _e, watch as pe, h as U, withModifiers as we, createCommentVNode as ue, resolveDynamicComponent as Je, normalizeStyle as Qe, normalizeClass as ne, nextTick as Xe, watchEffect as et } from "vue";
|
|
2
|
-
import { u as ye,
|
|
3
|
-
import { _ as Fe } from "./SchedulerSelector.vue_vue_type_script_setup_true_lang-
|
|
4
|
-
import { useCoreStore as ot } from "@feedmepos/mf-common";
|
|
2
|
+
import { u as ye, a as Ne, c as ve, y as fe, F as tt, z as lt, k as ie, g as at, A as Ve, i as De } from "./app-DnjfTTyH.js";
|
|
3
|
+
import { _ as Fe } from "./SchedulerSelector.vue_vue_type_script_setup_true_lang-cU85Ebal.js";
|
|
4
|
+
import { useI18n as xe, useCoreStore as ot } from "@feedmepos/mf-common";
|
|
5
5
|
import { useSnackbar as je, useDialog as Be, components as oe, FmButtonVariant as W, FmButtonColorThemeVariant as L, useBreakpoints as Ue } from "@feedmepos/ui-library";
|
|
6
6
|
import "vue-router";
|
|
7
|
-
import { u as ge } from "./menu-
|
|
8
|
-
import { u as Ae } from "./category-
|
|
7
|
+
import { u as ge } from "./menu-Bxe-VCgS.js";
|
|
8
|
+
import { u as Ae } from "./category-CBXUkjZW.js";
|
|
9
9
|
import "./vuedraggable-WU01qJgi.js";
|
|
10
|
-
import { _ as nt, c as $e, a as rt, u as st } from "./catalog-
|
|
11
|
-
import { _ as ut } from "./takeaway-
|
|
12
|
-
import { f as it } from "./currency-
|
|
13
|
-
import { l as be } from "./lodash-
|
|
14
|
-
import { u as Ee, m as ct } from "./item-
|
|
10
|
+
import { _ as nt, c as $e, a as rt, u as st } from "./catalog-B3zKEMGs.js";
|
|
11
|
+
import { _ as ut } from "./takeaway-GxwSTX8A.js";
|
|
12
|
+
import { f as it } from "./currency-CyIMAuaF.js";
|
|
13
|
+
import { l as be } from "./lodash-Dum3fDW4.js";
|
|
14
|
+
import { u as Ee, m as ct } from "./item-BVtbX-DR.js";
|
|
15
15
|
import { w as dt } from "./InfoBasic.vue_vue_type_script_setup_true_lang-DxQBDu16.js";
|
|
16
|
-
import { F as mt } from "./object-
|
|
17
|
-
import { _ as
|
|
18
|
-
import { L as
|
|
16
|
+
import { F as mt } from "./object-BNFM25tr.js";
|
|
17
|
+
import { _ as Ie } from "./TextChip.vue_vue_type_script_setup_true_lang-CNp85hoQ.js";
|
|
18
|
+
import { L as Te } from "./LinkProductSideSheet-Dr54Si8e.js";
|
|
19
19
|
function pt(O, c) {
|
|
20
20
|
const d = A(!0), r = b(() => {
|
|
21
21
|
var f, y;
|
|
@@ -29,7 +29,7 @@ function pt(O, c) {
|
|
|
29
29
|
}, toggleOption: (f) => {
|
|
30
30
|
var N, _, E;
|
|
31
31
|
let y;
|
|
32
|
-
c.value === void 0 && d.value ? y = [f] : c.value === void 0 && !d.value ? y = (N = O.value.map((
|
|
32
|
+
c.value === void 0 && d.value ? y = [f] : c.value === void 0 && !d.value ? y = (N = O.value.map((I) => I.value)) == null ? void 0 : N.filter((I) => I !== f) : (_ = c.value) != null && _.includes(f) ? y = (E = c.value) == null ? void 0 : E.filter((I) => I !== f) : y = [...c.value || [], f], y.length === 0 ? (c.value = void 0, d.value = !0) : y.length === O.value.length ? (c.value = void 0, d.value = !1) : c.value = y;
|
|
33
33
|
} };
|
|
34
34
|
}
|
|
35
35
|
const Me = /* @__PURE__ */ ce({
|
|
@@ -45,7 +45,7 @@ const Me = /* @__PURE__ */ ce({
|
|
|
45
45
|
set: (w) => {
|
|
46
46
|
c.selectCategory(w);
|
|
47
47
|
}
|
|
48
|
-
}), { allCleared: N, allSelected: _, toggleAll: E, toggleOption:
|
|
48
|
+
}), { allCleared: N, allSelected: _, toggleAll: E, toggleOption: I, indeterminate: Z } = pt(n, y);
|
|
49
49
|
return (w, F) => {
|
|
50
50
|
const D = Y("FmIcon"), m = Y("FmChip"), q = Y("FmMenuItem"), K = Y("FmMenu");
|
|
51
51
|
return v(), G(K, { "close-on-click": !1 }, {
|
|
@@ -76,7 +76,7 @@ const Me = /* @__PURE__ */ ce({
|
|
|
76
76
|
label: j.label,
|
|
77
77
|
"has-checkbox": "",
|
|
78
78
|
"model-value": l(_) || ((ee = y.value) == null ? void 0 : ee.includes(j.value)),
|
|
79
|
-
onClick: (te) => l(
|
|
79
|
+
onClick: (te) => l(I)(j.value)
|
|
80
80
|
}, null, 8, ["label", "model-value", "onClick"]);
|
|
81
81
|
}), 128))
|
|
82
82
|
]),
|
|
@@ -158,7 +158,7 @@ const Me = /* @__PURE__ */ ce({
|
|
|
158
158
|
}, $t = {
|
|
159
159
|
key: 0,
|
|
160
160
|
class: /* @__PURE__ */ ne(["flex flex-col flex-1", "overflow-scroll", "divide-y divide-fm-color-neutral-gray-100", "pb-64"])
|
|
161
|
-
},
|
|
161
|
+
}, It = ["onClick"], Tt = {
|
|
162
162
|
class: "min-w-0 flex flex-1 items-start justify-start space-x-16"
|
|
163
163
|
}, Mt = {
|
|
164
164
|
class: "flex-1 min-w-0"
|
|
@@ -196,7 +196,7 @@ const Me = /* @__PURE__ */ ce({
|
|
|
196
196
|
});
|
|
197
197
|
const _ = Ee();
|
|
198
198
|
b(() => !n.state.currentSchedulerId);
|
|
199
|
-
const E = V.currentCountry,
|
|
199
|
+
const E = V.currentCountry, I = b(() => E.value ? ve.Country.getCountry(E.value) : null), Z = b(() => n.rules.item);
|
|
200
200
|
b(() => w.value.length === 1 && w.value[0].id === null);
|
|
201
201
|
const {
|
|
202
202
|
selectedCategories: w
|
|
@@ -221,7 +221,7 @@ const Me = /* @__PURE__ */ ce({
|
|
|
221
221
|
...u,
|
|
222
222
|
[t]: o
|
|
223
223
|
}, D("update:model-value", a));
|
|
224
|
-
},
|
|
224
|
+
}, T = be.debounce(re, 300), R = (e) => (t) => !!t || r("menu.product.table.validation.name_required", {
|
|
225
225
|
field: e
|
|
226
226
|
}), k = (e) => e >= 0 || r("menu.product.table.validation.price_min"), S = [R("Name")], h = () => [(e) => k(typeof e == "number" ? e : Number(e) ?? 0)], P = fe(), B = A([{
|
|
227
227
|
accessorKey: "thumbnail",
|
|
@@ -255,7 +255,7 @@ const Me = /* @__PURE__ */ ce({
|
|
|
255
255
|
modelValue: a == null ? void 0 : a.code,
|
|
256
256
|
placeholder: d.modelValue[t._id].fallbackCode,
|
|
257
257
|
"onUpdate:modelValue": (u) => {
|
|
258
|
-
|
|
258
|
+
T(t._id, "code", u);
|
|
259
259
|
}
|
|
260
260
|
});
|
|
261
261
|
}
|
|
@@ -270,7 +270,7 @@ const Me = /* @__PURE__ */ ce({
|
|
|
270
270
|
disabled: !Z.value.name,
|
|
271
271
|
modelValue: t.name,
|
|
272
272
|
"onUpdate:modelValue": (a) => {
|
|
273
|
-
|
|
273
|
+
T(t._id, "name", a);
|
|
274
274
|
},
|
|
275
275
|
rules: S,
|
|
276
276
|
placeholder: t.fallbackName
|
|
@@ -281,7 +281,7 @@ const Me = /* @__PURE__ */ ce({
|
|
|
281
281
|
header: () => {
|
|
282
282
|
var e;
|
|
283
283
|
return Oe(r("menu.product.table.columns.price", {
|
|
284
|
-
currency: (e =
|
|
284
|
+
currency: (e = I.value) == null ? void 0 : e.currency.symbol
|
|
285
285
|
}));
|
|
286
286
|
},
|
|
287
287
|
enableSorting: !1,
|
|
@@ -326,7 +326,7 @@ const Me = /* @__PURE__ */ ce({
|
|
|
326
326
|
modelValue: s,
|
|
327
327
|
"onUpdate:modelValue": async (X) => {
|
|
328
328
|
const me = n.decodeTax(X);
|
|
329
|
-
|
|
329
|
+
T(o._id, "taxes", [me]);
|
|
330
330
|
}
|
|
331
331
|
});
|
|
332
332
|
}
|
|
@@ -341,13 +341,13 @@ const Me = /* @__PURE__ */ ce({
|
|
|
341
341
|
"model-value": d.modelValue[t._id].category,
|
|
342
342
|
disabled: !!(n.state.currentCatalogId || n.state.currentSchedulerId),
|
|
343
343
|
"onUpdate:modelValue": async (o) => {
|
|
344
|
-
|
|
344
|
+
T(t._id, "category", o);
|
|
345
345
|
}
|
|
346
346
|
}) : te(t.category || null);
|
|
347
347
|
}
|
|
348
348
|
}, {
|
|
349
349
|
accessorKey: "orderFrom",
|
|
350
|
-
header: r("menu.product.table.columns.order_from"),
|
|
350
|
+
header: () => r("menu.product.table.columns.order_from"),
|
|
351
351
|
enableSorting: !0,
|
|
352
352
|
sortingFn: (e, t) => {
|
|
353
353
|
const [o, a] = [e, t].map((u) => P[u.original.orderFrom].sortingIndex);
|
|
@@ -364,7 +364,7 @@ const Me = /* @__PURE__ */ ce({
|
|
|
364
364
|
"onUpdate:modelValue": async (s) => {
|
|
365
365
|
re(o._id, "orderFrom", s);
|
|
366
366
|
}
|
|
367
|
-
}) : U(
|
|
367
|
+
}) : U(Ie, {
|
|
368
368
|
label: (u = a[t]) == null ? void 0 : u.label,
|
|
369
369
|
variant: (C = a[t]) == null ? void 0 : C.variant
|
|
370
370
|
});
|
|
@@ -477,7 +477,7 @@ const Me = /* @__PURE__ */ ce({
|
|
|
477
477
|
number: 0
|
|
478
478
|
}).toObject(), o = e.taxes;
|
|
479
479
|
n.taxSetting.countryTaxOptions;
|
|
480
|
-
const a = ve.Dinero.fromFdoDinero(t).toFormat(), u = (C =
|
|
480
|
+
const a = ve.Dinero.fromFdoDinero(t).toFormat(), u = (C = I.value) == null ? void 0 : C.currency.symbol;
|
|
481
481
|
return n.getSelectedTax(
|
|
482
482
|
o,
|
|
483
483
|
// TODO: fix type error
|
|
@@ -517,11 +517,11 @@ const Me = /* @__PURE__ */ ce({
|
|
|
517
517
|
key: s._id,
|
|
518
518
|
class: "max-w-full py-12 px-16 space-x-16 flex items-center",
|
|
519
519
|
onClick: () => Ke(s)
|
|
520
|
-
}, [g("div",
|
|
520
|
+
}, [g("div", Tt, [i($e, {
|
|
521
521
|
alt: s.name,
|
|
522
522
|
size: 72,
|
|
523
523
|
src: s.thumbnail
|
|
524
|
-
}, null, 8, ["alt", "src"]), g("div", Mt, [g("div", Ot, [g("p", Pt, se(s.name), 1), i(
|
|
524
|
+
}, null, 8, ["alt", "src"]), g("div", Mt, [g("div", Ot, [g("p", Pt, se(s.name), 1), i(Ie, {
|
|
525
525
|
label: (X = l(P)[s.orderFrom || ""]) == null ? void 0 : X.label,
|
|
526
526
|
variant: (me = l(P)[s.orderFrom || ""]) == null ? void 0 : me.variant
|
|
527
527
|
}, null, 8, ["label", "variant"])]), g("p", zt, se(Ce(s)), 1), g("p", Nt, " Category: " + se(te(s.category || null)), 1)])]), i(a, {
|
|
@@ -533,7 +533,7 @@ const Me = /* @__PURE__ */ ce({
|
|
|
533
533
|
name: s.name,
|
|
534
534
|
thumbnail: s.thumbnail
|
|
535
535
|
}]), ["stop"])
|
|
536
|
-
}, null, 8, ["text-color", "variant", "onClick"])], 8,
|
|
536
|
+
}, null, 8, ["text-color", "variant", "onClick"])], 8, It);
|
|
537
537
|
}), 128))])) : (v(), z("div", Dt, [i(ie, {
|
|
538
538
|
subtitle: l(r)("menu.product.table.empty.subtitle"),
|
|
539
539
|
title: l(r)("menu.product.table.empty.title")
|
|
@@ -680,10 +680,10 @@ const Me = /* @__PURE__ */ ce({
|
|
|
680
680
|
dialog: c,
|
|
681
681
|
menuLoader: V
|
|
682
682
|
});
|
|
683
|
-
const n = ye(), H = b(() => n.rules.item), f = rt(), y = Ee(), N = st(), _ = b(() => !n.state.currentCatalogId), E = b(() => n.rules.item),
|
|
683
|
+
const n = ye(), H = b(() => n.rules.item), f = rt(), y = Ee(), N = st(), _ = b(() => !n.state.currentCatalogId), E = b(() => n.rules.item), I = b(() => !n.state.currentSchedulerId), Z = A(!1), w = A(!1), F = b(() => {
|
|
684
684
|
var k, S, h, P;
|
|
685
|
-
if (_.value &&
|
|
686
|
-
if (
|
|
685
|
+
if (_.value && I.value) return;
|
|
686
|
+
if (I.value) {
|
|
687
687
|
const B = (k = n.currentCatalog) == null ? void 0 : k.override.items;
|
|
688
688
|
return B ? Object.entries(B).reduce((x, [p, J]) => {
|
|
689
689
|
const $ = J.find((le) => !le.combinationKey);
|
|
@@ -732,7 +732,7 @@ const Me = /* @__PURE__ */ ce({
|
|
|
732
732
|
j.value && q();
|
|
733
733
|
}, re = Ue();
|
|
734
734
|
b(() => re.breakpoints.value.xs);
|
|
735
|
-
const { t:
|
|
735
|
+
const { t: T } = xe();
|
|
736
736
|
return (R, k) => {
|
|
737
737
|
const S = Y("fm-button");
|
|
738
738
|
return l(K).length ? (v(), z("div", Ut, [
|
|
@@ -763,18 +763,18 @@ const Me = /* @__PURE__ */ ce({
|
|
|
763
763
|
H.value.create ? (v(), G(ie, {
|
|
764
764
|
key: 0,
|
|
765
765
|
action: {
|
|
766
|
-
text: l(
|
|
766
|
+
text: l(T)("menu.product.empty.with_create.action"),
|
|
767
767
|
callback: ee
|
|
768
768
|
},
|
|
769
|
-
subtitle: l(
|
|
770
|
-
title: l(
|
|
771
|
-
}, null, 8, ["action", "subtitle", "title"])) :
|
|
769
|
+
subtitle: l(T)("menu.product.empty.with_create.subtitle"),
|
|
770
|
+
title: l(T)("menu.product.empty.with_create.title")
|
|
771
|
+
}, null, 8, ["action", "subtitle", "title"])) : I.value ? (v(), G(ie, {
|
|
772
772
|
key: 1,
|
|
773
|
-
subtitle: l(
|
|
774
|
-
title: l(
|
|
773
|
+
subtitle: l(T)("menu.product.empty.no_scheduler.subtitle"),
|
|
774
|
+
title: l(T)("menu.product.empty.no_scheduler.title")
|
|
775
775
|
}, {
|
|
776
776
|
action: M(() => [
|
|
777
|
-
i(
|
|
777
|
+
i(Te, {
|
|
778
778
|
"categorized-items": l(N).linkableItems.value,
|
|
779
779
|
"initial-value": l(N).currentItems.value,
|
|
780
780
|
"show-variant": !1,
|
|
@@ -782,7 +782,7 @@ const Me = /* @__PURE__ */ ce({
|
|
|
782
782
|
}, {
|
|
783
783
|
default: M(({ trigger: h }) => [
|
|
784
784
|
i(S, {
|
|
785
|
-
label: l(
|
|
785
|
+
label: l(T)("menu.common.actions.link_product"),
|
|
786
786
|
"prepend-icon": "link",
|
|
787
787
|
onClick: h
|
|
788
788
|
}, null, 8, ["label", "onClick"])
|
|
@@ -793,11 +793,11 @@ const Me = /* @__PURE__ */ ce({
|
|
|
793
793
|
_: 1
|
|
794
794
|
}, 8, ["subtitle", "title"])) : (v(), G(ie, {
|
|
795
795
|
key: 2,
|
|
796
|
-
subtitle: l(
|
|
797
|
-
title: l(
|
|
796
|
+
subtitle: l(T)("menu.product.empty.with_scheduler.subtitle"),
|
|
797
|
+
title: l(T)("menu.product.empty.with_scheduler.title")
|
|
798
798
|
}, {
|
|
799
799
|
action: M(() => [
|
|
800
|
-
i(
|
|
800
|
+
i(Te, {
|
|
801
801
|
"categorized-items": l(f).linkableItems.value,
|
|
802
802
|
"initial-value": l(f).currentItems.value,
|
|
803
803
|
"show-variant": !1,
|
|
@@ -805,7 +805,7 @@ const Me = /* @__PURE__ */ ce({
|
|
|
805
805
|
}, {
|
|
806
806
|
default: M(({ trigger: h }) => [
|
|
807
807
|
i(S, {
|
|
808
|
-
label: l(
|
|
808
|
+
label: l(T)("menu.common.actions.apply_product"),
|
|
809
809
|
onClick: h
|
|
810
810
|
}, null, 8, ["label", "onClick"])
|
|
811
811
|
]),
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as F, computed as f, ref as h, resolveComponent as S, openBlock as u, createBlock as g, unref as e, withCtx as p, createElementVNode as i, toDisplayString as U, createVNode as
|
|
2
|
-
import { u as L, a as j, c as
|
|
3
|
-
import { useCoreStore as X } from "@feedmepos/mf-common";
|
|
4
|
-
import { useDialog as q, useDialogChild as Z, useSnackbar as z, useBreakpoints as ee, FmButtonColorThemeVariant as M, FmButtonVariant as
|
|
1
|
+
import { defineComponent as F, computed as f, ref as h, resolveComponent as S, openBlock as u, createBlock as g, unref as e, withCtx as p, createElementVNode as i, toDisplayString as U, createVNode as o, createCommentVNode as A, createElementBlock as T, Fragment as E } from "vue";
|
|
2
|
+
import { u as L, a as j, c as I, e as P, b as H, m as G, d as J, _ as K, f as V, D as Q } from "./app-DnjfTTyH.js";
|
|
3
|
+
import { useCoreStore as W, useI18n as X } from "@feedmepos/mf-common";
|
|
4
|
+
import { useDialog as q, useDialogChild as Z, useSnackbar as z, useBreakpoints as ee, FmButtonColorThemeVariant as M, FmButtonVariant as D } from "@feedmepos/ui-library";
|
|
5
5
|
import "vue-router";
|
|
6
|
-
import { L as N } from "./LinkProductSideSheet-
|
|
7
|
-
import { _ as te, a as B } from "./Product.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
import { u as
|
|
9
|
-
import { u as ae } from "./item-
|
|
10
|
-
import { u as re, a as se, w as le } from "./catalog-
|
|
11
|
-
import { m as ie } from "./toExcel-
|
|
12
|
-
import { l as ue } from "./lodash-
|
|
6
|
+
import { L as N } from "./LinkProductSideSheet-Dr54Si8e.js";
|
|
7
|
+
import { _ as te, a as B } from "./Product.vue_vue_type_script_setup_true_lang-DCypQ1N4.js";
|
|
8
|
+
import { u as oe, a as ne } from "./menu-Bxe-VCgS.js";
|
|
9
|
+
import { u as ae } from "./item-BVtbX-DR.js";
|
|
10
|
+
import { u as re, a as se, w as le } from "./catalog-B3zKEMGs.js";
|
|
11
|
+
import { m as ie } from "./toExcel-B35ESJnK.js";
|
|
12
|
+
import { l as ue } from "./lodash-Dum3fDW4.js";
|
|
13
13
|
import { _ as ce, a as R } from "./BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-DPis3HVx.js";
|
|
14
14
|
const me = { class: "space-y-24 mb-24" }, de = ["innerHTML"], pe = { class: "flex justify-end gap-8" }, fe = /* @__PURE__ */ F({
|
|
15
15
|
__name: "ConfirmActionDialog",
|
|
@@ -19,7 +19,7 @@ const me = { class: "space-y-24 mb-24" }, de = ["innerHTML"], pe = { class: "fle
|
|
|
19
19
|
message: { default: "To confirm your action, type <b>[[value]]</b> in the text field." }
|
|
20
20
|
},
|
|
21
21
|
setup(C) {
|
|
22
|
-
const t = C, y = f(() => t.message.replace("[[value]]", t.value)),
|
|
22
|
+
const t = C, y = f(() => t.message.replace("[[value]]", t.value)), n = h(""), k = q(), { emitAction: b } = Z();
|
|
23
23
|
return (c, a) => {
|
|
24
24
|
const s = S("FmTextField"), m = S("FmButton"), _ = S("FmForm");
|
|
25
25
|
return u(), g(_, {
|
|
@@ -31,10 +31,10 @@ const me = { class: "space-y-24 mb-24" }, de = ["innerHTML"], pe = { class: "fle
|
|
|
31
31
|
i("div", null, U(c.description), 1),
|
|
32
32
|
i("div", { innerHTML: y.value }, null, 8, de),
|
|
33
33
|
i("div", null, [
|
|
34
|
-
|
|
35
|
-
modelValue:
|
|
34
|
+
o(s, {
|
|
35
|
+
modelValue: n.value,
|
|
36
36
|
"onUpdate:modelValue": [
|
|
37
|
-
a[0] || (a[0] = (l) =>
|
|
37
|
+
a[0] || (a[0] = (l) => n.value = l),
|
|
38
38
|
a[1] || (a[1] = () => {
|
|
39
39
|
})
|
|
40
40
|
],
|
|
@@ -43,12 +43,12 @@ const me = { class: "space-y-24 mb-24" }, de = ["innerHTML"], pe = { class: "fle
|
|
|
43
43
|
}, null, 8, ["modelValue", "placeholder", "rules"])
|
|
44
44
|
]),
|
|
45
45
|
i("div", pe, [
|
|
46
|
-
|
|
46
|
+
o(m, {
|
|
47
47
|
label: "Cancel",
|
|
48
48
|
variant: "secondary",
|
|
49
49
|
onClick: a[2] || (a[2] = (l) => e(k).close())
|
|
50
50
|
}),
|
|
51
|
-
|
|
51
|
+
o(m, {
|
|
52
52
|
label: "Confirm",
|
|
53
53
|
type: "submit"
|
|
54
54
|
})
|
|
@@ -62,7 +62,7 @@ const me = { class: "space-y-24 mb-24" }, de = ["innerHTML"], pe = { class: "fle
|
|
|
62
62
|
}), _e = /* @__PURE__ */ F({
|
|
63
63
|
__name: "Migrate",
|
|
64
64
|
setup(C) {
|
|
65
|
-
const t = L(), y =
|
|
65
|
+
const t = L(), y = W(), n = z(), { minor: k } = j(n), b = h(!1), c = q();
|
|
66
66
|
async function a() {
|
|
67
67
|
s.value || b.value || c.open({
|
|
68
68
|
title: "Migrate to new version",
|
|
@@ -90,8 +90,8 @@ const me = { class: "space-y-24 mb-24" }, de = ["innerHTML"], pe = { class: "fle
|
|
|
90
90
|
const s = f(() => {
|
|
91
91
|
const m = y.restaurants.value;
|
|
92
92
|
if (!m.length) return "Required at least one restaurant to migrate";
|
|
93
|
-
const _ = m.filter((v) => !v.posVersion || !
|
|
94
|
-
return _.length ? `Upgrade POS to V${
|
|
93
|
+
const _ = m.filter((v) => !v.posVersion || !I.Pos.canUse({ feature: P.F_FEATURE.enum.menuV4, posVersion: v.posVersion }));
|
|
94
|
+
return _.length ? `Upgrade POS to V${I.Pos.minVersionToUse(P.F_FEATURE.enum.menuV4)} to use new menu: ${_.map((v) => v.profile.name).join(", ")}` : null;
|
|
95
95
|
});
|
|
96
96
|
return f(() => s.value ? s.value : "Migrate your menu to new version to enjoy more features. Content of new menu will remain the same as current."), (m, _) => {
|
|
97
97
|
const l = S("FmSnackbar");
|
|
@@ -107,38 +107,38 @@ const me = { class: "space-y-24 mb-24" }, de = ["innerHTML"], pe = { class: "fle
|
|
|
107
107
|
})) : A("", !0);
|
|
108
108
|
};
|
|
109
109
|
}
|
|
110
|
-
}), ve = { class: "flex-1 flex justify-between gap-8 pl-8" }, ge = { class: "flex items-center" }, be = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, ye = { class: "fm-typo-en-body-md-600 font-semibold" }, ke = { class: "flex gap-8" },
|
|
110
|
+
}), ve = { class: "flex-1 flex justify-between gap-8 pl-8" }, ge = { class: "flex items-center" }, be = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, ye = { class: "fm-typo-en-body-md-600 font-semibold" }, ke = { class: "flex gap-8" }, De = /* @__PURE__ */ F({
|
|
111
111
|
__name: "Products",
|
|
112
112
|
setup(C) {
|
|
113
|
-
const { t } =
|
|
114
|
-
...
|
|
115
|
-
_id:
|
|
116
|
-
_rev:
|
|
113
|
+
const { t } = X(), y = j(z()), n = L(), k = f(() => n.rules.item), b = ae(), c = f(() => !n.state.currentSchedulerId), a = re(), s = se(), { selectedCategories: m } = oe(), _ = f(() => ({
|
|
114
|
+
...G.menuV4ToV3(J(n.state.menu)),
|
|
115
|
+
_id: n.state.menu._id,
|
|
116
|
+
_rev: n.state.menu._rev
|
|
117
117
|
})), l = f(() => ue.flatten(m.value.map((x) => x.items)).length);
|
|
118
118
|
async function v() {
|
|
119
119
|
await y.minor(
|
|
120
120
|
async () => {
|
|
121
|
-
await
|
|
122
|
-
const x = await ie(_.value), d = `menu_${
|
|
121
|
+
await n.readMenu();
|
|
122
|
+
const x = await ie(_.value), d = `menu_${Q().format("DD-MM-YYYY_HH-mm")}`;
|
|
123
123
|
await le(x, `${d}.xlsx`, {
|
|
124
124
|
bookType: "xlsx",
|
|
125
125
|
bookSST: !1,
|
|
126
126
|
type: "array"
|
|
127
127
|
});
|
|
128
128
|
},
|
|
129
|
-
{ successMessage: "Menu exported", customId:
|
|
129
|
+
{ successMessage: "Menu exported", customId: n.state.menu._id }
|
|
130
130
|
);
|
|
131
131
|
}
|
|
132
132
|
h(!1), h(!1);
|
|
133
133
|
const O = ee(), Y = f(() => O.breakpoints.value.xs);
|
|
134
|
-
return
|
|
134
|
+
return ne().resetOnMount(), (x, d) => {
|
|
135
135
|
const $ = S("fm-button");
|
|
136
|
-
return u(), g(
|
|
136
|
+
return u(), g(K, {
|
|
137
137
|
heading: e(t)("menu.products.title")
|
|
138
138
|
}, {
|
|
139
139
|
default: p(() => [
|
|
140
|
-
|
|
141
|
-
|
|
140
|
+
o(_e),
|
|
141
|
+
o(te)
|
|
142
142
|
]),
|
|
143
143
|
"append-heading": p(() => [
|
|
144
144
|
i("div", ve, [
|
|
@@ -150,13 +150,13 @@ const me = { class: "space-y-24 mb-24" }, de = ["innerHTML"], pe = { class: "fle
|
|
|
150
150
|
i("div", ke, [
|
|
151
151
|
Y.value ? (u(), g(B, { key: 1 }, {
|
|
152
152
|
default: p(({ trigger: r }) => [
|
|
153
|
-
|
|
153
|
+
o(ce, null, {
|
|
154
154
|
default: p(() => [
|
|
155
|
-
|
|
155
|
+
o(R, {
|
|
156
156
|
label: e(t)("menu.products.actions.export"),
|
|
157
157
|
onClick: v
|
|
158
158
|
}, null, 8, ["label"]),
|
|
159
|
-
|
|
159
|
+
o(R, {
|
|
160
160
|
label: e(t)("menu.products.actions.import"),
|
|
161
161
|
onClick: r
|
|
162
162
|
}, null, 8, ["label", "onClick"])
|
|
@@ -166,19 +166,19 @@ const me = { class: "space-y-24 mb-24" }, de = ["innerHTML"], pe = { class: "fle
|
|
|
166
166
|
]),
|
|
167
167
|
_: 1
|
|
168
168
|
})) : (u(), T(E, { key: 0 }, [
|
|
169
|
-
|
|
169
|
+
o($, {
|
|
170
170
|
"bg-color": e(M).NeutralGray100,
|
|
171
171
|
"text-color": e(M).TypoSecondary,
|
|
172
|
-
variant: e(
|
|
172
|
+
variant: e(D).Primary,
|
|
173
173
|
label: e(t)("menu.products.actions.export"),
|
|
174
174
|
onClick: v
|
|
175
175
|
}, null, 8, ["bg-color", "text-color", "variant", "label"]),
|
|
176
|
-
|
|
176
|
+
o(B, null, {
|
|
177
177
|
default: p(({ trigger: r }) => [
|
|
178
|
-
|
|
178
|
+
o($, {
|
|
179
179
|
"bg-color": e(M).NeutralGray100,
|
|
180
180
|
"text-color": e(M).TypoSecondary,
|
|
181
|
-
variant: e(
|
|
181
|
+
variant: e(D).Primary,
|
|
182
182
|
label: e(t)("menu.products.actions.import"),
|
|
183
183
|
onClick: r
|
|
184
184
|
}, null, 8, ["bg-color", "text-color", "variant", "label", "onClick"])
|
|
@@ -200,7 +200,7 @@ const me = { class: "space-y-24 mb-24" }, de = ["innerHTML"], pe = { class: "fle
|
|
|
200
200
|
onSubmit: d[1] || (d[1] = (r) => e(a).applyProduct(r.map((w) => w._id)))
|
|
201
201
|
}, {
|
|
202
202
|
default: p(({ trigger: r }) => [
|
|
203
|
-
|
|
203
|
+
o(V, {
|
|
204
204
|
label: e(t)("menu.products.actions.link"),
|
|
205
205
|
"prepend-icon": "link",
|
|
206
206
|
onClick: r
|
|
@@ -215,7 +215,7 @@ const me = { class: "space-y-24 mb-24" }, de = ["innerHTML"], pe = { class: "fle
|
|
|
215
215
|
onSubmit: d[2] || (d[2] = (r) => e(s).applyProduct(r.map((w) => w._id)))
|
|
216
216
|
}, {
|
|
217
217
|
default: p(({ trigger: r }) => [
|
|
218
|
-
|
|
218
|
+
o(V, {
|
|
219
219
|
label: e(t)("menu.products.actions.apply_scheduler"),
|
|
220
220
|
onClick: r
|
|
221
221
|
}, null, 8, ["label", "onClick"])
|
|
@@ -232,5 +232,5 @@ const me = { class: "space-y-24 mb-24" }, de = ["innerHTML"], pe = { class: "fle
|
|
|
232
232
|
}
|
|
233
233
|
});
|
|
234
234
|
export {
|
|
235
|
-
|
|
235
|
+
De as default
|
|
236
236
|
};
|