@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,31 +1,29 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as ie, computed as f, ref as T, shallowRef as ne, h as $e, withModifiers as le, onUnmounted as Ae, resolveComponent as m, openBlock as u, createBlock as F, unref as e, withCtx as y, createElementBlock as c, toDisplayString as _, Fragment as I, createElementVNode as v, createVNode as d, renderList as z, createCommentVNode as M, mergeProps as ae, createTextVNode as Ne } from "vue";
|
|
2
2
|
import { useRouter as De } from "vue-router";
|
|
3
3
|
import { useI18n as Le } from "@feedmepos/mf-common";
|
|
4
|
-
import { useDialog as
|
|
4
|
+
import { useDialog as Ee, useBreakpoints as Te, components as oe, FmButtonVariant as ze } from "@feedmepos/ui-library";
|
|
5
|
+
import { _ as Re } from "./PhoneFab.vue_vue_type_script_setup_true_lang-CipbTqbp.js";
|
|
5
6
|
import { _ as se } from "./index.vue_vue_type_script_setup_true_lang-CGPDazqs.js";
|
|
6
|
-
import { _ as
|
|
7
|
-
import { _ as
|
|
8
|
-
import { _ as
|
|
9
|
-
import { u as
|
|
10
|
-
import { u as
|
|
11
|
-
import { b as
|
|
12
|
-
const
|
|
7
|
+
import { _ as qe } from "./BindingLinkDialog.vue_vue_type_script_setup_true_lang-BZVQRyRI.js";
|
|
8
|
+
import { _ as ue } from "./BindingTable.vue_vue_type_script_setup_true_lang-DCgMQJE-.js";
|
|
9
|
+
import { _ as Pe } from "./PageLayout.vue_vue_type_script_setup_true_lang-DrhsROXo.js";
|
|
10
|
+
import { u as Ke } from "./useActionFeedback-CElXij1W.js";
|
|
11
|
+
import { u as Oe } from "./useEditorValidation-Ctef5Bxt.js";
|
|
12
|
+
import { b as Qe, u as je, a as Ge } from "./provide-BGLSDsuJ.js";
|
|
13
|
+
const He = {
|
|
13
14
|
key: 0,
|
|
14
15
|
class: "flex-1 flex justify-between gap-8 pl-8"
|
|
15
|
-
},
|
|
16
|
+
}, Je = { class: "flex items-center" }, We = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Xe = { class: "fm-typo-en-body-md-600" }, Ye = {
|
|
16
17
|
key: 0,
|
|
17
18
|
role: "alert",
|
|
18
19
|
class: "text-fm-color-typo-secondary"
|
|
19
|
-
},
|
|
20
|
+
}, Ze = {
|
|
20
21
|
key: 1,
|
|
21
22
|
class: "text-fm-color-typo-secondary"
|
|
22
|
-
},
|
|
23
|
+
}, et = { class: "flex justify-end items-center" }, tt = { class: "w-[320px] xs:w-full xs:px-16 xs:mt-8" }, nt = {
|
|
23
24
|
key: 1,
|
|
24
25
|
class: "flex-1 min-h-0 overflow-scroll divide-y divide-fm-color-neutral-gray-100 pb-64"
|
|
25
|
-
},
|
|
26
|
-
key: 2,
|
|
27
|
-
class: "fixed right-16 bottom-[72px] z-[100]"
|
|
28
|
-
}, ut = { class: "fm-typo-en-title-md-600" }, dt = {
|
|
26
|
+
}, lt = ["onClick"], at = { class: "min-w-0 flex-1" }, ot = { class: "fm-typo-en-body-lg-600 mb-4 break-words" }, st = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary break-words" }, ut = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary break-words" }, it = { class: "fm-typo-en-title-md-600" }, dt = {
|
|
29
27
|
key: 0,
|
|
30
28
|
class: "pt-8 flex flex-col gap-8"
|
|
31
29
|
}, mt = {
|
|
@@ -35,21 +33,21 @@ const Ge = {
|
|
|
35
33
|
key: 0,
|
|
36
34
|
class: "fm-typo-en-body-sm-400 text-fm-color-system-error-500",
|
|
37
35
|
role: "alert"
|
|
38
|
-
}, pt = { class: "flex gap-8 items-center justify-start" }, bt = /* @__PURE__ */
|
|
36
|
+
}, pt = { class: "flex gap-8 items-center justify-start" }, bt = /* @__PURE__ */ ie({
|
|
39
37
|
__name: "IngredientList",
|
|
40
38
|
props: {
|
|
41
39
|
sdk: {}
|
|
42
40
|
},
|
|
43
41
|
setup(R) {
|
|
44
|
-
const
|
|
42
|
+
const h = R, { t } = Le(), w = Qe(), q = Ee(), de = De(), { run: P } = Ke(), x = je(h.sdk.sku.list), r = f(
|
|
45
43
|
() => x.value.status === "ready" ? x.value.value : null
|
|
46
44
|
), me = f(() => {
|
|
47
45
|
var n;
|
|
48
|
-
return ((n =
|
|
49
|
-
}), { breakpoints: re } =
|
|
46
|
+
return ((n = r.value) == null ? void 0 : n.query) ?? "";
|
|
47
|
+
}), { breakpoints: re } = Te(), A = f(() => re.value.xs), ce = f(() => {
|
|
50
48
|
var n;
|
|
51
|
-
return [...((n =
|
|
52
|
-
}), g =
|
|
49
|
+
return [...((n = r.value) == null ? void 0 : n.rows) ?? []];
|
|
50
|
+
}), g = T(!1), N = T(!1), V = T("recipe"), s = ne(h.sdk.sku.editor()), S = ne(
|
|
53
51
|
s.value.get()
|
|
54
52
|
);
|
|
55
53
|
let D = s.value.subscribe(
|
|
@@ -59,7 +57,7 @@ const Ge = {
|
|
|
59
57
|
);
|
|
60
58
|
const a = f(
|
|
61
59
|
() => S.value.status === "ready" ? S.value.value : null
|
|
62
|
-
), p =
|
|
60
|
+
), p = Oe(() => s.value), K = f(
|
|
63
61
|
() => a.value ? p.issue(a.value.fieldIssues, "name") ?? a.value.nameIssue : null
|
|
64
62
|
), O = f(
|
|
65
63
|
() => a.value ? p.issue(a.value.fieldIssues, "code") ?? a.value.codeIssue : null
|
|
@@ -81,7 +79,7 @@ const Ge = {
|
|
|
81
79
|
)["onUpdate:modelValue"](l);
|
|
82
80
|
}
|
|
83
81
|
function H(n) {
|
|
84
|
-
D(), s.value.dispose(), s.value =
|
|
82
|
+
D(), s.value.dispose(), s.value = h.sdk.sku.editor(n), S.value = s.value.get(), D = s.value.subscribe(
|
|
85
83
|
(l) => {
|
|
86
84
|
S.value = l;
|
|
87
85
|
}
|
|
@@ -89,7 +87,7 @@ const Ge = {
|
|
|
89
87
|
}
|
|
90
88
|
function L() {
|
|
91
89
|
var n;
|
|
92
|
-
((n =
|
|
90
|
+
((n = r.value) == null ? void 0 : n.create.state) === "allowed" && (H(), g.value = !0);
|
|
93
91
|
}
|
|
94
92
|
function J(n) {
|
|
95
93
|
H(n.id), g.value = !0;
|
|
@@ -140,14 +138,14 @@ const Ge = {
|
|
|
140
138
|
primaryActions: {
|
|
141
139
|
text: t("menu.common.actions.remove"),
|
|
142
140
|
close: !0,
|
|
143
|
-
variant:
|
|
141
|
+
variant: ze.Destructive
|
|
144
142
|
},
|
|
145
143
|
secondaryActions: {
|
|
146
144
|
text: t("menu.common.actions.cancel"),
|
|
147
145
|
close: !0
|
|
148
146
|
}
|
|
149
147
|
}).onPrimary(async () => {
|
|
150
|
-
await P(() =>
|
|
148
|
+
await P(() => h.sdk.sku.remove(n.id), {
|
|
151
149
|
successMessage: t("menu.sku.form.removed", { name: n.name })
|
|
152
150
|
});
|
|
153
151
|
});
|
|
@@ -214,20 +212,20 @@ const Ge = {
|
|
|
214
212
|
D(), s.value.dispose();
|
|
215
213
|
}), (n, l) => {
|
|
216
214
|
const k = m("FmButton"), U = m("FmCircularProgress"), ge = m("FmSearch"), _e = m("FmTable"), Z = m("FmTextField"), xe = m("FmLabel"), Fe = m("FmField"), he = m("FmMenuHeader"), Ce = m("FmMenuDivider"), we = m("FmMenuItem"), Ie = m("FmMenu"), Me = m("FmFormGroup"), Se = m("FmSwitch"), Ue = m("FmSelect"), Be = m("FmCard"), Ve = m("FmSideSheet");
|
|
217
|
-
return
|
|
215
|
+
return u(), F(Pe, {
|
|
218
216
|
"data-visual-root": "sku",
|
|
219
217
|
heading: e(t)("menu.ingredient.title")
|
|
220
218
|
}, {
|
|
221
219
|
"append-heading": y(() => [
|
|
222
|
-
e(x).status === "ready" &&
|
|
223
|
-
v("div",
|
|
224
|
-
v("div",
|
|
225
|
-
v("p",
|
|
220
|
+
e(x).status === "ready" && r.value ? (u(), c("div", He, [
|
|
221
|
+
v("div", Je, [
|
|
222
|
+
v("div", We, [
|
|
223
|
+
v("p", Xe, _(r.value.totalCount), 1)
|
|
226
224
|
])
|
|
227
225
|
]),
|
|
228
|
-
|
|
226
|
+
r.value.totalCount > 0 && !A.value ? (u(), F(k, {
|
|
229
227
|
key: 0,
|
|
230
|
-
disabled:
|
|
228
|
+
disabled: r.value.create.state !== "allowed",
|
|
231
229
|
label: e(t)("menu.ingredient.actions.add"),
|
|
232
230
|
"prepend-icon": "add",
|
|
233
231
|
onClick: L
|
|
@@ -237,7 +235,7 @@ const Ge = {
|
|
|
237
235
|
default: y(() => {
|
|
238
236
|
var ee;
|
|
239
237
|
return [
|
|
240
|
-
e(x).status === "error" ? (
|
|
238
|
+
e(x).status === "error" ? (u(), c("p", Ye, _(e(w)(e(x).error.message)), 1)) : e(x).status === "unavailable" ? (u(), c("p", Ze, _(e(w)(e(x).reason)), 1)) : e(x).status === "loading" ? (u(), F(U, { key: 2 })) : r.value && r.value.totalCount === 0 ? (u(), F(e(se), {
|
|
241
239
|
key: 3,
|
|
242
240
|
action: {
|
|
243
241
|
text: e(t)("menu.ingredient.empty.action"),
|
|
@@ -245,28 +243,28 @@ const Ge = {
|
|
|
245
243
|
},
|
|
246
244
|
title: e(t)("menu.ingredient.empty.title"),
|
|
247
245
|
subtitle: e(t)("menu.ingredient.empty.subtitle")
|
|
248
|
-
}, null, 8, ["action", "title", "subtitle"])) :
|
|
249
|
-
v("div",
|
|
250
|
-
v("div",
|
|
246
|
+
}, null, 8, ["action", "title", "subtitle"])) : r.value ? (u(), c(I, { key: 4 }, [
|
|
247
|
+
v("div", et, [
|
|
248
|
+
v("div", tt, [
|
|
251
249
|
d(ge, {
|
|
252
250
|
autofocus: "",
|
|
253
251
|
class: "mb-8",
|
|
254
252
|
"model-value": me.value,
|
|
255
253
|
placeholder: e(t)("menu.ingredient.table.search.placeholder"),
|
|
256
|
-
"onUpdate:modelValue":
|
|
254
|
+
"onUpdate:modelValue": h.sdk.sku.search
|
|
257
255
|
}, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"])
|
|
258
256
|
])
|
|
259
257
|
]),
|
|
260
|
-
A.value ? (
|
|
261
|
-
(
|
|
258
|
+
A.value ? (u(), c("div", nt, [
|
|
259
|
+
(u(!0), c(I, null, z(r.value.rows, (o) => (u(), c("div", {
|
|
262
260
|
key: o.id,
|
|
263
261
|
class: "py-12 px-16 flex space-x-8 items-center",
|
|
264
|
-
onClick: (
|
|
262
|
+
onClick: (C) => J(o)
|
|
265
263
|
}, [
|
|
266
|
-
v("div",
|
|
267
|
-
v("p",
|
|
268
|
-
v("p",
|
|
269
|
-
v("p",
|
|
264
|
+
v("div", at, [
|
|
265
|
+
v("p", ot, _(o.name), 1),
|
|
266
|
+
v("p", st, _(e(t)("menu.ingredient.table.mobile.code", { code: o.code })), 1),
|
|
267
|
+
v("p", ut, _(e(t)("menu.ingredient.table.mobile.unit", {
|
|
270
268
|
unit: e(t)("menu.sku.unit_option", {
|
|
271
269
|
name: o.unitName,
|
|
272
270
|
symbol: o.unitSymbol
|
|
@@ -280,28 +278,31 @@ const Ge = {
|
|
|
280
278
|
"prepend-icon": "delete",
|
|
281
279
|
"text-color": "neutral-gray-400",
|
|
282
280
|
variant: "tertiary",
|
|
283
|
-
onClick: le((
|
|
281
|
+
onClick: le((C) => W(o), ["stop"])
|
|
284
282
|
}, null, 8, ["aria-label", "disabled", "onClick"])
|
|
285
|
-
], 8,
|
|
286
|
-
])) : (
|
|
283
|
+
], 8, lt))), 128))
|
|
284
|
+
])) : (u(), F(_e, {
|
|
287
285
|
key: 0,
|
|
288
286
|
"column-defs": be.value,
|
|
289
287
|
"hide-footer": "",
|
|
290
|
-
"page-size": Math.max(
|
|
288
|
+
"page-size": Math.max(r.value.rows.length, 1),
|
|
291
289
|
"pin-header-row": "",
|
|
292
290
|
"row-data": ce.value,
|
|
293
291
|
"shrink-at": !1,
|
|
294
292
|
onRowClick: l[0] || (l[0] = (o) => J(o.original))
|
|
295
293
|
}, null, 8, ["column-defs", "page-size", "row-data"])),
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
294
|
+
r.value.totalCount > 0 && A.value ? (u(), F(Re, { key: 2 }, {
|
|
295
|
+
default: y(() => [
|
|
296
|
+
d(k, {
|
|
297
|
+
disabled: r.value.create.state !== "allowed",
|
|
298
|
+
label: e(t)("menu.ingredient.actions.add"),
|
|
299
|
+
"prepend-icon": "add",
|
|
300
|
+
variant: "fab",
|
|
301
|
+
onClick: L
|
|
302
|
+
}, null, 8, ["disabled", "label"])
|
|
303
|
+
]),
|
|
304
|
+
_: 1
|
|
305
|
+
})) : M("", !0)
|
|
305
306
|
], 64)) : M("", !0),
|
|
306
307
|
d(Ve, {
|
|
307
308
|
modelValue: g.value,
|
|
@@ -314,16 +315,16 @@ const Ge = {
|
|
|
314
315
|
"side-sheet-header": y(() => {
|
|
315
316
|
var o;
|
|
316
317
|
return [
|
|
317
|
-
v("p",
|
|
318
|
+
v("p", it, _(((o = a.value) == null ? void 0 : o.mode) === "update" ? e(t)("menu.sku.update") : e(t)("menu.sku.add")), 1)
|
|
318
319
|
];
|
|
319
320
|
}),
|
|
320
321
|
"side-sheet-footer": y(() => {
|
|
321
|
-
var o,
|
|
322
|
+
var o, C;
|
|
322
323
|
return [
|
|
323
324
|
v("div", pt, [
|
|
324
325
|
d(k, {
|
|
325
326
|
disabled: ((o = a.value) == null ? void 0 : o.submit.state) !== "allowed",
|
|
326
|
-
label: ((
|
|
327
|
+
label: ((C = a.value) == null ? void 0 : C.mode) === "update" ? e(t)("menu.common.actions.update") : e(t)("menu.common.actions.add"),
|
|
327
328
|
size: "lg",
|
|
328
329
|
type: "submit",
|
|
329
330
|
variant: "primary"
|
|
@@ -332,33 +333,33 @@ const Ge = {
|
|
|
332
333
|
label: e(t)("menu.common.actions.cancel"),
|
|
333
334
|
size: "lg",
|
|
334
335
|
variant: "tertiary",
|
|
335
|
-
onClick: l[9] || (l[9] = (
|
|
336
|
+
onClick: l[9] || (l[9] = (E) => g.value = !1)
|
|
336
337
|
}, null, 8, ["label"])
|
|
337
338
|
])
|
|
338
339
|
];
|
|
339
340
|
}),
|
|
340
341
|
default: y(() => {
|
|
341
|
-
var o,
|
|
342
|
+
var o, C, E, te;
|
|
342
343
|
return [
|
|
343
|
-
(o = a.value) != null && o.noUnits ? (
|
|
344
|
+
(o = a.value) != null && o.noUnits ? (u(), c("div", dt, [
|
|
344
345
|
d(e(se), {
|
|
345
346
|
action: { text: e(t)("menu.unit.add"), callback: ke },
|
|
346
347
|
title: e(t)("menu.sku.empty.no_unit"),
|
|
347
348
|
subtitle: e(t)("menu.sku.empty.subtitle")
|
|
348
349
|
}, null, 8, ["action", "title", "subtitle"])
|
|
349
|
-
])) : (
|
|
350
|
+
])) : (u(), c("div", mt, [
|
|
350
351
|
v("div", rt, [
|
|
351
352
|
d(Z, ae({
|
|
352
353
|
class: "flex-2",
|
|
353
354
|
"error-messages": O.value ? [e(w)(O.value)] : [],
|
|
354
355
|
label: e(t)("menu.sku.columns.code"),
|
|
355
|
-
"model-value": ((
|
|
356
|
+
"model-value": ((C = a.value) == null ? void 0 : C.code) ?? ""
|
|
356
357
|
}, e(p).field("code", s.value.setCode)), null, 16, ["error-messages", "label", "model-value"]),
|
|
357
358
|
d(Z, ae({
|
|
358
359
|
class: "flex-1",
|
|
359
360
|
"error-messages": K.value ? [e(w)(K.value)] : [],
|
|
360
361
|
label: e(t)("menu.sku.columns.name"),
|
|
361
|
-
"model-value": ((
|
|
362
|
+
"model-value": ((E = a.value) == null ? void 0 : E.name) ?? ""
|
|
362
363
|
}, e(p).field("name", s.value.setName)), null, 16, ["error-messages", "label", "model-value"])
|
|
363
364
|
]),
|
|
364
365
|
d(Me, {
|
|
@@ -392,14 +393,14 @@ const Ge = {
|
|
|
392
393
|
var B;
|
|
393
394
|
return [
|
|
394
395
|
v("div", ct, [
|
|
395
|
-
(
|
|
396
|
-
key:
|
|
396
|
+
(u(!0), c(I, null, z(((B = a.value) == null ? void 0 : B.unitGroups) ?? [], (i) => (u(), c(I, {
|
|
397
|
+
key: i.unitId
|
|
397
398
|
}, [
|
|
398
399
|
d(he, {
|
|
399
|
-
label:
|
|
400
|
+
label: i.name
|
|
400
401
|
}, null, 8, ["label"]),
|
|
401
402
|
d(Ce),
|
|
402
|
-
(
|
|
403
|
+
(u(!0), c(I, null, z(i.options, (b) => (u(), F(we, {
|
|
403
404
|
key: `${b.unitId}:${b.measurementId ?? "base"}`,
|
|
404
405
|
label: e(t)("menu.sku.unit_option", {
|
|
405
406
|
name: b.name,
|
|
@@ -434,40 +435,40 @@ const Ge = {
|
|
|
434
435
|
"model-value": (($ = a.value) == null ? void 0 : $.convertible) ?? !1,
|
|
435
436
|
sublabel: e(t)("menu.sku.convertible.sublabel"),
|
|
436
437
|
"label-placement": "right",
|
|
437
|
-
"onUpdate:modelValue": l[1] || (l[1] = (
|
|
438
|
+
"onUpdate:modelValue": l[1] || (l[1] = (i) => (e(p).touch("convert"), s.value.setConvertible(i)))
|
|
438
439
|
}, null, 8, ["label", "model-value", "sublabel"]),
|
|
439
|
-
(B = a.value) != null && B.convertible ? (
|
|
440
|
+
(B = a.value) != null && B.convertible ? (u(), c(I, { key: 0 }, [
|
|
440
441
|
d(Ue, {
|
|
441
|
-
items: a.value.convertOptions.map((
|
|
442
|
+
items: a.value.convertOptions.map((i) => ({
|
|
442
443
|
label: e(t)("menu.sku.convert_option", {
|
|
443
|
-
name:
|
|
444
|
-
symbol:
|
|
444
|
+
name: i.name,
|
|
445
|
+
symbol: i.symbol
|
|
445
446
|
}),
|
|
446
|
-
value:
|
|
447
|
+
value: i.measurementId
|
|
447
448
|
})),
|
|
448
449
|
label: e(t)("menu.sku.convertible.convert_to"),
|
|
449
450
|
"model-value": a.value.convertMeasurementId,
|
|
450
|
-
"onUpdate:modelValue": l[2] || (l[2] = (
|
|
451
|
+
"onUpdate:modelValue": l[2] || (l[2] = (i) => s.value.selectConvertMeasurement(i))
|
|
451
452
|
}, null, 8, ["items", "label", "model-value"]),
|
|
452
|
-
d(
|
|
453
|
+
d(ue, {
|
|
453
454
|
kind: "recipe",
|
|
454
455
|
disabled: X.value,
|
|
455
456
|
rows: j(a.value.recipeBindings),
|
|
456
|
-
onLink: l[3] || (l[3] = (
|
|
457
|
-
onRemove: l[4] || (l[4] = (
|
|
457
|
+
onLink: l[3] || (l[3] = (i) => Y("recipe")),
|
|
458
|
+
onRemove: l[4] || (l[4] = (i) => (e(p).touch("convert"), s.value.removeBinding(i))),
|
|
458
459
|
onUpdateAmount: G,
|
|
459
|
-
onUpdateMeasurement: l[5] || (l[5] = (
|
|
460
|
+
onUpdateMeasurement: l[5] || (l[5] = (i, b) => s.value.setBindingMeasurement(i, b))
|
|
460
461
|
}, null, 8, ["disabled", "rows"]),
|
|
461
|
-
d(
|
|
462
|
+
d(ue, {
|
|
462
463
|
kind: "ingredient",
|
|
463
464
|
disabled: X.value,
|
|
464
465
|
rows: j(a.value.ingredientBindings),
|
|
465
|
-
onLink: l[6] || (l[6] = (
|
|
466
|
-
onRemove: l[7] || (l[7] = (
|
|
466
|
+
onLink: l[6] || (l[6] = (i) => Y("ingredient")),
|
|
467
|
+
onRemove: l[7] || (l[7] = (i) => (e(p).touch("convert"), s.value.removeBinding(i))),
|
|
467
468
|
onUpdateAmount: G,
|
|
468
|
-
onUpdateMeasurement: l[8] || (l[8] = (
|
|
469
|
+
onUpdateMeasurement: l[8] || (l[8] = (i, b) => s.value.setBindingMeasurement(i, b))
|
|
469
470
|
}, null, 8, ["disabled", "rows"]),
|
|
470
|
-
Q.value ? (
|
|
471
|
+
Q.value ? (u(), c("p", vt, _(e(w)(Q.value)), 1)) : M("", !0)
|
|
471
472
|
], 64)) : M("", !0)
|
|
472
473
|
];
|
|
473
474
|
}),
|
|
@@ -478,7 +479,7 @@ const Ge = {
|
|
|
478
479
|
}),
|
|
479
480
|
_: 1
|
|
480
481
|
}, 8, ["modelValue", "is-container", "is-container-props"]),
|
|
481
|
-
d(
|
|
482
|
+
d(qe, {
|
|
482
483
|
modelValue: N.value,
|
|
483
484
|
"onUpdate:modelValue": l[11] || (l[11] = (o) => N.value = o),
|
|
484
485
|
candidates: fe.value,
|
|
@@ -493,13 +494,13 @@ const Ge = {
|
|
|
493
494
|
}, 8, ["heading"]);
|
|
494
495
|
};
|
|
495
496
|
}
|
|
496
|
-
}),
|
|
497
|
+
}), Ut = /* @__PURE__ */ ie({
|
|
497
498
|
__name: "Ingredient",
|
|
498
499
|
setup(R) {
|
|
499
|
-
const
|
|
500
|
-
return (t, w) => (
|
|
500
|
+
const h = Ge();
|
|
501
|
+
return (t, w) => (u(), F(bt, { sdk: e(h) }, null, 8, ["sdk"]));
|
|
501
502
|
}
|
|
502
503
|
});
|
|
503
504
|
export {
|
|
504
|
-
|
|
505
|
+
Ut as default
|
|
505
506
|
};
|
|
@@ -2,7 +2,7 @@ import { defineComponent as Ge, ref as V, computed as h, watch as ue, resolveCom
|
|
|
2
2
|
import { d as Ue } from "./vuedraggable-CBtQLb_S.js";
|
|
3
3
|
import { useI18n as je, ItemSelector as $e } from "@feedmepos/mf-common";
|
|
4
4
|
import { components as ze } from "@feedmepos/ui-library";
|
|
5
|
-
import { r as Me } from "./provide-
|
|
5
|
+
import { r as Me } from "./provide-BGLSDsuJ.js";
|
|
6
6
|
import { r as Be, a as re } from "./ruleValueKey-BF52PuHb.js";
|
|
7
7
|
import { _ as De } from "./index.vue_vue_type_script_setup_true_lang-CGPDazqs.js";
|
|
8
8
|
import { u as Ke } from "./useEditorValidation-Ctef5Bxt.js";
|