@feedmepos/mf-menu-portal 1.0.4 → 1.0.5-dev.1
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-CgYpEYgp.js → App-B2xq1U4S.js} +699 -687
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-Hdsnu29V.js → ApplyProduct.vue_vue_type_script_setup_true_lang-CPh1GBw9.js} +11 -10
- package/dist/{BindingTable.vue_vue_type_script_setup_true_lang-CWe5_Sm5.js → BindingTable.vue_vue_type_script_setup_true_lang-DCgMQJE-.js} +50 -46
- package/dist/Catalog-BEI73S_k.js +433 -0
- package/dist/{CatalogBinding-BjTeOA91.js → CatalogBinding-3rhuTWDD.js} +30 -29
- package/dist/{CatalogEditTabs.vue_vue_type_script_setup_true_lang-doB3hsWD.js → CatalogEditTabs.vue_vue_type_script_setup_true_lang-CraEwqCY.js} +30 -29
- package/dist/{CatalogEditor.vue_vue_type_script_setup_true_lang-BpBR-N_x.js → CatalogEditor.vue_vue_type_script_setup_true_lang-Dc72SNpI.js} +314 -304
- package/dist/CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-CMyubLvP.js +127 -0
- package/dist/{Category-6-ppsSmZ.js → Category-BVCdkA5K.js} +14 -13
- package/dist/{Category-CdsbuUqi.js → Category-P5DYjIeF.js} +2 -2
- package/dist/{CategoryList.vue_vue_type_script_setup_true_lang-DlNUOgyu.js → CategoryList.vue_vue_type_script_setup_true_lang-DyhW52Df.js} +274 -262
- package/dist/{CookingGuide-CRyRlBeV.js → CookingGuide-Y-c1NLP5.js} +144 -140
- package/dist/{Group-DVrUlq4i.js → Group-D6wA3jCF.js} +2 -2
- package/dist/{Group-DqyBHSFx.js → Group-qqr5SUIc.js} +17 -15
- package/dist/GroupList.vue_vue_type_script_setup_true_lang-DNTVfY2d.js +1996 -0
- package/dist/{Ingredient-CGLfhbvN.js → Ingredient-CJHkJZ0y.js} +94 -93
- package/dist/{LinkProductSideSheet.vue_vue_type_script_setup_true_lang-C0rc1FRO.js → LinkProductSideSheet.vue_vue_type_script_setup_true_lang-Cb6nO43H.js} +1 -1
- package/dist/{MenuSetting-Oct3vbHj.js → MenuSetting-YcEGo51l.js} +462 -446
- package/dist/{OrderPacing-BDkzflgE.js → OrderPacing-DwQU7c0Y.js} +207 -204
- package/dist/{OrderPacingFields.vue_vue_type_script_setup_true_lang-B259anSs.js → OrderPacingFields.vue_vue_type_script_setup_true_lang-2Cdz70u-.js} +1 -2
- package/dist/PageLayout.vue_vue_type_script_setup_true_lang-DrhsROXo.js +44 -0
- package/dist/PhoneFab.vue_vue_type_script_setup_true_lang-CipbTqbp.js +12 -0
- package/dist/{Preview-V9cSpevb.js → Preview-DLeXy5V-.js} +2 -2
- package/dist/{PriceTierNotice.vue_vue_type_script_setup_true_lang-k5S4mGCN.js → PriceTierNotice.vue_vue_type_script_setup_true_lang-D_OV9Z_4.js} +1 -1
- package/dist/{PrintRoute-3UwiMoBU.js → PrintRoute-R38w0-U2.js} +151 -150
- package/dist/{Product-LaB-YRTQ.js → Product-sbMCaVhM.js} +8 -7
- package/dist/ProductAttributeFilter.vue_vue_type_script_setup_true_lang-DoHQeOHy.js +7826 -0
- package/dist/ProductChipSummary.vue_vue_type_script_setup_true_lang-D9v88xZs.js +111 -0
- package/dist/{ProductEditorHost.vue_vue_type_script_setup_true_lang-BBXGnZtc.js → ProductEditorHost.vue_vue_type_script_setup_true_lang-DsIGLKNS.js} +17 -17
- package/dist/{ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-BUC6qUnG.js → ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-CEliG36Z.js} +726 -726
- package/dist/{ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-CjQRRqBx.js → ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-B3bShTjM.js} +127 -124
- package/dist/{ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-3yzUcogQ.js → ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-BzctosMW.js} +820 -807
- package/dist/{ProductInternalTools-DWCgC825.js → ProductInternalTools-jE3Ovo4l.js} +3 -3
- package/dist/{ProductInventoryDialog-D0d5RywR.js → ProductInventoryDialog-EDlrXupB.js} +1 -1
- package/dist/{ProductInventoryDialog.vue_vue_type_script_setup_true_lang-CmYKO0ZX.js → ProductInventoryDialog.vue_vue_type_script_setup_true_lang-LOwSpoiA.js} +1 -1
- package/dist/{ProductList.vue_vue_type_script_setup_true_lang-DeX8Exly.js → ProductList.vue_vue_type_script_setup_true_lang-rczFAWVa.js} +1135 -1098
- package/dist/{ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-BFD6_Sbb.js → ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-C4iK-sAd.js} +1 -1
- package/dist/{Products-BLUhwFT-.js → Products-DUE10OyS.js} +51 -49
- package/dist/Publish-BlMxKniP.js +1300 -0
- package/dist/{Recipe-BGfofjHT.js → Recipe-BhjPAidT.js} +83 -82
- package/dist/{Scheduler-BL7t8aS7.js → Scheduler-wKG3_D1f.js} +137 -136
- package/dist/{ServingSequence-CDFXMCiN.js → ServingSequence-B26BETQs.js} +63 -61
- package/dist/Setting-DBdNl3WL.js +185 -0
- package/dist/{Subcategory-CnlrVwCy.js → Subcategory-B06yMcuE.js} +147 -144
- package/dist/{Takeaway-D8FzvC2w.js → Takeaway-CFATfy-6.js} +2 -2
- package/dist/{Takeaway-BWVzwWnh.js → Takeaway-DFqOtls7.js} +17 -16
- package/dist/TakeawayList.vue_vue_type_script_setup_true_lang-CUHB-g9I.js +616 -0
- package/dist/TextChip.vue_vue_type_script_setup_true_lang-YkUjMTXo.js +32 -0
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-B8nXazx6.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DoS4Btzj.js} +281 -308
- package/dist/{Unit-Do7Tt8U8.js → Unit-B5wKBmIT.js} +90 -89
- package/dist/{Variant-D1kLupxx.js → Variant-C5ePu0za.js} +167 -174
- package/dist/{_id_-DomaBHrh.js → _id_-HRDqt6oD.js} +3 -3
- package/dist/{app-C_XNYz8_.js → app-CxJjx2ma.js} +39 -39
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/app.d.ts +35 -0
- package/dist/apps/mf-menu/src/components/GroupList.vue.d.ts +8 -0
- package/dist/apps/mf-menu/src/components/Product/OrderFromChip.vue.d.ts +6 -0
- package/dist/apps/mf-menu/src/components/Product/ProductThumbnail.vue.d.ts +6 -0
- package/dist/apps/mf-menu/src/components/ProductList.vue.d.ts +4 -2
- package/dist/apps/mf-menu/src/components/PublishList.vue.d.ts +1 -1
- package/dist/apps/mf-menu/src/components/layout/MobileXScrollable.vue.d.ts +9 -0
- package/dist/apps/mf-menu/src/components/layout/PageLayout.vue.d.ts +7 -0
- package/dist/apps/mf-menu/src/components/layout/PhoneFab.vue.d.ts +9 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{menu-compute-Did75Kp9.js → menu-compute-CQdeCEBO.js} +19 -19
- package/dist/assets/{validate-menu-DVMOLygB.js → validate-menu-BVo4fNWG.js} +14 -14
- package/dist/mf-menu-portal.css +1 -1
- package/dist/{provide-Bwf3KcOV.js → provide-BGLSDsuJ.js} +99817 -99565
- package/dist/{useActionFeedback-CXx7dOVc.js → useActionFeedback-CElXij1W.js} +1 -1
- package/package.json +1 -1
- package/dist/Catalog-BrHGEI3p.js +0 -374
- package/dist/CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-P59vHZEn.js +0 -117
- package/dist/GroupList.vue_vue_type_script_setup_true_lang-oGNs8e8f.js +0 -1807
- package/dist/PageLayout.vue_vue_type_script_setup_true_lang-B3szUH39.js +0 -41
- package/dist/ProductAttributeFilter.vue_vue_type_script_setup_true_lang-B2KdolJS.js +0 -7931
- package/dist/Publish-Dkjnls7p.js +0 -1337
- package/dist/Setting-gYZoZxQG.js +0 -179
- package/dist/TakeawayList.vue_vue_type_script_setup_true_lang-igS-FXq5.js +0 -554
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as te, computed as S, resolveComponent as g, openBlock as s, createBlock as C, unref as e, withCtx as d, createVNode as t, createElementBlock as k, withModifiers as I, createCommentVNode as y, Fragment as D, renderList as j, createElementVNode as F, withDirectives as pe, toDisplayString as U, ref as be, watch as ve, resolveDynamicComponent as _e, mergeProps as Y, createSlots as fe, normalizeClass as H, createTextVNode as J } from "vue";
|
|
2
2
|
import { RouterLink as ge } from "vue-router";
|
|
3
|
-
import { useI18n as
|
|
4
|
-
import { components as
|
|
3
|
+
import { useI18n as ue } from "@feedmepos/mf-common";
|
|
4
|
+
import { components as ee, FmButtonColorThemeVariant as G } from "@feedmepos/ui-library";
|
|
5
5
|
import { _ as ke } from "./vuedraggable-CBtQLb_S.js";
|
|
6
6
|
import { _ as L } from "./FormItem.vue_vue_type_script_setup_true_lang-C2S6QCyR.js";
|
|
7
|
-
import { _ as ye } from "./PageLayout.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
import { _ as Fe } from "./LinkProductSideSheet.vue_vue_type_script_setup_true_lang-
|
|
9
|
-
import { _ as Ce } from "./CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-
|
|
7
|
+
import { _ as ye } from "./PageLayout.vue_vue_type_script_setup_true_lang-DrhsROXo.js";
|
|
8
|
+
import { _ as Fe } from "./LinkProductSideSheet.vue_vue_type_script_setup_true_lang-Cb6nO43H.js";
|
|
9
|
+
import { _ as Ce } from "./CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-CMyubLvP.js";
|
|
10
10
|
import { _ as we } from "./SubItemTaxWarning.vue_vue_type_script_setup_true_lang-BUyK6Jaa.js";
|
|
11
|
-
import { b as
|
|
12
|
-
import { r as Ve, a as
|
|
13
|
-
import { _ as Te } from "./CatalogEditTabs.vue_vue_type_script_setup_true_lang-
|
|
14
|
-
import { u as $e } from "./useActionFeedback-
|
|
15
|
-
import { u as
|
|
16
|
-
import { R as Ue } from "./app-
|
|
11
|
+
import { b as re, r as he, u as le } from "./provide-BGLSDsuJ.js";
|
|
12
|
+
import { r as Ve, a as ae } from "./ruleValueKey-BF52PuHb.js";
|
|
13
|
+
import { _ as Te } from "./CatalogEditTabs.vue_vue_type_script_setup_true_lang-CraEwqCY.js";
|
|
14
|
+
import { u as $e } from "./useActionFeedback-CElXij1W.js";
|
|
15
|
+
import { u as oe } from "./useEditorValidation-Ctef5Bxt.js";
|
|
16
|
+
import { R as Ue } from "./app-CxJjx2ma.js";
|
|
17
17
|
const Se = { class: "flex flex-col gap-16" }, Re = { class: "flex w-full justify-between gap-16" }, Pe = {
|
|
18
18
|
key: 0,
|
|
19
19
|
class: "flex w-full [&>*]:w-full"
|
|
20
20
|
}, Me = { class: "break-all fm-typo-en-body-lg-400 line-clamp-1" }, De = {
|
|
21
21
|
key: 0,
|
|
22
22
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
23
|
-
}, Le = { class: "flex justify-end" }, Oe = /* @__PURE__ */
|
|
23
|
+
}, Le = { class: "flex justify-end" }, Oe = /* @__PURE__ */ te({
|
|
24
24
|
__name: "LinkPriceTierSection",
|
|
25
25
|
props: {
|
|
26
26
|
view: {},
|
|
@@ -28,7 +28,7 @@ const Se = { class: "flex flex-col gap-16" }, Re = { class: "flex w-full justify
|
|
|
28
28
|
issueFor: { type: Function }
|
|
29
29
|
},
|
|
30
30
|
setup(W) {
|
|
31
|
-
const T = W, { t: r } =
|
|
31
|
+
const T = W, { t: r } = ue(), A = re(), l = {
|
|
32
32
|
mounted: (u, n) => {
|
|
33
33
|
var c;
|
|
34
34
|
(c = u.querySelector("input")) == null || c.setAttribute("aria-label", n.value);
|
|
@@ -62,7 +62,7 @@ const Se = { class: "flex flex-col gap-16" }, Re = { class: "flex w-full justify
|
|
|
62
62
|
return (((n = T.view.attributeOptions.find((c) => c.key === u.attribute)) == null ? void 0 : n.values) ?? []).map((c) => ({
|
|
63
63
|
label: c.label,
|
|
64
64
|
// FmSelect needs a primitive; a value travels as its key.
|
|
65
|
-
value:
|
|
65
|
+
value: ae(c.value)
|
|
66
66
|
}));
|
|
67
67
|
}
|
|
68
68
|
function a(u) {
|
|
@@ -96,17 +96,17 @@ const Se = { class: "flex flex-col gap-16" }, Re = { class: "flex w-full justify
|
|
|
96
96
|
T.editor.setPriceTierRuleCondition(u, n, c);
|
|
97
97
|
}
|
|
98
98
|
return (u, n) => {
|
|
99
|
-
const c = g("FmRadio"), h = g("FmSelect"), N = g("FmTextField"), B = g("FmButton"),
|
|
100
|
-
return s(),
|
|
99
|
+
const c = g("FmRadio"), h = g("FmSelect"), N = g("FmTextField"), B = g("FmButton"), o = g("FmCard"), m = g("FmRadioGroup");
|
|
100
|
+
return s(), C(L, {
|
|
101
101
|
label: e(r)("menu.price_tier.link_price_tier")
|
|
102
102
|
}, {
|
|
103
103
|
default: d(() => [
|
|
104
|
-
|
|
104
|
+
t(m, {
|
|
105
105
|
"model-value": u.view.mode,
|
|
106
106
|
"onUpdate:modelValue": n[4] || (n[4] = (b) => u.editor.setPriceTierMode(b))
|
|
107
107
|
}, {
|
|
108
108
|
default: d(() => [
|
|
109
|
-
|
|
109
|
+
t(c, {
|
|
110
110
|
value: "groups",
|
|
111
111
|
label: e(r)("menu.price_tier.link_price_group"),
|
|
112
112
|
sublabel: e(r)("menu.price_tier.link_price_group_description")
|
|
@@ -117,7 +117,7 @@ const Se = { class: "flex flex-col gap-16" }, Re = { class: "flex w-full justify
|
|
|
117
117
|
onClick: n[1] || (n[1] = I(() => {
|
|
118
118
|
}, ["prevent"]))
|
|
119
119
|
}, [
|
|
120
|
-
|
|
120
|
+
t(h, {
|
|
121
121
|
"model-value": [...u.view.selected],
|
|
122
122
|
items: R.value,
|
|
123
123
|
multiselect: "",
|
|
@@ -127,7 +127,7 @@ const Se = { class: "flex flex-col gap-16" }, Re = { class: "flex w-full justify
|
|
|
127
127
|
"onUpdate:modelValue": n[0] || (n[0] = (b) => u.editor.setPriceTiers(b))
|
|
128
128
|
}, null, 8, ["model-value", "items", "placeholder", "aria-label"])
|
|
129
129
|
])) : y("", !0),
|
|
130
|
-
|
|
130
|
+
t(c, {
|
|
131
131
|
value: "rules",
|
|
132
132
|
label: e(r)("menu.price_tier.price_group_rule"),
|
|
133
133
|
sublabel: e(r)("menu.price_tier.price_group_rule_description")
|
|
@@ -138,7 +138,7 @@ const Se = { class: "flex flex-col gap-16" }, Re = { class: "flex w-full justify
|
|
|
138
138
|
onClick: n[3] || (n[3] = I(() => {
|
|
139
139
|
}, ["prevent"]))
|
|
140
140
|
}, [
|
|
141
|
-
(s(!0), k(D, null, j(u.view.rules, (b, p) => (s(),
|
|
141
|
+
(s(!0), k(D, null, j(u.view.rules, (b, p) => (s(), C(o, {
|
|
142
142
|
key: b.id,
|
|
143
143
|
class: "p-16 space-y-16",
|
|
144
144
|
variant: "outlined",
|
|
@@ -146,7 +146,7 @@ const Se = { class: "flex flex-col gap-16" }, Re = { class: "flex w-full justify
|
|
|
146
146
|
"aria-label": $(p)
|
|
147
147
|
}, {
|
|
148
148
|
default: d(() => [
|
|
149
|
-
|
|
149
|
+
t(h, {
|
|
150
150
|
label: e(r)("menu.price_tier.price_group"),
|
|
151
151
|
"label-mark": "required",
|
|
152
152
|
"model-value": b.priceTier,
|
|
@@ -159,17 +159,17 @@ const Se = { class: "flex flex-col gap-16" }, Re = { class: "flex w-full justify
|
|
|
159
159
|
"error-messages": O(`priceTierRules.${p}.priceTier`),
|
|
160
160
|
"onUpdate:modelValue": (v) => u.editor.setPriceTierRuleTier(p, v)
|
|
161
161
|
}, null, 8, ["label", "model-value", "items", "placeholder", "aria-label", "error-messages", "onUpdate:modelValue"]),
|
|
162
|
-
|
|
162
|
+
t(L, {
|
|
163
163
|
label: e(r)("menu.price_tier.restaurant_filter")
|
|
164
164
|
}, {
|
|
165
165
|
default: d(() => [
|
|
166
|
-
|
|
166
|
+
F("div", Se, [
|
|
167
167
|
(s(!0), k(D, null, j(b.conditions, (v, f) => (s(), k("div", {
|
|
168
168
|
key: f,
|
|
169
169
|
class: "flex justify-between gap-8"
|
|
170
170
|
}, [
|
|
171
|
-
|
|
172
|
-
|
|
171
|
+
F("div", Re, [
|
|
172
|
+
t(h, {
|
|
173
173
|
class: "flex w-full",
|
|
174
174
|
"model-value": v.attribute,
|
|
175
175
|
items: P.value,
|
|
@@ -184,7 +184,7 @@ const Se = { class: "flex flex-col gap-16" }, Re = { class: "flex w-full justify
|
|
|
184
184
|
values: []
|
|
185
185
|
})
|
|
186
186
|
}, null, 8, ["model-value", "items", "placeholder", "aria-label", "onUpdate:modelValue"]),
|
|
187
|
-
|
|
187
|
+
t(h, {
|
|
188
188
|
class: "flex w-full",
|
|
189
189
|
"model-value": v.operator,
|
|
190
190
|
items: q.value,
|
|
@@ -199,8 +199,8 @@ const Se = { class: "flex flex-col gap-16" }, Re = { class: "flex w-full justify
|
|
|
199
199
|
),
|
|
200
200
|
"onUpdate:modelValue": (w) => M(p, f, { operator: w })
|
|
201
201
|
}, null, 8, ["model-value", "items", "placeholder", "aria-label", "error-messages", "onUpdate:modelValue"]),
|
|
202
|
-
e(he)(v.operator) === "text" ?
|
|
203
|
-
|
|
202
|
+
e(he)(v.operator) === "text" ? pe((s(), k("div", Pe, [
|
|
203
|
+
t(N, {
|
|
204
204
|
"model-value": String(v.values[0] ?? ""),
|
|
205
205
|
placeholder: e(r)("menu.menu_setting.rule_groups.condition.value"),
|
|
206
206
|
"error-messages": O(
|
|
@@ -219,10 +219,10 @@ const Se = { class: "flex flex-col gap-16" }, Re = { class: "flex w-full justify
|
|
|
219
219
|
"menu.menu_setting.rule_groups.condition.value"
|
|
220
220
|
)
|
|
221
221
|
]
|
|
222
|
-
]) : (s(),
|
|
222
|
+
]) : (s(), C(h, {
|
|
223
223
|
key: 1,
|
|
224
224
|
class: "flex w-full",
|
|
225
|
-
"model-value": v.values.map(e(
|
|
225
|
+
"model-value": v.values.map(e(ae)),
|
|
226
226
|
items: z(v),
|
|
227
227
|
multiselect: "",
|
|
228
228
|
"hide-chips": "",
|
|
@@ -240,12 +240,12 @@ const Se = { class: "flex flex-col gap-16" }, Re = { class: "flex w-full justify
|
|
|
240
240
|
})
|
|
241
241
|
}, {
|
|
242
242
|
default: d(() => [
|
|
243
|
-
|
|
243
|
+
F("div", Me, U(a(v)), 1)
|
|
244
244
|
]),
|
|
245
245
|
_: 2
|
|
246
246
|
}, 1032, ["model-value", "items", "placeholder", "aria-label", "error-messages", "onUpdate:modelValue"]))
|
|
247
247
|
]),
|
|
248
|
-
|
|
248
|
+
t(B, {
|
|
249
249
|
variant: "tertiary",
|
|
250
250
|
"prepend-icon": "close",
|
|
251
251
|
"aria-label": V(
|
|
@@ -257,8 +257,8 @@ const Se = { class: "flex flex-col gap-16" }, Re = { class: "flex w-full justify
|
|
|
257
257
|
}, null, 8, ["aria-label", "onClick"])
|
|
258
258
|
]))), 128)),
|
|
259
259
|
b.hasUnshownConditions ? (s(), k("p", De, U(e(r)("menu.price_tier.unshown_conditions")), 1)) : y("", !0),
|
|
260
|
-
|
|
261
|
-
|
|
260
|
+
F("div", null, [
|
|
261
|
+
t(B, {
|
|
262
262
|
variant: "plain",
|
|
263
263
|
"prepend-icon": "add",
|
|
264
264
|
label: e(r)("menu.rule_groups.condition_view.add_condition"),
|
|
@@ -273,8 +273,8 @@ const Se = { class: "flex flex-col gap-16" }, Re = { class: "flex w-full justify
|
|
|
273
273
|
]),
|
|
274
274
|
_: 2
|
|
275
275
|
}, 1032, ["label"]),
|
|
276
|
-
|
|
277
|
-
|
|
276
|
+
F("div", Le, [
|
|
277
|
+
t(B, {
|
|
278
278
|
variant: "tertiary",
|
|
279
279
|
"prepend-icon": "delete",
|
|
280
280
|
"aria-label": e(r)("menu.common.labels.a11y_labelled_name", {
|
|
@@ -287,8 +287,8 @@ const Se = { class: "flex flex-col gap-16" }, Re = { class: "flex w-full justify
|
|
|
287
287
|
]),
|
|
288
288
|
_: 2
|
|
289
289
|
}, 1032, ["aria-label"]))), 128)),
|
|
290
|
-
|
|
291
|
-
|
|
290
|
+
F("div", null, [
|
|
291
|
+
t(B, {
|
|
292
292
|
label: e(r)("menu.link_product.rules.add_rule"),
|
|
293
293
|
onClick: n[2] || (n[2] = (b) => u.editor.addPriceTierRule())
|
|
294
294
|
}, null, 8, ["label"])
|
|
@@ -305,22 +305,19 @@ const Se = { class: "flex flex-col gap-16" }, Re = { class: "flex w-full justify
|
|
|
305
305
|
}), Be = {
|
|
306
306
|
key: 1,
|
|
307
307
|
role: "alert"
|
|
308
|
-
}, Ae = {
|
|
309
|
-
key: 2,
|
|
310
|
-
class: "max-w-[752px] pt-16 space-y-32"
|
|
311
|
-
}, Ee = {
|
|
308
|
+
}, Ae = ["data-test"], Ee = {
|
|
312
309
|
key: 0,
|
|
313
310
|
class: "pl-32 space-x-8"
|
|
314
311
|
}, Ne = { class: "space-y-16" }, je = { class: "space-y-16" }, ze = { class: "pl-[60px] space-y-16" }, Ge = { class: "space-x-16 flex items-center" }, Ie = { class: "flex-1 space-y-4" }, We = { class: "fm-typo-en-body-md-400" }, qe = {
|
|
315
|
-
key:
|
|
312
|
+
key: 1,
|
|
316
313
|
class: "max-w-[752px] pt-40 flex justify-end"
|
|
317
|
-
}, Ke = { class: "flex gap-8 items-center justify-start" },
|
|
314
|
+
}, Ke = { class: "flex gap-8 items-center justify-start" }, xe = {
|
|
318
315
|
key: 0,
|
|
319
316
|
class: "space-y-16"
|
|
320
|
-
},
|
|
317
|
+
}, Ye = {
|
|
321
318
|
key: 1,
|
|
322
319
|
class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
323
|
-
}, dl = /* @__PURE__ */
|
|
320
|
+
}, dl = /* @__PURE__ */ te({
|
|
324
321
|
__name: "CatalogEditor",
|
|
325
322
|
props: {
|
|
326
323
|
sdk: {},
|
|
@@ -330,39 +327,39 @@ const Se = { class: "flex flex-col gap-16" }, Re = { class: "flex w-full justify
|
|
|
330
327
|
},
|
|
331
328
|
emits: ["close"],
|
|
332
329
|
setup(W, { emit: T }) {
|
|
333
|
-
const r = W, A = T, { t: l } =
|
|
330
|
+
const r = W, A = T, { t: l } = ue(), E = re(), { run: q } = $e(), R = oe(() => r.editor), P = le(r.editor), z = le(r.picker), a = S(
|
|
334
331
|
() => P.value.status === "ready" ? P.value.value : null
|
|
335
332
|
);
|
|
336
|
-
function O(
|
|
333
|
+
function O(o) {
|
|
337
334
|
var m;
|
|
338
|
-
return (m = a.value) != null && m.priceTier ? R.issue(a.value.priceTier.fieldIssues,
|
|
335
|
+
return (m = a.value) != null && m.priceTier ? R.issue(a.value.priceTier.fieldIssues, o) : null;
|
|
339
336
|
}
|
|
340
337
|
const $ = S(
|
|
341
338
|
() => a.value ? R.issue(a.value.fieldIssues, "name") ?? a.value.nameIssue : null
|
|
342
|
-
), V =
|
|
339
|
+
), V = oe(() => {
|
|
343
340
|
var m;
|
|
344
|
-
const
|
|
345
|
-
return
|
|
341
|
+
const o = (m = a.value) == null ? void 0 : m.markupDraft;
|
|
342
|
+
return o ? o.index ?? "new" : null;
|
|
346
343
|
}), M = S(
|
|
347
344
|
() => {
|
|
348
|
-
var
|
|
349
|
-
return (
|
|
345
|
+
var o;
|
|
346
|
+
return (o = a.value) != null && o.markupDraft ? V.issue(a.value.markupFieldIssues, "percentage") ?? a.value.markupDraft.issue : null;
|
|
350
347
|
}
|
|
351
348
|
), u = S(
|
|
352
349
|
() => z.value.status === "ready" ? z.value.value : null
|
|
353
|
-
), n =
|
|
350
|
+
), n = be(!1), c = S({
|
|
354
351
|
get: () => {
|
|
355
|
-
var
|
|
356
|
-
return !!((
|
|
352
|
+
var o;
|
|
353
|
+
return !!((o = a.value) != null && o.markupDraft);
|
|
357
354
|
},
|
|
358
|
-
set: (
|
|
359
|
-
|
|
355
|
+
set: (o) => {
|
|
356
|
+
o || r.editor.cancelMarkup();
|
|
360
357
|
}
|
|
361
358
|
});
|
|
362
|
-
|
|
359
|
+
ve(
|
|
363
360
|
() => P.value.status,
|
|
364
|
-
(
|
|
365
|
-
(
|
|
361
|
+
(o) => {
|
|
362
|
+
(o === "error" || o === "unavailable") && (n.value = !1);
|
|
366
363
|
}
|
|
367
364
|
);
|
|
368
365
|
async function h() {
|
|
@@ -380,17 +377,17 @@ const Se = { class: "flex flex-col gap-16" }, Re = { class: "flex w-full justify
|
|
|
380
377
|
function N() {
|
|
381
378
|
V.submit(async () => r.editor.saveMarkup());
|
|
382
379
|
}
|
|
383
|
-
function B(
|
|
384
|
-
r.editor.setMarkupProducts(
|
|
380
|
+
function B(o) {
|
|
381
|
+
r.editor.setMarkupProducts(o), n.value = !1;
|
|
385
382
|
}
|
|
386
|
-
return (
|
|
383
|
+
return (o, m) => {
|
|
387
384
|
var Q, X, Z;
|
|
388
|
-
const b = g("FmButton"), p = g("FmTextField"), v = g("FmRadio"), f = g("FmRadioGroup"), w = g("FmCheckbox"), K = g("FmSwitch"),
|
|
385
|
+
const b = g("FmButton"), p = g("FmTextField"), v = g("FmRadio"), f = g("FmRadioGroup"), w = g("FmCheckbox"), K = g("FmSwitch"), ne = g("FmSelect"), ie = g("FmChip"), se = g("FmCard"), me = g("FmIcon"), de = g("FmStepperField"), ce = g("FmDialog");
|
|
389
386
|
return s(), k(D, null, [
|
|
390
|
-
(s(),
|
|
391
|
-
|
|
387
|
+
(s(), C(_e(o.page ? ye : "FmSideSheet"), Y(
|
|
388
|
+
o.page ? { heading: ((Q = a.value) == null ? void 0 : Q.name) ?? "", class: "xs:overflow-hidden" } : {
|
|
392
389
|
modelValue: !0,
|
|
393
|
-
isContainer: e(
|
|
390
|
+
isContainer: e(ee).FmForm,
|
|
394
391
|
isContainerProps: {
|
|
395
392
|
onValidationSuccess: h,
|
|
396
393
|
blameFormChildOnValidationFailed: !0
|
|
@@ -400,12 +397,12 @@ const Se = { class: "flex flex-col gap-16" }, Re = { class: "flex w-full justify
|
|
|
400
397
|
{
|
|
401
398
|
"onUpdate:modelValue": m[2] || (m[2] = (i) => !i && A("close"))
|
|
402
399
|
}
|
|
403
|
-
),
|
|
400
|
+
), fe({
|
|
404
401
|
"side-sheet-footer": d(() => {
|
|
405
402
|
var i;
|
|
406
403
|
return [
|
|
407
|
-
|
|
408
|
-
|
|
404
|
+
F("div", Ke, [
|
|
405
|
+
t(b, {
|
|
409
406
|
loading: ((i = a.value) == null ? void 0 : i.status) === "submitting",
|
|
410
407
|
disabled: !a.value || a.value.submit.state !== "allowed",
|
|
411
408
|
label: e(l)("menu.common.actions.add"),
|
|
@@ -413,7 +410,7 @@ const Se = { class: "flex flex-col gap-16" }, Re = { class: "flex w-full justify
|
|
|
413
410
|
type: "submit",
|
|
414
411
|
variant: "primary"
|
|
415
412
|
}, null, 8, ["loading", "disabled", "label"]),
|
|
416
|
-
|
|
413
|
+
t(b, {
|
|
417
414
|
label: e(l)("menu.common.actions.cancel"),
|
|
418
415
|
size: "lg",
|
|
419
416
|
variant: "tertiary",
|
|
@@ -423,240 +420,253 @@ const Se = { class: "flex flex-col gap-16" }, Re = { class: "flex w-full justify
|
|
|
423
420
|
];
|
|
424
421
|
}),
|
|
425
422
|
default: d(() => [
|
|
426
|
-
|
|
423
|
+
o.page ? (s(), C(Te, { key: 0 })) : y("", !0),
|
|
427
424
|
e(P).status === "error" ? (s(), k("p", Be, U(e(E)(e(P).error.message)), 1)) : y("", !0),
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
label: e(l)("menu.catalog.form.tax.manual.label"),
|
|
457
|
-
sublabel: e(l)("menu.catalog.form.tax.manual.sublabel")
|
|
458
|
-
}, null, 8, ["label", "sublabel"])
|
|
459
|
-
]),
|
|
460
|
-
_: 1
|
|
461
|
-
}, 8, ["model-value", "onUpdate:modelValue"]),
|
|
462
|
-
a.value.taxMode === "manual" ? (s(), k("div", Ee, [
|
|
463
|
-
(s(!0), k(D, null, j(a.value.taxes, (i) => (s(), F(w, {
|
|
464
|
-
key: i.systemCode,
|
|
465
|
-
"model-value": i.inclusive,
|
|
466
|
-
value: !0,
|
|
467
|
-
label: e(l)("menu.catalog.form.tax.inclusive", { code: i.systemCode }),
|
|
468
|
-
"onUpdate:modelValue": (_) => t.editor.setTaxInclusive(i.systemCode, _)
|
|
469
|
-
}, null, 8, ["model-value", "label", "onUpdate:modelValue"]))), 128))
|
|
470
|
-
])) : y("", !0)
|
|
471
|
-
]),
|
|
472
|
-
_: 1
|
|
473
|
-
}, 8, ["label"]),
|
|
474
|
-
a.value.subItemTax ? (s(), F(L, {
|
|
475
|
-
key: 0,
|
|
476
|
-
label: e(l)("menu.menu_setting.sub_item_tax.title")
|
|
477
|
-
}, {
|
|
478
|
-
default: d(() => [
|
|
479
|
-
C("div", Ne, [
|
|
480
|
-
o(f, {
|
|
481
|
-
"model-value": a.value.subItemTax.choice,
|
|
482
|
-
"onUpdate:modelValue": t.editor.setSubItemTaxChoice
|
|
425
|
+
F("div", {
|
|
426
|
+
class: H(
|
|
427
|
+
o.page ? "pt-16 xs:flex-1 xs:overflow-scroll xs:px-16 xs:py-16" : "contents"
|
|
428
|
+
),
|
|
429
|
+
"data-test": o.page ? "catalog-setting-body" : void 0
|
|
430
|
+
}, [
|
|
431
|
+
a.value ? (s(), k("div", {
|
|
432
|
+
key: 0,
|
|
433
|
+
class: H(["max-w-[752px] space-y-32", { "pt-16": !o.page }])
|
|
434
|
+
}, [
|
|
435
|
+
t(ke, {
|
|
436
|
+
title: e(l)("menu.catalog.detail")
|
|
437
|
+
}, {
|
|
438
|
+
default: d(() => [
|
|
439
|
+
t(p, Y({
|
|
440
|
+
"model-value": a.value.name,
|
|
441
|
+
autofocus: "",
|
|
442
|
+
label: e(l)("menu.catalog.form.name"),
|
|
443
|
+
"error-messages": $.value ? [e(E)($.value)] : []
|
|
444
|
+
}, e(R).field("name", o.editor.setName)), null, 16, ["model-value", "label", "error-messages"]),
|
|
445
|
+
t(L, {
|
|
446
|
+
class: "pt-8",
|
|
447
|
+
label: e(l)("menu.catalog.form.tax.title")
|
|
448
|
+
}, {
|
|
449
|
+
default: d(() => [
|
|
450
|
+
t(f, {
|
|
451
|
+
"model-value": a.value.taxMode,
|
|
452
|
+
"onUpdate:modelValue": o.editor.setTaxMode
|
|
483
453
|
}, {
|
|
484
454
|
default: d(() => [
|
|
485
|
-
|
|
486
|
-
value: "
|
|
487
|
-
label: e(l)("menu.catalog.form.
|
|
488
|
-
sublabel: e(l)(
|
|
489
|
-
a.value.subItemTax.inherited === "own" ? "menu.catalog.form.sub_item_tax.inherit.current_own" : "menu.catalog.form.sub_item_tax.inherit.current_parent"
|
|
490
|
-
)
|
|
491
|
-
}, null, 8, ["label", "sublabel"]),
|
|
492
|
-
o(v, {
|
|
493
|
-
value: "parent",
|
|
494
|
-
label: e(l)("menu.catalog.form.sub_item_tax.parent.label"),
|
|
495
|
-
sublabel: e(l)("menu.catalog.form.sub_item_tax.parent.sublabel")
|
|
455
|
+
t(v, {
|
|
456
|
+
value: "automatic",
|
|
457
|
+
label: e(l)("menu.catalog.form.tax.auto.label"),
|
|
458
|
+
sublabel: e(l)("menu.catalog.form.tax.auto.sublabel")
|
|
496
459
|
}, null, 8, ["label", "sublabel"]),
|
|
497
|
-
|
|
498
|
-
value: "
|
|
499
|
-
label: e(l)("menu.catalog.form.
|
|
500
|
-
sublabel: e(l)("menu.catalog.form.
|
|
460
|
+
t(v, {
|
|
461
|
+
value: "manual",
|
|
462
|
+
label: e(l)("menu.catalog.form.tax.manual.label"),
|
|
463
|
+
sublabel: e(l)("menu.catalog.form.tax.manual.sublabel")
|
|
501
464
|
}, null, 8, ["label", "sublabel"])
|
|
502
465
|
]),
|
|
503
466
|
_: 1
|
|
504
467
|
}, 8, ["model-value", "onUpdate:modelValue"]),
|
|
505
|
-
a.value.
|
|
506
|
-
|
|
468
|
+
a.value.taxMode === "manual" ? (s(), k("div", Ee, [
|
|
469
|
+
(s(!0), k(D, null, j(a.value.taxes, (i) => (s(), C(w, {
|
|
470
|
+
key: i.systemCode,
|
|
471
|
+
"model-value": i.inclusive,
|
|
472
|
+
value: !0,
|
|
473
|
+
label: e(l)("menu.catalog.form.tax.inclusive", { code: i.systemCode }),
|
|
474
|
+
"onUpdate:modelValue": (_) => o.editor.setTaxInclusive(i.systemCode, _)
|
|
475
|
+
}, null, 8, ["model-value", "label", "onUpdate:modelValue"]))), 128))
|
|
476
|
+
])) : y("", !0)
|
|
477
|
+
]),
|
|
478
|
+
_: 1
|
|
479
|
+
}, 8, ["label"]),
|
|
480
|
+
a.value.subItemTax ? (s(), C(L, {
|
|
481
|
+
key: 0,
|
|
482
|
+
label: e(l)("menu.menu_setting.sub_item_tax.title")
|
|
483
|
+
}, {
|
|
484
|
+
default: d(() => [
|
|
485
|
+
F("div", Ne, [
|
|
486
|
+
t(f, {
|
|
487
|
+
"model-value": a.value.subItemTax.choice,
|
|
488
|
+
"onUpdate:modelValue": o.editor.setSubItemTaxChoice
|
|
489
|
+
}, {
|
|
490
|
+
default: d(() => [
|
|
491
|
+
t(v, {
|
|
492
|
+
value: "inherit",
|
|
493
|
+
label: e(l)("menu.catalog.form.sub_item_tax.inherit.label"),
|
|
494
|
+
sublabel: e(l)(
|
|
495
|
+
a.value.subItemTax.inherited === "own" ? "menu.catalog.form.sub_item_tax.inherit.current_own" : "menu.catalog.form.sub_item_tax.inherit.current_parent"
|
|
496
|
+
)
|
|
497
|
+
}, null, 8, ["label", "sublabel"]),
|
|
498
|
+
t(v, {
|
|
499
|
+
value: "parent",
|
|
500
|
+
label: e(l)("menu.catalog.form.sub_item_tax.parent.label"),
|
|
501
|
+
sublabel: e(l)("menu.catalog.form.sub_item_tax.parent.sublabel")
|
|
502
|
+
}, null, 8, ["label", "sublabel"]),
|
|
503
|
+
t(v, {
|
|
504
|
+
value: "own",
|
|
505
|
+
label: e(l)("menu.catalog.form.sub_item_tax.own.label"),
|
|
506
|
+
sublabel: e(l)("menu.catalog.form.sub_item_tax.own.sublabel")
|
|
507
|
+
}, null, 8, ["label", "sublabel"])
|
|
508
|
+
]),
|
|
509
|
+
_: 1
|
|
510
|
+
}, 8, ["model-value", "onUpdate:modelValue"]),
|
|
511
|
+
a.value.subItemTax.resolved === "own" ? (s(), C(we, { key: 0 })) : y("", !0)
|
|
512
|
+
])
|
|
513
|
+
]),
|
|
514
|
+
_: 1
|
|
515
|
+
}, 8, ["label"])) : y("", !0),
|
|
516
|
+
a.value.statutoryChargeWaivers.length > 0 ? (s(), C(L, {
|
|
517
|
+
key: 1,
|
|
518
|
+
label: e(l)("menu.catalog.form.statutory_charges.title")
|
|
519
|
+
}, {
|
|
520
|
+
default: d(() => [
|
|
521
|
+
F("div", je, [
|
|
522
|
+
(s(!0), k(D, null, j(a.value.statutoryChargeWaivers, (i) => (s(), C(K, {
|
|
523
|
+
key: i.code,
|
|
524
|
+
"model-value": i.waived,
|
|
525
|
+
label: e(l)("menu.catalog.form.statutory_charges.waive", {
|
|
526
|
+
name: i.name
|
|
527
|
+
}),
|
|
528
|
+
sublabel: e(l)("menu.catalog.form.statutory_charges.sublabel"),
|
|
529
|
+
"label-placement": "right",
|
|
530
|
+
"onUpdate:modelValue": (_) => o.editor.setStatutoryChargeWaived(i.code, _)
|
|
531
|
+
}, null, 8, ["model-value", "label", "sublabel", "onUpdate:modelValue"]))), 128))
|
|
532
|
+
])
|
|
533
|
+
]),
|
|
534
|
+
_: 1
|
|
535
|
+
}, 8, ["label"])) : y("", !0)
|
|
536
|
+
]),
|
|
537
|
+
_: 1
|
|
538
|
+
}, 8, ["title"]),
|
|
539
|
+
a.value.advanced.state === "allowed" ? (s(), k(D, { key: 0 }, [
|
|
540
|
+
t(L, {
|
|
541
|
+
label: e(l)("menu.catalog.form.link.title")
|
|
542
|
+
}, {
|
|
543
|
+
default: d(() => [
|
|
544
|
+
t(K, {
|
|
545
|
+
"model-value": a.value.autoLink,
|
|
546
|
+
label: e(l)("menu.catalog.form.link.auto_link.label"),
|
|
547
|
+
sublabel: e(l)("menu.catalog.form.link.auto_link.sublabel"),
|
|
548
|
+
"label-placement": "right",
|
|
549
|
+
"onUpdate:modelValue": o.editor.setAutoLink
|
|
550
|
+
}, null, 8, ["model-value", "label", "sublabel", "onUpdate:modelValue"]),
|
|
551
|
+
a.value.autoLink ? (s(), C(ne, {
|
|
552
|
+
key: 0,
|
|
553
|
+
class: "ml-[60px]",
|
|
554
|
+
"aria-label": e(l)("menu.catalog.form.link.title"),
|
|
555
|
+
"model-value": a.value.orderFrom,
|
|
556
|
+
items: [
|
|
557
|
+
{
|
|
558
|
+
label: e(l)("menu.catalog.form.link.options.all"),
|
|
559
|
+
value: "ALL"
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
label: e(l)("menu.catalog.form.link.options.pos_only"),
|
|
563
|
+
value: "POS_ONLY"
|
|
564
|
+
}
|
|
565
|
+
],
|
|
566
|
+
"onUpdate:modelValue": o.editor.setOrderFrom
|
|
567
|
+
}, null, 8, ["aria-label", "model-value", "items", "onUpdate:modelValue"])) : y("", !0)
|
|
507
568
|
]),
|
|
508
569
|
_: 1
|
|
509
|
-
}, 8, ["label"])
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
label: e(l)("menu.catalog.form.statutory_charges.title")
|
|
570
|
+
}, 8, ["label"]),
|
|
571
|
+
t(L, {
|
|
572
|
+
label: e(l)("menu.catalog.form.markup.title")
|
|
513
573
|
}, {
|
|
514
574
|
default: d(() => [
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
575
|
+
t(K, {
|
|
576
|
+
"model-value": a.value.markupEnabled,
|
|
577
|
+
label: e(l)("menu.catalog.form.markup.auto.label"),
|
|
578
|
+
sublabel: e(l)("menu.catalog.form.markup.auto.sublabel"),
|
|
579
|
+
"label-placement": "right",
|
|
580
|
+
"onUpdate:modelValue": o.editor.setMarkupEnabled
|
|
581
|
+
}, null, 8, ["model-value", "label", "sublabel", "onUpdate:modelValue"]),
|
|
582
|
+
F("div", ze, [
|
|
583
|
+
t(b, {
|
|
584
|
+
variant: "secondary",
|
|
585
|
+
"text-color": e(G).ColorPrimary,
|
|
586
|
+
"border-color": e(G).ColorPrimary,
|
|
587
|
+
label: e(l)("menu.catalog.form.markup.add"),
|
|
588
|
+
"prepend-icon": "add",
|
|
589
|
+
onClick: m[0] || (m[0] = (i) => o.editor.beginMarkup())
|
|
590
|
+
}, null, 8, ["text-color", "border-color", "label"]),
|
|
591
|
+
(s(!0), k(D, null, j(a.value.markups, (i, _) => (s(), C(se, {
|
|
592
|
+
key: _,
|
|
593
|
+
class: "py-12 px-16 cursor-pointer",
|
|
594
|
+
role: "row",
|
|
595
|
+
variant: "outlined",
|
|
596
|
+
onClick: (x) => o.editor.beginMarkup(_)
|
|
597
|
+
}, {
|
|
598
|
+
default: d(() => [
|
|
599
|
+
F("div", Ge, [
|
|
600
|
+
F("div", Ie, [
|
|
601
|
+
t(ie, { class: "text-fm-color-typo-info bg-fm-color-system-info-100 font-semibold" }, {
|
|
602
|
+
default: d(() => [
|
|
603
|
+
J(U(e(l)("menu.catalog.form.markup.percentage", {
|
|
604
|
+
value: i.percentage
|
|
605
|
+
})), 1)
|
|
606
|
+
]),
|
|
607
|
+
_: 2
|
|
608
|
+
}, 1024),
|
|
609
|
+
t(b, {
|
|
610
|
+
class: "fm-typo-en-body-lg-400",
|
|
611
|
+
onClick: I((x) => o.editor.beginMarkup(_), ["stop"])
|
|
612
|
+
}, {
|
|
613
|
+
default: d(() => [
|
|
614
|
+
J(U(e(l)("menu.catalog.form.markup.config", {
|
|
615
|
+
number: _ + 1
|
|
616
|
+
})), 1)
|
|
617
|
+
]),
|
|
618
|
+
_: 2
|
|
619
|
+
}, 1032, ["onClick"]),
|
|
620
|
+
F("p", We, U(i.productCount === null ? e(l)("menu.catalog.form.markup.all_items") : e(l)("menu.catalog.form.markup.products", {
|
|
621
|
+
count: i.productCount
|
|
622
|
+
})), 1)
|
|
623
|
+
]),
|
|
624
|
+
t(b, {
|
|
625
|
+
variant: "tertiary",
|
|
626
|
+
"prepend-icon": "delete",
|
|
627
|
+
"aria-label": e(l)("menu.catalog.remove_markup"),
|
|
628
|
+
onClick: I((x) => o.editor.removeMarkup(_), ["stop"])
|
|
629
|
+
}, null, 8, ["aria-label", "onClick"])
|
|
630
|
+
])
|
|
631
|
+
]),
|
|
632
|
+
_: 2
|
|
633
|
+
}, 1032, ["onClick"]))), 128))
|
|
526
634
|
])
|
|
527
635
|
]),
|
|
528
636
|
_: 1
|
|
529
|
-
}, 8, ["label"])
|
|
530
|
-
]),
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
},
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
"model-value": a.value.orderFrom,
|
|
550
|
-
items: [
|
|
551
|
-
{ label: e(l)("menu.catalog.form.link.options.all"), value: "ALL" },
|
|
552
|
-
{
|
|
553
|
-
label: e(l)("menu.catalog.form.link.options.pos_only"),
|
|
554
|
-
value: "POS_ONLY"
|
|
555
|
-
}
|
|
556
|
-
],
|
|
557
|
-
"onUpdate:modelValue": t.editor.setOrderFrom
|
|
558
|
-
}, null, 8, ["aria-label", "model-value", "items", "onUpdate:modelValue"])) : y("", !0)
|
|
559
|
-
]),
|
|
560
|
-
_: 1
|
|
561
|
-
}, 8, ["label"]),
|
|
562
|
-
o(L, {
|
|
563
|
-
label: e(l)("menu.catalog.form.markup.title")
|
|
564
|
-
}, {
|
|
565
|
-
default: d(() => [
|
|
566
|
-
o(K, {
|
|
567
|
-
"model-value": a.value.markupEnabled,
|
|
568
|
-
label: e(l)("menu.catalog.form.markup.auto.label"),
|
|
569
|
-
sublabel: e(l)("menu.catalog.form.markup.auto.sublabel"),
|
|
570
|
-
"label-placement": "right",
|
|
571
|
-
"onUpdate:modelValue": t.editor.setMarkupEnabled
|
|
572
|
-
}, null, 8, ["model-value", "label", "sublabel", "onUpdate:modelValue"]),
|
|
573
|
-
C("div", ze, [
|
|
574
|
-
o(b, {
|
|
575
|
-
variant: "secondary",
|
|
576
|
-
"text-color": e(G).ColorPrimary,
|
|
577
|
-
"border-color": e(G).ColorPrimary,
|
|
578
|
-
label: e(l)("menu.catalog.form.markup.add"),
|
|
579
|
-
"prepend-icon": "add",
|
|
580
|
-
onClick: m[0] || (m[0] = (i) => t.editor.beginMarkup())
|
|
581
|
-
}, null, 8, ["text-color", "border-color", "label"]),
|
|
582
|
-
(s(!0), k(D, null, j(a.value.markups, (i, _) => (s(), F(ie, {
|
|
583
|
-
key: _,
|
|
584
|
-
class: "py-12 px-16 cursor-pointer",
|
|
585
|
-
role: "row",
|
|
586
|
-
variant: "outlined",
|
|
587
|
-
onClick: (Y) => t.editor.beginMarkup(_)
|
|
588
|
-
}, {
|
|
589
|
-
default: d(() => [
|
|
590
|
-
C("div", Ge, [
|
|
591
|
-
C("div", Ie, [
|
|
592
|
-
o(ne, { class: "text-fm-color-typo-info bg-fm-color-system-info-100 font-semibold" }, {
|
|
593
|
-
default: d(() => [
|
|
594
|
-
J(U(e(l)("menu.catalog.form.markup.percentage", {
|
|
595
|
-
value: i.percentage
|
|
596
|
-
})), 1)
|
|
597
|
-
]),
|
|
598
|
-
_: 2
|
|
599
|
-
}, 1024),
|
|
600
|
-
o(b, {
|
|
601
|
-
class: "fm-typo-en-body-lg-400",
|
|
602
|
-
onClick: I((Y) => t.editor.beginMarkup(_), ["stop"])
|
|
603
|
-
}, {
|
|
604
|
-
default: d(() => [
|
|
605
|
-
J(U(e(l)("menu.catalog.form.markup.config", {
|
|
606
|
-
number: _ + 1
|
|
607
|
-
})), 1)
|
|
608
|
-
]),
|
|
609
|
-
_: 2
|
|
610
|
-
}, 1032, ["onClick"]),
|
|
611
|
-
C("p", We, U(i.productCount === null ? e(l)("menu.catalog.form.markup.all_items") : e(l)("menu.catalog.form.markup.products", {
|
|
612
|
-
count: i.productCount
|
|
613
|
-
})), 1)
|
|
614
|
-
]),
|
|
615
|
-
o(b, {
|
|
616
|
-
variant: "tertiary",
|
|
617
|
-
"prepend-icon": "delete",
|
|
618
|
-
"aria-label": e(l)("menu.catalog.remove_markup"),
|
|
619
|
-
onClick: I((Y) => t.editor.removeMarkup(_), ["stop"])
|
|
620
|
-
}, null, 8, ["aria-label", "onClick"])
|
|
621
|
-
])
|
|
622
|
-
]),
|
|
623
|
-
_: 2
|
|
624
|
-
}, 1032, ["onClick"]))), 128))
|
|
625
|
-
])
|
|
626
|
-
]),
|
|
627
|
-
_: 1
|
|
628
|
-
}, 8, ["label"])
|
|
629
|
-
], 64)) : y("", !0),
|
|
630
|
-
a.value.priceTier ? (s(), F(Oe, {
|
|
631
|
-
key: 1,
|
|
632
|
-
view: a.value.priceTier,
|
|
633
|
-
editor: t.editor,
|
|
634
|
-
"issue-for": O
|
|
635
|
-
}, null, 8, ["view", "editor"])) : y("", !0)
|
|
636
|
-
])) : y("", !0),
|
|
637
|
-
t.page && a.value ? (s(), k("div", qe, [
|
|
638
|
-
o(b, {
|
|
639
|
-
loading: a.value.status === "submitting",
|
|
640
|
-
disabled: a.value.submit.state !== "allowed",
|
|
641
|
-
label: e(l)("menu.common.actions.save"),
|
|
642
|
-
size: "lg",
|
|
643
|
-
variant: "primary",
|
|
644
|
-
onClick: h
|
|
645
|
-
}, null, 8, ["loading", "disabled", "label"])
|
|
646
|
-
])) : y("", !0)
|
|
637
|
+
}, 8, ["label"])
|
|
638
|
+
], 64)) : y("", !0),
|
|
639
|
+
a.value.priceTier ? (s(), C(Oe, {
|
|
640
|
+
key: 1,
|
|
641
|
+
view: a.value.priceTier,
|
|
642
|
+
editor: o.editor,
|
|
643
|
+
"issue-for": O
|
|
644
|
+
}, null, 8, ["view", "editor"])) : y("", !0)
|
|
645
|
+
], 2)) : y("", !0),
|
|
646
|
+
o.page && a.value ? (s(), k("div", qe, [
|
|
647
|
+
t(b, {
|
|
648
|
+
loading: a.value.status === "submitting",
|
|
649
|
+
disabled: a.value.submit.state !== "allowed",
|
|
650
|
+
label: e(l)("menu.common.actions.save"),
|
|
651
|
+
size: "lg",
|
|
652
|
+
variant: "primary",
|
|
653
|
+
onClick: h
|
|
654
|
+
}, null, 8, ["loading", "disabled", "label"])
|
|
655
|
+
])) : y("", !0)
|
|
656
|
+
], 10, Ae)
|
|
647
657
|
]),
|
|
648
658
|
_: 2
|
|
649
659
|
}, [
|
|
650
|
-
|
|
660
|
+
o.page ? {
|
|
651
661
|
name: "prepend-heading",
|
|
652
662
|
fn: d(() => [
|
|
653
|
-
|
|
663
|
+
t(e(ge), {
|
|
654
664
|
to: { name: e(Ue).CATALOG },
|
|
655
665
|
class: "mr-8",
|
|
656
666
|
title: e(l)("menu.catalog.edit.back")
|
|
657
667
|
}, {
|
|
658
668
|
default: d(() => [
|
|
659
|
-
|
|
669
|
+
t(b, {
|
|
660
670
|
"aria-label": e(l)("menu.catalog.edit.back"),
|
|
661
671
|
"prepend-icon": "arrow_back",
|
|
662
672
|
variant: "tertiary"
|
|
@@ -667,18 +677,18 @@ const Se = { class: "flex flex-col gap-16" }, Re = { class: "flex w-full justify
|
|
|
667
677
|
]),
|
|
668
678
|
key: "0"
|
|
669
679
|
} : void 0,
|
|
670
|
-
|
|
680
|
+
o.page ? {
|
|
671
681
|
name: "append-heading",
|
|
672
682
|
fn: d(() => [
|
|
673
|
-
|
|
683
|
+
t(Ce, { sdk: o.sdk }, null, 8, ["sdk"])
|
|
674
684
|
]),
|
|
675
685
|
key: "1"
|
|
676
686
|
} : void 0
|
|
677
687
|
]), 1040)),
|
|
678
|
-
|
|
688
|
+
t(ce, {
|
|
679
689
|
modelValue: c.value,
|
|
680
690
|
"onUpdate:modelValue": m[6] || (m[6] = (i) => c.value = i),
|
|
681
|
-
"is-component": e(
|
|
691
|
+
"is-component": e(ee).FmForm,
|
|
682
692
|
"is-component-props": { onValidationSuccess: N }
|
|
683
693
|
}, {
|
|
684
694
|
"dialog-header": d(() => {
|
|
@@ -690,13 +700,13 @@ const Se = { class: "flex flex-col gap-16" }, Re = { class: "flex w-full justify
|
|
|
690
700
|
"dialog-footer": d(() => {
|
|
691
701
|
var i, _;
|
|
692
702
|
return [
|
|
693
|
-
|
|
703
|
+
t(b, {
|
|
694
704
|
class: "sm:w-full xs:w-full ml-auto",
|
|
695
705
|
label: e(l)("menu.common.actions.cancel"),
|
|
696
706
|
variant: "tertiary",
|
|
697
|
-
onClick: m[5] || (m[5] = (
|
|
707
|
+
onClick: m[5] || (m[5] = (x) => o.editor.cancelMarkup())
|
|
698
708
|
}, null, 8, ["label"]),
|
|
699
|
-
|
|
709
|
+
t(b, {
|
|
700
710
|
label: ((_ = (i = a.value) == null ? void 0 : i.markupDraft) == null ? void 0 : _.index) === null ? e(l)("menu.common.actions.add") : e(l)("menu.common.actions.update"),
|
|
701
711
|
class: "sm:w-full xs:w-full",
|
|
702
712
|
size: "md",
|
|
@@ -708,8 +718,8 @@ const Se = { class: "flex flex-col gap-16" }, Re = { class: "flex w-full justify
|
|
|
708
718
|
default: d(() => {
|
|
709
719
|
var i;
|
|
710
720
|
return [
|
|
711
|
-
(i = a.value) != null && i.markupDraft ? (s(), k("div",
|
|
712
|
-
|
|
721
|
+
(i = a.value) != null && i.markupDraft ? (s(), k("div", xe, [
|
|
722
|
+
t(de, Y(
|
|
713
723
|
{
|
|
714
724
|
"model-value": a.value.markupDraft.percentage,
|
|
715
725
|
decimal: 0,
|
|
@@ -719,25 +729,25 @@ const Se = { class: "flex flex-col gap-16" }, Re = { class: "flex w-full justify
|
|
|
719
729
|
placeholder: e(l)("menu.markup.dialog.fields.percentage.placeholder"),
|
|
720
730
|
"error-messages": M.value ? [e(E)(M.value)] : []
|
|
721
731
|
},
|
|
722
|
-
e(V).field("percentage",
|
|
732
|
+
e(V).field("percentage", o.editor.setMarkupPercentage)
|
|
723
733
|
), {
|
|
724
734
|
prepend: d(() => [
|
|
725
|
-
|
|
735
|
+
t(me, { name: "percent" })
|
|
726
736
|
]),
|
|
727
737
|
_: 1
|
|
728
738
|
}, 16, ["model-value", "label", "placeholder", "error-messages"]),
|
|
729
|
-
|
|
739
|
+
t(f, {
|
|
730
740
|
"model-value": a.value.markupDraft.productIds === null ? "all" : "custom",
|
|
731
741
|
class: "space-y-8",
|
|
732
|
-
"onUpdate:modelValue": m[3] || (m[3] = (_) =>
|
|
742
|
+
"onUpdate:modelValue": m[3] || (m[3] = (_) => o.editor.setMarkupProducts(_ === "all" ? null : []))
|
|
733
743
|
}, {
|
|
734
744
|
default: d(() => [
|
|
735
|
-
|
|
745
|
+
t(v, {
|
|
736
746
|
value: "all",
|
|
737
747
|
"aria-label": e(l)("menu.markup.dialog.options.all"),
|
|
738
748
|
label: e(l)("menu.markup.dialog.options.all")
|
|
739
749
|
}, null, 8, ["aria-label", "label"]),
|
|
740
|
-
|
|
750
|
+
t(v, {
|
|
741
751
|
value: "custom",
|
|
742
752
|
"aria-label": e(l)("menu.markup.dialog.options.custom"),
|
|
743
753
|
label: e(l)("menu.markup.dialog.options.custom")
|
|
@@ -745,10 +755,10 @@ const Se = { class: "flex flex-col gap-16" }, Re = { class: "flex w-full justify
|
|
|
745
755
|
]),
|
|
746
756
|
_: 1
|
|
747
757
|
}, 8, ["model-value"]),
|
|
748
|
-
|
|
749
|
-
class:
|
|
758
|
+
F("div", {
|
|
759
|
+
class: H(["ml-32 mt-16 space-y-8", { "pb-8": a.value.markupDraft.productIds !== null }])
|
|
750
760
|
}, [
|
|
751
|
-
a.value.markupDraft.productIds !== null ? (s(),
|
|
761
|
+
a.value.markupDraft.productIds !== null ? (s(), C(b, {
|
|
752
762
|
key: 0,
|
|
753
763
|
variant: "secondary",
|
|
754
764
|
"text-color": e(G).ColorPrimary,
|
|
@@ -758,7 +768,7 @@ const Se = { class: "flex flex-col gap-16" }, Re = { class: "flex w-full justify
|
|
|
758
768
|
"prepend-icon": "link",
|
|
759
769
|
onClick: m[4] || (m[4] = (_) => n.value = !0)
|
|
760
770
|
}, null, 8, ["text-color", "border-color", "aria-label", "label"])) : y("", !0),
|
|
761
|
-
a.value.markupDraft.productCount ? (s(), k("p",
|
|
771
|
+
a.value.markupDraft.productCount ? (s(), k("p", Ye, U(e(l)("menu.markup.dialog.products.count", {
|
|
762
772
|
count: a.value.markupDraft.productCount
|
|
763
773
|
})), 1)) : y("", !0)
|
|
764
774
|
], 2)
|
|
@@ -767,7 +777,7 @@ const Se = { class: "flex flex-col gap-16" }, Re = { class: "flex w-full justify
|
|
|
767
777
|
}),
|
|
768
778
|
_: 1
|
|
769
779
|
}, 8, ["modelValue", "is-component", "is-component-props"]),
|
|
770
|
-
|
|
780
|
+
t(Fe, {
|
|
771
781
|
modelValue: n.value,
|
|
772
782
|
"onUpdate:modelValue": m[7] || (m[7] = (i) => n.value = i),
|
|
773
783
|
catalogue: u.value,
|