@feedmepos/mf-inventory-portal 0.0.23-dev.28 → 0.0.23-dev.3

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 (114) hide show
  1. package/dist/{App-DRBjtrVV.js → App-BREfwtck.js} +73 -85
  2. package/dist/{ApprovalView-OzaufzMA.js → ApprovalView-DCzLx24G.js} +27 -24
  3. package/dist/{BindingsDialog-DQwWNg1N.js → BindingsDialog-CUcC8lue.js} +4 -4
  4. package/dist/{BindingsPicker-DSYOkBTy.js → BindingsPicker-3VOdZBWI.js} +9 -8
  5. package/dist/{BindingsTable-BB39IdFU.js → BindingsTable-D5Lt6GOO.js} +22 -18
  6. package/dist/{ClosingTemplateView-Dk5TTe31.js → ClosingTemplateView-CukthwOo.js} +286 -272
  7. package/dist/FmDroppableField-8RzKjEdL.js +154 -0
  8. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Dwb3eBLo.js +267 -0
  9. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CvtvzIt1.js +436 -0
  10. package/dist/FmMultiselectDialog-CKBcMDGC.js +415 -0
  11. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-qqudhwEN.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DigsIOB0.js} +114 -116
  12. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-g1RpNK-0.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DweLQVwq.js} +5 -5
  13. package/dist/{IngredientGroupView-CREz-Vh2.js → IngredientGroupView-CkD8x2CP.js} +69 -63
  14. package/dist/IngredientsView-DuK4YSD6.js +1613 -0
  15. package/dist/{IntegrationView-3cA_x_gB.js → IntegrationView-BfeV07OO.js} +95 -92
  16. package/dist/{InventoryBindingForm-DDS19Q0p.js → InventoryBindingForm-BsSmth0U.js} +1 -1
  17. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-5elMjhnH.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CMV5e99K.js} +27 -25
  18. package/dist/{InventoryBindingSummary-HSClvlZ5.js → InventoryBindingSummary-BHloDawE.js} +1 -1
  19. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-ni8Q5uWj.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BjddpTCS.js} +1 -1
  20. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-ClmXXhpb.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BZBa_99i.js} +24 -23
  21. package/dist/{PurchaseOrderPrintPreview-wKM6u0Ci.js → PurchaseOrderPrintPreview-CTdd-RuH.js} +14 -13
  22. package/dist/ReceiveRequestView-CgWNaYs1.js +4104 -0
  23. package/dist/{RecipeView-DJzDyKB5.js → RecipeView-CrmDQdc5.js} +85 -79
  24. package/dist/{StockView-DO4ys9XN.js → StockView-Xb3fQaiD.js} +1446 -1338
  25. package/dist/{SupplierView-BIJkWdt4.js → SupplierView-CrtIiaz0.js} +787 -2325
  26. package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js +135 -0
  27. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-C9H41eg7.js +1189 -0
  28. package/dist/TransferTemplateView-Cc7VRbZ7.js +1262 -0
  29. package/dist/{UnitView-DJoSWs6g.js → UnitView-C6BgrZ1G.js} +44 -40
  30. package/dist/{WarehouseView-C8YZTOZd.js → WarehouseView-Hhd76ybU.js} +100 -94
  31. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  32. package/dist/api/bill.d.ts +2 -2
  33. package/dist/api/closing.d.ts +0 -1
  34. package/dist/api/netsuite.d.ts +1 -1
  35. package/dist/app-CwUHqg7h.js +33462 -0
  36. package/dist/app.d.ts +0 -56
  37. package/dist/app.js +2 -2
  38. package/dist/components/FmMinMaxInputRules.d.ts +1 -4
  39. package/dist/components/FmMultiselectDialogProps.d.ts +0 -1
  40. package/dist/components/row-action.enum.d.ts +0 -1
  41. package/dist/composable/defineDeepModel.d.ts +1 -1
  42. package/dist/date2-CHNm4ELK.js +117 -0
  43. package/dist/dayjs.min-FE3dpxHU.js +282 -0
  44. package/dist/{decimal-0QwuGxcA.js → decimal-rPKr5T-H.js} +1 -1
  45. package/dist/defineDeepModel-Dc1zZzOi.js +13 -0
  46. package/dist/{feature-Q0gPMHLe.js → feature-z95vJnA1.js} +9 -23
  47. package/dist/format-time-from-id-CaPj8EHN.js +15 -0
  48. package/dist/format-unit-display-Bkz5kW6p.js +1198 -0
  49. package/dist/fuzzy-DXqhGaFi.js +41 -0
  50. package/dist/index-BMJHz32O.js +22277 -0
  51. package/dist/index-Be5vGZdr.js +45 -0
  52. package/dist/index-D2juQPg6.js +10545 -0
  53. package/dist/netsuite-P0as0Moa.js +194 -0
  54. package/dist/normalizeArguments-DP7Hrren.js +1552 -0
  55. package/dist/router/name.d.ts +0 -2
  56. package/dist/row-action.enum-PMKMRrZR.js +50 -0
  57. package/dist/rules-BQz4NGht.js +198 -0
  58. package/dist/stores/feature.d.ts +0 -2
  59. package/dist/stores/integration/netsuite.d.ts +1 -69
  60. package/dist/stores/inventory.d.ts +4 -1
  61. package/dist/style.css +1 -1
  62. package/dist/{supplier-xeNz-LFV.js → supplier-BixmjZyl.js} +15 -15
  63. package/dist/tsconfig.app.tsbuildinfo +1 -1
  64. package/dist/{use-inventory-binding-dialog-WCVWoWcc.js → use-inventory-binding-dialog-BRygbm1p.js} +11 -10
  65. package/dist/use-template-enabled-locations-2-Dd15d-ng.js +86 -0
  66. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +192 -24
  67. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +193 -25
  68. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +34 -34
  69. package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +0 -1
  70. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +54 -54
  71. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +54 -54
  72. package/dist/views/stock/components/StockRecordCard.vue.d.ts +1 -1
  73. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +2 -2
  74. package/dist/views/stock/helper/compute-summary-total.d.ts +2 -2
  75. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +8 -8
  76. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +96 -96
  77. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +96 -96
  78. package/dist/xlsx-k2Rf0NcF.js +24004 -0
  79. package/dist/xlsx.util-CJxPf7XZ.js +78 -0
  80. package/package.json +2 -2
  81. package/dist/ClosingDraftView-CF3wn51T.js +0 -1190
  82. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-vvfsYTGA.js +0 -282
  83. package/dist/IngredientsView-DzI9vr-u.js +0 -1657
  84. package/dist/ReceiveRequestView-CTk9r1bA.js +0 -4188
  85. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-KSBV1U_z.js +0 -1227
  86. package/dist/TransferTemplateView-CDUNWRLQ.js +0 -1264
  87. package/dist/api/adjustment-template.d.ts +0 -23
  88. package/dist/api/closing-draft.d.ts +0 -6
  89. package/dist/app-CYk4J4VK.js +0 -84180
  90. package/dist/format-unit-display-BIMHakYl.js +0 -1207
  91. package/dist/index-BQjj0Tdx.js +0 -12087
  92. package/dist/stock-ahRK16Qq.js +0 -110
  93. package/dist/views/adjustment-template/import/AdjustmentTemplateImport.vue.d.ts +0 -2
  94. package/dist/views/adjustment-template/import/AdjustmentTemplateImportItem.vue.d.ts +0 -18
  95. package/dist/views/adjustment-template/import/export.d.ts +0 -60
  96. package/dist/views/adjustment-template/wastage-template/WastageTemplateDetails.vue.d.ts +0 -2
  97. package/dist/views/adjustment-template/wastage-template/WastageTemplateDialog.vue.d.ts +0 -22
  98. package/dist/views/adjustment-template/wastage-template/WastageTemplatePublish.vue.d.ts +0 -6
  99. package/dist/views/adjustment-template/wastage-template/WastageTemplateView.vue.d.ts +0 -2
  100. package/dist/views/adjustment-template/wastage-template/actions.d.ts +0 -1295
  101. package/dist/views/adjustment-template/wastage-template/form/WastageTemplateForm.vue.d.ts +0 -16
  102. package/dist/views/adjustment-template/wastage-template/form/WastageTemplateItemTable.vue.d.ts +0 -35
  103. package/dist/views/adjustment-template/wastage-template/form/useAdjustmentTemplateItems.d.ts +0 -20
  104. package/dist/views/adjustment-template/wastage-template/props.d.ts +0 -29
  105. package/dist/views/adjustment-template/wastage-template/table.d.ts +0 -1273
  106. package/dist/views/closing-draft/ClosingDraftView.vue.d.ts +0 -2
  107. package/dist/views/closing-draft/components/closing-draft-action/ClosingDraftAction.vue.d.ts +0 -22
  108. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +0 -621
  109. package/dist/views/closing-draft/composables/use-closing-draft-actions.d.ts +0 -25
  110. package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +0 -3621
  111. package/dist/views/closing-draft/helpers/draft-status-to-class-name.helper.d.ts +0 -1
  112. package/dist/views/closing-draft/helpers/export-draft.helper.d.ts +0 -19
  113. package/dist/views/closing-draft/helpers/get-calculated-total.helper.d.ts +0 -4
  114. package/dist/views/receive-request/helper/check-netsuite-subsidiary.helper.d.ts +0 -1
@@ -1,282 +0,0 @@
1
- import { i as k, t as H, aq as V, u as B, aw as I, aG as R, aH as M } from "./app-CYk4J4VK.js";
2
- import { u as j } from "./supplier-xeNz-LFV.js";
3
- import { P as S } from "./format-unit-display-BIMHakYl.js";
4
- import { computed as y, defineComponent as $, mergeModels as W, useModel as J, resolveComponent as U, openBlock as T, createElementBlock as A, normalizeStyle as K, createElementVNode as N, createVNode as Q, withCtx as X, createBlock as w, createCommentVNode as D, Fragment as Y, renderList as Z, unref as x } 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
- ...H(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 = B();
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 = U("FmButton"), c = U("FmTextField"), p = U("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(), w(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(), w(p, {
258
- key: L,
259
- label: f.label,
260
- sublabel: f.sublabel,
261
- "model-value": x(M)(o.modelValue, f.value),
262
- onClick: () => o.handleItemChange(x(M)(o.modelValue, f.value), f),
263
- onVnodeMounted: (b) => {
264
- var g;
265
- return x(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(), w(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
- };