@feedmepos/mf-menu 0.31.32-prod → 0.31.33-beta.10
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-NHdXEdrJ.js → App-DLoBsgTh.js} +79 -33
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-DoTx23iL.js → ApplyProduct.vue_vue_type_script_setup_true_lang-AdxIn_cb.js} +20 -20
- package/dist/{Catalog-B0fV6Yje.js → Catalog-CEvqDKD0.js} +80 -80
- package/dist/{Category-CJZs9I7F.js → Category-CPrXxkVI.js} +41 -41
- package/dist/{Category-CUKZ10xq.js → Category-CnsBFgvu.js} +37 -33
- package/dist/{CookingGuide-kVclP--T.js → CookingGuide-Day6eG7h.js} +66 -66
- package/dist/CustomAttributeChip.vue_vue_type_script_setup_true_lang-CzrjTv0X.js +113 -0
- package/dist/{Group-Bgkye2LL.js → Group-HAAm8its.js} +1 -1
- package/dist/{Group-CAS6o4Fo.js → Group-_G2GnGz-.js} +3 -3
- package/dist/Group.vue_vue_type_script_setup_true_lang-CTDR_kMg.js +686 -0
- package/dist/GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-KuT-w6bF.js +367 -0
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-RsDAGQ3o.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-DwXWiz77.js} +4982 -5081
- package/dist/{Ingredient-DpAPMsPZ.js → Ingredient-BerGQ0W3.js} +23 -23
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-MoApzjt6.js → InventoryBinding.vue_vue_type_script_setup_true_lang-Bf9GYRjF.js} +2 -2
- package/dist/LinkProductSideSheet-32r2l60j.js +297 -0
- package/dist/LinkProductSideSheet.vue_vue_type_style_index_0_scoped_97fa9d58_lang-DvG3mOom.js +8024 -0
- package/dist/{MenuSetting-CoqMT8Vh.js → MenuSetting-DmyEGemp.js} +20 -20
- package/dist/{PrintRoute-DyJil1Hl.js → PrintRoute-8gipiFdT.js} +99 -98
- package/dist/{Product-BPIUTn0_.js → Product-Cqvq9DAA.js} +1 -1
- package/dist/Product.vue_vue_type_script_setup_true_lang-DcMr8wkh.js +1578 -0
- package/dist/{ProductInternalTools-DXgWE6JU.js → ProductInternalTools--w7YOgx2.js} +17 -17
- package/dist/Products-BIRGYu47.js +283 -0
- package/dist/{Publish-DDzpmm72.js → Publish-BcbzhAa5.js} +3 -3
- package/dist/{Recipe-DHYzO0IS.js → Recipe-z1zhmblA.js} +13 -13
- package/dist/{Scheduler-DBad2mO3.js → Scheduler-Cv9Y5M6i.js} +7 -7
- package/dist/{ServingSequence-DC7raAtF.js → ServingSequence-DWFJD-1y.js} +24 -24
- package/dist/Setting-BgCssMcE.js +259 -0
- package/dist/{Subcategory-DHjc7WeF.js → Subcategory-D4BYtWMN.js} +10 -10
- package/dist/{Takeaway-CJRTaygj.js → Takeaway-126rJXs4.js} +9 -9
- package/dist/{Takeaway-CAIAHpA-.js → Takeaway-D-UZAzfn.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-BNu9JjwH.js → Takeaway.vue_vue_type_script_setup_true_lang-CVsyWrTL.js} +12 -12
- package/dist/Thumbnail.vue_vue_type_script_setup_true_lang-szHjE_UD.js +431 -0
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CLNlU4BJ.js +5990 -0
- package/dist/{Unit-DSMSKE6_.js → Unit-7APP9HLD.js} +13 -13
- package/dist/{Variant-DMXxUWnj.js → Variant-lJW6pFqT.js} +14 -14
- package/dist/_id_-R-pHc7HA.js +202 -0
- package/dist/{app-D23N7tJ0.js → app-CAhJXoa3.js} +390 -377
- package/dist/{app-BTgdGTYz.js → app-DoJgznLl.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/app.d.ts +60 -1
- package/dist/apps/mf-menu/src/components/feature/PriceTier/LinkPriceTierSection.vue.d.ts +24 -0
- package/dist/apps/mf-menu/src/components/feature/PriceTier/PriceTierRuleEditor.vue.d.ts +30 -0
- package/dist/apps/mf-menu/src/components/feature/RestaurantAttributesSelector.vue.d.ts +33 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/catalog.d.ts +2 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/store/menuV2.d.ts +80 -1
- package/dist/apps/mf-menu/src/composable/linkProducts.d.ts +1276 -0
- package/dist/apps/mf-menu/src/helper/import-export.d.ts +77 -0
- package/dist/apps/mf-menu/src/helper/menu.d.ts +77 -0
- package/dist/apps/mf-menu/src/helper/setting/catalogSetting.d.ts +11 -2
- package/dist/apps/mf-menu/src/manager/menu/item.d.ts +77 -0
- package/dist/apps/mf-menu/src/router/shared.d.ts +2 -1
- package/dist/apps/mf-menu/src/stores/manager/catalog.d.ts +2 -0
- package/dist/apps/mf-menu/src/stores/menu.d.ts +79 -0
- package/dist/apps/mf-menu/src/types/linkProducts.d.ts +21 -0
- package/dist/apps/mf-menu/src/views/PrintRoute/PrintDepartmentDialog.vue.d.ts +5 -3
- package/dist/apps/mf-menu/src/views/Publish/UpdateCatalogDialog.vue.d.ts +82 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/linked-status-BbJj0WW0.js +24 -0
- package/dist/assets/override-menu-CRaqJDr8.js +24 -0
- package/dist/assets/validate-menu-BQ2BFUmD.js +24 -0
- package/dist/{catalog-DcciqmWK.js → catalog-C1fna-Yk.js} +1 -1
- package/dist/catalogSetting-BKP36lej.js +71 -0
- package/dist/{category-bhqVqDzJ.js → category-DK_MXlvY.js} +5 -5
- package/dist/{currency-Clgvy00I.js → currency-D2fl1Bk0.js} +1 -1
- package/dist/{dayjs.min-DeSv8lfJ.js → dayjs.min-Bk9ZYtg9.js} +1 -1
- package/dist/{index-BHbYu_OM.js → index-BJ3_8aUL.js} +14 -14
- package/dist/{index-CTUaJyIh.js → index-CSuF-4Sa.js} +14 -14
- package/dist/{index-DZZJjEOs.js → index-Cc2J6T0N.js} +28 -28
- package/dist/index-D7yR1j9C.js +215 -0
- package/dist/{item-DH1xf2Sa.js → item-DX44khy2.js} +201 -199
- package/dist/{jszip.min-CMM2HN8J.js → jszip.min-Dbu7MIcI.js} +427 -427
- package/dist/{menu-Dx39P1vR.js → menu-DT5c-FqY.js} +4 -4
- package/dist/menu-D_Cckz_p.js +133287 -0
- package/dist/menuV2-DTBH_-tm.js +707 -0
- package/dist/mf-menu.css +1 -1
- package/dist/{priceTier-3M5cxSYX.js → priceTier-wLQ8p4bJ.js} +1 -1
- package/dist/{scheduler-BT3EJBK6.js → scheduler-D6UbXLXR.js} +36 -37
- package/dist/subcategory-DjN3X1BI.js +148 -0
- package/dist/{toExcel-BLoj4Wqb.js → toExcel-CWyoDcRd.js} +15 -15
- package/dist/{unit-BsNOQHvZ.js → unit-CLa8caCJ.js} +11 -10
- package/package.json +5 -5
- package/dist/CustomAttributeChip.vue_vue_type_script_setup_true_lang-RI_d10bz.js +0 -7949
- package/dist/FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js +0 -26
- package/dist/Group.vue_vue_type_script_setup_true_lang-Bij0tGMP.js +0 -698
- package/dist/GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CUa_0qzX.js +0 -206
- package/dist/LinkProductSideSheet-CEClo07H.js +0 -112
- package/dist/Product.vue_vue_type_script_setup_true_lang-fjFGg49e.js +0 -1560
- package/dist/Products-dWmgQ_di.js +0 -270
- package/dist/Setting-CPjvUYU9.js +0 -258
- package/dist/Thumbnail.vue_vue_type_script_setup_true_lang-DzQ8_6Bi.js +0 -71
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-ZRv8Dg6x.js +0 -6149
- package/dist/_id_-CTq4qK7z.js +0 -200
- package/dist/apps/mf-menu/src/components/feature/LinkProduct/LinkProductSideSheet.vue.d.ts +0 -70
- package/dist/assets/linked-status-Cfc9wZst.js +0 -24
- package/dist/assets/override-menu-BNZggtO_.js +0 -24
- package/dist/assets/validate-menu-CPwUvy9F.js +0 -24
- package/dist/catalogSetting-D4iwoJLb.js +0 -65
- package/dist/index-Ce4v8o7D.js +0 -106
- package/dist/menu-DcGo3sn5.js +0 -108039
- package/dist/subcategory-B5atmACN.js +0 -817
- /package/dist/{apps/mf-menu/src/components → packages/shared/src/components/info}/CustomAttributeChip.vue.d.ts +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { defineComponent as L, computed as d, ref as g, h as k, withModifiers as x, resolveComponent as p, createBlock as b, openBlock as a, unref as e, withCtx as h, createElementVNode as o, createVNode as r, toDisplayString as f, createCommentVNode as N, createElementBlock as u, Fragment as v, normalizeClass as C, renderList as T } from "vue";
|
|
2
|
-
import { useI18n as
|
|
3
|
-
import { useSnackbar as
|
|
4
|
-
import { _ as
|
|
5
|
-
import {
|
|
2
|
+
import { useI18n as E } from "@feedmepos/mf-common";
|
|
3
|
+
import { useSnackbar as K, components as R, useBreakpoints as D, FmButtonVariant as G } from "@feedmepos/ui-library";
|
|
4
|
+
import { _ as I } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
5
|
+
import { G as q, u as A } from "./menu-D_Cckz_p.js";
|
|
6
6
|
import { _ as H } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
7
7
|
import { _ as J } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
|
|
8
|
-
import { u as O, U as P } from "./unit-
|
|
8
|
+
import { u as O, U as P } from "./unit-CLa8caCJ.js";
|
|
9
9
|
const Q = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "h-[600px]"
|
|
@@ -32,11 +32,11 @@ const Q = {
|
|
|
32
32
|
}, be = /* @__PURE__ */ L({
|
|
33
33
|
__name: "Unit",
|
|
34
34
|
setup(re) {
|
|
35
|
-
const w =
|
|
36
|
-
|
|
37
|
-
const S =
|
|
35
|
+
const w = K();
|
|
36
|
+
q(w);
|
|
37
|
+
const S = A(), i = O(), {
|
|
38
38
|
t: n
|
|
39
|
-
} =
|
|
39
|
+
} = E(), m = d(() => S.units), _ = d(() => m.value.filter((s) => `${s.name} ${s.abbrev}`.toLowerCase().includes(c.value.toLowerCase()))), c = g(""), U = g([{
|
|
40
40
|
accessorKey: "name",
|
|
41
41
|
header: () => n("menu.unit.columns.name"),
|
|
42
42
|
enableSorting: !1
|
|
@@ -56,7 +56,7 @@ const Q = {
|
|
|
56
56
|
const l = s.row.original;
|
|
57
57
|
return k("div", {
|
|
58
58
|
class: "flex justify-end"
|
|
59
|
-
}, [k(
|
|
59
|
+
}, [k(R.FmButton, {
|
|
60
60
|
icon: "delete",
|
|
61
61
|
textColor: "neutral-gray-400",
|
|
62
62
|
variant: "tertiary",
|
|
@@ -69,7 +69,7 @@ const Q = {
|
|
|
69
69
|
function V(s) {
|
|
70
70
|
i.updateUnit(s);
|
|
71
71
|
}
|
|
72
|
-
const F = d(() => m.value.length), B =
|
|
72
|
+
const F = d(() => m.value.length), B = D(), M = d(() => B.breakpoints.value.xs);
|
|
73
73
|
return (s, l) => {
|
|
74
74
|
const y = p("FmSearch"), $ = p("FmTable"), j = p("fm-button"), z = p("FmSpacer");
|
|
75
75
|
return a(), b(H, {
|
|
@@ -102,7 +102,7 @@ const Q = {
|
|
|
102
102
|
class: C(["py-12 px-16", "flex space-x-8", "items-center"]),
|
|
103
103
|
onClick: () => e(i).updateUnit(t)
|
|
104
104
|
}, [o("div", ee, [o("p", te, f(t.name), 1), o("p", ne, f(e(n)("menu.common.labels.symbol")) + ": " + f(t.abbrev), 1)]), r(j, {
|
|
105
|
-
variant: e(
|
|
105
|
+
variant: e(G).Tertiary,
|
|
106
106
|
"prepend-icon": "delete",
|
|
107
107
|
"text-color": "neutral-gray-400",
|
|
108
108
|
onClick: x(() => e(i).deleteUnit(t), ["stop"])
|
|
@@ -126,7 +126,7 @@ const Q = {
|
|
|
126
126
|
"append-heading": h(() => [o("div", oe, [o("div", le, [o("div", ae, [o("p", se, f(F.value), 1)])]), r(z), r(e(P), null, {
|
|
127
127
|
default: h(({
|
|
128
128
|
trigger: t
|
|
129
|
-
}) => [m.value.length > 0 ? (a(), b(
|
|
129
|
+
}) => [m.value.length > 0 ? (a(), b(I, {
|
|
130
130
|
key: 0,
|
|
131
131
|
label: e(n)("menu.unit.add"),
|
|
132
132
|
"prepend-icon": "add",
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { getCurrentInstance as
|
|
2
|
-
import { useI18n as
|
|
3
|
-
import { useDialog as Y, useSnackbar as
|
|
1
|
+
import { getCurrentInstance as T, defineComponent as U, computed as g, onMounted as $, h as z, resolveComponent as k, createBlock as F, openBlock as m, unref as e, withCtx as p, createElementBlock as f, Fragment as V, createElementVNode as r, createVNode as i, isRef as I, normalizeClass as L, renderList as R, toDisplayString as C, withModifiers as w, createCommentVNode as G } from "vue";
|
|
2
|
+
import { useI18n as N } from "@feedmepos/mf-common";
|
|
3
|
+
import { useDialog as Y, useSnackbar as D, FmButtonVariant as M, components as J, useBreakpoints as q } from "@feedmepos/ui-library";
|
|
4
4
|
import { _ as H } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
5
|
-
import { _ as Q } from "./app-
|
|
6
|
-
import {
|
|
5
|
+
import { _ as Q } from "./app-CAhJXoa3.js";
|
|
6
|
+
import { G as K, u as P, O as j, J as W, A as X } from "./menu-D_Cckz_p.js";
|
|
7
7
|
import { _ as Z } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
|
|
8
|
-
import { V as S } from "./index-
|
|
8
|
+
import { V as S } from "./index-BJ3_8aUL.js";
|
|
9
9
|
import { _ as ee } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
10
10
|
import { u as te } from "./search-BAPEUu1R.js";
|
|
11
11
|
import { defineStore as ae } from "pinia";
|
|
12
12
|
import { c as ne } from "./createComponentProgrammatically-Bt2rn1IQ.js";
|
|
13
13
|
const oe = ae("variant-manager", () => {
|
|
14
|
-
const B = Y(), a =
|
|
14
|
+
const B = Y(), a = D(), _ = K(a), h = j(_);
|
|
15
15
|
P();
|
|
16
|
-
const d =
|
|
16
|
+
const d = T(), { t: c } = N(), x = (s) => {
|
|
17
17
|
var y, o;
|
|
18
18
|
const { vNode: b } = ne(
|
|
19
19
|
S,
|
|
@@ -78,12 +78,12 @@ const oe = ae("variant-manager", () => {
|
|
|
78
78
|
}, _e = {
|
|
79
79
|
key: 1,
|
|
80
80
|
class: "xs:pt-16"
|
|
81
|
-
}, Be = /* @__PURE__ */
|
|
81
|
+
}, Be = /* @__PURE__ */ U({
|
|
82
82
|
__name: "Variant",
|
|
83
83
|
setup(B) {
|
|
84
84
|
const {
|
|
85
85
|
t: a
|
|
86
|
-
} =
|
|
86
|
+
} = N(), _ = P(), h = j(K(D())), d = oe(), c = g(() => _.variants.map((o) => ({
|
|
87
87
|
...o,
|
|
88
88
|
usedBy: _.items.filter((n) => {
|
|
89
89
|
var u;
|
|
@@ -97,7 +97,7 @@ const oe = ae("variant-manager", () => {
|
|
|
97
97
|
filter: x,
|
|
98
98
|
searchKey: l
|
|
99
99
|
} = te(), v = g(() => c.value.filter((o) => x([o.name])));
|
|
100
|
-
|
|
100
|
+
$(() => _.selectCatalog(null));
|
|
101
101
|
const s = g(() => [{
|
|
102
102
|
accessorKey: "name",
|
|
103
103
|
header: () => a("menu.variant.columns.name"),
|
|
@@ -139,7 +139,7 @@ const oe = ae("variant-manager", () => {
|
|
|
139
139
|
})])
|
|
140
140
|
}]), b = q(), y = g(() => b.breakpoints.value.xs);
|
|
141
141
|
return (o, n) => {
|
|
142
|
-
const u = k("fm-search"),
|
|
142
|
+
const u = k("fm-search"), A = k("fm-table"), E = k("fm-button");
|
|
143
143
|
return m(), F(ee, {
|
|
144
144
|
heading: e(a)("menu.variant.title")
|
|
145
145
|
}, {
|
|
@@ -174,7 +174,7 @@ const oe = ae("variant-manager", () => {
|
|
|
174
174
|
}, [r("div", ue, [r("p", de, C(t.name), 1), r("div", null, [r("p", pe, C(e(a)("menu.common.labels.items_linked", {
|
|
175
175
|
count: t.usedBy.length
|
|
176
176
|
})), 1), r("p", fe, C(e(a)("menu.variant.mobile.value", {
|
|
177
|
-
values: t.options.map((
|
|
177
|
+
values: t.options.map((O) => O.name).join(", ")
|
|
178
178
|
})), 1)])]), i(E, {
|
|
179
179
|
variant: e(M).Tertiary,
|
|
180
180
|
"prepend-icon": "delete",
|
|
@@ -188,7 +188,7 @@ const oe = ae("variant-manager", () => {
|
|
|
188
188
|
type: "variants"
|
|
189
189
|
})
|
|
190
190
|
}, null, 8, ["modelValue", "placeholder"])])]), i(Q, null, {
|
|
191
|
-
default: p(() => [i(
|
|
191
|
+
default: p(() => [i(A, {
|
|
192
192
|
"column-defs": s.value,
|
|
193
193
|
loading: e(h).checkMenuIsLoading(),
|
|
194
194
|
"page-size": v.value.length,
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { defineComponent as B, computed as g, ref as d, watch as I, onMounted as H, resolveComponent as i, createElementBlock as F, openBlock as b, Fragment as K, createVNode as n, withCtx as u, createElementVNode as m, toDisplayString as A, unref as e, createBlock as M } from "vue";
|
|
2
|
+
import { D as W } from "./dayjs.min-Bk9ZYtg9.js";
|
|
3
|
+
import { useRoute as j, useRouter as J } from "vue-router";
|
|
4
|
+
import { _ as Q, w as X } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-DwXWiz77.js";
|
|
5
|
+
import { G as Z, u as ee, D as te, H as ae, O as oe } from "./menu-D_Cckz_p.js";
|
|
6
|
+
import { useI18n as ne } from "@feedmepos/mf-common";
|
|
7
|
+
import { useSnackbar as le } from "@feedmepos/ui-library";
|
|
8
|
+
import { _ as D } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
9
|
+
import { L as R } from "./LinkProductSideSheet-32r2l60j.js";
|
|
10
|
+
import { _ as se } from "./index-Cc2J6T0N.js";
|
|
11
|
+
import { _ as ue } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
12
|
+
import { u as re } from "./Thumbnail.vue_vue_type_script_setup_true_lang-szHjE_UD.js";
|
|
13
|
+
import { a as me } from "./menu-DT5c-FqY.js";
|
|
14
|
+
import { m as ie } from "./toExcel-CWyoDcRd.js";
|
|
15
|
+
import { _ as ce, u as de, c as pe } from "./scheduler-D6UbXLXR.js";
|
|
16
|
+
import { R as r } from "./app-CAhJXoa3.js";
|
|
17
|
+
const _e = { class: "px-12 py-8" }, fe = { class: "px-12 py-8" }, ve = { class: "flex ml-auto space-x-8" }, ge = { class: "flex-1 flex flex-col overflow-hidden" }, Oe = /* @__PURE__ */ B({
|
|
18
|
+
__name: "[id]",
|
|
19
|
+
setup(be) {
|
|
20
|
+
const V = j(), p = J(), k = Z(le()), E = oe(k), a = ee(), { t: l } = ne(), L = g(() => a.categorizedRawMenuItems), _ = g(() => !a.state.currentSchedulerId), O = d();
|
|
21
|
+
async function G(o) {
|
|
22
|
+
const t = o._id ? de(o) : pe(o);
|
|
23
|
+
await E.updateMenu(t, o.name);
|
|
24
|
+
}
|
|
25
|
+
const h = [
|
|
26
|
+
{
|
|
27
|
+
label: l("menu.catalog.edit.tabs.product"),
|
|
28
|
+
value: r.EDIT_CATALOG_PRODUCT
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
label: l("menu.catalog.edit.tabs.category"),
|
|
32
|
+
value: r.EDIT_CATALOG_CATEGORY
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
label: l("menu.catalog.edit.tabs.group"),
|
|
36
|
+
value: r.EDIT_CATALOG_GROUP
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
label: l("menu.catalog.edit.tabs.takeaway"),
|
|
40
|
+
value: r.EDIT_CATALOG_TAKEAWAY
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
label: l("menu.catalog.edit.tabs.setting"),
|
|
44
|
+
value: r.EDIT_CATALOG_SETTING
|
|
45
|
+
}
|
|
46
|
+
], c = d(h[0].value);
|
|
47
|
+
I(c, (o) => {
|
|
48
|
+
p.replace({
|
|
49
|
+
name: o
|
|
50
|
+
});
|
|
51
|
+
}), H(() => {
|
|
52
|
+
p.currentRoute.value.name !== r.EDIT_CATALOG && (c.value = p.currentRoute.value.name);
|
|
53
|
+
}), I(
|
|
54
|
+
() => a.state.menu._id,
|
|
55
|
+
(o) => {
|
|
56
|
+
const t = V.params.id;
|
|
57
|
+
o && t !== "main" && a.selectCatalog(t);
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
const z = g(() => ({
|
|
61
|
+
...te.menuV4ToV3(ae(a.state.menu)),
|
|
62
|
+
_id: a.state.menu._id,
|
|
63
|
+
_rev: a.state.menu._rev
|
|
64
|
+
}));
|
|
65
|
+
async function $() {
|
|
66
|
+
await k.minor(
|
|
67
|
+
async () => {
|
|
68
|
+
await a.readMenu();
|
|
69
|
+
const o = await ie(z.value), t = `menu_${W().format("DD-MM-YYYY_HH-mm")}`;
|
|
70
|
+
await X(o, `${t}.xlsx`, {
|
|
71
|
+
bookType: "xlsx",
|
|
72
|
+
bookSST: !1,
|
|
73
|
+
type: "array"
|
|
74
|
+
});
|
|
75
|
+
},
|
|
76
|
+
{ successMessage: "Menu exported", customId: a.state.menu._id }
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
const f = d(!1), v = d(!1), {
|
|
80
|
+
menuItems: x,
|
|
81
|
+
linkItemRules: S,
|
|
82
|
+
handleSubmit: T,
|
|
83
|
+
catalogManager: y,
|
|
84
|
+
schedulerManager: C
|
|
85
|
+
} = re(!1);
|
|
86
|
+
return me().resetOnUnmount(), (o, t) => {
|
|
87
|
+
var w;
|
|
88
|
+
const U = i("fm-bottom-sheet"), Y = i("fm-button"), N = i("router-link"), P = i("fm-tabs"), q = i("router-view");
|
|
89
|
+
return b(), F(K, null, [
|
|
90
|
+
n(ce, {
|
|
91
|
+
ref_key: "schedulerDialogRef",
|
|
92
|
+
ref: O,
|
|
93
|
+
"categorized-items": L.value,
|
|
94
|
+
onOnComplete: G
|
|
95
|
+
}, null, 8, ["categorized-items"]),
|
|
96
|
+
n(Q, {
|
|
97
|
+
modelValue: f.value,
|
|
98
|
+
"onUpdate:modelValue": t[0] || (t[0] = (s) => f.value = s)
|
|
99
|
+
}, null, 8, ["modelValue"]),
|
|
100
|
+
n(U, {
|
|
101
|
+
modelValue: v.value,
|
|
102
|
+
"onUpdate:modelValue": t[2] || (t[2] = (s) => v.value = s),
|
|
103
|
+
"no-header": ""
|
|
104
|
+
}, {
|
|
105
|
+
default: u(() => [
|
|
106
|
+
m("div", _e, [
|
|
107
|
+
m("p", {
|
|
108
|
+
class: "fm-typo-en-body-md-400",
|
|
109
|
+
onClick: $
|
|
110
|
+
}, A(e(l)("menu.catalog.edit.export")), 1)
|
|
111
|
+
]),
|
|
112
|
+
m("div", fe, [
|
|
113
|
+
m("p", {
|
|
114
|
+
class: "fm-typo-en-body-md-400",
|
|
115
|
+
onClick: t[1] || (t[1] = () => {
|
|
116
|
+
f.value = !0, v.value = !1;
|
|
117
|
+
})
|
|
118
|
+
}, A(e(l)("menu.catalog.edit.import")), 1)
|
|
119
|
+
])
|
|
120
|
+
]),
|
|
121
|
+
_: 1
|
|
122
|
+
}, 8, ["modelValue"]),
|
|
123
|
+
n(ue, {
|
|
124
|
+
heading: ((w = e(a).currentCatalog) == null ? void 0 : w.name) ?? "Main",
|
|
125
|
+
class: "flex flex-col max-h-[calc(100vh-56px)] overflow-hidden"
|
|
126
|
+
}, {
|
|
127
|
+
"prepend-heading": u(() => [
|
|
128
|
+
n(N, {
|
|
129
|
+
to: { name: e(r).CATALOG },
|
|
130
|
+
class: "mr-8",
|
|
131
|
+
title: e(l)("menu.catalog.edit.back")
|
|
132
|
+
}, {
|
|
133
|
+
default: u(() => [
|
|
134
|
+
n(Y, {
|
|
135
|
+
"prepend-icon": "arrow_back",
|
|
136
|
+
variant: "tertiary"
|
|
137
|
+
})
|
|
138
|
+
]),
|
|
139
|
+
_: 1
|
|
140
|
+
}, 8, ["to", "title"])
|
|
141
|
+
]),
|
|
142
|
+
"append-heading": u(() => [
|
|
143
|
+
m("div", ve, [
|
|
144
|
+
_.value ? (b(), M(R, {
|
|
145
|
+
key: 0,
|
|
146
|
+
"categorized-items": e(y).linkableItems.value,
|
|
147
|
+
"initial-value": e(y).currentItems.value,
|
|
148
|
+
"show-variant": !1,
|
|
149
|
+
"menu-items": e(x),
|
|
150
|
+
"link-item-rules": e(S),
|
|
151
|
+
"no-scheduler": _.value,
|
|
152
|
+
onSubmit: e(T)
|
|
153
|
+
}, {
|
|
154
|
+
default: u(({ trigger: s }) => [
|
|
155
|
+
n(D, {
|
|
156
|
+
label: e(l)("menu.catalog.edit.link_product"),
|
|
157
|
+
"prepend-icon": "link",
|
|
158
|
+
onClick: s
|
|
159
|
+
}, null, 8, ["label", "onClick"])
|
|
160
|
+
]),
|
|
161
|
+
_: 1
|
|
162
|
+
}, 8, ["categorized-items", "initial-value", "menu-items", "link-item-rules", "no-scheduler", "onSubmit"])) : (b(), M(R, {
|
|
163
|
+
key: 1,
|
|
164
|
+
"categorized-items": e(C).linkableItems.value,
|
|
165
|
+
"initial-value": e(C).currentItems.value,
|
|
166
|
+
"show-variant": !1,
|
|
167
|
+
"menu-items": e(x),
|
|
168
|
+
"link-item-rules": e(S),
|
|
169
|
+
"no-scheduler": _.value,
|
|
170
|
+
onSubmit: e(T)
|
|
171
|
+
}, {
|
|
172
|
+
default: u(({ trigger: s }) => [
|
|
173
|
+
n(D, {
|
|
174
|
+
label: e(l)("menu.catalog.edit.apply_scheduler"),
|
|
175
|
+
onClick: s
|
|
176
|
+
}, null, 8, ["label", "onClick"])
|
|
177
|
+
]),
|
|
178
|
+
_: 1
|
|
179
|
+
}, 8, ["categorized-items", "initial-value", "menu-items", "link-item-rules", "no-scheduler", "onSubmit"]))
|
|
180
|
+
])
|
|
181
|
+
]),
|
|
182
|
+
default: u(() => [
|
|
183
|
+
n(P, {
|
|
184
|
+
modelValue: c.value,
|
|
185
|
+
"onUpdate:modelValue": t[3] || (t[3] = (s) => c.value = s),
|
|
186
|
+
items: h,
|
|
187
|
+
class: "mb-7 xs:mb-0 xs:px-32"
|
|
188
|
+
}, null, 8, ["modelValue"]),
|
|
189
|
+
m("div", ge, [
|
|
190
|
+
n(se, { "menu-store": e(a) }, null, 8, ["menu-store"]),
|
|
191
|
+
n(q)
|
|
192
|
+
])
|
|
193
|
+
]),
|
|
194
|
+
_: 1
|
|
195
|
+
}, 8, ["heading"])
|
|
196
|
+
], 64);
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
export {
|
|
201
|
+
Oe as default
|
|
202
|
+
};
|