@feedmepos/mf-menu 1.0.1-dev.2 → 1.0.1-dev.4
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-CdIN4s5n.js → App-DhYTzDY0.js} +546 -533
- package/dist/{BindingTable.vue_vue_type_script_setup_true_lang-CoHlJwpz.js → BindingTable.vue_vue_type_script_setup_true_lang-BUiZxX6w.js} +1 -1
- package/dist/{Catalog-DjAubC9s.js → Catalog-DWj_TPwj.js} +4 -4
- package/dist/{CatalogBinding-5JNRTbyZ.js → CatalogBinding-DCUFGwTy.js} +3 -3
- package/dist/{CatalogEditTabs.vue_vue_type_script_setup_true_lang-BorOjk1k.js → CatalogEditTabs.vue_vue_type_script_setup_true_lang-BYeOydGv.js} +3 -3
- package/dist/{CatalogEditor.vue_vue_type_script_setup_true_lang-CkF7O_V-.js → CatalogEditor.vue_vue_type_script_setup_true_lang-BeuAv0jC.js} +6 -6
- package/dist/{CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-3fL43MuR.js → CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-EnajbZtY.js} +3 -3
- package/dist/{Category-COug7fz8.js → Category-B9jpP8pf.js} +2 -2
- package/dist/{Category-BbiN4hd7.js → Category-C9BtFwBO.js} +5 -5
- package/dist/{CategoryList.vue_vue_type_script_setup_true_lang-B_9aPMIN.js → CategoryList.vue_vue_type_script_setup_true_lang-C11l9kUD.js} +92 -91
- package/dist/{CookingGuide-Dg7kuF6l.js → CookingGuide-xx0mHc6j.js} +262 -256
- package/dist/{Group-BRpmTqyT.js → Group-BkyVQTHZ.js} +5 -5
- package/dist/{Group-C-hwlkgJ.js → Group-DaNj2hu9.js} +2 -2
- package/dist/{GroupList.vue_vue_type_script_setup_true_lang-DowoJ3WM.js → GroupList.vue_vue_type_script_setup_true_lang-By6udos1.js} +5 -5
- package/dist/{Ingredient-BQYnARdC.js → Ingredient-DbV2TbTY.js} +3 -3
- package/dist/{LinkProductSideSheet.vue_vue_type_script_setup_true_lang-CgTDkHle.js → LinkProductSideSheet.vue_vue_type_script_setup_true_lang-DS7hUQpE.js} +1 -1
- package/dist/{MenuSetting-DsdM2_OW.js → MenuSetting-COJaCmJN.js} +3 -3
- package/dist/{OrderPacing-5x2YH-_l.js → OrderPacing-D6y9LBM_.js} +96 -93
- package/dist/{OrderPacingFields.vue_vue_type_script_setup_true_lang-DVGJjpiM.js → OrderPacingFields.vue_vue_type_script_setup_true_lang--J9nxeca.js} +1 -1
- package/dist/Preview-B19pRXmI.js +325 -0
- package/dist/{PriceTierNotice.vue_vue_type_script_setup_true_lang-vmxVZ2ya.js → PriceTierNotice.vue_vue_type_script_setup_true_lang-DwwfXWL8.js} +1 -1
- package/dist/{PrintRoute-COkCv4gf.js → PrintRoute-DkZaQWrC.js} +158 -152
- package/dist/{Product-BJFb_J4h.js → Product-DkxV4IfT.js} +4 -4
- package/dist/{ProductEditorHost.vue_vue_type_script_setup_true_lang-Tpp8MBYS.js → ProductEditorHost.vue_vue_type_script_setup_true_lang-BuhTMFZF.js} +2 -2
- package/dist/{ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-C25Pwqme.js → ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-B_EmJhpN.js} +3 -3
- package/dist/{ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-BMAtAK9D.js → ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-CniqNe-9.js} +1 -1
- package/dist/{ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-Dl4Zr5tx.js → ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-Be9Y5Cc1.js} +1181 -1174
- package/dist/ProductInternalTools-CW7gKvtC.js +2147 -0
- package/dist/{ProductInventoryDialog-C3ruRWU5.js → ProductInventoryDialog-DA1A9YlU.js} +1 -1
- package/dist/{ProductInventoryDialog.vue_vue_type_script_setup_true_lang-MpdIixqI.js → ProductInventoryDialog.vue_vue_type_script_setup_true_lang-DDKjs88F.js} +1 -1
- package/dist/{ProductList.vue_vue_type_script_setup_true_lang-9_ohgfqE.js → ProductList.vue_vue_type_script_setup_true_lang-63u-Pxh-.js} +2328 -2298
- package/dist/{ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-Ctbz-8cd.js → ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-DjrHHLkY.js} +1 -1
- package/dist/{Products-DMrjQFfu.js → Products-CFxCduVf.js} +3 -3
- package/dist/{Publish-f6g0dIao.js → Publish-C50PRaWB.js} +3 -3
- package/dist/{Recipe-p-wxadSN.js → Recipe-CGwAatcb.js} +3 -3
- package/dist/{Scheduler-CtebRafn.js → Scheduler-hIe_BdwS.js} +3 -3
- package/dist/{ServingSequence-CEd4ywOQ.js → ServingSequence-CIzDiSll.js} +103 -97
- package/dist/{Setting-bPKadRu-.js → Setting-Cr6u3Vok.js} +6 -6
- package/dist/{Subcategory-DBCnIP0b.js → Subcategory-BYg9Z56P.js} +141 -129
- package/dist/{Takeaway-GNRHR5kN.js → Takeaway-BIF4hGTc.js} +2 -2
- package/dist/{Takeaway-VBkdW1DM.js → Takeaway-I5kTW17E.js} +5 -5
- package/dist/{TakeawayList.vue_vue_type_script_setup_true_lang-DvX3k0Jg.js → TakeawayList.vue_vue_type_script_setup_true_lang-Ph6sSiyp.js} +117 -111
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-D1qaEVUu.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-B3SRYt9b.js} +6 -6
- package/dist/{Unit-DbGKIprZ.js → Unit-CHVucFRl.js} +2 -2
- package/dist/{Variant-_edSAKif.js → Variant-CS0gRkGz.js} +114 -108
- package/dist/{_id_-BNVtBV3q.js → _id_-BpCfEGRx.js} +3 -3
- package/dist/{app-BlTv5xag.js → app-BcGXBcUK.js} +420 -409
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/components/ProductList.vue.d.ts +3 -3
- package/dist/apps/mf-menu/src/router/shared.d.ts +33 -0
- package/dist/apps/mf-menu/src/sdk/import-export.d.ts +8 -2
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{menu-compute-BzchkTYh.js → menu-compute-CFLJZpef.js} +2 -2
- package/dist/assets/{validate-menu-CTV_cJNG.js → validate-menu-DPQnAO0-.js} +2 -2
- package/dist/mf-menu.css +1 -1
- package/dist/{provide-dbE6Qt1z.js → provide-FZ08sGZH.js} +56332 -55258
- package/dist/{useActionFeedback-CdY_C_HX.js → useActionFeedback-BNYAkEZw.js} +1 -1
- package/package.json +1 -1
- package/dist/Preview-AdgGTYlQ.js +0 -321
- package/dist/ProductInternalTools-thlSvqbA.js +0 -2906
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useI18n as
|
|
3
|
-
import { useDialog as ze, components as z, FmButtonVariant as
|
|
4
|
-
import { _ as
|
|
5
|
-
import { _ as
|
|
6
|
-
import { _ as
|
|
7
|
-
import { _ as
|
|
8
|
-
import { _ as
|
|
9
|
-
import { u as
|
|
10
|
-
import { b as
|
|
11
|
-
import { v as
|
|
12
|
-
const
|
|
1
|
+
import { defineComponent as Le, computed as c, ref as N, shallowRef as le, h as V, withModifiers as E, onUnmounted as Te, resolveComponent as k, openBlock as m, createBlock as w, unref as t, withCtx as p, renderSlot as I, createElementBlock as _, toDisplayString as x, createElementVNode as v, withDirectives as A, createVNode as r, createCommentVNode as L, Fragment as Ue, renderList as Be } from "vue";
|
|
2
|
+
import { useI18n as Ne } from "@feedmepos/mf-common";
|
|
3
|
+
import { useDialog as ze, components as z, FmButtonVariant as $e } from "@feedmepos/ui-library";
|
|
4
|
+
import { _ as De } from "./index.vue_vue_type_script_setup_true_lang-CGPDazqs.js";
|
|
5
|
+
import { _ as Ee } from "./LinkProductSideSheet.vue_vue_type_script_setup_true_lang-DS7hUQpE.js";
|
|
6
|
+
import { _ as ne } from "./FormSection.vue_vue_type_script_setup_true_lang-pY-_msnM.js";
|
|
7
|
+
import { _ as Ie } from "./PageLayout.vue_vue_type_script_setup_true_lang-B3szUH39.js";
|
|
8
|
+
import { _ as Ae } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-B0j2PNih.js";
|
|
9
|
+
import { u as Ke } from "./useActionFeedback-BNYAkEZw.js";
|
|
10
|
+
import { b as Me, u as oe } from "./provide-FZ08sGZH.js";
|
|
11
|
+
import { v as Re } from "./tableSemantics-C9WFO_I_.js";
|
|
12
|
+
const Qe = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "flex-1 flex justify-between gap-8 pl-8"
|
|
15
|
-
},
|
|
15
|
+
}, je = { class: "flex items-center" }, qe = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Ge = { class: "fm-typo-en-body-md-600" }, Oe = {
|
|
16
16
|
key: 0,
|
|
17
17
|
class: "text-fm-color-typo-secondary",
|
|
18
18
|
role: "alert"
|
|
19
|
-
},
|
|
19
|
+
}, He = {
|
|
20
20
|
key: 1,
|
|
21
21
|
class: "text-fm-color-typo-secondary",
|
|
22
22
|
"data-menu-state": "unavailable"
|
|
23
|
-
},
|
|
23
|
+
}, Je = {
|
|
24
24
|
key: 4,
|
|
25
25
|
class: "flex flex-col flex-1 overflow-hidden pt-16 space-y-16"
|
|
26
|
-
},
|
|
26
|
+
}, We = { class: "flex items-center justify-end space-x-8" }, Xe = { class: "w-[320px]" }, Ye = { class: "fm-typo-en-title-md-600" }, Ze = { class: "flex flex-col gap-32 h-full min-h-0" }, ea = { class: "flex flex-col flex-1 min-h-0 space-y-16" }, aa = { class: "flex items-center space-x-24" }, ta = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, la = { class: "flex gap-8 items-center justify-start" }, ba = /* @__PURE__ */ Le({
|
|
27
27
|
__name: "TakeawayList",
|
|
28
28
|
props: {
|
|
29
29
|
sdk: {},
|
|
30
30
|
catalogPage: { type: Boolean, default: !1 },
|
|
31
31
|
heading: { default: "" }
|
|
32
32
|
},
|
|
33
|
-
setup(
|
|
34
|
-
const
|
|
33
|
+
setup(se) {
|
|
34
|
+
const y = se, { t: a, n: K } = Ne(), T = Me(), ie = ze(), { run: M } = Ke(), f = oe(y.sdk.takeaway.list), u = c(
|
|
35
35
|
() => f.value.status === "ready" ? f.value.value : null
|
|
36
36
|
), R = c(() => {
|
|
37
37
|
var e;
|
|
38
38
|
return ((e = u.value) == null ? void 0 : e.query) ?? "";
|
|
39
|
-
}),
|
|
39
|
+
}), ue = c(() => {
|
|
40
40
|
var e;
|
|
41
41
|
return [...((e = u.value) == null ? void 0 : e.rows) ?? []];
|
|
42
42
|
}), Q = {
|
|
@@ -48,14 +48,14 @@ const Re = {
|
|
|
48
48
|
var n;
|
|
49
49
|
(n = e.querySelector("input")) == null || n.setAttribute("aria-label", String(l.value));
|
|
50
50
|
}
|
|
51
|
-
}, S =
|
|
52
|
-
|
|
53
|
-
),
|
|
51
|
+
}, S = N(!1), U = N(!1), g = N(!1), j = oe(
|
|
52
|
+
y.sdk.linkProduct.catalogue
|
|
53
|
+
), re = c(
|
|
54
54
|
() => j.value.status === "ready" ? j.value.value : null
|
|
55
|
-
),
|
|
55
|
+
), de = c(() => {
|
|
56
56
|
var e;
|
|
57
57
|
return ((e = o.value) == null ? void 0 : e.linkedProducts) ?? [];
|
|
58
|
-
}),
|
|
58
|
+
}), ce = c(
|
|
59
59
|
() => {
|
|
60
60
|
var e;
|
|
61
61
|
return ((e = o.value) == null ? void 0 : e.linkVariantCombinations.state) === "allowed";
|
|
@@ -65,36 +65,36 @@ const Re = {
|
|
|
65
65
|
var e;
|
|
66
66
|
return ((e = o.value) == null ? void 0 : e.linkedGroups) ?? [];
|
|
67
67
|
}
|
|
68
|
-
),
|
|
68
|
+
), me = c(
|
|
69
69
|
() => {
|
|
70
70
|
var e;
|
|
71
71
|
return ((e = o.value) == null ? void 0 : e.linkedProductQuery) ?? "";
|
|
72
72
|
}
|
|
73
|
-
),
|
|
73
|
+
), pe = c(
|
|
74
74
|
() => {
|
|
75
75
|
var e;
|
|
76
76
|
return ((e = o.value) == null ? void 0 : e.linkedProductCount) ?? 0;
|
|
77
77
|
}
|
|
78
78
|
);
|
|
79
|
-
function
|
|
80
|
-
i.value.setLinkedProducts(e),
|
|
79
|
+
function ve(e) {
|
|
80
|
+
i.value.setLinkedProducts(e), U.value = !1;
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function be() {
|
|
83
83
|
var e;
|
|
84
84
|
((e = o.value) == null ? void 0 : e.translation.state) === "allowed" && (i.value.beginTranslationEdit(), g.value = !0);
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function ye() {
|
|
87
87
|
i.value.saveTranslationEdit(), g.value = !1;
|
|
88
88
|
}
|
|
89
89
|
function $() {
|
|
90
90
|
i.value.discardTranslationEdit(), g.value = !1;
|
|
91
91
|
}
|
|
92
|
-
const
|
|
93
|
-
function ye(e) {
|
|
94
|
-
const l = new Set(U.value);
|
|
95
|
-
l.has(e) ? l.delete(e) : l.add(e), U.value = l;
|
|
96
|
-
}
|
|
92
|
+
const B = N(/* @__PURE__ */ new Set());
|
|
97
93
|
function fe(e) {
|
|
94
|
+
const l = new Set(B.value);
|
|
95
|
+
l.has(e) ? l.delete(e) : l.add(e), B.value = l;
|
|
96
|
+
}
|
|
97
|
+
function ke(e) {
|
|
98
98
|
const l = [];
|
|
99
99
|
for (const n of e.products)
|
|
100
100
|
if (l.push({
|
|
@@ -104,7 +104,7 @@ const Re = {
|
|
|
104
104
|
label: n.label,
|
|
105
105
|
combinationCount: n.combinations.length,
|
|
106
106
|
unlink: n.unlink
|
|
107
|
-
}), !!
|
|
107
|
+
}), !!B.value.has(n.id))
|
|
108
108
|
for (const d of n.combinations)
|
|
109
109
|
l.push({
|
|
110
110
|
kind: "combination",
|
|
@@ -116,16 +116,16 @@ const Re = {
|
|
|
116
116
|
});
|
|
117
117
|
return l;
|
|
118
118
|
}
|
|
119
|
-
const
|
|
119
|
+
const ge = c(() => {
|
|
120
120
|
const e = /* @__PURE__ */ new Map();
|
|
121
121
|
for (const l of q.value)
|
|
122
|
-
e.set(l.id ?? "",
|
|
122
|
+
e.set(l.id ?? "", ke(l));
|
|
123
123
|
return e;
|
|
124
124
|
});
|
|
125
125
|
function G(e) {
|
|
126
|
-
return
|
|
126
|
+
return ge.value.get(e.id ?? "") ?? [];
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function he(e) {
|
|
129
129
|
return V(z.FmButton, {
|
|
130
130
|
icon: "delete",
|
|
131
131
|
variant: "tertiary",
|
|
@@ -141,7 +141,7 @@ const Re = {
|
|
|
141
141
|
}, ["stop", "prevent"])
|
|
142
142
|
});
|
|
143
143
|
}
|
|
144
|
-
function
|
|
144
|
+
function we(e) {
|
|
145
145
|
return [
|
|
146
146
|
{
|
|
147
147
|
accessorKey: "label",
|
|
@@ -155,7 +155,7 @@ const Re = {
|
|
|
155
155
|
if (n.kind === "combination")
|
|
156
156
|
return V("span", { class: "pl-24" }, n.label);
|
|
157
157
|
if (n.combinationCount === 0) return n.label;
|
|
158
|
-
const d =
|
|
158
|
+
const d = B.value.has(n.itemId);
|
|
159
159
|
return V("span", { class: "flex gap-8 items-center" }, [
|
|
160
160
|
n.label,
|
|
161
161
|
V(z.FmButton, {
|
|
@@ -168,7 +168,7 @@ const Re = {
|
|
|
168
168
|
{ name: n.label }
|
|
169
169
|
),
|
|
170
170
|
onClick: E(
|
|
171
|
-
() =>
|
|
171
|
+
() => fe(n.itemId),
|
|
172
172
|
["stop", "prevent"]
|
|
173
173
|
)
|
|
174
174
|
})
|
|
@@ -179,13 +179,13 @@ const Re = {
|
|
|
179
179
|
id: "actions",
|
|
180
180
|
enableSorting: !1,
|
|
181
181
|
header: "",
|
|
182
|
-
cell: (l) =>
|
|
182
|
+
cell: (l) => he(l.row.original)
|
|
183
183
|
}
|
|
184
184
|
];
|
|
185
185
|
}
|
|
186
|
-
const i =
|
|
187
|
-
|
|
188
|
-
), C =
|
|
186
|
+
const i = le(
|
|
187
|
+
y.sdk.takeaway.editor()
|
|
188
|
+
), C = le(
|
|
189
189
|
i.value.get()
|
|
190
190
|
);
|
|
191
191
|
let D = i.value.subscribe(
|
|
@@ -195,22 +195,22 @@ const Re = {
|
|
|
195
195
|
() => C.value.status === "ready" ? C.value.value : null
|
|
196
196
|
);
|
|
197
197
|
function O(e) {
|
|
198
|
-
g.value = !1, D(), i.value.dispose(), i.value =
|
|
198
|
+
g.value = !1, D(), i.value.dispose(), i.value = y.sdk.takeaway.editor(e), C.value = i.value.get(), D = i.value.subscribe(
|
|
199
199
|
(l) => C.value = l
|
|
200
200
|
);
|
|
201
201
|
}
|
|
202
202
|
function H() {
|
|
203
203
|
u.value && u.value.create.state !== "allowed" || (O(), S.value = !0);
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function _e(e) {
|
|
206
206
|
O(e.id), S.value = !0;
|
|
207
207
|
}
|
|
208
208
|
function J() {
|
|
209
209
|
g.value && $(), S.value = !1;
|
|
210
210
|
}
|
|
211
|
-
async function
|
|
211
|
+
async function xe() {
|
|
212
212
|
var d, F;
|
|
213
|
-
const e = ((d = o.value) == null ? void 0 : d.name.trim()) ?? "", l =
|
|
213
|
+
const e = ((d = o.value) == null ? void 0 : d.name.trim()) ?? "", l = y.catalogPage ? ((F = u.value) == null ? void 0 : F.catalogName) ?? (y.heading || e) : e;
|
|
214
214
|
(await M(() => i.value.submit(), {
|
|
215
215
|
successMessage: a("menu.takeaway.form.saved", { name: l }),
|
|
216
216
|
showLoading: () => {
|
|
@@ -219,8 +219,8 @@ const Re = {
|
|
|
219
219
|
}
|
|
220
220
|
})).kind === "success" && J();
|
|
221
221
|
}
|
|
222
|
-
function
|
|
223
|
-
e.remove.state === "allowed" &&
|
|
222
|
+
function Se(e) {
|
|
223
|
+
e.remove.state === "allowed" && ie.open({
|
|
224
224
|
title: a("menu.common.dialog.remove.takeaway.title"),
|
|
225
225
|
message: a("menu.common.dialog.remove.takeaway.message", {
|
|
226
226
|
name: e.name
|
|
@@ -228,19 +228,19 @@ const Re = {
|
|
|
228
228
|
primaryActions: {
|
|
229
229
|
text: a("menu.common.actions.remove"),
|
|
230
230
|
close: !0,
|
|
231
|
-
variant:
|
|
231
|
+
variant: $e.Destructive
|
|
232
232
|
},
|
|
233
233
|
secondaryActions: {
|
|
234
234
|
text: a("menu.common.actions.cancel"),
|
|
235
235
|
close: !0
|
|
236
236
|
}
|
|
237
237
|
}).onPrimary(async () => {
|
|
238
|
-
await M(() =>
|
|
238
|
+
await M(() => y.sdk.takeaway.remove(e.id), {
|
|
239
239
|
successMessage: a("menu.takeaway.form.removed", { name: e.name })
|
|
240
240
|
});
|
|
241
241
|
});
|
|
242
242
|
}
|
|
243
|
-
const
|
|
243
|
+
const Ce = c(() => [
|
|
244
244
|
{
|
|
245
245
|
accessorKey: "name",
|
|
246
246
|
header: () => a("menu.takeaway.table.columns.name"),
|
|
@@ -282,7 +282,7 @@ const Re = {
|
|
|
282
282
|
count: e.row.original.linkedProductCount
|
|
283
283
|
})
|
|
284
284
|
},
|
|
285
|
-
...
|
|
285
|
+
...y.catalogPage ? [] : [
|
|
286
286
|
{
|
|
287
287
|
id: "actions",
|
|
288
288
|
size: 52,
|
|
@@ -297,29 +297,29 @@ const Re = {
|
|
|
297
297
|
name: e.row.original.name
|
|
298
298
|
}),
|
|
299
299
|
onClick: E(
|
|
300
|
-
() =>
|
|
300
|
+
() => Se(e.row.original),
|
|
301
301
|
["stop", "prevent"]
|
|
302
302
|
)
|
|
303
303
|
})
|
|
304
304
|
}
|
|
305
305
|
]
|
|
306
306
|
]);
|
|
307
|
-
return
|
|
308
|
-
D(), i.value.dispose();
|
|
307
|
+
return Te(() => {
|
|
308
|
+
y.sdk.takeaway.search(""), D(), i.value.dispose();
|
|
309
309
|
}), (e, l) => {
|
|
310
310
|
var X;
|
|
311
|
-
const n = k("FmButton"), d = k("FmCircularProgress"), F = k("FmSearch"), P = k("FmTable"),
|
|
312
|
-
return m(), w(
|
|
311
|
+
const n = k("FmButton"), d = k("FmCircularProgress"), F = k("FmSearch"), P = k("FmTable"), Fe = k("FmTooltip"), W = k("FmTextField"), Pe = k("FmSpacer"), Ve = k("FmSideSheet");
|
|
312
|
+
return m(), w(Ie, {
|
|
313
313
|
heading: e.catalogPage ? ((X = u.value) == null ? void 0 : X.catalogName) ?? (e.heading || t(a)("menu.common.labels.main")) : t(a)("menu.takeaway.title")
|
|
314
314
|
}, {
|
|
315
315
|
"prepend-heading": p(() => [
|
|
316
316
|
I(e.$slots, "prepend-heading")
|
|
317
317
|
]),
|
|
318
318
|
"append-heading": p(() => [
|
|
319
|
-
!e.catalogPage && t(f).status === "ready" && u.value ? (m(), _("div",
|
|
320
|
-
v("div",
|
|
321
|
-
v("div",
|
|
322
|
-
v("p",
|
|
319
|
+
!e.catalogPage && t(f).status === "ready" && u.value ? (m(), _("div", Qe, [
|
|
320
|
+
v("div", je, [
|
|
321
|
+
v("div", qe, [
|
|
322
|
+
v("p", Ge, x(t(K)(u.value.rows.length)), 1)
|
|
323
323
|
])
|
|
324
324
|
]),
|
|
325
325
|
u.value.rows.length > 0 ? (m(), w(n, {
|
|
@@ -334,53 +334,53 @@ const Re = {
|
|
|
334
334
|
]),
|
|
335
335
|
default: p(() => [
|
|
336
336
|
I(e.$slots, "navigation"),
|
|
337
|
-
t(f).status === "error" ? (m(), _("p",
|
|
337
|
+
t(f).status === "error" ? (m(), _("p", Oe, x(t(T)(t(f).error.message)), 1)) : t(f).status === "unavailable" ? (m(), _("p", He, x(t(T)(t(f).reason)), 1)) : t(f).status === "loading" ? (m(), w(d, { key: 2 })) : u.value && u.value.rows.length === 0 && !R.value ? (m(), w(t(De), {
|
|
338
338
|
key: 3,
|
|
339
339
|
action: u.value.create.state === "allowed" ? { text: t(a)("menu.takeaway.add"), callback: H } : void 0,
|
|
340
340
|
title: t(a)("menu.takeaway.empty.title"),
|
|
341
341
|
subtitle: t(a)("menu.takeaway.empty.subtitle")
|
|
342
|
-
}, null, 8, ["action", "title", "subtitle"])) : u.value ? (m(), _("div",
|
|
343
|
-
v("div",
|
|
344
|
-
v("div",
|
|
342
|
+
}, null, 8, ["action", "title", "subtitle"])) : u.value ? (m(), _("div", Je, [
|
|
343
|
+
v("div", We, [
|
|
344
|
+
v("div", Xe, [
|
|
345
345
|
A(r(F, {
|
|
346
346
|
autofocus: "",
|
|
347
347
|
"model-value": R.value,
|
|
348
348
|
placeholder: t(a)("menu.takeaway.table.search.placeholder"),
|
|
349
|
-
"onUpdate:modelValue":
|
|
349
|
+
"onUpdate:modelValue": y.sdk.takeaway.search
|
|
350
350
|
}, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"]), [
|
|
351
351
|
[Q, t(a)("menu.takeaway.table.search.label")]
|
|
352
352
|
])
|
|
353
353
|
])
|
|
354
354
|
]),
|
|
355
355
|
A(r(P, {
|
|
356
|
-
"column-defs":
|
|
356
|
+
"column-defs": Ce.value,
|
|
357
357
|
"hide-footer": "",
|
|
358
358
|
"page-size": u.value.rows.length,
|
|
359
359
|
"pin-header-row": "",
|
|
360
|
-
"row-data":
|
|
360
|
+
"row-data": ue.value,
|
|
361
361
|
"shrink-at": !1,
|
|
362
|
-
onRowClick: l[0] || (l[0] = (s) =>
|
|
362
|
+
onRowClick: l[0] || (l[0] = (s) => _e(s.original))
|
|
363
363
|
}, null, 8, ["column-defs", "page-size", "row-data"]), [
|
|
364
|
-
[t(
|
|
364
|
+
[t(Re), t(a)("menu.takeaway.table.columns.name")]
|
|
365
365
|
])
|
|
366
366
|
])) : L("", !0),
|
|
367
|
-
r(
|
|
367
|
+
r(Ve, {
|
|
368
368
|
modelValue: S.value,
|
|
369
369
|
"onUpdate:modelValue": l[5] || (l[5] = (s) => S.value = s),
|
|
370
370
|
"is-container": t(z).FmForm,
|
|
371
|
-
"is-container-props": { onValidationSuccess:
|
|
371
|
+
"is-container-props": { onValidationSuccess: xe },
|
|
372
372
|
"max-width": 560
|
|
373
373
|
}, {
|
|
374
374
|
"side-sheet-header": p(() => {
|
|
375
375
|
var s;
|
|
376
376
|
return [
|
|
377
|
-
v("p",
|
|
377
|
+
v("p", Ye, x(((s = o.value) == null ? void 0 : s.mode) === "update" ? t(a)("menu.takeaway.update") : t(a)("menu.takeaway.add")), 1)
|
|
378
378
|
];
|
|
379
379
|
}),
|
|
380
380
|
"side-sheet-footer": p(() => {
|
|
381
381
|
var s, h;
|
|
382
382
|
return [
|
|
383
|
-
v("div",
|
|
383
|
+
v("div", la, [
|
|
384
384
|
r(n, {
|
|
385
385
|
disabled: ((s = o.value) == null ? void 0 : s.submit.state) !== "allowed",
|
|
386
386
|
label: ((h = o.value) == null ? void 0 : h.mode) === "update" ? t(a)("menu.common.actions.update") : t(a)("menu.common.actions.add"),
|
|
@@ -398,35 +398,41 @@ const Re = {
|
|
|
398
398
|
];
|
|
399
399
|
}),
|
|
400
400
|
default: p(() => [
|
|
401
|
-
v("div",
|
|
402
|
-
r(
|
|
401
|
+
v("div", Ze, [
|
|
402
|
+
r(ne, null, {
|
|
403
403
|
default: p(() => {
|
|
404
404
|
var s, h, Y, Z, ee, ae;
|
|
405
405
|
return [
|
|
406
406
|
r(W, {
|
|
407
407
|
disabled: ((s = o.value) == null ? void 0 : s.editName.state) !== "allowed",
|
|
408
|
+
rules: [
|
|
409
|
+
(b) => {
|
|
410
|
+
const te = i.value.validateName(String(b ?? ""));
|
|
411
|
+
return te ? t(T)(te) : !0;
|
|
412
|
+
}
|
|
413
|
+
],
|
|
408
414
|
"helper-state": (h = o.value) != null && h.nameIssue ? "error" : "none",
|
|
409
|
-
"helper-text": (Y = o.value) != null && Y.nameIssue ? t(
|
|
415
|
+
"helper-text": (Y = o.value) != null && Y.nameIssue ? t(T)(o.value.nameIssue) : "",
|
|
410
416
|
label: t(a)("menu.takeaway.columns.title"),
|
|
411
417
|
"model-value": ((Z = o.value) == null ? void 0 : Z.name) ?? "",
|
|
412
418
|
placeholder: t(a)("menu.takeaway.placeholders.title"),
|
|
413
|
-
"onUpdate:modelValue": l[1] || (l[1] = (
|
|
419
|
+
"onUpdate:modelValue": l[1] || (l[1] = (b) => i.value.setName(b))
|
|
414
420
|
}, {
|
|
415
421
|
append: p(() => [
|
|
416
|
-
r(
|
|
422
|
+
r(Fe, {
|
|
417
423
|
placement: "top",
|
|
418
424
|
variant: "plain",
|
|
419
425
|
"z-index": 999
|
|
420
426
|
}, {
|
|
421
427
|
default: p(() => {
|
|
422
|
-
var
|
|
428
|
+
var b;
|
|
423
429
|
return [
|
|
424
430
|
r(n, {
|
|
425
431
|
"aria-label": t(a)("menu.common.translation.translation_label"),
|
|
426
|
-
disabled: ((
|
|
432
|
+
disabled: ((b = o.value) == null ? void 0 : b.translation.state) !== "allowed",
|
|
427
433
|
icon: "g_translate",
|
|
428
434
|
variant: "tertiary",
|
|
429
|
-
onClick:
|
|
435
|
+
onClick: be
|
|
430
436
|
}, null, 8, ["aria-label", "disabled"])
|
|
431
437
|
];
|
|
432
438
|
}),
|
|
@@ -434,19 +440,19 @@ const Re = {
|
|
|
434
440
|
})
|
|
435
441
|
]),
|
|
436
442
|
_: 1
|
|
437
|
-
}, 8, ["disabled", "helper-state", "helper-text", "label", "model-value", "placeholder"]),
|
|
443
|
+
}, 8, ["disabled", "rules", "helper-state", "helper-text", "label", "model-value", "placeholder"]),
|
|
438
444
|
r(W, {
|
|
439
445
|
disabled: ((ee = o.value) == null ? void 0 : ee.editPrice.state) !== "allowed",
|
|
440
446
|
inputmode: "decimal",
|
|
441
447
|
label: t(a)("menu.takeaway.columns.price"),
|
|
442
448
|
"model-value": ((ae = o.value) == null ? void 0 : ae.price) ?? "",
|
|
443
449
|
placeholder: t(a)("menu.takeaway.placeholders.price"),
|
|
444
|
-
"onUpdate:modelValue": l[2] || (l[2] = (
|
|
450
|
+
"onUpdate:modelValue": l[2] || (l[2] = (b) => i.value.setPrice(b))
|
|
445
451
|
}, {
|
|
446
452
|
prepend: p(() => {
|
|
447
|
-
var
|
|
453
|
+
var b;
|
|
448
454
|
return [
|
|
449
|
-
v("span", null, x(((
|
|
455
|
+
v("span", null, x(((b = o.value) == null ? void 0 : b.currencySymbol) ?? ""), 1)
|
|
450
456
|
];
|
|
451
457
|
}),
|
|
452
458
|
_: 1
|
|
@@ -455,14 +461,14 @@ const Re = {
|
|
|
455
461
|
}),
|
|
456
462
|
_: 1
|
|
457
463
|
}),
|
|
458
|
-
v("div",
|
|
459
|
-
r(
|
|
464
|
+
v("div", ea, [
|
|
465
|
+
r(ne, {
|
|
460
466
|
title: t(a)("menu.common.labels.product")
|
|
461
467
|
}, {
|
|
462
468
|
"append-title": p(() => {
|
|
463
469
|
var s;
|
|
464
470
|
return [
|
|
465
|
-
r(
|
|
471
|
+
r(Pe),
|
|
466
472
|
((s = o.value) == null ? void 0 : s.editLinkedProducts.state) === "allowed" ? (m(), w(n, {
|
|
467
473
|
key: 0,
|
|
468
474
|
label: t(a)("menu.common.actions.link_product"),
|
|
@@ -470,17 +476,17 @@ const Re = {
|
|
|
470
476
|
"prepend-icon": "link",
|
|
471
477
|
"text-color": "primary",
|
|
472
478
|
variant: "secondary",
|
|
473
|
-
onClick: l[3] || (l[3] = (h) =>
|
|
479
|
+
onClick: l[3] || (l[3] = (h) => U.value = !0)
|
|
474
480
|
}, null, 8, ["label"])) : L("", !0)
|
|
475
481
|
];
|
|
476
482
|
}),
|
|
477
483
|
default: p(() => [
|
|
478
|
-
v("div",
|
|
479
|
-
v("p",
|
|
480
|
-
count:
|
|
484
|
+
v("div", aa, [
|
|
485
|
+
v("p", ta, x(t(a)("menu.common.labels.product_count", {
|
|
486
|
+
count: pe.value
|
|
481
487
|
})), 1),
|
|
482
488
|
A(r(F, {
|
|
483
|
-
"model-value":
|
|
489
|
+
"model-value": me.value,
|
|
484
490
|
class: "flex-1",
|
|
485
491
|
placeholder: t(a)("menu.common.labels.search_product"),
|
|
486
492
|
"aria-label": t(a)("menu.apply_product.table.search.label"),
|
|
@@ -495,11 +501,11 @@ const Re = {
|
|
|
495
501
|
]),
|
|
496
502
|
_: 1
|
|
497
503
|
}, 8, ["title"]),
|
|
498
|
-
(m(!0), _(
|
|
504
|
+
(m(!0), _(Ue, null, Be(q.value, (s) => (m(), _("div", {
|
|
499
505
|
key: s.id ?? ""
|
|
500
506
|
}, [
|
|
501
507
|
r(P, {
|
|
502
|
-
"column-defs":
|
|
508
|
+
"column-defs": we(s),
|
|
503
509
|
"hide-footer": "",
|
|
504
510
|
"page-size": G(s).length,
|
|
505
511
|
"row-data": G(s),
|
|
@@ -511,16 +517,16 @@ const Re = {
|
|
|
511
517
|
]),
|
|
512
518
|
_: 1
|
|
513
519
|
}, 8, ["modelValue", "is-container", "is-container-props"]),
|
|
514
|
-
r(
|
|
515
|
-
modelValue:
|
|
516
|
-
"onUpdate:modelValue": l[6] || (l[6] = (s) =>
|
|
517
|
-
catalogue:
|
|
518
|
-
"select-variant":
|
|
519
|
-
"selected-products":
|
|
520
|
+
r(Ee, {
|
|
521
|
+
modelValue: U.value,
|
|
522
|
+
"onUpdate:modelValue": l[6] || (l[6] = (s) => U.value = s),
|
|
523
|
+
catalogue: re.value,
|
|
524
|
+
"select-variant": ce.value,
|
|
525
|
+
"selected-products": de.value,
|
|
520
526
|
title: t(a)("menu.takeaway.form.link_product.title"),
|
|
521
|
-
onSubmitLinks:
|
|
527
|
+
onSubmitLinks: ve
|
|
522
528
|
}, null, 8, ["modelValue", "catalogue", "select-variant", "selected-products", "title"]),
|
|
523
|
-
o.value ? (m(), w(
|
|
529
|
+
o.value ? (m(), w(Ae, {
|
|
524
530
|
key: 5,
|
|
525
531
|
dirty: o.value.translationDirty,
|
|
526
532
|
"model-value": g.value,
|
|
@@ -534,7 +540,7 @@ const Re = {
|
|
|
534
540
|
entity: t(a)("menu.takeaway.title")
|
|
535
541
|
}),
|
|
536
542
|
onDiscard: $,
|
|
537
|
-
onSave:
|
|
543
|
+
onSave: ye,
|
|
538
544
|
"onUpdate:modelValue": l[7] || (l[7] = (s) => s || $()),
|
|
539
545
|
"onUpdate:name": i.value.setName,
|
|
540
546
|
"onUpdate:nameLocale": i.value.setNameLocale
|
|
@@ -546,5 +552,5 @@ const Re = {
|
|
|
546
552
|
}
|
|
547
553
|
});
|
|
548
554
|
export {
|
|
549
|
-
|
|
555
|
+
ba as _
|
|
550
556
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { defineComponent as q, shallowRef as W, computed as C, watch as te, onBeforeUnmount as ne, openBlock as p, createElementBlock as T, createBlock as B, unref as e, toDisplayString as j, createVNode as y, resolveComponent as V, Fragment as X, createCommentVNode as M, ref as P, withKeys as se, withModifiers as H, withCtx as R, createElementVNode as D, h as pe, onUnmounted as ve, normalizeClass as J, renderList as oe, onMounted as ce, nextTick as fe, renderSlot as ge } from "vue";
|
|
2
2
|
import { useI18n as Q } from "@feedmepos/mf-common";
|
|
3
3
|
import { components as ye, useSnackbar as be, useDialog as _e } from "@feedmepos/ui-library";
|
|
4
|
-
import { _ as ke } from "./ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-
|
|
5
|
-
import { u as we } from "./useActionFeedback-
|
|
6
|
-
import {
|
|
7
|
-
import { _ as Ce, a as $e } from "./ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { _ as ke } from "./ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-CniqNe-9.js";
|
|
5
|
+
import { u as we } from "./useActionFeedback-BNYAkEZw.js";
|
|
6
|
+
import { e as Z, u as G, b as me, N as ie, f as he, a as xe } from "./provide-FZ08sGZH.js";
|
|
7
|
+
import { _ as Ce, a as $e } from "./ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-Be9Y5Cc1.js";
|
|
8
8
|
import { _ as ue } from "./ProductFilterMenu.vue_vue_type_script_setup_true_lang-Cgc0Ms_n.js";
|
|
9
9
|
import { _ as de } from "./FormSection.vue_vue_type_script_setup_true_lang-pY-_msnM.js";
|
|
10
10
|
import { _ as Ie } from "./TranslationLanguageSelector.vue_vue_type_script_setup_true_lang-BJZ6VcrT.js";
|
|
11
11
|
import { _ as Fe } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-B0j2PNih.js";
|
|
12
|
-
import { O as Se } from "./LinkProductSideSheet.vue_vue_type_script_setup_true_lang-
|
|
13
|
-
import { _ as Te } from "./CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-
|
|
12
|
+
import { O as Se } from "./LinkProductSideSheet.vue_vue_type_script_setup_true_lang-DS7hUQpE.js";
|
|
13
|
+
import { _ as Te } from "./CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-EnajbZtY.js";
|
|
14
14
|
const ze = { class: "h-full overflow-auto pl-[25px]" }, Ee = {
|
|
15
15
|
key: 1,
|
|
16
16
|
class: "fm-typo-en-body-md-400 p-24 text-center text-fm-color-neutral-gray-400"
|
|
@@ -4,8 +4,8 @@ import { useDialog as ce, components as Q, FmButtonVariant as pe } from "@feedme
|
|
|
4
4
|
import { _ as ve } from "./index.vue_vue_type_script_setup_true_lang-CGPDazqs.js";
|
|
5
5
|
import { _ as be } from "./ListCountTag.vue_vue_type_script_setup_true_lang-0bjk8Aly.js";
|
|
6
6
|
import { _ as fe } from "./PageLayout.vue_vue_type_script_setup_true_lang-B3szUH39.js";
|
|
7
|
-
import { u as ye } from "./useActionFeedback-
|
|
8
|
-
import { b as _e, u as he, a as xe } from "./provide-
|
|
7
|
+
import { u as ye } from "./useActionFeedback-BNYAkEZw.js";
|
|
8
|
+
import { b as _e, u as he, a as xe } from "./provide-FZ08sGZH.js";
|
|
9
9
|
const ge = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "flex-1 flex justify-between gap-8 pl-8"
|