@feedmepos/mf-menu 0.32.64 → 0.32.65

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 (72) hide show
  1. package/dist/{App-W8bH6kiT.js → App-rjcnTQzq.js} +8 -8
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-DvHmwIP2.js → ApplyProduct.vue_vue_type_script_setup_true_lang-BlX-ygeo.js} +3 -3
  3. package/dist/{ApplyProductDialog.vue_vue_type_script_setup_true_lang-2nFIpZv4.js → ApplyProductDialog.vue_vue_type_script_setup_true_lang-DTEZouRz.js} +3 -3
  4. package/dist/{Catalog-pywklogh.js → Catalog-nWzKN1u3.js} +6 -6
  5. package/dist/{Category-UMDcymDA.js → Category-DoUtDyuB.js} +14 -14
  6. package/dist/{Category-CLs58F_F.js → Category-Q42BO86t.js} +8 -8
  7. package/dist/{CookingGuide-Cefv83hr.js → CookingGuide-DGVhn_Yb.js} +5 -5
  8. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-C9CvjWEO.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-Dc_Ec9Pf.js} +1 -1
  9. package/dist/{Group-Ujeo9noG.js → Group-B9vMDg2m.js} +3 -3
  10. package/dist/{Group-CfxNpgp7.js → Group-D8st1q0o.js} +1 -1
  11. package/dist/{Group.vue_vue_type_script_setup_true_lang-C-eZ5PGS.js → Group.vue_vue_type_script_setup_true_lang-CV_w5c7T.js} +48 -48
  12. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-qTEz4XWJ.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-36kp3qi8.js} +5 -5
  13. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-Kf10i_T2.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-ZbhwNALE.js} +6282 -6280
  14. package/dist/{Ingredient-CsHbFizZ.js → Ingredient-DWN4vTKf.js} +4 -4
  15. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-NKoRT-LI.js → InventoryBinding.vue_vue_type_script_setup_true_lang-DJrz0wWm.js} +2 -2
  16. package/dist/{LinkProductSideSheet-B-Trz4a6.js → LinkProductSideSheet-DXmxJs-1.js} +4 -4
  17. package/dist/{MenuSetting-BNWjJAp4.js → MenuSetting-BSlQXo8m.js} +7 -7
  18. package/dist/{OrderPacing-DhKmymC7.js → OrderPacing-B8pgEMjf.js} +5 -5
  19. package/dist/{PrintRoute-DaIY94Ts.js → PrintRoute-agfebph4.js} +5 -5
  20. package/dist/{Product-SBeMVZBU.js → Product-CaA1CdTN.js} +1 -1
  21. package/dist/{Product.vue_vue_type_script_setup_true_lang-CDoJwAFZ.js → Product.vue_vue_type_script_setup_true_lang-Bsx6JceZ.js} +108 -108
  22. package/dist/{ProductInternalTools-BAHMukHo.js → ProductInternalTools-DHQz_Z8o.js} +25 -25
  23. package/dist/{Products-CvUK4ngP.js → Products-CeVnRRFO.js} +63 -63
  24. package/dist/{Publish-BqI8LP_Y.js → Publish-rN34cEkS.js} +4 -4
  25. package/dist/{Recipe--LCvPofA.js → Recipe-C_qTZ_E1.js} +5 -5
  26. package/dist/{RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-DaqG3ZEC.js → RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-C6lkwlc5.js} +1 -1
  27. package/dist/{RuleView.vue_vue_type_script_setup_true_lang-DsCNLIVd.js → RuleView.vue_vue_type_script_setup_true_lang-LbagGtcn.js} +595 -595
  28. package/dist/{Scheduler-BkXNha9_.js → Scheduler-DeixLUzk.js} +3 -3
  29. package/dist/{ServingSequence-DvF8yZTp.js → ServingSequence-CAmQBzaK.js} +3 -3
  30. package/dist/{Setting-dfdQhacG.js → Setting-C_Dl4MiB.js} +5 -5
  31. package/dist/{Subcategory-DoiEnCY-.js → Subcategory-C8DHzzkd.js} +6 -6
  32. package/dist/{Takeaway-CfTKoZgq.js → Takeaway-CIRpXPFx.js} +1 -1
  33. package/dist/{Takeaway-Pyol2JIm.js → Takeaway-CxYihXC0.js} +4 -4
  34. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-A2Uz3Vx5.js → Takeaway.vue_vue_type_script_setup_true_lang-CcSjxPY4.js} +5 -5
  35. package/dist/{TranslationFieldSection.vue_vue_type_script_setup_true_lang-BAMLQtFW.js → TranslationFieldSection.vue_vue_type_script_setup_true_lang-D-ojP61R.js} +1 -1
  36. package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-Bx6Dfb9q.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-BztGh7n9.js} +2 -2
  37. package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Bex1NCnU.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Cv4iVhML.js} +341 -340
  38. package/dist/{Unit-ODy76xeS.js → Unit-Cd0y2m5k.js} +2 -2
  39. package/dist/{Variant-BFUqQyub.js → Variant-B2CKhSOl.js} +3 -3
  40. package/dist/{_id_-DQO6Zi8b.js → _id_-DZiXY0H3.js} +10 -10
  41. package/dist/{app-BNF3d7ks.js → app-T7VNSy7v.js} +1 -1
  42. package/dist/{app-BNqI06Lw.js → app-T8AXgSEa.js} +32 -32
  43. package/dist/app.js +1 -1
  44. package/dist/apps/mf-menu/src/helper/itemCategories.d.ts +18 -0
  45. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  46. package/dist/assets/{override-menu-BCrsilnp.js → linked-status-CCYZRm4Q.js} +3 -3
  47. package/dist/assets/{menu-export-oSHHIKfH.js → menu-export-CAHQqTea.js} +34 -34
  48. package/dist/assets/{linked-status-OJYsf1K1.js → override-menu-CHSXJZzL.js} +3 -3
  49. package/dist/assets/{validate-menu-CoDW8e4r.js → validate-menu-B4fZvuxj.js} +2 -2
  50. package/dist/{catalog-BiUOGVhu.js → catalog-JKO0yOoK.js} +1 -1
  51. package/dist/{catalogSetting-Dt03eB79.js → catalogSetting-88ecNK3c.js} +1 -1
  52. package/dist/{currency-I2Plgz6g.js → currency-FtZ1Kndg.js} +1 -1
  53. package/dist/{dayjs.min-CVgq1MI5.js → dayjs.min-4vLGgFCE.js} +2 -2
  54. package/dist/{discardConfirm-CU5H7XLz.js → discardConfirm-CM6g-V_v.js} +1 -1
  55. package/dist/{index-OUaL4kl7.js → index-BRKz6YXB.js} +5 -5
  56. package/dist/{index-D79td5bo.js → index-DJLvriHh.js} +6 -6
  57. package/dist/index-wiJWDZ8Q.js +310 -0
  58. package/dist/{index.vue_vue_type_script_setup_true_lang-BJ5dPd5h.js → index.vue_vue_type_script_setup_true_lang-qm3HbXBN.js} +895 -895
  59. package/dist/{item-BPryyFAB.js → item-DZ7QwbXg.js} +1262 -1338
  60. package/dist/{jszip.min-D3CS7h7J.js → jszip.min-CMMOVzck.js} +167 -167
  61. package/dist/{linkProducts-ClCfYWFx.js → linkProducts-H4GRfufL.js} +4 -4
  62. package/dist/{memberPricing-CLr-Y_7e.js → memberPricing-DHWy5fqz.js} +1 -1
  63. package/dist/{menu-gBc-za7C.js → menu-CIm-Royr.js} +1 -1
  64. package/dist/{menuV2-D7O1K9Ej.js → menuV2-BAdmIxrF.js} +52 -52
  65. package/dist/{order_pacing-DVn2Kb9a.js → order_pacing-D58D3fak.js} +5 -5
  66. package/dist/{priceTier-33L1xIZW.js → priceTier-BQ8NefKy.js} +1 -1
  67. package/dist/{rules-C7ujXDzl.js → rules-CCMx9A-T.js} +3 -3
  68. package/dist/{scheduler-Dzj2Ed1a.js → scheduler-CV0r5tCc.js} +5 -5
  69. package/dist/{toExcel-CGOr53pl.js → toExcel-D4fh3tgH.js} +2 -2
  70. package/dist/{unit-CfREeFuX.js → unit-p_16wmg2.js} +3 -3
  71. package/package.json +1 -1
  72. package/dist/index-CD_omf3p.js +0 -222
