@feedmepos/mf-menu 0.32.17 → 0.32.18-dev.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 (82) hide show
  1. package/dist/App-Cfl37TTw.js +152661 -0
  2. package/dist/{Catalog-ChlP8Cid.js → Catalog-Yxsb-D33.js} +47 -52
  3. package/dist/{Category-CHs96ibF.js → Category-0vJH8Ct0.js} +86 -92
  4. package/dist/{Category-B1tAJpNd.js → Category-qp0wI14I.js} +25 -26
  5. package/dist/{CookingGuide-mEvca-0v.js → CookingGuide-EpAr5F5U.js} +139 -143
  6. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-Bk26jQI7.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-CkyD0sdI.js} +14 -16
  7. package/dist/{Group-Ye2IIY52.js → Group-B3W9iSbO.js} +5 -5
  8. package/dist/{Group-Co2Vf4Lw.js → Group-DLCh0fDU.js} +1 -1
  9. package/dist/{Group.vue_vue_type_script_setup_true_lang-BcxSbvJS.js → Group.vue_vue_type_script_setup_true_lang-Bzy_hXDv.js} +176 -186
  10. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D1f8VG-n.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BFaAXp7r.js} +81 -88
  11. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-Jv6iJlg9.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-CxP8lDD0.js} +2502 -2508
  12. package/dist/{Ingredient-BgnW8sWo.js → Ingredient-CVLMr_YB.js} +102 -105
  13. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-8ziHcUiK.js → InventoryBinding.vue_vue_type_script_setup_true_lang-CdTC5ykI.js} +1058 -1059
  14. package/dist/{MenuSetting-GEngjeC8.js → MenuSetting-Blpi1vSd.js} +58 -61
  15. package/dist/{PrintRoute-BSlUQT7g.js → PrintRoute-BS7PPPkE.js} +49 -52
  16. package/dist/{Product-DNg_BUuV.js → Product-DDeNKQ7u.js} +1 -1
  17. package/dist/{Product.vue_vue_type_script_setup_true_lang-Cehy2oy-.js → Product.vue_vue_type_script_setup_true_lang-rmv8m4_D.js} +286 -298
  18. package/dist/{ProductInternalTools-B5A67yxH.js → ProductInternalTools-CVuothk9.js} +45 -46
  19. package/dist/{Products-DCsxmTPB.js → Products-BIvsHKEt.js} +111 -116
  20. package/dist/{Publish-Cst0Ll6T.js → Publish-CDADU3Pp.js} +154 -159
  21. package/dist/{Recipe-DupS3SQT.js → Recipe-CMhW7e_z.js} +40 -43
  22. package/dist/{Scheduler-BcThU1M6.js → Scheduler-BpxunKBV.js} +7 -7
  23. package/dist/{ServingSequence-CT3THBH6.js → ServingSequence-BQVuYyAB.js} +54 -58
  24. package/dist/{Setting-Dxh8E3no.js → Setting-Dj0yyP37.js} +63 -66
  25. package/dist/{Subcategory-DhJEzofz.js → Subcategory-BH4DDZM4.js} +72 -76
  26. package/dist/{Takeaway-DSC7U4Jk.js → Takeaway-CGJBZ_sJ.js} +1 -1
  27. package/dist/{Takeaway-B8BSSKNj.js → Takeaway-DifOudVE.js} +20 -21
  28. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-BLpiJlk2.js → Takeaway.vue_vue_type_script_setup_true_lang-D-R5_S5G.js} +59 -64
  29. package/dist/{Unit-joU7vZZu.js → Unit-DXDox2Ut.js} +8 -8
  30. package/dist/{Variant-D8YjRJ6N.js → Variant-DbJVwgm5.js} +75 -78
  31. package/dist/{_id_-Bd9uo1WW.js → _id_-RFYwWjbM.js} +34 -38
  32. package/dist/{app-BNrAos5Z.js → app-Z0KWH9-d.js} +74 -335
  33. package/dist/app.js +4 -5
  34. package/dist/apps/mf-menu/src/app.d.ts +1 -2
  35. package/dist/apps/mf-menu/src/helper/import-export-utils.d.ts +1 -0
  36. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  37. package/dist/assets/{linked-status-DbjzbFTw.js → linked-status-CkmoJAm-.js} +2 -2
  38. package/dist/assets/{menu-export-D_oNY_wi.js → menu-export-DcINiK28.js} +3 -3
  39. package/dist/assets/{override-menu-CIU7U1_4.js → override-menu-PUKiu-df.js} +2 -2
  40. package/dist/assets/{validate-menu-kuOxuwG9.js → validate-menu-CcqiRhNT.js} +2 -2
  41. package/dist/{catalogSetting-BHgsBDTl.js → catalogSetting-Bf66H-j7.js} +1 -1
  42. package/dist/dayjs.min-DNPTnUFp.js +6 -0
  43. package/dist/{jszip.min-7SsHzD5O.js → jszip.min-CO2_Gf69.js} +545 -545
  44. package/dist/{menu-Cd4NbFVq.js → menu-Brxar171.js} +1 -1
  45. package/dist/mf-menu.css +1 -1
  46. package/dist/{scheduler-B6OokVIA.js → scheduler-CqdIiE8G.js} +56 -60
  47. package/dist/{toExcel-BZkbXlHv.js → toExcel-CRJIU0NC.js} +2 -2
  48. package/dist/{unit-D6QOkMoM.js → unit-wYPYkm33.js} +98 -105
  49. package/package.json +1 -1
  50. package/dist/App-BiSEuDkd.js +0 -13484
  51. package/dist/ApplyProduct.vue_vue_type_script_setup_true_lang-C_SjdLpO.js +0 -161
  52. package/dist/FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js +0 -26
  53. package/dist/LinkProductSideSheet-DFDYEUBh.js +0 -687
  54. package/dist/MenuSelector.vue_vue_type_script_setup_true_lang-K6Z0QJBl.js +0 -69
  55. package/dist/RuleView.vue_vue_type_script_setup_true_lang-BeesK2ym.js +0 -3285
  56. package/dist/TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js +0 -20
  57. package/dist/Thumbnail.vue_vue_type_script_setup_true_lang-C3qXnZlz.js +0 -399
  58. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CMe76XvZ.js +0 -6011
  59. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  60. package/dist/app-5fxKLAzS.js +0 -8163
  61. package/dist/app-nTzkERJW.js +0 -68
  62. package/dist/catalog-BO2nXwe5.js +0 -199
  63. package/dist/category-CuG3DsGL.js +0 -156
  64. package/dist/check-C9mY6LiX.js +0 -9
  65. package/dist/createComponentProgrammatically-Bt2rn1IQ.js +0 -11
  66. package/dist/currency-DxC5zyZB.js +0 -7
  67. package/dist/dayjs.min-BvFUSPWD.js +0 -6
  68. package/dist/discardConfirm-BHni0LNu.js +0 -28
  69. package/dist/index-B0nhvuxR.js +0 -273
  70. package/dist/index-C2zPvt64.js +0 -239
  71. package/dist/index-C36JQix-.js +0 -246
  72. package/dist/index-CisutoS9.js +0 -156
  73. package/dist/index.vue_vue_type_script_setup_true_lang-DCBYExNb.js +0 -109064
  74. package/dist/item-K01xd1Z0.js +0 -6868
  75. package/dist/menuV2-DKE-xanq.js +0 -1052
  76. package/dist/object-DVUNCr7w.js +0 -16
  77. package/dist/priceTier-Beavb91W.js +0 -87
  78. package/dist/search-BAPEUu1R.js +0 -15
  79. package/dist/string-DpfFixWH.js +0 -4
  80. package/dist/subcategory-DnslmmRD.js +0 -148
  81. package/dist/tooltip-B5BiPMx9.js +0 -32
  82. package/dist/vuedraggable-CK8z7qA8.js +0 -1728
