@feedmepos/mf-menu 0.31.63-prod → 0.31.64-prod

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-DdZ2oEAs.js → App-rVKC_Vbn.js} +8 -8
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-hgIaklws.js → ApplyProduct.vue_vue_type_script_setup_true_lang-CQN0lgvX.js} +3 -3
  3. package/dist/{Catalog-BdStItBi.js → Catalog-C9lNB3DM.js} +6 -6
  4. package/dist/{Category-DQHX1rHu.js → Category-ByWzpU_U.js} +4 -4
  5. package/dist/{Category-BI8MuP1U.js → Category-X39ST9qH.js} +6 -6
  6. package/dist/{CookingGuide-7m8xMKhW.js → CookingGuide-C_Qp3u97.js} +4 -4
  7. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-BFMtUSm2.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-BmQxMFvU.js} +1 -1
  8. package/dist/{Group-08qDreRT.js → Group-BYKvThJA.js} +1 -1
  9. package/dist/{Group-Cri6NWP7.js → Group-yHnsdiBu.js} +3 -3
  10. package/dist/{Group.vue_vue_type_script_setup_true_lang-C0ufQsgj.js → Group.vue_vue_type_script_setup_true_lang-B2vEIVxm.js} +7 -7
  11. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CQeQ2QEJ.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BmaW6wLK.js} +5 -5
  12. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-C8dHUOS5.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-D_QsxZKn.js} +7 -7
  13. package/dist/{Ingredient-FiS5_yzS.js → Ingredient-9EKVLW3z.js} +3 -3
  14. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-BrwDkOc1.js → InventoryBinding.vue_vue_type_script_setup_true_lang-BDSbWij4.js} +2 -2
  15. package/dist/{LinkProductSideSheet-DRZFUlZi.js → LinkProductSideSheet-N8steEeK.js} +3 -3
  16. package/dist/{MenuSetting-DrttWc91.js → MenuSetting-DxO0j_0S.js} +5 -5
  17. package/dist/{PrintRoute-BT8xHemW.js → PrintRoute-Be0yT0bI.js} +4 -4
  18. package/dist/{Product-VPpsqPv7.js → Product-rSNKTxMn.js} +1 -1
  19. package/dist/{Product.vue_vue_type_script_setup_true_lang-CRA6uX3q.js → Product.vue_vue_type_script_setup_true_lang-BB-_mmlo.js} +13 -13
  20. package/dist/{ProductInternalTools-B2tmSi0_.js → ProductInternalTools-DmkAEqnp.js} +5 -5
  21. package/dist/{Products-BMv8eyPx.js → Products-DlWG84xj.js} +11 -11
  22. package/dist/{Publish-Djel7vAP.js → Publish-CMv499Ic.js} +172 -173
  23. package/dist/{Recipe-UtJti2KL.js → Recipe-Dx9UDuVA.js} +4 -4
  24. package/dist/{Scheduler-CNERzIh9.js → Scheduler-DjjMi99q.js} +3 -3
  25. package/dist/{ServingSequence-D7wc3N9l.js → ServingSequence-CQgvvzpV.js} +3 -3
  26. package/dist/{Setting-CZQTLkGw.js → Setting-Dz99nfhZ.js} +5 -5
  27. package/dist/{Subcategory-DKW5SGrQ.js → Subcategory-B0MuP9fx.js} +4 -4
  28. package/dist/{Takeaway-Dgbg8uEK.js → Takeaway-D8W74WCl.js} +1 -1
  29. package/dist/{Takeaway-grGzGY1S.js → Takeaway-Dm8GdhXA.js} +4 -4
  30. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-DHNTa2g5.js → Takeaway.vue_vue_type_script_setup_true_lang-CeDYpDSX.js} +5 -5
  31. package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-BrnUWSRw.js → Thumbnail.vue_vue_type_script_setup_true_lang-DyNFc3M8.js} +4 -4
  32. package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-C-kpVC9N.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Bw9xBE_k.js} +14 -14
  33. package/dist/{Unit-CCB5fm7a.js → Unit-NtLtSO81.js} +2 -2
  34. package/dist/{Variant-DRyxVBg8.js → Variant-CMoxeGBQ.js} +3 -3
  35. package/dist/{_id_-mDX318oW.js → _id_-Be6Fw9O1.js} +10 -10
  36. package/dist/{app-Dh3thmMV.js → app-BM8k_NqX.js} +26 -26
  37. package/dist/{app-mVaKnQIP.js → app-DOjoB5qv.js} +1 -1
  38. package/dist/app.js +1 -1
  39. package/dist/assets/{linked-status-eZ_uOuIa.js → linked-status-Do3sJccG.js} +2 -2
  40. package/dist/assets/{override-menu-rrnNKu8y.js → override-menu-Bj8KcbAm.js} +2 -2
  41. package/dist/assets/{validate-menu-BYm74Q9a.js → validate-menu-Dv2ro8CT.js} +2 -2
  42. package/dist/{catalog-t62hszII.js → catalog-BUm4PJ7C.js} +1 -1
  43. package/dist/{catalogSetting-DbDHweNg.js → catalogSetting-CDcMkOk3.js} +1 -1
  44. package/dist/{category-IkpXMGtG.js → category-bObFW11U.js} +1 -1
  45. package/dist/{currency-CJxtxQ0A.js → currency-CU9EaC78.js} +1 -1
  46. package/dist/{customAttributes-cKBPhg8g.js → customAttributes-DOZylFKK.js} +1 -1
  47. package/dist/{dayjs.min--s0X1YKh.js → dayjs.min-CWSCFfMU.js} +1 -1
  48. package/dist/{index-DKdZmv6x.js → index-BLa5QNPl.js} +1 -1
  49. package/dist/{index-DN5EHvBB.js → index-C72o87pZ.js} +1 -1
  50. package/dist/{index-CUArLbcE.js → index-CopY2iE-.js} +4 -4
  51. package/dist/{index-DDqP1En5.js → index-bXJdbluW.js} +3 -3
  52. package/dist/{item-BBdeals1.js → item-BMdOcJ3c.js} +16 -16
  53. package/dist/{jszip.min-CG2qSmh-.js → jszip.min-COCV-fSF.js} +2 -2
  54. package/dist/{menu-WB63i3Ai.js → menu-BCyKdikH.js} +4 -4
  55. package/dist/{menu-CY9ZHgu5.js → menu-Co2R6FIR.js} +1 -1
  56. package/dist/{menuV2-szCpC02L.js → menuV2-DcrQDloN.js} +38 -38
  57. package/dist/{priceTier-BbCsDoWH.js → priceTier-dYHxIY1I.js} +1 -1
  58. package/dist/{scheduler-CBKgNj8G.js → scheduler-CObQbLRP.js} +4 -4
  59. package/dist/{subcategory-BY-BRWF_.js → subcategory-CbjDZtNM.js} +2 -2
  60. package/dist/{toExcel-AF7i8kK6.js → toExcel-CsSeqLR9.js} +2 -2
  61. package/dist/{unit-B6Fo2ltJ.js → unit-DKgPZMYJ.js} +2 -2
  62. package/package.json +2 -2
