@feedmepos/mf-inventory-portal 0.0.7-dev.3 → 0.0.7-dev.4

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 (39) hide show
  1. package/dist/{ApprovalView-DbvyMW1R.js → ApprovalView-D1CshEiL.js} +6 -6
  2. package/dist/{BindingsDialog-CyqLp0Mq.js → BindingsDialog-Box9e9MU.js} +2 -2
  3. package/dist/{BindingsPicker-XRdmN_Zn.js → BindingsPicker-BMU_18fI.js} +2 -2
  4. package/dist/{BindingsTable-ktdc9eb0.js → BindingsTable-CEmUUzD9.js} +3 -3
  5. package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-Bvc3EyUZ.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-BfmFBfLR.js} +1 -1
  6. package/dist/{FmMultiselectDialog.vue_vue_type_script_setup_true_lang-YEAz0S0C.js → FmMultiselectDialog.vue_vue_type_script_setup_true_lang-izsN_Y6x.js} +2 -2
  7. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-Bn3w9SMf.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-cNMSS0Ji.js} +1 -1
  8. package/dist/{IngredientsView-D8NwGu57.js → IngredientsView-Cx189ZUR.js} +202 -185
  9. package/dist/{IntegrationView-w0TXPcxZ.js → IntegrationView-eJmquyFT.js} +3 -3
  10. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-BuP2g613.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CN1SVuzj.js} +5 -5
  11. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BRjAsTYp.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Dyo5rWdy.js} +1 -1
  12. package/dist/PreviewBadge.vue_vue_type_script_setup_true_lang-BvadeWUz.js +35 -0
  13. package/dist/{PurchaseOrderPrintPreview-B78Jnkqg.js → PurchaseOrderPrintPreview-8aVgWGlY.js} +1 -1
  14. package/dist/{ReceiveRequestView-BHKghS0r.js → ReceiveRequestView-DosAbeBl.js} +520 -495
  15. package/dist/{RecipeView-M7bw_AGS.js → RecipeView-_A-EOMMi.js} +7 -7
  16. package/dist/StockView-CpVv9gnP.js +1938 -0
  17. package/dist/{SupplierView-DgFjga62.js → SupplierView-CZmv0Zch.js} +208 -195
  18. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-Djn88uN3.js → TransferDetails.vue_vue_type_script_setup_true_lang-DnMxN-Zl.js} +5 -5
  19. package/dist/{UnitView-Cjed2i4A.js → UnitView-CF48QegO.js} +6 -6
  20. package/dist/{WarehouseView-BbRXA9_p.js → WarehouseView-Pq4tKlGH.js} +3 -3
  21. package/dist/{app-C2kiRXHk.js → app-kk-I7El6.js} +187 -187
  22. package/dist/app.js +1 -1
  23. package/dist/components/PremiumBadge.vue.d.ts +11 -2
  24. package/dist/components/PreviewBadge.vue.d.ts +24 -0
  25. package/dist/{date2-1aCkDJKL.js → date2-C_MxkBzJ.js} +1 -1
  26. package/dist/{dayjs.min-BMCGIZaB.js → dayjs.min-B0-vxxmd.js} +2251 -2009
  27. package/dist/{decimal-76iBoy3n.js → decimal-CwL8K3v-.js} +1 -1
  28. package/dist/{fuzzy-CMzsp7th.js → fuzzy-CdBRA2rL.js} +1 -1
  29. package/dist/{init-date-range-CL5wzuE9.js → init-date-range-BkRJwJWl.js} +1 -1
  30. package/dist/{layout-BUVfQNxR.js → layout-Uo3EuS0G.js} +1 -1
  31. package/dist/{rules-C-XEHjZO.js → rules-DMCipsmW.js} +1 -1
  32. package/dist/stock-estimate-BRvddt7k.js +122 -0
  33. package/dist/{supplier-xM9dK1Aa.js → supplier-Ba-xLeGl.js} +1 -1
  34. package/dist/tsconfig.app.tsbuildinfo +1 -1
  35. package/dist/{use-inventory-binding-dialog-wlCHTAwl.js → use-inventory-binding-dialog-Bn0GdfHQ.js} +2 -2
  36. package/dist/{xlsx-DXl3cDnf.js → xlsx-DqXzQH_V.js} +628 -628
  37. package/package.json +3 -3
  38. package/dist/StockView-DL1LSMJR.js +0 -1953
  39. package/dist/stock-estimate-DvI651uK.js +0 -90
