@feedmepos/mf-inventory-portal 0.0.19-dev.2 → 0.0.19-dev.3

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.
Files changed (53) hide show
  1. package/dist/{ApprovalView-DU7oB2Zk.js → ApprovalView-CS7NtcBA.js} +16 -17
  2. package/dist/{BindingsDialog-BgfV0G46.js → BindingsDialog-BA2w-qkY.js} +5 -6
  3. package/dist/{BindingsPicker-tUI5WYBk.js → BindingsPicker-wf7b30Bk.js} +6 -7
  4. package/dist/{BindingsTable-8G-Nc4pC.js → BindingsTable-mqqSPDbO.js} +14 -17
  5. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DaHXKF1s.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CViUEhuw.js} +16 -17
  6. package/dist/IngredientsView-BVX31o67.js +1750 -0
  7. package/dist/IntegrationView-DFdl_238.js +1172 -0
  8. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BKlWhMnB.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BENFVQkL.js} +1 -1
  9. package/dist/{PurchaseOrderPrintPreview-YFcOtdfJ.js → PurchaseOrderPrintPreview-06PokYt4.js} +13 -13
  10. package/dist/{ReceiveRequestView-bIXyVVX9.js → ReceiveRequestView-ck-05Ly7.js} +165 -172
  11. package/dist/RecipeView-CiOb2lvU.js +572 -0
  12. package/dist/StockView-5LkTxYI2.js +1876 -0
  13. package/dist/{SupplierView-BiSqTXnz.js → SupplierView-BAfC5Wcw.js} +34 -37
  14. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-CvbKNb0C.js → TransferDetails.vue_vue_type_script_setup_true_lang-qZDMkkIZ.js} +34 -36
  15. package/dist/UnitView-wsbXOcbf.js +638 -0
  16. package/dist/{WarehouseView-B8UxxAL6.js → WarehouseView-DHhDNAk8.js} +49 -50
  17. package/dist/app-DNCC20Aq.js +66729 -0
  18. package/dist/app.d.ts +29 -0
  19. package/dist/app.js +4 -3
  20. package/dist/{decimal-BtIn4K57.js → decimal-DaXHxukU.js} +1 -1
  21. package/dist/{stock-estimate-C4PL0Fcz.js → id-to-date-XiomI6dP.js} +12 -13
  22. package/dist/{layout-ITqYtCVu.js → layout-DvgFrTEG.js} +14 -14
  23. package/dist/router/name.d.ts +1 -2
  24. package/dist/{supplier-CA0OR3DU.js → supplier-BepZrUgL.js} +3 -3
  25. package/dist/tsconfig.app.tsbuildinfo +1 -1
  26. package/dist/views/ingredients/composables/use-ingredient-form.d.ts +14 -2
  27. package/dist/views/ingredients/composables/use-ingredient-table.d.ts +1 -2
  28. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +12 -12
  29. package/dist/views/recipe/composables/use-recipe-form.d.ts +14 -2
  30. package/dist/views/recipe/composables/use-recipe-table.d.ts +1 -2
  31. package/dist/views/stock/composables/use-stock-action.d.ts +26 -0
  32. package/dist/views/stock/composables/use-stock-table.d.ts +1 -8
  33. package/dist/views/unit/composables/use-unit-form.d.ts +14 -2
  34. package/dist/views/unit/composables/use-unit-table.d.ts +1 -2
  35. package/dist/{xlsx-DAVatAlv.js → xlsx-DaxqUL1h.js} +660 -660
  36. package/dist/{xlsx.util-BsZI2tNE.js → xlsx.util-Dwiw0sTo.js} +2 -2
  37. package/package.json +1 -1
  38. package/dist/FmMultiselectDialog.vue_vue_type_script_setup_true_lang-CxOk5ule.js +0 -143
  39. package/dist/FmUnitInput.vue_vue_type_script_setup_true_lang-D-vJDMKb.js +0 -236
  40. package/dist/IngredientsView-CAh7D4tL.js +0 -1760
  41. package/dist/IntegrationView-Bf7yHuS8.js +0 -1166
  42. package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-BdVrpR9J.js +0 -277
  43. package/dist/RecipeView-BD0mvxCg.js +0 -575
  44. package/dist/StockView-BCq37bGl.js +0 -1865
  45. package/dist/UnitView-DSdn__9m.js +0 -643
  46. package/dist/app-RVyC2D4O.js +0 -43892
  47. package/dist/date2-C2PfOqbB.js +0 -95
  48. package/dist/dayjs.min-0pzT_dbr.js +0 -282
  49. package/dist/fuzzy-yzIM5KUK.js +0 -41
  50. package/dist/index-l87_vggM.js +0 -21515
  51. package/dist/number-B5d98l0m.js +0 -97
  52. package/dist/rules-CCwuHe8Y.js +0 -85
  53. package/dist/use-inventory-binding-dialog-CTriImiV.js +0 -93
