@feedmepos/mf-inventory-portal 0.0.22-dev.36 → 0.0.22-dev.38

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 (64) hide show
  1. package/dist/{ApprovalView-av_qng0N.js → ApprovalView-B1EiHn4f.js} +8 -8
  2. package/dist/{BindingsDialog-VZ6YelwP.js → BindingsDialog-DmYWCMdc.js} +9 -9
  3. package/dist/{BindingsPicker-BFYv2ftI.js → BindingsPicker-B35A7Px5.js} +17 -17
  4. package/dist/{BindingsTable-DFowW8vT.js → BindingsTable-CtN6XTmL.js} +1 -1
  5. package/dist/{ClosingTemplateView-DNcgyBVw.js → ClosingTemplateView-Ch8hg35a.js} +15 -15
  6. package/dist/FmDroppableField-DK78vkN3.js +152 -0
  7. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CAZ4P0Ax.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-0p8dn-rc.js} +76 -76
  8. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DqOb7e4M.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DSQW1Ayz.js} +20 -20
  9. package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-Bb0W0wUH.js +51 -0
  10. package/dist/IngredientsView-C47jIp0f.js +1611 -0
  11. package/dist/{IntegrationView-DT5F9V0h.js → IntegrationView-Dulaskd9.js} +71 -71
  12. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CXw4tAI_.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-btsYefZJ.js} +1 -1
  13. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-C6a6F_jD.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BGLxTaW8.js} +16 -16
  14. package/dist/{PurchaseOrderPrintPreview-BMCy5C1z.js → PurchaseOrderPrintPreview-BtDEZAgl.js} +7 -7
  15. package/dist/{ReceiveRequestView-DBU59iYm.js → ReceiveRequestView-Cf6UV1Gz.js} +1042 -1029
  16. package/dist/{RecipeView-Brnk8Ar7.js → RecipeView-MagbCdki.js} +30 -29
  17. package/dist/StockView-D1TK5omK.js +7762 -0
  18. package/dist/{SupplierView-C0GT_JzY.js → SupplierView-CIUY0y12.js} +11 -11
  19. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-BzJ8TnL_.js → TransferDetails.vue_vue_type_script_setup_true_lang-CacJUhOj.js} +99 -101
  20. package/dist/TransferTemplateView-CetnHs4Q.js +2054 -0
  21. package/dist/{UnitView-Dw2xLWy4.js → UnitView-BDZRBWlk.js} +16 -16
  22. package/dist/{WarehouseView-Cgf1mP8s.js → WarehouseView-DtUxLB_u.js} +20 -20
  23. package/dist/api/bill.d.ts +84 -238
  24. package/dist/api/purchase-order-template.d.ts +4 -2
  25. package/dist/{app-Iz-opVBA.js → app-BGqgEJv-.js} +18166 -18188
  26. package/dist/app.js +2 -2
  27. package/dist/{decimal-ffsKJesh.js → decimal-NPqoitzq.js} +1 -1
  28. package/dist/defineDeepModel-C4ebJegy.js +13 -0
  29. package/dist/format-time-from-id-DkB5tphe.js +15 -0
  30. package/dist/helper/xlsx.util.d.ts +7 -0
  31. package/dist/purchase-order-transaction-type-ag48uMYt.js +348 -0
  32. package/dist/stores/inventory.d.ts +63 -0
  33. package/dist/stores/location.d.ts +89 -0
  34. package/dist/stores/supplier.d.ts +120 -3
  35. package/dist/stores/warehouse.d.ts +7 -4
  36. package/dist/supplier-CBaaZ4vA.js +70 -0
  37. package/dist/tsconfig.app.tsbuildinfo +1 -1
  38. package/dist/{use-template-enabled-locations-2-BSLLHtkm.js → use-template-enabled-locations-2-CYsM7ABF.js} +1 -1
  39. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +2 -2
  40. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +2 -2
  41. package/dist/views/ingredients/composables/use-ingredient-form.d.ts +2 -2
  42. package/dist/views/recipe/composables/use-recipe-form.d.ts +2 -2
  43. package/dist/views/stock/components/StockRecordCard.vue.d.ts +42 -119
  44. package/dist/views/stock/composables/use-stock-action.d.ts +2 -2
  45. package/dist/views/transfer-template/components/transfer-template-import/TransferTemplateImport.vue.d.ts +2 -0
  46. package/dist/views/transfer-template/components/transfer-template-import/TransferTemplateImportItem.vue.d.ts +12 -0
  47. package/dist/views/transfer-template/components/transfer-template-import/TransferTemplateImportItemProps.d.ts +9 -0
  48. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +10 -6
  49. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +1850 -5
  50. package/dist/views/transfer-template/helpers/import-export.helper.d.ts +76 -0
  51. package/dist/views/transfer-template/helpers/remove-deleted-skus.helper.d.ts +1 -230
  52. package/dist/views/unit/composables/use-unit-form.d.ts +2 -2
  53. package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +14 -8
  54. package/dist/{xlsx-C8qXPxB4.js → xlsx-DQC0TWcU.js} +651 -651
  55. package/dist/xlsx.util-N5bu_PXw.js +78 -0
  56. package/package.json +3 -3
  57. package/dist/IngredientsView-afICUj_U.js +0 -1755
  58. package/dist/StockView-BtTZNhlp.js +0 -1909
  59. package/dist/TransferTemplateView-SrBMTzU-.js +0 -1237
  60. package/dist/defineDeepModel-CDrYKSnU.js +0 -13
  61. package/dist/format-time-from-id-e9QU46u4.js +0 -15
  62. package/dist/purchase-order-transaction-type-DN3Czz6K.js +0 -338
  63. package/dist/supplier-DdJIh1nj.js +0 -69
  64. package/dist/xlsx.util-DGLr1W_5.js +0 -109
