@feedmepos/mf-inventory-portal 1.2.30-dev.1 → 1.2.30
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-kX4bqoEe.js → App-CZJre5y8.js} +57 -55
- package/dist/{ApprovalView-DCNKqVE2.js → ApprovalView-CnxHxojY.js} +34 -28
- package/dist/{BindingsDialog-d7f1f8gf.js → BindingsDialog-C6lCOPNs.js} +2 -2
- package/dist/{BindingsPicker-2HJOx0QW.js → BindingsPicker-DZtFKLQ5.js} +6 -5
- package/dist/{BindingsTable-CPAjxOZG.js → BindingsTable-BmQGLuJ4.js} +28 -24
- package/dist/{ClosingDraftView-CUng41eo.js → ClosingDraftView-KLtlh31f.js} +183 -175
- package/dist/{ClosingHistoryView-CcGc2NwU.js → ClosingHistoryView-Rf1yMhMj.js} +43 -41
- package/dist/ClosingTemplateView-C_IiKnGx.js +2019 -0
- package/dist/{DeliveryOrderPrintPreview-BsM-CCc5.js → DeliveryOrderPrintPreview-UF7V005U.js} +15 -14
- package/dist/FmDroppableField-J0xUsOTV.js +154 -0
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-cuggJ5Xd.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BcMvEdc0.js} +74 -72
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CqAeF0wL.js +279 -0
- package/dist/{FmMultiselectDialog-BGbrqXUF.js → FmMultiselectDialog-B0aKuf2o.js} +1 -1
- package/dist/FmMultiselectDialog-BasrjBFA.js +597 -0
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-isogcN1O.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CaYJJkXz.js} +51 -49
- package/dist/{ImportView-wAVrMEwL.js → ImportView-DRSoz0uM.js} +81 -74
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DVUF4I2Q.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DA8SlWPy.js} +5 -5
- package/dist/{IngredientGroupView-BZczeXdL.js → IngredientGroupView-D5Laak2-.js} +73 -65
- package/dist/{IngredientsView-D5N5Y1ZY.js → IngredientsView-TG3fPQhR.js} +358 -345
- package/dist/{IntegrationView-Hrslmuc1.js → IntegrationView-CElpjyo7.js} +219 -209
- package/dist/{InventoryBindingForm-DH6wgxOG.js → InventoryBindingForm-CBgxRYBd.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-Drr5vD6f.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-Ys5GBHoQ.js} +41 -40
- package/dist/{InventoryBindingSummary-BU1ehpQZ.js → InventoryBindingSummary-OK3vNWhi.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-1ueC4GfZ.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-9QRntUlk.js} +5 -5
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-FHcU1zZt.js → PremiumBadge.vue_vue_type_script_setup_true_lang-Bc01NoOn.js} +22 -21
- package/dist/{PublishView-CQtj0f31.js → PublishView-CLMfiLjP.js} +26 -23
- package/dist/{PurchaseOrderPrintPreview-BQyXtHST.js → PurchaseOrderPrintPreview-Dy77yWDC.js} +10 -9
- package/dist/{ReceiveRequestView-Dm-h_SrY.js → ReceiveRequestView-BhD-NaHE.js} +478 -462
- package/dist/{RecipeView-DNNRvr1w.js → RecipeView-RWaO94w_.js} +73 -64
- package/dist/SingleColumnLayout.vue_vue_type_script_setup_true_lang-DY7TaxPK.js +251 -0
- package/dist/{StockView-CaOm5BCx.js → StockView-D5t8OxaG.js} +292 -282
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Z91XRszD.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-3Asf1TGd.js} +1 -1
- package/dist/{SupplierView-JSII9qwL.js → SupplierView-DiospFKq.js} +92 -80
- package/dist/SystemTrailDialog.vue_vue_type_script_setup_true_lang-DfCHteOF.js +177 -0
- package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js +135 -0
- package/dist/TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CNtvx-LA.js +123 -0
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-Mehd4lGs.js → TransferDetails.vue_vue_type_script_setup_true_lang-p959Op4k.js} +318 -305
- package/dist/{TransferTemplateView-DyCpNKJd.js → TransferTemplateView-ePZFdZ0p.js} +228 -216
- package/dist/{UnitView-CqN7mlJ2.js → UnitView-Banlxw7y.js} +70 -63
- package/dist/{WarehouseView-gFWD-m8e.js → WarehouseView-BL-p5hbi.js} +123 -114
- package/dist/WastageTemplateView-B1pmSuW0.js +2288 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/app-EpEEb8EO.js +64040 -0
- package/dist/app-rgirz_52.js +8024 -0
- package/dist/app.d.ts +0 -21
- package/dist/app.js +6 -6
- package/dist/closing-template-zIjwO1_E.js +117 -0
- package/dist/date2-Dnc8Y81g.js +116 -0
- package/dist/dayjs.min-TdUgzmww.js +282 -0
- package/dist/{decimal-DfF_g5rc.js → decimal-C6s3GvGb.js} +4 -3
- package/dist/defineDeepModel-BSaaXVBF.js +19 -0
- package/dist/duplicate-template-Bw0H416G.js +34 -0
- package/dist/feature-C95Hao53.js +20162 -0
- package/dist/form-mode.enum-BKiNVH6A.js +4 -0
- package/dist/format-time-from-id-DlbHo6kY.js +15 -0
- package/dist/{format-unit-display-ivAljvlo.js → format-unit-display-QBS54q0R.js} +308 -297
- package/dist/{import-export.helper-B2MWv9v7.js → import-export.helper-CUKCKtP7.js} +56 -52
- package/dist/index-CFn_9RMm.js +45 -0
- package/dist/{index-DZaT0ZaL.js → index-S9Ak__QC.js} +1 -1
- package/dist/{index-BbhuWHyh.js → index-goD-WGVb.js} +16 -14
- package/dist/lodash-gq8IrP4j.js +3678 -0
- package/dist/netsuite-CnhAKyAO.js +4316 -0
- package/dist/{purchase-order-template-DdybMC_P.js → purchase-order-template-CBIpWdEW.js} +1 -1
- package/dist/router/shared.spec.d.ts +1 -0
- package/dist/row-action.enum-BcW_L_nE.js +67 -0
- package/dist/rules-DKklsaS1.js +201 -0
- package/dist/{stock-BYagIdsj.js → stock-3K93Mif9.js} +1 -1
- package/dist/{stock-V4ciPiBe.js → stock-BW8fen3H.js} +11 -10
- package/dist/style.css +1 -1
- package/dist/{supplier-CgtB1I9I.js → supplier-CObCSfot.js} +27 -26
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-BIQovyZX.js → use-ingredient-select-dialog-DwvQiaVW.js} +4 -3
- package/dist/{use-inventory-binding-dialog-DyjicXgc.js → use-inventory-binding-dialog-CuLEHLDM.js} +4 -3
- package/dist/use-template-enabled-locations-2-DkUJeppb.js +111 -0
- package/dist/views/adjustment-template/wastage-template/table.d.ts +1 -1
- package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +0 -1
- package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +1 -13
- package/dist/views/closing-template/composables/use-closing-template-table.d.ts +0 -12
- package/dist/vue-i18n-CUznvVzc.js +2365 -0
- package/dist/xlsx-bT1p3YVR.js +24004 -0
- package/dist/xlsx.util-Cr9DpDFb.js +78 -0
- package/package.json +5 -5
- package/dist/ClosingTemplateView-D8IAdhDb.js +0 -2041
- package/dist/app-CnQ49Lyb.js +0 -131483
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
var e = /* @__PURE__ */ ((t) => (t.Add = "Add", t.Create = "Create", t.Print = "Print", t.Export = "Export", t.Update = "Update", t.Details = "Details", t.Edit = "Edit", t.Delete = "Delete", t.Publish = "Publish", t.Duplicate = "Duplicate", t))(e || {});
|
|
2
|
+
const o = {
|
|
3
|
+
Add: {
|
|
4
|
+
translationKey: "common.add",
|
|
5
|
+
color: "text-fm-color-typo-primary",
|
|
6
|
+
value: "Add"
|
|
7
|
+
/* Add */
|
|
8
|
+
},
|
|
9
|
+
Create: {
|
|
10
|
+
translationKey: "common.create",
|
|
11
|
+
color: "text-fm-color-typo-primary",
|
|
12
|
+
value: "Create"
|
|
13
|
+
/* Create */
|
|
14
|
+
},
|
|
15
|
+
Update: {
|
|
16
|
+
translationKey: "common.update",
|
|
17
|
+
color: "text-fm-color-typo-primary",
|
|
18
|
+
value: "Update"
|
|
19
|
+
/* Update */
|
|
20
|
+
},
|
|
21
|
+
Details: {
|
|
22
|
+
translationKey: "inventory.common.details",
|
|
23
|
+
color: "text-fm-color-typo-primary",
|
|
24
|
+
value: "Details"
|
|
25
|
+
/* Details */
|
|
26
|
+
},
|
|
27
|
+
Print: {
|
|
28
|
+
translationKey: "inventory.common.print",
|
|
29
|
+
color: "text-fm-color-typo-primary",
|
|
30
|
+
value: "Print"
|
|
31
|
+
/* Print */
|
|
32
|
+
},
|
|
33
|
+
Export: {
|
|
34
|
+
translationKey: "common.export",
|
|
35
|
+
color: "text-fm-color-typo-primary",
|
|
36
|
+
value: "Export"
|
|
37
|
+
/* Export */
|
|
38
|
+
},
|
|
39
|
+
Edit: {
|
|
40
|
+
translationKey: "common.edit",
|
|
41
|
+
color: "text-fm-color-typo-primary",
|
|
42
|
+
value: "Edit"
|
|
43
|
+
/* Edit */
|
|
44
|
+
},
|
|
45
|
+
Delete: {
|
|
46
|
+
translationKey: "common.delete",
|
|
47
|
+
color: "text-fm-color-typo-error",
|
|
48
|
+
value: "Delete"
|
|
49
|
+
/* Delete */
|
|
50
|
+
},
|
|
51
|
+
Publish: {
|
|
52
|
+
translationKey: "inventory.common.publish",
|
|
53
|
+
color: "text-fm-color-typo-primary",
|
|
54
|
+
value: "Publish"
|
|
55
|
+
/* Publish */
|
|
56
|
+
},
|
|
57
|
+
Duplicate: {
|
|
58
|
+
translationKey: "inventory.common.duplicate",
|
|
59
|
+
color: "text-fm-color-typo-warning",
|
|
60
|
+
value: "Duplicate"
|
|
61
|
+
/* Duplicate */
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
export {
|
|
65
|
+
o as D,
|
|
66
|
+
e as R
|
|
67
|
+
};
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import { s } from "./app-EpEEb8EO.js";
|
|
2
|
+
import "./dayjs.min-TdUgzmww.js";
|
|
3
|
+
import { d, b } from "./date2-Dnc8Y81g.js";
|
|
4
|
+
function P(t, n) {
|
|
5
|
+
return s.convertPrecision({
|
|
6
|
+
value: t,
|
|
7
|
+
precision: n
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
function $(t, n) {
|
|
11
|
+
return s.subtract([t, n]);
|
|
12
|
+
}
|
|
13
|
+
function N(t, n) {
|
|
14
|
+
return s.add([t, n]);
|
|
15
|
+
}
|
|
16
|
+
function D(t, n) {
|
|
17
|
+
return s.multiply([t, n]);
|
|
18
|
+
}
|
|
19
|
+
function F(t, n) {
|
|
20
|
+
return s.multiply([t, n]);
|
|
21
|
+
}
|
|
22
|
+
function l(t, n) {
|
|
23
|
+
const r = +u(t), i = +u(n);
|
|
24
|
+
return r / i;
|
|
25
|
+
}
|
|
26
|
+
function T(t, n) {
|
|
27
|
+
t = f(t), n = f(n);
|
|
28
|
+
const r = l(t, n);
|
|
29
|
+
return c(r);
|
|
30
|
+
}
|
|
31
|
+
function x(t, n) {
|
|
32
|
+
return t.precision >= n ? t : s.convertPrecision({ value: t, precision: n });
|
|
33
|
+
}
|
|
34
|
+
function f(t) {
|
|
35
|
+
if (t.amount === 0) return c(0);
|
|
36
|
+
const n = y(t.amount), r = t.precision - n;
|
|
37
|
+
return s.convertPrecision({ value: t, precision: Math.max(0, r) });
|
|
38
|
+
}
|
|
39
|
+
function u(t, n = !0) {
|
|
40
|
+
return n ? Number(t.amount / Math.pow(10, t.precision)).toFixed(t.precision) : Number(t.amount / Math.pow(10, t.precision)).toString();
|
|
41
|
+
}
|
|
42
|
+
function O(t, n) {
|
|
43
|
+
n = n ?? h(t);
|
|
44
|
+
const r = n, i = t.toFixed(r), e = i.includes(".") ? i.replace(/0+$/, "") : i;
|
|
45
|
+
return e.endsWith(".") ? e.slice(0, e.length - 1) : e;
|
|
46
|
+
}
|
|
47
|
+
function w(t, n = !1, r = 2) {
|
|
48
|
+
const i = Number(t.amount / Math.pow(10, t.precision)), e = i.toFixed(
|
|
49
|
+
Number.isInteger(i) ? 2 : Math.min(4, Math.max(2, r))
|
|
50
|
+
);
|
|
51
|
+
return n ? `${e} ${t.currency}` : t.currency === "MYR" ? `RM ${e}` : `${t.currency} ${e}`;
|
|
52
|
+
}
|
|
53
|
+
function R(t) {
|
|
54
|
+
return {
|
|
55
|
+
...t,
|
|
56
|
+
amount: Math.abs(t.amount)
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
function h(t) {
|
|
60
|
+
if (!isFinite(t)) return 0;
|
|
61
|
+
let n = 1, r = 0;
|
|
62
|
+
for (; Math.round(t * n) / n !== t; )
|
|
63
|
+
n *= 10, r++;
|
|
64
|
+
return r;
|
|
65
|
+
}
|
|
66
|
+
function c(t) {
|
|
67
|
+
const n = h(t);
|
|
68
|
+
return {
|
|
69
|
+
precision: n,
|
|
70
|
+
amount: t * 10 ** n
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
function q(t, n = 0, r = !1) {
|
|
74
|
+
let i = 0;
|
|
75
|
+
return Number.isNaN(Number(t)) || (r || Number(t) >= 0) && (i = Number(t)), {
|
|
76
|
+
amount: Number((i * 10 ** n).toFixed(0)),
|
|
77
|
+
precision: n
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
function y(t) {
|
|
81
|
+
const n = `${t}`, r = n.replace(/0*$/g, "");
|
|
82
|
+
return n.length - r.length;
|
|
83
|
+
}
|
|
84
|
+
function M(t, n) {
|
|
85
|
+
if (!n)
|
|
86
|
+
return t.precision;
|
|
87
|
+
const r = y(n.conversion.amount);
|
|
88
|
+
return t.precision - n.conversion.precision + r;
|
|
89
|
+
}
|
|
90
|
+
function B() {
|
|
91
|
+
return function(n) {
|
|
92
|
+
return !!n || "Required";
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
function m(t) {
|
|
96
|
+
return t && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "amount") && Object.prototype.hasOwnProperty.call(t, "precision");
|
|
97
|
+
}
|
|
98
|
+
function L(t, n) {
|
|
99
|
+
const r = typeof t == "object" ? +u(t) : t;
|
|
100
|
+
function i(e) {
|
|
101
|
+
return Object.prototype.hasOwnProperty.call(e, "length");
|
|
102
|
+
}
|
|
103
|
+
return function(o) {
|
|
104
|
+
return m(o) && (o = +u(o)), Number.isFinite(+o) && (o = +o), i(o) ? o.length >= r ? !0 : typeof n == "function" ? n(o.length) : n ?? `Must be at least ${r}` : typeof o == "number" ? o >= r ? !0 : typeof n == "function" ? n(o) : n ?? `Must be at least ${r}` : `Cannot validate at least ${r}`;
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
function C(t) {
|
|
108
|
+
const n = typeof t == "object" ? +u(t) : t;
|
|
109
|
+
function r(i) {
|
|
110
|
+
return Object.prototype.hasOwnProperty.call(i, "length");
|
|
111
|
+
}
|
|
112
|
+
return function(e, o) {
|
|
113
|
+
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}`;
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
function V(t, n) {
|
|
117
|
+
return t instanceof Date && n instanceof Date ? function(i) {
|
|
118
|
+
const e = new Date(i);
|
|
119
|
+
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;
|
|
120
|
+
} : typeof t == "number" && typeof n == "number" ? function(i) {
|
|
121
|
+
const e = +i;
|
|
122
|
+
return isNaN(e) ? "Invalid number" : e < t ? `Value must be at least ${t}` : e >= n ? `Value must be less than ${n}` : !0;
|
|
123
|
+
} : function() {
|
|
124
|
+
return "Progamming error: invalid range parameter.";
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
function a() {
|
|
128
|
+
return function(t) {
|
|
129
|
+
if (t = String(t), t.length === 0)
|
|
130
|
+
return !0;
|
|
131
|
+
const n = +t;
|
|
132
|
+
return isFinite(n) || "Must be a number";
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
function Y(t, n) {
|
|
136
|
+
return typeof t == "number" ? function(i) {
|
|
137
|
+
const e = a()(i);
|
|
138
|
+
return typeof e == "string" ? e : c(+i).precision > t ? `Precision cannot be more than ${t} decimal point.` : !0;
|
|
139
|
+
} : function(i) {
|
|
140
|
+
const e = a()(i);
|
|
141
|
+
if (typeof e == "string")
|
|
142
|
+
return e;
|
|
143
|
+
const o = M(t, n);
|
|
144
|
+
return c(+i).precision > o ? `Precision cannot be more than ${o} decimal point.` : !0;
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
function S(t, n) {
|
|
148
|
+
return function(i) {
|
|
149
|
+
const e = a()(i);
|
|
150
|
+
if (typeof e == "string")
|
|
151
|
+
return e;
|
|
152
|
+
const o = c(+i);
|
|
153
|
+
return o.precision > t ? typeof n == "function" ? n(o.precision) : n ?? `Precision cannot be more than ${t}` : !0;
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
function Z(t, n, r) {
|
|
157
|
+
return function(e) {
|
|
158
|
+
if (e === n) return !0;
|
|
159
|
+
const o = t.find((p) => p.value === e);
|
|
160
|
+
return o ? r ? r(o) : `Already used in ${o.label}` : !0;
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
function U(t) {
|
|
164
|
+
let n = typeof t == "number" ? c(t) : t;
|
|
165
|
+
n = f(n);
|
|
166
|
+
const r = u(n);
|
|
167
|
+
return function(e) {
|
|
168
|
+
if (!m(e)) {
|
|
169
|
+
if (e = +e, Number.isNaN(e)) return !0;
|
|
170
|
+
e = c(e);
|
|
171
|
+
}
|
|
172
|
+
return e = f(e), e.amount % n.amount === 0 && e.precision <= n.precision ? !0 : `${u(e)} must be a multiple of ${r}`;
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
export {
|
|
176
|
+
L as A,
|
|
177
|
+
V as B,
|
|
178
|
+
a as I,
|
|
179
|
+
Y as M,
|
|
180
|
+
B as R,
|
|
181
|
+
Z as U,
|
|
182
|
+
u as a,
|
|
183
|
+
f as b,
|
|
184
|
+
U as c,
|
|
185
|
+
c as d,
|
|
186
|
+
w as e,
|
|
187
|
+
F as f,
|
|
188
|
+
M as g,
|
|
189
|
+
C as h,
|
|
190
|
+
h as i,
|
|
191
|
+
R as j,
|
|
192
|
+
D as k,
|
|
193
|
+
N as l,
|
|
194
|
+
P as m,
|
|
195
|
+
O as n,
|
|
196
|
+
$ as o,
|
|
197
|
+
T as p,
|
|
198
|
+
S as q,
|
|
199
|
+
q as t,
|
|
200
|
+
x as u
|
|
201
|
+
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { u as i } from "./stock-
|
|
2
|
-
import { a as s,
|
|
3
|
-
import { ref as
|
|
4
|
-
|
|
1
|
+
import { u as i } from "./stock-3K93Mif9.js";
|
|
2
|
+
import { a as s, I as p } from "./app-EpEEb8EO.js";
|
|
3
|
+
import { ref as d, computed as k } from "vue";
|
|
4
|
+
import { d as B } from "./rules-DKklsaS1.js";
|
|
5
|
+
function m() {
|
|
5
6
|
return {
|
|
6
7
|
stockBalance: {
|
|
7
8
|
_id: "",
|
|
@@ -10,17 +11,17 @@ function v() {
|
|
|
10
11
|
productBalance: []
|
|
11
12
|
};
|
|
12
13
|
}
|
|
13
|
-
const
|
|
14
|
+
const v = B(0), f = {
|
|
14
15
|
id: "",
|
|
15
|
-
balance:
|
|
16
|
+
balance: v,
|
|
16
17
|
closing: null,
|
|
17
18
|
costs: null
|
|
18
|
-
}, c =
|
|
19
|
-
const r = s(), u =
|
|
19
|
+
}, c = d(m()), w = () => {
|
|
20
|
+
const r = s(), u = k(() => {
|
|
20
21
|
var a;
|
|
21
22
|
const o = (a = c.value.stockBalance.skus) == null ? void 0 : a.groupBy((t) => t.id), n = (t) => {
|
|
22
23
|
var e;
|
|
23
|
-
return ((e = o == null ? void 0 : o.get(t)) == null ? void 0 : e[0]) ?? { ...
|
|
24
|
+
return ((e = o == null ? void 0 : o.get(t)) == null ? void 0 : e[0]) ?? { ...f, id: t };
|
|
24
25
|
};
|
|
25
26
|
return r.skus.map((t) => n(t._id));
|
|
26
27
|
}), l = i();
|
|
@@ -70,5 +71,5 @@ const m = k(0), y = {
|
|
|
70
71
|
};
|
|
71
72
|
};
|
|
72
73
|
export {
|
|
73
|
-
|
|
74
|
+
w as u
|
|
74
75
|
};
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.fm-admin-badge[data-v-643bdbae]{pointer-events:none;opacity:.9;display:flex;align-items:center;justify-content:center;border-radius:360px;--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.fm-
|
|
1
|
+
.fm-admin-badge[data-v-643bdbae]{pointer-events:none;opacity:.9;display:flex;align-items:center;justify-content:center;border-radius:360px;--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.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-6f532501],.fade-leave-active[data-v-6f532501]{transition:opacity .25s ease}.fade-enter[data-v-6f532501],.fade-leave-to[data-v-6f532501]{opacity:0}.fm-droppable-field[data-v-2937afd0]{display:flex;flex-direction:column;gap:4px}.fm-droppable-field__container[data-v-2937afd0]{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-2937afd0]{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-2937afd0]{border-color:var(--fm-color-primary)}.fm-droppable-field__container--invalid[data-v-2937afd0]{border-color:var(--fm-color-system-red-300)}.fm-droppable-field__container[data-v-2937afd0]:hover:not(.fm-droppable-field__container--disabled){border-color:var(--fm-color-neutral-gray-400)}.fm-droppable-field__input[data-v-2937afd0]{cursor:pointer;opacity:0;position:absolute;top:0;left:0;height:100%;width:100%}.fm-droppable-field__input[data-v-2937afd0]: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-3cb85541]{width:100%;border-spacing:unset;line-height:inherit}table td[data-v-3cb85541],table th[data-v-3cb85541]{padding:3px 5px;vertical-align:top}hr[data-v-3cb85541]{border-collapse:unset;background:#888;height:2px;border:0px}.text-left[data-v-3cb85541]{text-align:left}.text-right[data-v-3cb85541]{text-align:right}.purchase-box[data-v-3cb85541]{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-3cb85541]{padding-bottom:0;font-size:30px;color:#333}.header[data-v-3cb85541]{font-weight:600;color:#333}.sub-header[data-v-3cb85541]{font-size:18px;color:#333}.caption[data-v-3cb85541]{font-size:14px;color:#666}.address[data-v-3cb85541]{font-size:16px;line-height:1.2;color:#666}.purchase-body[data-v-3cb85541]{margin-top:30px}.item-header[data-v-3cb85541]{border:0px;background:#ccc;color:#444}table[data-v-805a706a]{width:100%;border-spacing:unset;line-height:inherit}table td[data-v-805a706a],table th[data-v-805a706a]{padding:3px 5px;vertical-align:top}hr[data-v-805a706a]{border-collapse:unset;background:#888;height:2px;border:0px}.text-left[data-v-805a706a]{text-align:left}.text-right[data-v-805a706a]{text-align:right}.purchase-box[data-v-805a706a]{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-805a706a]{padding-bottom:0;font-size:32px;color:#333}.subtitle[data-v-805a706a]{padding-bottom:0;font-size:25px;color:#333}.header[data-v-805a706a]{font-weight:600;color:#333}.sub-header[data-v-805a706a]{font-size:18px;color:#333}.caption[data-v-805a706a]{font-size:14px;color:#666}.address[data-v-805a706a]{font-size:14px;line-height:1.2;color:#666}.purchase-body[data-v-805a706a]{margin-top:30px}.item-header[data-v-805a706a]{border:0px;background:#ccc;color:#444}.logo[data-v-805a706a]{max-width:100%;height:100px;-o-object-fit:contain;object-fit:contain}img[data-v-805a706a]{width:100px;height:100px;-o-object-fit:contain;object-fit:contain}.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;min-height:24px}.fm-status-badge-draft{background-color:var(--fm-color-neutral-gray-100);color:var(--fm-color-neutral-gray-500)}.fm-status-badge-receiving,.fm-status-badge-partial_received{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-close,.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)}.fm-status-badge-error{border-width:2px;--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}@media print{.print-mode .overflow-auto{overflow:visible!important}}
|
|
@@ -1,50 +1,51 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { o as y, u, n as b, p as w, q as v } from "./app-EpEEb8EO.js";
|
|
2
|
+
import { u as $ } from "./feature-C95Hao53.js";
|
|
2
3
|
import { useCoreStore as c } from "@feedmepos/mf-common";
|
|
3
|
-
import { defineStore as
|
|
4
|
+
import { defineStore as f } from "pinia";
|
|
4
5
|
import { ref as l, computed as d } from "vue";
|
|
5
|
-
const i =
|
|
6
|
-
function
|
|
6
|
+
const i = y((s, p) => {
|
|
7
|
+
function a() {
|
|
7
8
|
var o;
|
|
8
|
-
const t = c(), e = u(), n =
|
|
9
|
-
return n ? S :
|
|
9
|
+
const t = c(), e = u(), n = $().businessSupplierOnly, S = `business_${((o = t.currentBusiness.value) == null ? void 0 : o._id) ?? ""}`, m = e.currentLocation.dbName;
|
|
10
|
+
return n ? S : m;
|
|
10
11
|
}
|
|
11
12
|
return {
|
|
12
13
|
async readSuppliers() {
|
|
13
|
-
const t =
|
|
14
|
-
return await
|
|
14
|
+
const t = a(), e = `${s.inventoryBackendUrl}/${t}/supplier`;
|
|
15
|
+
return await p.get(e);
|
|
15
16
|
},
|
|
16
17
|
async readLocationSuppliers() {
|
|
17
18
|
const e = u().currentLocation.dbName, r = `${s.inventoryBackendUrl}/${e}/supplier`;
|
|
18
|
-
return await
|
|
19
|
+
return await p.get(r);
|
|
19
20
|
},
|
|
20
21
|
async readBusinessSuppliers() {
|
|
21
22
|
var n;
|
|
22
23
|
const e = `business_${((n = c().currentBusiness.value) == null ? void 0 : n._id) ?? ""}`, r = `${s.inventoryBackendUrl}/${e}/supplier`;
|
|
23
|
-
return await
|
|
24
|
+
return await p.get(r);
|
|
24
25
|
},
|
|
25
26
|
async createSupplier(t) {
|
|
26
|
-
const e =
|
|
27
|
-
return await
|
|
27
|
+
const e = a(), r = `${s.inventoryBackendUrl}/${e}/supplier`;
|
|
28
|
+
return await p.post(r, t);
|
|
28
29
|
},
|
|
29
30
|
async importSuppliers(t) {
|
|
30
|
-
const e =
|
|
31
|
-
return await
|
|
31
|
+
const e = a(), r = `${s.inventoryBackendUrl}/${e}/supplier/import`;
|
|
32
|
+
return await p.post(r, t);
|
|
32
33
|
},
|
|
33
34
|
async updateSupplier(t) {
|
|
34
|
-
const e =
|
|
35
|
-
return await
|
|
35
|
+
const e = a(), r = `${s.inventoryBackendUrl}/${e}/supplier`;
|
|
36
|
+
return await p.put(r, t);
|
|
36
37
|
},
|
|
37
38
|
async deleteSupplier(t) {
|
|
38
|
-
const e =
|
|
39
|
-
return await
|
|
39
|
+
const e = a(), r = `${s.inventoryBackendUrl}/${e}/supplier`;
|
|
40
|
+
return await p.delete(r, t);
|
|
40
41
|
}
|
|
41
42
|
};
|
|
42
|
-
}),
|
|
43
|
-
const s = l(new Array()),
|
|
43
|
+
}), L = f("supplier", () => {
|
|
44
|
+
const s = l(new Array()), p = l(new Array()), a = d(() => [...s.value, ...p.value]), t = d(() => b(a.value, "_id"));
|
|
44
45
|
return {
|
|
45
46
|
async readSuppliers() {
|
|
46
47
|
const e = i();
|
|
47
|
-
s.value = await e.readLocationSuppliers(),
|
|
48
|
+
s.value = await e.readLocationSuppliers(), p.value = await e.readBusinessSuppliers();
|
|
48
49
|
},
|
|
49
50
|
async createSupplier(e) {
|
|
50
51
|
await i().createSupplier(e);
|
|
@@ -59,19 +60,19 @@ const i = m((s, a) => {
|
|
|
59
60
|
await i().importSuppliers(e);
|
|
60
61
|
},
|
|
61
62
|
async init() {
|
|
62
|
-
const e =
|
|
63
|
+
const e = w();
|
|
63
64
|
try {
|
|
64
65
|
await this.readSuppliers();
|
|
65
66
|
} catch (r) {
|
|
66
|
-
throw r instanceof
|
|
67
|
+
throw r instanceof v || e.error("Error at reading suppliers"), r;
|
|
67
68
|
}
|
|
68
69
|
},
|
|
69
|
-
suppliers:
|
|
70
|
+
suppliers: a,
|
|
70
71
|
locationSuppliers: s,
|
|
71
|
-
businessSuppliers:
|
|
72
|
+
businessSuppliers: p,
|
|
72
73
|
supplierById: t
|
|
73
74
|
};
|
|
74
75
|
});
|
|
75
76
|
export {
|
|
76
|
-
|
|
77
|
+
L as u
|
|
77
78
|
};
|