@feedmepos/mf-menu 0.32.43-dev → 0.32.43

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 (63) hide show
  1. package/dist/{App-CrjDDWL_.js → App-C9b4SjED.js} +7 -7
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-C9_vvfQ0.js → ApplyProduct.vue_vue_type_script_setup_true_lang-C1T4Ewek.js} +3 -3
  3. package/dist/{Catalog-B0smQVC5.js → Catalog-BVrf3VaX.js} +6 -6
  4. package/dist/{Category-CRnTrk7Z.js → Category-BMzIQqIE.js} +4 -4
  5. package/dist/{Category--CBhhHgr.js → Category-BkReM5IG.js} +4 -4
  6. package/dist/{CookingGuide-pLzJqj05.js → CookingGuide-CvctI1TH.js} +4 -4
  7. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-BescRkpm.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-bYSEp6Wb.js} +1 -1
  8. package/dist/{Group-h2MxylAR.js → Group-BQzmXagr.js} +1 -1
  9. package/dist/{Group-BoVi0Rcg.js → Group-CHkNuuHE.js} +3 -3
  10. package/dist/{Group.vue_vue_type_script_setup_true_lang-DoSZp0U5.js → Group.vue_vue_type_script_setup_true_lang-BkruJTpL.js} +7 -7
  11. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CBOntQef.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CBz83Qd1.js} +5 -5
  12. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-DshK6DwV.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-Dpx4meDa.js} +1648 -1648
  13. package/dist/{Ingredient-DjZmix9T.js → Ingredient-BNsKYrQB.js} +3 -3
  14. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-fSRrfMjQ.js → InventoryBinding.vue_vue_type_script_setup_true_lang-DzzwwdA_.js} +2 -2
  15. package/dist/{LinkProductSideSheet-1CEGjcHq.js → LinkProductSideSheet-C6-wef-M.js} +3 -3
  16. package/dist/{MenuSetting-umNE52d9.js → MenuSetting-DRaw7b6m.js} +5 -5
  17. package/dist/{PrintRoute-BnFG1IjW.js → PrintRoute-BKB-thVp.js} +4 -4
  18. package/dist/{Product-B_FPUoEN.js → Product-vviXmBR1.js} +1 -1
  19. package/dist/{Product.vue_vue_type_script_setup_true_lang-Bs8eI9g5.js → Product.vue_vue_type_script_setup_true_lang-5h-k6zad.js} +12 -12
  20. package/dist/{ProductInternalTools-Bp2gz3QJ.js → ProductInternalTools-DtLk3xFR.js} +6 -6
  21. package/dist/{Products-Ddtfvm7l.js → Products-BR3iBVFd.js} +24 -24
  22. package/dist/{Publish-C0W6ofjm.js → Publish-jx0_H_26.js} +3 -3
  23. package/dist/{Recipe-BhnMIcc7.js → Recipe-Dk04ge-_.js} +4 -4
  24. package/dist/{RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-D9VL-PzK.js → RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-I6qrPmxY.js} +1 -1
  25. package/dist/{RuleView.vue_vue_type_script_setup_true_lang-Bj4O3uSe.js → RuleView.vue_vue_type_script_setup_true_lang-DaCVUn1i.js} +366 -366
  26. package/dist/{Scheduler-BRwPYceV.js → Scheduler-vFTvCVcY.js} +3 -3
  27. package/dist/{ServingSequence-MObSgHV2.js → ServingSequence-DiBqQ_iS.js} +3 -3
  28. package/dist/{Setting-D7jNJPYo.js → Setting-CtzJ_pVM.js} +5 -5
  29. package/dist/{Subcategory-D0i9wZms.js → Subcategory-Cmv2W67T.js} +5 -5
  30. package/dist/{Takeaway-B0rN8xm3.js → Takeaway-ChaYk0Ix.js} +1 -1
  31. package/dist/{Takeaway-DSZV63GV.js → Takeaway-DBW4UPFZ.js} +4 -4
  32. package/dist/Takeaway.vue_vue_type_script_setup_true_lang-C7RL3ITP.js +324 -0
  33. package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-b_0rh_qC.js → Thumbnail.vue_vue_type_script_setup_true_lang-edwJ1203.js} +4 -4
  34. package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-CHTaPIEV.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-Cs6s_csi.js} +1 -1
  35. package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DKveCAMk.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DIbjlDVn.js} +13 -13
  36. package/dist/{Unit-D8r8gc_c.js → Unit-BgLqPMLe.js} +2 -2
  37. package/dist/{Variant-x9Q2azsr.js → Variant-B8yxF5mJ.js} +3 -3
  38. package/dist/{_id_-BwgaCrRc.js → _id_-CDN7as0K.js} +9 -9
  39. package/dist/{app-D8DICtN-.js → app-0AQBxO0B.js} +1 -1
  40. package/dist/{app-ProVGxGi.js → app-BU6wILmn.js} +31 -31
  41. package/dist/app.js +1 -1
  42. package/dist/assets/{linked-status-Ck-5QNWw.js → linked-status-DTIHdzDw.js} +5 -5
  43. package/dist/assets/{menu-export-CCvx9iiX.js → menu-export-CpcyYnR-.js} +2 -2
  44. package/dist/assets/{override-menu-y10fUcKT.js → override-menu-CASoFjhZ.js} +5 -5
  45. package/dist/assets/{validate-menu-Dw-TOpPc.js → validate-menu-C5AkexWv.js} +2 -2
  46. package/dist/{catalog-Bzeh9lHl.js → catalog-BA1e4WAu.js} +1 -1
  47. package/dist/{catalogSetting-WYVwRyqN.js → catalogSetting-DE5rjVfj.js} +1 -1
  48. package/dist/{currency-CkevBlpn.js → currency-D5qYOpxI.js} +1 -1
  49. package/dist/{dayjs.min-DcCQ_MAV.js → dayjs.min-BFDAHpA8.js} +2 -2
  50. package/dist/{index-r4bszgqF.js → index--nQbIQ0d.js} +3 -3
  51. package/dist/{index-BIvW0NKj.js → index-vPs04fVf.js} +5 -5
  52. package/dist/{index.vue_vue_type_script_setup_true_lang-gt4Ll4Ng.js → index.vue_vue_type_script_setup_true_lang-DSZsSghE.js} +171 -171
  53. package/dist/{item-CDOMAerF.js → item-Dp17qTYi.js} +15 -15
  54. package/dist/{jszip.min-CaR1xyCC.js → jszip.min-DlpCmtaR.js} +3 -3
  55. package/dist/{menu-vnpCb5nt.js → menu-BOVrJ7di.js} +1 -1
  56. package/dist/{menuV2-wfldXb10.js → menuV2-BHnldQiM.js} +155 -155
  57. package/dist/{priceTier-BgYIRc-s.js → priceTier-BRQz1GRF.js} +1 -1
  58. package/dist/{rules-XWOGU9mA.js → rules-CO49kqfr.js} +3 -3
  59. package/dist/{scheduler-B7oIfXlC.js → scheduler-BDHjl8t7.js} +4 -4
  60. package/dist/{toExcel-DMfq-sYZ.js → toExcel-DGdZKSxT.js} +2 -2
  61. package/dist/{unit-BicSjw1Q.js → unit-D7QVgTp_.js} +2 -2
  62. package/package.json +2 -2
  63. package/dist/Takeaway.vue_vue_type_script_setup_true_lang-jLe2HU1c.js +0 -316
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as d, ref as g, watch as _, resolveComponent as S, createBlock as T, openBlock as f, unref as y, computed as h } from "vue";
2
2
  import { useI18n as m } from "@feedmepos/mf-common";
