@feedmepos/mf-inventory-portal 1.2.6 → 1.2.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.
Files changed (67) hide show
  1. package/dist/{App-B2pFxU6Q.js → App-Dg4euzi-.js} +1 -1
  2. package/dist/{ApprovalView-MLCuBCV2.js → ApprovalView-CPEajz8D.js} +50 -49
  3. package/dist/{BindingsDialog-CL68c1d8.js → BindingsDialog-D69Lz-W9.js} +2 -2
  4. package/dist/{BindingsPicker-C1PiRtoM.js → BindingsPicker-CvM0o8k2.js} +1 -1
  5. package/dist/{BindingsTable-B4VyAoNq.js → BindingsTable-DX9KrKZx.js} +1 -1
  6. package/dist/{ClosingDraftView-bLQW2std.js → ClosingDraftView-zo2KEPba.js} +2 -2
  7. package/dist/{ClosingTemplateView-CABbUEYU.js → ClosingTemplateView-DfkfCFdy.js} +2 -2
  8. package/dist/{DeliveryOrderPrintPreview-BybM2hq8.js → DeliveryOrderPrintPreview-Cl_G1v2L.js} +8 -8
  9. package/dist/{FmAdminBadge-iN9PJ5nY.js → FmAdminBadge--YYdqDeq.js} +1 -1
  10. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BnxjX2Nv.js +230 -0
  11. package/dist/{FmMultiselectDialog-nsl8cwzo.js → FmMultiselectDialog-CENHExht.js} +1 -1
  12. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-COw0sQLE.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DTfMfCVb.js} +15 -15
  13. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-BYcFWA7r.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-D65OfkW-.js} +1 -1
  14. package/dist/{IngredientGroupView-oIBLqCBm.js → IngredientGroupView-BBw9UqRf.js} +2 -2
  15. package/dist/{IngredientsView-DfGezD1v.js → IngredientsView-WtOZ9Ara.js} +71 -61
  16. package/dist/{IntegrationView-jcuZnZ67.js → IntegrationView-YFafrCnU.js} +84 -84
  17. package/dist/{InventoryBindingForm-CQlTv-66.js → InventoryBindingForm-DNljyNN-.js} +1 -1
  18. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CevEjjIF.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-C2dTKKAj.js} +3 -3
  19. package/dist/{InventoryBindingSummary-DRJn6ORe.js → InventoryBindingSummary-DOONgjR-.js} +1 -1
  20. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CwwxbHy9.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-D3Elw6_K.js} +1 -1
  21. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-O2GL2zkX.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CYiwHmvH.js} +7 -7
  22. package/dist/{PublishView-CY3Gvt3-.js → PublishView-CL5U8cyq.js} +7 -7
  23. package/dist/{PurchaseOrderPrintPreview-Ck5HQc6r.js → PurchaseOrderPrintPreview-PfG5JjNN.js} +8 -8
  24. package/dist/{ReceiveRequestView-Da8bRntN.js → ReceiveRequestView-DB-Df7af.js} +82 -79
  25. package/dist/{RecipeView-B0_ddeT-.js → RecipeView-DYYehKGI.js} +3 -3
  26. package/dist/{StockView-BetJ_LZd.js → StockView-lbA_CgVg.js} +7 -7
  27. package/dist/{SupplierView-DpDWVeHg.js → SupplierView-DKq68lkF.js} +862 -831
  28. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-DKR568Dl.js +2578 -0
  29. package/dist/{TransferTemplateView-L0NONcqq.js → TransferTemplateView-CYdVExkv.js} +57 -57
  30. package/dist/{UnitView-DSTeDI8u.js → UnitView-BLDTNtXw.js} +3 -3
  31. package/dist/WarehouseView-ByfTvgQq.js +1066 -0
  32. package/dist/api/inventory.d.ts +8 -0
  33. package/dist/api/shipment.d.ts +11 -0
  34. package/dist/api/warehouse.d.ts +3 -1
  35. package/dist/{app-B7cGGPpZ.js → app-DEpHnIaM.js} +13795 -13214
  36. package/dist/app.d.ts +24 -9
  37. package/dist/app.js +1 -1
  38. package/dist/{decimal-DYg5n_FX.js → decimal-BdGG2NHb.js} +1 -1
  39. package/dist/{format-unit-display-DHgB2J8m.js → format-unit-display-DoCxmNPB.js} +21 -21
  40. package/dist/{index-C6Wn55RU.js → index-BI2zM3ru.js} +1 -1
  41. package/dist/{index-C9zJBvXv.js → index-CCmaDOGB.js} +1 -1
  42. package/dist/{stock-BcEKPJrt.js → stock-CtzGgdTO.js} +1 -1
  43. package/dist/stores/feature.d.ts +2 -0
  44. package/dist/stores/inventory.d.ts +1 -0
  45. package/dist/stores/location.d.ts +57 -1
  46. package/dist/stores/supplier.d.ts +96 -0
  47. package/dist/stores/warehouse.d.ts +4 -0
  48. package/dist/{supplier-DFoYi5-b.js → supplier-hiLnFx22.js} +1 -1
  49. package/dist/tsconfig.app.tsbuildinfo +1 -1
  50. package/dist/{use-ingredient-select-dialog-C7mHdhdS.js → use-ingredient-select-dialog-BWBy-LTC.js} +1 -1
  51. package/dist/{use-inventory-binding-dialog-CPjMBzhD.js → use-inventory-binding-dialog-6H3lD9xF.js} +1 -1
  52. package/dist/views/receive-request/components/transfer-details/TransferDetailsProps.d.ts +1 -0
  53. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +60 -0
  54. package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +10 -0
  55. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +94 -0
  56. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +72 -1
  57. package/dist/views/supplier/components/SupplierForm.vue.d.ts +8 -0
  58. package/dist/views/supplier/composables/use-supplier-table.d.ts +4 -0
  59. package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialog.vue.d.ts +8 -0
  60. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-locations.d.ts +16 -0
  61. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +48 -0
  62. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +48 -0
  63. package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +8 -0
  64. package/package.json +2 -2
  65. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-1G6EEocg.js +0 -227
  66. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-AIFutKLT.js +0 -2494
  67. package/dist/WarehouseView-DGJhvS_u.js +0 -1034
