@feedmepos/mf-menu 0.32.74-dev.1 → 0.32.74-dev.2

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 (75) hide show
  1. package/dist/{App-CQlnJm8d.js → App-BZJOUASB.js} +14 -8
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-C-hyPy4I.js → ApplyProduct.vue_vue_type_script_setup_true_lang-DzjeYfsJ.js} +3 -3
  3. package/dist/{ApplyProductDialog.vue_vue_type_script_setup_true_lang-LJt8hPTI.js → ApplyProductDialog.vue_vue_type_script_setup_true_lang-eor0uw1Y.js} +3 -3
  4. package/dist/{Catalog-Cxg0R0CD.js → Catalog-D0umhJUp.js} +6 -6
  5. package/dist/{Category-D7_CG1CC.js → Category-Bv5dZoqU.js} +4 -4
  6. package/dist/{Category-98B4V0OI.js → Category-CJmrsNBN.js} +4 -4
  7. package/dist/{CookingGuide-BiWZRQbV.js → CookingGuide-Bh5p7H6A.js} +379 -355
  8. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-Cqx5-2Dd.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-BTHIfVPy.js} +1 -1
  9. package/dist/{Group-BlNGsFml.js → Group-C8Q1IzVZ.js} +3 -3
  10. package/dist/{Group-BvVoGWbB.js → Group-CmFBND8g.js} +1 -1
  11. package/dist/{Group.vue_vue_type_script_setup_true_lang-DhEpy0CJ.js → Group.vue_vue_type_script_setup_true_lang-B7GbWmBQ.js} +7 -7
  12. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-myAdxHAx.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D2UVK2TK.js} +5 -5
  13. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-CalnjNRi.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-B9ZqKykt.js} +7 -7
  14. package/dist/{Ingredient-C4uC1qTF.js → Ingredient-BpmjZsq4.js} +4 -4
  15. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-gjv6yZ63.js → InventoryBinding.vue_vue_type_script_setup_true_lang-BurM3XXk.js} +2 -2
  16. package/dist/{LinkProductSideSheet-C8Kj6Jyt.js → LinkProductSideSheet-B-t5u8nb.js} +4 -4
  17. package/dist/{MenuSetting-CAPi6Izt.js → MenuSetting-Db2aNWHK.js} +7 -7
  18. package/dist/{OrderPacing--zgGLCUl.js → OrderPacing-DU2DHxAo.js} +5 -5
  19. package/dist/{PrintRoute-C8Tg1K1B.js → PrintRoute-DS8Lx8Ri.js} +5 -5
  20. package/dist/{Product-CEURFcln.js → Product-CksOjTKQ.js} +1 -1
  21. package/dist/{Product.vue_vue_type_script_setup_true_lang-HgjS8yfr.js → Product.vue_vue_type_script_setup_true_lang-70WBdgsM.js} +14 -14
  22. package/dist/{ProductInternalTools-CqSTTmyx.js → ProductInternalTools-DswBFeOb.js} +6 -6
  23. package/dist/{Products-CQYNalBC.js → Products-CD5n0Ltb.js} +39 -39
  24. package/dist/{Publish-CpVIPPEM.js → Publish-CFAsGvpA.js} +219 -218
  25. package/dist/{Recipe-V-S3rBvy.js → Recipe-CZR9PxpD.js} +5 -5
  26. package/dist/{RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-Dt0VFU0y.js → RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-ButQyFDb.js} +1 -1
  27. package/dist/{RuleView.vue_vue_type_script_setup_true_lang-22NsN8mu.js → RuleView.vue_vue_type_script_setup_true_lang-DvX2UUYM.js} +211 -211
  28. package/dist/{Scheduler-D0ZqvQ4s.js → Scheduler-BGWwvr3d.js} +3 -3
  29. package/dist/{ServingSequence-D9C5TjFW.js → ServingSequence-CoLqEMgr.js} +3 -3
  30. package/dist/{Setting-D9uwzTvD.js → Setting-BDuqIiz2.js} +5 -5
  31. package/dist/{Subcategory-_22wHoRp.js → Subcategory-CKuQ2pml.js} +6 -6
  32. package/dist/{Takeaway-wfO-wSGr.js → Takeaway-DUn4mRZx.js} +1 -1
  33. package/dist/{Takeaway-DpKf0dsW.js → Takeaway-Dt7S6z9Y.js} +4 -4
  34. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-BKtMSeUC.js → Takeaway.vue_vue_type_script_setup_true_lang-BVJlUn1u.js} +5 -5
  35. package/dist/{TranslationFieldSection.vue_vue_type_script_setup_true_lang-U5JPHpID.js → TranslationFieldSection.vue_vue_type_script_setup_true_lang-r8nutWvj.js} +1 -1
  36. package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-DYONF0J1.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-CF6FVQdM.js} +2 -2
  37. package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BsGSRfgw.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BH5-P0Kt.js} +15 -15
  38. package/dist/{Unit-D9gfltw8.js → Unit-sZHi2Guy.js} +2 -2
  39. package/dist/{Variant-Bhd-SCn-.js → Variant-vmPBmjkL.js} +3 -3
  40. package/dist/{_id_-CujuaivS.js → _id_-G5xT-CDM.js} +10 -10
  41. package/dist/{app-CoNjmiQZ.js → app-BCiY6nMZ.js} +37 -37
  42. package/dist/{app-B6R97xu0.js → app-CQQONQx1.js} +1 -1
  43. package/dist/app.js +1 -1
  44. package/dist/apps/mf-menu/src/app.d.ts +15 -0
  45. package/dist/apps/mf-menu/src/helper/publishMeta.d.ts +6 -0
  46. package/dist/apps/mf-menu/src/manager/cooking_guide.d.ts +1 -0
  47. package/dist/apps/mf-menu/src/views/CookingGuide/CookingGuideDialog.vue.d.ts +8 -0
  48. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  49. package/dist/assets/{override-menu-DA-3_JUT.js → linked-status-CWeGw11g.js} +4 -4
  50. package/dist/assets/{menu-export-DxJDiXRy.js → menu-export-RVHhfZC0.js} +4 -4
  51. package/dist/assets/{linked-status-Dc3gO2HQ.js → override-menu-CmqY9Tc2.js} +4 -4
  52. package/dist/assets/{validate-menu-CKGM50-c.js → validate-menu-C_e-tlnW.js} +3 -3
  53. package/dist/{catalog-BrBzi08u.js → catalog-Dn80bXkC.js} +1 -1
  54. package/dist/{catalogSetting-D98TJXis.js → catalogSetting-XIo6mkWP.js} +1 -1
  55. package/dist/{currency-_TMjPxjp.js → currency-BgSIYyGK.js} +1 -1
  56. package/dist/{dayjs.min-DcRBfAVF.js → dayjs.min-ByUWJqU9.js} +2 -2
  57. package/dist/{discardConfirm-BAt6f7Sp.js → discardConfirm-DoHu8ey7.js} +1 -1
  58. package/dist/{index-8ewnoIGG.js → index-B3VNODTK.js} +5 -5
  59. package/dist/{index-BSA0nxGD.js → index-C7BxlGX6.js} +1 -1
  60. package/dist/{index-B24fO6WH.js → index-MADgW2jB.js} +6 -6
  61. package/dist/{index.vue_vue_type_script_setup_true_lang-46y6YBq_.js → index.vue_vue_type_script_setup_true_lang-DAAzVaVe.js} +439 -439
  62. package/dist/{item-CxEy3ZPG.js → item-BrzBNpuQ.js} +19 -19
  63. package/dist/{jszip.min-CEGB8m6H.js → jszip.min-Cy3k9Boh.js} +3 -3
  64. package/dist/{linkProducts-OId1UtJl.js → linkProducts-EknVvUC0.js} +4 -4
  65. package/dist/{memberPricing-Do-xGYT8.js → memberPricing-CDcaR7Xz.js} +1 -1
  66. package/dist/{menu-IbXlP_Qz.js → menu-CIN8mtZY.js} +1 -1
  67. package/dist/{menuV2-DzbiKMo1.js → menuV2-iONFEnvV.js} +41 -41
  68. package/dist/{order_pacing-zD2uNjRk.js → order_pacing-C-cVrKAt.js} +5 -5
  69. package/dist/{priceTier-PDKu3MmF.js → priceTier-Nhz0AAh5.js} +1 -1
  70. package/dist/publishMeta-CAbjnmmS.js +7 -0
  71. package/dist/{rules-BipalTU1.js → rules-CwKc3N3r.js} +3 -3
  72. package/dist/{scheduler-BzHaaiZi.js → scheduler-DvQ0P3PV.js} +5 -5
  73. package/dist/{toExcel-B6kYroYI.js → toExcel-4gZ8GSKd.js} +2 -2
  74. package/dist/{unit-CJal-c2M.js → unit-CmIuFFl0.js} +3 -3
  75. package/package.json +1 -1
