@feedmepos/mf-menu 0.31.32-prod → 0.31.33-beta.10

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 (101) hide show
  1. package/dist/{App-NHdXEdrJ.js → App-DLoBsgTh.js} +79 -33
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-DoTx23iL.js → ApplyProduct.vue_vue_type_script_setup_true_lang-AdxIn_cb.js} +20 -20
  3. package/dist/{Catalog-B0fV6Yje.js → Catalog-CEvqDKD0.js} +80 -80
  4. package/dist/{Category-CJZs9I7F.js → Category-CPrXxkVI.js} +41 -41
  5. package/dist/{Category-CUKZ10xq.js → Category-CnsBFgvu.js} +37 -33
  6. package/dist/{CookingGuide-kVclP--T.js → CookingGuide-Day6eG7h.js} +66 -66
  7. package/dist/CustomAttributeChip.vue_vue_type_script_setup_true_lang-CzrjTv0X.js +113 -0
  8. package/dist/{Group-Bgkye2LL.js → Group-HAAm8its.js} +1 -1
  9. package/dist/{Group-CAS6o4Fo.js → Group-_G2GnGz-.js} +3 -3
  10. package/dist/Group.vue_vue_type_script_setup_true_lang-CTDR_kMg.js +686 -0
  11. package/dist/GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-KuT-w6bF.js +367 -0
  12. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-RsDAGQ3o.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-DwXWiz77.js} +4982 -5081
  13. package/dist/{Ingredient-DpAPMsPZ.js → Ingredient-BerGQ0W3.js} +23 -23
  14. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-MoApzjt6.js → InventoryBinding.vue_vue_type_script_setup_true_lang-Bf9GYRjF.js} +2 -2
  15. package/dist/LinkProductSideSheet-32r2l60j.js +297 -0
  16. package/dist/LinkProductSideSheet.vue_vue_type_style_index_0_scoped_97fa9d58_lang-DvG3mOom.js +8024 -0
  17. package/dist/{MenuSetting-CoqMT8Vh.js → MenuSetting-DmyEGemp.js} +20 -20
  18. package/dist/{PrintRoute-DyJil1Hl.js → PrintRoute-8gipiFdT.js} +99 -98
  19. package/dist/{Product-BPIUTn0_.js → Product-Cqvq9DAA.js} +1 -1
  20. package/dist/Product.vue_vue_type_script_setup_true_lang-DcMr8wkh.js +1578 -0
  21. package/dist/{ProductInternalTools-DXgWE6JU.js → ProductInternalTools--w7YOgx2.js} +17 -17
  22. package/dist/Products-BIRGYu47.js +283 -0
  23. package/dist/{Publish-DDzpmm72.js → Publish-BcbzhAa5.js} +3 -3
  24. package/dist/{Recipe-DHYzO0IS.js → Recipe-z1zhmblA.js} +13 -13
  25. package/dist/{Scheduler-DBad2mO3.js → Scheduler-Cv9Y5M6i.js} +7 -7
  26. package/dist/{ServingSequence-DC7raAtF.js → ServingSequence-DWFJD-1y.js} +24 -24
  27. package/dist/Setting-BgCssMcE.js +259 -0
  28. package/dist/{Subcategory-DHjc7WeF.js → Subcategory-D4BYtWMN.js} +10 -10
  29. package/dist/{Takeaway-CJRTaygj.js → Takeaway-126rJXs4.js} +9 -9
  30. package/dist/{Takeaway-CAIAHpA-.js → Takeaway-D-UZAzfn.js} +1 -1
  31. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-BNu9JjwH.js → Takeaway.vue_vue_type_script_setup_true_lang-CVsyWrTL.js} +12 -12
  32. package/dist/Thumbnail.vue_vue_type_script_setup_true_lang-szHjE_UD.js +431 -0
  33. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CLNlU4BJ.js +5990 -0
  34. package/dist/{Unit-DSMSKE6_.js → Unit-7APP9HLD.js} +13 -13
  35. package/dist/{Variant-DMXxUWnj.js → Variant-lJW6pFqT.js} +14 -14
  36. package/dist/_id_-R-pHc7HA.js +202 -0
  37. package/dist/{app-D23N7tJ0.js → app-CAhJXoa3.js} +390 -377
  38. package/dist/{app-BTgdGTYz.js → app-DoJgznLl.js} +1 -1
  39. package/dist/app.js +1 -1
  40. package/dist/apps/mf-menu/src/app.d.ts +60 -1
  41. package/dist/apps/mf-menu/src/components/feature/PriceTier/LinkPriceTierSection.vue.d.ts +24 -0
  42. package/dist/apps/mf-menu/src/components/feature/PriceTier/PriceTierRuleEditor.vue.d.ts +30 -0
  43. package/dist/apps/mf-menu/src/components/feature/RestaurantAttributesSelector.vue.d.ts +33 -0
  44. package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/catalog.d.ts +2 -0
  45. package/dist/apps/mf-menu/src/components/feature/TreeEditor/store/menuV2.d.ts +80 -1
  46. package/dist/apps/mf-menu/src/composable/linkProducts.d.ts +1276 -0
  47. package/dist/apps/mf-menu/src/helper/import-export.d.ts +77 -0
  48. package/dist/apps/mf-menu/src/helper/menu.d.ts +77 -0
  49. package/dist/apps/mf-menu/src/helper/setting/catalogSetting.d.ts +11 -2
  50. package/dist/apps/mf-menu/src/manager/menu/item.d.ts +77 -0
  51. package/dist/apps/mf-menu/src/router/shared.d.ts +2 -1
  52. package/dist/apps/mf-menu/src/stores/manager/catalog.d.ts +2 -0
  53. package/dist/apps/mf-menu/src/stores/menu.d.ts +79 -0
  54. package/dist/apps/mf-menu/src/types/linkProducts.d.ts +21 -0
  55. package/dist/apps/mf-menu/src/views/PrintRoute/PrintDepartmentDialog.vue.d.ts +5 -3
  56. package/dist/apps/mf-menu/src/views/Publish/UpdateCatalogDialog.vue.d.ts +82 -0
  57. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  58. package/dist/assets/linked-status-BbJj0WW0.js +24 -0
  59. package/dist/assets/override-menu-CRaqJDr8.js +24 -0
  60. package/dist/assets/validate-menu-BQ2BFUmD.js +24 -0
  61. package/dist/{catalog-DcciqmWK.js → catalog-C1fna-Yk.js} +1 -1
  62. package/dist/catalogSetting-BKP36lej.js +71 -0
  63. package/dist/{category-bhqVqDzJ.js → category-DK_MXlvY.js} +5 -5
  64. package/dist/{currency-Clgvy00I.js → currency-D2fl1Bk0.js} +1 -1
  65. package/dist/{dayjs.min-DeSv8lfJ.js → dayjs.min-Bk9ZYtg9.js} +1 -1
  66. package/dist/{index-BHbYu_OM.js → index-BJ3_8aUL.js} +14 -14
  67. package/dist/{index-CTUaJyIh.js → index-CSuF-4Sa.js} +14 -14
  68. package/dist/{index-DZZJjEOs.js → index-Cc2J6T0N.js} +28 -28
  69. package/dist/index-D7yR1j9C.js +215 -0
  70. package/dist/{item-DH1xf2Sa.js → item-DX44khy2.js} +201 -199
  71. package/dist/{jszip.min-CMM2HN8J.js → jszip.min-Dbu7MIcI.js} +427 -427
  72. package/dist/{menu-Dx39P1vR.js → menu-DT5c-FqY.js} +4 -4
  73. package/dist/menu-D_Cckz_p.js +133287 -0
  74. package/dist/menuV2-DTBH_-tm.js +707 -0
  75. package/dist/mf-menu.css +1 -1
  76. package/dist/{priceTier-3M5cxSYX.js → priceTier-wLQ8p4bJ.js} +1 -1
  77. package/dist/{scheduler-BT3EJBK6.js → scheduler-D6UbXLXR.js} +36 -37
  78. package/dist/subcategory-DjN3X1BI.js +148 -0
  79. package/dist/{toExcel-BLoj4Wqb.js → toExcel-CWyoDcRd.js} +15 -15
  80. package/dist/{unit-BsNOQHvZ.js → unit-CLa8caCJ.js} +11 -10
  81. package/package.json +5 -5
  82. package/dist/CustomAttributeChip.vue_vue_type_script_setup_true_lang-RI_d10bz.js +0 -7949
  83. package/dist/FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js +0 -26
  84. package/dist/Group.vue_vue_type_script_setup_true_lang-Bij0tGMP.js +0 -698
  85. package/dist/GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CUa_0qzX.js +0 -206
  86. package/dist/LinkProductSideSheet-CEClo07H.js +0 -112
  87. package/dist/Product.vue_vue_type_script_setup_true_lang-fjFGg49e.js +0 -1560
  88. package/dist/Products-dWmgQ_di.js +0 -270
  89. package/dist/Setting-CPjvUYU9.js +0 -258
  90. package/dist/Thumbnail.vue_vue_type_script_setup_true_lang-DzQ8_6Bi.js +0 -71
  91. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-ZRv8Dg6x.js +0 -6149
  92. package/dist/_id_-CTq4qK7z.js +0 -200
  93. package/dist/apps/mf-menu/src/components/feature/LinkProduct/LinkProductSideSheet.vue.d.ts +0 -70
  94. package/dist/assets/linked-status-Cfc9wZst.js +0 -24
  95. package/dist/assets/override-menu-BNZggtO_.js +0 -24
  96. package/dist/assets/validate-menu-CPwUvy9F.js +0 -24
  97. package/dist/catalogSetting-D4iwoJLb.js +0 -65
  98. package/dist/index-Ce4v8o7D.js +0 -106
  99. package/dist/menu-DcGo3sn5.js +0 -108039
  100. package/dist/subcategory-B5atmACN.js +0 -817
  101. /package/dist/{apps/mf-menu/src/components → packages/shared/src/components/info}/CustomAttributeChip.vue.d.ts +0 -0
