@feedmepos/mf-inventory-portal 0.0.23-dev.24 → 0.0.23-dev.26

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 (49) hide show
  1. package/dist/{App-dQy0_X6Q.js → App-C0hXAs5E.js} +49 -45
  2. package/dist/{ApprovalView-CxwAuXae.js → ApprovalView-Db5Aq3gK.js} +15 -15
  3. package/dist/{BindingsDialog-BX8J03Uc.js → BindingsDialog-dKNKrWKv.js} +9 -9
  4. package/dist/{BindingsPicker-CAW_3sSv.js → BindingsPicker-dN1bNnc0.js} +5 -5
  5. package/dist/{BindingsTable-7UmxSmdW.js → BindingsTable-BA461fcU.js} +8 -8
  6. package/dist/{ClosingDraftView-DukJAMlK.js → ClosingDraftView-aRHVKTA6.js} +68 -69
  7. package/dist/{ClosingTemplateView-Dm7_gMTo.js → ClosingTemplateView-BYnC4Whw.js} +58 -61
  8. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DN3N20Nb.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BdjeCWX1.js} +13 -13
  9. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BrPRiS_u.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CP2euPwM.js} +46 -46
  10. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-Bln1lReW.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-C4aYGbW2.js} +7 -7
  11. package/dist/{IngredientGroupView-BKIJHeh9.js → IngredientGroupView-vdG6npct.js} +40 -40
  12. package/dist/{IngredientsView-Blnohl3I.js → IngredientsView-DWRAoLHx.js} +207 -210
  13. package/dist/{IntegrationView-Dna4bUA7.js → IntegrationView-Dp_A-Swf.js} +89 -90
  14. package/dist/{InventoryBindingForm-D6HSF8Wn.js → InventoryBindingForm-D_wSUUKv.js} +1 -1
  15. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CnWvwNjJ.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-2Mnqz6HN.js} +27 -27
  16. package/dist/{InventoryBindingSummary-CNNCv8NX.js → InventoryBindingSummary-oyRdM7Pd.js} +1 -1
  17. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CrMkMTAt.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CSabNdfV.js} +1 -1
  18. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-Cw3E2NKS.js → PremiumBadge.vue_vue_type_script_setup_true_lang-tu1Al7wM.js} +17 -18
  19. package/dist/{PurchaseOrderPrintPreview-PEN03dZK.js → PurchaseOrderPrintPreview-B4m8t90I.js} +1 -1
  20. package/dist/{ReceiveRequestView-rTUhjMLY.js → ReceiveRequestView-DIJb_dU2.js} +26 -27
  21. package/dist/{RecipeView-V1hx1AUG.js → RecipeView-Ch5KMGLJ.js} +47 -48
  22. package/dist/{StockView-B5nDn8nO.js → StockView-BVuzsMG7.js} +7 -7
  23. package/dist/{SupplierView-DyyRxm6k.js → SupplierView-DEC2LmtN.js} +203 -206
  24. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-D6oZOwHL.js → TransferDetails.vue_vue_type_script_setup_true_lang-9UZWws3P.js} +61 -62
  25. package/dist/{TransferTemplateView-OTR9Re51.js → TransferTemplateView-DAMQ_Whn.js} +144 -145
  26. package/dist/{UnitView-DGhm1JXD.js → UnitView-CFwHRgQ-.js} +3 -3
  27. package/dist/{WarehouseView-DMAvFisd.js → WarehouseView-HE71bVOX.js} +52 -52
  28. package/dist/app-CRSuR04o.js +84133 -0
  29. package/dist/app.js +1 -1
  30. package/dist/{decimal-DuJEFEYp.js → decimal-B5DqWjel.js} +1 -1
  31. package/dist/{feature-BRqas45f.js → feature-DxNphYNO.js} +1 -1
  32. package/dist/{format-unit-display-G6VtlQe7.js → format-unit-display-D40MKAIU.js} +50 -53
  33. package/dist/{index-D3f51k-I.js → index-BWDsx2Ik.js} +1 -1
  34. package/dist/{stock-DZkj2LE0.js → stock-BAPZYfON.js} +1 -1
  35. package/dist/style.css +1 -1
  36. package/dist/{supplier-Cm5Cw3u7.js → supplier-Bp7xaTFX.js} +1 -1
  37. package/dist/tsconfig.app.tsbuildinfo +1 -1
  38. package/dist/{use-inventory-binding-dialog-DCt0wUiw.js → use-inventory-binding-dialog-cxY29PPx.js} +1 -1
  39. package/dist/views/adjustment-template/import/AdjustmentTemplateImport.vue.d.ts +2 -0
  40. package/dist/views/adjustment-template/import/AdjustmentTemplateImportItem.vue.d.ts +18 -0
  41. package/dist/views/adjustment-template/import/export.d.ts +60 -0
  42. package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +1 -1
  43. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +1 -1
  44. package/package.json +1 -1
  45. package/dist/FmDroppableField-BqZcDO2v.js +0 -154
  46. package/dist/app-DQRbwx-z.js +0 -58903
  47. package/dist/netsuite-D4b5JceM.js +0 -251
  48. package/dist/xlsx-9Gc42bxv.js +0 -24004
  49. package/dist/xlsx.util-CEvUL8mk.js +0 -78
