@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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@feedmepos/mf-inventory-portal",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9-dev.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"vue-router": "^4.3.2",
|
|
38
38
|
"xlsx": "^0.18.5",
|
|
39
39
|
"zod": "3.17.9",
|
|
40
|
-
"@feedmepos/inventory-core
|
|
41
|
-
"@feedmepos/zod-inventory": "^1.0.
|
|
42
|
-
"@feedmepos/inventory-core": "^0.
|
|
40
|
+
"@feedmepos/inventory-core": "^0.2.15-alpha.8",
|
|
41
|
+
"@feedmepos/zod-inventory": "^1.0.8",
|
|
42
|
+
"@feedmepos/inventory-core-js": "^1.0.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@rushstack/eslint-patch": "^1.10.3",
|
|
@@ -1,258 +0,0 @@
|
|
|
1
|
-
import { defineComponent as Q, computed as x, resolveComponent as y, openBlock as p, createElementBlock as B, createVNode as a, unref as r, createElementVNode as n, Fragment as R, renderList as M, createBlock as F, withCtx as V, createTextVNode as E, toDisplayString as P, createCommentVNode as T, createStaticVNode as W } from "vue";
|
|
2
|
-
import { u as X } from "./app-xvM0IT6q.js";
|
|
3
|
-
import { u as Y, g as Z } from "./use-inventory-binding-dialog-BMdXWZig.js";
|
|
4
|
-
import { a as I, c as ee } from "./date2-CPG_e5XN.js";
|
|
5
|
-
import { A as oe, b as ne, a as L, M as te } from "./rules-CMkplg8p.js";
|
|
6
|
-
import { g as le } from "./dayjs.min-C4W5S_u8.js";
|
|
7
|
-
const ie = { class: "flex flex-col gap-24" }, de = { class: "flex flex-col gap-16" }, se = { class: "flex items-center" }, ae = /* @__PURE__ */ n("div", { class: "flex-1 fm-typo-en-title-sm-600" }, "Recipe", -1), re = { class: "flex flex-col" }, ue = /* @__PURE__ */ n("div", { class: "flex py-8 px-12 border-b border-fm-color-neutral-gray-200 bg-fm-color-neutral-gray-100 h-[44px] items-center" }, [
|
|
8
|
-
/* @__PURE__ */ n("div", { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, "Recipe"),
|
|
9
|
-
/* @__PURE__ */ n("div", { class: "w-[200px]" }),
|
|
10
|
-
/* @__PURE__ */ n("div", { class: "w-[52px]" })
|
|
11
|
-
], -1), me = { class: "flex h-48 items-center w-full border-b border-fm-color-neutral-gray-100" }, ce = { class: "flex-1 fm-typo-en-body-md-400 py-8 px-12" }, pe = { class: "w-[200px]" }, fe = { class: "w-[52px]" }, ve = { class: "flex flex-col gap-16" }, ye = { class: "flex items-center" }, be = /* @__PURE__ */ n("div", { class: "flex-1 fm-typo-en-title-sm-600" }, "Ingredient", -1), _e = { class: "flex flex-col" }, xe = /* @__PURE__ */ W('<div class="flex py-8 px-12 border-b border-fm-color-neutral-gray-200 bg-fm-color-neutral-gray-100 h-[44px] items-center"><div class="flex-1 fm-typo-en-body-md-600 text-fm-color-typo-secondary">Ingredient</div><div class="fm-typo-en-body-md-600 text-fm-color-typo-secondary w-[110px] px-16"> Amount </div><div class="fm-typo-en-body-md-600 text-fm-color-typo-secondary w-[160px] px-16"> Unit </div><div class="w-[52px]"></div></div>', 1), Ve = { class: "flex h-48 items-center w-full border-b border-fm-color-neutral-gray-100" }, he = { class: "flex-1 fm-typo-en-body-md-400 py-8 px-12" }, ge = { class: "w-[110px] px-4" }, ke = { class: "w-[160px]" }, we = { class: "w-[52px]" }, Fe = /* @__PURE__ */ n("div", null, null, -1), Re = /* @__PURE__ */ Q({
|
|
12
|
-
__name: "InventoryBindingForm",
|
|
13
|
-
props: {
|
|
14
|
-
id: {},
|
|
15
|
-
modelValue: { default: () => [] },
|
|
16
|
-
excludeBindingId: {},
|
|
17
|
-
iframeMode: { type: Boolean },
|
|
18
|
-
disabled: { type: Boolean }
|
|
19
|
-
},
|
|
20
|
-
emits: ["update:modelValue", "click:pick-inventory-bindings"],
|
|
21
|
-
setup(z, { emit: N }) {
|
|
22
|
-
const h = X(), j = x(() => h.inventory.recipe ?? []), g = x(() => h.inventory.sku ?? []), u = z, m = N, k = x(
|
|
23
|
-
() => le({
|
|
24
|
-
id: u.id ?? "",
|
|
25
|
-
skus: h.skus,
|
|
26
|
-
recipes: h.recipes
|
|
27
|
-
})
|
|
28
|
-
), D = x(() => u.modelValue.filter((e) => e.type === "RECIPE")), { promptIngredientsBinding: G, promptRecipesBinding: K } = Y();
|
|
29
|
-
async function O() {
|
|
30
|
-
if (u.iframeMode) {
|
|
31
|
-
m("click:pick-inventory-bindings", "RECIPE");
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
K(
|
|
35
|
-
u.modelValue,
|
|
36
|
-
(e) => m("update:modelValue", e),
|
|
37
|
-
k.value.recipes
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
const $ = x(() => u.modelValue.filter((e) => e.type === "SKU") ?? []);
|
|
41
|
-
async function q() {
|
|
42
|
-
if (u.iframeMode) {
|
|
43
|
-
m("click:pick-inventory-bindings", "SKU");
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
G(
|
|
47
|
-
u.modelValue,
|
|
48
|
-
(e) => m("update:modelValue", e),
|
|
49
|
-
u.excludeBindingId,
|
|
50
|
-
k.value.skus
|
|
51
|
-
);
|
|
52
|
-
}
|
|
53
|
-
function U(e, s, i) {
|
|
54
|
-
const d = +s;
|
|
55
|
-
let t = i;
|
|
56
|
-
s.length > 0 && isFinite(d) ? t = i.map((l) => (l.id !== e || (l.amount = ee(d)), l)) : t = i.map((l) => (l.id !== e || (l.amount = { amount: 0, precision: 0 }), l)), m("update:modelValue", t);
|
|
57
|
-
}
|
|
58
|
-
function C(e) {
|
|
59
|
-
const s = g.value.find((i) => i._id === e);
|
|
60
|
-
return s ? Z(s.unit, !0) : [];
|
|
61
|
-
}
|
|
62
|
-
function H(e, s) {
|
|
63
|
-
const i = C(e), d = i.find((t) => t.value === s) ?? i.find((t) => t.value === null);
|
|
64
|
-
return d ? {
|
|
65
|
-
...d,
|
|
66
|
-
label: d.abbrev
|
|
67
|
-
} : null;
|
|
68
|
-
}
|
|
69
|
-
function J(e, s, i) {
|
|
70
|
-
let d;
|
|
71
|
-
if (s === null)
|
|
72
|
-
d = i.map((t) => (t.id !== e || (t.measurement = null), t)) ?? [];
|
|
73
|
-
else {
|
|
74
|
-
const t = g.value.find((l) => l._id === e);
|
|
75
|
-
d = i.map((l) => {
|
|
76
|
-
var b, w;
|
|
77
|
-
return l.id !== e || (l.measurement = (w = (b = t == null ? void 0 : t.unit) == null ? void 0 : b.measurements) == null ? void 0 : w.find((o) => o.id === s)), l;
|
|
78
|
-
}) ?? [];
|
|
79
|
-
}
|
|
80
|
-
m("update:modelValue", d);
|
|
81
|
-
}
|
|
82
|
-
function S(e, s) {
|
|
83
|
-
const i = s.filter((d) => d.id !== e);
|
|
84
|
-
m("update:modelValue", i);
|
|
85
|
-
}
|
|
86
|
-
return (e, s) => {
|
|
87
|
-
const i = y("FmFormGroup"), d = y("FmButton"), t = y("FmIcon"), l = y("FmTooltip"), b = y("FmTextField"), w = y("FmSelect");
|
|
88
|
-
return p(), B("div", ie, [
|
|
89
|
-
a(i, {
|
|
90
|
-
disabled: e.disabled,
|
|
91
|
-
"model-value": e.modelValue,
|
|
92
|
-
rules: e.iframeMode ? void 0 : [r(oe)(1, "Must have at least one inventory binding")]
|
|
93
|
-
}, null, 8, ["disabled", "model-value", "rules"]),
|
|
94
|
-
n("div", de, [
|
|
95
|
-
n("div", se, [
|
|
96
|
-
ae,
|
|
97
|
-
a(d, {
|
|
98
|
-
variant: "secondary",
|
|
99
|
-
"text-color": "primary",
|
|
100
|
-
"border-color": "primary",
|
|
101
|
-
label: "Link recipe",
|
|
102
|
-
"prepend-icon": "link",
|
|
103
|
-
onClick: O
|
|
104
|
-
})
|
|
105
|
-
]),
|
|
106
|
-
n("div", re, [
|
|
107
|
-
ue,
|
|
108
|
-
(p(!0), B(R, null, M(D.value, (o) => (p(), F(i, {
|
|
109
|
-
key: o.id,
|
|
110
|
-
disabled: e.disabled,
|
|
111
|
-
modelValue: +r(I)(o.amount ?? { amount: 1, precision: 0 }),
|
|
112
|
-
rules: [r(ne)(0), r(L)(0)]
|
|
113
|
-
}, {
|
|
114
|
-
default: V(({ invalid: f }) => {
|
|
115
|
-
var _;
|
|
116
|
-
return [
|
|
117
|
-
n("div", me, [
|
|
118
|
-
n("div", ce, [
|
|
119
|
-
E(P((_ = j.value.find((c) => c._id === o.id)) == null ? void 0 : _.name) + " ", 1),
|
|
120
|
-
k.value.recipes.includes(o.id) ? (p(), F(l, {
|
|
121
|
-
key: 0,
|
|
122
|
-
variant: "plain",
|
|
123
|
-
placement: "bottom",
|
|
124
|
-
content: "It is invalid, please verify or remove it.",
|
|
125
|
-
"hide-arrow": !0,
|
|
126
|
-
"z-index": 50
|
|
127
|
-
}, {
|
|
128
|
-
default: V(() => [
|
|
129
|
-
a(t, {
|
|
130
|
-
name: "error",
|
|
131
|
-
size: "sm",
|
|
132
|
-
color: "#ff3b30"
|
|
133
|
-
})
|
|
134
|
-
]),
|
|
135
|
-
_: 1
|
|
136
|
-
})) : T("", !0)
|
|
137
|
-
]),
|
|
138
|
-
n("div", pe, [
|
|
139
|
-
a(b, {
|
|
140
|
-
class: "w-full",
|
|
141
|
-
disabled: e.disabled,
|
|
142
|
-
modelValue: +r(I)(o.amount ?? { amount: 1, precision: 0 }),
|
|
143
|
-
"onUpdate:modelValue": (c) => U(o.id, c, e.modelValue),
|
|
144
|
-
invalid: f
|
|
145
|
-
}, null, 8, ["disabled", "modelValue", "onUpdate:modelValue", "invalid"])
|
|
146
|
-
]),
|
|
147
|
-
n("div", fe, [
|
|
148
|
-
a(d, {
|
|
149
|
-
disabled: e.disabled,
|
|
150
|
-
type: "button",
|
|
151
|
-
variant: "plain",
|
|
152
|
-
icon: "delete",
|
|
153
|
-
"icon-color": "#000000",
|
|
154
|
-
onClick: (c) => S(o.id, e.modelValue)
|
|
155
|
-
}, null, 8, ["disabled", "onClick"])
|
|
156
|
-
])
|
|
157
|
-
])
|
|
158
|
-
];
|
|
159
|
-
}),
|
|
160
|
-
_: 2
|
|
161
|
-
}, 1032, ["disabled", "modelValue", "rules"]))), 128))
|
|
162
|
-
])
|
|
163
|
-
]),
|
|
164
|
-
n("div", ve, [
|
|
165
|
-
n("div", ye, [
|
|
166
|
-
be,
|
|
167
|
-
a(d, {
|
|
168
|
-
variant: "secondary",
|
|
169
|
-
"text-color": "primary",
|
|
170
|
-
"border-color": "primary",
|
|
171
|
-
label: "Link ingredient",
|
|
172
|
-
"prepend-icon": "link",
|
|
173
|
-
onClick: q
|
|
174
|
-
})
|
|
175
|
-
]),
|
|
176
|
-
n("div", _e, [
|
|
177
|
-
xe,
|
|
178
|
-
(p(!0), B(R, null, M($.value, (o) => (p(), F(i, {
|
|
179
|
-
key: o.id,
|
|
180
|
-
disabled: e.disabled,
|
|
181
|
-
modelValue: +r(I)(o.amount ?? { amount: 1, precision: 0 }),
|
|
182
|
-
rules: [
|
|
183
|
-
r(te)(
|
|
184
|
-
g.value.find((f) => f._id === o.id).unit,
|
|
185
|
-
o.measurement
|
|
186
|
-
),
|
|
187
|
-
r(L)(0)
|
|
188
|
-
]
|
|
189
|
-
}, {
|
|
190
|
-
default: V(({ invalid: f }) => {
|
|
191
|
-
var _, c, A;
|
|
192
|
-
return [
|
|
193
|
-
n("div", Ve, [
|
|
194
|
-
n("div", he, [
|
|
195
|
-
E(P((_ = g.value.find((v) => v._id === o.id)) == null ? void 0 : _.name) + " ", 1),
|
|
196
|
-
k.value.skus.includes(o.id) ? (p(), F(l, {
|
|
197
|
-
key: 0,
|
|
198
|
-
variant: "plain",
|
|
199
|
-
placement: "bottom",
|
|
200
|
-
content: "It is invalid, please verify or remove it.",
|
|
201
|
-
"hide-arrow": !0,
|
|
202
|
-
"z-index": 50
|
|
203
|
-
}, {
|
|
204
|
-
default: V(() => [
|
|
205
|
-
a(t, {
|
|
206
|
-
name: "error",
|
|
207
|
-
size: "sm",
|
|
208
|
-
color: "#ff3b30"
|
|
209
|
-
})
|
|
210
|
-
]),
|
|
211
|
-
_: 1
|
|
212
|
-
})) : T("", !0)
|
|
213
|
-
]),
|
|
214
|
-
n("div", ge, [
|
|
215
|
-
a(b, {
|
|
216
|
-
disabled: e.disabled,
|
|
217
|
-
modelValue: +r(I)(o.amount ?? { amount: 1, precision: 0 }),
|
|
218
|
-
"onUpdate:modelValue": (v) => U(o.id, v, e.modelValue),
|
|
219
|
-
invalid: f
|
|
220
|
-
}, null, 8, ["disabled", "modelValue", "onUpdate:modelValue", "invalid"])
|
|
221
|
-
]),
|
|
222
|
-
n("div", ke, [
|
|
223
|
-
a(w, {
|
|
224
|
-
disabled: e.disabled,
|
|
225
|
-
class: "translate-y-[4px]",
|
|
226
|
-
items: C(o.id),
|
|
227
|
-
"model-value": (A = H(o.id, (c = o.measurement) == null ? void 0 : c.id)) == null ? void 0 : A.value,
|
|
228
|
-
"onUpdate:modelValue": (v) => J(o.id, v, e.modelValue),
|
|
229
|
-
invalid: f
|
|
230
|
-
}, {
|
|
231
|
-
"helper-text": V(() => []),
|
|
232
|
-
_: 2
|
|
233
|
-
}, 1032, ["disabled", "items", "model-value", "onUpdate:modelValue", "invalid"])
|
|
234
|
-
]),
|
|
235
|
-
n("div", we, [
|
|
236
|
-
a(d, {
|
|
237
|
-
disabled: e.disabled,
|
|
238
|
-
type: "button",
|
|
239
|
-
variant: "tertiary",
|
|
240
|
-
icon: "delete",
|
|
241
|
-
onClick: (v) => S(o.id, e.modelValue)
|
|
242
|
-
}, null, 8, ["disabled", "onClick"])
|
|
243
|
-
])
|
|
244
|
-
])
|
|
245
|
-
];
|
|
246
|
-
}),
|
|
247
|
-
_: 2
|
|
248
|
-
}, 1032, ["disabled", "modelValue", "rules"]))), 128))
|
|
249
|
-
]),
|
|
250
|
-
Fe
|
|
251
|
-
])
|
|
252
|
-
]);
|
|
253
|
-
};
|
|
254
|
-
}
|
|
255
|
-
});
|
|
256
|
-
export {
|
|
257
|
-
Re as _
|
|
258
|
-
};
|