@feedmepos/mf-inventory-portal 1.2.12-dev.3 → 1.2.12
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-D5hXQpVn.js → App-CP0Qx_82.js} +40 -44
- package/dist/{ApprovalView-B__WDklZ.js → ApprovalView-D8_PzEpZ.js} +30 -30
- package/dist/{BindingsDialog-DXdwRSnn.js → BindingsDialog-BbpKhb0L.js} +2 -2
- package/dist/{BindingsPicker-CqAD3aHc.js → BindingsPicker-DzDxisHj.js} +1 -1
- package/dist/{BindingsTable-DVNjpusl.js → BindingsTable-DCXXSY8e.js} +1 -1
- package/dist/{ClosingDraftView-DL678GBB.js → ClosingDraftView-CkF-9An8.js} +129 -129
- package/dist/{ClosingTemplateView-DThiXLtp.js → ClosingTemplateView-Ce1l7n0x.js} +28 -28
- package/dist/{DeliveryOrderPrintPreview-B2MB9S6a.js → DeliveryOrderPrintPreview-CFzsECiK.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BNxs6Bcr.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-ZSERZzyn.js} +3 -3
- package/dist/{FmMultiselectDialog-B45ZLjVp.js → FmMultiselectDialog-DP992D0Q.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-D8ks6AEM.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CzUvuj_c.js} +45 -45
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-C5zIvG2h.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DsYwSn0d.js} +1 -1
- package/dist/{IngredientGroupView-D95dFXIZ.js → IngredientGroupView-DUiKKpvF.js} +32 -31
- package/dist/IngredientsView-C3ozIXV8.js +2475 -0
- package/dist/{IntegrationView-9m3N_9lW.js → IntegrationView-CydpIwrf.js} +57 -57
- package/dist/{InventoryBindingForm-kLoQskao.js → InventoryBindingForm-BVd2FzOW.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-BytErBcK.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CYp_JSBb.js} +31 -31
- package/dist/{InventoryBindingSummary-Dg0FH7ad.js → InventoryBindingSummary-Dthool-6.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BKrUNLuG.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DR0_Qtyc.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BL1f817e.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BLfGb7mm.js} +1 -1
- package/dist/{PublishView-BcOHSAj3.js → PublishView-BE_aIhZ6.js} +15 -15
- package/dist/{PurchaseOrderPrintPreview-UfF8RVkv.js → PurchaseOrderPrintPreview-CGeqqFg-.js} +1 -1
- package/dist/{ReceiveRequestView-D_y_xNUb.js → ReceiveRequestView-Bul9Esf1.js} +63 -62
- package/dist/RecipeView-B9AGELV7.js +621 -0
- package/dist/{StockView-ciU6aAV7.js → StockView-fpJrx4Bd.js} +166 -165
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-XwDTGpR-.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DeOEgJ1N.js} +1 -1
- package/dist/{SupplierView-DFwtALPg.js → SupplierView-cfZTJqef.js} +492 -490
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-m5o77oG-.js +3057 -0
- package/dist/{TransferTemplateView-BXr_GqTi.js → TransferTemplateView-PZ8Mad4D.js} +48 -48
- package/dist/UnitView-C3gJq1Mt.js +667 -0
- package/dist/{WarehouseView-BYd0bPhi.js → WarehouseView-CWGQjwJm.js} +32 -32
- package/dist/api/inventory.d.ts +0 -306
- package/dist/api/purchase-order.d.ts +0 -1
- package/dist/{app-Bb0-8bRg.js → app-D5PlbdVa.js} +11108 -11723
- package/dist/app.d.ts +0 -421
- package/dist/app.js +1 -1
- package/dist/array-Ca8T3f_G.js +44 -0
- package/dist/{closing-template-DPVNEyI7.js → closing-template-C4FizLUw.js} +1 -1
- package/dist/{decimal-BdBZYISm.js → decimal-Cv7FZ14q.js} +1 -1
- package/dist/{format-unit-display-DlmCwWo_.js → format-unit-display-B0NO6FLh.js} +25 -25
- package/dist/helper/number.d.ts +0 -1
- package/dist/{index-CqBKFj1B.js → index-BCo2jtpG.js} +1 -1
- package/dist/{index-CKFmV1Pk.js → index-DaJ92t7D.js} +1 -1
- package/dist/{purchase-order-template-CLtEYr5E.js → purchase-order-template-DLkR7Mva.js} +1 -1
- package/dist/router/name.d.ts +0 -1
- package/dist/{stock-nHQhfe2W.js → stock-AUSAF9Ij.js} +1 -1
- package/dist/stores/feature.d.ts +0 -2
- package/dist/stores/inventory.d.ts +199 -26
- package/dist/{supplier-DuOjLpOa.js → supplier-DBXoP2UX.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-B-11Eqlm.js → use-ingredient-select-dialog-DZQR6jfi.js} +1 -1
- package/dist/{use-inventory-binding-dialog-DhLSdRtp.js → use-inventory-binding-dialog-8PZ37vLV.js} +1 -1
- package/dist/views/ingredients/helper/import-export.helper.d.ts +1 -3
- package/dist/views/recipe/RecipeView.vue.d.ts +0 -1
- package/dist/views/unit/UnitView.vue.d.ts +0 -1
- package/package.json +1 -1
- package/dist/ImportView-EXm_g_jD.js +0 -1303
- package/dist/IngredientsView-MF1USuZI.js +0 -2240
- package/dist/RecipeView-DOaU9GIF.js +0 -636
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CdA5_lEz.js +0 -3221
- package/dist/UnitView-CAXHvh3n.js +0 -674
- package/dist/import-export.helper-B04wszRI.js +0 -243
- package/dist/views/import/ImportView.vue.d.ts +0 -3
- package/dist/views/import/components/ImportDialog.vue.d.ts +0 -2
- package/dist/views/import/helper/import-export.helper.d.ts +0 -4
- package/dist/views/receive-request/components/delivery-order-form/SystemTrailDialog.vue.d.ts +0 -17
- package/dist/views/recipe/components/import-recipes/ImportRecipeItem.vue.d.ts +0 -16
- package/dist/views/recipe/components/import-recipes/ImportRecipes.vue.d.ts +0 -2
- package/dist/views/recipe/helper/import-recipe.d.ts +0 -48
- package/dist/views/unit/components/import-units/ImportUnitItem.vue.d.ts +0 -12
- package/dist/views/unit/components/import-units/ImportUnitItemProps.d.ts +0 -6
- package/dist/views/unit/components/import-units/ImportUnits.vue.d.ts +0 -9
- package/dist/views/unit/components/import-units/ImportUnitsProps.d.ts +0 -5
- package/dist/views/unit/helper/import-export.helper.d.ts +0 -40
|
@@ -1,243 +0,0 @@
|
|
|
1
|
-
import { a as b, T as U, W as E, V as $, l as T, m as N, ap as _, c as H, aq as I, o as C, t as j, L as O } from "./app-Bb0-8bRg.js";
|
|
2
|
-
import { useCoreStore as y } from "@feedmepos/mf-common";
|
|
3
|
-
import { r as D } from "./random-CSbEbElR.js";
|
|
4
|
-
function k() {
|
|
5
|
-
return {
|
|
6
|
-
low: 6,
|
|
7
|
-
mid: 14
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
function P() {
|
|
11
|
-
return `sku_${(/* @__PURE__ */ new Date()).toISOString()}_${D()}`;
|
|
12
|
-
}
|
|
13
|
-
const B = {
|
|
14
|
-
_id: "",
|
|
15
|
-
name: "",
|
|
16
|
-
abbrev: "",
|
|
17
|
-
precision: 0,
|
|
18
|
-
measurements: []
|
|
19
|
-
};
|
|
20
|
-
function V(e) {
|
|
21
|
-
return !e || Object.keys(e).length === 0 ? "" : Object.entries(e).map(([t, a]) => `${t}: ${a}`).join(", ");
|
|
22
|
-
}
|
|
23
|
-
function w(e) {
|
|
24
|
-
if (!e || e.trim() === "")
|
|
25
|
-
return;
|
|
26
|
-
const t = {}, a = e.split(",").map((n) => n.trim());
|
|
27
|
-
for (const n of a) {
|
|
28
|
-
const s = n.indexOf(":");
|
|
29
|
-
if (s > 0) {
|
|
30
|
-
const c = n.substring(0, s).trim(), r = n.substring(s + 1).trim();
|
|
31
|
-
c && r && (t[c] = r);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
return Object.keys(t).length > 0 ? t : void 0;
|
|
35
|
-
}
|
|
36
|
-
function L(e) {
|
|
37
|
-
var a, n, s, c, r;
|
|
38
|
-
return {
|
|
39
|
-
code: e.code,
|
|
40
|
-
name: e.name,
|
|
41
|
-
unit: e.unit.name,
|
|
42
|
-
baseUnit: e.unit.abbrev,
|
|
43
|
-
measurementName: ((a = e.unit.measurements.find((m) => m.id === e.trackingMeasurement)) == null ? void 0 : a.abbrev) ?? e.unit.abbrev,
|
|
44
|
-
valuationMethod: e.valuation ?? "WAVG",
|
|
45
|
-
pricePerUnit: (n = e.defaultCost) != null && n.costPerUnit ? +T((s = e.defaultCost) == null ? void 0 : s.costPerUnit) : 0,
|
|
46
|
-
thresholdLow: ((c = e.thresholds) == null ? void 0 : c.low) ?? k().low,
|
|
47
|
-
thresholdMid: ((r = e.thresholds) == null ? void 0 : r.mid) ?? k().mid,
|
|
48
|
-
customAttributes: V(e.customAttributes)
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
function A() {
|
|
52
|
-
var s;
|
|
53
|
-
const e = [
|
|
54
|
-
{
|
|
55
|
-
id: "code",
|
|
56
|
-
name: "Code"
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
id: "name",
|
|
60
|
-
name: "Name"
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
id: "unit",
|
|
64
|
-
name: "Unit"
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
id: "baseUnit",
|
|
68
|
-
name: "Base unit"
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
id: "measurementName",
|
|
72
|
-
name: "Measurement Name"
|
|
73
|
-
}
|
|
74
|
-
], t = H(), a = y(), n = N(a.currentCountry.value);
|
|
75
|
-
return t.enableTotalCost && e.push(
|
|
76
|
-
{
|
|
77
|
-
id: "valuationMethod",
|
|
78
|
-
name: "Valuation method"
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
id: "pricePerUnit",
|
|
82
|
-
name: `Price per unit (${n == null ? void 0 : n.currency})`
|
|
83
|
-
}
|
|
84
|
-
), ((s = a.currentBusiness.value) == null ? void 0 : s.menuVersion) === "v4" && e.push(
|
|
85
|
-
{
|
|
86
|
-
id: "thresholdLow",
|
|
87
|
-
name: "Show RED when remaining"
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
id: "thresholdMid",
|
|
91
|
-
name: "Show YELLOW when remaining"
|
|
92
|
-
}
|
|
93
|
-
), e.push({
|
|
94
|
-
id: "customAttributes",
|
|
95
|
-
name: "Custom Attributes"
|
|
96
|
-
}), e;
|
|
97
|
-
}
|
|
98
|
-
function J() {
|
|
99
|
-
const t = b().skus.map(L), n = y().currentBusiness.value, s = A(), c = [
|
|
100
|
-
["Business name:", n == null ? void 0 : n.name],
|
|
101
|
-
["Business ID:", n == null ? void 0 : n._id],
|
|
102
|
-
["Menu version", n == null ? void 0 : n.menuVersion],
|
|
103
|
-
[],
|
|
104
|
-
s.map((o) => o.name),
|
|
105
|
-
...t.map((o) => s.map((u) => o[u.id]))
|
|
106
|
-
], r = s.map((o) => `system:${o.id}`), m = U(c, r), d = `${n == null ? void 0 : n.name} ingredients (${E(/* @__PURE__ */ new Date())}).xlsx`;
|
|
107
|
-
return $(m, d), d;
|
|
108
|
-
}
|
|
109
|
-
function K() {
|
|
110
|
-
const t = y().currentBusiness.value, a = A(), n = [
|
|
111
|
-
["Business name:", t == null ? void 0 : t.name],
|
|
112
|
-
["Business ID:", t == null ? void 0 : t._id],
|
|
113
|
-
["Menu version", t == null ? void 0 : t.menuVersion],
|
|
114
|
-
[],
|
|
115
|
-
a.map((m) => m.name)
|
|
116
|
-
], s = a.map((m) => `system:${m.id}`), c = U(n, s), r = "FeedMe ingredients template.xlsx";
|
|
117
|
-
return $(c, r), r;
|
|
118
|
-
}
|
|
119
|
-
function Y(e) {
|
|
120
|
-
const [
|
|
121
|
-
t,
|
|
122
|
-
a,
|
|
123
|
-
n,
|
|
124
|
-
s,
|
|
125
|
-
c,
|
|
126
|
-
r,
|
|
127
|
-
...m
|
|
128
|
-
] = I(e);
|
|
129
|
-
if (!t || !t.length || t.some((l) => l.length && !l.startsWith("system:")))
|
|
130
|
-
throw new Error("Missing meta header. Excel file does not come from the template.");
|
|
131
|
-
const d = t.map((l) => l.split(":")[1]), u = ["code", "name", "unit", "baseUnit", "measurementName"].filter((l) => !d.includes(l));
|
|
132
|
-
if (u.length)
|
|
133
|
-
throw new Error(
|
|
134
|
-
`Missing meta headers (${u.join()}). Excel file does not come from the template.`
|
|
135
|
-
);
|
|
136
|
-
return m.map((l, p) => {
|
|
137
|
-
const f = {};
|
|
138
|
-
for (const v in d) {
|
|
139
|
-
const g = d[v];
|
|
140
|
-
Object.assign(f, { [g]: l[v] });
|
|
141
|
-
}
|
|
142
|
-
return {
|
|
143
|
-
index: p,
|
|
144
|
-
data: f
|
|
145
|
-
};
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
function R(e, t, a, { ignoreErrors: n = !1 } = {}) {
|
|
149
|
-
var M;
|
|
150
|
-
const c = b().units, r = new Array(), m = a.filter((i) => i.data.code === e.code);
|
|
151
|
-
m.length > 1 && r.push(
|
|
152
|
-
`Code ${e.code} is already used in row ${m.map((i) => i.index + 6).join()}.`
|
|
153
|
-
);
|
|
154
|
-
const d = c.find((i) => {
|
|
155
|
-
var S, x;
|
|
156
|
-
return i.abbrev === e.baseUnit && ((S = i.name) == null ? void 0 : S.trim()) === ((x = e.unit) == null ? void 0 : x.trim());
|
|
157
|
-
}), o = d == null ? void 0 : d.measurements.find((i) => i.abbrev === e.measurementName);
|
|
158
|
-
if (!d)
|
|
159
|
-
r.push(`Cannot find base unit of symbol ${e.baseUnit}.`);
|
|
160
|
-
else if (e.baseUnit !== e.measurementName && !o) {
|
|
161
|
-
const i = `Cannot find unit conversion for ${e.baseUnit} with symbol ${e.measurementName || "[empty]"}.`;
|
|
162
|
-
r.push(i);
|
|
163
|
-
}
|
|
164
|
-
const u = C.options.find(
|
|
165
|
-
(i) => i === e.valuationMethod
|
|
166
|
-
);
|
|
167
|
-
e.valuationMethod && !u && r.push(
|
|
168
|
-
`Expected valuation method to be one of ${C.options.join()} but got ${e.valuationMethod} instead.`
|
|
169
|
-
);
|
|
170
|
-
const l = y().currentCountry.value, p = (i) => `${i}`.length && O()(i) === !0, f = p(`${e.pricePerUnit}`) === !0 ? {
|
|
171
|
-
costPerUnit: {
|
|
172
|
-
...j(Number(e.pricePerUnit) || 0),
|
|
173
|
-
currency: ((M = N(l)) == null ? void 0 : M.currency) ?? "MYR"
|
|
174
|
-
},
|
|
175
|
-
measurement: o
|
|
176
|
-
} : void 0, v = p(`${e.thresholdLow}`) && p(`${e.thresholdMid}`) ? {
|
|
177
|
-
low: Number(e.thresholdLow) || 0,
|
|
178
|
-
mid: Number(e.thresholdMid) || 0
|
|
179
|
-
} : void 0, g = "customAttributes" in e ? w(e.customAttributes) : null;
|
|
180
|
-
return {
|
|
181
|
-
type: "create",
|
|
182
|
-
sku: {
|
|
183
|
-
_id: P(),
|
|
184
|
-
code: e.code,
|
|
185
|
-
name: e.name,
|
|
186
|
-
unit: d ?? c.find((i) => i) ?? B,
|
|
187
|
-
trackingMeasurement: o == null ? void 0 : o.id,
|
|
188
|
-
valuation: u,
|
|
189
|
-
defaultCost: f,
|
|
190
|
-
thresholds: v,
|
|
191
|
-
...g !== null && { customAttributes: g }
|
|
192
|
-
},
|
|
193
|
-
errors: r,
|
|
194
|
-
excelRowNumber: t + 6
|
|
195
|
-
};
|
|
196
|
-
}
|
|
197
|
-
function Q(e) {
|
|
198
|
-
try {
|
|
199
|
-
const t = Y(e).filter((o) => o.data.code), n = b().skus, s = _(n, "code"), c = t.filter((o) => !s[o.data.code]), r = t.filter((o) => s[o.data.code]), m = c.map(
|
|
200
|
-
(o) => R(o.data, o.index, t)
|
|
201
|
-
), d = r.map((o) => {
|
|
202
|
-
const u = R(o.data, o.index, t), h = s[o.data.code];
|
|
203
|
-
let l = h.customAttributes;
|
|
204
|
-
return "customAttributes" in o.data && (l = w(o.data.customAttributes)), {
|
|
205
|
-
...u,
|
|
206
|
-
type: "update",
|
|
207
|
-
original: h,
|
|
208
|
-
sku: {
|
|
209
|
-
// to maintain original props not in the import excel, e.g. inventory binding, etc...
|
|
210
|
-
...h,
|
|
211
|
-
code: u.sku.code || h.code,
|
|
212
|
-
name: u.sku.name || h.name,
|
|
213
|
-
unit: u.sku.unit || h.unit,
|
|
214
|
-
trackingMeasurement: u.sku.trackingMeasurement || h.trackingMeasurement,
|
|
215
|
-
valuation: u.sku.valuation || h.valuation,
|
|
216
|
-
defaultCost: u.sku.defaultCost || h.defaultCost,
|
|
217
|
-
thresholds: u.sku.thresholds || h.thresholds,
|
|
218
|
-
customAttributes: l
|
|
219
|
-
}
|
|
220
|
-
};
|
|
221
|
-
});
|
|
222
|
-
return {
|
|
223
|
-
invalidExcel: !1,
|
|
224
|
-
importCreateResult: m,
|
|
225
|
-
importUpdateResult: d
|
|
226
|
-
};
|
|
227
|
-
} catch (t) {
|
|
228
|
-
return {
|
|
229
|
-
invalidExcel: !0,
|
|
230
|
-
invalidExcelMessage: (t == null ? void 0 : t.message) ?? "Invalid excel",
|
|
231
|
-
importCreateResult: [],
|
|
232
|
-
importUpdateResult: []
|
|
233
|
-
};
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
export {
|
|
237
|
-
K as a,
|
|
238
|
-
A as b,
|
|
239
|
-
k as d,
|
|
240
|
-
J as e,
|
|
241
|
-
Q as g,
|
|
242
|
-
w as s
|
|
243
|
-
};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import '@/extensions/array';
|
|
2
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
3
|
-
export default _default;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
-
export default _default;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export declare function downloadComprehensiveTemplate(): string;
|
|
2
|
-
export declare function processUnitsSheet(worksheet: any): Promise<import("@/views/unit/helper/import-export.helper").ImportUnitResult | null>;
|
|
3
|
-
export declare function processIngredientsSheet(worksheet: any): Promise<import("@/views/ingredients/helper/import-export.helper").ImportResult | null>;
|
|
4
|
-
export declare function processRecipesSheet(worksheet: any): Promise<import("@/views/recipe/helper/import-recipe").RecipeImportResult | null>;
|
package/dist/views/receive-request/components/delivery-order-form/SystemTrailDialog.vue.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
-
purchaseOrderId: string;
|
|
3
|
-
deliveryOrderId: string;
|
|
4
|
-
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
5
|
-
purchaseOrderId: string;
|
|
6
|
-
deliveryOrderId: string;
|
|
7
|
-
}>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
8
|
-
export default _default;
|
|
9
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
10
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
11
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
12
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
13
|
-
} : {
|
|
14
|
-
type: import('vue').PropType<T[K]>;
|
|
15
|
-
required: true;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
interface Props {
|
|
2
|
-
recipe: FdoInventoryRecipe;
|
|
3
|
-
type: 'create' | 'update';
|
|
4
|
-
errors?: string[];
|
|
5
|
-
}
|
|
6
|
-
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
7
|
-
export default _default;
|
|
8
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
9
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
10
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
11
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
12
|
-
} : {
|
|
13
|
-
type: import('vue').PropType<T[K]>;
|
|
14
|
-
required: true;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
-
export default _default;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import type { WorkSheet } from 'xlsx';
|
|
2
|
-
export type ObjectWithIndex<T> = {
|
|
3
|
-
index: number;
|
|
4
|
-
data: T;
|
|
5
|
-
};
|
|
6
|
-
export interface RecipeRow {
|
|
7
|
-
recipeName: string;
|
|
8
|
-
type: 'RECIPE' | 'INGREDIENT' | 'SKU_GROUP';
|
|
9
|
-
code: string;
|
|
10
|
-
name: string;
|
|
11
|
-
amount: string;
|
|
12
|
-
unit: string;
|
|
13
|
-
baseUnit: string;
|
|
14
|
-
measurementName: string;
|
|
15
|
-
customAttributes?: string;
|
|
16
|
-
}
|
|
17
|
-
export interface RecipeContainsRow {
|
|
18
|
-
type: 'RECIPE' | 'SKU' | 'SKU_GROUP';
|
|
19
|
-
id: string;
|
|
20
|
-
amount: {
|
|
21
|
-
amount: number;
|
|
22
|
-
precision: number;
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
export interface ImportRecipeCreateResult {
|
|
26
|
-
type: 'create';
|
|
27
|
-
recipe: FdoInventoryRecipe;
|
|
28
|
-
excelRowNumber: number;
|
|
29
|
-
errors: string[];
|
|
30
|
-
}
|
|
31
|
-
export interface ImportRecipeUpdateResult {
|
|
32
|
-
type: 'update';
|
|
33
|
-
original: FdoInventoryRecipe;
|
|
34
|
-
recipe: FdoInventoryRecipe;
|
|
35
|
-
excelRowNumber: number;
|
|
36
|
-
errors: string[];
|
|
37
|
-
}
|
|
38
|
-
export interface RecipeImportResult {
|
|
39
|
-
invalidExcel: boolean;
|
|
40
|
-
invalidExcelMessage?: string;
|
|
41
|
-
importCreateResult?: ImportRecipeCreateResult[];
|
|
42
|
-
importUpdateResult?: ImportRecipeUpdateResult[];
|
|
43
|
-
}
|
|
44
|
-
export declare function newRecipeId(): string;
|
|
45
|
-
export declare function importExcelToCreateRecipes(rows: ObjectWithIndex<RecipeRow>[], { ignoreErrors }?: {
|
|
46
|
-
ignoreErrors?: boolean;
|
|
47
|
-
}): RecipeImportResult;
|
|
48
|
-
export declare function worksheetToRecipeRow(sheet: WorkSheet): ObjectWithIndex<RecipeRow>[];
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { ImportUnitItemProps } from './ImportUnitItemProps';
|
|
2
|
-
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<ImportUnitItemProps>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<ImportUnitItemProps>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
3
|
-
export default _default;
|
|
4
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
5
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
6
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
7
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
8
|
-
} : {
|
|
9
|
-
type: import('vue').PropType<T[K]>;
|
|
10
|
-
required: true;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type ImportUnitCreateResult, type ImportUnitUpdateResult } from '../../helper/import-export.helper';
|
|
2
|
-
export interface UnitImportResult {
|
|
3
|
-
invalidExcel: boolean;
|
|
4
|
-
invalidExcelMessage?: string;
|
|
5
|
-
importCreateResult: ImportUnitCreateResult[];
|
|
6
|
-
importUpdateResult: ImportUnitUpdateResult[];
|
|
7
|
-
}
|
|
8
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
9
|
-
export default _default;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import type { WorkSheet } from 'xlsx';
|
|
2
|
-
export declare function newUnitId(): string;
|
|
3
|
-
export interface UnitRow {
|
|
4
|
-
name: string;
|
|
5
|
-
symbol: string;
|
|
6
|
-
precision: number;
|
|
7
|
-
measurement_name: string;
|
|
8
|
-
measurement_symbol: string;
|
|
9
|
-
measurement_conversion: number;
|
|
10
|
-
}
|
|
11
|
-
export type ObjectWithIndex<T> = {
|
|
12
|
-
index: number;
|
|
13
|
-
data: T;
|
|
14
|
-
};
|
|
15
|
-
export type ColIdHeader<T> = {
|
|
16
|
-
id: keyof T;
|
|
17
|
-
name: string;
|
|
18
|
-
};
|
|
19
|
-
export interface ImportUnitCreateResult {
|
|
20
|
-
type: 'create';
|
|
21
|
-
unit: FdoInventoryUnit;
|
|
22
|
-
excelRowNumber: number;
|
|
23
|
-
errors: string[];
|
|
24
|
-
}
|
|
25
|
-
export interface ImportUnitUpdateResult {
|
|
26
|
-
type: 'update';
|
|
27
|
-
original: FdoInventoryUnit;
|
|
28
|
-
unit: FdoInventoryUnit;
|
|
29
|
-
excelRowNumber: number;
|
|
30
|
-
errors: string[];
|
|
31
|
-
}
|
|
32
|
-
export type ImportUnitResult = {
|
|
33
|
-
invalidExcel: boolean;
|
|
34
|
-
invalidExcelMessage?: string;
|
|
35
|
-
importCreateResult: ImportUnitCreateResult[];
|
|
36
|
-
importUpdateResult: ImportUnitUpdateResult[];
|
|
37
|
-
};
|
|
38
|
-
export declare function worksheetToUnitRow(sheet: WorkSheet): ObjectWithIndex<UnitRow>[];
|
|
39
|
-
export declare function getUnitsToCreateUpdate(sheet: WorkSheet): ImportUnitResult;
|
|
40
|
-
export declare function exportUnits(): string;
|