@feedmepos/mf-menu 0.32.7-beta.2 → 0.32.7-dev
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-BIQ0CTci.js → App-DCkQc7e4.js} +98 -98
- package/dist/ApplyProduct.vue_vue_type_script_setup_true_lang-uzmq3vwy.js +161 -0
- package/dist/BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-DhrXKy3b.js +74 -0
- package/dist/{Catalog-D2wc24o8.js → Catalog-CUPoRid3.js} +9 -9
- package/dist/{Category-DA5-55d2.js → Category-BkvhZ57Y.js} +7 -7
- package/dist/{Category-BPufryqK.js → Category-Cdw0ikhP.js} +4 -4
- package/dist/{CookingGuide-DKvou40e.js → CookingGuide-BZ-4oULM.js} +6 -6
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-DHoAYdGI.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-CJvVFWdR.js} +3 -3
- package/dist/FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js +26 -0
- package/dist/{Group-D60oAvmM.js → Group-C1FaXdUb.js} +1 -1
- package/dist/{Group-Bgpc6qE1.js → Group-Cec83DWm.js} +4 -4
- package/dist/{Group.vue_vue_type_script_setup_true_lang-BXn3--BL.js → Group.vue_vue_type_script_setup_true_lang-2_lLBdX2.js} +128 -128
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BD9IZkwW.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BEDyKWhK.js} +91 -91
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-BE3LdBYY.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-BteTvMnx.js} +3225 -3225
- package/dist/{Ingredient-Brv4hml-.js → Ingredient-DulL8h2B.js} +29 -29
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-CIOX-pq1.js → InventoryBinding.vue_vue_type_script_setup_true_lang-DoBx7Dal.js} +104 -104
- package/dist/{LinkProductSideSheet-BDMbKJ8o.js → LinkProductSideSheet-Br2eE8pC.js} +251 -251
- package/dist/MenuSelector.vue_vue_type_script_setup_true_lang-K6Z0QJBl.js +69 -0
- package/dist/{MenuSetting-DvCu23my.js → MenuSetting-DxW4LCW4.js} +77 -77
- package/dist/{PageLayout.vue_vue_type_script_setup_true_lang-vFqWGM6P.js → PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js} +8 -8
- package/dist/{PrintRoute-DwgLKDUV.js → PrintRoute-Da6Zkx-0.js} +5 -5
- package/dist/{Product-EmoWM778.js → Product-Cs76t18_.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-5HyO_RYw.js → Product.vue_vue_type_script_setup_true_lang-C6SOu4Vv.js} +606 -606
- package/dist/{ProductInternalTools-PqzouaF2.js → ProductInternalTools-DPbeRvTM.js} +10 -10
- package/dist/{Products-ZgfTT9dI.js → Products--7dGfuuT.js} +52 -52
- package/dist/{Publish-CUdRwmN1.js → Publish-COmZtiyX.js} +5 -5
- package/dist/{Recipe-BRUxyire.js → Recipe-BaN_1zrP.js} +5 -5
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-CPFGkaTr.js → RuleView.vue_vue_type_script_setup_true_lang-DputprQj.js} +451 -448
- package/dist/{Scheduler-BXdZh-xC.js → Scheduler-BSUpIAaK.js} +4 -4
- package/dist/{ServingSequence-EAZHOHiy.js → ServingSequence-dXBb7e5d.js} +4 -4
- package/dist/{Setting-BRut_Xj0.js → Setting-CalEQW0n.js} +6 -6
- package/dist/{Subcategory-D6Yrs-vO.js → Subcategory-zPHtX7Vc.js} +5 -5
- package/dist/{Takeaway-Bi8JfDWa.js → Takeaway-CRDj2Bpe.js} +5 -5
- package/dist/{Takeaway-CRdlNTu7.js → Takeaway-CcnmeTmu.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-DKQZ9J8Z.js → Takeaway.vue_vue_type_script_setup_true_lang-Cj7vyOaP.js} +5 -5
- package/dist/{TextChip.vue_vue_type_script_setup_true_lang-BJMcI3U2.js → TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js} +5 -5
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-DDWk-WUW.js → Thumbnail.vue_vue_type_script_setup_true_lang-B0552qsN.js} +74 -74
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BwnyIDNH.js +6038 -0
- package/dist/{Unit-Ccs_k5IS.js → Unit-C7-Oj5S3.js} +3 -3
- package/dist/{Variant-BHmgMXq7.js → Variant-CYiMkE0q.js} +4 -4
- package/dist/{_id_-DSSoi4Gy.js → _id_-D75ZcNlf.js} +11 -11
- package/dist/{app-CzXxFrl1.js → app-5fxKLAzS.js} +447 -447
- package/dist/{app-C8Dm2-h4.js → app-BhLVpUSl.js} +35 -35
- package/dist/{app-B9seAt5l.js → app-DzVMOviz.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/app.d.ts +20 -0
- package/dist/apps/mf-menu/src/components/feature/CategoryManager/CategoriesSelector.vue.d.ts +1 -1
- package/dist/apps/mf-menu/src/components/feature/MenuSelector.vue.d.ts +1 -1
- package/dist/apps/mf-menu/src/components/feature/SubcategoryManager/SubcategorySelector.vue.d.ts +1 -1
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/store/menuV2.d.ts +2 -1
- package/dist/apps/mf-menu/src/stores/menu.d.ts +1 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/linked-status-BoIPm5hC.js +13 -0
- package/dist/assets/override-menu-DfTrwWpR.js +13 -0
- package/dist/assets/validate-menu-BhWvQ3T9.js +13 -0
- package/dist/{catalog-CD-fdGdY.js → catalog-CudNSsIP.js} +1 -1
- package/dist/{catalogSetting-Ci85lXor.js → catalogSetting-BVHO9tK3.js} +1 -1
- package/dist/{category-6NAH0dUF.js → category-BQpgz1lk.js} +1 -1
- package/dist/{currency-BP_z7R5d.js → currency-BfS7H2KE.js} +1 -1
- package/dist/{index-BLMijxTj.js → index-BHdPJta4.js} +91 -91
- package/dist/{index-C1XCbqC-.js → index-DmGJvREM.js} +56 -56
- package/dist/{index-Cftm4-G_.js → index-DuLXS699.js} +5 -5
- package/dist/{index-DgDQzkPR.js → index-aaoziUNI.js} +30 -30
- package/dist/{index.vue_vue_type_script_setup_true_lang-D-k9WcQV.js → index.vue_vue_type_script_setup_true_lang-Dje9kp-F.js} +40026 -40153
- package/dist/item-BtKW0wdj.js +7685 -0
- package/dist/{iteration-ZG64Re91.js → iteration-CaliNodx.js} +1 -1
- package/dist/{jszip.min-BETdv0rh.js → jszip.min-DXbkmgRD.js} +102 -102
- package/dist/{menu-COMXycAe.js → menu-D-lUEuvX.js} +1 -1
- package/dist/{menuV2-CeRS0Jw3.js → menuV2-D-6O36DO.js} +357 -348
- package/dist/mf-menu.css +1 -1
- package/dist/packages/shared/src/components/form/SelectFilter.vue.d.ts +1 -1
- package/dist/{priceTier-t2T3Q87F.js → priceTier-DKnYaOA9.js} +1 -1
- package/dist/{scheduler-BbJUVuiK.js → scheduler-DEwfbYPL.js} +7 -7
- package/dist/{subcategory-61kOQh4g.js → subcategory-CQKklgcd.js} +2 -2
- package/dist/{toExcel-DIYaK18-.js → toExcel-CRwL-QqF.js} +2 -2
- package/dist/{unit-B6StucsI.js → unit-BzM1rmN7.js} +151 -151
- package/dist/{vuedraggable-DnBIRDMr.js → vuedraggable-CK8z7qA8.js} +2 -2
- package/package.json +3 -2
- package/dist/ApplyProduct.vue_vue_type_script_setup_true_lang-BpEjqhAC.js +0 -161
- package/dist/BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-CnCoRLDg.js +0 -74
- package/dist/FormItem.vue_vue_type_script_setup_true_lang-B3Ixruh-.js +0 -26
- package/dist/MenuSelector.vue_vue_type_script_setup_true_lang-Bm_hSelC.js +0 -69
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-JdHaBpaX.js +0 -5997
- package/dist/assets/linked-status-Cuf8X8_g.js +0 -13
- package/dist/assets/override-menu-yxQLf82k.js +0 -13
- package/dist/assets/validate-menu-BwbenBs6.js +0 -13
- package/dist/item-ByEPWjef.js +0 -6819
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import { defineComponent as X, computed as g, resolveComponent as M, createBlock as
|
|
2
|
-
import { I as H, u as ne, O as Ue, D as Te, z as v, B as $e, a3 as Ye, A as Le, J as ze } from "./index.vue_vue_type_script_setup_true_lang-
|
|
3
|
-
import { d as Be } from "./vuedraggable-
|
|
4
|
-
import { b as ve, H as je } from "./app-
|
|
1
|
+
import { defineComponent as X, computed as g, resolveComponent as M, createBlock as U, openBlock as m, withCtx as x, createElementBlock as w, Fragment as T, renderList as oe, createElementVNode as d, normalizeClass as W, toDisplayString as G, createVNode as s, ref as E, renderSlot as Ne, unref as r, createCommentVNode as I, watch as Re, h as pe, mergeProps as Ee, createSlots as Se, withModifiers as Ie, isRef as Q, nextTick as fe } from "vue";
|
|
2
|
+
import { I as H, u as ne, O as Ue, D as Te, z as v, B as $e, a3 as Ye, A as Le, J as ze } from "./index.vue_vue_type_script_setup_true_lang-Dje9kp-F.js";
|
|
3
|
+
import { d as Be } from "./vuedraggable-CK8z7qA8.js";
|
|
4
|
+
import { b as ve, H as je } from "./app-5fxKLAzS.js";
|
|
5
5
|
import { useI18n as le, useCoreStore as Ke, useCustomAttributes as He } from "@feedmepos/mf-common";
|
|
6
6
|
import { useBreakpoints as ye, components as _e, useSnackbar as qe, useDialog as Je, FmButtonVariant as Qe } from "@feedmepos/ui-library";
|
|
7
|
-
import { _ as We, a as Xe } from "./CustomAttributeChip.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
import { _ as Ze } from "./app-
|
|
9
|
-
import { _ as et, a as tt } from "./BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-
|
|
7
|
+
import { _ as We, a as Xe } from "./CustomAttributeChip.vue_vue_type_script_setup_true_lang-CJvVFWdR.js";
|
|
8
|
+
import { _ as Ze } from "./app-BhLVpUSl.js";
|
|
9
|
+
import { _ as et, a as tt } from "./BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-DhrXKy3b.js";
|
|
10
10
|
import { c as ot } from "./object-DVUNCr7w.js";
|
|
11
11
|
import { u as nt } from "./discardConfirm-BHni0LNu.js";
|
|
12
|
-
import { _ as lt } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-
|
|
12
|
+
import { _ as lt } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-uzmq3vwy.js";
|
|
13
13
|
import { c as at } from "./check-C9mY6LiX.js";
|
|
14
|
-
import { M as ge,
|
|
14
|
+
import { M as ge, w as rt, x as ut, A as st, e as it, i as ct, r as mt } from "./item-BtKW0wdj.js";
|
|
15
15
|
import { u as dt } from "./search-BAPEUu1R.js";
|
|
16
|
-
import { C as pt } from "./catalog-
|
|
17
|
-
import { c as ft } from "./menuV2-
|
|
16
|
+
import { C as pt } from "./catalog-CudNSsIP.js";
|
|
17
|
+
import { c as ft } from "./menuV2-D-6O36DO.js";
|
|
18
18
|
const vt = /* @__PURE__ */ X({
|
|
19
19
|
__name: "ResponsiveContextMenu",
|
|
20
20
|
props: {
|
|
21
21
|
items: {}
|
|
22
22
|
},
|
|
23
|
-
setup(
|
|
23
|
+
setup(L) {
|
|
24
24
|
const S = ye(), u = g(() => S.breakpoints.value.xs);
|
|
25
|
-
return (
|
|
26
|
-
const
|
|
27
|
-
return u.value ? (m(),
|
|
28
|
-
default:
|
|
29
|
-
(m(!0),
|
|
25
|
+
return (R, V) => {
|
|
26
|
+
const h = M("FmButton"), f = M("FmMenuItem"), y = M("FmMenu");
|
|
27
|
+
return u.value ? (m(), U(et, { key: 0 }, {
|
|
28
|
+
default: x(() => [
|
|
29
|
+
(m(!0), w(T, null, oe(R.items, ({ icon: k, label: D, disabled: C, itemClass: A, onClick: _ }) => (m(), U(tt, {
|
|
30
30
|
key: D,
|
|
31
|
-
icon:
|
|
31
|
+
icon: k,
|
|
32
32
|
label: D,
|
|
33
|
-
disabled:
|
|
33
|
+
disabled: C,
|
|
34
34
|
itemClass: A,
|
|
35
35
|
onClick: () => {
|
|
36
|
-
!
|
|
36
|
+
!C && (_ == null || _());
|
|
37
37
|
}
|
|
38
38
|
}, null, 8, ["icon", "label", "disabled", "itemClass", "onClick"]))), 128))
|
|
39
39
|
]),
|
|
40
40
|
_: 1
|
|
41
|
-
})) : (m(),
|
|
41
|
+
})) : (m(), U(y, {
|
|
42
42
|
key: 1,
|
|
43
43
|
"stop-click-propagation": "",
|
|
44
44
|
shift: !0
|
|
45
45
|
}, {
|
|
46
|
-
"menu-button":
|
|
47
|
-
s(
|
|
46
|
+
"menu-button": x(() => [
|
|
47
|
+
s(h, {
|
|
48
48
|
type: "button",
|
|
49
49
|
variant: "tertiary",
|
|
50
50
|
icon: "more_vert",
|
|
@@ -52,18 +52,18 @@ const vt = /* @__PURE__ */ X({
|
|
|
52
52
|
size: "md"
|
|
53
53
|
})
|
|
54
54
|
]),
|
|
55
|
-
default:
|
|
56
|
-
(m(!0),
|
|
55
|
+
default: x(() => [
|
|
56
|
+
(m(!0), w(T, null, oe(R.items, ({ icon: k, label: D, disabled: C, itemClass: A, onClick: _ }) => (m(), U(f, {
|
|
57
57
|
key: D,
|
|
58
|
-
disabled:
|
|
58
|
+
disabled: C,
|
|
59
59
|
onClick: () => {
|
|
60
|
-
!
|
|
60
|
+
!C && (_ == null || _());
|
|
61
61
|
},
|
|
62
62
|
label: D
|
|
63
63
|
}, {
|
|
64
|
-
label:
|
|
64
|
+
label: x(() => [
|
|
65
65
|
d("span", {
|
|
66
|
-
class: W(
|
|
66
|
+
class: W(C ? "text-fm-color-typo-disabled" : A)
|
|
67
67
|
}, G(D), 3)
|
|
68
68
|
]),
|
|
69
69
|
_: 2
|
|
@@ -82,40 +82,40 @@ const vt = /* @__PURE__ */ X({
|
|
|
82
82
|
editable: { type: Boolean }
|
|
83
83
|
},
|
|
84
84
|
emits: ["apply:product"],
|
|
85
|
-
setup(
|
|
86
|
-
const u =
|
|
87
|
-
() => !H.isEqual(f.value,
|
|
85
|
+
setup(L, { emit: S }) {
|
|
86
|
+
const u = L, R = S, { t: V } = le(), h = u.initialValue.map((A) => ({ _id: A })), f = E(H.clone(h)), y = nt(
|
|
87
|
+
() => !H.isEqual(f.value, h),
|
|
88
88
|
() => {
|
|
89
|
-
|
|
89
|
+
k.value = !1;
|
|
90
90
|
}
|
|
91
|
-
),
|
|
92
|
-
at.isBoolean(A) ?
|
|
93
|
-
},
|
|
91
|
+
), k = E(!1), D = (A) => {
|
|
92
|
+
at.isBoolean(A) ? k.value = A : k.value = !k.value, k.value && (f.value = u.initialValue.map((_) => ({ _id: _ })));
|
|
93
|
+
}, C = ne();
|
|
94
94
|
return (A, _) => {
|
|
95
95
|
const b = M("fm-button"), q = M("fm-side-sheet");
|
|
96
|
-
return m(),
|
|
96
|
+
return m(), w(T, null, [
|
|
97
97
|
Ne(A.$slots, "default", { trigger: D }),
|
|
98
98
|
s(q, {
|
|
99
99
|
id: "group-form",
|
|
100
|
-
modelValue:
|
|
101
|
-
"onUpdate:modelValue": _[1] || (_[1] = (
|
|
100
|
+
modelValue: k.value,
|
|
101
|
+
"onUpdate:modelValue": _[1] || (_[1] = (N) => k.value = N),
|
|
102
102
|
"is-container": r(_e).FmForm,
|
|
103
103
|
"is-container-props": {
|
|
104
104
|
onValidationSuccess: () => {
|
|
105
|
-
|
|
105
|
+
R("apply:product", f.value), D(!1);
|
|
106
106
|
},
|
|
107
107
|
blameFormChildOnValidationFailed: !0
|
|
108
108
|
},
|
|
109
109
|
"max-width": 560,
|
|
110
110
|
"onOn:clickedAway": r(y)
|
|
111
111
|
}, {
|
|
112
|
-
"side-sheet-header":
|
|
113
|
-
d("p", gt, G(
|
|
112
|
+
"side-sheet-header": x(() => [
|
|
113
|
+
d("p", gt, G(A.title), 1)
|
|
114
114
|
]),
|
|
115
|
-
"side-sheet-footer":
|
|
115
|
+
"side-sheet-footer": x(() => [
|
|
116
116
|
d("div", yt, [
|
|
117
117
|
s(b, {
|
|
118
|
-
label: r(
|
|
118
|
+
label: r(V)("common.save"),
|
|
119
119
|
size: "lg",
|
|
120
120
|
type: "submit",
|
|
121
121
|
variant: "primary"
|
|
@@ -128,15 +128,15 @@ const vt = /* @__PURE__ */ X({
|
|
|
128
128
|
})
|
|
129
129
|
])
|
|
130
130
|
]),
|
|
131
|
-
default:
|
|
131
|
+
default: x(() => [
|
|
132
132
|
s(lt, {
|
|
133
133
|
overrides: f.value,
|
|
134
|
-
"onUpdate:overrides": _[0] || (_[0] = (
|
|
135
|
-
"categorized-items": r(
|
|
136
|
-
editable:
|
|
134
|
+
"onUpdate:overrides": _[0] || (_[0] = (N) => f.value = N),
|
|
135
|
+
"categorized-items": r(C).categorizedItems,
|
|
136
|
+
editable: A.editable,
|
|
137
137
|
"select-variant": !1,
|
|
138
138
|
"show-variant": !1,
|
|
139
|
-
"link-button-label": r(
|
|
139
|
+
"link-button-label": r(V)("menu.group.actions.apply_product"),
|
|
140
140
|
title: "Product"
|
|
141
141
|
}, null, 8, ["overrides", "categorized-items", "editable", "link-button-label"])
|
|
142
142
|
]),
|
|
@@ -153,31 +153,31 @@ const vt = /* @__PURE__ */ X({
|
|
|
153
153
|
props: {
|
|
154
154
|
group: {}
|
|
155
155
|
},
|
|
156
|
-
setup(
|
|
157
|
-
const S =
|
|
158
|
-
const f =
|
|
159
|
-
return (f == null ? void 0 : f.name) ||
|
|
156
|
+
setup(L) {
|
|
157
|
+
const S = L, { t: u } = le(), R = ne(), V = g(() => S.group.itemsLinked.map((h) => {
|
|
158
|
+
const f = R.state.menu.modules.item.find((y) => y._id === h);
|
|
159
|
+
return (f == null ? void 0 : f.name) || h;
|
|
160
160
|
}).filter(Boolean));
|
|
161
|
-
return (
|
|
162
|
-
d("div", null, G(r(u)("menu.group.dialogs.delete.message", { name:
|
|
163
|
-
|
|
164
|
-
d("div", ht, G(r(u)("menu.group.dialogs.delete.unlink_warning", { count:
|
|
161
|
+
return (h, f) => (m(), w("div", null, [
|
|
162
|
+
d("div", null, G(r(u)("menu.group.dialogs.delete.message", { name: h.group.name })), 1),
|
|
163
|
+
V.value.length > 0 ? (m(), w("div", bt, [
|
|
164
|
+
d("div", ht, G(r(u)("menu.group.dialogs.delete.unlink_warning", { count: V.value.length })), 1),
|
|
165
165
|
d("ul", kt, [
|
|
166
|
-
(m(!0),
|
|
166
|
+
(m(!0), w(T, null, oe(V.value, (y) => (m(), w("li", {
|
|
167
167
|
key: y,
|
|
168
168
|
class: "text-sm"
|
|
169
169
|
}, G(y), 1))), 128))
|
|
170
170
|
])
|
|
171
|
-
])) :
|
|
171
|
+
])) : I("", !0)
|
|
172
172
|
]));
|
|
173
173
|
}
|
|
174
|
-
}),
|
|
174
|
+
}), Ct = {
|
|
175
175
|
key: 1,
|
|
176
176
|
class: "xs:pt-24"
|
|
177
|
-
},
|
|
177
|
+
}, Ot = {
|
|
178
178
|
key: 0,
|
|
179
179
|
class: /* @__PURE__ */ W(["flex-1 overflow-hidden", "space-y-8", "flex flex-col", "overflow-hidden", "pt-16"])
|
|
180
|
-
},
|
|
180
|
+
}, xt = {
|
|
181
181
|
class: "flex justify-between items-center space-x-8"
|
|
182
182
|
}, Dt = {
|
|
183
183
|
class: "w-[320px]"
|
|
@@ -204,15 +204,15 @@ const vt = /* @__PURE__ */ X({
|
|
|
204
204
|
}, Zt = /* @__PURE__ */ X({
|
|
205
205
|
__name: "Group",
|
|
206
206
|
emits: ["update:count"],
|
|
207
|
-
setup(
|
|
207
|
+
setup(L, {
|
|
208
208
|
emit: S
|
|
209
209
|
}) {
|
|
210
|
-
const u = ne(),
|
|
211
|
-
searchKey:
|
|
210
|
+
const u = ne(), R = Ke(), V = qe(), h = Ue(Te(V)), f = Je(), y = g(() => u.rules.group), k = g(() => new ge(u, h.updateMenu, f)), D = g(() => k.value.mapGroups(u.groups, !1)), {
|
|
211
|
+
searchKey: C,
|
|
212
212
|
filter: A
|
|
213
213
|
} = dt(), _ = E(!1), b = E(null), {
|
|
214
214
|
attributes: q,
|
|
215
|
-
filterRule:
|
|
215
|
+
filterRule: N,
|
|
216
216
|
mongoQuery: ae
|
|
217
217
|
} = He({
|
|
218
218
|
valueSource: D,
|
|
@@ -228,18 +228,18 @@ const vt = /* @__PURE__ */ X({
|
|
|
228
228
|
});
|
|
229
229
|
const c = g(() => !!u.state.currentCatalogId || !!u.state.currentSchedulerId);
|
|
230
230
|
function re(t) {
|
|
231
|
-
var
|
|
232
|
-
const e = !u.state.currentCatalogId, a = !u.state.currentSchedulerId, l = ((
|
|
231
|
+
var Y, o;
|
|
232
|
+
const e = !u.state.currentCatalogId, a = !u.state.currentSchedulerId, l = ((Y = u.currentCatalog) == null ? void 0 : Y.priceTierRules) ?? ((o = u.currentCatalog) == null ? void 0 : o.usePriceTiers), i = u.rules.item.bindToVariant, F = u.rules.group.type, p = u.version === v.F_MENU_VERSION.enum.v3, P = u.rules.item.orderFromActiveOnly;
|
|
233
233
|
return {
|
|
234
|
-
link: (
|
|
235
|
-
name: (
|
|
236
|
-
isDefault: (
|
|
234
|
+
link: (O) => !c.value && (!O || i),
|
|
235
|
+
name: (O) => !c.value && !O,
|
|
236
|
+
isDefault: (O) => !c.value,
|
|
237
237
|
type: F && !t._id && !c.value,
|
|
238
238
|
price: !p || t.type !== v.F_ADDON_GROUP_TYPE.enum.DYNAMIC,
|
|
239
239
|
priceEdit: !(l && l.length > 0 && !p && a),
|
|
240
240
|
priceTier: !p && a && e,
|
|
241
241
|
inventory: a ? p ? !c.value && t.type === v.F_ADDON_GROUP_TYPE.enum.NORMAL : !c.value : !1,
|
|
242
|
-
orderFrom: (
|
|
242
|
+
orderFrom: (O) => a ? p ? t.type === v.F_ADDON_GROUP_TYPE.enum.DYNAMIC ? c.value : !!c.value == !O : c.value : !1,
|
|
243
243
|
orderFromActiveOnly: P,
|
|
244
244
|
showOrderFrom: a ? p ? c.value ? !0 : t.type === v.F_ADDON_GROUP_TYPE.enum.PRODUCT : !0 : !1,
|
|
245
245
|
bindToVariant: i,
|
|
@@ -277,7 +277,7 @@ const vt = /* @__PURE__ */ X({
|
|
|
277
277
|
itemsLinked: []
|
|
278
278
|
})), Z = g(() => he.value(ke.value).type);
|
|
279
279
|
function ue(t) {
|
|
280
|
-
|
|
280
|
+
k.value.sortGroups(t);
|
|
281
281
|
}
|
|
282
282
|
function we(t) {
|
|
283
283
|
f.open({
|
|
@@ -293,30 +293,30 @@ const vt = /* @__PURE__ */ X({
|
|
|
293
293
|
text: n("menu.common.actions.cancel"),
|
|
294
294
|
close: !0
|
|
295
295
|
}
|
|
296
|
-
}).onPrimary(() =>
|
|
296
|
+
}).onPrimary(() => k.value.duplicateGroup(t));
|
|
297
297
|
}
|
|
298
|
-
const ee = g(() => u.currentCatalog), B = g(() => u.currentScheduler), j = g(() => new pt(ee.value, u,
|
|
298
|
+
const ee = g(() => u.currentCatalog), B = g(() => u.currentScheduler), j = g(() => new pt(ee.value, u, h.updateMenu, f)), te = g(() => new rt(B.value, u, h.updateMenu, f)), Ce = (t) => {
|
|
299
299
|
let e = t;
|
|
300
300
|
function a(l) {
|
|
301
|
-
const F = u.state.menu.modules.group.find((o) => o._id === l._id), p = (l.items ?? []).reduce((o,
|
|
302
|
-
var
|
|
303
|
-
return !((
|
|
301
|
+
const F = u.state.menu.modules.group.find((o) => o._id === l._id), p = (l.items ?? []).reduce((o, O) => (o[O._id] = [...o[O._id] || [], O.combinationKey || ""], o), {}), Y = (F.items ?? []).filter((o) => {
|
|
302
|
+
var O;
|
|
303
|
+
return !((O = p[o._id]) != null && O.includes(o.combinationKey || ""));
|
|
304
304
|
}).map((o) => ({
|
|
305
305
|
_id: o._id,
|
|
306
306
|
combinationKey: o.combinationKey,
|
|
307
307
|
selection: o.selection
|
|
308
|
-
})).filter((o) => !!u.mergedMenu.modules.item.find((
|
|
308
|
+
})).filter((o) => !!u.mergedMenu.modules.item.find((O) => O._id === o._id));
|
|
309
309
|
return {
|
|
310
310
|
...F,
|
|
311
311
|
...Object.fromEntries(Object.entries(l).filter(([, o]) => !!o)),
|
|
312
|
-
items: [...l.items ?? [], ...
|
|
312
|
+
items: [...l.items ?? [], ...Y]
|
|
313
313
|
};
|
|
314
314
|
}
|
|
315
315
|
if (c.value) {
|
|
316
316
|
let l;
|
|
317
317
|
ee.value ? B.value ? l = j.value.getCatalogSchedulerGroup(t._id, B.value._id) : l = j.value.getCatalogGroup(t._id) : l = te.value.getSchedulerGroup(t._id);
|
|
318
318
|
const i = a(l);
|
|
319
|
-
e = new ge(u,
|
|
319
|
+
e = new ge(u, h.updateMenu, f).mapGroups([i], !0)[0];
|
|
320
320
|
}
|
|
321
321
|
return {
|
|
322
322
|
group: e,
|
|
@@ -324,7 +324,7 @@ const vt = /* @__PURE__ */ X({
|
|
|
324
324
|
categorizedItems: u.categorizedItems
|
|
325
325
|
};
|
|
326
326
|
};
|
|
327
|
-
function
|
|
327
|
+
function Oe(t) {
|
|
328
328
|
f.open({
|
|
329
329
|
title: n("menu.group.dialogs.delete.title"),
|
|
330
330
|
contentComponent: wt,
|
|
@@ -341,7 +341,7 @@ const vt = /* @__PURE__ */ X({
|
|
|
341
341
|
close: !0
|
|
342
342
|
}
|
|
343
343
|
}).onPrimary(async () => {
|
|
344
|
-
await
|
|
344
|
+
await k.value.deleteGroup(t);
|
|
345
345
|
});
|
|
346
346
|
}
|
|
347
347
|
function se(t, e) {
|
|
@@ -355,7 +355,7 @@ const vt = /* @__PURE__ */ X({
|
|
|
355
355
|
for (const i of a)
|
|
356
356
|
if (ft(u.state.menu, t._id, i._id)) {
|
|
357
357
|
const F = (l = u.state.menu.modules.item.find((p) => p._id === i._id)) == null ? void 0 : l.name;
|
|
358
|
-
|
|
358
|
+
V.open({
|
|
359
359
|
type: "error",
|
|
360
360
|
message: n("menu.product.form.group.circularError", {
|
|
361
361
|
groupName: t.name,
|
|
@@ -364,7 +364,7 @@ const vt = /* @__PURE__ */ X({
|
|
|
364
364
|
});
|
|
365
365
|
return;
|
|
366
366
|
}
|
|
367
|
-
await
|
|
367
|
+
await k.value.applyItems(t, a.map((i) => i._id));
|
|
368
368
|
}
|
|
369
369
|
}, {
|
|
370
370
|
default: e
|
|
@@ -390,14 +390,14 @@ const vt = /* @__PURE__ */ X({
|
|
|
390
390
|
label: n("menu.common.actions.delete"),
|
|
391
391
|
itemClass: "text-fm-color-typo-error",
|
|
392
392
|
disabled: !y.value.delete,
|
|
393
|
-
onClick: () =>
|
|
393
|
+
onClick: () => Oe(e)
|
|
394
394
|
}];
|
|
395
395
|
return s(vt, {
|
|
396
396
|
class: t.className,
|
|
397
397
|
items: i
|
|
398
398
|
}, null);
|
|
399
399
|
});
|
|
400
|
-
},
|
|
400
|
+
}, xe = g(() => [{
|
|
401
401
|
accessorKey: "name",
|
|
402
402
|
header: () => n("menu.group.list.columns.name"),
|
|
403
403
|
enableSorting: !1
|
|
@@ -481,7 +481,7 @@ const vt = /* @__PURE__ */ X({
|
|
|
481
481
|
return {
|
|
482
482
|
itemsLinked: y.value.showAppliedProduct,
|
|
483
483
|
type: y.value.type,
|
|
484
|
-
tagging: ((t =
|
|
484
|
+
tagging: ((t = R.groupAttributeSettings) == null ? void 0 : t.value.length) > 0
|
|
485
485
|
};
|
|
486
486
|
}), Ae = async (t) => {
|
|
487
487
|
const e = ct(t), a = e.group, l = mt(a, re(t));
|
|
@@ -498,11 +498,11 @@ const vt = /* @__PURE__ */ X({
|
|
|
498
498
|
data: e.linkItems
|
|
499
499
|
}]
|
|
500
500
|
};
|
|
501
|
-
await
|
|
501
|
+
await h.updateMenu(i, l.name);
|
|
502
502
|
}
|
|
503
|
-
},
|
|
503
|
+
}, $ = E(null), ce = E(null), me = async (t) => {
|
|
504
504
|
var e;
|
|
505
|
-
|
|
505
|
+
$.value = ot(t), await fe(), (e = ce.value) == null || e.trigger(!0);
|
|
506
506
|
};
|
|
507
507
|
function Fe(t) {
|
|
508
508
|
me(t.original);
|
|
@@ -511,7 +511,7 @@ const vt = /* @__PURE__ */ X({
|
|
|
511
511
|
t: n
|
|
512
512
|
} = le(), Pe = g(() => {
|
|
513
513
|
var t;
|
|
514
|
-
return ((t =
|
|
514
|
+
return ((t = R.groupAttributeSettings) == null ? void 0 : t.value.length) > 0;
|
|
515
515
|
}), K = E(!1), J = E(null);
|
|
516
516
|
async function Ve() {
|
|
517
517
|
K.value = !K.value, K.value && (await fe(), J.value && J.value.toggleProperty(!0));
|
|
@@ -530,26 +530,26 @@ const vt = /* @__PURE__ */ X({
|
|
|
530
530
|
}, null)]) : null
|
|
531
531
|
}) : null;
|
|
532
532
|
return (t, e) => {
|
|
533
|
-
const a = M("fm-button"), l = M("fm-chip"), i = M("fm-menu-item"), F = M("fm-menu"), p = M("fm-search"), P = M("fm-table"),
|
|
534
|
-
return m(),
|
|
533
|
+
const a = M("fm-button"), l = M("fm-chip"), i = M("fm-menu-item"), F = M("fm-menu"), p = M("fm-search"), P = M("fm-table"), Y = M("fm-bottom-sheet");
|
|
534
|
+
return m(), w(T, null, [$.value ? (m(), U(ut, Ee({
|
|
535
535
|
ref_key: "groupManagerFormRef",
|
|
536
536
|
ref: ce,
|
|
537
|
-
key:
|
|
538
|
-
},
|
|
537
|
+
key: $.value._id
|
|
538
|
+
}, Ce($.value), {
|
|
539
539
|
action: "update",
|
|
540
540
|
title: r(n)("menu.group.dialogs.update.title"),
|
|
541
|
-
group:
|
|
542
|
-
"onUpdate:group": e[0] || (e[0] = (o) =>
|
|
541
|
+
group: $.value,
|
|
542
|
+
"onUpdate:group": e[0] || (e[0] = (o) => $.value = o),
|
|
543
543
|
"onSubmit:group": e[1] || (e[1] = (o) => Ae(o))
|
|
544
|
-
}), null, 16, ["title", "group"])) :
|
|
544
|
+
}), null, 16, ["title", "group"])) : I("", !0), D.value.length === 0 ? (m(), w("div", Ct, [s(Ye, {
|
|
545
545
|
subtitle: r(n)("menu.group.empty.subtitle"),
|
|
546
546
|
title: r(n)("menu.group.empty.title")
|
|
547
547
|
}, Se({
|
|
548
548
|
_: 2
|
|
549
549
|
}, [y.value.create ? {
|
|
550
550
|
name: "action",
|
|
551
|
-
fn:
|
|
552
|
-
default:
|
|
551
|
+
fn: x(() => [s(r(st), null, {
|
|
552
|
+
default: x(({
|
|
553
553
|
trigger: o
|
|
554
554
|
}) => [s(a, {
|
|
555
555
|
"prepend-icon": "add",
|
|
@@ -559,30 +559,30 @@ const vt = /* @__PURE__ */ X({
|
|
|
559
559
|
_: 1
|
|
560
560
|
})]),
|
|
561
561
|
key: "0"
|
|
562
|
-
} : void 0]), 1032, ["subtitle", "title"])])) : (m(),
|
|
562
|
+
} : void 0]), 1032, ["subtitle", "title"])])) : (m(), w(T, {
|
|
563
563
|
key: 2
|
|
564
|
-
}, [Ge.value ? (m(),
|
|
564
|
+
}, [Ge.value ? (m(), w(T, {
|
|
565
565
|
key: 1
|
|
566
566
|
}, [d("div", Ft, [s(p, {
|
|
567
567
|
autofocus: "",
|
|
568
|
-
modelValue: r(
|
|
569
|
-
"onUpdate:modelValue": e[9] || (e[9] = (o) => Q(
|
|
568
|
+
modelValue: r(C),
|
|
569
|
+
"onUpdate:modelValue": e[9] || (e[9] = (o) => Q(C) ? C.value = o : null),
|
|
570
570
|
placeholder: r(n)("menu.group.search.placeholder")
|
|
571
571
|
}, null, 8, ["modelValue", "placeholder"])]), e[17] || (e[17] = d("div", {
|
|
572
572
|
class: "bg-fm-color-neutral-gray-100 w-full h-px rounded-md"
|
|
573
|
-
}, null, -1)), d("div", Mt, [s(de), Z.value ? (m(),
|
|
573
|
+
}, null, -1)), d("div", Mt, [s(de), Z.value ? (m(), U(Y, {
|
|
574
574
|
key: 0,
|
|
575
575
|
modelValue: _.value,
|
|
576
576
|
"onUpdate:modelValue": e[14] || (e[14] = (o) => _.value = o)
|
|
577
577
|
}, {
|
|
578
|
-
"bottom-sheet-button":
|
|
578
|
+
"bottom-sheet-button": x(() => [s(l, {
|
|
579
579
|
label: r(n)("menu.group.type.title", {
|
|
580
580
|
type: b.value ? r(H.capitalize)(b.value) : r(n)("menu.common.labels.all")
|
|
581
581
|
}),
|
|
582
582
|
class: "text-fm-color-typo-secondary",
|
|
583
583
|
"right-icon": "keyboard_arrow_down"
|
|
584
584
|
}, null, 8, ["label"])]),
|
|
585
|
-
default:
|
|
585
|
+
default: x(() => [d("div", null, [d("div", {
|
|
586
586
|
class: "px-16 py-8",
|
|
587
587
|
onClick: e[10] || (e[10] = (o) => b.value = null)
|
|
588
588
|
}, G(r(n)("menu.group.type.all")), 1), d("div", {
|
|
@@ -596,13 +596,13 @@ const vt = /* @__PURE__ */ X({
|
|
|
596
596
|
onClick: e[13] || (e[13] = (o) => b.value = "DYNAMIC")
|
|
597
597
|
}, G(r(n)("menu.group.type.dynamic")), 1)])]),
|
|
598
598
|
_: 1
|
|
599
|
-
}, 8, ["modelValue"])) :
|
|
599
|
+
}, 8, ["modelValue"])) : I("", !0)]), K.value ? (m(), w("div", Gt, [s(r(ve), {
|
|
600
600
|
ref_key: "attributeFilterRef",
|
|
601
601
|
ref: J,
|
|
602
602
|
attributes: r(q),
|
|
603
|
-
modelValue: r(
|
|
604
|
-
"onUpdate:modelValue": e[15] || (e[15] = (o) => Q(
|
|
605
|
-
}, null, 8, ["attributes", "modelValue"])])) :
|
|
603
|
+
modelValue: r(N),
|
|
604
|
+
"onUpdate:modelValue": e[15] || (e[15] = (o) => Q(N) ? N.value = o : null)
|
|
605
|
+
}, null, 8, ["attributes", "modelValue"])])) : I("", !0), s(r(Be), {
|
|
606
606
|
class: W(["flex-1", "overflow-scroll", "divide-y divide-fm-color-neutral-gray-100", "pb-64"]),
|
|
607
607
|
"model-value": z.value,
|
|
608
608
|
group: "categories",
|
|
@@ -610,28 +610,28 @@ const vt = /* @__PURE__ */ X({
|
|
|
610
610
|
"item-key": "_id",
|
|
611
611
|
"onUpdate:modelValue": e[16] || (e[16] = (o) => ue(o))
|
|
612
612
|
}, {
|
|
613
|
-
item:
|
|
613
|
+
item: x(({
|
|
614
614
|
element: o
|
|
615
|
-
}) => [(m(),
|
|
615
|
+
}) => [(m(), w("div", {
|
|
616
616
|
key: o._id,
|
|
617
617
|
class: W(["py-12 px-16", "flex space-x-16", "items-center"])
|
|
618
|
-
}, [d("div", Pt, [d("div", Vt, [d("p", Nt, G(o.name), 1), d("div", null, [Z.value ? (m(),
|
|
618
|
+
}, [d("div", Pt, [d("div", Vt, [d("p", Nt, G(o.name), 1), d("div", null, [Z.value ? (m(), w("p", Rt, G(r(H.capitalize)(o.type)) + " type ", 1)) : I("", !0), d("p", Et, G(r(n)("menu.group.list.products_linked", {
|
|
619
619
|
count: o.itemsLinked.length
|
|
620
620
|
})), 1)])]), s(ie, {
|
|
621
621
|
group: o
|
|
622
622
|
}, null, 8, ["group"])])]))]),
|
|
623
623
|
_: 1
|
|
624
|
-
}, 8, ["model-value"])], 64)) : (m(),
|
|
624
|
+
}, 8, ["model-value"])], 64)) : (m(), w("div", Ot, [d("div", xt, [s(de), Z.value ? (m(), U(F, {
|
|
625
625
|
key: 0
|
|
626
626
|
}, {
|
|
627
|
-
"menu-button":
|
|
627
|
+
"menu-button": x(() => [s(l, {
|
|
628
628
|
label: r(n)("menu.group.type.title", {
|
|
629
629
|
type: b.value ? r(H.capitalize)(b.value) : r(n)("menu.common.labels.all")
|
|
630
630
|
}),
|
|
631
631
|
class: "text-fm-color-typo-secondary",
|
|
632
632
|
"right-icon": "keyboard_arrow_down"
|
|
633
633
|
}, null, 8, ["label"])]),
|
|
634
|
-
default:
|
|
634
|
+
default: x(() => [d("div", null, [s(i, {
|
|
635
635
|
class: "px-16 py-8",
|
|
636
636
|
label: r(n)("menu.group.type.all"),
|
|
637
637
|
onClick: e[2] || (e[2] = (o) => b.value = null)
|
|
@@ -649,22 +649,22 @@ const vt = /* @__PURE__ */ X({
|
|
|
649
649
|
onClick: e[5] || (e[5] = (o) => b.value = "DYNAMIC")
|
|
650
650
|
}, null, 8, ["label"])])]),
|
|
651
651
|
_: 1
|
|
652
|
-
})) :
|
|
652
|
+
})) : I("", !0), d("div", Dt, [s(p, {
|
|
653
653
|
autofocus: "",
|
|
654
|
-
modelValue: r(
|
|
655
|
-
"onUpdate:modelValue": e[6] || (e[6] = (o) => Q(
|
|
654
|
+
modelValue: r(C),
|
|
655
|
+
"onUpdate:modelValue": e[6] || (e[6] = (o) => Q(C) ? C.value = o : null),
|
|
656
656
|
placeholder: r(n)("menu.group.search.placeholder")
|
|
657
|
-
}, null, 8, ["modelValue", "placeholder"])])]), K.value ? (m(),
|
|
657
|
+
}, null, 8, ["modelValue", "placeholder"])])]), K.value ? (m(), w("div", At, [s(r(ve), {
|
|
658
658
|
ref_key: "attributeFilterRef",
|
|
659
659
|
ref: J,
|
|
660
660
|
attributes: r(q),
|
|
661
|
-
modelValue: r(
|
|
662
|
-
"onUpdate:modelValue": e[7] || (e[7] = (o) => Q(
|
|
663
|
-
}, null, 8, ["attributes", "modelValue"])])) :
|
|
664
|
-
default:
|
|
665
|
-
"column-defs":
|
|
661
|
+
modelValue: r(N),
|
|
662
|
+
"onUpdate:modelValue": e[7] || (e[7] = (o) => Q(N) ? N.value = o : null)
|
|
663
|
+
}, null, 8, ["attributes", "modelValue"])])) : I("", !0), s(Ze, null, {
|
|
664
|
+
default: x(() => [s(P, {
|
|
665
|
+
"column-defs": xe.value,
|
|
666
666
|
"column-visibility": De.value,
|
|
667
|
-
loading: r(
|
|
667
|
+
loading: r(h).checkMenuIsLoading(),
|
|
668
668
|
"page-size": z.value.length,
|
|
669
669
|
"row-data": z.value,
|
|
670
670
|
"shrink-at": !1,
|