@feedmepos/mf-inventory-portal 1.2.5-dev.1 → 1.2.5

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 (70) hide show
  1. package/dist/{App-plHMDZk7.js → App-BkpSG-20.js} +1 -1
  2. package/dist/{ApprovalView-CChHxp4X.js → ApprovalView-B7GuyNL8.js} +49 -50
  3. package/dist/{BindingsDialog-CU-u0hJx.js → BindingsDialog-DU7WwMQQ.js} +2 -2
  4. package/dist/{BindingsPicker-BpbNVNQQ.js → BindingsPicker-DoikTRt9.js} +1 -1
  5. package/dist/{BindingsTable-v1QcskCd.js → BindingsTable-CR_HLrBt.js} +1 -1
  6. package/dist/ClosingDraftView-B-zuhr0m.js +1739 -0
  7. package/dist/{ClosingTemplateView-ancesrdQ.js → ClosingTemplateView-BXnzvooK.js} +2 -2
  8. package/dist/{DeliveryOrderPrintPreview-DLSzR6HB.js → DeliveryOrderPrintPreview-BGii4E5k.js} +8 -8
  9. package/dist/{FmAdminBadge-Cb9aT29U.js → FmAdminBadge-C7SFFAsw.js} +1 -1
  10. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CLSMS6lS.js +227 -0
  11. package/dist/{FmMultiselectDialog-SoaYz3_K.js → FmMultiselectDialog-DxrZDApl.js} +1 -1
  12. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-D5k7Xk3M.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CG8hJ9BY.js} +15 -15
  13. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-NY7TPnoY.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-CaW3WMvN.js} +1 -1
  14. package/dist/{IngredientGroupView-DmbPHuWG.js → IngredientGroupView-CZXIEHF9.js} +2 -2
  15. package/dist/{IngredientsView-Bxb_BeyP.js → IngredientsView-BsD9bz4s.js} +61 -71
  16. package/dist/{IntegrationView-B8mnGO1_.js → IntegrationView-BwZLCHKQ.js} +84 -84
  17. package/dist/{InventoryBindingForm-B2tlc3uk.js → InventoryBindingForm-D1DjZ8GU.js} +1 -1
  18. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-C-qi9Mri.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-977ZTGqB.js} +3 -3
  19. package/dist/{InventoryBindingSummary-BUkLwuPN.js → InventoryBindingSummary-DzTHC4EA.js} +1 -1
  20. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-4W5T_8W7.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CVjIweiD.js} +1 -1
  21. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-DCtPbVFp.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BOynbtg3.js} +7 -7
  22. package/dist/{PublishView-Dkq9VZOG.js → PublishView-Qpnsfl9u.js} +7 -7
  23. package/dist/{PurchaseOrderPrintPreview-C-jyn09w.js → PurchaseOrderPrintPreview-Cu0Huq0q.js} +8 -8
  24. package/dist/{ReceiveRequestView-V4YNI_Jd.js → ReceiveRequestView-4-0jJ5tI.js} +79 -82
  25. package/dist/{RecipeView-Ck3RZRhC.js → RecipeView-CkzCMbst.js} +3 -3
  26. package/dist/{StockView-nstUyEXe.js → StockView-C2GZw_2q.js} +7 -7
  27. package/dist/{SupplierView-eXyZsmHQ.js → SupplierView-BMBCSjIF.js} +831 -862
  28. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CNfrMUvj.js +2494 -0
  29. package/dist/{TransferTemplateView-DZG_UCWg.js → TransferTemplateView-BpGi9pYo.js} +57 -57
  30. package/dist/{UnitView-COiitpcS.js → UnitView-CyelRDgW.js} +3 -3
  31. package/dist/WarehouseView-CB1LmtPm.js +1034 -0
  32. package/dist/api/inventory.d.ts +0 -8
  33. package/dist/api/warehouse.d.ts +1 -3
  34. package/dist/{app-DayXXH4q.js → app-DLJ3tarV.js} +15279 -15838
  35. package/dist/app.d.ts +9 -24
  36. package/dist/app.js +1 -1
  37. package/dist/{decimal-CFYWiBC2.js → decimal-Y-vsqUV6.js} +1 -1
  38. package/dist/{format-unit-display-DIr9pTFo.js → format-unit-display-52tZYV50.js} +21 -21
  39. package/dist/{index-DLOpJmH-.js → index-PtOchBO2.js} +1 -1
  40. package/dist/{index-tQKFc6GI.js → index-Z9YSq95U.js} +1 -1
  41. package/dist/{stock-DeAkNJnm.js → stock-CN530yZJ.js} +1 -1
  42. package/dist/stores/feature.d.ts +0 -2
  43. package/dist/stores/inventory.d.ts +0 -1
  44. package/dist/stores/location.d.ts +1 -57
  45. package/dist/stores/supplier.d.ts +0 -96
  46. package/dist/stores/warehouse.d.ts +0 -4
  47. package/dist/{supplier-C4DAoZrI.js → supplier-B5VFlEyS.js} +1 -1
  48. package/dist/tsconfig.app.tsbuildinfo +1 -1
  49. package/dist/{use-ingredient-select-dialog-CV7X8z4O.js → use-ingredient-select-dialog-CrLCvhtp.js} +1 -1
  50. package/dist/{use-inventory-binding-dialog-nuT-Ptlx.js → use-inventory-binding-dialog-zoNELf20.js} +1 -1
  51. package/dist/views/closing-draft/composables/use-closing-draft-actions.d.ts +3 -3
  52. package/dist/views/closing-draft/helpers/export-draft.helper.d.ts +2 -2
  53. package/dist/views/receive-request/components/transfer-details/TransferDetailsProps.d.ts +0 -1
  54. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +0 -60
  55. package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +0 -10
  56. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +0 -94
  57. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +1 -72
  58. package/dist/views/supplier/components/SupplierForm.vue.d.ts +0 -8
  59. package/dist/views/supplier/composables/use-supplier-table.d.ts +0 -4
  60. package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialog.vue.d.ts +0 -8
  61. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-locations.d.ts +0 -16
  62. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +0 -48
  63. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +0 -48
  64. package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +0 -8
  65. package/package.json +2 -2
  66. package/dist/ClosingDraftView-D9HwfK7e.js +0 -1687
  67. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Cp0j6Sx0.js +0 -230
  68. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-OCR95cDM.js +0 -2578
  69. package/dist/WarehouseView-DhBpkfGm.js +0 -1066
  70. package/dist/api/shipment.d.ts +0 -11
