@feedmepos/mf-inventory-portal 0.0.5 → 0.0.7-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-CTQdDgGH.js → ApprovalView-BYZcvkso.js} +6 -6
- package/dist/BindingsDialog-pdS86VDU.js +94 -0
- package/dist/{BindingsPicker-CQIGhTCR.js → BindingsPicker-D891Cfzu.js} +2 -2
- package/dist/{BindingsTable-Da4BLkvc.js → BindingsTable-tmr6QwLk.js} +30 -31
- package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-DcixBOcX.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-Bss0q2Zt.js} +7 -7
- package/dist/{FmMultiselectDialog.vue_vue_type_script_setup_true_lang-BXU7x6di.js → FmMultiselectDialog.vue_vue_type_script_setup_true_lang-BHcLUkdm.js} +19 -20
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-CD89qCIa.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-BIww2Noe.js} +1 -1
- package/dist/IngredientsView-BH6G7830.js +819 -0
- package/dist/{IntegrationView-BRWYO3VE.js → IntegrationView-CfJn6Fzn.js} +3 -3
- package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-39U8Iavr.js +258 -0
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DBK7mpQS.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-nDxqau1g.js} +1 -1
- package/dist/{PurchaseOrderPrintPreview-CH9gVYDg.js → PurchaseOrderPrintPreview-Db2U_IQL.js} +1 -1
- package/dist/ReceiveRequestView-CgVfcS8C.js +1483 -0
- package/dist/{RecipeView-DFG9Wkx-.js → RecipeView-C9_Y_A9b.js} +58 -58
- package/dist/StockView-CoUI3Faj.js +1916 -0
- package/dist/SupplierView-CNq6wVfN.js +818 -0
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-Ffe9bhq8.js → TransferDetails.vue_vue_type_script_setup_true_lang-Cmajrg-9.js} +5 -5
- package/dist/{UnitView-C3XVSbJY.js → UnitView-Buyp4Gnc.js} +190 -177
- package/dist/{WarehouseView-BntzAdz3.js → WarehouseView-DbUib0PR.js} +56 -56
- package/dist/api/inventory.d.ts +33 -0
- package/dist/api/stock-estimate.d.ts +16 -0
- package/dist/api/stock.d.ts +8 -0
- package/dist/app-DM4Thqjw.js +42756 -0
- package/dist/app.js +1 -1
- package/dist/components/StockForecast.vue.d.ts +12 -0
- package/dist/components/StockForecastProps.d.ts +3 -0
- package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +16 -0
- package/dist/components/shell/inventory/binding-ui.vue.d.ts +16 -0
- package/dist/core.d.ts +3 -2
- package/dist/date2-DpU4LDaP.js +199 -0
- package/dist/dayjs.min-D4Q_pHH9.js +13556 -0
- package/dist/{decimal-D3a0BwVj.js → decimal-M4vjE6Br.js} +1 -1
- package/dist/{fuzzy-BW8ZYsDG.js → fuzzy-fD_FTJWH.js} +1 -1
- package/dist/helper/number.d.ts +1 -0
- package/dist/{init-date-range-M3Q03-Fd.js → init-date-range-DJ1Nl5TB.js} +1 -1
- package/dist/{layout-BvUjg6JS.js → layout-kY567oHX.js} +1 -1
- package/dist/{rules-DHfAMDW3.js → rules-CVxh5XVG.js} +3 -3
- package/dist/stock-estimate-lkaYlz7I.js +90 -0
- package/dist/stores/api.d.ts +1 -0
- package/dist/stores/helper/generate-backend-urls.d.ts +1 -0
- package/dist/stores/inventory.d.ts +64 -0
- package/dist/stores/stock-estimate.d.ts +11 -0
- package/dist/stores/supplier.d.ts +19 -1
- package/dist/style.css +1 -1
- package/dist/{supplier-DTiiOLtg.js → supplier-evd71Y1H.js} +3 -3
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-inventory-binding-dialog-B6JO7050.js → use-inventory-binding-dialog-CGuXojFC.js} +2 -2
- package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +32 -0
- package/dist/views/ingredients/composables/use-ingredient-table.d.ts +16 -0
- package/dist/views/receive-request/components/transfer-form/SparkIcon.vue.d.ts +23 -0
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +213 -7
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +102 -2
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +306 -6
- package/dist/views/stock/components/StockRecalculateDialog.vue.d.ts +9 -0
- package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +32 -0
- package/dist/views/stock/type.d.ts +1 -0
- package/dist/views/supplier/components/SupplierForm.vue.d.ts +38 -2
- package/dist/views/supplier/components/SupplierSupplyItemField.vue.d.ts +45 -0
- package/dist/views/supplier/composables/use-supplier-table.d.ts +19 -1
- package/dist/{xlsx-BljO4Lx2.js → xlsx-DpBw8KA4.js} +1010 -1010
- package/package.json +13 -7
- package/dist/BindingsDialog-DvX_DRsO.js +0 -82
- package/dist/IngredientsView-2ZKdzsgI.js +0 -739
- package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-CnsDmPTe.js +0 -240
- package/dist/ReceiveRequestView-DQBqc3GF.js +0 -1298
- package/dist/StockView-DLWMp_I5.js +0 -1733
- package/dist/SupplierView-CZhM2ie3.js +0 -607
- package/dist/app-BzDhmCVx.js +0 -36639
- package/dist/components/shell/inventory/binding-ui.test.d.ts +0 -1
- package/dist/components/ui-library/FmSpecialChip.vue.d.ts +0 -79
- package/dist/date2-C7HiAWQG.js +0 -209
- package/dist/dayjs.min-Db57WhI9.js +0 -282
- package/dist/id-to-date-ReZIpUDw.js +0 -30
- package/dist/index-D46it8Rk.js +0 -12956
|
@@ -1,240 +0,0 @@
|
|
|
1
|
-
import { defineComponent as Q, computed as _, resolveComponent as g, openBlock as s, createElementBlock as V, createVNode as a, unref as u, Fragment as T, renderList as L, createBlock as C, withCtx as h, createElementVNode as m, createTextVNode as z, toDisplayString as $, createCommentVNode as U } from "vue";
|
|
2
|
-
import { u as W } from "./app-BzDhmCVx.js";
|
|
3
|
-
import { u as X, g as Y } from "./use-inventory-binding-dialog-B6JO7050.js";
|
|
4
|
-
import { a as S, t as Z } from "./date2-C7HiAWQG.js";
|
|
5
|
-
import { A as ee, b as ne, M as N, a as le } from "./rules-DHfAMDW3.js";
|
|
6
|
-
import "./index-D46it8Rk.js";
|
|
7
|
-
function oe(A) {
|
|
8
|
-
return exports.getInvalidSkuAndRecipe(A);
|
|
9
|
-
}
|
|
10
|
-
const ie = { class: "flex flex-col xs:gap-8 gap-4" }, te = /* @__PURE__ */ m("div", { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary bg-fm-color-neutral-gray-100 border-b py-12 px-16" }, " Recipe ", -1), de = { key: 0 }, ae = { class: "xs:col-span-3" }, se = /* @__PURE__ */ m("div", { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary bg-fm-color-neutral-gray-100 border-b py-12 px-16" }, " Ingredients ", -1), ue = { key: 1 }, re = { class: "flex flex-col gap-4" }, me = { class: "grid grid-cols-[auto_100px_100px_48px] xs:grid-cols-[auto_80px_120px_48px] gap-8 px-8 items-center" }, ce = { class: "xs:col-span-3" }, ke = /* @__PURE__ */ Q({
|
|
11
|
-
__name: "InventoryBindingForm",
|
|
12
|
-
props: {
|
|
13
|
-
id: {},
|
|
14
|
-
modelValue: { default: () => [] },
|
|
15
|
-
excludeBindingId: {},
|
|
16
|
-
iframeMode: { type: Boolean },
|
|
17
|
-
disabled: { type: Boolean }
|
|
18
|
-
},
|
|
19
|
-
emits: ["update:modelValue", "click:pick-inventory-bindings"],
|
|
20
|
-
setup(A, { emit: j }) {
|
|
21
|
-
const x = W(), D = _(() => x.inventory.recipe ?? []), F = _(() => x.inventory.sku ?? []), r = A, c = j, I = _(
|
|
22
|
-
() => oe({
|
|
23
|
-
id: r.id ?? "",
|
|
24
|
-
skus: x.skus,
|
|
25
|
-
recipes: x.recipes
|
|
26
|
-
})
|
|
27
|
-
), y = _(() => r.modelValue.filter((e) => e.type === "RECIPE")), { promptIngredientsBinding: G, promptRecipesBinding: K } = X();
|
|
28
|
-
async function O() {
|
|
29
|
-
if (r.iframeMode) {
|
|
30
|
-
c("click:pick-inventory-bindings", "RECIPE");
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
K(
|
|
34
|
-
r.modelValue,
|
|
35
|
-
(e) => c("update:modelValue", e),
|
|
36
|
-
I.value.recipes
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
const k = _(() => r.modelValue.filter((e) => e.type === "SKU") ?? []);
|
|
40
|
-
async function q() {
|
|
41
|
-
if (r.iframeMode) {
|
|
42
|
-
c("click:pick-inventory-bindings", "SKU");
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
G(
|
|
46
|
-
r.modelValue,
|
|
47
|
-
(e) => c("update:modelValue", e),
|
|
48
|
-
r.excludeBindingId,
|
|
49
|
-
I.value.skus
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
function R(e, d, i) {
|
|
53
|
-
const t = +d;
|
|
54
|
-
let l = i;
|
|
55
|
-
d.length > 0 && isFinite(t) ? l = i.map((o) => (o.id !== e || (o.amount = Z(t)), o)) : l = i.map((o) => (o.id !== e || (o.amount = { amount: 0, precision: 0 }), o)), c("update:modelValue", l);
|
|
56
|
-
}
|
|
57
|
-
function w(e) {
|
|
58
|
-
const d = F.value.find((i) => i._id === e);
|
|
59
|
-
return d ? Y(d.unit, !0) : [];
|
|
60
|
-
}
|
|
61
|
-
function H(e, d) {
|
|
62
|
-
const i = w(e), t = i.find((l) => l.value === d) ?? i.find((l) => l.value === null);
|
|
63
|
-
return t ? {
|
|
64
|
-
...t,
|
|
65
|
-
label: t.abbrev
|
|
66
|
-
} : null;
|
|
67
|
-
}
|
|
68
|
-
function J(e, d, i) {
|
|
69
|
-
let t;
|
|
70
|
-
if (d === null)
|
|
71
|
-
t = i.map((l) => (l.id !== e || (l.measurement = null), l)) ?? [];
|
|
72
|
-
else {
|
|
73
|
-
const l = F.value.find((o) => o._id === e);
|
|
74
|
-
t = i.map((o) => {
|
|
75
|
-
var p, B;
|
|
76
|
-
return o.id !== e || (o.measurement = (B = (p = l == null ? void 0 : l.unit) == null ? void 0 : p.measurements) == null ? void 0 : B.find((n) => n.id === d)), o;
|
|
77
|
-
}) ?? [];
|
|
78
|
-
}
|
|
79
|
-
c("update:modelValue", t);
|
|
80
|
-
}
|
|
81
|
-
function M(e, d) {
|
|
82
|
-
const i = d.filter((t) => t.id !== e);
|
|
83
|
-
c("update:modelValue", i);
|
|
84
|
-
}
|
|
85
|
-
return (e, d) => {
|
|
86
|
-
const i = g("FmFormGroup"), t = g("FmIcon"), l = g("FmTooltip"), o = g("FmTextField"), p = g("FmButton"), B = g("FmSelect");
|
|
87
|
-
return s(), V("div", ie, [
|
|
88
|
-
a(i, {
|
|
89
|
-
disabled: e.disabled,
|
|
90
|
-
"model-value": e.modelValue,
|
|
91
|
-
rules: e.iframeMode ? void 0 : [u(ee)(1, "Must have at least one inventory binding")]
|
|
92
|
-
}, null, 8, ["disabled", "model-value", "rules"]),
|
|
93
|
-
te,
|
|
94
|
-
y.value.length ? (s(), V("div", de, [
|
|
95
|
-
(s(!0), V(T, null, L(y.value, (n) => (s(), C(i, {
|
|
96
|
-
key: n.id,
|
|
97
|
-
disabled: e.disabled,
|
|
98
|
-
class: "grid grid-cols-3 gap-8 px-8 items-center",
|
|
99
|
-
style: { "grid-template-columns": "auto 164px 48px" },
|
|
100
|
-
modelValue: +u(S)(n.amount ?? { amount: 1, precision: 0 }),
|
|
101
|
-
rules: [u(ne)(0), u(N)(0)]
|
|
102
|
-
}, {
|
|
103
|
-
default: h(() => {
|
|
104
|
-
var v;
|
|
105
|
-
return [
|
|
106
|
-
m("div", ae, [
|
|
107
|
-
z($((v = D.value.find((f) => f._id === n.id)) == null ? void 0 : v.name) + " ", 1),
|
|
108
|
-
I.value.recipes.includes(n.id) ? (s(), C(l, {
|
|
109
|
-
key: 0,
|
|
110
|
-
variant: "plain",
|
|
111
|
-
placement: "bottom",
|
|
112
|
-
content: "It is invalid, please verify or remove it.",
|
|
113
|
-
"hide-arrow": !0,
|
|
114
|
-
"z-index": 50
|
|
115
|
-
}, {
|
|
116
|
-
default: h(() => [
|
|
117
|
-
a(t, {
|
|
118
|
-
name: "error",
|
|
119
|
-
size: "sm",
|
|
120
|
-
color: "#ff3b30"
|
|
121
|
-
})
|
|
122
|
-
]),
|
|
123
|
-
_: 1
|
|
124
|
-
})) : U("", !0)
|
|
125
|
-
]),
|
|
126
|
-
a(o, {
|
|
127
|
-
class: "xs:col-span-2",
|
|
128
|
-
disabled: e.disabled,
|
|
129
|
-
modelValue: +u(S)(n.amount ?? { amount: 1, precision: 0 }),
|
|
130
|
-
"onUpdate:modelValue": (f) => R(n.id, f, e.modelValue)
|
|
131
|
-
}, null, 8, ["disabled", "modelValue", "onUpdate:modelValue"]),
|
|
132
|
-
a(p, {
|
|
133
|
-
disabled: e.disabled,
|
|
134
|
-
type: "button",
|
|
135
|
-
variant: "plain",
|
|
136
|
-
icon: "delete",
|
|
137
|
-
"icon-color": "#000000",
|
|
138
|
-
onClick: (f) => M(n.id, e.modelValue)
|
|
139
|
-
}, null, 8, ["disabled", "onClick"])
|
|
140
|
-
];
|
|
141
|
-
}),
|
|
142
|
-
_: 2
|
|
143
|
-
}, 1032, ["disabled", "modelValue", "rules"]))), 128))
|
|
144
|
-
])) : U("", !0),
|
|
145
|
-
m("div", null, [
|
|
146
|
-
a(p, {
|
|
147
|
-
disabled: e.disabled,
|
|
148
|
-
label: y.value.length === 1 ? "1 recipe linked" : y.value.length ? `${y.value.length} recipes linked` : "Link recipes",
|
|
149
|
-
variant: "plain",
|
|
150
|
-
icon: "link",
|
|
151
|
-
onClick: O
|
|
152
|
-
}, null, 8, ["disabled", "label"])
|
|
153
|
-
]),
|
|
154
|
-
se,
|
|
155
|
-
k.value.length ? (s(), V("div", ue, [
|
|
156
|
-
m("div", re, [
|
|
157
|
-
(s(!0), V(T, null, L(k.value, (n) => (s(), C(i, {
|
|
158
|
-
key: n.id,
|
|
159
|
-
disabled: e.disabled,
|
|
160
|
-
modelValue: +u(S)(n.amount ?? { amount: 1, precision: 0 }),
|
|
161
|
-
rules: [
|
|
162
|
-
u(le)(
|
|
163
|
-
F.value.find((v) => v._id === n.id).unit,
|
|
164
|
-
n.measurement
|
|
165
|
-
),
|
|
166
|
-
u(N)(0)
|
|
167
|
-
]
|
|
168
|
-
}, {
|
|
169
|
-
default: h(({ invalid: v }) => {
|
|
170
|
-
var f, E, P;
|
|
171
|
-
return [
|
|
172
|
-
m("div", me, [
|
|
173
|
-
m("div", ce, [
|
|
174
|
-
z($((f = F.value.find((b) => b._id === n.id)) == null ? void 0 : f.name) + " ", 1),
|
|
175
|
-
I.value.skus.includes(n.id) ? (s(), C(l, {
|
|
176
|
-
key: 0,
|
|
177
|
-
variant: "plain",
|
|
178
|
-
placement: "bottom",
|
|
179
|
-
content: "It is invalid, please verify or remove it.",
|
|
180
|
-
"hide-arrow": !0,
|
|
181
|
-
"z-index": 50
|
|
182
|
-
}, {
|
|
183
|
-
default: h(() => [
|
|
184
|
-
a(t, {
|
|
185
|
-
name: "error",
|
|
186
|
-
size: "sm",
|
|
187
|
-
color: "#ff3b30"
|
|
188
|
-
})
|
|
189
|
-
]),
|
|
190
|
-
_: 1
|
|
191
|
-
})) : U("", !0)
|
|
192
|
-
]),
|
|
193
|
-
a(o, {
|
|
194
|
-
class: "xs:col-span-2",
|
|
195
|
-
disabled: e.disabled,
|
|
196
|
-
modelValue: +u(S)(n.amount ?? { amount: 1, precision: 0 }),
|
|
197
|
-
"onUpdate:modelValue": (b) => R(n.id, b, e.modelValue),
|
|
198
|
-
invalid: v
|
|
199
|
-
}, null, 8, ["disabled", "modelValue", "onUpdate:modelValue", "invalid"]),
|
|
200
|
-
a(B, {
|
|
201
|
-
disabled: e.disabled,
|
|
202
|
-
class: "translate-y-[2px]",
|
|
203
|
-
items: w(n.id),
|
|
204
|
-
"model-value": (P = H(n.id, (E = n.measurement) == null ? void 0 : E.id)) == null ? void 0 : P.value,
|
|
205
|
-
"onUpdate:modelValue": (b) => J(n.id, b, e.modelValue),
|
|
206
|
-
invalid: v
|
|
207
|
-
}, {
|
|
208
|
-
"helper-text": h(() => []),
|
|
209
|
-
_: 2
|
|
210
|
-
}, 1032, ["disabled", "items", "model-value", "onUpdate:modelValue", "invalid"]),
|
|
211
|
-
a(p, {
|
|
212
|
-
disabled: e.disabled,
|
|
213
|
-
type: "button",
|
|
214
|
-
variant: "tertiary",
|
|
215
|
-
icon: "delete",
|
|
216
|
-
onClick: (b) => M(n.id, e.modelValue)
|
|
217
|
-
}, null, 8, ["disabled", "onClick"])
|
|
218
|
-
])
|
|
219
|
-
];
|
|
220
|
-
}),
|
|
221
|
-
_: 2
|
|
222
|
-
}, 1032, ["disabled", "modelValue", "rules"]))), 128))
|
|
223
|
-
])
|
|
224
|
-
])) : U("", !0),
|
|
225
|
-
m("div", null, [
|
|
226
|
-
a(p, {
|
|
227
|
-
disabled: e.disabled,
|
|
228
|
-
label: k.value.length === 1 ? "1 ingredient linked" : k.value.length ? `${k.value.length} ingredients linked` : "Link ingredients",
|
|
229
|
-
variant: "plain",
|
|
230
|
-
icon: "link",
|
|
231
|
-
onClick: q
|
|
232
|
-
}, null, 8, ["disabled", "label"])
|
|
233
|
-
])
|
|
234
|
-
]);
|
|
235
|
-
};
|
|
236
|
-
}
|
|
237
|
-
});
|
|
238
|
-
export {
|
|
239
|
-
ke as _
|
|
240
|
-
};
|