@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.
Files changed (64) hide show
  1. package/dist/{App-oBJtlZZ-.js → App-C-68S5Js.js} +5 -5
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-CFRqNwMm.js → ApplyProduct.vue_vue_type_script_setup_true_lang-DMwcLrWU.js} +3 -3
  3. package/dist/{Catalog-X6QeStHF.js → Catalog-CJNoCcJq.js} +6 -6
  4. package/dist/{Category-CQ_F51om.js → Category-BgQDNQaR.js} +6 -6
  5. package/dist/{Category-BHCqHC6_.js → Category-DnqxVJn8.js} +4 -4
  6. package/dist/CookingGuide-B5pjN87U.js +897 -0
  7. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-27kAtFHA.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-BooPj25p.js} +1 -1
  8. package/dist/{Group-C17RhtoU.js → Group-BO1A67ji.js} +3 -3
  9. package/dist/{Group-CWqVRWu_.js → Group-DUivSad8.js} +1 -1
  10. package/dist/{Group.vue_vue_type_script_setup_true_lang-KgrTRiaw.js → Group.vue_vue_type_script_setup_true_lang-B6xJGpxN.js} +8 -8
  11. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-Bw9a1p80.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CFYWGtSE.js} +5 -5
  12. 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
  13. package/dist/{Ingredient-BqFjj0Xf.js → Ingredient-trCkZCeu.js} +3 -3
  14. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-CW301d2i.js → InventoryBinding.vue_vue_type_script_setup_true_lang-DS3zWi74.js} +2 -2
  15. package/dist/{LinkProductSideSheet-BMSjNF-X.js → LinkProductSideSheet-Cv2q4tn-.js} +3 -3
  16. package/dist/{MenuSetting-BP_PDUER.js → MenuSetting-BQ8jYr9A.js} +5 -5
  17. package/dist/PrintRoute-DYzgLPeM.js +421 -0
  18. package/dist/{Product-puUjkbSq.js → Product-YBV2jbhH.js} +1 -1
  19. package/dist/{Product.vue_vue_type_script_setup_true_lang-Dp7a5bRf.js → Product.vue_vue_type_script_setup_true_lang-D0ckjZbT.js} +12 -12
  20. package/dist/{ProductInternalTools-VKGI7Fzy.js → ProductInternalTools-V-mxz1J7.js} +5 -5
  21. package/dist/{Products-BP6XXI57.js → Products-B7JQD1yy.js} +31 -31
  22. package/dist/{Publish-BDEbXjcu.js → Publish-DDWi1SeO.js} +3 -3
  23. package/dist/{Recipe-IvNkA5o_.js → Recipe-DM7HKIjo.js} +4 -4
  24. package/dist/{RuleView.vue_vue_type_script_setup_true_lang-D24M0F3F.js → RuleView.vue_vue_type_script_setup_true_lang-DyVE6RAn.js} +2 -2
  25. package/dist/{Scheduler-BV-sG3U0.js → Scheduler-BaYFidwx.js} +46 -48
  26. package/dist/{ServingSequence-Dy32GBOv.js → ServingSequence-CL93hjdN.js} +3 -3
  27. package/dist/{Setting-2hEKNRPz.js → Setting-krD-ZEzt.js} +5 -5
  28. package/dist/{Subcategory-CA11HBJX.js → Subcategory-Cf1QJNLz.js} +4 -4
  29. package/dist/{Takeaway-ds24Rc3p.js → Takeaway-4RIqxERJ.js} +1 -1
  30. package/dist/{Takeaway-8W2PJMhc.js → Takeaway-CPT2x245.js} +4 -4
  31. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-BSyiOhP3.js → Takeaway.vue_vue_type_script_setup_true_lang-CZsGRbj4.js} +5 -5
  32. package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-CXQa2QSR.js → Thumbnail.vue_vue_type_script_setup_true_lang-De5ZxLui.js} +4 -4
  33. package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-rI6agknT.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BM8B116x.js} +13 -13
  34. package/dist/{Unit-CFs9Bypt.js → Unit-CBU2yeBv.js} +2 -2
  35. package/dist/{Variant-BeBI3fwC.js → Variant-CaiofLVX.js} +3 -3
  36. package/dist/{_id_-DEN0fizp.js → _id_-C9cH5P4C.js} +9 -9
  37. package/dist/{app-BkrpZ1F6.js → app-C6OAbEST.js} +1 -1
  38. package/dist/{app-DXTOSCE8.js → app-dr4L7s0e.js} +26 -26
  39. package/dist/app.js +1 -1
  40. package/dist/assets/{linked-status-DT4GsKB9.js → linked-status-kqf9YF01.js} +2 -2
  41. package/dist/assets/{menu-export-DFMvZ9lh.js → menu-export-DaWjS0T5.js} +2 -2
  42. package/dist/assets/{override-menu-C-1OWgCr.js → override-menu-C3QQvMx-.js} +2 -2
  43. package/dist/assets/{validate-menu-C5aog612.js → validate-menu-DPyw2109.js} +2 -2
  44. package/dist/{catalog-ClDJiP0g.js → catalog-Cuz7ZRmB.js} +1 -1
  45. package/dist/{catalogSetting-DFOIszZw.js → catalogSetting-DJFNv3uY.js} +1 -1
  46. package/dist/{category-iVQCtSHT.js → category-Bam0rQG0.js} +1 -1
  47. package/dist/{currency-BK-5iUrj.js → currency-BlnPQEjW.js} +1 -1
  48. package/dist/{dayjs.min-BRGHPywQ.js → dayjs.min-DJ9q1L6q.js} +1 -1
  49. package/dist/{index-CIrQEHaA.js → index-BRj2qZrI.js} +1 -1
  50. package/dist/{index-D3j5gcJd.js → index-DTYy_WLk.js} +4 -4
  51. package/dist/{index-Bgxpsz4y.js → index-gGr9vxGG.js} +3 -3
  52. package/dist/{index.vue_vue_type_script_setup_true_lang-Bl5gVHZN.js → index.vue_vue_type_script_setup_true_lang-CN4VSfTe.js} +4 -4
  53. package/dist/{item-qo4jr-BY.js → item-DCswFfZ7.js} +1524 -1529
  54. package/dist/{jszip.min-CE-l7St7.js → jszip.min-CDVcb3V1.js} +2 -2
  55. package/dist/{menu-Chjaib3T.js → menu-OwE_CglC.js} +1 -1
  56. package/dist/{menuV2-D5wN00Wx.js → menuV2-DNKAeMnl.js} +90 -90
  57. package/dist/{priceTier-B-jiVm5I.js → priceTier-BFqnCFgL.js} +1 -1
  58. package/dist/{scheduler-aFOgeFS0.js → scheduler-BvI0Ikm5.js} +4 -4
  59. package/dist/{subcategory-UKvVvM-z.js → subcategory-BVFmNnWI.js} +2 -2
  60. package/dist/{toExcel-BPzszwzN.js → toExcel-BHGmkWkY.js} +2 -2
  61. package/dist/{unit-DIRVLvnx.js → unit-Ft62NFNs.js} +2 -2
  62. package/package.json +1 -1
  63. package/dist/CookingGuide-DnSW4CJb.js +0 -896
  64. package/dist/PrintRoute-l4v-zJrc.js +0 -420