@@ -1,13 +1,13 @@
1
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-D3CS7h7J.js";
3
- import { l as D } from "./discardConfirm-CU5H7XLz.js";
2
+ import { J as O, F as ne } from "./jszip.min-CMMOVzck.js";
3
+ import { l as D } from "./discardConfirm-CM6g-V_v.js";
4
4
  import { useI18n as le } from "@feedmepos/mf-common";
5
5
  import { FmButtonVariant as z, useSnackbar as V, useDialog as ie, FmButtonColorThemeVariant as M } from "@feedmepos/ui-library";
6
- import { b as re, u as ce, p as de, x as me } from "./index.vue_vue_type_script_setup_true_lang-BJ5dPd5h.js";
6
+ import { b as re, u as ce, p as de, x as me } from "./index.vue_vue_type_script_setup_true_lang-qm3HbXBN.js";
7
7
  import { _ as ue } from "./PageLayout.vue_vue_type_script_setup_true_lang-BVmHMvKD.js";
8
- import { u as pe, a as ge } from "./menu-gBc-za7C.js";
9
- import { a as fe } from "./Product.vue_vue_type_script_setup_true_lang-CDoJwAFZ.js";
10
- import { aj as he, ak as ye, al as be, am as ve, an as _e } from "./item-BPryyFAB.js";
8
+ import { u as ge, a as pe } from "./menu-CIm-Royr.js";
9
+ import { a as fe } from "./Product.vue_vue_type_script_setup_true_lang-Bsx6JceZ.js";
10
+ import { ae as he, af as ye, ag as be, ah as ve, ai as _e } from "./item-DZ7QwbXg.js";
11
11
  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 = {
12
12
  key: 0,
13
13
  class: "h-full flex flex-col"
@@ -152,14 +152,14 @@ const we = { class: "h-full flex flex-col" }, xe = { class: "flex items-center j
152
152
  };
153
153
  }
154
154
  });
