@feedmepos/mf-inventory-portal 0.0.23-dev.5 → 0.0.23-dev.7
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.
- package/dist/{App-FsTwD8n6.js → App-MWE4uZN2.js} +3 -3
- package/dist/{ApprovalView-BXPFwc54.js → ApprovalView-DTBGzcfq.js} +4 -4
- package/dist/{BindingsDialog-CHkMKliu.js → BindingsDialog-BaK8KE5C.js} +2 -2
- package/dist/{BindingsPicker-D12ragAp.js → BindingsPicker-C6YXPChW.js} +2 -2
- package/dist/{BindingsTable-COag_o6k.js → BindingsTable-BO3FV22B.js} +4 -4
- package/dist/{ClosingTemplateView-D8jKBDLt.js → ClosingTemplateView--hHcPJJj.js} +10 -10
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BQtdWZI5.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-C6setquX.js} +4 -4
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-RNrM3eSt.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-IRl6BsoL.js} +2 -2
- package/dist/{FmMultiselectDialog-BQVgChfN.js → FmMultiselectDialog-jlCh7zDq.js} +3 -3
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-DECE_vKa.js → FmUnitInput.vue_vue_type_script_setup_true_lang-TeysdWIy.js} +2 -2
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-BUy5XAra.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-BAj6ln1k.js} +1 -1
- package/dist/{IngredientGroupView-C5W6TKVb.js → IngredientGroupView-BM07A4fB.js} +5 -5
- package/dist/{IngredientsView-DS18EGAg.js → IngredientsView-J9NM-pfU.js} +9 -9
- package/dist/{IntegrationView-BCXq5C_i.js → IntegrationView-DeR9JiDO.js} +4 -4
- package/dist/{InventoryBindingForm-D2oUHybU.js → InventoryBindingForm-Bhk9dMsL.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-Do_WCGzA.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-yaHMbpFX.js} +5 -5
- package/dist/{InventoryBindingSummary-CTzl--8n.js → InventoryBindingSummary-BVujhHLB.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CrdZrQaL.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-ClaOjAPR.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-Ce01_vRB.js → PremiumBadge.vue_vue_type_script_setup_true_lang-Dh9RYSdM.js} +2 -2
- package/dist/{PurchaseOrderPrintPreview-C_cUNqE4.js → PurchaseOrderPrintPreview-B7SKVm_d.js} +1 -1
- package/dist/{ReceiveRequestView-iKUSCnjc.js → ReceiveRequestView-CNaohBx7.js} +18 -18
- package/dist/{RecipeView-9jSzsC2o.js → RecipeView-B5POouqT.js} +7 -7
- package/dist/{StockView-CkLx8c-q.js → StockView-DxBkg4B1.js} +12 -12
- package/dist/{SupplierView-zo_pVaja.js → SupplierView-DSmE8k_W.js} +2354 -809
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-_luCbCMS.js +1228 -0
- package/dist/{TransferTemplateView-CkJs2zmu.js → TransferTemplateView-CE8FN02v.js} +13 -13
- package/dist/{UnitView-DdUCn3QX.js → UnitView-LmhfuQ7G.js} +5 -5
- package/dist/{WarehouseView-BSKKIUlu.js → WarehouseView-DNPfTpbR.js} +4 -4
- package/dist/api/netsuite.d.ts +1 -1
- package/dist/{app-CVmmRPWd.js → app-CHUTVCqW.js} +755 -748
- package/dist/app.js +1 -1
- package/dist/{date2-B8or025L.js → date2-jflNp4un.js} +1 -1
- package/dist/{dayjs.min-CIK0S4n6.js → dayjs.min-Ura1hQS9.js} +1 -1
- package/dist/{decimal-DnON7sYp.js → decimal-MDopy-42.js} +1 -1
- package/dist/{defineDeepModel-ZvHrR7G4.js → defineDeepModel-DJJQtyLG.js} +1 -1
- package/dist/{feature-CfLuWtSb.js → feature-1MCtECkH.js} +1 -1
- package/dist/{format-time-from-id-DgZIvkJL.js → format-time-from-id-C_Ql1G1m.js} +1 -1
- package/dist/{format-unit-display-BL51mLWH.js → format-unit-display-8CZtD9mX.js} +8 -8
- package/dist/{fuzzy-BrZpb26S.js → fuzzy-BYzBSFQ9.js} +1 -1
- package/dist/{index-Cgi2fvdH.js → index-B17P8VA1.js} +1 -1
- package/dist/{index-BHBzUsyp.js → index-BfpXXehq.js} +1 -1
- package/dist/index-DacyZLBG.js +12087 -0
- package/dist/netsuite-N4WoiSJk.js +225 -0
- package/dist/{rules-CyLD3MFT.js → rules-XXZyqauM.js} +2 -2
- package/dist/stores/integration/netsuite.d.ts +1 -1
- package/dist/{supplier-pYrSAyO6.js → supplier-CTbtvSjM.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-inventory-binding-dialog-BRfRiwVk.js → use-inventory-binding-dialog-Ri_zc-M3.js} +2 -2
- package/dist/{use-template-enabled-locations-2-BFm4_EuV.js → use-template-enabled-locations-2-BfvnBeUQ.js} +2 -2
- package/dist/{xlsx-BFsAkixf.js → xlsx-BHa16rol.js} +1 -1
- package/dist/{xlsx.util-ClkX4qFH.js → xlsx.util-CNw5O-OJ.js} +1 -1
- package/package.json +1 -1
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-DVkVNrNG.js +0 -1209
- package/dist/index-20AY5LL4.js +0 -10545
- package/dist/netsuite-C6f_DtMT.js +0 -224
- package/dist/normalizeArguments-DP7Hrren.js +0 -1552
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import { j as N, h as B, a as L, u as I } from "./app-CHUTVCqW.js";
|
|
2
|
+
import { useCoreStore as $ } from "@feedmepos/mf-common";
|
|
3
|
+
import { useSnackbar as T } from "@feedmepos/ui-library";
|
|
4
|
+
import { ref as M, computed as p } from "vue";
|
|
5
|
+
const b = N((f, c) => {
|
|
6
|
+
const g = $(), l = T();
|
|
7
|
+
return c.onError(async (d) => {
|
|
8
|
+
if (d instanceof B)
|
|
9
|
+
throw l == null || l.open({
|
|
10
|
+
title: d.title,
|
|
11
|
+
message: d.message,
|
|
12
|
+
type: "error"
|
|
13
|
+
}), d;
|
|
14
|
+
}), {
|
|
15
|
+
async readSetting() {
|
|
16
|
+
var e;
|
|
17
|
+
const d = ((e = g.currentBusiness.value) == null ? void 0 : e._id) ?? "", m = `${f.netSuiteBackendUrl}/${d}/settings`;
|
|
18
|
+
return await c.get(m);
|
|
19
|
+
},
|
|
20
|
+
async syncTransferOrder(d, m, e) {
|
|
21
|
+
var t;
|
|
22
|
+
const i = ((t = g.currentBusiness.value) == null ? void 0 : t._id) ?? "", n = `${f.netSuiteBackendUrl}/${i}/sync/transfer-order`;
|
|
23
|
+
return await c.post(n, {
|
|
24
|
+
type: d,
|
|
25
|
+
id: m,
|
|
26
|
+
locationId: e
|
|
27
|
+
});
|
|
28
|
+
},
|
|
29
|
+
urls: f
|
|
30
|
+
};
|
|
31
|
+
});
|
|
32
|
+
function h() {
|
|
33
|
+
return {
|
|
34
|
+
setting: {
|
|
35
|
+
_id: "",
|
|
36
|
+
items: [],
|
|
37
|
+
childItems: [],
|
|
38
|
+
units: [],
|
|
39
|
+
locations: [],
|
|
40
|
+
subsidiaries: [],
|
|
41
|
+
vendors: [],
|
|
42
|
+
enable: !1,
|
|
43
|
+
syncedAt: null
|
|
44
|
+
},
|
|
45
|
+
vendorSubsidiary: {},
|
|
46
|
+
isReady: !1
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
const a = M(h());
|
|
50
|
+
function A() {
|
|
51
|
+
const f = L(), c = p(() => a.value.setting.items.groupBy("netSuiteId", (e) => e.id)), g = p(() => a.value.setting.units.flatMap((e) => e.measurements).groupBy("netSuiteId", (e) => e.id)), l = p(() => a.value.setting.items.groupBy((e) => e.id)), d = p(
|
|
52
|
+
() => a.value.setting.units.groupBy(
|
|
53
|
+
(e) => e.netSuiteId,
|
|
54
|
+
(e) => f.unitById[e.id]
|
|
55
|
+
)
|
|
56
|
+
), m = p(
|
|
57
|
+
() => a.value.setting.units.flatMap(
|
|
58
|
+
(e) => e.measurements.map((i) => {
|
|
59
|
+
var n;
|
|
60
|
+
return {
|
|
61
|
+
unit: (n = d.value.get(e.netSuiteId)) == null ? void 0 : n[0],
|
|
62
|
+
measurement: i
|
|
63
|
+
};
|
|
64
|
+
})
|
|
65
|
+
).groupBy(
|
|
66
|
+
(e) => e.measurement.netSuiteId,
|
|
67
|
+
(e) => {
|
|
68
|
+
var i;
|
|
69
|
+
return (i = e.unit) == null ? void 0 : i.measurements.find((n) => n.id === e.measurement.id);
|
|
70
|
+
}
|
|
71
|
+
)
|
|
72
|
+
);
|
|
73
|
+
return {
|
|
74
|
+
// state
|
|
75
|
+
get isReady() {
|
|
76
|
+
return a.value.isReady;
|
|
77
|
+
},
|
|
78
|
+
get isEnabled() {
|
|
79
|
+
return a.value.setting.enable;
|
|
80
|
+
},
|
|
81
|
+
get isBusinessLocation() {
|
|
82
|
+
return I().businessLevel;
|
|
83
|
+
},
|
|
84
|
+
get state() {
|
|
85
|
+
return a.value;
|
|
86
|
+
},
|
|
87
|
+
get netSuiteItemIdToSkuId() {
|
|
88
|
+
return c.value;
|
|
89
|
+
},
|
|
90
|
+
get netSuiteMeasurementIdToMeasurementId() {
|
|
91
|
+
return g.value;
|
|
92
|
+
},
|
|
93
|
+
get netSuiteItemBySkuId() {
|
|
94
|
+
return l.value;
|
|
95
|
+
},
|
|
96
|
+
get unitByNetsuiteId() {
|
|
97
|
+
return d.value;
|
|
98
|
+
},
|
|
99
|
+
get measurementByNetsuiteId() {
|
|
100
|
+
return m.value;
|
|
101
|
+
},
|
|
102
|
+
getNetSuiteVendor(e) {
|
|
103
|
+
return a.value.setting.vendors.find((i) => i.id === e);
|
|
104
|
+
},
|
|
105
|
+
getNetSuiteLocation(e) {
|
|
106
|
+
const [i, n] = e.split("_");
|
|
107
|
+
return a.value.setting.locations.find((r) => r.id == n && r.type == i);
|
|
108
|
+
},
|
|
109
|
+
getLocationSubsidiary(e) {
|
|
110
|
+
var r;
|
|
111
|
+
if (!e)
|
|
112
|
+
return {
|
|
113
|
+
id: void 0,
|
|
114
|
+
name: "",
|
|
115
|
+
fullName: ""
|
|
116
|
+
};
|
|
117
|
+
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);
|
|
118
|
+
return {
|
|
119
|
+
id: t == null ? void 0 : t.id,
|
|
120
|
+
name: (t == null ? void 0 : t.name) || "",
|
|
121
|
+
fullName: `${(t == null ? void 0 : t.fullName) ?? ""}`
|
|
122
|
+
};
|
|
123
|
+
},
|
|
124
|
+
currentLocationSubsidiary() {
|
|
125
|
+
var o;
|
|
126
|
+
const e = I(), i = e.currentLocation.doc._id, n = e.currentLocation.type, t = ((o = a.value.setting.locations.find(
|
|
127
|
+
(u) => u.id === i && u.type == n
|
|
128
|
+
)) == null ? void 0 : o.subsidiaryId) ?? null, { flat: r } = y(a.value.setting.subsidiaries), s = r.find((u) => u.id === t);
|
|
129
|
+
return {
|
|
130
|
+
id: s == null ? void 0 : s.id,
|
|
131
|
+
name: (s == null ? void 0 : s.name) || "",
|
|
132
|
+
fullName: `${(s == null ? void 0 : s.fullName) ?? ""}`
|
|
133
|
+
};
|
|
134
|
+
},
|
|
135
|
+
currentVendorSubsidiary(e) {
|
|
136
|
+
var r;
|
|
137
|
+
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);
|
|
138
|
+
return {
|
|
139
|
+
id: t == null ? void 0 : t.id,
|
|
140
|
+
name: (t == null ? void 0 : t.name) || "",
|
|
141
|
+
fullName: `${(t == null ? void 0 : t.fullName) ?? ""}`
|
|
142
|
+
};
|
|
143
|
+
},
|
|
144
|
+
get subsidiaryOptions() {
|
|
145
|
+
const { flat: e } = y(a.value.setting.subsidiaries);
|
|
146
|
+
return e.map((i) => ({
|
|
147
|
+
label: `${" ".repeat(i.depth)}${i.name}`,
|
|
148
|
+
value: {
|
|
149
|
+
id: i.id,
|
|
150
|
+
name: i.name
|
|
151
|
+
}
|
|
152
|
+
}));
|
|
153
|
+
},
|
|
154
|
+
getAvailableItems(e) {
|
|
155
|
+
const { available: i } = y(a.value.setting.subsidiaries, e);
|
|
156
|
+
return a.value.setting.items.filter((n) => n.subsidiaryIds.some((t) => i.includes(t))).map((n) => n.id);
|
|
157
|
+
},
|
|
158
|
+
getAvailableMeasurements(e, i) {
|
|
159
|
+
const n = a.value.setting.items.find((u) => u.id === e);
|
|
160
|
+
if (!n)
|
|
161
|
+
return [];
|
|
162
|
+
const { available: t, flatMapping: r } = y(
|
|
163
|
+
a.value.setting.subsidiaries,
|
|
164
|
+
i
|
|
165
|
+
), o = a.value.setting.childItems.filter((u) => {
|
|
166
|
+
let v = u.subsidiaryIds;
|
|
167
|
+
if (u.includeChildren == !0)
|
|
168
|
+
for (const S of u.subsidiaryIds)
|
|
169
|
+
v = v.concat(r[S]);
|
|
170
|
+
return v = [...new Set(v)], u.parentNetSuiteId === n.netSuiteId && v.some((S) => t.includes(S));
|
|
171
|
+
}).flatMap((u) => u.unitTypeId);
|
|
172
|
+
return a.value.setting.units.filter((u) => o.includes(u.netSuiteId)).flatMap((u) => u.measurements).map((u) => u.id);
|
|
173
|
+
},
|
|
174
|
+
async readSetting() {
|
|
175
|
+
console.log("netsuite init");
|
|
176
|
+
const i = await b().readSetting();
|
|
177
|
+
if (i) {
|
|
178
|
+
this.state.setting = i;
|
|
179
|
+
const { flat: n } = y(a.value.setting.subsidiaries);
|
|
180
|
+
for (const t of i.vendors) {
|
|
181
|
+
const r = n.find((s) => s.id === t.subsidiaryId);
|
|
182
|
+
this.state.vendorSubsidiary[t.id] = (r == null ? void 0 : r.fullName) || "";
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
this.state.isReady = !0;
|
|
186
|
+
},
|
|
187
|
+
getVendorSubsidiaryName(e) {
|
|
188
|
+
return this.state.vendorSubsidiary[e] || "";
|
|
189
|
+
},
|
|
190
|
+
async syncTransferOrder(e, i) {
|
|
191
|
+
const n = b(), t = I(), r = t.currentLocation.doc._id, s = t.currentLocation.type;
|
|
192
|
+
await n.syncTransferOrder(e, i, `${s}_${r}`);
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
function y(f, c) {
|
|
197
|
+
const g = [], l = [];
|
|
198
|
+
function d(n, t, r = !1) {
|
|
199
|
+
return f.filter((o) => o.parentId === t).map((o) => ((r || o.id === c || !c) && g.push(o.id), {
|
|
200
|
+
id: o.id,
|
|
201
|
+
name: o.name,
|
|
202
|
+
country: o.country,
|
|
203
|
+
currency: o.currency,
|
|
204
|
+
parentId: o.parentId,
|
|
205
|
+
depth: n,
|
|
206
|
+
children: d(n + 1, o.id, r || o.id === c)
|
|
207
|
+
}));
|
|
208
|
+
}
|
|
209
|
+
const m = d(0, null), e = {};
|
|
210
|
+
function i(n, t = "") {
|
|
211
|
+
const r = n.fullName || n.name, s = t ? `${t} : ${r}` : r;
|
|
212
|
+
l.push({ ...n, fullName: s }), e[n.id] = [n.id];
|
|
213
|
+
for (const o of n.children)
|
|
214
|
+
i(o, s), e[n.id].push(...e[o.id]);
|
|
215
|
+
}
|
|
216
|
+
return m.forEach((n) => i(n)), {
|
|
217
|
+
tree: m,
|
|
218
|
+
available: g,
|
|
219
|
+
flat: l,
|
|
220
|
+
flatMapping: e
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
export {
|
|
224
|
+
A as u
|
|
225
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as s } from "./index-
|
|
2
|
-
import { c as d, a as b } from "./date2-
|
|
1
|
+
import { F as s } from "./index-B17P8VA1.js";
|
|
2
|
+
import { c as d, a as b } from "./date2-jflNp4un.js";
|
|
3
3
|
function P(t, n) {
|
|
4
4
|
return s.convertPrecision({
|
|
5
5
|
value: t,
|
|
@@ -168,7 +168,7 @@ export declare function useNetSuiteStore(): {
|
|
|
168
168
|
getAvailableMeasurements(skuId: string, subsidiaryId?: string | null): string[];
|
|
169
169
|
readSetting(): Promise<void>;
|
|
170
170
|
getVendorSubsidiaryName(supplierId: string): string;
|
|
171
|
-
|
|
171
|
+
syncTransferOrder(type: string, id: string): Promise<void>;
|
|
172
172
|
};
|
|
173
173
|
export type FdoNetSuiteSubsidiaryWithChildren = FdoNetSuiteSubsidiary & {
|
|
174
174
|
fullName?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as m, u, i as y, p as b, q as v } from "./app-
|
|
1
|
+
import { j as m, u, i as y, p as b, q as v } from "./app-CHUTVCqW.js";
|
|
2
2
|
import { useCoreStore as c } from "@feedmepos/mf-common";
|
|
3
3
|
import { defineStore as w } from "pinia";
|
|
4
4
|
import { ref as l, computed as d } from "vue";
|