@@ -0,0 +1,421 @@
1
+ import { defineComponent as J, ref as T, computed as p, resolveComponent as g, createBlock as k, openBlock as c, unref as l, withCtx as _, createElementVNode as d, createVNode as m, createCommentVNode as Q, toDisplayString as P, createElementBlock as M, Fragment as A, renderList as R, h as f, withModifiers as q } from "vue";
2
+ import { useI18n as H } from "@feedmepos/mf-common";
3
+ import { components as W, useBreakpoints as te, useSnackbar as oe, useDialog as ne } from "@feedmepos/ui-library";
4
+ import { _ as ae } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
5
+ import { _ as le } from "./app-dr4L7s0e.js";
6
+ import { I as j, J as re, M as Y, A as V, u as se, Q as ie, G as ue, a5 as de } from "./index.vue_vue_type_script_setup_true_lang-CN4VSfTe.js";
7
+ import { _ as G } from "./RuleView.vue_vue_type_script_setup_true_lang-DyVE6RAn.js";
8
+ import { u as ce } from "./discardConfirm-BHni0LNu.js";
9
+ import { L as me } from "./LinkProductSideSheet-Cv2q4tn-.js";
10
+ import { _ as pe } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
11
+ const _e = { class: "fm-typo-en-title-md-600" }, fe = { class: "space-y-32" }, ve = { class: "space-y-16" }, ye = { class: "flex items-center gap-8" }, ge = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, he = { class: "flex-1" }, be = { class: "grow overflow-y-auto" }, ke = { 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" }, Fe = { class: "py-8" }, Ie = { class: "flex gap-8 items-center justify-start" }, Ce = /* @__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: x }) {
25
+ const N = v;
26
+ t({
27
+ showModal: O,
28
+ hideModal: S
29
+ });
30
+ function w() {
31
+ return {
32
+ _id: "",
33
+ name: "",
34
+ applyToItems: []
35
+ };
36
+ }
37
+ const F = T(!1), h = T(void 0);
38
+ function O(s) {
39
+ h.value = s ? j(s) : w(), r.value = j(h.value), F.value = !0;
40
+ }
41
+ function S() {
42
+ F.value = !1;
43
+ }
44
+ const r = T(w());
45
+ function U({ items: s }) {
46
+ r.value = {
47
+ ...r.value,
48
+ applyToItems: s.map((o) => o._id)
49
+ };
50
+ }
51
+ function L(s) {
52
+ r.value = {
53
+ ...r.value,
54
+ applyToItems: r.value.applyToItems.filter((o) => o !== s)
55
+ };
56
+ }
57
+ const { t: a } = H(), z = p(() => r.value._id ? a("menu.print_route.department_dialog.update.title") : a("menu.print_route.department_dialog.add.title")), $ = p(() => r.value._id ? a("menu.print_route.department_dialog.update.action") : a("menu.print_route.department_dialog.add.action")), D = p(() => r.value.applyToItems.length), I = p(
58
+ () => r.value.applyToItems.reduce((s, o) => (s[o] = [], s), {})
59
+ ), C = T(""), B = p(() => {
60
+ const s = C.value.toLowerCase();
61
+ return N.categorizedItems.reduce((o, b) => {
62
+ const E = b.items.filter(
63
+ (i) => (!s || i.name.toLowerCase().includes(s)) && !!I.value[i._id]
64
+ );
65
+ return E.length && o.push({ ...b, items: E }), o;
66
+ }, []);
67
+ }), e = x, n = ce(
68
+ () => !re.isEqual(h.value, r.value),
69
+ () => {
70
+ F.value = !1;
71
+ }
72
+ );
73
+ function y() {
74
+ S(), e("onSave", r.value);
75
+ }
76
+ return (s, o) => {
77
+ const b = g("FmTextField"), E = g("FmSpacer"), i = g("FmButton"), X = g("FmSearch"), Z = g("FmSideSheet");
78
+ return c(), k(Z, {
79
+ modelValue: F.value,
80
+ "onUpdate:modelValue": o[3] || (o[3] = (u) => F.value = u),
81
+ header: z.value,
82
+ "max-width": 560,
83
+ "is-container": l(W).FmForm,
84
+ "is-container-props": {
85
+ onValidationSuccess: y,
86
+ blameFormChildOnValidationFailed: !0,
87
+ class: "flex flex-col h-full"
88
+ },
89
+ "onOn:clickedAway": l(n)
90
+ }, {
91
+ "side-sheet-header": _(() => [
92
+ d("span", _e, P(z.value), 1)
93
+ ]),
94
+ "side-sheet-footer": _(() => [
95
+ d("div", Ie, [
96
+ m(i, {
97
+ label: $.value,
98
+ size: "lg",
99
+ variant: "primary",
100
+ type: "submit"
101
+ }, null, 8, ["label"]),
102
+ m(i, {
103
+ label: l(a)("menu.print_route.department_dialog.actions.cancel"),
104
+ size: "lg",
105
+ variant: "tertiary",
106
+ onClick: S
107
+ }, null, 8, ["label"])
108
+ ])
109
+ ]),
110
+ default: _(() => [
111
+ d("div", fe, [
112
+ m(G, {
113
+ title: l(a)("menu.print_route.department_dialog.sections.route_detail.title")
114
+ }, {
115
+ default: _(() => [
116
+ m(b, {
117
+ autofocus: "",
118
+ modelValue: r.value.name,
119
+ "onUpdate:modelValue": o[0] || (o[0] = (u) => r.value.name = u),
120
+ rules: [
121
+ (u) => !!u || l(a)("menu.print_route.department_dialog.sections.route_detail.name.required")
122
+ ],
123
+ label: l(a)("menu.print_route.department_dialog.sections.route_detail.name.label"),
124
+ placeholder: l(a)("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 ? (c(), k(G, {
130
+ key: 0,
131
+ title: l(a)("menu.print_route.department_dialog.sections.link_product.title")
132
+ }, {
133
+ "append-title": _(() => [
134
+ m(E),
135
+ m(me, {
136
+ "categorized-items": v.categorizedItems,
137
+ "initial-value": r.value.applyToItems.map((u) => ({
138
+ _id: u
139
+ })),
140
+ onSubmit: o[1] || (o[1] = (u) => U(u))
141
+ }, {
142
+ default: _(({ trigger: u }) => [
143
+ m(i, {
144
+ icon: "link",
145
+ label: l(a)("menu.scheduler.dialog.sections.products.link"),
146
+ variant: "secondary",
147
+ "text-color": "primary",
148
+ "border-color": "primary",
149
+ onClick: u
150
+ }, null, 8, ["label", "onClick"])
151
+ ]),
152
+ _: 1
153
+ }, 8, ["categorized-items", "initial-value"])
154
+ ]),
155
+ default: _(() => [
156
+ d("div", ve, [
157
+ d("div", ye, [
158
+ d("div", ge, P(l(a)("menu.print_route.department_dialog.sections.link_product.products_linked", {
159
+ count: D.value
160
+ })), 1),
161
+ d("div", he, [
162
+ m(X, {
163
+ modelValue: C.value,
164
+ "onUpdate:modelValue": o[2] || (o[2] = (u) => C.value = u),
165
+ placeholder: l(a)("menu.print_route.department_dialog.sections.link_product.search")
166
+ }, null, 8, ["modelValue", "placeholder"])
167
+ ])
168
+ ]),
169
+ d("div", be, [
170
+ (c(!0), M(A, null, R(B.value, (u, ee) => (c(), M("div", {
171
+ key: u.id || ee
172
+ }, [
173
+ d("div", ke, P(u.name), 1),
174
+ (c(!0), M(A, null, R(u.items, (K) => (c(), M("div", {
175
+ key: K._id,
176
+ class: "flex items-center border-b border-b-fm-color-neutral-gray-100"
177
+ }, [
178
+ d("div", xe, P(K.name), 1),
179
+ d("div", Fe, [
180
+ m(i, {
181
+ icon: "delete",
182
+ variant: "tertiary",
183
+ "text-color": "neutral-gray-400",
184
+ onClick: () => L(K._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 Ve(v, t) {
202
+ return {
203
+ module: V.F_MENU_MODULE_V4_KEY.enum.printDepartment,
204
+ operation: Y.F_OPERATION_TYPE.create,
205
+ data: V.FdoMenuPrintDepartment.parse(v),
206
+ link: t.map((x) => ({
207
+ module: V.F_MENU_MODULE_V4_KEY.enum.item,
208
+ id: x
209
+ }))
210
+ };
211
+ }
212
+ function we(v, t) {
213
+ return {
214
+ module: V.F_MENU_MODULE_V4_KEY.enum.printDepartment,
215
+ operation: Y.F_OPERATION_TYPE.update,
216
+ data: V.FdoMenuPrintDepartment.parse(v),
217
+ link: t.map((x) => ({
218
+ module: V.F_MENU_MODULE_V4_KEY.enum.item,
219
+ id: x
220
+ }))
221
+ };
222
+ }
223
+ function Ee(v) {
224
+ return {
225
+ module: V.F_MENU_MODULE_V4_KEY.enum.printDepartment,
226
+ operation: Y.F_OPERATION_TYPE.delete,
227
+ data: v._id
228
+ };
229
+ }
230
+ const Te = {
231
+ class: "flex flex-1 justify-end"
232
+ }, Pe = {
233
+ class: "flex justify-end items-center"
234
+ }, Me = {
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
+ }, Ye = /* @__PURE__ */ J({
241
+ __name: "PrintRoute",
242
+ setup(v) {
243
+ const {
244
+ t
245
+ } = H(), x = te(), N = p(() => x.breakpoints.value.xs), w = se(), F = p(() => w.categorizedItems), h = p(() => {
246
+ const e = w.state.menu.modules.item;
247
+ return w.printDepartments.map((y) => ({
248
+ ...y,
249
+ applyToItems: e.reduce((s, o) => {
250
+ var b;
251
+ return (b = o.print) != null && b.department.includes(y._id) && s.push(o), s;
252
+ }, [])
253
+ }), []);
254
+ }), O = p(() => h.value.length > 0), S = p(() => [{
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 n = e.getValue();
264
+ return t("menu.print_route.table.columns.products_count", {
265
+ count: n.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) => f("div", {
279
+ class: "flex justify-end"
280
+ }, [f(W.FmButton, {
281
+ icon: "delete",
282
+ textColor: "neutral-gray-400",
283
+ variant: "tertiary",
284
+ onClick: q(() => {
285
+ D(e.row.original);
286
+ }, ["stop", "prevent"])
287
+ })])
288
+ }]);
289
+ function r() {
290
+ var e;
291
+ a.value || (e = C.value) == null || e.showModal();
292
+ }
293
+ function U(e) {
294
+ var n;
295
+ a.value || (n = C.value) == null || n.showModal({
296
+ ...e,
297
+ applyToItems: e.applyToItems.map(({
298
+ _id: y
299
+ }) => y)
300
+ });
301
+ }
302
+ const L = ie(ue(oe())), a = p(() => L.checkMenuIsLoading());
303
+ async function z(e) {
304
+ const n = e._id ? we(e, e.applyToItems) : Ve(e, e.applyToItems);
305
+ await L.updateMenu(n, e.name);
306
+ }
307
+ const $ = ne();
308
+ function D(e) {
309
+ let n = [f("span", t("menu.print_route.dialogs.remove.message.prefix")), f("span", {
310
+ class: "fm-typo-en-body-lg-600"
311
+ }, e.name), f("span", "?")];
312
+ e.applyToItems.length && (n = [f("span", t("menu.print_route.dialogs.remove.message.products_using")), f("span", {
313
+ class: "fm-typo-en-body-lg-600"
314
+ }, e.applyToItems.length), f("span", t("menu.print_route.dialogs.remove.message.products_count")), ...n, f("div", {
315
+ class: "mt-8 fm-typo-en-body-md-400"
316
+ }, e.applyToItems.map((y) => f("li", {
317
+ class: "mt-4"
318
+ }, y.name)))]), $.open({
319
+ title: t("menu.print_route.dialogs.remove.title"),
320
+ contentComponent: f("div", n),
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 L.updateMenu(Ee(e), e.name, !0);
332
+ });
333
+ }
334
+ const I = T(""), C = T(), B = p(() => {
335
+ if (!I.value) return h.value;
336
+ const e = I.value.toLowerCase();
337
+ return h.value.filter((n) => n.name.toLowerCase().includes(e));
338
+ });
339
+ return (e, n) => {
340
+ const y = g("FmSearch"), s = g("FmTable"), o = g("FmButton"), b = g("FmListItem"), E = g("FmList");
341
+ return c(), k(pe, {
342
+ heading: l(t)("menu.print_route.title")
343
+ }, {
344
+ "append-heading": _(() => [d("div", Te, [O.value ? (c(), k(ae, {
345
+ key: 0,
346
+ disabled: a.value,
347
+ icon: "add",
348
+ label: l(t)("menu.print_route.actions.add"),
349
+ variant: "primary",
350
+ onClick: r
351
+ }, null, 8, ["disabled", "label"])) : Q("", !0)])]),
352
+ default: _(() => [O.value ? (c(), M(A, {
353
+ key: 1
354
+ }, [d("div", Pe, [m(y, {
355
+ autofocus: "",
356
+ modelValue: I.value,
357
+ "onUpdate:modelValue": n[0] || (n[0] = (i) => I.value = i),
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"])]), N.value ? (c(), k(E, {
361
+ key: 1,
362
+ class: "w-full px-16 flex-1 min-h-0 overflow-scroll pb-64",
363
+ separator: ""
364
+ }, {
365
+ default: _(() => [(c(!0), M(A, null, R(B.value, (i) => (c(), k(b, {
366
+ key: i._id,
367
+ label: i.name,
368
+ style: {
369
+ padding: "12px 0 !important"
370
+ },
371
+ onClick: () => U(i)
372
+ }, {
373
+ default: _(() => [d("div", Me, [d("div", Se, P(i.name), 1), d("div", Le, P(l(t)("menu.print_route.table.mobile.products_linked", {
374
+ count: i.applyToItems.length
375
+ })), 1)]), m(o, {
376
+ disabled: a.value,
377
+ icon: "delete",
378
+ variant: "tertiary",
379
+ "text-color": "neutral-gray-400",
380
+ onClick: q(() => D(i), ["stop"])
381
+ }, null, 8, ["disabled", "onClick"])]),
382
+ _: 2
383
+ }, 1032, ["label", "onClick"]))), 128))]),
384
+ _: 1
385
+ })) : (c(), k(le, {
386
+ key: 0
387
+ }, {
388
+ default: _(() => [m(s, {
389
+ "column-defs": S.value,
390
+ loading: a.value,
391
+ "page-size": h.value.length,
392
+ "row-data": h.value,
393
+ "search-value": I.value,
394
+ shrinkAt: !1,
395
+ "hide-footer": "",
396
+ "pin-header-row": "",
397
+ onRowClick: n[1] || (n[1] = (i) => U(i.original))
398
+ }, null, 8, ["column-defs", "loading", "page-size", "row-data", "search-value"])]),
399
+ _: 1
400
+ }))], 64)) : (c(), k(l(de), {
401
+ key: 0,
402
+ action: {
403
+ text: l(t)("menu.print_route.empty.action"),
404
+ callback: r
405
+ },
406
+ subtitle: l(t)("menu.print_route.empty.subtitle"),
407
+ title: l(t)("menu.print_route.empty.title")
408
+ }, null, 8, ["action", "subtitle", "title"])), m(Ce, {
409
+ ref_key: "printDepartmentRef",
410
+ ref: C,
411
+ "categorized-items": F.value,
412
+ onOnSave: z
413
+ }, null, 8, ["categorized-items"])]),
414
+ _: 1
415
+ }, 8, ["heading"]);
416
+ };
417
+ }
418
+ });
419
+ export {
420
+ Ye as default
421
+ };
@@ -1,4 +1,4 @@
1
- import { a as f } from "./Product.vue_vue_type_script_setup_true_lang-Dp7a5bRf.js";
1
+ import { a as f } from "./Product.vue_vue_type_script_setup_true_lang-D0ckjZbT.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,22 +1,22 @@
1
1
  import { ref as F, computed as h, defineComponent as N, resolveComponent as O, createBlock as I, openBlock as m, withCtx as T, createElementVNode as g, createVNode as d, unref as a, createElementBlock as k, Fragment as pe, renderList as we, createCommentVNode as M, normalizeClass as ve, toDisplayString as K, withModifiers as fe, mergeModels as Ze, useModel as Xe, renderSlot as _e, watch as de, createTextVNode as et, watchEffect as tt, nextTick as Ae, resolveDynamicComponent as lt, onMounted as at, h as W, isRef as je, normalizeStyle as ft } from "vue";
2
- import { u as Fe, T as Ce, B as me, I as Re, J as ge, W as gt, af as bt, ag as _t, ah as Pe, ai as yt, R as ht, a5 as be, aj as Ee } from "./index.vue_vue_type_script_setup_true_lang-Bl5gVHZN.js";
2
+ import { u as Fe, T as Ce, B as me, I as Re, J as ge, W as gt, af as bt, ag as _t, ah as Pe, ai as yt, R as ht, a5 as be, aj as Ee } from "./index.vue_vue_type_script_setup_true_lang-CN4VSfTe.js";
3
3
  import { useI18n as Ie, useCoreStore as ze, useCustomAttributes as xt } from "@feedmepos/mf-common";
4
- import { u as Se } from "./menu-Chjaib3T.js";
5
- import { L as Ge } from "./LinkProductSideSheet-BMSjNF-X.js";
6
- import { r as Ct, _ as Le } from "./index-CIrQEHaA.js";
7
- import { _ as Me, a as We } from "./CustomAttributeChip.vue_vue_type_script_setup_true_lang-27kAtFHA.js";
8
- import { _ as Ue, u as kt } from "./Thumbnail.vue_vue_type_script_setup_true_lang-CXQa2QSR.js";
9
- import { f as wt, o as St, a as Vt, m as Ft } from "./menuV2-D5wN00Wx.js";
10
- import { u as ot, C as It } from "./item-qo4jr-BY.js";
4
+ import { u as Se } from "./menu-OwE_CglC.js";
5
+ import { L as Ge } from "./LinkProductSideSheet-Cv2q4tn-.js";
6
+ import { r as Ct, _ as Le } from "./index-BRj2qZrI.js";
7
+ import { _ as Me, a as We } from "./CustomAttributeChip.vue_vue_type_script_setup_true_lang-BooPj25p.js";
8
+ import { _ as Ue, u as kt } from "./Thumbnail.vue_vue_type_script_setup_true_lang-De5ZxLui.js";
9
+ import { f as wt, o as St, a as Vt, m as Ft } from "./menuV2-DNKAeMnl.js";
10
+ import { u as ot, C as It } from "./item-DCswFfZ7.js";
11
11
  import { b as qe, H as $t } from "./app-5fxKLAzS.js";
12
12
  import { useBreakpoints as rt, components as te, useDialog as Tt, FmButtonColorThemeVariant as q, FmButtonVariant as ee } from "@feedmepos/ui-library";
13
13
  import { F as Pt } from "./index-CisutoS9.js";
14
- import { _ as De, a as At } from "./app-DXTOSCE8.js";
14
+ import { _ as De, a as At } from "./app-dr4L7s0e.js";
15
15
  import { _ as ke } from "./TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js";
16
- import { _ as Rt } from "./index-D3j5gcJd.js";
17
- import { r as Mt, _ as Ut } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-C8T16h_U.js";
16
+ import { _ as Rt } from "./index-DTYy_WLk.js";
17
+ import { r as Mt, _ as Ut } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-BlQWRtnv.js";
18
18
  import { c as zt } from "./check-C9mY6LiX.js";
19
- import { f as Dt } from "./currency-BK-5iUrj.js";
19
+ import { f as Dt } from "./currency-BlnPQEjW.js";
20
20
  import { w as Ot } from "./tooltip-B5BiPMx9.js";
21
21
  function Bt(C, e, i = C) {
22
22
  const n = F(!0), t = h(() => {
@@ -1,12 +1,12 @@
1
1
  import { defineComponent as Z, ref as v, computed as $, resolveComponent as G, createElementBlock as c, openBlock as r, createElementVNode as s, createVNode as I, unref as h, createCommentVNode as T, normalizeClass as E, toDisplayString as U, createStaticVNode as B, Fragment as P, renderList as O, createBlock as oe, withCtx as R } from "vue";
2
- import { J as A, F as ne } from "./jszip.min-CE-l7St7.js";
3
- import { G as le, u as ie, J as D, a2 as re, N as ce, O as de, P as me } from "./index.vue_vue_type_script_setup_true_lang-Bl5gVHZN.js";
2
+ import { J as A, F as ne } from "./jszip.min-CDVcb3V1.js";
3
+ import { G as le, u as ie, J as D, a2 as re, N as ce, O as de, P as me } from "./index.vue_vue_type_script_setup_true_lang-CN4VSfTe.js";
4
4
  import { useI18n as ue } from "@feedmepos/mf-common";
5
5
  import { FmButtonVariant as z, useSnackbar as V, useDialog as ge, FmButtonColorThemeVariant as M } from "@feedmepos/ui-library";
6
6
  import { _ as pe } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
7
- import { u as fe, a as he } from "./menu-Chjaib3T.js";
8
- import { a as ye } from "./Product.vue_vue_type_script_setup_true_lang-Dp7a5bRf.js";
9
- import { t as be, v as ve, w as _e } from "./item-qo4jr-BY.js";
7
+ import { u as fe, a as he } from "./menu-OwE_CglC.js";
8
+ import { a as ye } from "./Product.vue_vue_type_script_setup_true_lang-D0ckjZbT.js";
9
+ import { t as be, v as ve, w as _e } from "./item-DCswFfZ7.js";
10
10
  const we = { class: "h-full flex flex-col" }, xe = { class: "flex items-center justify-between p-16 border-b border-gray-200" }, Ie = { class: "flex gap-8" }, ke = { class: "border-b border-gray-200" }, Ce = { class: "flex" }, Ue = { class: "flex-1 overflow-hidden" }, je = {
11
11
  key: 0,
12
12
  class: "h-full flex flex-col"
@@ -1,21 +1,21 @@
1
- import { defineComponent as E, computed as g, ref as j, resolveComponent as M, createBlock as y, openBlock as m, unref as e, withCtx as c, createElementVNode as i, toDisplayString as q, createVNode as o, createCommentVNode as G, createElementBlock as A, Fragment as P } from "vue";
2
- import { D as F } from "./dayjs.min-BRGHPywQ.js";
3
- import { J as oe, F as ne } from "./jszip.min-CE-l7St7.js";
4
- import { u as J, G as W, B as R, H, A as Z, D as ae, I as re, J as U, K as se } from "./index.vue_vue_type_script_setup_true_lang-Bl5gVHZN.js";
5
- import { w as ie } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-C8T16h_U.js";
1
+ import { defineComponent as E, computed as g, ref as O, resolveComponent as M, createBlock as y, openBlock as m, unref as e, withCtx as c, createElementVNode as i, toDisplayString as q, createVNode as o, createCommentVNode as G, createElementBlock as A, Fragment as P } from "vue";
2
+ import { D as F } from "./dayjs.min-DJ9q1L6q.js";
3
+ import { J as oe, F as ne } from "./jszip.min-CDVcb3V1.js";
4
+ import { u as J, G as W, B as R, H, A as Z, D as ae, I as re, J as U, K as se } from "./index.vue_vue_type_script_setup_true_lang-CN4VSfTe.js";
5
+ import { w as ie } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-BlQWRtnv.js";
6
6
  import { useCoreStore as K, useI18n as le } from "@feedmepos/mf-common";
7
- import { useDialog as Q, useDialogChild as ue, useSnackbar as X, useBreakpoints as ce, FmButtonVariant as $, FmButtonColorThemeVariant as h } from "@feedmepos/ui-library";
7
+ import { useDialog as Q, useDialogChild as ue, useSnackbar as X, useBreakpoints as ce, FmButtonVariant as $, FmButtonColorThemeVariant as S } from "@feedmepos/ui-library";
8
8
  import { _ as V } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
9
9
  import { _ as me, a as z } from "./BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-DhrXKy3b.js";
10
10
  import { _ as de } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
11
- import { u as pe, a as fe } from "./menu-Chjaib3T.js";
12
- import { u as _e } from "./item-qo4jr-BY.js";
13
- import { _ as L, a as ve } from "./Product.vue_vue_type_script_setup_true_lang-Dp7a5bRf.js";
14
- import { L as O } from "./LinkProductSideSheet-BMSjNF-X.js";
15
- import { _ as ge } from "./TreeEditorOpenner.vue_vue_type_script_setup_true_lang-rI6agknT.js";
16
- import { u as be } from "./Thumbnail.vue_vue_type_script_setup_true_lang-CXQa2QSR.js";
17
- import { m as ye } from "./toExcel-BPzszwzN.js";
18
- const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "flex justify-end gap-8" }, Se = /* @__PURE__ */ E({
11
+ import { u as pe, a as fe } from "./menu-OwE_CglC.js";
12
+ import { u as _e } from "./item-DCswFfZ7.js";
13
+ import { _ as L, a as ve } from "./Product.vue_vue_type_script_setup_true_lang-D0ckjZbT.js";
14
+ import { L as j } from "./LinkProductSideSheet-Cv2q4tn-.js";
15
+ import { _ as ge } from "./TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BM8B116x.js";
16
+ import { u as be } from "./Thumbnail.vue_vue_type_script_setup_true_lang-De5ZxLui.js";
17
+ import { m as ye } from "./toExcel-BHGmkWkY.js";
18
+ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], Se = { class: "flex justify-end gap-8" }, he = /* @__PURE__ */ E({
19
19
  __name: "ConfirmActionDialog",
20
20
  props: {
21
21
  description: {},
@@ -23,7 +23,7 @@ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "fle
23
23
  message: { default: "To confirm your action, type <b>[[value]]</b> in the text field." }
24
24
  },
25
25
  setup(C) {
26
- const t = C, S = g(() => t.message.replace("[[value]]", t.value)), k = j(""), r = Q(), { emitAction: x } = ue();
26
+ const t = C, h = g(() => t.message.replace("[[value]]", t.value)), k = O(""), r = Q(), { emitAction: x } = ue();
27
27
  return (d, s) => {
28
28
  const p = M("FmTextField"), f = M("FmButton"), _ = M("FmForm");
29
29
  return m(), y(_, {
@@ -33,7 +33,7 @@ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "fle
33
33
  default: c(() => [
34
34
  i("div", ke, [
35
35
  i("div", null, q(d.description), 1),
36
- i("div", { innerHTML: S.value }, null, 8, xe),
36
+ i("div", { innerHTML: h.value }, null, 8, xe),
37
37
  i("div", null, [
38
38
  o(p, {
39
39
  modelValue: k.value,
@@ -46,7 +46,7 @@ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "fle
46
46
  rules: [(l) => l === d.value || "Value does not match"]
47
47
  }, null, 8, ["modelValue", "placeholder", "rules"])
48
48
  ]),
49
- i("div", he, [
49
+ i("div", Se, [
50
50
  o(f, {
51
51
  label: "Cancel",
52
52
  variant: "secondary",
@@ -66,11 +66,11 @@ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "fle
66
66
  }), Me = /* @__PURE__ */ E({
67
67
  __name: "Migrate",
68
68
  setup(C) {
69
- const t = J(), S = K(), k = X(), { minor: r } = W(k), x = j(!1), d = Q();
69
+ const t = J(), h = K(), k = X(), { minor: r } = W(k), x = O(!1), d = Q();
70
70
  async function s() {
71
71
  p.value || x.value || d.open({
72
72
  title: "Migrate to new version",
73
- contentComponent: Se,
73
+ contentComponent: he,
74
74
  contentComponentProps: {
75
75
  value: "MIGRATE",
76
76
  description: "Do you want to migrate to new version? Once migrate it will unable to revert to the older version."
@@ -92,7 +92,7 @@ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "fle
92
92
  });
93
93
  }
94
94
  const p = g(() => {
95
- const f = S.restaurants.value;
95
+ const f = h.restaurants.value;
96
96
  if (!f.length) return "Required at least one restaurant to migrate";
97
97
  const _ = f.filter((b) => !b.posVersion || !R.Pos.canUse({ feature: H.F_FEATURE.enum.menuV4, posVersion: b.posVersion }));
98
98
  return _.length ? `Upgrade POS to V${R.Pos.minVersionToUse(H.F_FEATURE.enum.menuV4)} to use new menu: ${_.map((b) => b.profile.name).join(", ")}` : null;
@@ -111,10 +111,10 @@ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "fle
111
111
  })) : G("", !0);
112
112
  };
113
113
  }
114
- }), we = "/assets/menu-export-DFMvZ9lh.js", Ce = { class: "flex-1 flex justify-between gap-8 pl-8" }, Fe = { class: "flex items-center" }, $e = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Ve = { class: "fm-typo-en-body-md-600 font-semibold" }, Ee = { class: "flex gap-8" }, Je = /* @__PURE__ */ E({
114
+ }), we = "/assets/menu-export-DaWjS0T5.js", Ce = { class: "flex-1 flex justify-between gap-8 pl-8" }, Fe = { class: "flex items-center" }, $e = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Ve = { class: "fm-typo-en-body-md-600 font-semibold" }, Ee = { class: "flex gap-8" }, Je = /* @__PURE__ */ E({
115
115
  __name: "Products",
116
116
  setup(C) {
117
- const { t } = le(), S = K(), k = W(X()), r = J(), x = g(() => r.rules.item), d = _e(), s = g(() => !r.state.currentSchedulerId), { selectedCategories: p } = pe(), f = g(() => ({
117
+ const { t } = le(), h = K(), k = W(X()), r = J(), x = g(() => r.rules.item), d = _e(), s = g(() => !r.state.currentSchedulerId), { selectedCategories: p } = pe(), f = g(() => ({
118
118
  ...ae.menuV4ToV3(re(r.state.menu)),
119
119
  _id: r.state.menu._id,
120
120
  _rev: r.state.menu._rev
@@ -141,7 +141,7 @@ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "fle
141
141
  we,
142
142
  JSON.stringify({
143
143
  menu: u,
144
- attributeSettings: S.itemAttributeSettings.value
144
+ attributeSettings: h.itemAttributeSettings.value
145
145
  })
146
146
  );
147
147
  await l(a, v);
@@ -205,8 +205,8 @@ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "fle
205
205
  default: c(({ trigger: a }) => [
206
206
  o(v, {
207
207
  label: e(t)("menu.tree_editor.title"),
208
- "bg-color": e(h).NeutralGray100,
209
- "text-color": e(h).TypoSecondary,
208
+ "bg-color": e(S).NeutralGray100,
209
+ "text-color": e(S).TypoSecondary,
210
210
  variant: e($).Primary,
211
211
  onClick: a
212
212
  }, null, 8, ["label", "bg-color", "text-color", "variant", "onClick"])
@@ -214,8 +214,8 @@ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "fle
214
214
  _: 1
215
215
  }),
216
216
  o(v, {
217
- "bg-color": e(h).NeutralGray100,
218
- "text-color": e(h).TypoSecondary,
217
+ "bg-color": e(S).NeutralGray100,
218
+ "text-color": e(S).TypoSecondary,
219
219
  variant: e($).Primary,
220
220
  label: e(t)("menu.products.actions.export"),
221
221
  onClick: b
@@ -223,8 +223,8 @@ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "fle
223
223
  o(L, null, {
224
224
  default: c(({ trigger: a }) => [
225
225
  o(v, {
226
- "bg-color": e(h).NeutralGray100,
227
- "text-color": e(h).TypoSecondary,
226
+ "bg-color": e(S).NeutralGray100,
227
+ "text-color": e(S).TypoSecondary,
228
228
  variant: e($).Primary,
229
229
  label: e(t)("menu.products.actions.import"),
230
230
  onClick: a
@@ -239,7 +239,7 @@ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "fle
239
239
  label: e(t)("menu.products.actions.add"),
240
240
  "prepend-icon": "add",
241
241
  onClick: n[0] || (n[0] = (a) => e(d).create(null))
242
- }, null, 8, ["label"])) : s.value ? (m(), y(O, {
242
+ }, null, 8, ["label"])) : s.value ? (m(), y(j, {
243
243
  key: 1,
244
244
  "categorized-items": e(Y).linkableItems.value,
245
245
  "initial-value": e(Y).currentItems.value,
@@ -258,7 +258,7 @@ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "fle
258
258
  }, null, 8, ["label", "onClick"])
259
259
  ]),
260
260
  _: 1
261
- }, 8, ["categorized-items", "initial-value", "menu-items", "categories", "link-item-rules", "no-scheduler", "onSubmit"])) : (m(), y(O, {
261
+ }, 8, ["categorized-items", "initial-value", "menu-items", "categories", "link-item-rules", "no-scheduler", "onSubmit"])) : (m(), y(j, {
262
262
  key: 2,
263
263
  "categorized-items": e(B).linkableItems.value,
264
264
  "initial-value": e(B).currentItems.value,
@@ -1,12 +1,12 @@
1
1
  import { defineComponent as W, ref as P, computed as N, onMounted as ie, resolveComponent as U, createElementBlock as M, openBlock as C, createVNode as p, createElementVNode as d, toDisplayString as z, unref as i, Fragment as H, renderList as q, createBlock as j, watch as de, withCtx as E, normalizeClass as re, createCommentVNode as X, createTextVNode as me, mergeProps as Ve, normalizeStyle as Ie, renderSlot as Pe, withModifiers as te, h as R, onUnmounted as Me } from "vue";
2
- import { D as L } from "./dayjs.min-BRGHPywQ.js";
2
+ import { D as L } from "./dayjs.min-DJ9q1L6q.js";
3
3
  import { useRouter as $e } from "vue-router";
4
4
  import { O as Ue, b as Ae } from "./app-5fxKLAzS.js";
5
- import { B as Be, H as De, G as he, ad as Te, A as G, u as _e, I as pe, J as Re, a5 as Oe } from "./index.vue_vue_type_script_setup_true_lang-Bl5gVHZN.js";
5
+ import { B as Be, H as De, G as he, ad as Te, A as G, u as _e, I as pe, J as Re, a5 as Oe } from "./index.vue_vue_type_script_setup_true_lang-CN4VSfTe.js";
6
6
  import { useI18n as Z, useCoreStore as Ne, RestaurantSelector as Ee } from "@feedmepos/mf-common";
7
7
  import { useSnackbar as ce, useDialogChild as Le, useProxiedModel as ze, useDialog as be, FmButtonVariant as fe, components as Q } from "@feedmepos/ui-library";
8
8
  import { _ as He } from "./TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js";
9
- import { _ as Je } from "./app-DXTOSCE8.js";
9
+ import { _ as Je } from "./app-dr4L7s0e.js";
10
10
  import { a as Ye, w as Ke } from "./tooltip-B5BiPMx9.js";
11
11
  import { u as ge } from "./discardConfirm-BHni0LNu.js";
12
12
  import { _ as ye } from "./_plugin-vue_export-helper-CHgC5LLL.js";