@feedmepos/mf-inventory-portal 0.0.23-dev.7 → 0.0.23-dev.9
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-MWE4uZN2.js → App-ByLgARNp.js} +37 -33
- package/dist/{ApprovalView-DTBGzcfq.js → ApprovalView-e85YmdZN.js} +4 -4
- package/dist/{BindingsDialog-BaK8KE5C.js → BindingsDialog-giBUD0IH.js} +2 -2
- package/dist/{BindingsPicker-C6YXPChW.js → BindingsPicker-CC4MmPbF.js} +2 -2
- package/dist/{BindingsTable-BO3FV22B.js → BindingsTable-WphZdzrA.js} +6 -6
- package/dist/ClosingDraftView-CQM1Sx45.js +755 -0
- package/dist/{ClosingTemplateView--hHcPJJj.js → ClosingTemplateView-1lzoDyet.js} +32 -31
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-C6setquX.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Cv-vvzr5.js} +19 -19
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-IRl6BsoL.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BvkN-71q.js} +2 -2
- package/dist/{FmMultiselectDialog-jlCh7zDq.js → FmMultiselectDialog-DScMA6iG.js} +15 -15
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-TeysdWIy.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DIFQcrc0.js} +2 -2
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-BAj6ln1k.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-t4pim_k9.js} +1 -1
- package/dist/{IngredientGroupView-BM07A4fB.js → IngredientGroupView-UegBM_JK.js} +12 -11
- package/dist/{IngredientsView-J9NM-pfU.js → IngredientsView-BfW-jZLM.js} +13 -12
- package/dist/{IntegrationView-DeR9JiDO.js → IntegrationView-FYNNzKia.js} +50 -50
- package/dist/{InventoryBindingForm-Bhk9dMsL.js → InventoryBindingForm-DsHv_IHG.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-yaHMbpFX.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-BURSXafS.js} +13 -13
- package/dist/{InventoryBindingSummary-BVujhHLB.js → InventoryBindingSummary-BLb4MRPZ.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-ClaOjAPR.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BG78-DHs.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-Dh9RYSdM.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CqID5_7v.js} +2 -2
- package/dist/{PurchaseOrderPrintPreview-B7SKVm_d.js → PurchaseOrderPrintPreview-BBMU3teq.js} +1 -1
- package/dist/{ReceiveRequestView-CNaohBx7.js → ReceiveRequestView-vbANEzne.js} +19 -19
- package/dist/{RecipeView-B5POouqT.js → RecipeView-DW4DY0C0.js} +11 -10
- package/dist/{StockView-DxBkg4B1.js → StockView-C5btudss.js} +1356 -1457
- package/dist/{SupplierView-DSmE8k_W.js → SupplierView-B2aObtwK.js} +14 -13
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-_luCbCMS.js → TransferDetails.vue_vue_type_script_setup_true_lang-B2LOvVef.js} +18 -17
- package/dist/{TransferTemplateView-CE8FN02v.js → TransferTemplateView-BKumN_p6.js} +57 -56
- package/dist/{UnitView-LmhfuQ7G.js → UnitView-CHLucv9s.js} +81 -80
- package/dist/{WarehouseView-DNPfTpbR.js → WarehouseView-G8pej6Y2.js} +25 -24
- package/dist/api/closing-draft.d.ts +6 -0
- package/dist/api/closing.d.ts +1 -0
- package/dist/{app-CHUTVCqW.js → app-BXjk74IB.js} +2175 -2140
- package/dist/app.d.ts +3 -0
- package/dist/app.js +1 -1
- package/dist/components/row-action.enum.d.ts +1 -0
- package/dist/{date2-jflNp4un.js → date2-CWAt9bRf.js} +1 -1
- package/dist/{dayjs.min-Ura1hQS9.js → dayjs.min-D3jPOnu6.js} +17 -17
- package/dist/{decimal-MDopy-42.js → decimal-DC07xoJW.js} +1 -1
- package/dist/{defineDeepModel-DJJQtyLG.js → defineDeepModel-CiD4GtOw.js} +1 -1
- package/dist/{feature-1MCtECkH.js → feature-6tcLMotY.js} +1 -1
- package/dist/form-mode.enum-BKiNVH6A.js +4 -0
- package/dist/{format-time-from-id-C_Ql1G1m.js → format-time-from-id-CYU5Z9Mt.js} +1 -1
- package/dist/{format-unit-display-8CZtD9mX.js → format-unit-display-CY-0bznr.js} +83 -82
- package/dist/{fuzzy-BYzBSFQ9.js → fuzzy-BMkhNYLR.js} +1 -1
- package/dist/{index-BfpXXehq.js → index-BXwQa14X.js} +1 -1
- package/dist/{index-B17P8VA1.js → index-CRLd5xyg.js} +1 -1
- package/dist/{index-DacyZLBG.js → index-DqwAtOgI.js} +1 -1
- package/dist/{netsuite-N4WoiSJk.js → netsuite-fYUUk_ss.js} +1 -1
- package/dist/router/name.d.ts +1 -0
- package/dist/{row-action.enum-PMKMRrZR.js → row-action.enum-7rGLGZ5v.js} +10 -5
- package/dist/{rules-XXZyqauM.js → rules-BmRGm3yv.js} +39 -35
- package/dist/stock-CEX0DP2B.js +111 -0
- package/dist/stores/inventory.d.ts +1 -4
- package/dist/style.css +1 -1
- package/dist/{supplier-CTbtvSjM.js → supplier-CdJmZr7w.js} +22 -22
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-inventory-binding-dialog-Ri_zc-M3.js → use-inventory-binding-dialog-B0G2XYSw.js} +2 -2
- package/dist/{use-template-enabled-locations-2-BfvnBeUQ.js → use-template-enabled-locations-2-xbPJWHCs.js} +2 -2
- package/dist/views/closing-draft/ClosingDraftView.vue.d.ts +2 -0
- package/dist/views/closing-draft/components/closing-draft-action/ClosingDraftAction.vue.d.ts +22 -0
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +447 -0
- package/dist/views/closing-draft/composables/use-closing-draft-actions.d.ts +22 -0
- package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +2601 -0
- package/dist/views/closing-draft/helpers/draft-status-to-class-name.helper.d.ts +1 -0
- package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +24 -192
- package/dist/views/closing-template/composables/use-closing-template-table.d.ts +24 -192
- package/dist/{xlsx-BHa16rol.js → xlsx-CTOKp7SQ.js} +1 -1
- package/dist/{xlsx.util-CNw5O-OJ.js → xlsx.util-D5NFSfDg.js} +1 -1
- package/package.json +1 -1
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
import { F as s } from "./index-
|
|
2
|
-
import { c as d, a as b } from "./date2-
|
|
3
|
-
function
|
|
1
|
+
import { F as s } from "./index-CRLd5xyg.js";
|
|
2
|
+
import { c as d, a as b } from "./date2-CWAt9bRf.js";
|
|
3
|
+
function j(t, n) {
|
|
4
4
|
return s.convertPrecision({
|
|
5
5
|
value: t,
|
|
6
6
|
precision: n
|
|
7
7
|
});
|
|
8
8
|
}
|
|
9
|
+
function P(t, n) {
|
|
10
|
+
return s.subtract([t, n]);
|
|
11
|
+
}
|
|
9
12
|
function $(t, n) {
|
|
10
13
|
return s.add([t, n]);
|
|
11
14
|
}
|
|
12
|
-
function
|
|
15
|
+
function N(t, n) {
|
|
13
16
|
return s.multiply([t, n]);
|
|
14
17
|
}
|
|
15
|
-
function
|
|
18
|
+
function D(t, n) {
|
|
16
19
|
const r = Math.floor(t.amount * n.amount), i = r === 0 ? 0 : t.precision + n.precision, e = a(r), o = Math.min(i, e);
|
|
17
20
|
return {
|
|
18
21
|
amount: r / Math.pow(10, o),
|
|
@@ -23,11 +26,11 @@ function l(t, n) {
|
|
|
23
26
|
const r = +u(t), i = +u(n);
|
|
24
27
|
return r / i;
|
|
25
28
|
}
|
|
26
|
-
function
|
|
29
|
+
function F(t, n) {
|
|
27
30
|
const r = l(t, n);
|
|
28
31
|
return c(r);
|
|
29
32
|
}
|
|
30
|
-
function
|
|
33
|
+
function T(t, n) {
|
|
31
34
|
return t.precision >= n ? t : s.convertPrecision({ value: t, precision: n });
|
|
32
35
|
}
|
|
33
36
|
function h(t) {
|
|
@@ -38,18 +41,18 @@ function h(t) {
|
|
|
38
41
|
function u(t, n = !0) {
|
|
39
42
|
return n ? Number(t.amount / Math.pow(10, t.precision)).toFixed(t.precision) : Number(t.amount / Math.pow(10, t.precision)).toString();
|
|
40
43
|
}
|
|
41
|
-
function
|
|
44
|
+
function x(t, n) {
|
|
42
45
|
n = n ?? M(t);
|
|
43
46
|
const r = n, i = t.toFixed(r), e = i.includes(".") ? i.replace(/0+$/, "") : i;
|
|
44
47
|
return e.endsWith(".") ? e.slice(0, e.length - 1) : e;
|
|
45
48
|
}
|
|
46
|
-
function
|
|
49
|
+
function w(t, n = !1, r = 2) {
|
|
47
50
|
const i = Number(t.amount / Math.pow(10, t.precision)), e = i.toFixed(
|
|
48
51
|
Number.isInteger(i) ? 2 : Math.min(4, Math.max(2, r))
|
|
49
52
|
);
|
|
50
53
|
return n ? `${e} ${t.currency}` : t.currency === "MYR" ? `RM ${e}` : `${t.currency} ${e}`;
|
|
51
54
|
}
|
|
52
|
-
function
|
|
55
|
+
function O(t) {
|
|
53
56
|
return {
|
|
54
57
|
...t,
|
|
55
58
|
amount: Math.abs(t.amount)
|
|
@@ -69,7 +72,7 @@ function c(t) {
|
|
|
69
72
|
amount: t * 10 ** n
|
|
70
73
|
};
|
|
71
74
|
}
|
|
72
|
-
function
|
|
75
|
+
function B(t, n = 0, r = !1) {
|
|
73
76
|
let i = 0;
|
|
74
77
|
return Number.isNaN(Number(t)) || (r || Number(t) >= 0) && (i = Number(t)), {
|
|
75
78
|
amount: Number((i * 10 ** n).toFixed(0)),
|
|
@@ -86,7 +89,7 @@ function y(t, n) {
|
|
|
86
89
|
const r = a(n.conversion.amount);
|
|
87
90
|
return t.precision - n.conversion.precision + r;
|
|
88
91
|
}
|
|
89
|
-
function
|
|
92
|
+
function R() {
|
|
90
93
|
return function(n) {
|
|
91
94
|
return !!n || "Required";
|
|
92
95
|
};
|
|
@@ -94,7 +97,7 @@ function B() {
|
|
|
94
97
|
function m(t) {
|
|
95
98
|
return t && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "amount") && Object.prototype.hasOwnProperty.call(t, "precision");
|
|
96
99
|
}
|
|
97
|
-
function
|
|
100
|
+
function q(t, n) {
|
|
98
101
|
const r = typeof t == "object" ? +u(t) : t;
|
|
99
102
|
function i(e) {
|
|
100
103
|
return Object.prototype.hasOwnProperty.call(e, "length");
|
|
@@ -112,7 +115,7 @@ function L(t) {
|
|
|
112
115
|
return m(e) && (e = +u(e)), r(e) ? e.length > n ? !0 : typeof o == "function" ? o(e.length) : o ?? `Must be more than ${n}` : typeof e == "number" ? e > n ? !0 : typeof o == "function" ? o(e) : o ?? `Must be more than ${n}` : `Cannot validate more than ${n}`;
|
|
113
116
|
};
|
|
114
117
|
}
|
|
115
|
-
function
|
|
118
|
+
function C(t, n) {
|
|
116
119
|
return t instanceof Date && n instanceof Date ? function(i) {
|
|
117
120
|
const e = new Date(i);
|
|
118
121
|
return isNaN(e.getTime()) ? "Invalid date" : e.getTime() < t.getTime() ? `Date must be at least ${d(t)} ${b(t)}` : e.getTime() >= n.getTime() ? `Date must be less than ${d(n)} ${b(n)}` : !0;
|
|
@@ -131,7 +134,7 @@ function f() {
|
|
|
131
134
|
return isFinite(n) || "Must be a number";
|
|
132
135
|
};
|
|
133
136
|
}
|
|
134
|
-
function
|
|
137
|
+
function V(t, n) {
|
|
135
138
|
return typeof t == "number" ? function(i) {
|
|
136
139
|
const e = f()(i);
|
|
137
140
|
return typeof e == "string" ? e : c(+i).precision > t ? `Precision cannot be more than ${t} decimal point.` : !0;
|
|
@@ -143,7 +146,7 @@ function C(t, n) {
|
|
|
143
146
|
return c(+i).precision > o ? `Precision cannot be more than ${o} decimal point.` : !0;
|
|
144
147
|
};
|
|
145
148
|
}
|
|
146
|
-
function
|
|
149
|
+
function Y(t, n) {
|
|
147
150
|
return function(i) {
|
|
148
151
|
const e = f()(i);
|
|
149
152
|
if (typeof e == "string")
|
|
@@ -152,14 +155,14 @@ function V(t, n) {
|
|
|
152
155
|
return o.precision > t ? typeof n == "function" ? n(o.precision) : n ?? `Precision cannot be more than ${t}` : !0;
|
|
153
156
|
};
|
|
154
157
|
}
|
|
155
|
-
function
|
|
158
|
+
function Z(t, n, r) {
|
|
156
159
|
return function(e) {
|
|
157
160
|
if (e === n) return !0;
|
|
158
161
|
const o = t.find((p) => p.value === e);
|
|
159
162
|
return o ? r ? r(o) : `Already used in ${o.label}` : !0;
|
|
160
163
|
};
|
|
161
164
|
}
|
|
162
|
-
function
|
|
165
|
+
function S(t) {
|
|
163
166
|
let n = typeof t == "number" ? c(t) : t;
|
|
164
167
|
n = h(n);
|
|
165
168
|
const r = u(n);
|
|
@@ -172,28 +175,29 @@ function Z(t) {
|
|
|
172
175
|
};
|
|
173
176
|
}
|
|
174
177
|
export {
|
|
175
|
-
|
|
176
|
-
|
|
178
|
+
q as A,
|
|
179
|
+
C as B,
|
|
177
180
|
f as I,
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
+
V as M,
|
|
182
|
+
R,
|
|
183
|
+
Z as U,
|
|
181
184
|
u as a,
|
|
182
|
-
|
|
185
|
+
D as b,
|
|
183
186
|
c,
|
|
184
187
|
L as d,
|
|
185
188
|
M as e,
|
|
186
|
-
|
|
189
|
+
O as f,
|
|
187
190
|
y as g,
|
|
188
|
-
|
|
191
|
+
N as h,
|
|
189
192
|
$ as i,
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
193
|
+
w as j,
|
|
194
|
+
j as k,
|
|
195
|
+
P as l,
|
|
196
|
+
F as m,
|
|
197
|
+
h as n,
|
|
198
|
+
x as o,
|
|
199
|
+
S as p,
|
|
200
|
+
Y as q,
|
|
201
|
+
B as t,
|
|
202
|
+
T as u
|
|
199
203
|
};
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { k as l, u as m, a as B } from "./app-BXjk74IB.js";
|
|
2
|
+
import { useCoreStore as k } from "@feedmepos/mf-common";
|
|
3
|
+
import { useSnackbar as p } from "@feedmepos/ui-library";
|
|
4
|
+
import { g as v } from "./index-CRLd5xyg.js";
|
|
5
|
+
import { ref as y } from "vue";
|
|
6
|
+
const $ = l((o, t) => {
|
|
7
|
+
const s = m(), u = k(), c = p();
|
|
8
|
+
return t.onError(async (e) => {
|
|
9
|
+
e.name === "SvcForbiddenError" && (c == null || c.open({
|
|
10
|
+
title: e.title,
|
|
11
|
+
message: e.message,
|
|
12
|
+
type: "error"
|
|
13
|
+
}));
|
|
14
|
+
}), {
|
|
15
|
+
async readStockBalance() {
|
|
16
|
+
const e = s.currentLocationDBName, n = `${o.inventoryBackendUrl}/${e}/stock-balance`;
|
|
17
|
+
return await t.get(n);
|
|
18
|
+
},
|
|
19
|
+
async readSkuBalance() {
|
|
20
|
+
var r;
|
|
21
|
+
const e = s.currentLocationDBName, n = `${o.inventoryBackendUrl}/${e}/sku/balance`;
|
|
22
|
+
return (((r = u.currentBusiness.value) == null ? void 0 : r.menuVersion) ?? "") === "v3" ? await t.get(n) : await t.get(`${n}?useInventoryDoc=true`);
|
|
23
|
+
},
|
|
24
|
+
async readSingleAdjustment(e) {
|
|
25
|
+
const n = s.currentLocationDBName, a = `${o.inventoryBackendUrl}/${n}/adjustment`;
|
|
26
|
+
return await t.get(`${a}?adjustmentId=${e}`);
|
|
27
|
+
},
|
|
28
|
+
async readStockAdjustment(e, n, a) {
|
|
29
|
+
const r = s.currentLocationDBName, i = `${o.inventoryBackendUrl}/${r}/sku`;
|
|
30
|
+
return await t.get(`${i}?skuId=${e}&start=${n}&end=${a}`);
|
|
31
|
+
},
|
|
32
|
+
async convertSku(e) {
|
|
33
|
+
var i;
|
|
34
|
+
const n = s.currentLocationDBName, a = `${o.inventoryBackendUrl}/${n}/sku/convert`;
|
|
35
|
+
return (((i = u.currentBusiness.value) == null ? void 0 : i.menuVersion) ?? "") === "v3" ? await t.post(a, e) : await t.post(`${a}?useInventoryDoc=true`, e);
|
|
36
|
+
},
|
|
37
|
+
async adjustSku(e) {
|
|
38
|
+
var i;
|
|
39
|
+
const n = s.currentLocationDBName, a = `${o.inventoryBackendUrl}/${n}/sku/adjust`;
|
|
40
|
+
return (((i = u.currentBusiness.value) == null ? void 0 : i.menuVersion) ?? "") === "v3" ? await t.post(a, e) : await t.post(`${a}?useInventoryDoc=true`, e);
|
|
41
|
+
},
|
|
42
|
+
recalculation: {
|
|
43
|
+
getRecalculateAbility() {
|
|
44
|
+
var r;
|
|
45
|
+
const n = `business_${(r = u.currentBusiness.value) == null ? void 0 : r._id}`, a = `${o.inventoryBackendUrl}/${n}/stock/operations/recalculate`;
|
|
46
|
+
return t.get(a);
|
|
47
|
+
},
|
|
48
|
+
startRecalculateTask() {
|
|
49
|
+
var r;
|
|
50
|
+
const n = `business_${(r = u.currentBusiness.value) == null ? void 0 : r._id}`, a = `${o.inventoryBackendUrl}/${n}/stock/operations/recalculate?refundFromPreviousAdjustment=true`;
|
|
51
|
+
return t.post(a);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
});
|
|
56
|
+
function S() {
|
|
57
|
+
return {
|
|
58
|
+
stockBalance: {
|
|
59
|
+
_id: "",
|
|
60
|
+
items: []
|
|
61
|
+
},
|
|
62
|
+
productBalance: []
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
const d = y(S()), I = () => {
|
|
66
|
+
const o = $();
|
|
67
|
+
return {
|
|
68
|
+
// state
|
|
69
|
+
get stockBalance() {
|
|
70
|
+
return d.value.stockBalance;
|
|
71
|
+
},
|
|
72
|
+
set stockBalance(t) {
|
|
73
|
+
d.value.stockBalance = t;
|
|
74
|
+
},
|
|
75
|
+
get productBalance() {
|
|
76
|
+
return d.value.productBalance;
|
|
77
|
+
},
|
|
78
|
+
set productBalance(t) {
|
|
79
|
+
d.value.productBalance = t;
|
|
80
|
+
},
|
|
81
|
+
// actions
|
|
82
|
+
async readStockBalance() {
|
|
83
|
+
this.stockBalance = await o.readStockBalance();
|
|
84
|
+
},
|
|
85
|
+
async readProductBalance() {
|
|
86
|
+
this.productBalance = [];
|
|
87
|
+
const t = B(), s = v({
|
|
88
|
+
recipes: t.recipes,
|
|
89
|
+
skus: t.skus,
|
|
90
|
+
inventoryBindingMapping: {},
|
|
91
|
+
stockBalance: this.stockBalance
|
|
92
|
+
// silent: true
|
|
93
|
+
});
|
|
94
|
+
function u(c, e) {
|
|
95
|
+
return Object.prototype.hasOwnProperty.call(c, e);
|
|
96
|
+
}
|
|
97
|
+
for (const c in s.convertCountdown)
|
|
98
|
+
if (u(s.convertCountdown, c)) {
|
|
99
|
+
const e = s.convertCountdown[c];
|
|
100
|
+
this.productBalance.push({
|
|
101
|
+
id: c,
|
|
102
|
+
count: e
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
export {
|
|
109
|
+
$ as a,
|
|
110
|
+
I as u
|
|
111
|
+
};
|
|
@@ -1958,11 +1958,8 @@ export declare function useInventoryStore(): {
|
|
|
1958
1958
|
};
|
|
1959
1959
|
closing: {
|
|
1960
1960
|
closedBy?: {
|
|
1961
|
-
faceId?: unknown;
|
|
1962
1961
|
name: string;
|
|
1963
|
-
|
|
1964
|
-
_id: string;
|
|
1965
|
-
passcode: string;
|
|
1962
|
+
id: string;
|
|
1966
1963
|
} | null | undefined;
|
|
1967
1964
|
_id?: string | undefined;
|
|
1968
1965
|
skus?: {
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.fm-forecast-notification-low{background-color:var(--fm-color-system-red-100);color:var(--fm-color-system-red-400)}.fm-forecast-notification-mid{background-color:var(--fm-color-system-orange-100);color:var(--fm-color-system-orange-400)}.fm-forecast-notification-high{background-color:var(--fm-color-system-green-100);color:var(--fm-color-system-green-400)}.fm-forecast-notification-indicator{display:inline-block;height:12px;width:12px;border-radius:9999px}.fm-forecast-notification-indicator-low{background-color:var(--fm-color-system-red-400)}.fm-forecast-notification-indicator-mid{background-color:var(--fm-color-system-orange-400)}.fm-forecast-notification-indicator-high{background-color:var(--fm-color-system-green-400)}.fade-enter-active,.fade-leave-active{transition:opacity .5s ease}.fade-enter-from,.fade-leave-to{opacity:0}.fade-enter-active[data-v-fa6c2f94],.fade-leave-active[data-v-fa6c2f94]{transition:opacity .25s ease}.fade-enter[data-v-fa6c2f94],.fade-leave-to[data-v-fa6c2f94]{opacity:0}.fm-droppable-field[data-v-e121b2c1]{display:flex;flex-direction:column;gap:4px}.fm-droppable-field__container[data-v-e121b2c1]{position:relative;background-color:var(--fm-color-neutral-white);padding:12px;border-radius:8px;border-width:2px;border-style:dashed;border-color:var(--fm-color-neutral-gray-300);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;text-align:center}.fm-droppable-field__container--disabled[data-v-e121b2c1]{cursor:not-allowed;color:var(--fm-color-neutral-gray-200);border-color:var(--fm-color-neutral-gray-200)}.fm-droppable-field__container--dragging[data-v-e121b2c1]{border-color:var(--fm-color-primary)}.fm-droppable-field__container--invalid[data-v-e121b2c1]{border-color:var(--fm-color-system-red-300)}.fm-droppable-field__container[data-v-e121b2c1]:hover:not(.fm-droppable-field__container--disabled){border-color:var(--fm-color-neutral-gray-400)}.fm-droppable-field__input[data-v-e121b2c1]{cursor:pointer;opacity:0;position:absolute;top:0;left:0;height:100%;width:100%}.fm-droppable-field__input[data-v-e121b2c1]:disabled{display:none;cursor:not-allowed}.map-button[data-v-272f5e8b]{border-top-width:1px;border-top-color:var(--fm-color-neutral-gray-200);color:var(--fm-color-neutral-gray-400);padding:.2rem 1rem;border-radius:8px}table[data-v-92a03d5c]{width:100%;border-spacing:unset;line-height:inherit}table td[data-v-92a03d5c],table th[data-v-92a03d5c]{padding:3px 5px;vertical-align:top}hr[data-v-92a03d5c]{border-collapse:unset;background:#888;height:2px;border:0px}.text-left[data-v-92a03d5c]{text-align:left}.text-right[data-v-92a03d5c]{text-align:right}.purchase-box[data-v-92a03d5c]{max-width:800px;margin:auto;padding:30px;border:1px solid #eee;box-shadow:0 0 10px #00000026;font-size:16px;line-height:1.5;font-family:Helvetica Neue,Helvetica,Helvetica,Arial,sans-serif;color:#555}.title[data-v-92a03d5c]{padding-bottom:0;font-size:30px;color:#333}.header[data-v-92a03d5c]{font-weight:600;color:#333}.sub-header[data-v-92a03d5c]{font-size:18px;color:#333}.caption[data-v-92a03d5c]{font-size:14px;color:#666}.address[data-v-92a03d5c]{font-size:16px;line-height:1.2;color:#666}.purchase-body[data-v-92a03d5c]{margin-top:30px}.item-header[data-v-92a03d5c]{border:0px;background:#ccc;color:#444}.v-enter-active[data-v-
|
|
1
|
+
.fm-forecast-notification-low{background-color:var(--fm-color-system-red-100);color:var(--fm-color-system-red-400)}.fm-forecast-notification-mid{background-color:var(--fm-color-system-orange-100);color:var(--fm-color-system-orange-400)}.fm-forecast-notification-high{background-color:var(--fm-color-system-green-100);color:var(--fm-color-system-green-400)}.fm-forecast-notification-indicator{display:inline-block;height:12px;width:12px;border-radius:9999px}.fm-forecast-notification-indicator-low{background-color:var(--fm-color-system-red-400)}.fm-forecast-notification-indicator-mid{background-color:var(--fm-color-system-orange-400)}.fm-forecast-notification-indicator-high{background-color:var(--fm-color-system-green-400)}.fade-enter-active,.fade-leave-active{transition:opacity .5s ease}.fade-enter-from,.fade-leave-to{opacity:0}.fade-enter-active[data-v-fa6c2f94],.fade-leave-active[data-v-fa6c2f94]{transition:opacity .25s ease}.fade-enter[data-v-fa6c2f94],.fade-leave-to[data-v-fa6c2f94]{opacity:0}.fm-droppable-field[data-v-e121b2c1]{display:flex;flex-direction:column;gap:4px}.fm-droppable-field__container[data-v-e121b2c1]{position:relative;background-color:var(--fm-color-neutral-white);padding:12px;border-radius:8px;border-width:2px;border-style:dashed;border-color:var(--fm-color-neutral-gray-300);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;text-align:center}.fm-droppable-field__container--disabled[data-v-e121b2c1]{cursor:not-allowed;color:var(--fm-color-neutral-gray-200);border-color:var(--fm-color-neutral-gray-200)}.fm-droppable-field__container--dragging[data-v-e121b2c1]{border-color:var(--fm-color-primary)}.fm-droppable-field__container--invalid[data-v-e121b2c1]{border-color:var(--fm-color-system-red-300)}.fm-droppable-field__container[data-v-e121b2c1]:hover:not(.fm-droppable-field__container--disabled){border-color:var(--fm-color-neutral-gray-400)}.fm-droppable-field__input[data-v-e121b2c1]{cursor:pointer;opacity:0;position:absolute;top:0;left:0;height:100%;width:100%}.fm-droppable-field__input[data-v-e121b2c1]:disabled{display:none;cursor:not-allowed}.map-button[data-v-272f5e8b]{border-top-width:1px;border-top-color:var(--fm-color-neutral-gray-200);color:var(--fm-color-neutral-gray-400);padding:.2rem 1rem;border-radius:8px}table[data-v-92a03d5c]{width:100%;border-spacing:unset;line-height:inherit}table td[data-v-92a03d5c],table th[data-v-92a03d5c]{padding:3px 5px;vertical-align:top}hr[data-v-92a03d5c]{border-collapse:unset;background:#888;height:2px;border:0px}.text-left[data-v-92a03d5c]{text-align:left}.text-right[data-v-92a03d5c]{text-align:right}.purchase-box[data-v-92a03d5c]{max-width:800px;margin:auto;padding:30px;border:1px solid #eee;box-shadow:0 0 10px #00000026;font-size:16px;line-height:1.5;font-family:Helvetica Neue,Helvetica,Helvetica,Arial,sans-serif;color:#555}.title[data-v-92a03d5c]{padding-bottom:0;font-size:30px;color:#333}.header[data-v-92a03d5c]{font-weight:600;color:#333}.sub-header[data-v-92a03d5c]{font-size:18px;color:#333}.caption[data-v-92a03d5c]{font-size:14px;color:#666}.address[data-v-92a03d5c]{font-size:16px;line-height:1.2;color:#666}.purchase-body[data-v-92a03d5c]{margin-top:30px}.item-header[data-v-92a03d5c]{border:0px;background:#ccc;color:#444}.v-enter-active[data-v-070831e1],.v-leave-active[data-v-070831e1]{transition:opacity .1s ease}.v-enter-from[data-v-070831e1],.v-leave-to[data-v-070831e1]{opacity:0}.fm-status-badge{font-size:.875rem;font-weight:600;line-height:1.125rem;letter-spacing:.0125em;text-decoration-line:none;border-radius:8px;display:flex;align-items:center;padding-left:8px;padding-right:8px;height:22px}.fm-status-badge-draft{background-color:var(--fm-color-neutral-gray-100);color:var(--fm-color-neutral-gray-500)}.fm-status-badge-receiving{background-color:var(--fm-color-system-blue-100);color:var(--fm-color-system-blue-400)}.fm-status-badge-cancel{background-color:var(--fm-color-system-red-100);color:var(--fm-color-system-red-400)}.fm-status-badge-complete{background-color:var(--fm-color-system-green-100);color:var(--fm-color-system-green-400)}.fm-status-badge-processing,.fm-status-badge-requesting{background-color:var(--fm-color-system-orange-100);color:var(--fm-color-system-orange-400)}.fm-status-badge-transfer-info,.fm-status-badge-info-secondary{background-color:var(--fm-color-system-blue-100);color:var(--fm-color-system-blue-400)}.fm-status-badge-success-secondary{background-color:var(--fm-color-system-green-100);color:var(--fm-color-system-green-400)}
|
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { k as m, u, i as y, t as b, v } from "./app-BXjk74IB.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";
|
|
5
|
-
const a = m((
|
|
5
|
+
const a = m((s, p) => {
|
|
6
6
|
function i() {
|
|
7
7
|
var o;
|
|
8
|
-
const
|
|
8
|
+
const t = c(), e = u(), r = e.businessLevel, n = `business_${((o = t.currentBusiness.value) == null ? void 0 : o._id) ?? ""}`, S = e.currentLocation.dbName;
|
|
9
9
|
return r ? n : S;
|
|
10
10
|
}
|
|
11
11
|
return {
|
|
12
12
|
async readSuppliers() {
|
|
13
|
-
const
|
|
13
|
+
const t = i(), e = `${s.inventoryBackendUrl}/${t}/supplier`;
|
|
14
14
|
return await p.get(e);
|
|
15
15
|
},
|
|
16
16
|
async readLocationSuppliers() {
|
|
17
|
-
const e = u().currentLocation.dbName, r = `${
|
|
17
|
+
const e = u().currentLocation.dbName, r = `${s.inventoryBackendUrl}/${e}/supplier`;
|
|
18
18
|
return await p.get(r);
|
|
19
19
|
},
|
|
20
20
|
async readBusinessSuppliers() {
|
|
21
21
|
var n;
|
|
22
|
-
const e = `business_${((n = c().currentBusiness.value) == null ? void 0 : n._id) ?? ""}`, r = `${
|
|
22
|
+
const e = `business_${((n = c().currentBusiness.value) == null ? void 0 : n._id) ?? ""}`, r = `${s.inventoryBackendUrl}/${e}/supplier`;
|
|
23
23
|
return await p.get(r);
|
|
24
24
|
},
|
|
25
|
-
async createSupplier(
|
|
26
|
-
const e = i(), r = `${
|
|
27
|
-
return await p.post(r,
|
|
25
|
+
async createSupplier(t) {
|
|
26
|
+
const e = i(), r = `${s.inventoryBackendUrl}/${e}/supplier`;
|
|
27
|
+
return await p.post(r, t);
|
|
28
28
|
},
|
|
29
|
-
async importSuppliers(
|
|
30
|
-
const e = i(), r = `${
|
|
31
|
-
return await p.post(r,
|
|
29
|
+
async importSuppliers(t) {
|
|
30
|
+
const e = i(), r = `${s.inventoryBackendUrl}/${e}/supplier/import`;
|
|
31
|
+
return await p.post(r, t);
|
|
32
32
|
},
|
|
33
|
-
async updateSupplier(
|
|
34
|
-
const e = i(), r = `${
|
|
35
|
-
return await p.put(r,
|
|
33
|
+
async updateSupplier(t) {
|
|
34
|
+
const e = i(), r = `${s.inventoryBackendUrl}/${e}/supplier`;
|
|
35
|
+
return await p.put(r, t);
|
|
36
36
|
},
|
|
37
|
-
async deleteSupplier(
|
|
38
|
-
const e = i(), r = `${
|
|
39
|
-
return await p.delete(r,
|
|
37
|
+
async deleteSupplier(t) {
|
|
38
|
+
const e = i(), r = `${s.inventoryBackendUrl}/${e}/supplier`;
|
|
39
|
+
return await p.delete(r, t);
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
42
|
}), f = w("supplier", () => {
|
|
43
|
-
const
|
|
43
|
+
const s = l(new Array()), p = l(new Array()), i = d(() => [...s.value, ...p.value]), t = d(() => y(i.value, "_id"));
|
|
44
44
|
return {
|
|
45
45
|
async readSuppliers() {
|
|
46
46
|
const e = a();
|
|
47
|
-
|
|
47
|
+
s.value = await e.readLocationSuppliers(), p.value = await e.readBusinessSuppliers();
|
|
48
48
|
},
|
|
49
49
|
async createSupplier(e) {
|
|
50
50
|
await a().createSupplier(e);
|
|
@@ -67,9 +67,9 @@ const a = m((t, p) => {
|
|
|
67
67
|
}
|
|
68
68
|
},
|
|
69
69
|
suppliers: i,
|
|
70
|
-
locationSuppliers:
|
|
70
|
+
locationSuppliers: s,
|
|
71
71
|
businessSuppliers: p,
|
|
72
|
-
supplierById:
|
|
72
|
+
supplierById: t
|
|
73
73
|
};
|
|
74
74
|
});
|
|
75
75
|
export {
|