@feedmepos/mf-menu 0.31.74 → 0.31.75-prod
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-B6Hn5Wwr.js → App-Cw2D3IXT.js} +528 -585
- package/dist/ApplyProduct.vue_vue_type_script_setup_true_lang-CFtcqy58.js +161 -0
- package/dist/BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-CnCoRLDg.js +74 -0
- package/dist/{Catalog-D-2hDU2I.js → Catalog-B5kAKdVW.js} +9 -9
- package/dist/{Category-hSOIgBkH.js → Category-CAd9BTRX.js} +8 -8
- package/dist/{Category-DjTbuAvE.js → Category-DKjU47aW.js} +5 -5
- package/dist/{CookingGuide-D7ruB7eP.js → CookingGuide-BN739JkB.js} +7 -7
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-mxVSGXAz.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-gii2CTYD.js} +3 -3
- package/dist/{Group-evJZbgZn.js → Group-DmII5Nwf.js} +4 -4
- package/dist/{Group-CjlhbhDV.js → Group-DnpVxZkN.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-DiKraPiw.js → Group.vue_vue_type_script_setup_true_lang-BEeCwmKt.js} +163 -163
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BYku8MAc.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-DB5B3PLx.js} +90 -90
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-DScxctPb.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-BEISm7uc.js} +3046 -3046
- package/dist/{Ingredient-jNDx1pUw.js → Ingredient-CpuyDF4n.js} +30 -30
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-CuM_k-C3.js → InventoryBinding.vue_vue_type_script_setup_true_lang-GHiwD8VV.js} +1112 -1112
- package/dist/{LinkProductSideSheet-CAPIdf6P.js → LinkProductSideSheet-DrSKOBLg.js} +129 -129
- package/dist/MenuSelector.vue_vue_type_script_setup_true_lang-Bm_hSelC.js +69 -0
- package/dist/{MenuSetting-C2MDgy57.js → MenuSetting-BNuIUnjz.js} +138 -138
- package/dist/{PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js → PageLayout.vue_vue_type_script_setup_true_lang-vFqWGM6P.js} +8 -8
- package/dist/{PrintRoute-SmWbKr9Y.js → PrintRoute-Dl0oWYju.js} +6 -6
- package/dist/{Product-BCm49V9T.js → Product-IQBP1vvY.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-CTOjLqbF.js → Product.vue_vue_type_script_setup_true_lang-Bdss6VRj.js} +607 -607
- package/dist/{ProductInternalTools-DGsvvnIs.js → ProductInternalTools-Dkhbg1WE.js} +11 -11
- package/dist/{Products-D4qeSEfO.js → Products-Dcafs3Lk.js} +59 -59
- package/dist/{Publish-3A3EEQ9x.js → Publish-BTuO4AlR.js} +6 -6
- package/dist/{Recipe-CS7TZGA6.js → Recipe-Dx2ZkHsk.js} +6 -6
- package/dist/{Scheduler-BIwTUJMJ.js → Scheduler-Dh_0J2g9.js} +5 -5
- package/dist/{ServingSequence-C0N8wJfr.js → ServingSequence-DXhx9dcu.js} +5 -5
- package/dist/{Setting-fA6tvQK2.js → Setting-4x_w46t_.js} +5 -5
- package/dist/{Subcategory-BAFAmflQ.js → Subcategory-vztBpQnB.js} +6 -6
- package/dist/{Takeaway-D4aO8zzN.js → Takeaway-CDgIyUrN.js} +5 -5
- package/dist/{Takeaway-CLZouw1j.js → Takeaway-Dz5PxJk_.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-1oN-i9bo.js → Takeaway.vue_vue_type_script_setup_true_lang-BMMXiDFL.js} +6 -6
- package/dist/{TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js → TextChip.vue_vue_type_script_setup_true_lang-BJMcI3U2.js} +5 -5
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-Dwol_Lkd.js → Thumbnail.vue_vue_type_script_setup_true_lang-DJ8JMV28.js} +74 -74
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-cTzWxjM4.js +5996 -0
- package/dist/{Unit-ByqUb4Po.js → Unit-z7OVmlSq.js} +4 -4
- package/dist/{Variant-BmqrUfen.js → Variant-CFRgvlXf.js} +5 -5
- package/dist/{_id_-RUWzOB0B.js → _id_-B9q3j4_m.js} +11 -11
- package/dist/{app-B1N2F0j8.js → app-CdsS_tMb.js} +1 -1
- package/dist/app-CkCBPor3.js +363 -0
- package/dist/{app-5fxKLAzS.js → app-CzXxFrl1.js} +447 -447
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/app.d.ts +0 -1
- 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/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/linked-status-B8qYyYR6.js +13 -0
- package/dist/assets/override-menu-nmSTTTn7.js +13 -0
- package/dist/assets/validate-menu-CF1XZECU.js +13 -0
- package/dist/{catalog-CarmtheV.js → catalog-DBBEUpMo.js} +1 -1
- package/dist/{catalogSetting-BqrTpBP8.js → catalogSetting-DKvBjleU.js} +1 -1
- package/dist/{category-5R83ypNS.js → category-DILExwHL.js} +1 -1
- package/dist/{currency-CUl4r9rT.js → currency-B7Xm1xZJ.js} +1 -1
- package/dist/customAttributes-DrA0YC82.js +180 -0
- package/dist/{index-Ttqt4iFV.js → index-2lrKSO_O.js} +20 -20
- package/dist/{index-DlwLw-BQ.js → index-BoVEGKz7.js} +91 -91
- package/dist/{index-DAWSNP3G.js → index-Bu5LuO1j.js} +4 -4
- package/dist/{index-DUfYYdZ-.js → index-SNNvjtFa.js} +56 -56
- package/dist/{index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js → index.vue_vue_type_script_setup_true_lang-B1_JqsYF.js} +16 -16
- package/dist/{item-B0UPYxsB.js → item-BnOnvN8x.js} +3091 -3174
- package/dist/{iteration-CfmAZiOO.js → iteration-Csz_aSxy.js} +3 -3
- package/dist/{jszip.min-zROpry0S.js → jszip.min-B0T3I-lE.js} +329 -329
- package/dist/{menu-DAac726D.js → menu-3XEn1C9F.js} +6402 -6332
- package/dist/{menu-DpYo8dYR.js → menu-DzbYSPGP.js} +1 -1
- package/dist/{menuV2-DZj_FPqR.js → menuV2-cXg54GYW.js} +93 -93
- package/dist/mf-menu.css +1 -1
- package/dist/packages/shared/src/components/form/SelectFilter.vue.d.ts +1 -1
- package/dist/{priceTier-BvDLl8v2.js → priceTier-DVd27LFd.js} +1 -1
- package/dist/{scheduler-pNUXG6En.js → scheduler-D8IgBrUX.js} +6 -6
- package/dist/{subcategory-DCDCQnAX.js → subcategory-BOpm3s8K.js} +2 -2
- package/dist/{toExcel-DqMa1Hn8.js → toExcel-BJM3fOB2.js} +2 -2
- package/dist/{unit-CuCXoWPG.js → unit-DF9d3piP.js} +151 -151
- package/dist/{vuedraggable-CK8z7qA8.js → vuedraggable-DnBIRDMr.js} +2 -2
- package/package.json +5 -5
- package/dist/ApplyProduct.vue_vue_type_script_setup_true_lang-CqGU3bJQ.js +0 -161
- package/dist/BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-DhrXKy3b.js +0 -74
- package/dist/MenuSelector.vue_vue_type_script_setup_true_lang-K6Z0QJBl.js +0 -69
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CabQS55D.js +0 -6012
- package/dist/app-CHpw_EM1.js +0 -2101
- package/dist/apps/mf-menu/src/components/feature/RemyButton.vue.d.ts +0 -15
- package/dist/apps/mf-menu/src/components/feature/RemyDialog.vue.d.ts +0 -15
- package/dist/apps/mf-menu/src/helper/remy.d.ts +0 -5
- package/dist/assets/linked-status-CFdi7K3K.js +0 -13
- package/dist/assets/override-menu-CXOY8i3w.js +0 -13
- package/dist/assets/validate-menu-DLlrsx2f.js +0 -13
- package/dist/customAttributes-BkqKM_KW.js +0 -180
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useI18n as
|
|
3
|
-
import { m as O, f as j, u as ne, _ as ie, a as
|
|
4
|
-
import { u as D } from "./priceTier-
|
|
5
|
-
import { b as G } from "./app-
|
|
1
|
+
import { defineComponent as x, useModel as K, computed as B, resolveComponent as m, createBlock as U, openBlock as b, ref as L, watch as W, withCtx as _, createElementBlock as F, createElementVNode as P, Fragment as w, renderList as X, createVNode as u, unref as e, createCommentVNode as $, withModifiers as Q, onMounted as te, renderSlot as le, toDisplayString as h, createTextVNode as ae } from "vue";
|
|
2
|
+
import { useI18n as N, useCustomAttributes as ue, useCoreStore as re, isEmptyRule as oe, EMPTY_RULE as E } from "@feedmepos/mf-common";
|
|
3
|
+
import { m as O, f as j, u as ne, _ as ie, a as q } from "./customAttributes-DrA0YC82.js";
|
|
4
|
+
import { u as D } from "./priceTier-DVd27LFd.js";
|
|
5
|
+
import { b as G } from "./app-CzXxFrl1.js";
|
|
6
6
|
import { FmButtonVariant as Z, useDialog as se, components as me, FmButtonColorThemeVariant as H } from "@feedmepos/ui-library";
|
|
7
|
-
import { L as R } from "./catalogSetting-
|
|
8
|
-
import { L as de } from "./LinkProductSideSheet-
|
|
7
|
+
import { L as R } from "./catalogSetting-DKvBjleU.js";
|
|
8
|
+
import { L as de } from "./LinkProductSideSheet-DrSKOBLg.js";
|
|
9
9
|
import { c as Y } from "./check-C9mY6LiX.js";
|
|
10
|
-
import { u as
|
|
10
|
+
import { u as ce, H as J, al as pe } from "./menu-3XEn1C9F.js";
|
|
11
11
|
import { c as ve } from "./string-DpfFixWH.js";
|
|
12
|
-
const fe = /* @__PURE__ */
|
|
12
|
+
const fe = /* @__PURE__ */ x({
|
|
13
13
|
__name: "LinkPriceTier",
|
|
14
14
|
props: {
|
|
15
15
|
modelValue: { required: !0 },
|
|
16
16
|
modelModifiers: {}
|
|
17
17
|
},
|
|
18
18
|
emits: ["update:modelValue"],
|
|
19
|
-
setup(
|
|
20
|
-
const { t:
|
|
21
|
-
label:
|
|
22
|
-
value:
|
|
19
|
+
setup(d) {
|
|
20
|
+
const { t: T } = N(), r = K(d, "modelValue"), o = D(), a = B(() => o.priceTiers.value.map((y) => ({
|
|
21
|
+
label: y.key,
|
|
22
|
+
value: y.key
|
|
23
23
|
})));
|
|
24
|
-
return (
|
|
25
|
-
const i =
|
|
24
|
+
return (y, g) => {
|
|
25
|
+
const i = m("FmSelect");
|
|
26
26
|
return b(), U(i, {
|
|
27
27
|
items: a.value,
|
|
28
28
|
"model-value": r.value ?? [],
|
|
29
29
|
multiselect: !0,
|
|
30
30
|
keepSelectionOrder: !0,
|
|
31
|
-
"onUpdate:modelValue": g[0] || (g[0] = (
|
|
31
|
+
"onUpdate:modelValue": g[0] || (g[0] = (k) => r.value = k)
|
|
32
32
|
}, null, 8, ["items", "model-value"]);
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
}), _e = {
|
|
36
36
|
class: "flex justify-end"
|
|
37
|
-
}, be = /* @__PURE__ */
|
|
37
|
+
}, be = /* @__PURE__ */ x({
|
|
38
38
|
__name: "PriceTierRuleEditor",
|
|
39
39
|
props: {
|
|
40
40
|
modelValue: {
|
|
@@ -43,28 +43,28 @@ const fe = /* @__PURE__ */ N({
|
|
|
43
43
|
modelModifiers: {}
|
|
44
44
|
},
|
|
45
45
|
emits: ["update:modelValue"],
|
|
46
|
-
setup(
|
|
47
|
-
var
|
|
46
|
+
setup(d) {
|
|
47
|
+
var V;
|
|
48
48
|
const {
|
|
49
|
-
t:
|
|
50
|
-
} =
|
|
51
|
-
var
|
|
49
|
+
t: T
|
|
50
|
+
} = N(), r = K(d, "modelValue"), o = L((V = r.value) == null ? void 0 : V.map((l) => {
|
|
51
|
+
var c, p;
|
|
52
52
|
return {
|
|
53
53
|
...l,
|
|
54
54
|
restaurantRule: {
|
|
55
|
-
restaurantAttributes: O((
|
|
56
|
-
restaurantCustomAttributes: O((
|
|
55
|
+
restaurantAttributes: O((c = l.restaurantRule) == null ? void 0 : c.restaurantAttributes),
|
|
56
|
+
restaurantCustomAttributes: O((p = l.restaurantRule) == null ? void 0 : p.restaurantCustomAttributes)
|
|
57
57
|
}
|
|
58
58
|
};
|
|
59
59
|
}));
|
|
60
60
|
W(o, (l) => {
|
|
61
|
-
r.value = l == null ? void 0 : l.map((
|
|
62
|
-
var
|
|
61
|
+
r.value = l == null ? void 0 : l.map((c) => {
|
|
62
|
+
var p, n;
|
|
63
63
|
return {
|
|
64
|
-
priceTier:
|
|
64
|
+
priceTier: c.priceTier,
|
|
65
65
|
restaurantRule: {
|
|
66
|
-
restaurantAttributes: j((
|
|
67
|
-
restaurantCustomAttributes: j((n =
|
|
66
|
+
restaurantAttributes: j((p = c.restaurantRule) == null ? void 0 : p.restaurantAttributes),
|
|
67
|
+
restaurantCustomAttributes: j((n = c.restaurantRule) == null ? void 0 : n.restaurantCustomAttributes)
|
|
68
68
|
}
|
|
69
69
|
};
|
|
70
70
|
});
|
|
@@ -72,17 +72,17 @@ const fe = /* @__PURE__ */ N({
|
|
|
72
72
|
deep: !0
|
|
73
73
|
});
|
|
74
74
|
const a = D(), {
|
|
75
|
-
attributes:
|
|
75
|
+
attributes: y
|
|
76
76
|
} = ue({
|
|
77
77
|
valueSource: re().restaurants,
|
|
78
78
|
entity: "restaurant"
|
|
79
79
|
}), {
|
|
80
80
|
restaurantAttributes: g
|
|
81
81
|
} = ne();
|
|
82
|
-
function i(l,
|
|
83
|
-
o.value && o.value[l] && (oe(
|
|
82
|
+
function i(l, c, p) {
|
|
83
|
+
o.value && o.value[l] && (oe(c) ? o.value[l].restaurantRule[p] = E : o.value[l].restaurantRule[p] = c);
|
|
84
84
|
}
|
|
85
|
-
const
|
|
85
|
+
const k = B(() => a.priceTiers.value.map((l) => ({
|
|
86
86
|
value: l.key,
|
|
87
87
|
label: l.key
|
|
88
88
|
})));
|
|
@@ -90,31 +90,31 @@ const fe = /* @__PURE__ */ N({
|
|
|
90
90
|
o.value = [...o.value || [], {
|
|
91
91
|
priceTier: "",
|
|
92
92
|
restaurantRule: {
|
|
93
|
-
restaurantAttributes:
|
|
94
|
-
restaurantCustomAttributes:
|
|
93
|
+
restaurantAttributes: E,
|
|
94
|
+
restaurantCustomAttributes: E
|
|
95
95
|
}
|
|
96
96
|
}];
|
|
97
97
|
}
|
|
98
98
|
function A(l) {
|
|
99
99
|
o.value && o.value.splice(l, 1);
|
|
100
100
|
}
|
|
101
|
-
return (l,
|
|
102
|
-
const
|
|
101
|
+
return (l, c) => {
|
|
102
|
+
const p = m("FmSelect"), n = m("fm-button"), v = m("FmCard"), z = m("FmButton");
|
|
103
103
|
return b(), U(ie, null, {
|
|
104
|
-
default: _(() => [(b(!0), F(
|
|
104
|
+
default: _(() => [(b(!0), F(w, null, X(o.value, (M, S) => (b(), U(v, {
|
|
105
105
|
key: S,
|
|
106
106
|
class: "p-16 space-y-16",
|
|
107
107
|
variant: "outlined"
|
|
108
108
|
}, {
|
|
109
|
-
default: _(() => [P("div", null, [u(
|
|
109
|
+
default: _(() => [P("div", null, [u(p, {
|
|
110
110
|
label: "Price groups",
|
|
111
111
|
"label-mark": "required",
|
|
112
|
-
items:
|
|
112
|
+
items: k.value,
|
|
113
113
|
"model-value": M.priceTier,
|
|
114
|
-
rules: [(f) => !!f || e(
|
|
114
|
+
rules: [(f) => !!f || e(T)("menu.common.validation.required_field")],
|
|
115
115
|
"onUpdate:modelValue": (f) => M.priceTier = f
|
|
116
|
-
}, null, 8, ["items", "model-value", "rules", "onUpdate:modelValue"])]), u(
|
|
117
|
-
label: e(
|
|
116
|
+
}, null, 8, ["items", "model-value", "rules", "onUpdate:modelValue"])]), u(q, {
|
|
117
|
+
label: e(T)("menu.link_product.rules.restaurant_filter")
|
|
118
118
|
}, {
|
|
119
119
|
default: _(() => {
|
|
120
120
|
var f;
|
|
@@ -125,13 +125,13 @@ const fe = /* @__PURE__ */ N({
|
|
|
125
125
|
}, null, 8, ["attributes", "model-value", "onUpdate:modelValue"])];
|
|
126
126
|
}),
|
|
127
127
|
_: 2
|
|
128
|
-
}, 1032, ["label"]), u(
|
|
129
|
-
label: e(
|
|
128
|
+
}, 1032, ["label"]), u(q, {
|
|
129
|
+
label: e(T)("menu.link_product.rules.restaurant_custom_attributes_filter")
|
|
130
130
|
}, {
|
|
131
131
|
default: _(() => {
|
|
132
132
|
var f;
|
|
133
133
|
return [u(e(G), {
|
|
134
|
-
attributes: e(
|
|
134
|
+
attributes: e(y),
|
|
135
135
|
"model-value": (f = M.restaurantRule) == null ? void 0 : f.restaurantCustomAttributes,
|
|
136
136
|
"onUpdate:modelValue": (C) => i(S, C, "restaurantCustomAttributes")
|
|
137
137
|
}, null, 8, ["attributes", "model-value", "onUpdate:modelValue"])];
|
|
@@ -143,7 +143,7 @@ const fe = /* @__PURE__ */ N({
|
|
|
143
143
|
onClick: (f) => A(S)
|
|
144
144
|
}, null, 8, ["variant", "onClick"])])]),
|
|
145
145
|
_: 2
|
|
146
|
-
}, 1024))), 128)), P("div", null, [u(
|
|
146
|
+
}, 1024))), 128)), P("div", null, [u(z, {
|
|
147
147
|
label: "Add rule",
|
|
148
148
|
onClick: t
|
|
149
149
|
})])]),
|
|
@@ -151,7 +151,7 @@ const fe = /* @__PURE__ */ N({
|
|
|
151
151
|
});
|
|
152
152
|
};
|
|
153
153
|
}
|
|
154
|
-
}), Be = /* @__PURE__ */
|
|
154
|
+
}), Be = /* @__PURE__ */ x({
|
|
155
155
|
__name: "LinkPriceTierSection",
|
|
156
156
|
props: {
|
|
157
157
|
modelValue: {},
|
|
@@ -163,25 +163,25 @@ const fe = /* @__PURE__ */ N({
|
|
|
163
163
|
}
|
|
164
164
|
},
|
|
165
165
|
emits: ["update:modelValue"],
|
|
166
|
-
setup(
|
|
167
|
-
emit:
|
|
166
|
+
setup(d, {
|
|
167
|
+
emit: T
|
|
168
168
|
}) {
|
|
169
|
-
const r =
|
|
169
|
+
const r = d, o = T, {
|
|
170
170
|
t: a
|
|
171
|
-
} =
|
|
172
|
-
function i(
|
|
171
|
+
} = N(), y = D(), g = L(r.modelValue.priceTierRules && r.modelValue.priceTierRules.length > 0 ? R.Rules : R.Normal);
|
|
172
|
+
function i(k) {
|
|
173
173
|
o("update:modelValue", {
|
|
174
174
|
...r.modelValue,
|
|
175
|
-
...
|
|
175
|
+
...k
|
|
176
176
|
});
|
|
177
177
|
}
|
|
178
|
-
return (
|
|
179
|
-
const A =
|
|
180
|
-
return !
|
|
178
|
+
return (k, t) => {
|
|
179
|
+
const A = m("fm-radio"), V = m("fm-radio-group");
|
|
180
|
+
return !d.isMainCatalog && d.isV4 && e(y).priceTiers.value.length > 0 ? (b(), U(q, {
|
|
181
181
|
key: 0,
|
|
182
182
|
label: e(a)("menu.price_tier.link_price_tier")
|
|
183
183
|
}, {
|
|
184
|
-
default: _(() => [u(
|
|
184
|
+
default: _(() => [u(V, {
|
|
185
185
|
"model-value": g.value,
|
|
186
186
|
"onUpdate:modelValue": t[4] || (t[4] = (l) => {
|
|
187
187
|
g.value = l, l === e(R).Normal && i({
|
|
@@ -199,7 +199,7 @@ const fe = /* @__PURE__ */ N({
|
|
|
199
199
|
}, ["prevent"])),
|
|
200
200
|
class: "pl-32"
|
|
201
201
|
}, [u(fe, {
|
|
202
|
-
"model-value":
|
|
202
|
+
"model-value": d.modelValue.usePriceTiers,
|
|
203
203
|
"onUpdate:modelValue": t[0] || (t[0] = (l) => i({
|
|
204
204
|
usePriceTiers: l
|
|
205
205
|
}))
|
|
@@ -213,7 +213,7 @@ const fe = /* @__PURE__ */ N({
|
|
|
213
213
|
}, ["prevent"])),
|
|
214
214
|
class: "pl-32"
|
|
215
215
|
}, [u(be, {
|
|
216
|
-
"model-value":
|
|
216
|
+
"model-value": d.modelValue.priceTierRules,
|
|
217
217
|
"onUpdate:modelValue": t[2] || (t[2] = (l) => i({
|
|
218
218
|
priceTierRules: l
|
|
219
219
|
}))
|
|
@@ -227,7 +227,7 @@ const fe = /* @__PURE__ */ N({
|
|
|
227
227
|
}), ge = { class: "space-y-16" }, ke = { class: "ml-32 mt-16 space-y-8" }, Ve = {
|
|
228
228
|
key: 0,
|
|
229
229
|
class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
230
|
-
}, Le = /* @__PURE__ */
|
|
230
|
+
}, Le = /* @__PURE__ */ x({
|
|
231
231
|
__name: "GroupMarkupPriceDialog",
|
|
232
232
|
props: {
|
|
233
233
|
modelValue: {},
|
|
@@ -236,10 +236,10 @@ const fe = /* @__PURE__ */ N({
|
|
|
236
236
|
action: {}
|
|
237
237
|
},
|
|
238
238
|
emits: ["update:model-value"],
|
|
239
|
-
setup(
|
|
240
|
-
const r =
|
|
239
|
+
setup(d, { emit: T }) {
|
|
240
|
+
const r = d, o = ce();
|
|
241
241
|
se();
|
|
242
|
-
const { t: a } =
|
|
242
|
+
const { t: a } = N(), y = T, g = B(() => r.action === "add" ? a("menu.markup.dialog.title.add") : a("menu.markup.dialog.title.update")), i = L(!1), k = (n) => {
|
|
243
243
|
Y.isBoolean(n) ? i.value = n : i.value = !i.value;
|
|
244
244
|
}, t = L(
|
|
245
245
|
r.modelValue ? J(r.modelValue) : {
|
|
@@ -256,7 +256,7 @@ const fe = /* @__PURE__ */ N({
|
|
|
256
256
|
});
|
|
257
257
|
}
|
|
258
258
|
), B(
|
|
259
|
-
() =>
|
|
259
|
+
() => pe(o.variants, r.categories, r.items)
|
|
260
260
|
);
|
|
261
261
|
function A(n) {
|
|
262
262
|
t.value = {
|
|
@@ -264,17 +264,17 @@ const fe = /* @__PURE__ */ N({
|
|
|
264
264
|
includeItems: n
|
|
265
265
|
};
|
|
266
266
|
}
|
|
267
|
-
const
|
|
267
|
+
const V = L(
|
|
268
268
|
0
|
|
269
269
|
/* ALL */
|
|
270
270
|
);
|
|
271
271
|
function l(n) {
|
|
272
|
-
|
|
272
|
+
V.value = n, t.value = {
|
|
273
273
|
...t.value,
|
|
274
274
|
includeItems: n === 0 ? null : []
|
|
275
275
|
};
|
|
276
276
|
}
|
|
277
|
-
const
|
|
277
|
+
const c = B(() => [
|
|
278
278
|
{
|
|
279
279
|
label: a("menu.markup.dialog.options.all"),
|
|
280
280
|
value: 0
|
|
@@ -286,21 +286,21 @@ const fe = /* @__PURE__ */ N({
|
|
|
286
286
|
/* CUSTOM */
|
|
287
287
|
}
|
|
288
288
|
]);
|
|
289
|
-
async function
|
|
290
|
-
|
|
289
|
+
async function p() {
|
|
290
|
+
y("update:model-value", t.value), k(!1);
|
|
291
291
|
}
|
|
292
292
|
return te(() => {
|
|
293
|
-
|
|
293
|
+
V.value = t.value && t.value.includeItems === null ? 0 : 1;
|
|
294
294
|
}), (n, v) => {
|
|
295
|
-
const
|
|
296
|
-
return b(), F(
|
|
297
|
-
le(n.$slots, "default", { trigger:
|
|
295
|
+
const z = m("fm-icon"), M = m("fm-stepper-field"), S = m("fm-radio"), f = m("fm-radio-group"), C = m("fm-button"), ee = m("fm-dialog");
|
|
296
|
+
return b(), F(w, null, [
|
|
297
|
+
le(n.$slots, "default", { trigger: k }),
|
|
298
298
|
u(ee, {
|
|
299
299
|
modelValue: i.value,
|
|
300
300
|
"onUpdate:modelValue": v[4] || (v[4] = (I) => i.value = I),
|
|
301
301
|
"is-component": e(me).FmForm,
|
|
302
302
|
"is-component-props": {
|
|
303
|
-
onValidationSuccess:
|
|
303
|
+
onValidationSuccess: p
|
|
304
304
|
}
|
|
305
305
|
}, {
|
|
306
306
|
"dialog-header": _(() => [
|
|
@@ -311,10 +311,10 @@ const fe = /* @__PURE__ */ N({
|
|
|
311
311
|
class: "sm:w-full xs:w-full ml-auto",
|
|
312
312
|
label: "Cancel",
|
|
313
313
|
variant: "tertiary",
|
|
314
|
-
onClick: v[3] || (v[3] = (I) =>
|
|
314
|
+
onClick: v[3] || (v[3] = (I) => k(!1))
|
|
315
315
|
}),
|
|
316
316
|
u(C, {
|
|
317
|
-
label: e(ve)(
|
|
317
|
+
label: e(ve)(d.action),
|
|
318
318
|
class: "sm:w-full xs:w-full",
|
|
319
319
|
size: "md",
|
|
320
320
|
type: "submit",
|
|
@@ -327,35 +327,35 @@ const fe = /* @__PURE__ */ N({
|
|
|
327
327
|
P("div", ge, [
|
|
328
328
|
u(M, {
|
|
329
329
|
modelValue: t.value.percentage,
|
|
330
|
-
"onUpdate:modelValue": v[0] || (v[0] = (
|
|
330
|
+
"onUpdate:modelValue": v[0] || (v[0] = (s) => t.value.percentage = s),
|
|
331
331
|
decimal: 0,
|
|
332
332
|
max: 100,
|
|
333
333
|
min: 0,
|
|
334
334
|
rules: [
|
|
335
|
-
(
|
|
335
|
+
(s) => e(Y).isSet(s) && s >= 0 || e(a)("menu.markup.dialog.fields.percentage.required")
|
|
336
336
|
],
|
|
337
337
|
label: e(a)("menu.markup.dialog.fields.percentage.label"),
|
|
338
338
|
placeholder: e(a)("menu.markup.dialog.fields.percentage.placeholder")
|
|
339
339
|
}, {
|
|
340
340
|
prepend: _(() => [
|
|
341
|
-
u(
|
|
341
|
+
u(z, { name: "percent" })
|
|
342
342
|
]),
|
|
343
343
|
_: 1
|
|
344
344
|
}, 8, ["modelValue", "rules", "label", "placeholder"]),
|
|
345
345
|
P("div", null, [
|
|
346
346
|
u(f, {
|
|
347
|
-
modelValue:
|
|
347
|
+
modelValue: V.value,
|
|
348
348
|
"onUpdate:modelValue": [
|
|
349
|
-
v[1] || (v[1] = (
|
|
349
|
+
v[1] || (v[1] = (s) => V.value = s),
|
|
350
350
|
l
|
|
351
351
|
],
|
|
352
352
|
class: "space-y-8"
|
|
353
353
|
}, {
|
|
354
354
|
default: _(() => [
|
|
355
|
-
(b(!0), F(
|
|
356
|
-
key:
|
|
357
|
-
label:
|
|
358
|
-
value:
|
|
355
|
+
(b(!0), F(w, null, X(c.value, (s) => (b(), U(S, {
|
|
356
|
+
key: s.value,
|
|
357
|
+
label: s.label,
|
|
358
|
+
value: s.value
|
|
359
359
|
}, null, 8, ["label", "value"]))), 128))
|
|
360
360
|
]),
|
|
361
361
|
_: 1
|
|
@@ -366,17 +366,17 @@ const fe = /* @__PURE__ */ N({
|
|
|
366
366
|
"categorized-items": e(o).categorizedItems,
|
|
367
367
|
"initial-value": t.value.includeItems || [],
|
|
368
368
|
"show-variant": !1,
|
|
369
|
-
onSubmit: v[2] || (v[2] = ({ items:
|
|
369
|
+
onSubmit: v[2] || (v[2] = ({ items: s }) => A(s))
|
|
370
370
|
}, {
|
|
371
|
-
default: _(({ trigger:
|
|
372
|
-
|
|
371
|
+
default: _(({ trigger: s }) => [
|
|
372
|
+
V.value === 1 ? (b(), U(C, {
|
|
373
373
|
key: 0,
|
|
374
374
|
"text-color": e(H).ColorPrimary,
|
|
375
375
|
"border-color": e(H).ColorPrimary,
|
|
376
376
|
variant: e(Z).Secondary,
|
|
377
377
|
label: e(a)("menu.markup.dialog.products.link"),
|
|
378
378
|
"prepend-icon": "link",
|
|
379
|
-
onClick:
|
|
379
|
+
onClick: s
|
|
380
380
|
}, null, 8, ["text-color", "border-color", "variant", "label", "onClick"])) : $("", !0)
|
|
381
381
|
]),
|
|
382
382
|
_: 1
|