@@ -1,43 +1,43 @@
1
1
  import { defineComponent as z, mergeModels as le, useModel as re, onMounted as ae, ref as P, computed as K, resolveComponent as L, openBlock as F, createElementBlock as B, createElementVNode as u, toDisplayString as I, createVNode as V, createBlock as U, withCtx as D, Fragment as E, renderList as G, normalizeClass as R, normalizeStyle as de, createSlots as ue, unref as w, createCommentVNode as O, withModifiers as ce, reactive as J, watch as Q, isRef as X, Teleport as fe } from "vue";
2
2
  import { E as me } from "./empty-placeholder-wf6-BWE8.js";
3
- import { ap as ee, aj as pe, c as q, aq as ge, j as ve } from "./app-Iz-opVBA.js";
3
+ import { at as ee, an as pe, c as q, i as ve, au as ge } from "./app-BGqgEJv-.js";
4
4
  import { useDialogChild as ye, useDialog as te, useProxiedModel as ne, useSnackbar as be, useBreakpoints as he } from "@feedmepos/ui-library";
5
5
  import { useI18n as T, useCoreStore as _e } from "@feedmepos/mf-common";
6
- import { _ as Ce, a as xe } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DqOb7e4M.js";
6
+ import { _ as Ce, a as xe } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DSQW1Ayz.js";
7
7
  const He = "data:image/svg+xml,%3csvg%20width='200'%20height='101'%20viewBox='0%200%20200%20101'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M98.9161%2038.4456V24.1772H108.527V27.1988H102.12V30.2202H107.347V32.7382H102.12V38.4456H98.9161Z'%20fill='%235D5359'/%3e%3cpath%20d='M110.382%2031.2276C110.382%2027.5345%20113.249%2024.1772%20117.127%2024.1772C121.174%2024.1772%20123.872%2027.7024%20123.872%2031.3953C123.872%2035.0884%20121.005%2038.6133%20117.127%2038.6133C113.08%2038.4456%20110.382%2034.9204%20110.382%2031.2276ZM117.127%2035.5919C119.487%2035.5919%20120.499%2033.4096%20120.499%2031.2276C120.499%2029.0452%20119.319%2027.0309%20117.127%2027.0309C114.935%2027.0309%20113.754%2029.213%20113.754%2031.2276C113.754%2033.5776%20114.935%2035.5919%20117.127%2035.5919Z'%20fill='%235D5359'/%3e%3cpath%20d='M126.232%2031.2276C126.232%2027.5345%20129.099%2024.1772%20132.977%2024.1772C137.024%2024.1772%20139.722%2027.7024%20139.722%2031.3953C139.722%2035.0884%20136.855%2038.6133%20132.977%2038.6133C128.93%2038.4456%20126.232%2034.9204%20126.232%2031.2276ZM132.977%2035.5919C135.337%2035.5919%20136.349%2033.4096%20136.349%2031.2276C136.349%2029.0452%20135.169%2027.0309%20132.977%2027.0309C130.785%2027.0309%20129.604%2029.213%20129.604%2031.2276C129.604%2033.5776%20130.785%2035.5919%20132.977%2035.5919Z'%20fill='%235D5359'/%3e%3cpath%20d='M142.926%2038.4455V24.345H148.153C152.874%2024.345%20155.235%2027.5343%20155.235%2031.3952C155.235%2035.5918%20152.368%2038.4455%20148.153%2038.4455H142.926ZM148.153%2027.0308H146.129V35.4238H148.153C150.513%2035.4238%20151.862%2033.5775%20151.862%2031.2272C151.862%2028.8773%20150.513%2027.0308%20148.153%2027.0308Z'%20fill='%235D5359'/%3e%3cpath%20d='M110.045%2057.5607V49.1676L107.009%2055.2107H105.324L102.12%2049.1676V57.5607H98.9161V43.4604H102.457L106.167%2050.8465L109.876%2043.4604H113.417V57.5607H110.045Z'%20fill='%235D5359'/%3e%3cpath%20d='M115.947%2057.5607L121.342%2043.4604H124.04L129.436%2057.5607H125.895L124.715%2054.3716H120.331L119.319%2057.5607H115.947ZM122.691%2046.9856L121.005%2052.1893H124.378L122.691%2046.9856Z'%20fill='%235D5359'/%3e%3cpath%20d='M131.965%2057.5607V43.4604H138.373C141.07%2043.4604%20142.925%2045.8105%20142.925%2048.1605C142.925%2049.8393%20142.082%2051.5179%20140.565%2052.1893L143.768%2057.393H140.059L137.192%2052.8607H135V57.393H131.965V57.5607ZM135.169%2050.175H138.204C139.047%2050.175%20139.553%2049.3356%20139.553%2048.1605C139.553%2046.9856%20138.71%2046.3142%20138.035%2046.3142H135.169V50.175Z'%20fill='%235D5359'/%3e%3cpath%20d='M146.635%2057.5607V43.4604H150.007V49.8393L155.403%2043.4604H158.776L153.548%2049.6713L159.281%2057.5607H155.74L151.693%2051.5179L150.007%2053.3642V57.5607H146.635Z'%20fill='%235D5359'/%3e%3cpath%20d='M171.422%2054.7073V57.5607H161.474V43.4604H171.253V46.3142H164.677V48.9999H170.242V51.6856H164.677V54.7073H171.422Z'%20fill='%235D5359'/%3e%3cpath%20d='M185.417%2046.3142H181.202V57.5607H177.829V46.3142H173.614V43.4604H185.417V46.3142Z'%20fill='%235D5359'/%3e%3cpath%20d='M111.057%2062.5967V76.6973H107.853V70.9898H102.12V76.6973H98.9161V62.5967H102.12V68.1361H107.853V62.5967H111.057Z'%20fill='%235D5359'/%3e%3cpath%20d='M124.04%2069.815V62.5967H127.244V69.815C127.244%2073.6758%20125.389%2076.865%20121.005%2076.865C116.453%2076.865%20114.766%2073.5078%20114.766%2069.815V62.5967H117.97V69.815C117.97%2071.997%20118.813%2074.0115%20121.005%2074.0115C123.366%2074.0115%20124.04%2071.997%20124.04%2069.815Z'%20fill='%235D5359'/%3e%3cpath%20d='M138.036%2076.6973H131.122V62.5967H139.047C141.071%2062.5967%20142.251%2064.4433%20142.251%2066.2898C142.251%2067.6327%20141.576%2068.9755%20140.228%2069.4793C141.914%2069.9827%20142.926%2071.1578%20142.926%2073.1721C142.757%2075.5221%20140.733%2076.6973%20138.036%2076.6973ZM134.326%2065.4504V68.3041H137.53C138.204%2068.3041%20138.879%2067.8004%20138.879%2066.7933C138.879%2065.7861%20138.373%2065.2827%20137.698%2065.2827H134.326V65.4504ZM138.204%2070.8221H134.494V73.8435H138.204C139.047%2073.8435%20139.722%2073.1721%20139.722%2072.3327C139.553%2071.6613%20138.879%2070.8221%20138.204%2070.8221Z'%20fill='%235D5359'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M73.4753%2051.4994C78.7281%2050.5396%2082.8911%2046.4891%2083.9954%2041.3137L84.1232%2040.7134L83.9445%2040.1256C80.5804%2029.066%2071.9945%2020.2704%2061.0373%2016.5726C57.4%2015.3451%2053.5046%2014.6804%2049.458%2014.6804C45.4112%2014.6804%2041.5158%2015.3451%2037.8784%2016.5726C26.9214%2020.2704%2018.3354%2029.066%2014.9712%2040.1256L14.7924%2040.7134L14.9206%2041.3137C16.0247%2046.4891%2020.1875%2050.5396%2025.4405%2051.4994V58.8839H14.4183C14.6758%2059.9557%2014.9818%2061.0088%2015.3337%2062.0411C20.1553%2076.1811%2033.6083%2086.3619%2049.458%2086.3619C65.3074%2086.3619%2078.7606%2076.1811%2083.5822%2062.0411C83.9342%2061.0088%2084.2399%2059.9557%2084.4974%2058.8839H73.4753V51.4994ZM41.0517%2020.5973V38.5742C41.0517%2043.1931%2044.8155%2046.9371%2049.458%2046.9371C54.1005%2046.9371%2057.8641%2043.1931%2057.8641%2038.5742V20.5973C55.1919%2019.856%2052.3732%2019.4592%2049.458%2019.4592C46.5428%2019.4592%2043.7241%2019.856%2041.0517%2020.5973ZM62.6675%2022.3673V38.5742C62.6675%2043.1931%2066.431%2046.9371%2071.0735%2046.9371C74.9051%2046.9371%2078.1425%2044.3848%2079.1528%2040.8942C76.4672%2032.6902%2070.4379%2025.9824%2062.6675%2022.3673ZM60.2658%2046.1322C57.8753%2049.5094%2053.9255%2051.7159%2049.458%2051.7159C44.9902%2051.7159%2041.0408%2049.5094%2038.65%2046.1322C36.6982%2048.8894%2033.7074%2050.8662%2030.2439%2051.4994V58.8839H68.6718V51.4994C65.2083%2050.8662%2062.2175%2048.8894%2060.2658%2046.1322ZM21.1583%2063.6628C26.1349%2074.2514%2036.9382%2081.5834%2049.458%2081.5834C61.9776%2081.5834%2072.781%2074.2514%2077.7574%2063.6628H21.1583ZM36.2482%2038.5742V22.3673C28.4779%2025.9824%2022.4486%2032.6902%2019.7631%2040.8942C20.7733%2044.3848%2024.0106%2046.9371%2027.8422%2046.9371C32.4847%2046.9371%2036.2482%2043.1931%2036.2482%2038.5742Z'%20fill='%23FFC35D'/%3e%3c/svg%3e";
