@feedmepos/mf-menu-portal 1.0.3 → 1.0.4-dev.2
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-J3RVoKQ5.js → App-DtX4DyDA.js} +3 -3
- package/dist/{BindingTable.vue_vue_type_script_setup_true_lang-DCAnIih4.js → BindingTable.vue_vue_type_script_setup_true_lang-BJN8ajuD.js} +1 -1
- package/dist/{Catalog-BejlUEvv.js → Catalog-Dly_r1yA.js} +4 -4
- package/dist/{CatalogBinding-ToZwXCle.js → CatalogBinding-CNG4YcVq.js} +3 -3
- package/dist/{CatalogEditTabs.vue_vue_type_script_setup_true_lang-sh6KJ-EY.js → CatalogEditTabs.vue_vue_type_script_setup_true_lang-Cy2culdR.js} +3 -3
- package/dist/{CatalogEditor.vue_vue_type_script_setup_true_lang-BPtM4nXy.js → CatalogEditor.vue_vue_type_script_setup_true_lang-Byp1db9_.js} +166 -129
- package/dist/{CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-9fPdVZUD.js → CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-4EZ4yM_N.js} +3 -3
- package/dist/{Category-BCAQCVoM.js → Category-BS-vFDYy.js} +2 -2
- package/dist/{Category-DADvqueJ.js → Category-Dz1yFYyY.js} +5 -5
- package/dist/{CategoryList.vue_vue_type_script_setup_true_lang-DBeo7DOG.js → CategoryList.vue_vue_type_script_setup_true_lang-CrHYjrTn.js} +4 -4
- package/dist/{CookingGuide-W7VGoWSH.js → CookingGuide-CmbvWFgp.js} +4 -4
- package/dist/{Group-ICYE7rPa.js → Group-B7s-vPXb.js} +5 -5
- package/dist/{Group-BejasRr9.js → Group-BRmWZnHh.js} +2 -2
- package/dist/{GroupList.vue_vue_type_script_setup_true_lang-1akgthxd.js → GroupList.vue_vue_type_script_setup_true_lang-CWr52_a-.js} +5 -5
- package/dist/{Ingredient-LwvminU_.js → Ingredient-BMAlctE4.js} +3 -3
- package/dist/{LinkProductSideSheet.vue_vue_type_script_setup_true_lang-DsfztmtZ.js → LinkProductSideSheet.vue_vue_type_script_setup_true_lang-CR99740r.js} +1 -1
- package/dist/{MenuSetting-3Dtgy65g.js → MenuSetting-Ci7V_Jxn.js} +250 -244
- package/dist/{OrderPacing-BK_leUo8.js → OrderPacing-Bz5kn6DY.js} +4 -4
- package/dist/{OrderPacingFields.vue_vue_type_script_setup_true_lang-gX_Qlohh.js → OrderPacingFields.vue_vue_type_script_setup_true_lang-NCH-SrZU.js} +1 -1
- package/dist/{Preview-CyAyGgjc.js → Preview-BBGNaj1F.js} +1 -1
- package/dist/{PriceTierNotice.vue_vue_type_script_setup_true_lang-V_sRz-H2.js → PriceTierNotice.vue_vue_type_script_setup_true_lang-BXJDpDCm.js} +1 -1
- package/dist/{PrintRoute-D78I2kvG.js → PrintRoute-BnARWdR2.js} +3 -3
- package/dist/{Product-BytLdnJk.js → Product-DqN0NFUU.js} +4 -4
- package/dist/{ProductEditorHost.vue_vue_type_script_setup_true_lang-C55TBdoM.js → ProductEditorHost.vue_vue_type_script_setup_true_lang-Fkiw4lZp.js} +2 -2
- package/dist/{ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-CP6pVd3b.js → ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-DryxrG-x.js} +411 -400
- package/dist/{ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-DPr_ggGs.js → ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-CNWCT1OB.js} +1 -1
- package/dist/{ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-DytFH22m.js → ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-BoQ9mVPY.js} +1304 -1298
- package/dist/{ProductInternalTools-D8q06kTk.js → ProductInternalTools-CC3SWSlT.js} +2 -2
- package/dist/{ProductInventoryDialog-CnlW8RYu.js → ProductInventoryDialog-SAhsVekx.js} +1 -1
- package/dist/{ProductInventoryDialog.vue_vue_type_script_setup_true_lang-DUOZ92Tr.js → ProductInventoryDialog.vue_vue_type_script_setup_true_lang-BB8UIIsW.js} +1 -1
- package/dist/{ProductList.vue_vue_type_script_setup_true_lang-C0aUtXqT.js → ProductList.vue_vue_type_script_setup_true_lang-BDnTs366.js} +8 -8
- package/dist/{ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-zAkoecAN.js → ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-BMDSkfcn.js} +1 -1
- package/dist/{Products-BCabgmkJ.js → Products-Cn6j1DOQ.js} +3 -3
- package/dist/{Publish-UO6YBcFb.js → Publish-BPJhG39B.js} +3 -3
- package/dist/{Recipe-JH7iwsdI.js → Recipe-mt1vec5-.js} +3 -3
- package/dist/{Scheduler-CA1OhexS.js → Scheduler-DlaSVACJ.js} +3 -3
- package/dist/{ServingSequence-21gF9ntN.js → ServingSequence-Cr1REWZP.js} +2 -2
- package/dist/{Setting-BX0qJlzw.js → Setting-CyCp2uw4.js} +61 -55
- package/dist/SubItemTaxSwitch.vue_vue_type_script_setup_true_lang-DIFXPxna.js +37 -0
- package/dist/SubItemTaxWarning.vue_vue_type_script_setup_true_lang-BUyK6Jaa.js +27 -0
- package/dist/{Subcategory-BZ00Mb8G.js → Subcategory-kuB7gYvc.js} +2 -2
- package/dist/{Takeaway-DNGqyyqw.js → Takeaway-sVVykWDg.js} +2 -2
- package/dist/{Takeaway-gJuu6vRa.js → Takeaway-tYHCAXYU.js} +5 -5
- package/dist/{TakeawayList.vue_vue_type_script_setup_true_lang-B4yiJaSZ.js → TakeawayList.vue_vue_type_script_setup_true_lang-CV24v8Zg.js} +3 -3
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BbzBa74b.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Dz-Chgek.js} +6 -6
- package/dist/{Unit-DXvxR4og.js → Unit-BSOvZxRy.js} +2 -2
- package/dist/{Variant-DkQdWFVU.js → Variant-BNnR5rLv.js} +3 -3
- package/dist/{_id_-B7VR3tAc.js → _id_-a9ZtdjtT.js} +3 -3
- package/dist/{app-DFQPls7s.js → app-CmElp8cO.js} +39 -39
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/app.d.ts +105 -0
- package/dist/apps/mf-menu/src/components/MenuSetting/SubItemTaxSwitch.vue.d.ts +9 -0
- package/dist/apps/mf-menu/src/components/MenuSetting/SubItemTaxWarning.vue.d.ts +2 -0
- package/dist/apps/mf-menu/src/components/Product/ProductMoneyField.vue.d.ts +3 -3
- package/dist/apps/mf-menu/src/components/Product/ProductQuantityField.vue.d.ts +4 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/menu-compute-B_wpWLAj.js +260 -0
- package/dist/assets/validate-menu-DjxNxUxH.js +130 -0
- package/dist/{provide-B20ds2De.js → provide-BJRbSauL.js} +80697 -74275
- package/dist/{useActionFeedback-DVUPq042.js → useActionFeedback-89GwO41T.js} +1 -1
- package/package.json +1 -1
- package/dist/assets/menu-compute-B1cG-Eze.js +0 -260
- package/dist/assets/validate-menu-CpczXG8D.js +0 -130
|
@@ -1,36 +1,37 @@
|
|
|
1
|
-
import { defineComponent as re, computed as
|
|
1
|
+
import { defineComponent as re, computed as C, ref as me, watch as se, resolveComponent as d, openBlock as r, createElementBlock as c, Fragment as F, createBlock as b, resolveDynamicComponent as ie, mergeProps as $, unref as e, createSlots as de, withCtx as m, createCommentVNode as i, toDisplayString as g, createVNode as t, renderList as T, createElementVNode as v, createTextVNode as P, withModifiers as W, normalizeClass as ce } from "vue";
|
|
2
2
|
import { RouterLink as pe } from "vue-router";
|
|
3
3
|
import { useI18n as be } from "@feedmepos/mf-common";
|
|
4
4
|
import { components as G, FmButtonColorThemeVariant as V } from "@feedmepos/ui-library";
|
|
5
5
|
import { _ as ve } from "./FormSection.vue_vue_type_script_setup_true_lang-pY-_msnM.js";
|
|
6
6
|
import { _ as h } from "./FormItem.vue_vue_type_script_setup_true_lang-C2S6QCyR.js";
|
|
7
|
-
import { _ as
|
|
8
|
-
import { _ as
|
|
9
|
-
import { _ as ge } from "./CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-
|
|
10
|
-
import { _ as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
7
|
+
import { _ as fe } from "./PageLayout.vue_vue_type_script_setup_true_lang-B3szUH39.js";
|
|
8
|
+
import { _ as ke } from "./LinkProductSideSheet.vue_vue_type_script_setup_true_lang-CR99740r.js";
|
|
9
|
+
import { _ as ge } from "./CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-4EZ4yM_N.js";
|
|
10
|
+
import { _ as _e } from "./SubItemTaxWarning.vue_vue_type_script_setup_true_lang-BUyK6Jaa.js";
|
|
11
|
+
import { _ as ye } from "./CatalogEditTabs.vue_vue_type_script_setup_true_lang-Cy2culdR.js";
|
|
12
|
+
import { b as Ce, u as j } from "./provide-BJRbSauL.js";
|
|
13
|
+
import { u as Fe } from "./useActionFeedback-89GwO41T.js";
|
|
13
14
|
import { u as Y } from "./useEditorValidation-Ctef5Bxt.js";
|
|
14
|
-
import { R as
|
|
15
|
+
import { R as he } from "./app-CmElp8cO.js";
|
|
15
16
|
const Ve = {
|
|
16
17
|
key: 1,
|
|
17
18
|
role: "alert"
|
|
18
|
-
},
|
|
19
|
+
}, xe = {
|
|
19
20
|
key: 2,
|
|
20
21
|
class: "max-w-[752px] pt-16 space-y-32"
|
|
21
22
|
}, we = {
|
|
22
23
|
key: 0,
|
|
23
24
|
class: "pl-32 space-x-8"
|
|
24
|
-
}, Me = { class: "space-y-16" }, De = { class: "pl-[60px] space-y-16" },
|
|
25
|
+
}, Me = { class: "space-y-16" }, De = { class: "space-y-16" }, Se = { class: "pl-[60px] space-y-16" }, Ue = { class: "space-x-16 flex items-center" }, Ie = { class: "flex-1 space-y-4" }, $e = { class: "fm-typo-en-body-md-400" }, Te = {
|
|
25
26
|
key: 3,
|
|
26
27
|
class: "max-w-[752px] pt-40 flex justify-end"
|
|
27
|
-
},
|
|
28
|
+
}, Pe = { class: "flex gap-8 items-center justify-start" }, Le = {
|
|
28
29
|
key: 0,
|
|
29
30
|
class: "space-y-16"
|
|
30
|
-
},
|
|
31
|
+
}, Re = {
|
|
31
32
|
key: 1,
|
|
32
33
|
class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
33
|
-
},
|
|
34
|
+
}, Xe = /* @__PURE__ */ re({
|
|
34
35
|
__name: "CatalogEditor",
|
|
35
36
|
props: {
|
|
36
37
|
sdk: {},
|
|
@@ -40,39 +41,39 @@ const Ve = {
|
|
|
40
41
|
},
|
|
41
42
|
emits: ["close"],
|
|
42
43
|
setup(q, { emit: H }) {
|
|
43
|
-
const
|
|
44
|
-
() =>
|
|
45
|
-
), R =
|
|
46
|
-
() => l.value ?
|
|
47
|
-
),
|
|
44
|
+
const f = q, x = H, { t: a } = be(), w = Ce(), { run: J } = Fe(), M = Y(() => f.editor), _ = j(f.editor), L = j(f.picker), l = C(
|
|
45
|
+
() => _.value.status === "ready" ? _.value.value : null
|
|
46
|
+
), R = C(
|
|
47
|
+
() => l.value ? M.issue(l.value.fieldIssues, "name") ?? l.value.nameIssue : null
|
|
48
|
+
), D = Y(() => {
|
|
48
49
|
var n;
|
|
49
50
|
const o = (n = l.value) == null ? void 0 : n.markupDraft;
|
|
50
51
|
return o ? o.index ?? "new" : null;
|
|
51
|
-
}), B =
|
|
52
|
+
}), B = C(
|
|
52
53
|
() => {
|
|
53
54
|
var o;
|
|
54
|
-
return (o = l.value) != null && o.markupDraft ?
|
|
55
|
+
return (o = l.value) != null && o.markupDraft ? D.issue(l.value.markupFieldIssues, "percentage") ?? l.value.markupDraft.issue : null;
|
|
55
56
|
}
|
|
56
|
-
), K =
|
|
57
|
+
), K = C(
|
|
57
58
|
() => L.value.status === "ready" ? L.value.value : null
|
|
58
|
-
), y =
|
|
59
|
+
), y = me(!1), N = C({
|
|
59
60
|
get: () => {
|
|
60
61
|
var o;
|
|
61
62
|
return !!((o = l.value) != null && o.markupDraft);
|
|
62
63
|
},
|
|
63
64
|
set: (o) => {
|
|
64
|
-
o ||
|
|
65
|
+
o || f.editor.cancelMarkup();
|
|
65
66
|
}
|
|
66
67
|
});
|
|
67
|
-
|
|
68
|
-
() =>
|
|
68
|
+
se(
|
|
69
|
+
() => _.value.status,
|
|
69
70
|
(o) => {
|
|
70
71
|
(o === "error" || o === "unavailable") && (y.value = !1);
|
|
71
72
|
}
|
|
72
73
|
);
|
|
73
74
|
async function O() {
|
|
74
75
|
(await J(
|
|
75
|
-
() =>
|
|
76
|
+
() => M.submit(() => f.editor.submit()),
|
|
76
77
|
{
|
|
77
78
|
showLoading: () => {
|
|
78
79
|
var n;
|
|
@@ -80,19 +81,19 @@ const Ve = {
|
|
|
80
81
|
},
|
|
81
82
|
successMessage: (n) => a("menu.catalog.saved", { name: n.name })
|
|
82
83
|
}
|
|
83
|
-
)).kind === "success" &&
|
|
84
|
+
)).kind === "success" && x("close");
|
|
84
85
|
}
|
|
85
86
|
function Q() {
|
|
86
|
-
|
|
87
|
+
D.submit(async () => f.editor.saveMarkup());
|
|
87
88
|
}
|
|
88
89
|
function X(o) {
|
|
89
|
-
|
|
90
|
+
f.editor.setMarkupProducts(o), y.value = !1;
|
|
90
91
|
}
|
|
91
92
|
return (o, n) => {
|
|
92
93
|
var E, z, A;
|
|
93
|
-
const p =
|
|
94
|
-
return
|
|
95
|
-
(
|
|
94
|
+
const p = d("FmButton"), Z = d("FmTextField"), k = d("FmRadio"), S = d("FmRadioGroup"), ee = d("FmCheckbox"), U = d("FmSwitch"), ae = d("FmSelect"), le = d("FmChip"), oe = d("FmCard"), te = d("FmIcon"), ue = d("FmStepperField"), ne = d("FmDialog");
|
|
95
|
+
return r(), c(F, null, [
|
|
96
|
+
(r(), b(ie(o.page ? fe : "FmSideSheet"), $(
|
|
96
97
|
o.page ? { heading: ((E = l.value) == null ? void 0 : E.name) ?? "" } : {
|
|
97
98
|
modelValue: !0,
|
|
98
99
|
isContainer: e(G).FmForm,
|
|
@@ -103,60 +104,60 @@ const Ve = {
|
|
|
103
104
|
maxWidth: 560
|
|
104
105
|
},
|
|
105
106
|
{
|
|
106
|
-
"onUpdate:modelValue": n[2] || (n[2] = (
|
|
107
|
+
"onUpdate:modelValue": n[2] || (n[2] = (u) => !u && x("close"))
|
|
107
108
|
}
|
|
108
109
|
), de({
|
|
109
110
|
"side-sheet-footer": m(() => {
|
|
110
|
-
var
|
|
111
|
+
var u;
|
|
111
112
|
return [
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
loading: ((
|
|
113
|
+
v("div", Pe, [
|
|
114
|
+
t(p, {
|
|
115
|
+
loading: ((u = l.value) == null ? void 0 : u.status) === "submitting",
|
|
115
116
|
disabled: !l.value || l.value.submit.state !== "allowed",
|
|
116
117
|
label: e(a)("menu.common.actions.add"),
|
|
117
118
|
size: "lg",
|
|
118
119
|
type: "submit",
|
|
119
120
|
variant: "primary"
|
|
120
121
|
}, null, 8, ["loading", "disabled", "label"]),
|
|
121
|
-
|
|
122
|
+
t(p, {
|
|
122
123
|
label: e(a)("menu.common.actions.cancel"),
|
|
123
124
|
size: "lg",
|
|
124
125
|
variant: "tertiary",
|
|
125
|
-
onClick: n[1] || (n[1] = (
|
|
126
|
+
onClick: n[1] || (n[1] = (s) => x("close"))
|
|
126
127
|
}, null, 8, ["label"])
|
|
127
128
|
])
|
|
128
129
|
];
|
|
129
130
|
}),
|
|
130
131
|
default: m(() => [
|
|
131
|
-
o.page ? (
|
|
132
|
-
e(
|
|
133
|
-
l.value ? (
|
|
134
|
-
|
|
132
|
+
o.page ? (r(), b(ye, { key: 0 })) : i("", !0),
|
|
133
|
+
e(_).status === "error" ? (r(), c("p", Ve, g(e(w)(e(_).error.message)), 1)) : i("", !0),
|
|
134
|
+
l.value ? (r(), c("div", xe, [
|
|
135
|
+
t(ve, {
|
|
135
136
|
title: e(a)("menu.catalog.detail")
|
|
136
137
|
}, {
|
|
137
138
|
default: m(() => [
|
|
138
|
-
|
|
139
|
+
t(Z, $({
|
|
139
140
|
"model-value": l.value.name,
|
|
140
141
|
autofocus: "",
|
|
141
142
|
label: e(a)("menu.catalog.form.name"),
|
|
142
|
-
"error-messages": R.value ? [e(
|
|
143
|
-
}, e(
|
|
144
|
-
|
|
143
|
+
"error-messages": R.value ? [e(w)(R.value)] : []
|
|
144
|
+
}, e(M).field("name", o.editor.setName)), null, 16, ["model-value", "label", "error-messages"]),
|
|
145
|
+
t(h, {
|
|
145
146
|
class: "pt-8",
|
|
146
147
|
label: e(a)("menu.catalog.form.tax.title")
|
|
147
148
|
}, {
|
|
148
149
|
default: m(() => [
|
|
149
|
-
|
|
150
|
+
t(S, {
|
|
150
151
|
"model-value": l.value.taxMode,
|
|
151
152
|
"onUpdate:modelValue": o.editor.setTaxMode
|
|
152
153
|
}, {
|
|
153
154
|
default: m(() => [
|
|
154
|
-
|
|
155
|
+
t(k, {
|
|
155
156
|
value: "automatic",
|
|
156
157
|
label: e(a)("menu.catalog.form.tax.auto.label"),
|
|
157
158
|
sublabel: e(a)("menu.catalog.form.tax.auto.sublabel")
|
|
158
159
|
}, null, 8, ["label", "sublabel"]),
|
|
159
|
-
|
|
160
|
+
t(k, {
|
|
160
161
|
value: "manual",
|
|
161
162
|
label: e(a)("menu.catalog.form.tax.manual.label"),
|
|
162
163
|
sublabel: e(a)("menu.catalog.form.tax.manual.sublabel")
|
|
@@ -164,54 +165,90 @@ const Ve = {
|
|
|
164
165
|
]),
|
|
165
166
|
_: 1
|
|
166
167
|
}, 8, ["model-value", "onUpdate:modelValue"]),
|
|
167
|
-
l.value.taxMode === "manual" ? (
|
|
168
|
-
(
|
|
169
|
-
key:
|
|
170
|
-
"model-value":
|
|
168
|
+
l.value.taxMode === "manual" ? (r(), c("div", we, [
|
|
169
|
+
(r(!0), c(F, null, T(l.value.taxes, (u) => (r(), b(ee, {
|
|
170
|
+
key: u.systemCode,
|
|
171
|
+
"model-value": u.inclusive,
|
|
171
172
|
value: !0,
|
|
172
|
-
label: e(a)("menu.catalog.form.tax.inclusive", { code:
|
|
173
|
-
"onUpdate:modelValue": (
|
|
173
|
+
label: e(a)("menu.catalog.form.tax.inclusive", { code: u.systemCode }),
|
|
174
|
+
"onUpdate:modelValue": (s) => o.editor.setTaxInclusive(u.systemCode, s)
|
|
174
175
|
}, null, 8, ["model-value", "label", "onUpdate:modelValue"]))), 128))
|
|
175
|
-
])) :
|
|
176
|
+
])) : i("", !0)
|
|
176
177
|
]),
|
|
177
178
|
_: 1
|
|
178
179
|
}, 8, ["label"]),
|
|
179
|
-
l.value.
|
|
180
|
+
l.value.subItemTax ? (r(), b(h, {
|
|
180
181
|
key: 0,
|
|
182
|
+
label: e(a)("menu.menu_setting.sub_item_tax.title")
|
|
183
|
+
}, {
|
|
184
|
+
default: m(() => [
|
|
185
|
+
v("div", Me, [
|
|
186
|
+
t(S, {
|
|
187
|
+
"model-value": l.value.subItemTax.choice,
|
|
188
|
+
"onUpdate:modelValue": o.editor.setSubItemTaxChoice
|
|
189
|
+
}, {
|
|
190
|
+
default: m(() => [
|
|
191
|
+
t(k, {
|
|
192
|
+
value: "inherit",
|
|
193
|
+
label: e(a)("menu.catalog.form.sub_item_tax.inherit.label"),
|
|
194
|
+
sublabel: e(a)(
|
|
195
|
+
l.value.subItemTax.inherited === "own" ? "menu.catalog.form.sub_item_tax.inherit.current_own" : "menu.catalog.form.sub_item_tax.inherit.current_parent"
|
|
196
|
+
)
|
|
197
|
+
}, null, 8, ["label", "sublabel"]),
|
|
198
|
+
t(k, {
|
|
199
|
+
value: "parent",
|
|
200
|
+
label: e(a)("menu.catalog.form.sub_item_tax.parent.label"),
|
|
201
|
+
sublabel: e(a)("menu.catalog.form.sub_item_tax.parent.sublabel")
|
|
202
|
+
}, null, 8, ["label", "sublabel"]),
|
|
203
|
+
t(k, {
|
|
204
|
+
value: "own",
|
|
205
|
+
label: e(a)("menu.catalog.form.sub_item_tax.own.label"),
|
|
206
|
+
sublabel: e(a)("menu.catalog.form.sub_item_tax.own.sublabel")
|
|
207
|
+
}, null, 8, ["label", "sublabel"])
|
|
208
|
+
]),
|
|
209
|
+
_: 1
|
|
210
|
+
}, 8, ["model-value", "onUpdate:modelValue"]),
|
|
211
|
+
l.value.subItemTax.resolved === "own" ? (r(), b(_e, { key: 0 })) : i("", !0)
|
|
212
|
+
])
|
|
213
|
+
]),
|
|
214
|
+
_: 1
|
|
215
|
+
}, 8, ["label"])) : i("", !0),
|
|
216
|
+
l.value.statutoryChargeWaivers.length > 0 ? (r(), b(h, {
|
|
217
|
+
key: 1,
|
|
181
218
|
label: e(a)("menu.catalog.form.statutory_charges.title")
|
|
182
219
|
}, {
|
|
183
220
|
default: m(() => [
|
|
184
|
-
|
|
185
|
-
(
|
|
186
|
-
key:
|
|
187
|
-
"model-value":
|
|
221
|
+
v("div", De, [
|
|
222
|
+
(r(!0), c(F, null, T(l.value.statutoryChargeWaivers, (u) => (r(), b(U, {
|
|
223
|
+
key: u.code,
|
|
224
|
+
"model-value": u.waived,
|
|
188
225
|
label: e(a)("menu.catalog.form.statutory_charges.waive", {
|
|
189
|
-
name:
|
|
226
|
+
name: u.name
|
|
190
227
|
}),
|
|
191
228
|
sublabel: e(a)("menu.catalog.form.statutory_charges.sublabel"),
|
|
192
229
|
"label-placement": "right",
|
|
193
|
-
"onUpdate:modelValue": (
|
|
230
|
+
"onUpdate:modelValue": (s) => o.editor.setStatutoryChargeWaived(u.code, s)
|
|
194
231
|
}, null, 8, ["model-value", "label", "sublabel", "onUpdate:modelValue"]))), 128))
|
|
195
232
|
])
|
|
196
233
|
]),
|
|
197
234
|
_: 1
|
|
198
|
-
}, 8, ["label"])) :
|
|
235
|
+
}, 8, ["label"])) : i("", !0)
|
|
199
236
|
]),
|
|
200
237
|
_: 1
|
|
201
238
|
}, 8, ["title"]),
|
|
202
|
-
l.value.advanced.state === "allowed" ? (
|
|
203
|
-
|
|
239
|
+
l.value.advanced.state === "allowed" ? (r(), c(F, { key: 0 }, [
|
|
240
|
+
t(h, {
|
|
204
241
|
label: e(a)("menu.catalog.form.link.title")
|
|
205
242
|
}, {
|
|
206
243
|
default: m(() => [
|
|
207
|
-
|
|
244
|
+
t(U, {
|
|
208
245
|
"model-value": l.value.autoLink,
|
|
209
246
|
label: e(a)("menu.catalog.form.link.auto_link.label"),
|
|
210
247
|
sublabel: e(a)("menu.catalog.form.link.auto_link.sublabel"),
|
|
211
248
|
"label-placement": "right",
|
|
212
249
|
"onUpdate:modelValue": o.editor.setAutoLink
|
|
213
250
|
}, null, 8, ["model-value", "label", "sublabel", "onUpdate:modelValue"]),
|
|
214
|
-
l.value.autoLink ? (
|
|
251
|
+
l.value.autoLink ? (r(), b(ae, {
|
|
215
252
|
key: 0,
|
|
216
253
|
class: "ml-[60px]",
|
|
217
254
|
"aria-label": e(a)("menu.catalog.form.link.title"),
|
|
@@ -224,68 +261,68 @@ const Ve = {
|
|
|
224
261
|
}
|
|
225
262
|
],
|
|
226
263
|
"onUpdate:modelValue": o.editor.setOrderFrom
|
|
227
|
-
}, null, 8, ["aria-label", "model-value", "items", "onUpdate:modelValue"])) :
|
|
264
|
+
}, null, 8, ["aria-label", "model-value", "items", "onUpdate:modelValue"])) : i("", !0)
|
|
228
265
|
]),
|
|
229
266
|
_: 1
|
|
230
267
|
}, 8, ["label"]),
|
|
231
|
-
|
|
268
|
+
t(h, {
|
|
232
269
|
label: e(a)("menu.catalog.form.markup.title")
|
|
233
270
|
}, {
|
|
234
271
|
default: m(() => [
|
|
235
|
-
|
|
272
|
+
t(U, {
|
|
236
273
|
"model-value": l.value.markupEnabled,
|
|
237
274
|
label: e(a)("menu.catalog.form.markup.auto.label"),
|
|
238
275
|
sublabel: e(a)("menu.catalog.form.markup.auto.sublabel"),
|
|
239
276
|
"label-placement": "right",
|
|
240
277
|
"onUpdate:modelValue": o.editor.setMarkupEnabled
|
|
241
278
|
}, null, 8, ["model-value", "label", "sublabel", "onUpdate:modelValue"]),
|
|
242
|
-
|
|
243
|
-
|
|
279
|
+
v("div", Se, [
|
|
280
|
+
t(p, {
|
|
244
281
|
variant: "secondary",
|
|
245
282
|
"text-color": e(V).ColorPrimary,
|
|
246
283
|
"border-color": e(V).ColorPrimary,
|
|
247
284
|
label: e(a)("menu.catalog.form.markup.add"),
|
|
248
285
|
"prepend-icon": "add",
|
|
249
|
-
onClick: n[0] || (n[0] = (
|
|
286
|
+
onClick: n[0] || (n[0] = (u) => o.editor.beginMarkup())
|
|
250
287
|
}, null, 8, ["text-color", "border-color", "label"]),
|
|
251
|
-
(
|
|
252
|
-
key:
|
|
288
|
+
(r(!0), c(F, null, T(l.value.markups, (u, s) => (r(), b(oe, {
|
|
289
|
+
key: s,
|
|
253
290
|
class: "py-12 px-16 cursor-pointer",
|
|
254
291
|
role: "row",
|
|
255
292
|
variant: "outlined",
|
|
256
|
-
onClick: (
|
|
293
|
+
onClick: (I) => o.editor.beginMarkup(s)
|
|
257
294
|
}, {
|
|
258
295
|
default: m(() => [
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
296
|
+
v("div", Ue, [
|
|
297
|
+
v("div", Ie, [
|
|
298
|
+
t(le, { class: "text-fm-color-typo-info bg-fm-color-system-info-100 font-semibold" }, {
|
|
262
299
|
default: m(() => [
|
|
263
|
-
P(
|
|
264
|
-
value:
|
|
300
|
+
P(g(e(a)("menu.catalog.form.markup.percentage", {
|
|
301
|
+
value: u.percentage
|
|
265
302
|
})), 1)
|
|
266
303
|
]),
|
|
267
304
|
_: 2
|
|
268
305
|
}, 1024),
|
|
269
|
-
|
|
306
|
+
t(p, {
|
|
270
307
|
class: "fm-typo-en-body-lg-400",
|
|
271
|
-
onClick: W((
|
|
308
|
+
onClick: W((I) => o.editor.beginMarkup(s), ["stop"])
|
|
272
309
|
}, {
|
|
273
310
|
default: m(() => [
|
|
274
|
-
P(
|
|
275
|
-
number:
|
|
311
|
+
P(g(e(a)("menu.catalog.form.markup.config", {
|
|
312
|
+
number: s + 1
|
|
276
313
|
})), 1)
|
|
277
314
|
]),
|
|
278
315
|
_: 2
|
|
279
316
|
}, 1032, ["onClick"]),
|
|
280
|
-
|
|
281
|
-
count:
|
|
317
|
+
v("p", $e, g(u.productCount === null ? e(a)("menu.catalog.form.markup.all_items") : e(a)("menu.catalog.form.markup.products", {
|
|
318
|
+
count: u.productCount
|
|
282
319
|
})), 1)
|
|
283
320
|
]),
|
|
284
|
-
|
|
321
|
+
t(p, {
|
|
285
322
|
variant: "tertiary",
|
|
286
323
|
"prepend-icon": "delete",
|
|
287
324
|
"aria-label": e(a)("menu.catalog.remove_markup"),
|
|
288
|
-
onClick: W((
|
|
325
|
+
onClick: W((I) => o.editor.removeMarkup(s), ["stop"])
|
|
289
326
|
}, null, 8, ["aria-label", "onClick"])
|
|
290
327
|
])
|
|
291
328
|
]),
|
|
@@ -295,10 +332,10 @@ const Ve = {
|
|
|
295
332
|
]),
|
|
296
333
|
_: 1
|
|
297
334
|
}, 8, ["label"])
|
|
298
|
-
], 64)) :
|
|
299
|
-
])) :
|
|
300
|
-
o.page && l.value ? (
|
|
301
|
-
|
|
335
|
+
], 64)) : i("", !0)
|
|
336
|
+
])) : i("", !0),
|
|
337
|
+
o.page && l.value ? (r(), c("div", Te, [
|
|
338
|
+
t(p, {
|
|
302
339
|
loading: l.value.status === "submitting",
|
|
303
340
|
disabled: l.value.submit.state !== "allowed",
|
|
304
341
|
label: e(a)("menu.common.actions.save"),
|
|
@@ -306,20 +343,20 @@ const Ve = {
|
|
|
306
343
|
variant: "primary",
|
|
307
344
|
onClick: O
|
|
308
345
|
}, null, 8, ["loading", "disabled", "label"])
|
|
309
|
-
])) :
|
|
346
|
+
])) : i("", !0)
|
|
310
347
|
]),
|
|
311
348
|
_: 2
|
|
312
349
|
}, [
|
|
313
350
|
o.page ? {
|
|
314
351
|
name: "prepend-heading",
|
|
315
352
|
fn: m(() => [
|
|
316
|
-
|
|
317
|
-
to: { name: e(
|
|
353
|
+
t(e(pe), {
|
|
354
|
+
to: { name: e(he).CATALOG },
|
|
318
355
|
class: "mr-8",
|
|
319
356
|
title: e(a)("menu.catalog.edit.back")
|
|
320
357
|
}, {
|
|
321
358
|
default: m(() => [
|
|
322
|
-
|
|
359
|
+
t(p, {
|
|
323
360
|
"aria-label": e(a)("menu.catalog.edit.back"),
|
|
324
361
|
"prepend-icon": "arrow_back",
|
|
325
362
|
variant: "tertiary"
|
|
@@ -333,34 +370,34 @@ const Ve = {
|
|
|
333
370
|
o.page ? {
|
|
334
371
|
name: "append-heading",
|
|
335
372
|
fn: m(() => [
|
|
336
|
-
|
|
373
|
+
t(ge, { sdk: o.sdk }, null, 8, ["sdk"])
|
|
337
374
|
]),
|
|
338
375
|
key: "1"
|
|
339
376
|
} : void 0
|
|
340
377
|
]), 1040)),
|
|
341
|
-
|
|
378
|
+
t(ne, {
|
|
342
379
|
modelValue: N.value,
|
|
343
|
-
"onUpdate:modelValue": n[6] || (n[6] = (
|
|
380
|
+
"onUpdate:modelValue": n[6] || (n[6] = (u) => N.value = u),
|
|
344
381
|
"is-component": e(G).FmForm,
|
|
345
382
|
"is-component-props": { onValidationSuccess: Q }
|
|
346
383
|
}, {
|
|
347
384
|
"dialog-header": m(() => {
|
|
348
|
-
var
|
|
385
|
+
var u, s;
|
|
349
386
|
return [
|
|
350
|
-
P(
|
|
387
|
+
P(g(((s = (u = l.value) == null ? void 0 : u.markupDraft) == null ? void 0 : s.index) === null ? e(a)("menu.markup.dialog.title.add") : e(a)("menu.markup.dialog.title.update")), 1)
|
|
351
388
|
];
|
|
352
389
|
}),
|
|
353
390
|
"dialog-footer": m(() => {
|
|
354
|
-
var
|
|
391
|
+
var u, s;
|
|
355
392
|
return [
|
|
356
|
-
|
|
393
|
+
t(p, {
|
|
357
394
|
class: "sm:w-full xs:w-full ml-auto",
|
|
358
395
|
label: e(a)("menu.common.actions.cancel"),
|
|
359
396
|
variant: "tertiary",
|
|
360
|
-
onClick: n[5] || (n[5] = (
|
|
397
|
+
onClick: n[5] || (n[5] = (I) => o.editor.cancelMarkup())
|
|
361
398
|
}, null, 8, ["label"]),
|
|
362
|
-
|
|
363
|
-
label: ((
|
|
399
|
+
t(p, {
|
|
400
|
+
label: ((s = (u = l.value) == null ? void 0 : u.markupDraft) == null ? void 0 : s.index) === null ? e(a)("menu.common.actions.add") : e(a)("menu.common.actions.update"),
|
|
364
401
|
class: "sm:w-full xs:w-full",
|
|
365
402
|
size: "md",
|
|
366
403
|
type: "submit",
|
|
@@ -369,10 +406,10 @@ const Ve = {
|
|
|
369
406
|
];
|
|
370
407
|
}),
|
|
371
408
|
default: m(() => {
|
|
372
|
-
var
|
|
409
|
+
var u;
|
|
373
410
|
return [
|
|
374
|
-
(
|
|
375
|
-
|
|
411
|
+
(u = l.value) != null && u.markupDraft ? (r(), c("div", Le, [
|
|
412
|
+
t(ue, $(
|
|
376
413
|
{
|
|
377
414
|
"model-value": l.value.markupDraft.percentage,
|
|
378
415
|
decimal: 0,
|
|
@@ -380,27 +417,27 @@ const Ve = {
|
|
|
380
417
|
min: 0,
|
|
381
418
|
label: e(a)("menu.markup.dialog.fields.percentage.label"),
|
|
382
419
|
placeholder: e(a)("menu.markup.dialog.fields.percentage.placeholder"),
|
|
383
|
-
"error-messages": B.value ? [e(
|
|
420
|
+
"error-messages": B.value ? [e(w)(B.value)] : []
|
|
384
421
|
},
|
|
385
|
-
e(
|
|
422
|
+
e(D).field("percentage", o.editor.setMarkupPercentage)
|
|
386
423
|
), {
|
|
387
424
|
prepend: m(() => [
|
|
388
|
-
|
|
425
|
+
t(te, { name: "percent" })
|
|
389
426
|
]),
|
|
390
427
|
_: 1
|
|
391
428
|
}, 16, ["model-value", "label", "placeholder", "error-messages"]),
|
|
392
|
-
|
|
429
|
+
t(S, {
|
|
393
430
|
"model-value": l.value.markupDraft.productIds === null ? "all" : "custom",
|
|
394
431
|
class: "space-y-8",
|
|
395
|
-
"onUpdate:modelValue": n[3] || (n[3] = (
|
|
432
|
+
"onUpdate:modelValue": n[3] || (n[3] = (s) => o.editor.setMarkupProducts(s === "all" ? null : []))
|
|
396
433
|
}, {
|
|
397
434
|
default: m(() => [
|
|
398
|
-
|
|
435
|
+
t(k, {
|
|
399
436
|
value: "all",
|
|
400
437
|
"aria-label": e(a)("menu.markup.dialog.options.all"),
|
|
401
438
|
label: e(a)("menu.markup.dialog.options.all")
|
|
402
439
|
}, null, 8, ["aria-label", "label"]),
|
|
403
|
-
|
|
440
|
+
t(k, {
|
|
404
441
|
value: "custom",
|
|
405
442
|
"aria-label": e(a)("menu.markup.dialog.options.custom"),
|
|
406
443
|
label: e(a)("menu.markup.dialog.options.custom")
|
|
@@ -408,10 +445,10 @@ const Ve = {
|
|
|
408
445
|
]),
|
|
409
446
|
_: 1
|
|
410
447
|
}, 8, ["model-value"]),
|
|
411
|
-
|
|
448
|
+
v("div", {
|
|
412
449
|
class: ce(["ml-32 mt-16 space-y-8", { "pb-8": l.value.markupDraft.productIds !== null }])
|
|
413
450
|
}, [
|
|
414
|
-
l.value.markupDraft.productIds !== null ? (
|
|
451
|
+
l.value.markupDraft.productIds !== null ? (r(), b(p, {
|
|
415
452
|
key: 0,
|
|
416
453
|
variant: "secondary",
|
|
417
454
|
"text-color": e(V).ColorPrimary,
|
|
@@ -419,20 +456,20 @@ const Ve = {
|
|
|
419
456
|
"aria-label": e(a)("menu.markup.dialog.products.link"),
|
|
420
457
|
label: e(a)("menu.markup.dialog.products.link"),
|
|
421
458
|
"prepend-icon": "link",
|
|
422
|
-
onClick: n[4] || (n[4] = (
|
|
423
|
-
}, null, 8, ["text-color", "border-color", "aria-label", "label"])) :
|
|
424
|
-
l.value.markupDraft.productCount ? (
|
|
459
|
+
onClick: n[4] || (n[4] = (s) => y.value = !0)
|
|
460
|
+
}, null, 8, ["text-color", "border-color", "aria-label", "label"])) : i("", !0),
|
|
461
|
+
l.value.markupDraft.productCount ? (r(), c("p", Re, g(e(a)("menu.markup.dialog.products.count", {
|
|
425
462
|
count: l.value.markupDraft.productCount
|
|
426
|
-
})), 1)) :
|
|
463
|
+
})), 1)) : i("", !0)
|
|
427
464
|
], 2)
|
|
428
|
-
])) :
|
|
465
|
+
])) : i("", !0)
|
|
429
466
|
];
|
|
430
467
|
}),
|
|
431
468
|
_: 1
|
|
432
469
|
}, 8, ["modelValue", "is-component", "is-component-props"]),
|
|
433
|
-
|
|
470
|
+
t(ke, {
|
|
434
471
|
modelValue: y.value,
|
|
435
|
-
"onUpdate:modelValue": n[7] || (n[7] = (
|
|
472
|
+
"onUpdate:modelValue": n[7] || (n[7] = (u) => y.value = u),
|
|
436
473
|
catalogue: K.value,
|
|
437
474
|
"selected-product-ids": ((A = (z = l.value) == null ? void 0 : z.markupDraft) == null ? void 0 : A.productIds) ?? [],
|
|
438
475
|
title: e(a)("menu.markup.dialog.products.link"),
|
|
@@ -443,5 +480,5 @@ const Ve = {
|
|
|
443
480
|
}
|
|
444
481
|
});
|
|
445
482
|
export {
|
|
446
|
-
|
|
483
|
+
Xe as _
|
|
447
484
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as N, shallowRef as m, computed as M, ref as A, watch as E, onUnmounted as U, resolveComponent as z, openBlock as f, createElementBlock as O, Fragment as $, createElementVNode as j, normalizeClass as g, createBlock as R, unref as b, createCommentVNode as q, createVNode as x } from "vue";
|
|
2
2
|
import { useI18n as D } from "@feedmepos/mf-common";
|
|
3
|
-
import { _ as G } from "./LinkProductSideSheet.vue_vue_type_script_setup_true_lang-
|
|
4
|
-
import { u as H } from "./useActionFeedback-
|
|
5
|
-
import { b as J, u as K } from "./provide-
|
|
3
|
+
import { _ as G } from "./LinkProductSideSheet.vue_vue_type_script_setup_true_lang-CR99740r.js";
|
|
4
|
+
import { u as H } from "./useActionFeedback-89GwO41T.js";
|
|
5
|
+
import { b as J, u as K } from "./provide-BJRbSauL.js";
|
|
6
6
|
const Z = /* @__PURE__ */ N({
|
|
7
7
|
__name: "CatalogLinkProductAction",
|
|
8
8
|
props: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as o, openBlock as r, createBlock as n, unref as t } from "vue";
|
|
2
|
-
import { _ as s } from "./CategoryList.vue_vue_type_script_setup_true_lang-
|
|
3
|
-
import { a } from "./provide-
|
|
2
|
+
import { _ as s } from "./CategoryList.vue_vue_type_script_setup_true_lang-CrHYjrTn.js";
|
|
3
|
+
import { a } from "./provide-BJRbSauL.js";
|
|
4
4
|
const d = /* @__PURE__ */ o({
|
|
5
5
|
__name: "Category",
|
|
6
6
|
setup(_) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { defineComponent as l, computed as d, resolveComponent as p, openBlock as _, createBlock as f, unref as a, withCtx as e, createVNode as t } from "vue";
|
|
2
2
|
import { useRoute as g, RouterLink as k } from "vue-router";
|
|
3
3
|
import { useI18n as h } from "@feedmepos/mf-common";
|
|
4
|
-
import { _ as v } from "./CategoryList.vue_vue_type_script_setup_true_lang-
|
|
5
|
-
import { _ as b } from "./CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-
|
|
6
|
-
import { R as C } from "./app-
|
|
7
|
-
import { a as R, u as B } from "./provide-
|
|
8
|
-
import { _ as w } from "./CatalogEditTabs.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { _ as v } from "./CategoryList.vue_vue_type_script_setup_true_lang-CrHYjrTn.js";
|
|
5
|
+
import { _ as b } from "./CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-4EZ4yM_N.js";
|
|
6
|
+
import { R as C } from "./app-CmElp8cO.js";
|
|
7
|
+
import { a as R, u as B } from "./provide-BJRbSauL.js";
|
|
8
|
+
import { _ as w } from "./CatalogEditTabs.vue_vue_type_script_setup_true_lang-Cy2culdR.js";
|
|
9
9
|
const G = /* @__PURE__ */ l({
|
|
10
10
|
__name: "Category",
|
|
11
11
|
setup(x) {
|