@feedmepos/mf-menu 0.31.48-prod → 0.31.50-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 (66) hide show
  1. package/dist/{App-D-dcqNRb.js → App-DXXisW3y.js} +9 -9
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-na_OOlYX.js → ApplyProduct.vue_vue_type_script_setup_true_lang-DRPvBB9r.js} +3 -3
  3. package/dist/{Catalog-BT_NvH4H.js → Catalog-xqNebB7d.js} +6 -6
  4. package/dist/{Category-CIlVNPov.js → Category-CYt-0_IK.js} +4 -4
  5. package/dist/{Category-bsYxspvu.js → Category-DRXXgCoT.js} +6 -6
  6. package/dist/{CookingGuide-C7IxQzTM.js → CookingGuide-DLfr6-fm.js} +4 -4
  7. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-CJnE543q.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-toajeers.js} +1 -1
  8. package/dist/{Group-CuQ0gDgC.js → Group-BKYzG6fU.js} +3 -3
  9. package/dist/{Group-B5882UFx.js → Group-DIA_XL_I.js} +1 -1
  10. package/dist/{Group.vue_vue_type_script_setup_true_lang-Btk8J3Tp.js → Group.vue_vue_type_script_setup_true_lang-CgpkpOvk.js} +7 -7
  11. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-yIXsPtY4.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-Dt0ELF4j.js} +5 -5
  12. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-DFSHCb9I.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-CvrZKjus.js} +806 -825
  13. package/dist/{Ingredient-24hSAj8Z.js → Ingredient-BI44dYAP.js} +3 -3
  14. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-BVcdOrDO.js → InventoryBinding.vue_vue_type_script_setup_true_lang-CBnGxphp.js} +2 -2
  15. package/dist/{LinkProductSideSheet-CD9mIEpc.js → LinkProductSideSheet-CCAges9q.js} +3 -3
  16. package/dist/{MenuSetting-CVySuMK8.js → MenuSetting-CVakiCVk.js} +5 -5
  17. package/dist/{PrintRoute-CT0-6o2w.js → PrintRoute-DlW6n7Mn.js} +4 -4
  18. package/dist/{Product-C2CtWFM5.js → Product-m8cMT1LX.js} +1 -1
  19. package/dist/{Product.vue_vue_type_script_setup_true_lang-Ts0KnCTU.js → Product.vue_vue_type_script_setup_true_lang-a55WiF4U.js} +13 -13
  20. package/dist/{ProductInternalTools-CyKeO24R.js → ProductInternalTools-CkTx11_s.js} +6 -6
  21. package/dist/{Products-wRIs1LNY.js → Products-BJuWo6iE.js} +11 -11
  22. package/dist/{Publish-BKRVvye3.js → Publish-CM8QYU-j.js} +150 -150
  23. package/dist/{Recipe-BQvRhIeZ.js → Recipe-BRDAybvK.js} +4 -4
  24. package/dist/{Scheduler-CaQu66-9.js → Scheduler-BTRJwBGC.js} +3 -3
  25. package/dist/{ServingSequence-BlUi0Hzb.js → ServingSequence-CD_DdM9d.js} +3 -3
  26. package/dist/{Setting-DFsZYxSB.js → Setting-BeO4Vkut.js} +5 -5
  27. package/dist/{Subcategory-BYnb9L7M.js → Subcategory-_1l7Bx1S.js} +4 -4
  28. package/dist/{Takeaway-BQINJijW.js → Takeaway-BFI4svUt.js} +4 -4
  29. package/dist/{Takeaway-DYiN0Yws.js → Takeaway-BZk0NtGE.js} +1 -1
  30. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-CnMEeZrd.js → Takeaway.vue_vue_type_script_setup_true_lang-CIfMWu9j.js} +5 -5
  31. package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-Bp40RcvB.js → Thumbnail.vue_vue_type_script_setup_true_lang-BP9fJ0Bu.js} +4 -4
  32. package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-jzJLp-Ac.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-t1fMjOZR.js} +16 -16
  33. package/dist/{Unit-rT9SjnsI.js → Unit-Ctw281mK.js} +2 -2
  34. package/dist/{Variant-B7aqcbez.js → Variant-C3ZYOitW.js} +3 -3
  35. package/dist/{_id_-DY1Fitul.js → _id_-CoT8bjO6.js} +10 -10
  36. package/dist/{app-BO6bn7uh.js → app-Brm1kWbu.js} +26 -26
  37. package/dist/{app-RULuHy55.js → app-OcteyEm5.js} +1 -1
  38. package/dist/app.js +1 -1
  39. package/dist/apps/mf-menu/src/api/menu.d.ts +1 -0
  40. package/dist/apps/mf-menu/src/stores/menu.d.ts +1 -0
  41. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  42. package/dist/assets/{linked-status-DRWIBDK1.js → linked-status-DAHyhlx2.js} +2 -2
  43. package/dist/assets/{override-menu-BLjzPUsy.js → override-menu-BnY4XZnY.js} +2 -2
  44. package/dist/assets/{validate-menu-5sybvnwS.js → validate-menu-BraLzbnR.js} +2 -2
  45. package/dist/{catalog-bwlWW8PZ.js → catalog-gKppJzig.js} +1 -1
  46. package/dist/{catalogSetting-DzX172wP.js → catalogSetting-Su45SyJ-.js} +1 -1
  47. package/dist/{category-B28CLR_r.js → category-8y6-08Mv.js} +1 -1
  48. package/dist/{currency-SjGU_s1p.js → currency-B_e-dhFu.js} +1 -1
  49. package/dist/{customAttributes-D8y8beXk.js → customAttributes-C2vr-SKM.js} +1 -1
  50. package/dist/{dayjs.min-CUujDjy2.js → dayjs.min-dKmkrzl4.js} +1 -1
  51. package/dist/{index-BjlPBJit.js → index-BHvV964b.js} +4 -4
  52. package/dist/{index-KiKL6590.js → index-C9tWvhY2.js} +1 -1
  53. package/dist/{index-TqIfnnRh.js → index-D4faLWap.js} +3 -3
  54. package/dist/{index-Dc0tIOma.js → index-Dr59iGVp.js} +1 -1
  55. package/dist/{item-Bk4ePGsA.js → item-DEucLegT.js} +386 -386
  56. package/dist/iteration-BoeoXAHD.js +23 -0
  57. package/dist/{jszip.min-Cb0oLCRU.js → jszip.min-yRZ7rNLS.js} +2 -2
  58. package/dist/{menu-J976EXhb.js → menu-C_Qpm-ah.js} +1 -1
  59. package/dist/{menu-CKvTLOA7.js → menu-D1ph5NBB.js} +6569 -6521
  60. package/dist/{menuV2-BWSBAnVp.js → menuV2-DlyT8PNo.js} +60 -60
  61. package/dist/{priceTier-BpWKl-29.js → priceTier-BsiwgiPs.js} +1 -1
  62. package/dist/{scheduler-CnU_uh6T.js → scheduler-Cyq65N6m.js} +4 -4
  63. package/dist/{subcategory-Bn1Jr1uy.js → subcategory-CMW9rWpo.js} +2 -2
  64. package/dist/{toExcel-DxAn19PY.js → toExcel-B9qHcJCR.js} +2 -2
  65. package/dist/{unit-BzHG0aHZ.js → unit-bsmM8Os6.js} +2 -2
  66. package/package.json +1 -1
