@feedmepos/mf-menu 0.31.30-beta.1 → 0.31.31-beta.1

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 (62) hide show
  1. package/dist/{App-CrQBq4gc.js → App-1TX8v7ZA.js} +10 -8
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-D00UOSsK.js → ApplyProduct.vue_vue_type_script_setup_true_lang-CR7QrFUG.js} +12 -12
  3. package/dist/{Catalog-D4m8x_f2.js → Catalog-DWClc58s.js} +75 -74
  4. package/dist/{Category-sQll5ITQ.js → Category-BqKFvFam.js} +60 -60
  5. package/dist/{Category-Ql1kDDH-.js → Category-IYMtMoT-.js} +28 -28
  6. package/dist/{CookingGuide-CSutufcu.js → CookingGuide-BayJ6zj4.js} +103 -101
  7. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-BqhYFXNG.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-Ceq86b3d.js} +1 -1
  8. package/dist/{Group-CnBE6CiB.js → Group-LqSX7ue6.js} +1 -1
  9. package/dist/{Group-YqVh5hC0.js → Group-RujTPTns.js} +3 -3
  10. package/dist/{Group.vue_vue_type_script_setup_true_lang-D9TSH4sS.js → Group.vue_vue_type_script_setup_true_lang-Dj9ZmkYe.js} +138 -137
  11. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CqriuXVC.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D5GWkh3G.js} +16 -16
  12. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-CaIU0RsG.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-C4IrA3es.js} +4616 -4610
  13. package/dist/{Ingredient-MhLxJzAU.js → Ingredient-_tc8llr1.js} +65 -64
  14. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-CIbExsMI.js → InventoryBinding.vue_vue_type_script_setup_true_lang-DLFDf-VZ.js} +14 -12
  15. package/dist/{LinkProductSideSheet-D7vYZbFy.js → LinkProductSideSheet-C6rF-G1v.js} +14 -12
  16. package/dist/{MenuSetting-n0me5wY8.js → MenuSetting-xDHeeROY.js} +27 -26
  17. package/dist/{PrintRoute-CudZZYbe.js → PrintRoute-B_TFMn5e.js} +17 -15
  18. package/dist/{Product-DPZQgWET.js → Product-DdEEqrtc.js} +1 -1
  19. package/dist/{Product.vue_vue_type_script_setup_true_lang-CdaeZy_o.js → Product.vue_vue_type_script_setup_true_lang-zcistmwh.js} +257 -256
  20. package/dist/{ProductInternalTools-DgANHliV.js → ProductInternalTools-BcC7BF6W.js} +45 -45
  21. package/dist/{Products-Ez4R3jKW.js → Products-Cu0cJshV.js} +74 -72
  22. package/dist/{Publish-B4DEPe1I.js → Publish-Bm3Xiks1.js} +34 -32
  23. package/dist/{Recipe-Cripr-gY.js → Recipe-DWK-luIZ.js} +65 -63
  24. package/dist/{Scheduler-C-OV9d7d.js → Scheduler-Cb1TeBhW.js} +19 -19
  25. package/dist/{ServingSequence-DAumDXP1.js → ServingSequence-evSIET_8.js} +34 -34
  26. package/dist/{Setting-ByaHpIAN.js → Setting-Cn3kwC9F.js} +54 -53
  27. package/dist/{Subcategory-ro2aGt2H.js → Subcategory-q4m4qHsU.js} +34 -34
  28. package/dist/{Takeaway-CJb0ayDC.js → Takeaway-ClepHYGu.js} +14 -14
  29. package/dist/{Takeaway-AEg_0gKg.js → Takeaway-D-rdUZuh.js} +1 -1
  30. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-Cjj4bxoL.js → Takeaway.vue_vue_type_script_setup_true_lang-y9Yxstu2.js} +41 -40
  31. package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Drf4n4rj.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BSeLfoOA.js} +1108 -1106
  32. package/dist/{Unit-1wzUBplb.js → Unit-IM8Naj82.js} +12 -12
  33. package/dist/{Variant-Dnz2v5u0.js → Variant-fzGvwaMo.js} +16 -16
  34. package/dist/{_id_-C3rBZ6zL.js → _id_-BsKNG9Qv.js} +22 -22
  35. package/dist/{app-sDPxNF11.js → app-BzQRUMTK.js} +3 -3
  36. package/dist/{app-CLY6CoaV.js → app-CoVUUCa_.js} +24 -24
  37. package/dist/app.js +1 -1
  38. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  39. package/dist/assets/{linked-status-BZ4FSJ_Z.js → linked-status-eQqjvOq_.js} +2 -2
  40. package/dist/assets/{override-menu-C-fWJdVd.js → override-menu-C8NTBJgN.js} +2 -2
  41. package/dist/assets/{validate-menu-BDEM_Odz.js → validate-menu-Dn-OO7Ed.js} +2 -2
  42. package/dist/{catalog-bkFntZNz.js → catalog-CaXceaA2.js} +1 -1
  43. package/dist/{catalogSetting-zrKwGJ_C.js → catalogSetting-BGvckFdh.js} +1 -1
  44. package/dist/{category-BuPYaEsy.js → category-u5eo_Vjd.js} +5 -3
  45. package/dist/currency-BPHwez-E.js +7 -0
  46. package/dist/{dayjs.min-CR2NIyKn.js → dayjs.min-Bsr3tJCn.js} +1 -1
  47. package/dist/{index-BNORpjos.js → index-Bbx4iZ6n.js} +27 -27
  48. package/dist/{index-Dp_vLFQp.js → index-DSAG0yWh.js} +22 -20
  49. package/dist/{index-D20u0bCl.js → index-tRQb7RN_.js} +1 -1
  50. package/dist/{item-D4DcBt7N.js → item-BAqzKh4O.js} +801 -799
  51. package/dist/{jszip.min-CRJ61J9H.js → jszip.min-BKJtvCjM.js} +353 -353
  52. package/dist/{menu-Dw-Hpy07.js → menu-CDrsBjmr.js} +11 -9
  53. package/dist/menu-CsIzrBEr.js +74044 -0
  54. package/dist/packages/shared/src/permission/posPermission.d.ts +6 -0
  55. package/dist/{priceTier-EDLTGEjz.js → priceTier-DfbHonGe.js} +4 -4
  56. package/dist/{scheduler-CpPn2BlK.js → scheduler-DTWaBudB.js} +13 -11
  57. package/dist/{subcategory-B_W6vbM8.js → subcategory-D-R5r1Tr.js} +86 -84
  58. package/dist/{toExcel-D02OlDJu.js → toExcel-84VTtSA7.js} +2 -2
  59. package/dist/{unit-fro9wz1K.js → unit-B4zscxzo.js} +24 -23
  60. package/package.json +1 -1
  61. package/dist/currency-BISImIgX.js +0 -7
  62. package/dist/menu-ibc-yXVt.js +0 -107745