@@ -1,277 +0,0 @@
1
- import { defineComponent as H, computed as _, reactive as J, resolveComponent as x, openBlock as f, createElementBlock as g, createVNode as u, unref as t, createElementVNode as n, toDisplayString as v, Fragment as R, renderList as S, createBlock as I, withCtx as F, createTextVNode as Q, createCommentVNode as E, nextTick as X } from "vue";
2
- import { u as Z, i as ee } from "./app-RVyC2D4O.js";
3
- import { a as V, c as ne } from "./number-B5d98l0m.js";
4
- import { u as oe } from "./use-inventory-binding-dialog-CTriImiV.js";
5
- import { A as te, b as ie, a as M } from "./rules-CCwuHe8Y.js";
6
- import { g as le } from "./index-l87_vggM.js";
7
- import { _ as se, a as de, b as ae } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-D-vJDMKb.js";
8
- import { useI18n as re } from "@feedmepos/mf-common";
9
- const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-16" }, ce = { class: "flex items-center" }, pe = { class: "flex-1 fm-typo-en-title-sm-600" }, fe = { class: "flex flex-col" }, ve = { class: "flex py-8 px-12 border-b border-fm-color-neutral-gray-200 bg-fm-color-neutral-gray-100 h-[44px] items-center" }, ye = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, _e = /* @__PURE__ */ n("div", { class: "w-[200px]" }, null, -1), xe = /* @__PURE__ */ n("div", { class: "w-[52px]" }, null, -1), he = {
10
- class: "flex items-center w-full border-b border-fm-color-neutral-gray-100",
11
- style: { "min-height": "48px" }
12
- }, be = { class: "flex-1 fm-typo-en-body-md-400 py-8 px-12" }, ge = { class: "w-[200px]" }, Ve = { class: "w-[52px]" }, ke = { class: "flex flex-col gap-16" }, Be = { class: "flex items-center" }, Ie = { class: "flex-1 fm-typo-en-title-sm-600" }, Fe = { class: "flex flex-col" }, we = { class: "flex py-8 px-12 border-b border-fm-color-neutral-gray-200 bg-fm-color-neutral-gray-100 h-[44px] items-center" }, Ae = { class: "flex-1 fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, Ue = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary w-[150px] px-16" }, Ce = /* @__PURE__ */ n("div", { class: "w-[52px]" }, null, -1), Re = {
13
- class: "flex items-center w-full",
14
- style: { "min-height": "48px" }
15
- }, Se = { class: "flex-1 fm-typo-en-body-md-400 py-8 px-12" }, Ee = { class: "line-clamp-1" }, Me = { class: "w-[150px]" }, Ne = { class: "w-[52px]" }, Te = { class: "flex flex-col px-12 pb-4" }, Pe = /* @__PURE__ */ n("div", null, null, -1), Oe = /* @__PURE__ */ H({
16
- __name: "InventoryBindingForm",
17
- props: {
18
- id: {},
19
- modelValue: { default: () => [] },
20
- excludeBindingId: {},
21
- iframeMode: { type: Boolean },
22
- disabled: { type: Boolean }
23
- },
24
- emits: ["update:modelValue", "click:pick-inventory-bindings"],
25
- setup(N, { emit: T }) {
26
- const { t: m } = re(), h = Z(), P = _(() => h.inventory.recipe ?? []), k = _(() => h.inventory.sku ?? []), c = N, p = T, b = _(
27
- () => le({
28
- id: c.id ?? "",
29
- skus: h.skus,
30
- recipes: h.recipes
31
- })
32
- ), z = _(() => c.modelValue.filter((e) => e.type === "RECIPE")), { promptIngredientsBinding: K, promptRecipesBinding: $ } = oe();
33
- async function D() {
34
- if (c.iframeMode) {
35
- p("click:pick-inventory-bindings", "RECIPE");
36
- return;
37
- }
38
- $(
39
- c.modelValue,
40
- (e) => p("update:modelValue", e),
41
- b.value.recipes
42
- );
43
- }
44
- const w = _(() => c.modelValue.filter((e) => e.type === "SKU") ?? []);
45
- async function G() {
46
- if (c.iframeMode) {
47
- p("click:pick-inventory-bindings", "SKU");
48
- return;
49
- }
50
- K(
51
- c.modelValue,
52
- (e) => p("update:modelValue", e),
53
- c.excludeBindingId,
54
- b.value.skus
55
- );
56
- }
57
- function L(e, d, i) {
58
- const l = +d;
59
- let s = i;
60
- d.length > 0 && isFinite(l) ? s = i.map((a) => (a.id !== e || (a.amount = ne(l)), a)) : s = i.map((a) => (a.id !== e || (a.amount = { amount: 0, precision: 0 }), a)), p("update:modelValue", s);
61
- }
62
- function A(e, d) {
63
- const i = d.filter((l) => l.id !== e);
64
- p("update:modelValue", i);
65
- }
66
- function U(e) {
67
- var i, l;
68
- if (e.type !== ee.enum.SKU)
69
- throw new Error("Non-SKU binding does not have unit");
70
- if (!((i = k.value.find((s) => s._id === e.id)) == null ? void 0 : i.unit))
71
- throw new Error(`Cannot find ingredient: ${e.id}`);
72
- return (l = k.value.find((s) => s._id === e.id)) == null ? void 0 : l.unit;
73
- }
74
- function j(e) {
75
- return { amount: e.amount, measurement: e.measurement };
76
- }
77
- function Y(e, d, i) {
78
- const l = i.map((s) => s.id !== e ? s : {
79
- ...s,
80
- amount: d.amount,
81
- measurement: d.measurement
82
- });
83
- p("update:modelValue", l);
84
- }
85
- const C = J({});
86
- function O(e) {
87
- return C[e.id] ?? {
88
- modelValue: {
89
- amount: e.amount,
90
- measurement: e.measurement
91
- },
92
- amountAsString: V(e.amount)
93
- };
94
- }
95
- function W(e, d) {
96
- X(() => {
97
- C[e.id] = {
98
- modelValue: {
99
- amount: e.amount,
100
- measurement: e.measurement
101
- },
102
- amountAsString: d
103
- };
104
- });
105
- }
106
- return (e, d) => {
107
- const i = x("FmFormGroup"), l = x("FmButton"), s = x("FmIcon"), a = x("FmTooltip"), q = x("FmTextField");
108
- return f(), g("div", ue, [
109
- u(i, {
110
- disabled: e.disabled,
111
- "model-value": e.modelValue,
112
- rules: e.iframeMode ? void 0 : [t(te)(1, "Must have at least one inventory binding")]
113
- }, null, 8, ["disabled", "model-value", "rules"]),
114
- n("div", me, [
115
- n("div", ce, [
116
- n("div", pe, v(t(m)("inventory.inventoryBindings.recipe")), 1),
117
- u(l, {
118
- variant: "secondary",
119
- "text-color": "primary",
120
- "border-color": "primary",
121
- label: t(m)("inventory.inventoryBindings.linkRecipe"),
122
- "prepend-icon": "link",
123
- onClick: D
124
- }, null, 8, ["label"])
125
- ]),
126
- n("div", fe, [
127
- n("div", ve, [
128
- n("div", ye, v(t(m)("inventory.inventoryBindings.recipe")), 1),
129
- _e,
130
- xe
131
- ]),
132
- (f(!0), g(R, null, S(z.value, (o) => (f(), I(i, {
133
- key: o.id,
134
- disabled: e.disabled,
135
- modelValue: +t(V)(o.amount ?? { amount: 1, precision: 0 }),
136
- rules: [t(ie)(0), t(M)(0)]
137
- }, {
138
- default: F(({ invalid: B }) => {
139
- var y;
140
- return [
141
- n("div", he, [
142
- n("div", be, [
143
- Q(v((y = P.value.find((r) => r._id === o.id)) == null ? void 0 : y.name) + " ", 1),
144
- b.value.recipes.includes(o.id) ? (f(), I(a, {
145
- key: 0,
146
- variant: "plain",
147
- placement: "bottom",
148
- content: "It is invalid, please verify or remove it.",
149
- "hide-arrow": !0,
150
- "z-index": 50
151
- }, {
152
- default: F(() => [
153
- u(s, {
154
- name: "error",
155
- size: "sm",
156
- color: "#ff3b30"
157
- })
158
- ]),
159
- _: 1
160
- })) : E("", !0)
161
- ]),
162
- n("div", ge, [
163
- u(q, {
164
- class: "w-full",
165
- disabled: e.disabled,
166
- modelValue: +t(V)(o.amount ?? { amount: 1, precision: 0 }),
167
- "onUpdate:modelValue": (r) => L(o.id, r, e.modelValue),
168
- invalid: B
169
- }, null, 8, ["disabled", "modelValue", "onUpdate:modelValue", "invalid"])
170
- ]),
171
- n("div", Ve, [
172
- u(l, {
173
- disabled: e.disabled,
174
- type: "button",
175
- variant: "plain",
176
- icon: "delete",
177
- "icon-color": "#000000",
178
- onClick: (r) => A(o.id, e.modelValue)
179
- }, null, 8, ["disabled", "onClick"])
180
- ])
181
- ])
182
- ];
183
- }),
184
- _: 2
185
- }, 1032, ["disabled", "modelValue", "rules"]))), 128))
186
- ])
187
- ]),
188
- n("div", ke, [
189
- n("div", Be, [
190
- n("div", Ie, v(t(m)("inventory.inventoryBindings.ingredient")), 1),
191
- u(l, {
192
- variant: "secondary",
193
- "text-color": "primary",
194
- "border-color": "primary",
195
- label: t(m)("inventory.inventoryBindings.linkIngredient"),
196
- "prepend-icon": "link",
197
- onClick: G
198
- }, null, 8, ["label"])
199
- ]),
200
- n("div", Fe, [
201
- n("div", we, [
202
- n("div", Ae, v(t(m)("inventory.inventoryBindings.ingredient")), 1),
203
- n("div", Ue, v(t(m)("inventory.inventoryBindings.amount")), 1),
204
- Ce
205
- ]),
206
- (f(!0), g(R, null, S(w.value, (o, B) => {
207
- var y;
208
- return f(), g("div", {
209
- key: o.id,
210
- class: "flex flex-col border-b border-fm-color-neutral-gray-100"
211
- }, [
212
- n("div", Re, [
213
- n("div", Se, [
214
- n("span", Ee, v((y = k.value.find((r) => r._id === o.id)) == null ? void 0 : y.name), 1),
215
- b.value.skus.includes(o.id) ? (f(), I(a, {
216
- key: 0,
217
- variant: "plain",
218
- placement: "bottom",
219
- content: t(m)("inventory.inventoryBindings.invalidWarning"),
220
- "hide-arrow": !0,
221
- "z-index": 50
222
- }, {
223
- default: F(() => [
224
- u(s, {
225
- name: "error",
226
- size: "sm",
227
- color: "#ff3b30"
228
- })
229
- ]),
230
- _: 1
231
- }, 8, ["content"])) : E("", !0)
232
- ]),
233
- n("div", Me, [
234
- u(se, {
235
- "model-value": j(o),
236
- "onUpdate:modelValue": (r) => Y(o.id, r, e.modelValue),
237
- "onUpdate:amount": (r) => W(o, r),
238
- unit: U(o),
239
- placement: B === w.value.length - 1 ? "top" : "bottom",
240
- "convert-amount-on-change-unit": ""
241
- }, null, 8, ["model-value", "onUpdate:modelValue", "onUpdate:amount", "unit", "placement"])
242
- ]),
243
- n("div", Ne, [
244
- u(l, {
245
- disabled: e.disabled,
246
- type: "button",
247
- variant: "tertiary",
248
- icon: "delete",
249
- onClick: (r) => A(o.id, e.modelValue)
250
- }, null, 8, ["disabled", "onClick"])
251
- ])
252
- ]),
253
- n("div", Te, [
254
- u(i, {
255
- modelValue: +t(V)(o.amount ?? { amount: 1, precision: 0 }),
256
- rules: [t(M)(0)]
257
- }, null, 8, ["modelValue", "rules"]),
258
- u(i, {
259
- modelValue: O(o),
260
- rules: [
261
- t(de)(),
262
- t(ae)(U(o))
263
- ]
264
- }, null, 8, ["modelValue", "rules"])
265
- ])
266
- ]);
267
- }), 128))
268
- ]),
269
- Pe
270
- ])
271
- ]);
272
- };
273
- }
274
- });
275
- export {
276
- Oe as _
277
- };