@feedmepos/mf-inventory-portal 0.0.19-dev.1 → 0.0.19-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.
Files changed (69) hide show
  1. package/dist/ApprovalView-CS7NtcBA.js +120 -0
  2. package/dist/{BindingsDialog-DpC48bqK.js → BindingsDialog-BA2w-qkY.js} +5 -6
  3. package/dist/{BindingsPicker-BU52g6zk.js → BindingsPicker-wf7b30Bk.js} +6 -7
  4. package/dist/{BindingsTable-aIuFdScv.js → BindingsTable-mqqSPDbO.js} +4 -6
  5. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CViUEhuw.js +272 -0
  6. package/dist/IngredientsView-BVX31o67.js +1750 -0
  7. package/dist/IntegrationView-DFdl_238.js +1172 -0
  8. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BuyM580N.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BENFVQkL.js} +1 -1
  9. package/dist/{PurchaseOrderPrintPreview-EeKhENYH.js → PurchaseOrderPrintPreview-06PokYt4.js} +13 -13
  10. package/dist/ReceiveRequestView-ck-05Ly7.js +1394 -0
  11. package/dist/RecipeView-CiOb2lvU.js +572 -0
  12. package/dist/StockForecast.vue_vue_type_style_index_0_lang-KLXSWvo5.js +59 -0
  13. package/dist/StockView-5LkTxYI2.js +1876 -0
  14. package/dist/SupplierView-BAfC5Wcw.js +801 -0
  15. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-qZDMkkIZ.js +1031 -0
  16. package/dist/UnitView-wsbXOcbf.js +638 -0
  17. package/dist/WarehouseView-DHhDNAk8.js +1050 -0
  18. package/dist/api/bill.d.ts +2 -2
  19. package/dist/app-DNCC20Aq.js +66729 -0
  20. package/dist/app.d.ts +1031 -0
  21. package/dist/app.js +5 -3
  22. package/dist/components/FmDroppableField.vue.d.ts +1 -1
  23. package/dist/{decimal-BAZuuTcd.js → decimal-DaXHxukU.js} +1 -1
  24. package/dist/{stock-estimate-CL4HShG8.js → id-to-date-XiomI6dP.js} +12 -13
  25. package/dist/{layout-BnTfCS_X.js → layout-DvgFrTEG.js} +14 -14
  26. package/dist/router/name.d.ts +1 -1
  27. package/dist/style.css +1 -1
  28. package/dist/{supplier-CjAH8O1y.js → supplier-BepZrUgL.js} +3 -3
  29. package/dist/tsconfig.app.tsbuildinfo +1 -1
  30. package/dist/views/ingredients/composables/use-ingredient-form.d.ts +14 -2
  31. package/dist/views/ingredients/composables/use-ingredient-table.d.ts +1 -2
  32. package/dist/views/receive-request/components/transfer-form/SparkIcon.vue.d.ts +1 -1
  33. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +12 -12
  34. package/dist/views/recipe/composables/use-recipe-form.d.ts +14 -2
  35. package/dist/views/recipe/composables/use-recipe-table.d.ts +1 -2
  36. package/dist/views/stock/components/StockRecordCard.vue.d.ts +1 -1
  37. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +2 -2
  38. package/dist/views/stock/composables/use-stock-action.d.ts +26 -0
  39. package/dist/views/stock/composables/use-stock-table.d.ts +1 -8
  40. package/dist/views/stock/helper/compute-summary-total.d.ts +2 -2
  41. package/dist/views/unit/composables/use-unit-form.d.ts +14 -2
  42. package/dist/views/unit/composables/use-unit-table.d.ts +1 -2
  43. package/dist/{xlsx-vUzm_udV.js → xlsx-DaxqUL1h.js} +1 -1
  44. package/dist/xlsx.util-Dwiw0sTo.js +109 -0
  45. package/package.json +6 -5
  46. package/dist/ApprovalView-BTZwnKLf.js +0 -118
  47. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DjgmtvXU.js +0 -268
  48. package/dist/FmMultiselectDialog.vue_vue_type_script_setup_true_lang-n09XXJZK.js +0 -143
  49. package/dist/FmUnitInput.vue_vue_type_script_setup_true_lang-B-19iYaK.js +0 -236
  50. package/dist/IngredientsView-DMyEGdik.js +0 -1767
  51. package/dist/IntegrationView-Dn_qL_vC.js +0 -1166
  52. package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-DGTLUrb9.js +0 -276
  53. package/dist/ReceiveRequestView-BOdgbFFM.js +0 -1394
  54. package/dist/RecipeView-B1aNLDIK.js +0 -573
  55. package/dist/StockForecast.vue_vue_type_style_index_0_lang-B5EK101t.js +0 -58
  56. package/dist/StockView-C_Ur_jTg.js +0 -1862
  57. package/dist/SupplierView-CXfOoHTr.js +0 -796
  58. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-kjV5Eazv.js +0 -1028
  59. package/dist/UnitView-DHXfAsnq.js +0 -635
  60. package/dist/WarehouseView-DMwbxs1q.js +0 -1043
  61. package/dist/app-BkcO8oNJ.js +0 -66113
  62. package/dist/date2-Cvp5iJkI.js +0 -95
  63. package/dist/dayjs.min-D1_pOsO7.js +0 -282
  64. package/dist/fuzzy-0roCBvgC.js +0 -41
  65. package/dist/index-B_aEOJsR.js +0 -21515
  66. package/dist/number-DLj3W3RW.js +0 -97
  67. package/dist/rules-CCmXA0Yi.js +0 -85
  68. package/dist/use-inventory-binding-dialog-GkJOzE6V.js +0 -93
  69. package/dist/xlsx.util-B_bqymTM.js +0 -107