8
- function Y(x, v) {
9
- return ee.filter(x, v).length > 0;
8
+ function Y(x, g) {
9
+ return ee.filter(x, g).length > 0;
10
10
  }
11
- function ke(x, v) {
11
+ function ke(x, g) {
12
12
  if (!x)
13
13
  return {
14
- label: v,
14
+ label: g,
15
15
  segments: [
16
16
  {
17
17
  isMatch: !1,
18
- segment: v
18
+ segment: g
19
19
  }
20
20
  ],
21
21
  matched: !1
22
22
  };
23
- const [i] = ee.filter(x.toLocaleLowerCase(), [v], {
23
+ const [i] = ee.filter(x.toLocaleLowerCase(), [g], {
24
24
  pre: "|",
25
25
  post: "|"
26
26
  });
27
27
  if (!i)
28
28
  return {
29
- label: v,
30
- segments: [{ segment: v, isMatch: !1 }],
29
+ label: g,
30
+ segments: [{ segment: g, isMatch: !1 }],
31
31
  matched: !1
32
32
  };
33
- const g = i.string.toString().replace(/\|\|/g, "").split("|").reduce((r, c, M) => (r.push({
33
+ const v = i.string.toString().replace(/\|\|/g, "").split("|").reduce((r, c, M) => (r.push({
34
34
  segment: c,
35
35
  isMatch: M % 2 !== 0
36
36
  //e.g. index 1, 3, 5, ...
37
37
  }), r), new Array());
38
38
  return {
39
- label: v,
40
- segments: g,
39
+ label: g,
40
+ segments: v,
41
41
  matched: !0
42
42
  };
43
43
  }
@@ -63,14 +63,14 @@ const Me = { class: "flex flex-col gap-12 h-[350px]" }, Fe = { class: "flex item
63
63
  }),
64
64
  emits: ["update:modelValue"],
65
65
  setup(x) {
66
- const v = re(x, "modelValue"), i = ye();
66
+ const g = re(x, "modelValue"), i = ye();
67
67
  ae(() => {
68
- i.emitData(v.value);
68
+ i.emitData(g.value);
69
69
  });
70
- const g = P("");
70
+ const v = P("");
71
71
  function r(e) {
72
72
  return Y(
73
- g.value,
73
+ v.value,
74
74
  e.sublabel ? [e.label, e.sublabel] : [e.label]
75
75
  );
76
76
  }
@@ -78,14 +78,14 @@ const Me = { class: "flex flex-col gap-12 h-[350px]" }, Fe = { class: "flex item
78
78
  return r(e) ? !0 : Z(e) ? e.children.some(c) : !1;
79
79
  }
80
80
  function M(e, t) {
81
- if (!g.value)
81
+ if (!v.value)
82
82
  return !0;
83
83
  const [l, ...d] = e;
84
84
  if (typeof l != "number")
85
85
  return !1;
86
86
  const h = t[l];
87
87
  return Y(
88
- g.value,
88
+ v.value,
89
89
  h.sublabel ? [h.label, h.sublabel] : [h.label]
90
90
  ) ? !0 : d.length === 0 ? c(h) : Z(h) ? M(d, h.children) : !1;
91
91
  }
@@ -115,8 +115,8 @@ const Me = { class: "flex flex-col gap-12 h-[350px]" }, Fe = { class: "flex item
115
115
  }
116
116
  ];
117
117
  }
118
- const A = K(() => v.value.flatMap(
119
- (e, t) => S(e, [t]).filter((l) => M(l.keys, v.value))
118
+ const A = K(() => g.value.flatMap(
119
+ (e, t) => S(e, [t]).filter((l) => M(l.keys, g.value))
120
120
  ));
121
121
  function $(e) {
122
122
  if (Z(e)) {
@@ -196,10 +196,10 @@ const Me = { class: "flex flex-col gap-12 h-[350px]" }, Fe = { class: "flex item
196
196
  return y.value.find((l) => t.startsWith(l) && t !== l);
197
197
  }
198
198
  const a = K(
199
- () => A.value.filter((e) => M(e.keys, v.value) && e.active).length
199
+ () => A.value.filter((e) => M(e.keys, g.value) && e.active).length
200
200
  );
201
201
  function p(e, t, l) {
202
- v.value = H(e, t, l), i.emitData(v.value);
202
+ g.value = H(e, t, l), i.emitData(g.value);
203
203
  }
204
204
  return (e, t) => {
205
205
  const l = L("FmSearch"), d = L("FmCheckbox"), h = L("FmButton"), _ = L("FmListItem"), N = L("FmList");
@@ -208,8 +208,8 @@ const Me = { class: "flex flex-col gap-12 h-[350px]" }, Fe = { class: "flex item
208
208
  u("div", $e, I(a.value) + " items selected", 1),
209
209
  u("div", we, [
210
210
  V(l, {
211
- modelValue: g.value,
212
- "onUpdate:modelValue": t[0] || (t[0] = (C) => g.value = C),
211
+ modelValue: v.value,
212
+ "onUpdate:modelValue": t[0] || (t[0] = (C) => v.value = C),
213
213
  placeholder: "Filter items"
214
214
  }, null, 8, ["modelValue"])
215
215
  ])
@@ -229,7 +229,7 @@ const Me = { class: "flex flex-col gap-12 h-[350px]" }, Fe = { class: "flex item
229
229
  }, [
230
230
  V(_, {
231
231
  clickable: C.selectable !== !1,
232
- onClick: () => C.selectable === !1 || C.disabled || p(C.keys, v.value, !k(C.keys, v.value)),
232
+ onClick: () => C.selectable === !1 || C.disabled || p(C.keys, g.value, !k(C.keys, g.value)),
233
233
  style: de({
234
234
  paddingLeft: `${16 + C.indent * 16}px`,
235
235
  paddingTop: "4px",
@@ -240,7 +240,7 @@ const Me = { class: "flex flex-col gap-12 h-[350px]" }, Fe = { class: "flex item
240
240
  default: D(() => [
241
241
  u("div", Se, [
242
242
  u("div", Ae, [
243
- (F(!0), B(E, null, G(w(ke)(g.value, C.label).segments, (j, se) => (F(), B("span", {
243
+ (F(!0), B(E, null, G(w(ke)(v.value, C.label).segments, (j, se) => (F(), B("span", {
244
244
  key: se,
245
245
  class: R({
246
246
  "font-bold": j.isMatch
@@ -263,9 +263,9 @@ const Me = { class: "flex flex-col gap-12 h-[350px]" }, Fe = { class: "flex item
263
263
  fn: D(() => [
264
264
  V(d, {
265
265
  disabled: C.disabled,
266
- "model-value": k(C.keys, v.value),
266
+ "model-value": k(C.keys, g.value),
267
267
  value: C.keys,
268
- indeterminate: b(C.keys, v.value)
268
+ indeterminate: b(C.keys, g.value)
269
269
  }, null, 8, ["disabled", "model-value", "value", "indeterminate"])
270
270
  ]),
271
271
  key: "0"
@@ -316,8 +316,8 @@ const Me = { class: "flex flex-col gap-12 h-[350px]" }, Fe = { class: "flex item
316
316
  }
317
317
  },
318
318
  emits: ["update:modifiers"],
319
- setup(x, { emit: v }) {
320
- const i = x, g = v, r = te(), c = K(() => {
319
+ setup(x, { emit: g }) {
320
+ const i = x, v = g, r = te(), c = K(() => {
321
321
  const f = i.groups.flatMap((b) => b.items.map((m) => {
322
322
  const H = i.items.find((y) => y._id === m._id);
323
323
  return {
@@ -336,7 +336,7 @@ const Me = { class: "flex flex-col gap-12 h-[350px]" }, Fe = { class: "flex item
336
336
  });
337
337
  }), M = K(() => i.groups.flatMap((f) => f.items.map((b) => ({ ...b, groupId: f._id }))));
338
338
  function S({ selection: f }) {
339
- g(
339
+ v(
340
340
  "update:modifiers",
341
341
  i.modifiers.filter((b) => b.selection !== f)
342
342
  );
@@ -401,7 +401,7 @@ const Me = { class: "flex flex-col gap-12 h-[350px]" }, Fe = { class: "flex item
401
401
  code: ((t = H.find(({ selection: l }) => o.value === l)) == null ? void 0 : t.code) ?? ""
402
402
  });
403
403
  });
404
- }), g("update:modifiers", y);
404
+ }), v("update:modifiers", y);
405
405
  });
406
406
  }
407
407
  const { t: k } = T();
@@ -466,14 +466,14 @@ const Me = { class: "flex flex-col gap-12 h-[350px]" }, Fe = { class: "flex item
466
466
  };
467
467
  }
468
468
  });
469
- function Oe(x, v = []) {
470
- const i = v.map((r) => x.find((c) => c._id === r)).filter((r) => !!r);
469
+ function Oe(x, g = []) {
470
+ const i = g.map((r) => x.find((c) => c._id === r)).filter((r) => !!r);
471
471
  return Re(i).reduce((r, c) => (r[c.combinationKey] = c.selectionName.join(" / "), r), {});
472
472
  }
473
- function ze(x, v, i) {
474
- const g = i.reduce((c, M) => {
473
+ function ze(x, g, i) {
474
+ const v = i.reduce((c, M) => {
475
475
  var k, f, b;
476
- const S = M.category || "", A = Oe(v, (k = M.variant) == null ? void 0 : k.variantGroupIds), $ = {
476
+ const S = M.category || "", A = Oe(g, (k = M.variant) == null ? void 0 : k.variantGroupIds), $ = {
477
477
  ...M,
478
478
  codeName: [M.code, M.name].filter((m) => !!m).join(" "),
479
479
  variant: {
@@ -488,42 +488,42 @@ function ze(x, v, i) {
488
488
  }
489
489
  };
490
490
  return c[S] = c[S] ? [...c[S], $] : [$], c;
491
- }, {}), r = Object.values(g)[0];
491
+ }, {}), r = Object.values(v)[0];
492
492
  return x.length === 0 && r ? r.map((c) => ({
493
493
  id: c._id,
494
494
  name: c.name ?? "",
495
- items: g[c._id || ""] || []
495
+ items: v[c._id || ""] || []
496
496
  })) || [] : x.map((c) => ({
497
497
  id: c._id,
498
498
  name: c.name ?? "",
499
- items: g[c._id || ""] || []
499
+ items: v[c._id || ""] || []
500
500
  }));
501
501
  }
502
- function ie(x, v) {
502
+ function ie(x, g) {
503
503
  if (x.length == 1)
504
504
  return x[0];
505
- const i = x[0], g = x.slice(1, x.length), r = ie(g, v);
506
- return i.reduce((M, S) => [...M, ...r.map((A) => v(S, A))], new Array());
505
+ const i = x[0], v = x.slice(1, x.length), r = ie(v, g);
506
+ return i.reduce((M, S) => [...M, ...r.map((A) => g(S, A))], new Array());
507
507
  }
508
508
  function Re(x) {
509
509
  if (x.length === 0) return [];
510
- const v = x.map(
511
- (g) => (g.options ?? []).map(
510
+ const g = x.map(
511
+ (v) => (v.options ?? []).map(
512
512
  (r) => ({
513
- combinationKey: [`${g._id}/${r._id}`],
513
+ combinationKey: [`${v._id}/${r._id}`],
514
514
  selectionName: [r.name ?? ""]
515
515
  })
516
516
  )
517
517
  );
518
- return ie(v, (g, r) => ({
519
- combinationKey: [...g.combinationKey, ...r.combinationKey],
520
- selectionName: [...g.selectionName, ...r.selectionName]
521
- })).map((g) => {
522
- const r = [...g.combinationKey];
518
+ return ie(g, (v, r) => ({
519
+ combinationKey: [...v.combinationKey, ...r.combinationKey],
520
+ selectionName: [...v.selectionName, ...r.selectionName]
521
+ })).map((v) => {
522
+ const r = [...v.combinationKey];
523
523
  return r.sort(), {
524
524
  combinationKey: r.join("/"),
525
525
  active: !0,
526
- selectionName: g.selectionName
526
+ selectionName: v.selectionName
527
527
  };
528
528
  });
529
529
  }
@@ -558,8 +558,8 @@ const Te = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
558
558
  }
559
559
  },
560
560
  emits: ["update:bindings"],
561
- setup(x, { emit: v }) {
562
- const i = x, g = v, r = te(), c = K(() => i.isAddon ? "Addons" : "Products"), M = K(() => i.isAddon ? [] : i.categories), S = K(
561
+ setup(x, { emit: g }) {
562
+ const i = x, v = g, r = te(), c = K(() => i.isAddon ? "Addons" : "Products"), M = K(() => i.isAddon ? [] : i.categories), S = K(
563
563
  () => ze(M.value, i.variants, i.menus)
564
564
  ), A = K(() => {
565
565
  if (i.isAddon)
@@ -591,7 +591,7 @@ const Te = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
591
591
  });
592
592
  });
593
593
  function $(n) {
594
- g(
594
+ v(
595
595
  "update:bindings",
596
596
  i.bindings.filter(
597
597
  (o) => o.productId !== n.productId || o.combinationKey !== n.combinationKey
@@ -718,7 +718,7 @@ const Te = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
718
718
  }
719
719
  }).onPrimary((a) => {
720
720
  let p;
721
- i.isAddon ? p = H(a) : p = m(a), g("update:bindings", p);
721
+ i.isAddon ? p = H(a) : p = m(a), v("update:bindings", p);
722
722
  });
723
723
  }
724
724
  const { t: s } = T();
@@ -792,8 +792,8 @@ const Te = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
792
792
  loading: { type: Boolean }
793
793
  },
794
794
  emits: ["update:setting", "update:show", "submit"],
795
- setup(x, { emit: v }) {
796
- const i = x, g = v, r = J(q(i.setting));
795
+ setup(x, { emit: g }) {
796
+ const i = x, v = g, r = J(q(i.setting));
797
797
  Q([() => i.show], ([k]) => {
798
798
  if (k)
799
799
  for (const f of Object.keys(i.setting))
@@ -805,7 +805,7 @@ const Te = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
805
805
  (f = (k = c.value) == null ? void 0 : k.validateInputs) == null || f.call(k);
806
806
  }
807
807
  function A() {
808
- g("update:setting", q(r)), g("submit");
808
+ v("update:setting", q(r)), v("submit");
809
809
  }
810
810
  const { t: $ } = T();
811
811
  return (k, f) => {
@@ -872,8 +872,8 @@ const Te = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
872
872
  loading: { type: Boolean }
873
873
  },
874
874
  emits: ["update:setting", "update:show", "submit"],
875
- setup(x, { emit: v }) {
876
- const i = x, g = v, r = J(q(i.setting));
875
+ setup(x, { emit: g }) {
876
+ const i = x, v = g, r = J(q(i.setting));
877
877
  Q([() => i.show], ([s]) => {
878
878
  if (s)
879
879
  for (const n of Object.keys(i.setting))
@@ -898,7 +898,7 @@ const Te = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
898
898
  (n = (s = f.value) == null ? void 0 : s.validateInputs) == null || n.call(s);
899
899
  }
900
900
  function H() {
901
- g("update:setting", q(r)), g("submit");
901
+ v("update:setting", q(r)), v("submit");
902
902
  }
903
903
  const { t: y } = T();
904
904
  return (s, n) => {
@@ -960,17 +960,17 @@ const Te = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
960
960
  }, dt = ["src"], ut = {
961
961
  class: "text-xs text-neutral-400 text-center",
962
962
  style: { "max-width": "25rem" }
963
- }, ct = { key: 2 }, ft = { class: "flex justify-center" }, mt = ["src"], pt = { class: "flex flex-col items-center gap-2" }, gt = { class: "text-lg font-bold" }, vt = { class: "text-fm-color-neutral-gray-300" }, yt = { key: 0 }, kt = /* @__PURE__ */ z({
963
+ }, ct = { key: 2 }, ft = { class: "flex justify-center" }, mt = ["src"], pt = { class: "flex flex-col items-center gap-2" }, vt = { class: "text-lg font-bold" }, gt = { class: "text-fm-color-neutral-gray-300" }, yt = { key: 0 }, kt = /* @__PURE__ */ z({
964
964
  __name: "IntegrationView",
965
965
  setup(x) {
966
- const v = _e(), i = be(), g = ve(), r = P(!1), c = P(), M = P(), S = P(), A = P(), $ = P(), k = K(() => {
966
+ const g = _e(), i = be(), v = ve(), r = P(!1), c = P(), M = P(), S = P(), A = P(), $ = P(), k = K(() => {
967
967
  var e;
968
968
  return ((e = $.value) == null ? void 0 : e.enable) ?? !1;
969
969
  }), f = ge(), b = K(() => {
970
970
  var e;
971
- return (e = v.currentBusiness.value) == null ? void 0 : e.menuVersion;
971
+ return (e = g.currentBusiness.value) == null ? void 0 : e.menuVersion;
972
972
  });
973
- g.watchLocation(m);
973
+ v.watchLocation(m);
974
974
  async function m(e) {
975
975
  var t, l, d, h;
976
976
  if (!e) {
@@ -1027,7 +1027,7 @@ const Te = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
1027
1027
  title: "Success",
1028
1028
  message: "Your changes has been saved",
1029
1029
  type: "success"
1030
- }), H.value = !1, await m(g.currentLocation);
1030
+ }), H.value = !1, await m(v.currentLocation);
1031
1031
  return;
1032
1032
  } catch (t) {
1033
1033
  i.open({
@@ -1057,7 +1057,7 @@ const Te = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
1057
1057
  ])
1058
1058
  }, [
1059
1059
  V(xe, { "change-location": "" }),
1060
- !w(g)._currentLocation || r.value ? (F(), B("div", rt, [
1060
+ !w(v)._currentLocation || r.value ? (F(), B("div", rt, [
1061
1061
  V(l, { size: "lg" })
1062
1062
  ])) : k.value ? (F(), B("div", ct, [
1063
1063
  V(h, {
@@ -1081,8 +1081,8 @@ const Te = { class: "flex flex-col rounded border border-fm-color-neutral-gray-1
1081
1081
  }, null, 8, mt)
1082
1082
  ]),
1083
1083
  u("div", pt, [
1084
- u("div", gt, I(w(p)("inventory.integration.fmh.title")), 1),
1085
- u("div", vt, I(w(p)("inventory.integration.fmh.description")), 1)
1084
+ u("div", vt, I(w(p)("inventory.integration.fmh.title")), 1),
1085
+ u("div", gt, I(w(p)("inventory.integration.fmh.description")), 1)
1086
1086
  ])
1087
1087
  ]),
1088
1088
  _: 1
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as y, computed as V, ref as w, watch as h, resolveComponent as u, openBlock as F, createBlock as A, withCtx as s, createVNode as g, createElementVNode as k, normalizeClass as K } from "vue";
2
- import { m as d } from "./app-Iz-opVBA.js";
2
+ import { l as d } from "./app-BGqgEJv-.js";
3
3
  const _ = ["value", "disabled"], D = /* @__PURE__ */ y({
4
4
  __name: "NumberPrecisionInput",
5
5
  props: {
@@ -1,23 +1,23 @@
1
- import { u as d, a as f } from "./xlsx-C8qXPxB4.js";
2
- import { o as _, j as h } from "./app-Iz-opVBA.js";
1
+ import { u as d, w as f } from "./xlsx-DQC0TWcU.js";
2
+ import { n as _, i as h } from "./app-BGqgEJv-.js";
3
3
  import { useCoreStore as F } from "@feedmepos/mf-common";
4
4
  import { ref as y, defineComponent as v, resolveComponent as p, openBlock as k, createElementBlock as g, renderSlot as S, createVNode as l, withCtx as x } from "vue";
5
- function I(e, t) {
5
+ function w(e, t) {
6
6
  return t.map((r) => typeof r.selector == "function" ? r.selector(e) : e[r.selector]);
7
7
  }
8
- function O(e, t) {
9
- const r = t.map((o) => o.name), n = e.map((o) => I(o, t));
8
+ function I(e, t) {
9
+ const r = t.map((o) => o.name), n = e.map((o) => w(o, t));
10
10
  return d.aoa_to_sheet([r, ...n]);
11
11
  }
12
12
  async function C(e, t) {
13
13
  const r = d.book_new();
14
14
  for (const n of e) {
15
- const o = O(
15
+ const o = I(
16
16
  n.data,
17
- n.columns.map((a) => typeof a == "string" ? {
18
- name: a,
19
- selector: a
20
- } : a)
17
+ n.columns.map((s) => typeof s == "string" ? {
18
+ name: s,
19
+ selector: s
20
+ } : s)
21
21
  );
22
22
  d.book_append_sheet(r, o, n.name);
23
23
  }
@@ -27,8 +27,8 @@ const m = _((e, t) => {
27
27
  const r = h(), n = F();
28
28
  return {
29
29
  async getInventoryForecast() {
30
- var s;
31
- const o = ((s = n.currentBusiness.value) == null ? void 0 : s._id) ?? "", a = r.currentLocationId ?? "", i = `${e.dataBackendUrl}/${o}/${a}/inventory-forecast`;
30
+ var a;
31
+ const o = ((a = n.currentBusiness.value) == null ? void 0 : a._id) ?? "", s = r.currentLocationId ?? "", i = `${e.dataBackendUrl}/${o}/${s}/inventory-forecast`;
32
32
  try {
33
33
  return await t.get(i);
34
34
  } catch {
@@ -37,22 +37,22 @@ const m = _((e, t) => {
37
37
  },
38
38
  async getPurchaseOrderForecast(o) {
39
39
  var u;
40
- const a = ((u = n.currentBusiness.value) == null ? void 0 : u._id) ?? "", i = r.currentLocationId ?? "", s = `${e.dataBackendUrl}/${a}/${i}/purchase-order-forecast?days=${o}`;
40
+ const s = ((u = n.currentBusiness.value) == null ? void 0 : u._id) ?? "", i = r.currentLocationId ?? "", a = `${e.dataBackendUrl}/${s}/${i}/purchase-order-forecast?days=${o}`;
41
41
  try {
42
- return await t.get(s);
42
+ return await t.get(a);
43
43
  } catch {
44
44
  return { skus: [] };
45
45
  }
46
46
  }
47
47
  };
48
48
  });
49
- function w() {
49
+ function O() {
50
50
  return {
51
51
  inventoryForecast: { skus: [] },
52
52
  purchaseOrderForecast: { skus: [] }
53
53
  };
54
54
  }
55
- const c = y(w());
55
+ const c = y(O());
56
56
  function D() {
57
57
  return {
58
58
  // state
@@ -1,18 +1,18 @@
1
1
  import { defineComponent as h, computed as x, ref as m, onMounted as f, openBlock as n, createElementBlock as u, createElementVNode as t, toDisplayString as l, normalizeStyle as g, createTextVNode as i, Fragment as d, createCommentVNode as p, renderList as v, normalizeClass as w } from "vue";
2
2
  import { useRoute as k } from "vue-router";
3
- import { a7 as y, i as C } from "./app-Iz-opVBA.js";
3
+ import { ab as y, X as C } from "./app-BGqgEJv-.js";
4
4
  const P = { class: "purchase-box" }, R = { valign: "bottom" }, A = { class: "text-right" }, N = { class: "header" }, E = { class: "sub-header" }, O = { class: "caption" }, S = { class: "address" }, D = { class: "text-right" }, T = { class: "sub-header" }, q = { class: "address" }, F = { class: "purchase-body" }, L = { class: "text-left" }, U = { class: "text-left" }, V = { class: "text-right" }, z = { style: { "padding-top": "30px" } }, B = { valign: "bottom" }, H = { class: "header" }, I = { class: "caption" }, M = {
5
5
  class: "text-left",
6
6
  style: { width: "20%" }
7
7
  }, J = { class: "text-left" }, Q = {
8
8
  class: "text-right",
9
9
  style: { width: "15%" }
10
- }, j = {
10
+ }, X = {
11
11
  class: "text-right",
12
12
  style: { width: "15%" }
13
- }, G = /* @__PURE__ */ h({
13
+ }, j = /* @__PURE__ */ h({
14
14
  __name: "PurchaseOrderPrintPreview",
15
- setup(K) {
15
+ setup(G) {
16
16
  const c = x(() => {
17
17
  switch (s.value.status) {
18
18
  case y.enum.CANCEL:
@@ -25,7 +25,7 @@ const P = { class: "purchase-box" }, R = { valign: "bottom" }, A = { class: "tex
25
25
  }), b = k(), s = m(JSON.parse(b.query.data));
26
26
  return f(() => {
27
27
  setTimeout(() => window.print(), 500);
28
- }), (W, e) => (n(), u("div", P, [
28
+ }), (K, e) => (n(), u("div", P, [
29
29
  t("table", null, [
30
30
  t("tr", R, [
31
31
  t("td", null, [
@@ -139,7 +139,7 @@ const P = { class: "purchase-box" }, R = { valign: "bottom" }, A = { class: "tex
139
139
  t("td", M, l(o.code), 1),
140
140
  t("td", J, l(o.description), 1),
141
141
  t("td", Q, l(o.quantity), 1),
142
- t("td", j, l(o.unit), 1)
142
+ t("td", X, l(o.unit), 1)
143
143
  ]))), 128))
144
144
  ])
145
145
  ])
@@ -148,7 +148,7 @@ const P = { class: "purchase-box" }, R = { valign: "bottom" }, A = { class: "tex
148
148
  ])
149
149
  ]));
150
150
  }
151
- }), $ = /* @__PURE__ */ C(G, [["__scopeId", "data-v-92a03d5c"]]);
151
+ }), $ = /* @__PURE__ */ C(j, [["__scopeId", "data-v-92a03d5c"]]);
152
152
  export {
153
153
  $ as default
154
154
  };