@feedmepos/mf-menu 0.31.32-prod → 0.31.33-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/dist/{App-NHdXEdrJ.js → App-DLoBsgTh.js} +79 -33
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-DoTx23iL.js → ApplyProduct.vue_vue_type_script_setup_true_lang-AdxIn_cb.js} +20 -20
  3. package/dist/{Catalog-B0fV6Yje.js → Catalog-CEvqDKD0.js} +80 -80
  4. package/dist/{Category-CJZs9I7F.js → Category-CPrXxkVI.js} +41 -41
  5. package/dist/{Category-CUKZ10xq.js → Category-CnsBFgvu.js} +37 -33
  6. package/dist/{CookingGuide-kVclP--T.js → CookingGuide-Day6eG7h.js} +66 -66
  7. package/dist/CustomAttributeChip.vue_vue_type_script_setup_true_lang-CzrjTv0X.js +113 -0
  8. package/dist/{Group-Bgkye2LL.js → Group-HAAm8its.js} +1 -1
  9. package/dist/{Group-CAS6o4Fo.js → Group-_G2GnGz-.js} +3 -3
  10. package/dist/Group.vue_vue_type_script_setup_true_lang-CTDR_kMg.js +686 -0
  11. package/dist/GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-KuT-w6bF.js +367 -0
  12. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-RsDAGQ3o.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-DwXWiz77.js} +4982 -5081
  13. package/dist/{Ingredient-DpAPMsPZ.js → Ingredient-BerGQ0W3.js} +23 -23
  14. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-MoApzjt6.js → InventoryBinding.vue_vue_type_script_setup_true_lang-Bf9GYRjF.js} +2 -2
  15. package/dist/LinkProductSideSheet-32r2l60j.js +297 -0
  16. package/dist/LinkProductSideSheet.vue_vue_type_style_index_0_scoped_97fa9d58_lang-DvG3mOom.js +8024 -0
  17. package/dist/{MenuSetting-CoqMT8Vh.js → MenuSetting-DmyEGemp.js} +20 -20
  18. package/dist/{PrintRoute-DyJil1Hl.js → PrintRoute-8gipiFdT.js} +99 -98
  19. package/dist/{Product-BPIUTn0_.js → Product-Cqvq9DAA.js} +1 -1
  20. package/dist/Product.vue_vue_type_script_setup_true_lang-DcMr8wkh.js +1578 -0
  21. package/dist/{ProductInternalTools-DXgWE6JU.js → ProductInternalTools--w7YOgx2.js} +17 -17
  22. package/dist/Products-BIRGYu47.js +283 -0
  23. package/dist/{Publish-DDzpmm72.js → Publish-BcbzhAa5.js} +3 -3
  24. package/dist/{Recipe-DHYzO0IS.js → Recipe-z1zhmblA.js} +13 -13
  25. package/dist/{Scheduler-DBad2mO3.js → Scheduler-Cv9Y5M6i.js} +7 -7
  26. package/dist/{ServingSequence-DC7raAtF.js → ServingSequence-DWFJD-1y.js} +24 -24
  27. package/dist/Setting-BgCssMcE.js +259 -0
  28. package/dist/{Subcategory-DHjc7WeF.js → Subcategory-D4BYtWMN.js} +10 -10
  29. package/dist/{Takeaway-CJRTaygj.js → Takeaway-126rJXs4.js} +9 -9
  30. package/dist/{Takeaway-CAIAHpA-.js → Takeaway-D-UZAzfn.js} +1 -1
  31. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-BNu9JjwH.js → Takeaway.vue_vue_type_script_setup_true_lang-CVsyWrTL.js} +12 -12
  32. package/dist/Thumbnail.vue_vue_type_script_setup_true_lang-szHjE_UD.js +431 -0
  33. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CLNlU4BJ.js +5990 -0
  34. package/dist/{Unit-DSMSKE6_.js → Unit-7APP9HLD.js} +13 -13
  35. package/dist/{Variant-DMXxUWnj.js → Variant-lJW6pFqT.js} +14 -14
  36. package/dist/_id_-R-pHc7HA.js +202 -0
  37. package/dist/{app-D23N7tJ0.js → app-CAhJXoa3.js} +390 -377
  38. package/dist/{app-BTgdGTYz.js → app-DoJgznLl.js} +1 -1
  39. package/dist/app.js +1 -1
  40. package/dist/apps/mf-menu/src/app.d.ts +60 -1
  41. package/dist/apps/mf-menu/src/components/feature/PriceTier/LinkPriceTierSection.vue.d.ts +24 -0
  42. package/dist/apps/mf-menu/src/components/feature/PriceTier/PriceTierRuleEditor.vue.d.ts +30 -0
  43. package/dist/apps/mf-menu/src/components/feature/RestaurantAttributesSelector.vue.d.ts +33 -0
  44. package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/catalog.d.ts +2 -0
  45. package/dist/apps/mf-menu/src/components/feature/TreeEditor/store/menuV2.d.ts +80 -1
  46. package/dist/apps/mf-menu/src/composable/linkProducts.d.ts +1276 -0
  47. package/dist/apps/mf-menu/src/helper/import-export.d.ts +77 -0
  48. package/dist/apps/mf-menu/src/helper/menu.d.ts +77 -0
  49. package/dist/apps/mf-menu/src/helper/setting/catalogSetting.d.ts +11 -2
  50. package/dist/apps/mf-menu/src/manager/menu/item.d.ts +77 -0
  51. package/dist/apps/mf-menu/src/router/shared.d.ts +2 -1
  52. package/dist/apps/mf-menu/src/stores/manager/catalog.d.ts +2 -0
  53. package/dist/apps/mf-menu/src/stores/menu.d.ts +79 -0
  54. package/dist/apps/mf-menu/src/types/linkProducts.d.ts +21 -0
  55. package/dist/apps/mf-menu/src/views/PrintRoute/PrintDepartmentDialog.vue.d.ts +5 -3
  56. package/dist/apps/mf-menu/src/views/Publish/UpdateCatalogDialog.vue.d.ts +82 -0
  57. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  58. package/dist/assets/linked-status-BbJj0WW0.js +24 -0
  59. package/dist/assets/override-menu-CRaqJDr8.js +24 -0
  60. package/dist/assets/validate-menu-BQ2BFUmD.js +24 -0
  61. package/dist/{catalog-DcciqmWK.js → catalog-C1fna-Yk.js} +1 -1
  62. package/dist/catalogSetting-BKP36lej.js +71 -0
  63. package/dist/{category-bhqVqDzJ.js → category-DK_MXlvY.js} +5 -5
  64. package/dist/{currency-Clgvy00I.js → currency-D2fl1Bk0.js} +1 -1
  65. package/dist/{dayjs.min-DeSv8lfJ.js → dayjs.min-Bk9ZYtg9.js} +1 -1
  66. package/dist/{index-BHbYu_OM.js → index-BJ3_8aUL.js} +14 -14
  67. package/dist/{index-CTUaJyIh.js → index-CSuF-4Sa.js} +14 -14
  68. package/dist/{index-DZZJjEOs.js → index-Cc2J6T0N.js} +28 -28
  69. package/dist/index-D7yR1j9C.js +215 -0
  70. package/dist/{item-DH1xf2Sa.js → item-DX44khy2.js} +201 -199
  71. package/dist/{jszip.min-CMM2HN8J.js → jszip.min-Dbu7MIcI.js} +427 -427
  72. package/dist/{menu-Dx39P1vR.js → menu-DT5c-FqY.js} +4 -4
  73. package/dist/menu-D_Cckz_p.js +133287 -0
  74. package/dist/menuV2-DTBH_-tm.js +707 -0
  75. package/dist/mf-menu.css +1 -1
  76. package/dist/{priceTier-3M5cxSYX.js → priceTier-wLQ8p4bJ.js} +1 -1
  77. package/dist/{scheduler-BT3EJBK6.js → scheduler-D6UbXLXR.js} +36 -37
  78. package/dist/subcategory-DjN3X1BI.js +148 -0
  79. package/dist/{toExcel-BLoj4Wqb.js → toExcel-CWyoDcRd.js} +15 -15
  80. package/dist/{unit-BsNOQHvZ.js → unit-CLa8caCJ.js} +11 -10
  81. package/package.json +5 -5
  82. package/dist/CustomAttributeChip.vue_vue_type_script_setup_true_lang-RI_d10bz.js +0 -7949
  83. package/dist/FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js +0 -26
  84. package/dist/Group.vue_vue_type_script_setup_true_lang-Bij0tGMP.js +0 -698
  85. package/dist/GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CUa_0qzX.js +0 -206
  86. package/dist/LinkProductSideSheet-CEClo07H.js +0 -112
  87. package/dist/Product.vue_vue_type_script_setup_true_lang-fjFGg49e.js +0 -1560
  88. package/dist/Products-dWmgQ_di.js +0 -270
  89. package/dist/Setting-CPjvUYU9.js +0 -258
  90. package/dist/Thumbnail.vue_vue_type_script_setup_true_lang-DzQ8_6Bi.js +0 -71
  91. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-ZRv8Dg6x.js +0 -6149
  92. package/dist/_id_-CTq4qK7z.js +0 -200
  93. package/dist/apps/mf-menu/src/components/feature/LinkProduct/LinkProductSideSheet.vue.d.ts +0 -70
  94. package/dist/assets/linked-status-Cfc9wZst.js +0 -24
  95. package/dist/assets/override-menu-BNZggtO_.js +0 -24
  96. package/dist/assets/validate-menu-CPwUvy9F.js +0 -24
  97. package/dist/catalogSetting-D4iwoJLb.js +0 -65
  98. package/dist/index-Ce4v8o7D.js +0 -106
  99. package/dist/menu-DcGo3sn5.js +0 -108039
  100. package/dist/subcategory-B5atmACN.js +0 -817
  101. /package/dist/{apps/mf-menu/src/components → packages/shared/src/components/info}/CustomAttributeChip.vue.d.ts +0 -0