@@ -1,24 +1,24 @@
1
- import { defineComponent as ae, ref as F, computed as V, resolveComponent as x, createBlock as U, openBlock as g, unref as n, withCtx as p, createElementVNode as a, createVNode as l, createElementBlock as K, toDisplayString as S, Fragment as M, renderList as X, withModifiers as ie, createCommentVNode as ce, createTextVNode as be, h as A } from "vue";
1
+ import { defineComponent as ae, ref as F, computed as V, resolveComponent as x, createBlock as U, openBlock as _, unref as t, withCtx as g, createElementVNode as a, createVNode as l, createElementBlock as L, toDisplayString as S, Fragment as A, renderList as X, withModifiers as ie, createCommentVNode as ce, createTextVNode as ke, h as q } from "vue";
2
2
  import { useI18n as le } from "@feedmepos/mf-common";
3
- import { components as ue, useBreakpoints as ye, useSnackbar as ke, useDialog as he } from "@feedmepos/ui-library";
4
- import { _ as xe } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
5
- import { _ as Ce } from "./app-CoNjmiQZ.js";
6
- import { d as ee, g as de, h as re, H as me, u as we, i as Ve, b as Fe, _ as Se } from "./index.vue_vue_type_script_setup_true_lang-46y6YBq_.js";
7
- import { u as pe, l as ge } from "./discardConfirm-BAt6f7Sp.js";
3
+ import { components as de, useSnackbar as me, useBreakpoints as he, useDialog as xe } from "@feedmepos/ui-library";
4
+ import { _ as Ce } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
5
+ import { _ as we } from "./app-BCiY6nMZ.js";
6
+ import { d as ee, g as ue, h as re, H as pe, u as Ve, i as Fe, b as Se, _ as Ie } from "./index.vue_vue_type_script_setup_true_lang-DAAzVaVe.js";
7
+ import { u as ge, l as _e } from "./discardConfirm-DoHu8ey7.js";
8
8
  import { d as $e } from "./RuleConditionSelector.vue_vue_type_style_index_0_lang-CK8z7qA8.js";
