@feedmepos/mf-menu-portal 1.0.4-dev.3 → 1.0.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-CgYpEYgp.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-CWe5_Sm5.js} +1 -1
- package/dist/{Catalog-B4RS8T29.js → Catalog-BrHGEI3p.js} +4 -4
- package/dist/{CatalogBinding-6_783kbu.js → CatalogBinding-BjTeOA91.js} +3 -3
- package/dist/{CatalogEditTabs.vue_vue_type_script_setup_true_lang-BawCLY5-.js → CatalogEditTabs.vue_vue_type_script_setup_true_lang-doB3hsWD.js} +3 -3
- package/dist/{CatalogEditor.vue_vue_type_script_setup_true_lang-BjP8ZXyb.js → CatalogEditor.vue_vue_type_script_setup_true_lang-BpBR-N_x.js} +7 -7
- package/dist/{CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-Diapahfp.js → CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-P59vHZEn.js} +14 -14
- package/dist/{Category-CqneIGq4.js → Category-6-ppsSmZ.js} +5 -5
- package/dist/{Category-DNQH1CI7.js → Category-CdsbuUqi.js} +2 -2
- package/dist/CategoryList.vue_vue_type_script_setup_true_lang-DlNUOgyu.js +847 -0
- package/dist/{CookingGuide-DTAiFmEL.js → CookingGuide-CRyRlBeV.js} +5 -5
- package/dist/{Group-5xO2j3CL.js → Group-DVrUlq4i.js} +2 -2
- package/dist/{Group-DeUqUomY.js → Group-DqyBHSFx.js} +5 -5
- package/dist/GroupList.vue_vue_type_script_setup_true_lang-oGNs8e8f.js +1807 -0
- package/dist/Ingredient-CGLfhbvN.js +505 -0
- package/dist/LinkProductSideSheet.vue_vue_type_script_setup_true_lang-C0rc1FRO.js +782 -0
- package/dist/{MenuSetting-DdekHsQy.js → MenuSetting-Oct3vbHj.js} +4 -4
- package/dist/OrderPacing-BDkzflgE.js +769 -0
- package/dist/{OrderPacingFields.vue_vue_type_script_setup_true_lang-C3SqQPSr.js → OrderPacingFields.vue_vue_type_script_setup_true_lang-B259anSs.js} +2 -2
- package/dist/{Preview-DGTw0POk.js → Preview-V9cSpevb.js} +1 -1
- package/dist/{PriceTierNotice.vue_vue_type_script_setup_true_lang-DffhFv0Y.js → PriceTierNotice.vue_vue_type_script_setup_true_lang-k5S4mGCN.js} +1 -1
- package/dist/PrintRoute-3UwiMoBU.js +518 -0
- package/dist/{Product-CsbcyIgD.js → Product-LaB-YRTQ.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-BBXGnZtc.js} +9 -9
- package/dist/ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-BUC6qUnG.js +2011 -0
- package/dist/{ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-DtCzHjpN.js → ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-CjQRRqBx.js} +1 -1
- package/dist/{ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-aDx01-WW.js → ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-3yzUcogQ.js} +630 -587
- package/dist/{ProductInternalTools-Ccd4dAmx.js → ProductInternalTools-DWCgC825.js} +2 -2
- package/dist/{ProductInventoryDialog-DYcKdKHi.js → ProductInventoryDialog-D0d5RywR.js} +1 -1
- package/dist/{ProductInventoryDialog.vue_vue_type_script_setup_true_lang-DySFcCJz.js → ProductInventoryDialog.vue_vue_type_script_setup_true_lang-CmYKO0ZX.js} +1 -1
- package/dist/ProductList.vue_vue_type_script_setup_true_lang-DeX8Exly.js +2765 -0
- package/dist/{ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-Dw2xiPYX.js → ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-BFD6_Sbb.js} +1 -1
- package/dist/{Products-phZwCZhU.js → Products-BLUhwFT-.js} +3 -3
- package/dist/Publish-Dkjnls7p.js +1337 -0
- package/dist/Recipe-BGfofjHT.js +388 -0
- package/dist/{Scheduler-C-A5m92O.js → Scheduler-BL7t8aS7.js} +314 -254
- package/dist/ServingSequence-CDFXMCiN.js +374 -0
- package/dist/{Setting-C24V-lps.js → Setting-gYZoZxQG.js} +6 -6
- package/dist/Subcategory-CnlrVwCy.js +459 -0
- package/dist/{Takeaway-BFP2ohJn.js → Takeaway-BWVzwWnh.js} +5 -5
- package/dist/{Takeaway-DywX5BiX.js → Takeaway-D8FzvC2w.js} +2 -2
- package/dist/{TakeawayList.vue_vue_type_script_setup_true_lang-B3QS7o1v.js → TakeawayList.vue_vue_type_script_setup_true_lang-igS-FXq5.js} +4 -4
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-B8nXazx6.js +1291 -0
- package/dist/Unit-Do7Tt8U8.js +424 -0
- package/dist/{Variant-BBfWhH-s.js → Variant-D1kLupxx.js} +5 -5
- package/dist/{_id_-BooM3FX1.js → _id_-DomaBHrh.js} +3 -3
- package/dist/{app-Bmgb8ACe.js → app-C_XNYz8_.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-Did75Kp9.js} +2 -2
- package/dist/assets/{validate-menu-BeGMWVns.js → validate-menu-DVMOLygB.js} +2 -2
- package/dist/mf-menu-portal.css +1 -1
- package/dist/{provide-CfF0FmUz.js → provide-Bwf3KcOV.js} +67991 -66892
- package/dist/{useActionFeedback-DyUCQl2x.js → useActionFeedback-CXx7dOVc.js} +1 -1
- package/dist/{FormSection.vue_vue_type_script_setup_true_lang-pY-_msnM.js → vuedraggable-CBtQLb_S.js} +140 -139
- package/package.json +2 -2
- package/dist/CategoryList.vue_vue_type_script_setup_true_lang-Bt_onPrP.js +0 -797
- package/dist/GroupList.vue_vue_type_script_setup_true_lang-Dgya_JLB.js +0 -2183
- package/dist/Ingredient-BlDW3TfZ.js +0 -463
- package/dist/LinkProductSideSheet.vue_vue_type_script_setup_true_lang-0tCpJlOf.js +0 -709
- package/dist/OrderPacing-Bb2n5wmI.js +0 -698
- package/dist/PrintRoute-CJB4gIP2.js +0 -473
- package/dist/ProductChipSummary.vue_vue_type_script_setup_true_lang-D8DygCBl.js +0 -110
- package/dist/ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-J6LpJ5wT.js +0 -1257
- package/dist/ProductList.vue_vue_type_script_setup_true_lang-DTLslTpK.js +0 -10353
- package/dist/Publish-BeKIXu3z.js +0 -1261
- package/dist/Recipe-Fo4tBkBv.js +0 -350
- package/dist/ServingSequence-BrCwLSO7.js +0 -336
- package/dist/Subcategory-B0oZIKbw.js +0 -412
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-D7mhnrXx.js +0 -1213
- package/dist/Unit-NhEwH-kr.js +0 -385
- package/dist/apps/mf-menu/src/views/MenuManagementEditor/RestaurantAttributesFilter.vue.d.ts +0 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as g, computed as m, resolveComponent as d, openBlock as F, createBlock as w, unref as s, withCtx as p, createVNode as u, mergeProps as c, renderSlot as b } from "vue";
|
|
2
2
|
import { useI18n as y } from "@feedmepos/mf-common";
|
|
3
|
-
import { _ as k } from "./
|
|
4
|
-
import { b as h } from "./provide-
|
|
3
|
+
import { _ as k } from "./vuedraggable-CBtQLb_S.js";
|
|
4
|
+
import { b as h } from "./provide-Bwf3KcOV.js";
|
|
5
5
|
const P = /* @__PURE__ */ g({
|
|
6
6
|
__name: "OrderPacingFields",
|
|
7
7
|
props: {
|
|
@@ -2,7 +2,7 @@ import { defineComponent as N, ref as J, computed as i, shallowRef as K, watch a
|
|
|
2
2
|
import { useI18n as le } from "@feedmepos/mf-common";
|
|
3
3
|
import { _ as U } from "./index.vue_vue_type_script_setup_true_lang-CGPDazqs.js";
|
|
4
4
|
import { _ as te } from "./PageLayout.vue_vue_type_script_setup_true_lang-B3szUH39.js";
|
|
5
|
-
import { b as ae, u as ue, a as se } from "./provide-
|
|
5
|
+
import { b as ae, u as ue, a as se } from "./provide-Bwf3KcOV.js";
|
|
6
6
|
function ne(g, r) {
|
|
7
7
|
const l = new URL(g);
|
|
8
8
|
return l.searchParams.set("parent", r), { src: l.toString(), origin: l.origin };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as a, computed as c, resolveComponent as m, openBlock as l, createBlock as u, unref as p, createCommentVNode as i } from "vue";
|
|
2
2
|
import { useI18n as d } from "@feedmepos/mf-common";
|
|
3
|
-
import { u as _ } from "./provide-
|
|
3
|
+
import { u as _ } from "./provide-Bwf3KcOV.js";
|
|
4
4
|
const b = /* @__PURE__ */ a({
|
|
5
5
|
__name: "PriceTierNotice",
|
|
6
6
|
props: {
|
|
@@ -0,0 +1,518 @@
|
|
|
1
|
+
import { defineComponent as j, resolveComponent as p, openBlock as n, createElementBlock as y, createVNode as s, withCtx as d, createElementVNode as r, toDisplayString as k, createBlock as f, Fragment as L, renderList as N, createCommentVNode as $, computed as _, ref as E, shallowRef as W, onUnmounted as ke, h as C, withModifiers as M, unref as o, mergeProps as be } from "vue";
|
|
2
|
+
import { useI18n as he } from "@feedmepos/mf-common";
|
|
3
|
+
import { useDialog as we, useBreakpoints as xe, components as U } from "@feedmepos/ui-library";
|
|
4
|
+
import { _ as X } from "./index.vue_vue_type_script_setup_true_lang-CGPDazqs.js";
|
|
5
|
+
import { _ as Ce } from "./LinkProductSideSheet.vue_vue_type_script_setup_true_lang-C0rc1FRO.js";
|
|
6
|
+
import { _ as Y } from "./vuedraggable-CBtQLb_S.js";
|
|
7
|
+
import { _ as Fe } from "./PageLayout.vue_vue_type_script_setup_true_lang-B3szUH39.js";
|
|
8
|
+
import { u as Pe } from "./useActionFeedback-CXx7dOVc.js";
|
|
9
|
+
import { u as Se } from "./useEditorValidation-Ctef5Bxt.js";
|
|
10
|
+
import { b as Ve, u as Z, a as Le } from "./provide-Bwf3KcOV.js";
|
|
11
|
+
const $e = { class: "fm-typo-en-body-lg-600" }, ze = { class: "fm-typo-en-body-lg-600" }, De = { class: "fm-typo-en-body-md-400" }, Ie = /* @__PURE__ */ j({
|
|
12
|
+
__name: "RemoveRouteConfirmation",
|
|
13
|
+
props: {
|
|
14
|
+
row: {}
|
|
15
|
+
},
|
|
16
|
+
setup(z) {
|
|
17
|
+
return (i, t) => {
|
|
18
|
+
const h = p("i18n-t"), F = p("FmIcon"), w = p("FmListItem"), g = p("FmList");
|
|
19
|
+
return n(), y("div", null, [
|
|
20
|
+
s(h, {
|
|
21
|
+
keypath: i.row.linkedProductCount > 0 ? "menu.print_route.dialogs.remove.message.with_products" : "menu.print_route.dialogs.remove.message.confirm",
|
|
22
|
+
scope: "global",
|
|
23
|
+
tag: "p"
|
|
24
|
+
}, {
|
|
25
|
+
count: d(() => [
|
|
26
|
+
r("span", $e, k(i.row.linkedProductCount), 1)
|
|
27
|
+
]),
|
|
28
|
+
name: d(() => [
|
|
29
|
+
r("span", ze, k(i.row.name), 1)
|
|
30
|
+
]),
|
|
31
|
+
_: 1
|
|
32
|
+
}, 8, ["keypath"]),
|
|
33
|
+
i.row.linkedProductCount > 0 ? (n(), f(g, {
|
|
34
|
+
key: 0,
|
|
35
|
+
class: "mt-8"
|
|
36
|
+
}, {
|
|
37
|
+
default: d(() => [
|
|
38
|
+
(n(!0), y(L, null, N(i.row.linkedProductNames, (l) => (n(), f(w, {
|
|
39
|
+
key: l,
|
|
40
|
+
class: "!p-0 !gap-4 mt-4",
|
|
41
|
+
clickable: !1
|
|
42
|
+
}, {
|
|
43
|
+
prepend: d(() => [
|
|
44
|
+
s(F, {
|
|
45
|
+
color: "neutral-gray-900",
|
|
46
|
+
name: "fiber_manual_record",
|
|
47
|
+
size: "sm"
|
|
48
|
+
})
|
|
49
|
+
]),
|
|
50
|
+
default: d(() => [
|
|
51
|
+
r("span", De, k(l), 1)
|
|
52
|
+
]),
|
|
53
|
+
_: 2
|
|
54
|
+
}, 1024))), 128))
|
|
55
|
+
]),
|
|
56
|
+
_: 1
|
|
57
|
+
})) : $("", !0)
|
|
58
|
+
]);
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
}), Re = { class: "flex flex-1 justify-end" }, Be = {
|
|
62
|
+
key: 0,
|
|
63
|
+
class: "flex flex-col gap-16 items-start"
|
|
64
|
+
}, Ae = {
|
|
65
|
+
class: "text-fm-color-typo-secondary",
|
|
66
|
+
role: "alert"
|
|
67
|
+
}, Ee = {
|
|
68
|
+
key: 1,
|
|
69
|
+
"data-menu-state": "unavailable"
|
|
70
|
+
}, Me = { class: "flex justify-end items-center" }, Ue = { class: "w-[320px] xs:w-full xs:px-16" }, Ne = { class: "min-w-0 grow space-y-4" }, je = { class: "fm-typo-en-body-lg-600 break-words" }, Ke = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary break-words" }, Qe = {
|
|
71
|
+
key: 2,
|
|
72
|
+
class: "fixed right-16 bottom-[72px] z-[100]"
|
|
73
|
+
}, Te = { class: "fm-typo-en-title-md-600" }, Oe = { class: "flex flex-col gap-32 pb-16" }, Ge = { class: "space-y-16" }, qe = { class: "flex items-center gap-8" }, He = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Je = { class: "flex gap-8 items-center justify-start" }, We = /* @__PURE__ */ j({
|
|
74
|
+
__name: "PrintRouteList",
|
|
75
|
+
props: {
|
|
76
|
+
sdk: {}
|
|
77
|
+
},
|
|
78
|
+
setup(z) {
|
|
79
|
+
const i = z, { t } = he(), h = Ve(), F = we(), { run: w } = Pe(), g = Z(
|
|
80
|
+
i.sdk.printDepartment.list
|
|
81
|
+
), l = _(
|
|
82
|
+
() => g.value.status === "ready" ? g.value.value : null
|
|
83
|
+
), ee = _(() => {
|
|
84
|
+
var e;
|
|
85
|
+
return ((e = l.value) == null ? void 0 : e.query) ?? "";
|
|
86
|
+
}), { breakpoints: te } = xe(), D = _(() => te.value.xs), oe = _(() => {
|
|
87
|
+
var e;
|
|
88
|
+
return [...((e = l.value) == null ? void 0 : e.rows) ?? []];
|
|
89
|
+
}), b = E(!1), P = E(!1), I = E(!1);
|
|
90
|
+
async function ae() {
|
|
91
|
+
I.value = !0;
|
|
92
|
+
try {
|
|
93
|
+
await w(() => i.sdk.printDepartment.retryRead(), {
|
|
94
|
+
showLoading: !1
|
|
95
|
+
});
|
|
96
|
+
} finally {
|
|
97
|
+
I.value = !1;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
const K = Z(
|
|
101
|
+
i.sdk.linkProduct.catalogue
|
|
102
|
+
), ne = _(
|
|
103
|
+
() => K.value.status === "ready" ? K.value.value : null
|
|
104
|
+
), le = _(
|
|
105
|
+
() => {
|
|
106
|
+
var e;
|
|
107
|
+
return ((e = m.value) == null ? void 0 : e.linkedProductIds) ?? [];
|
|
108
|
+
}
|
|
109
|
+
), se = _(() => {
|
|
110
|
+
var e;
|
|
111
|
+
return ((e = m.value) == null ? void 0 : e.linkedGroups) ?? [];
|
|
112
|
+
}), re = _(
|
|
113
|
+
() => {
|
|
114
|
+
var e;
|
|
115
|
+
return ((e = m.value) == null ? void 0 : e.linkedProductQuery) ?? "";
|
|
116
|
+
}
|
|
117
|
+
), ie = _(
|
|
118
|
+
() => {
|
|
119
|
+
var e;
|
|
120
|
+
return ((e = m.value) == null ? void 0 : e.linkedProductCount) ?? 0;
|
|
121
|
+
}
|
|
122
|
+
);
|
|
123
|
+
function ue(e) {
|
|
124
|
+
return [
|
|
125
|
+
{
|
|
126
|
+
accessorKey: "name",
|
|
127
|
+
enableSorting: !1,
|
|
128
|
+
header: () => e.isSynthetic ? t("menu.tree_editor.labels.addon") : e.name
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
id: "actions",
|
|
132
|
+
enableSorting: !1,
|
|
133
|
+
header: "",
|
|
134
|
+
cell: (u) => C("div", { class: "flex justify-end" }, [
|
|
135
|
+
C(U.FmButton, {
|
|
136
|
+
icon: "delete",
|
|
137
|
+
variant: "tertiary",
|
|
138
|
+
textColor: "neutral-gray-400",
|
|
139
|
+
"aria-label": t("menu.common.actions.remove"),
|
|
140
|
+
onClick: M(
|
|
141
|
+
() => c.value.unlinkProduct(u.row.original.id),
|
|
142
|
+
["stop", "prevent"]
|
|
143
|
+
)
|
|
144
|
+
})
|
|
145
|
+
])
|
|
146
|
+
}
|
|
147
|
+
];
|
|
148
|
+
}
|
|
149
|
+
const c = W(
|
|
150
|
+
i.sdk.printDepartment.editor()
|
|
151
|
+
), x = W(
|
|
152
|
+
c.value.get()
|
|
153
|
+
);
|
|
154
|
+
let R = c.value.subscribe(
|
|
155
|
+
(e) => x.value = e
|
|
156
|
+
);
|
|
157
|
+
const m = _(
|
|
158
|
+
() => x.value.status === "ready" ? x.value.value : null
|
|
159
|
+
), B = Se(() => c.value), Q = _(
|
|
160
|
+
() => m.value ? B.issue(m.value.fieldIssues, "name") : null
|
|
161
|
+
);
|
|
162
|
+
function T(e) {
|
|
163
|
+
R(), c.value.dispose(), c.value = i.sdk.printDepartment.editor(e), x.value = c.value.get(), R = c.value.subscribe(
|
|
164
|
+
(u) => x.value = u
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
ke(() => {
|
|
168
|
+
i.sdk.printDepartment.search(""), R(), c.value.dispose();
|
|
169
|
+
});
|
|
170
|
+
function A() {
|
|
171
|
+
!l.value || l.value.create.state !== "allowed" || (T(), b.value = !0);
|
|
172
|
+
}
|
|
173
|
+
function O(e) {
|
|
174
|
+
T(e.id), b.value = !0;
|
|
175
|
+
}
|
|
176
|
+
function G() {
|
|
177
|
+
b.value = !1;
|
|
178
|
+
}
|
|
179
|
+
function de() {
|
|
180
|
+
var e;
|
|
181
|
+
if (!((e = m.value) != null && e.dirty)) {
|
|
182
|
+
b.value = !1;
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
F.open({
|
|
186
|
+
title: t("menu.common.dialog.dismiss.title"),
|
|
187
|
+
message: t("menu.common.dialog.dismiss.message"),
|
|
188
|
+
primaryActions: {
|
|
189
|
+
text: t("menu.common.dialog.dismiss.discard"),
|
|
190
|
+
close: !0
|
|
191
|
+
},
|
|
192
|
+
secondaryActions: {
|
|
193
|
+
text: t("menu.common.actions.cancel"),
|
|
194
|
+
close: !0
|
|
195
|
+
}
|
|
196
|
+
}).onPrimary(() => {
|
|
197
|
+
b.value = !1;
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
async function ce() {
|
|
201
|
+
var v;
|
|
202
|
+
const e = ((v = m.value) == null ? void 0 : v.name.trim()) ?? "";
|
|
203
|
+
(await w(
|
|
204
|
+
() => B.submit(() => c.value.submit()),
|
|
205
|
+
{
|
|
206
|
+
// Legacy's success copy is "<name> saved" for both create and update; the
|
|
207
|
+
// frozen baseline asserts that text, so it is not restyled here.
|
|
208
|
+
successMessage: t("menu.print_route.manager.action.saved", {
|
|
209
|
+
name: e
|
|
210
|
+
}),
|
|
211
|
+
// `submit()` publishes `submitting` synchronously only when it will
|
|
212
|
+
// actually issue a request; a required-field, duplicate-name or
|
|
213
|
+
// not-found refusal is decided locally and sends nothing. The frozen
|
|
214
|
+
// `printDepartment/{create,update}/empty-name` groups record the inline
|
|
215
|
+
// "Required" message and no snackbar at all, so the spinner must not
|
|
216
|
+
// flash for them.
|
|
217
|
+
showLoading: () => {
|
|
218
|
+
var S;
|
|
219
|
+
return ((S = m.value) == null ? void 0 : S.status) === "submitting";
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
)).kind === "success" && G();
|
|
223
|
+
}
|
|
224
|
+
function q(e) {
|
|
225
|
+
F.open({
|
|
226
|
+
title: t("menu.print_route.dialogs.remove.title"),
|
|
227
|
+
contentComponent: C(Ie, { row: e }),
|
|
228
|
+
primaryActions: {
|
|
229
|
+
text: t("menu.print_route.actions.remove"),
|
|
230
|
+
close: !0,
|
|
231
|
+
variant: "destructive"
|
|
232
|
+
},
|
|
233
|
+
secondaryActions: {
|
|
234
|
+
text: t("menu.print_route.actions.cancel"),
|
|
235
|
+
close: !0
|
|
236
|
+
}
|
|
237
|
+
}).onPrimary(async () => {
|
|
238
|
+
await w(() => i.sdk.printDepartment.remove(e.id), {
|
|
239
|
+
successMessage: t("menu.print_route.manager.action.removed", {
|
|
240
|
+
name: e.name
|
|
241
|
+
})
|
|
242
|
+
});
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
const me = _(() => [
|
|
246
|
+
{
|
|
247
|
+
accessorKey: "name",
|
|
248
|
+
header: () => t("menu.print_route.table.columns.name"),
|
|
249
|
+
cell: (e) => e.getValue(),
|
|
250
|
+
enableSorting: !1
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
accessorKey: "linkedProductCount",
|
|
254
|
+
header: () => t("menu.print_route.table.columns.products"),
|
|
255
|
+
cell: (e) => t("menu.print_route.table.columns.products_count", {
|
|
256
|
+
count: e.getValue()
|
|
257
|
+
}),
|
|
258
|
+
enableSorting: !1
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
accessorKey: "id",
|
|
262
|
+
header: () => "",
|
|
263
|
+
size: 52,
|
|
264
|
+
meta: { cellClass: "pl-16", headerContentClass: "-mx-16" },
|
|
265
|
+
enableSorting: !1,
|
|
266
|
+
cell: (e) => C("div", { class: "flex justify-end" }, [
|
|
267
|
+
C(U.FmButton, {
|
|
268
|
+
icon: "delete",
|
|
269
|
+
textColor: "neutral-gray-400",
|
|
270
|
+
variant: "tertiary",
|
|
271
|
+
disabled: e.row.original.remove.state !== "allowed",
|
|
272
|
+
"aria-label": t("menu.print_route.actions.remove"),
|
|
273
|
+
onClick: M(
|
|
274
|
+
() => q(e.row.original),
|
|
275
|
+
["stop", "prevent"]
|
|
276
|
+
)
|
|
277
|
+
})
|
|
278
|
+
])
|
|
279
|
+
}
|
|
280
|
+
]);
|
|
281
|
+
function pe(e) {
|
|
282
|
+
c.value.setLinkedProducts(e), P.value = !1;
|
|
283
|
+
}
|
|
284
|
+
return (e, u) => {
|
|
285
|
+
const v = p("FmButton"), S = p("FmCircularProgress"), H = p("FmSearch"), J = p("FmTable"), _e = p("FmListItem"), ve = p("FmList"), fe = p("FmTextField"), ye = p("FmSpacer"), ge = p("FmSideSheet");
|
|
286
|
+
return n(), f(Fe, {
|
|
287
|
+
heading: o(t)("menu.print_route.title")
|
|
288
|
+
}, {
|
|
289
|
+
"append-heading": d(() => [
|
|
290
|
+
r("div", Re, [
|
|
291
|
+
l.value && l.value.totalCount > 0 && !D.value ? (n(), f(v, {
|
|
292
|
+
key: 0,
|
|
293
|
+
disabled: l.value.create.state !== "allowed",
|
|
294
|
+
label: o(t)("menu.print_route.actions.add"),
|
|
295
|
+
"prepend-icon": "add",
|
|
296
|
+
variant: "primary",
|
|
297
|
+
onClick: A
|
|
298
|
+
}, null, 8, ["disabled", "label"])) : $("", !0)
|
|
299
|
+
])
|
|
300
|
+
]),
|
|
301
|
+
default: d(() => [
|
|
302
|
+
o(g).status === "error" ? (n(), y("div", Be, [
|
|
303
|
+
r("p", Ae, k(o(h)(o(g).error.message)), 1),
|
|
304
|
+
s(v, {
|
|
305
|
+
label: o(t)("menu.common.actions.retry"),
|
|
306
|
+
loading: I.value,
|
|
307
|
+
"prepend-icon": "refresh",
|
|
308
|
+
size: "md",
|
|
309
|
+
variant: "secondary",
|
|
310
|
+
onClick: ae
|
|
311
|
+
}, null, 8, ["label", "loading"])
|
|
312
|
+
])) : o(g).status === "unavailable" ? (n(), y("div", Ee, [
|
|
313
|
+
s(o(X), {
|
|
314
|
+
subtitle: o(t)("menu.print_route.empty.subtitle"),
|
|
315
|
+
title: o(t)("menu.print_route.empty.title")
|
|
316
|
+
}, null, 8, ["subtitle", "title"])
|
|
317
|
+
])) : o(g).status === "loading" ? (n(), f(S, { key: 2 })) : l.value && l.value.totalCount === 0 ? (n(), f(o(X), {
|
|
318
|
+
key: 3,
|
|
319
|
+
action: l.value.create.state === "allowed" ? { text: o(t)("menu.print_route.empty.action"), callback: A } : void 0,
|
|
320
|
+
subtitle: o(t)("menu.print_route.empty.subtitle"),
|
|
321
|
+
title: o(t)("menu.print_route.empty.title")
|
|
322
|
+
}, null, 8, ["action", "subtitle", "title"])) : l.value ? (n(), y(L, { key: 4 }, [
|
|
323
|
+
r("div", Me, [
|
|
324
|
+
r("div", Ue, [
|
|
325
|
+
s(H, {
|
|
326
|
+
autofocus: "",
|
|
327
|
+
class: "my-8",
|
|
328
|
+
"model-value": ee.value,
|
|
329
|
+
placeholder: o(t)("menu.print_route.table.search.placeholder"),
|
|
330
|
+
"onUpdate:modelValue": i.sdk.printDepartment.search
|
|
331
|
+
}, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"])
|
|
332
|
+
])
|
|
333
|
+
]),
|
|
334
|
+
D.value ? (n(), f(ve, {
|
|
335
|
+
key: 1,
|
|
336
|
+
class: "w-full px-16 flex-1 min-h-0 overflow-scroll pb-64",
|
|
337
|
+
separator: ""
|
|
338
|
+
}, {
|
|
339
|
+
default: d(() => [
|
|
340
|
+
(n(!0), y(L, null, N(l.value.rows, (a) => (n(), f(_e, {
|
|
341
|
+
key: a.id,
|
|
342
|
+
class: "!py-12 !px-0",
|
|
343
|
+
onClick: (V) => O(a)
|
|
344
|
+
}, {
|
|
345
|
+
default: d(() => [
|
|
346
|
+
r("div", Ne, [
|
|
347
|
+
r("div", je, k(a.name), 1),
|
|
348
|
+
r("div", Ke, k(o(t)("menu.print_route.table.mobile.products_linked", {
|
|
349
|
+
count: a.linkedProductCount
|
|
350
|
+
})), 1)
|
|
351
|
+
]),
|
|
352
|
+
s(v, {
|
|
353
|
+
class: "shrink-0",
|
|
354
|
+
"aria-label": o(t)("menu.print_route.actions.remove"),
|
|
355
|
+
disabled: a.remove.state !== "allowed",
|
|
356
|
+
icon: "delete",
|
|
357
|
+
"text-color": "neutral-gray-400",
|
|
358
|
+
variant: "tertiary",
|
|
359
|
+
onClick: M((V) => q(a), ["stop"])
|
|
360
|
+
}, null, 8, ["aria-label", "disabled", "onClick"])
|
|
361
|
+
]),
|
|
362
|
+
_: 2
|
|
363
|
+
}, 1032, ["onClick"]))), 128))
|
|
364
|
+
]),
|
|
365
|
+
_: 1
|
|
366
|
+
})) : (n(), f(J, {
|
|
367
|
+
key: 0,
|
|
368
|
+
"column-defs": me.value,
|
|
369
|
+
"page-size": l.value.rows.length,
|
|
370
|
+
"row-data": oe.value,
|
|
371
|
+
"shrink-at": !1,
|
|
372
|
+
"hide-footer": "",
|
|
373
|
+
"pin-header-row": "",
|
|
374
|
+
onRowClick: u[0] || (u[0] = (a) => O(a.original))
|
|
375
|
+
}, null, 8, ["column-defs", "page-size", "row-data"])),
|
|
376
|
+
l.value.totalCount > 0 && D.value ? (n(), y("div", Qe, [
|
|
377
|
+
s(v, {
|
|
378
|
+
disabled: l.value.create.state !== "allowed",
|
|
379
|
+
label: o(t)("menu.print_route.actions.add"),
|
|
380
|
+
"prepend-icon": "add",
|
|
381
|
+
variant: "fab",
|
|
382
|
+
onClick: A
|
|
383
|
+
}, null, 8, ["disabled", "label"])
|
|
384
|
+
])) : $("", !0)
|
|
385
|
+
], 64)) : $("", !0),
|
|
386
|
+
s(ge, {
|
|
387
|
+
modelValue: b.value,
|
|
388
|
+
"onUpdate:modelValue": u[3] || (u[3] = (a) => b.value = a),
|
|
389
|
+
"is-container": o(U).FmForm,
|
|
390
|
+
"is-container-props": { onValidationSuccess: ce },
|
|
391
|
+
"max-width": 560,
|
|
392
|
+
"onOn:clickedAway": de
|
|
393
|
+
}, {
|
|
394
|
+
"side-sheet-header": d(() => {
|
|
395
|
+
var a;
|
|
396
|
+
return [
|
|
397
|
+
r("p", Te, k(((a = m.value) == null ? void 0 : a.mode) === "update" ? o(t)("menu.print_route.department_dialog.update.title") : o(t)("menu.print_route.department_dialog.add.title")), 1)
|
|
398
|
+
];
|
|
399
|
+
}),
|
|
400
|
+
"side-sheet-footer": d(() => {
|
|
401
|
+
var a, V;
|
|
402
|
+
return [
|
|
403
|
+
r("div", Je, [
|
|
404
|
+
s(v, {
|
|
405
|
+
disabled: ((a = m.value) == null ? void 0 : a.submit.state) !== "allowed",
|
|
406
|
+
label: ((V = m.value) == null ? void 0 : V.mode) === "update" ? o(t)("menu.print_route.department_dialog.update.action") : o(t)("menu.print_route.department_dialog.add.action"),
|
|
407
|
+
size: "lg",
|
|
408
|
+
type: "submit",
|
|
409
|
+
variant: "primary"
|
|
410
|
+
}, null, 8, ["disabled", "label"]),
|
|
411
|
+
s(v, {
|
|
412
|
+
label: o(t)("menu.print_route.department_dialog.actions.cancel"),
|
|
413
|
+
size: "lg",
|
|
414
|
+
variant: "tertiary",
|
|
415
|
+
onClick: G
|
|
416
|
+
}, null, 8, ["label"])
|
|
417
|
+
])
|
|
418
|
+
];
|
|
419
|
+
}),
|
|
420
|
+
default: d(() => [
|
|
421
|
+
r("div", Oe, [
|
|
422
|
+
s(Y, {
|
|
423
|
+
title: o(t)("menu.print_route.department_dialog.sections.route_detail.title")
|
|
424
|
+
}, {
|
|
425
|
+
default: d(() => {
|
|
426
|
+
var a;
|
|
427
|
+
return [
|
|
428
|
+
s(fe, be({
|
|
429
|
+
autofocus: "",
|
|
430
|
+
"error-messages": Q.value ? [o(h)(Q.value)] : [],
|
|
431
|
+
label: o(t)(
|
|
432
|
+
"menu.print_route.department_dialog.sections.route_detail.name.label"
|
|
433
|
+
),
|
|
434
|
+
"model-value": ((a = m.value) == null ? void 0 : a.name) ?? "",
|
|
435
|
+
placeholder: o(t)(
|
|
436
|
+
"menu.print_route.department_dialog.sections.route_detail.name.placeholder"
|
|
437
|
+
)
|
|
438
|
+
}, o(B).field("name", c.value.setName)), null, 16, ["error-messages", "label", "model-value", "placeholder"])
|
|
439
|
+
];
|
|
440
|
+
}),
|
|
441
|
+
_: 1
|
|
442
|
+
}, 8, ["title"]),
|
|
443
|
+
s(Y, {
|
|
444
|
+
title: o(t)("menu.print_route.department_dialog.sections.link_product.title")
|
|
445
|
+
}, {
|
|
446
|
+
"append-title": d(() => [
|
|
447
|
+
s(ye),
|
|
448
|
+
s(v, {
|
|
449
|
+
label: o(t)(
|
|
450
|
+
"menu.print_route.department_dialog.sections.link_product.link"
|
|
451
|
+
),
|
|
452
|
+
"border-color": "primary",
|
|
453
|
+
"prepend-icon": "link",
|
|
454
|
+
"text-color": "primary",
|
|
455
|
+
variant: "secondary",
|
|
456
|
+
onClick: u[1] || (u[1] = (a) => P.value = !0)
|
|
457
|
+
}, null, 8, ["label"])
|
|
458
|
+
]),
|
|
459
|
+
default: d(() => [
|
|
460
|
+
r("div", Ge, [
|
|
461
|
+
r("div", qe, [
|
|
462
|
+
r("p", He, k(o(t)(
|
|
463
|
+
"menu.print_route.department_dialog.sections.link_product.products_linked",
|
|
464
|
+
{ count: ie.value }
|
|
465
|
+
)), 1),
|
|
466
|
+
s(H, {
|
|
467
|
+
class: "flex-1",
|
|
468
|
+
"model-value": re.value,
|
|
469
|
+
placeholder: o(t)(
|
|
470
|
+
"menu.print_route.department_dialog.sections.link_product.search"
|
|
471
|
+
),
|
|
472
|
+
"onUpdate:modelValue": u[2] || (u[2] = (a) => c.value.setLinkedProductQuery(String(a ?? "")))
|
|
473
|
+
}, null, 8, ["model-value", "placeholder"])
|
|
474
|
+
]),
|
|
475
|
+
r("div", null, [
|
|
476
|
+
(n(!0), y(L, null, N(se.value, (a) => (n(), y("div", {
|
|
477
|
+
key: a.id ?? ""
|
|
478
|
+
}, [
|
|
479
|
+
s(J, {
|
|
480
|
+
"column-defs": ue(a),
|
|
481
|
+
"hide-footer": "",
|
|
482
|
+
"page-size": a.products.length,
|
|
483
|
+
"row-data": [...a.products],
|
|
484
|
+
"shrink-at": !1
|
|
485
|
+
}, null, 8, ["column-defs", "page-size", "row-data"])
|
|
486
|
+
]))), 128))
|
|
487
|
+
])
|
|
488
|
+
])
|
|
489
|
+
]),
|
|
490
|
+
_: 1
|
|
491
|
+
}, 8, ["title"])
|
|
492
|
+
])
|
|
493
|
+
]),
|
|
494
|
+
_: 1
|
|
495
|
+
}, 8, ["modelValue", "is-container", "is-container-props"]),
|
|
496
|
+
s(Ce, {
|
|
497
|
+
modelValue: P.value,
|
|
498
|
+
"onUpdate:modelValue": u[4] || (u[4] = (a) => P.value = a),
|
|
499
|
+
catalogue: ne.value,
|
|
500
|
+
"selected-product-ids": le.value,
|
|
501
|
+
title: o(t)("menu.print_route.department_dialog.sections.link_product.title"),
|
|
502
|
+
onSubmit: pe
|
|
503
|
+
}, null, 8, ["modelValue", "catalogue", "selected-product-ids", "title"])
|
|
504
|
+
]),
|
|
505
|
+
_: 1
|
|
506
|
+
}, 8, ["heading"]);
|
|
507
|
+
};
|
|
508
|
+
}
|
|
509
|
+
}), rt = /* @__PURE__ */ j({
|
|
510
|
+
__name: "PrintRoute",
|
|
511
|
+
setup(z) {
|
|
512
|
+
const i = Le();
|
|
513
|
+
return (t, h) => (n(), f(We, { sdk: o(i) }, null, 8, ["sdk"]));
|
|
514
|
+
}
|
|
515
|
+
});
|
|
516
|
+
export {
|
|
517
|
+
rt as default
|
|
518
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineComponent as m, resolveComponent as i, openBlock as c, createBlock as s, unref as t, withCtx as e, createVNode as o } 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 "./ProductList.vue_vue_type_script_setup_true_lang-
|
|
5
|
-
import { a as u } from "./provide-
|
|
6
|
-
import { R as d } from "./app-
|
|
7
|
-
import { _ as f } from "./CatalogEditTabs.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { _ as l } from "./ProductList.vue_vue_type_script_setup_true_lang-DeX8Exly.js";
|
|
5
|
+
import { a as u } from "./provide-Bwf3KcOV.js";
|
|
6
|
+
import { R as d } from "./app-C_XNYz8_.js";
|
|
7
|
+
import { _ as f } from "./CatalogEditTabs.vue_vue_type_script_setup_true_lang-doB3hsWD.js";
|
|
8
8
|
const A = /* @__PURE__ */ m({
|
|
9
9
|
__name: "Product",
|
|
10
10
|
setup(k) {
|