@@ -1,12 +1,14 @@
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-CR2NIyKn.js";
1
+ import { defineComponent as j, 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 H, createBlock as O, withCtx as L, createCommentVNode as ue, withModifiers as N, h as K } from "vue";
2
+ import { D as X } from "./dayjs.min-Bsr3tJCn.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-ibc-yXVt.js";
5
- import { useI18n as Y, useCoreStore as be, RestaurantSelector as fe } from "@feedmepos/mf-common";
6
- import { useSnackbar as ee, useDialogChild as _e, useDialog as he, components as Q } from "@feedmepos/ui-library";
7
- import { _ as ye } from "./TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js";
8
- import { _ as Ce } from "./app-CLY6CoaV.js";
9
- import { a as ke, w as we } from "./tooltip-B5BiPMx9.js";
4
+ import { A as Z, a7 as re, D as J, G as ce, u as de, B as me, $ as pe } from "./menu-CsIzrBEr.js";
5
+ import { useI18n as Y, useCoreStore as ge, RestaurantSelector as ve } from "@feedmepos/mf-common";
6
+ import { useSnackbar as ee, useDialogChild as be, useDialog as fe, components as Q } from "@feedmepos/ui-library";
7
+ import { _ as _e } from "./TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js";
8
+ import { _ as he } from "./app-CoVUUCa_.js";
9
+ import { a as ye, w as Ce } from "./tooltip-B5BiPMx9.js";
10
+ import { Pos as ke } from "@feedmepos/core";
11
+ import { F_FEATURE as we } from "@feedmepos/core/entity";
10
12
  import { u as xe } from "./discardConfirm-BHni0LNu.js";
11
13
  import { _ as Ve } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