@@ -1,12 +1,12 @@
1
- import { defineComponent as Z, ref as v, computed as $, resolveComponent as W, 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 R, createBlock as oe, withCtx as A } from "vue";
2
- import { J as O, F as ne } from "./jszip.min-CMM2HN8J.js";
3
- import { D as le, u as ie, I as D, a1 as re, a0 as ce, K as de, M as me, N as ue } from "./menu-DcGo3sn5.js";
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 R, createBlock as oe, withCtx as A } from "vue";
2
+ import { J as O, F as ne } from "./jszip.min-Dbu7MIcI.js";
3
+ import { G as le, u as ie, I as D, a0 as re, $ as ce, K as de, M as me, N as ue } from "./menu-D_Cckz_p.js";
4
4
  import { useI18n as ge } from "@feedmepos/mf-common";
5
5
  import { FmButtonVariant as z, useSnackbar as V, useDialog as pe, FmButtonColorThemeVariant as S } from "@feedmepos/ui-library";
6
6
  import { _ as fe } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
7
- import { u as he, a as ye } from "./menu-Dx39P1vR.js";
8
- import { a as be } from "./Product.vue_vue_type_script_setup_true_lang-fjFGg49e.js";
9
- import { v as ve, w as _e } from "./item-DH1xf2Sa.js";
7
+ import { u as he, a as ye } from "./menu-DT5c-FqY.js";
8
+ import { a as be } from "./Product.vue_vue_type_script_setup_true_lang-DcMr8wkh.js";
9
+ import { v as ve, w as _e } from "./item-DX44khy2.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"
@@ -28,7 +28,7 @@ const we = { class: "h-full flex flex-col" }, xe = { class: "flex items-center j
28
28
  }, Oe = {
29
29
  key: 1,
30
30
  class: "flex-1 overflow-y-auto p-16"
31
- }, De = { class: "space-y-12" }, Ve = { class: "fm-typo-en-body-sm font-medium break-all" }, Ze = { class: "flex" }, We = { class: "w-64 h-64 bg-gray-100 rounded-8 overflow-hidden" }, qe = ["src", "alt"], Ge = /* @__PURE__ */ Z({
31
+ }, De = { class: "space-y-12" }, Ve = { class: "fm-typo-en-body-sm font-medium break-all" }, Ze = { class: "flex" }, Ge = { class: "w-64 h-64 bg-gray-100 rounded-8 overflow-hidden" }, We = ["src", "alt"], qe = /* @__PURE__ */ Z({
32
32
  __name: "ImageUpdatePreview",
33
33
  props: {
34
34
  matchedImages: {},
@@ -44,7 +44,7 @@ const we = { class: "h-full flex flex-col" }, xe = { class: "flex items-center j
44
44
  F("update", u.matchedImages);
45
45
  }
46
46
  return (w, l) => {
47
- const x = W("fm-button");
47
+ const x = G("fm-button");
48
48
  return r(), c("div", we, [
49
49
  s("div", xe, [
50
50
  l[2] || (l[2] = s("h2", { class: "fm-typo-en-headline-sm font-semibold" }, "Update Product Images", -1)),
@@ -134,12 +134,12 @@ const we = { class: "h-full flex flex-col" }, xe = { class: "flex items-center j
134
134
  }, [
135
135
  s("div", Ve, U(m.filename), 1),
136
136
  s("div", Ze, [
137
- s("div", We, [
137
+ s("div", Ge, [
138
138
  s("img", {
139
139
  src: m.imageUrl,
140
140
  alt: m.filename,
141
141
  class: "w-full h-full object-cover"
142
- }, null, 8, qe)
142
+ }, null, 8, We)
143
143
  ])
144
144
  ])
145
145
  ]))), 128))
@@ -151,7 +151,7 @@ const we = { class: "h-full flex flex-col" }, xe = { class: "flex items-center j
151
151
  };
152
152
  }
153
153
  });
154
- var Je = { firebase: { storageBucket: "image.feedme.cc" } };
154
+ var Je = { firebase: { storageBucket: "image.feedmedev.cc" } };
155
155
  const He = {
156
156
  key: 0,
157
157
  class: "h-screen"
@@ -168,7 +168,7 @@ const He = {
168
168
  filename: a
169
169
  });
170
170
  }
