@feedmepos/mf-menu 0.19.14 → 0.19.15-prod

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-D8J6x4O6.js → ApplyProduct.vue_vue_type_script_setup_true_lang-f27hGMNC.js} +2 -2
  2. package/dist/{ApplyProducts.vue_vue_type_script_setup_true_lang-BBZWCUue.js → ApplyProducts.vue_vue_type_script_setup_true_lang-B4i1vVw_.js} +2 -2
  3. package/dist/{Catalog-CPHr-myK.js → Catalog-CUZIHCGP.js} +3 -3
  4. package/dist/{Category-CS3JhneB.js → Category-DArZEtsg.js} +6 -6
  5. package/dist/{CookingGuide-B3FWwyME.js → CookingGuide-CjuqQbqK.js} +3 -3
  6. package/dist/{Group-C-SeegvF.js → Group-DS3Ji3ap.js} +1 -1
  7. package/dist/{Group-BYdfTooV.js → Group-DmVFIqSj.js} +4 -4
  8. package/dist/{Group.vue_vue_type_script_setup_true_lang-sGyZfECO.js → Group.vue_vue_type_script_setup_true_lang-habJRT8D.js} +7 -7
  9. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CUYdhsCP.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CdK9wXFN.js} +2 -2
  10. package/dist/{Ingredient-BKRgZGMg.js → Ingredient-CVuNwmJ-.js} +4 -4
  11. package/dist/{LinkProductSideSheet-Cusvv7Bv.js → LinkProductSideSheet-B826EacK.js} +2 -2
  12. package/dist/{PrintRoute-DTPMqiwQ.js → PrintRoute-DbSzteoE.js} +3 -3
  13. package/dist/{Product-uEwgFJ2i.js → Product-BCxyEanC.js} +1 -1
  14. package/dist/{Product.vue_vue_type_script_setup_true_lang-DIUCN531.js → Product.vue_vue_type_script_setup_true_lang-Ciz5m3L0.js} +177 -176
  15. package/dist/{Products-eTRyr29O.js → Products-HMic81E7.js} +8 -8
  16. package/dist/{Publish-kX0dL389.js → Publish-DyiK0uQv.js} +2 -2
  17. package/dist/{Recipe-BAxtD3va.js → Recipe-3aKPQ0L_.js} +4 -4
  18. package/dist/{Scheduler-CUtYxyAi.js → Scheduler-DKNaRkFY.js} +2 -2
  19. package/dist/{SchedulerSelector.vue_vue_type_script_setup_true_lang-hwgH5baV.js → SchedulerSelector.vue_vue_type_script_setup_true_lang-KmxLUGTT.js} +1 -1
  20. package/dist/ServingSequence-BeG0Q6iE.js +4 -0
  21. package/dist/{Setting-C_tpeQK2.js → Setting-Db4S9sjP.js} +1 -1
  22. package/dist/{Setting.vue_vue_type_script_setup_true_lang-CZgV13dH.js → Setting.vue_vue_type_script_setup_true_lang-D0dz0ys7.js} +3 -3
  23. package/dist/{Takeaway-1hwEYB-o.js → Takeaway-BcCeW4G-.js} +1 -1
  24. package/dist/{Takeaway-CEMSjMwr.js → Takeaway-DUdqrq70.js} +4 -4
  25. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-qoyZ4Gl6.js → Takeaway.vue_vue_type_script_setup_true_lang-BMVs94Lh.js} +4 -4
  26. package/dist/{TaxSetting-DaXxpDa8.js → TaxSetting-7JQT4wCa.js} +4 -4
  27. package/dist/{Unit-BAbbmc0j.js → Unit-CWfNAP9y.js} +2 -2
  28. package/dist/{Variant-DA9FiA90.js → Variant-C1_Mbxba.js} +2 -2
  29. package/dist/{_id_-DHxp5W5Y.js → _id_-BpJZ_awY.js} +6 -6
  30. package/dist/{app-BLr2C8wv.js → app-BnP3r_wr.js} +31 -31
  31. package/dist/app.js +2 -2
  32. package/dist/assets/{linked-status-Be6mUUfV.js → linked-status-Cem4XtKd.js} +3 -3
  33. package/dist/assets/{validate-menu-B_J_7Tz3.js → validate-menu-BjvCteTM.js} +3 -3
  34. package/dist/{catalog-BHY4eRGM.js → catalog-B4qqicRe.js} +1 -1
  35. package/dist/{catalog-Dy4O5Tzs.js → catalog-CINrtahC.js} +909 -909
  36. package/dist/{category-BX0ObPie.js → category-DWvBhveH.js} +1 -1
  37. package/dist/{currency-BR0W4sgw.js → currency-Q9wivI5U.js} +1 -1
  38. package/dist/{index-CLqBZ-Kb.js → index-CUyhUAp2.js} +3 -3
  39. package/dist/{index-DYrrkkWm.js → index-uUeuIRfV.js} +24 -24
  40. package/dist/{item-DA9oYaFm.js → item-Dh_iO-aW.js} +11 -11
  41. package/dist/{lodash-DUUa-uq7.js → lodash-2LuDNZqV.js} +1 -1
  42. package/dist/{menu-C79kKsOB.js → menu-CvzmX5nH.js} +1 -1
  43. package/dist/{object-VujYnxbW.js → object-CdYuH7_D.js} +1 -1
  44. package/dist/{scheduler-DT9AWonu.js → scheduler-D5njQyrx.js} +4 -4
  45. package/dist/{takeaway-DEP2kuat.js → takeaway-BE-ub12P.js} +4 -4
  46. package/dist/{toExcel-Bq0yMrp5.js → toExcel-Cr5tLaNk.js} +2 -2
  47. package/dist/{unit-DkrR_hvo.js → unit-B1ZV7RbG.js} +2 -2
  48. package/package.json +1 -1
  49. package/dist/ServingSequence-B2AAlyKI.js +0 -4
