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