@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,554 +0,0 @@
|
|
|
1
|
-
import { defineComponent as Ve, computed as c, ref as B, shallowRef as te, h as V, withModifiers as A, onUnmounted as Le, resolveComponent as f, 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 K, createVNode as r, createCommentVNode as L, mergeProps as Te, Fragment as Ue, renderList as Be } from "vue";
|
|
2
|
-
import { useI18n as ze } from "@feedmepos/mf-common";
|
|
3
|
-
import { useDialog as Ee, components as z, FmButtonVariant as Ne } from "@feedmepos/ui-library";
|
|
4
|
-
import { _ as $e } from "./index.vue_vue_type_script_setup_true_lang-CGPDazqs.js";
|
|
5
|
-
import { _ as De } from "./LinkProductSideSheet.vue_vue_type_script_setup_true_lang-C0rc1FRO.js";
|
|
6
|
-
import { _ as le } from "./vuedraggable-CBtQLb_S.js";
|
|
7
|
-
import { _ as Ae } from "./PageLayout.vue_vue_type_script_setup_true_lang-B3szUH39.js";
|
|
8
|
-
import { _ as Ie } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-B0j2PNih.js";
|
|
9
|
-
import { u as Ke } from "./useActionFeedback-CXx7dOVc.js";
|
|
10
|
-
import { u as Me } from "./useEditorValidation-Ctef5Bxt.js";
|
|
11
|
-
import { b as Re, u as ne } from "./provide-Bwf3KcOV.js";
|
|
12
|
-
import { v as Qe } from "./tableSemantics-C9WFO_I_.js";
|
|
13
|
-
const je = {
|
|
14
|
-
key: 0,
|
|
15
|
-
class: "flex-1 flex justify-between gap-8 pl-8"
|
|
16
|
-
}, qe = { class: "flex items-center" }, Ge = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Oe = { class: "fm-typo-en-body-md-600" }, He = {
|
|
17
|
-
key: 0,
|
|
18
|
-
class: "text-fm-color-typo-secondary",
|
|
19
|
-
role: "alert"
|
|
20
|
-
}, Je = {
|
|
21
|
-
key: 1,
|
|
22
|
-
class: "text-fm-color-typo-secondary",
|
|
23
|
-
"data-menu-state": "unavailable"
|
|
24
|
-
}, We = {
|
|
25
|
-
key: 4,
|
|
26
|
-
class: "flex flex-col flex-1 overflow-hidden pt-16 space-y-16"
|
|
27
|
-
}, Xe = { class: "flex items-center justify-end space-x-8" }, Ye = { class: "w-[320px]" }, Ze = { class: "fm-typo-en-title-md-600" }, ea = { class: "flex flex-col gap-32 h-full min-h-0" }, aa = { class: "flex flex-col flex-1 min-h-0 space-y-16" }, ta = { class: "flex items-center space-x-24" }, la = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, na = { class: "flex gap-8 items-center justify-start" }, fa = /* @__PURE__ */ Ve({
|
|
28
|
-
__name: "TakeawayList",
|
|
29
|
-
props: {
|
|
30
|
-
sdk: {},
|
|
31
|
-
catalogPage: { type: Boolean, default: !1 },
|
|
32
|
-
heading: { default: "" }
|
|
33
|
-
},
|
|
34
|
-
setup(oe) {
|
|
35
|
-
const b = oe, { t: a, n: M } = ze(), E = Re(), se = Ee(), { run: R } = Ke(), y = ne(b.sdk.takeaway.list), u = c(
|
|
36
|
-
() => y.value.status === "ready" ? y.value.value : null
|
|
37
|
-
), Q = c(() => {
|
|
38
|
-
var e;
|
|
39
|
-
return ((e = u.value) == null ? void 0 : e.query) ?? "";
|
|
40
|
-
}), ie = c(() => {
|
|
41
|
-
var e;
|
|
42
|
-
return [...((e = u.value) == null ? void 0 : e.rows) ?? []];
|
|
43
|
-
}), j = {
|
|
44
|
-
mounted: (e, l) => {
|
|
45
|
-
var n;
|
|
46
|
-
(n = e.querySelector("input")) == null || n.setAttribute("aria-label", String(l.value));
|
|
47
|
-
},
|
|
48
|
-
updated: (e, l) => {
|
|
49
|
-
var n;
|
|
50
|
-
(n = e.querySelector("input")) == null || n.setAttribute("aria-label", String(l.value));
|
|
51
|
-
}
|
|
52
|
-
}, S = B(!1), T = B(!1), g = B(!1), q = ne(
|
|
53
|
-
b.sdk.linkProduct.catalogue
|
|
54
|
-
), ue = c(
|
|
55
|
-
() => q.value.status === "ready" ? q.value.value : null
|
|
56
|
-
), re = c(() => {
|
|
57
|
-
var e;
|
|
58
|
-
return ((e = s.value) == null ? void 0 : e.linkedProducts) ?? [];
|
|
59
|
-
}), de = c(
|
|
60
|
-
() => {
|
|
61
|
-
var e;
|
|
62
|
-
return ((e = s.value) == null ? void 0 : e.linkVariantCombinations.state) === "allowed";
|
|
63
|
-
}
|
|
64
|
-
), G = c(
|
|
65
|
-
() => {
|
|
66
|
-
var e;
|
|
67
|
-
return ((e = s.value) == null ? void 0 : e.linkedGroups) ?? [];
|
|
68
|
-
}
|
|
69
|
-
), ce = c(
|
|
70
|
-
() => {
|
|
71
|
-
var e;
|
|
72
|
-
return ((e = s.value) == null ? void 0 : e.linkedProductQuery) ?? "";
|
|
73
|
-
}
|
|
74
|
-
), me = c(
|
|
75
|
-
() => {
|
|
76
|
-
var e;
|
|
77
|
-
return ((e = s.value) == null ? void 0 : e.linkedProductCount) ?? 0;
|
|
78
|
-
}
|
|
79
|
-
);
|
|
80
|
-
function pe(e) {
|
|
81
|
-
i.value.setLinkedProducts(e), T.value = !1;
|
|
82
|
-
}
|
|
83
|
-
function ve() {
|
|
84
|
-
var e;
|
|
85
|
-
((e = s.value) == null ? void 0 : e.translation.state) === "allowed" && (i.value.beginTranslationEdit(), g.value = !0);
|
|
86
|
-
}
|
|
87
|
-
function be() {
|
|
88
|
-
i.value.saveTranslationEdit(), g.value = !1;
|
|
89
|
-
}
|
|
90
|
-
function N() {
|
|
91
|
-
i.value.discardTranslationEdit(), g.value = !1;
|
|
92
|
-
}
|
|
93
|
-
const U = B(/* @__PURE__ */ new Set());
|
|
94
|
-
function ye(e) {
|
|
95
|
-
const l = new Set(U.value);
|
|
96
|
-
l.has(e) ? l.delete(e) : l.add(e), U.value = l;
|
|
97
|
-
}
|
|
98
|
-
function fe(e) {
|
|
99
|
-
const l = [];
|
|
100
|
-
for (const n of e.products)
|
|
101
|
-
if (l.push({
|
|
102
|
-
kind: "product",
|
|
103
|
-
key: n.id,
|
|
104
|
-
itemId: n.id,
|
|
105
|
-
label: n.label,
|
|
106
|
-
combinationCount: n.combinations.length,
|
|
107
|
-
unlink: n.unlink
|
|
108
|
-
}), !!U.value.has(n.id))
|
|
109
|
-
for (const d of n.combinations)
|
|
110
|
-
l.push({
|
|
111
|
-
kind: "combination",
|
|
112
|
-
key: `${n.id}@${d.combinationKey}`,
|
|
113
|
-
itemId: n.id,
|
|
114
|
-
combinationKey: d.combinationKey,
|
|
115
|
-
label: d.label,
|
|
116
|
-
unlink: d.unlink
|
|
117
|
-
});
|
|
118
|
-
return l;
|
|
119
|
-
}
|
|
120
|
-
const ke = c(() => {
|
|
121
|
-
const e = /* @__PURE__ */ new Map();
|
|
122
|
-
for (const l of G.value)
|
|
123
|
-
e.set(l.id ?? "", fe(l));
|
|
124
|
-
return e;
|
|
125
|
-
});
|
|
126
|
-
function O(e) {
|
|
127
|
-
return ke.value.get(e.id ?? "") ?? [];
|
|
128
|
-
}
|
|
129
|
-
function ge(e) {
|
|
130
|
-
return V(z.FmButton, {
|
|
131
|
-
icon: "delete",
|
|
132
|
-
variant: "tertiary",
|
|
133
|
-
textColor: "neutral-gray-400",
|
|
134
|
-
disabled: e.unlink.state !== "allowed",
|
|
135
|
-
"aria-label": e.kind === "product" ? a("menu.apply_product.table.remove_product", {
|
|
136
|
-
name: e.label
|
|
137
|
-
}) : a("menu.apply_product.table.remove_combination", {
|
|
138
|
-
name: e.label
|
|
139
|
-
}),
|
|
140
|
-
onClick: A(() => {
|
|
141
|
-
e.kind === "product" ? i.value.unlinkProduct(e.itemId) : i.value.unlinkCombination(e.itemId, e.combinationKey);
|
|
142
|
-
}, ["stop", "prevent"])
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
function he(e) {
|
|
146
|
-
return [
|
|
147
|
-
{
|
|
148
|
-
accessorKey: "label",
|
|
149
|
-
enableSorting: !1,
|
|
150
|
-
header: () => a("menu.apply_product.table.category_count", {
|
|
151
|
-
name: e.isSynthetic ? a("menu.tree_editor.labels.addon") : e.name,
|
|
152
|
-
count: e.products.length
|
|
153
|
-
}),
|
|
154
|
-
cell: (l) => {
|
|
155
|
-
const n = l.row.original;
|
|
156
|
-
if (n.kind === "combination")
|
|
157
|
-
return V("span", { class: "pl-24" }, n.label);
|
|
158
|
-
if (n.combinationCount === 0) return n.label;
|
|
159
|
-
const d = U.value.has(n.itemId);
|
|
160
|
-
return V("span", { class: "flex gap-8 items-center" }, [
|
|
161
|
-
n.label,
|
|
162
|
-
V(z.FmButton, {
|
|
163
|
-
icon: "keyboard_arrow_up",
|
|
164
|
-
variant: "tertiary",
|
|
165
|
-
class: d ? "" : "rotate-180",
|
|
166
|
-
"aria-expanded": d,
|
|
167
|
-
"aria-label": a(
|
|
168
|
-
d ? "menu.apply_product.table.collapse_combinations" : "menu.apply_product.table.expand_combinations",
|
|
169
|
-
{ name: n.label }
|
|
170
|
-
),
|
|
171
|
-
onClick: A(
|
|
172
|
-
() => ye(n.itemId),
|
|
173
|
-
["stop", "prevent"]
|
|
174
|
-
)
|
|
175
|
-
})
|
|
176
|
-
]);
|
|
177
|
-
}
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
id: "actions",
|
|
181
|
-
enableSorting: !1,
|
|
182
|
-
header: "",
|
|
183
|
-
cell: (l) => ge(l.row.original)
|
|
184
|
-
}
|
|
185
|
-
];
|
|
186
|
-
}
|
|
187
|
-
const i = te(
|
|
188
|
-
b.sdk.takeaway.editor()
|
|
189
|
-
), F = te(
|
|
190
|
-
i.value.get()
|
|
191
|
-
);
|
|
192
|
-
let $ = i.value.subscribe(
|
|
193
|
-
(e) => F.value = e
|
|
194
|
-
);
|
|
195
|
-
const s = c(
|
|
196
|
-
() => F.value.status === "ready" ? F.value.value : null
|
|
197
|
-
), D = Me(() => i.value), H = c(
|
|
198
|
-
() => s.value ? D.issue(s.value.fieldIssues, "name") : null
|
|
199
|
-
);
|
|
200
|
-
function J(e) {
|
|
201
|
-
g.value = !1, $(), i.value.dispose(), i.value = b.sdk.takeaway.editor(e), F.value = i.value.get(), $ = i.value.subscribe(
|
|
202
|
-
(l) => F.value = l
|
|
203
|
-
);
|
|
204
|
-
}
|
|
205
|
-
function W() {
|
|
206
|
-
u.value && u.value.create.state !== "allowed" || (J(), S.value = !0);
|
|
207
|
-
}
|
|
208
|
-
function we(e) {
|
|
209
|
-
J(e.id), S.value = !0;
|
|
210
|
-
}
|
|
211
|
-
function X() {
|
|
212
|
-
g.value && N(), S.value = !1;
|
|
213
|
-
}
|
|
214
|
-
async function _e() {
|
|
215
|
-
var d, C;
|
|
216
|
-
const e = ((d = s.value) == null ? void 0 : d.name.trim()) ?? "", l = b.catalogPage ? ((C = u.value) == null ? void 0 : C.catalogName) ?? (b.heading || e) : e;
|
|
217
|
-
(await R(
|
|
218
|
-
() => D.submit(() => i.value.submit()),
|
|
219
|
-
{
|
|
220
|
-
successMessage: a("menu.takeaway.form.saved", { name: l }),
|
|
221
|
-
showLoading: () => {
|
|
222
|
-
var P;
|
|
223
|
-
return ((P = s.value) == null ? void 0 : P.status) === "submitting";
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
)).kind === "success" && X();
|
|
227
|
-
}
|
|
228
|
-
function xe(e) {
|
|
229
|
-
e.remove.state === "allowed" && se.open({
|
|
230
|
-
title: a("menu.common.dialog.remove.takeaway.title"),
|
|
231
|
-
message: a("menu.common.dialog.remove.takeaway.message", {
|
|
232
|
-
name: e.name
|
|
233
|
-
}),
|
|
234
|
-
primaryActions: {
|
|
235
|
-
text: a("menu.common.actions.remove"),
|
|
236
|
-
close: !0,
|
|
237
|
-
variant: Ne.Destructive
|
|
238
|
-
},
|
|
239
|
-
secondaryActions: {
|
|
240
|
-
text: a("menu.common.actions.cancel"),
|
|
241
|
-
close: !0
|
|
242
|
-
}
|
|
243
|
-
}).onPrimary(async () => {
|
|
244
|
-
await R(() => b.sdk.takeaway.remove(e.id), {
|
|
245
|
-
successMessage: a("menu.takeaway.form.removed", { name: e.name })
|
|
246
|
-
});
|
|
247
|
-
});
|
|
248
|
-
}
|
|
249
|
-
const Se = c(() => [
|
|
250
|
-
{
|
|
251
|
-
accessorKey: "name",
|
|
252
|
-
header: () => a("menu.takeaway.table.columns.name"),
|
|
253
|
-
enableSorting: !1,
|
|
254
|
-
// Legacy fixes the four column widths at 700/200/200/52 rather than
|
|
255
|
-
// letting them distribute (`portal views/Catalog/Edit/Takeaway.vue:84,
|
|
256
|
-
// 103, 116, 126`).
|
|
257
|
-
size: 700
|
|
258
|
-
},
|
|
259
|
-
{
|
|
260
|
-
id: "price",
|
|
261
|
-
// Legacy's header carries the currency symbol once
|
|
262
|
-
// (`menu.takeaway.table.columns.price` = "Price ({symbol})"), resolved
|
|
263
|
-
// from the business country (`Country.getCountry(country).currency`);
|
|
264
|
-
// the cell itself is a plain formatted number with no symbol
|
|
265
|
-
// (`formatCurrency(value, false)`), reproduced here rather than
|
|
266
|
-
// repeating the symbol on every row. `currencySymbol` is the SDK's own
|
|
267
|
-
// country-derived value, not a row's stored currency code.
|
|
268
|
-
header: () => {
|
|
269
|
-
var e;
|
|
270
|
-
return a("menu.takeaway.table.columns.price", {
|
|
271
|
-
symbol: ((e = u.value) == null ? void 0 : e.currencySymbol) ?? ""
|
|
272
|
-
});
|
|
273
|
-
},
|
|
274
|
-
enableSorting: !1,
|
|
275
|
-
size: 200,
|
|
276
|
-
meta: { textAlign: "right" },
|
|
277
|
-
cell: (e) => M(e.row.original.price.amount, {
|
|
278
|
-
minimumFractionDigits: e.row.original.price.precision,
|
|
279
|
-
maximumFractionDigits: e.row.original.price.precision
|
|
280
|
-
})
|
|
281
|
-
},
|
|
282
|
-
{
|
|
283
|
-
id: "linkedProducts",
|
|
284
|
-
header: () => a("menu.takeaway.table.columns.products"),
|
|
285
|
-
enableSorting: !1,
|
|
286
|
-
size: 200,
|
|
287
|
-
cell: (e) => a("menu.takeaway.table.items_linked", {
|
|
288
|
-
count: e.row.original.linkedProductCount
|
|
289
|
-
})
|
|
290
|
-
},
|
|
291
|
-
...b.catalogPage ? [] : [
|
|
292
|
-
{
|
|
293
|
-
id: "actions",
|
|
294
|
-
size: 52,
|
|
295
|
-
meta: { cellClass: "pl-16", headerContentClass: "-mx-16" },
|
|
296
|
-
header: "",
|
|
297
|
-
cell: (e) => V(z.FmButton, {
|
|
298
|
-
icon: "delete",
|
|
299
|
-
variant: "tertiary",
|
|
300
|
-
textColor: "neutral-gray-400",
|
|
301
|
-
disabled: e.row.original.remove.state !== "allowed",
|
|
302
|
-
"aria-label": a("menu.takeaway.table.remove_takeaway", {
|
|
303
|
-
name: e.row.original.name
|
|
304
|
-
}),
|
|
305
|
-
onClick: A(
|
|
306
|
-
() => xe(e.row.original),
|
|
307
|
-
["stop", "prevent"]
|
|
308
|
-
)
|
|
309
|
-
})
|
|
310
|
-
}
|
|
311
|
-
]
|
|
312
|
-
]);
|
|
313
|
-
return Le(() => {
|
|
314
|
-
b.sdk.takeaway.search(""), $(), i.value.dispose();
|
|
315
|
-
}), (e, l) => {
|
|
316
|
-
var Z;
|
|
317
|
-
const n = f("FmButton"), d = f("FmCircularProgress"), C = f("FmSearch"), P = f("FmTable"), Fe = f("FmTooltip"), Y = f("FmTextField"), Ce = f("FmSpacer"), Pe = f("FmSideSheet");
|
|
318
|
-
return m(), w(Ae, {
|
|
319
|
-
heading: e.catalogPage ? ((Z = u.value) == null ? void 0 : Z.catalogName) ?? (e.heading || t(a)("menu.common.labels.main")) : t(a)("menu.takeaway.title")
|
|
320
|
-
}, {
|
|
321
|
-
"prepend-heading": p(() => [
|
|
322
|
-
I(e.$slots, "prepend-heading")
|
|
323
|
-
]),
|
|
324
|
-
"append-heading": p(() => [
|
|
325
|
-
!e.catalogPage && t(y).status === "ready" && u.value ? (m(), _("div", je, [
|
|
326
|
-
v("div", qe, [
|
|
327
|
-
v("div", Ge, [
|
|
328
|
-
v("p", Oe, x(t(M)(u.value.rows.length)), 1)
|
|
329
|
-
])
|
|
330
|
-
]),
|
|
331
|
-
u.value.rows.length > 0 ? (m(), w(n, {
|
|
332
|
-
key: 0,
|
|
333
|
-
disabled: u.value.create.state !== "allowed",
|
|
334
|
-
label: t(a)("menu.takeaway.add"),
|
|
335
|
-
"prepend-icon": "add",
|
|
336
|
-
onClick: W
|
|
337
|
-
}, null, 8, ["disabled", "label"])) : L("", !0)
|
|
338
|
-
])) : L("", !0),
|
|
339
|
-
I(e.$slots, "append-heading")
|
|
340
|
-
]),
|
|
341
|
-
default: p(() => [
|
|
342
|
-
I(e.$slots, "navigation"),
|
|
343
|
-
t(y).status === "error" ? (m(), _("p", He, x(t(E)(t(y).error.message)), 1)) : t(y).status === "unavailable" ? (m(), _("p", Je, x(t(E)(t(y).reason)), 1)) : t(y).status === "loading" ? (m(), w(d, { key: 2 })) : u.value && u.value.rows.length === 0 && !Q.value ? (m(), w(t($e), {
|
|
344
|
-
key: 3,
|
|
345
|
-
action: u.value.create.state === "allowed" ? { text: t(a)("menu.takeaway.add"), callback: W } : void 0,
|
|
346
|
-
title: t(a)("menu.takeaway.empty.title"),
|
|
347
|
-
subtitle: t(a)("menu.takeaway.empty.subtitle")
|
|
348
|
-
}, null, 8, ["action", "title", "subtitle"])) : u.value ? (m(), _("div", We, [
|
|
349
|
-
v("div", Xe, [
|
|
350
|
-
v("div", Ye, [
|
|
351
|
-
K(r(C, {
|
|
352
|
-
autofocus: "",
|
|
353
|
-
"model-value": Q.value,
|
|
354
|
-
placeholder: t(a)("menu.takeaway.table.search.placeholder"),
|
|
355
|
-
"onUpdate:modelValue": b.sdk.takeaway.search
|
|
356
|
-
}, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"]), [
|
|
357
|
-
[j, t(a)("menu.takeaway.table.search.label")]
|
|
358
|
-
])
|
|
359
|
-
])
|
|
360
|
-
]),
|
|
361
|
-
K(r(P, {
|
|
362
|
-
"column-defs": Se.value,
|
|
363
|
-
"hide-footer": "",
|
|
364
|
-
"page-size": u.value.rows.length,
|
|
365
|
-
"pin-header-row": "",
|
|
366
|
-
"row-data": ie.value,
|
|
367
|
-
"shrink-at": !1,
|
|
368
|
-
onRowClick: l[0] || (l[0] = (o) => we(o.original))
|
|
369
|
-
}, null, 8, ["column-defs", "page-size", "row-data"]), [
|
|
370
|
-
[t(Qe), t(a)("menu.takeaway.table.columns.name")]
|
|
371
|
-
])
|
|
372
|
-
])) : L("", !0),
|
|
373
|
-
r(Pe, {
|
|
374
|
-
modelValue: S.value,
|
|
375
|
-
"onUpdate:modelValue": l[4] || (l[4] = (o) => S.value = o),
|
|
376
|
-
"is-container": t(z).FmForm,
|
|
377
|
-
"is-container-props": { onValidationSuccess: _e },
|
|
378
|
-
"max-width": 560
|
|
379
|
-
}, {
|
|
380
|
-
"side-sheet-header": p(() => {
|
|
381
|
-
var o;
|
|
382
|
-
return [
|
|
383
|
-
v("p", Ze, x(((o = s.value) == null ? void 0 : o.mode) === "update" ? t(a)("menu.takeaway.update") : t(a)("menu.takeaway.add")), 1)
|
|
384
|
-
];
|
|
385
|
-
}),
|
|
386
|
-
"side-sheet-footer": p(() => {
|
|
387
|
-
var o, h;
|
|
388
|
-
return [
|
|
389
|
-
v("div", na, [
|
|
390
|
-
r(n, {
|
|
391
|
-
disabled: ((o = s.value) == null ? void 0 : o.submit.state) !== "allowed",
|
|
392
|
-
label: ((h = s.value) == null ? void 0 : h.mode) === "update" ? t(a)("menu.common.actions.update") : t(a)("menu.common.actions.add"),
|
|
393
|
-
size: "lg",
|
|
394
|
-
type: "submit",
|
|
395
|
-
variant: "primary"
|
|
396
|
-
}, null, 8, ["disabled", "label"]),
|
|
397
|
-
r(n, {
|
|
398
|
-
label: t(a)("menu.common.actions.cancel"),
|
|
399
|
-
size: "lg",
|
|
400
|
-
variant: "tertiary",
|
|
401
|
-
onClick: X
|
|
402
|
-
}, null, 8, ["label"])
|
|
403
|
-
])
|
|
404
|
-
];
|
|
405
|
-
}),
|
|
406
|
-
default: p(() => [
|
|
407
|
-
v("div", ea, [
|
|
408
|
-
r(le, null, {
|
|
409
|
-
default: p(() => {
|
|
410
|
-
var o, h, ee, ae;
|
|
411
|
-
return [
|
|
412
|
-
r(Y, Te({
|
|
413
|
-
disabled: ((o = s.value) == null ? void 0 : o.editName.state) !== "allowed",
|
|
414
|
-
"error-messages": H.value ? [t(E)(H.value)] : [],
|
|
415
|
-
label: t(a)("menu.takeaway.columns.title"),
|
|
416
|
-
"model-value": ((h = s.value) == null ? void 0 : h.name) ?? "",
|
|
417
|
-
placeholder: t(a)("menu.takeaway.placeholders.title")
|
|
418
|
-
}, t(D).field("name", i.value.setName)), {
|
|
419
|
-
append: p(() => [
|
|
420
|
-
r(Fe, {
|
|
421
|
-
placement: "top",
|
|
422
|
-
variant: "plain",
|
|
423
|
-
"z-index": 999
|
|
424
|
-
}, {
|
|
425
|
-
default: p(() => {
|
|
426
|
-
var k;
|
|
427
|
-
return [
|
|
428
|
-
r(n, {
|
|
429
|
-
"aria-label": t(a)("menu.common.translation.translation_label"),
|
|
430
|
-
disabled: ((k = s.value) == null ? void 0 : k.translation.state) !== "allowed",
|
|
431
|
-
icon: "g_translate",
|
|
432
|
-
variant: "tertiary",
|
|
433
|
-
onClick: ve
|
|
434
|
-
}, null, 8, ["aria-label", "disabled"])
|
|
435
|
-
];
|
|
436
|
-
}),
|
|
437
|
-
_: 1
|
|
438
|
-
})
|
|
439
|
-
]),
|
|
440
|
-
_: 1
|
|
441
|
-
}, 16, ["disabled", "error-messages", "label", "model-value", "placeholder"]),
|
|
442
|
-
r(Y, {
|
|
443
|
-
disabled: ((ee = s.value) == null ? void 0 : ee.editPrice.state) !== "allowed",
|
|
444
|
-
inputmode: "decimal",
|
|
445
|
-
label: t(a)("menu.takeaway.columns.price"),
|
|
446
|
-
"model-value": ((ae = s.value) == null ? void 0 : ae.price) ?? "",
|
|
447
|
-
placeholder: t(a)("menu.takeaway.placeholders.price"),
|
|
448
|
-
"onUpdate:modelValue": l[1] || (l[1] = (k) => i.value.setPrice(k))
|
|
449
|
-
}, {
|
|
450
|
-
prepend: p(() => {
|
|
451
|
-
var k;
|
|
452
|
-
return [
|
|
453
|
-
v("span", null, x(((k = s.value) == null ? void 0 : k.currencySymbol) ?? ""), 1)
|
|
454
|
-
];
|
|
455
|
-
}),
|
|
456
|
-
_: 1
|
|
457
|
-
}, 8, ["disabled", "label", "model-value", "placeholder"])
|
|
458
|
-
];
|
|
459
|
-
}),
|
|
460
|
-
_: 1
|
|
461
|
-
}),
|
|
462
|
-
v("div", aa, [
|
|
463
|
-
r(le, {
|
|
464
|
-
title: t(a)("menu.common.labels.product")
|
|
465
|
-
}, {
|
|
466
|
-
"append-title": p(() => {
|
|
467
|
-
var o;
|
|
468
|
-
return [
|
|
469
|
-
r(Ce),
|
|
470
|
-
((o = s.value) == null ? void 0 : o.editLinkedProducts.state) === "allowed" ? (m(), w(n, {
|
|
471
|
-
key: 0,
|
|
472
|
-
label: t(a)("menu.common.actions.link_product"),
|
|
473
|
-
"border-color": "primary",
|
|
474
|
-
"prepend-icon": "link",
|
|
475
|
-
"text-color": "primary",
|
|
476
|
-
variant: "secondary",
|
|
477
|
-
onClick: l[2] || (l[2] = (h) => T.value = !0)
|
|
478
|
-
}, null, 8, ["label"])) : L("", !0)
|
|
479
|
-
];
|
|
480
|
-
}),
|
|
481
|
-
default: p(() => [
|
|
482
|
-
v("div", ta, [
|
|
483
|
-
v("p", la, x(t(a)("menu.common.labels.product_count", {
|
|
484
|
-
count: me.value
|
|
485
|
-
})), 1),
|
|
486
|
-
K(r(C, {
|
|
487
|
-
"model-value": ce.value,
|
|
488
|
-
class: "flex-1",
|
|
489
|
-
placeholder: t(a)("menu.common.labels.search_product"),
|
|
490
|
-
"aria-label": t(a)("menu.apply_product.table.search.label"),
|
|
491
|
-
"onUpdate:modelValue": l[3] || (l[3] = (o) => i.value.setLinkedProductQuery(String(o ?? "")))
|
|
492
|
-
}, null, 8, ["model-value", "placeholder", "aria-label"]), [
|
|
493
|
-
[
|
|
494
|
-
j,
|
|
495
|
-
t(a)("menu.apply_product.table.search.label")
|
|
496
|
-
]
|
|
497
|
-
])
|
|
498
|
-
])
|
|
499
|
-
]),
|
|
500
|
-
_: 1
|
|
501
|
-
}, 8, ["title"]),
|
|
502
|
-
(m(!0), _(Ue, null, Be(G.value, (o) => (m(), _("div", {
|
|
503
|
-
key: o.id ?? ""
|
|
504
|
-
}, [
|
|
505
|
-
r(P, {
|
|
506
|
-
"column-defs": he(o),
|
|
507
|
-
"hide-footer": "",
|
|
508
|
-
"page-size": O(o).length,
|
|
509
|
-
"row-data": O(o),
|
|
510
|
-
"shrink-at": !1
|
|
511
|
-
}, null, 8, ["column-defs", "page-size", "row-data"])
|
|
512
|
-
]))), 128))
|
|
513
|
-
])
|
|
514
|
-
])
|
|
515
|
-
]),
|
|
516
|
-
_: 1
|
|
517
|
-
}, 8, ["modelValue", "is-container", "is-container-props"]),
|
|
518
|
-
r(De, {
|
|
519
|
-
modelValue: T.value,
|
|
520
|
-
"onUpdate:modelValue": l[5] || (l[5] = (o) => T.value = o),
|
|
521
|
-
catalogue: ue.value,
|
|
522
|
-
"select-variant": de.value,
|
|
523
|
-
"selected-products": re.value,
|
|
524
|
-
title: t(a)("menu.takeaway.form.link_product.title"),
|
|
525
|
-
onSubmitLinks: pe
|
|
526
|
-
}, null, 8, ["modelValue", "catalogue", "select-variant", "selected-products", "title"]),
|
|
527
|
-
s.value ? (m(), w(Ie, {
|
|
528
|
-
key: 5,
|
|
529
|
-
dirty: s.value.translationDirty,
|
|
530
|
-
"model-value": g.value,
|
|
531
|
-
name: s.value.name,
|
|
532
|
-
"name-locale": s.value.nameLocale,
|
|
533
|
-
"name-section-label": t(a)("menu.common.translation.name_section", {
|
|
534
|
-
entity: t(a)("menu.takeaway.title")
|
|
535
|
-
}),
|
|
536
|
-
"supported-locales": s.value.supportedLocales,
|
|
537
|
-
title: t(a)("menu.common.translation.sheet_title", {
|
|
538
|
-
entity: t(a)("menu.takeaway.title")
|
|
539
|
-
}),
|
|
540
|
-
onDiscard: N,
|
|
541
|
-
onSave: be,
|
|
542
|
-
"onUpdate:modelValue": l[6] || (l[6] = (o) => o || N()),
|
|
543
|
-
"onUpdate:name": i.value.setName,
|
|
544
|
-
"onUpdate:nameLocale": i.value.setNameLocale
|
|
545
|
-
}, null, 8, ["dirty", "model-value", "name", "name-locale", "name-section-label", "supported-locales", "title", "onUpdate:name", "onUpdate:nameLocale"])) : L("", !0)
|
|
546
|
-
]),
|
|
547
|
-
_: 3
|
|
548
|
-
}, 8, ["heading"]);
|
|
549
|
-
};
|
|
550
|
-
}
|
|
551
|
-
});
|
|
552
|
-
export {
|
|
553
|
-
fa as _
|
|
554
|
-
};
|