@@ -1,97 +0,0 @@
1
- import { F as e } from "./index-B_aEOJsR.js";
2
- function p(n, t) {
3
- return e.convertPrecision({
4
- value: n,
5
- precision: t
6
- });
7
- }
8
- function d(n, t) {
9
- return e.add([n, t]);
10
- }
11
- function b(n, t) {
12
- return e.multiply([n, t]);
13
- }
14
- function h(n, t) {
15
- const i = Math.floor(n.amount * t.amount), r = i === 0 ? 0 : n.precision + t.precision, o = u(i), s = Math.min(r, o);
16
- return {
17
- amount: i / Math.pow(10, s),
18
- precision: r - s
19
- };
20
- }
21
- function a(n, t) {
22
- const i = +c(n), r = +c(t);
23
- return i / r;
24
- }
25
- function g(n, t) {
26
- const i = a(n, t);
27
- return l(i);
28
- }
29
- function M(n, t) {
30
- return n.precision >= t ? n : e.convertPrecision({ value: n, precision: t });
31
- }
32
- function v(n) {
33
- const t = u(n.amount), i = n.precision - t;
34
- return e.convertPrecision({ value: n, precision: Math.max(0, i) });
35
- }
36
- function c(n, t = !0) {
37
- return t ? Number(n.amount / Math.pow(10, n.precision)).toFixed(n.precision) : Number(n.amount / Math.pow(10, n.precision)).toString();
38
- }
39
- function A(n, t = !1, i = 2) {
40
- const r = Number(n.amount / Math.pow(10, n.precision)), o = r.toFixed(
41
- Number.isInteger(r) ? 2 : Math.min(4, Math.max(2, i))
42
- );
43
- return t ? `${o} ${n.currency}` : n.currency === "MYR" ? `RM ${o}` : `${n.currency} ${o}`;
44
- }
45
- function j(n) {
46
- return {
47
- ...n,
48
- amount: Math.abs(n.amount)
49
- };
50
- }
51
- function m(n) {
52
- if (!isFinite(n)) return 0;
53
- let t = 1, i = 0;
54
- for (; Math.round(n * t) / t !== n; )
55
- t *= 10, i++;
56
- return i;
57
- }
58
- function l(n) {
59
- const t = m(n);
60
- return {
61
- precision: t,
62
- amount: n * 10 ** t
63
- };
64
- }
65
- function N(n, t = 0, i = !1) {
66
- let r = 0;
67
- return Number.isNaN(Number(n)) || (i || Number(n) >= 0) && (r = Number(n)), {
68
- amount: Number((r * 10 ** t).toFixed(0)),
69
- precision: t
70
- };
71
- }
72
- function u(n) {
73
- const t = `${n}`, i = t.replace(/0*$/g, "");
74
- return t.length - i.length;
75
- }
76
- function y(n, t) {
77
- if (!t)
78
- return n.precision;
79
- const i = u(t.conversion.amount);
80
- return n.precision - t.conversion.precision + i;
81
- }
82
- export {
83
- c as a,
84
- h as b,
85
- l as c,
86
- m as d,
87
- j as e,
88
- b as f,
89
- y as g,
90
- d as h,
91
- A as i,
92
- p as j,
93
- g as k,
94
- v as l,
95
- N as t,
96
- M as u
97
- };
@@ -1,85 +0,0 @@
1
- import { a as u, g as d, c as f } from "./number-DLj3W3RW.js";
2
- import { c as s, a as m } from "./date2-Cvp5iJkI.js";
3
- function y() {
4
- return function(n) {
5
- return !!n || "Required";
6
- };
7
- }
8
- function b(t) {
9
- return t && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "amount") && Object.prototype.hasOwnProperty.call(t, "precision");
10
- }
11
- function A(t, n) {
12
- const o = typeof t == "object" ? +u(t) : t;
13
- function i(e) {
14
- return Object.prototype.hasOwnProperty.call(e, "length");
15
- }
16
- return function(r) {
17
- return b(r) && (r = +u(r)), i(r) ? r.length >= o ? !0 : typeof n == "function" ? n(r.length) : n ?? `Must be at least ${o}` : typeof r == "number" ? r >= o ? !0 : typeof n == "function" ? n(r) : n ?? `Must be at least ${o}` : `Cannot validate at least ${o}`;
18
- };
19
- }
20
- function M(t) {
21
- const n = typeof t == "object" ? +u(t) : t;
22
- function o(i) {
23
- return Object.prototype.hasOwnProperty.call(i, "length");
24
- }
25
- return function(e, r) {
26
- return b(e) && (e = +u(e)), o(e) ? e.length > n ? !0 : typeof r == "function" ? r(e.length) : r ?? `Must be more than ${n}` : typeof e == "number" ? e > n ? !0 : typeof r == "function" ? r(e) : r ?? `Must be more than ${n}` : `Cannot validate more than ${n}`;
27
- };
28
- }
29
- function P(t, n) {
30
- return t instanceof Date && n instanceof Date ? function(i) {
31
- const e = new Date(i);
32
- return isNaN(e.getTime()) ? "Invalid date" : e.getTime() < t.getTime() ? `Date must be at least ${s(t)} ${m(t)}` : e.getTime() >= n.getTime() ? `Date must be less than ${s(n)} ${m(n)}` : !0;
33
- } : typeof t == "number" && typeof n == "number" ? function(i) {
34
- const e = +i;
35
- return isNaN(e) ? "Invalid number" : e < t ? `Value must be at least ${t}` : e >= n ? `Value must be less than ${n}` : !0;
36
- } : function() {
37
- return "Progamming error: invalid range parameter.";
38
- };
39
- }
40
- function a() {
41
- return function(t) {
42
- if (t = String(t), t.length === 0)
43
- return !0;
44
- const n = +t;
45
- return isFinite(n) || "Must be a number";
46
- };
47
- }
48
- function $(t, n) {
49
- return typeof t == "number" ? function(i) {
50
- const e = a()(i);
51
- return typeof e == "string" ? e : f(+i).precision > t ? `Precision cannot be more than ${t} decimal point.` : !0;
52
- } : function(i) {
53
- const e = a()(i);
54
- if (typeof e == "string")
55
- return e;
56
- const r = d(t, n);
57
- return f(+i).precision > r ? `Precision cannot be more than ${r} decimal point.` : !0;
58
- };
59
- }
60
- function j(t, n) {
61
- return function(i) {
62
- const e = a()(i);
63
- if (typeof e == "string")
64
- return e;
65
- const r = f(+i);
66
- return r.precision > t ? typeof n == "function" ? n(r.precision) : n ?? `Precision cannot be more than ${t}` : !0;
67
- };
68
- }
69
- function g(t, n, o) {
70
- return function(e) {
71
- if (e === n) return !0;
72
- const r = t.find((c) => c.value === e);
73
- return r ? o ? o(r) : `Already used in ${r.label}` : !0;
74
- };
75
- }
76
- export {
77
- A,
78
- P as B,
79
- a as I,
80
- $ as M,
81
- y as R,
82
- g as U,
83
- M as a,
84
- j as b
85
- };
@@ -1,93 +0,0 @@
1
- import { _ as y } from "./FmMultiselectDialog.vue_vue_type_script_setup_true_lang-n09XXJZK.js";
2
- import { u as v } from "./app-BkcO8oNJ.js";
3
- import { useDialog as g } from "@feedmepos/ui-library";
4
- function E() {
5
- const d = v(), f = g();
6
- async function b(e, c, r, p = []) {
7
- const m = e.filter((t) => t.type === "SKU"), l = e.filter((t) => t.type === "RECIPE"), i = (r ? d.skus.filter(
8
- (t) => {
9
- var n, o;
10
- return !p.some((s) => s === t._id) && t._id !== r && !((o = (n = t.convert) == null ? void 0 : n.inventoryBindings) != null && o.some((s) => s.id === r));
11
- }
12
- ) : d.skus).map((t) => ({
13
- label: t.name,
14
- sublabel: t.code,
15
- value: t
16
- })), a = i.filter((t) => m.find((n) => n.id === t.value._id)).map((t) => t.value);
17
- f.open({
18
- title: "Select Ingredients",
19
- contentComponent: y,
20
- contentComponentProps: {
21
- items: i,
22
- modelValue: a
23
- },
24
- primaryActions: {
25
- text: "Confirm",
26
- close: !0
27
- },
28
- secondaryActions: {
29
- text: "Close",
30
- close: !0,
31
- variant: "tertiary"
32
- }
33
- }).onPrimary((t) => {
34
- const n = [
35
- ...l,
36
- ...e.filter((o) => t.find((s) => s._id === o.id)),
37
- ...t.filter((o) => !e.find((s) => s.id === o._id)).map((o) => ({
38
- type: "SKU",
39
- id: o._id,
40
- amount: {
41
- amount: 1,
42
- precision: 0
43
- }
44
- }))
45
- ];
46
- c(n);
47
- });
48
- }
49
- async function _(e, c, r = []) {
50
- const p = e.filter((i) => i.type === "SKU"), m = e.filter((i) => i.type === "RECIPE"), l = d.recipes.filter((i) => !r.includes(i._id)).map((i) => ({
51
- label: i.name,
52
- value: i
53
- })), u = l.filter((i) => m.find((a) => a.id === i.value._id)).map((i) => i.value);
54
- f.open({
55
- title: "Select Recipes",
56
- contentComponent: y,
57
- contentComponentProps: {
58
- items: l,
59
- modelValue: u
60
- },
61
- primaryActions: {
62
- text: "Confirm",
63
- close: !0
64
- },
65
- secondaryActions: {
66
- text: "Close",
67
- close: !0,
68
- variant: "tertiary"
69
- }
70
- }).onPrimary((i) => {
71
- const a = [
72
- ...e.filter((t) => i.find((n) => n._id === t.id)),
73
- ...i.filter((t) => !e.find((n) => n.id === t._id)).map((t) => ({
74
- type: "RECIPE",
75
- id: t._id,
76
- amount: {
77
- amount: 1,
78
- precision: 0
79
- }
80
- })),
81
- ...p
82
- ];
83
- c(a);
84
- });
85
- }
86
- return {
87
- promptIngredientsBinding: b,
88
- promptRecipesBinding: _
89
- };
90
- }
91
- export {
92
- E as u
93
- };
@@ -1,107 +0,0 @@
1
- import { defineComponent as _, openBlock as f, createElementBlock as u, createElementVNode as x, toDisplayString as d, Fragment as g, renderList as M, unref as v } from "vue";
2
- import { a as h, b } from "./number-DLj3W3RW.js";
3
- import { u as y, w as k, r as S } from "./xlsx-vUzm_udV.js";
4
- const A = { class: "flex flex-col" }, $ = { class: "flex flex-row fm-typo-en-body-md-600 bg-fm-color-neutral-gray-100 text-fm-color-typo-secondary h-48 items-center" }, B = { class: "flex-1 py-8 px-16" }, E = /* @__PURE__ */ x("div", {
5
- class: "flex-0 py-8 px-16",
6
- style: { "flex-basis": "120px" }
7
- }, "Amount", -1), I = { class: "flex-1 py-8 px-16" }, N = {
8
- key: 0,
9
- class: "flex-0 py-8 px-16",
10
- style: { "flex-basis": "120px" }
11
- }, j = {
12
- key: 1,
13
- class: "flex-0 py-8 px-16",
14
- style: { "flex-basis": "120px" }
15
- }, R = /* @__PURE__ */ _({
16
- __name: "IngredientBindedItem",
17
- props: {
18
- name: {},
19
- bindings: {}
20
- },
21
- setup(o) {
22
- function n(e, s) {
23
- var t;
24
- if (e.measurement) {
25
- const a = b(e.amount, e.measurement.conversion);
26
- return `${h(a, !1)} ${(t = e.measurement) == null ? void 0 : t.abbrev}`;
27
- }
28
- return `${h(e.amount, !1)} ${s.abbrev}`;
29
- }
30
- function r(e) {
31
- return e.unit !== void 0;
32
- }
33
- return (e, s) => (f(), u("div", A, [
34
- x("div", $, [
35
- x("div", B, d(e.name), 1),
36
- E
37
- ]),
38
- (f(!0), u(g, null, M(e.bindings, (t) => (f(), u("div", {
39
- key: t.id,
40
- class: "flex flex-row fm-typo-en-body-md-400 h-48 items-center border-b border-b-fm-color-neutral-gray-100"
41
- }, [
42
- x("div", I, d(t.name), 1),
43
- r(t) ? (f(), u("div", N, d(n(t, t.unit)), 1)) : (f(), u("div", j, d(v(h)(t.amount, !1)), 1))
44
- ]))), 128))
45
- ]));
46
- }
47
- });
48
- function* C(o) {
49
- const [n, r] = o.split(":"), e = /\d+/, s = e.exec(n), t = e.exec(r);
50
- if (!s || !t)
51
- throw new Error(`Cannot parse row range for range: ${o}`);
52
- const a = Number(s[0]), l = Number(t[0]);
53
- for (let c = a; c <= l; c++)
54
- yield c;
55
- }
56
- function* F(o) {
57
- const [n, r] = o.split(":"), e = /[^\d]+/, s = e.exec(n), t = e.exec(r);
58
- if (!s || !t)
59
- throw new Error(`Cannot parse row range for range: ${o}`);
60
- let a = 0, l = "A";
61
- for (yield l; l !== t[0]; ) {
62
- a++;
63
- const c = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
64
- let i = a, m = !1, p = "";
65
- do {
66
- const w = i % c.length;
67
- i = Math.floor(i / c.length), p += c.charAt(w), m = i > 0, i -= 1;
68
- } while (m);
69
- l = p.split("").reverse().join(""), yield l;
70
- }
71
- }
72
- function T(o) {
73
- var e;
74
- const n = [], r = o["!ref"];
75
- if (!r) return n;
76
- for (const s of C(r)) {
77
- const t = [];
78
- for (const a of F(r))
79
- t.push(((e = o[`${a}${s}`]) == null ? void 0 : e.w) ?? "");
80
- n.push(t);
81
- }
82
- return n;
83
- }
84
- function X(o, n, r = "Sheet1") {
85
- const e = y.aoa_to_sheet([n, ...o]), s = o.reduce((l, c) => Math.max(l, c.length), 0), t = Array.from({ length: s }).map((l, c) => {
86
- const i = o.map((m) => `${m[c]}`).reduce((m, p) => Math.max(m, p.length + 3), 0);
87
- return {
88
- wch: Math.max(i, 5)
89
- };
90
- });
91
- e["!cols"] = t;
92
- const a = y.book_new();
93
- return y.book_append_sheet(a, e, r), a;
94
- }
95
- function U(o, n) {
96
- k(o, n, { compression: !0 });
97
- }
98
- async function V(o) {
99
- return S(await o.arrayBuffer());
100
- }
101
- export {
102
- R as _,
103
- U as d,
104
- V as r,
105
- T as s,
106
- X as t
107
- };