@feedmepos/mf-inventory-portal 0.0.23-dev.2 → 0.0.23-dev.21

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 (112) hide show
  1. package/dist/{App-DRE3c1lJ.js → App-CvIvF0fg.js} +59 -51
  2. package/dist/{ApprovalView-B4ZYcS3B.js → ApprovalView-BOn2HDVY.js} +20 -23
  3. package/dist/{BindingsDialog-Df1yrWHU.js → BindingsDialog-9qfADiSA.js} +7 -7
  4. package/dist/{BindingsPicker-BERMWh4w.js → BindingsPicker-CpV9uOqj.js} +7 -8
  5. package/dist/{BindingsTable-DRIapOWW.js → BindingsTable-BYScxUTj.js} +16 -20
  6. package/dist/ClosingDraftView-DM7-3zOd.js +1116 -0
  7. package/dist/{ClosingTemplateView-CbFn3Sdy.js → ClosingTemplateView-Cye5VPAM.js} +66 -76
  8. package/dist/{FmDroppableField-8RzKjEdL.js → FmDroppableField-AIKfZo3H.js} +1 -1
  9. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CQUsooGm.js +282 -0
  10. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BHSGZyJL.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CFQc-CBX.js} +121 -119
  11. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DH5IQchQ.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-2r8mut0B.js} +7 -7
  12. package/dist/{IngredientGroupView-DoETcEvV.js → IngredientGroupView-RNokzPJa.js} +30 -36
  13. package/dist/IngredientsView-M7K_GAEO.js +1660 -0
  14. package/dist/{IntegrationView-D1HeBiGF.js → IntegrationView-D9a8d1sO.js} +18 -20
  15. package/dist/{InventoryBindingForm-Dmz9BQ37.js → InventoryBindingForm-B0Gx5N1p.js} +1 -1
  16. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DoyqVBOd.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DEOudgKD.js} +15 -17
  17. package/dist/{InventoryBindingSummary-DrpwiRGZ.js → InventoryBindingSummary-C16Nc5aN.js} +1 -1
  18. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-yNEswIEI.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CZiypEex.js} +1 -1
  19. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-Br4_VUza.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BbYZwclN.js} +8 -8
  20. package/dist/{PurchaseOrderPrintPreview-cp671yWE.js → PurchaseOrderPrintPreview-DdKF8g0J.js} +13 -14
  21. package/dist/ReceiveRequestView-DBPRR6fz.js +4186 -0
  22. package/dist/{RecipeView-CD_dAWLo.js → RecipeView-CzUgVxKz.js} +58 -63
  23. package/dist/{StockView-DfUzFC1b.js → StockView-DCO3N1FS.js} +1338 -1446
  24. package/dist/{SupplierView-DB-zrNxh.js → SupplierView-CzV6DYSj.js} +2345 -783
  25. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-00pcY0qu.js +1228 -0
  26. package/dist/TransferTemplateView-uL5PId9-.js +1265 -0
  27. package/dist/{UnitView-BlC9-WOA.js → UnitView-d-mCs-cS.js} +40 -44
  28. package/dist/{WarehouseView-CgEY87Lo.js → WarehouseView-B7z8m-Hv.js} +67 -73
  29. package/dist/api/adjustment-template.d.ts +23 -0
  30. package/dist/api/bill.d.ts +2 -2
  31. package/dist/api/closing-draft.d.ts +6 -0
  32. package/dist/api/closing.d.ts +1 -0
  33. package/dist/api/netsuite.d.ts +69 -0
  34. package/dist/app-CTCC1zfY.js +58871 -0
  35. package/dist/app.d.ts +56 -0
  36. package/dist/app.js +2 -2
  37. package/dist/components/FmMinMaxInputRules.d.ts +4 -1
  38. package/dist/components/FmMultiselectDialogProps.d.ts +1 -0
  39. package/dist/components/row-action.enum.d.ts +1 -0
  40. package/dist/composable/defineDeepModel.d.ts +1 -1
  41. package/dist/{decimal-D7BCubZO.js → decimal-DhUR6QsF.js} +1 -1
  42. package/dist/{feature-BR-MsGYt.js → feature-DiGS5Fa4.js} +23 -9
  43. package/dist/format-unit-display-MRARpSlY.js +1210 -0
  44. package/dist/index-BSN3RnCl.js +12087 -0
  45. package/dist/netsuite-CIibMNer.js +251 -0
  46. package/dist/router/name.d.ts +2 -0
  47. package/dist/stock-COHpOTJk.js +110 -0
  48. package/dist/stores/feature.d.ts +2 -0
  49. package/dist/stores/integration/netsuite.d.ts +81 -0
  50. package/dist/stores/inventory.d.ts +1 -4
  51. package/dist/style.css +1 -1
  52. package/dist/{supplier-aBuwVukl.js → supplier-csNwTHYl.js} +15 -15
  53. package/dist/tsconfig.app.tsbuildinfo +1 -1
  54. package/dist/{use-inventory-binding-dialog-CLQ0LUmW.js → use-inventory-binding-dialog-172A48Xx.js} +10 -11
  55. package/dist/views/adjustment-template/wastage-template/WastageTemplateDetails.vue.d.ts +2 -0
  56. package/dist/views/adjustment-template/wastage-template/WastageTemplateDialog.vue.d.ts +22 -0
  57. package/dist/views/adjustment-template/wastage-template/WastageTemplatePublish.vue.d.ts +6 -0
  58. package/dist/views/adjustment-template/wastage-template/WastageTemplateView.vue.d.ts +2 -0
  59. package/dist/views/adjustment-template/wastage-template/actions.d.ts +1295 -0
  60. package/dist/views/adjustment-template/wastage-template/form/WastageTemplateForm.vue.d.ts +16 -0
  61. package/dist/views/adjustment-template/wastage-template/form/WastageTemplateItemTable.vue.d.ts +35 -0
  62. package/dist/views/adjustment-template/wastage-template/form/useAdjustmentTemplateItems.d.ts +20 -0
  63. package/dist/views/adjustment-template/wastage-template/props.d.ts +29 -0
  64. package/dist/views/adjustment-template/wastage-template/table.d.ts +1273 -0
  65. package/dist/views/closing-draft/ClosingDraftView.vue.d.ts +2 -0
  66. package/dist/views/closing-draft/components/closing-draft-action/ClosingDraftAction.vue.d.ts +22 -0
  67. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +451 -0
  68. package/dist/views/closing-draft/composables/use-closing-draft-actions.d.ts +25 -0
  69. package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +2601 -0
  70. package/dist/views/closing-draft/helpers/draft-status-to-class-name.helper.d.ts +1 -0
  71. package/dist/views/closing-draft/helpers/export-draft.helper.d.ts +19 -0
  72. package/dist/views/closing-draft/helpers/get-calculated-total.helper.d.ts +4 -0
  73. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +24 -192
  74. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +24 -192
  75. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +34 -34
  76. package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +1 -0
  77. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +54 -54
  78. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +54 -54
  79. package/dist/views/receive-request/helper/check-netsuite-subsidiary.helper.d.ts +1 -0
  80. package/dist/views/stock/components/StockRecordCard.vue.d.ts +1 -1
  81. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +2 -2
  82. package/dist/views/stock/helper/compute-summary-total.d.ts +2 -2
  83. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +8 -8
  84. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +96 -96
  85. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +96 -96
  86. package/dist/{xlsx-BbtURTDy.js → xlsx-CH-bhcOL.js} +1 -1
  87. package/dist/{xlsx.util-zYS4OJFi.js → xlsx.util-4aHI7W-Z.js} +1 -1
  88. package/package.json +3 -3
  89. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-7JYNssTm.js +0 -267
  90. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-KbYSywk2.js +0 -436
  91. package/dist/FmMultiselectDialog-Da9JMCYa.js +0 -415
  92. package/dist/IngredientsView-DHAhj9pV.js +0 -1613
  93. package/dist/ReceiveRequestView-C1WBlpho.js +0 -4082
  94. package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js +0 -135
  95. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-2mzqFGCz.js +0 -1144
  96. package/dist/TransferTemplateView-CaAJrqU6.js +0 -1262
  97. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  98. package/dist/app-CAyFhmAz.js +0 -33457
  99. package/dist/date2-D9i5izMt.js +0 -117
  100. package/dist/dayjs.min-SJKP9zBL.js +0 -282
  101. package/dist/defineDeepModel-DS4Shctf.js +0 -13
  102. package/dist/format-time-from-id-CUby60uW.js +0 -15
  103. package/dist/format-unit-display-D25Al2JZ.js +0 -1198
  104. package/dist/fuzzy-BryBtMz_.js +0 -41
  105. package/dist/index-ByJbUSIQ.js +0 -45
  106. package/dist/index-CFA_VFyX.js +0 -10545
  107. package/dist/index-CTvgBOum.js +0 -22280
  108. package/dist/netsuite-D0G4B60k.js +0 -146
  109. package/dist/normalizeArguments-DP7Hrren.js +0 -1552
  110. package/dist/row-action.enum-PMKMRrZR.js +0 -50
  111. package/dist/rules-DxVY0b7F.js +0 -198
  112. package/dist/use-template-enabled-locations-2-BgTiwy_3.js +0 -86
