@feedmepos/mf-menu 1.0.1-dev.2 → 1.0.1-dev.3
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-DEoljb3M.js} +546 -533
- package/dist/{BindingTable.vue_vue_type_script_setup_true_lang-CoHlJwpz.js → BindingTable.vue_vue_type_script_setup_true_lang-DACfW6SY.js} +1 -1
- package/dist/{Catalog-DjAubC9s.js → Catalog-B6mXH-Ez.js} +4 -4
- package/dist/{CatalogBinding-5JNRTbyZ.js → CatalogBinding-CZbbxQCa.js} +3 -3
- package/dist/{CatalogEditTabs.vue_vue_type_script_setup_true_lang-BorOjk1k.js → CatalogEditTabs.vue_vue_type_script_setup_true_lang-CFjBkgkl.js} +3 -3
- package/dist/{CatalogEditor.vue_vue_type_script_setup_true_lang-CkF7O_V-.js → CatalogEditor.vue_vue_type_script_setup_true_lang-owNQUf8y.js} +6 -6
- package/dist/{CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-3fL43MuR.js → CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-DJLjbLGK.js} +3 -3
- package/dist/{Category-COug7fz8.js → Category-B37n9Row.js} +2 -2
- package/dist/{Category-BbiN4hd7.js → Category-DHGrowud.js} +5 -5
- package/dist/{CategoryList.vue_vue_type_script_setup_true_lang-B_9aPMIN.js → CategoryList.vue_vue_type_script_setup_true_lang-_Ux8uXwn.js} +92 -91
- package/dist/{CookingGuide-Dg7kuF6l.js → CookingGuide-4i1KsBxo.js} +262 -256
- package/dist/{Group-BRpmTqyT.js → Group-DVB_G6lM.js} +5 -5
- package/dist/{Group-C-hwlkgJ.js → Group-N5_9GK2v.js} +2 -2
- package/dist/{GroupList.vue_vue_type_script_setup_true_lang-DowoJ3WM.js → GroupList.vue_vue_type_script_setup_true_lang-BDWyiP8J.js} +5 -5
- package/dist/{Ingredient-BQYnARdC.js → Ingredient-C-puVgJK.js} +3 -3
- package/dist/{LinkProductSideSheet.vue_vue_type_script_setup_true_lang-CgTDkHle.js → LinkProductSideSheet.vue_vue_type_script_setup_true_lang-ChDd6vJd.js} +1 -1
- package/dist/{MenuSetting-DsdM2_OW.js → MenuSetting-QhU37DTL.js} +3 -3
- package/dist/{OrderPacing-5x2YH-_l.js → OrderPacing-COY_HJ8I.js} +96 -93
- package/dist/{OrderPacingFields.vue_vue_type_script_setup_true_lang-DVGJjpiM.js → OrderPacingFields.vue_vue_type_script_setup_true_lang-BAbojJnz.js} +1 -1
- package/dist/{Preview-AdgGTYlQ.js → Preview-DrbsRznu.js} +1 -1
- package/dist/{PriceTierNotice.vue_vue_type_script_setup_true_lang-vmxVZ2ya.js → PriceTierNotice.vue_vue_type_script_setup_true_lang-BTJwvrlT.js} +1 -1
- package/dist/{PrintRoute-COkCv4gf.js → PrintRoute-DVJAvYq-.js} +158 -152
- package/dist/{Product-BJFb_J4h.js → Product-ClT1oFVA.js} +4 -4
- package/dist/{ProductEditorHost.vue_vue_type_script_setup_true_lang-Tpp8MBYS.js → ProductEditorHost.vue_vue_type_script_setup_true_lang-B4qpB-yA.js} +2 -2
- package/dist/{ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-C25Pwqme.js → ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-BWZwFal7.js} +3 -3
- package/dist/{ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-BMAtAK9D.js → ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-yZSYrcYe.js} +1 -1
- package/dist/{ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-Dl4Zr5tx.js → ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-3SaYTgCI.js} +1181 -1174
- package/dist/ProductInternalTools-DRcfn5DE.js +2147 -0
- package/dist/{ProductInventoryDialog-C3ruRWU5.js → ProductInventoryDialog-i48yqlp_.js} +1 -1
- package/dist/{ProductInventoryDialog.vue_vue_type_script_setup_true_lang-MpdIixqI.js → ProductInventoryDialog.vue_vue_type_script_setup_true_lang-C7z4BHKp.js} +1 -1
- package/dist/{ProductList.vue_vue_type_script_setup_true_lang-9_ohgfqE.js → ProductList.vue_vue_type_script_setup_true_lang-DkIwQeby.js} +1990 -1967
- package/dist/{ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-Ctbz-8cd.js → ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-Dr0r1hYM.js} +1 -1
- package/dist/{Products-DMrjQFfu.js → Products-B4yaF9Y5.js} +3 -3
- package/dist/{Publish-f6g0dIao.js → Publish-D8pKpnju.js} +3 -3
- package/dist/{Recipe-p-wxadSN.js → Recipe-Cz4s5W4k.js} +3 -3
- package/dist/{Scheduler-CtebRafn.js → Scheduler-xE_rjFjJ.js} +3 -3
- package/dist/{ServingSequence-CEd4ywOQ.js → ServingSequence-BjD1Xn6Q.js} +103 -97
- package/dist/{Setting-bPKadRu-.js → Setting-BrD0NB_a.js} +6 -6
- package/dist/{Subcategory-DBCnIP0b.js → Subcategory-wbHw1iCU.js} +141 -129
- package/dist/{Takeaway-VBkdW1DM.js → Takeaway-CIqSThUQ.js} +5 -5
- package/dist/{Takeaway-GNRHR5kN.js → Takeaway-DM7weBPk.js} +2 -2
- package/dist/{TakeawayList.vue_vue_type_script_setup_true_lang-DvX3k0Jg.js → TakeawayList.vue_vue_type_script_setup_true_lang-HZP5jmAy.js} +117 -111
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-D1qaEVUu.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CLeJxNfG.js} +6 -6
- package/dist/{Unit-DbGKIprZ.js → Unit-RHuHWCCg.js} +2 -2
- package/dist/{Variant-_edSAKif.js → Variant-MA-mdYxx.js} +114 -108
- package/dist/{_id_-BNVtBV3q.js → _id_-CO1c1eIn.js} +3 -3
- package/dist/{app-BlTv5xag.js → app-DnIyFwTs.js} +420 -406
- package/dist/app.js +1 -1
- 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-BYzYhsd6.js} +2 -2
- package/dist/assets/{validate-menu-CTV_cJNG.js → validate-menu-oaYEuMiz.js} +2 -2
- package/dist/mf-menu.css +1 -1
- package/dist/{provide-dbE6Qt1z.js → provide-UZbVvMqZ.js} +56729 -55678
- package/dist/{useActionFeedback-CdY_C_HX.js → useActionFeedback-CfPMryOm.js} +1 -1
- package/package.json +1 -1
- package/dist/ProductInternalTools-thlSvqbA.js +0 -2906
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as _e, resolveComponent as k, openBlock as m, createBlock as
|
|
2
|
-
import { _ as
|
|
1
|
+
import { defineComponent as _e, resolveComponent as k, openBlock as m, createBlock as w, withCtx as p, createElementVNode as i, toDisplayString as g, computed as O, ref as E, shallowRef as ve, h as Y, withModifiers as j, onUnmounted as ze, unref as o, createElementBlock as _, createVNode as n, Fragment as x, renderList as V, createCommentVNode as D, createTextVNode as Ae, nextTick as Be } from "vue";
|
|
2
|
+
import { _ as T, d as je } from "./FormSection.vue_vue_type_script_setup_true_lang-pY-_msnM.js";
|
|
3
3
|
import { useI18n as De } from "@feedmepos/mf-common";
|
|
4
4
|
import { useDialog as qe, useBreakpoints as He, components as Z } from "@feedmepos/ui-library";
|
|
5
5
|
import { _ as Qe } from "./index.vue_vue_type_script_setup_true_lang-CGPDazqs.js";
|
|
6
|
-
import { _ as Je } from "./app-
|
|
7
|
-
import { _ as We } from "./LinkProductSideSheet.vue_vue_type_script_setup_true_lang-
|
|
6
|
+
import { _ as Je } from "./app-DnIyFwTs.js";
|
|
7
|
+
import { _ as We } from "./LinkProductSideSheet.vue_vue_type_script_setup_true_lang-ChDd6vJd.js";
|
|
8
8
|
import { _ as Xe } from "./PageLayout.vue_vue_type_script_setup_true_lang-B3szUH39.js";
|
|
9
|
-
import { u as Ye } from "./useActionFeedback-
|
|
10
|
-
import { a as Ze, b as eo, u as ge } from "./provide-
|
|
9
|
+
import { u as Ye } from "./useActionFeedback-CfPMryOm.js";
|
|
10
|
+
import { a as Ze, b as eo, u as ge } from "./provide-UZbVvMqZ.js";
|
|
11
11
|
const oo = { class: "fm-typo-en-body-lg-600" }, to = { class: "fm-typo-en-body-lg-600" }, lo = /* @__PURE__ */ _e({
|
|
12
12
|
__name: "RemoveCookingGuideConfirmation",
|
|
13
13
|
props: {
|
|
@@ -16,7 +16,7 @@ const oo = { class: "fm-typo-en-body-lg-600" }, to = { class: "fm-typo-en-body-l
|
|
|
16
16
|
setup(fe) {
|
|
17
17
|
return (h, e) => {
|
|
18
18
|
const F = k("i18n-t");
|
|
19
|
-
return m(),
|
|
19
|
+
return m(), w(F, {
|
|
20
20
|
keypath: h.row.linkedProductCount > 0 ? "menu.cooking_guide.dialogs.remove.message.confirm_with_products" : "menu.cooking_guide.dialogs.remove.message.confirm",
|
|
21
21
|
scope: "global",
|
|
22
22
|
tag: "p"
|
|
@@ -40,54 +40,54 @@ const oo = { class: "fm-typo-en-body-lg-600" }, to = { class: "fm-typo-en-body-l
|
|
|
40
40
|
}, so = { class: "flex justify-end items-center" }, uo = { class: "grow space-y-4" }, ro = { class: "fm-typo-en-body-lg-600" }, co = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, mo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, po = {
|
|
41
41
|
key: 2,
|
|
42
42
|
class: "fixed right-16 bottom-[72px] z-[100] w-[144px]"
|
|
43
|
-
}, vo = { class: "fm-typo-en-title-md-600" }, go = { class: "space-y-24" }, _o = { class: "flex items-center" }, fo = { class: "flex items-center gap-8" }, bo = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ko = { class: "flex-1" }, yo = { class: "bg-fm-color-neutral-gray-100 px-16 py-8" }, ho = { class: "px-16 py-8 flex-1 flex gap-4 overflow-auto min-w-0" }, xo = { class: "fm-typo-en-body-md-500" }, Co = { class: "px-16 py-8 flex gap-8" }, So = { class: "flex gap-8" }, wo = { class: "flex items-center gap-8" }, Fo = { class: "fm-typo-en-title-md-600" }, Vo = { class: "flex flex-col gap-32" }, Io = { class: "flex bg-fm-color-neutral-gray-100 border-b border-b-fm-color-neutral-gray-200" }, $o = { class: "w-2/5 px-16 py-8" }, Oo = { class: "grow px-16 py-8" }, Uo = { class: "w-2/5 px-16 py-8" }, Eo = { class: "grow px-16 py-8" }, Lo = { class: "space-y-16" }, Ko = { class: "flex flex-wrap gap-8 overflow-hidden mb-8" }, Po = { class: "flex gap-8 items-center justify-start" },
|
|
43
|
+
}, vo = { class: "fm-typo-en-title-md-600" }, go = { class: "space-y-24" }, _o = { class: "flex items-center" }, fo = { class: "flex items-center gap-8" }, bo = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ko = { class: "flex-1" }, yo = { class: "bg-fm-color-neutral-gray-100 px-16 py-8" }, ho = { class: "px-16 py-8 flex-1 flex gap-4 overflow-auto min-w-0" }, xo = { class: "fm-typo-en-body-md-500" }, Co = { class: "px-16 py-8 flex gap-8" }, So = { class: "flex gap-8" }, wo = { class: "flex items-center gap-8" }, Fo = { class: "fm-typo-en-title-md-600" }, Vo = { class: "flex flex-col gap-32" }, Io = { class: "flex bg-fm-color-neutral-gray-100 border-b border-b-fm-color-neutral-gray-200" }, $o = { class: "w-2/5 px-16 py-8" }, Oo = { class: "grow px-16 py-8" }, Uo = { class: "w-2/5 px-16 py-8" }, Eo = { class: "grow px-16 py-8" }, Lo = { class: "space-y-16" }, Ko = { class: "flex flex-wrap gap-8 overflow-hidden mb-8" }, Po = { class: "flex gap-8 items-center justify-start" }, Go = { class: "min-w-[700px]" }, Mo = { class: "flex bg-fm-color-neutral-gray-100" }, To = { class: "grow px-16 py-8" }, No = { class: "w-[200px] px-16 py-8" }, Ro = { class: "w-[200px] px-16 py-8" }, zo = { class: "grow px-16 py-8" }, Ao = { class: "w-[200px] px-16 py-8" }, Bo = { class: "w-[200px] px-16 py-8" }, jo = {
|
|
44
44
|
key: 0,
|
|
45
45
|
class: "h-8"
|
|
46
46
|
}, ot = /* @__PURE__ */ _e({
|
|
47
47
|
__name: "CookingGuide",
|
|
48
48
|
setup(fe) {
|
|
49
|
-
const h = Ze(), { t: e } = De(), F = eo(), ee = qe(), { breakpoints: be } = He(), { run: q } = Ye(), L = ge(h.cookingGuide.list), y =
|
|
49
|
+
const h = Ze(), { t: e } = De(), F = eo(), ee = qe(), { breakpoints: be } = He(), { run: q } = Ye(), L = ge(h.cookingGuide.list), y = O(
|
|
50
50
|
() => L.value.status === "ready" ? L.value.value : null
|
|
51
|
-
), ke =
|
|
52
|
-
var
|
|
53
|
-
return ((
|
|
54
|
-
}), oe =
|
|
55
|
-
var
|
|
56
|
-
return [...((
|
|
57
|
-
}),
|
|
51
|
+
), ke = O(() => {
|
|
52
|
+
var t;
|
|
53
|
+
return ((t = y.value) == null ? void 0 : t.query) ?? "";
|
|
54
|
+
}), oe = O(() => {
|
|
55
|
+
var t;
|
|
56
|
+
return [...((t = y.value) == null ? void 0 : t.rows) ?? []];
|
|
57
|
+
}), N = O(() => be.value.xs), K = E(!1), P = E(!1), G = E(!1), te = E(null), U = E(!1), H = E(!1), d = ve(
|
|
58
58
|
h.cookingGuide.editor()
|
|
59
|
-
),
|
|
60
|
-
|
|
59
|
+
), M = ve(
|
|
60
|
+
d.value.get()
|
|
61
61
|
);
|
|
62
|
-
let
|
|
63
|
-
(
|
|
62
|
+
let R = d.value.subscribe(
|
|
63
|
+
(t) => M.value = t
|
|
64
64
|
);
|
|
65
|
-
const v =
|
|
66
|
-
() =>
|
|
67
|
-
), le = ge(h.cookingGuide.productPicker), ye =
|
|
65
|
+
const v = O(
|
|
66
|
+
() => M.value.status === "ready" ? M.value.value : null
|
|
67
|
+
), le = ge(h.cookingGuide.productPicker), ye = O(
|
|
68
68
|
() => le.value.status === "ready" ? le.value.value : null
|
|
69
69
|
);
|
|
70
|
-
function ae(
|
|
71
|
-
|
|
72
|
-
(l) =>
|
|
70
|
+
function ae(t) {
|
|
71
|
+
R(), d.value.dispose(), d.value = h.cookingGuide.editor(t), M.value = d.value.get(), R = d.value.subscribe(
|
|
72
|
+
(l) => M.value = l
|
|
73
73
|
);
|
|
74
74
|
}
|
|
75
75
|
function Q() {
|
|
76
|
-
var
|
|
77
|
-
((
|
|
76
|
+
var t;
|
|
77
|
+
((t = y.value) == null ? void 0 : t.create.state) === "allowed" && (ae(), K.value = !0);
|
|
78
78
|
}
|
|
79
|
-
function ie(
|
|
80
|
-
ae(
|
|
79
|
+
function ie(t) {
|
|
80
|
+
ae(t.id), K.value = !0;
|
|
81
81
|
}
|
|
82
82
|
function ne() {
|
|
83
|
-
K.value = !1, P.value = !1,
|
|
83
|
+
K.value = !1, P.value = !1, G.value = !1, U.value = !1, R();
|
|
84
84
|
}
|
|
85
85
|
function J() {
|
|
86
|
-
ne(),
|
|
86
|
+
ne(), d.value.dispose();
|
|
87
87
|
}
|
|
88
88
|
function se() {
|
|
89
|
-
var
|
|
90
|
-
if (!((
|
|
89
|
+
var t;
|
|
90
|
+
if (!((t = v.value) != null && t.dirty)) return J();
|
|
91
91
|
ee.open({
|
|
92
92
|
title: e("menu.common.dialog.dismiss.title"),
|
|
93
93
|
message: e("menu.common.dialog.dismiss.message"),
|
|
@@ -101,91 +101,91 @@ const oo = { class: "fm-typo-en-body-lg-600" }, to = { class: "fm-typo-en-body-l
|
|
|
101
101
|
}
|
|
102
102
|
}).onPrimary(J);
|
|
103
103
|
}
|
|
104
|
-
function he(
|
|
105
|
-
|
|
104
|
+
function he(t) {
|
|
105
|
+
t ? K.value = !0 : se();
|
|
106
106
|
}
|
|
107
|
-
function
|
|
108
|
-
var
|
|
109
|
-
const
|
|
110
|
-
q(() =>
|
|
111
|
-
successMessage: e("menu.cooking_guide.manager.action.saved", { name:
|
|
107
|
+
function ue() {
|
|
108
|
+
var I;
|
|
109
|
+
const t = ((I = v.value) == null ? void 0 : I.name) ?? "", l = d.value, u = l.submit(), C = l.get(), b = C.status === "ready" && C.value.status === "submitting";
|
|
110
|
+
q(() => u, {
|
|
111
|
+
successMessage: e("menu.cooking_guide.manager.action.saved", { name: t }),
|
|
112
112
|
showLoading: () => {
|
|
113
|
-
var
|
|
114
|
-
return ((
|
|
113
|
+
var z;
|
|
114
|
+
return ((z = v.value) == null ? void 0 : z.status) === "submitting";
|
|
115
115
|
}
|
|
116
116
|
}).finally(() => {
|
|
117
117
|
b && l.dispose();
|
|
118
118
|
}), b && ne();
|
|
119
119
|
}
|
|
120
120
|
function xe() {
|
|
121
|
-
var
|
|
122
|
-
return (((
|
|
121
|
+
var t;
|
|
122
|
+
return (((t = v.value) == null ? void 0 : t.bindings) ?? []).map(
|
|
123
123
|
(l) => l.combinationKey ? { itemId: l.productId, combinationKey: l.combinationKey } : { itemId: l.productId }
|
|
124
124
|
);
|
|
125
125
|
}
|
|
126
|
-
function Ce(
|
|
127
|
-
|
|
128
|
-
|
|
126
|
+
function Ce(t) {
|
|
127
|
+
d.value.setLinkedProducts(
|
|
128
|
+
t.map((l) => ({
|
|
129
129
|
productId: l.itemId,
|
|
130
130
|
combinationKey: l.combinationKey ?? null
|
|
131
131
|
}))
|
|
132
132
|
), P.value = !1;
|
|
133
133
|
}
|
|
134
134
|
function Se() {
|
|
135
|
-
|
|
136
|
-
const
|
|
137
|
-
|
|
135
|
+
d.value.addStep();
|
|
136
|
+
const t = d.value.get(), l = t.status === "ready" ? t.value.steps : [], u = l[l.length - 1];
|
|
137
|
+
u && de(u.id);
|
|
138
138
|
}
|
|
139
|
-
function
|
|
140
|
-
|
|
139
|
+
function de(t) {
|
|
140
|
+
d.value.openStep(t), G.value = !0;
|
|
141
141
|
}
|
|
142
142
|
function W() {
|
|
143
|
-
|
|
143
|
+
d.value.discardStep(), G.value = !1;
|
|
144
144
|
}
|
|
145
145
|
function we() {
|
|
146
|
-
|
|
146
|
+
d.value.saveStep() && (G.value = !1);
|
|
147
147
|
}
|
|
148
|
-
function Fe(
|
|
149
|
-
|
|
148
|
+
function Fe(t) {
|
|
149
|
+
d.value.removeStep(t);
|
|
150
150
|
}
|
|
151
|
-
function Ve(
|
|
152
|
-
|
|
151
|
+
function Ve(t) {
|
|
152
|
+
d.value.setSteps(t);
|
|
153
153
|
}
|
|
154
154
|
function re() {
|
|
155
|
-
const
|
|
155
|
+
const t = te.value, l = t instanceof HTMLElement ? t : t == null ? void 0 : t.$el;
|
|
156
156
|
return l instanceof HTMLTextAreaElement ? l : (l == null ? void 0 : l.querySelector("textarea")) ?? null;
|
|
157
157
|
}
|
|
158
|
-
function Ie(
|
|
159
|
-
const l = re(),
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
158
|
+
function Ie(t) {
|
|
159
|
+
const l = re(), u = l == null ? void 0 : l.selectionStart, C = l == null ? void 0 : l.selectionEnd;
|
|
160
|
+
d.value.appendStepVariable(
|
|
161
|
+
t,
|
|
162
|
+
u ?? void 0,
|
|
163
163
|
C ?? void 0
|
|
164
|
-
),
|
|
165
|
-
const b = re(),
|
|
166
|
-
b == null || b.focus(), b == null || b.setSelectionRange(
|
|
164
|
+
), u != null && Be(() => {
|
|
165
|
+
const b = re(), I = u + t.length + 4;
|
|
166
|
+
b == null || b.focus(), b == null || b.setSelectionRange(I, I);
|
|
167
167
|
});
|
|
168
168
|
}
|
|
169
|
-
function $e(
|
|
170
|
-
|
|
169
|
+
function $e(t) {
|
|
170
|
+
d.value.openOverrides(t.productId, t.combinationKey), U.value = !0;
|
|
171
171
|
}
|
|
172
|
-
function Oe(
|
|
173
|
-
var
|
|
174
|
-
return ((b = (C = (
|
|
172
|
+
function Oe(t, l) {
|
|
173
|
+
var u, C, b;
|
|
174
|
+
return ((b = (C = (u = v.value) == null ? void 0 : u.overrideEditor) == null ? void 0 : C.values[t]) == null ? void 0 : b[l]) ?? "";
|
|
175
175
|
}
|
|
176
|
-
function Ue(
|
|
177
|
-
|
|
176
|
+
function Ue(t, l, u) {
|
|
177
|
+
d.value.setOverrideValue(t, l, u);
|
|
178
178
|
}
|
|
179
179
|
function Ee() {
|
|
180
|
-
|
|
180
|
+
d.value.saveOverrides(), U.value = !1;
|
|
181
181
|
}
|
|
182
182
|
function ce() {
|
|
183
|
-
|
|
183
|
+
d.value.discardOverrides(), U.value = !1;
|
|
184
184
|
}
|
|
185
|
-
function me(
|
|
185
|
+
function me(t) {
|
|
186
186
|
ee.open({
|
|
187
187
|
title: e("menu.cooking_guide.dialogs.remove.title"),
|
|
188
|
-
contentComponent: Y(lo, { row:
|
|
188
|
+
contentComponent: Y(lo, { row: t }),
|
|
189
189
|
primaryActions: {
|
|
190
190
|
text: e("menu.cooking_guide.actions.remove"),
|
|
191
191
|
close: !0,
|
|
@@ -196,9 +196,9 @@ const oo = { class: "fm-typo-en-body-lg-600" }, to = { class: "fm-typo-en-body-l
|
|
|
196
196
|
close: !0
|
|
197
197
|
}
|
|
198
198
|
}).onPrimary(
|
|
199
|
-
() => q(() => h.cookingGuide.remove(
|
|
199
|
+
() => q(() => h.cookingGuide.remove(t.id), {
|
|
200
200
|
successMessage: e("menu.cooking_guide.manager.action.removed", {
|
|
201
|
-
name:
|
|
201
|
+
name: t.name
|
|
202
202
|
})
|
|
203
203
|
})
|
|
204
204
|
);
|
|
@@ -213,24 +213,24 @@ const oo = { class: "fm-typo-en-body-lg-600" }, to = { class: "fm-typo-en-body-l
|
|
|
213
213
|
H.value = !1;
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
|
-
const Ke =
|
|
216
|
+
const Ke = O(() => [
|
|
217
217
|
{
|
|
218
218
|
accessorKey: "name",
|
|
219
219
|
header: () => e("menu.cooking_guide.table.columns.name"),
|
|
220
|
-
cell: (
|
|
220
|
+
cell: (t) => t.getValue(),
|
|
221
221
|
enableSorting: !1
|
|
222
222
|
},
|
|
223
223
|
{
|
|
224
224
|
accessorKey: "linkedProductCount",
|
|
225
225
|
header: () => e("menu.cooking_guide.table.columns.products"),
|
|
226
|
-
cell: (
|
|
226
|
+
cell: (t) => F(t.row.original.productsCell),
|
|
227
227
|
enableSorting: !1
|
|
228
228
|
},
|
|
229
229
|
{
|
|
230
230
|
accessorKey: "stepCount",
|
|
231
231
|
header: () => e("menu.cooking_guide.table.columns.steps"),
|
|
232
|
-
cell: (
|
|
233
|
-
count:
|
|
232
|
+
cell: (t) => e("menu.cooking_guide.table.columns.steps", {
|
|
233
|
+
count: t.getValue()
|
|
234
234
|
}),
|
|
235
235
|
enableSorting: !1
|
|
236
236
|
},
|
|
@@ -240,35 +240,35 @@ const oo = { class: "fm-typo-en-body-lg-600" }, to = { class: "fm-typo-en-body-l
|
|
|
240
240
|
size: 52,
|
|
241
241
|
meta: { cellClass: "pl-16", headerContentClass: "-mx-16" },
|
|
242
242
|
enableSorting: !1,
|
|
243
|
-
cell: (
|
|
243
|
+
cell: (t) => Y("div", { class: "flex justify-end" }, [
|
|
244
244
|
Y(Z.FmButton, {
|
|
245
245
|
icon: "delete",
|
|
246
246
|
variant: "tertiary",
|
|
247
247
|
textColor: "neutral-gray-400",
|
|
248
|
-
disabled:
|
|
248
|
+
disabled: t.row.original.remove.state !== "allowed",
|
|
249
249
|
"aria-label": e("menu.cooking_guide.actions.remove"),
|
|
250
250
|
onClick: j(
|
|
251
|
-
() => me(
|
|
251
|
+
() => me(t.row.original),
|
|
252
252
|
["stop", "prevent"]
|
|
253
253
|
)
|
|
254
254
|
})
|
|
255
255
|
])
|
|
256
256
|
}
|
|
257
257
|
]);
|
|
258
|
-
return
|
|
259
|
-
|
|
260
|
-
}), (
|
|
261
|
-
const
|
|
262
|
-
return m(),
|
|
263
|
-
heading:
|
|
258
|
+
return ze(() => {
|
|
259
|
+
h.cookingGuide.search(""), R(), d.value.dispose();
|
|
260
|
+
}), (t, l) => {
|
|
261
|
+
const u = k("FmButton"), C = k("FmCircularProgress"), b = k("FmSearch"), I = k("FmTable"), z = k("FmListItem"), Pe = k("FmList"), A = k("FmTextField"), Ge = k("FmCardSection"), Me = k("FmCard"), X = k("FmSpacer"), pe = k("FmSideSheet"), Te = k("FmChip"), Ne = k("FmTextarea"), Re = k("FmDialog");
|
|
262
|
+
return m(), w(Xe, {
|
|
263
|
+
heading: o(e)("menu.cooking_guide.title")
|
|
264
264
|
}, {
|
|
265
265
|
"append-heading": p(() => [
|
|
266
266
|
i("div", ao, [
|
|
267
|
-
y.value && y.value.totalCount > 0 && !
|
|
267
|
+
y.value && y.value.totalCount > 0 && !N.value ? (m(), w(u, {
|
|
268
268
|
key: 0,
|
|
269
269
|
class: "ml-auto",
|
|
270
270
|
disabled: y.value.create.state !== "allowed",
|
|
271
|
-
label:
|
|
271
|
+
label: o(e)("menu.cooking_guide.actions.add"),
|
|
272
272
|
"prepend-icon": "add",
|
|
273
273
|
variant: "primary",
|
|
274
274
|
onClick: Q
|
|
@@ -276,37 +276,37 @@ const oo = { class: "fm-typo-en-body-lg-600" }, to = { class: "fm-typo-en-body-l
|
|
|
276
276
|
])
|
|
277
277
|
]),
|
|
278
278
|
default: p(() => [
|
|
279
|
-
|
|
280
|
-
i("p", no, g(
|
|
281
|
-
n(
|
|
282
|
-
label:
|
|
279
|
+
o(L).status === "error" ? (m(), _("div", io, [
|
|
280
|
+
i("p", no, g(o(F)(o(L).error.message)), 1),
|
|
281
|
+
n(u, {
|
|
282
|
+
label: o(e)("menu.common.actions.retry"),
|
|
283
283
|
loading: H.value,
|
|
284
284
|
"prepend-icon": "refresh",
|
|
285
285
|
variant: "secondary",
|
|
286
286
|
onClick: Le
|
|
287
287
|
}, null, 8, ["label", "loading"])
|
|
288
|
-
])) :
|
|
288
|
+
])) : o(L).status === "loading" ? (m(), w(C, { key: 1 })) : y.value && y.value.totalCount === 0 ? (m(), w(o(Qe), {
|
|
289
289
|
key: 2,
|
|
290
|
-
action: y.value.create.state === "allowed" ? { text:
|
|
291
|
-
subtitle:
|
|
292
|
-
title:
|
|
290
|
+
action: y.value.create.state === "allowed" ? { text: o(e)("menu.cooking_guide.empty.action"), callback: Q } : void 0,
|
|
291
|
+
subtitle: o(e)("menu.cooking_guide.empty.subtitle"),
|
|
292
|
+
title: o(e)("menu.cooking_guide.empty.title")
|
|
293
293
|
}, null, 8, ["action", "subtitle", "title"])) : y.value ? (m(), _(x, { key: 3 }, [
|
|
294
294
|
i("div", so, [
|
|
295
295
|
n(b, {
|
|
296
|
-
autofocus: !
|
|
296
|
+
autofocus: !N.value,
|
|
297
297
|
class: "my-8 w-[320px] xs:w-full xs:px-16",
|
|
298
298
|
"model-value": ke.value,
|
|
299
|
-
placeholder:
|
|
300
|
-
"onUpdate:modelValue": l[0] || (l[0] = (a) =>
|
|
299
|
+
placeholder: o(e)("menu.cooking_guide.table.search.placeholder"),
|
|
300
|
+
"onUpdate:modelValue": l[0] || (l[0] = (a) => o(h).cookingGuide.search(String(a ?? "")))
|
|
301
301
|
}, null, 8, ["autofocus", "model-value", "placeholder"])
|
|
302
302
|
]),
|
|
303
|
-
|
|
303
|
+
N.value ? (m(), w(Pe, {
|
|
304
304
|
key: 1,
|
|
305
305
|
class: "w-full px-16 flex-1 min-h-0 overflow-scroll pb-64",
|
|
306
306
|
separator: ""
|
|
307
307
|
}, {
|
|
308
308
|
default: p(() => [
|
|
309
|
-
(m(!0), _(x, null,
|
|
309
|
+
(m(!0), _(x, null, V(oe.value, (a) => (m(), w(z, {
|
|
310
310
|
key: a.id,
|
|
311
311
|
class: "!py-12 !px-0",
|
|
312
312
|
onClick: (s) => ie(a)
|
|
@@ -315,16 +315,16 @@ const oo = { class: "fm-typo-en-body-lg-600" }, to = { class: "fm-typo-en-body-l
|
|
|
315
315
|
i("div", uo, [
|
|
316
316
|
i("div", ro, g(a.name), 1),
|
|
317
317
|
i("div", null, [
|
|
318
|
-
i("div", co, g(
|
|
318
|
+
i("div", co, g(o(e)("menu.cooking_guide.table.mobile.products_linked", {
|
|
319
319
|
count: a.linkedProductCount
|
|
320
320
|
})), 1),
|
|
321
|
-
i("div", mo, g(
|
|
321
|
+
i("div", mo, g(o(e)("menu.cooking_guide.table.columns.steps", {
|
|
322
322
|
count: a.stepCount
|
|
323
323
|
})), 1)
|
|
324
324
|
])
|
|
325
325
|
]),
|
|
326
|
-
n(
|
|
327
|
-
"aria-label":
|
|
326
|
+
n(u, {
|
|
327
|
+
"aria-label": o(e)("menu.cooking_guide.actions.remove"),
|
|
328
328
|
disabled: a.remove.state !== "allowed",
|
|
329
329
|
icon: "delete",
|
|
330
330
|
"text-color": "neutral-gray-400",
|
|
@@ -336,9 +336,9 @@ const oo = { class: "fm-typo-en-body-lg-600" }, to = { class: "fm-typo-en-body-l
|
|
|
336
336
|
}, 1032, ["onClick"]))), 128))
|
|
337
337
|
]),
|
|
338
338
|
_: 1
|
|
339
|
-
})) : (m(),
|
|
339
|
+
})) : (m(), w(Je, { key: 0 }, {
|
|
340
340
|
default: p(() => [
|
|
341
|
-
n(
|
|
341
|
+
n(I, {
|
|
342
342
|
"column-defs": Ke.value,
|
|
343
343
|
"hide-footer": "",
|
|
344
344
|
"page-size": y.value.rows.length,
|
|
@@ -350,11 +350,11 @@ const oo = { class: "fm-typo-en-body-lg-600" }, to = { class: "fm-typo-en-body-l
|
|
|
350
350
|
]),
|
|
351
351
|
_: 1
|
|
352
352
|
})),
|
|
353
|
-
y.value.totalCount > 0 &&
|
|
354
|
-
n(
|
|
353
|
+
y.value.totalCount > 0 && N.value ? (m(), _("div", po, [
|
|
354
|
+
n(u, {
|
|
355
355
|
class: "w-full",
|
|
356
356
|
disabled: y.value.create.state !== "allowed",
|
|
357
|
-
label:
|
|
357
|
+
label: o(e)("menu.cooking_guide.actions.add"),
|
|
358
358
|
"prepend-icon": "add",
|
|
359
359
|
variant: "fab",
|
|
360
360
|
onClick: Q
|
|
@@ -363,9 +363,9 @@ const oo = { class: "fm-typo-en-body-lg-600" }, to = { class: "fm-typo-en-body-l
|
|
|
363
363
|
], 64)) : D("", !0),
|
|
364
364
|
n(pe, {
|
|
365
365
|
"model-value": K.value,
|
|
366
|
-
"is-container":
|
|
366
|
+
"is-container": o(Z).FmForm,
|
|
367
367
|
"is-container-props": {
|
|
368
|
-
onValidationSuccess:
|
|
368
|
+
onValidationSuccess: ue,
|
|
369
369
|
blameFormChildOnValidationFailed: !0,
|
|
370
370
|
class: "flex flex-col h-full py-16"
|
|
371
371
|
},
|
|
@@ -376,22 +376,22 @@ const oo = { class: "fm-typo-en-body-lg-600" }, to = { class: "fm-typo-en-body-l
|
|
|
376
376
|
"side-sheet-header": p(() => {
|
|
377
377
|
var a;
|
|
378
378
|
return [
|
|
379
|
-
i("p", vo, g(((a = v.value) == null ? void 0 : a.mode) === "update" ?
|
|
379
|
+
i("p", vo, g(((a = v.value) == null ? void 0 : a.mode) === "update" ? o(e)("menu.cooking_guide.dialog.update.title") : o(e)("menu.cooking_guide.dialog.add.title")), 1)
|
|
380
380
|
];
|
|
381
381
|
}),
|
|
382
382
|
"side-sheet-footer": p(() => {
|
|
383
383
|
var a, s;
|
|
384
384
|
return [
|
|
385
385
|
i("div", So, [
|
|
386
|
-
n(
|
|
386
|
+
n(u, {
|
|
387
387
|
disabled: ((a = v.value) == null ? void 0 : a.submit.state) !== "allowed",
|
|
388
|
-
label: ((s = v.value) == null ? void 0 : s.mode) === "update" ?
|
|
388
|
+
label: ((s = v.value) == null ? void 0 : s.mode) === "update" ? o(e)("menu.cooking_guide.dialog.update.action") : o(e)("menu.cooking_guide.dialog.add.action"),
|
|
389
389
|
type: "button",
|
|
390
390
|
variant: "primary",
|
|
391
|
-
onClick:
|
|
391
|
+
onClick: ue
|
|
392
392
|
}, null, 8, ["disabled", "label"]),
|
|
393
|
-
n(
|
|
394
|
-
label:
|
|
393
|
+
n(u, {
|
|
394
|
+
label: o(e)("menu.cooking_guide.dialog.actions.cancel"),
|
|
395
395
|
variant: "tertiary",
|
|
396
396
|
onClick: J
|
|
397
397
|
}, null, 8, ["label"])
|
|
@@ -400,33 +400,39 @@ const oo = { class: "fm-typo-en-body-lg-600" }, to = { class: "fm-typo-en-body-l
|
|
|
400
400
|
}),
|
|
401
401
|
default: p(() => [
|
|
402
402
|
i("div", go, [
|
|
403
|
-
n(
|
|
404
|
-
title:
|
|
403
|
+
n(T, {
|
|
404
|
+
title: o(e)("menu.cooking_guide.dialog.sections.guide_detail.title")
|
|
405
405
|
}, {
|
|
406
406
|
default: p(() => {
|
|
407
|
-
var a, s, f,
|
|
407
|
+
var a, s, f, c;
|
|
408
408
|
return [
|
|
409
|
-
n(
|
|
409
|
+
n(A, {
|
|
410
410
|
autofocus: ((a = v.value) == null ? void 0 : a.mode) === "create",
|
|
411
|
+
rules: [
|
|
412
|
+
(r) => {
|
|
413
|
+
const S = d.value.validateName(String(r ?? ""));
|
|
414
|
+
return S ? o(F)(S) : !0;
|
|
415
|
+
}
|
|
416
|
+
],
|
|
411
417
|
"helper-state": (s = v.value) != null && s.nameIssue ? "error" : "none",
|
|
412
|
-
"helper-text": (f = v.value) != null && f.nameIssue ?
|
|
413
|
-
label:
|
|
414
|
-
"model-value": ((
|
|
415
|
-
placeholder:
|
|
418
|
+
"helper-text": (f = v.value) != null && f.nameIssue ? o(F)(v.value.nameIssue) : "",
|
|
419
|
+
label: o(e)("menu.cooking_guide.dialog.sections.guide_detail.name.label"),
|
|
420
|
+
"model-value": ((c = v.value) == null ? void 0 : c.name) ?? "",
|
|
421
|
+
placeholder: o(e)(
|
|
416
422
|
"menu.cooking_guide.dialog.sections.guide_detail.name.placeholder"
|
|
417
423
|
),
|
|
418
|
-
"onUpdate:modelValue": l[2] || (l[2] = (
|
|
419
|
-
}, null, 8, ["autofocus", "helper-state", "helper-text", "label", "model-value", "placeholder"])
|
|
424
|
+
"onUpdate:modelValue": l[2] || (l[2] = (r) => d.value.setName(String(r ?? "")))
|
|
425
|
+
}, null, 8, ["autofocus", "rules", "helper-state", "helper-text", "label", "model-value", "placeholder"])
|
|
420
426
|
];
|
|
421
427
|
}),
|
|
422
428
|
_: 1
|
|
423
429
|
}, 8, ["title"]),
|
|
424
|
-
n(
|
|
425
|
-
title:
|
|
430
|
+
n(T, {
|
|
431
|
+
title: o(e)("menu.cooking_guide.dialog.sections.steps.title")
|
|
426
432
|
}, {
|
|
427
433
|
"append-title": p(() => [
|
|
428
|
-
n(
|
|
429
|
-
label:
|
|
434
|
+
n(u, {
|
|
435
|
+
label: o(e)("menu.cooking_guide.dialog.sections.steps.add"),
|
|
430
436
|
icon: "add",
|
|
431
437
|
variant: "secondary",
|
|
432
438
|
"text-color": "primary",
|
|
@@ -437,7 +443,7 @@ const oo = { class: "fm-typo-en-body-lg-600" }, to = { class: "fm-typo-en-body-l
|
|
|
437
443
|
default: p(() => {
|
|
438
444
|
var a;
|
|
439
445
|
return [
|
|
440
|
-
n(
|
|
446
|
+
n(o(je), {
|
|
441
447
|
"model-value": ((a = v.value) == null ? void 0 : a.steps) ?? [],
|
|
442
448
|
class: "flex flex-col gap-16",
|
|
443
449
|
handle: ".handle",
|
|
@@ -445,28 +451,28 @@ const oo = { class: "fm-typo-en-body-lg-600" }, to = { class: "fm-typo-en-body-l
|
|
|
445
451
|
"onUpdate:modelValue": Ve
|
|
446
452
|
}, {
|
|
447
453
|
item: p(({ element: s }) => [
|
|
448
|
-
n(
|
|
454
|
+
n(Me, {
|
|
449
455
|
class: "rounded-md mb-16 items-center",
|
|
450
456
|
horizontal: "",
|
|
451
457
|
variant: "outlined",
|
|
452
|
-
onClick: (f) =>
|
|
458
|
+
onClick: (f) => de(s.id)
|
|
453
459
|
}, {
|
|
454
460
|
default: p(() => [
|
|
455
461
|
i("div", _o, [
|
|
456
|
-
n(
|
|
462
|
+
n(u, {
|
|
457
463
|
class: "handle",
|
|
458
464
|
icon: "drag_handle",
|
|
459
465
|
variant: "tertiary"
|
|
460
466
|
})
|
|
461
467
|
]),
|
|
462
|
-
n(
|
|
468
|
+
n(Ge, { class: "grow" }, {
|
|
463
469
|
default: p(() => [
|
|
464
|
-
|
|
470
|
+
Ae(g(s.instruction), 1)
|
|
465
471
|
]),
|
|
466
472
|
_: 2
|
|
467
473
|
}, 1024),
|
|
468
|
-
n(
|
|
469
|
-
"aria-label":
|
|
474
|
+
n(u, {
|
|
475
|
+
"aria-label": o(e)("menu.cooking_guide.actions.remove"),
|
|
470
476
|
"prepend-icon": "delete",
|
|
471
477
|
"text-color": "neutral-gray-400",
|
|
472
478
|
variant: "tertiary",
|
|
@@ -482,13 +488,13 @@ const oo = { class: "fm-typo-en-body-lg-600" }, to = { class: "fm-typo-en-body-l
|
|
|
482
488
|
}),
|
|
483
489
|
_: 1
|
|
484
490
|
}, 8, ["title"]),
|
|
485
|
-
n(
|
|
486
|
-
title:
|
|
491
|
+
n(T, {
|
|
492
|
+
title: o(e)("menu.cooking_guide.dialog.sections.apply_product.title")
|
|
487
493
|
}, {
|
|
488
494
|
"append-title": p(() => [
|
|
489
495
|
n(X),
|
|
490
|
-
n(
|
|
491
|
-
label:
|
|
496
|
+
n(u, {
|
|
497
|
+
label: o(e)("menu.cooking_guide.dialog.sections.apply_product.link"),
|
|
492
498
|
icon: "link",
|
|
493
499
|
variant: "secondary",
|
|
494
500
|
"text-color": "primary",
|
|
@@ -500,48 +506,48 @@ const oo = { class: "fm-typo-en-body-lg-600" }, to = { class: "fm-typo-en-body-l
|
|
|
500
506
|
var a, s, f;
|
|
501
507
|
return [
|
|
502
508
|
i("div", fo, [
|
|
503
|
-
i("div", bo, g(
|
|
509
|
+
i("div", bo, g(o(e)(
|
|
504
510
|
"menu.cooking_guide.dialog.sections.apply_product.products_linked",
|
|
505
511
|
{ count: ((a = v.value) == null ? void 0 : a.bindings.length) ?? 0 }
|
|
506
512
|
)), 1),
|
|
507
513
|
i("div", ko, [
|
|
508
514
|
n(b, {
|
|
509
515
|
"model-value": ((s = v.value) == null ? void 0 : s.linkedFilter) ?? "",
|
|
510
|
-
placeholder:
|
|
511
|
-
"onUpdate:modelValue": l[4] || (l[4] = (
|
|
516
|
+
placeholder: o(e)("menu.cooking_guide.dialog.sections.apply_product.search"),
|
|
517
|
+
"onUpdate:modelValue": l[4] || (l[4] = (c) => d.value.setLinkedFilter(String(c ?? "")))
|
|
512
518
|
}, null, 8, ["model-value", "placeholder"])
|
|
513
519
|
])
|
|
514
520
|
]),
|
|
515
|
-
(m(!0), _(x, null,
|
|
516
|
-
key:
|
|
521
|
+
(m(!0), _(x, null, V(((f = v.value) == null ? void 0 : f.linkedGroups) ?? [], (c) => (m(), _(x, {
|
|
522
|
+
key: c.name ?? "uncategorised"
|
|
517
523
|
}, [
|
|
518
|
-
i("div", yo, g(
|
|
519
|
-
(m(!0), _(x, null,
|
|
520
|
-
key:
|
|
524
|
+
i("div", yo, g(c.isSynthetic ? o(e)("menu.tree_editor.labels.addon") : c.name), 1),
|
|
525
|
+
(m(!0), _(x, null, V(c.bindings, (r) => (m(), _("div", {
|
|
526
|
+
key: r.binding.productId + r.binding.combinationKey,
|
|
521
527
|
class: "flex items-center"
|
|
522
528
|
}, [
|
|
523
529
|
i("div", ho, [
|
|
524
|
-
i("span", xo, g(
|
|
530
|
+
i("span", xo, g(r.label), 1)
|
|
525
531
|
]),
|
|
526
532
|
i("div", Co, [
|
|
527
|
-
n(
|
|
528
|
-
"aria-label":
|
|
533
|
+
n(u, {
|
|
534
|
+
"aria-label": o(e)("menu.cooking_guide.step_override_dialog.title"),
|
|
529
535
|
icon: "edit",
|
|
530
536
|
variant: "tertiary",
|
|
531
|
-
onClick: (
|
|
537
|
+
onClick: (S) => $e(r.binding)
|
|
532
538
|
}, null, 8, ["aria-label", "onClick"]),
|
|
533
|
-
n(
|
|
534
|
-
"aria-label":
|
|
539
|
+
n(u, {
|
|
540
|
+
"aria-label": o(e)("menu.cooking_guide.actions.remove"),
|
|
535
541
|
icon: "delete",
|
|
536
542
|
variant: "tertiary",
|
|
537
|
-
onClick: (
|
|
538
|
-
var
|
|
539
|
-
return
|
|
540
|
-
(((
|
|
541
|
-
(
|
|
542
|
-
).map((
|
|
543
|
-
productId:
|
|
544
|
-
combinationKey:
|
|
543
|
+
onClick: (S) => {
|
|
544
|
+
var B;
|
|
545
|
+
return d.value.setLinkedProducts(
|
|
546
|
+
(((B = v.value) == null ? void 0 : B.bindings) ?? []).filter(
|
|
547
|
+
($) => $.productId !== r.binding.productId || $.combinationKey !== r.binding.combinationKey
|
|
548
|
+
).map(($) => ({
|
|
549
|
+
productId: $.productId,
|
|
550
|
+
combinationKey: $.combinationKey
|
|
545
551
|
}))
|
|
546
552
|
);
|
|
547
553
|
}
|
|
@@ -567,8 +573,8 @@ const oo = { class: "fm-typo-en-body-lg-600" }, to = { class: "fm-typo-en-body-l
|
|
|
567
573
|
}, null, 8, ["modelValue", "catalogue", "selected-products"]),
|
|
568
574
|
n(pe, {
|
|
569
575
|
"close-button": !1,
|
|
570
|
-
"model-value":
|
|
571
|
-
"is-container":
|
|
576
|
+
"model-value": G.value,
|
|
577
|
+
"is-container": o(Z).FmForm,
|
|
572
578
|
"is-container-props": {
|
|
573
579
|
onValidationSuccess: we,
|
|
574
580
|
blameFormChildOnValidationFailed: !0,
|
|
@@ -581,13 +587,13 @@ const oo = { class: "fm-typo-en-body-lg-600" }, to = { class: "fm-typo-en-body-l
|
|
|
581
587
|
var a, s;
|
|
582
588
|
return [
|
|
583
589
|
i("div", wo, [
|
|
584
|
-
n(
|
|
585
|
-
label:
|
|
590
|
+
n(u, {
|
|
591
|
+
label: o(e)("menu.cooking_guide.step_dialog.actions.back"),
|
|
586
592
|
"prepend-icon": "arrow_back",
|
|
587
593
|
variant: "tertiary",
|
|
588
594
|
onClick: W
|
|
589
595
|
}, null, 8, ["label"]),
|
|
590
|
-
i("span", Fo, g((s = (a = v.value) == null ? void 0 : a.stepEditor) != null && s.isNew ?
|
|
596
|
+
i("span", Fo, g((s = (a = v.value) == null ? void 0 : a.stepEditor) != null && s.isNew ? o(e)("menu.cooking_guide.step_dialog.add.title") : o(e)("menu.cooking_guide.step_dialog.update.title")), 1)
|
|
591
597
|
])
|
|
592
598
|
];
|
|
593
599
|
}),
|
|
@@ -595,14 +601,14 @@ const oo = { class: "fm-typo-en-body-lg-600" }, to = { class: "fm-typo-en-body-l
|
|
|
595
601
|
var a, s;
|
|
596
602
|
return [
|
|
597
603
|
i("div", Po, [
|
|
598
|
-
n(
|
|
599
|
-
label: (s = (a = v.value) == null ? void 0 : a.stepEditor) != null && s.isNew ?
|
|
604
|
+
n(u, {
|
|
605
|
+
label: (s = (a = v.value) == null ? void 0 : a.stepEditor) != null && s.isNew ? o(e)("menu.cooking_guide.step_dialog.add.action") : o(e)("menu.cooking_guide.step_dialog.update.action"),
|
|
600
606
|
size: "lg",
|
|
601
607
|
type: "submit",
|
|
602
608
|
variant: "primary"
|
|
603
609
|
}, null, 8, ["label"]),
|
|
604
|
-
n(
|
|
605
|
-
label:
|
|
610
|
+
n(u, {
|
|
611
|
+
label: o(e)("menu.cooking_guide.step_dialog.actions.cancel"),
|
|
606
612
|
size: "lg",
|
|
607
613
|
variant: "tertiary",
|
|
608
614
|
onClick: W
|
|
@@ -612,18 +618,18 @@ const oo = { class: "fm-typo-en-body-lg-600" }, to = { class: "fm-typo-en-body-l
|
|
|
612
618
|
}),
|
|
613
619
|
default: p(() => [
|
|
614
620
|
i("div", Vo, [
|
|
615
|
-
n(
|
|
616
|
-
title:
|
|
621
|
+
n(T, {
|
|
622
|
+
title: o(e)("menu.cooking_guide.step_dialog.sections.variables.title")
|
|
617
623
|
}, {
|
|
618
624
|
"append-title": p(() => [
|
|
619
625
|
n(X),
|
|
620
|
-
n(
|
|
621
|
-
label:
|
|
626
|
+
n(u, {
|
|
627
|
+
label: o(e)("menu.cooking_guide.step_dialog.sections.variables.add"),
|
|
622
628
|
"prepend-icon": "add",
|
|
623
629
|
variant: "secondary",
|
|
624
630
|
"text-color": "primary",
|
|
625
631
|
"border-color": "primary",
|
|
626
|
-
onClick:
|
|
632
|
+
onClick: d.value.addStepVariable
|
|
627
633
|
}, null, 8, ["label", "onClick"])
|
|
628
634
|
]),
|
|
629
635
|
default: p(() => {
|
|
@@ -631,71 +637,71 @@ const oo = { class: "fm-typo-en-body-lg-600" }, to = { class: "fm-typo-en-body-l
|
|
|
631
637
|
return [
|
|
632
638
|
i("div", null, [
|
|
633
639
|
i("div", Io, [
|
|
634
|
-
i("span", $o, g(
|
|
640
|
+
i("span", $o, g(o(e)(
|
|
635
641
|
"menu.cooking_guide.step_dialog.sections.variables.columns.key"
|
|
636
642
|
)), 1),
|
|
637
|
-
i("span", Oo, g(
|
|
643
|
+
i("span", Oo, g(o(e)(
|
|
638
644
|
"menu.cooking_guide.step_dialog.sections.variables.columns.value"
|
|
639
645
|
)), 1)
|
|
640
646
|
]),
|
|
641
|
-
(m(!0), _(x, null,
|
|
642
|
-
key:
|
|
647
|
+
(m(!0), _(x, null, V(((s = (a = v.value) == null ? void 0 : a.stepEditor) == null ? void 0 : s.variables) ?? [], (f, c) => (m(), _("div", {
|
|
648
|
+
key: c,
|
|
643
649
|
class: "flex items-center border-b border-b-fm-color-neutral-gray-100"
|
|
644
650
|
}, [
|
|
645
651
|
i("div", Uo, [
|
|
646
|
-
n(
|
|
647
|
-
"aria-label":
|
|
652
|
+
n(A, {
|
|
653
|
+
"aria-label": o(e)(
|
|
648
654
|
"menu.cooking_guide.step_dialog.sections.variables.accessibility.key_input",
|
|
649
|
-
{ index:
|
|
655
|
+
{ index: c + 1 }
|
|
650
656
|
),
|
|
651
657
|
"model-value": f.key,
|
|
652
|
-
placeholder:
|
|
658
|
+
placeholder: o(e)(
|
|
653
659
|
"menu.cooking_guide.step_dialog.sections.variables.placeholders.key"
|
|
654
660
|
),
|
|
655
661
|
rules: [
|
|
656
662
|
() => {
|
|
657
|
-
const
|
|
658
|
-
return
|
|
663
|
+
const r = d.value.stepVariableIssue(c, "key");
|
|
664
|
+
return r ? o(F)(r) : !0;
|
|
659
665
|
}
|
|
660
666
|
],
|
|
661
|
-
"onUpdate:modelValue": (
|
|
662
|
-
key: String(
|
|
667
|
+
"onUpdate:modelValue": (r) => d.value.setStepVariable(c, {
|
|
668
|
+
key: String(r ?? "")
|
|
663
669
|
})
|
|
664
670
|
}, null, 8, ["aria-label", "model-value", "placeholder", "rules", "onUpdate:modelValue"])
|
|
665
671
|
]),
|
|
666
672
|
i("div", Eo, [
|
|
667
|
-
n(
|
|
668
|
-
"aria-label":
|
|
673
|
+
n(A, {
|
|
674
|
+
"aria-label": o(e)(
|
|
669
675
|
"menu.cooking_guide.step_dialog.sections.variables.accessibility.value_input",
|
|
670
|
-
{ index:
|
|
676
|
+
{ index: c + 1 }
|
|
671
677
|
),
|
|
672
678
|
"model-value": f.value,
|
|
673
|
-
placeholder:
|
|
679
|
+
placeholder: o(e)(
|
|
674
680
|
"menu.cooking_guide.step_dialog.sections.variables.placeholders.value"
|
|
675
681
|
),
|
|
676
682
|
rules: [
|
|
677
683
|
() => {
|
|
678
|
-
const
|
|
679
|
-
|
|
684
|
+
const r = d.value.stepVariableIssue(
|
|
685
|
+
c,
|
|
680
686
|
"value"
|
|
681
687
|
);
|
|
682
|
-
return
|
|
688
|
+
return r ? o(F)(r) : !0;
|
|
683
689
|
}
|
|
684
690
|
],
|
|
685
|
-
"onUpdate:modelValue": (
|
|
686
|
-
value: String(
|
|
691
|
+
"onUpdate:modelValue": (r) => d.value.setStepVariable(c, {
|
|
692
|
+
value: String(r ?? "")
|
|
687
693
|
})
|
|
688
694
|
}, null, 8, ["aria-label", "model-value", "placeholder", "rules", "onUpdate:modelValue"])
|
|
689
695
|
]),
|
|
690
|
-
n(
|
|
691
|
-
"aria-label":
|
|
696
|
+
n(u, {
|
|
697
|
+
"aria-label": o(e)(
|
|
692
698
|
"menu.cooking_guide.step_dialog.sections.variables.accessibility.remove",
|
|
693
|
-
{ index:
|
|
699
|
+
{ index: c + 1 }
|
|
694
700
|
),
|
|
695
701
|
icon: "delete",
|
|
696
702
|
"text-color": "neutral-gray-400",
|
|
697
703
|
variant: "tertiary",
|
|
698
|
-
onClick: (
|
|
704
|
+
onClick: (r) => d.value.removeStepVariable(c)
|
|
699
705
|
}, null, 8, ["aria-label", "onClick"])
|
|
700
706
|
]))), 128))
|
|
701
707
|
])
|
|
@@ -703,31 +709,31 @@ const oo = { class: "fm-typo-en-body-lg-600" }, to = { class: "fm-typo-en-body-l
|
|
|
703
709
|
}),
|
|
704
710
|
_: 1
|
|
705
711
|
}, 8, ["title"]),
|
|
706
|
-
n(
|
|
707
|
-
title:
|
|
712
|
+
n(T, {
|
|
713
|
+
title: o(e)("menu.cooking_guide.step_dialog.sections.instruction.title")
|
|
708
714
|
}, {
|
|
709
715
|
default: p(() => {
|
|
710
|
-
var a, s, f,
|
|
716
|
+
var a, s, f, c;
|
|
711
717
|
return [
|
|
712
718
|
i("div", Lo, [
|
|
713
719
|
i("div", Ko, [
|
|
714
|
-
(m(!0), _(x, null,
|
|
715
|
-
(
|
|
716
|
-
(
|
|
717
|
-
) ===
|
|
718
|
-
), (
|
|
719
|
-
key:
|
|
720
|
-
label:
|
|
720
|
+
(m(!0), _(x, null, V((((s = (a = v.value) == null ? void 0 : a.stepEditor) == null ? void 0 : s.variables) ?? []).filter(
|
|
721
|
+
(r, S, B) => r.key && B.findIndex(
|
|
722
|
+
($) => $.key === r.key
|
|
723
|
+
) === S
|
|
724
|
+
), (r) => (m(), w(Te, {
|
|
725
|
+
key: r.key,
|
|
726
|
+
label: r.key,
|
|
721
727
|
class: "text-fm-color-primary bg-fm-color-system-warning-100",
|
|
722
|
-
onMousedown: j((
|
|
728
|
+
onMousedown: j((S) => Ie(r.key), ["prevent"])
|
|
723
729
|
}, null, 8, ["label", "onMousedown"]))), 128))
|
|
724
730
|
]),
|
|
725
|
-
n(
|
|
731
|
+
n(Ne, {
|
|
726
732
|
ref_key: "instructionInput",
|
|
727
733
|
ref: te,
|
|
728
|
-
"aria-label":
|
|
729
|
-
"model-value": ((
|
|
730
|
-
"onUpdate:modelValue": l[6] || (l[6] = (
|
|
734
|
+
"aria-label": o(e)("menu.cooking_guide.step_dialog.sections.instruction.title"),
|
|
735
|
+
"model-value": ((c = (f = v.value) == null ? void 0 : f.stepEditor) == null ? void 0 : c.instruction) ?? "",
|
|
736
|
+
"onUpdate:modelValue": l[6] || (l[6] = (r) => d.value.setStepInstruction(String(r ?? "")))
|
|
731
737
|
}, null, 8, ["aria-label", "model-value"])
|
|
732
738
|
])
|
|
733
739
|
];
|
|
@@ -738,26 +744,26 @@ const oo = { class: "fm-typo-en-body-lg-600" }, to = { class: "fm-typo-en-body-l
|
|
|
738
744
|
]),
|
|
739
745
|
_: 1
|
|
740
746
|
}, 8, ["model-value", "is-container", "is-container-props"]),
|
|
741
|
-
n(
|
|
742
|
-
"model-value":
|
|
747
|
+
n(Re, {
|
|
748
|
+
"model-value": U.value,
|
|
743
749
|
"max-width": 748,
|
|
744
750
|
overlay: !0,
|
|
745
751
|
"onUpdate:modelValue": l[7] || (l[7] = (a) => {
|
|
746
|
-
a ?
|
|
752
|
+
a ? U.value = !0 : ce();
|
|
747
753
|
})
|
|
748
754
|
}, {
|
|
749
755
|
"dialog-header": p(() => [
|
|
750
|
-
i("span", null, g(
|
|
756
|
+
i("span", null, g(o(e)("menu.cooking_guide.step_override_dialog.title")), 1)
|
|
751
757
|
]),
|
|
752
758
|
"dialog-footer": p(() => [
|
|
753
759
|
n(X),
|
|
754
|
-
n(
|
|
755
|
-
label:
|
|
760
|
+
n(u, {
|
|
761
|
+
label: o(e)("menu.cooking_guide.step_override_dialog.actions.cancel"),
|
|
756
762
|
variant: "tertiary",
|
|
757
763
|
onClick: ce
|
|
758
764
|
}, null, 8, ["label"]),
|
|
759
|
-
n(
|
|
760
|
-
label:
|
|
765
|
+
n(u, {
|
|
766
|
+
label: o(e)("menu.cooking_guide.step_override_dialog.actions.save"),
|
|
761
767
|
variant: "primary",
|
|
762
768
|
onClick: Ee
|
|
763
769
|
}, null, 8, ["label"])
|
|
@@ -765,35 +771,35 @@ const oo = { class: "fm-typo-en-body-lg-600" }, to = { class: "fm-typo-en-body-l
|
|
|
765
771
|
default: p(() => {
|
|
766
772
|
var a;
|
|
767
773
|
return [
|
|
768
|
-
i("div",
|
|
769
|
-
i("div",
|
|
770
|
-
i("span",
|
|
771
|
-
i("span",
|
|
772
|
-
i("span",
|
|
774
|
+
i("div", Go, [
|
|
775
|
+
i("div", Mo, [
|
|
776
|
+
i("span", To, g(o(e)("menu.cooking_guide.step_override_dialog.columns.instructions")), 1),
|
|
777
|
+
i("span", No, g(o(e)("menu.cooking_guide.step_override_dialog.columns.variables")), 1),
|
|
778
|
+
i("span", Ro, g(o(e)("menu.cooking_guide.step_override_dialog.columns.value")), 1)
|
|
773
779
|
]),
|
|
774
|
-
(m(!0), _(x, null,
|
|
780
|
+
(m(!0), _(x, null, V(((a = v.value) == null ? void 0 : a.steps) ?? [], (s) => (m(), _("div", {
|
|
775
781
|
key: s.id,
|
|
776
782
|
class: "flex border-t-2"
|
|
777
783
|
}, [
|
|
778
|
-
i("div",
|
|
779
|
-
i("div",
|
|
780
|
-
(m(!0), _(x, null,
|
|
781
|
-
key:
|
|
784
|
+
i("div", zo, g(s.instruction), 1),
|
|
785
|
+
i("div", Ao, [
|
|
786
|
+
(m(!0), _(x, null, V(s.variables, (f, c) => (m(), _("div", {
|
|
787
|
+
key: c,
|
|
782
788
|
class: "py-8"
|
|
783
|
-
}, g(
|
|
789
|
+
}, g(c), 1))), 128))
|
|
784
790
|
]),
|
|
785
|
-
i("div",
|
|
786
|
-
(m(!0), _(x, null,
|
|
787
|
-
n(
|
|
788
|
-
"aria-label":
|
|
791
|
+
i("div", Bo, [
|
|
792
|
+
(m(!0), _(x, null, V(s.variables, (f, c, r) => (m(), _(x, { key: c }, [
|
|
793
|
+
n(A, {
|
|
794
|
+
"aria-label": o(e)(
|
|
789
795
|
"menu.cooking_guide.step_override_dialog.accessibility.value_input",
|
|
790
|
-
{ instruction: s.instruction, variable:
|
|
796
|
+
{ instruction: s.instruction, variable: c }
|
|
791
797
|
),
|
|
792
|
-
"model-value": Oe(s.id,
|
|
798
|
+
"model-value": Oe(s.id, c),
|
|
793
799
|
placeholder: f,
|
|
794
|
-
"onUpdate:modelValue": (
|
|
800
|
+
"onUpdate:modelValue": (S) => Ue(s.id, c, String(S ?? ""))
|
|
795
801
|
}, null, 8, ["aria-label", "model-value", "placeholder", "onUpdate:modelValue"]),
|
|
796
|
-
|
|
802
|
+
r < Object.keys(s.variables).length - 1 ? (m(), _("div", jo)) : D("", !0)
|
|
797
803
|
], 64))), 128))
|
|
798
804
|
])
|
|
799
805
|
]))), 128))
|