@@ -1,95 +1,95 @@
1
- import { ref as N, computed as g, defineComponent as ce, resolveComponent as q, openBlock as b, createBlock as G, withCtx as O, createVNode as u, createElementVNode as f, toDisplayString as Q, unref as l, createElementBlock as z, Fragment as xe, renderList as Ne, createTextVNode as He, mergeModels as Ze, useModel as Je, renderSlot as he, watch as pe, h as A, withModifiers as Ve, createCommentVNode as ue, resolveDynamicComponent as Qe, normalizeStyle as Xe, normalizeClass as se, nextTick as et, watchEffect as tt } from "vue";
2
- import { u as ye, a as De, c as ve, y as fe, F as lt, z as at, k as ie, g as ot, A as Fe, i as je } from "./app-BLr2C8wv.js";
3
- import { _ as $e } from "./SchedulerSelector.vue_vue_type_script_setup_true_lang-hwgH5baV.js";
1
+ import { ref as D, computed as g, defineComponent as ce, resolveComponent as q, openBlock as b, createBlock as G, withCtx as O, createVNode as i, createElementVNode as f, toDisplayString as Q, unref as l, createElementBlock as z, Fragment as xe, renderList as De, createTextVNode as He, mergeModels as Ze, useModel as Je, renderSlot as he, watch as pe, h as A, withModifiers as Ve, createCommentVNode as ue, resolveDynamicComponent as Qe, normalizeStyle as Xe, normalizeClass as se, nextTick as et, watchEffect as tt } from "vue";
2
+ import { u as ye, a as Ne, c as ve, y as fe, F as lt, z as at, k as ie, g as ot, A as Fe, i as je } from "./app-BnP3r_wr.js";
3
+ import { _ as $e } from "./SchedulerSelector.vue_vue_type_script_setup_true_lang-KmxLUGTT.js";
4
4
  import { useI18n as Ce, useCoreStore as nt } from "@feedmepos/mf-common";
5
5
  import { useSnackbar as Ue, useDialog as Be, components as re, FmButtonVariant as Y, FmButtonColorThemeVariant as R, useBreakpoints as Ae } from "@feedmepos/ui-library";
6
6
  import "vue-router";
7
- import { u as ge } from "./menu-C79kKsOB.js";
8
- import { u as Ee } from "./category-BX0ObPie.js";
7
+ import { u as ge } from "./menu-CvzmX5nH.js";
8
+ import { u as Ee } from "./category-DWvBhveH.js";
9
9
  import "./vuedraggable-WU01qJgi.js";
10
- import { _ as rt, c as Ie, a as st, u as ut } from "./catalog-Dy4O5Tzs.js";
11
- import { _ as it } from "./takeaway-DEP2kuat.js";
12
- import { f as ct } from "./currency-BR0W4sgw.js";
13
- import { l as be } from "./lodash-DUUa-uq7.js";
14
- import { u as Ke, m as dt } from "./item-DA9oYaFm.js";
10
+ import { _ as rt, c as Te, a as st, u as ut } from "./catalog-CINrtahC.js";
11
+ import { _ as it } from "./takeaway-BE-ub12P.js";
12
+ import { f as ct } from "./currency-Q9wivI5U.js";
13
+ import { l as be } from "./lodash-2LuDNZqV.js";
14
+ import { u as Ke, m as dt } from "./item-Dh_iO-aW.js";
15
15
  import { w as mt } from "./InfoBasic.vue_vue_type_script_setup_true_lang-DxQBDu16.js";
