@feedmepos/mf-inventory-portal 1.2.4-dev.1 → 1.2.5-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-CdweYGJb.js → App-plHMDZk7.js} +1 -1
  2. package/dist/{ApprovalView-N5aTAawv.js → ApprovalView-CChHxp4X.js} +50 -49
  3. package/dist/{BindingsDialog-CF43nBIL.js → BindingsDialog-CU-u0hJx.js} +2 -2
  4. package/dist/{BindingsPicker-UXffTvIT.js → BindingsPicker-BpbNVNQQ.js} +1 -1
  5. package/dist/{BindingsTable-bGEdChlq.js → BindingsTable-v1QcskCd.js} +1 -1
  6. package/dist/{ClosingDraftView-CU6ncRGd.js → ClosingDraftView-D9HwfK7e.js} +2 -2
  7. package/dist/{ClosingTemplateView-B7hlv-ol.js → ClosingTemplateView-ancesrdQ.js} +2 -2
  8. package/dist/{DeliveryOrderPrintPreview-BHsASpvc.js → DeliveryOrderPrintPreview-DLSzR6HB.js} +8 -8
  9. package/dist/{FmAdminBadge-phxApe08.js → FmAdminBadge-Cb9aT29U.js} +1 -1
  10. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Cp0j6Sx0.js +230 -0
  11. package/dist/{FmMultiselectDialog-Cw7978N9.js → FmMultiselectDialog-SoaYz3_K.js} +1 -1
  12. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-m_DVEWZp.js → FmUnitInput.vue_vue_type_script_setup_true_lang-D5k7Xk3M.js} +15 -15
  13. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-CK2uHzWs.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-NY7TPnoY.js} +1 -1
  14. package/dist/{IngredientGroupView-BLlM22XE.js → IngredientGroupView-DmbPHuWG.js} +2 -2
  15. package/dist/{IngredientsView-D-MLnQUs.js → IngredientsView-Bxb_BeyP.js} +71 -61
  16. package/dist/{IntegrationView-DS8GfDcu.js → IntegrationView-B8mnGO1_.js} +84 -84
  17. package/dist/{InventoryBindingForm-Cxl3010v.js → InventoryBindingForm-B2tlc3uk.js} +1 -1
  18. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DVytESGu.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-C-qi9Mri.js} +3 -3
  19. package/dist/{InventoryBindingSummary-BPLbgkdU.js → InventoryBindingSummary-BUkLwuPN.js} +1 -1
  20. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-D6G0tvu8.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-4W5T_8W7.js} +1 -1
  21. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-DIgC7Vso.js → PremiumBadge.vue_vue_type_script_setup_true_lang-DCtPbVFp.js} +7 -7
  22. package/dist/{PublishView-C7M3-gQh.js → PublishView-Dkq9VZOG.js} +7 -7
  23. package/dist/{PurchaseOrderPrintPreview-ZhFYuurj.js → PurchaseOrderPrintPreview-C-jyn09w.js} +8 -8
  24. package/dist/{ReceiveRequestView-BCdKPhsr.js → ReceiveRequestView-V4YNI_Jd.js} +82 -79
  25. package/dist/{RecipeView-DUmXQOxV.js → RecipeView-Ck3RZRhC.js} +3 -3
  26. package/dist/{StockView-BcxAyI7w.js → StockView-nstUyEXe.js} +7 -7
  27. package/dist/{SupplierView-q04_80bh.js → SupplierView-eXyZsmHQ.js} +862 -831
  28. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-OCR95cDM.js +2578 -0
  29. package/dist/{TransferTemplateView-Cfcu-qeJ.js → TransferTemplateView-DZG_UCWg.js} +57 -57
  30. package/dist/{UnitView-BAPZkTQp.js → UnitView-COiitpcS.js} +3 -3
  31. package/dist/WarehouseView-DhBpkfGm.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-Bcq0U90V.js → app-DayXXH4q.js} +14439 -13858
  36. package/dist/app.d.ts +24 -9
  37. package/dist/app.js +1 -1
  38. package/dist/{decimal-Dhnp84Mk.js → decimal-CFYWiBC2.js} +1 -1
  39. package/dist/{format-unit-display-X0is3zJN.js → format-unit-display-DIr9pTFo.js} +21 -21
  40. package/dist/{index-Bb9d1Qcc.js → index-DLOpJmH-.js} +1 -1
  41. package/dist/{index-CnqZ1tak.js → index-tQKFc6GI.js} +1 -1
  42. package/dist/{stock-DcD5Tbqe.js → stock-DeAkNJnm.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-njZB-A08.js → supplier-C4DAoZrI.js} +1 -1
  49. package/dist/tsconfig.app.tsbuildinfo +1 -1
  50. package/dist/{use-ingredient-select-dialog-CFxbHyQu.js → use-ingredient-select-dialog-CV7X8z4O.js} +1 -1
  51. package/dist/{use-inventory-binding-dialog-CtvdrDNH.js → use-inventory-binding-dialog-nuT-Ptlx.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-CQi8T-o4.js +0 -227
  66. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CBFgpKee.js +0 -2494
  67. package/dist/WarehouseView-9AkOoqZV.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-Bcq0U90V.js";
2
- import { u as z } from "./supplier-njZB-A08.js";
3
- import { P as L } from "./format-unit-display-X0is3zJN.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
- };