@@ -1,4 +1,4 @@
1
- import "./dayjs.min-BMCGIZaB.js";
1
+ import "./dayjs.min-B0-vxxmd.js";
2
2
  function m(a) {
3
3
  function t(o, n = !0) {
4
4
  const e = Math.round(Math.log10(o));
@@ -1,4 +1,4 @@
1
- import { l as v } from "./app-C2kiRXHk.js";
1
+ import { l as v } from "./app-kk-I7El6.js";
2
2
  var x = { exports: {} };
3
3
  (function(h, m) {
4
4
  (function() {
@@ -1,4 +1,4 @@
1
- import { q as n } from "./date2-1aCkDJKL.js";
1
+ import { q as n } from "./date2-C_MxkBzJ.js";
2
2
  function D() {
3
3
  const t = /* @__PURE__ */ new Date();
4
4
  return t.setDate(t.getDate() - 15), {
@@ -1,6 +1,6 @@
1
1
  import { components as B, useBreakpoints as M } from "@feedmepos/ui-library";
2
2
  import { h as i, defineComponent as I, computed as R, resolveComponent as _, openBlock as u, createBlock as x, normalizeClass as V, withCtx as L, createElementVNode as d, renderSlot as z, normalizeProps as N, guardReactiveProps as P, createElementBlock as c, Fragment as h, renderList as D, createVNode as k, unref as b, createCommentVNode as w } from "vue";
3
- import { t as E } from "./app-C2kiRXHk.js";
3
+ import { t as E } from "./app-kk-I7El6.js";
4
4
  const { FmMenu: S, FmButton: $, FmMenuItem: j } = B;
5
5
  function Q(o, t) {
6
6
  return i(
@@ -1,4 +1,4 @@
1
- import { a as u, q as s, j as m, g as d, c as a } from "./date2-1aCkDJKL.js";
1
+ import { a as u, q as s, j as m, g as d, c as a } from "./date2-C_MxkBzJ.js";
2
2
  function y() {
3
3
  return function(n) {
4
4
  return !!n || "Required";
@@ -0,0 +1,122 @@
1
+ import { u as l, a as f } from "./xlsx-DqXzQH_V.js";
2
+ import { defineComponent as _, resolveComponent as d, openBlock as y, createElementBlock as h, renderSlot as F, createVNode as p, withCtx as v, createElementVNode as g, ref as k } from "vue";
3
+ import { f as x, e as I } from "./app-kk-I7El6.js";
4
+ import { useCoreStore as w } from "@feedmepos/mf-common";
5
+ function S(e, t) {
6
+ return t.map((r) => typeof r.selector == "function" ? r.selector(e) : `${e[r.selector]}`);
7
+ }
8
+ function b(e, t) {
9
+ const r = t.map((s) => s.name), o = e.map((s) => S(s, t));
10
+ return l.aoa_to_sheet([r, ...o]);
11
+ }
12
+ async function P(e, t) {
13
+ const r = l.book_new();
14
+ for (const o of e) {
15
+ const s = b(
16
+ o.data,
17
+ o.columns.map((n) => typeof n == "string" ? {
18
+ name: n,
19
+ selector: n
20
+ } : n)
21
+ );
22
+ l.book_append_sheet(r, s, o.name);
23
+ }
24
+ await f(r, t);
25
+ }
26
+ const O = { class: "flex items-center gap-8" }, E = { class: "p-4 bg-fm-color-system-warning-100 fm-corner-radius-md flex items-center" }, $ = "Experience stock lifespan estimates powered by REMY AI. Currently available as a preview, this will become a premium feature.", L = /* @__PURE__ */ _({
27
+ __name: "PremiumBadge",
28
+ props: {
29
+ zIndex: {}
30
+ },
31
+ setup(e) {
32
+ return (t, r) => {
33
+ const o = d("FmIcon"), s = d("FmTooltip");
34
+ return y(), h("div", O, [
35
+ F(t.$slots, "default"),
36
+ p(s, {
37
+ variant: "plain",
38
+ placement: "top",
39
+ content: $,
40
+ "z-index": t.zIndex
41
+ }, {
42
+ default: v(() => [
43
+ g("div", E, [
44
+ p(o, {
45
+ name: "hotel_class",
46
+ class: "text-fm-color-primary",
47
+ size: "sm"
48
+ })
49
+ ])
50
+ ]),
51
+ _: 1
52
+ }, 8, ["z-index"])
53
+ ]);
54
+ };
55
+ }
56
+ });
57
+ function T(e) {
58
+ let t = e.substring(e.indexOf("_") + 1);
59
+ return t.includes("_") && (t = t.substring(0, t.lastIndexOf("_"))), Number.isNaN(Date.parse(t)) ? null : new Date(t).toISOString();
60
+ }
61
+ const m = x((e, t) => {
62
+ const r = I(), o = w();
63
+ return {
64
+ async getInventoryForecast() {
65
+ var a;
66
+ const s = ((a = o.currentBusiness.value) == null ? void 0 : a._id) ?? "", n = r.currentLocationId ?? "", i = `${e.dataBackendUrl}/${s}/${n}/inventory-forecast`;
67
+ try {
68
+ return await t.get(i);
69
+ } catch {
70
+ return { skus: [] };
71
+ }
72
+ },
73
+ async getPurchaseOrderForecast(s) {
74
+ var u;
75
+ const n = ((u = o.currentBusiness.value) == null ? void 0 : u._id) ?? "", i = r.currentLocationId ?? "", a = `${e.dataBackendUrl}/${n}/${i}/purchase-order-forecast?days=${s}`;
76
+ try {
77
+ return await t.get(a);
78
+ } catch {
79
+ return { skus: [] };
80
+ }
81
+ }
82
+ };
83
+ });
84
+ function B() {
85
+ return {
86
+ inventoryForecast: { skus: [] },
87
+ purchaseOrderForecast: { skus: [] }
88
+ };
89
+ }
90
+ const c = k(B());
91
+ function M() {
92
+ return {
93
+ // state
94
+ get inventoryForecast() {
95
+ return c.value.inventoryForecast;
96
+ },
97
+ set inventoryForecast(e) {
98
+ c.value.inventoryForecast = e;
99
+ },
100
+ get purchaseOrderForecast() {
101
+ return c.value.purchaseOrderForecast;
102
+ },
103
+ set purchaseOrderForecast(e) {
104
+ c.value.purchaseOrderForecast = e;
105
+ },
106
+ // actions
107
+ async readStockEstimateBalance() {
108
+ const e = m();
109
+ this.inventoryForecast = await e.getInventoryForecast();
110
+ },
111
+ async readPurchaseOrder(e) {
112
+ const t = m();
113
+ this.purchaseOrderForecast = await t.getPurchaseOrderForecast(e);
114
+ }
115
+ };
116
+ }
117
+ export {
118
+ L as _,
119
+ P as e,
120
+ T as i,
121
+ M as u
122
+ };
@@ -1,4 +1,4 @@
1
- import { f as u, e as o, j as c, k as l } from "./app-C2kiRXHk.js";
1
+ import { f as u, e as o, j as c, k as l } from "./app-kk-I7El6.js";
2
2
  import { ref as d } from "vue";
3
3
  const n = u((e, r) => {
4
4
  const a = o();