@feedmepos/mf-menu 0.20.2 → 0.21.0

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 (54) hide show
  1. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-Ds2qfY_X.js → ApplyProduct.vue_vue_type_script_setup_true_lang-DxlJ6xrN.js} +10 -10
  2. package/dist/{ApplyProducts.vue_vue_type_script_setup_true_lang-BRepaPR3.js → ApplyProducts.vue_vue_type_script_setup_true_lang-CF-fCyCs.js} +5 -4
  3. package/dist/{Catalog-S5KDEWzG.js → Catalog-CVmJyr3D.js} +74 -73
  4. package/dist/{Category-DLaNEtA5.js → Category-CjzACwyb.js} +6 -6
  5. package/dist/{CookingGuide-DSGZapxz.js → CookingGuide-COZFvS4P.js} +7 -6
  6. package/dist/{Group-CBMSkmwQ.js → Group-Bun-FrIN.js} +1 -1
  7. package/dist/{Group-B0VQ-64x.js → Group-xCFTbuXd.js} +7 -7
  8. package/dist/{Group.vue_vue_type_script_setup_true_lang-DKzrhXtM.js → Group.vue_vue_type_script_setup_true_lang-DSfas9NO.js} +57 -56
  9. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BV-FC8tM.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-kl0WpFCW.js} +24 -24
  10. package/dist/{Ingredient-CnPQ0kiR.js → Ingredient-w4kVvEml.js} +69 -68
  11. package/dist/{LinkProductSideSheet-A26Otbdm.js → LinkProductSideSheet-CBHtwxCb.js} +30 -29
  12. package/dist/{PrintRoute-BlJMdPP0.js → PrintRoute-DXsa638J.js} +30 -29
  13. package/dist/{Product-BvD813LL.js → Product-BAtB4ebt.js} +1 -1
  14. package/dist/{Product.vue_vue_type_script_setup_true_lang-D_oKtXbh.js → Product.vue_vue_type_script_setup_true_lang-DeJy-daz.js} +276 -279
  15. package/dist/{Products-B8Ok-bkN.js → Products-BQHiOdhZ.js} +24 -23
  16. package/dist/{Publish-qBiJUQ4X.js → Publish-DbxeuyRV.js} +68 -67
  17. package/dist/{Recipe-CJxJJAUV.js → Recipe-T2PlHYY_.js} +84 -83
  18. package/dist/{Scheduler-DfAMwXCu.js → Scheduler-C-W85pjK.js} +2 -2
  19. package/dist/{SchedulerSelector.vue_vue_type_script_setup_true_lang-CArE_Hua.js → SchedulerSelector.vue_vue_type_script_setup_true_lang-DQNfBh14.js} +1 -1
  20. package/dist/ServingSequence-lNzb6f-1.js +4 -0
  21. package/dist/{Setting-BbgJcWsN.js → Setting-C8gm77EA.js} +1 -1
  22. package/dist/{Setting.vue_vue_type_script_setup_true_lang-BbVEzNve.js → Setting.vue_vue_type_script_setup_true_lang-BR3_ywqR.js} +13 -12
  23. package/dist/{Takeaway-wAXsZQN2.js → Takeaway-CCw_DHze.js} +12 -12
  24. package/dist/{Takeaway-CMDFYeUw.js → Takeaway-DbHgvpIH.js} +1 -1
  25. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-DSphRs_i.js → Takeaway.vue_vue_type_script_setup_true_lang-DsUQ3Dlh.js} +22 -21
  26. package/dist/{TaxSetting-C1XOTv-9.js → TaxSetting-BQdKVfBi.js} +4 -4
  27. package/dist/{Unit-BW3iqgp8.js → Unit-M217TP4K.js} +22 -21
  28. package/dist/{Variant-BJIxp9PJ.js → Variant-Boy7TugQ.js} +10 -10
  29. package/dist/{_id_-B25OxuPV.js → _id_-DA8Gpcqf.js} +6 -6
  30. package/dist/{app-BFJlAowN.js → app-rWkFl8Vq.js} +43468 -73420
  31. package/dist/app.js +4 -4
  32. package/dist/assets/linked-status-C8QAoUQr.js +24 -0
  33. package/dist/assets/validate-menu-DuCKFpOM.js +24 -0
  34. package/dist/{catalog-Do7RfIKm.js → catalog-Bas11mgo.js} +21595 -21593
  35. package/dist/{catalog-B-Z6lEFK.js → catalog-CfrgLaRX.js} +1 -1
  36. package/dist/{category-DEWEor3m.js → category-D-4M9HY7.js} +5 -4
  37. package/dist/currency-BPHwez-E.js +7 -0
  38. package/dist/index-Cwb_hpVz.js +7393 -0
  39. package/dist/{index-BEdHzZvu.js → index-v25k4isU.js} +47 -47
  40. package/dist/{item-BooojPpg.js → item-DTVh14mw.js} +1195 -1194
  41. package/dist/{lodash-247YxYiQ.js → lodash-BsZHKgKE.js} +439 -439
  42. package/dist/{menu-DCnWrgH7.js → menu-CUz01P4H.js} +6 -5
  43. package/dist/{object-B2cP_UeG.js → object-CbSdUbPF.js} +25 -25
  44. package/dist/{scheduler-0cChIv2I.js → scheduler-BuIczYeS.js} +13 -12
  45. package/dist/{takeaway-mwqVQ1ij.js → takeaway-DC-YsV2Q.js} +28 -27
  46. package/dist/{toExcel-Dha8Vf3u.js → toExcel-CaiFM8FE.js} +237 -237
  47. package/dist/{unit-BgfdgXAu.js → unit-D_VflvJf.js} +6 -5
  48. package/dist/{vuedraggable-BEszc36M.js → vuedraggable-WU01qJgi.js} +110 -110
  49. package/package.json +3 -3
  50. package/dist/ServingSequence-DxDMeto7.js +0 -4
  51. package/dist/assets/linked-status-4i88AmvK.js +0 -24
  52. package/dist/assets/validate-menu-CTKwgXfw.js +0 -24
  53. package/dist/currency-33gUke3q.js +0 -7
  54. package/dist/index-BXl09ebx.js +0 -21908
