@feedmepos/mf-menu-portal 1.0.4-dev.3 → 1.0.4-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-nS46pByh.js → App-CrpoLCjA.js} +3 -3
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-C9OSr8ft.js → ApplyProduct.vue_vue_type_script_setup_true_lang-Hdsnu29V.js} +1 -1
- package/dist/{BindingTable.vue_vue_type_script_setup_true_lang-DnvN5R5w.js → BindingTable.vue_vue_type_script_setup_true_lang-D3CmOOPY.js} +1 -1
- package/dist/{Catalog-B4RS8T29.js → Catalog-VU3HhNro.js} +4 -4
- package/dist/{CatalogBinding-6_783kbu.js → CatalogBinding-BNATtZEY.js} +3 -3
- package/dist/{CatalogEditTabs.vue_vue_type_script_setup_true_lang-BawCLY5-.js → CatalogEditTabs.vue_vue_type_script_setup_true_lang-BmG-xpW4.js} +3 -3
- package/dist/{CatalogEditor.vue_vue_type_script_setup_true_lang-BjP8ZXyb.js → CatalogEditor.vue_vue_type_script_setup_true_lang-BFsRDFpj.js} +7 -7
- package/dist/{CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-Diapahfp.js → CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-Bk4FqVmx.js} +14 -14
- package/dist/{Category-CqneIGq4.js → Category-DMoXTsfG.js} +5 -5
- package/dist/{Category-DNQH1CI7.js → Category-DxjdQ-NN.js} +2 -2
- package/dist/CategoryList.vue_vue_type_script_setup_true_lang-B3Ts1O-9.js +847 -0
- package/dist/{CookingGuide-DTAiFmEL.js → CookingGuide-DiZZDYD-.js} +5 -5
- package/dist/{Group-DeUqUomY.js → Group-DFR8q-tt.js} +5 -5
- package/dist/{Group-5xO2j3CL.js → Group-rzfh_o6r.js} +2 -2
- package/dist/GroupList.vue_vue_type_script_setup_true_lang-DiN-wQXX.js +1807 -0
- package/dist/Ingredient-DpjGIuH9.js +505 -0
- package/dist/LinkProductSideSheet.vue_vue_type_script_setup_true_lang-CnI80Ojd.js +782 -0
- package/dist/{MenuSetting-DdekHsQy.js → MenuSetting-DR-pDSF_.js} +4 -4
- package/dist/OrderPacing-JcTuweqF.js +769 -0
- package/dist/{OrderPacingFields.vue_vue_type_script_setup_true_lang-C3SqQPSr.js → OrderPacingFields.vue_vue_type_script_setup_true_lang-HwwJ2mGv.js} +2 -2
- package/dist/{Preview-DGTw0POk.js → Preview-BZyun5lZ.js} +1 -1
- package/dist/{PriceTierNotice.vue_vue_type_script_setup_true_lang-DffhFv0Y.js → PriceTierNotice.vue_vue_type_script_setup_true_lang-DquqNbE1.js} +1 -1
- package/dist/PrintRoute-CzEx2dCt.js +518 -0
- package/dist/{Product-CsbcyIgD.js → Product-CQb0n06E.js} +4 -4
- package/dist/ProductAttributeFilter.vue_vue_type_script_setup_true_lang-B2KdolJS.js +7931 -0
- package/dist/{ProductEditorHost.vue_vue_type_script_setup_true_lang--rBKdKV7.js → ProductEditorHost.vue_vue_type_script_setup_true_lang-CBlDEjqF.js} +9 -9
- package/dist/ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-D8NQTCLx.js +2011 -0
- package/dist/{ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-DtCzHjpN.js → ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-cG47Pu-6.js} +1 -1
- package/dist/{ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-aDx01-WW.js → ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-0UwUcA2L.js} +630 -587
- package/dist/{ProductInternalTools-Ccd4dAmx.js → ProductInternalTools-QrBR1nFp.js} +2 -2
- package/dist/{ProductInventoryDialog-DYcKdKHi.js → ProductInventoryDialog-fV38GO1a.js} +1 -1
- package/dist/{ProductInventoryDialog.vue_vue_type_script_setup_true_lang-DySFcCJz.js → ProductInventoryDialog.vue_vue_type_script_setup_true_lang-Bzb3RrMg.js} +1 -1
- package/dist/ProductList.vue_vue_type_script_setup_true_lang-BwKQESr3.js +2765 -0
- package/dist/{ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-Dw2xiPYX.js → ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-CDYcHXo1.js} +1 -1
- package/dist/{Products-phZwCZhU.js → Products-B8tysOAL.js} +3 -3
- package/dist/Publish-DTvOvFNa.js +1337 -0
- package/dist/Recipe-Ddx31csF.js +388 -0
- package/dist/{Scheduler-C-A5m92O.js → Scheduler-CST5L_cw.js} +314 -254
- package/dist/ServingSequence-DYyEZI2S.js +374 -0
- package/dist/{Setting-C24V-lps.js → Setting-Ip0pGjks.js} +6 -6
- package/dist/Subcategory-BIgjzVta.js +459 -0
- package/dist/{Takeaway-DywX5BiX.js → Takeaway-CekhGM-m.js} +2 -2
- package/dist/{Takeaway-BFP2ohJn.js → Takeaway-aXsPg4JT.js} +5 -5
- package/dist/{TakeawayList.vue_vue_type_script_setup_true_lang-B3QS7o1v.js → TakeawayList.vue_vue_type_script_setup_true_lang-CaRR4_j3.js} +4 -4
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CshqYpc9.js +1291 -0
- package/dist/Unit-BMW8u0Us.js +424 -0
- package/dist/{Variant-BBfWhH-s.js → Variant-CZsrYRMU.js} +5 -5
- package/dist/{_id_-BooM3FX1.js → _id_-D4swrvNa.js} +3 -3
- package/dist/{app-Bmgb8ACe.js → app-BWwwHsWi.js} +312 -312
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/app.d.ts +60 -0
- package/dist/apps/mf-menu/src/components/Product/BulkCategorySelect.vue.d.ts +37 -0
- package/dist/apps/mf-menu/src/components/Product/ProductAttributeFilter.vue.d.ts +11 -1
- package/dist/apps/mf-menu/src/components/ProductList.vue.d.ts +2 -2
- package/dist/apps/mf-menu/src/components/feature/NestedGroupManager/NestedGroupOverrideSheets.vue.d.ts +27 -0
- package/dist/apps/mf-menu/src/components/feature/RestaurantAttributesFilter.vue.d.ts +20 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{menu-compute-CG-fX5pi.js → menu-compute-D7TdiHt4.js} +4 -4
- package/dist/assets/{validate-menu-BeGMWVns.js → validate-menu-DXppWUVq.js} +2 -2
- package/dist/mf-menu-portal.css +1 -1
- package/dist/{provide-CfF0FmUz.js → provide-CDmXzkhz.js} +67990 -66891
- package/dist/{useActionFeedback-DyUCQl2x.js → useActionFeedback-Dm2HDa_2.js} +1 -1
- package/dist/{FormSection.vue_vue_type_script_setup_true_lang-pY-_msnM.js → vuedraggable-CBtQLb_S.js} +140 -139
- package/package.json +2 -2
- package/dist/CategoryList.vue_vue_type_script_setup_true_lang-Bt_onPrP.js +0 -797
- package/dist/GroupList.vue_vue_type_script_setup_true_lang-Dgya_JLB.js +0 -2183
- package/dist/Ingredient-BlDW3TfZ.js +0 -463
- package/dist/LinkProductSideSheet.vue_vue_type_script_setup_true_lang-0tCpJlOf.js +0 -709
- package/dist/OrderPacing-Bb2n5wmI.js +0 -698
- package/dist/PrintRoute-CJB4gIP2.js +0 -473
- package/dist/ProductChipSummary.vue_vue_type_script_setup_true_lang-D8DygCBl.js +0 -110
- package/dist/ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-J6LpJ5wT.js +0 -1257
- package/dist/ProductList.vue_vue_type_script_setup_true_lang-DTLslTpK.js +0 -10353
- package/dist/Publish-BeKIXu3z.js +0 -1261
- package/dist/Recipe-Fo4tBkBv.js +0 -350
- package/dist/ServingSequence-BrCwLSO7.js +0 -336
- package/dist/Subcategory-B0oZIKbw.js +0 -412
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-D7mhnrXx.js +0 -1213
- package/dist/Unit-NhEwH-kr.js +0 -385
- package/dist/apps/mf-menu/src/views/MenuManagementEditor/RestaurantAttributesFilter.vue.d.ts +0 -2
|
@@ -1,463 +0,0 @@
|
|
|
1
|
-
import { defineComponent as ae, computed as p, ref as L, shallowRef as Y, h as Ue, withModifiers as Ve, onUnmounted as Be, resolveComponent as r, openBlock as m, createBlock as w, unref as e, withCtx as b, createElementBlock as f, toDisplayString as h, Fragment as U, createElementVNode as y, createVNode as u, createCommentVNode as V, mergeProps as Z, renderList as ee, createTextVNode as $e } from "vue";
|
|
2
|
-
import { useRouter as Ae } from "vue-router";
|
|
3
|
-
import { useI18n as Ne } from "@feedmepos/mf-common";
|
|
4
|
-
import { useDialog as De, components as ne, FmButtonVariant as Le } from "@feedmepos/ui-library";
|
|
5
|
-
import { _ as te } from "./index.vue_vue_type_script_setup_true_lang-CGPDazqs.js";
|
|
6
|
-
import { _ as Ee } from "./BindingLinkDialog.vue_vue_type_script_setup_true_lang-BZVQRyRI.js";
|
|
7
|
-
import { _ as le } from "./BindingTable.vue_vue_type_script_setup_true_lang-DnvN5R5w.js";
|
|
8
|
-
import { _ as Te } from "./PageLayout.vue_vue_type_script_setup_true_lang-B3szUH39.js";
|
|
9
|
-
import { u as ze } from "./useActionFeedback-DyUCQl2x.js";
|
|
10
|
-
import { u as Re } from "./useEditorValidation-Ctef5Bxt.js";
|
|
11
|
-
import { b as qe, u as Pe, a as Ke } from "./provide-CfF0FmUz.js";
|
|
12
|
-
const Oe = {
|
|
13
|
-
key: 0,
|
|
14
|
-
class: "flex-1 flex justify-between gap-8 pl-8"
|
|
15
|
-
}, Qe = { class: "flex items-center" }, je = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Ge = { class: "fm-typo-en-body-md-600" }, He = {
|
|
16
|
-
key: 0,
|
|
17
|
-
role: "alert",
|
|
18
|
-
class: "text-fm-color-typo-secondary"
|
|
19
|
-
}, Je = {
|
|
20
|
-
key: 1,
|
|
21
|
-
class: "text-fm-color-typo-secondary"
|
|
22
|
-
}, We = { class: "flex justify-end items-center" }, Xe = { class: "w-[320px]" }, Ye = { class: "fm-typo-en-title-md-600" }, Ze = {
|
|
23
|
-
key: 0,
|
|
24
|
-
class: "pt-8 flex flex-col gap-8"
|
|
25
|
-
}, en = {
|
|
26
|
-
key: 1,
|
|
27
|
-
class: "pt-8 space-y-40"
|
|
28
|
-
}, nn = { class: "flex flex-row gap-16" }, tn = { class: "overflow-x-hidden overflow-y-auto max-h-[300px]" }, ln = {
|
|
29
|
-
key: 0,
|
|
30
|
-
class: "fm-typo-en-body-sm-400 text-fm-color-system-error-500",
|
|
31
|
-
role: "alert"
|
|
32
|
-
}, an = { class: "flex gap-8 items-center justify-start" }, on = /* @__PURE__ */ ae({
|
|
33
|
-
__name: "IngredientList",
|
|
34
|
-
props: {
|
|
35
|
-
sdk: {}
|
|
36
|
-
},
|
|
37
|
-
setup(E) {
|
|
38
|
-
const F = E, { t } = Ne(), x = qe(), T = De(), oe = Ae(), { run: z } = ze(), k = Pe(F.sdk.sku.list), v = p(
|
|
39
|
-
() => k.value.status === "ready" ? k.value.value : null
|
|
40
|
-
), se = p(() => {
|
|
41
|
-
var n;
|
|
42
|
-
return ((n = v.value) == null ? void 0 : n.query) ?? "";
|
|
43
|
-
}), ue = p(() => {
|
|
44
|
-
var n;
|
|
45
|
-
return [...((n = v.value) == null ? void 0 : n.rows) ?? []];
|
|
46
|
-
}), g = L(!1), A = L(!1), B = L("recipe"), o = Y(F.sdk.sku.editor()), C = Y(
|
|
47
|
-
o.value.get()
|
|
48
|
-
);
|
|
49
|
-
let N = o.value.subscribe(
|
|
50
|
-
(n) => {
|
|
51
|
-
C.value = n;
|
|
52
|
-
}
|
|
53
|
-
);
|
|
54
|
-
const a = p(
|
|
55
|
-
() => C.value.status === "ready" ? C.value.value : null
|
|
56
|
-
), d = Re(() => o.value), R = p(
|
|
57
|
-
() => a.value ? d.issue(a.value.fieldIssues, "name") ?? a.value.nameIssue : null
|
|
58
|
-
), q = p(
|
|
59
|
-
() => a.value ? d.issue(a.value.fieldIssues, "code") ?? a.value.codeIssue : null
|
|
60
|
-
), P = p(
|
|
61
|
-
() => a.value ? d.issue(a.value.fieldIssues, "convert") ?? a.value.formIssue : null
|
|
62
|
-
);
|
|
63
|
-
function K(n) {
|
|
64
|
-
var _;
|
|
65
|
-
const l = ((_ = a.value) == null ? void 0 : _.fieldIssues) ?? {};
|
|
66
|
-
return (n ?? []).map((I) => ({
|
|
67
|
-
...I,
|
|
68
|
-
amountIssue: d.issue(l, `amount:${I.id}`) ?? I.amountIssue
|
|
69
|
-
}));
|
|
70
|
-
}
|
|
71
|
-
function O(n, l) {
|
|
72
|
-
d.field(
|
|
73
|
-
`amount:${n}`,
|
|
74
|
-
(_) => o.value.setBindingAmount(n, _)
|
|
75
|
-
)["onUpdate:modelValue"](l);
|
|
76
|
-
}
|
|
77
|
-
function Q(n) {
|
|
78
|
-
N(), o.value.dispose(), o.value = F.sdk.sku.editor(n), C.value = o.value.get(), N = o.value.subscribe(
|
|
79
|
-
(l) => {
|
|
80
|
-
C.value = l;
|
|
81
|
-
}
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
function j() {
|
|
85
|
-
var n;
|
|
86
|
-
((n = v.value) == null ? void 0 : n.create.state) === "allowed" && (Q(), g.value = !0);
|
|
87
|
-
}
|
|
88
|
-
function ie(n) {
|
|
89
|
-
Q(n.id), g.value = !0;
|
|
90
|
-
}
|
|
91
|
-
async function me() {
|
|
92
|
-
(await z(
|
|
93
|
-
() => d.submit(() => o.value.submit()),
|
|
94
|
-
{
|
|
95
|
-
// A locally-decided rejection issues no request and legacy showed no
|
|
96
|
-
// spinner for it — the frozen `sku/create/validation-required` and
|
|
97
|
-
// `sku/create/duplicate-code` groups record an inline message and no
|
|
98
|
-
// snackbar at all.
|
|
99
|
-
showLoading: () => {
|
|
100
|
-
var l;
|
|
101
|
-
return ((l = a.value) == null ? void 0 : l.status) === "submitting";
|
|
102
|
-
},
|
|
103
|
-
successMessage: (l) => t("menu.sku.form.saved", { name: l.name })
|
|
104
|
-
}
|
|
105
|
-
)).kind === "success" && (g.value = !1);
|
|
106
|
-
}
|
|
107
|
-
function re() {
|
|
108
|
-
var n;
|
|
109
|
-
if (!((n = a.value) != null && n.dirty)) {
|
|
110
|
-
g.value = !1;
|
|
111
|
-
return;
|
|
112
|
-
}
|
|
113
|
-
T.open({
|
|
114
|
-
title: t("menu.common.dialog.dismiss.title"),
|
|
115
|
-
message: t("menu.common.dialog.dismiss.message"),
|
|
116
|
-
primaryActions: {
|
|
117
|
-
text: t("menu.common.dialog.dismiss.discard"),
|
|
118
|
-
close: !0
|
|
119
|
-
},
|
|
120
|
-
secondaryActions: {
|
|
121
|
-
text: t("menu.common.actions.cancel"),
|
|
122
|
-
close: !0
|
|
123
|
-
}
|
|
124
|
-
}).onPrimary(() => {
|
|
125
|
-
g.value = !1;
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
function de(n) {
|
|
129
|
-
n.remove.state === "allowed" && T.open({
|
|
130
|
-
title: t("menu.common.dialog.remove.ingredient.title"),
|
|
131
|
-
message: t("menu.common.dialog.remove.ingredient.message", {
|
|
132
|
-
name: n.name
|
|
133
|
-
}),
|
|
134
|
-
primaryActions: {
|
|
135
|
-
text: t("menu.common.actions.remove"),
|
|
136
|
-
close: !0,
|
|
137
|
-
variant: Le.Destructive
|
|
138
|
-
},
|
|
139
|
-
secondaryActions: {
|
|
140
|
-
text: t("menu.common.actions.cancel"),
|
|
141
|
-
close: !0
|
|
142
|
-
}
|
|
143
|
-
}).onPrimary(async () => {
|
|
144
|
-
await z(() => F.sdk.sku.remove(n.id), {
|
|
145
|
-
successMessage: t("menu.sku.form.removed", { name: n.name })
|
|
146
|
-
});
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
const ce = p(() => [
|
|
150
|
-
{
|
|
151
|
-
accessorKey: "code",
|
|
152
|
-
header: () => t("menu.ingredient.table.columns.code"),
|
|
153
|
-
enableSorting: !1
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
accessorKey: "name",
|
|
157
|
-
header: () => t("menu.ingredient.table.columns.name"),
|
|
158
|
-
enableSorting: !1
|
|
159
|
-
},
|
|
160
|
-
{
|
|
161
|
-
accessorKey: "unitName",
|
|
162
|
-
header: () => t("menu.ingredient.table.columns.unit"),
|
|
163
|
-
enableSorting: !1,
|
|
164
|
-
// The parenthesised pair is assembled by the i18n layer, never by a
|
|
165
|
-
// template expression (ADR-0003 §3).
|
|
166
|
-
cell: (n) => t("menu.sku.unit_option", {
|
|
167
|
-
name: n.row.original.unitName,
|
|
168
|
-
symbol: n.row.original.unitSymbol
|
|
169
|
-
})
|
|
170
|
-
},
|
|
171
|
-
{
|
|
172
|
-
id: "actions",
|
|
173
|
-
size: 52,
|
|
174
|
-
meta: { cellClass: "pl-16", headerContentClass: "-mx-16" },
|
|
175
|
-
header: "",
|
|
176
|
-
cell: (n) => Ue(ne.FmButton, {
|
|
177
|
-
icon: "delete",
|
|
178
|
-
variant: "tertiary",
|
|
179
|
-
textColor: "neutral-gray-400",
|
|
180
|
-
disabled: n.row.original.remove.state !== "allowed",
|
|
181
|
-
"aria-label": t("menu.common.actions.delete"),
|
|
182
|
-
onClick: Ve(
|
|
183
|
-
() => de(n.row.original),
|
|
184
|
-
["stop", "prevent"]
|
|
185
|
-
)
|
|
186
|
-
})
|
|
187
|
-
}
|
|
188
|
-
]), G = p(() => {
|
|
189
|
-
var n;
|
|
190
|
-
return ((n = a.value) == null ? void 0 : n.submit.state) !== "allowed";
|
|
191
|
-
}), ve = p(
|
|
192
|
-
() => {
|
|
193
|
-
var n, l;
|
|
194
|
-
return B.value === "recipe" ? ((n = a.value) == null ? void 0 : n.recipeCandidates) ?? [] : ((l = a.value) == null ? void 0 : l.ingredientCandidates) ?? [];
|
|
195
|
-
}
|
|
196
|
-
), pe = p(
|
|
197
|
-
() => t("menu.inventory.binding.link.title", {
|
|
198
|
-
type: B.value === "recipe" ? t("menu.inventory.binding.link.recipe") : t("menu.inventory.binding.link.ingredient")
|
|
199
|
-
})
|
|
200
|
-
);
|
|
201
|
-
function be() {
|
|
202
|
-
g.value = !1, oe.push("/unit");
|
|
203
|
-
}
|
|
204
|
-
function H(n) {
|
|
205
|
-
B.value = n, o.value.setBindingCandidateQuery(""), A.value = !0;
|
|
206
|
-
}
|
|
207
|
-
return Be(() => {
|
|
208
|
-
N(), o.value.dispose();
|
|
209
|
-
}), (n, l) => {
|
|
210
|
-
const _ = r("FmButton"), I = r("FmCircularProgress"), fe = r("FmSearch"), ge = r("FmTable"), J = r("FmTextField"), ye = r("FmLabel"), ke = r("FmField"), _e = r("FmMenuHeader"), Fe = r("FmMenuDivider"), xe = r("FmMenuItem"), he = r("FmMenu"), we = r("FmFormGroup"), Ce = r("FmSwitch"), Ie = r("FmSelect"), Me = r("FmCard"), Se = r("FmSideSheet");
|
|
211
|
-
return m(), w(Te, {
|
|
212
|
-
"data-visual-root": "sku",
|
|
213
|
-
heading: e(t)("menu.ingredient.title")
|
|
214
|
-
}, {
|
|
215
|
-
"append-heading": b(() => [
|
|
216
|
-
e(k).status === "ready" && v.value ? (m(), f("div", Oe, [
|
|
217
|
-
y("div", Qe, [
|
|
218
|
-
y("div", je, [
|
|
219
|
-
y("p", Ge, h(v.value.totalCount), 1)
|
|
220
|
-
])
|
|
221
|
-
]),
|
|
222
|
-
v.value.totalCount > 0 ? (m(), w(_, {
|
|
223
|
-
key: 0,
|
|
224
|
-
disabled: v.value.create.state !== "allowed",
|
|
225
|
-
label: e(t)("menu.ingredient.actions.add"),
|
|
226
|
-
"prepend-icon": "add",
|
|
227
|
-
onClick: j
|
|
228
|
-
}, null, 8, ["disabled", "label"])) : V("", !0)
|
|
229
|
-
])) : V("", !0)
|
|
230
|
-
]),
|
|
231
|
-
default: b(() => {
|
|
232
|
-
var W;
|
|
233
|
-
return [
|
|
234
|
-
e(k).status === "error" ? (m(), f("p", He, h(e(x)(e(k).error.message)), 1)) : e(k).status === "unavailable" ? (m(), f("p", Je, h(e(x)(e(k).reason)), 1)) : e(k).status === "loading" ? (m(), w(I, { key: 2 })) : v.value && v.value.totalCount === 0 ? (m(), w(e(te), {
|
|
235
|
-
key: 3,
|
|
236
|
-
action: {
|
|
237
|
-
text: e(t)("menu.ingredient.empty.action"),
|
|
238
|
-
callback: j
|
|
239
|
-
},
|
|
240
|
-
title: e(t)("menu.ingredient.empty.title"),
|
|
241
|
-
subtitle: e(t)("menu.ingredient.empty.subtitle")
|
|
242
|
-
}, null, 8, ["action", "title", "subtitle"])) : v.value ? (m(), f(U, { key: 4 }, [
|
|
243
|
-
y("div", We, [
|
|
244
|
-
y("div", Xe, [
|
|
245
|
-
u(fe, {
|
|
246
|
-
autofocus: "",
|
|
247
|
-
class: "mb-8",
|
|
248
|
-
"model-value": se.value,
|
|
249
|
-
placeholder: e(t)("menu.ingredient.table.search.placeholder"),
|
|
250
|
-
"onUpdate:modelValue": F.sdk.sku.search
|
|
251
|
-
}, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"])
|
|
252
|
-
])
|
|
253
|
-
]),
|
|
254
|
-
u(ge, {
|
|
255
|
-
"column-defs": ce.value,
|
|
256
|
-
"hide-footer": "",
|
|
257
|
-
"page-size": Math.max(v.value.rows.length, 1),
|
|
258
|
-
"pin-header-row": "",
|
|
259
|
-
"row-data": ue.value,
|
|
260
|
-
"shrink-at": !1,
|
|
261
|
-
onRowClick: l[0] || (l[0] = (i) => ie(i.original))
|
|
262
|
-
}, null, 8, ["column-defs", "page-size", "row-data"])
|
|
263
|
-
], 64)) : V("", !0),
|
|
264
|
-
u(Se, {
|
|
265
|
-
modelValue: g.value,
|
|
266
|
-
"onUpdate:modelValue": l[10] || (l[10] = (i) => g.value = i),
|
|
267
|
-
"is-container": e(ne).FmForm,
|
|
268
|
-
"is-container-props": { onValidationSuccess: me },
|
|
269
|
-
"max-width": 560,
|
|
270
|
-
"onOn:clickedAway": re
|
|
271
|
-
}, {
|
|
272
|
-
"side-sheet-header": b(() => {
|
|
273
|
-
var i;
|
|
274
|
-
return [
|
|
275
|
-
y("p", Ye, h(((i = a.value) == null ? void 0 : i.mode) === "update" ? e(t)("menu.sku.update") : e(t)("menu.sku.add")), 1)
|
|
276
|
-
];
|
|
277
|
-
}),
|
|
278
|
-
"side-sheet-footer": b(() => {
|
|
279
|
-
var i, M;
|
|
280
|
-
return [
|
|
281
|
-
y("div", an, [
|
|
282
|
-
u(_, {
|
|
283
|
-
disabled: ((i = a.value) == null ? void 0 : i.submit.state) !== "allowed",
|
|
284
|
-
label: ((M = a.value) == null ? void 0 : M.mode) === "update" ? e(t)("menu.common.actions.update") : e(t)("menu.common.actions.add"),
|
|
285
|
-
size: "lg",
|
|
286
|
-
type: "submit",
|
|
287
|
-
variant: "primary"
|
|
288
|
-
}, null, 8, ["disabled", "label"]),
|
|
289
|
-
u(_, {
|
|
290
|
-
label: e(t)("menu.common.actions.cancel"),
|
|
291
|
-
size: "lg",
|
|
292
|
-
variant: "tertiary",
|
|
293
|
-
onClick: l[9] || (l[9] = (D) => g.value = !1)
|
|
294
|
-
}, null, 8, ["label"])
|
|
295
|
-
])
|
|
296
|
-
];
|
|
297
|
-
}),
|
|
298
|
-
default: b(() => {
|
|
299
|
-
var i, M, D, X;
|
|
300
|
-
return [
|
|
301
|
-
(i = a.value) != null && i.noUnits ? (m(), f("div", Ze, [
|
|
302
|
-
u(e(te), {
|
|
303
|
-
action: { text: e(t)("menu.unit.add"), callback: be },
|
|
304
|
-
title: e(t)("menu.sku.empty.no_unit"),
|
|
305
|
-
subtitle: e(t)("menu.sku.empty.subtitle")
|
|
306
|
-
}, null, 8, ["action", "title", "subtitle"])
|
|
307
|
-
])) : (m(), f("div", en, [
|
|
308
|
-
y("div", nn, [
|
|
309
|
-
u(J, Z({
|
|
310
|
-
class: "flex-2",
|
|
311
|
-
"error-messages": q.value ? [e(x)(q.value)] : [],
|
|
312
|
-
label: e(t)("menu.sku.columns.code"),
|
|
313
|
-
"model-value": ((M = a.value) == null ? void 0 : M.code) ?? ""
|
|
314
|
-
}, e(d).field("code", o.value.setCode)), null, 16, ["error-messages", "label", "model-value"]),
|
|
315
|
-
u(J, Z({
|
|
316
|
-
class: "flex-1",
|
|
317
|
-
"error-messages": R.value ? [e(x)(R.value)] : [],
|
|
318
|
-
label: e(t)("menu.sku.columns.name"),
|
|
319
|
-
"model-value": ((D = a.value) == null ? void 0 : D.name) ?? ""
|
|
320
|
-
}, e(d).field("name", o.value.setName)), null, 16, ["error-messages", "label", "model-value"])
|
|
321
|
-
]),
|
|
322
|
-
u(we, {
|
|
323
|
-
class: "col-span-2",
|
|
324
|
-
"label-mark": "required",
|
|
325
|
-
"model-value": ((X = a.value) == null ? void 0 : X.selectedUnitName) ?? ""
|
|
326
|
-
}, {
|
|
327
|
-
label: b(() => [
|
|
328
|
-
u(ye, {
|
|
329
|
-
label: e(t)("menu.sku.columns.unit")
|
|
330
|
-
}, null, 8, ["label"])
|
|
331
|
-
]),
|
|
332
|
-
default: b(({ invalid: $ }) => [
|
|
333
|
-
u(he, { "z-index": 101 }, {
|
|
334
|
-
"menu-button": b(() => [
|
|
335
|
-
u(ke, {
|
|
336
|
-
class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary",
|
|
337
|
-
invalid: $,
|
|
338
|
-
"append-icon": "expand_more"
|
|
339
|
-
}, {
|
|
340
|
-
default: b(() => [
|
|
341
|
-
$e(h(a.value ? e(t)("menu.sku.unit_option", {
|
|
342
|
-
name: a.value.selectedUnitName,
|
|
343
|
-
symbol: a.value.selectedUnitSymbol
|
|
344
|
-
}) : ""), 1)
|
|
345
|
-
]),
|
|
346
|
-
_: 2
|
|
347
|
-
}, 1032, ["invalid"])
|
|
348
|
-
]),
|
|
349
|
-
default: b(() => {
|
|
350
|
-
var S;
|
|
351
|
-
return [
|
|
352
|
-
y("div", tn, [
|
|
353
|
-
(m(!0), f(U, null, ee(((S = a.value) == null ? void 0 : S.unitGroups) ?? [], (s) => (m(), f(U, {
|
|
354
|
-
key: s.unitId
|
|
355
|
-
}, [
|
|
356
|
-
u(_e, {
|
|
357
|
-
label: s.name
|
|
358
|
-
}, null, 8, ["label"]),
|
|
359
|
-
u(Fe),
|
|
360
|
-
(m(!0), f(U, null, ee(s.options, (c) => (m(), w(xe, {
|
|
361
|
-
key: `${c.unitId}:${c.measurementId ?? "base"}`,
|
|
362
|
-
label: e(t)("menu.sku.unit_option", {
|
|
363
|
-
name: c.name,
|
|
364
|
-
symbol: c.symbol
|
|
365
|
-
}),
|
|
366
|
-
"model-value": c.selected,
|
|
367
|
-
"x-should-scroll-into": `${c.selected}`,
|
|
368
|
-
onClick: (sn) => o.value.selectUnit(
|
|
369
|
-
c.unitId,
|
|
370
|
-
c.measurementId
|
|
371
|
-
)
|
|
372
|
-
}, null, 8, ["label", "model-value", "x-should-scroll-into", "onClick"]))), 128))
|
|
373
|
-
], 64))), 128))
|
|
374
|
-
])
|
|
375
|
-
];
|
|
376
|
-
}),
|
|
377
|
-
_: 2
|
|
378
|
-
}, 1024)
|
|
379
|
-
]),
|
|
380
|
-
_: 1
|
|
381
|
-
}, 8, ["model-value"]),
|
|
382
|
-
u(Me, {
|
|
383
|
-
variant: "outlined",
|
|
384
|
-
class: "p-16 flex flex-col gap-16"
|
|
385
|
-
}, {
|
|
386
|
-
default: b(() => {
|
|
387
|
-
var $, S;
|
|
388
|
-
return [
|
|
389
|
-
u(Ce, {
|
|
390
|
-
value: "",
|
|
391
|
-
label: e(t)("menu.sku.convertible.label"),
|
|
392
|
-
"model-value": (($ = a.value) == null ? void 0 : $.convertible) ?? !1,
|
|
393
|
-
sublabel: e(t)("menu.sku.convertible.sublabel"),
|
|
394
|
-
"label-placement": "right",
|
|
395
|
-
"onUpdate:modelValue": l[1] || (l[1] = (s) => (e(d).touch("convert"), o.value.setConvertible(s)))
|
|
396
|
-
}, null, 8, ["label", "model-value", "sublabel"]),
|
|
397
|
-
(S = a.value) != null && S.convertible ? (m(), f(U, { key: 0 }, [
|
|
398
|
-
u(Ie, {
|
|
399
|
-
items: a.value.convertOptions.map((s) => ({
|
|
400
|
-
label: e(t)("menu.sku.convert_option", {
|
|
401
|
-
name: s.name,
|
|
402
|
-
symbol: s.symbol
|
|
403
|
-
}),
|
|
404
|
-
value: s.measurementId
|
|
405
|
-
})),
|
|
406
|
-
label: e(t)("menu.sku.convertible.convert_to"),
|
|
407
|
-
"model-value": a.value.convertMeasurementId,
|
|
408
|
-
"onUpdate:modelValue": l[2] || (l[2] = (s) => o.value.selectConvertMeasurement(s))
|
|
409
|
-
}, null, 8, ["items", "label", "model-value"]),
|
|
410
|
-
u(le, {
|
|
411
|
-
kind: "recipe",
|
|
412
|
-
disabled: G.value,
|
|
413
|
-
rows: K(a.value.recipeBindings),
|
|
414
|
-
onLink: l[3] || (l[3] = (s) => H("recipe")),
|
|
415
|
-
onRemove: l[4] || (l[4] = (s) => (e(d).touch("convert"), o.value.removeBinding(s))),
|
|
416
|
-
onUpdateAmount: O,
|
|
417
|
-
onUpdateMeasurement: l[5] || (l[5] = (s, c) => o.value.setBindingMeasurement(s, c))
|
|
418
|
-
}, null, 8, ["disabled", "rows"]),
|
|
419
|
-
u(le, {
|
|
420
|
-
kind: "ingredient",
|
|
421
|
-
disabled: G.value,
|
|
422
|
-
rows: K(a.value.ingredientBindings),
|
|
423
|
-
onLink: l[6] || (l[6] = (s) => H("ingredient")),
|
|
424
|
-
onRemove: l[7] || (l[7] = (s) => (e(d).touch("convert"), o.value.removeBinding(s))),
|
|
425
|
-
onUpdateAmount: O,
|
|
426
|
-
onUpdateMeasurement: l[8] || (l[8] = (s, c) => o.value.setBindingMeasurement(s, c))
|
|
427
|
-
}, null, 8, ["disabled", "rows"]),
|
|
428
|
-
P.value ? (m(), f("p", ln, h(e(x)(P.value)), 1)) : V("", !0)
|
|
429
|
-
], 64)) : V("", !0)
|
|
430
|
-
];
|
|
431
|
-
}),
|
|
432
|
-
_: 1
|
|
433
|
-
})
|
|
434
|
-
]))
|
|
435
|
-
];
|
|
436
|
-
}),
|
|
437
|
-
_: 1
|
|
438
|
-
}, 8, ["modelValue", "is-container", "is-container-props"]),
|
|
439
|
-
u(Ee, {
|
|
440
|
-
modelValue: A.value,
|
|
441
|
-
"onUpdate:modelValue": l[11] || (l[11] = (i) => A.value = i),
|
|
442
|
-
candidates: ve.value,
|
|
443
|
-
query: ((W = a.value) == null ? void 0 : W.bindingCandidateQuery) ?? "",
|
|
444
|
-
title: pe.value,
|
|
445
|
-
"onUpdate:query": l[12] || (l[12] = (i) => o.value.setBindingCandidateQuery(i)),
|
|
446
|
-
onSubmit: l[13] || (l[13] = (i) => (e(d).touch("convert"), o.value.linkBindings(B.value, i)))
|
|
447
|
-
}, null, 8, ["modelValue", "candidates", "query", "title"])
|
|
448
|
-
];
|
|
449
|
-
}),
|
|
450
|
-
_: 1
|
|
451
|
-
}, 8, ["heading"]);
|
|
452
|
-
};
|
|
453
|
-
}
|
|
454
|
-
}), kn = /* @__PURE__ */ ae({
|
|
455
|
-
__name: "Ingredient",
|
|
456
|
-
setup(E) {
|
|
457
|
-
const F = Ke();
|
|
458
|
-
return (t, x) => (m(), w(on, { sdk: e(F) }, null, 8, ["sdk"]));
|
|
459
|
-
}
|
|
460
|
-
});
|
|
461
|
-
export {
|
|
462
|
-
kn as default
|
|
463
|
-
};
|