@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,59 +1,57 @@
|
|
|
1
|
-
import { defineComponent as ce, computed as
|
|
2
|
-
import { useI18n as
|
|
3
|
-
import { useDialog as
|
|
1
|
+
import { defineComponent as ce, computed as y, ref as K, shallowRef as ne, h as ue, withModifiers as re, onUnmounted as ke, resolveComponent as g, openBlock as u, createBlock as _, unref as e, withCtx as c, createElementBlock as p, toDisplayString as f, createVNode as r, createElementVNode as m, Fragment as j, renderList as Q, createCommentVNode as h, mergeProps as ie } from "vue";
|
|
2
|
+
import { useI18n as xe } from "@feedmepos/mf-common";
|
|
3
|
+
import { useDialog as we, useBreakpoints as Ce, components as G, FmButtonVariant as Fe } from "@feedmepos/ui-library";
|
|
4
|
+
import { _ as Se } from "./PhoneFab.vue_vue_type_script_setup_true_lang-CipbTqbp.js";
|
|
4
5
|
import { _ as de } from "./index.vue_vue_type_script_setup_true_lang-CGPDazqs.js";
|
|
5
|
-
import { _ as
|
|
6
|
-
import { _ as
|
|
7
|
-
import { _ as
|
|
8
|
-
import { u as
|
|
9
|
-
import { u as
|
|
10
|
-
import { b as
|
|
11
|
-
import { _ as
|
|
12
|
-
const
|
|
6
|
+
import { _ as Ve } from "./ListCountTag.vue_vue_type_script_setup_true_lang-0bjk8Aly.js";
|
|
7
|
+
import { _ as Le } from "./PageLayout.vue_vue_type_script_setup_true_lang-DrhsROXo.js";
|
|
8
|
+
import { _ as Ue } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-B0j2PNih.js";
|
|
9
|
+
import { u as De } from "./useActionFeedback-CElXij1W.js";
|
|
10
|
+
import { u as Te } from "./useEditorValidation-Ctef5Bxt.js";
|
|
11
|
+
import { b as ze, u as Ee, a as Be } from "./provide-BGLSDsuJ.js";
|
|
12
|
+
import { _ as Me } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
|
+
const Ne = { class: "flex-1 flex justify-between gap-8 pl-8" }, $e = { class: "flex items-center" }, je = {
|
|
13
14
|
key: 0,
|
|
14
15
|
class: "text-fm-color-typo-secondary",
|
|
15
16
|
role: "alert"
|
|
16
|
-
},
|
|
17
|
+
}, Oe = {
|
|
17
18
|
key: 1,
|
|
18
19
|
"data-menu-state": "unavailable"
|
|
19
|
-
},
|
|
20
|
+
}, Ie = {
|
|
20
21
|
key: 4,
|
|
21
22
|
class: "flex-1 flex flex-col min-h-0"
|
|
22
|
-
},
|
|
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({
|
|
23
|
+
}, Pe = { class: "p-8" }, Re = { class: "flex flex-1 flex-col min-h-0 overflow-scroll divide-y divide-fm-color-neutral-gray-100 pb-64" }, Ae = ["onClick"], qe = { class: "min-w-0 flex-1 space-y-4" }, Ke = { class: "fm-typo-en-body-lg-600 break-words" }, Qe = { class: "flex justify-end items-center" }, Ge = { class: "w-[320px]" }, He = { class: "fm-typo-en-title-md-600" }, Je = { class: "flex flex-col gap-32 h-full min-h-0 py-16" }, We = { "data-testid": "subcategory-translation-button" }, Xe = { class: "py-12 px-16 space-y-4" }, Ye = { key: 0 }, Ze = { class: "flex gap-8 items-center justify-start" }, ea = { class: "fm-typo-en-title-sm-600" }, aa = { class: "py-12 px-16 space-y-4" }, ta = { key: 0 }, la = /* @__PURE__ */ ce({
|
|
26
24
|
__name: "SubcategoryList",
|
|
27
25
|
props: {
|
|
28
26
|
sdk: {}
|
|
29
27
|
},
|
|
30
28
|
setup(H) {
|
|
31
|
-
const b = H, { t: a, n: J } =
|
|
29
|
+
const b = H, { t: a, n: J } = xe(), O = ze(), me = we(), { run: I } = De(), k = Ee(b.sdk.subCategory.list), s = y(
|
|
32
30
|
() => k.value.status === "ready" ? k.value.value : null
|
|
33
|
-
), x = K(!1), w = K(!1), T = K(!1), P =
|
|
31
|
+
), x = K(!1), w = K(!1), T = K(!1), P = y(() => {
|
|
34
32
|
var t;
|
|
35
33
|
return ((t = s.value) == null ? void 0 : t.query) ?? "";
|
|
36
|
-
}), { breakpoints: ve } =
|
|
34
|
+
}), { breakpoints: ve } = Ce(), W = y(() => ve.value.xs), i = ne(
|
|
37
35
|
b.sdk.subCategory.editor()
|
|
38
36
|
), C = ne(
|
|
39
|
-
|
|
37
|
+
i.value.get()
|
|
40
38
|
);
|
|
41
|
-
let R =
|
|
39
|
+
let R = i.value.subscribe(
|
|
42
40
|
(t) => C.value = t
|
|
43
41
|
);
|
|
44
|
-
const l =
|
|
42
|
+
const l = y(
|
|
45
43
|
() => C.value.status === "ready" ? C.value.value : null
|
|
46
|
-
), z =
|
|
44
|
+
), z = Te(() => i.value), E = y(
|
|
47
45
|
() => l.value ? z.issue(l.value.fieldIssues, "name") ?? l.value.nameIssue : null
|
|
48
46
|
);
|
|
49
47
|
function X(t) {
|
|
50
|
-
var n,
|
|
51
|
-
return ((
|
|
52
|
-
(
|
|
53
|
-
)) == null ? void 0 :
|
|
48
|
+
var n, v;
|
|
49
|
+
return ((v = (n = l.value) == null ? void 0 : n.supportedLocales.find(
|
|
50
|
+
(M) => M.code === t
|
|
51
|
+
)) == null ? void 0 : v.name) ?? t;
|
|
54
52
|
}
|
|
55
53
|
function Y(t) {
|
|
56
|
-
R(),
|
|
54
|
+
R(), i.value.dispose(), i.value = b.sdk.subCategory.editor(t), C.value = i.value.get(), R = i.value.subscribe(
|
|
57
55
|
(n) => C.value = n
|
|
58
56
|
);
|
|
59
57
|
}
|
|
@@ -63,33 +61,33 @@ const je = { class: "flex-1 flex justify-between gap-8 pl-8" }, Be = { class: "f
|
|
|
63
61
|
function Z(t) {
|
|
64
62
|
Y(t.id), x.value = !0;
|
|
65
63
|
}
|
|
66
|
-
function
|
|
64
|
+
function B() {
|
|
67
65
|
x.value = !1, T.value = !1, w.value = !1;
|
|
68
66
|
}
|
|
69
67
|
function ee() {
|
|
70
68
|
var t;
|
|
71
|
-
((t = l.value) == null ? void 0 : t.translation.state) === "allowed" && (
|
|
69
|
+
((t = l.value) == null ? void 0 : t.translation.state) === "allowed" && (i.value.beginTranslationEdit(), w.value = !0);
|
|
72
70
|
}
|
|
73
71
|
function pe() {
|
|
74
|
-
|
|
72
|
+
i.value.saveTranslationEdit(), w.value = !1;
|
|
75
73
|
}
|
|
76
74
|
function ae() {
|
|
77
|
-
|
|
75
|
+
i.value.discardTranslationEdit(), w.value = !1;
|
|
78
76
|
}
|
|
79
77
|
async function te() {
|
|
80
|
-
var F,
|
|
81
|
-
const t = (F = l.value) == null ? void 0 : F.mode, n = ((S = (
|
|
82
|
-
t === "update" && !
|
|
83
|
-
() => z.submit(() =>
|
|
78
|
+
var F, N, S, V;
|
|
79
|
+
const t = (F = l.value) == null ? void 0 : F.mode, n = ((S = (N = l.value) == null ? void 0 : N.name) == null ? void 0 : S.trim()) ?? "", v = Object.keys(((V = l.value) == null ? void 0 : V.fieldIssues) ?? {}).length > 0;
|
|
80
|
+
t === "update" && !v && B(), (await I(
|
|
81
|
+
() => z.submit(() => i.value.submit()),
|
|
84
82
|
{
|
|
85
83
|
// A draft refused locally never reaches `submitting`: no spinner.
|
|
86
84
|
showLoading: () => {
|
|
87
|
-
var
|
|
88
|
-
return ((
|
|
85
|
+
var $;
|
|
86
|
+
return (($ = l.value) == null ? void 0 : $.status) === "submitting";
|
|
89
87
|
},
|
|
90
88
|
successMessage: t === "update" ? a("menu.subcategory.manager.dialog.update.success", { name: n }) : a("menu.subcategory.manager.dialog.add.success", { name: n })
|
|
91
89
|
}
|
|
92
|
-
)).kind === "success" ?
|
|
90
|
+
)).kind === "success" ? B() : t === "update" && (x.value = !0);
|
|
93
91
|
}
|
|
94
92
|
function le(t) {
|
|
95
93
|
t.remove.state === "allowed" && me.open({
|
|
@@ -100,7 +98,7 @@ const je = { class: "flex-1 flex justify-between gap-8 pl-8" }, Be = { class: "f
|
|
|
100
98
|
primaryActions: {
|
|
101
99
|
text: a("menu.common.actions.remove"),
|
|
102
100
|
close: !0,
|
|
103
|
-
variant:
|
|
101
|
+
variant: Fe.Destructive
|
|
104
102
|
},
|
|
105
103
|
secondaryActions: {
|
|
106
104
|
text: a("menu.common.actions.cancel"),
|
|
@@ -114,10 +112,10 @@ const je = { class: "flex-1 flex justify-between gap-8 pl-8" }, Be = { class: "f
|
|
|
114
112
|
});
|
|
115
113
|
});
|
|
116
114
|
}
|
|
117
|
-
const be =
|
|
115
|
+
const be = y(() => {
|
|
118
116
|
var t;
|
|
119
117
|
return [...((t = s.value) == null ? void 0 : t.rows) ?? []];
|
|
120
|
-
}), ge =
|
|
118
|
+
}), ge = y(() => !s.value || s.value.reorder.state !== "allowed" ? !1 : () => !0);
|
|
121
119
|
function ye(t) {
|
|
122
120
|
!s.value || s.value.reorder.state !== "allowed" || I(
|
|
123
121
|
() => b.sdk.subCategory.reorder(t.map((n) => n.id)),
|
|
@@ -126,7 +124,7 @@ const je = { class: "flex-1 flex justify-between gap-8 pl-8" }, Be = { class: "f
|
|
|
126
124
|
}
|
|
127
125
|
);
|
|
128
126
|
}
|
|
129
|
-
const fe =
|
|
127
|
+
const fe = y(() => [
|
|
130
128
|
{
|
|
131
129
|
accessorKey: "name",
|
|
132
130
|
header: () => a("menu.subcategory.columns.title"),
|
|
@@ -147,7 +145,7 @@ const je = { class: "flex-1 flex justify-between gap-8 pl-8" }, Be = { class: "f
|
|
|
147
145
|
variant: "tertiary",
|
|
148
146
|
textColor: "neutral-gray-400",
|
|
149
147
|
"aria-label": a("menu.subcategory.dialog.remove.title"),
|
|
150
|
-
onClick:
|
|
148
|
+
onClick: re(
|
|
151
149
|
() => le(t.row.original),
|
|
152
150
|
["stop", "prevent"]
|
|
153
151
|
)
|
|
@@ -156,48 +154,48 @@ const je = { class: "flex-1 flex justify-between gap-8 pl-8" }, Be = { class: "f
|
|
|
156
154
|
}
|
|
157
155
|
}
|
|
158
156
|
]);
|
|
159
|
-
return
|
|
160
|
-
b.sdk.subCategory.search(""), R(),
|
|
157
|
+
return ke(() => {
|
|
158
|
+
b.sdk.subCategory.search(""), R(), i.value.dispose();
|
|
161
159
|
}), (t, n) => {
|
|
162
|
-
const
|
|
163
|
-
return u(),
|
|
160
|
+
const v = g("FmButton"), M = g("FmCircularProgress"), F = g("FmSearch"), N = g("FmTable"), S = g("FmTooltip"), V = g("FmTextField"), $ = g("FmSideSheet"), _e = g("FmSpacer"), he = g("FmDialog");
|
|
161
|
+
return u(), _(Le, {
|
|
164
162
|
heading: e(a)("menu.subcategory.title")
|
|
165
163
|
}, {
|
|
166
|
-
"append-heading":
|
|
164
|
+
"append-heading": c(() => {
|
|
167
165
|
var L;
|
|
168
166
|
return [
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
167
|
+
m("div", Ne, [
|
|
168
|
+
m("div", $e, [
|
|
169
|
+
r(Ve, {
|
|
172
170
|
value: e(J)(((L = s.value) == null ? void 0 : L.totalCount) ?? 0)
|
|
173
171
|
}, null, 8, ["value"])
|
|
174
172
|
]),
|
|
175
|
-
s.value && s.value.totalCount > 0 && !W.value ? (u(),
|
|
173
|
+
s.value && s.value.totalCount > 0 && !W.value ? (u(), _(v, {
|
|
176
174
|
key: 0,
|
|
177
175
|
disabled: s.value.create.state !== "allowed",
|
|
178
176
|
label: e(a)("menu.subcategory.add"),
|
|
179
177
|
"prepend-icon": "add",
|
|
180
178
|
onClick: A
|
|
181
|
-
}, null, 8, ["disabled", "label"])) :
|
|
179
|
+
}, null, 8, ["disabled", "label"])) : h("", !0)
|
|
182
180
|
])
|
|
183
181
|
];
|
|
184
182
|
}),
|
|
185
|
-
default:
|
|
183
|
+
default: c(() => {
|
|
186
184
|
var L, oe, se;
|
|
187
185
|
return [
|
|
188
|
-
e(k).status === "error" ? (u(), p("p",
|
|
189
|
-
|
|
186
|
+
e(k).status === "error" ? (u(), p("p", je, f(e(O)(e(k).error.message)), 1)) : e(k).status === "unavailable" ? (u(), p("div", Oe, [
|
|
187
|
+
r(e(de), {
|
|
190
188
|
title: e(a)("menu.subcategory.empty.title"),
|
|
191
189
|
subtitle: e(a)("menu.subcategory.empty.subtitle")
|
|
192
190
|
}, null, 8, ["title", "subtitle"])
|
|
193
|
-
])) : e(k).status === "loading" ? (u(),
|
|
191
|
+
])) : e(k).status === "loading" ? (u(), _(M, { key: 2 })) : s.value && s.value.rows.length === 0 && !P.value ? (u(), _(e(de), {
|
|
194
192
|
key: 3,
|
|
195
193
|
action: s.value.create.state === "allowed" ? { text: e(a)("menu.subcategory.add"), callback: A } : void 0,
|
|
196
194
|
subtitle: e(a)("menu.subcategory.empty.subtitle"),
|
|
197
195
|
title: e(a)("menu.subcategory.empty.title")
|
|
198
|
-
}, null, 8, ["action", "subtitle", "title"])) : s.value && W.value ? (u(), p("div",
|
|
199
|
-
|
|
200
|
-
|
|
196
|
+
}, null, 8, ["action", "subtitle", "title"])) : s.value && W.value ? (u(), p("div", Ie, [
|
|
197
|
+
m("div", Pe, [
|
|
198
|
+
r(F, {
|
|
201
199
|
autofocus: "",
|
|
202
200
|
class: "w-full",
|
|
203
201
|
"model-value": P.value,
|
|
@@ -207,39 +205,42 @@ const je = { class: "flex-1 flex justify-between gap-8 pl-8" }, Be = { class: "f
|
|
|
207
205
|
"onUpdate:modelValue": b.sdk.subCategory.search
|
|
208
206
|
}, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"])
|
|
209
207
|
]),
|
|
210
|
-
|
|
211
|
-
(u(!0), p(
|
|
208
|
+
m("div", Re, [
|
|
209
|
+
(u(!0), p(j, null, Q(s.value.rows, (o) => (u(), p("div", {
|
|
212
210
|
key: o.id,
|
|
213
211
|
class: "flex flex-row py-12 px-16",
|
|
214
212
|
onClick: (d) => Z(o)
|
|
215
213
|
}, [
|
|
216
|
-
|
|
217
|
-
|
|
214
|
+
m("div", qe, [
|
|
215
|
+
m("p", Ke, f(o.name), 1)
|
|
218
216
|
]),
|
|
219
|
-
|
|
217
|
+
r(v, {
|
|
220
218
|
class: "shrink-0",
|
|
221
219
|
"aria-label": e(a)("menu.subcategory.dialog.remove.title"),
|
|
222
220
|
disabled: o.remove.state !== "allowed",
|
|
223
221
|
"prepend-icon": "delete",
|
|
224
222
|
"text-color": "neutral-gray-400",
|
|
225
223
|
variant: "tertiary",
|
|
226
|
-
onClick:
|
|
224
|
+
onClick: re((d) => le(o), ["stop"])
|
|
227
225
|
}, null, 8, ["aria-label", "disabled", "onClick"])
|
|
228
|
-
], 8,
|
|
226
|
+
], 8, Ae))), 128))
|
|
229
227
|
]),
|
|
230
|
-
s.value.totalCount > 0 ? (u(),
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
228
|
+
s.value.totalCount > 0 ? (u(), _(Se, { key: 0 }, {
|
|
229
|
+
default: c(() => [
|
|
230
|
+
r(v, {
|
|
231
|
+
disabled: s.value.create.state !== "allowed",
|
|
232
|
+
label: e(a)("menu.subcategory.add"),
|
|
233
|
+
"prepend-icon": "add",
|
|
234
|
+
variant: "fab",
|
|
235
|
+
onClick: A
|
|
236
|
+
}, null, 8, ["disabled", "label"])
|
|
237
|
+
]),
|
|
238
|
+
_: 1
|
|
239
|
+
})) : h("", !0)
|
|
240
|
+
])) : s.value ? (u(), p(j, { key: 5 }, [
|
|
241
|
+
m("div", Qe, [
|
|
242
|
+
m("div", Ge, [
|
|
243
|
+
r(F, {
|
|
243
244
|
autofocus: "",
|
|
244
245
|
class: "mb-8",
|
|
245
246
|
"model-value": P.value,
|
|
@@ -250,7 +251,7 @@ const je = { class: "flex-1 flex justify-between gap-8 pl-8" }, Be = { class: "f
|
|
|
250
251
|
}, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"])
|
|
251
252
|
])
|
|
252
253
|
]),
|
|
253
|
-
|
|
254
|
+
r(N, {
|
|
254
255
|
class: "subcategory-table",
|
|
255
256
|
"column-defs": fe.value,
|
|
256
257
|
draggable: ge.value,
|
|
@@ -262,8 +263,8 @@ const je = { class: "flex-1 flex justify-between gap-8 pl-8" }, Be = { class: "f
|
|
|
262
263
|
onDndChanged: ye,
|
|
263
264
|
onRowClick: n[0] || (n[0] = (o) => Z(o.original))
|
|
264
265
|
}, null, 8, ["column-defs", "draggable", "page-size", "row-data"])
|
|
265
|
-
], 64)) :
|
|
266
|
-
((L = l.value) == null ? void 0 : L.mode) === "update" ? (u(),
|
|
266
|
+
], 64)) : h("", !0),
|
|
267
|
+
((L = l.value) == null ? void 0 : L.mode) === "update" ? (u(), _($, {
|
|
267
268
|
key: 6,
|
|
268
269
|
modelValue: x.value,
|
|
269
270
|
"onUpdate:modelValue": n[1] || (n[1] = (o) => x.value = o),
|
|
@@ -272,65 +273,65 @@ const je = { class: "flex-1 flex justify-between gap-8 pl-8" }, Be = { class: "f
|
|
|
272
273
|
"max-width": 560,
|
|
273
274
|
"z-index": 100
|
|
274
275
|
}, {
|
|
275
|
-
"side-sheet-header":
|
|
276
|
+
"side-sheet-header": c(() => {
|
|
276
277
|
var o;
|
|
277
278
|
return [
|
|
278
|
-
|
|
279
|
+
m("p", He, 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
|
];
|
|
280
281
|
}),
|
|
281
|
-
"side-sheet-footer":
|
|
282
|
+
"side-sheet-footer": c(() => {
|
|
282
283
|
var o, d;
|
|
283
284
|
return [
|
|
284
|
-
|
|
285
|
-
|
|
285
|
+
m("div", Ze, [
|
|
286
|
+
r(v, {
|
|
286
287
|
disabled: ((o = l.value) == null ? void 0 : o.submit.state) !== "allowed",
|
|
287
288
|
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
289
|
size: "lg",
|
|
289
290
|
type: "submit",
|
|
290
291
|
variant: "primary"
|
|
291
292
|
}, null, 8, ["disabled", "label"]),
|
|
292
|
-
|
|
293
|
+
r(v, {
|
|
293
294
|
label: e(a)("menu.common.actions.cancel"),
|
|
294
295
|
size: "lg",
|
|
295
296
|
variant: "tertiary",
|
|
296
|
-
onClick:
|
|
297
|
+
onClick: B
|
|
297
298
|
}, null, 8, ["label"])
|
|
298
299
|
])
|
|
299
300
|
];
|
|
300
301
|
}),
|
|
301
|
-
default:
|
|
302
|
+
default: c(() => {
|
|
302
303
|
var o;
|
|
303
304
|
return [
|
|
304
|
-
|
|
305
|
-
|
|
305
|
+
m("div", Je, [
|
|
306
|
+
r(V, ie({
|
|
306
307
|
"error-messages": E.value ? [e(O)(E.value)] : [],
|
|
307
308
|
label: e(a)("menu.subcategory.name"),
|
|
308
309
|
"model-value": ((o = l.value) == null ? void 0 : o.name) ?? "",
|
|
309
310
|
placeholder: e(a)("menu.subcategory.dialog.add.name.placeholder")
|
|
310
|
-
}, e(z).field("name",
|
|
311
|
-
append:
|
|
312
|
-
|
|
313
|
-
|
|
311
|
+
}, e(z).field("name", i.value.setName)), {
|
|
312
|
+
append: c(() => [
|
|
313
|
+
m("div", We, [
|
|
314
|
+
r(S, {
|
|
314
315
|
variant: "plain",
|
|
315
316
|
placement: "top",
|
|
316
317
|
"z-index": 999
|
|
317
318
|
}, {
|
|
318
|
-
content:
|
|
319
|
+
content: c(() => {
|
|
319
320
|
var d, U;
|
|
320
321
|
return [
|
|
321
|
-
|
|
322
|
-
Object.keys(((d = l.value) == null ? void 0 : d.nameLocale) ?? {}).length === 0 ? (u(), p("div",
|
|
323
|
-
(u(!0), p(
|
|
322
|
+
m("div", Xe, [
|
|
323
|
+
Object.keys(((d = l.value) == null ? void 0 : d.nameLocale) ?? {}).length === 0 ? (u(), p("div", Ye, f(e(a)("menu.common.translation.translation_label")), 1)) : h("", !0),
|
|
324
|
+
(u(!0), p(j, 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
325
|
value: q,
|
|
325
326
|
locale: X(D)
|
|
326
327
|
})), 1))), 128))
|
|
327
328
|
])
|
|
328
329
|
];
|
|
329
330
|
}),
|
|
330
|
-
default:
|
|
331
|
+
default: c(() => {
|
|
331
332
|
var d;
|
|
332
333
|
return [
|
|
333
|
-
|
|
334
|
+
r(v, {
|
|
334
335
|
icon: "g_translate",
|
|
335
336
|
"aria-label": e(a)("menu.common.translation.translation_label"),
|
|
336
337
|
variant: "tertiary",
|
|
@@ -349,8 +350,8 @@ const je = { class: "flex-1 flex justify-between gap-8 pl-8" }, Be = { class: "f
|
|
|
349
350
|
];
|
|
350
351
|
}),
|
|
351
352
|
_: 1
|
|
352
|
-
}, 8, ["modelValue", "is-container", "is-container-props"])) :
|
|
353
|
-
((oe = l.value) == null ? void 0 : oe.mode) === "update" || ((se = l.value) == null ? void 0 : se.mode) === "create" ? (u(),
|
|
353
|
+
}, 8, ["modelValue", "is-container", "is-container-props"])) : h("", !0),
|
|
354
|
+
((oe = l.value) == null ? void 0 : oe.mode) === "update" || ((se = l.value) == null ? void 0 : se.mode) === "create" ? (u(), _(Ue, {
|
|
354
355
|
key: 7,
|
|
355
356
|
"model-value": w.value,
|
|
356
357
|
"onUpdate:modelValue": n[2] || (n[2] = (o) => o || ae()),
|
|
@@ -359,71 +360,73 @@ const je = { class: "flex-1 flex justify-between gap-8 pl-8" }, Be = { class: "f
|
|
|
359
360
|
"supported-locales": l.value.supportedLocales,
|
|
360
361
|
dirty: l.value.translationDirty,
|
|
361
362
|
"z-index": 200,
|
|
362
|
-
"onUpdate:name":
|
|
363
|
-
"onUpdate:nameLocale":
|
|
363
|
+
"onUpdate:name": i.value.setName,
|
|
364
|
+
"onUpdate:nameLocale": i.value.setNameLocale,
|
|
364
365
|
onSave: pe,
|
|
365
366
|
onDiscard: ae
|
|
366
|
-
}, null, 8, ["model-value", "name", "name-locale", "supported-locales", "dirty", "onUpdate:name", "onUpdate:nameLocale"])) :
|
|
367
|
-
|
|
367
|
+
}, null, 8, ["model-value", "name", "name-locale", "supported-locales", "dirty", "onUpdate:name", "onUpdate:nameLocale"])) : h("", !0),
|
|
368
|
+
r(he, {
|
|
368
369
|
modelValue: T.value,
|
|
369
370
|
"onUpdate:modelValue": n[3] || (n[3] = (o) => T.value = o),
|
|
370
371
|
"is-component": e(G).FmForm,
|
|
371
|
-
"is-component-props": { onValidationSuccess: te }
|
|
372
|
-
"max-width": 560
|
|
372
|
+
"is-component-props": { onValidationSuccess: te }
|
|
373
373
|
}, {
|
|
374
|
-
"dialog-header":
|
|
375
|
-
|
|
374
|
+
"dialog-header": c(() => [
|
|
375
|
+
m("p", ea, f(e(a)("menu.subcategory.manager.dialog.add.title")), 1)
|
|
376
376
|
]),
|
|
377
|
-
"dialog-footer":
|
|
377
|
+
"dialog-footer": c(() => {
|
|
378
378
|
var o;
|
|
379
379
|
return [
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
380
|
+
r(_e, { class: "sm:hidden xs:hidden" }),
|
|
381
|
+
r(v, {
|
|
382
|
+
class: "sm:w-full xs:w-full",
|
|
383
|
+
label: e(a)("menu.common.actions.cancel"),
|
|
384
|
+
size: "md",
|
|
385
|
+
variant: "tertiary",
|
|
386
|
+
onClick: B
|
|
387
|
+
}, null, 8, ["label"]),
|
|
388
|
+
r(v, {
|
|
389
|
+
class: "sm:w-full xs:w-full",
|
|
390
|
+
disabled: ((o = l.value) == null ? void 0 : o.submit.state) !== "allowed",
|
|
391
|
+
label: e(a)("menu.subcategory.manager.dialog.add.action"),
|
|
392
|
+
size: "md",
|
|
393
|
+
type: "submit",
|
|
394
|
+
variant: "primary"
|
|
395
|
+
}, null, 8, ["disabled", "label"])
|
|
393
396
|
];
|
|
394
397
|
}),
|
|
395
|
-
default:
|
|
398
|
+
default: c(() => {
|
|
396
399
|
var o;
|
|
397
400
|
return [
|
|
398
|
-
|
|
401
|
+
r(V, ie({
|
|
399
402
|
autofocus: "",
|
|
400
403
|
"error-messages": E.value ? [e(O)(E.value)] : [],
|
|
401
404
|
label: e(a)("menu.subcategory.name"),
|
|
402
405
|
"model-value": ((o = l.value) == null ? void 0 : o.name) ?? "",
|
|
403
406
|
placeholder: e(a)("menu.subcategory.dialog.add.name.placeholder")
|
|
404
|
-
}, e(z).field("name",
|
|
405
|
-
append:
|
|
406
|
-
|
|
407
|
+
}, e(z).field("name", i.value.setName)), {
|
|
408
|
+
append: c(() => [
|
|
409
|
+
r(S, {
|
|
407
410
|
variant: "plain",
|
|
408
411
|
placement: "top",
|
|
409
412
|
"z-index": 999
|
|
410
413
|
}, {
|
|
411
|
-
content:
|
|
414
|
+
content: c(() => {
|
|
412
415
|
var d, U;
|
|
413
416
|
return [
|
|
414
|
-
|
|
415
|
-
Object.keys(((d = l.value) == null ? void 0 : d.nameLocale) ?? {}).length === 0 ? (u(), p("div",
|
|
416
|
-
(u(!0), p(
|
|
417
|
+
m("div", aa, [
|
|
418
|
+
Object.keys(((d = l.value) == null ? void 0 : d.nameLocale) ?? {}).length === 0 ? (u(), p("div", ta, f(e(a)("menu.common.translation.translation_label")), 1)) : h("", !0),
|
|
419
|
+
(u(!0), p(j, 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
420
|
value: q,
|
|
418
421
|
locale: X(D)
|
|
419
422
|
})), 1))), 128))
|
|
420
423
|
])
|
|
421
424
|
];
|
|
422
425
|
}),
|
|
423
|
-
default:
|
|
426
|
+
default: c(() => {
|
|
424
427
|
var d;
|
|
425
428
|
return [
|
|
426
|
-
|
|
429
|
+
r(v, {
|
|
427
430
|
icon: "g_translate",
|
|
428
431
|
"aria-label": e(a)("menu.common.translation.translation_label"),
|
|
429
432
|
variant: "tertiary",
|
|
@@ -447,13 +450,13 @@ const je = { class: "flex-1 flex justify-between gap-8 pl-8" }, Be = { class: "f
|
|
|
447
450
|
}, 8, ["heading"]);
|
|
448
451
|
};
|
|
449
452
|
}
|
|
450
|
-
}), oa = /* @__PURE__ */
|
|
453
|
+
}), oa = /* @__PURE__ */ Me(la, [["__scopeId", "data-v-527107b4"]]), ya = /* @__PURE__ */ ce({
|
|
451
454
|
__name: "Subcategory",
|
|
452
455
|
setup(H) {
|
|
453
|
-
const b =
|
|
454
|
-
return (a, J) => (u(),
|
|
456
|
+
const b = Be();
|
|
457
|
+
return (a, J) => (u(), _(oa, { sdk: e(b) }, null, 8, ["sdk"]));
|
|
455
458
|
}
|
|
456
459
|
});
|
|
457
460
|
export {
|
|
458
|
-
|
|
461
|
+
ya as default
|
|
459
462
|
};
|
|
@@ -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-CUHB-g9I.js";
|
|
3
|
+
import { a as t } from "./provide-BGLSDsuJ.js";
|
|
4
4
|
const k = /* @__PURE__ */ o({
|
|
5
5
|
__name: "Takeaway",
|
|
6
6
|
setup(_) {
|
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
import { defineComponent as m, resolveComponent as i, openBlock as s, createBlock as c, unref as a, withCtx as
|
|
1
|
+
import { defineComponent as m, resolveComponent as i, openBlock as s, createBlock as c, unref as a, withCtx as e, createVNode as t } 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
|
|
7
|
-
import { a as
|
|
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-CUHB-g9I.js";
|
|
5
|
+
import { _ as d } from "./CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-CMyubLvP.js";
|
|
6
|
+
import { R as f } from "./app-CxJjx2ma.js";
|
|
7
|
+
import { a as u } from "./provide-BGLSDsuJ.js";
|
|
8
|
+
import { _ as k } from "./CatalogEditTabs.vue_vue_type_script_setup_true_lang-CraEwqCY.js";
|
|
9
9
|
const A = /* @__PURE__ */ m({
|
|
10
10
|
__name: "Takeaway",
|
|
11
11
|
setup(g) {
|
|
12
|
-
const o =
|
|
12
|
+
const o = u(), { t: n } = _();
|
|
13
13
|
return (b, h) => {
|
|
14
14
|
const r = i("FmButton");
|
|
15
15
|
return s(), c(l, {
|
|
16
|
+
class: "xs:overflow-hidden",
|
|
16
17
|
"catalog-page": "",
|
|
17
18
|
sdk: a(o)
|
|
18
19
|
}, {
|
|
19
|
-
"prepend-heading":
|
|
20
|
-
|
|
21
|
-
to: { name: a(
|
|
20
|
+
"prepend-heading": e(() => [
|
|
21
|
+
t(a(p), {
|
|
22
|
+
to: { name: a(f).CATALOG },
|
|
22
23
|
class: "mr-8",
|
|
23
24
|
title: a(n)("menu.catalog.edit.back")
|
|
24
25
|
}, {
|
|
25
|
-
default:
|
|
26
|
-
|
|
26
|
+
default: e(() => [
|
|
27
|
+
t(r, {
|
|
27
28
|
"prepend-icon": "arrow_back",
|
|
28
29
|
variant: "tertiary",
|
|
29
30
|
"aria-label": a(n)("menu.catalog.edit.back")
|
|
@@ -32,11 +33,11 @@ const A = /* @__PURE__ */ m({
|
|
|
32
33
|
_: 1
|
|
33
34
|
}, 8, ["to", "title"])
|
|
34
35
|
]),
|
|
35
|
-
navigation:
|
|
36
|
-
|
|
36
|
+
navigation: e(() => [
|
|
37
|
+
t(k)
|
|
37
38
|
]),
|
|
38
|
-
"append-heading":
|
|
39
|
-
|
|
39
|
+
"append-heading": e(() => [
|
|
40
|
+
t(d, { sdk: a(o) }, null, 8, ["sdk"])
|
|
40
41
|
]),
|
|
41
42
|
_: 1
|
|
42
43
|
}, 8, ["sdk"]);
|