@feedmepos/mf-menu 0.31.33 → 0.31.34-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/dist/{App-DNDOc3bV.js → App-CaKDbV0S.js} +6 -6
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-BvrfcWHU.js → ApplyProduct.vue_vue_type_script_setup_true_lang-gY18sRMg.js} +20 -20
  3. package/dist/{Catalog-Zhi-3W6T.js → Catalog-B0zMoi7e.js} +80 -80
  4. package/dist/{Category-BU0bkAGd.js → Category-Dyou6Q17.js} +31 -27
  5. package/dist/{Category-CE9ixFkD.js → Category-rMN8037Q.js} +19 -19
  6. package/dist/{CookingGuide-eghVaeEY.js → CookingGuide-DT2XxaWa.js} +4 -4
  7. package/dist/CustomAttributeChip.vue_vue_type_script_setup_true_lang-Cv9LNAfi.js +113 -0
  8. package/dist/{Group-DWrtP9Au.js → Group-CYSIOe3D.js} +1 -1
  9. package/dist/{Group-DDZPf6LY.js → Group-M4WPAAYz.js} +3 -3
  10. package/dist/Group.vue_vue_type_script_setup_true_lang-B-BH-2WN.js +686 -0
  11. package/dist/GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-TQWka93A.js +367 -0
  12. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-Cus0YKUt.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-DgSO7SQW.js} +4982 -5081
  13. package/dist/{Ingredient-BJgvOyV9.js → Ingredient-DNvr30pW.js} +3 -3
  14. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-CF99abLi.js → InventoryBinding.vue_vue_type_script_setup_true_lang-G44luws0.js} +1052 -1052
  15. package/dist/LinkProductSideSheet-Cp0HFoP2.js +297 -0
  16. package/dist/LinkProductSideSheet.vue_vue_type_style_index_0_scoped_97fa9d58_lang-DvG3mOom.js +8024 -0
  17. package/dist/{MenuSetting-gkwORUX0.js → MenuSetting-UeQ2NyVm.js} +4 -4
  18. package/dist/{PrintRoute-Cda6sFlL.js → PrintRoute-5uX9ymJY.js} +89 -88
  19. package/dist/{Product-61AAh5L-.js → Product-Dxqf8_iq.js} +1 -1
  20. package/dist/Product.vue_vue_type_script_setup_true_lang-DUtGVRCH.js +1578 -0
  21. package/dist/{ProductInternalTools-o8cVZXCT.js → ProductInternalTools-BCF9q0i_.js} +5 -5
  22. package/dist/Products--adhOQ8n.js +283 -0
  23. package/dist/{Publish-BRgJUzoA.js → Publish-CRaoaFxc.js} +3 -3
  24. package/dist/{Recipe-CV8lvryp.js → Recipe-DPkzZMJi.js} +4 -4
  25. package/dist/{Scheduler-B_ptvb82.js → Scheduler-BuwjNHHj.js} +3 -3
  26. package/dist/{ServingSequence-DABGnLbT.js → ServingSequence-Cdf_Zmat.js} +3 -3
  27. package/dist/Setting-Vr3Thttm.js +259 -0
  28. package/dist/{Subcategory-BiqlAvMs.js → Subcategory-DoXmjcg1.js} +4 -4
  29. package/dist/{Takeaway-BBdkzEiP.js → Takeaway-BRTQu8VT.js} +1 -1
  30. package/dist/{Takeaway-nIjrDu5C.js → Takeaway-t3il54Bd.js} +4 -4
  31. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-D_M2PFO-.js → Takeaway.vue_vue_type_script_setup_true_lang-DtHABSgp.js} +6 -6
  32. package/dist/Thumbnail.vue_vue_type_script_setup_true_lang-D_ACNj_Z.js +431 -0
  33. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DAoGiRV-.js +5990 -0
  34. package/dist/{Unit-Di5sUbhV.js → Unit-C_QY3IX_.js} +2 -2
  35. package/dist/{Variant-CiZCtZk9.js → Variant-CR4IEm-Q.js} +3 -3
  36. package/dist/_id_-DOU7ieGB.js +202 -0
  37. package/dist/{app-B63V5b4I.js → app--fRC3N4C.js} +1 -1
  38. package/dist/{app-DuD_IPou.js → app-CrXLAKdw.js} +95 -97
  39. package/dist/app.js +6 -7
  40. package/dist/apps/mf-menu/src/app.d.ts +62 -3
  41. package/dist/apps/mf-menu/src/components/feature/PriceTier/LinkPriceTierSection.vue.d.ts +24 -0
  42. package/dist/apps/mf-menu/src/components/feature/PriceTier/PriceTierRuleEditor.vue.d.ts +30 -0
  43. package/dist/apps/mf-menu/src/components/feature/RestaurantAttributesSelector.vue.d.ts +33 -0
  44. package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/catalog.d.ts +2 -0
  45. package/dist/apps/mf-menu/src/components/feature/TreeEditor/store/menuV2.d.ts +80 -1
  46. package/dist/apps/mf-menu/src/composable/linkProducts.d.ts +1276 -0
  47. package/dist/apps/mf-menu/src/helper/import-export.d.ts +77 -0
  48. package/dist/apps/mf-menu/src/helper/menu.d.ts +77 -0
  49. package/dist/apps/mf-menu/src/helper/setting/catalogSetting.d.ts +11 -2
  50. package/dist/apps/mf-menu/src/manager/menu/item.d.ts +77 -0
  51. package/dist/apps/mf-menu/src/router/shared.d.ts +0 -1
  52. package/dist/apps/mf-menu/src/stores/manager/catalog.d.ts +2 -0
  53. package/dist/apps/mf-menu/src/stores/menu.d.ts +79 -0
  54. package/dist/apps/mf-menu/src/types/linkProducts.d.ts +21 -0
  55. package/dist/apps/mf-menu/src/views/PrintRoute/PrintDepartmentDialog.vue.d.ts +5 -3
  56. package/dist/apps/mf-menu/src/views/Publish/UpdateCatalogDialog.vue.d.ts +82 -0
  57. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  58. package/dist/assets/linked-status-BTF_dm9R.js +24 -0
  59. package/dist/assets/override-menu-BPu7TVCy.js +24 -0
  60. package/dist/assets/validate-menu-BQpDfHbr.js +24 -0
  61. package/dist/{catalog-DfYSMjLc.js → catalog-BGiDWODL.js} +1 -1
  62. package/dist/catalogSetting-C34kIcYn.js +71 -0
  63. package/dist/{category-mmjX_QdF.js → category-CayMSpUc.js} +1 -1
  64. package/dist/{currency-3ugQtBPt.js → currency-BggoZpJv.js} +1 -1
  65. package/dist/{dayjs.min-CkV4mNm8.js → dayjs.min-BKDTLohL.js} +1 -1
  66. package/dist/{index-Cztb2LVZ.js → index-BPcRbiW0.js} +3 -3
  67. package/dist/{index-BboaHtmY.js → index-CLFhXi0y.js} +3 -3
  68. package/dist/index-D7yR1j9C.js +215 -0
  69. package/dist/{index-BZaKuDcN.js → index-f9kzXNPD.js} +28 -28
  70. package/dist/{item-CVnDeXhJ.js → item-C51o9ejv.js} +547 -545
  71. package/dist/{jszip.min-GxfcHBC5.js → jszip.min-m57vowh9.js} +353 -353
  72. package/dist/{menu-sGVv4bhQ.js → menu-DHfLxvzU.js} +4 -4
  73. package/dist/menu-DK7wG3S5.js +133287 -0
  74. package/dist/menuV2-B-0V65cx.js +707 -0
  75. package/dist/mf-menu.css +1 -1
  76. package/dist/{priceTier-CHTA0ZEb.js → priceTier-DD-24pkj.js} +1 -1
  77. package/dist/{scheduler-CaMxCHZ0.js → scheduler-NjDv_P4c.js} +16 -17
  78. package/dist/subcategory-DLdBwjHV.js +148 -0
  79. package/dist/{toExcel-WorodvP1.js → toExcel-coJ5igRV.js} +15 -15
  80. package/dist/{unit-DtKZZYL6.js → unit-C7XUV0EW.js} +5 -4
  81. package/package.json +5 -5
  82. package/dist/CustomAttributeChip.vue_vue_type_script_setup_true_lang-BiF8rW4M.js +0 -7949
  83. package/dist/FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js +0 -26
  84. package/dist/Group.vue_vue_type_script_setup_true_lang-DyqGsRAW.js +0 -698
  85. package/dist/GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BmRUg94d.js +0 -206
  86. package/dist/LinkProductSideSheet-CTT4oGUY.js +0 -112
  87. package/dist/Product.vue_vue_type_script_setup_true_lang-Cy4uok1E.js +0 -1560
  88. package/dist/Products-D0rrANT6.js +0 -270
  89. package/dist/Setting-3ISlMXOA.js +0 -258
  90. package/dist/Thumbnail.vue_vue_type_script_setup_true_lang-DzQ8_6Bi.js +0 -71
  91. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-y0n5hTLk.js +0 -6149
  92. package/dist/_id_-DY8himeL.js +0 -200
  93. package/dist/apps/mf-menu/src/components/feature/LinkProduct/LinkProductSideSheet.vue.d.ts +0 -70
  94. package/dist/assets/linked-status-CkBKnMXs.js +0 -24
  95. package/dist/assets/override-menu-XZ7XfcfS.js +0 -24
  96. package/dist/assets/validate-menu-Bomogq01.js +0 -24
  97. package/dist/catalogSetting-_4Z0s3_Q.js +0 -65
  98. package/dist/index-Ce4v8o7D.js +0 -106
  99. package/dist/menu-IGORh0Ik.js +0 -108039
  100. package/dist/subcategory-CmVttqlG.js +0 -817
  101. /package/dist/{apps/mf-menu/src/components → packages/shared/src/components/info}/CustomAttributeChip.vue.d.ts +0 -0