@@ -1,251 +0,0 @@
1
- import { N as L, m as $, a as M, u as N } from "./app-DQRbwx-z.js";
2
- import { useCoreStore as _ } from "@feedmepos/mf-common";
3
- import { useSnackbar as k } from "@feedmepos/ui-library";
4
- import { ref as C, computed as S } from "vue";
5
- const h = L((g, l) => {
6
- const p = _(), m = k();
7
- return l.onError(async (o) => {
8
- if (o instanceof $)
9
- throw m == null || m.open({
10
- title: o.title,
11
- message: o.message,
12
- type: "error"
13
- }), o;
14
- }), {
15
- async readSetting() {
16
- var e;
17
- const o = ((e = p.currentBusiness.value) == null ? void 0 : e._id) ?? "", f = `${g.netSuiteBackendUrl}/${o}/settings`;
18
- return await l.get(f);
19
- },
20
- async syncTransferOrder(o, f, e, i) {
21
- var r;
22
- const n = ((r = p.currentBusiness.value) == null ? void 0 : r._id) ?? "", t = `${g.netSuiteBackendUrl}/${n}/sync/transfer-order`;
23
- return await l.post(t, {
24
- type: o,
25
- locationId: f,
26
- purchaseOrderId: e,
27
- purchaseOrderRequestId: i
28
- });
29
- },
30
- urls: g
31
- };
32
- });
33
- function O() {
34
- return {
35
- setting: {
36
- _id: "",
37
- items: [],
38
- childItems: [],
39
- units: [],
40
- locations: [],
41
- subsidiaries: [],
42
- vendors: [],
43
- enable: !1,
44
- syncedAt: null
45
- },
46
- vendorSubsidiary: {},
47
- isReady: !1
48
- };
49
- }
50
- const a = C(O());
51
- function E() {
52
- const g = M(), l = S(() => a.value.setting.items.groupBy("netSuiteId", (e) => e.id)), p = S(() => a.value.setting.units.flatMap((e) => e.measurements).groupBy("netSuiteId", (e) => e.id)), m = S(() => a.value.setting.items.groupBy((e) => e.id)), o = S(
53
- () => a.value.setting.units.groupBy(
54
- (e) => e.netSuiteId,
55
- (e) => g.unitById[e.id]
56
- )
57
- ), f = S(
58
- () => a.value.setting.units.flatMap(
59
- (e) => e.measurements.map((i) => {
60
- var n;
61
- return {
62
- unit: (n = o.value.get(e.netSuiteId)) == null ? void 0 : n[0],
63
- measurement: i
64
- };
65
- })
66
- ).groupBy(
67
- (e) => e.measurement.netSuiteId,
68
- (e) => {
69
- var i;
70
- return (i = e.unit) == null ? void 0 : i.measurements.find((n) => n.id === e.measurement.id);
71
- }
72
- )
73
- );
74
- return {
75
- // state
76
- get isReady() {
77
- return a.value.isReady;
78
- },
79
- get isEnabled() {
80
- return a.value.setting.enable;
81
- },
82
- get isBusinessLocation() {
83
- return N().businessLevel;
84
- },
85
- get state() {
86
- return a.value;
87
- },
88
- get netSuiteItemIdToSkuId() {
89
- return l.value;
90
- },
91
- get netSuiteMeasurementIdToMeasurementId() {
92
- return p.value;
93
- },
94
- get netSuiteItemBySkuId() {
95
- return m.value;
96
- },
97
- get unitByNetsuiteId() {
98
- return o.value;
99
- },
100
- get measurementByNetsuiteId() {
101
- return f.value;
102
- },
103
- getNetSuiteVendor(e) {
104
- return a.value.setting.vendors.find((i) => i.id === e);
105
- },
106
- getNetSuiteLocation(e) {
107
- const [i, n] = e.split("_");
108
- return a.value.setting.locations.find((r) => r.id == n && r.type == i);
109
- },
110
- getLocationSubsidiary(e) {
111
- var r;
112
- if (!e)
113
- return {
114
- id: void 0,
115
- name: "",
116
- fullName: ""
117
- };
118
- const i = ((r = a.value.setting.locations.find((s) => s.netSuiteId === e)) == null ? void 0 : r.subsidiaryId) ?? null, { flat: n } = y(a.value.setting.subsidiaries), t = n.find((s) => s.id === i);
119
- return {
120
- id: t == null ? void 0 : t.id,
121
- name: (t == null ? void 0 : t.name) || "",
122
- fullName: `${(t == null ? void 0 : t.fullName) ?? ""}`
123
- };
124
- },
125
- currentLocationSubsidiary() {
126
- var d;
127
- const e = N(), i = e.currentLocation.doc._id, n = e.currentLocation.type, t = ((d = a.value.setting.locations.find(
128
- (u) => u.id === i && u.type == n
129
- )) == null ? void 0 : d.subsidiaryId) ?? null, { flat: r } = y(a.value.setting.subsidiaries), s = r.find((u) => u.id === t);
130
- return {
131
- id: s == null ? void 0 : s.id,
132
- name: (s == null ? void 0 : s.name) || "",
133
- fullName: `${(s == null ? void 0 : s.fullName) ?? ""}`
134
- };
135
- },
136
- currentVendorSubsidiary(e) {
137
- var r;
138
- const i = ((r = a.value.setting.vendors.find((s) => s.id === e)) == null ? void 0 : r.subsidiaryId) ?? null, { flat: n } = y(a.value.setting.subsidiaries), t = n.find((s) => s.id === i);
139
- return {
140
- id: t == null ? void 0 : t.id,
141
- name: (t == null ? void 0 : t.name) || "",
142
- fullName: `${(t == null ? void 0 : t.fullName) ?? ""}`
143
- };
144
- },
145
- get subsidiaryOptions() {
146
- const { flat: e } = y(a.value.setting.subsidiaries);
147
- return e.map((i) => ({
148
- label: `${"   ".repeat(i.depth)}${i.name}`,
149
- value: {
150
- id: i.id,
151
- name: i.name
152
- }
153
- }));
154
- },
155
- getAvailableItems(e) {
156
- const { available: i } = y(a.value.setting.subsidiaries, e);
157
- return a.value.setting.items.filter((n) => n.subsidiaryIds.some((t) => i.includes(t))).map((n) => n.id);
158
- },
159
- getAvailableMeasurements(e, i) {
160
- const n = a.value.setting.items.find((u) => u.id === e);
161
- if (!n)
162
- return [];
163
- const { available: t, flatMapping: r } = y(
164
- a.value.setting.subsidiaries,
165
- i
166
- ), d = a.value.setting.childItems.filter((u) => {
167
- let c = u.subsidiaryIds;
168
- if (u.includeChildren == !0)
169
- for (const b of u.subsidiaryIds)
170
- c = c.concat(r[b]);
171
- return c = [...new Set(c)], u.parentNetSuiteId === n.netSuiteId && c.some((b) => t.includes(b));
172
- }).flatMap((u) => u.unitTypeId);
173
- return a.value.setting.units.filter((u) => d.includes(u.netSuiteId)).flatMap((u) => u.measurements).map((u) => u.id);
174
- },
175
- async readSetting() {
176
- console.log("netsuite init");
177
- const i = await h().readSetting();
178
- if (i) {
179
- this.state.setting = i;
180
- const { flat: n } = y(a.value.setting.subsidiaries);
181
- for (const t of i.vendors) {
182
- const r = n.find((s) => s.id === t.subsidiaryId);
183
- this.state.vendorSubsidiary[t.id] = (r == null ? void 0 : r.fullName) || "";
184
- }
185
- }
186
- this.state.isReady = !0;
187
- },
188
- getVendorSubsidiaryName(e) {
189
- return this.state.vendorSubsidiary[e] || "";
190
- },
191
- async syncTransferOrder(e, i, n) {
192
- const t = h(), r = N(), s = r.currentLocation.doc._id, d = r.currentLocation.type;
193
- await t.syncTransferOrder(e, `${d}_${s}`, i, n);
194
- },
195
- getItemPKTCode(e, i) {
196
- const n = m.value.get(e._id);
197
- let t = null;
198
- if (n && n.length > 0) {
199
- const r = n[0];
200
- r.pktCode && (t = r.pktCode);
201
- const s = a.value.setting.units.find((u) => {
202
- var c;
203
- return u.id === ((c = e.unit) == null ? void 0 : c._id);
204
- }), d = r.netSuiteId;
205
- if (i) {
206
- const u = s == null ? void 0 : s.measurements.find((c) => c.id === i);
207
- if (u) {
208
- const c = ["ZPH"], I = a.value.setting.childItems.filter(
209
- (v) => v.parentNetSuiteId === d && v.unitTypeId === (s == null ? void 0 : s.netSuiteId) && v.unitOfMeasureId === u.netSuiteId && v.externalId && !c.some((T) => {
210
- var B;
211
- return (B = v.externalId) == null ? void 0 : B.startsWith(T);
212
- })
213
- )[0];
214
- I && (I.pktCode && (t = I.pktCode), I.externalId && (t = I.externalId));
215
- }
216
- }
217
- }
218
- return t;
219
- }
220
- };
221
- }
222
- function y(g, l) {
223
- const p = [], m = [];
224
- function o(n, t, r = !1) {
225
- return g.filter((d) => d.parentId === t).map((d) => ((r || d.id === l || !l) && p.push(d.id), {
226
- id: d.id,
227
- name: d.name,
228
- country: d.country,
229
- currency: d.currency,
230
- parentId: d.parentId,
231
- depth: n,
232
- children: o(n + 1, d.id, r || d.id === l)
233
- }));
234
- }
235
- const f = o(0, null), e = {};
236
- function i(n, t = "") {
237
- const r = n.fullName || n.name, s = t ? `${t} : ${r}` : r;
238
- m.push({ ...n, fullName: s }), e[n.id] = [n.id];
239
- for (const d of n.children)
240
- i(d, s), e[n.id].push(...e[d.id]);
241
- }
242
- return f.forEach((n) => i(n)), {
243
- tree: f,
244
- available: p,
245
- flat: m,
246
- flatMapping: e
247
- };
248
- }
249
- export {
250
- E as u
251
- };