@@ -1,12 +1,9 @@
1
- import { defineComponent as ne, computed as p, ref as se, watch as ue, watchEffect as ie, resolveComponent as m, createElementBlock as V, openBlock as r, normalizeClass as H, createVNode as s, withCtx as c, createElementVNode as v, createBlock as g, createCommentVNode as k, unref as e, Fragment as D, renderList as B, createTextVNode as re, toDisplayString as N } from "vue";
2
- import { u as me, G as ce, A as f, Q as de, B as pe, I as w } from "./index.vue_vue_type_script_setup_true_lang-DCBYExNb.js";
3
- import { useCoreStore as ve, useI18n as ge } from "@feedmepos/mf-common";
4
- import { useSnackbar as fe, useDialog as _e, FmButtonVariant as $, FmButtonColorThemeVariant as P, components as be } from "@feedmepos/ui-library";
5
- import { _ as E } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
6
- import { _ as ye } from "./RuleView.vue_vue_type_script_setup_true_lang-BeesK2ym.js";
7
- import { _ as z, a as ke } from "./GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D1f8VG-n.js";
8
- import { C as _, a as x } from "./catalogSetting-BHgsBDTl.js";
9
- import { C as xe } from "./catalog-BO2nXwe5.js";
1
+ import { defineComponent as oe, computed as p, ref as se, watch as ue, watchEffect as ie, resolveComponent as m, createElementBlock as V, openBlock as r, normalizeClass as H, createVNode as s, withCtx as c, createElementVNode as v, createBlock as g, createCommentVNode as k, unref as e, Fragment as D, renderList as B, createTextVNode as re, toDisplayString as N } from "vue";
2
+ import { u as me, a as ce, e as f, d as de, i as pe, G as ve, a8 as w, c as E, a9 as ge } from "./App-Cfl37TTw.js";
3
+ import { useCoreStore as fe, useI18n as _e } from "@feedmepos/mf-common";
4
+ import { useSnackbar as be, useDialog as ye, FmButtonVariant as $, FmButtonColorThemeVariant as P, components as ke } from "@feedmepos/ui-library";
5
+ import { _ as z, a as xe } from "./GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BFaAXp7r.js";
6
+ import { C as _, a as x } from "./catalogSetting-Bf66H-j7.js";
10
7
  const Ce = {
11
8
  class: /* @__PURE__ */ H(["overflow-scroll", "flex-1", "xs:px-16 xs:py-16", "pt-16"])
12
9
  }, Oe = {
@@ -26,25 +23,25 @@ const Ce = {
26
23
  class: "fm-typo-en-body-md-400"
27
24
  }, he = {
28
25
  class: "flex justify-end"
29
- }, ze = /* @__PURE__ */ ne({
26
+ }, Be = /* @__PURE__ */ oe({
30
27
  __name: "Setting",
31
28
  setup(Ne) {
32
- const F = ve(), u = me(), j = fe(), A = ce(j), {
29
+ const F = fe(), u = me(), j = be(), T = ce(j), {
33
30
  minor: q
34
- } = A, G = _e(), {
35
- t: n
36
- } = ge(), O = p(() => u.currentCatalog), b = p(() => !O.value), S = p(() => u.version === f.F_MENU_VERSION.enum.v4), {
31
+ } = T, G = ye(), {
32
+ t: o
33
+ } = _e(), O = p(() => u.currentCatalog), b = p(() => !O.value), S = p(() => u.version === f.F_MENU_VERSION.enum.v4), {
37
34
  updateMenu: J
38
- } = de(A), l = se(_.initCatalogSetting()), Q = p(() => u.catalogs.filter((t) => t._id !== u.state.currentCatalogId).map((t) => t.name)), W = p(() => u.state.restaurants.filter((t) => [...t.additionalCatalogs, t.inHouseDelivery, ...t.linkedDeliveryCatalogs.map((o) => o.catalog), t.pickupCatalog, t.takeawayCatalog, t.catalogId].includes(u.state.currentCatalogId)).map((t) => t.name));
39
- function T() {
40
- return W.value.length > 0 ? s("div", {
35
+ } = de(T), l = se(_.initCatalogSetting()), W = p(() => u.catalogs.filter((t) => t._id !== u.state.currentCatalogId).map((t) => t.name)), Y = p(() => u.state.restaurants.filter((t) => [...t.additionalCatalogs, t.inHouseDelivery, ...t.linkedDeliveryCatalogs.map((n) => n.catalog), t.pickupCatalog, t.takeawayCatalog, t.catalogId].includes(u.state.currentCatalogId)).map((t) => t.name));
36
+ function A() {
37
+ return Y.value.length > 0 ? s("div", {
41
38
  class: ["flex items-center", "bg-fm-color-system-warning-100", "rounded-lg", "py-16 px-24 space-x-8"]
42
- }, [s(be.FmIcon, {
39
+ }, [s(ke.FmIcon, {
43
40
  color: "system-warning-300",
44
41
  name: "warning"
45
42
  }, null), s("p", {
46
43
  class: "fm-typo-en-body-lg-400"
47
- }, [n("menu.setting.catalog.warnings.delivery")])]) : null;
44
+ }, [o("menu.setting.catalog.warnings.delivery")])]) : null;
48
45
  }
49
46
  function I() {
50
47
  const t = O.value;
@@ -62,8 +59,8 @@ const Ce = {
62
59
  };
63
60
  });
64
61
  });
65
- function Y(t) {
66
- const o = l.value.taxSetting, i = o.mode === x.AUTO ? _.manualTax(R.value) : w(o);
62
+ function K(t) {
63
+ const n = l.value.taxSetting, i = n.mode === x.AUTO ? _.manualTax(R.value) : E(n);
67
64
  i.inclusive ?? (i.inclusive = []);
68
65
  const d = i.inclusive.findIndex((C) => C.systemCode === t.systemCode);
69
66
  d < 0 ? i.inclusive.push(t) : i.inclusive.splice(d, 1, t), U.value = i;
@@ -76,9 +73,9 @@ const Ce = {
76
73
  set: (t) => {
77
74
  l.value.taxSetting = t;
78
75
  }
79
- }), K = async () => {
76
+ }), Q = async () => {
80
77
  const t = _.toCatalog(l.value);
81
- O.value ? await new xe({
78
+ O.value ? await new ge({
82
79
  ...O.value,
83
80
  ...t
84
81
  }, u, J, G).update() : await q(async () => {
@@ -90,49 +87,49 @@ const Ce = {
90
87
  customId: u.state.menu._id
91
88
  });
92
89
  };
93
- function X(t, o) {
94
- const i = w(l.value);
95
- i.markupOptions && (i.markupOptions[t] = o, l.value = i);
90
+ function X(t, n) {
91
+ const i = E(l.value);
92
+ i.markupOptions && (i.markupOptions[t] = n, l.value = i);
96
93
  }
97
94
  function Z(t) {
98
- const o = w(l.value);
99
- o.markupOptions && (o.markupOptions.splice(t, 1), l.value = o);
95
+ const n = E(l.value);
96
+ n.markupOptions && (n.markupOptions.splice(t, 1), l.value = n);
100
97
  }
101
- return (t, o) => {
102
- const i = m("fm-text-field"), d = m("fm-radio"), C = m("fm-radio-group"), ee = m("fm-checkbox"), L = m("fm-switch"), te = m("fm-select"), h = m("fm-button"), ae = m("fm-chip"), le = m("fm-card"), oe = m("fm-form");
103
- return r(), V("div", Ce, [s(oe, {
98
+ return (t, n) => {
99
+ const i = m("fm-text-field"), d = m("fm-radio"), C = m("fm-radio-group"), ee = m("fm-checkbox"), L = m("fm-switch"), te = m("fm-select"), h = m("fm-button"), ae = m("fm-chip"), le = m("fm-card"), ne = m("fm-form");
100
+ return r(), V("div", Ce, [s(ne, {
104
101
  class: H(["space-y-40 max-w-[751px]", "h-fit"]),
105
102
  "blame-form-child-on-validation-failed": "",
106
- onValidationSuccess: K
103
+ onValidationSuccess: Q
107
104
  }, {
108
- default: c(() => [v("div", Oe, [b.value ? k("", !0) : (r(), g(ye, {
105
+ default: c(() => [v("div", Oe, [b.value ? k("", !0) : (r(), g(ve, {
109
106
  key: 0,
110
- title: e(n)("menu.setting.catalog.title")
107
+ title: e(o)("menu.setting.catalog.title")
111
108
  }, {
112
109
  default: c(() => [s(i, {
113
110
  modelValue: l.value.name,
114
- "onUpdate:modelValue": o[0] || (o[0] = (a) => l.value.name = a),
115
- rules: [(a) => !Q.value.includes(a.trim()) || e(n)("menu.setting.catalog.fields.name.used"), (a) => !!a.trim() || e(n)("menu.setting.catalog.fields.name.required")],
116
- label: e(n)("menu.setting.catalog.fields.name.label")
117
- }, null, 8, ["modelValue", "rules", "label"]), s(T)]),
111
+ "onUpdate:modelValue": n[0] || (n[0] = (a) => l.value.name = a),
112
+ rules: [(a) => !W.value.includes(a.trim()) || e(o)("menu.setting.catalog.fields.name.used"), (a) => !!a.trim() || e(o)("menu.setting.catalog.fields.name.required")],
113
+ label: e(o)("menu.setting.catalog.fields.name.label")
114
+ }, null, 8, ["modelValue", "rules", "label"]), s(A)]),
118
115
  _: 1
119
- }, 8, ["title"])), s(E, {
120
- label: e(n)("menu.setting.tax.title")
116
+ }, 8, ["title"])), s(w, {
117
+ label: e(o)("menu.setting.tax.title")
121
118
  }, {
122
119
  default: c(() => [s(C, {
123
120
  "model-value": l.value.taxSetting.mode,
124
- "onUpdate:modelValue": o[1] || (o[1] = (a) => {
121
+ "onUpdate:modelValue": n[1] || (n[1] = (a) => {
125
122
  a === e(x).AUTO ? U.value = e(_).autoTax() : U.value = e(_).manualTax(R.value);
126
123
  })
127
124
  }, {
128
125
  default: c(() => [s(d, {
129
126
  value: e(x).AUTO,
130
- label: e(n)("menu.setting.tax.modes.auto.label"),
131
- sublabel: e(n)("menu.setting.tax.modes.auto.sublabel")
127
+ label: e(o)("menu.setting.tax.modes.auto.label"),
128
+ sublabel: e(o)("menu.setting.tax.modes.auto.sublabel")
132
129
  }, null, 8, ["value", "label", "sublabel"]), s(d, {
133
130
  value: e(x).MANUAL,
134
- label: e(n)("menu.setting.tax.modes.manual.label"),
135
- sublabel: e(n)("menu.setting.tax.modes.manual.sublabel")
131
+ label: e(o)("menu.setting.tax.modes.manual.label"),
132
+ sublabel: e(o)("menu.setting.tax.modes.manual.sublabel")
136
133
  }, null, 8, ["value", "label", "sublabel"])]),
137
134
  _: 1
138
135
  }, 8, ["model-value"]), l.value.taxSetting.mode === e(x).MANUAL ? (r(), V("div", Se, [(r(!0), V(D, null, B(R.value, (a) => (r(), g(ee, {
@@ -141,23 +138,23 @@ const Ce = {
141
138
  value: !0,
142
139
  label: a.systemCode + " inclusive",
143
140
  "onUpdate:modelValue": (y) => {
144
- Y({
141
+ K({
145
142
  ...a,
146
143
  inclusive: y
147
144
  });
148
145
  }
149
146
  }, null, 8, ["model-value", "label", "onUpdate:modelValue"]))), 128))])) : k("", !0)]),
150
147
  _: 1
151
- }, 8, ["label"]), !b.value && S.value ? (r(), g(E, {
148
+ }, 8, ["label"]), !b.value && S.value ? (r(), g(w, {
152
149
  key: 1,
153
- label: e(n)("menu.setting.link.title")
150
+ label: e(o)("menu.setting.link.title")
154
151
  }, {
155
152
  default: c(() => [s(L, {
156
153
  "model-value": l.value.orderFrom && l.value.orderFrom !== e(f.F_ORDER_FROM).enum.NONE,
157
- label: e(n)("menu.setting.link.auto_link.label"),
154
+ label: e(o)("menu.setting.link.auto_link.label"),
158
155
  "label-placement": "right",
159
- sublabel: e(n)("menu.setting.link.auto_link.sublabel"),
160
- "onUpdate:modelValue": o[2] || (o[2] = (a) => l.value.orderFrom = a ? e(f.F_ORDER_FROM).enum.ALL : e(f.F_ORDER_FROM).enum.NONE)
156
+ sublabel: e(o)("menu.setting.link.auto_link.sublabel"),
157
+ "onUpdate:modelValue": n[2] || (n[2] = (a) => l.value.orderFrom = a ? e(f.F_ORDER_FROM).enum.ALL : e(f.F_ORDER_FROM).enum.NONE)
161
158
  }, null, 8, ["model-value", "label", "sublabel"]), l.value.orderFrom !== e(f.F_ORDER_FROM).enum.NONE ? (r(), g(te, {
162
159
  key: 0,
163
160
  class: "ml-[60px]",
@@ -169,24 +166,24 @@ const Ce = {
169
166
  value: e(f.F_ORDER_FROM).enum.POS_ONLY
170
167
  }],
171
168
  "model-value": l.value.orderFrom,
172
- "onUpdate:modelValue": o[3] || (o[3] = (a) => l.value.orderFrom = a)
169
+ "onUpdate:modelValue": n[3] || (n[3] = (a) => l.value.orderFrom = a)
173
170
  }, null, 8, ["items", "model-value"])) : k("", !0)]),
174
171
  _: 1
175
- }, 8, ["label"])) : k("", !0), !b.value && S.value ? (r(), g(E, {
172
+ }, 8, ["label"])) : k("", !0), !b.value && S.value ? (r(), g(w, {
176
173
  key: 2,
177
- label: e(n)("menu.setting.markup.title")
174
+ label: e(o)("menu.setting.markup.title")
178
175
  }, {
179
176
  default: c(() => [s(L, {
180
177
  "model-value": !!l.value.markupOptions,
181
- label: e(n)("menu.setting.markup.auto_markup.label"),
178
+ label: e(o)("menu.setting.markup.auto_markup.label"),
182
179
  "label-placement": "right",
183
- sublabel: e(n)("menu.setting.markup.auto_markup.sublabel"),
184
- "onUpdate:modelValue": o[4] || (o[4] = (a) => l.value.markupOptions = a ? [] : null)
180
+ sublabel: e(o)("menu.setting.markup.auto_markup.sublabel"),
181
+ "onUpdate:modelValue": n[4] || (n[4] = (a) => l.value.markupOptions = a ? [] : null)
185
182
  }, null, 8, ["model-value", "label", "sublabel"]), v("div", Me, [s(z, {
186
183
  categories: e(u).categories,
187
184
  items: e(u).items,
188
185
  action: "add",
189
- "onUpdate:modelValue": o[5] || (o[5] = (a) => {
186
+ "onUpdate:modelValue": n[5] || (n[5] = (a) => {
190
187
  a && (l.value.markupOptions = [...l.value.markupOptions ?? [], a]);
191
188
  })
192
189
  }, {
@@ -224,11 +221,11 @@ const Ce = {
224
221
  }, {
225
222
  default: c(() => [re(" Markup percentage: " + N(a.percentage) + "% ", 1)]),
226
223
  _: 2
227
- }, 1024), v("p", Re, N(e(n)("menu.setting.markup.config", {
224
+ }, 1024), v("p", Re, N(e(o)("menu.setting.markup.config", {
228
225
  number: y + 1
229
- })), 1), v("p", Ue, N(a.includeItems ? e(n)("menu.setting.markup.products.linked", {
226
+ })), 1), v("p", Ue, N(a.includeItems ? e(o)("menu.setting.markup.products.linked", {
230
227
  count: a.includeItems.length
231
- }) : e(n)("menu.setting.markup.products.all")), 1)]), s(h, {
228
+ }) : e(o)("menu.setting.markup.products.all")), 1)]), s(h, {
232
229
  variant: e($).Tertiary,
233
230
  "prepend-icon": "delete",
234
231
  onClick: (we) => Z(y)
@@ -238,15 +235,15 @@ const Ce = {
238
235
  _: 2
239
236
  }, 1032, ["categories", "items", "model-value", "onUpdate:modelValue"]))), 128))])]),
240
237
  _: 1
241
- }, 8, ["label"])) : k("", !0), s(ke, {
238
+ }, 8, ["label"])) : k("", !0), s(xe, {
242
239
  modelValue: l.value,
243
- "onUpdate:modelValue": o[6] || (o[6] = (a) => l.value = a),
240
+ "onUpdate:modelValue": n[6] || (n[6] = (a) => l.value = a),
244
241
  "is-main-catalog": b.value,
245
242
  "is-v4": S.value
246
- }, null, 8, ["modelValue", "is-main-catalog", "is-v4"]), b.value ? (r(), g(T, {
243
+ }, null, 8, ["modelValue", "is-main-catalog", "is-v4"]), b.value ? (r(), g(A, {
247
244
  key: 3
248
245
  })) : k("", !0)]), v("div", he, [s(h, {
249
- label: e(n)("common.save"),
246
+ label: e(o)("common.save"),
250
247
  type: "submit"
251
248
  }, null, 8, ["label"])])]),
252
249
  _: 1
@@ -255,5 +252,5 @@ const Ce = {
255
252
  }
256
253
  });
257
254
  export {
258
- ze as default
255
+ Be as default
259
256
  };
@@ -1,17 +1,13 @@
1
- import { defineComponent as L, ref as w, watch as W, resolveComponent as y, createElementBlock as V, openBlock as p, Fragment as P, renderSlot as X, createVNode as m, unref as t, withCtx as h, createElementVNode as s, toDisplayString as T, computed as F, h as U, withModifiers as R, getCurrentInstance as Z, renderList as ee, createBlock as M, createCommentVNode as te } from "vue";
1
+ import { defineComponent as L, ref as w, watch as W, resolveComponent as y, createElementBlock as V, openBlock as p, Fragment as P, renderSlot as X, createVNode as m, unref as a, withCtx as h, createElementVNode as s, toDisplayString as T, computed as F, h as A, withModifiers as R, getCurrentInstance as Z, renderList as ee, createBlock as S, createCommentVNode as ae } from "vue";
2
2
  import { useI18n as B } from "@feedmepos/mf-common";
3
- import { useSnackbar as O, components as j, useDialog as Y, FmButtonVariant as z, useBreakpoints as ae, FmButtonColorThemeVariant as oe } from "@feedmepos/ui-library";
3
+ import { useSnackbar as O, components as j, useDialog as Y, FmButtonVariant as z, useBreakpoints as te, FmButtonColorThemeVariant as oe } from "@feedmepos/ui-library";
4
4
  import { _ as ne } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
5
- import { G as D, u as N, Q as A, M as K, A as G, a4 as le } from "./index.vue_vue_type_script_setup_true_lang-DCBYExNb.js";
6
- import { _ as se } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
7
- import { _ as re } from "./app-BNrAos5Z.js";
8
- import { c as ie } from "./createForm-BoUQeZTd.js";
9
- import { u as ce } from "./discardConfirm-BHni0LNu.js";
10
- import { c as I } from "./object-DVUNCr7w.js";
11
- import { r as ue } from "./rules-CIWTZQfh.js";
12
- import { c as de } from "./check-C9mY6LiX.js";
13
- import { u as q } from "./subcategory-DnslmmRD.js";
14
- import { a as me } from "./menu-Cd4NbFVq.js";
5
+ import { a as D, u as N, C as I, F as le, b as se, d as U, m as K, e as q, J as G, _ as re } from "./App-Cfl37TTw.js";
6
+ import { _ as ie } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
7
+ import { _ as ce } from "./app-Z0KWH9-d.js";
8
+ import { c as ue } from "./createForm-BoUQeZTd.js";
9
+ import { r as de } from "./rules-CIWTZQfh.js";
10
+ import { a as me } from "./menu-Brxar171.js";
15
11
  const pe = {
16
12
  class: "fm-typo-en-title-md-600"
17
13
  }, _e = {
@@ -23,22 +19,22 @@ const pe = {
23
19
  props: {
24
20
  initialValue: {}
25
21
  },
26
- setup(S, {
22
+ setup($, {
27
23
  expose: f
28
24
  }) {
29
- const _ = S, x = O(), g = D(x), k = A(g), d = N(), {
30
- t: a
25
+ const _ = $, x = O(), g = D(x), C = U(g), d = N(), {
26
+ t
31
27
  } = B(), v = w(!1), e = w(!1), b = (r) => {
32
- de.isBoolean(r) ? e.value = r : e.value = !e.value;
33
- }, n = w(I(_.initialValue)), $ = ce(() => n.value.name !== _.initialValue.name, () => {
28
+ se.isBoolean(r) ? e.value = r : e.value = !e.value;
29
+ }, n = w(I(_.initialValue)), M = le(() => n.value.name !== _.initialValue.name, () => {
34
30
  e.value = !1;
35
31
  });
36
32
  async function E() {
37
- const r = d.subcategories.find((C) => C._id === n.value._id), {
33
+ const r = d.subcategories.find((k) => k._id === n.value._id), {
38
34
  updateMenu: c
39
- } = k;
35
+ } = C;
40
36
  await c({
41
- module: G.F_MENU_MODULE_V4_KEY.enum.subCategory,
37
+ module: q.F_MENU_MODULE_V4_KEY.enum.subCategory,
42
38
  operation: K.F_OPERATION_TYPE.update,
43
39
  // @ts-ignore FIXME: The backend hasn't exported SubcategoryRequest yet. Fix this once it's available.
44
40
  data: {
@@ -53,41 +49,41 @@ const pe = {
53
49
  trigger: b,
54
50
  show: e
55
51
  }), (r, c) => {
56
- const C = y("FmTextField"), o = y("fm-button"), l = y("fm-side-sheet");
52
+ const k = y("FmTextField"), o = y("fm-button"), l = y("fm-side-sheet");
57
53
  return p(), V(P, null, [X(r.$slots, "default", {
58
54
  trigger: b
59
55
  }), m(l, {
60
56
  id: "group-form",
61
57
  modelValue: e.value,
62
58
  "onUpdate:modelValue": c[2] || (c[2] = (u) => e.value = u),
63
- "is-container": t(j).FmForm,
59
+ "is-container": a(j).FmForm,
64
60
  "is-container-props": {
65
61
  onValidationSuccess: E,
66
62
  blameFormChildOnValidationFailed: !0
67
63
  },
68
64
  "max-width": 560,
69
- "onOn:clickedAway": t($)
65
+ "onOn:clickedAway": a(M)
70
66
  }, {
71
- "side-sheet-header": h(() => [s("p", pe, T(t(a)("menu.subcategory.title")), 1)]),
67
+ "side-sheet-header": h(() => [s("p", pe, T(a(t)("menu.subcategory.title")), 1)]),
72
68
  "side-sheet-footer": h(() => [s("div", fe, [m(o, {
73
- label: t(a)("menu.common.actions.update"),
69
+ label: a(t)("menu.common.actions.update"),
74
70
  loading: v.value,
75
71
  size: "lg",
76
72
  type: "submit",
77
73
  variant: "primary",
78
74
  disabled: !n.value._id
79
75
  }, null, 8, ["label", "loading", "disabled"]), m(o, {
80
- label: t(a)("menu.common.actions.cancel"),
76
+ label: a(t)("menu.common.actions.cancel"),
81
77
  size: "lg",
82
78
  variant: "tertiary",
83
79
  onClick: c[1] || (c[1] = () => e.value = !1)
84
80
  }, null, 8, ["label"])])]),
85
- default: h(() => [s("div", _e, [m(C, {
86
- label: t(a)("menu.subcategory.name"),
81
+ default: h(() => [s("div", _e, [m(k, {
82
+ label: a(t)("menu.subcategory.name"),
87
83
  modelValue: n.value.name,
88
84
  "onUpdate:modelValue": c[0] || (c[0] = (u) => n.value.name = u),
89
85
  disabled: !n.value._id,
90
- rules: [t(ue)]
86
+ rules: [a(de)]
91
87
  }, null, 8, ["label", "modelValue", "disabled", "rules"])])]),
92
88
  _: 1
93
89
  }, 8, ["modelValue", "is-container", "is-container-props", "onOn:clickedAway"])], 64);
@@ -102,21 +98,21 @@ const pe = {
102
98
  }, xe = {
103
99
  key: 1,
104
100
  class: "flex-1 flex flex-col min-h-0"
105
- }, ke = {
106
- class: "p-8"
107
101
  }, Ce = {
102
+ class: "p-8"
103
+ }, ke = {
108
104
  class: "flex flex-1 flex-col min-h-0 overflow-scroll divide-y divide-fm-color-neutral-gray-100 pb-64"
109
105
  }, Ve = ["onClick"], we = {
110
106
  class: "flex-1 space-y-4"
111
107
  }, Fe = {
112
108
  class: "fm-typo-en-body-lg-600"
113
- }, Me = /* @__PURE__ */ L({
109
+ }, Se = /* @__PURE__ */ L({
114
110
  __name: "SubcategoryTable",
115
- setup(S) {
116
- const f = Y(), _ = O(), x = D(_), g = A(x), k = q({
111
+ setup($) {
112
+ const f = Y(), _ = O(), x = D(_), g = U(x), C = G({
117
113
  dialog: f,
118
114
  menuLoader: g
119
- }), d = F(() => N().subcategories), a = w(""), v = F(() => d.value.filter((o) => o.name.toLowerCase().includes(a.value.toLowerCase()))), {
115
+ }), d = F(() => N().subcategories), t = w(""), v = F(() => d.value.filter((o) => o.name.toLowerCase().includes(t.value.toLowerCase()))), {
120
116
  t: e
121
117
  } = B(), b = w([{
122
118
  accessorKey: "name",
@@ -135,9 +131,9 @@ const pe = {
135
131
  header: "",
136
132
  cell: (o) => {
137
133
  const l = o.row.original;
138
- return U("div", {
134
+ return A("div", {
139
135
  class: "flex justify-end"
140
- }, [U(j.FmButton, {
136
+ }, [A(j.FmButton, {
141
137
  icon: "delete",
142
138
  disabled: !l._id,
143
139
  variant: "tertiary",
@@ -172,103 +168,103 @@ const pe = {
172
168
  }
173
169
  }).onPrimary(async () => {
174
170
  await g.updateMenu({
175
- module: G.F_MENU_MODULE_V4_KEY.enum.subCategory,
171
+ module: q.F_MENU_MODULE_V4_KEY.enum.subCategory,
176
172
  operation: K.F_OPERATION_TYPE.delete,
177
173
  data: o._id
178
174
  }, o.name, !0);
179
175
  });
180
176
  }
181
- async function $(o) {
177
+ async function M(o) {
182
178
  const l = o.map((u) => u._id).filter((u) => !!u);
183
- await k.rearrange(l);
179
+ await C.rearrange(l);
184
180
  }
185
181
  const E = Z();
186
182
  async function r(o) {
187
- ie(E, ve, {
183
+ ue(E, ve, {
188
184
  initialValue: o
189
185
  });
190
186
  }
191
- const c = ae(), C = F(() => c.breakpoints.value.xs);
187
+ const c = te(), k = F(() => c.breakpoints.value.xs);
192
188
  return (o, l) => {
193
- const u = y("FmSearch"), Q = y("FmTable"), H = y("FmButton");
194
- return C.value ? (p(), V("div", xe, [s("div", ke, [m(u, {
189
+ const u = y("FmSearch"), J = y("FmTable"), H = y("FmButton");
190
+ return k.value ? (p(), V("div", xe, [s("div", Ce, [m(u, {
195
191
  autofocus: "",
196
- modelValue: a.value,
197
- "onUpdate:modelValue": l[2] || (l[2] = (i) => a.value = i),
192
+ modelValue: t.value,
193
+ "onUpdate:modelValue": l[2] || (l[2] = (i) => t.value = i),
198
194
  class: "w-full",
199
- placeholder: t(e)("menu.common.labels.search_placeholder", {
195
+ placeholder: a(e)("menu.common.labels.search_placeholder", {
200
196
  type: "categories"
201
197
  })
202
- }, null, 8, ["modelValue", "placeholder"])]), s("div", Ce, [(p(!0), V(P, null, ee(v.value, (i) => (p(), V("div", {
198
+ }, null, 8, ["modelValue", "placeholder"])]), s("div", ke, [(p(!0), V(P, null, ee(v.value, (i) => (p(), V("div", {
203
199
  key: i._id || "",
204
200
  class: "flex flex-row py-12 px-16",
205
- onClick: (J) => r(i)
201
+ onClick: (Q) => r(i)
206
202
  }, [s("div", we, [s("p", Fe, T(i.name), 1)]), m(H, {
207
- "text-color": t(oe).NeutralGray400,
208
- variant: t(z).Tertiary,
203
+ "text-color": a(oe).NeutralGray400,
204
+ variant: a(z).Tertiary,
209
205
  "prepend-icon": "delete",
210
206
  disabled: !i._id,
211
- onClick: R((J) => n(i), ["stop"])
207
+ onClick: R((Q) => n(i), ["stop"])
212
208
  }, null, 8, ["text-color", "variant", "disabled", "onClick"])], 8, Ve))), 128))])])) : (p(), V("div", be, [s("div", ye, [s("div", he, [m(u, {
213
- modelValue: a.value,
214
- "onUpdate:modelValue": l[0] || (l[0] = (i) => a.value = i),
209
+ modelValue: t.value,
210
+ "onUpdate:modelValue": l[0] || (l[0] = (i) => t.value = i),
215
211
  autofocus: "",
216
212
  class: "mb-8",
217
- placeholder: t(e)("menu.common.labels.search_placeholder", {
218
- type: t(e)("menu.subcategory.title")
213
+ placeholder: a(e)("menu.common.labels.search_placeholder", {
214
+ type: a(e)("menu.subcategory.title")
219
215
  })
220
- }, null, 8, ["modelValue", "placeholder"])])]), m(re, null, {
221
- default: h(() => [m(Q, {
216
+ }, null, 8, ["modelValue", "placeholder"])])]), m(ce, null, {
217
+ default: h(() => [m(J, {
222
218
  "column-defs": b.value,
223
219
  draggable: !0,
224
220
  "page-size": d.value.length,
225
221
  "row-data": d.value,
226
- "search-value": a.value,
222
+ "search-value": t.value,
227
223
  "shrink-at": !1,
228
224
  "hide-footer": "",
229
225
  "pin-header-row": "",
230
- onDndChanged: $,
226
+ onDndChanged: M,
231
227
  onRowClick: l[1] || (l[1] = (i) => r(i.original))
232
228
  }, null, 8, ["column-defs", "page-size", "row-data", "search-value"])]),
233
229
  _: 1
234
230
  })]));
235
231
  };
236
232
  }
237
- }), Se = { class: "flex-1 flex justify-between gap-8 pl-8" }, $e = { class: "flex items-center" }, Ee = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Le = { class: "fm-typo-en-body-md-600 font-semibold" }, Ge = /* @__PURE__ */ L({
233
+ }), $e = { class: "flex-1 flex justify-between gap-8 pl-8" }, Me = { class: "flex items-center" }, Ee = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Le = { class: "fm-typo-en-body-md-600 font-semibold" }, Pe = /* @__PURE__ */ L({
238
234
  __name: "Subcategory",
239
- setup(S) {
240
- const f = Y(), _ = O(), x = D(_), g = A(x), k = q({ dialog: f, menuLoader: g }), d = F(() => N().subcategories), { t: a } = B();
235
+ setup($) {
236
+ const f = Y(), _ = O(), x = D(_), g = U(x), C = G({ dialog: f, menuLoader: g }), d = F(() => N().subcategories), { t } = B();
241
237
  function v() {
242
- k.create();
238
+ C.create();
243
239
  }
244
240
  const e = F(() => d.value.length);
245
- return me().resetOnMount(), (b, n) => (p(), M(se, {
246
- heading: t(a)("menu.subcategory.title")
241
+ return me().resetOnMount(), (b, n) => (p(), S(ie, {
242
+ heading: a(t)("menu.subcategory.title")
247
243
  }, {
248
244
  default: h(() => [
249
- d.value.length > 0 ? (p(), M(Me, { key: 0 })) : (p(), M(t(le), {
245
+ d.value.length > 0 ? (p(), S(Se, { key: 0 })) : (p(), S(a(re), {
250
246
  key: 1,
251
247
  action: {
252
- text: t(a)("menu.subcategory.add"),
248
+ text: a(t)("menu.subcategory.add"),
253
249
  callback: v
254
250
  },
255
- subtitle: t(a)("menu.subcategory.empty.subtitle"),
256
- title: t(a)("menu.subcategory.empty.title")
251
+ subtitle: a(t)("menu.subcategory.empty.subtitle"),
252
+ title: a(t)("menu.subcategory.empty.title")
257
253
  }, null, 8, ["action", "subtitle", "title"]))
258
254
  ]),
259
255
  "append-heading": h(() => [
260
- s("div", Se, [
261
- s("div", $e, [
256
+ s("div", $e, [
257
+ s("div", Me, [
262
258
  s("div", Ee, [
263
259
  s("p", Le, T(e.value), 1)
264
260
  ])
265
261
  ]),
266
- d.value.length > 0 ? (p(), M(ne, {
262
+ d.value.length > 0 ? (p(), S(ne, {
267
263
  key: 0,
268
- label: t(a)("menu.subcategory.add"),
264
+ label: a(t)("menu.subcategory.add"),
269
265
  "prepend-icon": "add",
270
266
  onClick: v
271
- }, null, 8, ["label"])) : te("", !0)
267
+ }, null, 8, ["label"])) : ae("", !0)
272
268
  ])
273
269
  ]),
274
270
  _: 1
@@ -276,5 +272,5 @@ const pe = {
276
272
  }
277
273
  });
278
274
  export {
279
- Ge as default
275
+ Pe as default
280
276
  };
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./Takeaway.vue_vue_type_script_setup_true_lang-BLpiJlk2.js";
1
+ import { _ as f } from "./Takeaway.vue_vue_type_script_setup_true_lang-D-R5_S5G.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,21 +1,20 @@
1
1
  import { defineComponent as f, computed as y, ref as k, createBlock as i, openBlock as d, unref as a, withCtx as s, createElementVNode as t, toDisplayString as b, createCommentVNode as g, createVNode as m } from "vue";
2
- import { G as x, u as v, Q as w, M as E, A as M } from "./index.vue_vue_type_script_setup_true_lang-DCBYExNb.js";
3
- import { useI18n as T } from "@feedmepos/mf-common";
4
- import { useSnackbar as V } from "@feedmepos/ui-library";
5
- import { _ as h } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
6
- import { _ as C } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
7
- import { _ as N } from "./Takeaway.vue_vue_type_script_setup_true_lang-BLpiJlk2.js";
8
- import { T as S, l as L } from "./index-B0nhvuxR.js";
9
- import { a as O } from "./menu-Cd4NbFVq.js";
10
- const U = { class: "flex-1 flex justify-between gap-8 pl-8" }, B = { class: "flex items-center" }, F = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, A = { class: "fm-typo-en-body-md-600 font-semibold" }, z = /* @__PURE__ */ f({
2
+ import { a as x, u as v, T as w, d as E, M, m as T, e as V } from "./App-Cfl37TTw.js";
3
+ import { useI18n as h } from "@feedmepos/mf-common";
4
+ import { useSnackbar as C } from "@feedmepos/ui-library";
5
+ import { _ as N } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
6
+ import { _ as S } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
7
+ import { _ as L } from "./Takeaway.vue_vue_type_script_setup_true_lang-D-R5_S5G.js";
8
+ import { a as O } from "./menu-Brxar171.js";
9
+ const U = { class: "flex-1 flex justify-between gap-8 pl-8" }, B = { class: "flex items-center" }, F = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, D = { class: "fm-typo-en-body-md-600 font-semibold" }, G = /* @__PURE__ */ f({
11
10
  __name: "Takeaway",
12
- setup(D) {
13
- const u = V(), l = x(u), p = v(), c = w(l), _ = y(() => p.rules.item.bindToVariant), n = k(0), { t: r } = T();
14
- return O().resetOnMount(), (I, o) => (d(), i(C, {
11
+ setup(I) {
12
+ const u = C(), l = x(u), c = v(), p = E(l), _ = y(() => c.rules.item.bindToVariant), n = k(0), { t: r } = h();
13
+ return O().resetOnMount(), (P, o) => (d(), i(S, {
15
14
  heading: a(r)("menu.takeaway.title")
16
15
  }, {
17
16
  default: s(() => [
18
- m(N, {
17
+ m(L, {
19
18
  "onUpdate:count": o[0] || (o[0] = (e) => n.value = e)
20
19
  })
21
20
  ]),
@@ -23,27 +22,27 @@ const U = { class: "flex-1 flex justify-between gap-8 pl-8" }, B = { class: "fle
23
22
  t("div", U, [
24
23
  t("div", B, [
25
24
  t("div", F, [
26
- t("p", A, b(n.value), 1)
25
+ t("p", D, b(n.value), 1)
27
26
  ])
28
27
  ]),
29
28
  t("div", null, [
30
- n.value > 0 ? (d(), i(a(S), {
29
+ n.value > 0 ? (d(), i(a(w), {
31
30
  key: 0,
32
31
  "bind-to-variant": _.value,
33
32
  action: "add",
34
33
  "apply-product": "",
35
- "onUpdate:takeaway": o[1] || (o[1] = (e) => a(c).updateMenu(
34
+ "onUpdate:takeaway": o[1] || (o[1] = (e) => a(p).updateMenu(
36
35
  {
37
- module: a(M.F_MENU_MODULE_V4_KEY).enum.takeaway,
38
- operation: a(E.F_OPERATION_TYPE).create,
36
+ module: a(V.F_MENU_MODULE_V4_KEY).enum.takeaway,
37
+ operation: a(T.F_OPERATION_TYPE).create,
39
38
  data: e,
40
- link: a(L)(e.usedBy || [])
39
+ link: a(M)(e.usedBy || [])
41
40
  },
42
41
  e.name
43
42
  ))
44
43
  }, {
45
44
  default: s(({ trigger: e }) => [
46
- m(h, {
45
+ m(N, {
47
46
  label: a(r)("menu.takeaway.actions.add"),
48
47
  "prepend-icon": "add",
49
48
  type: "button",
@@ -60,5 +59,5 @@ const U = { class: "flex-1 flex justify-between gap-8 pl-8" }, B = { class: "fle
60
59
  }
61
60
  });
62
61
  export {
63
- z as default
62
+ G as default
64
63
  };