@@ -0,0 +1,282 @@
1
+ import { h as k, t as B, ai as V, u as H, ao as I, aw as R, ax as M } from "./app-CTCC1zfY.js";
2
+ import { u as j } from "./supplier-csNwTHYl.js";
3
+ import { P as S } from "./format-unit-display-MRARpSlY.js";
4
+ import { computed as y, defineComponent as $, mergeModels as W, useModel as J, resolveComponent as x, openBlock as T, createElementBlock as A, normalizeStyle as K, createElementVNode as N, createVNode as Q, withCtx as X, createBlock as U, createCommentVNode as D, Fragment as Y, renderList as Z, unref as w } from "vue";
5
+ function z(l, r, e) {
6
+ var s;
7
+ if (!!r.measurement === !!e && ((s = r.measurement) == null ? void 0 : s.id) === e)
8
+ return r;
9
+ if (!e)
10
+ return {
11
+ costPerUnit: r.costPerUnit
12
+ };
13
+ const o = l.measurements.find((i) => i.id === e);
14
+ return o ? {
15
+ costPerUnit: r.costPerUnit,
16
+ measurement: o
17
+ } : {
18
+ costPerUnit: r.costPerUnit
19
+ };
20
+ }
21
+ function oe(l, r, e, n) {
22
+ var b, g, u;
23
+ if (n != null && n.manualTotalCost)
24
+ return n == null ? void 0 : n.manualTotalCost;
25
+ const t = (u = (g = (b = n == null ? void 0 : n.supplier) == null ? void 0 : b.supplyItems) == null ? void 0 : g.find(
26
+ (a) => a.skuId === l._id
27
+ )) == null ? void 0 : u.defaultCost, o = l.defaultCost ? z(l.unit, l.defaultCost, l.trackingMeasurement) : void 0, s = t ?? o, i = s == null ? void 0 : s.costPerUnit, c = i ? s != null && s.measurement ? +k(i) / +k(s == null ? void 0 : s.measurement.conversion) : +k(i) : void 0, p = c ? e ? c * +k(e.conversion) : c : void 0, f = p ? +k(r) * p : void 0;
28
+ return f ? {
29
+ ...B(f ?? 0, 2),
30
+ currency: V()
31
+ } : {
32
+ amount: 0,
33
+ precision: 0,
34
+ currency: V()
35
+ };
36
+ }
37
+ function F(l) {
38
+ return R.parse(l);
39
+ }
40
+ function C(l) {
41
+ return {
42
+ _id: l.doc._id,
43
+ internal: l.type,
44
+ contactName: l.doc.profile.name,
45
+ name: l.doc.profile.name ?? "",
46
+ email: l.doc.profile.email,
47
+ phoneNumber: l.doc.profile.phoneNo,
48
+ registrationNumber: l.doc.profile.regNo,
49
+ address: l.doc.profile.address ?? {
50
+ line1: "",
51
+ state: "",
52
+ city: "",
53
+ postcode: "",
54
+ country: ""
55
+ }
56
+ };
57
+ }
58
+ function re(l, r, e = !1, n = !1) {
59
+ const t = j(), o = H();
60
+ o.watchLocation(async () => {
61
+ var v;
62
+ await t.readSuppliers();
63
+ const u = l();
64
+ if ((v = u.supplier) != null && v._id) return;
65
+ const a = n ? t.suppliers[0] : t.businessSuppliers[0], d = (e ? o.locations.filter((m) => m.doc._id !== o.currentLocation.doc._id) : o.locations)[0];
66
+ r({
67
+ ...u,
68
+ supplier: a ? F(a) : d ? C(d) : u.supplier
69
+ });
70
+ });
71
+ const s = y(
72
+ () => {
73
+ var u, a;
74
+ return typeof ((a = (u = l()) == null ? void 0 : u.supplier) == null ? void 0 : a.internal) == "string" ? S.TRANSFER : S.PURCHASE;
75
+ }
76
+ ), i = y({
77
+ get() {
78
+ var u, a;
79
+ return (a = (u = l()) == null ? void 0 : u.supplier) == null ? void 0 : a._id;
80
+ },
81
+ set(u) {
82
+ const a = l() ?? {};
83
+ if (s.value === S.PURCHASE) {
84
+ const _ = (n ? t.suppliers : t.businessSuppliers).find((E) => E._id === u);
85
+ r({
86
+ ...a,
87
+ supplier: _ ? F(_) : a.supplier
88
+ });
89
+ return;
90
+ }
91
+ const v = (e ? o.locations.filter((m) => m.doc._id !== o.currentLocation.doc._id) : o.locations).find((m) => m.doc._id === u);
92
+ r({
93
+ ...a,
94
+ supplier: v ? C(v) : a.supplier
95
+ });
96
+ }
97
+ }), c = y(() => t.locationSuppliers.map(F)), p = y(() => t.businessSuppliers.map(F)), f = y(() => {
98
+ const u = [...c.value], a = [...p.value];
99
+ return n ? [...a, ...u] : a;
100
+ }), L = y(() => {
101
+ var h;
102
+ const u = ((h = o._currentLocation) == null ? void 0 : h.type) === I.warehouse;
103
+ return (e ? o.locations.filter((d) => d.doc._id !== o.currentLocation.doc._id) : o.locations).filter((d) => u || d.acceptRequest).map(C);
104
+ }), b = y(() => {
105
+ if (s.value === S.PURCHASE) {
106
+ const a = c.value.map((d) => ({
107
+ label: d.name,
108
+ value: d._id
109
+ })), h = p.value.map((d) => ({
110
+ label: d.name,
111
+ sublabel: "Business supplier",
112
+ value: d._id
113
+ }));
114
+ return n ? [...a, ...h] : h;
115
+ }
116
+ return L.value.map((a) => ({
117
+ label: a.name,
118
+ sublabel: a.internal ? `${a.internal}` : void 0,
119
+ value: a._id
120
+ }));
121
+ }), g = y(() => {
122
+ var d, v;
123
+ const u = (v = (d = l()) == null ? void 0 : d.supplier) == null ? void 0 : v._id;
124
+ if (s.value === S.PURCHASE) {
125
+ const m = t.suppliers.find((_) => _._id === u);
126
+ return m ? F(m) : null;
127
+ }
128
+ const h = o.locations.find((m) => m.doc._id);
129
+ return h ? C(h) : null;
130
+ });
131
+ return {
132
+ transferLocationModel: i,
133
+ transferLocationOptions: b,
134
+ locationOptionsTypePurchase: f,
135
+ locationOptionsTypePurchaseLocationLevel: c,
136
+ locationOptionsTypeTransfer: L,
137
+ selectedLocation: g
138
+ };
139
+ }
140
+ class O {
141
+ static getDescendantProperty(r, e, n = []) {
142
+ let t, o, s, i, c, p;
143
+ if (e) {
144
+ if (s = e.indexOf("."), s === -1 ? t = e : (t = e.slice(0, s), o = e.slice(s + 1)), i = r[t], i !== null && typeof i < "u")
145
+ if (!o && (typeof i == "string" || typeof i == "number"))
146
+ n.push(i);
147
+ else if (Object.prototype.toString.call(i) === "[object Array]")
148
+ for (c = 0, p = i.length; c < p; c++)
149
+ O.getDescendantProperty(i[c], o, n);
150
+ else o && O.getDescendantProperty(i, o, n);
151
+ } else
152
+ n.push(r);
153
+ return n;
154
+ }
155
+ }
156
+ class P {
157
+ constructor(r = [], e = [], n = {}) {
158
+ Array.isArray(e) || (n = e, e = []), this.haystack = r, this.keys = e, this.options = Object.assign({
159
+ caseSensitive: !1,
160
+ sort: !1
161
+ }, n);
162
+ }
163
+ search(r = "") {
164
+ if (r === "")
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 o = P.isMatch(t, r, this.options.caseSensitive);
171
+ o && e.push({ item: t, score: o });
172
+ } else
173
+ for (let o = 0; o < this.keys.length; o++) {
174
+ const s = O.getDescendantProperty(t, this.keys[o]);
175
+ let i = !1;
176
+ for (let c = 0; c < s.length; c++) {
177
+ const p = P.isMatch(s[c], r, this.options.caseSensitive);
178
+ if (p) {
179
+ i = !0, e.push({ item: t, score: p });
180
+ break;
181
+ }
182
+ }
183
+ if (i)
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(r, e, n) {
190
+ r = String(r), e = String(e), n || (r = r.toLocaleLowerCase(), e = e.toLocaleLowerCase());
191
+ const t = P.nearestIndexesFor(r, e);
192
+ return t ? r === e ? 1 : t.length > 1 ? 2 + (t[t.length - 1] - t[0]) : 2 + t[0] : !1;
193
+ }
194
+ static nearestIndexesFor(r, e) {
195
+ const n = e.split("");
196
+ let t = [];
197
+ return P.indexesOfFirstLetter(r, e).forEach((s, i) => {
198
+ let c = s + 1;
199
+ t[i] = [s];
200
+ for (let p = 1; p < n.length; p++) {
201
+ const f = n[p];
202
+ if (c = r.indexOf(f, c), c === -1) {
203
+ t[i] = !1;
204
+ break;
205
+ }
206
+ t[i].push(c), c++;
207
+ }
208
+ }), t = t.filter((s) => s !== !1), t.length ? t.sort((s, i) => s.length === 1 ? s[0] - i[0] : (s = s[s.length - 1] - s[0], i = i[i.length - 1] - i[0], s - i))[0] : !1;
209
+ }
210
+ static indexesOfFirstLetter(r, e) {
211
+ const n = e[0];
212
+ return r.split("").map((t, o) => t !== n ? !1 : o).filter((t) => t !== !1);
213
+ }
214
+ }
215
+ const G = { class: "sticky top-0 bg-white mb-8" }, q = { class: "overflow-y-auto pb-8" }, ie = /* @__PURE__ */ $({
216
+ __name: "FmFilterableMenuOptions",
217
+ props: /* @__PURE__ */ W({
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(l) {
230
+ const r = l, e = J(l, "search"), n = y(
231
+ () => new P(r.items, ["label", "sublabel"], r.options)
232
+ ), t = y(() => n.value.search(e.value));
233
+ return (o, s) => {
234
+ const i = x("FmButton"), c = x("FmTextField"), p = x("FmMenuItem");
235
+ return T(), A("div", {
236
+ class: "relative",
237
+ style: K({ maxHeight: `${o.maxHeight}px`, width: o.width })
238
+ }, [
239
+ N("div", G, [
240
+ Q(c, {
241
+ modelValue: e.value,
242
+ "onUpdate:modelValue": s[1] || (s[1] = (f) => e.value = f),
243
+ placeholder: "Filter options"
244
+ }, {
245
+ append: X(() => [
246
+ e.value ? (T(), U(i, {
247
+ key: 0,
248
+ variant: "tertiary",
249
+ "prepend-icon": "close",
250
+ onClick: s[0] || (s[0] = (f) => e.value = "")
251
+ })) : D("", !0)
252
+ ]),
253
+ _: 1
254
+ }, 8, ["modelValue"])
255
+ ]),
256
+ N("div", q, [
257
+ (T(!0), A(Y, null, Z(t.value, (f, L) => (T(), U(p, {
258
+ key: L,
259
+ label: f.label,
260
+ sublabel: f.sublabel,
261
+ "model-value": w(M)(o.modelValue, f.value),
262
+ onClick: () => o.handleItemChange(w(M)(o.modelValue, f.value), f),
263
+ onVnodeMounted: (b) => {
264
+ var g;
265
+ return w(M)(o.modelValue, f.value) && ((g = b.el) == null || g.scrollIntoView({ behavior: "smooth", block: "center" }), console.log("scrollTo", b.el)), void 0;
266
+ }
267
+ }, null, 8, ["label", "sublabel", "model-value", "onClick", "onVnodeMounted"]))), 128)),
268
+ t.value.length ? D("", !0) : (T(), U(p, {
269
+ key: 0,
270
+ disabled: "",
271
+ label: "No options available"
272
+ }))
273
+ ])
274
+ ], 4);
275
+ };
276
+ }
277
+ });
278
+ export {
279
+ ie as _,
280
+ oe as c,
281
+ re as u
282
+ };