@@ -1,12 +1,12 @@
1
- import { defineComponent as G, computed as T, ref as F, watch as H, createVNode as n, resolveComponent as c, createBlock as V, openBlock as d, unref as e, withCtx as p, createElementVNode as _, createElementBlock as k, createCommentVNode as y, Fragment as K, renderList as q, toDisplayString as U } from "vue";
2
- import { u as J, D as Q, A as R, H as A } from "./menu-DcGo3sn5.js";
1
+ import { defineComponent as P, computed as T, ref as F, watch as H, createVNode as n, resolveComponent as c, createBlock as V, openBlock as d, unref as e, withCtx as p, createElementVNode as _, createElementBlock as k, createCommentVNode as y, Fragment as K, renderList as q, toDisplayString as U } from "vue";
2
+ import { u as J, G as Q, B as R, H as M } from "./menu-D_Cckz_p.js";
3
3
  import { useI18n as W, useCoreStore as X } from "@feedmepos/mf-common";
4
4
  import { useSnackbar as Y, components as Z, FmButtonVariant as ee, FmButtonColorThemeVariant as te } from "@feedmepos/ui-library";
5
- import { _ as M } from "./FormSection.vue_vue_type_script_setup_true_lang-CO4YGYLB.js";
6
- import { _ as le } from "./app-D23N7tJ0.js";
5
+ import { _ as A } from "./FormSection.vue_vue_type_script_setup_true_lang-CO4YGYLB.js";
6
+ import { _ as le } from "./app-CAhJXoa3.js";
7
7
  import { _ as ne } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