@@ -1,18 +1,18 @@
1
- import { defineComponent as oe, computed as T, resolveComponent as y, createBlock as k, openBlock as p, createVNode as o, ref as w, createElementBlock as V, Fragment as z, renderSlot as ye, unref as e, withCtx as g, createElementVNode as f, createCommentVNode as B, renderList as q, createTextVNode as be, toDisplayString as N, h as J, withModifiers as W, normalizeClass as xe } from "vue";
1
+ import { defineComponent as oe, computed as T, resolveComponent as y, createBlock as V, openBlock as p, createVNode as o, ref as w, createElementBlock as M, Fragment as P, renderSlot as ye, unref as e, withCtx as g, createElementVNode as f, createCommentVNode as K, renderList as q, createTextVNode as be, toDisplayString as N, h as J, withModifiers as W, normalizeClass as xe } from "vue";
2
2
  import { useRouter as Ce } from "vue-router";
3
- import { u as de, G as M, O as pe, D as fe, B as ue, A as ke, H as ee, J as ge, aa as re } from "./menu-IGORh0Ik.js";
3
+ import { u as de, G as F, O as pe, D as fe, B as ue, A as ke, H as ee, J as ge, a9 as re } from "./menu-DK7wG3S5.js";
4
4
  import { useI18n as ne, useCoreStore as ve } from "@feedmepos/mf-common";