171
- async function q(e, a = "images.zip") {
171
+ async function W(e, a = "images.zip") {
172
172
  const o = new O();
173
173
  e.forEach(({ blob: d, filename: n }) => {
174
174
  d && o.file(n, d);
@@ -176,7 +176,7 @@ const He = {
176
176
  const g = await o.generateAsync({ type: "blob" });
177
177
  ne.saveAs(g, a);
178
178
  }
179
- async function G() {
179
+ async function q() {
180
180
  const e = x.value.filter((a) => a.thumbnail);
181
181
  if (e.length === 0) {
182
182
  F.open({ type: "error", title: "No downloadable images found" });
@@ -215,7 +215,7 @@ const He = {
215
215
  })).filter((n) => n !== null);
216
216
  if (a.value = "Creating ZIP file...", d.length > 0) {
217
217
  const n = `images_${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.zip`;
218
- await q(d, n);
218
+ await W(d, n);
219
219
  } else
220
220
  throw new Error("Failed to fetch any images");
221
221
  },
@@ -354,10 +354,10 @@ const He = {
354
354
  a.value = "";
355
355
  }
356
356
  return ye().resetOnMount(), (e, a) => {
357
- const o = W("fm-button");
357
+ const o = G("fm-button");
358
358
  return r(), c(P, null, [
359
359
  _.value ? (r(), c("div", He, [
360
- I(Ge, {
360
+ I(qe, {
361
361
  "matched-images": w.value,
362
362
  "unmatched-images": l.value,
363
363
  onCancel: te,
@@ -383,7 +383,7 @@ const He = {
383
383
  "text-color": h(S).TypoSecondary,
384
384
  variant: h(z).Primary,
385
385
  label: "Download Images",
386
- onClick: G
386
+ onClick: q
387
387
  }, null, 8, ["bg-color", "text-color", "variant"]),
388
388
  I(o, {
389
389
  "bg-color": h(S).NeutralGray100,
@@ -0,0 +1,283 @@
1
+ import { defineComponent as Y, computed as v, ref as q, resolveComponent as w, createBlock as y, openBlock as p, unref as e, withCtx as d, createElementVNode as u, toDisplayString as G, createVNode as o, createCommentVNode as O, createElementBlock as H, Fragment as N } from "vue";
2
+ import { D as S } from "./dayjs.min-Bk9ZYtg9.js";
3
+ import { M as te, w as oe } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-DwXWiz77.js";
4
+ import { J as ne, F as ae } from "./jszip.min-Dbu7MIcI.js";
5
+ import { u as j, G as J, B, e as P, A as Z, D as re, H as A, I as R } from "./menu-D_Cckz_p.js";
6
+ import { useCoreStore as se, useI18n as ie } from "@feedmepos/mf-common";
7
+ import { useDialog as K, useDialogChild as le, useSnackbar as Q, useBreakpoints as ue, FmButtonVariant as $, FmButtonColorThemeVariant as x } from "@feedmepos/ui-library";
8
+ import { _ as V } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
9
+ import { _ as me, a as z } from "./BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-DhrXKy3b.js";
10
+ import { _ as ce } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
11
+ import { u as de, a as pe } from "./menu-DT5c-FqY.js";
12
+ import { u as fe } from "./item-DX44khy2.js";
13
+ import { _ as L, a as _e } from "./Product.vue_vue_type_script_setup_true_lang-DcMr8wkh.js";
14
+ import { L as U } from "./LinkProductSideSheet-32r2l60j.js";
15
+ import { _ as ve } from "./TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CLNlU4BJ.js";
16
+ import { u as ge } from "./Thumbnail.vue_vue_type_script_setup_true_lang-szHjE_UD.js";
17
+ import { m as be } from "./toExcel-CWyoDcRd.js";
18
+ const ye = { class: "space-y-24 mb-24" }, ke = ["innerHTML"], xe = { class: "flex justify-end gap-8" }, Me = /* @__PURE__ */ Y({
19
+ __name: "ConfirmActionDialog",
20
+ props: {
21
+ description: {},
22
+ value: {},
23
+ message: { default: "To confirm your action, type <b>[[value]]</b> in the text field." }
24
+ },
25
+ setup(F) {
26
+ const t = F, M = v(() => t.message.replace("[[value]]", t.value)), n = q(""), h = K(), { emitAction: k } = le();
27
+ return (s, i) => {
28
+ const f = w("FmTextField"), m = w("FmButton"), g = w("FmForm");
29
+ return p(), y(g, {
30
+ "on-validation-success": () => e(k)("primary"),
31
+ "blame-form-child-on-validation-failed": ""
32
+ }, {
33
+ default: d(() => [
34
+ u("div", ye, [
35
+ u("div", null, G(s.description), 1),
36
+ u("div", { innerHTML: M.value }, null, 8, ke),
37
+ u("div", null, [
38
+ o(f, {
39
+ modelValue: n.value,
40
+ "onUpdate:modelValue": [
41
+ i[0] || (i[0] = (l) => n.value = l),
42
+ i[1] || (i[1] = () => {
43
+ })
44
+ ],
45
+ placeholder: s.value,
46
+ rules: [(l) => l === s.value || "Value does not match"]
47
+ }, null, 8, ["modelValue", "placeholder", "rules"])
48
+ ]),
49
+ u("div", xe, [
50
+ o(m, {
51
+ label: "Cancel",
52
+ variant: "secondary",
53
+ onClick: i[2] || (i[2] = (l) => e(h).close())
54
+ }),
55
+ o(m, {
56
+ label: "Confirm",
57
+ type: "submit"
58
+ })
59
+ ])
60
+ ])
61
+ ]),
62
+ _: 1
63
+ }, 8, ["on-validation-success"]);
64
+ };
65
+ }
66
+ }), he = /* @__PURE__ */ Y({
67
+ __name: "Migrate",
68
+ setup(F) {
69
+ const t = j(), M = se(), n = Q(), { minor: h } = J(n), k = q(!1), s = K();
70
+ async function i() {
71
+ f.value || k.value || s.open({
72
+ title: "Migrate to new version",
73
+ contentComponent: Me,
74
+ contentComponentProps: {
75
+ value: "MIGRATE",
76
+ description: "Do you want to migrate to new version? Once migrate it will unable to revert to the older version."
77
+ }
78
+ }).onPrimary(async () => {
79
+ s.close(), await h(
80
+ async () => {
81
+ await t.migrate(), setTimeout(() => {
82
+ window.location.reload();
83
+ }, 2e3);
84
+ },
85
+ {
86
+ isLoading: k,
87
+ customId: t.state.menu._id,
88
+ message: "Migrating menu",
89
+ successMessage: "Migration completed"
90
+ }
91
+ );
92
+ });
93
+ }
94
+ const f = v(() => {
95
+ const m = M.restaurants.value;
96
+ if (!m.length) return "Required at least one restaurant to migrate";
97
+ const g = m.filter((b) => !b.posVersion || !B.Pos.canUse({ feature: P.F_FEATURE.enum.menuV4, posVersion: b.posVersion }));
98
+ return g.length ? `Upgrade POS to V${B.Pos.minVersionToUse(P.F_FEATURE.enum.menuV4)} to use new menu: ${g.map((b) => b.profile.name).join(", ")}` : null;
99
+ });
100
+ return v(() => f.value ? f.value : "Migrate your menu to new version to enjoy more features. Content of new menu will remain the same as current."), (m, g) => {
101
+ const l = w("FmSnackbar");
102
+ return !f.value && e(t).version !== e(Z.F_MENU_VERSION).enum.v4 ? (p(), y(l, {
103
+ key: 0,
104
+ class: "!max-w-full",
105
+ title: "New version of menu is out now!",
106
+ description: "Migrate your current menu version to the latest to enjoy more features such as product sequential dispatch, serving sequence, scheduler and more! Your content and current setting will be preserved.",
107
+ variant: "info",
108
+ action: "Migrate",
109
+ "z-index": 0,
110
+ onOnAction: i
111
+ })) : O("", !0);
112
+ };
113
+ }
114
+ }), Se = { class: "flex-1 flex justify-between gap-8 pl-8" }, we = { class: "flex items-center" }, Ce = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Fe = { class: "fm-typo-en-body-md-600 font-semibold" }, $e = { class: "flex gap-8" }, Oe = /* @__PURE__ */ Y({
115
+ __name: "Products",
116
+ setup(F) {
117
+ const { t } = ie(), M = J(Q()), n = j(), h = v(() => n.rules.item), k = fe(), s = v(() => !n.state.currentSchedulerId), { selectedCategories: i } = de(), f = v(() => ({
118
+ ...re.menuV4ToV3(A(n.state.menu)),
119
+ _id: n.state.menu._id,
120
+ _rev: n.state.menu._rev
121
+ })), m = v(() => {
122
+ const c = R.flatten(i.value.map((a) => a.items));
123
+ return R.uniqBy(c, (a) => a._id).length;
124
+ });
125
+ async function g(c, a) {
126
+ const _ = new ne();
127
+ for (let C = 0; C < c.length; C++) {
128
+ const ee = await c[C].xlsx.writeBuffer();
129
+ _.file(`${a[C]}.xlsx`, ee);
130
+ }
131
+ const r = await _.generateAsync({ type: "blob" });
132
+ ae.saveAs(r, `books_${S().format("DD-MM-YYYY_HH-mm")}.zip`);
133
+ }
134
+ async function l() {
135
+ await M.minor(
136
+ async () => {
137
+ if (await n.readMenu(), n.version === Z.F_MENU_VERSION.enum.v4) {
138
+ const c = A(n.state.menu), a = new te(c).exportToExcel(), _ = [
139
+ `menu_${S().format("DD-MM-YYYY_HH-mm")}`,
140
+ `addonGroup_${S().format("DD-MM-YYYY_HH-mm")}`,
141
+ `itemLinkedAddon${S().format("DD-MM-YYYY_HH-mm")}`
142
+ ];
143
+ g(a, _);
144
+ } else {
145
+ const c = be(f.value), a = `menu_${S().format("DD-MM-YYYY_HH-mm")}`;
146
+ await oe(c, `${a}.xlsx`, {
147
+ bookType: "xlsx",
148
+ bookSST: !1,
149
+ type: "array"
150
+ });
151
+ }
152
+ },
153
+ { successMessage: "Menu exported", customId: n.state.menu._id }
154
+ );
155
+ }
156
+ const {
157
+ menuItems: b,
158
+ linkItemRules: E,
159
+ handleSubmit: D,
160
+ catalogManager: T,
161
+ schedulerManager: I
162
+ } = ge(!1), W = ue(), X = v(() => W.breakpoints.value.xs);
163
+ return pe().resetOnMount(), (c, a) => {
164
+ const _ = w("fm-button");
165
+ return p(), y(ce, {
166
+ heading: e(t)("menu.products.title")
167
+ }, {
168
+ default: d(() => [
169
+ o(he),
170
+ o(_e)
171
+ ]),
172
+ "append-heading": d(() => [
173
+ u("div", Se, [
174
+ u("div", we, [
175
+ u("div", Ce, [
176
+ u("p", Fe, G(m.value), 1)
177
+ ])
178
+ ]),
179
+ u("div", $e, [
180
+ X.value ? (p(), y(L, { key: 1 }, {
181
+ default: d(({ trigger: r }) => [
182
+ o(me, null, {
183
+ default: d(() => [
184
+ o(z, {
185
+ label: e(t)("menu.products.actions.export"),
186
+ onClick: l
187
+ }, null, 8, ["label"]),
188
+ o(z, {
189
+ label: e(t)("menu.products.actions.import"),
190
+ onClick: r
191
+ }, null, 8, ["label", "onClick"])
192
+ ]),
193
+ _: 2
194
+ }, 1024)
195
+ ]),
196
+ _: 1
197
+ })) : (p(), H(N, { key: 0 }, [
198
+ o(ve, null, {
199
+ default: d(({ trigger: r }) => [
200
+ o(_, {
201
+ label: e(t)("menu.tree_editor.title"),
202
+ "bg-color": e(x).NeutralGray100,
203
+ "text-color": e(x).TypoSecondary,
204
+ variant: e($).Primary,
205
+ onClick: r
206
+ }, null, 8, ["label", "bg-color", "text-color", "variant", "onClick"])
207
+ ]),
208
+ _: 1
209
+ }),
210
+ o(_, {
211
+ "bg-color": e(x).NeutralGray100,
212
+ "text-color": e(x).TypoSecondary,
213
+ variant: e($).Primary,
214
+ label: e(t)("menu.products.actions.export"),
215
+ onClick: l
216
+ }, null, 8, ["bg-color", "text-color", "variant", "label"]),
217
+ o(L, null, {
218
+ default: d(({ trigger: r }) => [
219
+ o(_, {
220
+ "bg-color": e(x).NeutralGray100,
221
+ "text-color": e(x).TypoSecondary,
222
+ variant: e($).Primary,
223
+ label: e(t)("menu.products.actions.import"),
224
+ onClick: r
225
+ }, null, 8, ["bg-color", "text-color", "variant", "label", "onClick"])
226
+ ]),
227
+ _: 1
228
+ })
229
+ ], 64)),
230
+ m.value > 0 ? (p(), H(N, { key: 2 }, [
231
+ h.value.create ? (p(), y(V, {
232
+ key: 0,
233
+ label: e(t)("menu.products.actions.add"),
234
+ "prepend-icon": "add",
235
+ onClick: a[0] || (a[0] = (r) => e(k).create(null))
236
+ }, null, 8, ["label"])) : s.value ? (p(), y(U, {
237
+ key: 1,
238
+ "categorized-items": e(T).linkableItems.value,
239
+ "initial-value": e(T).currentItems.value,
240
+ "show-variant": !1,
241
+ "menu-items": e(b),
242
+ "link-item-rules": e(E),
243
+ "no-scheduler": s.value,
244
+ onSubmit: e(D)
245
+ }, {
246
+ default: d(({ trigger: r }) => [
247
+ o(V, {
248
+ label: e(t)("menu.products.actions.link"),
249
+ "prepend-icon": "link",
250
+ onClick: r
251
+ }, null, 8, ["label", "onClick"])
252
+ ]),
253
+ _: 1
254
+ }, 8, ["categorized-items", "initial-value", "menu-items", "link-item-rules", "no-scheduler", "onSubmit"])) : (p(), y(U, {
255
+ key: 2,
256
+ "categorized-items": e(I).linkableItems.value,
257
+ "initial-value": e(I).currentItems.value,
258
+ "show-variant": !1,
259
+ "menu-items": e(b),
260
+ "link-item-rules": e(E),
261
+ "no-scheduler": s.value,
262
+ onSubmit: e(D)
263
+ }, {
264
+ default: d(({ trigger: r }) => [
265
+ o(V, {
266
+ label: e(t)("menu.products.actions.apply_scheduler"),
267
+ onClick: r
268
+ }, null, 8, ["label", "onClick"])
269
+ ]),
270
+ _: 1
271
+ }, 8, ["categorized-items", "initial-value", "menu-items", "link-item-rules", "no-scheduler", "onSubmit"]))
272
+ ], 64)) : O("", !0)
273
+ ])
274
+ ])
275
+ ]),
276
+ _: 1
277
+ }, 8, ["heading"]);
278
+ };
279
+ }
280
+ });
281
+ export {
282
+ Oe as default
283
+ };
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as K, ref as I, computed as S, onMounted as ne, resolveComponent as C, createElementBlock as R, openBlock as h, createVNode as n, createElementVNode as o, toDisplayString as F, unref as i, Fragment as E, renderList as j, createBlock as O, withCtx as L, createCommentVNode as ue, withModifiers as N, h as H } from "vue";
2
- import { D as X } from "./dayjs.min-DeSv8lfJ.js";
2
+ import { D as X } from "./dayjs.min-Bk9ZYtg9.js";
3
3
  import { useRouter as ie } from "vue-router";
4
- import { A as re, e as ce, D as Z, a9 as de, H as J, I as me, u as pe, G as ge, a1 as ve } from "./menu-DcGo3sn5.js";
4
+ import { B as re, e as ce, G as Z, a8 as de, H as J, I as me, u as pe, A as ge, a0 as ve } from "./menu-D_Cckz_p.js";
5
5
  import { useI18n as Y, useCoreStore as be, RestaurantSelector as fe } from "@feedmepos/mf-common";
6
6
  import { useSnackbar as ee, useDialogChild as _e, useDialog as he, components as Q } from "@feedmepos/ui-library";
7
7
  import { _ as ye } from "./TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js";
8
- import { _ as Ce } from "./app-D23N7tJ0.js";
8
+ import { _ as Ce } from "./app-CAhJXoa3.js";
9
9
  import { a as ke, w as we } from "./tooltip-B5BiPMx9.js";
10
10
  import { u as xe } from "./discardConfirm-BHni0LNu.js";
11
11
  import { _ as Ve } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
@@ -1,16 +1,16 @@
1
1
  import { defineComponent as z, computed as h, ref as w, reactive as Q, watch as W, resolveComponent as V, createElementBlock as F, openBlock as g, Fragment as C, renderSlot as X, createVNode as d, unref as e, withCtx as x, createElementVNode as r, toDisplayString as S, getCurrentInstance as Z, h as D, withModifiers as L, createBlock as O, createCommentVNode as ee, normalizeClass as K, renderList as te } from "vue";
2
2
  import { useI18n as U } from "@feedmepos/mf-common";
3
- import { useSnackbar as $, components as j, useDialog as ne, FmButtonVariant as G, useBreakpoints as oe } from "@feedmepos/ui-library";
3
+ import { useSnackbar as A, components as j, useDialog as ne, FmButtonVariant as G, useBreakpoints as oe } from "@feedmepos/ui-library";
4
4
  import { _ as ae } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
5
- import { _ as le } from "./app-D23N7tJ0.js";
6
- import { O as q, D as A, H as ie, B as P, I as se, e as B, J as I, G as T, u as H } from "./menu-DcGo3sn5.js";
5
+ import { _ as le } from "./app-CAhJXoa3.js";
6
+ import { O as q, G as $, H as ie, D as P, I as se, e as Y, J as I, A as T, u as H } from "./menu-D_Cckz_p.js";
7
7
  import { _ as re } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
8
8
  import { _ as ce } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
9
9
  import { defineStore as ue } from "pinia";
10
- import { _ as Y, g as me } from "./InventoryBinding.vue_vue_type_script_setup_true_lang-MoApzjt6.js";
10
+ import { _ as B, g as me } from "./InventoryBinding.vue_vue_type_script_setup_true_lang-Bf9GYRjF.js";
11
11
  import { u as de } from "./discardConfirm-BHni0LNu.js";
12
12
  import { c as pe } from "./check-C9mY6LiX.js";
13
- import "./unit-BsNOQHvZ.js";
13
+ import "./unit-CLa8caCJ.js";
14
14
  import { c as fe } from "./createComponentProgrammatically-Bt2rn1IQ.js";
15
15
  const _e = { class: "fm-typo-en-title-md-600" }, ve = { class: "pt-8 space-y-40" }, ye = { class: "flex flex-row gap-16" }, ge = { class: "flex gap-8 items-center justify-start" }, be = /* @__PURE__ */ z({
16
16
  __name: "Form",
@@ -19,7 +19,7 @@ const _e = { class: "fm-typo-en-title-md-600" }, ve = { class: "pt-8 space-y-40"
19
19
  invalidSkuAndRecipe: {}
20
20
  },
21
21
  setup(R, { expose: c }) {
22
- const { t: u } = U(), p = R, f = q(A($())), b = h(() => p.initialValue ? u("menu.recipe.update") : u("menu.recipe.add")), _ = h(
22
+ const { t: u } = U(), p = R, f = q($(A())), b = h(() => p.initialValue ? u("menu.recipe.update") : u("menu.recipe.add")), _ = h(
23
23
  () => p.initialValue ? u("menu.common.actions.update") : u("menu.common.actions.add")
24
24
  ), v = w(!1), a = w(!1), k = (t) => {
25
25
  pe.isBoolean(t) ? a.value = t : a.value = !a.value;
@@ -120,16 +120,16 @@ const _e = { class: "fm-typo-en-title-md-600" }, ve = { class: "pt-8 space-y-40"
120
120
  rules: [(m) => m.length > 0 || e(u)("menu.recipe.validation.bind_required")]
121
121
  }, {
122
122
  default: x(() => [
123
- d(Y, {
123
+ d(B, {
124
124
  modelValue: n.contains,
125
125
  "onUpdate:modelValue": i[1] || (i[1] = (m) => n.contains = m),
126
- type: e(B.F_INVENTORY_BINDING_TYPE).enum.RECIPE,
126
+ type: e(Y.F_INVENTORY_BINDING_TYPE).enum.RECIPE,
127
127
  "filter-option-ids": o.value
128
128
  }, null, 8, ["modelValue", "type", "filter-option-ids"]),
129
- d(Y, {
129
+ d(B, {
130
130
  modelValue: n.contains,
131
131
  "onUpdate:modelValue": i[2] || (i[2] = (m) => n.contains = m),
132
- type: e(B.F_INVENTORY_BINDING_TYPE).enum.SKU,
132
+ type: e(Y.F_INVENTORY_BINDING_TYPE).enum.SKU,
133
133
  "filter-option-ids": E.value
134
134
  }, null, 8, ["modelValue", "type", "filter-option-ids"])
135
135
  ]),
@@ -143,7 +143,7 @@ const _e = { class: "fm-typo-en-title-md-600" }, ve = { class: "pt-8 space-y-40"
143
143
  };
144
144
  }
145
145
  }), he = be, Ve = ue("recipe-manager", () => {
146
- const R = ne(), c = $(), u = A(c), p = q(u), f = H(), b = Z(), { t: _ } = U(), v = (o) => {
146
+ const R = ne(), c = A(), u = $(c), p = q(u), f = H(), b = Z(), { t: _ } = U(), v = (o) => {
147
147
  var l, t;
148
148
  const { vNode: y } = fe(
149
149
  he,
@@ -226,8 +226,8 @@ const _e = { class: "fm-typo-en-title-md-600" }, ve = { class: "pt-8 space-y-40"
226
226
  setup(R) {
227
227
  const {
228
228
  t: c
229
- } = U(), u = $();
230
- A(u);
229
+ } = U(), u = A();
230
+ $(u);
231
231
  const p = H(), f = Ve(), b = h(() => p.recipes), _ = h(() => b.value.filter((y) => `${y.name}`.toLowerCase().includes(v.value.toLowerCase()))), v = w(""), a = w([{
232
232
  accessorKey: "name",
233
233
  header: () => c("menu.recipe.table.columns.name"),
@@ -1,10 +1,10 @@
1
1
  import { defineComponent as N, computed as y, h as c, withModifiers as U, ref as V, resolveComponent as _, createBlock as k, openBlock as d, unref as m, withCtx as h, createElementBlock as D, createVNode as f, Fragment as H, createElementVNode as l, renderList as T, toDisplayString as S, createCommentVNode as I } from "vue";
2
- import { G as i, O as W, u as G, D as Q } from "./menu-DcGo3sn5.js";
2
+ import { A as i, O as W, u as G, G as Q } from "./menu-D_Cckz_p.js";
3
3
  import { useI18n as J } from "@feedmepos/mf-common";
4
4
  import { components as X, useDialog as Z, useSnackbar as ee } from "@feedmepos/ui-library";
5
5
  import { _ as te } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
6
- import { _ as ne } from "./app-D23N7tJ0.js";
7
- import { d as ae, _ as oe, u as se, c as le } from "./scheduler-BT3EJBK6.js";
6
+ import { _ as ne } from "./app-CAhJXoa3.js";
7
+ import { d as ae, _ as oe, u as se, c as le } from "./scheduler-D6UbXLXR.js";
8
8
  import { _ as re } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
9
9
  import { _ as ue } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
10
10
  const ce = {
@@ -76,7 +76,7 @@ const ce = {
76
76
  outline: !0,
77
77
  color: "neutral-gray-400",
78
78
  onClick: U(() => {
79
- j(e.row.original);
79
+ A(e.row.original);
80
80
  }, ["stop", "prevent"])
81
81
  })])
82
82
  }]), r = {
@@ -117,7 +117,7 @@ const ce = {
117
117
  C.value || (t = x.value) == null || t.show(e);
118
118
  }
119
119
  const O = Z();
120
- function j(e) {
120
+ function A(e) {
121
121
  let t = [c("span", a("menu.scheduler.dialogs.remove.message", {
122
122
  name: e.name
123
123
  })), c("span", {
@@ -143,7 +143,7 @@ const ce = {
143
143
  const t = e._id ? se(e) : le(e);
144
144
  await w.updateMenu(t, e.name);
145
145
  }
146
- const A = G(), B = y(() => A.categorizedRawMenuItems), p = y(() => A.state.menu.modules.scheduler), w = W(Q(ee())), C = y(() => w.checkMenuIsLoading()), g = V(""), K = y(() => {
146
+ const j = G(), B = y(() => j.categorizedRawMenuItems), p = y(() => j.state.menu.modules.scheduler), w = W(Q(ee())), C = y(() => w.checkMenuIsLoading()), g = V(""), K = y(() => {
147
147
  const e = g.value.toLowerCase();
148
148
  return e ? p.value.filter((t) => t.name.toLowerCase().includes(e)) : p.value;
149
149
  });
@@ -206,7 +206,7 @@ const ce = {
206
206
  icon: "delete",
207
207
  variant: "tertiary",
208
208
  "text-color": "neutral-gray-400",
209
- onClick: U(() => j(n), ["stop"])
209
+ onClick: U(() => A(n), ["stop"])
210
210
  }, null, 8, ["onClick"])]),
211
211
  _: 2
212
212
  }, 1032, ["label", "onClick"]))), 128))]),