12
14
  function ae(x) {
@@ -19,7 +21,7 @@ function Se(x, V, l) {
19
21
  };
20
22
  return x.map((r) => {
21
23
  var p;
22
- const m = (p = V.find(({ _id: t }) => t === r._id)) == null ? void 0 : p.posVersion, y = !!m && !!re.Pos.canUse({ feature: ce.F_FEATURE.enum.taxAndServiceChargeV4, posVersion: m }), f = c(r.catalogId);
24
+ const m = (p = V.find(({ _id: t }) => t === r._id)) == null ? void 0 : p.posVersion, y = !!m && !!ke.canUse({ feature: we.enum.taxAndServiceChargeV4, posVersion: m }), f = c(r.catalogId);
23
25
  return {
24
26
  ...r,
25
27
  _default: f,
@@ -38,7 +40,7 @@ const Fe = {
38
40
  }, Ie = {
39
41
  key: 1,
40
42
  class: "space-y-16"
41
- }, $e = { class: "text-fm-color-typo-secondary" }, Ae = { class: "space-y-4" }, Me = /* @__PURE__ */ K({
43
+ }, $e = { class: "text-fm-color-typo-secondary" }, Ae = { class: "space-y-4" }, Me = /* @__PURE__ */ j({
42
44
  __name: "RevertDialog",
43
45
  props: {
44
46
  restaurant: {}
@@ -49,7 +51,7 @@ const Fe = {
49
51
  await c(
50
52
  async () => {
51
53
  var d;
52
- m.value = await de.readMenuById(((d = V.restaurant.revertConfig) == null ? void 0 : d._id) || "");
54
+ m.value = await re.readMenuById(((d = V.restaurant.revertConfig) == null ? void 0 : d._id) || "");
53
55
  },
54
56
  { isLoading: r }
55
57
  );
@@ -74,7 +76,7 @@ const Fe = {
74
76
  catalogId: d.catalogId || null
75
77
  }
76
78
  ],
77
- be().restaurants.value,
79
+ ge().restaurants.value,
78
80
  f.value
79
81
  )[0];
80
82
  return [
@@ -93,7 +95,7 @@ const Fe = {
93
95
  ];
94
96
  });
95
97
  ne(async () => y());
96
- const { emitData: U } = _e();
98
+ const { emitData: U } = be();
97
99
  return (d, _) => {
98
100
  const k = C("FmCircularProgress");
99
101
  return r.value ? (h(), R("div", Fe, [
@@ -101,7 +103,7 @@ const Fe = {
101
103
  ])) : (h(), R("div", Ie, [
102
104
  o("div", $e, F(i(p)("menu.revert.description", { name: V.restaurant.name })), 1),
103
105
  o("div", Ae, [
104
- (h(!0), R(E, null, j(t.value, ($) => (h(), O(ke, {
106
+ (h(!0), R(E, null, H(t.value, ($) => (h(), O(ye, {
105
107
  key: $.label,
106
108
  name: $.label,
107
109
  value: $.value || "--"
@@ -110,7 +112,7 @@ const Fe = {
110
112
  ]));
111
113
  };
112
114
  }
113
- }), De = { class: "fm-typo-en-title-md-600" }, Re = { class: "mt-40" }, Ue = { class: "fm-typo-en-title-sm-600" }, Le = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mt-4 mb-8" }, Pe = { class: "flex gap-8 items-center justify-start" }, Be = /* @__PURE__ */ K({
115
+ }), De = { class: "fm-typo-en-title-md-600" }, Re = { class: "mt-40" }, Ue = { class: "fm-typo-en-title-sm-600" }, Le = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mt-4 mb-8" }, Pe = { class: "flex gap-8 items-center justify-start" }, Be = /* @__PURE__ */ j({
114
116
  __name: "UpdateCatalogDialog",
115
117
  props: {
116
118
  catalogs: {
@@ -161,7 +163,7 @@ const Fe = {
161
163
  U.value = !1;
162
164
  }
163
165
  const $ = xe(
164
- () => !me.isEqual(d.value, t.value),
166
+ () => !ce.isEqual(d.value, t.value),
165
167
  () => {
166
168
  k();
167
169
  }
@@ -220,7 +222,7 @@ const Fe = {
220
222
  o("div", Re, [
221
223
  o("div", Ue, F(i(c)("menu.publish.update_catalog_dialog.sections.additional.title")), 1),
222
224
  o("div", Le, F(i(c)("menu.publish.update_catalog_dialog.sections.additional.subtitle")), 1),
223
- (h(!0), R(E, null, j(x.catalogs, (b) => (h(), R("div", {
225
+ (h(!0), R(E, null, H(x.catalogs, (b) => (h(), R("div", {
224
226
  key: b._id
225
227
  }, [
226
228
  n(z, {
@@ -246,11 +248,11 @@ const Fe = {
246
248
  class: "fm-typo-en-title-md-600"
247
249
  }, Ne = {
248
250
  class: "xs:hidden"
249
- }, He = {
250
- class: "pb-8 flex justify-between xs:flex-col gap-8"
251
251
  }, Ke = {
252
- class: "grow flex flex-col gap-4"
252
+ class: "pb-8 flex justify-between xs:flex-col gap-8"
253
253
  }, je = {
254
+ class: "grow flex flex-col gap-4"
255
+ }, He = {
254
256
  class: "flex gap-8 items-center"
255
257
  }, Ye = {
256
258
  class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary"
@@ -264,7 +266,7 @@ const Fe = {
264
266
  class: "flex gap-8"
265
267
  }, Qe = {
266
268
  class: "xs:block hidden fixed bottom-72 right-16"
267
- }, Xe = 40, ca = /* @__PURE__ */ K({
269
+ }, Xe = 40, ma = /* @__PURE__ */ j({
268
270
  __name: "Publish",
269
271
  setup(x) {
270
272
  const V = ie(), {
@@ -273,7 +275,7 @@ const Fe = {
273
275
  row: e
274
276
  }) => {
275
277
  const a = c(e);
276
- return n(ye, {
278
+ return n(_e, {
277
279
  label: l(a ? "menu.publish.table.status.latest" : "menu.publish.table.status.outdated"),
278
280
  variant: a ? "success" : "warning"
279
281
  }, null);
@@ -320,15 +322,15 @@ const Fe = {
320
322
  enableSorting: !1,
321
323
  cell: (e) => {
322
324
  const a = e.row.original;
323
- return t.state.menu.updatedAt, a.updatedAt, H("div", {
325
+ return t.state.menu.updatedAt, a.updatedAt, K("div", {
324
326
  class: "flex justify-end gap-8"
325
- }, [d.value && a.revertConfig ? we(H(Q.FmButton, {
327
+ }, [d.value && a.revertConfig ? Ce(K(Q.FmButton, {
326
328
  prependIcon: "undo",
327
329
  variant: "secondary",
328
330
  onClick: N(async () => {
329
331
  await _(e.row.original);
330
332
  }, ["stop", "prevent"])
331
- }), l("menu.publish.actions.revert")) : null, H(Q.FmButton, {
333
+ }), l("menu.publish.actions.revert")) : null, K(Q.FmButton, {
332
334
  label: l("menu.publish.actions.publish"),
333
335
  icon: "ios_share",
334
336
  variant: "secondary",
@@ -341,7 +343,7 @@ const Fe = {
341
343
  meta: {
342
344
  width: "150px"
343
345
  }
344
- }], f = I(""), p = I(), t = pe(), U = he(), d = S(() => t.version !== ge.F_MENU_VERSION.enum.v3);
346
+ }], f = I(""), p = I(), t = de(), U = fe(), d = S(() => t.version !== me.F_MENU_VERSION.enum.v3);
345
347
  async function _(e) {
346
348
  e.revertConfig && U.open({
347
349
  title: "Revert menu",
@@ -421,7 +423,7 @@ const Fe = {
421
423
  async function q(e) {
422
424
  const a = I("");
423
425
  await M.minor(async () => {
424
- await ve({
426
+ await pe({
425
427
  items: e,
426
428
  processor: async (s) => {
427
429
  const D = A(s);
@@ -464,7 +466,7 @@ const Fe = {
464
466
  label: i(l)("menu.publish.actions.publish_all"),
465
467
  variant: "primary",
466
468
  onClick: a[0] || (a[0] = () => G())
467
- }, null, 8, ["disabled", "label"])])]), o("div", He, [n(i(fe), {
469
+ }, null, 8, ["disabled", "label"])])]), o("div", Ke, [n(i(ve), {
468
470
  multiple: "",
469
471
  modelValue: b.value,
470
472
  "onUpdate:modelValue": a[2] || (a[2] = (u) => b.value = u)
@@ -487,7 +489,7 @@ const Fe = {
487
489
  placeholder: i(l)("menu.publish.table.search.placeholder")
488
490
  }, null, 8, ["modelValue", "placeholder"])]), w.value.length > 0 ? (h(), R(E, {
489
491
  key: 0
490
- }, [n(Ce, {
492
+ }, [n(he, {
491
493
  class: "xs:hidden block"
492
494
  }, {
493
495
  default: L(() => [n(le, {
@@ -509,7 +511,7 @@ const Fe = {
509
511
  class: "flex-col flex-1 min-h-0 overflow-auto xs:flex hidden w-full pb-64",
510
512
  separator: ""
511
513
  }, {
512
- default: L(() => [(h(!0), R(E, null, j(te.value, (u) => (h(), O(oe, {
514
+ default: L(() => [(h(!0), R(E, null, H(te.value, (u) => (h(), O(oe, {
513
515
  key: u._id,
514
516
  label: u.name,
515
517
  style: {
@@ -517,7 +519,7 @@ const Fe = {
517
519
  },
518
520
  onClick: () => z(u)
519
521
  }, {
520
- default: L(() => [o("div", Ke, [o("div", je, [o("div", Ye, F($(u.updatedAt)), 1), n(r, {
522
+ default: L(() => [o("div", je, [o("div", He, [o("div", Ye, F($(u.updatedAt)), 1), n(r, {
521
523
  row: u
522
524
  }, null, 8, ["row"])]), o("div", qe, [o("div", Ge, F(u.name), 1), o("div", We, [o("div", null, "Default: " + F(u.catalog.default), 1), o("div", null, "POS takeaway: " + F(u.catalog.takeaway), 1), o("div", null, "Pickup: " + F(u.catalog.pickup), 1)])])]), o("div", Je, [d.value && u.revertConfig ? (h(), O(P, {
523
525
  key: 0,
@@ -563,5 +565,5 @@ const Fe = {
563
565
  }
564
566
  });
565
567
  export {
566
- ca as default
568
+ ma as default
567
569
  };
@@ -1,16 +1,18 @@
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
- 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";
1
+ import { defineComponent as z, computed as h, ref as w, reactive as Q, watch as W, resolveComponent as k, createElementBlock as F, openBlock as g, Fragment as E, 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 I, createBlock as N, createCommentVNode as ee, normalizeClass as K, renderList as te } from "vue";
2
+ import { useI18n as T } from "@feedmepos/mf-common";
3
+ import { useSnackbar as L, 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-CLY6CoaV.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-ibc-yXVt.js";
5
+ import { _ as le } from "./app-CoVUUCa_.js";
6
+ import { M as q, A as $, D as ie, z as P, G as se, H as O, B as A, u as H } from "./menu-CsIzrBEr.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-CIbExsMI.js";
10
+ import { _ as B, g as me } from "./InventoryBinding.vue_vue_type_script_setup_true_lang-DLFDf-VZ.js";
11
+ import { F_INVENTORY_BINDING_TYPE as Y } from "@feedmepos/core/entity";
11
12
  import { u as de } from "./discardConfirm-BHni0LNu.js";
12
13
  import { c as pe } from "./check-C9mY6LiX.js";
13
- import "./unit-fro9wz1K.js";
14
+ import "@feedmepos/core";
15
+ import "./unit-B4zscxzo.js";
14
16
  import { c as fe } from "./createComponentProgrammatically-Bt2rn1IQ.js";
15
17
  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
18
  __name: "Form",
@@ -18,14 +20,14 @@ const _e = { class: "fm-typo-en-title-md-600" }, ve = { class: "pt-8 space-y-40"
18
20
  initialValue: { default: void 0 },
19
21
  invalidSkuAndRecipe: {}
20
22
  },
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(
23
+ setup(C, { expose: c }) {
24
+ const { t: u } = T(), p = C, f = q($(L())), b = h(() => p.initialValue ? u("menu.recipe.update") : u("menu.recipe.add")), _ = h(
23
25
  () => p.initialValue ? u("menu.common.actions.update") : u("menu.common.actions.add")
24
- ), v = w(!1), a = w(!1), k = (t) => {
26
+ ), v = w(!1), a = w(!1), V = (t) => {
25
27
  pe.isBoolean(t) ? a.value = t : a.value = !a.value;
26
28
  }, n = Q(
27
29
  p.initialValue ? ie(p.initialValue) : P.generator.initRecipe()
28
- ), E = h(() => p.invalidSkuAndRecipe.skus), o = h(() => p.invalidSkuAndRecipe.recipes), y = de(
30
+ ), R = h(() => p.invalidSkuAndRecipe.skus), o = h(() => p.invalidSkuAndRecipe.recipes), y = de(
29
31
  () => !se.isEqual(n, p.initialValue || P.generator.initRecipe()),
30
32
  () => {
31
33
  a.value = !1;
@@ -38,19 +40,19 @@ const _e = { class: "fm-typo-en-title-md-600" }, ve = { class: "pt-8 space-y-40"
38
40
  };
39
41
  p.initialValue ? await f.updateMenu(
40
42
  {
41
- module: T.F_MENU_MODULE_V4_KEY.enum.recipe,
42
- operation: I.F_OPERATION_TYPE.update,
43
+ module: A.F_MENU_MODULE_V4_KEY.enum.recipe,
44
+ operation: O.F_OPERATION_TYPE.update,
43
45
  data: t
44
46
  },
45
47
  t.name
46
48
  ) : await f.updateMenu(
47
49
  {
48
- module: T.F_MENU_MODULE_V4_KEY.enum.recipe,
49
- operation: I.F_OPERATION_TYPE.create,
50
+ module: A.F_MENU_MODULE_V4_KEY.enum.recipe,
51
+ operation: O.F_OPERATION_TYPE.create,
50
52
  data: t
51
53
  },
52
54
  t.name
53
- ), k(!1);
55
+ ), V(!1);
54
56
  } finally {
55
57
  v.value = !1;
56
58
  }
@@ -61,11 +63,11 @@ const _e = { class: "fm-typo-en-title-md-600" }, ve = { class: "pt-8 space-y-40"
61
63
  }
62
64
  ), c({
63
65
  show: a,
64
- trigger: k
66
+ trigger: V
65
67
  }), (t, i) => {
66
- const N = V("FmTextField"), M = V("FmFormGroup"), s = V("fm-button"), J = V("fm-side-sheet");
67
- return g(), F(C, null, [
68
- X(t.$slots, "default", { trigger: k }),
68
+ const M = k("FmTextField"), U = k("FmFormGroup"), s = k("fm-button"), J = k("fm-side-sheet");
69
+ return g(), F(E, null, [
70
+ X(t.$slots, "default", { trigger: V }),
69
71
  d(J, {
70
72
  id: "unit-form",
71
73
  modelValue: a.value,
@@ -101,7 +103,7 @@ const _e = { class: "fm-typo-en-title-md-600" }, ve = { class: "pt-8 space-y-40"
101
103
  default: x(() => [
102
104
  r("div", ve, [
103
105
  r("div", ye, [
104
- d(N, {
106
+ d(M, {
105
107
  class: "flex-2",
106
108
  label: e(u)("menu.recipe.columns.name"),
107
109
  modelValue: n.name,
@@ -114,23 +116,23 @@ const _e = { class: "fm-typo-en-title-md-600" }, ve = { class: "pt-8 space-y-40"
114
116
  ]
115
117
  }, null, 8, ["label", "modelValue", "rules"])
116
118
  ]),
117
- d(M, {
119
+ d(U, {
118
120
  modelValue: n.contains,
119
121
  "onUpdate:modelValue": i[3] || (i[3] = (m) => n.contains = m),
120
122
  rules: [(m) => m.length > 0 || e(u)("menu.recipe.validation.bind_required")]
121
123
  }, {
122
124
  default: x(() => [
123
- d(Y, {
125
+ d(B, {
124
126
  modelValue: n.contains,
125
127
  "onUpdate:modelValue": i[1] || (i[1] = (m) => n.contains = m),
126
- type: e(B.F_INVENTORY_BINDING_TYPE).enum.RECIPE,
128
+ type: e(Y).enum.RECIPE,
127
129
  "filter-option-ids": o.value
128
130
  }, null, 8, ["modelValue", "type", "filter-option-ids"]),
129
- d(Y, {
131
+ d(B, {
130
132
  modelValue: n.contains,
131
133
  "onUpdate:modelValue": i[2] || (i[2] = (m) => n.contains = m),
132
- type: e(B.F_INVENTORY_BINDING_TYPE).enum.SKU,
133
- "filter-option-ids": E.value
134
+ type: e(Y).enum.SKU,
135
+ "filter-option-ids": R.value
134
136
  }, null, 8, ["modelValue", "type", "filter-option-ids"])
135
137
  ]),
136
138
  _: 1
@@ -142,8 +144,8 @@ const _e = { class: "fm-typo-en-title-md-600" }, ve = { class: "pt-8 space-y-40"
142
144
  ], 64);
143
145
  };
144
146
  }
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) => {
147
+ }), he = be, ke = ue("recipe-manager", () => {
148
+ const C = ne(), c = L(), u = $(c), p = q(u), f = H(), b = Z(), { t: _ } = T(), v = (o) => {
147
149
  var l, t;
148
150
  const { vNode: y } = fe(
149
151
  he,
@@ -162,14 +164,14 @@ const _e = { class: "fm-typo-en-title-md-600" }, ve = { class: "pt-8 space-y-40"
162
164
  }) : { skus: [], recipes: [] }
163
165
  });
164
166
  }
165
- async function k() {
167
+ async function V() {
166
168
  a();
167
169
  }
168
170
  async function n(o) {
169
171
  a(o);
170
172
  }
171
- async function E(o) {
172
- R.open({
173
+ async function R(o) {
174
+ C.open({
173
175
  title: _("menu.common.dialog.remove.recipe.title"),
174
176
  message: _("menu.common.dialog.remove.recipe.message", { name: o.name }),
175
177
  primaryActions: {
@@ -184,8 +186,8 @@ const _e = { class: "fm-typo-en-title-md-600" }, ve = { class: "pt-8 space-y-40"
184
186
  }).onPrimary(async () => {
185
187
  await p.updateMenu(
186
188
  {
187
- module: T.F_MENU_MODULE_V4_KEY.enum.recipe,
188
- operation: I.F_OPERATION_TYPE.delete,
189
+ module: A.F_MENU_MODULE_V4_KEY.enum.recipe,
190
+ operation: O.F_OPERATION_TYPE.delete,
189
191
  data: o._id
190
192
  },
191
193
  o.name,
@@ -194,41 +196,41 @@ const _e = { class: "fm-typo-en-title-md-600" }, ve = { class: "pt-8 space-y-40"
194
196
  });
195
197
  }
196
198
  return {
197
- createRecipe: k,
199
+ createRecipe: V,
198
200
  updateRecipe: n,
199
- deleteRecipe: E
201
+ deleteRecipe: R
200
202
  };
201
- }), ke = {
203
+ }), Ve = {
202
204
  key: 0,
203
205
  class: "h-[600px]"
204
206
  }, xe = {
205
207
  class: "flex justify-end items-center"
206
208
  }, Fe = {
207
209
  class: "flex justify-end items-center my-8 px-16"
208
- }, Ee = {
210
+ }, Re = {
209
211
  class: /* @__PURE__ */ K(["flex-1", "overflow-scroll", "divide-y divide-fm-color-neutral-gray-100", "pb-64"])
210
- }, Re = ["onClick"], Ce = {
212
+ }, Ce = ["onClick"], Ee = {
211
213
  class: "flex-1"
212
214
  }, Se = {
213
215
  class: "fm-typo-en-body-lg-600 mb-4"
214
216
  }, we = {
215
217
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
216
- }, Ne = {
217
- class: "flex-1 flex justify-between gap-8 pl-8"
218
218
  }, Me = {
219
+ class: "flex-1 flex justify-between gap-8 pl-8"
220
+ }, Ue = {
219
221
  class: "flex items-center"
220
- }, Oe = {
222
+ }, Ne = {
221
223
  class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4"
222
- }, Ie = {
224
+ }, Oe = {
223
225
  class: "fm-typo-en-body-md-600 font-semibold"
224
- }, He = /* @__PURE__ */ z({
226
+ }, Qe = /* @__PURE__ */ z({
225
227
  __name: "Recipe",
226
- setup(R) {
228
+ setup(C) {
227
229
  const {
228
230
  t: c
229
- } = U(), u = $();
230
- A(u);
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([{
231
+ } = T(), u = L();
232
+ $(u);
233
+ const p = H(), f = ke(), b = h(() => p.recipes), _ = h(() => b.value.filter((y) => `${y.name}`.toLowerCase().includes(v.value.toLowerCase()))), v = w(""), a = w([{
232
234
  accessorKey: "name",
233
235
  header: () => c("menu.recipe.table.columns.name"),
234
236
  enableSorting: !1
@@ -252,22 +254,22 @@ const _e = { class: "fm-typo-en-title-md-600" }, ve = { class: "pt-8 space-y-40"
252
254
  icon: "delete",
253
255
  textColor: "neutral-gray-400",
254
256
  variant: "tertiary",
255
- onClick: L(async () => {
257
+ onClick: I(async () => {
256
258
  f.deleteRecipe(l);
257
259
  }, ["stop", "prevent"])
258
260
  })]);
259
261
  }
260
262
  }]);
261
- function k(y) {
263
+ function V(y) {
262
264
  f.updateRecipe(y);
263
265
  }
264
- const n = h(() => b.value.length), E = oe(), o = h(() => E.breakpoints.value.xs);
266
+ const n = h(() => b.value.length), R = oe(), o = h(() => R.breakpoints.value.xs);
265
267
  return (y, l) => {
266
- const t = V("FmSearch"), i = V("FmTable"), N = V("fm-button"), M = V("FmSpacer");
267
- return g(), O(re, {
268
+ const t = k("FmSearch"), i = k("FmTable"), M = k("fm-button"), U = k("FmSpacer");
269
+ return g(), N(re, {
268
270
  heading: e(c)("menu.recipe.title")
269
271
  }, {
270
- default: x(() => [b.value.length === 0 ? (g(), O(e(ce), {
272
+ default: x(() => [b.value.length === 0 ? (g(), N(e(ce), {
271
273
  key: 0,
272
274
  action: {
273
275
  text: e(c)("menu.recipe.empty.action"),
@@ -277,9 +279,9 @@ const _e = { class: "fm-typo-en-title-md-600" }, ve = { class: "pt-8 space-y-40"
277
279
  },
278
280
  subtitle: e(c)("menu.recipe.empty.subtitle"),
279
281
  title: e(c)("menu.recipe.empty.title")
280
- }, null, 8, ["action", "subtitle", "title"])) : (g(), F(C, {
282
+ }, null, 8, ["action", "subtitle", "title"])) : (g(), F(E, {
281
283
  key: 1
282
- }, [o.value ? (g(), F(C, {
284
+ }, [o.value ? (g(), F(E, {
283
285
  key: 1
284
286
  }, [r("div", Fe, [d(t, {
285
287
  modelValue: v.value,
@@ -287,16 +289,16 @@ const _e = { class: "fm-typo-en-title-md-600" }, ve = { class: "pt-8 space-y-40"
287
289
  autofocus: "",
288
290
  class: "w-full",
289
291
  placeholder: e(c)("menu.recipe.table.search.placeholder")
290
- }, null, 8, ["modelValue", "placeholder"])]), r("div", Ee, [(g(!0), F(C, null, te(_.value, (s) => (g(), F("div", {
292
+ }, null, 8, ["modelValue", "placeholder"])]), r("div", Re, [(g(!0), F(E, null, te(_.value, (s) => (g(), F("div", {
291
293
  key: s._id,
292
294
  class: K(["py-12 px-16", "flex space-x-8", "items-center", "cursor-pointer"]),
293
295
  onClick: () => e(f).updateRecipe(s)
294
- }, [r("div", Ce, [r("p", Se, S(s.name), 1), r("p", we, S(s.ingredients), 1)]), d(N, {
296
+ }, [r("div", Ee, [r("p", Se, S(s.name), 1), r("p", we, S(s.ingredients), 1)]), d(M, {
295
297
  variant: e(G).Tertiary,
296
298
  "prepend-icon": "delete",
297
299
  "text-color": "neutral-gray-400",
298
- onClick: L(() => e(f).deleteRecipe(s), ["stop"])
299
- }, null, 8, ["variant", "onClick"])], 8, Re))), 128))])], 64)) : (g(), F("div", ke, [r("div", xe, [d(t, {
300
+ onClick: I(() => e(f).deleteRecipe(s), ["stop"])
301
+ }, null, 8, ["variant", "onClick"])], 8, Ce))), 128))])], 64)) : (g(), F("div", Ve, [r("div", xe, [d(t, {
300
302
  modelValue: v.value,
301
303
  "onUpdate:modelValue": l[0] || (l[0] = (s) => v.value = s),
302
304
  autofocus: "",
@@ -310,11 +312,11 @@ const _e = { class: "fm-typo-en-title-md-600" }, ve = { class: "pt-8 space-y-40"
310
312
  "shrink-at": !1,
311
313
  "hide-footer": "",
312
314
  "pin-header-row": "",
313
- onRowClick: l[1] || (l[1] = (s) => k(s.original))
315
+ onRowClick: l[1] || (l[1] = (s) => V(s.original))
314
316
  }, null, 8, ["column-defs", "page-size", "row-data"])]),
315
317
  _: 1
316
318
  })]))], 64))]),
317
- "append-heading": x(() => [r("div", Ne, [r("div", Me, [r("div", Oe, [r("p", Ie, S(n.value), 1)])]), d(M), b.value.length > 0 ? (g(), O(ae, {
319
+ "append-heading": x(() => [r("div", Me, [r("div", Ue, [r("div", Ne, [r("p", Oe, S(n.value), 1)])]), d(U), b.value.length > 0 ? (g(), N(ae, {
318
320
  key: 0,
319
321
  label: e(c)("menu.recipe.actions.add"),
320
322
  "prepend-icon": "add",
@@ -326,5 +328,5 @@ const _e = { class: "fm-typo-en-title-md-600" }, ve = { class: "pt-8 space-y-40"
326
328
  }
327
329
  });
328
330
  export {
329
- He as default
331
+ Qe as default
330
332
  };
@@ -1,10 +1,10 @@
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-ibc-yXVt.js";
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 M, createElementVNode as l, renderList as T, toDisplayString as S, createCommentVNode as H } from "vue";
2
+ import { B as i, M as W, u as Q, A as G } from "./menu-CsIzrBEr.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-CLY6CoaV.js";
7
- import { d as ae, _ as oe, u as se, c as le } from "./scheduler-CpPn2BlK.js";
6
+ import { _ as ne } from "./app-CoVUUCa_.js";
7
+ import { d as ae, _ as oe, u as se, c as le } from "./scheduler-DTWaBudB.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 = {
@@ -28,7 +28,7 @@ const ce = {
28
28
  setup(he) {
29
29
  const {
30
30
  t: a
31
- } = J(), M = y(() => [{
31
+ } = J(), I = y(() => [{
32
32
  accessorKey: "name",
33
33
  header: () => a("menu.scheduler.table.columns.name"),
34
34
  cell: (e) => e.getValue(),
@@ -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 = {
@@ -116,14 +116,14 @@ const ce = {
116
116
  var t;
117
117
  C.value || (t = x.value) == null || t.show(e);
118
118
  }
119
- const O = Z();
120
- function j(e) {
119
+ const q = Z();
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", {
124
124
  class: "fm-typo-en-body-lg-600"
125
125
  }, e.name), c("span", "?")];
126
- O.open({
126
+ q.open({
127
127
  title: a("menu.scheduler.dialogs.remove.title"),
128
128
  contentComponent: c("div", t),
129
129
  primaryActions: {
@@ -139,11 +139,11 @@ const ce = {
139
139
  await w.updateMenu(ae(e), e.name, !0);
140
140
  });
141
141
  }
142
- async function q(e) {
142
+ async function B(e) {
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 = Q(), O = y(() => j.categorizedRawMenuItems), p = y(() => j.state.menu.modules.scheduler), w = W(G(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
  });
@@ -159,7 +159,7 @@ const ce = {
159
159
  label: m(a)("menu.scheduler.empty.action"),
160
160
  variant: "primary",
161
161
  onClick: L
162
- }, null, 8, ["disabled", "label"])) : I("", !0)])]),
162
+ }, null, 8, ["disabled", "label"])) : H("", !0)])]),
163
163
  default: h(() => [p.value.length === 0 ? (d(), k(m(re), {
164
164
  key: 0,
165
165
  action: {
@@ -168,7 +168,7 @@ const ce = {
168
168
  },
169
169
  subtitle: m(a)("menu.scheduler.empty.subtitle"),
170
170
  title: m(a)("menu.scheduler.empty.title")
171
- }, null, 8, ["action", "subtitle", "title"])) : (d(), D(H, {
171
+ }, null, 8, ["action", "subtitle", "title"])) : (d(), D(M, {
172
172
  key: 1
173
173
  }, [l("div", ie, [l("div", de, [f(s, {
174
174
  modelValue: g.value,
@@ -180,7 +180,7 @@ const ce = {
180
180
  class: "xs:hidden block"
181
181
  }, {
182
182
  default: h(() => [f(o, {
183
- "column-defs": M.value,
183
+ "column-defs": I.value,
184
184
  "page-size": p.value.length,
185
185
  "row-data": p.value,
186
186
  "search-value": g.value,
@@ -194,7 +194,7 @@ const ce = {
194
194
  class: "flex-col flex-1 min-h-0 overflow-auto xs:flex hidden w-full px-16 pb-64",
195
195
  separator: ""
196
196
  }, {
197
- default: h(() => [(d(!0), D(H, null, T(K.value, (n) => (d(), k(R, {
197
+ default: h(() => [(d(!0), D(M, null, T(K.value, (n) => (d(), k(R, {
198
198
  key: n._id,
199
199
  label: n.name,
200
200
  style: {
@@ -202,11 +202,11 @@ const ce = {
202
202
  },
203
203
  onClick: () => $(n)
204
204
  }, {
205
- default: h(() => [l("div", me, [l("div", pe, S(n.name), 1), l("div", null, [l("div", fe, S(Object.keys(n.items).length) + " product(s) linked ", 1), l("div", ye, [l("div", null, " Repeat: " + S(F(n.repeat, n.weekDay)), 1), n.timePeriod.length > 0 ? (d(), D("span", _e, "Period: ")) : I("", !0), l("span", null, S(n.timePeriod.map((b) => `${b.start} - ${b.end}`).join(", ")), 1)])])]), f(v, {
205
+ default: h(() => [l("div", me, [l("div", pe, S(n.name), 1), l("div", null, [l("div", fe, S(Object.keys(n.items).length) + " product(s) linked ", 1), l("div", ye, [l("div", null, " Repeat: " + S(F(n.repeat, n.weekDay)), 1), n.timePeriod.length > 0 ? (d(), D("span", _e, "Period: ")) : H("", !0), l("span", null, S(n.timePeriod.map((b) => `${b.start} - ${b.end}`).join(", ")), 1)])])]), f(v, {
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))]),
@@ -214,8 +214,8 @@ const ce = {
214
214
  })], 64)), f(oe, {
215
215
  ref_key: "schedulerDialogRef",
216
216
  ref: x,
217
- "categorized-items": B.value,
218
- onOnComplete: q
217
+ "categorized-items": O.value,
218
+ onOnComplete: B
219
219
  }, null, 8, ["categorized-items"])]),
220
220
  _: 1
221
221
  }, 8, ["heading"]);