5
5
  import { useSnackbar as _e, components as te, FmButtonVariant as j, FmButtonColorThemeVariant as Q, useDialog as he, useBreakpoints as Oe } from "@feedmepos/ui-library";
6
- import { _ as Fe, R as ie } from "./app-DuD_IPou.js";
6
+ import { _ as Fe, R as ie } from "./app-CrXLAKdw.js";
7
7
  import { _ as Me } from "./TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js";
8
- import { _ as ae } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
8
+ import { a as ae } from "./LinkProductSideSheet-Cp0HFoP2.js";
9
9
  import { _ as Ve } from "./FormSection.vue_vue_type_script_setup_true_lang-CO4YGYLB.js";
10
- import { _ as ce, a as De } from "./GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BmRUg94d.js";
10
+ import { _ as ce, a as De } from "./GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-TQWka93A.js";
11
11
  import { c as Se } from "./check-C9mY6LiX.js";
12
- import { C as I, a as P } from "./catalogSetting-_4Z0s3_Q.js";
12
+ import { C as I, a as B } from "./catalogSetting-C34kIcYn.js";
13
13
  import { _ as Te } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
14
14
  import { _ as Ue } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
15
- import { C as Ee } from "./catalog-DfYSMjLc.js";
15
+ import { C as Ee } from "./catalog-BGiDWODL.js";
16
16
  const Ae = /* @__PURE__ */ oe({
17
17
  __name: "CatalogUsageTable",
18
18
  props: {
@@ -68,7 +68,7 @@ const Ae = /* @__PURE__ */ oe({
68
68
  }];
69
69
  return (b, C) => {
70
70
  const E = y("FmTable");
71
- return p(), k(E, {
71
+ return p(), V(E, {
72
72
  "column-defs": L,
73
73
  "row-data": S.value,
74
74
  "page-size": S.value.length,
@@ -80,7 +80,7 @@ const Ae = /* @__PURE__ */ oe({
80
80
  }), we = { class: "space-y-32" }, Ne = {
81
81
  key: 0,
82
82
  class: "pl-32 space-x-8"
83
- }, Le = { class: "pl-[60px] space-y-16" }, Re = { class: "space-x-16 flex items-center" }, $e = { class: "flex-1 space-y-4" }, Ie = { class: "fm-typo-en-body-lg-400" }, Pe = { class: "fm-typo-en-body-md-400" }, Be = { class: "flex gap-8 items-center justify-start" }, ze = /* @__PURE__ */ oe({
83
+ }, Le = { class: "pl-[60px] space-y-16" }, Re = { class: "space-x-16 flex items-center" }, $e = { class: "flex-1 space-y-4" }, Ie = { class: "fm-typo-en-body-lg-400" }, Be = { class: "fm-typo-en-body-md-400" }, Pe = { class: "flex gap-8 items-center justify-start" }, ze = /* @__PURE__ */ oe({
84
84
  __name: "Form",
85
85
  setup(X, { expose: D }) {
86
86
  const d = w(!1), S = w(!1), L = (i, n) => {
@@ -88,17 +88,17 @@ const Ae = /* @__PURE__ */ oe({
88
88
  n ?? ue.generator.initMenuV4Catalog(),
89
89
  b.value
90
90
  ));
91
- }, b = T(() => C.version === M.F_MENU_VERSION.enum.v4), C = de(), E = ve(), m = pe(fe(_e())), u = w(
91
+ }, b = T(() => C.version === F.F_MENU_VERSION.enum.v4), C = de(), E = ve(), m = pe(fe(_e())), u = w(
92
92
  I.fromCatalog(ue.generator.initMenuV4Catalog(), b.value)
93
93
  ), Z = T(() => C.catalogs.map((i) => i.name)), A = T({
94
94
  get: () => u.value.taxSetting,
95
95
  set: (i) => {
96
96
  u.value.taxSetting = i;
97
97
  }
98
- }), h = T(() => {
99
- var v, O;
98
+ }), k = T(() => {
99
+ var v, h;
100
100
  if (!E.currentCountry.value) return [];
101
- const i = ((v = u.value.taxSetting) == null ? void 0 : v.mode) === P.MANUAL ? ((O = u.value.taxSetting) == null ? void 0 : O.inclusive) ?? [] : [];
101
+ const i = ((v = u.value.taxSetting) == null ? void 0 : v.mode) === B.MANUAL ? ((h = u.value.taxSetting) == null ? void 0 : h.inclusive) ?? [] : [];
102
102
  return ke.Country.getCountry(E.currentCountry.value).taxSystems.map((U) => {
103
103
  const s = i.find((l) => l.systemCode === U.code);
104
104
  return {
@@ -108,16 +108,16 @@ const Ae = /* @__PURE__ */ oe({
108
108
  });
109
109
  });
110
110
  function Y(i) {
111
- const n = u.value.taxSetting, v = n.mode === P.AUTO ? I.manualTax(h.value) : ee(n);
111
+ const n = u.value.taxSetting, v = n.mode === B.AUTO ? I.manualTax(k.value) : ee(n);
112
112
  v.inclusive ?? (v.inclusive = []);
113
- const O = v.inclusive.findIndex((U) => U.systemCode === i.systemCode);
114
- O < 0 ? v.inclusive.push(i) : v.inclusive.splice(O, 1, i), A.value = v;
113
+ const h = v.inclusive.findIndex((U) => U.systemCode === i.systemCode);
114
+ h < 0 ? v.inclusive.push(i) : v.inclusive.splice(h, 1, i), A.value = v;
115
115
  }
116
- function G(i, n) {
116
+ function z(i, n) {
117
117
  const v = ee(u.value);
118
118
  v.markupOptions && (v.markupOptions[i] = n, u.value = v);
119
119
  }
120
- function K(i) {
120
+ function G(i) {
121
121
  const n = ee(u.value);
122
122
  n.markupOptions && (n.markupOptions.splice(i, 1), u.value = n);
123
123
  }
@@ -130,7 +130,7 @@ const Ae = /* @__PURE__ */ oe({
130
130
  try {
131
131
  await m.updateMenu(
132
132
  {
133
- module: M.F_MENU_MODULE_V4_KEY.enum.catalog,
133
+ module: F.F_MENU_MODULE_V4_KEY.enum.catalog,
134
134
  operation: ge.F_OPERATION_TYPE.create,
135
135
  data: i
136
136
  },
@@ -142,8 +142,8 @@ const Ae = /* @__PURE__ */ oe({
142
142
  }
143
143
  const { t: r } = ne();
144
144
  return D({ trigger: L }), (i, n) => {
145
- const v = y("fm-text-field"), O = y("fm-radio"), U = y("fm-radio-group"), s = y("fm-checkbox"), l = y("fm-switch"), t = y("fm-select"), x = y("fm-button"), R = y("fm-chip"), F = y("fm-card"), $ = y("fm-side-sheet");
146
- return p(), V(z, null, [
145
+ const v = y("fm-text-field"), h = y("fm-radio"), U = y("fm-radio-group"), s = y("fm-checkbox"), l = y("fm-switch"), t = y("fm-select"), x = y("fm-button"), R = y("fm-chip"), O = y("fm-card"), $ = y("fm-side-sheet");
146
+ return p(), M(P, null, [
147
147
  ye(i.$slots, "default", { trigger: L }),
148
148
  o($, {
149
149
  modelValue: d.value,
@@ -156,7 +156,7 @@ const Ae = /* @__PURE__ */ oe({
156
156
  "max-width": 560
157
157
  }, {
158
158
  "side-sheet-footer": g(() => [
159
- f("div", Be, [
159
+ f("div", Pe, [
160
160
  o(x, {
161
161
  loading: S.value,
162
162
  label: e(r)("menu.common.actions.add"),
@@ -197,26 +197,25 @@ const Ae = /* @__PURE__ */ oe({
197
197
  o(U, {
198
198
  "model-value": (a = u.value.taxSetting) == null ? void 0 : a.mode,
199
199
  "onUpdate:modelValue": n[1] || (n[1] = (c) => {
200
- c === e(P).AUTO ? A.value = e(I).autoTax() : A.value = e(I).manualTax(h.value);
200
+ c === e(B).AUTO ? A.value = e(I).autoTax() : A.value = e(I).manualTax(k.value);
201
201
  })
202
202
  }, {
203
203
  default: g(() => [
204
- o(O, {
205
- value: e(P).AUTO,
204
+ o(h, {
205
+ value: e(B).AUTO,
206
206
  label: e(r)("menu.catalog.form.tax.auto.label"),
207
- sublabel: e(r)("menu.catalog.form.tax.auto.sublabel"),
208
- class: "pl-4"
207
+ sublabel: e(r)("menu.catalog.form.tax.auto.sublabel")
209
208
  }, null, 8, ["value", "label", "sublabel"]),
210
- o(O, {
211
- value: e(P).MANUAL,
209
+ o(h, {
210
+ value: e(B).MANUAL,
212
211
  label: e(r)("menu.catalog.form.tax.manual.label"),
213
212
  sublabel: e(r)("menu.catalog.form.tax.manual.sublabel")
214
213
  }, null, 8, ["value", "label", "sublabel"])
215
214
  ]),
216
215
  _: 1
217
216
  }, 8, ["model-value"]),
218
- ((_ = u.value.taxSetting) == null ? void 0 : _.mode) === e(P).MANUAL ? (p(), V("div", Ne, [
219
- (p(!0), V(z, null, q(h.value, (c) => (p(), k(s, {
217
+ ((_ = u.value.taxSetting) == null ? void 0 : _.mode) === e(B).MANUAL ? (p(), M("div", Ne, [
218
+ (p(!0), M(P, null, q(k.value, (c) => (p(), V(s, {
220
219
  key: c.systemCode,
221
220
  "model-value": c.inclusive,
222
221
  value: !0,
@@ -228,7 +227,7 @@ const Ae = /* @__PURE__ */ oe({
228
227
  });
229
228
  }
230
229
  }, null, 8, ["model-value", "label", "onUpdate:modelValue"]))), 128))
231
- ])) : B("", !0)
230
+ ])) : K("", !0)
232
231
  ];
233
232
  }),
234
233
  _: 1
@@ -236,38 +235,38 @@ const Ae = /* @__PURE__ */ oe({
236
235
  ]),
237
236
  _: 1
238
237
  }, 8, ["title"]),
239
- b.value ? (p(), k(ae, {
238
+ b.value ? (p(), V(ae, {
240
239
  key: 0,
241
240
  label: e(r)("menu.catalog.form.link.title")
242
241
  }, {
243
242
  default: g(() => [
244
243
  o(l, {
245
- "model-value": u.value.orderFrom && u.value.orderFrom !== e(M.F_ORDER_FROM).enum.NONE,
244
+ "model-value": u.value.orderFrom && u.value.orderFrom !== e(F.F_ORDER_FROM).enum.NONE,
246
245
  label: e(r)("menu.catalog.form.link.auto_link.label"),
247
246
  "label-placement": "right",
248
247
  sublabel: e(r)("menu.catalog.form.link.auto_link.sublabel"),
249
- "onUpdate:modelValue": n[2] || (n[2] = (a) => u.value.orderFrom = a ? e(M.F_ORDER_FROM).enum.ALL : e(M.F_ORDER_FROM).enum.NONE)
248
+ "onUpdate:modelValue": n[2] || (n[2] = (a) => u.value.orderFrom = a ? e(F.F_ORDER_FROM).enum.ALL : e(F.F_ORDER_FROM).enum.NONE)
250
249
  }, null, 8, ["model-value", "label", "sublabel"]),
251
- u.value.orderFrom !== e(M.F_ORDER_FROM).enum.NONE ? (p(), k(t, {
250
+ u.value.orderFrom !== e(F.F_ORDER_FROM).enum.NONE ? (p(), V(t, {
252
251
  key: 0,
253
252
  class: "ml-[60px]",
254
253
  items: [
255
254
  {
256
255
  label: e(r)("menu.catalog.form.link.options.all"),
257
- value: e(M.F_ORDER_FROM).enum.ALL
256
+ value: e(F.F_ORDER_FROM).enum.ALL
258
257
  },
259
258
  {
260
259
  label: e(r)("menu.catalog.form.link.options.pos_only"),
261
- value: e(M.F_ORDER_FROM).enum.POS_ONLY
260
+ value: e(F.F_ORDER_FROM).enum.POS_ONLY
262
261
  }
263
262
  ],
264
263
  "model-value": u.value.orderFrom,
265
264
  "onUpdate:modelValue": n[3] || (n[3] = (a) => u.value.orderFrom = a)
266
- }, null, 8, ["items", "model-value"])) : B("", !0)
265
+ }, null, 8, ["items", "model-value"])) : K("", !0)
267
266
  ]),
268
267
  _: 1
269
- }, 8, ["label"])) : B("", !0),
270
- b.value ? (p(), k(ae, {
268
+ }, 8, ["label"])) : K("", !0),
269
+ b.value ? (p(), V(ae, {
271
270
  key: 1,
272
271
  label: e(r)("menu.catalog.form.markup.title")
273
272
  }, {
@@ -298,16 +297,16 @@ const Ae = /* @__PURE__ */ oe({
298
297
  ]),
299
298
  _: 1
300
299
  }, 8, ["categories", "items"]),
301
- (p(!0), V(z, null, q(u.value.markupOptions, (a, _) => (p(), k(ce, {
300
+ (p(!0), M(P, null, q(u.value.markupOptions, (a, _) => (p(), V(ce, {
302
301
  key: _,
303
302
  categories: e(C).categories,
304
303
  items: e(C).items,
305
304
  "model-value": a,
306
305
  action: "update",
307
- "onUpdate:modelValue": (c) => c && G(_, c)
306
+ "onUpdate:modelValue": (c) => c && z(_, c)
308
307
  }, {
309
308
  default: g(({ trigger: c }) => [
310
- o(F, {
309
+ o(O, {
311
310
  id: JSON.stringify(a),
312
311
  class: "py-12 px-16 cursor-pointer",
313
312
  variant: "outlined",
@@ -323,14 +322,14 @@ const Ae = /* @__PURE__ */ oe({
323
322
  _: 2
324
323
  }, 1024),
325
324
  f("p", Ie, N(e(r)("menu.catalog.form.markup.config", { number: _ + 1 })), 1),
326
- f("p", Pe, N(a.includeItems ? e(r)("menu.catalog.form.markup.products", {
325
+ f("p", Be, N(a.includeItems ? e(r)("menu.catalog.form.markup.products", {
327
326
  count: a.includeItems.length
328
327
  }) : e(r)("menu.catalog.form.markup.all_items")), 1)
329
328
  ]),
330
329
  o(x, {
331
330
  variant: e(j).Tertiary,
332
331
  "prepend-icon": "delete",
333
- onClick: (se) => K(_)
332
+ onClick: (se) => G(_)
334
333
  }, null, 8, ["variant", "onClick"])
335
334
  ])
336
335
  ]),
@@ -342,12 +341,13 @@ const Ae = /* @__PURE__ */ oe({
342
341
  ])
343
342
  ]),
344
343
  _: 1
345
- }, 8, ["label"])) : B("", !0),
346
- b.value ? (p(), k(De, {
347
- key: 2,
348
- "model-value": u.value.usePriceTiers,
349
- "onUpdate:modelValue": n[6] || (n[6] = (a) => u.value.usePriceTiers = a || null)
350
- }, null, 8, ["model-value"])) : B("", !0)
344
+ }, 8, ["label"])) : K("", !0),
345
+ o(De, {
346
+ modelValue: u.value,
347
+ "onUpdate:modelValue": n[6] || (n[6] = (a) => u.value = a),
348
+ "is-main-catalog": !1,
349
+ "is-v4": b.value
350
+ }, null, 8, ["modelValue", "is-v4"])
351
351
  ])
352
352
  ]),
353
353
  _: 1
@@ -389,7 +389,7 @@ const Ae = /* @__PURE__ */ oe({
389
389
  t: m
390
390
  } = ne();
391
391
  function u(s, l) {
392
- var F, $, a, _;
392
+ var O, $, a, _;
393
393
  const t = D.restaurants.value.find(({
394
394
  _id: c
395
395
  }) => c === l._id), x = [...l.linkedDeliveryCatalogs.map((c) => ({
@@ -397,7 +397,7 @@ const Ae = /* @__PURE__ */ oe({
397
397
  selector: c.catalog
398
398
  })), {
399
399
  label: "Delivery (FoodPanda integration)",
400
- selector: (F = t == null ? void 0 : t.foodpandaDelivery) == null ? void 0 : F.catalogId
400
+ selector: (O = t == null ? void 0 : t.foodpandaDelivery) == null ? void 0 : O.catalogId
401
401
  }, {
402
402
  label: "Delivery (GrabFood integration)",
403
403
  selector: ($ = t == null ? void 0 : t.grabfoodDelivery) == null ? void 0 : $.catalogId
@@ -434,7 +434,7 @@ const Ae = /* @__PURE__ */ oe({
434
434
  usage: u(s, l)
435
435
  })).filter((l) => l.usage.length > 0);
436
436
  }
437
- const A = w(!1), h = w(""), Y = T(() => {
437
+ const A = w(!1), k = w(""), Y = T(() => {
438
438
  var l;
439
439
  return [{
440
440
  id: le,
@@ -451,12 +451,12 @@ const Ae = /* @__PURE__ */ oe({
451
451
  disableDelete: !1,
452
452
  defaultOrderFrom: t.defaultOrderFrom
453
453
  }))].map((t) => {
454
- var F;
455
- const x = Z(((F = t.doc) == null ? void 0 : F._id) || null), R = t.doc ? Ee.getSellingItem(t.doc, d.state.menu) : d.state.menu.modules.item;
454
+ var O;
455
+ const x = Z(((O = t.doc) == null ? void 0 : O._id) || null), R = t.doc ? Ee.getSellingItem(t.doc, d.state.menu) : d.state.menu.modules.item;
456
456
  return {
457
457
  ...t,
458
458
  taxMode: t.taxes ? "Manual" : "Automatic",
459
- autoLink: t.defaultOrderFrom !== M.F_ORDER_FROM.enum.NONE ? "Activated" : "Deactivated",
459
+ autoLink: t.defaultOrderFrom !== F.F_ORDER_FROM.enum.NONE ? "Activated" : "Deactivated",
460
460
  restaurants: re(x, {
461
461
  selector: "name"
462
462
  }),
@@ -464,7 +464,7 @@ const Ae = /* @__PURE__ */ oe({
464
464
  disableDelete: t.disableDelete
465
465
  };
466
466
  });
467
- }), G = T(() => Y.value.filter((s) => s.id !== le)), K = T(() => G.value.filter((s) => s.name.toLowerCase().includes(h.value.toLowerCase()))), H = (s) => {
467
+ }), z = T(() => Y.value.filter((s) => s.id !== le)), G = T(() => z.value.filter((s) => s.name.toLowerCase().includes(k.value.toLowerCase()))), H = (s) => {
468
468
  d.selectCatalog(s === le ? null : s), E.push({
469
469
  name: ie.EDIT_CATALOG_PRODUCT,
470
470
  params: {
@@ -502,7 +502,7 @@ const Ae = /* @__PURE__ */ oe({
502
502
  }
503
503
  }).onPrimary(async () => {
504
504
  await C.updateMenu({
505
- module: M.F_MENU_MODULE_V4_KEY.enum.catalog,
505
+ module: F.F_MENU_MODULE_V4_KEY.enum.catalog,
506
506
  operation: ge.F_OPERATION_TYPE.delete,
507
507
  data: s.id
508
508
  }, s.name, !0), d.selectCatalog(null), await E.push({
@@ -558,13 +558,13 @@ const Ae = /* @__PURE__ */ oe({
558
558
  }, ["stop", "prevent"])
559
559
  })]);
560
560
  }
561
- }]), O = Oe(), U = T(() => O.breakpoints.value.xs);
561
+ }]), h = Oe(), U = T(() => h.breakpoints.value.xs);
562
562
  return (s, l) => {
563
- const t = y("fm-button"), x = y("FmSearch"), R = y("FmTable"), F = y("FmButton"), $ = y("fm-side-sheet");
564
- return p(), k(Ue, {
563
+ const t = y("fm-button"), x = y("FmSearch"), R = y("FmTable"), O = y("FmButton"), $ = y("fm-side-sheet");
564
+ return p(), V(Ue, {
565
565
  heading: e(m)("menu.catalog.title")
566
566
  }, {
567
- "append-heading": g(() => [G.value.length > 0 ? (p(), k(e(me), {
567
+ "append-heading": g(() => [z.value.length > 0 ? (p(), V(e(me), {
568
568
  key: 0,
569
569
  ref_key: "createCatalogManagerFormRef",
570
570
  ref: r
@@ -583,8 +583,8 @@ const Ae = /* @__PURE__ */ oe({
583
583
  onClick: a
584
584
  }, null, 8, ["label", "onClick"])])]),
585
585
  _: 1
586
- }, 512)) : B("", !0)]),
587
- default: g(() => [G.value.length === 0 ? (p(), k(e(Te), {
586
+ }, 512)) : K("", !0)]),
587
+ default: g(() => [z.value.length === 0 ? (p(), V(e(Te), {
588
588
  key: 0,
589
589
  subtitle: e(m)("menu.catalog.empty.subtitle"),
590
590
  title: e(m)("menu.catalog.empty.title")
@@ -600,33 +600,33 @@ const Ae = /* @__PURE__ */ oe({
600
600
  _: 1
601
601
  })]),
602
602
  _: 1
603
- }, 8, ["subtitle", "title"])) : (p(), V(z, {
603
+ }, 8, ["subtitle", "title"])) : (p(), M(P, {
604
604
  key: 1
605
- }, [U.value ? (p(), V("div", Ye, [f("div", He, [o(x, {
605
+ }, [U.value ? (p(), M("div", Ye, [f("div", He, [o(x, {
606
606
  autofocus: "",
607
- modelValue: h.value,
608
- "onUpdate:modelValue": l[3] || (l[3] = (a) => h.value = a),
607
+ modelValue: k.value,
608
+ "onUpdate:modelValue": l[3] || (l[3] = (a) => k.value = a),
609
609
  class: "w-full",
610
610
  placeholder: e(m)("menu.common.labels.search_placeholder", {
611
611
  type: e(m)("menu.catalog.title")
612
612
  })
613
- }, null, 8, ["modelValue", "placeholder"])]), f("div", Je, [(p(!0), V(z, null, q(K.value, (a) => (p(), V("div", {
613
+ }, null, 8, ["modelValue", "placeholder"])]), f("div", Je, [(p(!0), M(P, null, q(G.value, (a) => (p(), M("div", {
614
614
  key: a.id,
615
615
  class: "flex flex-row py-12 px-16 items-center",
616
616
  onClick: (_) => H(a.id)
617
- }, [f("div", qe, [f("p", Qe, " Tax calculation: " + N(a.taxMode), 1), f("p", Xe, " Auto link product: " + N(a.autoLink), 1), f("p", Ze, N(a.name), 1)]), f("div", ea, [o(F, {
617
+ }, [f("div", qe, [f("p", Qe, " Tax calculation: " + N(a.taxMode), 1), f("p", Xe, " Auto link product: " + N(a.autoLink), 1), f("p", Ze, N(a.name), 1)]), f("div", ea, [o(O, {
618
618
  "text-color": e(Q).NeutralGray400,
619
619
  variant: e(j).Tertiary,
620
620
  "prepend-icon": "file_copy",
621
621
  onClick: W((_) => i(a), ["stop"])
622
- }, null, 8, ["text-color", "variant", "onClick"]), o(F, {
622
+ }, null, 8, ["text-color", "variant", "onClick"]), o(O, {
623
623
  "text-color": e(Q).NeutralGray400,
624
624
  variant: e(j).Tertiary,
625
625
  "prepend-icon": "delete",
626
626
  onClick: W((_) => n(a), ["stop"])
627
- }, null, 8, ["text-color", "variant", "onClick"])])], 8, We))), 128))])])) : (p(), V("div", Ge, [f("div", Ke, [f("div", je, [o(x, {
628
- modelValue: h.value,
629
- "onUpdate:modelValue": l[1] || (l[1] = (a) => h.value = a),
627
+ }, null, 8, ["text-color", "variant", "onClick"])])], 8, We))), 128))])])) : (p(), M("div", Ge, [f("div", Ke, [f("div", je, [o(x, {
628
+ modelValue: k.value,
629
+ "onUpdate:modelValue": l[1] || (l[1] = (a) => k.value = a),
630
630
  autofocus: "",
631
631
  class: "mb-8",
632
632
  placeholder: e(m)("menu.common.labels.search_placeholder", {
@@ -635,11 +635,11 @@ const Ae = /* @__PURE__ */ oe({
635
635
  }, null, 8, ["modelValue", "placeholder"])])]), o(Fe, null, {
636
636
  default: g(() => [o(R, {
637
637
  "column-defs": v.value,
638
- "row-data": K.value,
639
- "page-size": K.value.length,
638
+ "row-data": G.value,
639
+ "page-size": G.value.length,
640
640
  "hide-footer": !0,
641
641
  "shrink-at": !1,
642
- "search-value": h.value,
642
+ "search-value": k.value,
643
643
  onRowClick: l[2] || (l[2] = (a) => H(a.original.id))
644
644
  }, null, 8, ["column-defs", "row-data", "page-size", "search-value"])]),
645
645
  _: 1
@@ -650,7 +650,7 @@ const Ae = /* @__PURE__ */ oe({
650
650
  "dismiss-away": ""
651
651
  }, {
652
652
  "side-sheet-header": g(() => [f("p", aa, N(e(m)("menu.catalog.usage.title")), 1)]),
653
- default: g(() => [f("div", la, [(p(!0), V(z, null, q(Y.value, (a, _) => (p(), k(Ae, {
653
+ default: g(() => [f("div", la, [(p(!0), M(P, null, q(Y.value, (a, _) => (p(), V(Ae, {
654
654
  key: _,
655
655
  catalog: a
656
656
  }, null, 8, ["catalog"]))), 128))])]),
@@ -1,18 +1,18 @@
1
1
  import { defineComponent as S, computed as k, ref as C, resolveComponent as w, createElementBlock as _, openBlock as u, createElementVNode as i, createVNode as g, unref as n, withCtx as K, Fragment as P, renderList as U, toDisplayString as E, createBlock as V } from "vue";
2
2
  import { useI18n as L } from "@feedmepos/mf-common";
3
- import { useSnackbar as M, useBreakpoints as Y, useDialog as $ } from "@feedmepos/ui-library";
4
- import { D as F, u as I, Y as j, O as D, J as A, G } from "./menu-IGORh0Ik.js";
5
- import { _ as J } from "./app-DuD_IPou.js";
6
- import { u as O } from "./menu-sGVv4bhQ.js";
3
+ import { useSnackbar as M, useBreakpoints as $, useDialog as I } from "@feedmepos/ui-library";
4
+ import { D as F, u as Y, X as j, O as D, J as A, G } from "./menu-DK7wG3S5.js";
5
+ import { _ as J } from "./app-CrXLAKdw.js";
6
+ import { u as O } from "./menu-DHfLxvzU.js";
7
7
  import { _ as R } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
8
- import { u as q } from "./category-mmjX_QdF.js";
9
- const H = {
8
+ import { u as X } from "./category-CayMSpUc.js";
9
+ const q = {
10
10
  key: 0
11
- }, Q = {
11
+ }, H = {
12
12
  class: "flex justify-end items-center"
13
- }, W = {
13
+ }, Q = {
14
14
  class: "w-[320px]"
15
- }, X = {
15
+ }, W = {
16
16
  key: 1,
17
17
  class: "flex-1 flex flex-col min-h-0"
18
18
  }, Z = {
@@ -28,20 +28,20 @@ const H = {
28
28
  }, ne = /* @__PURE__ */ S({
29
29
  __name: "CategoryTable",
30
30
  setup(T) {
31
- const f = M(), y = F(f), h = D(y), p = I(), {
31
+ const f = M(), y = F(f), h = D(y), p = Y(), {
32
32
  categories: v
33
33
  } = O(), b = k(() => {
34
- var l, t;
35
- const r = ((t = (l = p.currentCatalog) == null ? void 0 : l.override) == null ? void 0 : t.category) ?? {}, o = v.value.map((e, c) => {
34
+ var r, t;
35
+ const l = ((t = (r = p.currentCatalog) == null ? void 0 : r.override) == null ? void 0 : t.category) ?? {}, o = v.value.map((e, c) => {
36
36
  var m;
37
37
  return {
38
38
  ...e,
39
39
  // Addon should be at the end of the list
40
- position: e.id ? ((m = r[e.id]) == null ? void 0 : m.position) ?? c + 1 : null
40
+ position: e.id ? ((m = l[e.id]) == null ? void 0 : m.position) ?? c + 1 : null
41
41
  };
42
42
  });
43
43
  return j(o, (e) => e.name);
44
- }), a = C(""), d = k(() => b.value.filter((r) => r.name.toLowerCase().includes(a.value.toLowerCase()))), {
44
+ }), a = C(""), d = k(() => b.value.filter((l) => l.name.toLowerCase().includes(a.value.toLowerCase()))), {
45
45
  t: s
46
46
  } = L(), x = C([{
47
47
  accessorKey: "name",
@@ -55,27 +55,27 @@ const H = {
55
55
  header: () => s("menu.category.columns.products"),
56
56
  enableSorting: !1,
57
57
  size: 200,
58
- cell: (r) => {
59
- const o = r.row.original;
58
+ cell: (l) => {
59
+ const o = l.row.original;
60
60
  return s(o.items.length > 1 ? "menu.common.labels.product_linked_plural" : "menu.common.labels.product_linked_singular", {
61
61
  count: o.items.length
62
62
  });
63
63
  }
64
64
  }]);
65
- async function B(r) {
65
+ async function B(l) {
66
66
  var e;
67
67
  const o = p.currentCatalog;
68
68
  if (!o)
69
69
  return;
70
70
  const {
71
- updateMenu: l
71
+ updateMenu: r
72
72
  } = h, t = ((e = o.override) == null ? void 0 : e.category) ?? {};
73
- r.forEach((c, m) => {
73
+ l.forEach((c, m) => {
74
74
  c.id && (t != null && t[c.id] ? t[c.id].position = m + 1 : t[c.id] = {
75
75
  position: m + 1,
76
76
  _id: c.id
77
77
  });
78
- }), await l({
78
+ }), await r({
79
79
  module: G.F_MENU_MODULE_V4_KEY.enum.catalog,
80
80
  operation: A.F_OPERATION_TYPE.update,
81
81
  data: {
@@ -87,10 +87,10 @@ const H = {
87
87
  }
88
88
  }, "Category");
89
89
  }
90
- const N = Y(), z = k(() => N.breakpoints.value.xs);
91
- return (r, o) => {
92
- const l = w("FmSearch"), t = w("FmTable");
93
- return z.value ? (u(), _("div", X, [i("div", Z, [g(l, {
90
+ const N = $(), z = k(() => N.breakpoints.value.xs);
91
+ return (l, o) => {
92
+ const r = w("FmSearch"), t = w("FmTable");
93
+ return z.value ? (u(), _("div", W, [i("div", Z, [g(r, {
94
94
  autofocus: "",
95
95
  modelValue: a.value,
96
96
  "onUpdate:modelValue": o[1] || (o[1] = (e) => a.value = e),
@@ -103,7 +103,7 @@ const H = {
103
103
  class: "flex flex-row py-12 px-16"
104
104
  }, [i("div", oe, [i("p", te, E(e.name), 1), i("p", ae, E(n(s)(e.items.length > 1 ? "menu.common.labels.product_linked_plural" : "menu.common.labels.product_linked_singular", {
105
105
  count: e.items.length
106
- })), 1)])]))), 128))])])) : (u(), _("div", H, [i("div", Q, [i("div", W, [g(l, {
106
+ })), 1)])]))), 128))])])) : (u(), _("div", q, [i("div", H, [i("div", Q, [g(r, {
107
107
  modelValue: a.value,
108
108
  "onUpdate:modelValue": o[0] || (o[0] = (e) => a.value = e),
109
109
  autofocus: "",
@@ -130,12 +130,16 @@ const H = {
130
130
  }), pe = /* @__PURE__ */ S({
131
131
  __name: "Category",
132
132
  setup(T) {
133
- const f = $(), y = M(), h = F(y), p = D(h), v = q({ dialog: f, menuLoader: p }), { categories: b } = O(), { t: a } = L();
133
+ const f = I(), y = M(), h = F(y), p = D(h), v = X({ dialog: f, menuLoader: p }), { categories: b } = O(), { t: a } = L();
134
134
  function d() {
135
135
  v.create();
136
136
  }
137
- return (s, x) => n(b).length > 0 ? (u(), V(ne, { key: 0 })) : (u(), V(n(R), {
137
+ return (s, x) => n(b).length > 0 ? (u(), V(ne, {
138
+ key: 0,
139
+ class: "pt-16"
140
+ })) : (u(), V(n(R), {
138
141
  key: 1,
142
+ class: "pt-16",
139
143
  action: {
140
144
  text: n(a)("menu.category.add"),
141
145
  callback: d