@feedmepos/mf-inventory-portal 0.0.8 → 0.0.9-dev.1
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/{ApprovalView-CV1aKhpn.js → ApprovalView-Br14v6j_.js} +6 -6
- package/dist/{BindingsDialog-DyOj7ftf.js → BindingsDialog-BbV2bNST.js} +2 -2
- package/dist/{BindingsPicker-KwG2CsXl.js → BindingsPicker-BOzxrTPj.js} +2 -2
- package/dist/{BindingsTable-CdpDTyY8.js → BindingsTable-DLb4BVII.js} +3 -3
- package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-Cnom-0UK.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-Cc9VT9C_.js} +1 -1
- package/dist/{FmMultiselectDialog.vue_vue_type_script_setup_true_lang-CQxvHZg0.js → FmMultiselectDialog.vue_vue_type_script_setup_true_lang-nYxqvxg0.js} +2 -2
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-CcwKBi_P.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-CcLL-ilW.js} +1 -1
- package/dist/{IngredientsView-DZnjj8QY.js → IngredientsView-BbfvkcIr.js} +7 -7
- package/dist/{IntegrationView-BT5F-P0D.js → IntegrationView-mevFBUEP.js} +3 -3
- package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-DDFBuPPb.js +423 -0
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-D9n3OW9N.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-D1_MsmgN.js} +1 -1
- package/dist/{PurchaseOrderPrintPreview-DM2MVMAg.js → PurchaseOrderPrintPreview-CWuaV1xH.js} +1 -1
- package/dist/{ReceiveRequestView-pQW7439O.js → ReceiveRequestView-VFt8tALF.js} +11 -11
- package/dist/{RecipeView-Dl8eICzR.js → RecipeView-vBSWDneP.js} +7 -7
- package/dist/StockView-vn9LIFBM.js +1995 -0
- package/dist/{SupplierView-Dl-QtrkM.js → SupplierView-jopEUREP.js} +7 -7
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-BxVDWXLI.js → TransferDetails.vue_vue_type_script_setup_true_lang-OQ11BS1f.js} +5 -5
- package/dist/{UnitView-skfMz5g5.js → UnitView-CHxzCxYk.js} +6 -6
- package/dist/{WarehouseView-BOMuOe0d.js → WarehouseView-C6AmCIiw.js} +3 -3
- package/dist/api/stock.d.ts +8 -0
- package/dist/{app-xvM0IT6q.js → app-DHsfR6J8.js} +1097 -1092
- package/dist/app.js +1 -1
- package/dist/components/FmUnitInputProps.d.ts +19 -0
- package/dist/{date2-CPG_e5XN.js → date2-CM5r8cLo.js} +8 -8
- package/dist/dayjs.min-xpHocq62.js +21235 -0
- package/dist/{decimal-DLQq1gqK.js → decimal-QxURfazH.js} +1 -1
- package/dist/{fuzzy-DF45ZGPY.js → fuzzy-B4IluZqJ.js} +1 -1
- package/dist/{init-date-range-B2K9jb0p.js → init-date-range-DIeIdvaf.js} +1 -1
- package/dist/{layout-AKD1mdGw.js → layout-NuzOIM2J.js} +1 -1
- package/dist/{rules-CMkplg8p.js → rules-BfcSeEak.js} +2 -1
- package/dist/{stock-estimate-CUQZMVGq.js → stock-estimate-CGhpBlZl.js} +2 -2
- package/dist/{supplier-BUt82bLW.js → supplier-CMoCA8xc.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/use-inventory-binding-dialog-D6HCM0oB.js +93 -0
- package/dist/util-CEVKTbZD.js +18 -0
- package/dist/views/dev/components/UnitInput.vue.d.ts +2 -0
- package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +3 -0
- package/dist/views/stock/components/StockRecalculateDialog.vue.d.ts +9 -0
- package/dist/{xlsx-BfqYFREJ.js → xlsx-CXiw_5-A.js} +306 -306
- package/package.json +4 -4
- package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-BKQwDZwb.js +0 -258
- package/dist/StockView-M0EH_ua3.js +0 -1885
- package/dist/dayjs.min-C4W5S_u8.js +0 -13864
- package/dist/use-inventory-binding-dialog-BMdXWZig.js +0 -109
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { _ as y } from "./FmMultiselectDialog.vue_vue_type_script_setup_true_lang-nYxqvxg0.js";
|
|
2
|
+
import { u as v } from "./app-DHsfR6J8.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
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
function l(a, e = !1) {
|
|
2
|
+
var r;
|
|
3
|
+
return a ? [
|
|
4
|
+
{
|
|
5
|
+
label: e ? a.abbrev : `1 ${a.name} (${a.abbrev})`,
|
|
6
|
+
abbrev: a.abbrev,
|
|
7
|
+
value: null
|
|
8
|
+
},
|
|
9
|
+
...((r = a.measurements) == null ? void 0 : r.map((b) => ({
|
|
10
|
+
label: e ? b.abbrev : `1 ${b.name} (${b.abbrev})`,
|
|
11
|
+
abbrev: b.abbrev,
|
|
12
|
+
value: b.id
|
|
13
|
+
}))) ?? []
|
|
14
|
+
] : [];
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
l as g
|
|
18
|
+
};
|
|
@@ -22,6 +22,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
22
22
|
type: "RECIPE" | "SKU";
|
|
23
23
|
amount: {
|
|
24
24
|
amount: number;
|
|
25
|
+
/** binded inventory of type SKU (aka ingredients) */
|
|
25
26
|
precision: number;
|
|
26
27
|
};
|
|
27
28
|
id: string;
|
|
@@ -44,6 +45,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
44
45
|
type: "RECIPE" | "SKU";
|
|
45
46
|
amount: {
|
|
46
47
|
amount: number;
|
|
48
|
+
/** binded inventory of type SKU (aka ingredients) */
|
|
47
49
|
precision: number;
|
|
48
50
|
};
|
|
49
51
|
id: string;
|
|
@@ -63,6 +65,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
63
65
|
type: "RECIPE" | "SKU";
|
|
64
66
|
amount: {
|
|
65
67
|
amount: number;
|
|
68
|
+
/** binded inventory of type SKU (aka ingredients) */
|
|
66
69
|
precision: number;
|
|
67
70
|
};
|
|
68
71
|
id: string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface StockRecalculateDialogEvents {
|
|
2
|
+
(event: 'close'): void;
|
|
3
|
+
}
|
|
4
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
5
|
+
close: () => void;
|
|
6
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
7
|
+
onClose?: (() => any) | undefined;
|
|
8
|
+
}, {}, {}>;
|
|
9
|
+
export default _default;
|