155
- var Je = { firebase: { storageBucket: "image.feedme.cc" } };
155
+ var Je = { firebase: { storageBucket: "image.feedmedev.cc" } };
156
156
  const He = {
157
157
  key: 0,
158
158
  class: "h-screen"
159
159
  }, Xe = { class: "flex-1 flex justify-between gap-8 pl-8" }, Ke = { class: "flex items-center" }, Qe = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Ye = { class: "fm-typo-en-body-md-600 font-semibold" }, et = { class: "flex gap-8" }, mt = /* @__PURE__ */ Z({
160
160
  __name: "ProductInternalTools",
161
161
  setup(L) {
162
- const { t: j } = le(), u = re(V()), F = V(), y = ie(), b = ce(), { selectedCategories: k } = pe(), _ = v(!1), S = v(), w = v([]), l = v([]), x = $(() => {
162
+ const { t: j } = le(), u = re(V()), F = V(), y = ie(), b = ce(), { selectedCategories: k } = ge(), _ = v(!1), S = v(), w = v([]), l = v([]), x = $(() => {
163
163
  const e = D.flatten(k.value.map((a) => a.items));
164
164
  return D.uniqBy(e, (a) => a._id);
165
165
  }), m = $(() => x.value.length);
@@ -174,8 +174,8 @@ const He = {
174
174
  e.forEach(({ blob: d, filename: n }) => {
175
175
  d && o.file(n, d);
176
176
  });
177
- const p = await o.generateAsync({ type: "blob" });
178
- ne.saveAs(p, a);
177
+ const g = await o.generateAsync({ type: "blob" });
178
+ ne.saveAs(g, a);
179
179
  }
180
180
  async function G() {
181
181
  const e = x.value.filter((a) => a.thumbnail);
@@ -198,12 +198,12 @@ const He = {
198
198
  const a = v("Preparing download...");
199
199
  await u.minor(
200
200
  async () => {
201
- const o = e.filter((n) => n.thumbnail).map((n, g) => {
202
- let t = n.name || `image_${Date.now()}_${g}`;
201
+ const o = e.filter((n) => n.thumbnail).map((n, p) => {
202
+ let t = n.name || `image_${Date.now()}_${p}`;
203
203
  return t += ".jpg", {
204
204
  url: n.thumbnail,
205
205
  filename: t,
206
- index: g + 1
206
+ index: p + 1
207
207
  };
208
208
  });
209
209
  a.value = `Starting download of ${o.length} images...`;
@@ -229,14 +229,14 @@ const He = {
229
229
  });
230
230
  }
231
231
  async function J(e) {
232
- const o = await new O().loadAsync(e), p = [];
232
+ const o = await new O().loadAsync(e), g = [];
233
233
  for (const [d, n] of Object.entries(o.files)) {
234
234
  if (n.dir || d.includes("__MACOSX/") || !N(d))
235
235
  continue;
236
- const g = await n.async("blob"), t = d.split("/").pop() || d, i = new File([g], t, { type: H(t) });
237
- p.push(i);
236
+ const p = await n.async("blob"), t = d.split("/").pop() || d, i = new File([p], t, { type: H(t) });
237
+ g.push(i);
238
238
  }
239
- return p;
239
+ return g;
240
240
  }
241
241
  function N(e) {
242
242
  const a = [".jpg", ".jpeg", ".png", ".gif", ".webp", ".bmp"], o = e.toLowerCase().substring(e.lastIndexOf("."));
@@ -271,13 +271,13 @@ const He = {
271
271
  const i = t.name.toLowerCase();
272
272
  o.has(i) || o.set(i, t);
273
273
  });
274
- const p = Array.from(o.values()), d = [], n = [], g = /* @__PURE__ */ new Map();
274
+ const g = Array.from(o.values()), d = [], n = [], p = /* @__PURE__ */ new Map();
275
275
  x.value.forEach((t) => {
276
276
  const i = K(t.name);
277
- g.set(i, t);
277
+ p.set(i, t);
278
278
  });
279
- for (const t of p) {
280
- const i = X(t.name), f = g.get(i);
279
+ for (const t of g) {
280
+ const i = X(t.name), f = p.get(i);
281
281
  f ? d.push({
282
282
  productId: f._id,
283
283
  productName: f.name,
@@ -314,7 +314,7 @@ const He = {
314
314
  return t.newImage && (await _e.update(i, t.newImage, Je.firebase.storageBucket), f = me(i)), { productId: t.productId, newImageUrl: f };
315
315
  };
316
316
  a.value = `Starting upload of ${e.length} product images...`;
317
- const p = await ye({
317
+ const g = await ye({
318
318
  items: e,
319
319
  processor: o,
320
320
  batchSize: 5,
@@ -326,9 +326,9 @@ const He = {
326
326
  }
327
327
  });
328
328
  a.value = "Updating product data...";
329
- const d = b.state.menu, n = de(d), g = new Map(p.map((t) => [t == null ? void 0 : t.productId, t]));
329
+ const d = b.state.menu, n = de(d), p = new Map(g.map((t) => [t == null ? void 0 : t.productId, t]));
330
330
  n.modules.item = n.modules.item.map((t) => {
331
- const i = g.get(t._id);
331
+ const i = p.get(t._id);
332
332
  return i && i.newImageUrl ? { ...t, thumbnail: i.newImageUrl } : t;
333
333
  }), await b.updateMenuSetting(n), await b.importMenu(n);
334
334
  },
@@ -354,7 +354,7 @@ const He = {
354
354
  }
355
355
  a.value = "";
356
356
  }
357
- return ge().resetOnMount(), (e, a) => {
357
+ return pe().resetOnMount(), (e, a) => {
358
358
  const o = W("fm-button");
359
359
  return r(), c(P, null, [
360
360
  _.value ? (r(), c("div", He, [
@@ -1,22 +1,22 @@
1
- import { defineComponent as B, computed as _, ref as W, resolveComponent as F, createBlock as m, openBlock as l, unref as e, withCtx as f, createElementVNode as d, toDisplayString as K, createVNode as u, createCommentVNode as w, createElementBlock as P, Fragment as U } from "vue";
2
- import { D as T } from "./dayjs.min-CVgq1MI5.js";
3
- import { J as re, F as ie } from "./jszip.min-D3CS7h7J.js";
4
- import { l as z } from "./discardConfirm-CU5H7XLz.js";
5
- import { w as le } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-Kf10i_T2.js";
6
- import { h as V, A as R } from "./app-BNqI06Lw.js";
7
- import { u as Z, b as Q, a as j, e as q, F as X, m as ue, d as ce, f as me } from "./index.vue_vue_type_script_setup_true_lang-BJ5dPd5h.js";
1
+ import { defineComponent as B, computed as _, ref as W, resolveComponent as F, createBlock as m, openBlock as l, unref as e, withCtx as f, createElementVNode as d, toDisplayString as Z, createVNode as u, createCommentVNode as w, createElementBlock as U, Fragment as z } from "vue";
2
+ import { D as E } from "./dayjs.min-4vLGgFCE.js";
3
+ import { J as re, F as ie } from "./jszip.min-CMMOVzck.js";
4
+ import { l as R } from "./discardConfirm-CM6g-V_v.js";
5
+ import { w as le } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-ZbhwNALE.js";
6
+ import { h as V, A as j } from "./app-T8AXgSEa.js";
7
+ import { u as K, b as Q, a as H, e as q, F as X, m as ue, d as ce, f as me } from "./index.vue_vue_type_script_setup_true_lang-qm3HbXBN.js";
8
8
  import { useCoreStore as ee, useI18n as de } from "@feedmepos/mf-common";
9
- import { useDialog as te, useDialogChild as pe, useSnackbar as oe, useBreakpoints as fe, FmButtonVariant as I, FmButtonColorThemeVariant as S } from "@feedmepos/ui-library";
9
+ import { useDialog as te, useDialogChild as pe, useSnackbar as ne, useBreakpoints as fe, FmButtonVariant as I, FmButtonColorThemeVariant as S } from "@feedmepos/ui-library";
10
10
  import { _ as D } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
11
11
  import { _ as _e, a as O } from "./BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-DhrXKy3b.js";
12
12
  import { _ as ve } from "./PageLayout.vue_vue_type_script_setup_true_lang-BVmHMvKD.js";
13
- import { u as ge, a as be } from "./menu-gBc-za7C.js";
14
- import { w as ye } from "./item-BPryyFAB.js";
15
- import { _ as G, a as ke } from "./Product.vue_vue_type_script_setup_true_lang-CDoJwAFZ.js";
16
- import { L as J } from "./LinkProductSideSheet-B-Trz4a6.js";
17
- import { _ as xe } from "./TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Bex1NCnU.js";
18
- import { u as Se } from "./linkProducts-ClCfYWFx.js";
19
- import { m as he } from "./toExcel-CGOr53pl.js";
13
+ import { u as ge, a as be } from "./menu-CIm-Royr.js";
14
+ import { w as ye } from "./item-DZ7QwbXg.js";
15
+ import { _ as G, a as ke } from "./Product.vue_vue_type_script_setup_true_lang-Bsx6JceZ.js";
16
+ import { L as J } from "./LinkProductSideSheet-DXmxJs-1.js";
17
+ import { _ as xe } from "./TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Cv4iVhML.js";
18
+ import { u as Se } from "./linkProducts-H4GRfufL.js";
19
+ import { m as he } from "./toExcel-D4fh3tgH.js";
20
20
  const Me = { class: "space-y-24 mb-24" }, Ce = ["innerHTML"], we = { class: "flex justify-end gap-8" }, Fe = /* @__PURE__ */ B({
21
21
  __name: "ConfirmActionDialog",
22
22
  props: {
@@ -25,7 +25,7 @@ const Me = { class: "space-y-24 mb-24" }, Ce = ["innerHTML"], we = { class: "fle
25
25
  message: { default: "To confirm your action, type <b>[[value]]</b> in the text field." }
26
26
  },
27
27
  setup(A) {
28
- const o = A, p = _(() => o.message.replace("[[value]]", o.value)), k = W(""), n = te(), { emitAction: h } = pe();
28
+ const n = A, p = _(() => n.message.replace("[[value]]", n.value)), k = W(""), o = te(), { emitAction: h } = pe();
29
29
  return (v, r) => {
30
30
  const M = F("FmTextField"), g = F("FmButton"), x = F("FmForm");
31
31
  return l(), m(x, {
@@ -34,7 +34,7 @@ const Me = { class: "space-y-24 mb-24" }, Ce = ["innerHTML"], we = { class: "fle
34
34
  }, {
35
35
  default: f(() => [
36
36
  d("div", Me, [
37
- d("div", null, K(v.description), 1),
37
+ d("div", null, Z(v.description), 1),
38
38
  d("div", { innerHTML: p.value }, null, 8, Ce),
39
39
  d("div", null, [
40
40
  u(M, {
@@ -52,7 +52,7 @@ const Me = { class: "space-y-24 mb-24" }, Ce = ["innerHTML"], we = { class: "fle
52
52
  u(g, {
53
53
  label: "Cancel",
54
54
  variant: "secondary",
55
- onClick: r[2] || (r[2] = (c) => e(n).close())
55
+ onClick: r[2] || (r[2] = (c) => e(o).close())
56
56
  }),
57
57
  u(g, {
58
58
  label: "Confirm",
@@ -68,7 +68,7 @@ const Me = { class: "space-y-24 mb-24" }, Ce = ["innerHTML"], we = { class: "fle
68
68
  }), $e = /* @__PURE__ */ B({
69
69
  __name: "Migrate",
70
70
  setup(A) {
71
- const o = Z(), p = ee(), { isRestaurantLevelMenu: k } = p, n = oe(), { minor: h } = Q(n), v = W(!1), r = te();
71
+ const n = K(), p = ee(), { isRestaurantLevelMenu: k } = p, o = ne(), { minor: h } = Q(o), v = W(!1), r = te();
72
72
  async function M() {
73
73
  g.value || v.value || r.open({
74
74
  title: "Migrate to new version",
@@ -80,13 +80,13 @@ const Me = { class: "space-y-24 mb-24" }, Ce = ["innerHTML"], we = { class: "fle
80
80
  }).onPrimary(async () => {
81
81
  r.close(), await h(
82
82
  async () => {
83
- await o.migrate(), setTimeout(() => {
83
+ await n.migrate(), setTimeout(() => {
84
84
  window.location.reload();
85
85
  }, 2e3);
86
86
  },
87
87
  {
88
88
  isLoading: v,
89
- customId: o.state.menu._id,
89
+ customId: n.state.menu._id,
90
90
  message: "Migrating menu",
91
91
  successMessage: "Migration completed"
92
92
  }
@@ -99,12 +99,12 @@ const Me = { class: "space-y-24 mb-24" }, Ce = ["innerHTML"], we = { class: "fle
99
99
  return null;
100
100
  const c = p.restaurants.value;
101
101
  if (!c.length) return "Required at least one restaurant to migrate";
102
- const b = c.filter((y) => !y.posVersion || !j.Pos.canUse({ feature: q.F_FEATURE.enum.menuV4, posVersion: y.posVersion }));
103
- return b.length ? `Upgrade POS to V${j.Pos.minVersionToUse(q.F_FEATURE.enum.menuV4)} to use new menu: ${b.map((y) => y.profile.name).join(", ")}` : null;
102
+ const b = c.filter((y) => !y.posVersion || !H.Pos.canUse({ feature: q.F_FEATURE.enum.menuV4, posVersion: y.posVersion }));
103
+ return b.length ? `Upgrade POS to V${H.Pos.minVersionToUse(q.F_FEATURE.enum.menuV4)} to use new menu: ${b.map((y) => y.profile.name).join(", ")}` : null;
104
104
  });
105
105
  return (x, c) => {
106
106
  const b = F("FmSnackbar");
107
- return !e(k) && !g.value && e(o).version !== e(X).enum.v4 ? (l(), m(b, {
107
+ return !e(k) && !g.value && e(n).version !== e(X).enum.v4 ? (l(), m(b, {
108
108
  key: 0,
109
109
  class: "!max-w-full",
110
110
  title: "New version of menu is out now!",
@@ -116,29 +116,29 @@ const Me = { class: "space-y-24 mb-24" }, Ce = ["innerHTML"], we = { class: "fle
116
116
  })) : w("", !0);
117
117
  };
118
118
  }
119
- }), Ve = "/assets/menu-export-oSHHIKfH.js", Ae = { class: "flex-1 flex justify-between gap-8 pl-8" }, Ee = { class: "flex items-center" }, Te = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Ie = { class: "fm-typo-en-body-md-600 font-semibold" }, De = { class: "flex gap-8" }, et = /* @__PURE__ */ B({
119
+ }), Ve = "/assets/menu-export-CAHQqTea.js", Ae = { class: "flex-1 flex justify-between gap-8 pl-8" }, Te = { class: "flex items-center" }, Ee = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Ie = { class: "fm-typo-en-body-md-600 font-semibold" }, De = { class: "flex gap-8" }, et = /* @__PURE__ */ B({
120
120
  __name: "Products",
121
121
  setup(A) {
122
- const { t: o } = de(), p = ee(), k = Q(oe()), n = Z(), h = _(() => n.rules.item), v = ye(), r = _(() => !n.state.currentSchedulerId), { selectedCategories: M } = ge(), g = _(() => ({
123
- ...ue.menuV4ToV3(ce(n.state.menu)),
124
- _id: n.state.menu._id,
125
- _rev: n.state.menu._rev
122
+ const { t: n } = de(), p = ee(), k = Q(ne()), o = K(), h = _(() => o.rules.item), v = ye(), r = _(() => !o.state.currentSchedulerId), { selectedCategories: M } = ge(), g = _(() => ({
123
+ ...ue.menuV4ToV3(ce(o.state.menu)),
124
+ _id: o.state.menu._id,
125
+ _rev: o.state.menu._rev
126
126
  })), x = _(() => {
127
- const i = z.flatten(M.value.map((t) => t.items));
128
- return z.uniqBy(i, (t) => t._id).length;
127
+ const i = R.flatten(M.value.map((t) => t.items));
128
+ return R.uniqBy(i, (t) => t._id).length;
129
129
  });
130
130
  async function c(i, t) {
131
131
  const a = new re();
132
132
  for (let $ = 0; $ < i.length; $++)
133
133
  a.file(`${t[$]}.xlsx`, i[$]);
134
134
  const s = await a.generateAsync({ type: "blob" });
135
- ie.saveAs(s, `books_${T().format("DD-MM-YYYY_HH-mm")}.zip`);
135
+ ie.saveAs(s, `books_${E().format("DD-MM-YYYY_HH-mm")}.zip`);
136
136
  }
137
137
  async function b() {
138
138
  await k.minor(
139
139
  async () => {
140
- if (await n.readMenu(), n.version === X.enum.v4) {
141
- const i = n.state.menu, t = T().format("DD-MM-YYYY_HH-mm"), a = [
140
+ if (await o.readMenu(), o.version === X.enum.v4) {
141
+ const i = o.state.menu, t = E().format("DD-MM-YYYY_HH-mm"), a = [
142
142
  `menu_${t}`,
143
143
  `addonGroup_${t}`,
144
144
  `itemLinkedAddon_${t}`,
@@ -148,12 +148,12 @@ const Me = { class: "space-y-24 mb-24" }, Ce = ["innerHTML"], we = { class: "fle
148
148
  JSON.stringify({
149
149
  menu: i,
150
150
  attributeSettings: p.itemAttributeSettings.value,
151
- localizationKeys: n.state.featureFlags.supportedLocales
151
+ localizationKeys: o.state.featureFlags.supportedLocales
152
152
  })
153
153
  );
154
154
  await c(s, a);
155
155
  } else {
156
- const i = he(g.value), t = `menu_${T().format("DD-MM-YYYY_HH-mm")}`;
156
+ const i = he(g.value), t = `menu_${E().format("DD-MM-YYYY_HH-mm")}`;
157
157
  await le(i, `${t}.xlsx`, {
158
158
  bookType: "xlsx",
159
159
  bookSST: !0,
@@ -162,35 +162,35 @@ const Me = { class: "space-y-24 mb-24" }, Ce = ["innerHTML"], we = { class: "fle
162
162
  });
163
163
  }
164
164
  },
165
- { successMessage: "Menu exported", customId: n.state.menu._id }
165
+ { successMessage: "Menu exported", customId: o.state.menu._id }
166
166
  );
167
167
  }
168
168
  const {
169
- menuItems: E,
169
+ menuItems: T,
170
170
  categories: C,
171
171
  linkItemRules: y,
172
172
  handleSubmit: Y,
173
173
  catalogManager: N,
174
- schedulerManager: H
175
- } = Se(!1), ne = fe(), ae = _(() => ne.breakpoints.value.xs), se = _(() => {
174
+ schedulerManager: L
175
+ } = Se(!1), oe = fe(), ae = _(() => oe.breakpoints.value.xs), se = _(() => {
176
176
  var a;
177
177
  const i = ((a = p.sessionUser.value) == null ? void 0 : a.permissions) ?? [], t = {
178
178
  action: V.Action.manage,
179
179
  subject: V.Subject.Business.menu_menuManagement
180
180
  };
181
- return R([t], i).granted;
182
- }), L = _(() => {
181
+ return j([t], i).granted;
182
+ }), P = _(() => {
183
183
  var a;
184
184
  const i = ((a = p.sessionUser.value) == null ? void 0 : a.permissions) ?? [], t = {
185
185
  action: V.Action.manage,
186
186
  subject: V.Subject.Business.menu_importExport
187
187
  };
188
- return R([t], i).granted;
188
+ return j([t], i).granted;
189
189
  });
190
190
  return be().resetOnMount(), (i, t) => {
191
191
  const a = F("fm-button");
192
192
  return l(), m(ve, {
193
- heading: e(o)("menu.products.title")
193
+ heading: e(n)("menu.products.title")
194
194
  }, {
195
195
  default: f(() => [
196
196
  u($e),
@@ -198,9 +198,9 @@ const Me = { class: "space-y-24 mb-24" }, Ce = ["innerHTML"], we = { class: "fle
198
198
  ]),
199
199
  "append-heading": f(() => [
200
200
  d("div", Ae, [
201
- d("div", Ee, [
202
- d("div", Te, [
203
- d("p", Ie, K(x.value), 1)
201
+ d("div", Te, [
202
+ d("div", Ee, [
203
+ d("p", Ie, Z(x.value), 1)
204
204
  ])
205
205
  ]),
206
206
  d("div", De, [
@@ -209,11 +209,11 @@ const Me = { class: "space-y-24 mb-24" }, Ce = ["innerHTML"], we = { class: "fle
209
209
  u(_e, null, {
210
210
  default: f(() => [
211
211
  u(O, {
212
- label: e(o)("menu.products.actions.export"),
212
+ label: e(n)("menu.products.actions.export"),
213
213
  onClick: b
214
214
  }, null, 8, ["label"]),
215
215
  u(O, {
216
- label: e(o)("menu.products.actions.import"),
216
+ label: e(n)("menu.products.actions.import"),
217
217
  onClick: s
218
218
  }, null, 8, ["label", "onClick"])
219
219
  ]),
@@ -221,11 +221,11 @@ const Me = { class: "space-y-24 mb-24" }, Ce = ["innerHTML"], we = { class: "fle
221
221
  }, 1024)
222
222
  ]),
223
223
  _: 1
224
- })) : (l(), P(U, { key: 0 }, [
224
+ })) : (l(), U(z, { key: 0 }, [
225
225
  se.value ? (l(), m(xe, { key: 0 }, {
226
226
  default: f(({ trigger: s }) => [
227
227
  u(a, {
228
- label: e(o)("menu.tree_editor.title"),
228
+ label: e(n)("menu.tree_editor.title"),
229
229
  "bg-color": e(S).NeutralGray100,
230
230
  "text-color": e(S).TypoSecondary,
231
231
  variant: e(I).Primary,
@@ -234,31 +234,31 @@ const Me = { class: "space-y-24 mb-24" }, Ce = ["innerHTML"], we = { class: "fle
234
234
  ]),
235
235
  _: 1
236
236
  })) : w("", !0),
237
- L.value ? (l(), m(a, {
237
+ P.value ? (l(), m(a, {
238
238
  key: 1,
239
239
  "bg-color": e(S).NeutralGray100,
240
240
  "text-color": e(S).TypoSecondary,
241
241
  variant: e(I).Primary,
242
- label: e(o)("menu.products.actions.export"),
242
+ label: e(n)("menu.products.actions.export"),
243
243
  onClick: b
244
244
  }, null, 8, ["bg-color", "text-color", "variant", "label"])) : w("", !0),
245
- L.value ? (l(), m(G, { key: 2 }, {
245
+ P.value ? (l(), m(G, { key: 2 }, {
246
246
  default: f(({ trigger: s }) => [
247
247
  u(a, {
248
248
  "bg-color": e(S).NeutralGray100,
249
249
  "text-color": e(S).TypoSecondary,
250
250
  variant: e(I).Primary,
251
- label: e(o)("menu.products.actions.import"),
251
+ label: e(n)("menu.products.actions.import"),
252
252
  onClick: s
253
253
  }, null, 8, ["bg-color", "text-color", "variant", "label", "onClick"])
254
254
  ]),
255
255
  _: 1
256
256
  })) : w("", !0)
257
257
  ], 64)),
258
- x.value > 0 ? (l(), P(U, { key: 2 }, [
258
+ x.value > 0 ? (l(), U(z, { key: 2 }, [
259
259
  h.value.create ? (l(), m(D, {
260
260
  key: 0,
261
- label: e(o)("menu.products.actions.add"),
261
+ label: e(n)("menu.products.actions.add"),
262
262
  "prepend-icon": "add",
263
263
  onClick: t[0] || (t[0] = (s) => e(v).create(null))
264
264
  }, null, 8, ["label"])) : r.value ? (l(), m(J, {
@@ -266,7 +266,7 @@ const Me = { class: "space-y-24 mb-24" }, Ce = ["innerHTML"], we = { class: "fle
266
266
  "categorized-items": e(N).linkableItems.value,
267
267
  "initial-value": e(N).currentItems.value,
268
268
  "show-variant": !1,
269
- "menu-items": e(E),
269
+ "menu-items": e(T),
270
270
  categories: e(C),
271
271
  "link-item-rules": e(y),
272
272
  "no-scheduler": r.value,
@@ -274,7 +274,7 @@ const Me = { class: "space-y-24 mb-24" }, Ce = ["innerHTML"], we = { class: "fle
274
274
  }, {
275
275
  default: f(({ trigger: s }) => [
276
276
  u(D, {
277
- label: e(o)("menu.products.actions.link"),
277
+ label: e(n)("menu.products.actions.link"),
278
278
  "prepend-icon": "link",
279
279
  onClick: s
280
280
  }, null, 8, ["label", "onClick"])
@@ -282,10 +282,10 @@ const Me = { class: "space-y-24 mb-24" }, Ce = ["innerHTML"], we = { class: "fle
282
282
  _: 1
283
283
  }, 8, ["categorized-items", "initial-value", "menu-items", "categories", "link-item-rules", "no-scheduler", "onSubmit"])) : (l(), m(J, {
284
284
  key: 2,
285
- "categorized-items": e(H).linkableItems.value,
286
- "initial-value": e(H).currentItems.value,
285
+ "categorized-items": e(L).linkableItems.value,
286
+ "initial-value": e(L).currentItems.value,
287
287
  "show-variant": !1,
288
- "menu-items": e(E),
288
+ "menu-items": e(T),
289
289
  categories: e(C),
290
290
  "link-item-rules": e(y),
291
291
  "no-scheduler": r.value,
@@ -293,7 +293,7 @@ const Me = { class: "space-y-24 mb-24" }, Ce = ["innerHTML"], we = { class: "fle
293
293
  }, {
294
294
  default: f(({ trigger: s }) => [
295
295
  u(D, {
296
- label: e(o)("menu.products.actions.apply_scheduler"),
296
+ label: e(n)("menu.products.actions.apply_scheduler"),
297
297
  onClick: s
298
298
  }, null, 8, ["label", "onClick"])
299
299
  ]),
@@ -1,14 +1,14 @@
1
1
  import { defineComponent as J, ref as M, computed as A, onMounted as me, resolveComponent as $, createElementBlock as F, openBlock as y, createVNode as b, createElementVNode as f, toDisplayString as T, unref as c, Fragment as j, renderList as Q, createBlock as Y, watch as pe, withCtx as E, h as B, normalizeClass as ce, createCommentVNode as X, createTextVNode as _e, mergeProps as Ue, normalizeStyle as Oe, renderSlot as Be, withModifiers as le, onUnmounted as Te } from "vue";
2
- import { D as z } from "./dayjs.min-CVgq1MI5.js";
2
+ import { D as z } from "./dayjs.min-4vLGgFCE.js";
3
3
  import { useRouter as Ee } from "vue-router";
4
4
  import { O as ze, b as Le } from "./app-5fxKLAzS.js";
5
- import { a as je, e as Ke, b as Ce, M as Ye, _ as we, N as W, u as xe, d as ge, F as He } from "./index.vue_vue_type_script_setup_true_lang-BJ5dPd5h.js";
5
+ import { a as je, e as Ke, b as Ce, M as Ye, _ as we, N as W, u as xe, d as ge, F as He } from "./index.vue_vue_type_script_setup_true_lang-qm3HbXBN.js";
6
6
  import { useI18n as Z, useCoreStore as he, RestaurantSelector as Ve } from "@feedmepos/mf-common";
7
7
  import { useSnackbar as fe, useDialogChild as qe, useProxiedModel as Ge, useDialog as Se, components as ee, FmButtonVariant as ye } from "@feedmepos/ui-library";
8
8
  import { _ as Je } from "./TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js";
9
- import { _ as We } from "./app-BNqI06Lw.js";
9
+ import { _ as We } from "./app-T8AXgSEa.js";
10
10
  import { a as Qe, w as Xe } from "./tooltip-B5BiPMx9.js";
11
- import { u as Fe, l as Ze } from "./discardConfirm-CU5H7XLz.js";
11
+ import { u as Fe, l as Ze } from "./discardConfirm-CM6g-V_v.js";
12
12
  import { _ as Ie } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
13
  function Me(D) {
14
14
  return D ? z(D).format("DD/MM/YY HH:mm") : "-";
@@ -2,14 +2,14 @@ import { defineComponent as z, computed as h, ref as E, reactive as Q, watch as
2
2
  import { useI18n as M } from "@feedmepos/mf-common";
3
3
  import { useSnackbar as $, components as G, useDialog as ne, FmButtonVariant as K, 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-BNqI06Lw.js";
6
- import { i as q, b as P, d as ie, m as B, e as D, g as O, h as A, u as H, _ as se } from "./index.vue_vue_type_script_setup_true_lang-BJ5dPd5h.js";
5
+ import { _ as le } from "./app-T8AXgSEa.js";
6
+ import { i as q, b as P, d as ie, m as B, e as D, g as O, h as A, u as H, _ as se } from "./index.vue_vue_type_script_setup_true_lang-qm3HbXBN.js";
7
7
  import { _ as re } from "./PageLayout.vue_vue_type_script_setup_true_lang-BVmHMvKD.js";
8
8
  import { defineStore as ce } from "pinia";
9
- import { _ as Y, g as ue } from "./InventoryBinding.vue_vue_type_script_setup_true_lang-NKoRT-LI.js";
10
- import { u as me, l as de } from "./discardConfirm-CU5H7XLz.js";
9
+ import { _ as Y, g as ue } from "./InventoryBinding.vue_vue_type_script_setup_true_lang-DJrz0wWm.js";
10
+ import { u as me, l as de } from "./discardConfirm-CM6g-V_v.js";
11
11
  import { c as pe } from "./check-C9mY6LiX.js";
12
- import "./unit-CfREeFuX.js";
12
+ import "./unit-p_16wmg2.js";
13
13
  import { c as fe } from "./createComponentProgrammatically-Bt2rn1IQ.js";
14
14
  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({
15
15
  __name: "Form",
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as D, ref as R, resolveComponent as u, createElementBlock as E, openBlock as P, Fragment as B, createElementVNode as d, createVNode as l, normalizeClass as A, withCtx as i, toDisplayString as g, unref as o, h as I } from "vue";
2
2
  import { useI18n as T, useCustomAttributes as K, useCoreStore as N } from "@feedmepos/mf-common";
3
3
  import { components as U } from "@feedmepos/ui-library";
4
- import { e as W, _ as y } from "./RuleView.vue_vue_type_script_setup_true_lang-DsCNLIVd.js";
4
+ import { e as W, _ as y } from "./RuleView.vue_vue_type_script_setup_true_lang-LbagGtcn.js";
5
5
  const j = {
6
6
  class: /* @__PURE__ */ A(["fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap", "text-fm-color-neutral-gray-400"])
7
7
  }, O = {