3
3
  import { useDialogChild as w, useDialog as x, useSnackbar as C } from "@feedmepos/ui-library";
4
- import { u as k, B as M } from "./index.vue_vue_type_script_setup_true_lang-gt4Ll4Ng.js";
4
+ import { u as k, B as M } from "./index.vue_vue_type_script_setup_true_lang-DSZsSghE.js";
5
5
  const v = /* @__PURE__ */ d({
6
6
  __name: "AddPriceGroupDialog",
7
7
  setup(s) {
@@ -1,9 +1,9 @@
1
1
  import { defineComponent as O, watch as T, ref as V, computed as N, resolveComponent as g, createElementBlock as F, openBlock as A, Fragment as P, createVNode as f, unref as _, withCtx as b, createElementVNode as Y, renderList as I, toDisplayString as h } from "vue";
2
- import { J as v, y as E, u as q } from "./index.vue_vue_type_script_setup_true_lang-gt4Ll4Ng.js";
2
+ import { J as v, y as E, u as q } from "./index.vue_vue_type_script_setup_true_lang-DSZsSghE.js";
3
3
  import { useI18n as S } from "@feedmepos/mf-common";
4
4
  import { useDialogChild as L } from "@feedmepos/ui-library";
5
- import { u as k } from "./menuV2-wfldXb10.js";
6
- import { _ as K } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-CHTaPIEV.js";
5
+ import { u as k } from "./menuV2-BHnldQiM.js";
6
+ import { _ as K } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-Cs6s_csi.js";
7
7
  import { g as w } from "./translation-BCZ1Ruvv.js";
8
8
  const R = { class: "py-12 px-16 space-y-4" }, D = /* @__PURE__ */ O({
9
9
  __name: "AddSubcategoryDialogContentComponent",
@@ -1,12 +1,12 @@
1
1
  import { defineComponent as ie, computed as Y, resolveComponent as _, createElementBlock as d, openBlock as u, createVNode as t, createCommentVNode as F, unref as n, toDisplayString as A, createElementVNode as h, withCtx as v, Fragment as N, renderList as M, createBlock as I, ref as H, Transition as se, createTextVNode as me } from "vue";
2
- import { G as S, y as r, u as pe, H as ve, J as ue } from "./index.vue_vue_type_script_setup_true_lang-gt4Ll4Ng.js";
2
+ import { G as S, y as r, u as pe, H as ve, J as ue } from "./index.vue_vue_type_script_setup_true_lang-DSZsSghE.js";
3
3
  import { useI18n as de } from "@feedmepos/mf-common";
4
4
  import { components as _e } from "@feedmepos/ui-library";
5
5
  import { _ as fe } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
6
- import { _ as ne } from "./RuleView.vue_vue_type_script_setup_true_lang-Bj4O3uSe.js";
6
+ import { _ as ne } from "./RuleView.vue_vue_type_script_setup_true_lang-DaCVUn1i.js";
7
7
  import { u as ye } from "./discardConfirm-BHni0LNu.js";
8
- import { u as he } from "./menu-vnpCb5nt.js";
9
- import { L as ge } from "./LinkProductSideSheet-1CEGjcHq.js";
8
+ import { u as he } from "./menu-BOVrJ7di.js";
9
+ import { L as ge } from "./LinkProductSideSheet-C6-wef-M.js";
10
10
  const Ve = { class: "space-y-8" }, Fe = {
11
11
  key: 0,
12
12
  class: "space-y-16"
@@ -1,5 +1,5 @@
1
- import { u as C } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-DshK6DwV.js";
2
- import "./index.vue_vue_type_script_setup_true_lang-gt4Ll4Ng.js";
1
+ import { u as C } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-Dpx4meDa.js";
2
+ import "./index.vue_vue_type_script_setup_true_lang-DSZsSghE.js";
3
3
  var Z = {
4
4
  defaultAmount: 0,
5
5
  defaultCurrency: "USD",
@@ -1,12 +1,12 @@
1
1
  import { defineStore as J } from "pinia";
2
2
  import { defineComponent as O, computed as U, ref as h, watch as T, resolveComponent as y, createBlock as W, openBlock as F, withCtx as w, createVNode as m, createElementVNode as f, normalizeClass as Q, createElementBlock as A, toDisplayString as M, unref as l, Fragment as q, renderSlot as X, renderList as Z, getCurrentInstance as ee } from "vue";
3
- import { a5 as B, a6 as te, a3 as P, G as k, O as $, B as j, A as E, a4 as ne, J as C, y as D, H as oe, u as ae } from "./index.vue_vue_type_script_setup_true_lang-gt4Ll4Ng.js";
3
+ import { a5 as B, a6 as te, a3 as P, G as k, O as $, B as j, A as E, a4 as ne, J as C, y as D, H as oe, u as ae } from "./index.vue_vue_type_script_setup_true_lang-DSZsSghE.js";
4
4
  import { useI18n as L } from "@feedmepos/mf-common";
5
5
  import { useSnackbar as I, components as le, useDialog as ue, FmButtonVariant as ie } from "@feedmepos/ui-library";
6
6
  import { u as se } from "./discardConfirm-BHni0LNu.js";
7
7
  import { c as re } from "./check-C9mY6LiX.js";
8
8
  import "./vuedraggable-CK8z7qA8.js";
9
- import "./menuV2-wfldXb10.js";
9
+ import "./menuV2-BHnldQiM.js";
10
10
  import "./app-5fxKLAzS.js";
11
11
  /* empty css */
12
12
  import { c as me } from "./createComponentProgrammatically-Bt2rn1IQ.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-menu",
3
- "version": "0.32.43-dev",
3
+ "version": "0.32.43",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -55,7 +55,7 @@
55
55
  "vue3-lottie": "^3.3.0",
56
56
  "vuedraggable": "^4.1.0",
57
57
  "xlsx": "^0.18.5",
58
- "@feedmepos/mf-common": "^1.29.21"
58
+ "@feedmepos/mf-common": "^1.29.22"
59
59
  },
60
60
  "devDependencies": {
61
61
  "@rollup/plugin-commonjs": "^28.0.2",
@@ -1,316 +0,0 @@
1
- import { getCurrentInstance as te, defineComponent as oe, computed as x, watch as ne, h as E, resolveComponent as S, createElementBlock as C, openBlock as _, Fragment as P, normalizeClass as Y, createElementVNode as k, createVNode as V, unref as n, isRef as j, withCtx as F, renderList as ie, createBlock as G, createCommentVNode as $, toDisplayString as O, withModifiers as J } from "vue";
2
- import { B as H, u as Q, O as W, J as L, y as N, G as A, z as se, am as q, a2 as re } from "./index.vue_vue_type_script_setup_true_lang-gt4Ll4Ng.js";
3
- import { useI18n as X, useCoreStore as le } from "@feedmepos/mf-common";
4
- import { useDialog as ce, useSnackbar as Z, FmButtonVariant as D, components as de, useBreakpoints as me } from "@feedmepos/ui-library";
5
- import { _ as ue } from "./app-ProVGxGi.js";
6
- import { a as pe, l as ee, T as ye } from "./index-BIvW0NKj.js";
7
- import { u as fe } from "./search-BAPEUu1R.js";
8
- import { f as z } from "./currency-CkevBlpn.js";
9
- import { defineStore as _e } from "pinia";
10
- import { C as ke } from "./catalog-Bzeh9lHl.js";
11
- import { c as ve } from "./createComponentProgrammatically-Bt2rn1IQ.js";
12
- import { g as we } from "./translation-BCZ1Ruvv.js";
13
- function ge(T, U, l, p) {
14
- var y, v, w, g;
15
- const s = A(T);
16
- s.override.takeaway[l._id] = {
17
- price: l.price || void 0
18
- };
19
- const f = [...l.usedBy, ...U.usedBy];
20
- for (const r of f) {
21
- const c = l.usedBy.some(
22
- (e) => e._id == r._id && e.combinationKey == r.combinationKey
23
- ) ? l._id : null, a = (s.override.items[r._id] || []).findIndex(
24
- (e) => e.combinationKey === r.combinationKey
25
- );
26
- let d;
27
- if (a >= 0)
28
- d = (y = s.override.items[r._id][a]) != null && y.takeawayUsed ? A((v = s.override.items[r._id][a]) == null ? void 0 : v.takeawayUsed) : void 0;
29
- else {
30
- const e = p.find((u) => u._id === r._id);
31
- r.combinationKey ? d = ((g = (w = e == null ? void 0 : e.variant) == null ? void 0 : w.variantCombinations.find(
32
- (u) => u.combinationKey === r.combinationKey
33
- )) == null ? void 0 : g.takeawayUsed) || (e == null ? void 0 : e.takeawayUsed) : d = e == null ? void 0 : e.takeawayUsed;
34
- }
35
- if (a >= 0)
36
- s.override.items[r._id][a].takeawayUsed = c;
37
- else if (d !== c) {
38
- const e = {
39
- _id: r._id,
40
- combinationKey: r.combinationKey,
41
- takeawayUsed: c
42
- };
43
- s.override.items[r._id] = [...s.override.items[r._id] || [], e];
44
- }
45
- }
46
- return s;
47
- }
48
- const be = _e("takeaway-manager", () => {
49
- const T = ce(), U = Z(), l = H(U), p = W(l), s = Q(), f = te(), { t: y } = X(), v = (a) => {
50
- var e, u;
51
- const { vNode: d } = ve(
52
- pe,
53
- f,
54
- a
55
- );
56
- (u = (e = d.component) == null ? void 0 : e.exposed) == null || u.trigger();
57
- };
58
- async function w(a) {
59
- var u, K;
60
- const e = ((K = (u = s.currentCatalog) == null ? void 0 : u.override.takeaway[a._id]) == null ? void 0 : K.price) ? null : s.state.menu.modules.takeaway.find((b) => b._id === a._id);
61
- v({
62
- initialValue: a,
63
- applyProduct: !0,
64
- bindToVariant: s.rules.item.bindToVariant,
65
- fallback: e,
66
- action: "update",
67
- "onUpdate:takeaway": async (b) => {
68
- let o = A(s.currentCatalog);
69
- b.price ? o.override.takeaway[a._id] = { price: b.price } : delete o.override.takeaway[a._id], o = ge(o, a, b, s.state.menu.modules.item), await new ke(o, s, p.updateMenu, T).update();
70
- }
71
- });
72
- }
73
- async function g(a) {
74
- v({
75
- initialValue: a,
76
- bindToVariant: s.rules.item.bindToVariant,
77
- applyProduct: !0,
78
- action: "update",
79
- "onUpdate:takeaway": async (d) => {
80
- await p.updateMenu(
81
- {
82
- module: N.F_MENU_MODULE_V4_KEY.enum.takeaway,
83
- operation: L.F_OPERATION_TYPE.update,
84
- data: d,
85
- link: ee(d.usedBy || [])
86
- },
87
- d.name
88
- );
89
- }
90
- });
91
- }
92
- async function r(a) {
93
- s.currentCatalog ? await w(a) : await g(a);
94
- }
95
- async function c(a) {
96
- T.open({
97
- title: y("menu.common.dialog.remove.takeaway.title"),
98
- message: y("menu.common.dialog.remove.takeaway.message", { name: a.name }),
99
- primaryActions: {
100
- text: y("menu.common.actions.remove"),
101
- close: !0,
102
- variant: D.Destructive
103
- },
104
- secondaryActions: {
105
- text: y("menu.common.actions.cancel"),
106
- close: !0
107
- }
108
- }).onPrimary(async () => {
109
- await p.updateMenu(
110
- {
111
- module: N.F_MENU_MODULE_V4_KEY.enum.takeaway,
112
- operation: L.F_OPERATION_TYPE.delete,
113
- data: a._id
114
- },
115
- a.name,
116
- !0
117
- );
118
- });
119
- }
120
- return {
121
- deleteTakeaway: c,
122
- updateTakeaway: r
123
- };
124
- }), he = {
125
- key: 0,
126
- class: /* @__PURE__ */ Y(["flex-1 overflow-hidden", "space-y-16", "flex flex-col", "overflow-hidden", "pt-16"])
127
- }, xe = {
128
- class: "flex items-center space-x-8 justify-end"
129
- }, Ce = {
130
- class: "w-[320px]"
131
- }, Ve = {
132
- class: "px-16 pt-8"
133
- }, Te = {
134
- class: /* @__PURE__ */ Y(["flex-1", "overflow-scroll", "divide-y divide-fm-color-neutral-gray-100"])
135
- }, Ue = ["onClick"], Me = {
136
- class: "flex-1"
137
- }, Ee = {
138
- class: "fm-typo-en-body-lg-600 mb-4"
139
- }, Ke = {
140
- class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
141
- }, Ie = {
142
- class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
143
- }, Be = {
144
- key: 1,
145
- class: "xs:pt-24"
146
- }, Ge = /* @__PURE__ */ oe({
147
- __name: "Takeaway",
148
- emits: ["update:count"],
149
- setup(T, {
150
- emit: U
151
- }) {
152
- const l = Q(), p = be(), s = x(() => l.rules.item.bindToVariant), f = x(() => l.rules.takeaway), y = W(H(Z())), v = le(), w = x(() => se.Country.getCountry(v.currentCountry.value).currency), g = x(() => l.takeaways.map((o) => ({
153
- ...o,
154
- usedBy: l.items.reduce((i, m) => {
155
- var t, I, R;
156
- const h = m.takeawayUsed === o._id;
157
- if ((!s.value || !((I = (t = m.variant) == null ? void 0 : t.variantGroupIds) != null && I.length)) && h)
158
- i.push({
159
- _id: m._id
160
- });
161
- else {
162
- const ae = (((R = m.variant) == null ? void 0 : R.variantCombinations) || []).filter((B) => B.takeawayUsed === o._id || !B.takeawayUsed && h).map((B) => ({
163
- _id: m._id,
164
- combinationKey: B.combinationKey
165
- }));
166
- i = [...i, ...ae];
167
- }
168
- return i;
169
- }, [])
170
- }))), {
171
- filter: r,
172
- searchKey: c
173
- } = fe(), a = x(() => g.value.filter((o) => r([o.name, z(o.price, !1)]))), d = U;
174
- ne(() => a.value.length, (o) => {
175
- d("update:count", o);
176
- }, {
177
- immediate: !0
178
- });
179
- const {
180
- t: e
181
- } = X(), u = x(() => [{
182
- accessorKey: "name",
183
- header: () => e("menu.takeaway.table.columns.name"),
184
- enableSorting: !1,
185
- size: 700,
186
- cell: (o) => {
187
- const i = o.row.original, m = o.getValue(), M = Object.keys(i.name_locale ?? {}).map((t) => we(t));
188
- return E("div", {
189
- class: "flex items-center gap-8"
190
- }, [E("span", {
191
- class: "break-all"
192
- }, m), ...M.map((t) => E("div", {
193
- class: "rounded-lg border border-fm-color-primary text-fm-color-primary flex items-center justify-center fm-typo-en-body-sm-600 px-8"
194
- }, t))]);
195
- }
196
- }, {
197
- accessorKey: "price",
198
- header: () => e("menu.takeaway.table.columns.price", {
199
- symbol: w.value.symbol
200
- }),
201
- enableSorting: !1,
202
- size: 200,
203
- meta: {
204
- textAlign: "right"
205
- },
206
- cell: (o) => {
207
- const i = o.getValue();
208
- return z(i, !1);
209
- }
210
- }, {
211
- accessorKey: "usedBy",
212
- header: () => e("menu.takeaway.table.columns.products"),
213
- enableSorting: !1,
214
- size: 200,
215
- cell: (o) => {
216
- const i = o.getValue(), m = q(l.categorizedItems, i).flatMap((h) => h.items).length ?? 0;
217
- return e("menu.takeaway.table.items_linked", {
218
- count: m
219
- });
220
- }
221
- }, {
222
- id: "action",
223
- size: 52,
224
- meta: {
225
- cellClass: "pl-16",
226
- headerContentClass: "-mx-16"
227
- },
228
- cell: (o) => E("div", {
229
- class: "flex justify-end items-center"
230
- }, [f.value.delete ? E(de.FmButton, {
231
- prependIcon: "delete",
232
- variant: D.Tertiary,
233
- textColor: "neutral-gray-400",
234
- onClick: (i) => {
235
- i.stopPropagation(), p.deleteTakeaway(o.row.original);
236
- }
237
- }) : null])
238
- }]), K = me(), b = x(() => K.breakpoints.value.xs);
239
- return (o, i) => {
240
- const m = S("fm-search"), h = S("fm-table"), M = S("fm-button");
241
- return g.value.length ? (_(), C(P, {
242
- key: 0
243
- }, [b.value ? (_(), C(P, {
244
- key: 1
245
- }, [k("div", Ve, [V(m, {
246
- class: "w-full",
247
- autofocus: "",
248
- modelValue: n(c),
249
- "onUpdate:modelValue": i[2] || (i[2] = (t) => j(c) ? c.value = t : null),
250
- placeholder: n(e)("menu.takeaway.table.search.placeholder")
251
- }, null, 8, ["modelValue", "placeholder"])]), k("div", Te, [(_(!0), C(P, null, ie(a.value, (t) => (_(), C("div", {
252
- key: t._id,
253
- class: Y(["py-12 px-16", "flex space-x-8", "items-center"]),
254
- onClick: () => {
255
- f.value.edit && n(p).updateTakeaway(t);
256
- }
257
- }, [k("div", Me, [k("p", Ee, O(t.name), 1), k("p", Ke, O(`${n(q)(n(l).categorizedItems, t.usedBy).flatMap((I) => I.items).length ?? 0} items linked`), 1), k("p", Ie, " Price: " + O(w.value.symbol) + O(n(z)(t.price, !1)), 1)]), f.value.delete ? (_(), G(M, {
258
- key: 0,
259
- variant: n(D).Tertiary,
260
- "text-color": "neutral-gray-400",
261
- "prepend-icon": "delete",
262
- onClick: J(() => n(p).deleteTakeaway(t), ["stop"])
263
- }, null, 8, ["variant", "onClick"])) : $("", !0)], 8, Ue))), 128))])], 64)) : (_(), C("div", he, [k("div", xe, [k("div", Ce, [V(m, {
264
- autofocus: "",
265
- modelValue: n(c),
266
- "onUpdate:modelValue": i[0] || (i[0] = (t) => j(c) ? c.value = t : null),
267
- placeholder: n(e)("menu.takeaway.table.search.placeholder")
268
- }, null, 8, ["modelValue", "placeholder"])])]), V(ue, null, {
269
- default: F(() => [V(h, {
270
- "column-defs": u.value,
271
- loading: n(y).checkMenuIsLoading(),
272
- "page-size": a.value.length,
273
- "row-data": a.value,
274
- "search-value": n(c),
275
- "shrink-at": !1,
276
- class: "flex-1 overflow-hidden",
277
- "hide-footer": "",
278
- "pin-header-row": "",
279
- onRowClick: i[1] || (i[1] = (t) => {
280
- f.value.edit && n(p).updateTakeaway(t.original);
281
- })
282
- }, null, 8, ["column-defs", "loading", "page-size", "row-data", "search-value"])]),
283
- _: 1
284
- })]))], 64)) : (_(), C("div", Be, [V(n(re), {
285
- subtitle: n(e)("menu.takeaway.empty.subtitle"),
286
- title: n(e)("menu.takeaway.empty.title")
287
- }, {
288
- action: F(() => [f.value.create ? (_(), G(n(ye), {
289
- key: 0,
290
- "bind-to-variant": s.value,
291
- action: "add",
292
- "apply-product": "",
293
- "onUpdate:takeaway": i[3] || (i[3] = (t) => n(y).updateMenu({
294
- module: n(N.F_MENU_MODULE_V4_KEY).enum.takeaway,
295
- operation: n(L.F_OPERATION_TYPE).create,
296
- data: t,
297
- link: n(ee)(t.usedBy || [])
298
- }, t.name))
299
- }, {
300
- default: F(({
301
- trigger: t
302
- }) => [V(M, {
303
- "prepend-icon": "add",
304
- label: n(e)("menu.takeaway.empty.action"),
305
- onClick: J(t, ["stop"])
306
- }, null, 8, ["label", "onClick"])]),
307
- _: 1
308
- }, 8, ["bind-to-variant"])) : $("", !0)]),
309
- _: 1
310
- }, 8, ["subtitle", "title"])]));
311
- };
312
- }
313
- });
314
- export {
315
- Ge as _
316
- };