@feedmepos/mf-menu 0.32.25-dev → 0.32.26-dev
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-oBJtlZZ-.js → App-C-68S5Js.js} +5 -5
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-CFRqNwMm.js → ApplyProduct.vue_vue_type_script_setup_true_lang-DMwcLrWU.js} +3 -3
- package/dist/{Catalog-X6QeStHF.js → Catalog-CJNoCcJq.js} +6 -6
- package/dist/{Category-CQ_F51om.js → Category-BgQDNQaR.js} +6 -6
- package/dist/{Category-BHCqHC6_.js → Category-DnqxVJn8.js} +4 -4
- package/dist/CookingGuide-B5pjN87U.js +897 -0
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-27kAtFHA.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-BooPj25p.js} +1 -1
- package/dist/{Group-C17RhtoU.js → Group-BO1A67ji.js} +3 -3
- package/dist/{Group-CWqVRWu_.js → Group-DUivSad8.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-KgrTRiaw.js → Group.vue_vue_type_script_setup_true_lang-B6xJGpxN.js} +8 -8
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-Bw9a1p80.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CFYWGtSE.js} +5 -5
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-C8T16h_U.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-BlQWRtnv.js} +6 -6
- package/dist/{Ingredient-BqFjj0Xf.js → Ingredient-trCkZCeu.js} +3 -3
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-CW301d2i.js → InventoryBinding.vue_vue_type_script_setup_true_lang-DS3zWi74.js} +2 -2
- package/dist/{LinkProductSideSheet-BMSjNF-X.js → LinkProductSideSheet-Cv2q4tn-.js} +3 -3
- package/dist/{MenuSetting-BP_PDUER.js → MenuSetting-BQ8jYr9A.js} +5 -5
- package/dist/PrintRoute-DYzgLPeM.js +421 -0
- package/dist/{Product-puUjkbSq.js → Product-YBV2jbhH.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-Dp7a5bRf.js → Product.vue_vue_type_script_setup_true_lang-D0ckjZbT.js} +12 -12
- package/dist/{ProductInternalTools-VKGI7Fzy.js → ProductInternalTools-V-mxz1J7.js} +5 -5
- package/dist/{Products-BP6XXI57.js → Products-B7JQD1yy.js} +31 -31
- package/dist/{Publish-BDEbXjcu.js → Publish-DDWi1SeO.js} +3 -3
- package/dist/{Recipe-IvNkA5o_.js → Recipe-DM7HKIjo.js} +4 -4
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-D24M0F3F.js → RuleView.vue_vue_type_script_setup_true_lang-DyVE6RAn.js} +2 -2
- package/dist/{Scheduler-BV-sG3U0.js → Scheduler-BaYFidwx.js} +46 -48
- package/dist/{ServingSequence-Dy32GBOv.js → ServingSequence-CL93hjdN.js} +3 -3
- package/dist/{Setting-2hEKNRPz.js → Setting-krD-ZEzt.js} +5 -5
- package/dist/{Subcategory-CA11HBJX.js → Subcategory-Cf1QJNLz.js} +4 -4
- package/dist/{Takeaway-ds24Rc3p.js → Takeaway-4RIqxERJ.js} +1 -1
- package/dist/{Takeaway-8W2PJMhc.js → Takeaway-CPT2x245.js} +4 -4
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-BSyiOhP3.js → Takeaway.vue_vue_type_script_setup_true_lang-CZsGRbj4.js} +5 -5
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-CXQa2QSR.js → Thumbnail.vue_vue_type_script_setup_true_lang-De5ZxLui.js} +4 -4
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-rI6agknT.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BM8B116x.js} +13 -13
- package/dist/{Unit-CFs9Bypt.js → Unit-CBU2yeBv.js} +2 -2
- package/dist/{Variant-BeBI3fwC.js → Variant-CaiofLVX.js} +3 -3
- package/dist/{_id_-DEN0fizp.js → _id_-C9cH5P4C.js} +9 -9
- package/dist/{app-BkrpZ1F6.js → app-C6OAbEST.js} +1 -1
- package/dist/{app-DXTOSCE8.js → app-dr4L7s0e.js} +26 -26
- package/dist/app.js +1 -1
- package/dist/assets/{linked-status-DT4GsKB9.js → linked-status-kqf9YF01.js} +2 -2
- package/dist/assets/{menu-export-DFMvZ9lh.js → menu-export-DaWjS0T5.js} +2 -2
- package/dist/assets/{override-menu-C-1OWgCr.js → override-menu-C3QQvMx-.js} +2 -2
- package/dist/assets/{validate-menu-C5aog612.js → validate-menu-DPyw2109.js} +2 -2
- package/dist/{catalog-ClDJiP0g.js → catalog-Cuz7ZRmB.js} +1 -1
- package/dist/{catalogSetting-DFOIszZw.js → catalogSetting-DJFNv3uY.js} +1 -1
- package/dist/{category-iVQCtSHT.js → category-Bam0rQG0.js} +1 -1
- package/dist/{currency-BK-5iUrj.js → currency-BlnPQEjW.js} +1 -1
- package/dist/{dayjs.min-BRGHPywQ.js → dayjs.min-DJ9q1L6q.js} +1 -1
- package/dist/{index-CIrQEHaA.js → index-BRj2qZrI.js} +1 -1
- package/dist/{index-D3j5gcJd.js → index-DTYy_WLk.js} +4 -4
- package/dist/{index-Bgxpsz4y.js → index-gGr9vxGG.js} +3 -3
- package/dist/{index.vue_vue_type_script_setup_true_lang-Bl5gVHZN.js → index.vue_vue_type_script_setup_true_lang-CN4VSfTe.js} +4 -4
- package/dist/{item-qo4jr-BY.js → item-DCswFfZ7.js} +1524 -1529
- package/dist/{jszip.min-CE-l7St7.js → jszip.min-CDVcb3V1.js} +2 -2
- package/dist/{menu-Chjaib3T.js → menu-OwE_CglC.js} +1 -1
- package/dist/{menuV2-D5wN00Wx.js → menuV2-DNKAeMnl.js} +90 -90
- package/dist/{priceTier-B-jiVm5I.js → priceTier-BFqnCFgL.js} +1 -1
- package/dist/{scheduler-aFOgeFS0.js → scheduler-BvI0Ikm5.js} +4 -4
- package/dist/{subcategory-UKvVvM-z.js → subcategory-BVFmNnWI.js} +2 -2
- package/dist/{toExcel-BPzszwzN.js → toExcel-BHGmkWkY.js} +2 -2
- package/dist/{unit-DIRVLvnx.js → unit-Ft62NFNs.js} +2 -2
- package/package.json +1 -1
- package/dist/CookingGuide-DnSW4CJb.js +0 -896
- package/dist/PrintRoute-l4v-zJrc.js +0 -420
|
@@ -1,420 +0,0 @@
|
|
|
1
|
-
import { defineComponent as J, 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 Q, toDisplayString as S, createElementBlock as L, Fragment as A, renderList as B, h as _, withModifiers as q } from "vue";
|
|
2
|
-
import { useI18n as H } from "@feedmepos/mf-common";
|
|
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-DXTOSCE8.js";
|
|
6
|
-
import { I as j, J as le, M as Y, A as C, u as re, Q as se, G as ie, a5 as ue } from "./index.vue_vue_type_script_setup_true_lang-Bl5gVHZN.js";
|
|
7
|
-
import { _ as G } from "./RuleView.vue_vue_type_script_setup_true_lang-D24M0F3F.js";
|
|
8
|
-
import { u as de } from "./discardConfirm-BHni0LNu.js";
|
|
9
|
-
import { L as ce } from "./LinkProductSideSheet-BMSjNF-X.js";
|
|
10
|
-
import { _ as me } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
11
|
-
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__ */ J({
|
|
12
|
-
__name: "PrintDepartmentDialog",
|
|
13
|
-
props: {
|
|
14
|
-
categorizedItems: {
|
|
15
|
-
type: Array,
|
|
16
|
-
required: !0
|
|
17
|
-
},
|
|
18
|
-
canApplyItems: {
|
|
19
|
-
type: Boolean,
|
|
20
|
-
default: !0
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
emits: ["onSave"],
|
|
24
|
-
setup(v, { expose: t, emit: h }) {
|
|
25
|
-
const N = v;
|
|
26
|
-
t({
|
|
27
|
-
showModal: z,
|
|
28
|
-
hideModal: V
|
|
29
|
-
});
|
|
30
|
-
function b() {
|
|
31
|
-
return {
|
|
32
|
-
_id: "",
|
|
33
|
-
name: "",
|
|
34
|
-
applyToItems: []
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
const x = T(!1), M = T(void 0);
|
|
38
|
-
function z(r) {
|
|
39
|
-
M.value = r ? j(r) : b(), n.value = j(M.value), x.value = !0;
|
|
40
|
-
}
|
|
41
|
-
function V() {
|
|
42
|
-
x.value = !1;
|
|
43
|
-
}
|
|
44
|
-
const n = T(b());
|
|
45
|
-
function k({ items: r }) {
|
|
46
|
-
n.value = {
|
|
47
|
-
...n.value,
|
|
48
|
-
applyToItems: r.map((a) => a._id)
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
function $(r) {
|
|
52
|
-
n.value = {
|
|
53
|
-
...n.value,
|
|
54
|
-
applyToItems: n.value.applyToItems.filter((a) => a !== r)
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
const { t: u } = H(), 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")), U = f(() => n.value.applyToItems.length), K = f(
|
|
58
|
-
() => n.value.applyToItems.reduce((r, a) => (r[a] = [], r), {})
|
|
59
|
-
), e = T(""), o = f(() => {
|
|
60
|
-
const r = e.value.toLowerCase();
|
|
61
|
-
return N.categorizedItems.reduce((a, d) => {
|
|
62
|
-
const D = d.items.filter(
|
|
63
|
-
(I) => (!r || I.name.toLowerCase().includes(r)) && !!K.value[I._id]
|
|
64
|
-
);
|
|
65
|
-
return D.length && a.push({ ...d, items: D }), a;
|
|
66
|
-
}, []);
|
|
67
|
-
}), y = h, w = de(
|
|
68
|
-
() => !le.isEqual(M.value, n.value),
|
|
69
|
-
() => {
|
|
70
|
-
x.value = !1;
|
|
71
|
-
}
|
|
72
|
-
);
|
|
73
|
-
function E() {
|
|
74
|
-
V(), y("onSave", n.value);
|
|
75
|
-
}
|
|
76
|
-
return (r, a) => {
|
|
77
|
-
const d = g("FmTextField"), D = g("FmSpacer"), I = g("FmButton"), X = g("FmSearch"), Z = g("FmSideSheet");
|
|
78
|
-
return p(), P(Z, {
|
|
79
|
-
modelValue: x.value,
|
|
80
|
-
"onUpdate:modelValue": a[3] || (a[3] = (s) => x.value = s),
|
|
81
|
-
header: O.value,
|
|
82
|
-
"max-width": 560,
|
|
83
|
-
"is-container": l(W).FmForm,
|
|
84
|
-
"is-container-props": {
|
|
85
|
-
onValidationSuccess: E,
|
|
86
|
-
blameFormChildOnValidationFailed: !0,
|
|
87
|
-
class: "flex flex-col h-full"
|
|
88
|
-
},
|
|
89
|
-
"onOn:clickedAway": l(w)
|
|
90
|
-
}, {
|
|
91
|
-
"side-sheet-header": m(() => [
|
|
92
|
-
i("span", pe, S(O.value), 1)
|
|
93
|
-
]),
|
|
94
|
-
"side-sheet-footer": m(() => [
|
|
95
|
-
i("div", Fe, [
|
|
96
|
-
c(I, {
|
|
97
|
-
label: F.value,
|
|
98
|
-
size: "lg",
|
|
99
|
-
variant: "primary",
|
|
100
|
-
type: "submit"
|
|
101
|
-
}, null, 8, ["label"]),
|
|
102
|
-
c(I, {
|
|
103
|
-
label: l(u)("menu.print_route.department_dialog.actions.cancel"),
|
|
104
|
-
size: "lg",
|
|
105
|
-
variant: "tertiary",
|
|
106
|
-
onClick: V
|
|
107
|
-
}, null, 8, ["label"])
|
|
108
|
-
])
|
|
109
|
-
]),
|
|
110
|
-
default: m(() => [
|
|
111
|
-
i("div", _e, [
|
|
112
|
-
c(G, {
|
|
113
|
-
title: l(u)("menu.print_route.department_dialog.sections.route_detail.title")
|
|
114
|
-
}, {
|
|
115
|
-
default: m(() => [
|
|
116
|
-
c(d, {
|
|
117
|
-
autofocus: "",
|
|
118
|
-
modelValue: n.value.name,
|
|
119
|
-
"onUpdate:modelValue": a[0] || (a[0] = (s) => n.value.name = s),
|
|
120
|
-
rules: [
|
|
121
|
-
(s) => !!s || l(u)("menu.print_route.department_dialog.sections.route_detail.name.required")
|
|
122
|
-
],
|
|
123
|
-
label: l(u)("menu.print_route.department_dialog.sections.route_detail.name.label"),
|
|
124
|
-
placeholder: l(u)("menu.print_route.department_dialog.sections.route_detail.name.placeholder")
|
|
125
|
-
}, null, 8, ["modelValue", "rules", "label", "placeholder"])
|
|
126
|
-
]),
|
|
127
|
-
_: 1
|
|
128
|
-
}, 8, ["title"]),
|
|
129
|
-
v.canApplyItems ? (p(), P(G, {
|
|
130
|
-
key: 0,
|
|
131
|
-
title: l(u)("menu.print_route.department_dialog.sections.link_product.title")
|
|
132
|
-
}, {
|
|
133
|
-
"append-title": m(() => [
|
|
134
|
-
c(D),
|
|
135
|
-
c(ce, {
|
|
136
|
-
"categorized-items": v.categorizedItems,
|
|
137
|
-
"initial-value": n.value.applyToItems.map((s) => ({
|
|
138
|
-
_id: s
|
|
139
|
-
})),
|
|
140
|
-
onSubmit: a[1] || (a[1] = (s) => k(s))
|
|
141
|
-
}, {
|
|
142
|
-
default: m(({ trigger: s }) => [
|
|
143
|
-
c(I, {
|
|
144
|
-
icon: "link",
|
|
145
|
-
label: l(u)("menu.scheduler.dialog.sections.products.link"),
|
|
146
|
-
variant: "secondary",
|
|
147
|
-
"text-color": "primary",
|
|
148
|
-
"border-color": "primary",
|
|
149
|
-
onClick: s
|
|
150
|
-
}, null, 8, ["label", "onClick"])
|
|
151
|
-
]),
|
|
152
|
-
_: 1
|
|
153
|
-
}, 8, ["categorized-items", "initial-value"])
|
|
154
|
-
]),
|
|
155
|
-
default: m(() => [
|
|
156
|
-
i("div", fe, [
|
|
157
|
-
i("div", ve, [
|
|
158
|
-
i("div", ye, S(l(u)("menu.print_route.department_dialog.sections.link_product.products_linked", {
|
|
159
|
-
count: U.value
|
|
160
|
-
})), 1),
|
|
161
|
-
i("div", ge, [
|
|
162
|
-
c(X, {
|
|
163
|
-
modelValue: e.value,
|
|
164
|
-
"onUpdate:modelValue": a[2] || (a[2] = (s) => e.value = s),
|
|
165
|
-
placeholder: l(u)("menu.print_route.department_dialog.sections.link_product.search")
|
|
166
|
-
}, null, 8, ["modelValue", "placeholder"])
|
|
167
|
-
])
|
|
168
|
-
]),
|
|
169
|
-
i("div", he, [
|
|
170
|
-
(p(!0), L(A, null, B(o.value, (s, ee) => (p(), L("div", {
|
|
171
|
-
key: s.id || ee
|
|
172
|
-
}, [
|
|
173
|
-
i("div", be, S(s.name), 1),
|
|
174
|
-
(p(!0), L(A, null, B(s.items, (R) => (p(), L("div", {
|
|
175
|
-
key: R._id,
|
|
176
|
-
class: "flex items-center border-b border-b-fm-color-neutral-gray-100"
|
|
177
|
-
}, [
|
|
178
|
-
i("div", xe, S(R.name), 1),
|
|
179
|
-
i("div", ke, [
|
|
180
|
-
c(I, {
|
|
181
|
-
icon: "delete",
|
|
182
|
-
variant: "tertiary",
|
|
183
|
-
"text-color": "neutral-gray-400",
|
|
184
|
-
onClick: () => $(R._id)
|
|
185
|
-
}, null, 8, ["onClick"])
|
|
186
|
-
])
|
|
187
|
-
]))), 128))
|
|
188
|
-
]))), 128))
|
|
189
|
-
])
|
|
190
|
-
])
|
|
191
|
-
]),
|
|
192
|
-
_: 1
|
|
193
|
-
}, 8, ["title"])) : Q("", !0)
|
|
194
|
-
])
|
|
195
|
-
]),
|
|
196
|
-
_: 1
|
|
197
|
-
}, 8, ["modelValue", "header", "is-container", "is-container-props", "onOn:clickedAway"]);
|
|
198
|
-
};
|
|
199
|
-
}
|
|
200
|
-
});
|
|
201
|
-
function Ce(v, t) {
|
|
202
|
-
return {
|
|
203
|
-
module: C.F_MENU_MODULE_V4_KEY.enum.printDepartment,
|
|
204
|
-
operation: Y.F_OPERATION_TYPE.create,
|
|
205
|
-
data: C.FdoMenuPrintDepartment.parse(v),
|
|
206
|
-
link: t.map((h) => ({
|
|
207
|
-
module: C.F_MENU_MODULE_V4_KEY.enum.item,
|
|
208
|
-
id: h
|
|
209
|
-
}))
|
|
210
|
-
};
|
|
211
|
-
}
|
|
212
|
-
function Ve(v, t) {
|
|
213
|
-
return {
|
|
214
|
-
module: C.F_MENU_MODULE_V4_KEY.enum.printDepartment,
|
|
215
|
-
operation: Y.F_OPERATION_TYPE.update,
|
|
216
|
-
data: C.FdoMenuPrintDepartment.parse(v),
|
|
217
|
-
link: t.map((h) => ({
|
|
218
|
-
module: C.F_MENU_MODULE_V4_KEY.enum.item,
|
|
219
|
-
id: h
|
|
220
|
-
}))
|
|
221
|
-
};
|
|
222
|
-
}
|
|
223
|
-
function we(v) {
|
|
224
|
-
return {
|
|
225
|
-
module: C.F_MENU_MODULE_V4_KEY.enum.printDepartment,
|
|
226
|
-
operation: Y.F_OPERATION_TYPE.delete,
|
|
227
|
-
data: v._id
|
|
228
|
-
};
|
|
229
|
-
}
|
|
230
|
-
const Ee = {
|
|
231
|
-
class: "flex flex-1 justify-end"
|
|
232
|
-
}, Te = {
|
|
233
|
-
class: "flex justify-end items-center"
|
|
234
|
-
}, Pe = {
|
|
235
|
-
class: "grow space-y-4"
|
|
236
|
-
}, Se = {
|
|
237
|
-
class: "fm-typo-en-body-lg-600"
|
|
238
|
-
}, Le = {
|
|
239
|
-
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
240
|
-
}, Be = /* @__PURE__ */ J({
|
|
241
|
-
__name: "PrintRoute",
|
|
242
|
-
setup(v) {
|
|
243
|
-
const {
|
|
244
|
-
t
|
|
245
|
-
} = H(), h = re(), N = f(() => h.categorizedItems), b = f(() => {
|
|
246
|
-
const e = h.state.menu.modules.item;
|
|
247
|
-
return h.printDepartments.map((y) => ({
|
|
248
|
-
...y,
|
|
249
|
-
applyToItems: e.reduce((w, E) => {
|
|
250
|
-
var r;
|
|
251
|
-
return (r = E.print) != null && r.department.includes(y._id) && w.push(E), w;
|
|
252
|
-
}, [])
|
|
253
|
-
}), []);
|
|
254
|
-
}), x = f(() => b.value.length > 0), M = f(() => [{
|
|
255
|
-
accessorKey: "name",
|
|
256
|
-
header: () => t("menu.print_route.table.columns.name"),
|
|
257
|
-
cell: (e) => e.getValue(),
|
|
258
|
-
enableSorting: !1
|
|
259
|
-
}, {
|
|
260
|
-
accessorKey: "applyToItems",
|
|
261
|
-
header: () => t("menu.print_route.table.columns.products"),
|
|
262
|
-
cell: (e) => {
|
|
263
|
-
const o = e.getValue();
|
|
264
|
-
return t("menu.print_route.table.columns.products_count", {
|
|
265
|
-
count: o.length
|
|
266
|
-
});
|
|
267
|
-
},
|
|
268
|
-
enableSorting: !1
|
|
269
|
-
}, {
|
|
270
|
-
accessorKey: "_id",
|
|
271
|
-
header: "",
|
|
272
|
-
size: 52,
|
|
273
|
-
meta: {
|
|
274
|
-
cellClass: "pl-16",
|
|
275
|
-
headerContentClass: "-mx-16"
|
|
276
|
-
},
|
|
277
|
-
enableSorting: !1,
|
|
278
|
-
cell: (e) => _("div", {
|
|
279
|
-
class: "flex justify-end"
|
|
280
|
-
}, [_(W.FmButton, {
|
|
281
|
-
icon: "delete",
|
|
282
|
-
textColor: "neutral-gray-400",
|
|
283
|
-
variant: "tertiary",
|
|
284
|
-
onClick: q(() => {
|
|
285
|
-
O(e.row.original);
|
|
286
|
-
}, ["stop", "prevent"])
|
|
287
|
-
})])
|
|
288
|
-
}]);
|
|
289
|
-
function z() {
|
|
290
|
-
var e;
|
|
291
|
-
k.value || (e = U.value) == null || e.showModal();
|
|
292
|
-
}
|
|
293
|
-
function V(e) {
|
|
294
|
-
var o;
|
|
295
|
-
k.value || (o = U.value) == null || o.showModal({
|
|
296
|
-
...e,
|
|
297
|
-
applyToItems: e.applyToItems.map(({
|
|
298
|
-
_id: y
|
|
299
|
-
}) => y)
|
|
300
|
-
});
|
|
301
|
-
}
|
|
302
|
-
const n = se(ie(te())), k = f(() => n.checkMenuIsLoading());
|
|
303
|
-
async function $(e) {
|
|
304
|
-
const o = e._id ? Ve(e, e.applyToItems) : Ce(e, e.applyToItems);
|
|
305
|
-
await n.updateMenu(o, e.name);
|
|
306
|
-
}
|
|
307
|
-
const u = oe();
|
|
308
|
-
function O(e) {
|
|
309
|
-
let o = [_("span", t("menu.print_route.dialogs.remove.message.prefix")), _("span", {
|
|
310
|
-
class: "fm-typo-en-body-lg-600"
|
|
311
|
-
}, e.name), _("span", "?")];
|
|
312
|
-
e.applyToItems.length && (o = [_("span", t("menu.print_route.dialogs.remove.message.products_using")), _("span", {
|
|
313
|
-
class: "fm-typo-en-body-lg-600"
|
|
314
|
-
}, e.applyToItems.length), _("span", t("menu.print_route.dialogs.remove.message.products_count")), ...o, _("div", {
|
|
315
|
-
class: "mt-8 fm-typo-en-body-md-400"
|
|
316
|
-
}, e.applyToItems.map((y) => _("li", {
|
|
317
|
-
class: "mt-4"
|
|
318
|
-
}, y.name)))]), u.open({
|
|
319
|
-
title: t("menu.print_route.dialogs.remove.title"),
|
|
320
|
-
contentComponent: _("div", o),
|
|
321
|
-
primaryActions: {
|
|
322
|
-
text: t("menu.print_route.actions.remove"),
|
|
323
|
-
close: !0,
|
|
324
|
-
variant: "destructive"
|
|
325
|
-
},
|
|
326
|
-
secondaryActions: {
|
|
327
|
-
text: t("menu.print_route.actions.cancel"),
|
|
328
|
-
close: !0
|
|
329
|
-
}
|
|
330
|
-
}).onPrimary(async () => {
|
|
331
|
-
await n.updateMenu(we(e), e.name, !0);
|
|
332
|
-
});
|
|
333
|
-
}
|
|
334
|
-
const F = T(""), U = T(), K = f(() => {
|
|
335
|
-
if (!F.value) return b.value;
|
|
336
|
-
const e = F.value.toLowerCase();
|
|
337
|
-
return b.value.filter((o) => o.name.toLowerCase().includes(e));
|
|
338
|
-
});
|
|
339
|
-
return (e, o) => {
|
|
340
|
-
const y = g("FmSearch"), w = g("FmTable"), E = g("FmButton"), r = g("FmListItem"), a = g("FmList");
|
|
341
|
-
return p(), P(me, {
|
|
342
|
-
heading: l(t)("menu.print_route.title")
|
|
343
|
-
}, {
|
|
344
|
-
"append-heading": m(() => [i("div", Ee, [x.value ? (p(), P(ne, {
|
|
345
|
-
key: 0,
|
|
346
|
-
disabled: k.value,
|
|
347
|
-
icon: "add",
|
|
348
|
-
label: l(t)("menu.print_route.actions.add"),
|
|
349
|
-
variant: "primary",
|
|
350
|
-
onClick: z
|
|
351
|
-
}, null, 8, ["disabled", "label"])) : Q("", !0)])]),
|
|
352
|
-
default: m(() => [x.value ? (p(), L(A, {
|
|
353
|
-
key: 1
|
|
354
|
-
}, [i("div", Te, [c(y, {
|
|
355
|
-
autofocus: "",
|
|
356
|
-
modelValue: F.value,
|
|
357
|
-
"onUpdate:modelValue": o[0] || (o[0] = (d) => F.value = d),
|
|
358
|
-
class: "my-8 w-[320px] xs:w-full xs:px-16",
|
|
359
|
-
placeholder: l(t)("menu.print_route.table.search.placeholder")
|
|
360
|
-
}, null, 8, ["modelValue", "placeholder"])]), c(ae, {
|
|
361
|
-
class: "xs:hidden block"
|
|
362
|
-
}, {
|
|
363
|
-
default: m(() => [c(w, {
|
|
364
|
-
"column-defs": M.value,
|
|
365
|
-
loading: k.value,
|
|
366
|
-
"page-size": b.value.length,
|
|
367
|
-
"row-data": b.value,
|
|
368
|
-
"search-value": F.value,
|
|
369
|
-
shrinkAt: !1,
|
|
370
|
-
"hide-footer": "",
|
|
371
|
-
"pin-header-row": "",
|
|
372
|
-
onRowClick: o[1] || (o[1] = (d) => V(d.original))
|
|
373
|
-
}, null, 8, ["column-defs", "loading", "page-size", "row-data", "search-value"])]),
|
|
374
|
-
_: 1
|
|
375
|
-
}), c(a, {
|
|
376
|
-
class: "w-full px-16 xs:block sm:hidden flex-1 min-h-0 overflow-scroll pb-64",
|
|
377
|
-
separator: ""
|
|
378
|
-
}, {
|
|
379
|
-
default: m(() => [(p(!0), L(A, null, B(K.value, (d) => (p(), P(r, {
|
|
380
|
-
key: d._id,
|
|
381
|
-
label: d.name,
|
|
382
|
-
style: {
|
|
383
|
-
padding: "12px 0 !important"
|
|
384
|
-
},
|
|
385
|
-
onClick: () => V(d)
|
|
386
|
-
}, {
|
|
387
|
-
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
|
-
count: d.applyToItems.length
|
|
389
|
-
})), 1)]), c(E, {
|
|
390
|
-
disabled: k.value,
|
|
391
|
-
icon: "delete",
|
|
392
|
-
variant: "tertiary",
|
|
393
|
-
"text-color": "neutral-gray-400",
|
|
394
|
-
onClick: q(() => O(d), ["stop"])
|
|
395
|
-
}, null, 8, ["disabled", "onClick"])]),
|
|
396
|
-
_: 2
|
|
397
|
-
}, 1032, ["label", "onClick"]))), 128))]),
|
|
398
|
-
_: 1
|
|
399
|
-
})], 64)) : (p(), P(l(ue), {
|
|
400
|
-
key: 0,
|
|
401
|
-
action: {
|
|
402
|
-
text: l(t)("menu.print_route.empty.action"),
|
|
403
|
-
callback: z
|
|
404
|
-
},
|
|
405
|
-
subtitle: l(t)("menu.print_route.empty.subtitle"),
|
|
406
|
-
title: l(t)("menu.print_route.empty.title")
|
|
407
|
-
}, null, 8, ["action", "subtitle", "title"])), c(Ie, {
|
|
408
|
-
ref_key: "printDepartmentRef",
|
|
409
|
-
ref: U,
|
|
410
|
-
"categorized-items": N.value,
|
|
411
|
-
onOnSave: $
|
|
412
|
-
}, null, 8, ["categorized-items"])]),
|
|
413
|
-
_: 1
|
|
414
|
-
}, 8, ["heading"]);
|
|
415
|
-
};
|
|
416
|
-
}
|
|
417
|
-
});
|
|
418
|
-
export {
|
|
419
|
-
Be as default
|
|
420
|
-
};
|