@@ -1,230 +0,0 @@
1
- import { j as C, t as N, aA as M, u as R, aE as B, aQ as D, l as H, aR as U } from "./app-DayXXH4q.js";
2
- import { u as z } from "./supplier-C4DAoZrI.js";
3
- import { P as T } from "./format-unit-display-DIr9pTFo.js";
4
- import { computed as f, defineComponent as j, mergeModels as q, useModel as x, ref as W, resolveComponent as w, openBlock as L, createElementBlock as O, normalizeStyle as $, createElementVNode as A, createVNode as Q, withCtx as J, createBlock as V, createCommentVNode as E, Fragment as K, renderList as X, unref as g } from "vue";
5
- function Y(e, a, r) {
6
- var o;
7
- if (!!a.measurement === !!r && ((o = a.measurement) == null ? void 0 : o.id) === r)
8
- return a;
9
- if (!r)
10
- return {
11
- costPerUnit: a.costPerUnit
12
- };
13
- const n = e.measurements.find((p) => p.id === r);
14
- return n ? {
15
- costPerUnit: a.costPerUnit,
16
- measurement: n
17
- } : {
18
- costPerUnit: a.costPerUnit
19
- };
20
- }
21
- function oe(e, a, r, u) {
22
- var P, _, s;
23
- const l = (s = (_ = (P = u == null ? void 0 : u.supplier) == null ? void 0 : P.supplyItems) == null ? void 0 : _.find(
24
- (t) => t.skuId === e._id
25
- )) == null ? void 0 : s.defaultCost;
26
- if (u != null && u.manualTotalCost)
27
- return {
28
- cost: u.manualTotalCost,
29
- skuDefaultCost: e.defaultCost ?? void 0,
30
- supplierOverrideCost: l ?? void 0
31
- };
32
- const n = e.defaultCost ? Y(e.unit, e.defaultCost, e.trackingMeasurement) : void 0, o = l ?? 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 ? r ? v * +C(r.conversion) : v : void 0, h = b ? +C(a) * b : void 0;
33
- return {
34
- cost: h ? {
35
- ...N(h ?? 0, 2),
36
- currency: M()
37
- } : {
38
- amount: 0,
39
- precision: 0,
40
- currency: M()
41
- },
42
- skuDefaultCost: e.defaultCost ?? void 0,
43
- supplierOverrideCost: l ?? void 0
44
- };
45
- }
46
- function k(e) {
47
- const a = D.safeParse(e);
48
- if (a.success) return a.data;
49
- throw new Error("Invalid supplier data");
50
- }
51
- function F(e) {
52
- return {
53
- _id: e.doc._id,
54
- internal: e.type,
55
- contactName: e.doc.profile.name,
56
- name: e.doc.profile.name ?? "",
57
- email: e.doc.profile.email,
58
- phoneNumber: e.doc.profile.phoneNo,
59
- registrationNumber: e.doc.profile.regNo,
60
- address: e.doc.profile.address ?? {
61
- line1: "",
62
- state: "",
63
- city: "",
64
- postcode: "",
65
- country: ""
66
- },
67
- preparationTime: e.preparationTime
68
- };
69
- }
70
- function ne(e, a, r = !1, u = !1) {
71
- const l = z(), n = R();
72
- n.watchLocation(async () => {
73
- var y;
74
- await l.readSuppliers();
75
- const s = e();
76
- if ((y = s.supplier) != null && y._id) return;
77
- const t = u ? l.suppliers[0] : l.businessSuppliers[0], i = (r ? n.locations.filter((d) => d.doc._id !== n.currentLocation.doc._id) : n.locations)[0];
78
- a({
79
- ...s,
80
- supplier: t ? k(t) : i ? F(i) : s.supplier
81
- });
82
- });
83
- const o = f(
84
- () => {
85
- var s, t;
86
- return typeof ((t = (s = e()) == null ? void 0 : s.supplier) == null ? void 0 : t.internal) == "string" ? T.TRANSFER : T.PURCHASE;
87
- }
88
- ), p = f({
89
- get() {
90
- var s, t;
91
- return (t = (s = e()) == null ? void 0 : s.supplier) == null ? void 0 : t._id;
92
- },
93
- set(s) {
94
- const t = e() ?? {};
95
- if (o.value === T.PURCHASE) {
96
- const S = (u ? l.suppliers : l.businessSuppliers).find((I) => I._id === s);
97
- a({
98
- ...t,
99
- supplier: S ? k(S) : t.supplier
100
- });
101
- return;
102
- }
103
- const y = (r ? n.allLocations.filter(
104
- (d) => d.doc._id !== n.currentLocation.doc._id
105
- ) : n.allLocations).find((d) => d.doc._id === s);
106
- a({
107
- ...t,
108
- supplier: y ? F(y) : t.supplier
109
- });
110
- }
111
- }), v = f(() => l.locationSuppliers.map(k)), b = f(() => l.businessSuppliers.map(k)), h = f(() => {
112
- const s = [...v.value], t = [...b.value];
113
- return u ? [...t, ...s] : t;
114
- }), c = f(() => {
115
- var m;
116
- const s = ((m = n._currentLocation) == null ? void 0 : m.type) === B.warehouse;
117
- return (r ? n.allLocations.filter(
118
- (i) => i.doc._id !== n.currentLocation.doc._id
119
- ) : n.allLocations).filter((i) => s || i.acceptRequest).map(F);
120
- }), P = f(() => {
121
- if (o.value === T.PURCHASE) {
122
- const t = v.value.map((i) => ({
123
- label: i.name,
124
- value: i._id
125
- })), m = b.value.map((i) => ({
126
- label: i.name,
127
- sublabel: "Business supplier",
128
- value: i._id
129
- }));
130
- return u ? [...t, ...m] : m;
131
- }
132
- return c.value.map((t) => ({
133
- label: t.name,
134
- sublabel: t.internal ? `${t.internal}` : void 0,
135
- value: t._id
136
- }));
137
- }), _ = f(() => {
138
- var i, y;
139
- const s = (y = (i = e()) == null ? void 0 : i.supplier) == null ? void 0 : y._id;
140
- if (o.value === T.PURCHASE) {
141
- const d = l.suppliers.find((S) => S._id === s);
142
- return d ? k(d) : null;
143
- }
144
- const m = n.allLocations.find((d) => d.doc._id);
145
- return m ? F(m) : null;
146
- });
147
- return {
148
- transferLocationModel: p,
149
- transferLocationOptions: P,
150
- locationOptionsTypePurchase: h,
151
- locationOptionsTypePurchaseLocationLevel: v,
152
- locationOptionsTypeTransfer: c,
153
- selectedLocation: _
154
- };
155
- }
156
- const Z = { class: "overflow-y-auto h-full pb-8" }, ae = /* @__PURE__ */ j({
157
- __name: "FmFilterableMenuOptions",
158
- props: /* @__PURE__ */ q({
159
- modelValue: {},
160
- maxHeight: {},
161
- width: {},
162
- handleItemChange: { type: Function },
163
- items: {},
164
- options: {}
165
- }, {
166
- search: {},
167
- searchModifiers: {}
168
- }),
169
- emits: ["update:search"],
170
- setup(e) {
171
- const a = e, r = x(e, "search"), u = f(
172
- () => new H(a.items, ["label", "sublabel"], {
173
- caseSensitive: !1,
174
- sort: !0
175
- })
176
- ), l = f(() => u.value.search(r.value)), n = W();
177
- return console.log({ stickyRef: n }), (o, p) => {
178
- const v = w("FmButton"), b = w("FmTextField"), h = w("FmMenuItem");
179
- return L(), O("div", {
180
- class: "relative",
181
- style: $({ width: o.width })
182
- }, [
183
- A("div", {
184
- class: "sticky top-0 bg-white mb-8",
185
- ref_key: "stickyRef",
186
- ref: n
187
- }, [
188
- Q(b, {
189
- modelValue: r.value,
190
- "onUpdate:modelValue": p[1] || (p[1] = (c) => r.value = c),
191
- placeholder: "Filter options"
192
- }, {
193
- append: J(() => [
194
- r.value ? (L(), V(v, {
195
- key: 0,
196
- variant: "tertiary",
197
- "prepend-icon": "close",
198
- onClick: p[0] || (p[0] = (c) => r.value = "")
199
- })) : E("", !0)
200
- ]),
201
- _: 1
202
- }, 8, ["modelValue"])
203
- ], 512),
204
- A("div", Z, [
205
- (L(!0), O(K, null, X(l.value, (c, P) => (L(), V(h, {
206
- key: P,
207
- label: c.label,
208
- sublabel: c.sublabel,
209
- "model-value": g(U)(o.modelValue, c.value),
210
- onClick: () => o.handleItemChange(g(U)(o.modelValue, c.value), c),
211
- onVnodeMounted: (_) => {
212
- var s, t;
213
- return g(U)(o.modelValue, c.value) && ((s = _.el) == null || s.scrollIntoView({ behavior: "instant", block: "end" }), (t = _.el) == null || t.scrollIntoView({ behavior: "smooth", block: "center" })), void 0;
214
- }
215
- }, null, 8, ["label", "sublabel", "model-value", "onClick", "onVnodeMounted"]))), 128)),
216
- l.value.length ? E("", !0) : (L(), V(h, {
217
- key: 0,
218
- disabled: "",
219
- label: "No options available"
220
- }))
221
- ])
222
- ], 4);
223
- };
224
- }
225
- });
226
- export {
227
- ae as _,
228
- oe as c,
229
- ne as u
230
- };