@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
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
import { defineComponent as R, computed as u, ref as ue, shallowRef as $, h as j, withModifiers as A, onUnmounted as re, resolveComponent as b, openBlock as i, createBlock as k, unref as s, withCtx as h, createElementBlock as g, toDisplayString as q, Fragment as L, createElementVNode as v, createVNode as p, renderList as ce, createCommentVNode as w, mergeProps as de } from "vue";
|
|
2
|
+
import { useI18n as me, ItemSelector as ve } from "@feedmepos/mf-common";
|
|
3
|
+
import { useDialog as pe, useBreakpoints as ge, components as P, FmButtonVariant as _e } from "@feedmepos/ui-library";
|
|
4
|
+
import { _ as fe } from "./index.vue_vue_type_script_setup_true_lang-CGPDazqs.js";
|
|
5
|
+
import { _ as be } from "./PageLayout.vue_vue_type_script_setup_true_lang-B3szUH39.js";
|
|
6
|
+
import { u as ke } from "./useActionFeedback-Dm2HDa_2.js";
|
|
7
|
+
import { u as ye } from "./useEditorValidation-Ctef5Bxt.js";
|
|
8
|
+
import { b as he, u as T, a as xe } from "./provide-CDmXzkhz.js";
|
|
9
|
+
const qe = {
|
|
10
|
+
key: 0,
|
|
11
|
+
class: "flex-1 flex justify-end gap-8 pl-8"
|
|
12
|
+
}, we = {
|
|
13
|
+
key: 0,
|
|
14
|
+
role: "alert",
|
|
15
|
+
class: "text-fm-color-typo-secondary"
|
|
16
|
+
}, Se = { class: "flex justify-end items-center" }, Ce = { class: "w-[320px] xs:w-full xs:px-16 xs:mt-8" }, Fe = {
|
|
17
|
+
key: 1,
|
|
18
|
+
class: "flex-1 min-h-0 overflow-scroll divide-y divide-fm-color-neutral-gray-100 pb-64"
|
|
19
|
+
}, Ie = ["onClick"], Ve = { class: "min-w-0 flex-1 space-y-4" }, ze = { class: "fm-typo-en-body-lg-600 break-words" }, De = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary break-words" }, Ee = {
|
|
20
|
+
key: 2,
|
|
21
|
+
class: "fixed right-16 bottom-[72px] z-[100]"
|
|
22
|
+
}, Me = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-32 flex flex-col h-full" }, Ne = { class: "flex gap-8 items-center justify-start" }, Ke = /* @__PURE__ */ R({
|
|
23
|
+
__name: "ServingSequenceList",
|
|
24
|
+
props: {
|
|
25
|
+
sdk: {}
|
|
26
|
+
},
|
|
27
|
+
setup(D) {
|
|
28
|
+
const c = D, { t: a } = me(), S = he(), O = pe(), { run: C } = ke(), _ = T(
|
|
29
|
+
c.sdk.servingSequence.list
|
|
30
|
+
), o = u(
|
|
31
|
+
() => _.value.status === "ready" ? _.value.value : null
|
|
32
|
+
), E = u(() => {
|
|
33
|
+
var e;
|
|
34
|
+
return ((e = o.value) == null ? void 0 : e.query) ?? "";
|
|
35
|
+
}), { breakpoints: G } = ge(), F = u(() => G.value.xs), Q = u(() => {
|
|
36
|
+
var e;
|
|
37
|
+
return [...((e = o.value) == null ? void 0 : e.rows) ?? []];
|
|
38
|
+
}), f = ue(!1), M = T(
|
|
39
|
+
c.sdk.linkProduct.catalogue
|
|
40
|
+
), H = u(
|
|
41
|
+
() => M.value.status === "ready" ? M.value.value : null
|
|
42
|
+
), J = u(
|
|
43
|
+
() => {
|
|
44
|
+
var e;
|
|
45
|
+
return (((e = H.value) == null ? void 0 : e.groups) ?? []).map((t) => ({
|
|
46
|
+
id: t.id,
|
|
47
|
+
name: t.name,
|
|
48
|
+
items: t.products.map((n) => ({
|
|
49
|
+
_id: n.id,
|
|
50
|
+
name: n.name,
|
|
51
|
+
code: n.code,
|
|
52
|
+
codeName: n.label,
|
|
53
|
+
// The selector builds its attribute filter from these and filters the
|
|
54
|
+
// product list by them; omitting them renders the filter with empty
|
|
55
|
+
// value sets. Legacy reaches them by spreading the whole item
|
|
56
|
+
// (portal apps/mf-menu/src/helper/menu.ts:257-261).
|
|
57
|
+
customAttributes: n.customAttributes ?? void 0,
|
|
58
|
+
variant: {
|
|
59
|
+
variantGroupIds: [...n.variantGroupIds],
|
|
60
|
+
variantCombinations: n.variants.map((m) => ({
|
|
61
|
+
_id: n.id,
|
|
62
|
+
combinationKey: m.combinationKey,
|
|
63
|
+
codeName: m.label
|
|
64
|
+
}))
|
|
65
|
+
}
|
|
66
|
+
}))
|
|
67
|
+
}));
|
|
68
|
+
}
|
|
69
|
+
), W = [], X = u(
|
|
70
|
+
() => {
|
|
71
|
+
var e;
|
|
72
|
+
return ((e = d.value) == null ? void 0 : e.linkedItems) ?? W;
|
|
73
|
+
}
|
|
74
|
+
), Y = u(
|
|
75
|
+
() => {
|
|
76
|
+
const e = {};
|
|
77
|
+
for (const t of X.value)
|
|
78
|
+
e[t._id] = [...e[t._id] ?? [], t];
|
|
79
|
+
return e;
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
function Z(e) {
|
|
83
|
+
r.value.setLinkedItems(
|
|
84
|
+
Object.values(e).flat().map((t) => ({
|
|
85
|
+
_id: t._id,
|
|
86
|
+
combinationKey: t.combinationKey ?? null,
|
|
87
|
+
orderFrom: t.orderFrom ?? null
|
|
88
|
+
}))
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
const r = $(
|
|
92
|
+
c.sdk.servingSequence.editor()
|
|
93
|
+
), y = $(
|
|
94
|
+
r.value.get()
|
|
95
|
+
);
|
|
96
|
+
let I = r.value.subscribe((e) => {
|
|
97
|
+
y.value = e;
|
|
98
|
+
});
|
|
99
|
+
const d = u(
|
|
100
|
+
() => y.value.status === "ready" ? y.value.value : null
|
|
101
|
+
), V = ye(() => r.value), B = u(
|
|
102
|
+
() => d.value ? V.issue(d.value.fieldIssues, "name") ?? d.value.nameIssue : null
|
|
103
|
+
);
|
|
104
|
+
function N(e) {
|
|
105
|
+
I(), r.value.dispose(), r.value = c.sdk.servingSequence.editor(e), y.value = r.value.get(), I = r.value.subscribe((t) => {
|
|
106
|
+
y.value = t;
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
function z() {
|
|
110
|
+
var e;
|
|
111
|
+
((e = o.value) == null ? void 0 : e.create.state) === "allowed" && (N(), f.value = !0);
|
|
112
|
+
}
|
|
113
|
+
function K(e) {
|
|
114
|
+
N(e.id), f.value = !0;
|
|
115
|
+
}
|
|
116
|
+
async function ee() {
|
|
117
|
+
var n;
|
|
118
|
+
const e = ((n = d.value) == null ? void 0 : n.name.trim()) ?? "";
|
|
119
|
+
(await C(
|
|
120
|
+
() => V.submit(() => r.value.submit()),
|
|
121
|
+
{
|
|
122
|
+
showLoading: () => {
|
|
123
|
+
var m;
|
|
124
|
+
return ((m = d.value) == null ? void 0 : m.status) === "submitting";
|
|
125
|
+
},
|
|
126
|
+
successMessage: a("menu.serving_sequence.form.saved", {
|
|
127
|
+
name: e || a("menu.serving_sequence.title")
|
|
128
|
+
})
|
|
129
|
+
}
|
|
130
|
+
)).kind === "success" && (f.value = !1);
|
|
131
|
+
}
|
|
132
|
+
function U(e) {
|
|
133
|
+
e.remove.state === "allowed" && O.open({
|
|
134
|
+
title: a("menu.serving_sequence.delete.title"),
|
|
135
|
+
message: a("menu.serving_sequence.delete.message", {
|
|
136
|
+
name: e.name
|
|
137
|
+
}),
|
|
138
|
+
primaryActions: {
|
|
139
|
+
text: a("menu.serving_sequence.delete.confirm"),
|
|
140
|
+
close: !0,
|
|
141
|
+
variant: _e.Destructive
|
|
142
|
+
},
|
|
143
|
+
secondaryActions: {
|
|
144
|
+
text: a("menu.common.actions.cancel"),
|
|
145
|
+
close: !0
|
|
146
|
+
}
|
|
147
|
+
}).onPrimary(async () => {
|
|
148
|
+
await C(() => c.sdk.servingSequence.remove(e.id), {
|
|
149
|
+
successMessage: a("menu.serving_sequence.delete.success", {
|
|
150
|
+
name: e.name
|
|
151
|
+
})
|
|
152
|
+
});
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
const ae = u(() => {
|
|
156
|
+
var e;
|
|
157
|
+
return ((e = o.value) == null ? void 0 : e.reorder.state) === "allowed";
|
|
158
|
+
});
|
|
159
|
+
function se(e) {
|
|
160
|
+
var n;
|
|
161
|
+
if (((n = o.value) == null ? void 0 : n.reorder.state) !== "allowed") return;
|
|
162
|
+
const t = e.map((m) => m.id);
|
|
163
|
+
t.length && C(() => c.sdk.servingSequence.reorder(t), {
|
|
164
|
+
// The only one of this module's success messages that takes no entity
|
|
165
|
+
// `{name}`: legacy fed the shared `{name} saved` template the module's own
|
|
166
|
+
// plural noun for a rearrange, so the toast reads "sequences saved" rather
|
|
167
|
+
// than naming a row — the frozen baseline records exactly that text
|
|
168
|
+
// (serveSequence/rearrange/submit/success). Feeding it
|
|
169
|
+
// `menu.serving_sequence.title` produced "Serving sequence saved" instead,
|
|
170
|
+
// which parity caught on 2026-08-28 with a delta that was already equal.
|
|
171
|
+
// Each locale carries the whole sentence, as category does for the same
|
|
172
|
+
// reason: the word order of "{name} saved" does not survive translation.
|
|
173
|
+
successMessage: a("menu.serving_sequence.reorder.success")
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
const te = u(() => [
|
|
177
|
+
{
|
|
178
|
+
accessorKey: "name",
|
|
179
|
+
header: () => a("menu.serving_sequence.columns.name"),
|
|
180
|
+
enableSorting: !1,
|
|
181
|
+
// Legacy fixes the name column at 360px (`ServingSequence.vue:151-156`),
|
|
182
|
+
// which sets where the Product-linked column starts. Omitting it let
|
|
183
|
+
// FmTable distribute the width instead, and the two tables then differ by
|
|
184
|
+
// the position of every cell in the second column — invisible until the
|
|
185
|
+
// populated-table golden is compared.
|
|
186
|
+
size: 360
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
accessorKey: "linkedItemCount",
|
|
190
|
+
header: () => a("menu.serving_sequence.columns.products"),
|
|
191
|
+
enableSorting: !1,
|
|
192
|
+
cell: (e) => a("menu.common.labels.items_linked", {
|
|
193
|
+
count: e.row.original.linkedItemCount
|
|
194
|
+
})
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
id: "actions",
|
|
198
|
+
size: 52,
|
|
199
|
+
meta: { cellClass: "pl-16", headerContentClass: "-mx-16" },
|
|
200
|
+
header: "",
|
|
201
|
+
// Legacy wraps the button in a right-aligning flex row and renders the
|
|
202
|
+
// glyph as `prependIcon` rather than `icon` — two different FmButton
|
|
203
|
+
// renderings, and the wrapper is what pushes the control to the cell's
|
|
204
|
+
// right edge (`ServingSequence.vue:176-192`). Both are reproduced; the
|
|
205
|
+
// accessible name is the one deliberate addition, owned by the new app
|
|
206
|
+
// (legacy's control is icon-only and unnamed).
|
|
207
|
+
cell: (e) => j("div", { class: "w-full flex justify-end items-center" }, [
|
|
208
|
+
j(P.FmButton, {
|
|
209
|
+
prependIcon: "delete",
|
|
210
|
+
variant: "tertiary",
|
|
211
|
+
textColor: "neutral-gray-400",
|
|
212
|
+
disabled: e.row.original.remove.state !== "allowed",
|
|
213
|
+
"aria-label": a("menu.common.actions.delete"),
|
|
214
|
+
onClick: A(
|
|
215
|
+
() => U(e.row.original),
|
|
216
|
+
["stop", "prevent"]
|
|
217
|
+
)
|
|
218
|
+
})
|
|
219
|
+
])
|
|
220
|
+
}
|
|
221
|
+
]);
|
|
222
|
+
return re(() => {
|
|
223
|
+
I(), r.value.dispose(), c.sdk.servingSequence.search("");
|
|
224
|
+
}), (e, t) => {
|
|
225
|
+
const n = b("FmButton"), m = b("FmCircularProgress"), ne = b("FmSearch"), le = b("FmTable"), oe = b("FmTextField"), ie = b("FmSideSheet");
|
|
226
|
+
return i(), k(be, {
|
|
227
|
+
"data-visual-root": "serveSequence",
|
|
228
|
+
heading: s(a)("menu.serving_sequence.title")
|
|
229
|
+
}, {
|
|
230
|
+
"append-heading": h(() => [
|
|
231
|
+
s(_).status === "ready" && o.value ? (i(), g("div", qe, [
|
|
232
|
+
o.value.totalCount > 0 && !F.value ? (i(), k(n, {
|
|
233
|
+
key: 0,
|
|
234
|
+
disabled: o.value.create.state !== "allowed",
|
|
235
|
+
label: s(a)("menu.serving_sequence.add"),
|
|
236
|
+
"prepend-icon": "add",
|
|
237
|
+
onClick: z
|
|
238
|
+
}, null, 8, ["disabled", "label"])) : w("", !0)
|
|
239
|
+
])) : w("", !0)
|
|
240
|
+
]),
|
|
241
|
+
default: h(() => [
|
|
242
|
+
s(_).status === "error" ? (i(), g("p", we, q(s(S)(s(_).error.message)), 1)) : s(_).status === "loading" ? (i(), k(m, { key: 1 })) : o.value && o.value.rows.length === 0 && !E.value ? (i(), k(s(fe), {
|
|
243
|
+
key: 2,
|
|
244
|
+
action: { text: s(a)("menu.serving_sequence.add"), callback: z },
|
|
245
|
+
title: s(a)("menu.serving_sequence.empty.title"),
|
|
246
|
+
subtitle: s(a)("menu.serving_sequence.empty.subtitle")
|
|
247
|
+
}, null, 8, ["action", "title", "subtitle"])) : o.value ? (i(), g(L, { key: 3 }, [
|
|
248
|
+
v("div", Se, [
|
|
249
|
+
v("div", Ce, [
|
|
250
|
+
p(ne, {
|
|
251
|
+
autofocus: "",
|
|
252
|
+
class: "mb-8",
|
|
253
|
+
"model-value": E.value,
|
|
254
|
+
placeholder: s(a)("menu.serving_sequence.search.placeholder"),
|
|
255
|
+
"onUpdate:modelValue": c.sdk.servingSequence.search
|
|
256
|
+
}, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"])
|
|
257
|
+
])
|
|
258
|
+
]),
|
|
259
|
+
F.value ? (i(), g("div", Fe, [
|
|
260
|
+
(i(!0), g(L, null, ce(o.value.rows, (l) => (i(), g("div", {
|
|
261
|
+
key: l.id,
|
|
262
|
+
class: "py-12 px-16 flex space-x-8 items-center",
|
|
263
|
+
onClick: (x) => K(l)
|
|
264
|
+
}, [
|
|
265
|
+
v("div", Ve, [
|
|
266
|
+
v("p", ze, q(l.name), 1),
|
|
267
|
+
v("p", De, q(s(a)("menu.common.labels.products_linked", {
|
|
268
|
+
count: l.linkedItemCount
|
|
269
|
+
})), 1)
|
|
270
|
+
]),
|
|
271
|
+
p(n, {
|
|
272
|
+
class: "shrink-0",
|
|
273
|
+
"aria-label": s(a)("menu.common.actions.delete"),
|
|
274
|
+
disabled: l.remove.state !== "allowed",
|
|
275
|
+
"prepend-icon": "delete",
|
|
276
|
+
"text-color": "neutral-gray-400",
|
|
277
|
+
variant: "tertiary",
|
|
278
|
+
onClick: A((x) => U(l), ["stop"])
|
|
279
|
+
}, null, 8, ["aria-label", "disabled", "onClick"])
|
|
280
|
+
], 8, Ie))), 128))
|
|
281
|
+
])) : (i(), k(le, {
|
|
282
|
+
key: 0,
|
|
283
|
+
"column-defs": te.value,
|
|
284
|
+
"hide-footer": "",
|
|
285
|
+
"page-size": o.value.rows.length,
|
|
286
|
+
"pin-header-row": "",
|
|
287
|
+
"row-data": Q.value,
|
|
288
|
+
"shrink-at": !1,
|
|
289
|
+
draggable: ae.value,
|
|
290
|
+
onRowClick: t[0] || (t[0] = (l) => K(l.original)),
|
|
291
|
+
onDndChanged: se
|
|
292
|
+
}, null, 8, ["column-defs", "page-size", "row-data", "draggable"])),
|
|
293
|
+
o.value.totalCount > 0 && F.value ? (i(), g("div", Ee, [
|
|
294
|
+
p(n, {
|
|
295
|
+
disabled: o.value.create.state !== "allowed",
|
|
296
|
+
label: s(a)("menu.serving_sequence.add"),
|
|
297
|
+
"prepend-icon": "add",
|
|
298
|
+
variant: "fab",
|
|
299
|
+
onClick: z
|
|
300
|
+
}, null, 8, ["disabled", "label"])
|
|
301
|
+
])) : w("", !0)
|
|
302
|
+
], 64)) : w("", !0),
|
|
303
|
+
p(ie, {
|
|
304
|
+
modelValue: f.value,
|
|
305
|
+
"onUpdate:modelValue": t[2] || (t[2] = (l) => f.value = l),
|
|
306
|
+
"is-container": s(P).FmForm,
|
|
307
|
+
"is-container-props": { onValidationSuccess: ee },
|
|
308
|
+
"max-width": 560
|
|
309
|
+
}, {
|
|
310
|
+
"side-sheet-header": h(() => {
|
|
311
|
+
var l;
|
|
312
|
+
return [
|
|
313
|
+
v("p", Me, q(((l = d.value) == null ? void 0 : l.mode) === "update" ? s(a)("menu.serving_sequence.update") : s(a)("menu.serving_sequence.add")), 1)
|
|
314
|
+
];
|
|
315
|
+
}),
|
|
316
|
+
"side-sheet-footer": h(() => {
|
|
317
|
+
var l, x;
|
|
318
|
+
return [
|
|
319
|
+
v("div", Ne, [
|
|
320
|
+
p(n, {
|
|
321
|
+
disabled: ((l = d.value) == null ? void 0 : l.submit.state) !== "allowed",
|
|
322
|
+
label: ((x = d.value) == null ? void 0 : x.mode) === "update" ? s(a)("menu.serving_sequence.update") : s(a)("menu.serving_sequence.add"),
|
|
323
|
+
size: "lg",
|
|
324
|
+
type: "submit",
|
|
325
|
+
variant: "primary"
|
|
326
|
+
}, null, 8, ["disabled", "label"]),
|
|
327
|
+
p(n, {
|
|
328
|
+
label: s(a)("menu.common.actions.cancel"),
|
|
329
|
+
size: "lg",
|
|
330
|
+
variant: "tertiary",
|
|
331
|
+
onClick: t[1] || (t[1] = (Ue) => f.value = !1)
|
|
332
|
+
}, null, 8, ["label"])
|
|
333
|
+
])
|
|
334
|
+
];
|
|
335
|
+
}),
|
|
336
|
+
default: h(() => {
|
|
337
|
+
var l;
|
|
338
|
+
return [
|
|
339
|
+
v("div", Be, [
|
|
340
|
+
p(oe, de({
|
|
341
|
+
autofocus: "",
|
|
342
|
+
"error-messages": B.value ? [s(S)(B.value)] : [],
|
|
343
|
+
label: s(a)("menu.serving_sequence.columns.name"),
|
|
344
|
+
"model-value": ((l = d.value) == null ? void 0 : l.name) ?? "",
|
|
345
|
+
placeholder: s(a)("menu.common.labels.enter_name")
|
|
346
|
+
}, s(V).field("name", r.value.setName)), null, 16, ["error-messages", "label", "model-value", "placeholder"]),
|
|
347
|
+
p(s(ve), {
|
|
348
|
+
"categorized-items": J.value,
|
|
349
|
+
data: Y.value,
|
|
350
|
+
class: "flex-1",
|
|
351
|
+
"select-variant": "",
|
|
352
|
+
"show-variant": "",
|
|
353
|
+
"onUpdate:data": Z
|
|
354
|
+
}, null, 8, ["categorized-items", "data"])
|
|
355
|
+
])
|
|
356
|
+
];
|
|
357
|
+
}),
|
|
358
|
+
_: 1
|
|
359
|
+
}, 8, ["modelValue", "is-container", "is-container-props"])
|
|
360
|
+
]),
|
|
361
|
+
_: 1
|
|
362
|
+
}, 8, ["heading"]);
|
|
363
|
+
};
|
|
364
|
+
}
|
|
365
|
+
}), Ge = /* @__PURE__ */ R({
|
|
366
|
+
__name: "ServingSequence",
|
|
367
|
+
setup(D) {
|
|
368
|
+
const c = xe();
|
|
369
|
+
return (a, S) => (i(), k(Ke, { sdk: s(c) }, null, 8, ["sdk"]));
|
|
370
|
+
}
|
|
371
|
+
});
|
|
372
|
+
export {
|
|
373
|
+
Ge as default
|
|
374
|
+
};
|
|
@@ -2,14 +2,14 @@ import { defineComponent as y, computed as A, onUnmounted as R, resolveComponent
|
|
|
2
2
|
import { RouterLink as N, useRouter as O, useRoute as G } from "vue-router";
|
|
3
3
|
import { useI18n as W } from "@feedmepos/mf-common";
|
|
4
4
|
import { _ as S } from "./FormItem.vue_vue_type_script_setup_true_lang-C2S6QCyR.js";
|
|
5
|
-
import { _ as E } from "./CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-
|
|
5
|
+
import { _ as E } from "./CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-Bk4FqVmx.js";
|
|
6
6
|
import { _ as j } from "./PageLayout.vue_vue_type_script_setup_true_lang-B3szUH39.js";
|
|
7
7
|
import { _ as D } from "./SubItemTaxSwitch.vue_vue_type_script_setup_true_lang-DIFXPxna.js";
|
|
8
|
-
import { u as P } from "./useActionFeedback-
|
|
9
|
-
import { R as V } from "./app-
|
|
10
|
-
import { a as $, u as q } from "./provide-
|
|
11
|
-
import { _ as z } from "./CatalogEditTabs.vue_vue_type_script_setup_true_lang-
|
|
12
|
-
import { _ as H } from "./CatalogEditor.vue_vue_type_script_setup_true_lang-
|
|
8
|
+
import { u as P } from "./useActionFeedback-Dm2HDa_2.js";
|
|
9
|
+
import { R as V } from "./app-BWwwHsWi.js";
|
|
10
|
+
import { a as $, u as q } from "./provide-CDmXzkhz.js";
|
|
11
|
+
import { _ as z } from "./CatalogEditTabs.vue_vue_type_script_setup_true_lang-BmG-xpW4.js";
|
|
12
|
+
import { _ as H } from "./CatalogEditor.vue_vue_type_script_setup_true_lang-BFsRDFpj.js";
|
|
13
13
|
const J = {
|
|
14
14
|
key: 0,
|
|
15
15
|
class: "max-w-[752px] pt-16 space-y-32"
|