16
- import { F as pt } from "./object-VujYnxbW.js";
17
- import { _ as Te } from "./TextChip.vue_vue_type_script_setup_true_lang-CNp85hoQ.js";
18
- import { L as Oe } from "./LinkProductSideSheet-Cusvv7Bv.js";
16
+ import { F as pt } from "./object-CdYuH7_D.js";
17
+ import { _ as Ie } from "./TextChip.vue_vue_type_script_setup_true_lang-CNp85hoQ.js";
18
+ import { L as Oe } from "./LinkProductSideSheet-B826EacK.js";
19
19
  function vt(M, d) {
20
- const m = N(!0), n = g(() => {
21
- var v, y;
22
- return !m.value && (!d.value || ((v = d.value) == null ? void 0 : v.length) === ((y = M.value) == null ? void 0 : y.length));
20
+ const m = D(!0), n = g(() => {
21
+ var p, y;
22
+ return !m.value && (!d.value || ((p = d.value) == null ? void 0 : p.length) === ((y = M.value) == null ? void 0 : y.length));
23
23
  }), F = g(() => {
24
- var v, y, $, _;
25
- return !!((v = d.value) != null && v.length && ((y = d.value) == null ? void 0 : y.length) > 0 && (($ = d.value) == null ? void 0 : $.length) < ((_ = M.value) == null ? void 0 : _.length));
24
+ var p, y, $, _;
25
+ return !!((p = d.value) != null && p.length && ((y = d.value) == null ? void 0 : y.length) > 0 && (($ = d.value) == null ? void 0 : $.length) < ((_ = M.value) == null ? void 0 : _.length));
26
26
  });
27
27
  return { allCleared: m, allSelected: n, indeterminate: F, toggleAll: () => {
28
28
  d.value = void 0, m.value = !m.value;
29
- }, toggleOption: (v) => {
29
+ }, toggleOption: (p) => {
30
30
  var $, _, W;
31
31
  let y;
32
- d.value === void 0 && m.value ? y = [v] : d.value === void 0 && !m.value ? y = ($ = M.value.map((I) => I.value)) == null ? void 0 : $.filter((I) => I !== v) : (_ = d.value) != null && _.includes(v) ? y = (W = d.value) == null ? void 0 : W.filter((I) => I !== v) : y = [...d.value || [], v], y.length === 0 ? (d.value = void 0, m.value = !0) : y.length === M.value.length ? (d.value = void 0, m.value = !1) : d.value = y;
32
+ d.value === void 0 && m.value ? y = [p] : d.value === void 0 && !m.value ? y = ($ = M.value.map((T) => T.value)) == null ? void 0 : $.filter((T) => T !== p) : (_ = d.value) != null && _.includes(p) ? y = (W = d.value) == null ? void 0 : W.filter((T) => T !== p) : y = [...d.value || [], p], y.length === 0 ? (d.value = void 0, m.value = !0) : y.length === M.value.length ? (d.value = void 0, m.value = !1) : d.value = y;
33
33
  } };
34
34
  }
35
35
  const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, Me = /* @__PURE__ */ ce({
36
36
  __name: "CategorySelector",
37
37
  setup(M) {
38
38
  const d = ye(), { categories: m, selectedCategories: n } = ge(), F = g(() => d.state.currentCategoryIds), r = g(
39
- () => m.value.map((C) => ({ label: C.name, value: C.id }))
39
+ () => m.value.map((k) => ({ label: k.name, value: k.id }))
40
40
  ), J = g(() => r.value.filter(
41
- (C) => C.label.toLowerCase().includes($.value.toLowerCase())
42
- )), { t: v } = Ce(), y = g(() => {
43
- var C, c, D;
44
- return m.value.length === ((C = n.value) == null ? void 0 : C.length) ? v("menu.category.selector.all") : ((c = n.value) == null ? void 0 : c.length) === 1 ? n.value[0].name : `${(D = n.value) == null ? void 0 : D.length}`;
45
- }), $ = N(""), _ = g({
41
+ (k) => k.label.toLowerCase().includes($.value.toLowerCase())
42
+ )), { t: p } = Ce(), y = g(() => {
43
+ var k, c, N;
44
+ return m.value.length === ((k = n.value) == null ? void 0 : k.length) ? p("menu.category.selector.all") : ((c = n.value) == null ? void 0 : c.length) === 1 ? n.value[0].name : `${(N = n.value) == null ? void 0 : N.length}`;
45
+ }), $ = D(""), _ = g({
46
46
  get: () => F.value,
47
- set: (C) => {
48
- d.selectCategory(C);
47
+ set: (k) => {
48
+ d.selectCategory(k);
49
49
  }
50
- }), { allCleared: W, allSelected: I, toggleAll: H, toggleOption: Z, indeterminate: E } = vt(r, _);
51
- return (C, c) => {
52
- const D = q("FmIcon"), K = q("FmChip"), L = q("FmSearch"), ae = q("FmMenuItem"), X = q("FmMenu");
50
+ }), { allCleared: W, allSelected: T, toggleAll: H, toggleOption: Z, indeterminate: E } = vt(r, _);
51
+ return (k, c) => {
52
+ const N = q("FmIcon"), K = q("FmChip"), L = q("FmSearch"), ae = q("FmMenuItem"), X = q("FmMenu");
53
53
  return b(), G(X, {
54
54
  "close-on-click": !1,
55
55
  width: "220px"
56
56
  }, {
57
57
  "menu-button": O(() => [
58
- u(K, {
58
+ i(K, {
59
59
  label: y.value,
60
60
  class: "fm-typo-en-body-md-600 text-fm-color-neutral-gray-400"
61
61
  }, {
62
62
  default: O(() => [
63
- f("p", null, Q(l(v)("menu.category.selector.title", { label: y.value })), 1),
64
- u(D, { name: "expand_more" })
63
+ f("p", null, Q(l(p)("menu.category.selector.title", { label: y.value })), 1),
64
+ i(N, { name: "expand_more" })
65
65
  ]),
66
66
  _: 1
67
67
  }, 8, ["label"])
68
68
  ]),
69
69
  default: O(() => [
70
70
  f("div", ft, [
71
- u(L, {
71
+ i(L, {
72
72
  autofocus: "",
73
73
  modelValue: $.value,
74
74
  "onUpdate:modelValue": c[0] || (c[0] = (j) => $.value = j),
75
- placeholder: l(v)("menu.common.actions.search")
75
+ placeholder: l(p)("menu.common.actions.search")
76
76
  }, null, 8, ["modelValue", "placeholder"])
77
77
  ]),
78
78
  f("div", bt, [
79
- u(ae, {
79
+ i(ae, {
80
80
  label: "All",
81
81
  "has-checkbox": "",
82
- "model-value": l(I),
82
+ "model-value": l(T),
83
83
  indeterminate: l(E),
84
84
  onClick: l(H)
85
85
  }, null, 8, ["model-value", "indeterminate", "onClick"]),
86
- (b(!0), z(xe, null, Ne(J.value, (j) => {
86
+ (b(!0), z(xe, null, De(J.value, (j) => {
87
87
  var S;
88
88
  return b(), G(ae, {
89
89
  key: j.value || "",
90
90
  label: j.label,
91
91
  "has-checkbox": "",
92
- "model-value": l(I) || ((S = _.value) == null ? void 0 : S.includes(j.value)),
92
+ "model-value": l(T) || ((S = _.value) == null ? void 0 : S.includes(j.value)),
93
93
  onClick: (U) => l(Z)(j.value)
94
94
  }, null, 8, ["label", "model-value", "onClick"]);
95
95
  }), 128))
@@ -99,9 +99,9 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
99
99
  });
100
100
  };
101
101
  }
102
- }), Pe = (M) => u("div", {
102
+ }), Pe = (M) => i("div", {
103
103
  class: "flex flex-1 justify-end"
104
- }, [u("span", null, [M, He(" ")])]), gt = /* @__PURE__ */ ce({
104
+ }, [i("span", null, [M, He(" ")])]), gt = /* @__PURE__ */ ce({
105
105
  __name: "CategorySelectorSingle",
106
106
  props: /* @__PURE__ */ Ze({
107
107
  disabled: { type: Boolean, default: !1 }
@@ -120,7 +120,7 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
120
120
  return b(), G(J, {
121
121
  items: n.value,
122
122
  modelValue: m.value,
123
- "onUpdate:modelValue": r[0] || (r[0] = (v) => m.value = v),
123
+ "onUpdate:modelValue": r[0] || (r[0] = (p) => m.value = p),
124
124
  disabled: F.disabled
125
125
  }, null, 8, ["items", "modelValue", "disabled"]);
126
126
  };
@@ -128,12 +128,12 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
128
128
  }), ze = /* @__PURE__ */ ce({
129
129
  __name: "ImportButton",
130
130
  setup(M) {
131
- const d = N(!1);
131
+ const d = D(!1);
132
132
  function m() {
133
133
  d.value = !d.value;
134
134
  }
135
135
  return (n, F) => (b(), z(xe, null, [
136
- u(rt, {
136
+ i(rt, {
137
137
  modelValue: d.value,
138
138
  "onUpdate:modelValue": F[0] || (F[0] = (r) => d.value = r)
139
139
  }, null, 8, ["modelValue"]),
@@ -166,9 +166,9 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
166
166
  class: "pt-8 flex flex-col flex-1 overflow-hidden"
167
167
  }, $t = {
168
168
  class: "space-y-8 pb-8"
169
- }, It = {
170
- class: "w-full px-8"
171
169
  }, Tt = {
170
+ class: "w-full px-8"
171
+ }, It = {
172
172
  class: "flex space-x-8 px-8"
173
173
  }, Ot = {
174
174
  key: 0,
@@ -177,9 +177,9 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
177
177
  class: "min-w-0 flex flex-1 items-center justify-start space-x-16"
178
178
  }, zt = {
179
179
  class: "flex-1 min-w-0"
180
- }, Nt = {
181
- class: "flex justify-between items-center gap-8 pb-4"
182
180
  }, Dt = {
181
+ class: "flex justify-between items-center gap-8 pb-4"
182
+ }, Nt = {
183
183
  class: "flex-1 min-w-0 fm-typo-en-body-lg-600 line-clamp-2"
184
184
  }, jt = {
185
185
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
@@ -206,24 +206,24 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
206
206
  }) {
207
207
  const m = M, {
208
208
  t: n
209
- } = Ce(), F = nt(), r = ye(), J = Ue(), v = Be(), y = De(J), $ = je(y);
209
+ } = Ce(), F = nt(), r = ye(), J = Ue(), p = Be(), y = Ne(J), $ = je(y);
210
210
  Ee({
211
- dialog: v,
211
+ dialog: p,
212
212
  menuLoader: $
213
213
  });
214
214
  const _ = Ke();
215
215
  g(() => !r.state.currentSchedulerId);
216
- const W = F.currentCountry, I = g(() => W.value ? ve.Country.getCountry(W.value) : null), H = g(() => r.rules.item);
216
+ const W = F.currentCountry, T = g(() => W.value ? ve.Country.getCountry(W.value) : null), H = g(() => r.rules.item);
217
217
  g(() => Z.value.length === 1 && Z.value[0].id === null);
218
218
  const {
219
219
  selectedCategories: Z
220
- } = ge(), E = g(() => be.flatten(Z.value.map((e) => e.items))), C = d, c = N(!1);
220
+ } = ge(), E = g(() => be.flatten(Z.value.map((e) => e.items))), k = d, c = D(!1);
221
221
  pe(() => c.value, (e) => {
222
- C("update:editing", e);
222
+ k("update:editing", e);
223
223
  });
224
- const D = (e) => {
224
+ const N = (e) => {
225
225
  ot.isBoolean(e) ? c.value = e : c.value = !c.value;
226
- }, K = N(""), L = g(() => E.value.filter((e) => {
226
+ }, K = D(""), L = g(() => E.value.filter((e) => {
227
227
  var o;
228
228
  return !K.value || !K.value.trim() ? !0 : `${e.code} ${e.name} ${ke(e)} ${X(e.category || null)} ${(o = fe()[e.orderFrom]) == null ? void 0 : o.label}`.toLowerCase().includes(K.value.toLowerCase());
229
229
  })), {
@@ -233,14 +233,14 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
233
233
  return t == null ? void 0 : t.name;
234
234
  }, j = (e, t, o) => {
235
235
  let a = be.clone(m.modelValue);
236
- const i = a[e];
237
- i && (a[e] = {
238
- ...i,
236
+ const u = a[e];
237
+ u && (a[e] = {
238
+ ...u,
239
239
  [t]: o
240
- }, C("update:model-value", a));
240
+ }, k("update:model-value", a));
241
241
  }, S = be.debounce(j, 300), U = (e) => (t) => !!t || n("menu.product.table.validation.name_required", {
242
242
  field: e
243
- }), w = (e) => e >= 0 || n("menu.product.table.validation.price_min"), V = [U("Name")], h = () => [(e) => w(typeof e == "number" ? e : Number(e) ?? 0)], P = fe(), B = N([{
243
+ }), w = (e) => e >= 0 || n("menu.product.table.validation.price_min"), V = [U("Name")], x = () => [(e) => w(typeof e == "number" ? e : Number(e) ?? 0)], P = fe(), B = D([{
244
244
  accessorKey: "thumbnail",
245
245
  header: "",
246
246
  size: 64,
@@ -250,7 +250,7 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
250
250
  },
251
251
  cell: (e) => {
252
252
  var t, o;
253
- return A(Ie, {
253
+ return A(Te, {
254
254
  src: e.getValue(),
255
255
  alt: (o = (t = e == null ? void 0 : e.row) == null ? void 0 : t.original) == null ? void 0 : o.name,
256
256
  className: "my-8 mx-12",
@@ -271,8 +271,8 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
271
271
  disabled: !H.value.code,
272
272
  modelValue: a == null ? void 0 : a.code,
273
273
  placeholder: m.modelValue[t._id].fallbackCode,
274
- "onUpdate:modelValue": (i) => {
275
- S(t._id, "code", i);
274
+ "onUpdate:modelValue": (u) => {
275
+ S(t._id, "code", u);
276
276
  }
277
277
  });
278
278
  }
@@ -298,7 +298,7 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
298
298
  header: () => {
299
299
  var e;
300
300
  return Pe(n("menu.product.table.columns.price", {
301
- currency: (e = I.value) == null ? void 0 : e.currency.symbol
301
+ currency: (e = T.value) == null ? void 0 : e.currency.symbol
302
302
  }));
303
303
  },
304
304
  enableSorting: !1,
@@ -307,7 +307,7 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
307
307
  textAlign: "right"
308
308
  },
309
309
  cell: (e) => {
310
- var i;
310
+ var u;
311
311
  const t = e.getValue();
312
312
  if (!c.value) return ve.Dinero.fromFdoDinero(t).toFormat();
313
313
  const o = m.modelValue[e.row.original._id], a = o.fallbackPrice;
@@ -316,12 +316,12 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
316
316
  disabled: !o.editPrice,
317
317
  // @ts-ignore
318
318
  placeholder: a ? ct(a, !1) : void 0,
319
- modelValue: (i = _e(o._id)) == null ? void 0 : i.price,
319
+ modelValue: (u = _e(o._id)) == null ? void 0 : u.price,
320
320
  // @ts-ignore
321
- "onUpdate:modelValue": (k) => {
322
- j(o._id, "price", k);
321
+ "onUpdate:modelValue": (h) => {
322
+ j(o._id, "price", h);
323
323
  },
324
- rules: h()
324
+ rules: x()
325
325
  });
326
326
  }
327
327
  }, {
@@ -333,9 +333,9 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
333
333
  textAlign: "right"
334
334
  },
335
335
  cell: (e) => {
336
- const t = e.getValue(), o = e.row.original, a = r.taxSetting.countryTaxOptions, i = r.getSelectedTax(t, o.fallbackTaxes, r.taxSetting.countryTaxOptions), k = a.find((le) => le.value === i);
336
+ const t = e.getValue(), o = e.row.original, a = r.taxSetting.countryTaxOptions, u = r.getSelectedTax(t, o.fallbackTaxes, r.taxSetting.countryTaxOptions), h = a.find((le) => le.value === u);
337
337
  if (!c.value)
338
- return `${k != null && k.meta.rate ? lt(k.meta.rate) : 0}%`;
338
+ return `${h != null && h.meta.rate ? lt(h.meta.rate) : 0}%`;
339
339
  const s = r.getSelectedTax(t, o.fallbackTaxes, r.taxSetting.countryTaxOptions);
340
340
  return A(re.FmSelect, {
341
341
  disabled: !H.value.tax,
@@ -367,12 +367,12 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
367
367
  header: () => n("menu.product.table.columns.order_from"),
368
368
  enableSorting: !0,
369
369
  sortingFn: (e, t) => {
370
- const [o, a] = [e, t].map((i) => P[i.original.orderFrom].sortingIndex);
370
+ const [o, a] = [e, t].map((u) => P[u.original.orderFrom].sortingIndex);
371
371
  return o - a;
372
372
  },
373
373
  size: 110,
374
374
  cell: (e) => {
375
- var i, k;
375
+ var u, h;
376
376
  const t = e.getValue(), o = e.row.original, a = fe();
377
377
  return c.value ? A(re.FmSelect, {
378
378
  disabled: !H.value.orderFrom,
@@ -381,9 +381,9 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
381
381
  "onUpdate:modelValue": async (s) => {
382
382
  j(o._id, "orderFrom", s);
383
383
  }
384
- }) : A(Te, {
385
- label: (i = a[t]) == null ? void 0 : i.label,
386
- variant: (k = a[t]) == null ? void 0 : k.variant
384
+ }) : A(Ie, {
385
+ label: (u = a[t]) == null ? void 0 : u.label,
386
+ variant: (h = a[t]) == null ? void 0 : h.variant
387
387
  });
388
388
  }
389
389
  }, {
@@ -401,7 +401,7 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
401
401
  textColor: R.NeutralGray400,
402
402
  prependIcon: "edit",
403
403
  class: "flex justify-end",
404
- onClick: D,
404
+ onClick: N,
405
405
  type: "button"
406
406
  }), "Bulk edit")]),
407
407
  cell: (e) => {
@@ -423,25 +423,26 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
423
423
  }
424
424
  }]);
425
425
  r.taxSetting.systemCode || B.value.splice(4, 1);
426
- const x = N({}), p = N([]);
427
- pe(() => x.value, (e) => {
426
+ const C = D({}), v = D([]);
427
+ pe([() => C.value, () => L.value], (e) => {
428
428
  let t = [];
429
- Object.keys(e).forEach((o) => {
430
- e[o] ? t.push(L.value[parseInt(o)]) : p.value = t.filter((i) => i !== L.value[parseInt(o)]);
431
- }), p.value = t, console.log("selectedItems", p.value);
429
+ Object.keys(e[0]).forEach((o) => {
430
+ const a = e[0][o], u = L.value[parseInt(o)];
431
+ u && (a ? t.push(u) : v.value = t.filter((h) => h !== u));
432
+ }), v.value = t;
432
433
  }), pe(() => E.value, () => {
433
- x.value = {}, p.value = [];
434
+ C.value = {}, v.value = [];
434
435
  }), pe(() => c.value, () => {
435
- x.value = {}, p.value = [];
436
+ C.value = {}, v.value = [];
436
437
  });
437
438
  const ee = () => {
438
- x.value = {};
439
+ C.value = {};
439
440
  };
440
- async function T() {
441
+ async function I() {
441
442
  await et();
442
443
  const e = () => !!r.currentCatalog || !!r.state.currentSchedulerId, t = (a) => a === "" || a === null ? e() ? "" : null : a, o = Object.values(m.modelValue).filter((a) => {
443
- const i = Object.values(m.originalValue).find((k) => k._id === a._id);
444
- return Fe(i, a);
444
+ const u = Object.values(m.originalValue).find((h) => h._id === a._id);
445
+ return Fe(u, a);
445
446
  }).map((a) => ({
446
447
  _id: a._id,
447
448
  name: a.name,
@@ -451,18 +452,18 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
451
452
  taxes: a.taxes,
452
453
  category: t(a.category || null)
453
454
  }));
454
- await _.updateMany(o), D(!1);
455
+ await _.updateMany(o), N(!1);
455
456
  }
456
457
  const oe = async () => {
457
- await _.deleteItem(p.value.map((e) => ({
458
+ await _.deleteItem(v.value.map((e) => ({
458
459
  _id: e._id,
459
460
  name: e.name,
460
461
  thumbnail: e.thumbnail
461
462
  })));
462
463
  }, te = () => {
463
- C("reset:model-value");
464
+ k("reset:model-value");
464
465
  }, ne = () => {
465
- Object.entries(m.modelValue).some(([t, o]) => Fe(o, m.originalValue[t])) ? v.open({
466
+ Object.entries(m.modelValue).some(([t, o]) => Fe(o, m.originalValue[t])) ? p.open({
466
467
  title: "You have unsaved changes!",
467
468
  message: "Are you sure you want to discard? You will lose all the changes if discard edit.",
468
469
  primaryActions: {
@@ -475,8 +476,8 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
475
476
  close: !0
476
477
  }
477
478
  }).onPrimary(() => {
478
- te(), D(!1);
479
- }) : (D(!1), te());
479
+ te(), N(!1);
480
+ }) : (N(!1), te());
480
481
  }, de = g(() => ({
481
482
  thumbnail: !c.value,
482
483
  actions: !c.value
@@ -487,61 +488,61 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
487
488
  await _.update(e.original._id);
488
489
  }
489
490
  function ke(e) {
490
- var k;
491
+ var h;
491
492
  const t = e.price ?? // TODO: fix type error
492
493
  // @ts-ignore
493
494
  e.fallbackPrice ?? ve.Dinero.fromNumber({
494
495
  number: 0
495
496
  }).toObject(), o = e.taxes;
496
497
  r.taxSetting.countryTaxOptions;
497
- const a = ve.Dinero.fromFdoDinero(t).toFormat(), i = (k = I.value) == null ? void 0 : k.currency.symbol;
498
+ const a = ve.Dinero.fromFdoDinero(t).toFormat(), u = (h = T.value) == null ? void 0 : h.currency.symbol;
498
499
  return r.getSelectedTax(
499
500
  o,
500
501
  // TODO: fix type error
501
502
  // @ts-ignore
502
503
  e.fallbackTaxes,
503
504
  r.taxSetting.countryTaxOptions
504
- ), `${i == null ? void 0 : i.toUpperCase()}${a}`;
505
+ ), `${u == null ? void 0 : u.toUpperCase()}${a}`;
505
506
  }
506
507
  function _e(e) {
507
508
  var a;
508
509
  const t = r.currentCatalog, o = r.state.currentSchedulerId;
509
510
  if (t && o) {
510
- const i = t.override.scheduler[o] ?? {
511
+ const u = t.override.scheduler[o] ?? {
511
512
  _id: o
512
513
  };
513
- return ((a = i == null ? void 0 : i.items) == null ? void 0 : a.filter((s) => s._id === e))[0];
514
- } else return t ? t.override.items[e][0] : o ? r.schedulers.find((s) => s._id === o).items.filter((s) => s._id === e)[0] : E.value.find((i) => i._id === e);
514
+ return ((a = u == null ? void 0 : u.items) == null ? void 0 : a.filter((s) => s._id === e))[0];
515
+ } else return t ? t.override.items[e][0] : o ? r.schedulers.find((s) => s._id === o).items.filter((s) => s._id === e)[0] : E.value.find((u) => u._id === e);
515
516
  }
516
- const Ge = Ae(), qe = g(() => Ge.breakpoints.value.xs), Se = N(null), We = at(Se), Ye = g(() => {
517
+ const Ge = Ae(), qe = g(() => Ge.breakpoints.value.xs), Se = D(null), We = at(Se), Ye = g(() => {
517
518
  var t;
518
519
  return {
519
520
  height: `calc(100vh - ${((t = We.value) == null ? void 0 : t.top) + 24}px)`
520
521
  };
521
522
  });
522
523
  return (e, t) => {
523
- const o = q("fm-search"), a = q("fm-button"), i = q("fm-table"), k = q("fm-form");
524
- return qe.value ? (b(), z("div", Ft, [f("div", $t, [f("div", It, [u(o, {
524
+ const o = q("fm-search"), a = q("fm-button"), u = q("fm-table"), h = q("fm-form");
525
+ return qe.value ? (b(), z("div", Ft, [f("div", $t, [f("div", Tt, [i(o, {
525
526
  "model-value": K.value,
526
527
  "onUpdate:modelValue": t[4] || (t[4] = (s) => K.value = s),
527
528
  autofocus: "",
528
529
  placeholder: l(n)("menu.product.table.search.placeholder")
529
530
  }, null, 8, ["model-value", "placeholder"])]), t[6] || (t[6] = f("div", {
530
531
  class: "w-full h-[1px] bg-fm-color-neutral-gray-100"
531
- }, null, -1)), f("div", Tt, [he(e.$slots, "filter")])]), E.value.length ? (b(), z("div", Ot, [(b(!0), z(xe, null, Ne(L.value, (s) => {
532
+ }, null, -1)), f("div", It, [he(e.$slots, "filter")])]), E.value.length ? (b(), z("div", Ot, [(b(!0), z(xe, null, De(L.value, (s) => {
532
533
  var le, me, we;
533
534
  return b(), z("div", {
534
535
  key: s._id,
535
536
  class: "max-w-full py-12 px-16 space-x-16 flex items-center",
536
537
  onClick: () => Le(s)
537
- }, [f("div", Pt, [u(Ie, {
538
+ }, [f("div", Pt, [i(Te, {
538
539
  alt: s.name,
539
540
  size: 72,
540
541
  src: s.thumbnail
541
- }, null, 8, ["alt", "src"]), f("div", zt, [f("div", Nt, [f("p", Dt, Q(s.name), 1), u(Te, {
542
+ }, null, 8, ["alt", "src"]), f("div", zt, [f("div", Dt, [f("p", Nt, Q(s.name), 1), i(Ie, {
542
543
  label: (le = l(P)[s.orderFrom || ""]) == null ? void 0 : le.label,
543
544
  variant: (me = l(P)[s.orderFrom || ""]) == null ? void 0 : me.variant
544
- }, null, 8, ["label", "variant"])]), f("p", jt, Q(ke(s)), 1), f("p", Ut, Q(l(n)("menu.product.table.columns.code")) + ": " + Q(((we = _e(s._id)) == null ? void 0 : we.code) || "--"), 1), f("p", Bt, Q(l(n)("menu.product.table.columns.category")) + ": " + Q(X(s.category || null)), 1)])]), u(a, {
545
+ }, null, 8, ["label", "variant"])]), f("p", jt, Q(ke(s)), 1), f("p", Ut, Q(l(n)("menu.product.table.columns.code")) + ": " + Q(((we = _e(s._id)) == null ? void 0 : we.code) || "--"), 1), f("p", Bt, Q(l(n)("menu.product.table.columns.category")) + ": " + Q(X(s.category || null)), 1)])]), i(a, {
545
546
  "text-color": l(R).NeutralGray400,
546
547
  variant: l(Y).Tertiary,
547
548
  "prepend-icon": "delete",
@@ -551,19 +552,19 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
551
552
  thumbnail: s.thumbnail
552
553
  }]), ["stop"])
553
554
  }, null, 8, ["text-color", "variant", "onClick"])], 8, Mt);
554
- }), 128))])) : (b(), z("div", At, [u(ie, {
555
+ }), 128))])) : (b(), z("div", At, [i(ie, {
555
556
  subtitle: l(n)("menu.product.table.empty.subtitle"),
556
557
  title: l(n)("menu.product.table.empty.title")
557
558
  }, {
558
- action: O(() => [f("div", Et, [u(a, {
559
+ action: O(() => [f("div", Et, [i(a, {
559
560
  variant: l(Y).Primary,
560
561
  label: l(n)("menu.product.table.empty.actions.add"),
561
562
  "prepend-icon": "add",
562
563
  onClick: t[5] || (t[5] = (s) => l(_).create(null))
563
- }, null, 8, ["variant", "label"]), u(ze, null, {
564
+ }, null, 8, ["variant", "label"]), i(ze, null, {
564
565
  default: O(({
565
566
  trigger: s
566
- }) => [u(a, {
567
+ }) => [i(a, {
567
568
  "bg-color": l(R).NeutralGray100,
568
569
  "text-color": l(R).NeutralGray400,
569
570
  variant: l(Y).Primary,
@@ -574,25 +575,25 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
574
575
  _: 1
575
576
  })])]),
576
577
  _: 1
577
- }, 8, ["subtitle", "title"])]))])) : (b(), G(k, {
578
+ }, 8, ["subtitle", "title"])]))])) : (b(), G(h, {
578
579
  key: 0,
579
580
  "blame-form-child-on-validation-failed": "",
580
581
  class: "flex flex-col flex-1 space-y-8 overflow-hidden",
581
- onValidationSuccess: T
582
+ onValidationSuccess: I
582
583
  }, {
583
- default: O(() => [f("div", yt, [f("div", _t, [he(e.$slots, "filter")]), f("div", ht, [u(o, {
584
+ default: O(() => [f("div", yt, [f("div", _t, [he(e.$slots, "filter")]), f("div", ht, [i(o, {
584
585
  "model-value": K.value,
585
586
  "onUpdate:modelValue": t[0] || (t[0] = (s) => K.value = s),
586
587
  autofocus: "",
587
588
  placeholder: l(n)("menu.product.table.search.placeholder")
588
- }, null, 8, ["model-value", "placeholder"])])]), E.value.length ? (b(), z("div", xt, [p.value.length && !c.value ? (b(), z("div", Ct, [f("p", kt, Q(l(n)("menu.product.table.selection.count", {
589
- count: p.value.length
590
- })), 1), u(a, {
589
+ }, null, 8, ["model-value", "placeholder"])])]), E.value.length ? (b(), z("div", xt, [v.value.length && !c.value ? (b(), z("div", Ct, [f("p", kt, Q(l(n)("menu.product.table.selection.count", {
590
+ count: v.value.length
591
+ })), 1), i(a, {
591
592
  label: l(n)("menu.product.table.selection.actions.deselect_all"),
592
593
  type: "button",
593
594
  variant: "plain",
594
595
  onClick: ee
595
- }, null, 8, ["label"]), u(a, {
596
+ }, null, 8, ["label"]), i(a, {
596
597
  "border-color": l(R).SystemError300,
597
598
  "text-color": l(R).SystemError300,
598
599
  class: "ml-auto",
@@ -600,15 +601,15 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
600
601
  "prepend-icon": "delete",
601
602
  variant: "secondary",
602
603
  onClick: oe
603
- }, null, 8, ["border-color", "text-color", "label"])])) : ue("", !0), c.value ? (b(), z("div", St, [u(a, {
604
+ }, null, 8, ["border-color", "text-color", "label"])])) : ue("", !0), c.value ? (b(), z("div", St, [i(a, {
604
605
  variant: l(Y).Tertiary,
605
606
  label: l(n)("menu.product.table.bulk_edit.actions.reset_all"),
606
607
  onClick: te
607
- }, null, 8, ["variant", "label"]), u(a, {
608
+ }, null, 8, ["variant", "label"]), i(a, {
608
609
  variant: l(Y).Tertiary,
609
610
  label: l(n)("menu.common.actions.cancel"),
610
611
  onClick: ne
611
- }, null, 8, ["variant", "label"]), u(a, {
612
+ }, null, 8, ["variant", "label"]), i(a, {
612
613
  borderColor: l(R).ColorPrimary,
613
614
  textColor: l(R).ColorPrimary,
614
615
  variant: l(Y).Secondary,
@@ -632,15 +633,15 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
632
633
  }],
633
634
  class: "overflow-hidden",
634
635
  style: Xe(Ye.value),
635
- onOnPrimary: T,
636
+ onOnPrimary: I,
636
637
  onOnCancel: ne
637
638
  }, {
638
- default: O(() => [u(i, {
639
+ default: O(() => [i(u, {
639
640
  class: se({
640
641
  "mt-24": c.value
641
642
  }),
642
- modelValue: x.value,
643
- "onUpdate:modelValue": t[1] || (t[1] = (s) => x.value = s),
643
+ modelValue: C.value,
644
+ "onUpdate:modelValue": t[1] || (t[1] = (s) => C.value = s),
644
645
  "column-defs": B.value,
645
646
  "column-visibility": de.value,
646
647
  loading: e.isCalculating,
@@ -653,19 +654,19 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
653
654
  onRowClick: t[2] || (t[2] = (s) => c.value ? void 0 : Re(s))
654
655
  }, null, 8, ["class", "modelValue", "column-defs", "column-visibility", "loading", "page-size", "row-data", "selection"])]),
655
656
  _: 1
656
- }, 40, ["title", "show", "primary-action", "secondary-actions", "style"]))], 512)])) : (b(), z("div", wt, [u(ie, {
657
+ }, 40, ["title", "show", "primary-action", "secondary-actions", "style"]))], 512)])) : (b(), z("div", wt, [i(ie, {
657
658
  subtitle: l(n)("menu.product.table.empty.subtitle"),
658
659
  title: l(n)("menu.product.table.empty.title")
659
660
  }, {
660
- action: O(() => [f("div", Vt, [u(a, {
661
+ action: O(() => [f("div", Vt, [i(a, {
661
662
  variant: l(Y).Primary,
662
663
  label: l(n)("menu.product.table.empty.actions.add"),
663
664
  "prepend-icon": "add",
664
665
  onClick: t[3] || (t[3] = (s) => l(_).create(null))
665
- }, null, 8, ["variant", "label"]), u(ze, null, {
666
+ }, null, 8, ["variant", "label"]), i(ze, null, {
666
667
  default: O(({
667
668
  trigger: s
668
- }) => [u(a, {
669
+ }) => [i(a, {
669
670
  "bg-color": l(R).NeutralGray100,
670
671
  "text-color": l(R).NeutralGray400,
671
672
  variant: l(Y).Primary,
@@ -692,61 +693,61 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
692
693
  }, Wt = { class: "flex items-center gap-8 px-16" }, ml = /* @__PURE__ */ ce({
693
694
  __name: "Product",
694
695
  setup(M) {
695
- const d = Be(), m = Ue(), n = De(m), F = je(n);
696
+ const d = Be(), m = Ue(), n = Ne(m), F = je(n);
696
697
  Ee({
697
698
  dialog: d,
698
699
  menuLoader: F
699
700
  });
700
- const r = ye(), J = g(() => r.rules.item), v = st(), y = Ke(), $ = ut(), _ = g(() => !r.state.currentCatalogId), W = g(() => r.rules.item), I = g(() => !r.state.currentSchedulerId), H = N(!1), Z = N(!1), E = g(() => {
701
- var w, V, h, P;
702
- if (_.value && I.value) return;
703
- if (I.value) {
701
+ const r = ye(), J = g(() => r.rules.item), p = st(), y = Ke(), $ = ut(), _ = g(() => !r.state.currentCatalogId), W = g(() => r.rules.item), T = g(() => !r.state.currentSchedulerId), H = D(!1), Z = D(!1), E = g(() => {
702
+ var w, V, x, P;
703
+ if (_.value && T.value) return;
704
+ if (T.value) {
704
705
  const B = (w = r.currentCatalog) == null ? void 0 : w.override.items;
705
- return B ? Object.entries(B).reduce((x, [p, ee]) => {
706
- const T = ee.find((oe) => !oe.combinationKey);
707
- return T && (x[p] = T), x;
706
+ return B ? Object.entries(B).reduce((C, [v, ee]) => {
707
+ const I = ee.find((oe) => !oe.combinationKey);
708
+ return I && (C[v] = I), C;
708
709
  }, {}) : {};
709
710
  }
710
- return ((_.value ? (V = r.currentScheduler) == null ? void 0 : V.items : (P = (h = r.currentCatalog) == null ? void 0 : h.override.scheduler[r.state.currentSchedulerId]) == null ? void 0 : P.items) ?? []).reduce((B, x) => (x.combinationKey || (B[x._id] = x), B), {});
711
- }), C = N({}), c = N({}), D = async () => {
711
+ return ((_.value ? (V = r.currentScheduler) == null ? void 0 : V.items : (P = (x = r.currentCatalog) == null ? void 0 : x.override.scheduler[r.state.currentSchedulerId]) == null ? void 0 : P.items) ?? []).reduce((B, C) => (C.combinationKey || (B[C._id] = C), B), {});
712
+ }), k = D({}), c = D({}), N = async () => {
712
713
  var P, B;
713
714
  Z.value = !0;
714
- const U = !!E.value, w = be.flatten(L.value.map((x) => x.items)), V = U && H.value ? await dt(
715
+ const U = !!E.value, w = be.flatten(L.value.map((C) => C.items)), V = U && H.value ? await dt(
715
716
  r.mergedMenu,
716
717
  w,
717
718
  r.state.menu,
718
719
  (P = r.currentCatalog) == null ? void 0 : P._id,
719
720
  (B = r.currentScheduler) == null ? void 0 : B._id,
720
721
  !1
721
- ) : void 0, h = w.reduce((x, p, ee) => {
722
+ ) : void 0, x = w.reduce((C, v, ee) => {
722
723
  var oe, te, ne, de;
723
- const T = (oe = E.value) == null ? void 0 : oe[p._id];
724
- return x[p._id] = {
725
- _id: p._id,
726
- name: p.name,
727
- code: U ? T == null ? void 0 : T.code : p == null ? void 0 : p.code,
728
- category: p.category,
729
- price: U && W.value.editPrice ? T == null ? void 0 : T.price : p.price,
730
- orderFrom: U ? T == null ? void 0 : T.orderFrom : p.orderFrom,
731
- taxes: U ? null : p.taxes,
732
- thumbnail: p.thumbnail,
724
+ const I = (oe = E.value) == null ? void 0 : oe[v._id];
725
+ return C[v._id] = {
726
+ _id: v._id,
727
+ name: v.name,
728
+ code: U ? I == null ? void 0 : I.code : v == null ? void 0 : v.code,
729
+ category: v.category,
730
+ price: U && W.value.editPrice ? I == null ? void 0 : I.price : v.price,
731
+ orderFrom: U ? I == null ? void 0 : I.orderFrom : v.orderFrom,
732
+ taxes: U ? null : v.taxes,
733
+ thumbnail: v.thumbnail,
733
734
  fallbackPrice: (te = V == null ? void 0 : V[ee]) == null ? void 0 : te.price,
734
- fallbackName: U ? p.name : void 0,
735
+ fallbackName: U ? v.name : void 0,
735
736
  fallbackCode: (ne = V == null ? void 0 : V[ee]) == null ? void 0 : ne.code,
736
737
  fallbackOrder: (de = V == null ? void 0 : V[ee]) == null ? void 0 : de.orderFrom,
737
- fallbackTaxes: U ? p.taxes : null
738
- }, x;
738
+ fallbackTaxes: U ? v.taxes : null
739
+ }, C;
739
740
  }, {});
740
- C.value = h, c.value = { ...h }, Z.value = !1;
741
+ k.value = x, c.value = { ...x }, Z.value = !1;
741
742
  }, { categories: K, selectedCategories: L } = ge();
742
743
  tt(async () => {
743
- L.value && await D();
744
+ L.value && await N();
744
745
  });
745
746
  function ae() {
746
747
  y.create(null);
747
748
  }
748
749
  const X = () => {
749
- L.value && D();
750
+ L.value && N();
750
751
  }, j = Ae();
751
752
  g(() => j.breakpoints.value.xs);
752
753
  const { t: S } = Ce();
@@ -758,14 +759,14 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
758
759
  l(L) ? (b(), G(Kt, {
759
760
  key: 0,
760
761
  "is-calculating": Z.value,
761
- "model-value": C.value,
762
+ "model-value": k.value,
762
763
  "original-value": c.value,
763
- "onUpdate:modelValue": w[0] || (w[0] = (h) => C.value = h),
764
+ "onUpdate:modelValue": w[0] || (w[0] = (x) => k.value = x),
764
765
  "onReset:modelValue": X,
765
- "onUpdate:editing": w[1] || (w[1] = (h) => H.value = h)
766
+ "onUpdate:editing": w[1] || (w[1] = (x) => H.value = x)
766
767
  }, {
767
768
  filter: O(() => [
768
- u(Me),
769
+ i(Me),
769
770
  W.value.multiScheduler ? (b(), G($e, { key: 0 })) : ue("", !0)
770
771
  ]),
771
772
  _: 1
@@ -774,7 +775,7 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
774
775
  ])
775
776
  ])) : (b(), z("div", qt, [
776
777
  f("div", Wt, [
777
- u(Me),
778
+ i(Me),
778
779
  W.value.multiScheduler ? (b(), G($e, { key: 0 })) : ue("", !0)
779
780
  ]),
780
781
  J.value.create ? (b(), G(ie, {
@@ -785,23 +786,23 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
785
786
  },
786
787
  subtitle: l(S)("menu.product.empty.with_create.subtitle"),
787
788
  title: l(S)("menu.product.empty.with_create.title")
788
- }, null, 8, ["action", "subtitle", "title"])) : I.value ? (b(), G(ie, {
789
+ }, null, 8, ["action", "subtitle", "title"])) : T.value ? (b(), G(ie, {
789
790
  key: 1,
790
791
  subtitle: l(S)("menu.product.empty.no_scheduler.subtitle"),
791
792
  title: l(S)("menu.product.empty.no_scheduler.title")
792
793
  }, {
793
794
  action: O(() => [
794
- u(Oe, {
795
+ i(Oe, {
795
796
  "categorized-items": l($).linkableItems.value,
796
797
  "initial-value": l($).currentItems.value,
797
798
  "show-variant": !1,
798
- onSubmit: w[2] || (w[2] = (h) => l($).applyProduct(h.map((P) => P._id)))
799
+ onSubmit: w[2] || (w[2] = (x) => l($).applyProduct(x.map((P) => P._id)))
799
800
  }, {
800
- default: O(({ trigger: h }) => [
801
- u(V, {
801
+ default: O(({ trigger: x }) => [
802
+ i(V, {
802
803
  label: l(S)("menu.common.actions.link_product"),
803
804
  "prepend-icon": "link",
804
- onClick: h
805
+ onClick: x
805
806
  }, null, 8, ["label", "onClick"])
806
807
  ]),
807
808
  _: 1
@@ -814,16 +815,16 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
814
815
  title: l(S)("menu.product.empty.with_scheduler.title")
815
816
  }, {
816
817
  action: O(() => [
817
- u(Oe, {
818
- "categorized-items": l(v).linkableItems.value,
819
- "initial-value": l(v).currentItems.value,
818
+ i(Oe, {
819
+ "categorized-items": l(p).linkableItems.value,
820
+ "initial-value": l(p).currentItems.value,
820
821
  "show-variant": !1,
821
- onSubmit: w[3] || (w[3] = (h) => l(v).applyProduct(h.map((P) => P._id)))
822
+ onSubmit: w[3] || (w[3] = (x) => l(p).applyProduct(x.map((P) => P._id)))
822
823
  }, {
823
- default: O(({ trigger: h }) => [
824
- u(V, {
824
+ default: O(({ trigger: x }) => [
825
+ i(V, {
825
826
  label: l(S)("menu.common.actions.apply_product"),
826
- onClick: h
827
+ onClick: x
827
828
  }, null, 8, ["label", "onClick"])
828
829
  ]),
829
830
  _: 1