@@ -1,55 +1,56 @@
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 z, h as H } from "vue";
2
- import { D as X } from "./dayjs.min-CUujDjy2.js";
3
- import { useRouter as ie } from "vue-router";
4
- import { B as re, e as ce, G as Z, a7 as de, H as J, I as me, u as pe, A as ge } from "./menu-CKvTLOA7.js";
5
- import { useI18n as Y, useCoreStore as ve, RestaurantSelector as be } from "@feedmepos/mf-common";
6
- import { useSnackbar as ee, useDialogChild as fe, useDialog as _e, components as Q } from "@feedmepos/ui-library";
7
- import { _ as he } from "./TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js";
8
- import { _ as ye } from "./app-BO6bn7uh.js";
9
- import { a as Ce, w as ke, p as we } from "./tooltip-CQW9YRO5.js";
10
- import { u as xe } from "./discardConfirm-BHni0LNu.js";
11
- import { _ as Ve } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
12
- function ae(x) {
13
- return x ? X(x).format("DD/MM/YY HH:mm") : "-";
1
+ import { defineComponent as q, ref as I, computed as S, onMounted as ue, resolveComponent as C, createElementBlock as D, openBlock as h, createVNode as s, createElementVNode as o, toDisplayString as F, unref as i, Fragment as E, renderList as G, createBlock as O, withCtx as P, createCommentVNode as ie, withModifiers as H, h as j } from "vue";
2
+ import { D as ae } from "./dayjs.min-dKmkrzl4.js";
3
+ import { useRouter as re } from "vue-router";
4
+ import { B as ce, e as de, G as te, a7 as me, H as Z, I as pe, u as ge, A as ve } from "./menu-D1ph5NBB.js";
5
+ import { useI18n as W, useCoreStore as be, RestaurantSelector as fe } from "@feedmepos/mf-common";
6
+ import { useSnackbar as le, useDialogChild as _e, useDialog as he, components as ee } 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-Brm1kWbu.js";
9
+ import { c as ke } from "./iteration-BoeoXAHD.js";
10
+ import { a as we, w as xe, p as Ve } from "./tooltip-CQW9YRO5.js";
11
+ import { u as Se } from "./discardConfirm-BHni0LNu.js";
12
+ import { _ as Fe } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
13
+ function oe(x) {
14
+ return x ? ae(x).format("DD/MM/YY HH:mm") : "-";
14
15
  }
15
- function Se(x, V, l) {
16
+ function Ie(x, V, l) {
16
17
  const c = (r, m = !1) => {
17
18
  var y;
18
19
  return r === void 0 && !m ? "-" : ((y = l.find((f) => f.value === (r || null))) == null ? void 0 : y.label) || "-";
19
20
  };
20
21
  return x.map((r) => {
21
22
  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);
23
+ const m = (p = V.find(({ _id: t }) => t === r._id)) == null ? void 0 : p.posVersion, y = !!m && !!ce.Pos.canUse({ feature: de.F_FEATURE.enum.taxAndServiceChargeV4, posVersion: m }), f = c(r.catalogId);
23
24
  return {
24
25
  ...r,
25
26
  _default: f,
26
27
  _posTakeaway: r.takeawayCatalog ? c(r.takeawayCatalog) : f,
27
28
  _additionalCatalogs: (r.additionalCatalogs || []).map((t) => c(t)),
28
- _lastUpdate: ae(r.updatedAt),
29
+ _lastUpdate: oe(r.updatedAt),
29
30
  _pickup: y ? c(r.pickupCatalog, !0) : "-",
30
31
  _canUsePickup: y,
31
32
  _posVersion: m || "-"
32
33
  };
33
34
  });
34
35
  }
35
- const Fe = {
36
+ const $e = {
36
37
  key: 0,
37
38
  class: "flex items-center justify-center"
38
- }, Ie = {
39
+ }, Ae = {
39
40
  key: 1,
40
41
  class: "space-y-16"
41
- }, $e = { class: "text-fm-color-typo-secondary" }, Ae = { class: "space-y-4" }, Me = /* @__PURE__ */ K({
42
+ }, Me = { class: "text-fm-color-typo-secondary" }, De = { class: "space-y-4" }, Re = /* @__PURE__ */ q({
42
43
  __name: "RevertDialog",
43
44
  props: {
44
45
  restaurant: {}
45
46
  },
46
47
  setup(x) {
47
- const V = x, l = ee(), { custom: c } = Z(l), r = I(!1), m = I(null);
48
+ const V = x, l = le(), { custom: c } = te(l), r = I(!1), m = I(null);
48
49
  async function y() {
49
50
  await c(
50
51
  async () => {
51
52
  var d;
52
- m.value = await de.readMenuById(((d = V.restaurant.revertConfig) == null ? void 0 : d._id) || "");
53
+ m.value = await me.readMenuById(((d = V.restaurant.revertConfig) == null ? void 0 : d._id) || "");
53
54
  },
54
55
  { isLoading: r }
55
56
  );
@@ -63,25 +64,25 @@ const Fe = {
63
64
  value: _._id
64
65
  }))
65
66
  ];
66
- }), { t: p } = Y(), t = S(() => {
67
+ }), { t: p } = W(), t = S(() => {
67
68
  var k;
68
69
  const d = V.restaurant.revertConfig;
69
70
  if (!d) return [];
70
- const _ = Se(
71
+ const _ = Ie(
71
72
  [
72
73
  {
73
74
  ...d,
74
75
  catalogId: d.catalogId || null
75
76
  }
76
77
  ],
77
- ve().restaurants.value,
78
+ be().restaurants.value,
78
79
  f.value
79
80
  )[0];
80
81
  return [
81
82
  { label: p("menu.revert.labels.restaurant"), value: V.restaurant.name },
82
83
  {
83
84
  label: p("menu.revert.labels.revert_to"),
84
- value: ae((k = m.value) == null ? void 0 : k.updatedAt)
85
+ value: oe((k = m.value) == null ? void 0 : k.updatedAt)
85
86
  },
86
87
  { label: p("menu.revert.labels.default"), value: _._default },
87
88
  { label: p("menu.revert.labels.pos_takeaway"), value: _._posTakeaway },
@@ -92,16 +93,16 @@ const Fe = {
92
93
  }
93
94
  ];
94
95
  });
95
- ne(async () => y());
96
- const { emitData: U } = fe();
96
+ ue(async () => y());
97
+ const { emitData: R } = _e();
97
98
  return (d, _) => {
98
99
  const k = C("FmCircularProgress");
99
- return r.value ? (h(), R("div", Fe, [
100
- n(k, { size: "lg" })
101
- ])) : (h(), R("div", Ie, [
102
- o("div", $e, F(i(p)("menu.revert.description", { name: V.restaurant.name })), 1),
103
- o("div", Ae, [
104
- (h(!0), R(E, null, j(t.value, ($) => (h(), O(Ce, {
100
+ return r.value ? (h(), D("div", $e, [
101
+ s(k, { size: "lg" })
102
+ ])) : (h(), D("div", Ae, [
103
+ o("div", Me, F(i(p)("menu.revert.description", { name: V.restaurant.name })), 1),
104
+ o("div", De, [
105
+ (h(!0), D(E, null, G(t.value, ($) => (h(), O(we, {
105
106
  key: $.label,
106
107
  name: $.label,
107
108
  value: $.value || "--"
@@ -110,7 +111,7 @@ const Fe = {
110
111
  ]));
111
112
  };
112
113
  }
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({
114
+ }), Ue = { class: "fm-typo-en-title-md-600" }, Le = { class: "mt-40" }, Pe = { class: "fm-typo-en-title-sm-600" }, Be = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mt-4 mb-8" }, Ee = { class: "flex gap-8 items-center justify-start" }, Oe = /* @__PURE__ */ q({
114
115
  __name: "UpdateCatalogDialog",
115
116
  props: {
116
117
  catalogs: {
@@ -120,7 +121,7 @@ const Fe = {
120
121
  },
121
122
  emits: ["onComplete"],
122
123
  setup(x, { expose: V, emit: l }) {
123
- const { t: c } = Y(), r = x;
124
+ const { t: c } = W(), r = x;
124
125
  V({
125
126
  show: _,
126
127
  hide: k
@@ -153,15 +154,15 @@ const Fe = {
153
154
  label: g.name,
154
155
  value: g._id
155
156
  }))
156
- ]), t = I(y()), U = I(!1), d = I(void 0);
157
+ ]), t = I(y()), R = I(!1), d = I(void 0);
157
158
  function _(g) {
158
- d.value = g ? J(g) : y(), t.value = J(d.value), U.value = !0;
159
+ d.value = g ? Z(g) : y(), t.value = Z(d.value), R.value = !0;
159
160
  }
160
161
  function k() {
161
- U.value = !1;
162
+ R.value = !1;
162
163
  }
163
- const $ = xe(
164
- () => !me.isEqual(d.value, t.value),
164
+ const $ = Se(
165
+ () => !pe.isEqual(d.value, t.value),
165
166
  () => {
166
167
  k();
167
168
  }
@@ -170,25 +171,25 @@ const Fe = {
170
171
  k(), m("onComplete", t.value);
171
172
  }
172
173
  return (g, v) => {
173
- const A = C("FmSelect"), N = C("FmCheckbox"), M = C("FmButton"), B = C("FmSideSheet");
174
+ const U = C("FmSelect"), N = C("FmCheckbox"), M = C("FmButton"), B = C("FmSideSheet");
174
175
  return h(), O(B, {
175
- modelValue: U.value,
176
- "onUpdate:modelValue": v[5] || (v[5] = (b) => U.value = b),
176
+ modelValue: R.value,
177
+ "onUpdate:modelValue": v[5] || (v[5] = (b) => R.value = b),
177
178
  "max-width": 560,
178
179
  "onOn:clickedAway": i($)
179
180
  }, {
180
- "side-sheet-header": L(() => [
181
- o("span", De, F(i(c)("menu.publish.update_catalog_dialog.title")), 1)
181
+ "side-sheet-header": P(() => [
182
+ o("span", Ue, F(i(c)("menu.publish.update_catalog_dialog.title")), 1)
182
183
  ]),
183
- "side-sheet-footer": L(() => [
184
- o("div", Pe, [
185
- n(M, {
184
+ "side-sheet-footer": P(() => [
185
+ o("div", Ee, [
186
+ s(M, {
186
187
  label: i(c)("menu.publish.update_catalog_dialog.actions.update"),
187
188
  size: "lg",
188
189
  variant: "primary",
189
190
  onClick: v[4] || (v[4] = () => T())
190
191
  }, null, 8, ["label"]),
191
- n(M, {
192
+ s(M, {
192
193
  label: i(c)("menu.publish.update_catalog_dialog.actions.cancel"),
193
194
  size: "lg",
194
195
  variant: "tertiary",
@@ -196,34 +197,34 @@ const Fe = {
196
197
  }, null, 8, ["label"])
197
198
  ])
198
199
  ]),
199
- default: L(() => [
200
- n(A, {
200
+ default: P(() => [
201
+ s(U, {
201
202
  modelValue: t.value.catalogId,
202
203
  "onUpdate:modelValue": v[0] || (v[0] = (b) => t.value.catalogId = b),
203
204
  items: f.value,
204
205
  class: "mb-24",
205
206
  label: i(c)("menu.publish.update_catalog_dialog.sections.default.label")
206
207
  }, null, 8, ["modelValue", "items", "label"]),
207
- n(A, {
208
+ s(U, {
208
209
  modelValue: t.value.takeawayCatalog,
209
210
  "onUpdate:modelValue": v[1] || (v[1] = (b) => t.value.takeawayCatalog = b),
210
211
  items: p.value,
211
212
  class: "mb-24",
212
213
  label: i(c)("menu.publish.update_catalog_dialog.sections.pos_takeaway.label")
213
214
  }, null, 8, ["modelValue", "items", "label"]),
214
- n(A, {
215
+ s(U, {
215
216
  modelValue: t.value.pickupCatalog,
216
217
  "onUpdate:modelValue": v[2] || (v[2] = (b) => t.value.pickupCatalog = b),
217
218
  items: p.value,
218
219
  label: i(c)("menu.publish.update_catalog_dialog.sections.pickup.label")
219
220
  }, null, 8, ["modelValue", "items", "label"]),
220
- o("div", Re, [
221
- o("div", Ue, F(i(c)("menu.publish.update_catalog_dialog.sections.additional.title")), 1),
222
- 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", {
221
+ o("div", Le, [
222
+ o("div", Pe, F(i(c)("menu.publish.update_catalog_dialog.sections.additional.title")), 1),
223
+ o("div", Be, F(i(c)("menu.publish.update_catalog_dialog.sections.additional.subtitle")), 1),
224
+ (h(!0), D(E, null, G(x.catalogs, (b) => (h(), D("div", {
224
225
  key: b._id
225
226
  }, [
226
- n(N, {
227
+ s(N, {
227
228
  modelValue: t.value.additionalCatalogs,
228
229
  "onUpdate:modelValue": v[3] || (v[3] = (w) => t.value.additionalCatalogs = w),
229
230
  label: b.name,
@@ -236,44 +237,44 @@ const Fe = {
236
237
  }, 8, ["modelValue", "onOn:clickedAway"]);
237
238
  };
238
239
  }
239
- }), Ee = {
240
+ }), Te = {
240
241
  class: "flex flex-col p-24 bg-fm-color-neutral-white min-h-[calc(100dvh-56px)] xs:max-h-[calc(100dvh-56px)]"
241
- }, Oe = {
242
+ }, Ne = {
242
243
  class: "flex items-center xs:mb-8 mb-24"
243
- }, Te = {
244
+ }, ze = {
244
245
  class: "mr-8"
245
- }, Ne = {
246
+ }, He = {
246
247
  class: "fm-typo-en-title-md-600"
247
- }, ze = {
248
+ }, Ke = {
248
249
  class: "xs:hidden"
249
- }, He = {
250
+ }, je = {
250
251
  class: "pb-8 flex justify-between xs:flex-col gap-8"
251
- }, Ke = {
252
+ }, Ye = {
252
253
  class: "grow flex flex-col gap-4"
253
- }, je = {
254
+ }, qe = {
254
255
  class: "flex gap-8 items-center"
255
- }, Ye = {
256
+ }, Ge = {
256
257
  class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary"
257
- }, qe = {
258
+ }, We = {
258
259
  class: "space-y-4"
259
- }, Ge = {
260
+ }, Je = {
260
261
  class: "fm-typo-en-body-lg-600"
261
- }, We = {
262
+ }, Qe = {
262
263
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
263
- }, Je = {
264
+ }, Xe = {
264
265
  class: "flex gap-8"
265
- }, Qe = {
266
+ }, Ze = {
266
267
  class: "xs:block hidden fixed bottom-72 right-16"
267
- }, Xe = 40, ca = /* @__PURE__ */ K({
268
+ }, Y = 40, ma = /* @__PURE__ */ q({
268
269
  __name: "Publish",
269
270
  setup(x) {
270
- const V = ie(), {
271
+ const V = re(), {
271
272
  t: l
272
- } = Y(), c = (e) => t.state.menu.updatedAt === e.updatedAt, r = ({
273
+ } = W(), c = (e) => t.state.menu.updatedAt === e.updatedAt, r = ({
273
274
  row: e
274
275
  }) => {
275
276
  const a = c(e);
276
- return n(he, {
277
+ return s(ye, {
277
278
  label: l(a ? "menu.publish.table.status.latest" : "menu.publish.table.status.outdated"),
278
279
  variant: a ? "success" : "warning"
279
280
  }, null);
@@ -309,7 +310,7 @@ const Fe = {
309
310
  accessorKey: "status",
310
311
  header: () => l("menu.common.labels.status"),
311
312
  enableSorting: !1,
312
- cell: (e) => n(r, {
313
+ cell: (e) => s(r, {
313
314
  row: e.row.original
314
315
  }, null)
315
316
  }, {
@@ -319,32 +320,32 @@ const Fe = {
319
320
  enableSorting: !1,
320
321
  cell: (e) => {
321
322
  const a = e.row.original;
322
- return t.state.menu.updatedAt, a.updatedAt, H("div", {
323
+ return t.state.menu.updatedAt, a.updatedAt, j("div", {
323
324
  class: "flex justify-end gap-8"
324
- }, [d.value && a.revertConfig ? ke(H(Q.FmButton, {
325
+ }, [d.value && a.revertConfig ? xe(j(ee.FmButton, {
325
326
  prependIcon: "undo",
326
327
  variant: "secondary",
327
- onClick: z(async () => {
328
+ onClick: H(async () => {
328
329
  await _(e.row.original);
329
330
  }, ["stop", "prevent"])
330
- }), l("menu.publish.actions.revert")) : null, H(Q.FmButton, {
331
+ }), l("menu.publish.actions.revert")) : null, j(ee.FmButton, {
331
332
  label: l("menu.publish.actions.publish"),
332
333
  icon: "ios_share",
333
334
  variant: "secondary",
334
- onClick: z(async () => {
335
- const s = A(e.row.original);
336
- await B(s);
335
+ onClick: H(async () => {
336
+ const u = U(e.row.original);
337
+ await B(u);
337
338
  }, ["stop", "prevent"])
338
339
  })]);
339
340
  },
340
341
  meta: {
341
342
  width: "150px"
342
343
  }
343
- }], f = I(""), p = I(), t = pe(), U = _e(), d = S(() => t.version !== ge.F_MENU_VERSION.enum.v3);
344
+ }], f = I(""), p = I(), t = ge(), R = he(), d = S(() => t.version !== ve.F_MENU_VERSION.enum.v3);
344
345
  async function _(e) {
345
- e.revertConfig && U.open({
346
+ e.revertConfig && R.open({
346
347
  title: "Revert menu",
347
- contentComponent: Me,
348
+ contentComponent: Re,
348
349
  contentComponentProps: {
349
350
  restaurant: e
350
351
  },
@@ -369,14 +370,14 @@ const Fe = {
369
370
  version: $(t.state.menu.updatedAt)
370
371
  }));
371
372
  function $(e) {
372
- return e ? X(e).format("DD/MM/YYYY hh:mmA") : "";
373
+ return e ? ae(e).format("DD/MM/YYYY hh:mmA") : "";
373
374
  }
374
375
  const T = S(() => t.state.menu.modules.catalog), g = S(() => M.queue.value.some((e) => e.id === t.state.menu._id));
375
376
  function v(e) {
376
377
  var a;
377
- return e ? ((a = T.value.find((s) => s._id === e)) == null ? void 0 : a.name) ?? l("menu.publish.labels.catalog.invalid") : l("menu.publish.labels.catalog.main");
378
+ return e ? ((a = T.value.find((u) => u._id === e)) == null ? void 0 : a.name) ?? l("menu.publish.labels.catalog.invalid") : l("menu.publish.labels.catalog.main");
378
379
  }
379
- function A(e) {
380
+ function U(e) {
380
381
  return {
381
382
  restaurantId: e._id,
382
383
  catalogId: e.catalogId,
@@ -386,14 +387,14 @@ const Fe = {
386
387
  };
387
388
  }
388
389
  function N(e) {
389
- var s;
390
- const a = A(e);
391
- (s = p.value) == null || s.show(a);
390
+ var u;
391
+ const a = U(e);
392
+ (u = p.value) == null || u.show(a);
392
393
  }
393
- const M = Z(ee());
394
+ const M = te(le());
394
395
  async function B(e) {
395
- var s;
396
- const a = (s = w.value.find((D) => D._id === e.restaurantId)) == null ? void 0 : s.name;
396
+ var u;
397
+ const a = (u = w.value.find((L) => L._id === e.restaurantId)) == null ? void 0 : u.name;
397
398
  await M.minor(async () => await t.publishMenu(e), {
398
399
  customId: t.state.menu._id,
399
400
  message: `Publishing menu for ${a}`,
@@ -410,88 +411,87 @@ const Fe = {
410
411
  takeaway: v(e.takeawayCatalog),
411
412
  pickup: v(e.pickupCatalog)
412
413
  }
413
- }))), te = S(() => {
414
+ }))), se = S(() => {
414
415
  const e = f.value.toLowerCase();
415
416
  return w.value.filter(({
416
417
  name: a,
417
- catalog: s
418
- }) => a.toLowerCase().includes(e) || s.default.toLowerCase().includes(e) || s.takeaway.toLowerCase().includes(e) || s.pickup.toLowerCase().includes(e));
418
+ catalog: u
419
+ }) => a.toLowerCase().includes(e) || u.default.toLowerCase().includes(e) || u.takeaway.toLowerCase().includes(e) || u.pickup.toLowerCase().includes(e));
419
420
  });
420
- async function q(e) {
421
- const a = I("");
421
+ async function J(e) {
422
+ const a = e.map((A) => A._id), u = ke(a, Y), L = I("");
422
423
  await M.minor(async () => {
423
- await we({
424
- items: e,
425
- processor: async (s) => {
426
- const D = A(s);
427
- return await t.publishMenu(D, !1);
428
- },
429
- batchSize: 5,
424
+ await Ve({
425
+ items: u,
426
+ processor: async (A) => await t.publishMultipleMenu(A, !1),
427
+ batchSize: 1,
430
428
  batchDelay: 50,
431
429
  // 50ms delay to reduce server load
432
430
  onProgress({
433
- total: s,
434
- batchStart: D,
435
- batchEnd: P
431
+ total: A,
432
+ batchStart: z,
433
+ batchEnd: X
436
434
  }) {
437
- a.value = `Publishing menu to restaurants ${D}-${P} of ${s}...`;
435
+ const K = (z - 1) * Y;
436
+ L.value = `Processed ${K} of ${e.length} restaurants`;
438
437
  }
439
438
  }), await t.readRestaurants(), await t.readMenu();
440
439
  }, {
441
440
  customId: t.state.menu._id,
442
- message: a,
441
+ message: "Publishing menu",
442
+ caption: L,
443
443
  successMessage: `Published to ${e.length} restaurant${e.length > 1 ? "s" : ""}`
444
444
  });
445
445
  }
446
- async function G() {
446
+ async function Q() {
447
447
  if (g.value) return;
448
- const e = Object.keys(m.value).map(Number).filter((s) => m.value[s]), a = e.length === 0 || e.length === w.value.length ? w.value : e.map((s) => w.value[s]);
449
- a.length > Xe ? await q(a) : e.length === 0 || e.length === w.value.length ? await M.minor(async () => await t.publishAllMenu(), {
448
+ const e = Object.keys(m.value).map(Number).filter((u) => m.value[u]), a = e.length === 0 || e.length === w.value.length ? w.value : e.map((u) => w.value[u]);
449
+ a.length > Y ? await J(a) : e.length === 0 || e.length === w.value.length ? await M.minor(async () => await t.publishAllMenu(), {
450
450
  customId: t.state.menu._id
451
- }) : await q(a);
451
+ }) : await J(a);
452
452
  }
453
453
  return (e, a) => {
454
- const s = C("FmChip"), D = C("FmSpacer"), P = C("FmButton"), W = C("FmSearch"), le = C("FmTable"), oe = C("FmListItem"), se = C("FmList");
455
- return h(), R(E, null, [o("div", Ee, [o("div", Oe, [o("div", Te, [o("div", Ne, F(i(l)("menu.publish.title")), 1), a[7] || (a[7] = o("div", {
454
+ const u = C("FmChip"), L = C("FmSpacer"), A = C("FmButton"), z = C("FmSearch"), X = C("FmTable"), K = C("FmListItem"), ne = C("FmList");
455
+ return h(), D(E, null, [o("div", Te, [o("div", Ne, [o("div", ze, [o("div", He, F(i(l)("menu.publish.title")), 1), a[7] || (a[7] = o("div", {
456
456
  class: "hidden xs:block fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
457
- }, null, -1))]), n(s, {
457
+ }, null, -1))]), s(u, {
458
458
  label: k.value,
459
459
  class: "xs:hidden text-fm-color-primary bg-fm-color-system-warning-100"
460
- }, null, 8, ["label"]), n(D), o("div", ze, [n(P, {
460
+ }, null, 8, ["label"]), s(L), o("div", Ke, [s(A, {
461
461
  disabled: g.value,
462
462
  icon: "ios_share",
463
463
  label: i(l)("menu.publish.actions.publish_all"),
464
464
  variant: "primary",
465
- onClick: a[0] || (a[0] = () => G())
466
- }, null, 8, ["disabled", "label"])])]), o("div", He, [n(i(be), {
465
+ onClick: a[0] || (a[0] = () => Q())
466
+ }, null, 8, ["disabled", "label"])])]), o("div", je, [s(i(fe), {
467
467
  multiple: "",
468
468
  modelValue: b.value,
469
- "onUpdate:modelValue": a[2] || (a[2] = (u) => b.value = u)
469
+ "onUpdate:modelValue": a[2] || (a[2] = (n) => b.value = n)
470
470
  }, {
471
- "append-right": L(() => [n(D, {
471
+ "append-right": P(() => [s(L, {
472
472
  class: "xs:hidden"
473
- }), n(W, {
473
+ }), s(z, {
474
474
  modelValue: f.value,
475
- "onUpdate:modelValue": a[1] || (a[1] = (u) => f.value = u),
475
+ "onUpdate:modelValue": a[1] || (a[1] = (n) => f.value = n),
476
476
  autofocus: "",
477
477
  class: "w-[320px] xs:hidden",
478
478
  placeholder: i(l)("menu.publish.table.search.placeholder")
479
479
  }, null, 8, ["modelValue", "placeholder"])]),
480
480
  _: 1
481
- }, 8, ["modelValue"]), n(W, {
481
+ }, 8, ["modelValue"]), s(z, {
482
482
  modelValue: f.value,
483
- "onUpdate:modelValue": a[3] || (a[3] = (u) => f.value = u),
483
+ "onUpdate:modelValue": a[3] || (a[3] = (n) => f.value = n),
484
484
  autofocus: "",
485
485
  class: "w-full xs:block hidden",
486
486
  placeholder: i(l)("menu.publish.table.search.placeholder")
487
- }, null, 8, ["modelValue", "placeholder"])]), w.value.length > 0 ? (h(), R(E, {
487
+ }, null, 8, ["modelValue", "placeholder"])]), w.value.length > 0 ? (h(), D(E, {
488
488
  key: 0
489
- }, [n(ye, {
489
+ }, [s(Ce, {
490
490
  class: "xs:hidden block"
491
491
  }, {
492
- default: L(() => [n(le, {
492
+ default: P(() => [s(X, {
493
493
  modelValue: m.value,
494
- "onUpdate:modelValue": a[4] || (a[4] = (u) => m.value = u),
494
+ "onUpdate:modelValue": a[4] || (a[4] = (n) => m.value = n),
495
495
  "column-defs": y,
496
496
  loading: g.value,
497
497
  "page-size": w.value.length,
@@ -502,39 +502,39 @@ const Fe = {
502
502
  selection: "multiple",
503
503
  "hide-footer": "",
504
504
  "pin-header-row": "",
505
- onRowClick: a[5] || (a[5] = (u) => N(u.original))
505
+ onRowClick: a[5] || (a[5] = (n) => N(n.original))
506
506
  }, null, 8, ["modelValue", "loading", "page-size", "row-data", "search-value"])]),
507
507
  _: 1
508
- }), n(se, {
508
+ }), s(ne, {
509
509
  class: "flex-col flex-1 min-h-0 overflow-auto xs:flex hidden w-full pb-64",
510
510
  separator: ""
511
511
  }, {
512
- default: L(() => [(h(!0), R(E, null, j(te.value, (u) => (h(), O(oe, {
513
- key: u._id,
514
- label: u.name,
512
+ default: P(() => [(h(!0), D(E, null, G(se.value, (n) => (h(), O(K, {
513
+ key: n._id,
514
+ label: n.name,
515
515
  style: {
516
516
  padding: "12px 0 !important"
517
517
  },
518
- onClick: () => N(u)
518
+ onClick: () => N(n)
519
519
  }, {
520
- default: L(() => [o("div", Ke, [o("div", je, [o("div", Ye, F($(u.updatedAt)), 1), n(r, {
521
- row: u
522
- }, 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, {
520
+ default: P(() => [o("div", Ye, [o("div", qe, [o("div", Ge, F($(n.updatedAt)), 1), s(r, {
521
+ row: n
522
+ }, null, 8, ["row"])]), o("div", We, [o("div", Je, F(n.name), 1), o("div", Qe, [o("div", null, "Default: " + F(n.catalog.default), 1), o("div", null, "POS takeaway: " + F(n.catalog.takeaway), 1), o("div", null, "Pickup: " + F(n.catalog.pickup), 1)])])]), o("div", Xe, [d.value && n.revertConfig ? (h(), O(A, {
523
523
  key: 0,
524
524
  disabled: g.value,
525
525
  icon: "undo",
526
526
  variant: "tertiary",
527
- onClick: z(() => _(u), ["stop"])
528
- }, null, 8, ["disabled", "onClick"])) : ue("", !0), n(P, {
527
+ onClick: H(() => _(n), ["stop"])
528
+ }, null, 8, ["disabled", "onClick"])) : ie("", !0), s(A, {
529
529
  disabled: g.value,
530
530
  icon: "ios_share",
531
531
  variant: "tertiary",
532
- onClick: z(() => B(A(u)), ["stop"])
532
+ onClick: H(() => B(U(n)), ["stop"])
533
533
  }, null, 8, ["disabled", "onClick"])])]),
534
534
  _: 2
535
535
  }, 1032, ["label", "onClick"]))), 128))]),
536
536
  _: 1
537
- })], 64)) : (h(), O(i(Ve), {
537
+ })], 64)) : (h(), O(i(Fe), {
538
538
  key: 1,
539
539
  title: i(l)("menu.publish.empty.title"),
540
540
  subtitle: i(l)("menu.publish.empty.subtitle"),
@@ -547,13 +547,13 @@ const Fe = {
547
547
  });
548
548
  }
549
549
  }
550
- }, null, 8, ["title", "subtitle", "action"]))]), o("div", Qe, [n(P, {
550
+ }, null, 8, ["title", "subtitle", "action"]))]), o("div", Ze, [s(A, {
551
551
  disabled: g.value,
552
552
  icon: "ios_share",
553
553
  label: i(l)("menu.publish.actions.publish_all"),
554
554
  variant: "fab",
555
- onClick: a[6] || (a[6] = () => G())
556
- }, null, 8, ["disabled", "label"])]), n(Be, {
555
+ onClick: a[6] || (a[6] = () => Q())
556
+ }, null, 8, ["disabled", "label"])]), s(Oe, {
557
557
  ref_key: "updateCatalogDialogRef",
558
558
  ref: p,
559
559
  catalogs: T.value,
@@ -563,5 +563,5 @@ const Fe = {
563
563
  }
564
564
  });
565
565
  export {
566
- ca as default
566
+ ma as default
567
567
  };
@@ -2,15 +2,15 @@ import { defineComponent as z, computed as h, ref as w, reactive as Q, watch as
2
2
  import { useI18n as U } from "@feedmepos/mf-common";
3
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-BO6bn7uh.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-CKvTLOA7.js";
5
+ import { _ as le } from "./app-Brm1kWbu.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-D1ph5NBB.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 B, g as me } from "./InventoryBinding.vue_vue_type_script_setup_true_lang-BVcdOrDO.js";
10
+ import { _ as B, g as me } from "./InventoryBinding.vue_vue_type_script_setup_true_lang-CBnGxphp.js";
11
11
  import { u as de } from "./discardConfirm-BHni0LNu.js";
12
12
  import { c as pe } from "./check-C9mY6LiX.js";
13
- import "./unit-BzHG0aHZ.js";
13
+ import "./unit-bsmM8Os6.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",
@@ -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 { A as i, O as W, u as G, G as Q } from "./menu-CKvTLOA7.js";
2
+ import { A as i, O as W, u as G, G as Q } from "./menu-D1ph5NBB.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-BO6bn7uh.js";
7
- import { d as ae, _ as oe, u as se, c as le } from "./scheduler-CnU_uh6T.js";
6
+ import { _ as ne } from "./app-Brm1kWbu.js";
7
+ import { d as ae, _ as oe, u as se, c as le } from "./scheduler-Cyq65N6m.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 = {