@@ -1,61 +1,61 @@
1
- import { defineComponent as G, ref as A, computed as F, onMounted as re, resolveComponent as C, createElementBlock as R, openBlock as h, createVNode as s, createElementVNode as o, toDisplayString as I, unref as u, Fragment as O, renderList as W, createBlock as T, withCtx as L, createCommentVNode as ce, withModifiers as K, h as Y } from "vue";
2
- import { D as ae } from "./dayjs.min--s0X1YKh.js";
3
- import { useRouter as de } from "vue-router";
4
- import { B as me, e as pe, G as te, a7 as ge, H as Z, I as ve, u as be, A as fe } from "./menu-WB63i3Ai.js";
5
- import { useI18n as J, useCoreStore as _e, RestaurantSelector as he } from "@feedmepos/mf-common";
6
- import { useSnackbar as le, useDialogChild as ye, useDialog as Ce, components as ee } from "@feedmepos/ui-library";
7
- import { _ as ke } from "./TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js";
8
- import { _ as we } from "./app-Dh3thmMV.js";
9
- import { c as xe } from "./iteration-BoeoXAHD.js";
10
- import { a as Ve, w as Se, p as Fe } from "./tooltip-CQW9YRO5.js";
11
- import { u as Ie } from "./discardConfirm-BHni0LNu.js";
12
- import { _ as Ae } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
13
- function oe(w) {
14
- return w ? ae(w).format("DD/MM/YY HH:mm") : "-";
1
+ import { defineComponent as G, ref as A, computed as $, onMounted as ie, resolveComponent as C, createElementBlock as D, openBlock as h, createVNode as o, createElementVNode as s, toDisplayString as I, unref as u, Fragment as O, renderList as W, createBlock as T, withCtx as L, createCommentVNode as re, withModifiers as K, h as Y } from "vue";
2
+ import { D as ae } from "./dayjs.min-CWSCFfMU.js";
3
+ import { useRouter as ce } from "vue-router";
4
+ import { B as de, e as me, G as te, a7 as pe, H as Z, I as ge, u as be, A as ve } from "./menu-BCyKdikH.js";
5
+ import { useI18n as J, useCoreStore as fe, RestaurantSelector as _e } from "@feedmepos/mf-common";
6
+ import { useSnackbar as le, useDialogChild as he, useDialog as ye, components as ee } from "@feedmepos/ui-library";
7
+ import { _ as Ce } from "./TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js";
8
+ import { _ as ke } from "./app-BM8k_NqX.js";
9
+ import { c as we } from "./iteration-BoeoXAHD.js";
10
+ import { a as xe, w as Ve, p as Se } from "./tooltip-CQW9YRO5.js";
11
+ import { u as Fe } from "./discardConfirm-BHni0LNu.js";
12
+ import { _ as Ie } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
13
+ function se(x) {
14
+ return x ? ae(x).format("DD/MM/YY HH:mm") : "-";
15
15
  }
16
- function Me(w, x, l) {
16
+ function Ae(x, V, l) {
17
17
  const c = (r, p = !1) => {
18
18
  var y;
19
- return r === void 0 && !p ? "-" : ((y = l.find((b) => b.value === (r || null))) == null ? void 0 : y.label) || "-";
19
+ return r === void 0 && !p ? "-" : ((y = l.find((f) => f.value === (r || null))) == null ? void 0 : y.label) || "-";
20
20
  };
21
- return w.map((r) => {
21
+ return x.map((r) => {
22
22
  var g;
23
- const p = (g = x.find(({ _id: t }) => t === r._id)) == null ? void 0 : g.posVersion, y = !!p && !!me.Pos.canUse({ feature: pe.F_FEATURE.enum.taxAndServiceChargeV4, posVersion: p }), b = c(r.catalogId);
23
+ const p = (g = V.find(({ _id: t }) => t === r._id)) == null ? void 0 : g.posVersion, y = !!p && !!de.Pos.canUse({ feature: me.F_FEATURE.enum.taxAndServiceChargeV4, posVersion: p }), f = c(r.catalogId);
24
24
  return {
25
25
  ...r,
26
- _default: b,
27
- _posTakeaway: r.takeawayCatalog ? c(r.takeawayCatalog) : b,
26
+ _default: f,
27
+ _posTakeaway: r.takeawayCatalog ? c(r.takeawayCatalog) : f,
28
28
  _additionalCatalogs: (r.additionalCatalogs || []).map((t) => c(t)),
29
- _lastUpdate: oe(r.updatedAt),
29
+ _lastUpdate: se(r.updatedAt),
30
30
  _pickup: y ? c(r.pickupCatalog, !0) : "-",
31
31
  _canUsePickup: y,
32
32
  _posVersion: p || "-"
33
33
  };
34
34
  });
35
35
  }
36
- const $e = {
36
+ const Me = {
37
37
  key: 0,
38
38
  class: "flex items-center justify-center"
39
- }, Re = {
39
+ }, $e = {
40
40
  key: 1,
41
41
  class: "space-y-16"
42
- }, De = { class: "text-fm-color-typo-secondary" }, Ue = { class: "space-y-4" }, Pe = /* @__PURE__ */ G({
42
+ }, Re = { class: "text-fm-color-typo-secondary" }, De = { class: "space-y-4" }, Pe = /* @__PURE__ */ G({
43
43
  __name: "RevertDialog",
44
44
  props: {
45
45
  restaurant: {}
46
46
  },
47
- setup(w) {
48
- const x = w, l = le(), { custom: c } = te(l), r = A(!1), p = A(null);
47
+ setup(x) {
48
+ const V = x, l = le(), { custom: c } = te(l), r = A(!1), p = A(null);
49
49
  async function y() {
50
50
  await c(
51
51
  async () => {
52
52
  var d;
53
- p.value = await ge.readMenuById(((d = x.restaurant.revertConfig) == null ? void 0 : d._id) || "");
53
+ p.value = await pe.readMenuById(((d = V.restaurant.revertConfig) == null ? void 0 : d._id) || "");
54
54
  },
55
55
  { isLoading: r }
56
56
  );
57
57
  }
58
- const b = F(() => {
58
+ const f = $(() => {
59
59
  var d;
60
60
  return [
61
61
  { label: "Main", value: null },
@@ -64,25 +64,25 @@ const $e = {
64
64
  value: _._id
65
65
  }))
66
66
  ];
67
- }), { t: g } = J(), t = F(() => {
67
+ }), { t: g } = J(), t = $(() => {
68
68
  var k;
69
- const d = x.restaurant.revertConfig;
69
+ const d = V.restaurant.revertConfig;
70
70
  if (!d) return [];
71
- const _ = Me(
71
+ const _ = Ae(
72
72
  [
73
73
  {
74
74
  ...d,
75
75
  catalogId: d.catalogId || null
76
76
  }
77
77
  ],
78
- _e().restaurants.value,
79
- b.value
78
+ fe().restaurants.value,
79
+ f.value
80
80
  )[0];
81
81
  return [
82
- { label: g("menu.revert.labels.restaurant"), value: x.restaurant.name },
82
+ { label: g("menu.revert.labels.restaurant"), value: V.restaurant.name },
83
83
  {
84
84
  label: g("menu.revert.labels.revert_to"),
85
- value: oe((k = p.value) == null ? void 0 : k.updatedAt)
85
+ value: se((k = p.value) == null ? void 0 : k.updatedAt)
86
86
  },
87
87
  { label: g("menu.revert.labels.default"), value: _._default },
88
88
  { label: g("menu.revert.labels.pos_takeaway"), value: _._posTakeaway },
@@ -93,16 +93,16 @@ const $e = {
93
93
  }
94
94
  ];
95
95
  });
96
- re(async () => y());
97
- const { emitData: D } = ye();
96
+ ie(async () => y());
97
+ const { emitData: P } = he();
98
98
  return (d, _) => {
99
99
  const k = C("FmCircularProgress");
100
- return r.value ? (h(), R("div", $e, [
101
- s(k, { size: "lg" })
102
- ])) : (h(), R("div", Re, [
103
- o("div", De, I(u(g)("menu.revert.description", { name: x.restaurant.name })), 1),
104
- o("div", Ue, [
105
- (h(!0), R(O, null, W(t.value, (M) => (h(), T(Ve, {
100
+ return r.value ? (h(), D("div", Me, [
101
+ o(k, { size: "lg" })
102
+ ])) : (h(), D("div", $e, [
103
+ s("div", Re, I(u(g)("menu.revert.description", { name: V.restaurant.name })), 1),
104
+ s("div", De, [
105
+ (h(!0), D(O, null, W(t.value, (M) => (h(), T(xe, {
106
106
  key: M.label,
107
107
  name: M.label,
108
108
  value: M.value || "--"
@@ -111,7 +111,7 @@ const $e = {
111
111
  ]));
112
112
  };
113
113
  }
114
- }), Le = { class: "fm-typo-en-title-md-600" }, Be = { class: "mt-40" }, Ee = { class: "fm-typo-en-title-sm-600" }, Oe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mt-4 mb-8" }, Te = { class: "flex gap-8 items-center justify-start" }, Ne = /* @__PURE__ */ G({
114
+ }), Ue = { class: "fm-typo-en-title-md-600" }, Le = { class: "mt-40" }, Be = { class: "fm-typo-en-title-sm-600" }, Ee = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mt-4 mb-8" }, Oe = { class: "flex gap-8 items-center justify-start" }, Te = /* @__PURE__ */ G({
115
115
  __name: "UpdateCatalogDialog",
116
116
  props: {
117
117
  catalogs: {
@@ -120,9 +120,9 @@ const $e = {
120
120
  }
121
121
  },
122
122
  emits: ["onComplete"],
123
- setup(w, { expose: x, emit: l }) {
124
- const { t: c } = J(), r = w;
125
- x({
123
+ setup(x, { expose: V, emit: l }) {
124
+ const { t: c } = J(), r = x;
125
+ V({
126
126
  show: _,
127
127
  hide: k
128
128
  });
@@ -136,7 +136,7 @@ const $e = {
136
136
  additionalCatalogs: []
137
137
  };
138
138
  }
139
- const b = F(() => [
139
+ const f = $(() => [
140
140
  {
141
141
  label: c("menu.publish.update_catalog_dialog.sections.default.use_default"),
142
142
  value: null
@@ -145,7 +145,7 @@ const $e = {
145
145
  label: m.name,
146
146
  value: m._id
147
147
  }))
148
- ]), g = F(() => [
148
+ ]), g = $(() => [
149
149
  {
150
150
  label: c("menu.publish.update_catalog_dialog.sections.default.use_default"),
151
151
  value: null
@@ -154,15 +154,15 @@ const $e = {
154
154
  label: m.name,
155
155
  value: m._id
156
156
  }))
157
- ]), t = A(y()), D = A(!1), d = A(void 0);
157
+ ]), t = A(y()), P = A(!1), d = A(void 0);
158
158
  function _(m) {
159
- d.value = m ? Z(m) : y(), t.value = Z(d.value), D.value = !0;
159
+ d.value = m ? Z(m) : y(), t.value = Z(d.value), P.value = !0;
160
160
  }
161
161
  function k() {
162
- D.value = !1;
162
+ P.value = !1;
163
163
  }
164
- const M = Ie(
165
- () => !ve.isEqual(d.value, t.value),
164
+ const M = Fe(
165
+ () => !ge.isEqual(d.value, t.value),
166
166
  () => {
167
167
  k();
168
168
  }
@@ -170,26 +170,26 @@ const $e = {
170
170
  function N() {
171
171
  k(), p("onComplete", t.value);
172
172
  }
173
- return (m, v) => {
174
- const U = C("FmSelect"), z = C("FmCheckbox"), E = C("FmButton"), $ = C("FmSideSheet");
175
- return h(), T($, {
176
- modelValue: D.value,
177
- "onUpdate:modelValue": v[5] || (v[5] = (f) => D.value = f),
173
+ return (m, b) => {
174
+ const U = C("FmSelect"), z = C("FmCheckbox"), E = C("FmButton"), R = C("FmSideSheet");
175
+ return h(), T(R, {
176
+ modelValue: P.value,
177
+ "onUpdate:modelValue": b[5] || (b[5] = (v) => P.value = v),
178
178
  "max-width": 560,
179
179
  "onOn:clickedAway": u(M)
180
180
  }, {
181
181
  "side-sheet-header": L(() => [
182
- o("span", Le, I(u(c)("menu.publish.update_catalog_dialog.title")), 1)
182
+ s("span", Ue, I(u(c)("menu.publish.update_catalog_dialog.title")), 1)
183
183
  ]),
184
184
  "side-sheet-footer": L(() => [
185
- o("div", Te, [
186
- s(E, {
185
+ s("div", Oe, [
186
+ o(E, {
187
187
  label: u(c)("menu.publish.update_catalog_dialog.actions.update"),
188
188
  size: "lg",
189
189
  variant: "primary",
190
- onClick: v[4] || (v[4] = () => N())
190
+ onClick: b[4] || (b[4] = () => N())
191
191
  }, null, 8, ["label"]),
192
- s(E, {
192
+ o(E, {
193
193
  label: u(c)("menu.publish.update_catalog_dialog.actions.cancel"),
194
194
  size: "lg",
195
195
  variant: "tertiary",
@@ -198,37 +198,37 @@ const $e = {
198
198
  ])
199
199
  ]),
200
200
  default: L(() => [
201
- s(U, {
201
+ o(U, {
202
202
  modelValue: t.value.catalogId,
203
- "onUpdate:modelValue": v[0] || (v[0] = (f) => t.value.catalogId = f),
204
- items: b.value,
203
+ "onUpdate:modelValue": b[0] || (b[0] = (v) => t.value.catalogId = v),
204
+ items: f.value,
205
205
  class: "mb-24",
206
206
  label: u(c)("menu.publish.update_catalog_dialog.sections.default.label")
207
207
  }, null, 8, ["modelValue", "items", "label"]),
208
- s(U, {
208
+ o(U, {
209
209
  modelValue: t.value.takeawayCatalog,
210
- "onUpdate:modelValue": v[1] || (v[1] = (f) => t.value.takeawayCatalog = f),
210
+ "onUpdate:modelValue": b[1] || (b[1] = (v) => t.value.takeawayCatalog = v),
211
211
  items: g.value,
212
212
  class: "mb-24",
213
213
  label: u(c)("menu.publish.update_catalog_dialog.sections.pos_takeaway.label")
214
214
  }, null, 8, ["modelValue", "items", "label"]),
215
- s(U, {
215
+ o(U, {
216
216
  modelValue: t.value.pickupCatalog,
217
- "onUpdate:modelValue": v[2] || (v[2] = (f) => t.value.pickupCatalog = f),
217
+ "onUpdate:modelValue": b[2] || (b[2] = (v) => t.value.pickupCatalog = v),
218
218
  items: g.value,
219
219
  label: u(c)("menu.publish.update_catalog_dialog.sections.pickup.label")
220
220
  }, null, 8, ["modelValue", "items", "label"]),
221
- o("div", Be, [
222
- o("div", Ee, I(u(c)("menu.publish.update_catalog_dialog.sections.additional.title")), 1),
223
- o("div", Oe, I(u(c)("menu.publish.update_catalog_dialog.sections.additional.subtitle")), 1),
224
- (h(!0), R(O, null, W(w.catalogs, (f) => (h(), R("div", {
225
- key: f._id
221
+ s("div", Le, [
222
+ s("div", Be, I(u(c)("menu.publish.update_catalog_dialog.sections.additional.title")), 1),
223
+ s("div", Ee, I(u(c)("menu.publish.update_catalog_dialog.sections.additional.subtitle")), 1),
224
+ (h(!0), D(O, null, W(x.catalogs, (v) => (h(), D("div", {
225
+ key: v._id
226
226
  }, [
227
- s(z, {
227
+ o(z, {
228
228
  modelValue: t.value.additionalCatalogs,
229
- "onUpdate:modelValue": v[3] || (v[3] = (B) => t.value.additionalCatalogs = B),
230
- label: f.name,
231
- value: f._id
229
+ "onUpdate:modelValue": b[3] || (b[3] = (B) => t.value.additionalCatalogs = B),
230
+ label: v.name,
231
+ value: v._id
232
232
  }, null, 8, ["modelValue", "label", "value"])
233
233
  ]))), 128))
234
234
  ])
@@ -237,46 +237,46 @@ const $e = {
237
237
  }, 8, ["modelValue", "onOn:clickedAway"]);
238
238
  };
239
239
  }
240
- }), ze = {
240
+ }), Ne = {
241
241
  class: "flex flex-col p-24 bg-fm-color-neutral-white min-h-[calc(100dvh-56px)] xs:max-h-[calc(100dvh-56px)]"
242
- }, He = {
242
+ }, ze = {
243
243
  class: "flex items-center xs:mb-8 mb-24"
244
- }, Ke = {
244
+ }, He = {
245
245
  class: "mr-8"
246
- }, je = {
246
+ }, Ke = {
247
247
  class: "fm-typo-en-title-md-600"
248
- }, Ye = {
248
+ }, je = {
249
249
  class: "xs:hidden mr-16"
250
- }, qe = {
250
+ }, Ye = {
251
251
  class: "xs:hidden"
252
- }, Ge = {
252
+ }, qe = {
253
253
  class: "pb-8 flex justify-between xs:flex-col gap-8"
254
- }, We = {
254
+ }, Ge = {
255
255
  class: "grow flex flex-col gap-4"
256
- }, Je = {
256
+ }, We = {
257
257
  class: "flex gap-8 items-center"
258
- }, Qe = {
258
+ }, Je = {
259
259
  class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary"
260
- }, Xe = {
260
+ }, Qe = {
261
261
  class: "space-y-4"
262
- }, Ze = {
262
+ }, Xe = {
263
263
  class: "fm-typo-en-body-lg-600"
264
- }, ea = {
264
+ }, Ze = {
265
265
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
266
- }, aa = {
266
+ }, ea = {
267
267
  class: "flex gap-8"
268
- }, ta = {
268
+ }, aa = {
269
269
  class: "xs:block hidden fixed bottom-72 right-16"
270
- }, q = 40, va = /* @__PURE__ */ G({
270
+ }, q = 40, ga = /* @__PURE__ */ G({
271
271
  __name: "Publish",
272
- setup(w) {
273
- const x = de(), {
272
+ setup(x) {
273
+ const V = ce(), {
274
274
  t: l
275
275
  } = J(), c = (e) => t.state.menu.updatedAt === e.updatedAt, r = ({
276
276
  row: e
277
277
  }) => {
278
278
  const a = c(e);
279
- return s(ke, {
279
+ return o(Ce, {
280
280
  label: l(a ? "menu.publish.table.status.latest" : "menu.publish.table.status.outdated"),
281
281
  variant: a ? "success" : "warning"
282
282
  }, null);
@@ -312,7 +312,7 @@ const $e = {
312
312
  accessorKey: "status",
313
313
  header: () => l("menu.common.labels.status"),
314
314
  enableSorting: !1,
315
- cell: (e) => s(r, {
315
+ cell: (e) => o(r, {
316
316
  row: e.row.original
317
317
  }, null)
318
318
  }, {
@@ -324,7 +324,7 @@ const $e = {
324
324
  const a = e.row.original;
325
325
  return t.state.menu.updatedAt, a.updatedAt, Y("div", {
326
326
  class: "flex justify-end gap-8"
327
- }, [d.value && a.revertConfig ? Se(Y(ee.FmButton, {
327
+ }, [d.value && a.revertConfig ? Ve(Y(ee.FmButton, {
328
328
  prependIcon: "undo",
329
329
  variant: "secondary",
330
330
  onClick: K(async () => {
@@ -336,16 +336,16 @@ const $e = {
336
336
  variant: "secondary",
337
337
  onClick: K(async () => {
338
338
  const i = U(e.row.original);
339
- await f(i);
339
+ await v(i);
340
340
  }, ["stop", "prevent"])
341
341
  })]);
342
342
  },
343
343
  meta: {
344
344
  width: "150px"
345
345
  }
346
- }], b = A(""), g = A(), t = be(), D = Ce(), d = F(() => t.version !== fe.F_MENU_VERSION.enum.v3);
346
+ }], f = A(""), g = A(), t = be(), P = ye(), d = $(() => t.version !== ve.F_MENU_VERSION.enum.v3);
347
347
  async function _(e) {
348
- e.revertConfig && D.open({
348
+ e.revertConfig && P.open({
349
349
  title: "Revert menu",
350
350
  contentComponent: Pe,
351
351
  contentComponentProps: {
@@ -360,7 +360,7 @@ const $e = {
360
360
  close: !0
361
361
  }
362
362
  }).onPrimary(async () => {
363
- await $.minor(async () => {
363
+ await R.minor(async () => {
364
364
  await t.revertRestaurantMenu(e._id);
365
365
  }, {
366
366
  customId: e._id,
@@ -368,14 +368,14 @@ const $e = {
368
368
  });
369
369
  });
370
370
  }
371
- const k = F(() => l("menu.publish.labels.main_version", {
371
+ const k = $(() => l("menu.publish.labels.main_version", {
372
372
  version: M(t.state.menu.updatedAt)
373
373
  }));
374
374
  function M(e) {
375
375
  return e ? ae(e).format("DD/MM/YYYY hh:mmA") : "";
376
376
  }
377
- const N = F(() => t.state.menu.modules.catalog), m = F(() => $.queue.value.some((e) => e.id === t.state.menu._id));
378
- function v(e) {
377
+ const N = $(() => t.state.menu.modules.catalog), m = $(() => R.queue.value.some((e) => e.id === t.state.menu._id));
378
+ function b(e) {
379
379
  var a;
380
380
  return e ? ((a = N.value.find((i) => i._id === e)) == null ? void 0 : a.name) ?? l("menu.publish.labels.catalog.invalid") : l("menu.publish.labels.catalog.main");
381
381
  }
@@ -393,138 +393,137 @@ const $e = {
393
393
  const a = U(e);
394
394
  (i = g.value) == null || i.show(a);
395
395
  }
396
- const E = le(), $ = te(E);
397
- async function f(e) {
396
+ const E = le(), R = te(E);
397
+ async function v(e) {
398
398
  var i;
399
- const a = (i = V.value.find((P) => P._id === e.restaurantId)) == null ? void 0 : i.name;
400
- await $.minor(async () => await t.publishMenu(e), {
399
+ const a = (i = S.value.find((w) => w._id === e.restaurantId)) == null ? void 0 : i.name;
400
+ await R.minor(async () => await t.publishMenu(e), {
401
401
  customId: t.state.menu._id,
402
402
  message: `Publishing menu for ${a}`,
403
403
  successMessage: `Published to ${a}`
404
404
  });
405
405
  }
406
- const B = A(null), V = F(() => t.state.restaurants.filter((e) => {
407
- var a;
408
- return !B.value || ((a = B.value) == null ? void 0 : a.includes(e._id));
409
- }).map((e) => ({
410
- ...e,
411
- catalog: {
412
- default: v(e.catalogId),
413
- takeaway: v(e.takeawayCatalog),
414
- pickup: v(e.pickupCatalog)
415
- }
416
- }))), se = F(() => {
417
- const e = b.value.toLowerCase();
418
- return V.value.filter(({
406
+ const B = A(null), S = $(() => {
407
+ const e = f.value.toLowerCase();
408
+ return t.state.restaurants.filter((a) => {
409
+ var i;
410
+ return !B.value || ((i = B.value) == null ? void 0 : i.includes(a._id));
411
+ }).map((a) => ({
412
+ ...a,
413
+ catalog: {
414
+ default: b(a.catalogId),
415
+ takeaway: b(a.takeawayCatalog),
416
+ pickup: b(a.pickupCatalog)
417
+ }
418
+ })).filter(({
419
419
  name: a,
420
420
  catalog: i
421
- }) => a.toLowerCase().includes(e) || i.default.toLowerCase().includes(e) || i.takeaway.toLowerCase().includes(e) || i.pickup.toLowerCase().includes(e));
421
+ }) => e ? a.toLowerCase().includes(e) || i.default.toLowerCase().includes(e) || i.takeaway.toLowerCase().includes(e) || i.pickup.toLowerCase().includes(e) : !0);
422
422
  });
423
- async function ne(e) {
424
- const a = e.map((S) => S._id), i = xe(a, q), P = A("");
425
- await $.minor(async () => {
426
- await Fe({
423
+ async function oe(e) {
424
+ const a = e.map((F) => F._id), i = we(a, q), w = A("");
425
+ await R.minor(async () => {
426
+ await Se({
427
427
  items: i,
428
- processor: async (S) => await t.publishMultipleMenu(S, !1),
428
+ processor: async (F) => await t.publishMultipleMenu(F, !1),
429
429
  batchSize: 1,
430
430
  batchDelay: 50,
431
431
  // 50ms delay to reduce server load
432
432
  onProgress({
433
- total: S,
433
+ total: F,
434
434
  batchStart: H,
435
435
  batchEnd: X
436
436
  }) {
437
437
  const j = (H - 1) * q;
438
- P.value = `Processed ${j} of ${e.length} restaurants`;
438
+ w.value = `Processed ${j} of ${e.length} restaurants`;
439
439
  }
440
440
  }), await t.readRestaurants(), await t.readMenu();
441
441
  }, {
442
442
  customId: t.state.menu._id,
443
443
  message: "Publishing menu",
444
- caption: P,
444
+ caption: w,
445
445
  successMessage: `Published to ${e.length} restaurant${e.length > 1 ? "s" : ""}`
446
446
  });
447
447
  }
448
- async function ue() {
449
- await $.minor(async () => await t.readRestaurants(), {
448
+ async function ne() {
449
+ await R.minor(async () => await t.readRestaurants(), {
450
450
  customId: t.state.menu._id
451
451
  });
452
452
  }
453
453
  async function Q() {
454
454
  if (m.value) return;
455
- const e = Object.keys(p.value).map(Number).filter((i) => p.value[i]), a = e.length === 0 || e.length === V.value.length ? V.value : e.map((i) => V.value[i]);
456
- e.length === 0 || e.length === V.value.length ? V.value.length > q ? (t.publishAllMenu(), E.open({
455
+ const e = Object.keys(p.value).map(Number).filter((w) => p.value[w]), a = e.length === 0 || e.length === S.value.length ? S.value : e.map((w) => S.value[w]);
456
+ S.value.length === t.state.restaurants.length && (e.length === 0 || e.length === S.value.length) ? t.state.restaurants.length > q ? (t.publishAllMenu(), E.open({
457
457
  type: "info",
458
458
  title: "Publish menu request sent"
459
- })) : await $.minor(async () => await t.publishAllMenu(), {
459
+ })) : await R.minor(async () => await t.publishAllMenu(), {
460
460
  customId: t.state.menu._id
461
- }) : await ne(a);
461
+ }) : await oe(a);
462
462
  }
463
463
  return (e, a) => {
464
- const i = C("FmChip"), P = C("FmSpacer"), S = C("FmButton"), H = C("FmSearch"), X = C("FmTable"), j = C("FmListItem"), ie = C("FmList");
465
- return h(), R(O, null, [o("div", ze, [o("div", He, [o("div", Ke, [o("div", je, I(u(l)("menu.publish.title")), 1), a[8] || (a[8] = o("div", {
464
+ const i = C("FmChip"), w = C("FmSpacer"), F = C("FmButton"), H = C("FmSearch"), X = C("FmTable"), j = C("FmListItem"), ue = C("FmList");
465
+ return h(), D(O, null, [s("div", Ne, [s("div", ze, [s("div", He, [s("div", Ke, I(u(l)("menu.publish.title")), 1), a[8] || (a[8] = s("div", {
466
466
  class: "hidden xs:block fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
467
- }, null, -1))]), s(i, {
467
+ }, null, -1))]), o(i, {
468
468
  label: k.value,
469
469
  class: "xs:hidden text-fm-color-primary bg-fm-color-system-warning-100"
470
- }, null, 8, ["label"]), s(P), o("div", Ye, [s(S, {
470
+ }, null, 8, ["label"]), o(w), s("div", je, [o(F, {
471
471
  disabled: m.value,
472
472
  label: u(l)("menu.publish.actions.refresh"),
473
473
  variant: "secondary",
474
- onClick: a[0] || (a[0] = () => ue())
475
- }, null, 8, ["disabled", "label"])]), o("div", qe, [s(S, {
474
+ onClick: a[0] || (a[0] = () => ne())
475
+ }, null, 8, ["disabled", "label"])]), s("div", Ye, [o(F, {
476
476
  disabled: m.value,
477
477
  icon: "ios_share",
478
478
  label: u(l)("menu.publish.actions.publish_all"),
479
479
  variant: "primary",
480
480
  onClick: a[1] || (a[1] = () => Q())
481
- }, null, 8, ["disabled", "label"])])]), o("div", Ge, [s(u(he), {
481
+ }, null, 8, ["disabled", "label"])])]), s("div", qe, [o(u(_e), {
482
482
  multiple: "",
483
483
  modelValue: B.value,
484
484
  "onUpdate:modelValue": a[3] || (a[3] = (n) => B.value = n)
485
485
  }, {
486
- "append-right": L(() => [s(P, {
486
+ "append-right": L(() => [o(w, {
487
487
  class: "xs:hidden"
488
- }), s(H, {
489
- modelValue: b.value,
490
- "onUpdate:modelValue": a[2] || (a[2] = (n) => b.value = n),
488
+ }), o(H, {
489
+ modelValue: f.value,
490
+ "onUpdate:modelValue": a[2] || (a[2] = (n) => f.value = n),
491
491
  autofocus: "",
492
492
  class: "w-[320px] xs:hidden",
493
493
  placeholder: u(l)("menu.publish.table.search.placeholder")
494
494
  }, null, 8, ["modelValue", "placeholder"])]),
495
495
  _: 1
496
- }, 8, ["modelValue"]), s(H, {
497
- modelValue: b.value,
498
- "onUpdate:modelValue": a[4] || (a[4] = (n) => b.value = n),
496
+ }, 8, ["modelValue"]), o(H, {
497
+ modelValue: f.value,
498
+ "onUpdate:modelValue": a[4] || (a[4] = (n) => f.value = n),
499
499
  autofocus: "",
500
500
  class: "w-full xs:block hidden",
501
501
  placeholder: u(l)("menu.publish.table.search.placeholder")
502
- }, null, 8, ["modelValue", "placeholder"])]), V.value.length > 0 ? (h(), R(O, {
502
+ }, null, 8, ["modelValue", "placeholder"])]), S.value.length > 0 ? (h(), D(O, {
503
503
  key: 0
504
- }, [s(we, {
504
+ }, [o(ke, {
505
505
  class: "xs:hidden block"
506
506
  }, {
507
- default: L(() => [s(X, {
507
+ default: L(() => [o(X, {
508
508
  modelValue: p.value,
509
509
  "onUpdate:modelValue": a[5] || (a[5] = (n) => p.value = n),
510
510
  "column-defs": y,
511
511
  loading: m.value,
512
- "page-size": V.value.length,
513
- "row-data": V.value,
514
- "search-value": b.value,
512
+ "page-size": S.value.length,
513
+ "row-data": S.value,
515
514
  shrinkAt: !1,
516
515
  virtual: !0,
517
516
  selection: "multiple",
518
517
  "hide-footer": "",
519
518
  "pin-header-row": "",
520
519
  onRowClick: a[6] || (a[6] = (n) => z(n.original))
521
- }, null, 8, ["modelValue", "loading", "page-size", "row-data", "search-value"])]),
520
+ }, null, 8, ["modelValue", "loading", "page-size", "row-data"])]),
522
521
  _: 1
523
- }), s(ie, {
522
+ }), o(ue, {
524
523
  class: "flex-col flex-1 min-h-0 overflow-auto xs:flex hidden w-full pb-64",
525
524
  separator: ""
526
525
  }, {
527
- default: L(() => [(h(!0), R(O, null, W(se.value, (n) => (h(), T(j, {
526
+ default: L(() => [(h(!0), D(O, null, W(S.value, (n) => (h(), T(j, {
528
527
  key: n._id,
529
528
  label: n.name,
530
529
  style: {
@@ -532,24 +531,24 @@ const $e = {
532
531
  },
533
532
  onClick: () => z(n)
534
533
  }, {
535
- default: L(() => [o("div", We, [o("div", Je, [o("div", Qe, I(M(n.updatedAt)), 1), s(r, {
534
+ default: L(() => [s("div", Ge, [s("div", We, [s("div", Je, I(M(n.updatedAt)), 1), o(r, {
536
535
  row: n
537
- }, null, 8, ["row"])]), o("div", Xe, [o("div", Ze, I(n.name), 1), o("div", ea, [o("div", null, "Default: " + I(n.catalog.default), 1), o("div", null, "POS takeaway: " + I(n.catalog.takeaway), 1), o("div", null, "Pickup: " + I(n.catalog.pickup), 1)])])]), o("div", aa, [d.value && n.revertConfig ? (h(), T(S, {
536
+ }, null, 8, ["row"])]), s("div", Qe, [s("div", Xe, I(n.name), 1), s("div", Ze, [s("div", null, "Default: " + I(n.catalog.default), 1), s("div", null, "POS takeaway: " + I(n.catalog.takeaway), 1), s("div", null, "Pickup: " + I(n.catalog.pickup), 1)])])]), s("div", ea, [d.value && n.revertConfig ? (h(), T(F, {
538
537
  key: 0,
539
538
  disabled: m.value,
540
539
  icon: "undo",
541
540
  variant: "tertiary",
542
541
  onClick: K(() => _(n), ["stop"])
543
- }, null, 8, ["disabled", "onClick"])) : ce("", !0), s(S, {
542
+ }, null, 8, ["disabled", "onClick"])) : re("", !0), o(F, {
544
543
  disabled: m.value,
545
544
  icon: "ios_share",
546
545
  variant: "tertiary",
547
- onClick: K(() => f(U(n)), ["stop"])
546
+ onClick: K(() => v(U(n)), ["stop"])
548
547
  }, null, 8, ["disabled", "onClick"])])]),
549
548
  _: 2
550
549
  }, 1032, ["label", "onClick"]))), 128))]),
551
550
  _: 1
552
- })], 64)) : (h(), T(u(Ae), {
551
+ })], 64)) : (h(), T(u(Ie), {
553
552
  key: 1,
554
553
  title: u(l)("menu.publish.empty.title"),
555
554
  subtitle: u(l)("menu.publish.empty.subtitle"),
@@ -557,26 +556,26 @@ const $e = {
557
556
  text: u(l)("menu.publish.empty.action"),
558
557
  icon: "add",
559
558
  callback: () => {
560
- u(x).push({
559
+ u(V).push({
561
560
  name: "$settings-my-business"
562
561
  });
563
562
  }
564
563
  }
565
- }, null, 8, ["title", "subtitle", "action"]))]), o("div", ta, [s(S, {
564
+ }, null, 8, ["title", "subtitle", "action"]))]), s("div", aa, [o(F, {
566
565
  disabled: m.value,
567
566
  icon: "ios_share",
568
567
  label: u(l)("menu.publish.actions.publish_all"),
569
568
  variant: "fab",
570
569
  onClick: a[7] || (a[7] = () => Q())
571
- }, null, 8, ["disabled", "label"])]), s(Ne, {
570
+ }, null, 8, ["disabled", "label"])]), o(Te, {
572
571
  ref_key: "updateCatalogDialogRef",
573
572
  ref: g,
574
573
  catalogs: N.value,
575
- onOnComplete: f
574
+ onOnComplete: v
576
575
  }, null, 8, ["catalogs"])], 64);
577
576
  };
578
577
  }
579
578
  });
580
579
  export {
581
- va as default
580
+ ga as default
582
581
  };