@@ -1,31 +1,32 @@
1
- import { defineComponent as ie, computed as b, ref as E, reactive as Ve, watch as Ce, resolveComponent as d, openBlock as m, createElementBlock as y, Fragment as V, renderSlot as Me, createVNode as s, unref as e, withCtx as k, createElementVNode as v, toDisplayString as U, createBlock as B, createCommentVNode as j, normalizeClass as J, createTextVNode as we, renderList as q, getCurrentInstance as $e, h as te, withModifiers as le } from "vue";
2
- import { i as se, a as Q, u as W, d as Ee, m as K, k as ue, e as oe, g as Ue, b as G, h as H, l as Ne, _ as Oe, f as Te } from "./app-BFJlAowN.js";
3
- import { useSnackbar as X, components as re, useDialog as Be, FmButtonVariant as ce, useBreakpoints as Ie } from "@feedmepos/ui-library";
1
+ import { defineComponent as ie, computed as b, ref as U, reactive as Ve, watch as Ce, resolveComponent as d, openBlock as m, createElementBlock as y, Fragment as V, renderSlot as Me, createVNode as s, unref as e, withCtx as k, createElementVNode as v, toDisplayString as E, createBlock as N, createCommentVNode as K, normalizeClass as J, createTextVNode as we, renderList as q, getCurrentInstance as $e, h as te, withModifiers as le } from "vue";
2
+ import { g as se, a as Q, u as W, c as Ue, m as j, i as ue, d as Ee, e as G, f as H, j as Oe, _ as Be, b as Le } from "./app-rWkFl8Vq.js";
3
+ import { useSnackbar as X, components as re, useDialog as Ne, FmButtonVariant as ce, useBreakpoints as Te } from "@feedmepos/ui-library";
4
4
  import { useI18n as Z } from "@feedmepos/mf-common";
5
+ import { F_INVENTORY_BINDING_TYPE as oe } from "@feedmepos/core";
5
6
  import "vue-router";