@@ -1,227 +0,0 @@
1
- import { j as C, t as R, az as w, u as B, aD as D, aP as E, l as H, aQ as U } from "./app-B7cGGPpZ.js";
2
- import { u as z } from "./supplier-DFoYi5-b.js";
3
- import { P as L } from "./format-unit-display-DHgB2J8m.js";
4
- import { computed as f, defineComponent as j, mergeModels as q, useModel as x, ref as W, resolveComponent as V, openBlock as T, createElementBlock as O, normalizeStyle as $, createElementVNode as N, createVNode as Q, withCtx as J, createBlock as g, createCommentVNode as A, Fragment as K, renderList as X, unref as M } from "vue";
5
- function Y(t, i, l) {
6
- var o;
7
- if (!!i.measurement === !!l && ((o = i.measurement) == null ? void 0 : o.id) === l)
8
- return i;
9
- if (!l)
10
- return {
11
- costPerUnit: i.costPerUnit
12
- };
13
- const n = t.measurements.find((p) => p.id === l);
14
- return n ? {
15
- costPerUnit: i.costPerUnit,
16
- measurement: n
17
- } : {
18
- costPerUnit: i.costPerUnit
19
- };
20
- }
21
- function oe(t, i, l, u) {
22
- var P, _, s;
23
- const a = (s = (_ = (P = u == null ? void 0 : u.supplier) == null ? void 0 : P.supplyItems) == null ? void 0 : _.find(
24
- (e) => e.skuId === t._id
25
- )) == null ? void 0 : s.defaultCost;
26
- if (u != null && u.manualTotalCost)
27
- return {
28
- cost: u.manualTotalCost,
29
- skuDefaultCost: t.defaultCost ?? void 0,
30
- supplierOverrideCost: a ?? void 0
31
- };
32
- const n = t.defaultCost ? Y(t.unit, t.defaultCost, t.trackingMeasurement) : void 0, o = a ?? n, p = o == null ? void 0 : o.costPerUnit, v = p ? o != null && o.measurement ? +C(p) / +C(o == null ? void 0 : o.measurement.conversion) : +C(p) : void 0, b = v ? l ? v * +C(l.conversion) : v : void 0, h = b ? +C(i) * b : void 0;
33
- return {
34
- cost: h ? {
35
- ...R(h ?? 0, 2),
36
- currency: w()
37
- } : {
38
- amount: 0,
39
- precision: 0,
40
- currency: w()
41
- },
42
- skuDefaultCost: t.defaultCost ?? void 0,
43
- supplierOverrideCost: a ?? void 0
44
- };
45
- }
46
- function k(t) {
47
- return E.parse(t);
48
- }
49
- function F(t) {
50
- return {
51
- _id: t.doc._id,
52
- internal: t.type,
53
- contactName: t.doc.profile.name,
54
- name: t.doc.profile.name ?? "",
55
- email: t.doc.profile.email,
56
- phoneNumber: t.doc.profile.phoneNo,
57
- registrationNumber: t.doc.profile.regNo,
58
- address: t.doc.profile.address ?? {
59
- line1: "",
60
- state: "",
61
- city: "",
62
- postcode: "",
63
- country: ""
64
- }
65
- };
66
- }
67
- function ne(t, i, l = !1, u = !1) {
68
- const a = z(), n = B();
69
- n.watchLocation(async () => {
70
- var y;
71
- await a.readSuppliers();
72
- const s = t();
73
- if ((y = s.supplier) != null && y._id) return;
74
- const e = u ? a.suppliers[0] : a.businessSuppliers[0], r = (l ? n.locations.filter((d) => d.doc._id !== n.currentLocation.doc._id) : n.locations)[0];
75
- i({
76
- ...s,
77
- supplier: e ? k(e) : r ? F(r) : s.supplier
78
- });
79
- });
80
- const o = f(
81
- () => {
82
- var s, e;
83
- return typeof ((e = (s = t()) == null ? void 0 : s.supplier) == null ? void 0 : e.internal) == "string" ? L.TRANSFER : L.PURCHASE;
84
- }
85
- ), p = f({
86
- get() {
87
- var s, e;
88
- return (e = (s = t()) == null ? void 0 : s.supplier) == null ? void 0 : e._id;
89
- },
90
- set(s) {
91
- const e = t() ?? {};
92
- if (o.value === L.PURCHASE) {
93
- const S = (u ? a.suppliers : a.businessSuppliers).find((I) => I._id === s);
94
- i({
95
- ...e,
96
- supplier: S ? k(S) : e.supplier
97
- });
98
- return;
99
- }
100
- const y = (l ? n.allLocations.filter(
101
- (d) => d.doc._id !== n.currentLocation.doc._id
102
- ) : n.allLocations).find((d) => d.doc._id === s);
103
- i({
104
- ...e,
105
- supplier: y ? F(y) : e.supplier
106
- });
107
- }
108
- }), v = f(() => a.locationSuppliers.map(k)), b = f(() => a.businessSuppliers.map(k)), h = f(() => {
109
- const s = [...v.value], e = [...b.value];
110
- return u ? [...e, ...s] : e;
111
- }), c = f(() => {
112
- var m;
113
- const s = ((m = n._currentLocation) == null ? void 0 : m.type) === D.warehouse;
114
- return (l ? n.allLocations.filter(
115
- (r) => r.doc._id !== n.currentLocation.doc._id
116
- ) : n.allLocations).filter((r) => s || r.acceptRequest).map(F);
117
- }), P = f(() => {
118
- if (o.value === L.PURCHASE) {
119
- const e = v.value.map((r) => ({
120
- label: r.name,
121
- value: r._id
122
- })), m = b.value.map((r) => ({
123
- label: r.name,
124
- sublabel: "Business supplier",
125
- value: r._id
126
- }));
127
- return u ? [...e, ...m] : m;
128
- }
129
- return c.value.map((e) => ({
130
- label: e.name,
131
- sublabel: e.internal ? `${e.internal}` : void 0,
132
- value: e._id
133
- }));
134
- }), _ = f(() => {
135
- var r, y;
136
- const s = (y = (r = t()) == null ? void 0 : r.supplier) == null ? void 0 : y._id;
137
- if (o.value === L.PURCHASE) {
138
- const d = a.suppliers.find((S) => S._id === s);
139
- return d ? k(d) : null;
140
- }
141
- const m = n.allLocations.find((d) => d.doc._id);
142
- return m ? F(m) : null;
143
- });
144
- return {
145
- transferLocationModel: p,
146
- transferLocationOptions: P,
147
- locationOptionsTypePurchase: h,
148
- locationOptionsTypePurchaseLocationLevel: v,
149
- locationOptionsTypeTransfer: c,
150
- selectedLocation: _
151
- };
152
- }
153
- const Z = { class: "overflow-y-auto h-full pb-8" }, le = /* @__PURE__ */ j({
154
- __name: "FmFilterableMenuOptions",
155
- props: /* @__PURE__ */ q({
156
- modelValue: {},
157
- maxHeight: {},
158
- width: {},
159
- handleItemChange: { type: Function },
160
- items: {},
161
- options: {}
162
- }, {
163
- search: {},
164
- searchModifiers: {}
165
- }),
166
- emits: ["update:search"],
167
- setup(t) {
168
- const i = t, l = x(t, "search"), u = f(
169
- () => new H(i.items, ["label", "sublabel"], {
170
- caseSensitive: !1,
171
- sort: !0
172
- })
173
- ), a = f(() => u.value.search(l.value)), n = W();
174
- return console.log({ stickyRef: n }), (o, p) => {
175
- const v = V("FmButton"), b = V("FmTextField"), h = V("FmMenuItem");
176
- return T(), O("div", {
177
- class: "relative",
178
- style: $({ width: o.width })
179
- }, [
180
- N("div", {
181
- class: "sticky top-0 bg-white mb-8",
182
- ref_key: "stickyRef",
183
- ref: n
184
- }, [
185
- Q(b, {
186
- modelValue: l.value,
187
- "onUpdate:modelValue": p[1] || (p[1] = (c) => l.value = c),
188
- placeholder: "Filter options"
189
- }, {
190
- append: J(() => [
191
- l.value ? (T(), g(v, {
192
- key: 0,
193
- variant: "tertiary",
194
- "prepend-icon": "close",
195
- onClick: p[0] || (p[0] = (c) => l.value = "")
196
- })) : A("", !0)
197
- ]),
198
- _: 1
199
- }, 8, ["modelValue"])
200
- ], 512),
201
- N("div", Z, [
202
- (T(!0), O(K, null, X(a.value, (c, P) => (T(), g(h, {
203
- key: P,
204
- label: c.label,
205
- sublabel: c.sublabel,
206
- "model-value": M(U)(o.modelValue, c.value),
207
- onClick: () => o.handleItemChange(M(U)(o.modelValue, c.value), c),
208
- onVnodeMounted: (_) => {
209
- var s, e;
210
- return M(U)(o.modelValue, c.value) && ((s = _.el) == null || s.scrollIntoView({ behavior: "instant", block: "end" }), (e = _.el) == null || e.scrollIntoView({ behavior: "smooth", block: "center" })), void 0;
211
- }
212
- }, null, 8, ["label", "sublabel", "model-value", "onClick", "onVnodeMounted"]))), 128)),
213
- a.value.length ? A("", !0) : (T(), g(h, {
214
- key: 0,
215
- disabled: "",
216
- label: "No options available"
217
- }))
218
- ])
219
- ], 4);
220
- };
221
- }
222
- });
223
- export {
224
- le as _,
225
- oe as c,
226
- ne as u
227
- };