@feedmepos/mf-inventory-portal 0.0.17-dev.9 → 0.0.18-dev.3
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.
- package/dist/ApprovalView-G-u9nPxH.js +118 -0
- package/dist/{BindingsDialog-Dw_DCOTY.js → BindingsDialog-CVeD1mOn.js} +2 -2
- package/dist/{BindingsPicker-BRLTF4Qs.js → BindingsPicker-K04aOoGr.js} +2 -2
- package/dist/BindingsTable-65aYkpX7.js +147 -0
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DgHp7KgJ.js +268 -0
- package/dist/{FmMultiselectDialog.vue_vue_type_script_setup_true_lang-YzVhmNJc.js → FmMultiselectDialog.vue_vue_type_script_setup_true_lang-C5WBLEy3.js} +2 -2
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-Dv01gy7k.js → FmUnitInput.vue_vue_type_script_setup_true_lang-QKFZeZKM.js} +12 -12
- package/dist/IngredientsView-6Q2UWsu-.js +1776 -0
- package/dist/{IntegrationView-Xnl758CS.js → IntegrationView-ZMPPIopU.js} +260 -266
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CUj9Mnt6.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-C8YTZoBw.js} +6 -6
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CW0h41FP.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-kidodonU.js} +1 -1
- package/dist/{PurchaseOrderPrintPreview-DzimxkGt.js → PurchaseOrderPrintPreview-B4uzudnC.js} +1 -1
- package/dist/ReceiveRequestView-DuHtLwZN.js +1394 -0
- package/dist/{RecipeView-B9NcEw7x.js → RecipeView-CRj0pC9N.js} +182 -190
- package/dist/StockView-CQbeZ5pU.js +1862 -0
- package/dist/SupplierView-CrfQATQf.js +796 -0
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-BSwsz8Xt.js → TransferDetails.vue_vue_type_script_setup_true_lang-CLUo-Tve.js} +21 -20
- package/dist/{UnitView-BvbaRHxG.js → UnitView-D1acjiRV.js} +129 -133
- package/dist/{WarehouseView-Cf5Bmfhn.js → WarehouseView-DID1G1qK.js} +260 -264
- package/dist/app-D1teOEQX.js +66113 -0
- package/dist/app.js +1 -1
- package/dist/array-AvWd53LI.js +30 -0
- package/dist/components/FmInventoryTableToolbar.vue.d.ts +53 -0
- package/dist/date2-6Vt_hnAG.js +95 -0
- package/dist/dayjs.min-Co7-8-Mb.js +282 -0
- package/dist/{decimal-S-jYTEL5.js → decimal-ziY3648r.js} +1 -1
- package/dist/extensions/array.d.ts +1 -0
- package/dist/{fuzzy-DW00BX8H.js → fuzzy-gvHXFsh0.js} +1 -1
- package/dist/{dayjs.min-M4PEyOKN.js → index-Do1KDD1S.js} +3594 -3356
- package/dist/{layout-DACHKQ9G.js → layout-BxDEsp4a.js} +1 -1
- package/dist/number-Dvvpk3SV.js +97 -0
- package/dist/{rules-ldw61cGA.js → rules-CQu9yXsg.js} +16 -15
- package/dist/stock-estimate-Wysv30cx.js +122 -0
- package/dist/{supplier-DjKC4TaM.js → supplier-BFdAYn3E.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-inventory-binding-dialog-D1M09VoX.js → use-inventory-binding-dialog-CuyOzZ5r.js} +2 -2
- package/dist/views/ingredients/IngredientsView.vue.d.ts +1 -0
- package/dist/{xlsx-BcM9fWkc.js → xlsx-BG4CsaGF.js} +1 -1
- package/dist/{xlsx.util-BNXjhkYU.js → xlsx.util-BkVYceD0.js} +2 -2
- package/package.json +4 -4
- package/dist/ApprovalView-BJ_SGOrx.js +0 -134
- package/dist/BindingsTable-BMIkL0Bk.js +0 -121
- package/dist/ChangeLocationComponent.vue_vue_type_script_setup_true_lang-D9Qp3jke.js +0 -97
- package/dist/IngredientsView-DYFkUsHx.js +0 -1802
- package/dist/ReceiveRequestView-C_0jK6GY.js +0 -1435
- package/dist/SingleColumnLayout.vue_vue_type_script_setup_true_lang-Dov3Uq2z.js +0 -64
- package/dist/StockView-JPw1K8aU.js +0 -1960
- package/dist/SupplierView-CiQLFWmQ.js +0 -804
- package/dist/app-BbXzmbBO.js +0 -42892
- package/dist/components/FmTableToolbar.vue.d.ts +0 -49
- package/dist/date2-DFqSdEvG.js +0 -189
- package/dist/init-date-range-B_ha80e0.js +0 -21
- package/dist/stock-estimate-DOP1qO5w.js +0 -145
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import type { FmTableToolbarActions, FmTableToolbarProps } from './FmTableToolbar';
|
|
2
|
-
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<FmTableToolbarProps>, {
|
|
3
|
-
searchModel: string;
|
|
4
|
-
chips: () => never[];
|
|
5
|
-
actions: () => never[];
|
|
6
|
-
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
|
-
[x: `click:action-${string}`]: () => void;
|
|
8
|
-
"update:global-search-model": (search: string) => void;
|
|
9
|
-
"click:remove-chip": (chipIndex: number) => void;
|
|
10
|
-
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<FmTableToolbarProps>, {
|
|
11
|
-
searchModel: string;
|
|
12
|
-
chips: () => never[];
|
|
13
|
-
actions: () => never[];
|
|
14
|
-
}>>> & {
|
|
15
|
-
[x: `onClick:action-${string}`]: (() => any) | undefined;
|
|
16
|
-
"onUpdate:global-search-model"?: ((search: string) => any) | undefined;
|
|
17
|
-
"onClick:remove-chip"?: ((chipIndex: number) => any) | undefined;
|
|
18
|
-
}, {
|
|
19
|
-
actions: FmTableToolbarActions[];
|
|
20
|
-
searchModel: string;
|
|
21
|
-
chips: import("@feedmepos/ui-library").FmChipProps[];
|
|
22
|
-
}, {}>, Partial<Record<`action-${string}`, (_: {}) => any>> & {
|
|
23
|
-
chips?(_: {}): any;
|
|
24
|
-
"action-search"?(_: {}): any;
|
|
25
|
-
append?(_: {}): any;
|
|
26
|
-
}>;
|
|
27
|
-
export default _default;
|
|
28
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
29
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
30
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
31
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
32
|
-
} : {
|
|
33
|
-
type: import('vue').PropType<T[K]>;
|
|
34
|
-
required: true;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
type __VLS_WithDefaults<P, D> = {
|
|
38
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
39
|
-
default: D[K];
|
|
40
|
-
}> : P[K];
|
|
41
|
-
};
|
|
42
|
-
type __VLS_Prettify<T> = {
|
|
43
|
-
[K in keyof T]: T[K];
|
|
44
|
-
} & {};
|
|
45
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
46
|
-
new (): {
|
|
47
|
-
$slots: S;
|
|
48
|
-
};
|
|
49
|
-
};
|
package/dist/date2-DFqSdEvG.js
DELETED
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
import { F as i, d as p } from "./dayjs.min-M4PEyOKN.js";
|
|
2
|
-
function w(t, e) {
|
|
3
|
-
return i.convertPrecision({
|
|
4
|
-
value: t,
|
|
5
|
-
precision: e
|
|
6
|
-
});
|
|
7
|
-
}
|
|
8
|
-
function N(t, e) {
|
|
9
|
-
return i.add([t, e]);
|
|
10
|
-
}
|
|
11
|
-
function S(t, e) {
|
|
12
|
-
return i.multiply([t, e]);
|
|
13
|
-
}
|
|
14
|
-
function b(t, e) {
|
|
15
|
-
const n = Math.floor(t.amount * e.amount), r = n === 0 ? 0 : t.precision + e.precision, o = c(n), a = Math.min(r, o);
|
|
16
|
-
return {
|
|
17
|
-
amount: n / Math.pow(10, a),
|
|
18
|
-
precision: r - a
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
function T(t, e) {
|
|
22
|
-
const n = +l(t), r = +l(e);
|
|
23
|
-
return n / r;
|
|
24
|
-
}
|
|
25
|
-
function v(t, e) {
|
|
26
|
-
const n = T(t, e);
|
|
27
|
-
return F(n);
|
|
28
|
-
}
|
|
29
|
-
function A(t, e) {
|
|
30
|
-
return t.precision >= e ? t : i.convertPrecision({ value: t, precision: e });
|
|
31
|
-
}
|
|
32
|
-
function j(t) {
|
|
33
|
-
const e = c(t.amount), n = t.precision - e;
|
|
34
|
-
return i.convertPrecision({ value: t, precision: Math.max(0, n) });
|
|
35
|
-
}
|
|
36
|
-
function l(t, e = !0) {
|
|
37
|
-
return e ? Number(t.amount / Math.pow(10, t.precision)).toFixed(t.precision) : Number(t.amount / Math.pow(10, t.precision)).toString();
|
|
38
|
-
}
|
|
39
|
-
function U(t, e = !1, n = 2) {
|
|
40
|
-
const r = Number(t.amount / Math.pow(10, t.precision)), o = r.toFixed(
|
|
41
|
-
Number.isInteger(r) ? 2 : Math.min(4, Math.max(2, n))
|
|
42
|
-
);
|
|
43
|
-
return e ? `${o} ${t.currency}` : t.currency === "MYR" ? `RM ${o}` : `${t.currency} ${o}`;
|
|
44
|
-
}
|
|
45
|
-
function I(t) {
|
|
46
|
-
return {
|
|
47
|
-
...t,
|
|
48
|
-
amount: Math.abs(t.amount)
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
function h(t) {
|
|
52
|
-
if (!isFinite(t)) return 0;
|
|
53
|
-
let e = 1, n = 0;
|
|
54
|
-
for (; Math.round(t * e) / e !== t; )
|
|
55
|
-
e *= 10, n++;
|
|
56
|
-
return n;
|
|
57
|
-
}
|
|
58
|
-
function F(t) {
|
|
59
|
-
const e = h(t);
|
|
60
|
-
return {
|
|
61
|
-
precision: e,
|
|
62
|
-
amount: t * 10 ** e
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
function Y(t, e = 0, n = !1) {
|
|
66
|
-
let r = 0;
|
|
67
|
-
return Number.isNaN(Number(t)) || (n || Number(t) >= 0) && (r = Number(t)), {
|
|
68
|
-
amount: Number((r * 10 ** e).toFixed(0)),
|
|
69
|
-
precision: e
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
function c(t) {
|
|
73
|
-
const e = `${t}`, n = e.replace(/0*$/g, "");
|
|
74
|
-
return e.length - n.length;
|
|
75
|
-
}
|
|
76
|
-
function $(t, e) {
|
|
77
|
-
if (!e)
|
|
78
|
-
return t.precision;
|
|
79
|
-
const n = c(e.conversion.amount);
|
|
80
|
-
return t.precision - e.conversion.precision + n;
|
|
81
|
-
}
|
|
82
|
-
function P(t) {
|
|
83
|
-
const e = new Intl.DateTimeFormat("en-US", { year: "numeric" }), n = new Intl.DateTimeFormat("en-US", { month: "short" });
|
|
84
|
-
return [new Intl.DateTimeFormat("en-US", { day: "2-digit" }), n, e].map((a) => a.format(t).toUpperCase()).join(" ");
|
|
85
|
-
}
|
|
86
|
-
function x(t) {
|
|
87
|
-
const n = new Intl.DateTimeFormat("en-US", {
|
|
88
|
-
hour: "2-digit",
|
|
89
|
-
hour12: !0,
|
|
90
|
-
minute: "2-digit"
|
|
91
|
-
}).format(t);
|
|
92
|
-
return n.startsWith("12") && n.endsWith("AM") ? `00${n.substring(2, n.length)}` : n;
|
|
93
|
-
}
|
|
94
|
-
function H(t) {
|
|
95
|
-
var r, o;
|
|
96
|
-
const n = new Intl.DateTimeFormat("en-US", {
|
|
97
|
-
hour: "2-digit",
|
|
98
|
-
hour12: !1,
|
|
99
|
-
minute: "2-digit"
|
|
100
|
-
}).formatToParts(t);
|
|
101
|
-
return `${(r = n.find((a) => a.type === "hour")) == null ? void 0 : r.value}:${(o = n.find((a) => a.type === "minute")) == null ? void 0 : o.value}`;
|
|
102
|
-
}
|
|
103
|
-
function s(t, e = "-") {
|
|
104
|
-
const n = new Intl.DateTimeFormat("en-US", { year: "numeric" }), r = new Intl.DateTimeFormat("en-US", { month: "2-digit" }), o = new Intl.DateTimeFormat("en-US", { day: "2-digit" });
|
|
105
|
-
return [n, r, o].map((u) => u.format(t).toUpperCase()).join(e);
|
|
106
|
-
}
|
|
107
|
-
function C(t, e = "-", n = ":") {
|
|
108
|
-
const r = new Intl.DateTimeFormat("en-US", { year: "numeric" }), o = new Intl.DateTimeFormat("en-US", { month: "2-digit" }), a = new Intl.DateTimeFormat("en-US", { day: "2-digit" }), u = new Intl.DateTimeFormat("en-US", { hour: "2-digit", hour12: !1 }), f = new Intl.DateTimeFormat("en-US", { minute: "2-digit" }), D = [r, o, a].map((m) => m.format(t).toUpperCase()).join(e), g = [u, f].map((m) => m.format(t).toUpperCase()).join(n);
|
|
109
|
-
return `${D} ${g}`;
|
|
110
|
-
}
|
|
111
|
-
function d(t) {
|
|
112
|
-
const e = new Date(t);
|
|
113
|
-
return e.setHours(0), e.setMinutes(0), e.setSeconds(0), e.setMilliseconds(0), e;
|
|
114
|
-
}
|
|
115
|
-
function M(t) {
|
|
116
|
-
const e = d(t);
|
|
117
|
-
return e.setDate(e.getDate() + 1), e.setTime(e.getTime() - 1), e;
|
|
118
|
-
}
|
|
119
|
-
function R(t) {
|
|
120
|
-
const { startDate: e, endDate: n } = t;
|
|
121
|
-
if (e === null || n === null)
|
|
122
|
-
return {
|
|
123
|
-
startDate: null,
|
|
124
|
-
endDate: null
|
|
125
|
-
};
|
|
126
|
-
const r = new Date(e), o = new Date(n);
|
|
127
|
-
if (isNaN(r.getTime()) || isNaN(o.getTime()))
|
|
128
|
-
return {
|
|
129
|
-
startDate: null,
|
|
130
|
-
endDate: null
|
|
131
|
-
};
|
|
132
|
-
const a = o.getTime() - r.getTime();
|
|
133
|
-
return r.setTime(r.getTime() - a - 864e5), o.setTime(o.getTime() - a - 864e5), {
|
|
134
|
-
startDate: s(r),
|
|
135
|
-
endDate: s(o)
|
|
136
|
-
};
|
|
137
|
-
}
|
|
138
|
-
function Z(t) {
|
|
139
|
-
const { startDate: e, endDate: n } = t;
|
|
140
|
-
if (e === null || n === null)
|
|
141
|
-
return {
|
|
142
|
-
startDate: null,
|
|
143
|
-
endDate: null
|
|
144
|
-
};
|
|
145
|
-
const r = new Date(e), o = new Date(n);
|
|
146
|
-
if (isNaN(r.getTime()) || isNaN(o.getTime()))
|
|
147
|
-
return {
|
|
148
|
-
startDate: null,
|
|
149
|
-
endDate: null
|
|
150
|
-
};
|
|
151
|
-
const a = o.getTime() - r.getTime();
|
|
152
|
-
return r.setTime(r.getTime() + a + 864e5), o.setTime(o.getTime() + a + 864e5), {
|
|
153
|
-
startDate: s(r),
|
|
154
|
-
endDate: s(o)
|
|
155
|
-
};
|
|
156
|
-
}
|
|
157
|
-
function O(t, e = /* @__PURE__ */ new Date()) {
|
|
158
|
-
const n = M(new Date(e.getTime()));
|
|
159
|
-
return {
|
|
160
|
-
startDate: p(d(new Date(e.getTime()))).subtract(t, "months").toISOString(),
|
|
161
|
-
endDate: n.toISOString()
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
export {
|
|
165
|
-
l as a,
|
|
166
|
-
b,
|
|
167
|
-
F as c,
|
|
168
|
-
h as d,
|
|
169
|
-
I as e,
|
|
170
|
-
C as f,
|
|
171
|
-
$ as g,
|
|
172
|
-
S as h,
|
|
173
|
-
N as i,
|
|
174
|
-
x as j,
|
|
175
|
-
U as k,
|
|
176
|
-
w as l,
|
|
177
|
-
d as m,
|
|
178
|
-
M as n,
|
|
179
|
-
Z as o,
|
|
180
|
-
R as p,
|
|
181
|
-
s as q,
|
|
182
|
-
P as r,
|
|
183
|
-
O as s,
|
|
184
|
-
Y as t,
|
|
185
|
-
H as u,
|
|
186
|
-
v,
|
|
187
|
-
j as w,
|
|
188
|
-
A as x
|
|
189
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { q as n } from "./date2-DFqSdEvG.js";
|
|
2
|
-
function D() {
|
|
3
|
-
const t = /* @__PURE__ */ new Date();
|
|
4
|
-
return t.setDate(t.getDate() - 15), {
|
|
5
|
-
start: t,
|
|
6
|
-
end: /* @__PURE__ */ new Date()
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
|
-
function r(t = 15) {
|
|
10
|
-
const e = /* @__PURE__ */ new Date();
|
|
11
|
-
e.setDate(e.getDate() - t);
|
|
12
|
-
const a = e, s = /* @__PURE__ */ new Date();
|
|
13
|
-
return {
|
|
14
|
-
startDate: `${n(a)}`,
|
|
15
|
-
endDate: `${n(s)}`
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
export {
|
|
19
|
-
D as a,
|
|
20
|
-
r as i
|
|
21
|
-
};
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import { u as l, a as f } from "./xlsx-BcM9fWkc.js";
|
|
2
|
-
import { defineComponent as h, resolveComponent as p, openBlock as y, createElementBlock as _, renderSlot as v, createVNode as d, withCtx as g, createElementVNode as F, ref as k } from "vue";
|
|
3
|
-
import { h as x, f as I } from "./app-BbXzmbBO.js";
|
|
4
|
-
import { useCoreStore as w } from "@feedmepos/mf-common";
|
|
5
|
-
function S(t, e) {
|
|
6
|
-
return e.map((r) => typeof r.selector == "function" ? r.selector(t) : t[r.selector]);
|
|
7
|
-
}
|
|
8
|
-
function b(t, e) {
|
|
9
|
-
const r = e.map((n) => n.name), o = t.map((n) => S(n, e));
|
|
10
|
-
return l.aoa_to_sheet([r, ...o]);
|
|
11
|
-
}
|
|
12
|
-
async function L(t, e) {
|
|
13
|
-
const r = l.book_new();
|
|
14
|
-
for (const o of t) {
|
|
15
|
-
const n = b(
|
|
16
|
-
o.data,
|
|
17
|
-
o.columns.map((s) => typeof s == "string" ? {
|
|
18
|
-
name: s,
|
|
19
|
-
selector: s
|
|
20
|
-
} : s)
|
|
21
|
-
);
|
|
22
|
-
l.book_append_sheet(r, n, o.name);
|
|
23
|
-
}
|
|
24
|
-
await f(r, e);
|
|
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" }, A = "Experience stock lifespan estimates powered by REMY AI. Currently available as a preview, this will become a premium feature.", P = /* @__PURE__ */ h({
|
|
27
|
-
__name: "PremiumBadge",
|
|
28
|
-
props: {
|
|
29
|
-
zIndex: {}
|
|
30
|
-
},
|
|
31
|
-
setup(t) {
|
|
32
|
-
return (e, r) => {
|
|
33
|
-
const o = p("FmIcon"), n = p("FmTooltip");
|
|
34
|
-
return y(), _("div", O, [
|
|
35
|
-
v(e.$slots, "default"),
|
|
36
|
-
d(n, {
|
|
37
|
-
variant: "plain",
|
|
38
|
-
placement: "top",
|
|
39
|
-
content: A,
|
|
40
|
-
"z-index": e.zIndex
|
|
41
|
-
}, {
|
|
42
|
-
default: g(() => [
|
|
43
|
-
F("div", E, [
|
|
44
|
-
d(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(t) {
|
|
58
|
-
let e = t.substring(t.indexOf("_") + 1);
|
|
59
|
-
return e.includes("_") && (e = e.substring(0, e.lastIndexOf("_"))), Number.isNaN(Date.parse(e)) ? null : new Date(e).toISOString();
|
|
60
|
-
}
|
|
61
|
-
Array.prototype.computeFirst = function(t) {
|
|
62
|
-
const e = this.length;
|
|
63
|
-
for (let r = 0; r < e; r++) {
|
|
64
|
-
const o = this.at(r), n = t(o, r, this);
|
|
65
|
-
if (n != null)
|
|
66
|
-
return n;
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
Array.prototype.computeLast = function(t) {
|
|
70
|
-
const e = this.length - 1;
|
|
71
|
-
for (let r = e; r >= 0; r--) {
|
|
72
|
-
const o = this.at(r), n = t(o, r, this);
|
|
73
|
-
if (n != null)
|
|
74
|
-
return n;
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
Array.prototype.insert = function(t, e) {
|
|
78
|
-
if (e < this.length) {
|
|
79
|
-
const r = this.splice(e, this.length);
|
|
80
|
-
return this[e] = t, r.forEach((o) => this.push(o)), this;
|
|
81
|
-
}
|
|
82
|
-
return this[e] = t, this;
|
|
83
|
-
};
|
|
84
|
-
const m = x((t, e) => {
|
|
85
|
-
const r = I(), o = w();
|
|
86
|
-
return {
|
|
87
|
-
async getInventoryForecast() {
|
|
88
|
-
var a;
|
|
89
|
-
const n = ((a = o.currentBusiness.value) == null ? void 0 : a._id) ?? "", s = r.currentLocationId ?? "", i = `${t.dataBackendUrl}/${n}/${s}/inventory-forecast`;
|
|
90
|
-
try {
|
|
91
|
-
return await e.get(i);
|
|
92
|
-
} catch {
|
|
93
|
-
return { skus: [] };
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
async getPurchaseOrderForecast(n) {
|
|
97
|
-
var u;
|
|
98
|
-
const s = ((u = o.currentBusiness.value) == null ? void 0 : u._id) ?? "", i = r.currentLocationId ?? "", a = `${t.dataBackendUrl}/${s}/${i}/purchase-order-forecast?days=${n}`;
|
|
99
|
-
try {
|
|
100
|
-
return await e.get(a);
|
|
101
|
-
} catch {
|
|
102
|
-
return { skus: [] };
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
};
|
|
106
|
-
});
|
|
107
|
-
function B() {
|
|
108
|
-
return {
|
|
109
|
-
inventoryForecast: { skus: [] },
|
|
110
|
-
purchaseOrderForecast: { skus: [] }
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
const c = k(B());
|
|
114
|
-
function M() {
|
|
115
|
-
return {
|
|
116
|
-
// state
|
|
117
|
-
get inventoryForecast() {
|
|
118
|
-
return c.value.inventoryForecast;
|
|
119
|
-
},
|
|
120
|
-
set inventoryForecast(t) {
|
|
121
|
-
c.value.inventoryForecast = t;
|
|
122
|
-
},
|
|
123
|
-
get purchaseOrderForecast() {
|
|
124
|
-
return c.value.purchaseOrderForecast;
|
|
125
|
-
},
|
|
126
|
-
set purchaseOrderForecast(t) {
|
|
127
|
-
c.value.purchaseOrderForecast = t;
|
|
128
|
-
},
|
|
129
|
-
// actions
|
|
130
|
-
async readStockEstimateBalance() {
|
|
131
|
-
const t = m();
|
|
132
|
-
this.inventoryForecast = await t.getInventoryForecast();
|
|
133
|
-
},
|
|
134
|
-
async readPurchaseOrder(t) {
|
|
135
|
-
const e = m();
|
|
136
|
-
this.purchaseOrderForecast = await e.getPurchaseOrderForecast(t);
|
|
137
|
-
}
|
|
138
|
-
};
|
|
139
|
-
}
|
|
140
|
-
export {
|
|
141
|
-
P as _,
|
|
142
|
-
L as e,
|
|
143
|
-
T as i,
|
|
144
|
-
M as u
|
|
145
|
-
};
|