@feedmepos/mf-inventory-portal 0.0.25-dev.38 → 0.0.25-dev.39
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/{App-hhvhfaVM.js → App-B7L9LuKI.js} +2 -2
- package/dist/{ApprovalView-CQTi8xek.js → ApprovalView-P7uUdpuJ.js} +2 -2
- package/dist/{BindingsDialog-C79sZjTC.js → BindingsDialog-E4j9FuOl.js} +2 -2
- package/dist/{BindingsPicker-BjDgP8ZY.js → BindingsPicker-3mrWImf-.js} +1 -1
- package/dist/{BindingsTable-BZ9Umf7m.js → BindingsTable-DMoC7BEJ.js} +1 -1
- package/dist/{ClosingDraftView-CiViDjmq.js → ClosingDraftView-hUFOQ9pI.js} +241 -237
- package/dist/{ClosingTemplateView-BsdJoo_c.js → ClosingTemplateView-DGG2zD13.js} +2 -2
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CVGQkbfy.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BjYwi7Vb.js} +3 -3
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-CGoDBgGZ.js → FmUnitInput.vue_vue_type_script_setup_true_lang-B7CfRiCR.js} +1 -1
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-4_lF2HuT.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DH5ud0qJ.js} +1 -1
- package/dist/{IngredientGroupView-BBFe2QNY.js → IngredientGroupView-D63u-gSo.js} +1 -1
- package/dist/{IngredientsView-DrkQVuCl.js → IngredientsView-DzzIoie9.js} +115 -106
- package/dist/{IntegrationView-BR0_updv.js → IntegrationView-SO7nVoSn.js} +1 -1
- package/dist/{InventoryBindingForm-qfm6N3kd.js → InventoryBindingForm-CNBLyKuy.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-C7Y6qlbt.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-gcdA5y3h.js} +3 -3
- package/dist/{InventoryBindingSummary-BFeonJ57.js → InventoryBindingSummary-Cx5doszw.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-OIti-A9w.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-uBLwHGx6.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-XrWWnbN_.js → PremiumBadge.vue_vue_type_script_setup_true_lang-U-MNov1N.js} +1 -1
- package/dist/{PublishView-ChEkvKGY.js → PublishView-C7-F5H_l.js} +2 -2
- package/dist/{PurchaseOrderPrintPreview-BrnnwFGN.js → PurchaseOrderPrintPreview-Cn1MGNQG.js} +1 -1
- package/dist/{ReceiveRequestView-3-xKaZwM.js → ReceiveRequestView-1ltlDUjA.js} +9 -9
- package/dist/{RecipeView-BKpPv7My.js → RecipeView-CFEr9txv.js} +3 -3
- package/dist/{StockView-CRxqN8lP.js → StockView-BCuZoG8u.js} +7 -7
- package/dist/{SupplierView-ex1jQt0k.js → SupplierView-BFZYyzZE.js} +4 -4
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-CZMz9g-n.js → TransferDetails.vue_vue_type_script_setup_true_lang-XKOcF4q9.js} +4 -4
- package/dist/{TransferTemplateView-BsWk0vV4.js → TransferTemplateView-DAcRo6jQ.js} +7 -7
- package/dist/{UnitView-DpbEefeR.js → UnitView-IzqKR_Ue.js} +3 -3
- package/dist/{WarehouseView-DxX8my77.js → WarehouseView-D_lYd_zi.js} +1 -1
- package/dist/api/stock.d.ts +1 -0
- package/dist/{app-fksh_4Zg.js → app-D8JtDgcD.js} +10 -10
- package/dist/app.js +1 -1
- package/dist/{decimal-BNkG2vLf.js → decimal-BzA7nhoj.js} +1 -1
- package/dist/{feature-CSOnhGSg.js → feature-DZpzqRzb.js} +1 -1
- package/dist/{format-unit-display-BLcUGrLx.js → format-unit-display-gJA_tWyb.js} +2 -2
- package/dist/{index-D4Or5bIy.js → index-4_4oJqYY.js} +2 -2
- package/dist/{stock-DEKMoEdQ.js → stock-Cw4_XPhT.js} +29 -25
- package/dist/{supplier-BRQmRIMB.js → supplier-FQRxjLKh.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-lCrbZ411.js → use-ingredient-select-dialog-CxxnIrMR.js} +1 -1
- package/dist/{use-inventory-binding-dialog-DMQdYN2j.js → use-inventory-binding-dialog-C9t7UpkK.js} +1 -1
- package/dist/{vue-i18n-Dx5MlfSW.js → vue-i18n-UenefCe4.js} +153 -153
- package/package.json +3 -3
|
@@ -1,41 +1,45 @@
|
|
|
1
|
-
import { W as m, u as B, a as
|
|
2
|
-
import { useCoreStore as
|
|
1
|
+
import { W as m, u as B, a as l, ao as k, K as v } from "./app-D8JtDgcD.js";
|
|
2
|
+
import { useCoreStore as p } from "@feedmepos/mf-common";
|
|
3
3
|
import { useSnackbar as y } from "@feedmepos/ui-library";
|
|
4
4
|
import { ref as $, computed as S } from "vue";
|
|
5
5
|
const b = m((r, o) => {
|
|
6
|
-
const
|
|
6
|
+
const c = B(), a = p(), u = y();
|
|
7
7
|
return o.onError(async (t) => {
|
|
8
|
-
t.name === "SvcForbiddenError" && (
|
|
8
|
+
t.name === "SvcForbiddenError" && (u == null || u.open({
|
|
9
9
|
title: t.title,
|
|
10
10
|
message: t.message,
|
|
11
11
|
type: "error"
|
|
12
12
|
}));
|
|
13
13
|
}), {
|
|
14
14
|
async readStockBalance() {
|
|
15
|
-
const t =
|
|
15
|
+
const t = c.currentLocationDBName, e = `${r.inventoryBackendUrl}/${t}/stock-balance`;
|
|
16
16
|
return await o.get(e);
|
|
17
17
|
},
|
|
18
18
|
async readSkuBalance() {
|
|
19
19
|
var s;
|
|
20
|
-
const t =
|
|
20
|
+
const t = c.currentLocationDBName, e = `${r.inventoryBackendUrl}/${t}/sku/balance`;
|
|
21
21
|
return (((s = a.currentBusiness.value) == null ? void 0 : s.menuVersion) ?? "") === "v3" ? await o.get(e) : await o.get(`${e}?useInventoryDoc=true`);
|
|
22
22
|
},
|
|
23
23
|
async readSingleAdjustment(t) {
|
|
24
|
-
const e =
|
|
24
|
+
const e = c.currentLocationDBName, n = `${r.inventoryBackendUrl}/${e}/adjustment`;
|
|
25
25
|
return await o.get(`${n}?adjustmentId=${t}`);
|
|
26
26
|
},
|
|
27
27
|
async readStockAdjustment(t, e, n) {
|
|
28
|
-
const s =
|
|
28
|
+
const s = c.currentLocationDBName, i = `${r.inventoryBackendUrl}/${s}/sku`;
|
|
29
29
|
return await o.get(`${i}?skuId=${t}&start=${e}&end=${n}`);
|
|
30
30
|
},
|
|
31
|
+
async readAdjustmentById(t) {
|
|
32
|
+
const e = c.currentLocationDBName, n = `${r.inventoryBackendUrl}/${e}/adjustment`;
|
|
33
|
+
return await o.get(`${n}?adjustmentId=${t}`);
|
|
34
|
+
},
|
|
31
35
|
async convertSku(t) {
|
|
32
36
|
var i;
|
|
33
|
-
const e =
|
|
37
|
+
const e = c.currentLocationDBName, n = `${r.inventoryBackendUrl}/${e}/sku/convert`;
|
|
34
38
|
return (((i = a.currentBusiness.value) == null ? void 0 : i.menuVersion) ?? "") === "v3" ? await o.post(n, t) : await o.post(`${n}?useInventoryDoc=true`, t);
|
|
35
39
|
},
|
|
36
40
|
async adjustSku(t) {
|
|
37
41
|
var i;
|
|
38
|
-
const e =
|
|
42
|
+
const e = c.currentLocationDBName, n = `${r.inventoryBackendUrl}/${e}/sku/adjust`;
|
|
39
43
|
return (((i = a.currentBusiness.value) == null ? void 0 : i.menuVersion) ?? "") === "v3" ? await o.post(n, t) : await o.post(`${n}?useInventoryDoc=true`, t);
|
|
40
44
|
},
|
|
41
45
|
recalculation: {
|
|
@@ -61,44 +65,44 @@ function g() {
|
|
|
61
65
|
productBalance: []
|
|
62
66
|
};
|
|
63
67
|
}
|
|
64
|
-
const f =
|
|
68
|
+
const f = v(0), w = {
|
|
65
69
|
id: "",
|
|
66
70
|
balance: f,
|
|
67
71
|
closing: null,
|
|
68
72
|
costs: null
|
|
69
|
-
},
|
|
70
|
-
const r =
|
|
73
|
+
}, d = $(g()), A = () => {
|
|
74
|
+
const r = l(), o = S(() => {
|
|
71
75
|
var t;
|
|
72
|
-
const a = (t =
|
|
76
|
+
const a = (t = d.value.stockBalance.skus) == null ? void 0 : t.groupBy((e) => e.id), u = (e) => {
|
|
73
77
|
var n;
|
|
74
78
|
return ((n = a == null ? void 0 : a.get(e)) == null ? void 0 : n[0]) ?? { ...w, id: e };
|
|
75
79
|
};
|
|
76
|
-
return r.skus.map((e) =>
|
|
77
|
-
}),
|
|
80
|
+
return r.skus.map((e) => u(e._id));
|
|
81
|
+
}), c = b();
|
|
78
82
|
return {
|
|
79
83
|
// state
|
|
80
84
|
get stockBalance() {
|
|
81
85
|
return {
|
|
82
|
-
...
|
|
86
|
+
...d.value.stockBalance,
|
|
83
87
|
skus: o.value
|
|
84
88
|
};
|
|
85
89
|
},
|
|
86
90
|
set stockBalance(a) {
|
|
87
|
-
|
|
91
|
+
d.value.stockBalance = a;
|
|
88
92
|
},
|
|
89
93
|
get productBalance() {
|
|
90
|
-
return
|
|
94
|
+
return d.value.productBalance;
|
|
91
95
|
},
|
|
92
96
|
set productBalance(a) {
|
|
93
|
-
|
|
97
|
+
d.value.productBalance = a;
|
|
94
98
|
},
|
|
95
99
|
// actions
|
|
96
100
|
async readStockBalance() {
|
|
97
|
-
this.stockBalance = await
|
|
101
|
+
this.stockBalance = await c.readStockBalance();
|
|
98
102
|
},
|
|
99
103
|
async readProductBalance() {
|
|
100
104
|
this.productBalance = [];
|
|
101
|
-
const a =
|
|
105
|
+
const a = l(), u = k({
|
|
102
106
|
recipes: a.recipes,
|
|
103
107
|
skus: a.skus,
|
|
104
108
|
inventoryBindingMapping: {},
|
|
@@ -108,9 +112,9 @@ const f = p(0), w = {
|
|
|
108
112
|
function t(e, n) {
|
|
109
113
|
return Object.prototype.hasOwnProperty.call(e, n);
|
|
110
114
|
}
|
|
111
|
-
for (const e in
|
|
112
|
-
if (t(
|
|
113
|
-
const n =
|
|
115
|
+
for (const e in u.convertCountdown)
|
|
116
|
+
if (t(u.convertCountdown, e)) {
|
|
117
|
+
const n = u.convertCountdown[e];
|
|
114
118
|
this.productBalance.push({
|
|
115
119
|
id: e,
|
|
116
120
|
count: n
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { W as m, u, s as y, ap as b, aq as v } from "./app-
|
|
1
|
+
import { W as m, u, s as y, ap as b, aq as v } from "./app-D8JtDgcD.js";
|
|
2
2
|
import { useCoreStore as c } from "@feedmepos/mf-common";
|
|
3
3
|
import { defineStore as w } from "pinia";
|
|
4
4
|
import { ref as l, computed as d } from "vue";
|