6
- import { defineStore as Le } from "pinia";
7
- import { u as Pe } from "./unit-BgfdgXAu.js";
8
- import { _ as ae, g as Re } from "./index-BXl09ebx.js";
9
- import { u as De, l as Ae } from "./lodash-247YxYiQ.js";
10
- const Ye = { class: "fm-typo-en-title-md-600" }, ze = {
7
+ import { defineStore as Ie } from "pinia";
8
+ import { u as Pe } from "./unit-D_VflvJf.js";
9
+ import { _ as ae, j as Re } from "./index-Cwb_hpVz.js";
10
+ import { u as Ae, l as De } from "./lodash-BsZHKgKE.js";
11
+ const ze = { class: "fm-typo-en-title-md-600" }, Ye = {
11
12
  key: 0,
12
13
  class: "pt-8 flex flex-col gap-8"
13
- }, Ke = {
14
+ }, je = {
14
15
  key: 1,
15
16
  class: "pt-8 space-y-40"
16
- }, je = { class: "flex flex-row gap-16" }, qe = { class: "overflow-x-hidden overflow-y-auto max-h-[300px]" }, Ge = { class: "flex gap-8 items-center justify-start" }, He = /* @__PURE__ */ ie({
17
+ }, Ke = { class: "flex flex-row gap-16" }, qe = { class: "overflow-x-hidden overflow-y-auto max-h-[300px]" }, Ge = { class: "flex gap-8 items-center justify-start" }, He = /* @__PURE__ */ ie({
17
18
  __name: "Form",
18
19
  props: {
19
20
  initialValue: { default: void 0 },
20
21
  usedCodes: { default: () => [] },
21
22
  invalidSkuAndRecipe: {}
22
23
  },
23
- setup(I, { expose: N }) {
24
- const { t: o } = Z(), r = I, u = se(Q(X())), S = Pe(), h = b(() => r.initialValue ? o("menu.sku.update") : o("menu.sku.add")), x = b(
24
+ setup(T, { expose: O }) {
25
+ const { t: o } = Z(), r = T, u = se(Q(X())), S = Pe(), h = b(() => r.initialValue ? o("menu.sku.update") : o("menu.sku.add")), x = b(
25
26
  () => r.initialValue ? o("menu.common.actions.update") : o("menu.common.actions.add")
26
- ), C = E(!1), f = E(!1), M = (t) => {
27
- Ue.isBoolean(t) ? f.value = t : f.value = !f.value;
28
- }, O = W(), a = b(() => O.units), i = b(() => a.value.map(({ name: t, _id: l, abbrev: g, measurements: T }) => ({
27
+ ), C = U(!1), f = U(!1), M = (t) => {
28
+ Ee.isBoolean(t) ? f.value = t : f.value = !f.value;
29
+ }, B = W(), a = b(() => B.units), i = b(() => a.value.map(({ name: t, _id: l, abbrev: g, measurements: L }) => ({
29
30
  label: t,
30
31
  value: l,
31
32
  options: [
@@ -33,24 +34,24 @@ const Ye = { class: "fm-typo-en-title-md-600" }, ze = {
33
34
  label: `${t} (${g})`,
34
35
  value: null
35
36
  },
36
- ...T.map(({ name: A, id: Y, abbrev: z }) => ({
37
- label: `${A} (${z})`,
38
- value: Y
37
+ ...L.map(({ name: D, id: z, abbrev: Y }) => ({
38
+ label: `${D} (${Y})`,
39
+ value: z
39
40
  }))
40
41
  ]
41
42
  }))), c = b(() => a.value.length > 0), n = Ve(
42
- r.initialValue ? Ee(r.initialValue) : {
43
- ...K.generator.initSku(),
44
- unit: a.value[0] || K.generator.initUnit()
43
+ r.initialValue ? Ue(r.initialValue) : {
44
+ ...j.generator.initSku(),
45
+ unit: a.value[0] || j.generator.initUnit()
45
46
  }
46
- ), F = E(!!n.convert), L = b(() => {
47
+ ), F = U(!!n.convert), I = b(() => {
47
48
  var l;
48
49
  const t = i.value.find((g) => g.value === n.unit._id);
49
50
  return ((l = ((t == null ? void 0 : t.options) || []).find((g) => g.value === (n.trackingMeasurement || null))) == null ? void 0 : l.label) || "";
50
51
  }), P = (t) => n.unit._id === t.value && n.trackingMeasurement === (t.value || null);
51
52
  function _(t, l) {
52
53
  const g = l || void 0;
53
- n.unit._id === t && n.trackingMeasurement === g || (n.unit = a.value.find((T) => T._id === t), n.trackingMeasurement = g, n.convert && (n.convert.measurement = g));
54
+ n.unit._id === t && n.trackingMeasurement === g || (n.unit = a.value.find((L) => L._id === t), n.trackingMeasurement = g, n.convert && (n.convert.measurement = g));
54
55
  }
55
56
  const de = b(() => {
56
57
  const t = i.value.find((l) => l.value === n.unit._id);
@@ -71,17 +72,17 @@ const Ye = { class: "fm-typo-en-title-md-600" }, ze = {
71
72
  F.value && (n.convert = {
72
73
  ...n.convert,
73
74
  inventoryBindings: t
74
- }), D.value = !1;
75
+ }), A.value = !1;
75
76
  }
76
77
  const pe = b(() => r.invalidSkuAndRecipe.skus), ve = b(() => r.invalidSkuAndRecipe.recipes);
77
78
  o("menu.sku.errors.select_recipe_ingredient");
78
- const D = E(!1);
79
+ const A = U(!1);
79
80
  function _e() {
80
81
  var t;
81
- return D.value = (((t = n.convert) == null ? void 0 : t.inventoryBindings) || []).length === 0, !D.value;
82
+ return A.value = (((t = n.convert) == null ? void 0 : t.inventoryBindings) || []).length === 0, !A.value;
82
83
  }
83
- const fe = De(
84
- () => !Ae.isEqual(n, r.initialValue || K.generator.initSku()),
84
+ const fe = Ae(
85
+ () => !De.isEqual(n, r.initialValue || j.generator.initSku()),
85
86
  () => {
86
87
  f.value = !1;
87
88
  }
@@ -115,11 +116,11 @@ const Ye = { class: "fm-typo-en-title-md-600" }, ze = {
115
116
  () => f.value,
116
117
  (t) => {
117
118
  }
118
- ), N({
119
+ ), O({
119
120
  show: f,
120
121
  trigger: M
121
122
  }), (t, l) => {
122
- const g = d("FmTextField"), T = d("FmLabel"), A = d("FmField"), Y = d("FmMenuHeader"), z = d("FmMenuDivider"), ge = d("FmMenuItem"), ye = d("FmMenu"), ke = d("FmFormGroup"), he = d("FmSwitch"), xe = d("FmSelect"), Fe = d("FmCard"), ne = d("fm-button"), Se = d("fm-side-sheet");
123
+ const g = d("FmTextField"), L = d("FmLabel"), D = d("FmField"), z = d("FmMenuHeader"), Y = d("FmMenuDivider"), ge = d("FmMenuItem"), ye = d("FmMenu"), ke = d("FmFormGroup"), he = d("FmSwitch"), xe = d("FmSelect"), Fe = d("FmCard"), ne = d("fm-button"), Se = d("fm-side-sheet");
123
124
  return m(), y(V, null, [
124
125
  Me(t.$slots, "default", { trigger: M }),
125
126
  s(Se, {
@@ -136,7 +137,7 @@ const Ye = { class: "fm-typo-en-title-md-600" }, ze = {
136
137
  "onOn:clickedAway": e(fe)
137
138
  }, {
138
139
  "side-sheet-header": k(() => [
139
- v("p", Ye, U(h.value), 1)
140
+ v("p", ze, E(h.value), 1)
140
141
  ]),
141
142
  "side-sheet-footer": k(() => [
142
143
  v("div", Ge, [
@@ -156,8 +157,8 @@ const Ye = { class: "fm-typo-en-title-md-600" }, ze = {
156
157
  ])
157
158
  ]),
158
159
  default: k(() => [
159
- c.value ? (m(), y("div", Ke, [
160
- v("div", je, [
160
+ c.value ? (m(), y("div", je, [
161
+ v("div", Ke, [
161
162
  s(g, {
162
163
  class: "flex-2",
163
164
  label: e(o)("menu.sku.columns.code"),
@@ -185,17 +186,17 @@ const Ye = { class: "fm-typo-en-title-md-600" }, ze = {
185
186
  s(ke, {
186
187
  class: "col-span-2",
187
188
  "label-mark": "required",
188
- "model-value": L.value
189
+ "model-value": I.value
189
190
  }, {
190
191
  label: k(() => [
191
- s(T, {
192
+ s(L, {
192
193
  label: e(o)("menu.sku.columns.unit")
193
194
  }, null, 8, ["label"])
194
195
  ]),
195
196
  default: k(({ invalid: p }) => [
196
197
  s(ye, { "z-index": 101 }, {
197
198
  "menu-button": k(() => [
198
- s(A, {
199
+ s(D, {
199
200
  class: J([
200
201
  "fm-typo-en-body-lg-400",
201
202
  {
@@ -206,7 +207,7 @@ const Ye = { class: "fm-typo-en-title-md-600" }, ze = {
206
207
  "append-icon": "expand_more"
207
208
  }, {
208
209
  default: k(() => [
209
- we(U(L.value), 1)
210
+ we(E(I.value), 1)
210
211
  ]),
211
212
  _: 2
212
213
  }, 1032, ["invalid"])
@@ -214,11 +215,11 @@ const Ye = { class: "fm-typo-en-title-md-600" }, ze = {
214
215
  default: k(() => [
215
216
  v("div", qe, [
216
217
  (m(!0), y(V, null, q(i.value, (w, R) => (m(), y(V, { key: R }, [
217
- s(Y, {
218
+ s(z, {
218
219
  label: w.label
219
220
  }, null, 8, ["label"]),
220
- s(z),
221
- (m(!0), y(V, null, q(w.options, ($, dn) => (m(), B(ge, {
221
+ s(Y),
222
+ (m(!0), y(V, null, q(w.options, ($, dn) => (m(), N(ge, {
222
223
  label: $.label,
223
224
  "model-value": P($),
224
225
  onClick: (mn) => _(w.value, $.value),
@@ -258,23 +259,23 @@ const Ye = { class: "fm-typo-en-title-md-600" }, ze = {
258
259
  ]),
259
260
  s(ae, {
260
261
  "model-value": ((w = n.convert) == null ? void 0 : w.inventoryBindings) || [],
261
- type: e(oe.F_INVENTORY_BINDING_TYPE).enum.RECIPE,
262
+ type: e(oe).enum.RECIPE,
262
263
  "filter-option-ids": ve.value,
263
264
  "onUpdate:modelValue": ee
264
265
  }, null, 8, ["model-value", "type", "filter-option-ids"]),
265
266
  s(ae, {
266
267
  "model-value": ((R = n.convert) == null ? void 0 : R.inventoryBindings) || [],
267
- type: e(oe.F_INVENTORY_BINDING_TYPE).enum.SKU,
268
+ type: e(oe).enum.SKU,
268
269
  "filter-option-ids": pe.value,
269
270
  "onUpdate:modelValue": ee
270
271
  }, null, 8, ["model-value", "type", "filter-option-ids"])
271
- ], 64)) : j("", !0)
272
+ ], 64)) : K("", !0)
272
273
  ];
273
274
  }),
274
275
  _: 1
275
276
  })
276
- ])) : (m(), y("div", ze, [
277
- a.value.length === 0 ? (m(), B(e(ue), {
277
+ ])) : (m(), y("div", Ye, [
278
+ a.value.length === 0 ? (m(), N(e(ue), {
278
279
  key: 0,
279
280
  action: {
280
281
  text: e(o)("menu.unit.add"),
@@ -284,7 +285,7 @@ const Ye = { class: "fm-typo-en-title-md-600" }, ze = {
284
285
  },
285
286
  subtitle: e(o)("menu.sku.empty.subtitle"),
286
287
  title: e(o)("menu.sku.empty.no_unit")
287
- }, null, 8, ["action", "subtitle", "title"])) : j("", !0)
288
+ }, null, 8, ["action", "subtitle", "title"])) : K("", !0)
288
289
  ]))
289
290
  ]),
290
291
  _: 1
@@ -292,10 +293,10 @@ const Ye = { class: "fm-typo-en-title-md-600" }, ze = {
292
293
  ], 64);
293
294
  };
294
295
  }
295
- }), Je = He, Qe = Le("sku-manager", () => {
296
- const I = Be(), N = X(), o = Q(N), r = se(o), u = W(), S = $e(), { t: h } = Z(), x = (a) => {
296
+ }), Je = He, Qe = Ie("sku-manager", () => {
297
+ const T = Ne(), O = X(), o = Q(O), r = se(o), u = W(), S = $e(), { t: h } = Z(), x = (a) => {
297
298
  var c, n;
298
- const { vNode: i } = Ne(
299
+ const { vNode: i } = Oe(
299
300
  Je,
300
301
  S,
301
302
  a
@@ -306,7 +307,7 @@ const Ye = { class: "fm-typo-en-title-md-600" }, ze = {
306
307
  x({
307
308
  initialValue: a,
308
309
  usedCodes: u.skus.filter(({ _id: i }) => i !== (a == null ? void 0 : a._id)).map((i) => i.code),
309
- invalidSkuAndRecipe: a ? Re({
310
+ invalidSkuAndRecipe: a ? Re.getInvalidSkuAndRecipe({
310
311
  id: a._id,
311
312
  skus: u.skus,
312
313
  recipes: u.state.menu.modules.recipe
@@ -319,8 +320,8 @@ const Ye = { class: "fm-typo-en-title-md-600" }, ze = {
319
320
  async function M(a) {
320
321
  C(a);
321
322
  }
322
- async function O(a) {
323
- I.open({
323
+ async function B(a) {
324
+ T.open({
324
325
  title: h("menu.common.dialog.remove.ingredient.title"),
325
326
  message: h("menu.common.dialog.remove.ingredient.message", { name: a.name }),
326
327
  primaryActions: {
@@ -347,7 +348,7 @@ const Ye = { class: "fm-typo-en-title-md-600" }, ze = {
347
348
  return {
348
349
  createSku: f,
349
350
  updateSku: M,
350
- deleteSku: O
351
+ deleteSku: B
351
352
  };
352
353
  }), We = {
353
354
  key: 0,
@@ -374,14 +375,14 @@ const Ye = { class: "fm-typo-en-title-md-600" }, ze = {
374
375
  class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4"
375
376
  }, cn = {
376
377
  class: "fm-typo-en-body-md-600 font-semibold"
377
- }, xn = /* @__PURE__ */ ie({
378
+ }, Fn = /* @__PURE__ */ ie({
378
379
  __name: "Ingredient",
379
- setup(I) {
380
- const N = X();
381
- Q(N);
380
+ setup(T) {
381
+ const O = X();
382
+ Q(O);
382
383
  const o = W(), r = Qe(), {
383
384
  t: u
384
- } = Z(), S = b(() => o.skus), h = b(() => S.value.filter((i) => `${i.name} ${i.code} ${i._unit} (${i._abbrev})`.toLowerCase().includes(x.value.toLowerCase()))), x = E(""), C = E([{
385
+ } = Z(), S = b(() => o.skus), h = b(() => S.value.filter((i) => `${i.name} ${i.code} ${i._unit} (${i._abbrev})`.toLowerCase().includes(x.value.toLowerCase()))), x = U(""), C = U([{
385
386
  accessorKey: "code",
386
387
  header: () => u("menu.ingredient.table.columns.code"),
387
388
  enableSorting: !1
@@ -422,13 +423,13 @@ const Ye = { class: "fm-typo-en-title-md-600" }, ze = {
422
423
  function f(i) {
423
424
  r.updateSku(i);
424
425
  }
425
- const M = b(() => S.value.length), O = Ie(), a = b(() => O.breakpoints.value.xs);
426
+ const M = b(() => S.value.length), B = Te(), a = b(() => B.breakpoints.value.xs);
426
427
  return (i, c) => {
427
- const n = d("FmSearch"), F = d("FmTable"), L = d("fm-button"), P = d("FmSpacer");
428
- return m(), B(Oe, {
428
+ const n = d("FmSearch"), F = d("FmTable"), I = d("fm-button"), P = d("FmSpacer");
429
+ return m(), N(Be, {
429
430
  heading: e(u)("menu.ingredient.title")
430
431
  }, {
431
- default: k(() => [S.value.length === 0 ? (m(), B(e(ue), {
432
+ default: k(() => [S.value.length === 0 ? (m(), N(e(ue), {
432
433
  key: 0,
433
434
  action: {
434
435
  text: e(u)("menu.ingredient.empty.action"),
@@ -452,11 +453,11 @@ const Ye = { class: "fm-typo-en-title-md-600" }, ze = {
452
453
  key: _._id,
453
454
  class: J(["py-12 px-16", "flex space-x-8", "items-center"]),
454
455
  onClick: () => e(r).updateSku(_)
455
- }, [v("div", tn, [v("p", ln, U(_.name), 1), v("p", on, U(e(u)("menu.ingredient.table.mobile.code", {
456
+ }, [v("div", tn, [v("p", ln, E(_.name), 1), v("p", on, E(e(u)("menu.ingredient.table.mobile.code", {
456
457
  code: _.code
457
- })), 1), v("p", an, U(e(u)("menu.ingredient.table.mobile.unit", {
458
+ })), 1), v("p", an, E(e(u)("menu.ingredient.table.mobile.unit", {
458
459
  unit: `${_._unit} (${_._abbrev})`
459
- })), 1)]), s(L, {
460
+ })), 1)]), s(I, {
460
461
  variant: e(ce).Tertiary,
461
462
  "prepend-icon": "delete",
462
463
  "text-color": "neutral-gray-400",
@@ -476,17 +477,17 @@ const Ye = { class: "fm-typo-en-title-md-600" }, ze = {
476
477
  "pin-header-row": "",
477
478
  onRowClick: c[1] || (c[1] = (_) => f(_.original))
478
479
  }, null, 8, ["column-defs", "row-data", "page-size"])]))], 64))]),
479
- "append-heading": k(() => [v("div", sn, [v("div", un, [v("div", rn, [v("p", cn, U(M.value), 1)])]), s(P), S.value.length > 0 ? (m(), B(Te, {
480
+ "append-heading": k(() => [v("div", sn, [v("div", un, [v("div", rn, [v("p", cn, E(M.value), 1)])]), s(P), S.value.length > 0 ? (m(), N(Le, {
480
481
  key: 0,
481
482
  label: e(u)("menu.ingredient.actions.add"),
482
483
  "prepend-icon": "add",
483
484
  onClick: e(r).createSku
484
- }, null, 8, ["label", "onClick"])) : j("", !0)])]),
485
+ }, null, 8, ["label", "onClick"])) : K("", !0)])]),
485
486
  _: 1
486
487
  }, 8, ["heading"]);
487
488
  };
488
489
  }
489
490
  });
490
491
  export {
491
- xn as default
492
+ Fn as default
492
493
  };
@@ -1,10 +1,11 @@
1
- import { defineComponent as z, ref as p, computed as S, watch as F, resolveComponent as v, openBlock as V, createElementBlock as I, Fragment as D, renderSlot as E, createVNode as i, unref as n, withCtx as d, createBlock as N, createCommentVNode as O, createElementVNode as h, toDisplayString as L } from "vue";
1
+ import { defineComponent as z, ref as f, computed as S, watch as F, resolveComponent as v, openBlock as V, createElementBlock as I, Fragment as D, renderSlot as E, createVNode as l, unref as n, withCtx as m, createBlock as L, createCommentVNode as O, createElementVNode as h, toDisplayString as N } from "vue";
2
2
  import { components as j, FmButtonVariant as A } from "@feedmepos/ui-library";
3
- import { d as _, V as P, g as U, N as $ } from "./app-BFJlAowN.js";
4
- import { useI18n as q } from "@feedmepos/mf-common";
5
- import { u as x, l as M } from "./lodash-247YxYiQ.js";
3
+ import { c as _, T as P, d as T, L as U } from "./app-rWkFl8Vq.js";
4
+ import "@feedmepos/core";
5
+ import { useI18n as $ } from "@feedmepos/mf-common";
6
+ import { u as q, l as x } from "./lodash-BsZHKgKE.js";
6
7
  /* empty css */
7
- const T = { class: "fm-typo-en-title-md-600 mr-auto" }, G = { class: "flex gap-8 items-center justify-start" }, H = /* @__PURE__ */ z({
8
+ const M = { class: "fm-typo-en-title-md-600 mr-auto" }, G = { class: "flex gap-8 items-center justify-start" }, H = /* @__PURE__ */ z({
8
9
  __name: "LinkProductSideSheet",
9
10
  props: {
10
11
  initialValue: { default: () => [] },
@@ -15,34 +16,34 @@ const T = { class: "fm-typo-en-title-md-600 mr-auto" }, G = { class: "flex gap-8
15
16
  useCloseBtn: { type: Boolean }
16
17
  },
17
18
  emits: ["submit"],
18
- setup(b, { emit: g }) {
19
- const s = b, k = g, a = p(!1), m = (e) => {
20
- U.isBoolean(e) ? a.value = e : a.value = !a.value;
19
+ setup(b, { emit: k }) {
20
+ const s = b, y = k, a = f(!1), d = (e) => {
21
+ T.isBoolean(e) ? a.value = e : a.value = !a.value;
21
22
  };
22
23
  function r(e) {
23
24
  return e.reduce((t, o) => (t[o._id] = [...t[o._id] ?? [], o], t), {});
24
25
  }
25
- const y = s.initialValue, l = p(r(_(y))), f = S(() => Object.values(l.value).flatMap((e) => e)), w = x(
26
- () => !M.isEqual(r(s.initialValue), l.value),
26
+ const g = s.initialValue, i = f(r(_(g))), p = S(() => Object.values(i.value).flatMap((e) => e)), w = q(
27
+ () => !x.isEqual(r(s.initialValue), i.value),
27
28
  () => {
28
29
  a.value = !1;
29
30
  }
30
31
  );
31
32
  function B() {
32
- k("submit", f.value), a.value = !1;
33
+ y("submit", p.value), a.value = !1;
33
34
  }
34
35
  F(
35
36
  () => a.value,
36
37
  () => {
37
- l.value = r(_(s.initialValue));
38
+ i.value = r(_(s.initialValue));
38
39
  }
39
40
  );
40
- const { t: u } = q();
41
+ const { t: u } = $();
41
42
  return (e, t) => {
42
43
  const o = v("fm-button"), C = v("fm-side-sheet");
43
44
  return V(), I(D, null, [
44
- E(e.$slots, "default", { trigger: m }, void 0, !0),
45
- i(C, {
45
+ E(e.$slots, "default", { trigger: d }, void 0, !0),
46
+ l(C, {
46
47
  id: "group-form",
47
48
  modelValue: a.value,
48
49
  "onUpdate:modelValue": t[2] || (t[2] = (c) => a.value = c),
@@ -56,25 +57,25 @@ const T = { class: "fm-typo-en-title-md-600 mr-auto" }, G = { class: "flex gap-8
56
57
  "z-index": 103,
57
58
  "onOn:clickedAway": n(w)
58
59
  }, {
59
- "side-sheet-header": d(() => [
60
- e.useCloseBtn ? O("", !0) : (V(), N(o, {
60
+ "side-sheet-header": m(() => [
61
+ e.useCloseBtn ? O("", !0) : (V(), L(o, {
61
62
  key: 0,
62
63
  variant: n(A).Tertiary,
63
64
  class: "cursor-pointer mr-4",
64
65
  "prepend-icon": "arrow_back",
65
- onClick: m
66
+ onClick: d
66
67
  }, null, 8, ["variant"])),
67
- h("p", T, L(e.title || n(u)("menu.link_product.title")), 1)
68
+ h("p", M, N(e.title || n(u)("menu.link_product.title")), 1)
68
69
  ]),
69
- "side-sheet-footer": d(() => [
70
+ "side-sheet-footer": m(() => [
70
71
  h("div", G, [
71
- i(o, {
72
+ l(o, {
72
73
  label: n(u)("menu.common.actions.confirm"),
73
74
  size: "lg",
74
75
  type: "submit",
75
76
  variant: "primary"
76
77
  }, null, 8, ["label"]),
77
- i(o, {
78
+ l(o, {
78
79
  label: n(u)("menu.common.actions.cancel"),
79
80
  size: "lg",
80
81
  variant: "tertiary",
@@ -82,15 +83,15 @@ const T = { class: "fm-typo-en-title-md-600 mr-auto" }, G = { class: "flex gap-8
82
83
  }, null, 8, ["label"])
83
84
  ])
84
85
  ]),
85
- default: d(() => [
86
- i(P, {
86
+ default: m(() => [
87
+ l(P, {
87
88
  "auto-focus-search": !0,
88
89
  "categorized-items": e.categorizedItems,
89
- data: l.value,
90
+ data: i.value,
90
91
  "select-variant": e.selectVariant,
91
- "selected-items": f.value,
92
+ "selected-items": p.value,
92
93
  "show-variant": e.showVariant,
93
- "onUpdate:data": t[0] || (t[0] = (c) => l.value = c)
94
+ "onUpdate:data": t[0] || (t[0] = (c) => i.value = c)
94
95
  }, null, 8, ["categorized-items", "data", "select-variant", "selected-items", "show-variant"])
95
96
  ]),
96
97
  _: 1
@@ -98,7 +99,7 @@ const T = { class: "fm-typo-en-title-md-600 mr-auto" }, G = { class: "flex gap-8
98
99
  ], 64);
99
100
  };
100
101
  }
101
- }), Y = /* @__PURE__ */ $(H, [["__scopeId", "data-v-c33d339f"]]);
102
+ }), Z = /* @__PURE__ */ U(H, [["__scopeId", "data-v-c33d339f"]]);
102
103
  export {
103
- Y as L
104
+ Z as L
104
105
  };
@@ -1,10 +1,11 @@
1
- import { defineComponent as Q, ref as k, computed as p, resolveComponent as g, openBlock as d, createElementBlock as w, Fragment as D, createVNode as i, unref as a, withCtx as _, createElementVNode as s, toDisplayString as M, createBlock as U, renderList as Y, createCommentVNode as W, h as m, withModifiers as G } from "vue";
2
- import { d as H, b as C, h as q, u as te, i as ne, a as oe, _ as ae, f as le, k as re, j as se } from "./app-BFJlAowN.js";
1
+ import { defineComponent as Q, ref as k, computed as p, resolveComponent as g, openBlock as c, createElementBlock as w, Fragment as D, createVNode as i, unref as a, withCtx as _, createElementVNode as s, toDisplayString as M, createBlock as U, renderList as Y, createCommentVNode as W, h as m, withModifiers as G } from "vue";
2
+ import { c as H, e as C, f as q, u as te, g as ne, a as oe, _ as ae, b as le, i as re, h as se } from "./app-rWkFl8Vq.js";
3
3
  import { components as X, useSnackbar as ie, useDialog as ue } from "@feedmepos/ui-library";
4
- import { _ as de } from "./ApplyProducts.vue_vue_type_script_setup_true_lang-BRepaPR3.js";
4
+ import { _ as ce } from "./ApplyProducts.vue_vue_type_script_setup_true_lang-CF-fCyCs.js";
5
+ import "@feedmepos/core";
5
6
  import { useI18n as Z } from "@feedmepos/mf-common";
6
7
  import { _ as J } from "./FormSection.vue_vue_type_script_setup_true_lang-BWJUD8NZ.js";
7
- import { u as ce, l as me } from "./lodash-247YxYiQ.js";
8
+ import { u as de, l as me } from "./lodash-BsZHKgKE.js";
8
9
  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" }, ke = { class: "flex items-center border-b border-b-fm-color-neutral-gray-100" }, xe = { class: "px-16 py-8 flex-1" }, Fe = { class: "py-8" }, Ie = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__ */ Q({
9
10
  __name: "PrintDepartmentDialog",
10
11
  props: {
@@ -61,14 +62,14 @@ const pe = { class: "fm-typo-en-title-md-600" }, _e = { class: "space-y-32" }, f
61
62
  );
62
63
  return I.length && u.push({ ...z, items: I }), u;
63
64
  }, []);
64
- }), c = k();
65
+ }), d = k();
65
66
  function P() {
66
67
  var t;
67
- (t = c.value) == null || t.show($.value);
68
+ (t = d.value) == null || t.show($.value);
68
69
  }
69
70
  const T = y;
70
71
  k();
71
- const E = ce(
72
+ const E = de(
72
73
  () => !me.isEqual(L.value, l.value),
73
74
  () => {
74
75
  b.value = !1;
@@ -79,7 +80,7 @@ const pe = { class: "fm-typo-en-title-md-600" }, _e = { class: "space-y-32" }, f
79
80
  }
80
81
  return (t, u) => {
81
82
  const z = g("FmTextField"), I = g("FmButton"), A = g("FmSearch"), ee = g("FmSideSheet");
82
- return d(), w(D, null, [
83
+ return c(), w(D, null, [
83
84
  i(ee, {
84
85
  modelValue: b.value,
85
86
  "onUpdate:modelValue": u[2] || (u[2] = (v) => b.value = v),
@@ -131,7 +132,7 @@ const pe = { class: "fm-typo-en-title-md-600" }, _e = { class: "space-y-32" }, f
131
132
  ]),
132
133
  _: 1
133
134
  }, 8, ["title"]),
134
- f.canApplyItems ? (d(), U(J, {
135
+ f.canApplyItems ? (c(), U(J, {
135
136
  key: 0,
136
137
  title: a(r)("menu.print_route.department_dialog.sections.link_product.title")
137
138
  }, {
@@ -160,9 +161,9 @@ const pe = { class: "fm-typo-en-title-md-600" }, _e = { class: "space-y-32" }, f
160
161
  ])
161
162
  ]),
162
163
  s("div", he, [
163
- (d(!0), w(D, null, Y(o.value, (v) => (d(), w("div", null, [
164
+ (c(!0), w(D, null, Y(o.value, (v) => (c(), w("div", null, [
164
165
  s("div", be, M(v.name), 1),
165
- (d(!0), w(D, null, Y(v.items, (j) => (d(), w("div", ke, [
166
+ (c(!0), w(D, null, Y(v.items, (j) => (c(), w("div", ke, [
166
167
  s("div", xe, M(j.name), 1),
167
168
  s("div", Fe, [
168
169
  i(I, {
@@ -183,9 +184,9 @@ const pe = { class: "fm-typo-en-title-md-600" }, _e = { class: "space-y-32" }, f
183
184
  ]),
184
185
  _: 1
185
186
  }, 8, ["modelValue", "header", "is-container", "is-container-props", "onOn:clickedAway"]),
186
- i(de, {
187
+ i(ce, {
187
188
  ref_key: "applyProductRef",
188
- ref: c,
189
+ ref: d,
189
190
  "can-select-variant": !1,
190
191
  options: f.categorizedItems,
191
192
  title: a(r)("menu.print_route.department_dialog.sections.link_product.title"),
@@ -234,18 +235,18 @@ const Te = {
234
235
  class: "fm-typo-en-body-lg-600"
235
236
  }, Se = {
236
237
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
237
- }, Ne = /* @__PURE__ */ Q({
238
+ }, Ke = /* @__PURE__ */ Q({
238
239
  __name: "PrintRoute",
239
240
  setup(f) {
240
241
  const {
241
242
  t: n
242
243
  } = Z(), y = te(), N = p(() => y.categorizedRawMenuItems), h = p(() => {
243
244
  const e = y.state.menu.modules.item;
244
- return y.printDepartments.map((c) => ({
245
- ...c,
245
+ return y.printDepartments.map((d) => ({
246
+ ...d,
246
247
  applyToItems: e.reduce((P, T) => {
247
248
  var E;
248
- return (E = T.print) != null && E.department.includes(c._id) && P.push(T), P;
249
+ return (E = T.print) != null && E.department.includes(d._id) && P.push(T), P;
249
250
  }, [])
250
251
  }), []);
251
252
  }), b = p(() => h.value.length > 0), L = p(() => [{
@@ -292,8 +293,8 @@ const Te = {
292
293
  x.value || (o = O.value) == null || o.showModal({
293
294
  ...e,
294
295
  applyToItems: e.applyToItems.map(({
295
- _id: c
296
- }) => c)
296
+ _id: d
297
+ }) => d)
297
298
  });
298
299
  }
299
300
  const l = ne(oe(ie())), x = p(() => l.checkMenuIsLoading());
@@ -310,9 +311,9 @@ const Te = {
310
311
  class: "fm-typo-en-body-lg-600"
311
312
  }, e.applyToItems.length), m("span", n("menu.print_route.dialogs.remove.message.products_count")), ...o, m("div", {
312
313
  class: "mt-8 fm-typo-en-body-md-400"
313
- }, e.applyToItems.map((c) => m("li", {
314
+ }, e.applyToItems.map((d) => m("li", {
314
315
  class: "mt-4"
315
- }, c.name)))]), r.open({
316
+ }, d.name)))]), r.open({
316
317
  title: n("menu.print_route.dialogs.remove.title"),
317
318
  contentComponent: m("div", o),
318
319
  primaryActions: {
@@ -334,11 +335,11 @@ const Te = {
334
335
  return h.value.filter((o) => o.name.toLowerCase().includes(e));
335
336
  });
336
337
  return (e, o) => {
337
- const c = g("FmSearch"), P = g("FmTable"), T = g("FmButton"), E = g("FmListItem"), B = g("FmList");
338
- return d(), U(ae, {
338
+ const d = g("FmSearch"), P = g("FmTable"), T = g("FmButton"), E = g("FmListItem"), B = g("FmList");
339
+ return c(), U(ae, {
339
340
  heading: a(n)("menu.print_route.title")
340
341
  }, {
341
- "append-heading": _(() => [s("div", Te, [b.value ? (d(), U(le, {
342
+ "append-heading": _(() => [s("div", Te, [b.value ? (c(), U(le, {
342
343
  key: 0,
343
344
  disabled: x.value,
344
345
  icon: "add",
@@ -346,9 +347,9 @@ const Te = {
346
347
  variant: "primary",
347
348
  onClick: R
348
349
  }, null, 8, ["disabled", "label"])) : W("", !0)])]),
349
- default: _(() => [b.value ? (d(), w(D, {
350
+ default: _(() => [b.value ? (c(), w(D, {
350
351
  key: 1
351
- }, [s("div", Ee, [i(c, {
352
+ }, [s("div", Ee, [i(d, {
352
353
  autofocus: "",
353
354
  modelValue: F.value,
354
355
  "onUpdate:modelValue": o[0] || (o[0] = (t) => F.value = t),
@@ -373,7 +374,7 @@ const Te = {
373
374
  class: "w-full px-16 xs:block hidden flex-1 min-h-0 overflow-scroll pb-64",
374
375
  separator: ""
375
376
  }, {
376
- default: _(() => [(d(!0), w(D, null, Y($.value, (t) => (d(), U(E, {
377
+ default: _(() => [(c(!0), w(D, null, Y($.value, (t) => (c(), U(E, {
377
378
  key: t._id,
378
379
  label: t.name,
379
380
  style: {
@@ -393,7 +394,7 @@ const Te = {
393
394
  _: 2
394
395
  }, 1032, ["label", "onClick"]))), 128))]),
395
396
  _: 1
396
- })], 64)) : (d(), U(a(re), {
397
+ })], 64)) : (c(), U(a(re), {
397
398
  key: 0,
398
399
  action: {
399
400
  text: a(n)("menu.print_route.empty.action"),
@@ -413,5 +414,5 @@ const Te = {
413
414
  }
414
415
  });
415
416
  export {
416
- Ne as default
417
+ Ke as default
417
418
  };
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./Product.vue_vue_type_script_setup_true_lang-D_oKtXbh.js";
1
+ import { _ as f } from "./Product.vue_vue_type_script_setup_true_lang-DeJy-daz.js";
2
2
  export {
3
3
  f as default
4
4
  };