9
- import { _ as Z } from "./RuleView.vue_vue_type_script_setup_true_lang-22NsN8mu.js";
10
- import { L as Ie } from "./LinkProductSideSheet-C8Kj6Jyt.js";
11
- import { _ as Oe } from "./PageLayout.vue_vue_type_script_setup_true_lang-BVmHMvKD.js";
12
- const Ke = { class: "flex items-center gap-8" }, Le = { class: "grow" }, Ne = { class: "space-y-32" }, Be = { class: "flex bg-fm-color-neutral-gray-100 border-b border-b-fm-color-neutral-gray-200" }, De = { class: "px-16 py-8 w-[40%]" }, Te = { class: "px-16 py-8 grow" }, Ge = { class: "px-16 py-8 w-[40%]" }, ze = { class: "px-16 py-8 grow" }, Ee = { class: "space-y-16" }, Ue = { class: "flex flex-wrap gap-8 overflow-hidden mb-8" }, Me = { class: "flex gap-8 items-center justify-start" }, Re = /* @__PURE__ */ ae({
9
+ import { _ as Z } from "./RuleView.vue_vue_type_script_setup_true_lang-DvX2UUYM.js";
10
+ import { L as Oe } from "./LinkProductSideSheet-B-t5u8nb.js";
11
+ import { _ as Ge } from "./PageLayout.vue_vue_type_script_setup_true_lang-BVmHMvKD.js";
12
+ const Ke = { class: "flex items-center gap-8" }, Le = { class: "grow" }, Ne = { class: "space-y-32" }, Be = { class: "flex bg-fm-color-neutral-gray-100 border-b border-b-fm-color-neutral-gray-200" }, De = { class: "px-16 py-8 w-[40%]" }, Te = { class: "px-16 py-8 grow" }, ze = { class: "px-16 py-8 w-[40%]" }, Ee = { class: "px-16 py-8 grow" }, Ue = { class: "space-y-16" }, Ae = { class: "flex flex-wrap gap-8 overflow-hidden mb-8" }, Me = { class: "flex gap-8 items-center justify-start" }, Re = /* @__PURE__ */ ae({
13
13
  __name: "CookingGuideStepDialog",
14
14
  emits: ["onComplete"],
15
- setup(T, { expose: _, emit: J }) {
16
- const { t: r } = le();
17
- _({
18
- show: s,
15
+ setup(N, { expose: p, emit: M }) {
16
+ const { t: s } = le();
17
+ p({
18
+ show: d,
19
19
  hide: O
20
20
  });
21
- const P = J;
21
+ const z = M;
22
22
  function D() {
23
23
  return {
24
24
  id: "",
@@ -27,32 +27,32 @@ const Ke = { class: "flex items-center gap-8" }, Le = { class: "grow" }, Ne = {
27
27
  };
28
28
  }
29
29
  const C = F(!1), R = F(!1), I = F(void 0);
30
- function s(v) {
30
+ function d(v) {
31
31
  R.value = !!v, I.value = v ? ee(v) : D(), c.value = ee(I.value), w.value = Object.entries(c.value.variables).map(
32
- ([t, f]) => ({ key: t, value: f })
32
+ ([n, y]) => ({ key: n, value: y })
33
33
  ), C.value = !0;
34
34
  }
35
35
  function O() {
36
36
  C.value = !1;
37
37
  }
38
38
  const c = F(D()), w = F([]);
39
- function q() {
39
+ function j() {
40
40
  w.value.push({ key: "", value: "" });
41
41
  }
42
- function Q(v) {
42
+ function J(v) {
43
43
  w.value.splice(v, 1);
44
44
  }
45
- function j(v) {
46
- const t = document.activeElement;
47
- if (t && t.tagName === "TEXTAREA") {
48
- const f = t.selectionStart, N = t.selectionEnd, G = c.value.instruction, $ = G.substring(0, f) + `{{${v}}}` + G.substring(N);
45
+ function Y(v) {
46
+ const n = document.activeElement;
47
+ if (n && n.tagName === "TEXTAREA") {
48
+ const y = n.selectionStart, G = n.selectionEnd, E = c.value.instruction, $ = E.substring(0, y) + `{{${v}}}` + E.substring(G);
49
49
  c.value = {
50
50
  ...c.value,
51
51
  instruction: $
52
52
  }, setTimeout(() => {
53
- t.focus();
54
- const Y = f + `{{${v}}}`.length;
55
- t.setSelectionRange(Y, Y);
53
+ n.focus();
54
+ const W = y + `{{${v}}}`.length;
55
+ n.setSelectionRange(W, W);
56
56
  }, 0);
57
57
  } else
58
58
  c.value = {
@@ -61,17 +61,17 @@ const Ke = { class: "flex items-center gap-8" }, Le = { class: "grow" }, Ne = {
61
61
  };
62
62
  }
63
63
  const k = V(() => w.value.reduce(
64
- (v, { key: t }) => (t && v.every((f) => f.label !== t) && v.push({
65
- label: t
64
+ (v, { key: n }) => (n && v.every((y) => y.label !== n) && v.push({
65
+ label: n
66
66
  }), v),
67
67
  []
68
- )), h = V(() => R.value ? r("menu.cooking_guide.step_dialog.update.title") : r("menu.cooking_guide.step_dialog.add.title")), L = V(() => R.value ? r("menu.cooking_guide.step_dialog.update.action") : r("menu.cooking_guide.step_dialog.add.action"));
68
+ )), h = V(() => R.value ? s("menu.cooking_guide.step_dialog.update.title") : s("menu.cooking_guide.step_dialog.add.title")), B = V(() => R.value ? s("menu.cooking_guide.step_dialog.update.action") : s("menu.cooking_guide.step_dialog.add.action"));
69
69
  F();
70
- const i = pe(
71
- () => !ge.isEqual(
70
+ const i = ge(
71
+ () => !_e.isEqual(
72
72
  {
73
73
  ...c.value,
74
- variables: w.value.reduce((v, { key: t, value: f }) => ({ ...v, [t]: f }), {})
74
+ variables: w.value.reduce((v, { key: n, value: y }) => ({ ...v, [n]: y }), {})
75
75
  },
76
76
  I.value
77
77
  ),
@@ -80,106 +80,106 @@ const Ke = { class: "flex items-center gap-8" }, Le = { class: "grow" }, Ne = {
80
80
  }
81
81
  );
82
82
  function u() {
83
- O(), P("onComplete", {
83
+ O(), z("onComplete", {
84
84
  ...c.value,
85
- variables: w.value.reduce((v, { key: t, value: f }) => ({ ...v, [t]: f }), {})
85
+ variables: w.value.reduce((v, { key: n, value: y }) => ({ ...v, [n]: y }), {})
86
86
  });
87
87
  }
88
- return (v, t) => {
89
- const f = x("FmButton"), N = x("FmTextField"), G = x("FmChip"), $ = x("FmTextarea"), Y = x("FmSideSheet");
90
- return g(), U(Y, {
88
+ return (v, n) => {
89
+ const y = x("FmButton"), G = x("FmTextField"), E = x("FmChip"), $ = x("FmTextarea"), W = x("FmSideSheet");
90
+ return _(), U(W, {
91
91
  modelValue: C.value,
92
- "onUpdate:modelValue": t[1] || (t[1] = (z) => C.value = z),
92
+ "onUpdate:modelValue": n[1] || (n[1] = (T) => C.value = T),
93
93
  closeButton: !1,
94
94
  header: h.value,
95
95
  "max-width": 560,
96
- "is-container": n(ue).FmForm,
96
+ "is-container": t(de).FmForm,
97
97
  "is-container-props": {
98
98
  onValidationSuccess: u,
99
99
  blameFormChildOnValidationFailed: !0,
100
100
  class: "flex flex-col h-full"
101
101
  },
102
- "onOn:clickedAway": n(i)
102
+ "onOn:clickedAway": t(i)
103
103
  }, {
104
- "side-sheet-header": p(() => [
104
+ "side-sheet-header": g(() => [
105
105
  a("div", Ke, [
106
- l(f, {
106
+ l(y, {
107
107
  icon: "arrow_back",
108
108
  variant: "tertiary",
109
- label: n(r)("menu.cooking_guide.step_dialog.actions.back"),
109
+ label: t(s)("menu.cooking_guide.step_dialog.actions.back"),
110
110
  onClick: O
111
111
  }, null, 8, ["label"]),
112
112
  a("div", Le, S(h.value), 1)
113
113
  ])
114
114
  ]),
115
- "side-sheet-footer": p(() => [
115
+ "side-sheet-footer": g(() => [
116
116
  a("div", Me, [
117
- l(f, {
118
- label: L.value,
117
+ l(y, {
118
+ label: B.value,
119
119
  size: "lg",
120
120
  variant: "primary",
121
121
  type: "submit"
122
122
  }, null, 8, ["label"]),
123
- l(f, {
124
- label: n(r)("menu.cooking_guide.step_dialog.actions.cancel"),
123
+ l(y, {
124
+ label: t(s)("menu.cooking_guide.step_dialog.actions.cancel"),
125
125
  size: "lg",
126
126
  variant: "tertiary",
127
127
  onClick: O
128
128
  }, null, 8, ["label"])
129
129
  ])
130
130
  ]),
131
- default: p(() => [
131
+ default: g(() => [
132
132
  a("div", Ne, [
133
133
  l(Z, {
134
- title: n(r)("menu.cooking_guide.step_dialog.sections.variables.title")
134
+ title: t(s)("menu.cooking_guide.step_dialog.sections.variables.title")
135
135
  }, {
136
- "append-title": p(() => [
137
- l(f, {
136
+ "append-title": g(() => [
137
+ l(y, {
138
138
  icon: "add",
139
- label: n(r)("menu.cooking_guide.step_dialog.sections.variables.add"),
139
+ label: t(s)("menu.cooking_guide.step_dialog.sections.variables.add"),
140
140
  variant: "secondary",
141
141
  "text-color": "primary",
142
142
  "border-color": "primary",
143
- onClick: q
143
+ onClick: j
144
144
  }, null, 8, ["label"])
145
145
  ]),
146
- default: p(() => [
146
+ default: g(() => [
147
147
  a("div", null, [
148
148
  a("div", Be, [
149
- a("div", De, S(n(r)("menu.cooking_guide.step_dialog.sections.variables.columns.key")), 1),
150
- a("div", Te, S(n(r)("menu.cooking_guide.step_dialog.sections.variables.columns.value")), 1)
149
+ a("div", De, S(t(s)("menu.cooking_guide.step_dialog.sections.variables.columns.key")), 1),
150
+ a("div", Te, S(t(s)("menu.cooking_guide.step_dialog.sections.variables.columns.value")), 1)
151
151
  ]),
152
- (g(!0), K(M, null, X(w.value, (z, E) => (g(), K("div", {
153
- key: E,
152
+ (_(!0), L(A, null, X(w.value, (T, P) => (_(), L("div", {
153
+ key: P,
154
154
  class: "flex items-center border-b border-b-fm-color-neutral-gray-100"
155
155
  }, [
156
- a("div", Ge, [
157
- l(N, {
158
- modelValue: w.value[E].key,
159
- "onUpdate:modelValue": (B) => w.value[E].key = B,
156
+ a("div", ze, [
157
+ l(G, {
158
+ modelValue: w.value[P].key,
159
+ "onUpdate:modelValue": (K) => w.value[P].key = K,
160
160
  rules: [
161
- (B) => !!B || n(r)("menu.cooking_guide.step_dialog.sections.variables.validation.required"),
162
- (B) => !B || /^[a-z]+$/.test(B) || n(r)("menu.cooking_guide.step_dialog.sections.variables.validation.lowercase"),
163
- (B) => !B || w.value.findIndex((se) => se.key === B) === E || n(r)("menu.cooking_guide.step_dialog.sections.variables.validation.duplicate")
161
+ (K) => !!K || t(s)("menu.cooking_guide.step_dialog.sections.variables.validation.required"),
162
+ (K) => !K || /^[a-z]+$/.test(K) || t(s)("menu.cooking_guide.step_dialog.sections.variables.validation.lowercase"),
163
+ (K) => !K || w.value.findIndex((se) => se.key === K) === P || t(s)("menu.cooking_guide.step_dialog.sections.variables.validation.duplicate")
164
164
  ],
165
- placeholder: n(r)("menu.cooking_guide.step_dialog.sections.variables.placeholders.key")
165
+ placeholder: t(s)("menu.cooking_guide.step_dialog.sections.variables.placeholders.key")
166
166
  }, null, 8, ["modelValue", "onUpdate:modelValue", "rules", "placeholder"])
167
167
  ]),
168
- a("div", ze, [
169
- l(N, {
170
- modelValue: w.value[E].value,
171
- "onUpdate:modelValue": (B) => w.value[E].value = B,
168
+ a("div", Ee, [
169
+ l(G, {
170
+ modelValue: w.value[P].value,
171
+ "onUpdate:modelValue": (K) => w.value[P].value = K,
172
172
  rules: [
173
- (B) => !!B || n(r)("menu.cooking_guide.step_dialog.sections.variables.validation.required")
173
+ (K) => !!K || t(s)("menu.cooking_guide.step_dialog.sections.variables.validation.required")
174
174
  ],
175
- placeholder: n(r)("menu.cooking_guide.step_dialog.sections.variables.placeholders.value")
175
+ placeholder: t(s)("menu.cooking_guide.step_dialog.sections.variables.placeholders.value")
176
176
  }, null, 8, ["modelValue", "onUpdate:modelValue", "rules", "placeholder"])
177
177
  ]),
178
- l(f, {
178
+ l(y, {
179
179
  icon: "delete",
180
180
  variant: "tertiary",
181
181
  "text-color": "neutral-gray-400",
182
- onClick: () => Q(E)
182
+ onClick: () => J(P)
183
183
  }, null, 8, ["onClick"])
184
184
  ]))), 128))
185
185
  ])
@@ -187,21 +187,21 @@ const Ke = { class: "flex items-center gap-8" }, Le = { class: "grow" }, Ne = {
187
187
  _: 1
188
188
  }, 8, ["title"]),
189
189
  l(Z, {
190
- title: n(r)("menu.cooking_guide.step_dialog.sections.instruction.title")
190
+ title: t(s)("menu.cooking_guide.step_dialog.sections.instruction.title")
191
191
  }, {
192
- default: p(() => [
193
- a("div", Ee, [
194
- a("div", Ue, [
195
- (g(!0), K(M, null, X(k.value, (z) => (g(), U(G, {
196
- key: z.label,
197
- label: z.label,
192
+ default: g(() => [
193
+ a("div", Ue, [
194
+ a("div", Ae, [
195
+ (_(!0), L(A, null, X(k.value, (T) => (_(), U(E, {
196
+ key: T.label,
197
+ label: T.label,
198
198
  class: "text-fm-color-primary bg-fm-color-system-warning-100",
199
- onMousedown: ie(() => j(z.label), ["prevent"])
199
+ onMousedown: ie(() => Y(T.label), ["prevent"])
200
200
  }, null, 8, ["label", "onMousedown"]))), 128))
201
201
  ]),
202
202
  l($, {
203
203
  modelValue: c.value.instruction,
204
- "onUpdate:modelValue": t[0] || (t[0] = (z) => c.value.instruction = z),
204
+ "onUpdate:modelValue": n[0] || (n[0] = (T) => c.value.instruction = T),
205
205
  ref: "textareaRef"
206
206
  }, null, 8, ["modelValue"])
207
207
  ])
@@ -214,16 +214,16 @@ const Ke = { class: "flex items-center gap-8" }, Le = { class: "grow" }, Ne = {
214
214
  }, 8, ["modelValue", "header", "is-container", "is-container-props", "onOn:clickedAway"]);
215
215
  };
216
216
  }
217
- }), Ae = { class: "w-[700px]" }, Pe = { class: "flex bg-fm-color-neutral-gray-100" }, qe = { class: "px-16 py-8 grow" }, je = { class: "px-16 py-8 w-[200px]" }, Ye = { class: "px-16 py-8 w-[200px]" }, He = { class: "px-16 py-8 grow" }, Xe = { class: "px-16 py-8 w-[200px] flex flex-col gap-8" }, Je = { class: "px-16 py-8 w-[200px] flex flex-col gap-8" }, Qe = /* @__PURE__ */ ae({
217
+ }), Pe = { class: "w-[700px]" }, qe = { class: "flex bg-fm-color-neutral-gray-100" }, je = { class: "px-16 py-8 grow" }, Ye = { class: "px-16 py-8 w-[200px]" }, He = { class: "px-16 py-8 w-[200px]" }, Xe = { class: "px-16 py-8 grow" }, Je = { class: "px-16 py-8 w-[200px] flex flex-col gap-8" }, Qe = { class: "px-16 py-8 w-[200px] flex flex-col gap-8" }, We = /* @__PURE__ */ ae({
218
218
  __name: "CookingGuideStepOverrideDialog",
219
219
  emits: ["onComplete"],
220
- setup(T, { expose: _, emit: J }) {
221
- const { t: r } = le();
222
- _({
223
- show: s,
220
+ setup(N, { expose: p, emit: M }) {
221
+ const { t: s } = le();
222
+ p({
223
+ show: d,
224
224
  hide: O
225
225
  });
226
- const P = J;
226
+ const z = M;
227
227
  function D() {
228
228
  return {
229
229
  productId: "",
@@ -231,80 +231,80 @@ const Ke = { class: "flex items-center gap-8" }, Le = { class: "grow" }, Ne = {
231
231
  };
232
232
  }
233
233
  const C = F(!1), R = F(""), I = F([]);
234
- function s(k) {
234
+ function d(k) {
235
235
  R.value = k.itemName, I.value = k.steps, c.value = k.bindings ? ee(k.bindings) : D(), C.value = !0;
236
236
  }
237
237
  function O() {
238
238
  C.value = !1;
239
239
  }
240
240
  const c = F(D()), w = V(() => c.value.overrides.reduce((k, h) => (k[h.id] = h, k), {}));
241
- function q(k, h) {
242
- var L;
243
- return ((L = w.value[k]) == null ? void 0 : L.variables[h]) ?? "";
241
+ function j(k, h) {
242
+ var B;
243
+ return ((B = w.value[k]) == null ? void 0 : B.variables[h]) ?? "";
244
244
  }
245
- function Q(k, h, L) {
245
+ function J(k, h, B) {
246
246
  const i = c.value.overrides.findIndex((u) => u.id === k);
247
- L ? i < 0 ? c.value.overrides.push({
247
+ B ? i < 0 ? c.value.overrides.push({
248
248
  id: k,
249
- variables: { [h]: L }
250
- }) : c.value.overrides[i].variables[h] = L : i >= 0 && (delete c.value.overrides[i].variables[h], Object.keys(c.value.overrides[i].variables).length || c.value.overrides.splice(i, 1));
249
+ variables: { [h]: B }
250
+ }) : c.value.overrides[i].variables[h] = B : i >= 0 && (delete c.value.overrides[i].variables[h], Object.keys(c.value.overrides[i].variables).length || c.value.overrides.splice(i, 1));
251
251
  }
252
- function j() {
253
- O(), P("onComplete", c.value);
252
+ function Y() {
253
+ O(), z("onComplete", c.value);
254
254
  }
255
255
  return (k, h) => {
256
- const L = x("FmTextField"), i = x("FmSpacer"), u = x("FmButton"), v = x("FmDialog");
257
- return g(), U(v, {
256
+ const B = x("FmTextField"), i = x("FmSpacer"), u = x("FmButton"), v = x("FmDialog");
257
+ return _(), U(v, {
258
258
  modelValue: C.value,
259
- "onUpdate:modelValue": h[0] || (h[0] = (t) => C.value = t),
259
+ "onUpdate:modelValue": h[0] || (h[0] = (n) => C.value = n),
260
260
  overlay: !0,
261
261
  contentClass: "test",
262
262
  "min-width": "min(calc(100% - 48px), 748px)"
263
263
  }, {
264
- "dialog-header": p(() => [
265
- a("div", null, S(n(r)("menu.cooking_guide.step_override_dialog.title")), 1)
264
+ "dialog-header": g(() => [
265
+ a("div", null, S(t(s)("menu.cooking_guide.step_override_dialog.title")), 1)
266
266
  ]),
267
- "dialog-footer": p(() => [
267
+ "dialog-footer": g(() => [
268
268
  l(i),
269
269
  l(u, {
270
270
  class: "sm:w-full xs:w-full",
271
- label: n(r)("menu.cooking_guide.step_override_dialog.actions.cancel"),
271
+ label: t(s)("menu.cooking_guide.step_override_dialog.actions.cancel"),
272
272
  size: "md",
273
273
  variant: "tertiary",
274
274
  onClick: O
275
275
  }, null, 8, ["label"]),
276
276
  l(u, {
277
277
  class: "sm:w-full xs:w-full",
278
- label: n(r)("menu.cooking_guide.step_override_dialog.actions.save"),
278
+ label: t(s)("menu.cooking_guide.step_override_dialog.actions.save"),
279
279
  size: "md",
280
280
  variant: "primary",
281
- onClick: j
281
+ onClick: Y
282
282
  }, null, 8, ["label"])
283
283
  ]),
284
- default: p(() => [
285
- a("div", Ae, [
286
- a("div", Pe, [
287
- a("div", qe, S(n(r)("menu.cooking_guide.step_override_dialog.columns.instructions")), 1),
288
- a("div", je, S(n(r)("menu.cooking_guide.step_override_dialog.columns.variables")), 1),
289
- a("div", Ye, S(n(r)("menu.cooking_guide.step_override_dialog.columns.value")), 1)
284
+ default: g(() => [
285
+ a("div", Pe, [
286
+ a("div", qe, [
287
+ a("div", je, S(t(s)("menu.cooking_guide.step_override_dialog.columns.instructions")), 1),
288
+ a("div", Ye, S(t(s)("menu.cooking_guide.step_override_dialog.columns.variables")), 1),
289
+ a("div", He, S(t(s)("menu.cooking_guide.step_override_dialog.columns.value")), 1)
290
290
  ]),
291
- (g(!0), K(M, null, X(I.value, (t) => (g(), K("div", {
292
- key: t.id,
291
+ (_(!0), L(A, null, X(I.value, (n) => (_(), L("div", {
292
+ key: n.id,
293
293
  class: "flex border-t-2"
294
294
  }, [
295
- a("div", He, S(t.instruction), 1),
296
- a("div", Xe, [
297
- (g(!0), K(M, null, X(t.variables, (f, N) => (g(), K("div", {
298
- key: N,
295
+ a("div", Xe, S(n.instruction), 1),
296
+ a("div", Je, [
297
+ (_(!0), L(A, null, X(n.variables, (y, G) => (_(), L("div", {
298
+ key: G,
299
299
  class: "py-8 w-full text-ellipsis overflow-hidden whitespace-nowrap"
300
- }, S(N), 1))), 128))
300
+ }, S(G), 1))), 128))
301
301
  ]),
302
- a("div", Je, [
303
- (g(!0), K(M, null, X(t.variables, (f, N) => (g(), K("div", { key: N }, [
304
- l(L, {
305
- "model-value": q(t.id, N.toString()),
306
- placeholder: f,
307
- "onUpdate:modelValue": (G) => Q(t.id, N.toString(), G)
302
+ a("div", Qe, [
303
+ (_(!0), L(A, null, X(n.variables, (y, G) => (_(), L("div", { key: G }, [
304
+ l(B, {
305
+ "model-value": j(n.id, G.toString()),
306
+ placeholder: y,
307
+ "onUpdate:modelValue": (E) => J(n.id, G.toString(), E)
308
308
  }, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"])
309
309
  ]))), 128))
310
310
  ])
@@ -315,26 +315,58 @@ const Ke = { class: "flex items-center gap-8" }, Le = { class: "grow" }, Ne = {
315
315
  }, 8, ["modelValue"]);
316
316
  };
317
317
  }
318
- }), We = { class: "fm-typo-en-title-md-600" }, Ze = { class: "space-y-24" }, eo = { class: "flex items-center" }, oo = { class: "flex-1" }, to = { class: "flex items-center gap-8" }, no = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, io = { class: "flex-1" }, ao = { class: "bg-fm-color-neutral-gray-100 px-16 py-8" }, lo = { class: "px-16 py-8 flex-1 flex gap-4 overflow-auto min-w-0" }, so = { class: "fm-typo-en-body-md-500" }, uo = { class: "px-16 py-8 flex gap-8" }, ro = { class: "flex gap-8 items-center justify-start" }, co = /* @__PURE__ */ ae({
318
+ });
319
+ function Ze(N, p) {
320
+ const M = new Set(N.bindings.map(({ productId: s }) => s));
321
+ return p.find(
322
+ (s) => s._id !== N._id && s.bindings.some(({ productId: z }) => M.has(z))
323
+ );
324
+ }
325
+ function eo(N) {
326
+ return {
327
+ module: re.enum.cookingGuide,
328
+ operation: ue.F_OPERATION_TYPE.create,
329
+ data: pe.parse(N)
330
+ };
331
+ }
332
+ function oo(N) {
333
+ return {
334
+ module: re.enum.cookingGuide,
335
+ operation: ue.F_OPERATION_TYPE.update,
336
+ data: pe.parse(N)
337
+ };
338
+ }
339
+ function no(N) {
340
+ return {
341
+ module: re.enum.cookingGuide,
342
+ operation: ue.F_OPERATION_TYPE.delete,
343
+ data: N._id
344
+ };
345
+ }
346
+ const to = { class: "fm-typo-en-title-md-600" }, io = { class: "space-y-24" }, ao = { class: "flex items-center" }, lo = { class: "flex-1" }, so = { class: "flex items-center gap-8" }, uo = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ro = { class: "flex-1" }, co = { class: "bg-fm-color-neutral-gray-100 px-16 py-8" }, mo = { class: "px-16 py-8 flex-1 flex gap-4 overflow-auto min-w-0" }, po = { class: "fm-typo-en-body-md-500" }, go = { class: "px-16 py-8 flex gap-8" }, _o = { class: "flex gap-8 items-center justify-start" }, vo = /* @__PURE__ */ ae({
319
347
  __name: "CookingGuideDialog",
320
348
  props: {
321
349
  categorizedItems: {
322
350
  type: Array,
323
351
  required: !0
324
352
  },
353
+ cookingGuides: {
354
+ type: Array,
355
+ required: !0
356
+ },
325
357
  canApplyItems: {
326
358
  type: Boolean,
327
359
  default: !0
328
360
  }
329
361
  },
330
362
  emits: ["onSave"],
331
- setup(T, { expose: _, emit: J }) {
332
- const r = T;
333
- _({
363
+ setup(N, { expose: p, emit: M }) {
364
+ const s = N;
365
+ p({
334
366
  showModal: R,
335
367
  hideModal: I
336
368
  });
337
- function P() {
369
+ function z() {
338
370
  return {
339
371
  _id: "",
340
372
  name: "",
@@ -344,12 +376,12 @@ const Ke = { class: "flex items-center gap-8" }, Le = { class: "grow" }, Ne = {
344
376
  }
345
377
  const D = F(!1), C = F(void 0);
346
378
  function R(e) {
347
- C.value = e ? ee(e) : P(), s.value = ee(C.value), D.value = !0;
379
+ C.value = e ? ee(e) : z(), d.value = ee(C.value), D.value = !0;
348
380
  }
349
381
  function I() {
350
382
  D.value = !1;
351
383
  }
352
- const s = F(P()), O = F();
384
+ const d = F(z()), O = F();
353
385
  function c() {
354
386
  var e;
355
387
  (e = O.value) == null || e.show();
@@ -358,93 +390,93 @@ const Ke = { class: "flex items-center gap-8" }, Le = { class: "grow" }, Ne = {
358
390
  var o;
359
391
  (o = O.value) == null || o.show(e);
360
392
  }
361
- function q(e) {
362
- s.value.steps.splice(e, 1);
393
+ function j(e) {
394
+ d.value.steps.splice(e, 1);
363
395
  }
364
- function Q(e) {
396
+ function J(e) {
365
397
  if (!e.id)
366
- s.value.steps.push({ ...e, id: (/* @__PURE__ */ new Date()).toISOString() });
398
+ d.value.steps.push({ ...e, id: (/* @__PURE__ */ new Date()).toISOString() });
367
399
  else {
368
- const o = s.value.steps.findIndex(({ id: b }) => e.id === b);
369
- o >= 0 && s.value.steps.splice(o, 1, e);
400
+ const o = d.value.steps.findIndex(({ id: f }) => e.id === f);
401
+ o >= 0 && d.value.steps.splice(o, 1, e);
370
402
  }
371
403
  }
372
- function j(e) {
373
- s.value = {
374
- ...s.value,
404
+ function Y(e) {
405
+ d.value = {
406
+ ...d.value,
375
407
  bindings: e
376
408
  };
377
409
  }
378
410
  function k(e, o) {
379
- return s.value.bindings.find(
380
- (d) => d.productId === e && d.combinationKey == o
411
+ return d.value.bindings.find(
412
+ (r) => r.productId === e && r.combinationKey == o
381
413
  );
382
414
  }
383
415
  function h({ items: e }) {
384
- const o = e.reduce((d, m) => (d[m._id] = d[m._id] ?? [], m.combinationKey && (d[m._id] = [...d[m._id], m.combinationKey]), d), {}), b = Object.entries(o).reduce(
385
- (d, [m, W]) => {
416
+ const o = e.reduce((r, m) => (r[m._id] = r[m._id] ?? [], m.combinationKey && (r[m._id] = [...r[m._id], m.combinationKey]), r), {}), f = Object.entries(o).reduce(
417
+ (r, [m, Q]) => {
386
418
  var oe;
387
- return d = W.length > 0 ? [
388
- ...d,
389
- ...W.map((te) => {
390
- var ne;
419
+ return r = Q.length > 0 ? [
420
+ ...r,
421
+ ...Q.map((ne) => {
422
+ var te;
391
423
  return {
392
424
  productId: m,
393
- combinationKey: te,
394
- overrides: ((ne = k(m, te)) == null ? void 0 : ne.overrides) ?? []
425
+ combinationKey: ne,
426
+ overrides: ((te = k(m, ne)) == null ? void 0 : te.overrides) ?? []
395
427
  };
396
428
  })
397
429
  ] : [
398
- ...d,
430
+ ...r,
399
431
  {
400
432
  productId: m,
401
433
  overrides: ((oe = k(m)) == null ? void 0 : oe.overrides) ?? []
402
434
  }
403
- ], d;
435
+ ], r;
404
436
  },
405
437
  []
406
438
  );
407
- j(b);
439
+ Y(f);
408
440
  }
409
- const L = F();
441
+ const B = F();
410
442
  function i(e) {
411
443
  var o;
412
- (o = L.value) == null || o.show({
444
+ (o = B.value) == null || o.show({
413
445
  itemName: e.itemName,
414
- steps: s.value.steps,
446
+ steps: d.value.steps,
415
447
  bindings: k(e.itemId, e.combinationKey)
416
448
  });
417
449
  }
418
- function u({ productId: e, combinationKey: o, overrides: b }) {
419
- const d = s.value.bindings.map((m) => ({
450
+ function u({ productId: e, combinationKey: o, overrides: f }) {
451
+ const r = d.value.bindings.map((m) => ({
420
452
  ...m,
421
- overrides: m.productId === e && m.combinationKey == o ? b : m.overrides
453
+ overrides: m.productId === e && m.combinationKey == o ? f : m.overrides
422
454
  }));
423
- j(d);
455
+ Y(r);
424
456
  }
425
457
  function v(e) {
426
- const o = s.value.bindings.findIndex(
427
- (b) => b.productId === e.itemId && e.combinationKey == b.combinationKey
458
+ const o = d.value.bindings.findIndex(
459
+ (f) => f.productId === e.itemId && e.combinationKey == f.combinationKey
428
460
  );
429
- o >= 0 && s.value.bindings.splice(o, 1);
461
+ o >= 0 && d.value.bindings.splice(o, 1);
430
462
  }
431
- const { t } = le(), f = V(() => s.value._id ? t("menu.cooking_guide.dialog.update.title") : t("menu.cooking_guide.dialog.add.title")), N = V(() => s.value._id ? t("menu.cooking_guide.dialog.update.action") : t("menu.cooking_guide.dialog.add.action")), G = V(() => s.value.bindings.length), $ = V(
432
- () => s.value.bindings.reduce((e, o) => {
433
- const b = e[o.productId] ?? [];
434
- return o.combinationKey ? e[o.productId] = [...b, o.combinationKey] : e[o.productId] = [], e;
463
+ const { t: n } = le(), y = me(), G = V(() => d.value._id ? n("menu.cooking_guide.dialog.update.title") : n("menu.cooking_guide.dialog.add.title")), E = V(() => d.value._id ? n("menu.cooking_guide.dialog.update.action") : n("menu.cooking_guide.dialog.add.action")), $ = V(() => d.value.bindings.length), W = V(
464
+ () => d.value.bindings.reduce((e, o) => {
465
+ const f = e[o.productId] ?? [];
466
+ return o.combinationKey ? e[o.productId] = [...f, o.combinationKey] : e[o.productId] = [], e;
435
467
  }, {})
436
- ), Y = F(""), z = V(() => r.categorizedItems.reduce((e, o) => {
437
- var b, d;
468
+ ), T = F(""), P = V(() => s.categorizedItems.reduce((e, o) => {
469
+ var f, r;
438
470
  for (const m of o.items)
439
- (b = m.variant) != null && b.variantGroupIds.length && ((d = m.variant) == null ? void 0 : d.variantGroupIds.length) > 0 ? e = [
471
+ (f = m.variant) != null && f.variantGroupIds.length && ((r = m.variant) == null ? void 0 : r.variantGroupIds.length) > 0 ? e = [
440
472
  ...e,
441
- ...m.variant.variantCombinations.map((W) => ({
473
+ ...m.variant.variantCombinations.map((Q) => ({
442
474
  categoryId: o.id,
443
475
  categoryName: o.name,
444
476
  itemId: m._id,
445
477
  itemCode: m.code,
446
- itemName: `${m.name} - ${W.codeName}`,
447
- combinationKey: W.combinationKey
478
+ itemName: `${m.name} - ${Q.codeName}`,
479
+ combinationKey: Q.combinationKey
448
480
  }))
449
481
  ] : e.push({
450
482
  categoryId: o.id,
@@ -454,101 +486,114 @@ const Ke = { class: "flex items-center gap-8" }, Le = { class: "grow" }, Ne = {
454
486
  itemName: m.name
455
487
  });
456
488
  return e;
457
- }, [])), E = V(() => z.value.filter((e) => {
458
- const o = $.value[e.itemId];
489
+ }, [])), K = V(() => P.value.filter((e) => {
490
+ const o = W.value[e.itemId];
459
491
  return !!o && (!e.combinationKey || o.includes(e.combinationKey));
460
- })), B = V(() => {
461
- const e = Y.value.toLowerCase();
462
- return e ? E.value.filter(
492
+ })), se = V(() => {
493
+ const e = T.value.toLowerCase();
494
+ return e ? K.value.filter(
463
495
  (o) => {
464
- var b;
465
- return ((b = o.itemCode) == null ? void 0 : b.toLowerCase().includes(e)) || o.itemName.toLowerCase().includes(e) || o.categoryName.toLowerCase().includes(e);
496
+ var f;
497
+ return ((f = o.itemCode) == null ? void 0 : f.toLowerCase().includes(e)) || o.itemName.toLowerCase().includes(e) || o.categoryName.toLowerCase().includes(e);
466
498
  }
467
- ) : E.value;
468
- }), se = V(() => B.value.reduce(
499
+ ) : K.value;
500
+ }), ve = V(() => se.value.reduce(
469
501
  (e, o) => {
470
- const b = e.findIndex((d) => d.id === o.categoryId);
471
- return b < 0 ? e.push({
502
+ const f = e.findIndex((r) => r.id === o.categoryId);
503
+ return f < 0 ? e.push({
472
504
  id: o.categoryId,
473
505
  name: o.categoryName,
474
506
  items: [o]
475
- }) : e[b] = {
476
- ...e[b],
477
- items: [...e[b].items, o]
507
+ }) : e[f] = {
508
+ ...e[f],
509
+ items: [...e[f].items, o]
478
510
  }, e;
479
511
  },
480
512
  []
481
- )), _e = J;
513
+ )), fe = M;
482
514
  F();
483
- const ve = pe(
484
- () => !ge.isEqual(C.value, s.value),
515
+ const be = ge(
516
+ () => !_e.isEqual(C.value, d.value),
485
517
  () => {
486
518
  D.value = !1;
487
519
  }
488
520
  );
489
- function fe() {
490
- I(), _e("onSave", s.value);
521
+ function ye() {
522
+ const e = Ze(
523
+ d.value,
524
+ s.cookingGuides
525
+ );
526
+ if (e) {
527
+ y.open({
528
+ type: "error",
529
+ message: n("menu.cooking_guide.dialog.validation.product_already_linked", {
530
+ name: e.name
531
+ })
532
+ });
533
+ return;
534
+ }
535
+ I(), fe("onSave", d.value);
491
536
  }
492
537
  return (e, o) => {
493
- const b = x("FmTextField"), d = x("FmButton"), m = x("FmCardSection"), W = x("FmCard"), oe = x("FmSpacer"), te = x("FmSearch"), ne = x("FmSideSheet");
494
- return g(), K(M, null, [
495
- l(ne, {
538
+ const f = x("FmTextField"), r = x("FmButton"), m = x("FmCardSection"), Q = x("FmCard"), oe = x("FmSpacer"), ne = x("FmSearch"), te = x("FmSideSheet");
539
+ return _(), L(A, null, [
540
+ l(te, {
496
541
  modelValue: D.value,
497
- "onUpdate:modelValue": o[4] || (o[4] = (y) => D.value = y),
498
- header: f.value,
542
+ "onUpdate:modelValue": o[4] || (o[4] = (b) => D.value = b),
543
+ header: G.value,
499
544
  "max-width": 560,
500
- "is-container": n(ue).FmForm,
545
+ "is-container": t(de).FmForm,
501
546
  "is-container-props": {
502
- onValidationSuccess: fe,
547
+ onValidationSuccess: ye,
503
548
  blameFormChildOnValidationFailed: !0,
504
549
  class: "flex flex-col h-full py-16"
505
550
  },
506
- "onOn:clickedAway": n(ve)
551
+ "onOn:clickedAway": t(be)
507
552
  }, {
508
- "side-sheet-header": p(() => [
509
- a("span", We, S(f.value), 1)
553
+ "side-sheet-header": g(() => [
554
+ a("span", to, S(G.value), 1)
510
555
  ]),
511
- "side-sheet-footer": p(() => [
512
- a("div", ro, [
513
- l(d, {
556
+ "side-sheet-footer": g(() => [
557
+ a("div", _o, [
558
+ l(r, {
514
559
  variant: "primary",
515
- label: N.value,
560
+ label: E.value,
516
561
  size: "lg",
517
562
  type: "submit"
518
563
  }, null, 8, ["label"]),
519
- l(d, {
564
+ l(r, {
520
565
  variant: "tertiary",
521
- label: n(t)("menu.cooking_guide.dialog.actions.cancel"),
566
+ label: t(n)("menu.cooking_guide.dialog.actions.cancel"),
522
567
  size: "lg",
523
568
  onClick: I
524
569
  }, null, 8, ["label"])
525
570
  ])
526
571
  ]),
527
- default: p(() => [
528
- a("div", Ze, [
572
+ default: g(() => [
573
+ a("div", io, [
529
574
  l(Z, {
530
- title: n(t)("menu.cooking_guide.dialog.sections.guide_detail.title")
575
+ title: t(n)("menu.cooking_guide.dialog.sections.guide_detail.title")
531
576
  }, {
532
- default: p(() => [
533
- l(b, {
577
+ default: g(() => [
578
+ l(f, {
534
579
  autofocus: "",
535
- modelValue: s.value.name,
536
- "onUpdate:modelValue": o[0] || (o[0] = (y) => s.value.name = y),
537
- label: n(t)("menu.cooking_guide.dialog.sections.guide_detail.name.label"),
538
- placeholder: n(t)("menu.cooking_guide.dialog.sections.guide_detail.name.placeholder"),
580
+ modelValue: d.value.name,
581
+ "onUpdate:modelValue": o[0] || (o[0] = (b) => d.value.name = b),
582
+ label: t(n)("menu.cooking_guide.dialog.sections.guide_detail.name.label"),
583
+ placeholder: t(n)("menu.cooking_guide.dialog.sections.guide_detail.name.placeholder"),
539
584
  rules: [
540
- (y) => !!y || n(t)("menu.cooking_guide.dialog.sections.guide_detail.name.required")
585
+ (b) => !!b || t(n)("menu.cooking_guide.dialog.sections.guide_detail.name.required")
541
586
  ]
542
587
  }, null, 8, ["modelValue", "label", "placeholder", "rules"])
543
588
  ]),
544
589
  _: 1
545
590
  }, 8, ["title"]),
546
591
  l(Z, {
547
- title: n(t)("menu.cooking_guide.dialog.sections.steps.title")
592
+ title: t(n)("menu.cooking_guide.dialog.sections.steps.title")
548
593
  }, {
549
- "append-title": p(() => [
550
- l(d, {
551
- label: n(t)("menu.cooking_guide.dialog.sections.steps.add"),
594
+ "append-title": g(() => [
595
+ l(r, {
596
+ label: t(n)("menu.cooking_guide.dialog.sections.steps.add"),
552
597
  variant: "secondary",
553
598
  "text-color": "primary",
554
599
  "border-color": "primary",
@@ -556,39 +601,39 @@ const Ke = { class: "flex items-center gap-8" }, Le = { class: "grow" }, Ne = {
556
601
  onClick: c
557
602
  }, null, 8, ["label"])
558
603
  ]),
559
- default: p(() => [
560
- l(n($e), {
561
- modelValue: s.value.steps,
562
- "onUpdate:modelValue": o[1] || (o[1] = (y) => s.value.steps = y),
604
+ default: g(() => [
605
+ l(t($e), {
606
+ modelValue: d.value.steps,
607
+ "onUpdate:modelValue": o[1] || (o[1] = (b) => d.value.steps = b),
563
608
  handle: ".handle",
564
609
  "item-key": "id"
565
610
  }, {
566
- item: p(({ element: y, index: H }) => [
567
- l(W, {
611
+ item: g(({ element: b, index: H }) => [
612
+ l(Q, {
568
613
  variant: "outlined",
569
614
  class: "rounded-md mb-16 items-center",
570
615
  horizontal: "",
571
- onClick: () => w(y)
616
+ onClick: () => w(b)
572
617
  }, {
573
- default: p(() => [
574
- a("div", eo, [
575
- l(d, {
618
+ default: g(() => [
619
+ a("div", ao, [
620
+ l(r, {
576
621
  class: "handle",
577
622
  icon: "drag_handle",
578
623
  variant: "tertiary"
579
624
  }),
580
- a("p", oo, S(y.name), 1)
625
+ a("p", lo, S(b.name), 1)
581
626
  ]),
582
627
  l(m, { class: "grow" }, {
583
- default: p(() => [
584
- be(S(y.instruction), 1)
628
+ default: g(() => [
629
+ ke(S(b.instruction), 1)
585
630
  ]),
586
631
  _: 2
587
632
  }, 1024),
588
- l(d, {
633
+ l(r, {
589
634
  icon: "delete",
590
635
  variant: "tertiary",
591
- onClick: ie(() => q(H), ["stop"])
636
+ onClick: ie(() => j(H), ["stop"])
592
637
  }, null, 8, ["onClick"])
593
638
  ]),
594
639
  _: 2
@@ -599,67 +644,67 @@ const Ke = { class: "flex items-center gap-8" }, Le = { class: "grow" }, Ne = {
599
644
  ]),
600
645
  _: 1
601
646
  }, 8, ["title"]),
602
- T.canApplyItems ? (g(), U(Z, {
647
+ N.canApplyItems ? (_(), U(Z, {
603
648
  key: 0,
604
- title: n(t)("menu.cooking_guide.dialog.sections.apply_product.title")
649
+ title: t(n)("menu.cooking_guide.dialog.sections.apply_product.title")
605
650
  }, {
606
- "append-title": p(() => [
651
+ "append-title": g(() => [
607
652
  l(oe),
608
- l(Ie, {
609
- "categorized-items": T.categorizedItems,
610
- "initial-value": s.value.bindings.map((y) => ({
611
- _id: y.productId,
612
- combinationKey: y.combinationKey
653
+ l(Oe, {
654
+ "categorized-items": N.categorizedItems,
655
+ "initial-value": d.value.bindings.map((b) => ({
656
+ _id: b.productId,
657
+ combinationKey: b.combinationKey
613
658
  })),
614
659
  "select-variant": !0,
615
660
  "show-variant": !0,
616
661
  "show-addon": !1,
617
- onSubmit: o[2] || (o[2] = (y) => h(y))
662
+ onSubmit: o[2] || (o[2] = (b) => h(b))
618
663
  }, {
619
- default: p(({ trigger: y }) => [
620
- l(d, {
664
+ default: g(({ trigger: b }) => [
665
+ l(r, {
621
666
  icon: "link",
622
- label: n(t)("menu.scheduler.dialog.sections.products.link"),
667
+ label: t(n)("menu.scheduler.dialog.sections.products.link"),
623
668
  variant: "secondary",
624
669
  "text-color": "primary",
625
670
  "border-color": "primary",
626
- onClick: y
671
+ onClick: b
627
672
  }, null, 8, ["label", "onClick"])
628
673
  ]),
629
674
  _: 1
630
675
  }, 8, ["categorized-items", "initial-value"])
631
676
  ]),
632
- default: p(() => [
633
- a("div", to, [
634
- a("div", no, S(n(t)("menu.cooking_guide.dialog.sections.apply_product.products_linked", {
635
- count: G.value
677
+ default: g(() => [
678
+ a("div", so, [
679
+ a("div", uo, S(t(n)("menu.cooking_guide.dialog.sections.apply_product.products_linked", {
680
+ count: $.value
636
681
  })), 1),
637
- a("div", io, [
638
- l(te, {
639
- modelValue: Y.value,
640
- "onUpdate:modelValue": o[3] || (o[3] = (y) => Y.value = y),
641
- placeholder: n(t)("menu.cooking_guide.dialog.sections.apply_product.search")
682
+ a("div", ro, [
683
+ l(ne, {
684
+ modelValue: T.value,
685
+ "onUpdate:modelValue": o[3] || (o[3] = (b) => T.value = b),
686
+ placeholder: t(n)("menu.cooking_guide.dialog.sections.apply_product.search")
642
687
  }, null, 8, ["modelValue", "placeholder"])
643
688
  ])
644
689
  ]),
645
- (g(!0), K(M, null, X(se.value, (y) => (g(), K("div", {
646
- key: y.id || ""
690
+ (_(!0), L(A, null, X(ve.value, (b) => (_(), L("div", {
691
+ key: b.id || ""
647
692
  }, [
648
- a("div", ao, S(y.name), 1),
649
- (g(!0), K(M, null, X(y.items, (H) => (g(), K("div", {
693
+ a("div", co, S(b.name), 1),
694
+ (_(!0), L(A, null, X(b.items, (H) => (_(), L("div", {
650
695
  key: H.itemId,
651
696
  class: "flex items-center"
652
697
  }, [
653
- a("div", lo, [
654
- a("span", so, S((H.itemCode ? `${H.itemCode} ` : "") + H.itemName), 1)
698
+ a("div", mo, [
699
+ a("span", po, S((H.itemCode ? `${H.itemCode} ` : "") + H.itemName), 1)
655
700
  ]),
656
- a("div", uo, [
657
- l(d, {
701
+ a("div", go, [
702
+ l(r, {
658
703
  icon: "edit",
659
704
  variant: "tertiary",
660
705
  onClick: () => i(H)
661
706
  }, null, 8, ["onClick"]),
662
- l(d, {
707
+ l(r, {
663
708
  icon: "delete",
664
709
  variant: "tertiary",
665
710
  onClick: () => v(H)
@@ -677,76 +722,54 @@ const Ke = { class: "flex items-center gap-8" }, Le = { class: "grow" }, Ne = {
677
722
  l(Re, {
678
723
  ref_key: "cookingGuideStepDialogRef",
679
724
  ref: O,
680
- onOnComplete: Q
725
+ onOnComplete: J
681
726
  }, null, 512),
682
- l(Qe, {
727
+ l(We, {
683
728
  ref_key: "cookingGuideStepOverrideDialogRef",
684
- ref: L,
729
+ ref: B,
685
730
  onOnComplete: u
686
731
  }, null, 512)
687
732
  ], 64);
688
733
  };
689
734
  }
690
- });
691
- function mo(T) {
692
- return {
693
- module: re.enum.cookingGuide,
694
- operation: de.F_OPERATION_TYPE.create,
695
- data: me.parse(T)
696
- };
697
- }
698
- function po(T) {
699
- return {
700
- module: re.enum.cookingGuide,
701
- operation: de.F_OPERATION_TYPE.update,
702
- data: me.parse(T)
703
- };
704
- }
705
- function go(T) {
706
- return {
707
- module: re.enum.cookingGuide,
708
- operation: de.F_OPERATION_TYPE.delete,
709
- data: T._id
710
- };
711
- }
712
- const _o = {
735
+ }), fo = {
713
736
  class: "flex flex-1 justify-end"
714
- }, vo = {
737
+ }, bo = {
715
738
  class: "flex justify-end items-center"
716
- }, fo = {
739
+ }, yo = {
717
740
  class: "grow space-y-4"
718
- }, bo = {
741
+ }, ko = {
719
742
  class: "fm-typo-en-body-lg-600"
720
- }, yo = {
743
+ }, ho = {
721
744
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
722
- }, ko = {
745
+ }, xo = {
723
746
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
724
- }, Lo = /* @__PURE__ */ ae({
747
+ }, No = /* @__PURE__ */ ae({
725
748
  __name: "CookingGuide",
726
- setup(T) {
749
+ setup(N) {
727
750
  const {
728
- t: _
729
- } = le(), J = ye(), r = V(() => J.breakpoints.value.xs), P = V(() => [{
751
+ t: p
752
+ } = le(), M = he(), s = V(() => M.breakpoints.value.xs), z = V(() => [{
730
753
  accessorKey: "name",
731
- header: () => _("menu.cooking_guide.table.columns.name"),
754
+ header: () => p("menu.cooking_guide.table.columns.name"),
732
755
  cell: (i) => i.getValue(),
733
756
  enableSorting: !1
734
757
  }, {
735
758
  accessorKey: "bindings",
736
- header: () => _("menu.cooking_guide.table.columns.products"),
759
+ header: () => p("menu.cooking_guide.table.columns.products"),
737
760
  cell: (i) => {
738
761
  const u = i.getValue();
739
- return _("menu.cooking_guide.table.columns.products", {
762
+ return p("menu.cooking_guide.table.columns.products", {
740
763
  count: u.length
741
764
  });
742
765
  },
743
766
  enableSorting: !1
744
767
  }, {
745
768
  accessorKey: "steps",
746
- header: () => _("menu.cooking_guide.table.columns.steps"),
769
+ header: () => p("menu.cooking_guide.table.columns.steps"),
747
770
  cell: (i) => {
748
771
  const u = i.getValue();
749
- return _("menu.cooking_guide.table.columns.steps", {
772
+ return p("menu.cooking_guide.table.columns.steps", {
750
773
  count: u.length
751
774
  });
752
775
  },
@@ -760,9 +783,9 @@ const _o = {
760
783
  headerContentClass: "-mx-16"
761
784
  },
762
785
  enableSorting: !1,
763
- cell: (i) => A("div", {
786
+ cell: (i) => q("div", {
764
787
  class: "flex justify-end"
765
- }, [A(ue.FmButton, {
788
+ }, [q(de.FmButton, {
766
789
  icon: "delete",
767
790
  textColor: "neutral-gray-400",
768
791
  variant: "tertiary",
@@ -770,85 +793,85 @@ const _o = {
770
793
  k(i.row.original);
771
794
  }, ["stop", "prevent"])
772
795
  })])
773
- }]), D = we(), C = V(() => O.checkMenuIsLoading()), R = V(() => D.categorizedItems), I = V(() => D.state.menu.modules.cookingGuide), s = V(() => I.value.length > 0), O = Ve(Fe(ke())), c = F();
796
+ }]), D = Ve(), C = V(() => O.checkMenuIsLoading()), R = V(() => D.categorizedItems), I = V(() => D.state.menu.modules.cookingGuide), d = V(() => I.value.length > 0), O = Fe(Se(me())), c = F();
774
797
  function w() {
775
798
  var i;
776
799
  C.value || (i = c.value) == null || i.showModal();
777
800
  }
778
- function q(i) {
801
+ function j(i) {
779
802
  var u;
780
803
  C.value || (u = c.value) == null || u.showModal(i);
781
804
  }
782
- async function Q(i) {
783
- const u = i._id ? po(i) : mo(i);
805
+ async function J(i) {
806
+ const u = i._id ? oo(i) : eo(i);
784
807
  await O.updateMenu(u, i.name);
785
808
  }
786
- const j = he();
809
+ const Y = xe();
787
810
  async function k(i) {
788
- let u = [A("span", _("menu.cooking_guide.dialogs.remove.message.prefix")), A("span", {
811
+ let u = [q("span", p("menu.cooking_guide.dialogs.remove.message.prefix")), q("span", {
789
812
  class: "fm-typo-en-body-lg-600"
790
- }, i.name), A("span", "?")];
791
- i.bindings.length && (u = [A("span", _("menu.cooking_guide.dialogs.remove.message.products_using")), A("span", {
813
+ }, i.name), q("span", "?")];
814
+ i.bindings.length && (u = [q("span", p("menu.cooking_guide.dialogs.remove.message.products_using")), q("span", {
792
815
  class: "fm-typo-en-body-lg-600"
793
- }, i.bindings.length), A("span", _("menu.cooking_guide.dialogs.remove.message.products_count")), ...u]), j.open({
794
- title: _("menu.cooking_guide.dialogs.remove.title"),
795
- contentComponent: A("div", u),
816
+ }, i.bindings.length), q("span", p("menu.cooking_guide.dialogs.remove.message.products_count")), ...u]), Y.open({
817
+ title: p("menu.cooking_guide.dialogs.remove.title"),
818
+ contentComponent: q("div", u),
796
819
  primaryActions: {
797
- text: _("menu.cooking_guide.actions.remove"),
820
+ text: p("menu.cooking_guide.actions.remove"),
798
821
  close: !0,
799
822
  variant: "destructive"
800
823
  },
801
824
  secondaryActions: {
802
- text: _("menu.cooking_guide.actions.cancel"),
825
+ text: p("menu.cooking_guide.actions.cancel"),
803
826
  close: !0
804
827
  }
805
828
  }).onPrimary(async () => {
806
- await O.updateMenu(go(i), i.name, !0);
829
+ await O.updateMenu(no(i), i.name, !0);
807
830
  });
808
831
  }
809
- const h = F(""), L = V(() => {
832
+ const h = F(""), B = V(() => {
810
833
  const i = h.value.toLowerCase();
811
834
  return i ? I.value.filter((u) => u.name.toLowerCase().includes(i)) : I.value;
812
835
  });
813
836
  return (i, u) => {
814
- const v = x("FmSearch"), t = x("FmTable"), f = x("FmButton"), N = x("FmListItem"), G = x("FmList");
815
- return g(), U(Oe, {
816
- heading: n(_)("menu.cooking_guide.title")
837
+ const v = x("FmSearch"), n = x("FmTable"), y = x("FmButton"), G = x("FmListItem"), E = x("FmList");
838
+ return _(), U(Ge, {
839
+ heading: t(p)("menu.cooking_guide.title")
817
840
  }, {
818
- "append-heading": p(() => [a("div", _o, [s.value ? (g(), U(xe, {
841
+ "append-heading": g(() => [a("div", fo, [d.value ? (_(), U(Ce, {
819
842
  key: 0,
820
843
  disabled: C.value,
821
844
  icon: "add",
822
- label: n(_)("menu.cooking_guide.actions.add"),
845
+ label: t(p)("menu.cooking_guide.actions.add"),
823
846
  variant: "primary",
824
847
  onClick: u[0] || (u[0] = () => w())
825
848
  }, null, 8, ["disabled", "label"])) : ce("", !0)])]),
826
- default: p(() => [s.value ? (g(), K(M, {
849
+ default: g(() => [d.value ? (_(), L(A, {
827
850
  key: 1
828
- }, [a("div", vo, [l(v, {
851
+ }, [a("div", bo, [l(v, {
829
852
  modelValue: h.value,
830
853
  "onUpdate:modelValue": u[1] || (u[1] = ($) => h.value = $),
831
854
  autofocus: "",
832
855
  class: "my-8 w-[320px] xs:w-full xs:px-16",
833
- placeholder: n(_)("menu.cooking_guide.table.search.placeholder")
834
- }, null, 8, ["modelValue", "placeholder"])]), r.value ? (g(), U(G, {
856
+ placeholder: t(p)("menu.cooking_guide.table.search.placeholder")
857
+ }, null, 8, ["modelValue", "placeholder"])]), s.value ? (_(), U(E, {
835
858
  key: 1,
836
859
  class: "w-full px-16 flex-1 min-h-0 overflow-scroll pb-64",
837
860
  separator: ""
838
861
  }, {
839
- default: p(() => [(g(!0), K(M, null, X(L.value, ($) => (g(), U(N, {
862
+ default: g(() => [(_(!0), L(A, null, X(B.value, ($) => (_(), U(G, {
840
863
  key: $._id,
841
864
  label: $.name,
842
865
  style: {
843
866
  padding: "12px 0 !important"
844
867
  },
845
- onClick: () => q($)
868
+ onClick: () => j($)
846
869
  }, {
847
- default: p(() => [a("div", fo, [a("div", bo, S($.name), 1), a("div", null, [a("div", yo, S(n(_)("menu.cooking_guide.table.mobile.products_linked", {
870
+ default: g(() => [a("div", yo, [a("div", ko, S($.name), 1), a("div", null, [a("div", ho, S(t(p)("menu.cooking_guide.table.mobile.products_linked", {
848
871
  count: $.bindings.length
849
- })), 1), a("div", ko, S(n(_)("menu.cooking_guide.table.columns.steps", {
872
+ })), 1), a("div", xo, S(t(p)("menu.cooking_guide.table.columns.steps", {
850
873
  count: $.steps.length
851
- })), 1)])]), l(f, {
874
+ })), 1)])]), l(y, {
852
875
  disabled: C.value,
853
876
  icon: "delete",
854
877
  variant: "tertiary",
@@ -858,11 +881,11 @@ const _o = {
858
881
  _: 2
859
882
  }, 1032, ["label", "onClick"]))), 128))]),
860
883
  _: 1
861
- })) : (g(), U(Ce, {
884
+ })) : (_(), U(we, {
862
885
  key: 0
863
886
  }, {
864
- default: p(() => [l(t, {
865
- "column-defs": P.value,
887
+ default: g(() => [l(n, {
888
+ "column-defs": z.value,
866
889
  loading: C.value,
867
890
  "page-size": I.value.length,
868
891
  "row-data": I.value,
@@ -870,28 +893,29 @@ const _o = {
870
893
  shrinkAt: !1,
871
894
  "hide-footer": "",
872
895
  "pin-header-row": "",
873
- onRowClick: u[2] || (u[2] = ($) => q($.original))
896
+ onRowClick: u[2] || (u[2] = ($) => j($.original))
874
897
  }, null, 8, ["column-defs", "loading", "page-size", "row-data", "search-value"])]),
875
898
  _: 1
876
- }))], 64)) : (g(), U(n(Se), {
899
+ }))], 64)) : (_(), U(t(Ie), {
877
900
  key: 0,
878
901
  action: {
879
- text: n(_)("menu.cooking_guide.empty.action"),
902
+ text: t(p)("menu.cooking_guide.empty.action"),
880
903
  callback: () => w()
881
904
  },
882
- subtitle: n(_)("menu.cooking_guide.empty.subtitle"),
883
- title: n(_)("menu.cooking_guide.empty.title")
884
- }, null, 8, ["action", "subtitle", "title"])), l(co, {
905
+ subtitle: t(p)("menu.cooking_guide.empty.subtitle"),
906
+ title: t(p)("menu.cooking_guide.empty.title")
907
+ }, null, 8, ["action", "subtitle", "title"])), l(vo, {
885
908
  ref_key: "cookingGuideDialogRef",
886
909
  ref: c,
887
910
  "categorized-items": R.value,
888
- onOnSave: Q
889
- }, null, 8, ["categorized-items"])]),
911
+ "cooking-guides": I.value,
912
+ onOnSave: J
913
+ }, null, 8, ["categorized-items", "cooking-guides"])]),
890
914
  _: 1
891
915
  }, 8, ["heading"]);
892
916
  };
893
917
  }
894
918
  });
895
919
  export {
896
- Lo as default
920
+ No as default
897
921
  };