@feedmepos/mf-inventory-portal 0.0.24-dev.3 → 0.0.24-dev.49

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 (90) hide show
  1. package/dist/{App-C8gm6x7Q.js → App-BANIE_vi.js} +1 -1
  2. package/dist/ApprovalView-JQXB-wD3.js +140 -0
  3. package/dist/{BindingsDialog-II1cNZ8y.js → BindingsDialog-DPkylv4n.js} +8 -8
  4. package/dist/{BindingsPicker-7hWtLm42.js → BindingsPicker-DRq1pyB3.js} +1 -1
  5. package/dist/BindingsTable-CgcUJaar.js +120 -0
  6. package/dist/ClosingDraftView-MxkQABme.js +1348 -0
  7. package/dist/{ClosingTemplateView-cmdRLrA3.js → ClosingTemplateView-DK-REWKF.js} +478 -493
  8. package/dist/{FmCustomAttribute.vue_vue_type_script_setup_true_lang-Dk618cmq.js → FmCustomAttribute.vue_vue_type_script_setup_true_lang-CJYQN_nb.js} +1 -1
  9. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CH1wbfBF.js +211 -0
  10. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BcQSDPWo.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BCQAMGnj.js} +1 -1
  11. package/dist/{IngredientGroupView-YGl-cE0p.js → IngredientGroupView-BbdFsju3.js} +1 -1
  12. package/dist/IngredientsView-CymDx24X.js +1742 -0
  13. package/dist/{IntegrationView-Bq-m4-Wh.js → IntegrationView-CpqWQjyz.js} +679 -642
  14. package/dist/{InventoryBindingForm-DFWSf75X.js → InventoryBindingForm-D3LbsYBi.js} +1 -1
  15. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-RQ6XxdxU.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-k8k3iqCg.js} +96 -96
  16. package/dist/{InventoryBindingSummary-DU6GO2TJ.js → InventoryBindingSummary-DQ64AcL6.js} +1 -1
  17. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-ChpZ0NwL.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Co-zYf0x.js} +1 -1
  18. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-Ba2Uq1H-.js → PremiumBadge.vue_vue_type_script_setup_true_lang-Bzy_5Iha.js} +1 -1
  19. package/dist/PublishView-DQrsouy_.js +222 -0
  20. package/dist/{PurchaseOrderPrintPreview-cp_DzuxM.js → PurchaseOrderPrintPreview-BQA3Sbns.js} +5 -5
  21. package/dist/ReceiveRequestView-E4FtIHQm.js +2584 -0
  22. package/dist/{RecipeView-voWc35VV.js → RecipeView-B5fp0clS.js} +3 -3
  23. package/dist/{StockView-CoigRqM-.js → StockView-WN-Uf6Nc.js} +7 -7
  24. package/dist/{SupplierView-BDpCPZE7.js → SupplierView-CaOqPzEY.js} +295 -300
  25. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-db47qL0f.js +1539 -0
  26. package/dist/TransferTemplateView-Dg7e2TeB.js +1422 -0
  27. package/dist/{UnitView-BBPJ0vhB.js → UnitView-Brnwh4tw.js} +3 -3
  28. package/dist/{WarehouseView-Ck6hBrGf.js → WarehouseView-DlUXVVHp.js} +1 -1
  29. package/dist/api/closing-draft.d.ts +1 -0
  30. package/dist/api/inventory.d.ts +2 -0
  31. package/dist/api/netsuite.d.ts +21 -4
  32. package/dist/api/purchase-order.d.ts +6 -1
  33. package/dist/api/stock.d.ts +1 -0
  34. package/dist/{app-ojZQI-KQ.js → app-CrAS505q.js} +25174 -24344
  35. package/dist/app.d.ts +0 -6
  36. package/dist/app.js +1 -1
  37. package/dist/components/FmCustomAttribute2.vue.d.ts +18 -0
  38. package/dist/components/FmLockableField.vue.d.ts +3 -0
  39. package/dist/components/FmMultiselectDialog.d.ts +23 -0
  40. package/dist/components/FmMultiselectDialog.vue.d.ts +20 -3
  41. package/dist/components/FmMultiselectDialogProps.d.ts +2 -0
  42. package/dist/{decimal-xq82Pirk.js → decimal-B3VbEmUT.js} +1 -1
  43. package/dist/{format-unit-display-ByfsyWBU.js → format-unit-display-Becux8VN.js} +256 -253
  44. package/dist/helper/fuzzy.d.ts +10 -0
  45. package/dist/{index-Bi6FnWGy.js → index-B8LjoNQa.js} +3 -3
  46. package/dist/{index-CKEbjSig.js → index-BojrVfgC.js} +1 -1
  47. package/dist/layout/SingleColumnLayout.vue.d.ts +1 -1
  48. package/dist/{stock-CC4RqQaB.js → stock-D3jX6RXK.js} +29 -25
  49. package/dist/stores/feature.d.ts +4 -2
  50. package/dist/stores/integration/netsuite.d.ts +26 -4
  51. package/dist/stores/inventory.d.ts +127 -0
  52. package/dist/stores/location.d.ts +91 -0
  53. package/dist/style.css +1 -1
  54. package/dist/{supplier-DLXOOcIm.js → supplier-BPzrg-JT.js} +1 -1
  55. package/dist/tsconfig.app.tsbuildinfo +1 -1
  56. package/dist/use-ingredient-select-dialog-CeL6kOMh.js +52 -0
  57. package/dist/{use-inventory-binding-dialog-B1zBTsW9.js → use-inventory-binding-dialog-SBHeD85N.js} +1 -1
  58. package/dist/views/closing-draft/composables/use-closing-draft-actions.d.ts +4 -1
  59. package/dist/views/closing-draft/helpers/export-draft.helper.d.ts +1 -1
  60. package/dist/views/ingredients/composables/use-ingredient-select-dialog.d.ts +16 -0
  61. package/dist/views/receive-request/components/netsuite/NetSuiteProps.d.ts +2 -0
  62. package/dist/views/receive-request/components/transfer-details/TransferDetailsProps.d.ts +2 -0
  63. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +386 -0
  64. package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +4 -0
  65. package/dist/views/receive-request/components/transfer-form/components/TransferItemTable.vue.d.ts +382 -2
  66. package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +3 -0
  67. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +783 -5
  68. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +595 -6
  69. package/dist/views/receive-request/import/XilnexImportDialog.vue.d.ts +22 -0
  70. package/dist/views/receive-request/import/XilnexImportForm.vue.d.ts +17 -0
  71. package/dist/views/receive-request/import/XilnexResult.vue.d.ts +17 -0
  72. package/dist/views/receive-request/import/export.d.ts +14 -0
  73. package/dist/views/receive-request/import/props.d.ts +7 -0
  74. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +2 -0
  75. package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateItemTable.vue.d.ts +220 -0
  76. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +5 -1
  77. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +24 -0
  78. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +24 -0
  79. package/dist/views/transfer-template/composables/useTransferTemplateHelper.d.ts +305 -0
  80. package/dist/{vue-i18n-AeCKtYb7.js → vue-i18n-DSQQNX5F.js} +270 -270
  81. package/package.json +4 -4
  82. package/dist/ApprovalView-xtUG5yeg.js +0 -138
  83. package/dist/BindingsTable-Bub-L-pM.js +0 -145
  84. package/dist/ClosingDraftView-C9VKku7E.js +0 -1225
  85. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BSB7T16f.js +0 -286
  86. package/dist/IngredientsView-XxrOFv-u.js +0 -1706
  87. package/dist/PublishView-CBIvo-Qj.js +0 -192
  88. package/dist/ReceiveRequestView-UIaPylF0.js +0 -1876
  89. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CyovzdZg.js +0 -1327
  90. package/dist/TransferTemplateView-C2XMghN_.js +0 -1284
