@feedmepos/mf-menu-portal 1.0.4-dev.2 → 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-DtX4DyDA.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-BJN8ajuD.js → BindingTable.vue_vue_type_script_setup_true_lang-D3CmOOPY.js} +1 -1
- package/dist/{Catalog-Dly_r1yA.js → Catalog-VU3HhNro.js} +4 -4
- package/dist/{CatalogBinding-CNG4YcVq.js → CatalogBinding-BNATtZEY.js} +3 -3
- package/dist/{CatalogEditTabs.vue_vue_type_script_setup_true_lang-Cy2culdR.js → CatalogEditTabs.vue_vue_type_script_setup_true_lang-BmG-xpW4.js} +3 -3
- package/dist/CatalogEditor.vue_vue_type_script_setup_true_lang-BFsRDFpj.js +784 -0
- package/dist/{CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-4EZ4yM_N.js → CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-Bk4FqVmx.js} +14 -14
- package/dist/{Category-Dz1yFYyY.js → Category-DMoXTsfG.js} +5 -5
- package/dist/{Category-BS-vFDYy.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-CmbvWFgp.js → CookingGuide-DiZZDYD-.js} +5 -5
- package/dist/{Group-B7s-vPXb.js → Group-DFR8q-tt.js} +5 -5
- package/dist/{Group-BRmWZnHh.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-Ci7V_Jxn.js → MenuSetting-DR-pDSF_.js} +4 -4
- package/dist/OrderPacing-JcTuweqF.js +769 -0
- package/dist/{OrderPacingFields.vue_vue_type_script_setup_true_lang-NCH-SrZU.js → OrderPacingFields.vue_vue_type_script_setup_true_lang-HwwJ2mGv.js} +2 -2
- package/dist/{Preview-BBGNaj1F.js → Preview-BZyun5lZ.js} +1 -1
- package/dist/{PriceTierNotice.vue_vue_type_script_setup_true_lang-BXJDpDCm.js → PriceTierNotice.vue_vue_type_script_setup_true_lang-DquqNbE1.js} +1 -1
- package/dist/PrintRoute-CzEx2dCt.js +518 -0
- package/dist/{Product-DqN0NFUU.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-Fkiw4lZp.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-CNWCT1OB.js → ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-cG47Pu-6.js} +1 -1
- package/dist/{ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-BoQ9mVPY.js → ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-0UwUcA2L.js} +800 -749
- package/dist/{ProductInternalTools-CC3SWSlT.js → ProductInternalTools-QrBR1nFp.js} +2 -2
- package/dist/{ProductInventoryDialog-SAhsVekx.js → ProductInventoryDialog-fV38GO1a.js} +1 -1
- package/dist/{ProductInventoryDialog.vue_vue_type_script_setup_true_lang-BB8UIIsW.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-BMDSkfcn.js → ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-CDYcHXo1.js} +1 -1
- package/dist/{Products-Cn6j1DOQ.js → Products-B8tysOAL.js} +3 -3
- package/dist/Publish-DTvOvFNa.js +1337 -0
- package/dist/Recipe-Ddx31csF.js +388 -0
- package/dist/{Scheduler-DlaSVACJ.js → Scheduler-CST5L_cw.js} +314 -254
- package/dist/ServingSequence-DYyEZI2S.js +374 -0
- package/dist/{Setting-CyCp2uw4.js → Setting-Ip0pGjks.js} +6 -6
- package/dist/Subcategory-BIgjzVta.js +459 -0
- package/dist/{Takeaway-sVVykWDg.js → Takeaway-CekhGM-m.js} +2 -2
- package/dist/{Takeaway-tYHCAXYU.js → Takeaway-aXsPg4JT.js} +5 -5
- package/dist/{TakeawayList.vue_vue_type_script_setup_true_lang-CV24v8Zg.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-BNnR5rLv.js → Variant-CZsrYRMU.js} +5 -5
- package/dist/{_id_-a9ZtdjtT.js → _id_-D4swrvNa.js} +3 -3
- package/dist/{app-CmElp8cO.js → app-BWwwHsWi.js} +337 -337
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/app.d.ts +80 -0
- package/dist/apps/mf-menu/src/components/PriceTier/LinkPriceTierSection.vue.d.ts +9 -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-B_wpWLAj.js → menu-compute-D7TdiHt4.js} +4 -4
- package/dist/assets/{validate-menu-DjxNxUxH.js → validate-menu-DXppWUVq.js} +2 -2
- package/dist/mf-menu-portal.css +1 -1
- package/dist/{provide-BJRbSauL.js → provide-CDmXzkhz.js} +67539 -65978
- package/dist/{useActionFeedback-89GwO41T.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/CatalogEditor.vue_vue_type_script_setup_true_lang-Byp1db9_.js +0 -484
- package/dist/CategoryList.vue_vue_type_script_setup_true_lang-CrHYjrTn.js +0 -797
- package/dist/GroupList.vue_vue_type_script_setup_true_lang-CWr52_a-.js +0 -2183
- package/dist/Ingredient-BMAlctE4.js +0 -463
- package/dist/LinkProductSideSheet.vue_vue_type_script_setup_true_lang-CR99740r.js +0 -709
- package/dist/OrderPacing-Bz5kn6DY.js +0 -698
- package/dist/PrintRoute-BnARWdR2.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-DryxrG-x.js +0 -1257
- package/dist/ProductList.vue_vue_type_script_setup_true_lang-BDnTs366.js +0 -10353
- package/dist/Publish-BPJhG39B.js +0 -1261
- package/dist/Recipe-mt1vec5-.js +0 -350
- package/dist/ServingSequence-Cr1REWZP.js +0 -336
- package/dist/Subcategory-kuB7gYvc.js +0 -412
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Dz-Chgek.js +0 -1213
- package/dist/Unit-BSOvZxRy.js +0 -385
- package/dist/apps/mf-menu/src/views/MenuManagementEditor/RestaurantAttributesFilter.vue.d.ts +0 -2
|
@@ -0,0 +1,459 @@
|
|
|
1
|
+
import { defineComponent as ce, computed as g, ref as K, shallowRef as ne, h as ue, withModifiers as ie, onUnmounted as he, resolveComponent as y, openBlock as u, createBlock as h, unref as e, withCtx as v, createElementBlock as p, toDisplayString as f, createVNode as i, createElementVNode as c, Fragment as $, renderList as Q, createCommentVNode as _, mergeProps as re } from "vue";
|
|
2
|
+
import { useI18n as ke } from "@feedmepos/mf-common";
|
|
3
|
+
import { useDialog as xe, useBreakpoints as we, components as G, FmButtonVariant as Ce } from "@feedmepos/ui-library";
|
|
4
|
+
import { _ as de } from "./index.vue_vue_type_script_setup_true_lang-CGPDazqs.js";
|
|
5
|
+
import { _ as Fe } from "./ListCountTag.vue_vue_type_script_setup_true_lang-0bjk8Aly.js";
|
|
6
|
+
import { _ as Se } from "./PageLayout.vue_vue_type_script_setup_true_lang-B3szUH39.js";
|
|
7
|
+
import { _ as Ve } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-B0j2PNih.js";
|
|
8
|
+
import { u as Le } from "./useActionFeedback-Dm2HDa_2.js";
|
|
9
|
+
import { u as Ue } from "./useEditorValidation-Ctef5Bxt.js";
|
|
10
|
+
import { b as De, u as Te, a as ze } from "./provide-CDmXzkhz.js";
|
|
11
|
+
import { _ as Ee } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
|
+
const je = { class: "flex-1 flex justify-between gap-8 pl-8" }, Be = { class: "flex items-center" }, Me = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "text-fm-color-typo-secondary",
|
|
15
|
+
role: "alert"
|
|
16
|
+
}, Ne = {
|
|
17
|
+
key: 1,
|
|
18
|
+
"data-menu-state": "unavailable"
|
|
19
|
+
}, $e = {
|
|
20
|
+
key: 4,
|
|
21
|
+
class: "flex-1 flex flex-col min-h-0"
|
|
22
|
+
}, Oe = { class: "p-8" }, Ie = { class: "flex flex-1 flex-col min-h-0 overflow-scroll divide-y divide-fm-color-neutral-gray-100 pb-64" }, Pe = ["onClick"], Re = { class: "min-w-0 flex-1 space-y-4" }, Ae = { class: "fm-typo-en-body-lg-600 break-words" }, qe = {
|
|
23
|
+
key: 0,
|
|
24
|
+
class: "fixed right-16 bottom-[72px] z-[100]"
|
|
25
|
+
}, Ke = { class: "flex justify-end items-center" }, Qe = { class: "w-[320px]" }, Ge = { class: "fm-typo-en-title-md-600" }, He = { class: "flex flex-col gap-32 h-full min-h-0 py-16" }, Je = { "data-testid": "subcategory-translation-button" }, We = { class: "py-12 px-16 space-y-4" }, Xe = { key: 0 }, Ye = { class: "flex gap-8 items-center justify-start" }, Ze = { class: "fm-typo-en-title-sm-600" }, ea = { class: "py-12 px-16 space-y-4" }, aa = { key: 0 }, ta = { class: "flex w-full gap-8 items-center justify-end px-0 pb-0" }, la = /* @__PURE__ */ ce({
|
|
26
|
+
__name: "SubcategoryList",
|
|
27
|
+
props: {
|
|
28
|
+
sdk: {}
|
|
29
|
+
},
|
|
30
|
+
setup(H) {
|
|
31
|
+
const b = H, { t: a, n: J } = ke(), O = De(), me = xe(), { run: I } = Le(), k = Te(b.sdk.subCategory.list), s = g(
|
|
32
|
+
() => k.value.status === "ready" ? k.value.value : null
|
|
33
|
+
), x = K(!1), w = K(!1), T = K(!1), P = g(() => {
|
|
34
|
+
var t;
|
|
35
|
+
return ((t = s.value) == null ? void 0 : t.query) ?? "";
|
|
36
|
+
}), { breakpoints: ve } = we(), W = g(() => ve.value.xs), r = ne(
|
|
37
|
+
b.sdk.subCategory.editor()
|
|
38
|
+
), C = ne(
|
|
39
|
+
r.value.get()
|
|
40
|
+
);
|
|
41
|
+
let R = r.value.subscribe(
|
|
42
|
+
(t) => C.value = t
|
|
43
|
+
);
|
|
44
|
+
const l = g(
|
|
45
|
+
() => C.value.status === "ready" ? C.value.value : null
|
|
46
|
+
), z = Ue(() => r.value), E = g(
|
|
47
|
+
() => l.value ? z.issue(l.value.fieldIssues, "name") ?? l.value.nameIssue : null
|
|
48
|
+
);
|
|
49
|
+
function X(t) {
|
|
50
|
+
var n, m;
|
|
51
|
+
return ((m = (n = l.value) == null ? void 0 : n.supportedLocales.find(
|
|
52
|
+
(B) => B.code === t
|
|
53
|
+
)) == null ? void 0 : m.name) ?? t;
|
|
54
|
+
}
|
|
55
|
+
function Y(t) {
|
|
56
|
+
R(), r.value.dispose(), r.value = b.sdk.subCategory.editor(t), C.value = r.value.get(), R = r.value.subscribe(
|
|
57
|
+
(n) => C.value = n
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
function A() {
|
|
61
|
+
!s.value || s.value.create.state !== "allowed" || (Y(), T.value = !0);
|
|
62
|
+
}
|
|
63
|
+
function Z(t) {
|
|
64
|
+
Y(t.id), x.value = !0;
|
|
65
|
+
}
|
|
66
|
+
function j() {
|
|
67
|
+
x.value = !1, T.value = !1, w.value = !1;
|
|
68
|
+
}
|
|
69
|
+
function ee() {
|
|
70
|
+
var t;
|
|
71
|
+
((t = l.value) == null ? void 0 : t.translation.state) === "allowed" && (r.value.beginTranslationEdit(), w.value = !0);
|
|
72
|
+
}
|
|
73
|
+
function pe() {
|
|
74
|
+
r.value.saveTranslationEdit(), w.value = !1;
|
|
75
|
+
}
|
|
76
|
+
function ae() {
|
|
77
|
+
r.value.discardTranslationEdit(), w.value = !1;
|
|
78
|
+
}
|
|
79
|
+
async function te() {
|
|
80
|
+
var F, M, S, V;
|
|
81
|
+
const t = (F = l.value) == null ? void 0 : F.mode, n = ((S = (M = l.value) == null ? void 0 : M.name) == null ? void 0 : S.trim()) ?? "", m = Object.keys(((V = l.value) == null ? void 0 : V.fieldIssues) ?? {}).length > 0;
|
|
82
|
+
t === "update" && !m && j(), (await I(
|
|
83
|
+
() => z.submit(() => r.value.submit()),
|
|
84
|
+
{
|
|
85
|
+
// A draft refused locally never reaches `submitting`: no spinner.
|
|
86
|
+
showLoading: () => {
|
|
87
|
+
var N;
|
|
88
|
+
return ((N = l.value) == null ? void 0 : N.status) === "submitting";
|
|
89
|
+
},
|
|
90
|
+
successMessage: t === "update" ? a("menu.subcategory.manager.dialog.update.success", { name: n }) : a("menu.subcategory.manager.dialog.add.success", { name: n })
|
|
91
|
+
}
|
|
92
|
+
)).kind === "success" ? j() : t === "update" && (x.value = !0);
|
|
93
|
+
}
|
|
94
|
+
function le(t) {
|
|
95
|
+
t.remove.state === "allowed" && me.open({
|
|
96
|
+
title: a("menu.subcategory.dialog.remove.title"),
|
|
97
|
+
message: a("menu.common.dialog.remove_confirmation", {
|
|
98
|
+
name: t.name
|
|
99
|
+
}),
|
|
100
|
+
primaryActions: {
|
|
101
|
+
text: a("menu.common.actions.remove"),
|
|
102
|
+
close: !0,
|
|
103
|
+
variant: Ce.Destructive
|
|
104
|
+
},
|
|
105
|
+
secondaryActions: {
|
|
106
|
+
text: a("menu.common.actions.cancel"),
|
|
107
|
+
close: !0
|
|
108
|
+
}
|
|
109
|
+
}).onPrimary(async () => {
|
|
110
|
+
await I(() => b.sdk.subCategory.remove(t.id), {
|
|
111
|
+
successMessage: a("menu.subcategory.dialog.remove.success", {
|
|
112
|
+
name: t.name
|
|
113
|
+
})
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
const be = g(() => {
|
|
118
|
+
var t;
|
|
119
|
+
return [...((t = s.value) == null ? void 0 : t.rows) ?? []];
|
|
120
|
+
}), ge = g(() => !s.value || s.value.reorder.state !== "allowed" ? !1 : () => !0);
|
|
121
|
+
function ye(t) {
|
|
122
|
+
!s.value || s.value.reorder.state !== "allowed" || I(
|
|
123
|
+
() => b.sdk.subCategory.reorder(t.map((n) => n.id)),
|
|
124
|
+
{
|
|
125
|
+
successMessage: a("menu.subcategory.rearrange.success")
|
|
126
|
+
}
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
const fe = g(() => [
|
|
130
|
+
{
|
|
131
|
+
accessorKey: "name",
|
|
132
|
+
header: () => a("menu.subcategory.columns.title"),
|
|
133
|
+
enableSorting: !1,
|
|
134
|
+
meta: { width: "auto" }
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
id: "actions",
|
|
138
|
+
size: 52,
|
|
139
|
+
meta: { cellClass: "pl-16", headerContentClass: "-mx-16" },
|
|
140
|
+
header: "",
|
|
141
|
+
cell: (t) => {
|
|
142
|
+
const n = t.row.original;
|
|
143
|
+
return ue("div", { class: "flex justify-end" }, [
|
|
144
|
+
ue(G.FmButton, {
|
|
145
|
+
icon: "delete",
|
|
146
|
+
disabled: n.remove.state !== "allowed",
|
|
147
|
+
variant: "tertiary",
|
|
148
|
+
textColor: "neutral-gray-400",
|
|
149
|
+
"aria-label": a("menu.subcategory.dialog.remove.title"),
|
|
150
|
+
onClick: ie(
|
|
151
|
+
() => le(t.row.original),
|
|
152
|
+
["stop", "prevent"]
|
|
153
|
+
)
|
|
154
|
+
})
|
|
155
|
+
]);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
]);
|
|
159
|
+
return he(() => {
|
|
160
|
+
b.sdk.subCategory.search(""), R(), r.value.dispose();
|
|
161
|
+
}), (t, n) => {
|
|
162
|
+
const m = y("FmButton"), B = y("FmCircularProgress"), F = y("FmSearch"), M = y("FmTable"), S = y("FmTooltip"), V = y("FmTextField"), N = y("FmSideSheet"), _e = y("FmDialog");
|
|
163
|
+
return u(), h(Se, {
|
|
164
|
+
heading: e(a)("menu.subcategory.title")
|
|
165
|
+
}, {
|
|
166
|
+
"append-heading": v(() => {
|
|
167
|
+
var L;
|
|
168
|
+
return [
|
|
169
|
+
c("div", je, [
|
|
170
|
+
c("div", Be, [
|
|
171
|
+
i(Fe, {
|
|
172
|
+
value: e(J)(((L = s.value) == null ? void 0 : L.totalCount) ?? 0)
|
|
173
|
+
}, null, 8, ["value"])
|
|
174
|
+
]),
|
|
175
|
+
s.value && s.value.totalCount > 0 && !W.value ? (u(), h(m, {
|
|
176
|
+
key: 0,
|
|
177
|
+
disabled: s.value.create.state !== "allowed",
|
|
178
|
+
label: e(a)("menu.subcategory.add"),
|
|
179
|
+
"prepend-icon": "add",
|
|
180
|
+
onClick: A
|
|
181
|
+
}, null, 8, ["disabled", "label"])) : _("", !0)
|
|
182
|
+
])
|
|
183
|
+
];
|
|
184
|
+
}),
|
|
185
|
+
default: v(() => {
|
|
186
|
+
var L, oe, se;
|
|
187
|
+
return [
|
|
188
|
+
e(k).status === "error" ? (u(), p("p", Me, f(e(O)(e(k).error.message)), 1)) : e(k).status === "unavailable" ? (u(), p("div", Ne, [
|
|
189
|
+
i(e(de), {
|
|
190
|
+
title: e(a)("menu.subcategory.empty.title"),
|
|
191
|
+
subtitle: e(a)("menu.subcategory.empty.subtitle")
|
|
192
|
+
}, null, 8, ["title", "subtitle"])
|
|
193
|
+
])) : e(k).status === "loading" ? (u(), h(B, { key: 2 })) : s.value && s.value.rows.length === 0 && !P.value ? (u(), h(e(de), {
|
|
194
|
+
key: 3,
|
|
195
|
+
action: s.value.create.state === "allowed" ? { text: e(a)("menu.subcategory.add"), callback: A } : void 0,
|
|
196
|
+
subtitle: e(a)("menu.subcategory.empty.subtitle"),
|
|
197
|
+
title: e(a)("menu.subcategory.empty.title")
|
|
198
|
+
}, null, 8, ["action", "subtitle", "title"])) : s.value && W.value ? (u(), p("div", $e, [
|
|
199
|
+
c("div", Oe, [
|
|
200
|
+
i(F, {
|
|
201
|
+
autofocus: "",
|
|
202
|
+
class: "w-full",
|
|
203
|
+
"model-value": P.value,
|
|
204
|
+
placeholder: e(a)("menu.common.labels.search_placeholder", {
|
|
205
|
+
type: e(a)("menu.subcategory.title")
|
|
206
|
+
}),
|
|
207
|
+
"onUpdate:modelValue": b.sdk.subCategory.search
|
|
208
|
+
}, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"])
|
|
209
|
+
]),
|
|
210
|
+
c("div", Ie, [
|
|
211
|
+
(u(!0), p($, null, Q(s.value.rows, (o) => (u(), p("div", {
|
|
212
|
+
key: o.id,
|
|
213
|
+
class: "flex flex-row py-12 px-16",
|
|
214
|
+
onClick: (d) => Z(o)
|
|
215
|
+
}, [
|
|
216
|
+
c("div", Re, [
|
|
217
|
+
c("p", Ae, f(o.name), 1)
|
|
218
|
+
]),
|
|
219
|
+
i(m, {
|
|
220
|
+
class: "shrink-0",
|
|
221
|
+
"aria-label": e(a)("menu.subcategory.dialog.remove.title"),
|
|
222
|
+
disabled: o.remove.state !== "allowed",
|
|
223
|
+
"prepend-icon": "delete",
|
|
224
|
+
"text-color": "neutral-gray-400",
|
|
225
|
+
variant: "tertiary",
|
|
226
|
+
onClick: ie((d) => le(o), ["stop"])
|
|
227
|
+
}, null, 8, ["aria-label", "disabled", "onClick"])
|
|
228
|
+
], 8, Pe))), 128))
|
|
229
|
+
]),
|
|
230
|
+
s.value.totalCount > 0 ? (u(), p("div", qe, [
|
|
231
|
+
i(m, {
|
|
232
|
+
disabled: s.value.create.state !== "allowed",
|
|
233
|
+
label: e(a)("menu.subcategory.add"),
|
|
234
|
+
"prepend-icon": "add",
|
|
235
|
+
variant: "fab",
|
|
236
|
+
onClick: A
|
|
237
|
+
}, null, 8, ["disabled", "label"])
|
|
238
|
+
])) : _("", !0)
|
|
239
|
+
])) : s.value ? (u(), p($, { key: 5 }, [
|
|
240
|
+
c("div", Ke, [
|
|
241
|
+
c("div", Qe, [
|
|
242
|
+
i(F, {
|
|
243
|
+
autofocus: "",
|
|
244
|
+
class: "mb-8",
|
|
245
|
+
"model-value": P.value,
|
|
246
|
+
placeholder: e(a)("menu.common.labels.search_placeholder", {
|
|
247
|
+
type: e(a)("menu.subcategory.title")
|
|
248
|
+
}),
|
|
249
|
+
"onUpdate:modelValue": b.sdk.subCategory.search
|
|
250
|
+
}, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"])
|
|
251
|
+
])
|
|
252
|
+
]),
|
|
253
|
+
i(M, {
|
|
254
|
+
class: "subcategory-table",
|
|
255
|
+
"column-defs": fe.value,
|
|
256
|
+
draggable: ge.value,
|
|
257
|
+
"page-size": s.value.rows.length,
|
|
258
|
+
"row-data": be.value,
|
|
259
|
+
"shrink-at": !1,
|
|
260
|
+
"hide-footer": "",
|
|
261
|
+
"pin-header-row": "",
|
|
262
|
+
onDndChanged: ye,
|
|
263
|
+
onRowClick: n[0] || (n[0] = (o) => Z(o.original))
|
|
264
|
+
}, null, 8, ["column-defs", "draggable", "page-size", "row-data"])
|
|
265
|
+
], 64)) : _("", !0),
|
|
266
|
+
((L = l.value) == null ? void 0 : L.mode) === "update" ? (u(), h(N, {
|
|
267
|
+
key: 6,
|
|
268
|
+
modelValue: x.value,
|
|
269
|
+
"onUpdate:modelValue": n[1] || (n[1] = (o) => x.value = o),
|
|
270
|
+
"is-container": e(G).FmForm,
|
|
271
|
+
"is-container-props": { onValidationSuccess: te },
|
|
272
|
+
"max-width": 560,
|
|
273
|
+
"z-index": 100
|
|
274
|
+
}, {
|
|
275
|
+
"side-sheet-header": v(() => {
|
|
276
|
+
var o;
|
|
277
|
+
return [
|
|
278
|
+
c("p", Ge, f(((o = l.value) == null ? void 0 : o.mode) === "update" ? e(a)("menu.subcategory.title") : e(a)("menu.subcategory.manager.dialog.add.title")), 1)
|
|
279
|
+
];
|
|
280
|
+
}),
|
|
281
|
+
"side-sheet-footer": v(() => {
|
|
282
|
+
var o, d;
|
|
283
|
+
return [
|
|
284
|
+
c("div", Ye, [
|
|
285
|
+
i(m, {
|
|
286
|
+
disabled: ((o = l.value) == null ? void 0 : o.submit.state) !== "allowed",
|
|
287
|
+
label: ((d = l.value) == null ? void 0 : d.mode) === "update" ? e(a)("menu.subcategory.manager.dialog.update.action") : e(a)("menu.subcategory.manager.dialog.add.action"),
|
|
288
|
+
size: "lg",
|
|
289
|
+
type: "submit",
|
|
290
|
+
variant: "primary"
|
|
291
|
+
}, null, 8, ["disabled", "label"]),
|
|
292
|
+
i(m, {
|
|
293
|
+
label: e(a)("menu.common.actions.cancel"),
|
|
294
|
+
size: "lg",
|
|
295
|
+
variant: "tertiary",
|
|
296
|
+
onClick: j
|
|
297
|
+
}, null, 8, ["label"])
|
|
298
|
+
])
|
|
299
|
+
];
|
|
300
|
+
}),
|
|
301
|
+
default: v(() => {
|
|
302
|
+
var o;
|
|
303
|
+
return [
|
|
304
|
+
c("div", He, [
|
|
305
|
+
i(V, re({
|
|
306
|
+
"error-messages": E.value ? [e(O)(E.value)] : [],
|
|
307
|
+
label: e(a)("menu.subcategory.name"),
|
|
308
|
+
"model-value": ((o = l.value) == null ? void 0 : o.name) ?? "",
|
|
309
|
+
placeholder: e(a)("menu.subcategory.dialog.add.name.placeholder")
|
|
310
|
+
}, e(z).field("name", r.value.setName)), {
|
|
311
|
+
append: v(() => [
|
|
312
|
+
c("div", Je, [
|
|
313
|
+
i(S, {
|
|
314
|
+
variant: "plain",
|
|
315
|
+
placement: "top",
|
|
316
|
+
"z-index": 999
|
|
317
|
+
}, {
|
|
318
|
+
content: v(() => {
|
|
319
|
+
var d, U;
|
|
320
|
+
return [
|
|
321
|
+
c("div", We, [
|
|
322
|
+
Object.keys(((d = l.value) == null ? void 0 : d.nameLocale) ?? {}).length === 0 ? (u(), p("div", Xe, f(e(a)("menu.common.translation.translation_label")), 1)) : _("", !0),
|
|
323
|
+
(u(!0), p($, null, Q((U = l.value) == null ? void 0 : U.nameLocale, (q, D) => (u(), p("div", { key: D }, f(e(a)("menu.subcategory.translation.tooltip_value", {
|
|
324
|
+
value: q,
|
|
325
|
+
locale: X(D)
|
|
326
|
+
})), 1))), 128))
|
|
327
|
+
])
|
|
328
|
+
];
|
|
329
|
+
}),
|
|
330
|
+
default: v(() => {
|
|
331
|
+
var d;
|
|
332
|
+
return [
|
|
333
|
+
i(m, {
|
|
334
|
+
icon: "g_translate",
|
|
335
|
+
"aria-label": e(a)("menu.common.translation.translation_label"),
|
|
336
|
+
variant: "tertiary",
|
|
337
|
+
disabled: ((d = l.value) == null ? void 0 : d.translation.state) !== "allowed",
|
|
338
|
+
onClick: ee
|
|
339
|
+
}, null, 8, ["aria-label", "disabled"])
|
|
340
|
+
];
|
|
341
|
+
}),
|
|
342
|
+
_: 1
|
|
343
|
+
})
|
|
344
|
+
])
|
|
345
|
+
]),
|
|
346
|
+
_: 1
|
|
347
|
+
}, 16, ["error-messages", "label", "model-value", "placeholder"])
|
|
348
|
+
])
|
|
349
|
+
];
|
|
350
|
+
}),
|
|
351
|
+
_: 1
|
|
352
|
+
}, 8, ["modelValue", "is-container", "is-container-props"])) : _("", !0),
|
|
353
|
+
((oe = l.value) == null ? void 0 : oe.mode) === "update" || ((se = l.value) == null ? void 0 : se.mode) === "create" ? (u(), h(Ve, {
|
|
354
|
+
key: 7,
|
|
355
|
+
"model-value": w.value,
|
|
356
|
+
"onUpdate:modelValue": n[2] || (n[2] = (o) => o || ae()),
|
|
357
|
+
name: l.value.name,
|
|
358
|
+
"name-locale": l.value.nameLocale,
|
|
359
|
+
"supported-locales": l.value.supportedLocales,
|
|
360
|
+
dirty: l.value.translationDirty,
|
|
361
|
+
"z-index": 200,
|
|
362
|
+
"onUpdate:name": r.value.setName,
|
|
363
|
+
"onUpdate:nameLocale": r.value.setNameLocale,
|
|
364
|
+
onSave: pe,
|
|
365
|
+
onDiscard: ae
|
|
366
|
+
}, null, 8, ["model-value", "name", "name-locale", "supported-locales", "dirty", "onUpdate:name", "onUpdate:nameLocale"])) : _("", !0),
|
|
367
|
+
i(_e, {
|
|
368
|
+
modelValue: T.value,
|
|
369
|
+
"onUpdate:modelValue": n[3] || (n[3] = (o) => T.value = o),
|
|
370
|
+
"is-component": e(G).FmForm,
|
|
371
|
+
"is-component-props": { onValidationSuccess: te },
|
|
372
|
+
"max-width": 560
|
|
373
|
+
}, {
|
|
374
|
+
"dialog-header": v(() => [
|
|
375
|
+
c("p", Ze, f(e(a)("menu.subcategory.manager.dialog.add.title")), 1)
|
|
376
|
+
]),
|
|
377
|
+
"dialog-footer": v(() => {
|
|
378
|
+
var o;
|
|
379
|
+
return [
|
|
380
|
+
c("div", ta, [
|
|
381
|
+
i(m, {
|
|
382
|
+
label: e(a)("menu.common.actions.cancel"),
|
|
383
|
+
variant: "tertiary",
|
|
384
|
+
onClick: j
|
|
385
|
+
}, null, 8, ["label"]),
|
|
386
|
+
i(m, {
|
|
387
|
+
disabled: ((o = l.value) == null ? void 0 : o.submit.state) !== "allowed",
|
|
388
|
+
label: e(a)("menu.subcategory.manager.dialog.add.action"),
|
|
389
|
+
type: "submit",
|
|
390
|
+
variant: "primary"
|
|
391
|
+
}, null, 8, ["disabled", "label"])
|
|
392
|
+
])
|
|
393
|
+
];
|
|
394
|
+
}),
|
|
395
|
+
default: v(() => {
|
|
396
|
+
var o;
|
|
397
|
+
return [
|
|
398
|
+
i(V, re({
|
|
399
|
+
autofocus: "",
|
|
400
|
+
"error-messages": E.value ? [e(O)(E.value)] : [],
|
|
401
|
+
label: e(a)("menu.subcategory.name"),
|
|
402
|
+
"model-value": ((o = l.value) == null ? void 0 : o.name) ?? "",
|
|
403
|
+
placeholder: e(a)("menu.subcategory.dialog.add.name.placeholder")
|
|
404
|
+
}, e(z).field("name", r.value.setName)), {
|
|
405
|
+
append: v(() => [
|
|
406
|
+
i(S, {
|
|
407
|
+
variant: "plain",
|
|
408
|
+
placement: "top",
|
|
409
|
+
"z-index": 999
|
|
410
|
+
}, {
|
|
411
|
+
content: v(() => {
|
|
412
|
+
var d, U;
|
|
413
|
+
return [
|
|
414
|
+
c("div", ea, [
|
|
415
|
+
Object.keys(((d = l.value) == null ? void 0 : d.nameLocale) ?? {}).length === 0 ? (u(), p("div", aa, f(e(a)("menu.common.translation.translation_label")), 1)) : _("", !0),
|
|
416
|
+
(u(!0), p($, null, Q((U = l.value) == null ? void 0 : U.nameLocale, (q, D) => (u(), p("div", { key: D }, f(e(a)("menu.subcategory.translation.tooltip_value", {
|
|
417
|
+
value: q,
|
|
418
|
+
locale: X(D)
|
|
419
|
+
})), 1))), 128))
|
|
420
|
+
])
|
|
421
|
+
];
|
|
422
|
+
}),
|
|
423
|
+
default: v(() => {
|
|
424
|
+
var d;
|
|
425
|
+
return [
|
|
426
|
+
i(m, {
|
|
427
|
+
icon: "g_translate",
|
|
428
|
+
"aria-label": e(a)("menu.common.translation.translation_label"),
|
|
429
|
+
variant: "tertiary",
|
|
430
|
+
disabled: ((d = l.value) == null ? void 0 : d.translation.state) !== "allowed",
|
|
431
|
+
onClick: ee
|
|
432
|
+
}, null, 8, ["aria-label", "disabled"])
|
|
433
|
+
];
|
|
434
|
+
}),
|
|
435
|
+
_: 1
|
|
436
|
+
})
|
|
437
|
+
]),
|
|
438
|
+
_: 1
|
|
439
|
+
}, 16, ["error-messages", "label", "model-value", "placeholder"])
|
|
440
|
+
];
|
|
441
|
+
}),
|
|
442
|
+
_: 1
|
|
443
|
+
}, 8, ["modelValue", "is-component", "is-component-props"])
|
|
444
|
+
];
|
|
445
|
+
}),
|
|
446
|
+
_: 1
|
|
447
|
+
}, 8, ["heading"]);
|
|
448
|
+
};
|
|
449
|
+
}
|
|
450
|
+
}), oa = /* @__PURE__ */ Ee(la, [["__scopeId", "data-v-98d71a60"]]), ga = /* @__PURE__ */ ce({
|
|
451
|
+
__name: "Subcategory",
|
|
452
|
+
setup(H) {
|
|
453
|
+
const b = ze();
|
|
454
|
+
return (a, J) => (u(), h(oa, { sdk: e(b) }, null, 8, ["sdk"]));
|
|
455
|
+
}
|
|
456
|
+
});
|
|
457
|
+
export {
|
|
458
|
+
ga as default
|
|
459
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as o, openBlock as n, createBlock as r, unref as a } from "vue";
|
|
2
|
-
import { _ as s } from "./TakeawayList.vue_vue_type_script_setup_true_lang-
|
|
3
|
-
import { a as t } from "./provide-
|
|
2
|
+
import { _ as s } from "./TakeawayList.vue_vue_type_script_setup_true_lang-CaRR4_j3.js";
|
|
3
|
+
import { a as t } from "./provide-CDmXzkhz.js";
|
|
4
4
|
const k = /* @__PURE__ */ o({
|
|
5
5
|
__name: "Takeaway",
|
|
6
6
|
setup(_) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { defineComponent as m, resolveComponent as i, openBlock as s, createBlock as c, unref as a, withCtx as t, createVNode as e } from "vue";
|
|
2
2
|
import { RouterLink as p } from "vue-router";
|
|
3
3
|
import { useI18n as _ } from "@feedmepos/mf-common";
|
|
4
|
-
import { _ as l } from "./TakeawayList.vue_vue_type_script_setup_true_lang-
|
|
5
|
-
import { _ as d } from "./CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-
|
|
6
|
-
import { R as u } from "./app-
|
|
7
|
-
import { a as f } from "./provide-
|
|
8
|
-
import { _ as k } from "./CatalogEditTabs.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { _ as l } from "./TakeawayList.vue_vue_type_script_setup_true_lang-CaRR4_j3.js";
|
|
5
|
+
import { _ as d } from "./CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-Bk4FqVmx.js";
|
|
6
|
+
import { R as u } from "./app-BWwwHsWi.js";
|
|
7
|
+
import { a as f } from "./provide-CDmXzkhz.js";
|
|
8
|
+
import { _ as k } from "./CatalogEditTabs.vue_vue_type_script_setup_true_lang-BmG-xpW4.js";
|
|
9
9
|
const A = /* @__PURE__ */ m({
|
|
10
10
|
__name: "Takeaway",
|
|
11
11
|
setup(g) {
|
|
@@ -2,13 +2,13 @@ import { defineComponent as Ve, computed as c, ref as B, shallowRef as te, h as
|
|
|
2
2
|
import { useI18n as ze } from "@feedmepos/mf-common";
|
|
3
3
|
import { useDialog as Ee, components as z, FmButtonVariant as Ne } from "@feedmepos/ui-library";
|
|
4
4
|
import { _ as $e } from "./index.vue_vue_type_script_setup_true_lang-CGPDazqs.js";
|
|
5
|
-
import { _ as De } from "./LinkProductSideSheet.vue_vue_type_script_setup_true_lang-
|
|
6
|
-
import { _ as le } from "./
|
|
5
|
+
import { _ as De } from "./LinkProductSideSheet.vue_vue_type_script_setup_true_lang-CnI80Ojd.js";
|
|
6
|
+
import { _ as le } from "./vuedraggable-CBtQLb_S.js";
|
|
7
7
|
import { _ as Ae } from "./PageLayout.vue_vue_type_script_setup_true_lang-B3szUH39.js";
|
|
8
8
|
import { _ as Ie } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-B0j2PNih.js";
|
|
9
|
-
import { u as Ke } from "./useActionFeedback-
|
|
9
|
+
import { u as Ke } from "./useActionFeedback-Dm2HDa_2.js";
|
|
10
10
|
import { u as Me } from "./useEditorValidation-Ctef5Bxt.js";
|
|
11
|
-
import { b as Re, u as ne } from "./provide-
|
|
11
|
+
import { b as Re, u as ne } from "./provide-CDmXzkhz.js";
|
|
12
12
|
import { v as Qe } from "./tableSemantics-C9WFO_I_.js";
|
|
13
13
|
const je = {
|
|
14
14
|
key: 0,
|