@feedmepos/mf-menu 0.32.51-dev → 0.32.52
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-DJ_boY0P.js → App-ueXpH5uy.js} +498 -507
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-BVafiq6l.js → ApplyProduct.vue_vue_type_script_setup_true_lang-BsFapF6d.js} +3 -3
- package/dist/{ApplyProductDialog.vue_vue_type_script_setup_true_lang-CruH5AF9.js → ApplyProductDialog.vue_vue_type_script_setup_true_lang-BSN7XtmN.js} +2 -2
- package/dist/{Catalog-C_7GyzOz.js → Catalog-Bv7P9ezj.js} +7 -7
- package/dist/{Category-B8c8AO0C.js → Category-CUlq7SuU.js} +5 -5
- package/dist/{Category-CJRttg5g.js → Category-DdS1KASK.js} +4 -4
- package/dist/{CookingGuide-B-oXAful.js → CookingGuide-DkBX8wnY.js} +5 -5
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-DwwMOoQx.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-DcfgHbnh.js} +1 -1
- package/dist/{Group-DZrcYfeC.js → Group-BQpcj6QD.js} +4 -4
- package/dist/{Group-iHKwYfVS.js → Group-pe0PnVCF.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-UrT9_Dv_.js → Group.vue_vue_type_script_setup_true_lang-D-_Mb3Ni.js} +7 -7
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BljvPVAz.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CAmV-Bbk.js} +5 -5
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-Cu2_U6gg.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-CKOiT-Dq.js} +10 -10
- package/dist/{Ingredient-EEsIgWLG.js → Ingredient-BUxeqp7_.js} +4 -4
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-B_ItCbTf.js → InventoryBinding.vue_vue_type_script_setup_true_lang-Cp-Lhe6Y.js} +2 -2
- package/dist/{LinkProductSideSheet-DwVODI1U.js → LinkProductSideSheet-CLFUnEzC.js} +3 -3
- package/dist/{MenuSetting-CP7Vx_cV.js → MenuSetting-CXxjBg51.js} +9 -9
- package/dist/{OrderPacing-Dej0Cp3E.js → OrderPacing-Qs6pkp2R.js} +6 -6
- package/dist/{PageLayout.vue_vue_type_script_setup_true_lang-BFxSjqqP.js → PageLayout.vue_vue_type_script_setup_true_lang-BVmHMvKD.js} +2 -2
- package/dist/{PrintRoute-DOJJ82mH.js → PrintRoute-DujkGrc5.js} +5 -5
- package/dist/{Product-BpH2gXii.js → Product-Cvx9QNvS.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-BhOdWTlM.js → Product.vue_vue_type_script_setup_true_lang-CB9i8PBK.js} +12 -12
- package/dist/{ProductInternalTools-CjoC9z79.js → ProductInternalTools-BoMKTz_K.js} +7 -7
- package/dist/{Products-BaH1UUlM.js → Products-DePOWKkr.js} +125 -122
- package/dist/{Publish-D-xjezFx.js → Publish-CYT_yffF.js} +533 -528
- package/dist/{Recipe-Dv38pLls.js → Recipe-DnSVxwzQ.js} +5 -5
- package/dist/{RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-CJwwJ87D.js → RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-CrspfNYu.js} +1 -1
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-a6W_3fVO.js → RuleView.vue_vue_type_script_setup_true_lang-lO4l5Ljh.js} +302 -302
- package/dist/{Scheduler-DEgUjACU.js → Scheduler-CdYNHciJ.js} +4 -4
- package/dist/{ServingSequence-C-XRskmz.js → ServingSequence-Jo7bwtAo.js} +4 -4
- package/dist/{Setting-C4zIGhS4.js → Setting-Cq-_XYsZ.js} +5 -5
- package/dist/{Subcategory-0e7ZQXZl.js → Subcategory-1gkL6W4_.js} +6 -6
- package/dist/{Takeaway-BR6Jm6tq.js → Takeaway-CAZzzdLP.js} +1 -1
- package/dist/{Takeaway-Bk9u-h1u.js → Takeaway-DCWzdHo8.js} +5 -5
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-DXCVV-UI.js → Takeaway.vue_vue_type_script_setup_true_lang-e-I0u75f.js} +5 -5
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-BZRHb8G7.js → Thumbnail.vue_vue_type_script_setup_true_lang-DZrLbN0f.js} +4 -4
- package/dist/{TranslationFieldSection.vue_vue_type_script_setup_true_lang-BrhjUvFq.js → TranslationFieldSection.vue_vue_type_script_setup_true_lang-DVpEwVSx.js} +1 -1
- package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-BKD-EAO3.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-BFajMkOS.js} +2 -2
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Ch5KY_XM.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DbQEg7Q8.js} +938 -941
- package/dist/{Unit-BdV3zkYP.js → Unit-DMO6V6Mu.js} +3 -3
- package/dist/{Variant-CtcqyPKe.js → Variant-FKGZZrba.js} +26 -30
- package/dist/{_id_-Fo7FbggZ.js → _id_-C0CFpyt-.js} +10 -10
- package/dist/{app-DtMGo-8a.js → app-4a-p2oXw.js} +185 -185
- package/dist/{app-BirB2oNz.js → app-BjeSSnsM.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/app.d.ts +7 -0
- package/dist/apps/mf-menu/src/components/member_price/MemberPriceToolTip.vue.d.ts +2 -0
- package/dist/apps/mf-menu/src/manager/menu/memberPricing.d.ts +4 -1
- package/dist/apps/mf-menu/src/stores/menu.d.ts +1 -1
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-B6SJq-v-.js → linked-status-BAAoFylt.js} +2 -2
- package/dist/assets/{menu-export-CwiCpw67.js → menu-export-Dild-wkg.js} +4 -4
- package/dist/assets/{override-menu-Fx3w0bSY.js → override-menu-DW8WHLlm.js} +2 -2
- package/dist/assets/{validate-menu-BGTp-oO7.js → validate-menu-2eCRB1oK.js} +2 -2
- package/dist/{catalog-DtioUeQr.js → catalog-9HYR7maN.js} +1 -1
- package/dist/{catalogSetting-BRAVGHiH.js → catalogSetting-CePbHJER.js} +1 -1
- package/dist/{currency-Dntgj8R7.js → currency-D1B58hqR.js} +1 -1
- package/dist/{dayjs.min-CwKTySXQ.js → dayjs.min-C4k3xr-5.js} +2 -2
- package/dist/{index-vHMVgpgg.js → index-Dty_jYZ3.js} +25 -25
- package/dist/{index-b5UraR94.js → index-tJdydlQc.js} +4 -4
- package/dist/{index.vue_vue_type_script_setup_true_lang-CbJ4htzZ.js → index.vue_vue_type_script_setup_true_lang-bYbEuWK0.js} +4365 -4369
- package/dist/{item-CAdH9ZRb.js → item-DtotNzxu.js} +1179 -1178
- package/dist/{jszip.min-q5-4AKN4.js → jszip.min-DnWM7-sF.js} +153 -153
- package/dist/memberPricing-DUTPzGB1.js +107 -0
- package/dist/{menu-CSDflKWK.js → menu-XlJwZzUi.js} +1 -1
- package/dist/{menuV2-Cf_zeTsx.js → menuV2-CMGSx4LE.js} +48 -48
- package/dist/mf-menu.css +1 -1
- package/dist/{order_pacing-gM1ob6dp.js → order_pacing-Ieq2X2Ka.js} +5 -5
- package/dist/{priceTier-qp7ZHYG1.js → priceTier-BD2Sh-kx.js} +1 -1
- package/dist/{rules-Bvgey7qo.js → rules-BfMSf5Bl.js} +3 -3
- package/dist/{scheduler-CLvNHt4g.js → scheduler-0boD1Q7V.js} +4 -4
- package/dist/{toExcel-CDs_GgCA.js → toExcel-Blh9r3ex.js} +2 -2
- package/dist/{unit-CR4GvsD0.js → unit-DM_ZlK-z.js} +2 -2
- package/package.json +1 -1
- package/dist/memberPricing-BK7Y-pUK.js +0 -89
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineComponent as Z, ref as v, computed as $, resolveComponent as G, createElementBlock as c, openBlock as r, createElementVNode as s, createVNode as I, unref as h, createCommentVNode as T, normalizeClass as E, toDisplayString as U, createStaticVNode as B, Fragment as P, renderList as O, createBlock as oe, withCtx as R } from "vue";
|
|
2
|
-
import { J as A, F as ne } from "./jszip.min-
|
|
3
|
-
import { B as le, u as ie, H as D, a3 as re, M as ce, N as de, O as me } from "./index.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { J as A, F as ne } from "./jszip.min-DnWM7-sF.js";
|
|
3
|
+
import { B as le, u as ie, H as D, a3 as re, M as ce, N as de, O as me } from "./index.vue_vue_type_script_setup_true_lang-bYbEuWK0.js";
|
|
4
4
|
import { useI18n as ue } from "@feedmepos/mf-common";
|
|
5
5
|
import { FmButtonVariant as z, useSnackbar as V, useDialog as ge, FmButtonColorThemeVariant as S } from "@feedmepos/ui-library";
|
|
6
|
-
import { _ as pe } from "./PageLayout.vue_vue_type_script_setup_true_lang-
|
|
7
|
-
import { u as fe, a as he } from "./menu-
|
|
8
|
-
import { a as ye } from "./Product.vue_vue_type_script_setup_true_lang-
|
|
9
|
-
import { D as be, E as ve, G as _e } from "./item-
|
|
6
|
+
import { _ as pe } from "./PageLayout.vue_vue_type_script_setup_true_lang-BVmHMvKD.js";
|
|
7
|
+
import { u as fe, a as he } from "./menu-XlJwZzUi.js";
|
|
8
|
+
import { a as ye } from "./Product.vue_vue_type_script_setup_true_lang-CB9i8PBK.js";
|
|
9
|
+
import { D as be, E as ve, G as _e } from "./item-DtotNzxu.js";
|
|
10
10
|
const we = { class: "h-full flex flex-col" }, xe = { class: "flex items-center justify-between p-16 border-b border-gray-200" }, Ie = { class: "flex gap-8" }, ke = { class: "border-b border-gray-200" }, Ce = { class: "flex" }, Ue = { class: "flex-1 overflow-hidden" }, je = {
|
|
11
11
|
key: 0,
|
|
12
12
|
class: "h-full flex flex-col"
|
|
@@ -151,7 +151,7 @@ const we = { class: "h-full flex flex-col" }, xe = { class: "flex items-center j
|
|
|
151
151
|
};
|
|
152
152
|
}
|
|
153
153
|
});
|
|
154
|
-
var He = { firebase: { storageBucket: "image.
|
|
154
|
+
var He = { firebase: { storageBucket: "image.feedme.cc" } };
|
|
155
155
|
const Je = {
|
|
156
156
|
key: 0,
|
|
157
157
|
class: "h-screen"
|
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { D as
|
|
3
|
-
import { J as re, F as ie } from "./jszip.min-
|
|
4
|
-
import { u as K, B as Q, z as
|
|
5
|
-
import { w as me } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-
|
|
6
|
-
import { h as
|
|
1
|
+
import { defineComponent as I, computed as _, ref as W, resolveComponent as w, createBlock as m, openBlock as l, unref as e, withCtx as p, createElementVNode as d, toDisplayString as Z, createVNode as u, createCommentVNode as C, createElementBlock as U, Fragment as L } from "vue";
|
|
2
|
+
import { D as E } from "./dayjs.min-C4k3xr-5.js";
|
|
3
|
+
import { J as re, F as ie } from "./jszip.min-DnWM7-sF.js";
|
|
4
|
+
import { u as K, B as Q, z as j, D as H, y as X, A as le, G as ue, H as R, I as ce } from "./index.vue_vue_type_script_setup_true_lang-bYbEuWK0.js";
|
|
5
|
+
import { w as me } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-CKOiT-Dq.js";
|
|
6
|
+
import { h as $, A as q } from "./app-4a-p2oXw.js";
|
|
7
7
|
import { useCoreStore as ee, useI18n as de } from "@feedmepos/mf-common";
|
|
8
|
-
import { useDialog as te, useDialogChild as pe, useSnackbar as ne, useBreakpoints as
|
|
9
|
-
import { _ as
|
|
10
|
-
import { _ as
|
|
11
|
-
import { _ as
|
|
12
|
-
import { u as
|
|
13
|
-
import { u as ye } from "./item-
|
|
14
|
-
import { _ as O, a as ke } from "./Product.vue_vue_type_script_setup_true_lang-
|
|
15
|
-
import { L as J } from "./LinkProductSideSheet-
|
|
16
|
-
import { _ as xe } from "./TreeEditorOpenner.vue_vue_type_script_setup_true_lang-
|
|
17
|
-
import { u as
|
|
18
|
-
import { m as
|
|
19
|
-
const Me = { class: "space-y-24 mb-24" },
|
|
8
|
+
import { useDialog as te, useDialogChild as pe, useSnackbar as ne, useBreakpoints as _e, FmButtonVariant as T, FmButtonColorThemeVariant as h } from "@feedmepos/ui-library";
|
|
9
|
+
import { _ as D } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
10
|
+
import { _ as fe, a as G } from "./BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-DhrXKy3b.js";
|
|
11
|
+
import { _ as ge } from "./PageLayout.vue_vue_type_script_setup_true_lang-BVmHMvKD.js";
|
|
12
|
+
import { u as ve, a as be } from "./menu-XlJwZzUi.js";
|
|
13
|
+
import { u as ye } from "./item-DtotNzxu.js";
|
|
14
|
+
import { _ as O, a as ke } from "./Product.vue_vue_type_script_setup_true_lang-CB9i8PBK.js";
|
|
15
|
+
import { L as J } from "./LinkProductSideSheet-CLFUnEzC.js";
|
|
16
|
+
import { _ as xe } from "./TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DbQEg7Q8.js";
|
|
17
|
+
import { u as Se } from "./Thumbnail.vue_vue_type_script_setup_true_lang-DZrLbN0f.js";
|
|
18
|
+
import { m as he } from "./toExcel-Blh9r3ex.js";
|
|
19
|
+
const Me = { class: "space-y-24 mb-24" }, Ce = ["innerHTML"], we = { class: "flex justify-end gap-8" }, Fe = /* @__PURE__ */ I({
|
|
20
20
|
__name: "ConfirmActionDialog",
|
|
21
21
|
props: {
|
|
22
22
|
description: {},
|
|
23
23
|
value: {},
|
|
24
24
|
message: { default: "To confirm your action, type <b>[[value]]</b> in the text field." }
|
|
25
25
|
},
|
|
26
|
-
setup(
|
|
27
|
-
const n =
|
|
28
|
-
return (
|
|
29
|
-
const
|
|
30
|
-
return l(),
|
|
31
|
-
"on-validation-success": () => e(
|
|
26
|
+
setup(V) {
|
|
27
|
+
const n = V, f = _(() => n.message.replace("[[value]]", n.value)), y = W(""), o = te(), { emitAction: k } = pe();
|
|
28
|
+
return (g, i) => {
|
|
29
|
+
const x = w("FmTextField"), S = w("FmButton"), v = w("FmForm");
|
|
30
|
+
return l(), m(v, {
|
|
31
|
+
"on-validation-success": () => e(k)("primary"),
|
|
32
32
|
"blame-form-child-on-validation-failed": ""
|
|
33
33
|
}, {
|
|
34
|
-
default:
|
|
34
|
+
default: p(() => [
|
|
35
35
|
d("div", Me, [
|
|
36
|
-
d("div", null, Z(
|
|
37
|
-
d("div", { innerHTML:
|
|
36
|
+
d("div", null, Z(g.description), 1),
|
|
37
|
+
d("div", { innerHTML: f.value }, null, 8, Ce),
|
|
38
38
|
d("div", null, [
|
|
39
|
-
u(
|
|
40
|
-
modelValue:
|
|
39
|
+
u(x, {
|
|
40
|
+
modelValue: y.value,
|
|
41
41
|
"onUpdate:modelValue": [
|
|
42
|
-
i[0] || (i[0] = (
|
|
42
|
+
i[0] || (i[0] = (c) => y.value = c),
|
|
43
43
|
i[1] || (i[1] = () => {
|
|
44
44
|
})
|
|
45
45
|
],
|
|
46
|
-
placeholder:
|
|
47
|
-
rules: [(
|
|
46
|
+
placeholder: g.value,
|
|
47
|
+
rules: [(c) => c === g.value || "Value does not match"]
|
|
48
48
|
}, null, 8, ["modelValue", "placeholder", "rules"])
|
|
49
49
|
]),
|
|
50
|
-
d("div",
|
|
51
|
-
u(
|
|
50
|
+
d("div", we, [
|
|
51
|
+
u(S, {
|
|
52
52
|
label: "Cancel",
|
|
53
53
|
variant: "secondary",
|
|
54
|
-
onClick: i[2] || (i[2] = (
|
|
54
|
+
onClick: i[2] || (i[2] = (c) => e(o).close())
|
|
55
55
|
}),
|
|
56
|
-
u(
|
|
56
|
+
u(S, {
|
|
57
57
|
label: "Confirm",
|
|
58
58
|
type: "submit"
|
|
59
59
|
})
|
|
@@ -64,12 +64,12 @@ const Me = { class: "space-y-24 mb-24" }, we = ["innerHTML"], Ce = { class: "fle
|
|
|
64
64
|
}, 8, ["on-validation-success"]);
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
-
}), $e = /* @__PURE__ */
|
|
67
|
+
}), $e = /* @__PURE__ */ I({
|
|
68
68
|
__name: "Migrate",
|
|
69
|
-
setup(
|
|
70
|
-
const n = K(),
|
|
69
|
+
setup(V) {
|
|
70
|
+
const n = K(), f = ee(), y = ne(), { minor: o } = Q(y), k = W(!1), g = te();
|
|
71
71
|
async function i() {
|
|
72
|
-
|
|
72
|
+
x.value || k.value || g.open({
|
|
73
73
|
title: "Migrate to new version",
|
|
74
74
|
contentComponent: Fe,
|
|
75
75
|
contentComponentProps: {
|
|
@@ -77,14 +77,14 @@ const Me = { class: "space-y-24 mb-24" }, we = ["innerHTML"], Ce = { class: "fle
|
|
|
77
77
|
description: "Do you want to migrate to new version? Once migrate it will unable to revert to the older version."
|
|
78
78
|
}
|
|
79
79
|
}).onPrimary(async () => {
|
|
80
|
-
|
|
80
|
+
g.close(), await o(
|
|
81
81
|
async () => {
|
|
82
82
|
await n.migrate(), setTimeout(() => {
|
|
83
83
|
window.location.reload();
|
|
84
84
|
}, 2e3);
|
|
85
85
|
},
|
|
86
86
|
{
|
|
87
|
-
isLoading:
|
|
87
|
+
isLoading: k,
|
|
88
88
|
customId: n.state.menu._id,
|
|
89
89
|
message: "Migrating menu",
|
|
90
90
|
successMessage: "Migration completed"
|
|
@@ -92,15 +92,18 @@ const Me = { class: "space-y-24 mb-24" }, we = ["innerHTML"], Ce = { class: "fle
|
|
|
92
92
|
);
|
|
93
93
|
});
|
|
94
94
|
}
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
if (
|
|
98
|
-
|
|
99
|
-
|
|
95
|
+
const x = _(() => {
|
|
96
|
+
var M;
|
|
97
|
+
if (((M = f.sessionUser.value) == null ? void 0 : M.role.isAdmin) === !0)
|
|
98
|
+
return null;
|
|
99
|
+
const v = f.restaurants.value;
|
|
100
|
+
if (!v.length) return "Required at least one restaurant to migrate";
|
|
101
|
+
const c = v.filter((b) => !b.posVersion || !j.Pos.canUse({ feature: H.F_FEATURE.enum.menuV4, posVersion: b.posVersion }));
|
|
102
|
+
return c.length ? `Upgrade POS to V${j.Pos.minVersionToUse(H.F_FEATURE.enum.menuV4)} to use new menu: ${c.map((b) => b.profile.name).join(", ")}` : null;
|
|
100
103
|
});
|
|
101
|
-
return
|
|
102
|
-
const
|
|
103
|
-
return !
|
|
104
|
+
return (S, v) => {
|
|
105
|
+
const c = w("FmSnackbar");
|
|
106
|
+
return !x.value && e(n).version !== e(X).enum.v4 ? (l(), m(c, {
|
|
104
107
|
key: 0,
|
|
105
108
|
class: "!max-w-full",
|
|
106
109
|
title: "New version of menu is out now!",
|
|
@@ -109,32 +112,32 @@ const Me = { class: "space-y-24 mb-24" }, we = ["innerHTML"], Ce = { class: "fle
|
|
|
109
112
|
action: "Migrate",
|
|
110
113
|
"z-index": 0,
|
|
111
114
|
onOnAction: i
|
|
112
|
-
})) :
|
|
115
|
+
})) : C("", !0);
|
|
113
116
|
};
|
|
114
117
|
}
|
|
115
|
-
}), Ve = "/assets/menu-export-
|
|
118
|
+
}), Ve = "/assets/menu-export-Dild-wkg.js", Ae = { class: "flex-1 flex justify-between gap-8 pl-8" }, Ee = { class: "flex items-center" }, Te = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, De = { class: "fm-typo-en-body-md-600 font-semibold" }, Ie = { class: "flex gap-8" }, Xe = /* @__PURE__ */ I({
|
|
116
119
|
__name: "Products",
|
|
117
|
-
setup(
|
|
118
|
-
const { t: n } = de(),
|
|
120
|
+
setup(V) {
|
|
121
|
+
const { t: n } = de(), f = ee(), y = Q(ne()), o = K(), k = _(() => o.rules.item), g = ye(), i = _(() => !o.state.currentSchedulerId), { selectedCategories: x } = ve(), S = _(() => ({
|
|
119
122
|
...le.menuV4ToV3(ue(o.state.menu)),
|
|
120
123
|
_id: o.state.menu._id,
|
|
121
124
|
_rev: o.state.menu._rev
|
|
122
|
-
})),
|
|
123
|
-
const r = R.flatten(
|
|
125
|
+
})), v = _(() => {
|
|
126
|
+
const r = R.flatten(x.value.map((t) => t.items));
|
|
124
127
|
return R.uniqBy(r, (t) => t._id).length;
|
|
125
128
|
});
|
|
126
|
-
async function
|
|
129
|
+
async function c(r, t) {
|
|
127
130
|
const a = new re();
|
|
128
|
-
for (let
|
|
129
|
-
a.file(`${t[
|
|
131
|
+
for (let F = 0; F < r.length; F++)
|
|
132
|
+
a.file(`${t[F]}.xlsx`, r[F]);
|
|
130
133
|
const s = await a.generateAsync({ type: "blob" });
|
|
131
|
-
ie.saveAs(s, `books_${
|
|
134
|
+
ie.saveAs(s, `books_${E().format("DD-MM-YYYY_HH-mm")}.zip`);
|
|
132
135
|
}
|
|
133
|
-
async function
|
|
134
|
-
await
|
|
136
|
+
async function A() {
|
|
137
|
+
await y.minor(
|
|
135
138
|
async () => {
|
|
136
139
|
if (await o.readMenu(), o.version === X.enum.v4) {
|
|
137
|
-
const r = o.state.menu, t =
|
|
140
|
+
const r = o.state.menu, t = E().format("DD-MM-YYYY_HH-mm"), a = [
|
|
138
141
|
`menu_${t}`,
|
|
139
142
|
`addonGroup_${t}`,
|
|
140
143
|
`itemLinkedAddon_${t}`,
|
|
@@ -143,13 +146,13 @@ const Me = { class: "space-y-24 mb-24" }, we = ["innerHTML"], Ce = { class: "fle
|
|
|
143
146
|
Ve,
|
|
144
147
|
JSON.stringify({
|
|
145
148
|
menu: r,
|
|
146
|
-
attributeSettings:
|
|
149
|
+
attributeSettings: f.itemAttributeSettings.value,
|
|
147
150
|
localizationKeys: o.state.featureFlags.supportedLocales
|
|
148
151
|
})
|
|
149
152
|
);
|
|
150
|
-
await
|
|
153
|
+
await c(s, a);
|
|
151
154
|
} else {
|
|
152
|
-
const r =
|
|
155
|
+
const r = he(S.value), t = `menu_${E().format("DD-MM-YYYY_HH-mm")}`;
|
|
153
156
|
await me(r, `${t}.xlsx`, {
|
|
154
157
|
bookType: "xlsx",
|
|
155
158
|
bookSST: !0,
|
|
@@ -162,51 +165,51 @@ const Me = { class: "space-y-24 mb-24" }, we = ["innerHTML"], Ce = { class: "fle
|
|
|
162
165
|
);
|
|
163
166
|
}
|
|
164
167
|
const {
|
|
165
|
-
menuItems:
|
|
166
|
-
categories:
|
|
168
|
+
menuItems: M,
|
|
169
|
+
categories: b,
|
|
167
170
|
linkItemRules: B,
|
|
168
171
|
handleSubmit: Y,
|
|
169
172
|
catalogManager: N,
|
|
170
173
|
schedulerManager: z
|
|
171
|
-
} =
|
|
174
|
+
} = Se(!1), oe = _e(), ae = _(() => oe.breakpoints.value.xs), se = _(() => {
|
|
172
175
|
var a;
|
|
173
|
-
const r = ((a =
|
|
174
|
-
action:
|
|
175
|
-
subject:
|
|
176
|
+
const r = ((a = f.sessionUser.value) == null ? void 0 : a.permissions) ?? [], t = {
|
|
177
|
+
action: $.Action.manage,
|
|
178
|
+
subject: $.Subject.Business.menu_menuManagement
|
|
176
179
|
};
|
|
177
180
|
return q([t], r).granted;
|
|
178
|
-
}), P =
|
|
181
|
+
}), P = _(() => {
|
|
179
182
|
var a;
|
|
180
|
-
const r = ((a =
|
|
181
|
-
action:
|
|
182
|
-
subject:
|
|
183
|
+
const r = ((a = f.sessionUser.value) == null ? void 0 : a.permissions) ?? [], t = {
|
|
184
|
+
action: $.Action.manage,
|
|
185
|
+
subject: $.Subject.Business.menu_importExport
|
|
183
186
|
};
|
|
184
187
|
return q([t], r).granted;
|
|
185
188
|
});
|
|
186
189
|
return be().resetOnMount(), (r, t) => {
|
|
187
190
|
const a = w("fm-button");
|
|
188
|
-
return l(),
|
|
191
|
+
return l(), m(ge, {
|
|
189
192
|
heading: e(n)("menu.products.title")
|
|
190
193
|
}, {
|
|
191
|
-
default:
|
|
194
|
+
default: p(() => [
|
|
192
195
|
u($e),
|
|
193
196
|
u(ke)
|
|
194
197
|
]),
|
|
195
|
-
"append-heading":
|
|
196
|
-
d("div",
|
|
197
|
-
d("div",
|
|
198
|
-
d("div",
|
|
199
|
-
d("p",
|
|
198
|
+
"append-heading": p(() => [
|
|
199
|
+
d("div", Ae, [
|
|
200
|
+
d("div", Ee, [
|
|
201
|
+
d("div", Te, [
|
|
202
|
+
d("p", De, Z(v.value), 1)
|
|
200
203
|
])
|
|
201
204
|
]),
|
|
202
|
-
d("div",
|
|
203
|
-
ae.value ? (l(),
|
|
204
|
-
default:
|
|
205
|
-
u(
|
|
206
|
-
default:
|
|
205
|
+
d("div", Ie, [
|
|
206
|
+
ae.value ? (l(), m(O, { key: 1 }, {
|
|
207
|
+
default: p(({ trigger: s }) => [
|
|
208
|
+
u(fe, null, {
|
|
209
|
+
default: p(() => [
|
|
207
210
|
u(G, {
|
|
208
211
|
label: e(n)("menu.products.actions.export"),
|
|
209
|
-
onClick:
|
|
212
|
+
onClick: A
|
|
210
213
|
}, null, 8, ["label"]),
|
|
211
214
|
u(G, {
|
|
212
215
|
label: e(n)("menu.products.actions.import"),
|
|
@@ -217,85 +220,85 @@ const Me = { class: "space-y-24 mb-24" }, we = ["innerHTML"], Ce = { class: "fle
|
|
|
217
220
|
}, 1024)
|
|
218
221
|
]),
|
|
219
222
|
_: 1
|
|
220
|
-
})) : (l(),
|
|
221
|
-
se.value ? (l(),
|
|
222
|
-
default:
|
|
223
|
+
})) : (l(), U(L, { key: 0 }, [
|
|
224
|
+
se.value ? (l(), m(xe, { key: 0 }, {
|
|
225
|
+
default: p(({ trigger: s }) => [
|
|
223
226
|
u(a, {
|
|
224
227
|
label: e(n)("menu.tree_editor.title"),
|
|
225
|
-
"bg-color": e(
|
|
226
|
-
"text-color": e(
|
|
227
|
-
variant: e(
|
|
228
|
+
"bg-color": e(h).NeutralGray100,
|
|
229
|
+
"text-color": e(h).TypoSecondary,
|
|
230
|
+
variant: e(T).Primary,
|
|
228
231
|
onClick: s
|
|
229
232
|
}, null, 8, ["label", "bg-color", "text-color", "variant", "onClick"])
|
|
230
233
|
]),
|
|
231
234
|
_: 1
|
|
232
|
-
})) :
|
|
233
|
-
P.value ? (l(),
|
|
235
|
+
})) : C("", !0),
|
|
236
|
+
P.value ? (l(), m(a, {
|
|
234
237
|
key: 1,
|
|
235
|
-
"bg-color": e(
|
|
236
|
-
"text-color": e(
|
|
237
|
-
variant: e(
|
|
238
|
+
"bg-color": e(h).NeutralGray100,
|
|
239
|
+
"text-color": e(h).TypoSecondary,
|
|
240
|
+
variant: e(T).Primary,
|
|
238
241
|
label: e(n)("menu.products.actions.export"),
|
|
239
|
-
onClick:
|
|
240
|
-
}, null, 8, ["bg-color", "text-color", "variant", "label"])) :
|
|
241
|
-
P.value ? (l(),
|
|
242
|
-
default:
|
|
242
|
+
onClick: A
|
|
243
|
+
}, null, 8, ["bg-color", "text-color", "variant", "label"])) : C("", !0),
|
|
244
|
+
P.value ? (l(), m(O, { key: 2 }, {
|
|
245
|
+
default: p(({ trigger: s }) => [
|
|
243
246
|
u(a, {
|
|
244
|
-
"bg-color": e(
|
|
245
|
-
"text-color": e(
|
|
246
|
-
variant: e(
|
|
247
|
+
"bg-color": e(h).NeutralGray100,
|
|
248
|
+
"text-color": e(h).TypoSecondary,
|
|
249
|
+
variant: e(T).Primary,
|
|
247
250
|
label: e(n)("menu.products.actions.import"),
|
|
248
251
|
onClick: s
|
|
249
252
|
}, null, 8, ["bg-color", "text-color", "variant", "label", "onClick"])
|
|
250
253
|
]),
|
|
251
254
|
_: 1
|
|
252
|
-
})) :
|
|
255
|
+
})) : C("", !0)
|
|
253
256
|
], 64)),
|
|
254
|
-
|
|
255
|
-
|
|
257
|
+
v.value > 0 ? (l(), U(L, { key: 2 }, [
|
|
258
|
+
k.value.create ? (l(), m(D, {
|
|
256
259
|
key: 0,
|
|
257
260
|
label: e(n)("menu.products.actions.add"),
|
|
258
261
|
"prepend-icon": "add",
|
|
259
|
-
onClick: t[0] || (t[0] = (s) => e(
|
|
260
|
-
}, null, 8, ["label"])) : i.value ? (l(),
|
|
262
|
+
onClick: t[0] || (t[0] = (s) => e(g).create(null))
|
|
263
|
+
}, null, 8, ["label"])) : i.value ? (l(), m(J, {
|
|
261
264
|
key: 1,
|
|
262
265
|
"categorized-items": e(N).linkableItems.value,
|
|
263
266
|
"initial-value": e(N).currentItems.value,
|
|
264
267
|
"show-variant": !1,
|
|
265
|
-
"menu-items": e(
|
|
266
|
-
categories: e(
|
|
268
|
+
"menu-items": e(M),
|
|
269
|
+
categories: e(b),
|
|
267
270
|
"link-item-rules": e(B),
|
|
268
271
|
"no-scheduler": i.value,
|
|
269
272
|
onSubmit: e(Y)
|
|
270
273
|
}, {
|
|
271
|
-
default:
|
|
272
|
-
u(
|
|
274
|
+
default: p(({ trigger: s }) => [
|
|
275
|
+
u(D, {
|
|
273
276
|
label: e(n)("menu.products.actions.link"),
|
|
274
277
|
"prepend-icon": "link",
|
|
275
278
|
onClick: s
|
|
276
279
|
}, null, 8, ["label", "onClick"])
|
|
277
280
|
]),
|
|
278
281
|
_: 1
|
|
279
|
-
}, 8, ["categorized-items", "initial-value", "menu-items", "categories", "link-item-rules", "no-scheduler", "onSubmit"])) : (l(),
|
|
282
|
+
}, 8, ["categorized-items", "initial-value", "menu-items", "categories", "link-item-rules", "no-scheduler", "onSubmit"])) : (l(), m(J, {
|
|
280
283
|
key: 2,
|
|
281
284
|
"categorized-items": e(z).linkableItems.value,
|
|
282
285
|
"initial-value": e(z).currentItems.value,
|
|
283
286
|
"show-variant": !1,
|
|
284
|
-
"menu-items": e(
|
|
285
|
-
categories: e(
|
|
287
|
+
"menu-items": e(M),
|
|
288
|
+
categories: e(b),
|
|
286
289
|
"link-item-rules": e(B),
|
|
287
290
|
"no-scheduler": i.value,
|
|
288
291
|
onSubmit: e(Y)
|
|
289
292
|
}, {
|
|
290
|
-
default:
|
|
291
|
-
u(
|
|
293
|
+
default: p(({ trigger: s }) => [
|
|
294
|
+
u(D, {
|
|
292
295
|
label: e(n)("menu.products.actions.apply_scheduler"),
|
|
293
296
|
onClick: s
|
|
294
297
|
}, null, 8, ["label", "onClick"])
|
|
295
298
|
]),
|
|
296
299
|
_: 1
|
|
297
300
|
}, 8, ["categorized-items", "initial-value", "menu-items", "categories", "link-item-rules", "no-scheduler", "onSubmit"]))
|
|
298
|
-
], 64)) :
|
|
301
|
+
], 64)) : C("", !0)
|
|
299
302
|
])
|
|
300
303
|
])
|
|
301
304
|
]),
|