@@ -1,286 +0,0 @@
1
- import { j as L, t as I, ao as x, u as R, at as B, aD as H, aE as M } from "./app-ojZQI-KQ.js";
2
- import { u as j } from "./supplier-DLXOOcIm.js";
3
- import { P as S } from "./format-unit-display-ByfsyWBU.js";
4
- import { computed as y, defineComponent as W, mergeModels as $, useModel as J, ref as K, resolveComponent as U, openBlock as F, createElementBlock as A, normalizeStyle as Q, createElementVNode as D, createVNode as X, withCtx as Y, createBlock as V, createCommentVNode as E, Fragment as Z, renderList as z, unref as w } from "vue";
5
- function G(a, o, e) {
6
- var s;
7
- if (!!o.measurement === !!e && ((s = o.measurement) == null ? void 0 : s.id) === e)
8
- return o;
9
- if (!e)
10
- return {
11
- costPerUnit: o.costPerUnit
12
- };
13
- const i = a.measurements.find((r) => r.id === e);
14
- return i ? {
15
- costPerUnit: o.costPerUnit,
16
- measurement: i
17
- } : {
18
- costPerUnit: o.costPerUnit
19
- };
20
- }
21
- function oe(a, o, e, n) {
22
- var P, g, c;
23
- if (n != null && n.manualTotalCost)
24
- return n == null ? void 0 : n.manualTotalCost;
25
- const t = (c = (g = (P = n == null ? void 0 : n.supplier) == null ? void 0 : P.supplyItems) == null ? void 0 : g.find(
26
- (l) => l.skuId === a._id
27
- )) == null ? void 0 : c.defaultCost, i = a.defaultCost ? G(a.unit, a.defaultCost, a.trackingMeasurement) : void 0, s = t ?? i, r = s == null ? void 0 : s.costPerUnit, u = r ? s != null && s.measurement ? +L(r) / +L(s == null ? void 0 : s.measurement.conversion) : +L(r) : void 0, p = u ? e ? u * +L(e.conversion) : u : void 0, v = p ? +L(o) * p : void 0;
28
- return v ? {
29
- ...I(v ?? 0, 2),
30
- currency: x()
31
- } : {
32
- amount: 0,
33
- precision: 0,
34
- currency: x()
35
- };
36
- }
37
- function T(a) {
38
- return H.parse(a);
39
- }
40
- function C(a) {
41
- return {
42
- _id: a.doc._id,
43
- internal: a.type,
44
- contactName: a.doc.profile.name,
45
- name: a.doc.profile.name ?? "",
46
- email: a.doc.profile.email,
47
- phoneNumber: a.doc.profile.phoneNo,
48
- registrationNumber: a.doc.profile.regNo,
49
- address: a.doc.profile.address ?? {
50
- line1: "",
51
- state: "",
52
- city: "",
53
- postcode: "",
54
- country: ""
55
- }
56
- };
57
- }
58
- function re(a, o, e = !1, n = !1) {
59
- const t = j(), i = R();
60
- i.watchLocation(async () => {
61
- var b;
62
- await t.readSuppliers();
63
- const c = a();
64
- if ((b = c.supplier) != null && b._id) return;
65
- const l = n ? t.suppliers[0] : t.businessSuppliers[0], f = (e ? i.locations.filter((m) => m.doc._id !== i.currentLocation.doc._id) : i.locations)[0];
66
- o({
67
- ...c,
68
- supplier: l ? T(l) : f ? C(f) : c.supplier
69
- });
70
- });
71
- const s = y(
72
- () => {
73
- var c, l;
74
- return typeof ((l = (c = a()) == null ? void 0 : c.supplier) == null ? void 0 : l.internal) == "string" ? S.TRANSFER : S.PURCHASE;
75
- }
76
- ), r = y({
77
- get() {
78
- var c, l;
79
- return (l = (c = a()) == null ? void 0 : c.supplier) == null ? void 0 : l._id;
80
- },
81
- set(c) {
82
- const l = a() ?? {};
83
- if (s.value === S.PURCHASE) {
84
- const _ = (n ? t.suppliers : t.businessSuppliers).find((N) => N._id === c);
85
- o({
86
- ...l,
87
- supplier: _ ? T(_) : l.supplier
88
- });
89
- return;
90
- }
91
- const b = (e ? i.locations.filter((m) => m.doc._id !== i.currentLocation.doc._id) : i.locations).find((m) => m.doc._id === c);
92
- o({
93
- ...l,
94
- supplier: b ? C(b) : l.supplier
95
- });
96
- }
97
- }), u = y(() => t.locationSuppliers.map(T)), p = y(() => t.businessSuppliers.map(T)), v = y(() => {
98
- const c = [...u.value], l = [...p.value];
99
- return n ? [...l, ...c] : l;
100
- }), d = y(() => {
101
- var h;
102
- const c = ((h = i._currentLocation) == null ? void 0 : h.type) === B.warehouse;
103
- return (e ? i.locations.filter((f) => f.doc._id !== i.currentLocation.doc._id) : i.locations).filter((f) => c || f.acceptRequest).map(C);
104
- }), P = y(() => {
105
- if (s.value === S.PURCHASE) {
106
- const l = u.value.map((f) => ({
107
- label: f.name,
108
- value: f._id
109
- })), h = p.value.map((f) => ({
110
- label: f.name,
111
- sublabel: "Business supplier",
112
- value: f._id
113
- }));
114
- return n ? [...l, ...h] : h;
115
- }
116
- return d.value.map((l) => ({
117
- label: l.name,
118
- sublabel: l.internal ? `${l.internal}` : void 0,
119
- value: l._id
120
- }));
121
- }), g = y(() => {
122
- var f, b;
123
- const c = (b = (f = a()) == null ? void 0 : f.supplier) == null ? void 0 : b._id;
124
- if (s.value === S.PURCHASE) {
125
- const m = t.suppliers.find((_) => _._id === c);
126
- return m ? T(m) : null;
127
- }
128
- const h = i.locations.find((m) => m.doc._id);
129
- return h ? C(h) : null;
130
- });
131
- return {
132
- transferLocationModel: r,
133
- transferLocationOptions: P,
134
- locationOptionsTypePurchase: v,
135
- locationOptionsTypePurchaseLocationLevel: u,
136
- locationOptionsTypeTransfer: d,
137
- selectedLocation: g
138
- };
139
- }
140
- class O {
141
- static getDescendantProperty(o, e, n = []) {
142
- let t, i, s, r, u, p;
143
- if (e) {
144
- if (s = e.indexOf("."), s === -1 ? t = e : (t = e.slice(0, s), i = e.slice(s + 1)), r = o[t], r !== null && typeof r < "u")
145
- if (!i && (typeof r == "string" || typeof r == "number"))
146
- n.push(r);
147
- else if (Object.prototype.toString.call(r) === "[object Array]")
148
- for (u = 0, p = r.length; u < p; u++)
149
- O.getDescendantProperty(r[u], i, n);
150
- else i && O.getDescendantProperty(r, i, n);
151
- } else
152
- n.push(o);
153
- return n;
154
- }
155
- }
156
- class k {
157
- constructor(o = [], e = [], n = {}) {
158
- Array.isArray(e) || (n = e, e = []), this.haystack = o, this.keys = e, this.options = Object.assign({
159
- caseSensitive: !1,
160
- sort: !1
161
- }, n);
162
- }
163
- search(o = "") {
164
- if (o === "")
165
- return this.haystack;
166
- const e = [];
167
- for (let n = 0; n < this.haystack.length; n++) {
168
- const t = this.haystack[n];
169
- if (this.keys.length === 0) {
170
- const i = k.isMatch(t, o, this.options.caseSensitive);
171
- i && e.push({ item: t, score: i });
172
- } else
173
- for (let i = 0; i < this.keys.length; i++) {
174
- const s = O.getDescendantProperty(t, this.keys[i]);
175
- let r = !1;
176
- for (let u = 0; u < s.length; u++) {
177
- const p = k.isMatch(s[u], o, this.options.caseSensitive);
178
- if (p) {
179
- r = !0, e.push({ item: t, score: p });
180
- break;
181
- }
182
- }
183
- if (r)
184
- break;
185
- }
186
- }
187
- return this.options.sort && e.sort((n, t) => n.score - t.score), e.map((n) => n.item);
188
- }
189
- static isMatch(o, e, n) {
190
- o = String(o), e = String(e), n || (o = o.toLocaleLowerCase(), e = e.toLocaleLowerCase());
191
- const t = k.nearestIndexesFor(o, e);
192
- return t ? o === e ? 1 : t.length > 1 ? 2 + (t[t.length - 1] - t[0]) : 2 + t[0] : !1;
193
- }
194
- static nearestIndexesFor(o, e) {
195
- const n = e.split("");
196
- let t = [];
197
- return k.indexesOfFirstLetter(o, e).forEach((s, r) => {
198
- let u = s + 1;
199
- t[r] = [s];
200
- for (let p = 1; p < n.length; p++) {
201
- const v = n[p];
202
- if (u = o.indexOf(v, u), u === -1) {
203
- t[r] = !1;
204
- break;
205
- }
206
- t[r].push(u), u++;
207
- }
208
- }), t = t.filter((s) => s !== !1), t.length ? t.sort((s, r) => s.length === 1 ? s[0] - r[0] : (s = s[s.length - 1] - s[0], r = r[r.length - 1] - r[0], s - r))[0] : !1;
209
- }
210
- static indexesOfFirstLetter(o, e) {
211
- const n = e[0];
212
- return o.split("").map((t, i) => t !== n ? !1 : i).filter((t) => t !== !1);
213
- }
214
- }
215
- const q = { class: "overflow-y-auto h-full pb-8" }, ie = /* @__PURE__ */ W({
216
- __name: "FmFilterableMenuOptions",
217
- props: /* @__PURE__ */ $({
218
- modelValue: {},
219
- maxHeight: {},
220
- width: {},
221
- handleItemChange: { type: Function },
222
- items: {},
223
- options: {}
224
- }, {
225
- search: {},
226
- searchModifiers: {}
227
- }),
228
- emits: ["update:search"],
229
- setup(a) {
230
- const o = a, e = J(a, "search"), n = y(
231
- () => new k(o.items, ["label", "sublabel"], o.options)
232
- ), t = y(() => n.value.search(e.value)), i = K();
233
- return console.log({ stickyRef: i }), (s, r) => {
234
- const u = U("FmButton"), p = U("FmTextField"), v = U("FmMenuItem");
235
- return F(), A("div", {
236
- class: "relative",
237
- style: Q({ width: s.width })
238
- }, [
239
- D("div", {
240
- class: "sticky top-0 bg-white mb-8",
241
- ref_key: "stickyRef",
242
- ref: i
243
- }, [
244
- X(p, {
245
- modelValue: e.value,
246
- "onUpdate:modelValue": r[1] || (r[1] = (d) => e.value = d),
247
- placeholder: "Filter options"
248
- }, {
249
- append: Y(() => [
250
- e.value ? (F(), V(u, {
251
- key: 0,
252
- variant: "tertiary",
253
- "prepend-icon": "close",
254
- onClick: r[0] || (r[0] = (d) => e.value = "")
255
- })) : E("", !0)
256
- ]),
257
- _: 1
258
- }, 8, ["modelValue"])
259
- ], 512),
260
- D("div", q, [
261
- (F(!0), A(Z, null, z(t.value, (d, P) => (F(), V(v, {
262
- key: P,
263
- label: d.label,
264
- sublabel: d.sublabel,
265
- "model-value": w(M)(s.modelValue, d.value),
266
- onClick: () => s.handleItemChange(w(M)(s.modelValue, d.value), d),
267
- onVnodeMounted: (g) => {
268
- var c, l;
269
- return w(M)(s.modelValue, d.value) && ((c = g.el) == null || c.scrollIntoView({ behavior: "instant", block: "end" }), (l = g.el) == null || l.scrollIntoView({ behavior: "smooth", block: "center" })), void 0;
270
- }
271
- }, null, 8, ["label", "sublabel", "model-value", "onClick", "onVnodeMounted"]))), 128)),
272
- t.value.length ? E("", !0) : (F(), V(v, {
273
- key: 0,
274
- disabled: "",
275
- label: "No options available"
276
- }))
277
- ])
278
- ], 4);
279
- };
280
- }
281
- });
282
- export {
283
- ie as _,
284
- oe as c,
285
- re as u
286
- };