@feedmepos/mf-menu 0.31.33-beta.6 → 0.31.33-beta.8
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-Dt6RQiUh.js → App-BAMi-a9P.js} +6 -6
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-B_SQpWg7.js → ApplyProduct.vue_vue_type_script_setup_true_lang-BWgnvXjy.js} +20 -20
- package/dist/{Catalog-CFx7t_Nu.js → Catalog-DiPY42vz.js} +6 -6
- package/dist/{Category-CPMx86rY.js → Category-B9jnFDvG.js} +14 -14
- package/dist/{Category-OjK-v--G.js → Category-ClrACB2e.js} +19 -19
- package/dist/{CookingGuide-ANnXKBjc.js → CookingGuide-1553FWRH.js} +4 -4
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-D-1OzZ-i.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-DWNx15iJ.js} +1 -1
- package/dist/{Group-K4925_bP.js → Group-DLahX8qi.js} +3 -3
- package/dist/{Group--DJjkGab.js → Group-l_-qZSyF.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-36O78xv0.js → Group.vue_vue_type_script_setup_true_lang-PNpEgEGB.js} +9 -9
- package/dist/GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-DoVyIdTN.js +364 -0
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-C-z1m3jh.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-DSspLK4i.js} +12597 -12946
- package/dist/{Ingredient-G4Txx6_0.js → Ingredient-SsBtwYjB.js} +3 -3
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-HgHBlflo.js → InventoryBinding.vue_vue_type_script_setup_true_lang-DqnVkfjW.js} +2 -2
- package/dist/LinkProductSideSheet-CncbzDh3.js +335 -0
- package/dist/{MenuSetting-Cx-EHG-6.js → MenuSetting-D28a3uD4.js} +4 -4
- package/dist/{PrintRoute-IxHGvGzF.js → PrintRoute-BdlT0DDr.js} +89 -88
- package/dist/{Product-D1gqn5J6.js → Product-s5Q4wV8i.js} +1 -1
- package/dist/Product.vue_vue_type_script_setup_true_lang-C6iDgQEU.js +1575 -0
- package/dist/{ProductInternalTools-GJ2OE5gU.js → ProductInternalTools-DjSkvzw2.js} +5 -5
- package/dist/Products-B3tF_gCa.js +283 -0
- package/dist/{Publish-C86rd413.js → Publish-G4bwUpme.js} +3 -3
- package/dist/{Recipe-BbQKou9p.js → Recipe-BxgHUzb5.js} +4 -4
- package/dist/{Scheduler-DUeTkyGQ.js → Scheduler-DJSKWS-9.js} +3 -3
- package/dist/{ServingSequence-BROo5rC_.js → ServingSequence-_cmuGKlV.js} +3 -3
- package/dist/{Setting-D-ueTlwO.js → Setting-Dx7ycxAn.js} +5 -5
- package/dist/{Subcategory-DVewA8HX.js → Subcategory-25AzJQYt.js} +4 -4
- package/dist/{Takeaway-DyPjHuCl.js → Takeaway-Bmm9d5PO.js} +1 -1
- package/dist/{Takeaway-B4lDGQDh.js → Takeaway-CcFK-Y2z.js} +4 -4
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-BTDlzYuX.js → Takeaway.vue_vue_type_script_setup_true_lang-Bl5OAG3c.js} +5 -5
- package/dist/Thumbnail.vue_vue_type_script_setup_true_lang-B3-ypwE7.js +431 -0
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-D2gzS8Q_.js +5990 -0
- package/dist/{Unit-CVF0dom4.js → Unit-Cs1EOuyg.js} +2 -2
- package/dist/{Variant-DmccAgFU.js → Variant-BTCkw4RC.js} +3 -3
- package/dist/_id_-C9b2WHzy.js +202 -0
- package/dist/{app-ClinzawZ.js → app-BhI1mPRh.js} +1 -1
- package/dist/{app-CV_q8OdE.js → app-CU2frfPB.js} +24 -24
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/components/feature/RestaurantAttributesSelector.vue.d.ts +33 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/catalog.d.ts +2 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/store/menuV2.d.ts +3 -1
- package/dist/apps/mf-menu/src/composable/customAttributes.d.ts +8 -0
- package/dist/apps/mf-menu/src/composable/linkProducts.d.ts +1276 -0
- package/dist/apps/mf-menu/src/types/linkProducts.d.ts +21 -0
- package/dist/apps/mf-menu/src/views/PrintRoute/PrintDepartmentDialog.vue.d.ts +5 -3
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-fZD691Js.js → linked-status-r8YcmOs7.js} +12 -12
- package/dist/assets/{override-menu-Cjy1BJuz.js → override-menu-CDLCS1zK.js} +12 -12
- package/dist/assets/{validate-menu-uwysUwDP.js → validate-menu-B-FxrVmM.js} +12 -12
- package/dist/{catalog-Wx88K6iI.js → catalog-BudDGPc1.js} +1 -1
- package/dist/{catalogSetting-DTEHDSAd.js → catalogSetting-Bk1QEBg5.js} +1 -1
- package/dist/{category-BRTw76Vf.js → category-UDpJb7Yh.js} +1 -1
- package/dist/{currency-562bPc2l.js → currency-BQIQArxm.js} +1 -1
- package/dist/{dayjs.min-Cnfm8bQm.js → dayjs.min-D0EjAkx4.js} +1 -1
- package/dist/{index-Crs_eZ0i.js → index-B_V5s58T.js} +1 -1
- package/dist/{index-DJXrJdeQ.js → index-CirrSmpA.js} +3 -3
- package/dist/index-DRuDRGm-.js +213 -0
- package/dist/{index-4hf9vONw.js → index-Dy-u7imh.js} +3 -3
- package/dist/{item-CuIxc9FT.js → item-C45Oe5Un.js} +196 -194
- package/dist/{jszip.min-C9xLIvo4.js → jszip.min-BR_8QNuk.js} +545 -545
- package/dist/{menu-Mkzv9c8C.js → menu-D52oU1sw.js} +1 -1
- package/dist/{menu-ILWxqJQe.js → menu-DTlhFcnq.js} +6882 -6858
- package/dist/menuV2-DQtEtGVV.js +707 -0
- package/dist/mf-menu.css +1 -1
- package/dist/{priceTier-D4joq_kN.js → priceTier-CDyccedV.js} +1 -1
- package/dist/{scheduler-DuxWoNVb.js → scheduler-DHjrtU8G.js} +16 -17
- package/dist/subcategory-0ajMWsb2.js +148 -0
- package/dist/{toExcel-hGfpS_Uo.js → toExcel-BNKDwOzQ.js} +2 -2
- package/dist/{unit-9fycj1fu.js → unit-CBe6cpyB.js} +5 -4
- package/package.json +3 -3
- package/dist/FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js +0 -26
- package/dist/GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BIX-gPUO.js +0 -372
- package/dist/LinkProductSideSheet-CWNarCEs.js +0 -112
- package/dist/Product.vue_vue_type_script_setup_true_lang-BCQd-ks4.js +0 -1641
- package/dist/Products-DJqgSe-Y.js +0 -270
- package/dist/Thumbnail.vue_vue_type_script_setup_true_lang-DzQ8_6Bi.js +0 -71
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-B5BAKDRP.js +0 -6149
- package/dist/_id_-CWtK62Fy.js +0 -178
- package/dist/apps/mf-menu/src/components/feature/AttributesSelector.vue.d.ts +0 -2
- package/dist/apps/mf-menu/src/components/feature/LinkProduct/LinkProductSideSheet.vue.d.ts +0 -70
- package/dist/apps/mf-menu/src/components/feature/LinkProduct/LinkProductUnifiedSideSheet.vue.d.ts +0 -12
- package/dist/customAttributes-CXzd5ud1.js +0 -33
- package/dist/index-Ce4v8o7D.js +0 -106
- package/dist/subcategory-CLLMagXY.js +0 -817
- /package/dist/{app-DvG3mOom.js → LinkProductSideSheet.vue_vue_type_style_index_0_scoped_7d7fe73f_lang-DvG3mOom.js} +0 -0
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as H, ref as
|
|
1
|
+
import { defineComponent as H, ref as T, computed as f, resolveComponent as g, createBlock as P, openBlock as p, unref as l, withCtx as m, createElementVNode as i, createVNode as c, createCommentVNode as J, toDisplayString as S, createElementBlock as L, Fragment as A, renderList as B, h as _, withModifiers as q } from "vue";
|
|
2
2
|
import { useI18n as Q } from "@feedmepos/mf-common";
|
|
3
|
-
import { components as W, useSnackbar as
|
|
4
|
-
import { _ as
|
|
5
|
-
import { _ as
|
|
6
|
-
import { H as j, I as
|
|
7
|
-
import { u as ie } from "./discardConfirm-BHni0LNu.js";
|
|
8
|
-
import { L as ue } from "./LinkProductSideSheet-CWNarCEs.js";
|
|
3
|
+
import { components as W, useSnackbar as te, useDialog as oe } from "@feedmepos/ui-library";
|
|
4
|
+
import { _ as ne } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
5
|
+
import { _ as ae } from "./app-CU2frfPB.js";
|
|
6
|
+
import { H as j, I as le, J as Y, G as C, u as re, O as se, D as ie } from "./menu-DTlhFcnq.js";
|
|
9
7
|
import { _ as G } from "./FormSection.vue_vue_type_script_setup_true_lang-CO4YGYLB.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
8
|
+
import { u as ue } from "./discardConfirm-BHni0LNu.js";
|
|
9
|
+
import { L as de } from "./LinkProductSideSheet-CncbzDh3.js";
|
|
10
|
+
import { _ as ce } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
|
|
11
|
+
import { _ as me } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
12
|
+
const pe = { class: "fm-typo-en-title-md-600" }, _e = { class: "space-y-32" }, fe = { class: "space-y-16" }, ve = { class: "flex items-center gap-8" }, ye = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ge = { class: "flex-1" }, he = { class: "grow overflow-y-auto" }, be = { class: "text-fm-color-typo-secondary bg-fm-color-neutral-gray-100 px-16 py-8 border-b border-b-fm-color-neutral-gray-200" }, xe = { class: "px-16 py-8 flex-1" }, ke = { class: "py-8" }, Fe = { class: "flex gap-8 items-center justify-start" }, Ie = /* @__PURE__ */ H({
|
|
13
13
|
__name: "PrintDepartmentDialog",
|
|
14
14
|
props: {
|
|
15
15
|
categorizedItems: {
|
|
@@ -26,7 +26,7 @@ const me = { class: "fm-typo-en-title-md-600" }, pe = { class: "space-y-32" }, _
|
|
|
26
26
|
const N = v;
|
|
27
27
|
t({
|
|
28
28
|
showModal: U,
|
|
29
|
-
hideModal:
|
|
29
|
+
hideModal: V
|
|
30
30
|
});
|
|
31
31
|
function b() {
|
|
32
32
|
return {
|
|
@@ -35,15 +35,15 @@ const me = { class: "fm-typo-en-title-md-600" }, pe = { class: "space-y-32" }, _
|
|
|
35
35
|
applyToItems: []
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
|
-
const x =
|
|
38
|
+
const x = T(!1), M = T(void 0);
|
|
39
39
|
function U(r) {
|
|
40
40
|
M.value = r ? j(r) : b(), n.value = j(M.value), x.value = !0;
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function V() {
|
|
43
43
|
x.value = !1;
|
|
44
44
|
}
|
|
45
|
-
const n =
|
|
46
|
-
function
|
|
45
|
+
const n = T(b());
|
|
46
|
+
function k({ items: r }) {
|
|
47
47
|
n.value = {
|
|
48
48
|
...n.value,
|
|
49
49
|
applyToItems: r.map((a) => a._id)
|
|
@@ -55,31 +55,27 @@ const me = { class: "fm-typo-en-title-md-600" }, pe = { class: "space-y-32" }, _
|
|
|
55
55
|
applyToItems: n.value.applyToItems.filter((a) => a !== r)
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
|
-
const { t: u } = Q(), O = f(() => n.value._id ? u("menu.print_route.department_dialog.update.title") : u("menu.print_route.department_dialog.add.title")),
|
|
58
|
+
const { t: u } = Q(), O = f(() => n.value._id ? u("menu.print_route.department_dialog.update.title") : u("menu.print_route.department_dialog.add.title")), F = f(() => n.value._id ? u("menu.print_route.department_dialog.update.action") : u("menu.print_route.department_dialog.add.action")), D = f(() => n.value.applyToItems.length), K = f(
|
|
59
59
|
() => n.value.applyToItems.reduce((r, a) => (r[a] = [], r), {})
|
|
60
|
-
), e =
|
|
60
|
+
), e = T(""), o = f(() => {
|
|
61
61
|
const r = e.value.toLowerCase();
|
|
62
62
|
return N.categorizedItems.reduce((a, d) => {
|
|
63
63
|
const z = d.items.filter(
|
|
64
|
-
(
|
|
64
|
+
(I) => (!r || I.name.toLowerCase().includes(r)) && !!K.value[I._id]
|
|
65
65
|
);
|
|
66
66
|
return z.length && a.push({ ...d, items: z }), a;
|
|
67
67
|
}, []);
|
|
68
|
-
})
|
|
69
|
-
|
|
70
|
-
const y = h;
|
|
71
|
-
k();
|
|
72
|
-
const E = ie(
|
|
73
|
-
() => !ae.isEqual(M.value, n.value),
|
|
68
|
+
}), y = h, w = ue(
|
|
69
|
+
() => !le.isEqual(M.value, n.value),
|
|
74
70
|
() => {
|
|
75
71
|
x.value = !1;
|
|
76
72
|
}
|
|
77
73
|
);
|
|
78
|
-
function
|
|
79
|
-
|
|
74
|
+
function E() {
|
|
75
|
+
V(), y("onSave", n.value);
|
|
80
76
|
}
|
|
81
77
|
return (r, a) => {
|
|
82
|
-
const d = g("FmTextField"), z = g("FmSpacer"),
|
|
78
|
+
const d = g("FmTextField"), z = g("FmSpacer"), I = g("FmButton"), X = g("FmSearch"), Z = g("FmSideSheet");
|
|
83
79
|
return p(), P(Z, {
|
|
84
80
|
modelValue: x.value,
|
|
85
81
|
"onUpdate:modelValue": a[3] || (a[3] = (s) => x.value = s),
|
|
@@ -87,33 +83,33 @@ const me = { class: "fm-typo-en-title-md-600" }, pe = { class: "space-y-32" }, _
|
|
|
87
83
|
"max-width": 560,
|
|
88
84
|
"is-container": l(W).FmForm,
|
|
89
85
|
"is-container-props": {
|
|
90
|
-
onValidationSuccess:
|
|
86
|
+
onValidationSuccess: E,
|
|
91
87
|
blameFormChildOnValidationFailed: !0,
|
|
92
88
|
class: "flex flex-col h-full"
|
|
93
89
|
},
|
|
94
|
-
"onOn:clickedAway": l(
|
|
90
|
+
"onOn:clickedAway": l(w)
|
|
95
91
|
}, {
|
|
96
92
|
"side-sheet-header": m(() => [
|
|
97
|
-
i("span",
|
|
93
|
+
i("span", pe, S(O.value), 1)
|
|
98
94
|
]),
|
|
99
95
|
"side-sheet-footer": m(() => [
|
|
100
96
|
i("div", Fe, [
|
|
101
|
-
c(
|
|
102
|
-
label:
|
|
97
|
+
c(I, {
|
|
98
|
+
label: F.value,
|
|
103
99
|
size: "lg",
|
|
104
100
|
variant: "primary",
|
|
105
101
|
type: "submit"
|
|
106
102
|
}, null, 8, ["label"]),
|
|
107
|
-
c(
|
|
103
|
+
c(I, {
|
|
108
104
|
label: l(u)("menu.print_route.department_dialog.actions.cancel"),
|
|
109
105
|
size: "lg",
|
|
110
106
|
variant: "tertiary",
|
|
111
|
-
onClick:
|
|
107
|
+
onClick: V
|
|
112
108
|
}, null, 8, ["label"])
|
|
113
109
|
])
|
|
114
110
|
]),
|
|
115
111
|
default: m(() => [
|
|
116
|
-
i("div",
|
|
112
|
+
i("div", _e, [
|
|
117
113
|
c(G, {
|
|
118
114
|
title: l(u)("menu.print_route.department_dialog.sections.route_detail.title")
|
|
119
115
|
}, {
|
|
@@ -137,15 +133,15 @@ const me = { class: "fm-typo-en-title-md-600" }, pe = { class: "space-y-32" }, _
|
|
|
137
133
|
}, {
|
|
138
134
|
"append-title": m(() => [
|
|
139
135
|
c(z),
|
|
140
|
-
c(
|
|
136
|
+
c(de, {
|
|
141
137
|
"categorized-items": v.categorizedItems,
|
|
142
138
|
"initial-value": n.value.applyToItems.map((s) => ({
|
|
143
139
|
_id: s
|
|
144
140
|
})),
|
|
145
|
-
onSubmit: a[1] || (a[1] = (s) =>
|
|
141
|
+
onSubmit: a[1] || (a[1] = (s) => k(s))
|
|
146
142
|
}, {
|
|
147
143
|
default: m(({ trigger: s }) => [
|
|
148
|
-
c(
|
|
144
|
+
c(I, {
|
|
149
145
|
icon: "link",
|
|
150
146
|
label: l(u)("menu.scheduler.dialog.sections.products.link"),
|
|
151
147
|
variant: "secondary",
|
|
@@ -158,12 +154,12 @@ const me = { class: "fm-typo-en-title-md-600" }, pe = { class: "space-y-32" }, _
|
|
|
158
154
|
}, 8, ["categorized-items", "initial-value"])
|
|
159
155
|
]),
|
|
160
156
|
default: m(() => [
|
|
161
|
-
i("div",
|
|
162
|
-
i("div",
|
|
163
|
-
i("div",
|
|
157
|
+
i("div", fe, [
|
|
158
|
+
i("div", ve, [
|
|
159
|
+
i("div", ye, S(l(u)("menu.print_route.department_dialog.sections.link_product.products_linked", {
|
|
164
160
|
count: D.value
|
|
165
161
|
})), 1),
|
|
166
|
-
i("div",
|
|
162
|
+
i("div", ge, [
|
|
167
163
|
c(X, {
|
|
168
164
|
modelValue: e.value,
|
|
169
165
|
"onUpdate:modelValue": a[2] || (a[2] = (s) => e.value = s),
|
|
@@ -171,21 +167,26 @@ const me = { class: "fm-typo-en-title-md-600" }, pe = { class: "space-y-32" }, _
|
|
|
171
167
|
}, null, 8, ["modelValue", "placeholder"])
|
|
172
168
|
])
|
|
173
169
|
]),
|
|
174
|
-
i("div",
|
|
175
|
-
(p(!0), L(A, null,
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
170
|
+
i("div", he, [
|
|
171
|
+
(p(!0), L(A, null, B(o.value, (s, ee) => (p(), L("div", {
|
|
172
|
+
key: s.id || ee
|
|
173
|
+
}, [
|
|
174
|
+
i("div", be, S(s.name), 1),
|
|
175
|
+
(p(!0), L(A, null, B(s.items, (R) => (p(), L("div", {
|
|
176
|
+
key: R._id,
|
|
177
|
+
class: "flex items-center border-b border-b-fm-color-neutral-gray-100"
|
|
178
|
+
}, [
|
|
179
|
+
i("div", xe, S(R.name), 1),
|
|
179
180
|
i("div", ke, [
|
|
180
|
-
c(
|
|
181
|
+
c(I, {
|
|
181
182
|
icon: "delete",
|
|
182
183
|
variant: "tertiary",
|
|
183
184
|
"text-color": "neutral-gray-400",
|
|
184
|
-
onClick: () => $(
|
|
185
|
+
onClick: () => $(R._id)
|
|
185
186
|
}, null, 8, ["onClick"])
|
|
186
187
|
])
|
|
187
|
-
]))),
|
|
188
|
-
]))),
|
|
188
|
+
]))), 128))
|
|
189
|
+
]))), 128))
|
|
189
190
|
])
|
|
190
191
|
])
|
|
191
192
|
]),
|
|
@@ -200,30 +201,30 @@ const me = { class: "fm-typo-en-title-md-600" }, pe = { class: "space-y-32" }, _
|
|
|
200
201
|
});
|
|
201
202
|
function Ce(v, t) {
|
|
202
203
|
return {
|
|
203
|
-
module:
|
|
204
|
-
operation:
|
|
205
|
-
data:
|
|
204
|
+
module: C.F_MENU_MODULE_V4_KEY.enum.printDepartment,
|
|
205
|
+
operation: Y.F_OPERATION_TYPE.create,
|
|
206
|
+
data: C.FdoMenuPrintDepartment.parse(v),
|
|
206
207
|
link: t.map((h) => ({
|
|
207
|
-
module:
|
|
208
|
+
module: C.F_MENU_MODULE_V4_KEY.enum.item,
|
|
208
209
|
id: h
|
|
209
210
|
}))
|
|
210
211
|
};
|
|
211
212
|
}
|
|
212
213
|
function Ve(v, t) {
|
|
213
214
|
return {
|
|
214
|
-
module:
|
|
215
|
-
operation:
|
|
216
|
-
data:
|
|
215
|
+
module: C.F_MENU_MODULE_V4_KEY.enum.printDepartment,
|
|
216
|
+
operation: Y.F_OPERATION_TYPE.update,
|
|
217
|
+
data: C.FdoMenuPrintDepartment.parse(v),
|
|
217
218
|
link: t.map((h) => ({
|
|
218
|
-
module:
|
|
219
|
+
module: C.F_MENU_MODULE_V4_KEY.enum.item,
|
|
219
220
|
id: h
|
|
220
221
|
}))
|
|
221
222
|
};
|
|
222
223
|
}
|
|
223
224
|
function we(v) {
|
|
224
225
|
return {
|
|
225
|
-
module:
|
|
226
|
-
operation:
|
|
226
|
+
module: C.F_MENU_MODULE_V4_KEY.enum.printDepartment,
|
|
227
|
+
operation: Y.F_OPERATION_TYPE.delete,
|
|
227
228
|
data: v._id
|
|
228
229
|
};
|
|
229
230
|
}
|
|
@@ -242,13 +243,13 @@ const Ee = {
|
|
|
242
243
|
setup(v) {
|
|
243
244
|
const {
|
|
244
245
|
t
|
|
245
|
-
} = Q(), h =
|
|
246
|
+
} = Q(), h = re(), N = f(() => h.categorizedItems), b = f(() => {
|
|
246
247
|
const e = h.state.menu.modules.item;
|
|
247
248
|
return h.printDepartments.map((y) => ({
|
|
248
249
|
...y,
|
|
249
|
-
applyToItems: e.reduce((
|
|
250
|
+
applyToItems: e.reduce((w, E) => {
|
|
250
251
|
var r;
|
|
251
|
-
return (r =
|
|
252
|
+
return (r = E.print) != null && r.department.includes(y._id) && w.push(E), w;
|
|
252
253
|
}, [])
|
|
253
254
|
}), []);
|
|
254
255
|
}), x = f(() => b.value.length > 0), M = f(() => [{
|
|
@@ -288,23 +289,23 @@ const Ee = {
|
|
|
288
289
|
}]);
|
|
289
290
|
function U() {
|
|
290
291
|
var e;
|
|
291
|
-
|
|
292
|
+
k.value || (e = D.value) == null || e.showModal();
|
|
292
293
|
}
|
|
293
|
-
function
|
|
294
|
+
function V(e) {
|
|
294
295
|
var o;
|
|
295
|
-
|
|
296
|
+
k.value || (o = D.value) == null || o.showModal({
|
|
296
297
|
...e,
|
|
297
298
|
applyToItems: e.applyToItems.map(({
|
|
298
299
|
_id: y
|
|
299
300
|
}) => y)
|
|
300
301
|
});
|
|
301
302
|
}
|
|
302
|
-
const n =
|
|
303
|
+
const n = se(ie(te())), k = f(() => n.checkMenuIsLoading());
|
|
303
304
|
async function $(e) {
|
|
304
305
|
const o = e._id ? Ve(e, e.applyToItems) : Ce(e, e.applyToItems);
|
|
305
306
|
await n.updateMenu(o, e.name);
|
|
306
307
|
}
|
|
307
|
-
const u =
|
|
308
|
+
const u = oe();
|
|
308
309
|
function O(e) {
|
|
309
310
|
let o = [_("span", t("menu.print_route.dialogs.remove.message.prefix")), _("span", {
|
|
310
311
|
class: "fm-typo-en-body-lg-600"
|
|
@@ -331,19 +332,19 @@ const Ee = {
|
|
|
331
332
|
await n.updateMenu(we(e), e.name, !0);
|
|
332
333
|
});
|
|
333
334
|
}
|
|
334
|
-
const
|
|
335
|
-
if (!
|
|
336
|
-
const e =
|
|
335
|
+
const F = T(""), D = T(), K = f(() => {
|
|
336
|
+
if (!F.value) return b.value;
|
|
337
|
+
const e = F.value.toLowerCase();
|
|
337
338
|
return b.value.filter((o) => o.name.toLowerCase().includes(e));
|
|
338
339
|
});
|
|
339
340
|
return (e, o) => {
|
|
340
|
-
const y = g("FmSearch"),
|
|
341
|
-
return p(), P(
|
|
341
|
+
const y = g("FmSearch"), w = g("FmTable"), E = g("FmButton"), r = g("FmListItem"), a = g("FmList");
|
|
342
|
+
return p(), P(me, {
|
|
342
343
|
heading: l(t)("menu.print_route.title")
|
|
343
344
|
}, {
|
|
344
|
-
"append-heading": m(() => [i("div", Ee, [x.value ? (p(), P(
|
|
345
|
+
"append-heading": m(() => [i("div", Ee, [x.value ? (p(), P(ne, {
|
|
345
346
|
key: 0,
|
|
346
|
-
disabled:
|
|
347
|
+
disabled: k.value,
|
|
347
348
|
icon: "add",
|
|
348
349
|
label: l(t)("menu.print_route.actions.add"),
|
|
349
350
|
variant: "primary",
|
|
@@ -353,41 +354,41 @@ const Ee = {
|
|
|
353
354
|
key: 1
|
|
354
355
|
}, [i("div", Te, [c(y, {
|
|
355
356
|
autofocus: "",
|
|
356
|
-
modelValue:
|
|
357
|
-
"onUpdate:modelValue": o[0] || (o[0] = (d) =>
|
|
357
|
+
modelValue: F.value,
|
|
358
|
+
"onUpdate:modelValue": o[0] || (o[0] = (d) => F.value = d),
|
|
358
359
|
class: "my-8 w-[320px] xs:w-full xs:px-16",
|
|
359
360
|
placeholder: l(t)("menu.print_route.table.search.placeholder")
|
|
360
|
-
}, null, 8, ["modelValue", "placeholder"])]), c(
|
|
361
|
+
}, null, 8, ["modelValue", "placeholder"])]), c(ae, {
|
|
361
362
|
class: "xs:hidden block"
|
|
362
363
|
}, {
|
|
363
|
-
default: m(() => [c(
|
|
364
|
+
default: m(() => [c(w, {
|
|
364
365
|
"column-defs": M.value,
|
|
365
|
-
loading:
|
|
366
|
+
loading: k.value,
|
|
366
367
|
"page-size": b.value.length,
|
|
367
368
|
"row-data": b.value,
|
|
368
|
-
"search-value":
|
|
369
|
+
"search-value": F.value,
|
|
369
370
|
shrinkAt: !1,
|
|
370
371
|
"hide-footer": "",
|
|
371
372
|
"pin-header-row": "",
|
|
372
|
-
onRowClick: o[1] || (o[1] = (d) =>
|
|
373
|
+
onRowClick: o[1] || (o[1] = (d) => V(d.original))
|
|
373
374
|
}, null, 8, ["column-defs", "loading", "page-size", "row-data", "search-value"])]),
|
|
374
375
|
_: 1
|
|
375
376
|
}), c(a, {
|
|
376
377
|
class: "w-full px-16 xs:block hidden flex-1 min-h-0 overflow-scroll pb-64",
|
|
377
378
|
separator: ""
|
|
378
379
|
}, {
|
|
379
|
-
default: m(() => [(p(!0), L(A, null,
|
|
380
|
+
default: m(() => [(p(!0), L(A, null, B(K.value, (d) => (p(), P(r, {
|
|
380
381
|
key: d._id,
|
|
381
382
|
label: d.name,
|
|
382
383
|
style: {
|
|
383
384
|
padding: "12px 0 !important"
|
|
384
385
|
},
|
|
385
|
-
onClick: () =>
|
|
386
|
+
onClick: () => V(d)
|
|
386
387
|
}, {
|
|
387
388
|
default: m(() => [i("div", Pe, [i("div", Se, S(d.name), 1), i("div", Le, S(l(t)("menu.print_route.table.mobile.products_linked", {
|
|
388
389
|
count: d.applyToItems.length
|
|
389
|
-
})), 1)]), c(
|
|
390
|
-
disabled:
|
|
390
|
+
})), 1)]), c(E, {
|
|
391
|
+
disabled: k.value,
|
|
391
392
|
icon: "delete",
|
|
392
393
|
variant: "tertiary",
|
|
393
394
|
"text-color": "neutral-gray-400",
|
|
@@ -396,7 +397,7 @@ const Ee = {
|
|
|
396
397
|
_: 2
|
|
397
398
|
}, 1032, ["label", "onClick"]))), 128))]),
|
|
398
399
|
_: 1
|
|
399
|
-
})], 64)) : (p(), P(l(
|
|
400
|
+
})], 64)) : (p(), P(l(ce), {
|
|
400
401
|
key: 0,
|
|
401
402
|
action: {
|
|
402
403
|
text: l(t)("menu.print_route.empty.action"),
|