8
- import { C as b, a as m } from "./catalogSetting-D4iwoJLb.js";
9
- import { u as oe } from "./priceTier-3M5cxSYX.js";
8
+ import { C as b, a as m } from "./catalogSetting-BKP36lej.js";
9
+ import { u as oe } from "./priceTier-wLQ8p4bJ.js";
10
10
  const ae = {
11
11
  class: "py-16"
12
12
  }, se = {
@@ -25,13 +25,13 @@ const ae = {
25
25
  class: "fm-typo-en-title-md-600"
26
26
  }, de = {
27
27
  class: "text-fm-color-typo-secondary"
28
- }, ye = /* @__PURE__ */ G({
28
+ }, ye = /* @__PURE__ */ P({
29
29
  __name: "MenuSetting",
30
30
  setup(pe) {
31
31
  var h;
32
32
  const {
33
33
  t
34
- } = W(), v = J(), w = X(), N = Y(), B = Q(N), u = T(() => ({
34
+ } = W(), v = J(), w = X(), B = Y(), N = Q(B), u = T(() => ({
35
35
  lowStock: v.state.menu.lowStockThreshold,
36
36
  taxSetting: v.state.menu.masterCatalogSetting,
37
37
  priceTierSettings: v.state.menu.priceTierSettings
@@ -58,7 +58,7 @@ const ae = {
58
58
  });
59
59
  });
60
60
  function L(a) {
61
- const l = i.value, s = l.mode === m.AUTO ? b.manualTax(S.value) : A(l);
61
+ const l = i.value, s = l.mode === m.AUTO ? b.manualTax(S.value) : M(l);
62
62
  s.inclusive ?? (s.inclusive = []);
63
63
  const r = s.inclusive.findIndex((g) => g.systemCode === a.systemCode);
64
64
  r < 0 ? s.inclusive.push(a) : s.inclusive.splice(r, 1, a), i.value = s;
@@ -66,8 +66,8 @@ const ae = {
66
66
  async function O() {
67
67
  if (u.value.lowStock !== null && u.value.lowStock !== void 0 && !Number.isInteger(u.value.lowStock))
68
68
  return;
69
- const a = i.value.mode === m.AUTO ? null : A(i.value.inclusive);
70
- await B.minor(async () => {
69
+ const a = i.value.mode === m.AUTO ? null : M(i.value.inclusive);
70
+ await N.minor(async () => {
71
71
  const l = u.value.lowStock === null || u.value.lowStock === void 0 || u.value.lowStock === 0;
72
72
  await v.updateMenuSetting({
73
73
  masterCatalogSetting: {
@@ -97,7 +97,7 @@ const ae = {
97
97
  }, null)])
98
98
  }];
99
99
  return (a, l) => {
100
- const s = c("FmTabs"), r = c("fm-radio"), g = c("fm-radio-group"), D = c("fm-checkbox"), E = c("FormItem"), $ = c("FmStepperField"), C = c("FmButton"), j = c("FmTable");
100
+ const s = c("FmTabs"), r = c("fm-radio"), g = c("fm-radio-group"), E = c("fm-checkbox"), $ = c("FormItem"), j = c("FmStepperField"), C = c("FmButton"), D = c("FmTable");
101
101
  return d(), V(ne, {
102
102
  heading: e(t)("menu.menu_setting.title")
103
103
  }, {
@@ -105,10 +105,10 @@ const ae = {
105
105
  items: I.value,
106
106
  modelValue: x.value,
107
107
  "onUpdate:modelValue": l[0] || (l[0] = (o) => x.value = o)
108
- }, null, 8, ["items", "modelValue"]), _("div", ae, [x.value === "conf" ? (d(), k("div", se, [n(M, {
108
+ }, null, 8, ["items", "modelValue"]), _("div", ae, [x.value === "conf" ? (d(), k("div", se, [n(A, {
109
109
  title: "Tax setting"
110
110
  }, {
111
- default: p(() => [n(E, {
111
+ default: p(() => [n($, {
112
112
  label: e(t)("menu.setting.tax.title")
113
113
  }, {
114
114
  default: p(() => [n(g, {
@@ -127,26 +127,26 @@ const ae = {
127
127
  sublabel: e(t)("menu.setting.tax.modes.manual.sublabel")
128
128
  }, null, 8, ["value", "label", "sublabel"])]),
129
129
  _: 1
130
- }, 8, ["model-value"]), i.value.mode === e(m).MANUAL ? (d(), k("div", ue, [(d(!0), k(K, null, q(S.value, (o) => (d(), V(D, {
130
+ }, 8, ["model-value"]), i.value.mode === e(m).MANUAL ? (d(), k("div", ue, [(d(!0), k(K, null, q(S.value, (o) => (d(), V(E, {
131
131
  key: o.systemCode,
132
132
  "model-value": o.inclusive,
133
133
  value: !0,
134
134
  label: o.systemCode + " inclusive",
135
- "onUpdate:modelValue": (P) => {
135
+ "onUpdate:modelValue": (G) => {
136
136
  L({
137
137
  ...o,
138
- inclusive: P
138
+ inclusive: G
139
139
  });
140
140
  }
141
141
  }, null, 8, ["model-value", "label", "onUpdate:modelValue"]))), 128))])) : y("", !0)]),
142
142
  _: 1
143
143
  }, 8, ["label"])]),
144
144
  _: 1
145
- }), n(M, {
145
+ }), n(A, {
146
146
  title: e(t)("menu.menu_setting.fields.low_stock.title"),
147
147
  "sub-title": e(t)("menu.menu_setting.fields.low_stock.subtitle")
148
148
  }, {
149
- default: p(() => [n($, {
149
+ default: p(() => [n(j, {
150
150
  "model-value": u.value.lowStock || null,
151
151
  min: 0,
152
152
  max: 1e3,
@@ -167,7 +167,7 @@ const ae = {
167
167
  icon: "add",
168
168
  onClick: e(f).create
169
169
  }, null, 8, ["label", "onClick"])]), n(le, null, {
170
- default: p(() => [n(j, {
170
+ default: p(() => [n(D, {
171
171
  "column-defs": z,
172
172
  "row-data": e(f).priceTiers.value,
173
173
  "page-size": e(f).priceTiers.value.length,
@@ -1,15 +1,15 @@
1
- import { defineComponent as H, ref as k, computed as f, resolveComponent as g, createBlock as P, openBlock as p, unref as l, withCtx as m, createElementVNode as i, createVNode as c, createCommentVNode as J, toDisplayString as S, createElementBlock as L, Fragment as A, renderList as R, h as _, withModifiers as q } from "vue";
1
+ import { defineComponent as H, ref as T, computed as f, resolveComponent as g, createBlock as P, openBlock as p, unref as l, withCtx as m, createElementVNode as i, createVNode as c, createCommentVNode as J, toDisplayString as S, createElementBlock as L, Fragment as A, renderList as B, h as _, withModifiers as q } from "vue";
2
2
  import { useI18n as Q } from "@feedmepos/mf-common";
3
- import { components as W, useSnackbar as ee, useDialog as te } from "@feedmepos/ui-library";
4
- import { _ as oe } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
5
- import { _ as ne } from "./app-D23N7tJ0.js";
6
- import { H as j, I as ae, J as B, G as V, u as le, O as re, D as se } from "./menu-DcGo3sn5.js";
7
- import { u as ie } from "./discardConfirm-BHni0LNu.js";
8
- import { L as ue } from "./LinkProductSideSheet-CEClo07H.js";
3
+ import { components as W, useSnackbar as te, useDialog as oe } from "@feedmepos/ui-library";
4
+ import { _ as ne } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
5
+ import { _ as ae } from "./app-CAhJXoa3.js";
6
+ import { H as j, I as le, J as Y, A as C, u as re, O as se, G as ie } from "./menu-D_Cckz_p.js";
9
7
  import { _ as G } from "./FormSection.vue_vue_type_script_setup_true_lang-CO4YGYLB.js";
10
- import { _ as de } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
11
- import { _ as ce } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
12
- const me = { class: "fm-typo-en-title-md-600" }, pe = { class: "space-y-32" }, _e = { class: "space-y-16" }, fe = { class: "flex items-center gap-8" }, ve = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ye = { class: "flex-1" }, ge = { class: "grow overflow-y-auto" }, he = { class: "text-fm-color-typo-secondary bg-fm-color-neutral-gray-100 px-16 py-8 border-b border-b-fm-color-neutral-gray-200" }, be = { class: "flex items-center border-b border-b-fm-color-neutral-gray-100" }, xe = { class: "px-16 py-8 flex-1" }, ke = { class: "py-8" }, Fe = { class: "flex gap-8 items-center justify-start" }, Ie = /* @__PURE__ */ H({
8
+ import { u as ue } from "./discardConfirm-BHni0LNu.js";
9
+ import { L as de } from "./LinkProductSideSheet-32r2l60j.js";
10
+ import { _ as ce } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
11
+ import { _ as me } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
12
+ const pe = { class: "fm-typo-en-title-md-600" }, _e = { class: "space-y-32" }, fe = { class: "space-y-16" }, ve = { class: "flex items-center gap-8" }, ye = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ge = { class: "flex-1" }, he = { class: "grow overflow-y-auto" }, be = { class: "text-fm-color-typo-secondary bg-fm-color-neutral-gray-100 px-16 py-8 border-b border-b-fm-color-neutral-gray-200" }, xe = { class: "px-16 py-8 flex-1" }, ke = { class: "py-8" }, Fe = { class: "flex gap-8 items-center justify-start" }, Ie = /* @__PURE__ */ H({
13
13
  __name: "PrintDepartmentDialog",
14
14
  props: {
15
15
  categorizedItems: {
@@ -25,8 +25,8 @@ const me = { class: "fm-typo-en-title-md-600" }, pe = { class: "space-y-32" }, _
25
25
  setup(v, { expose: t, emit: h }) {
26
26
  const N = v;
27
27
  t({
28
- showModal: U,
29
- hideModal: w
28
+ showModal: z,
29
+ hideModal: V
30
30
  });
31
31
  function b() {
32
32
  return {
@@ -35,15 +35,15 @@ const me = { class: "fm-typo-en-title-md-600" }, pe = { class: "space-y-32" }, _
35
35
  applyToItems: []
36
36
  };
37
37
  }
38
- const x = k(!1), M = k(void 0);
39
- function U(r) {
38
+ const x = T(!1), M = T(void 0);
39
+ function z(r) {
40
40
  M.value = r ? j(r) : b(), n.value = j(M.value), x.value = !0;
41
41
  }
42
- function w() {
42
+ function V() {
43
43
  x.value = !1;
44
44
  }
45
- const n = k(b());
46
- function F(r) {
45
+ const n = T(b());
46
+ function k({ items: r }) {
47
47
  n.value = {
48
48
  ...n.value,
49
49
  applyToItems: r.map((a) => a._id)
@@ -55,31 +55,27 @@ const me = { class: "fm-typo-en-title-md-600" }, pe = { class: "space-y-32" }, _
55
55
  applyToItems: n.value.applyToItems.filter((a) => a !== r)
56
56
  };
57
57
  }
58
- const { t: u } = Q(), O = f(() => n.value._id ? u("menu.print_route.department_dialog.update.title") : u("menu.print_route.department_dialog.add.title")), I = f(() => n.value._id ? u("menu.print_route.department_dialog.update.action") : u("menu.print_route.department_dialog.add.action")), D = f(() => n.value.applyToItems.length), K = f(
58
+ const { t: u } = Q(), O = f(() => n.value._id ? u("menu.print_route.department_dialog.update.title") : u("menu.print_route.department_dialog.add.title")), F = f(() => n.value._id ? u("menu.print_route.department_dialog.update.action") : u("menu.print_route.department_dialog.add.action")), U = f(() => n.value.applyToItems.length), K = f(
59
59
  () => n.value.applyToItems.reduce((r, a) => (r[a] = [], r), {})
60
- ), e = k(""), o = f(() => {
60
+ ), e = T(""), o = f(() => {
61
61
  const r = e.value.toLowerCase();
62
62
  return N.categorizedItems.reduce((a, d) => {
63
- const z = d.items.filter(
64
- (C) => (!r || C.name.toLowerCase().includes(r)) && !!K.value[C._id]
63
+ const D = d.items.filter(
64
+ (I) => (!r || I.name.toLowerCase().includes(r)) && !!K.value[I._id]
65
65
  );
66
- return z.length && a.push({ ...d, items: z }), a;
66
+ return D.length && a.push({ ...d, items: D }), a;
67
67
  }, []);
68
- });
69
- k();
70
- const y = h;
71
- k();
72
- const E = ie(
73
- () => !ae.isEqual(M.value, n.value),
68
+ }), y = h, w = ue(
69
+ () => !le.isEqual(M.value, n.value),
74
70
  () => {
75
71
  x.value = !1;
76
72
  }
77
73
  );
78
- function T() {
79
- w(), y("onSave", n.value);
74
+ function E() {
75
+ V(), y("onSave", n.value);
80
76
  }
81
77
  return (r, a) => {
82
- const d = g("FmTextField"), z = g("FmSpacer"), C = g("FmButton"), X = g("FmSearch"), Z = g("FmSideSheet");
78
+ const d = g("FmTextField"), D = g("FmSpacer"), I = g("FmButton"), X = g("FmSearch"), Z = g("FmSideSheet");
83
79
  return p(), P(Z, {
84
80
  modelValue: x.value,
85
81
  "onUpdate:modelValue": a[3] || (a[3] = (s) => x.value = s),
@@ -87,33 +83,33 @@ const me = { class: "fm-typo-en-title-md-600" }, pe = { class: "space-y-32" }, _
87
83
  "max-width": 560,
88
84
  "is-container": l(W).FmForm,
89
85
  "is-container-props": {
90
- onValidationSuccess: T,
86
+ onValidationSuccess: E,
91
87
  blameFormChildOnValidationFailed: !0,
92
88
  class: "flex flex-col h-full"
93
89
  },
94
- "onOn:clickedAway": l(E)
90
+ "onOn:clickedAway": l(w)
95
91
  }, {
96
92
  "side-sheet-header": m(() => [
97
- i("span", me, S(O.value), 1)
93
+ i("span", pe, S(O.value), 1)
98
94
  ]),
99
95
  "side-sheet-footer": m(() => [
100
96
  i("div", Fe, [
101
- c(C, {
102
- label: I.value,
97
+ c(I, {
98
+ label: F.value,
103
99
  size: "lg",
104
100
  variant: "primary",
105
101
  type: "submit"
106
102
  }, null, 8, ["label"]),
107
- c(C, {
103
+ c(I, {
108
104
  label: l(u)("menu.print_route.department_dialog.actions.cancel"),
109
105
  size: "lg",
110
106
  variant: "tertiary",
111
- onClick: w
107
+ onClick: V
112
108
  }, null, 8, ["label"])
113
109
  ])
114
110
  ]),
115
111
  default: m(() => [
116
- i("div", pe, [
112
+ i("div", _e, [
117
113
  c(G, {
118
114
  title: l(u)("menu.print_route.department_dialog.sections.route_detail.title")
119
115
  }, {
@@ -136,16 +132,16 @@ const me = { class: "fm-typo-en-title-md-600" }, pe = { class: "space-y-32" }, _
136
132
  title: l(u)("menu.print_route.department_dialog.sections.link_product.title")
137
133
  }, {
138
134
  "append-title": m(() => [
139
- c(z),
140
- c(ue, {
135
+ c(D),
136
+ c(de, {
141
137
  "categorized-items": v.categorizedItems,
142
138
  "initial-value": n.value.applyToItems.map((s) => ({
143
139
  _id: s
144
140
  })),
145
- onSubmit: a[1] || (a[1] = (s) => F(s))
141
+ onSubmit: a[1] || (a[1] = (s) => k(s))
146
142
  }, {
147
143
  default: m(({ trigger: s }) => [
148
- c(C, {
144
+ c(I, {
149
145
  icon: "link",
150
146
  label: l(u)("menu.scheduler.dialog.sections.products.link"),
151
147
  variant: "secondary",
@@ -158,12 +154,12 @@ const me = { class: "fm-typo-en-title-md-600" }, pe = { class: "space-y-32" }, _
158
154
  }, 8, ["categorized-items", "initial-value"])
159
155
  ]),
160
156
  default: m(() => [
161
- i("div", _e, [
162
- i("div", fe, [
163
- i("div", ve, S(l(u)("menu.print_route.department_dialog.sections.link_product.products_linked", {
164
- count: D.value
157
+ i("div", fe, [
158
+ i("div", ve, [
159
+ i("div", ye, S(l(u)("menu.print_route.department_dialog.sections.link_product.products_linked", {
160
+ count: U.value
165
161
  })), 1),
166
- i("div", ye, [
162
+ i("div", ge, [
167
163
  c(X, {
168
164
  modelValue: e.value,
169
165
  "onUpdate:modelValue": a[2] || (a[2] = (s) => e.value = s),
@@ -171,21 +167,26 @@ const me = { class: "fm-typo-en-title-md-600" }, pe = { class: "space-y-32" }, _
171
167
  }, null, 8, ["modelValue", "placeholder"])
172
168
  ])
173
169
  ]),
174
- i("div", ge, [
175
- (p(!0), L(A, null, R(o.value, (s) => (p(), L("div", null, [
176
- i("div", he, S(s.name), 1),
177
- (p(!0), L(A, null, R(s.items, (Y) => (p(), L("div", be, [
178
- i("div", xe, S(Y.name), 1),
170
+ i("div", he, [
171
+ (p(!0), L(A, null, B(o.value, (s, ee) => (p(), L("div", {
172
+ key: s.id || ee
173
+ }, [
174
+ i("div", be, S(s.name), 1),
175
+ (p(!0), L(A, null, B(s.items, (R) => (p(), L("div", {
176
+ key: R._id,
177
+ class: "flex items-center border-b border-b-fm-color-neutral-gray-100"
178
+ }, [
179
+ i("div", xe, S(R.name), 1),
179
180
  i("div", ke, [
180
- c(C, {
181
+ c(I, {
181
182
  icon: "delete",
182
183
  variant: "tertiary",
183
184
  "text-color": "neutral-gray-400",
184
- onClick: () => $(Y._id)
185
+ onClick: () => $(R._id)
185
186
  }, null, 8, ["onClick"])
186
187
  ])
187
- ]))), 256))
188
- ]))), 256))
188
+ ]))), 128))
189
+ ]))), 128))
189
190
  ])
190
191
  ])
191
192
  ]),
@@ -200,30 +201,30 @@ const me = { class: "fm-typo-en-title-md-600" }, pe = { class: "space-y-32" }, _
200
201
  });
201
202
  function Ce(v, t) {
202
203
  return {
203
- module: V.F_MENU_MODULE_V4_KEY.enum.printDepartment,
204
- operation: B.F_OPERATION_TYPE.create,
205
- data: V.FdoMenuPrintDepartment.parse(v),
204
+ module: C.F_MENU_MODULE_V4_KEY.enum.printDepartment,
205
+ operation: Y.F_OPERATION_TYPE.create,
206
+ data: C.FdoMenuPrintDepartment.parse(v),
206
207
  link: t.map((h) => ({
207
- module: V.F_MENU_MODULE_V4_KEY.enum.item,
208
+ module: C.F_MENU_MODULE_V4_KEY.enum.item,
208
209
  id: h
209
210
  }))
210
211
  };
211
212
  }
212
213
  function Ve(v, t) {
213
214
  return {
214
- module: V.F_MENU_MODULE_V4_KEY.enum.printDepartment,
215
- operation: B.F_OPERATION_TYPE.update,
216
- data: V.FdoMenuPrintDepartment.parse(v),
215
+ module: C.F_MENU_MODULE_V4_KEY.enum.printDepartment,
216
+ operation: Y.F_OPERATION_TYPE.update,
217
+ data: C.FdoMenuPrintDepartment.parse(v),
217
218
  link: t.map((h) => ({
218
- module: V.F_MENU_MODULE_V4_KEY.enum.item,
219
+ module: C.F_MENU_MODULE_V4_KEY.enum.item,
219
220
  id: h
220
221
  }))
221
222
  };
222
223
  }
223
224
  function we(v) {
224
225
  return {
225
- module: V.F_MENU_MODULE_V4_KEY.enum.printDepartment,
226
- operation: B.F_OPERATION_TYPE.delete,
226
+ module: C.F_MENU_MODULE_V4_KEY.enum.printDepartment,
227
+ operation: Y.F_OPERATION_TYPE.delete,
227
228
  data: v._id
228
229
  };
229
230
  }
@@ -242,13 +243,13 @@ const Ee = {
242
243
  setup(v) {
243
244
  const {
244
245
  t
245
- } = Q(), h = le(), N = f(() => h.categorizedItems), b = f(() => {
246
+ } = Q(), h = re(), N = f(() => h.categorizedItems), b = f(() => {
246
247
  const e = h.state.menu.modules.item;
247
248
  return h.printDepartments.map((y) => ({
248
249
  ...y,
249
- applyToItems: e.reduce((E, T) => {
250
+ applyToItems: e.reduce((w, E) => {
250
251
  var r;
251
- return (r = T.print) != null && r.department.includes(y._id) && E.push(T), E;
252
+ return (r = E.print) != null && r.department.includes(y._id) && w.push(E), w;
252
253
  }, [])
253
254
  }), []);
254
255
  }), x = f(() => b.value.length > 0), M = f(() => [{
@@ -286,25 +287,25 @@ const Ee = {
286
287
  }, ["stop", "prevent"])
287
288
  })])
288
289
  }]);
289
- function U() {
290
+ function z() {
290
291
  var e;
291
- F.value || (e = D.value) == null || e.showModal();
292
+ k.value || (e = U.value) == null || e.showModal();
292
293
  }
293
- function w(e) {
294
+ function V(e) {
294
295
  var o;
295
- F.value || (o = D.value) == null || o.showModal({
296
+ k.value || (o = U.value) == null || o.showModal({
296
297
  ...e,
297
298
  applyToItems: e.applyToItems.map(({
298
299
  _id: y
299
300
  }) => y)
300
301
  });
301
302
  }
302
- const n = re(se(ee())), F = f(() => n.checkMenuIsLoading());
303
+ const n = se(ie(te())), k = f(() => n.checkMenuIsLoading());
303
304
  async function $(e) {
304
305
  const o = e._id ? Ve(e, e.applyToItems) : Ce(e, e.applyToItems);
305
306
  await n.updateMenu(o, e.name);
306
307
  }
307
- const u = te();
308
+ const u = oe();
308
309
  function O(e) {
309
310
  let o = [_("span", t("menu.print_route.dialogs.remove.message.prefix")), _("span", {
310
311
  class: "fm-typo-en-body-lg-600"
@@ -331,63 +332,63 @@ const Ee = {
331
332
  await n.updateMenu(we(e), e.name, !0);
332
333
  });
333
334
  }
334
- const I = k(""), D = k(), K = f(() => {
335
- if (!I.value) return b.value;
336
- const e = I.value.toLowerCase();
335
+ const F = T(""), U = T(), K = f(() => {
336
+ if (!F.value) return b.value;
337
+ const e = F.value.toLowerCase();
337
338
  return b.value.filter((o) => o.name.toLowerCase().includes(e));
338
339
  });
339
340
  return (e, o) => {
340
- const y = g("FmSearch"), E = g("FmTable"), T = g("FmButton"), r = g("FmListItem"), a = g("FmList");
341
- return p(), P(ce, {
341
+ const y = g("FmSearch"), w = g("FmTable"), E = g("FmButton"), r = g("FmListItem"), a = g("FmList");
342
+ return p(), P(me, {
342
343
  heading: l(t)("menu.print_route.title")
343
344
  }, {
344
- "append-heading": m(() => [i("div", Ee, [x.value ? (p(), P(oe, {
345
+ "append-heading": m(() => [i("div", Ee, [x.value ? (p(), P(ne, {
345
346
  key: 0,
346
- disabled: F.value,
347
+ disabled: k.value,
347
348
  icon: "add",
348
349
  label: l(t)("menu.print_route.actions.add"),
349
350
  variant: "primary",
350
- onClick: U
351
+ onClick: z
351
352
  }, null, 8, ["disabled", "label"])) : J("", !0)])]),
352
353
  default: m(() => [x.value ? (p(), L(A, {
353
354
  key: 1
354
355
  }, [i("div", Te, [c(y, {
355
356
  autofocus: "",
356
- modelValue: I.value,
357
- "onUpdate:modelValue": o[0] || (o[0] = (d) => I.value = d),
357
+ modelValue: F.value,
358
+ "onUpdate:modelValue": o[0] || (o[0] = (d) => F.value = d),
358
359
  class: "my-8 w-[320px] xs:w-full xs:px-16",
359
360
  placeholder: l(t)("menu.print_route.table.search.placeholder")
360
- }, null, 8, ["modelValue", "placeholder"])]), c(ne, {
361
+ }, null, 8, ["modelValue", "placeholder"])]), c(ae, {
361
362
  class: "xs:hidden block"
362
363
  }, {
363
- default: m(() => [c(E, {
364
+ default: m(() => [c(w, {
364
365
  "column-defs": M.value,
365
- loading: F.value,
366
+ loading: k.value,
366
367
  "page-size": b.value.length,
367
368
  "row-data": b.value,
368
- "search-value": I.value,
369
+ "search-value": F.value,
369
370
  shrinkAt: !1,
370
371
  "hide-footer": "",
371
372
  "pin-header-row": "",
372
- onRowClick: o[1] || (o[1] = (d) => w(d.original))
373
+ onRowClick: o[1] || (o[1] = (d) => V(d.original))
373
374
  }, null, 8, ["column-defs", "loading", "page-size", "row-data", "search-value"])]),
374
375
  _: 1
375
376
  }), c(a, {
376
377
  class: "w-full px-16 xs:block hidden flex-1 min-h-0 overflow-scroll pb-64",
377
378
  separator: ""
378
379
  }, {
379
- default: m(() => [(p(!0), L(A, null, R(K.value, (d) => (p(), P(r, {
380
+ default: m(() => [(p(!0), L(A, null, B(K.value, (d) => (p(), P(r, {
380
381
  key: d._id,
381
382
  label: d.name,
382
383
  style: {
383
384
  padding: "12px 0 !important"
384
385
  },
385
- onClick: () => w(d)
386
+ onClick: () => V(d)
386
387
  }, {
387
388
  default: m(() => [i("div", Pe, [i("div", Se, S(d.name), 1), i("div", Le, S(l(t)("menu.print_route.table.mobile.products_linked", {
388
389
  count: d.applyToItems.length
389
- })), 1)]), c(T, {
390
- disabled: F.value,
390
+ })), 1)]), c(E, {
391
+ disabled: k.value,
391
392
  icon: "delete",
392
393
  variant: "tertiary",
393
394
  "text-color": "neutral-gray-400",
@@ -396,17 +397,17 @@ const Ee = {
396
397
  _: 2
397
398
  }, 1032, ["label", "onClick"]))), 128))]),
398
399
  _: 1
399
- })], 64)) : (p(), P(l(de), {
400
+ })], 64)) : (p(), P(l(ce), {
400
401
  key: 0,
401
402
  action: {
402
403
  text: l(t)("menu.print_route.empty.action"),
403
- callback: U
404
+ callback: z
404
405
  },
405
406
  subtitle: l(t)("menu.print_route.empty.subtitle"),
406
407
  title: l(t)("menu.print_route.empty.title")
407
408
  }, null, 8, ["action", "subtitle", "title"])), c(Ie, {
408
409
  ref_key: "printDepartmentRef",
409
- ref: D,
410
+ ref: U,
410
411
  "categorized-items": N.value,
411
412
  onOnSave: $
412
413
  }, null, 8, ["categorized-items"])]),
@@ -1,4 +1,4 @@
1
- import { a as f } from "./Product.vue_vue_type_script_setup_true_lang-fjFGg49e.js";
1
+ import { a as f } from "./Product.vue_vue_type_script_setup_true_lang-DcMr8wkh.js";
2
2
  export {
3
3
  f as default
4
4
  };