@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
|
@@ -1,224 +0,0 @@
|
|
|
1
|
-
import { j as N, h as B, a as h, u as I } from "./app-CVmmRPWd.js";
|
|
2
|
-
import { useCoreStore as L } from "@feedmepos/mf-common";
|
|
3
|
-
import { useSnackbar as $ } from "@feedmepos/ui-library";
|
|
4
|
-
import { ref as M, computed as v } from "vue";
|
|
5
|
-
const b = N((g, c) => {
|
|
6
|
-
const y = L(), l = $();
|
|
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 = y.currentBusiness.value) == null ? void 0 : e._id) ?? "", m = `${g.netSuiteBackendUrl}/${d}/settings`;
|
|
18
|
-
return await c.get(m);
|
|
19
|
-
},
|
|
20
|
-
async syncPurchaseOrder(d, m) {
|
|
21
|
-
var t;
|
|
22
|
-
const e = ((t = y.currentBusiness.value) == null ? void 0 : t._id) ?? "", i = `${g.netSuiteBackendUrl}/${e}/sync/purchase-order`;
|
|
23
|
-
return await c.post(i, {
|
|
24
|
-
purchaseOrderId: d,
|
|
25
|
-
locationId: m
|
|
26
|
-
});
|
|
27
|
-
},
|
|
28
|
-
urls: g
|
|
29
|
-
};
|
|
30
|
-
});
|
|
31
|
-
function T() {
|
|
32
|
-
return {
|
|
33
|
-
setting: {
|
|
34
|
-
_id: "",
|
|
35
|
-
items: [],
|
|
36
|
-
childItems: [],
|
|
37
|
-
units: [],
|
|
38
|
-
locations: [],
|
|
39
|
-
subsidiaries: [],
|
|
40
|
-
vendors: [],
|
|
41
|
-
enable: !1,
|
|
42
|
-
syncedAt: null
|
|
43
|
-
},
|
|
44
|
-
vendorSubsidiary: {},
|
|
45
|
-
isReady: !1
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
const r = M(T());
|
|
49
|
-
function A() {
|
|
50
|
-
const g = h(), c = v(() => r.value.setting.items.groupBy("netSuiteId", (e) => e.id)), y = v(() => r.value.setting.units.flatMap((e) => e.measurements).groupBy("netSuiteId", (e) => e.id)), l = v(() => r.value.setting.items.groupBy((e) => e.id)), d = v(
|
|
51
|
-
() => r.value.setting.units.groupBy(
|
|
52
|
-
(e) => e.netSuiteId,
|
|
53
|
-
(e) => g.unitById[e.id]
|
|
54
|
-
)
|
|
55
|
-
), m = v(
|
|
56
|
-
() => r.value.setting.units.flatMap(
|
|
57
|
-
(e) => e.measurements.map((i) => {
|
|
58
|
-
var t;
|
|
59
|
-
return {
|
|
60
|
-
unit: (t = d.value.get(e.netSuiteId)) == null ? void 0 : t[0],
|
|
61
|
-
measurement: i
|
|
62
|
-
};
|
|
63
|
-
})
|
|
64
|
-
).groupBy(
|
|
65
|
-
(e) => e.measurement.netSuiteId,
|
|
66
|
-
(e) => {
|
|
67
|
-
var i;
|
|
68
|
-
return (i = e.unit) == null ? void 0 : i.measurements.find((t) => t.id === e.measurement.id);
|
|
69
|
-
}
|
|
70
|
-
)
|
|
71
|
-
);
|
|
72
|
-
return {
|
|
73
|
-
// state
|
|
74
|
-
get isReady() {
|
|
75
|
-
return r.value.isReady;
|
|
76
|
-
},
|
|
77
|
-
get isEnabled() {
|
|
78
|
-
return r.value.setting.enable;
|
|
79
|
-
},
|
|
80
|
-
get isBusinessLocation() {
|
|
81
|
-
return I().businessLevel;
|
|
82
|
-
},
|
|
83
|
-
get state() {
|
|
84
|
-
return r.value;
|
|
85
|
-
},
|
|
86
|
-
get netSuiteItemIdToSkuId() {
|
|
87
|
-
return c.value;
|
|
88
|
-
},
|
|
89
|
-
get netSuiteMeasurementIdToMeasurementId() {
|
|
90
|
-
return y.value;
|
|
91
|
-
},
|
|
92
|
-
get netSuiteItemBySkuId() {
|
|
93
|
-
return l.value;
|
|
94
|
-
},
|
|
95
|
-
get unitByNetsuiteId() {
|
|
96
|
-
return d.value;
|
|
97
|
-
},
|
|
98
|
-
get measurementByNetsuiteId() {
|
|
99
|
-
return m.value;
|
|
100
|
-
},
|
|
101
|
-
getNetSuiteVendor(e) {
|
|
102
|
-
return r.value.setting.vendors.find((i) => i.id === e);
|
|
103
|
-
},
|
|
104
|
-
getNetSuiteLocation(e) {
|
|
105
|
-
const [i, t] = e.split("_");
|
|
106
|
-
return r.value.setting.locations.find((s) => s.id == t && s.type == i);
|
|
107
|
-
},
|
|
108
|
-
getLocationSubsidiary(e) {
|
|
109
|
-
var s;
|
|
110
|
-
if (!e)
|
|
111
|
-
return {
|
|
112
|
-
id: void 0,
|
|
113
|
-
name: "",
|
|
114
|
-
fullName: ""
|
|
115
|
-
};
|
|
116
|
-
const i = ((s = r.value.setting.locations.find((a) => a.netSuiteId === e)) == null ? void 0 : s.subsidiaryId) ?? null, { flat: t } = f(r.value.setting.subsidiaries), n = t.find((a) => a.id === i);
|
|
117
|
-
return {
|
|
118
|
-
id: n == null ? void 0 : n.id,
|
|
119
|
-
name: (n == null ? void 0 : n.name) || "",
|
|
120
|
-
fullName: `${(n == null ? void 0 : n.fullName) ?? ""}`
|
|
121
|
-
};
|
|
122
|
-
},
|
|
123
|
-
currentLocationSubsidiary() {
|
|
124
|
-
var o;
|
|
125
|
-
const e = I(), i = e.currentLocation.doc._id, t = e.currentLocation.type, n = ((o = r.value.setting.locations.find(
|
|
126
|
-
(u) => u.id === i && u.type == t
|
|
127
|
-
)) == null ? void 0 : o.subsidiaryId) ?? null, { flat: s } = f(r.value.setting.subsidiaries), a = s.find((u) => u.id === n);
|
|
128
|
-
return {
|
|
129
|
-
id: a == null ? void 0 : a.id,
|
|
130
|
-
name: (a == null ? void 0 : a.name) || "",
|
|
131
|
-
fullName: `${(a == null ? void 0 : a.fullName) ?? ""}`
|
|
132
|
-
};
|
|
133
|
-
},
|
|
134
|
-
currentVendorSubsidiary(e) {
|
|
135
|
-
var s;
|
|
136
|
-
const i = ((s = r.value.setting.vendors.find((a) => a.id === e)) == null ? void 0 : s.subsidiaryId) ?? null, { flat: t } = f(r.value.setting.subsidiaries), n = t.find((a) => a.id === i);
|
|
137
|
-
return {
|
|
138
|
-
id: n == null ? void 0 : n.id,
|
|
139
|
-
name: (n == null ? void 0 : n.name) || "",
|
|
140
|
-
fullName: `${(n == null ? void 0 : n.fullName) ?? ""}`
|
|
141
|
-
};
|
|
142
|
-
},
|
|
143
|
-
get subsidiaryOptions() {
|
|
144
|
-
const { flat: e } = f(r.value.setting.subsidiaries);
|
|
145
|
-
return e.map((i) => ({
|
|
146
|
-
label: `${" ".repeat(i.depth)}${i.name}`,
|
|
147
|
-
value: {
|
|
148
|
-
id: i.id,
|
|
149
|
-
name: i.name
|
|
150
|
-
}
|
|
151
|
-
}));
|
|
152
|
-
},
|
|
153
|
-
getAvailableItems(e) {
|
|
154
|
-
const { available: i } = f(r.value.setting.subsidiaries, e);
|
|
155
|
-
return r.value.setting.items.filter((t) => t.subsidiaryIds.some((n) => i.includes(n))).map((t) => t.id);
|
|
156
|
-
},
|
|
157
|
-
getAvailableMeasurements(e, i) {
|
|
158
|
-
const t = r.value.setting.items.find((u) => u.id === e);
|
|
159
|
-
if (!t)
|
|
160
|
-
return [];
|
|
161
|
-
const { available: n, flatMapping: s } = f(
|
|
162
|
-
r.value.setting.subsidiaries,
|
|
163
|
-
i
|
|
164
|
-
), o = r.value.setting.childItems.filter((u) => {
|
|
165
|
-
let p = u.subsidiaryIds;
|
|
166
|
-
if (u.includeChildren == !0)
|
|
167
|
-
for (const S of u.subsidiaryIds)
|
|
168
|
-
p = p.concat(s[S]);
|
|
169
|
-
return p = [...new Set(p)], u.parentNetSuiteId === t.netSuiteId && p.some((S) => n.includes(S));
|
|
170
|
-
}).flatMap((u) => u.unitTypeId);
|
|
171
|
-
return r.value.setting.units.filter((u) => o.includes(u.netSuiteId)).flatMap((u) => u.measurements).map((u) => u.id);
|
|
172
|
-
},
|
|
173
|
-
async readSetting() {
|
|
174
|
-
console.log("netsuite init");
|
|
175
|
-
const i = await b().readSetting();
|
|
176
|
-
if (i) {
|
|
177
|
-
this.state.setting = i;
|
|
178
|
-
const { flat: t } = f(r.value.setting.subsidiaries);
|
|
179
|
-
for (const n of i.vendors) {
|
|
180
|
-
const s = t.find((a) => a.id === n.subsidiaryId);
|
|
181
|
-
this.state.vendorSubsidiary[n.id] = (s == null ? void 0 : s.fullName) || "";
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
this.state.isReady = !0;
|
|
185
|
-
},
|
|
186
|
-
getVendorSubsidiaryName(e) {
|
|
187
|
-
return this.state.vendorSubsidiary[e] || "";
|
|
188
|
-
},
|
|
189
|
-
async syncPurchaseOrder(e) {
|
|
190
|
-
const i = b(), t = I(), n = t.currentLocation.doc._id, s = t.currentLocation.type;
|
|
191
|
-
await i.syncPurchaseOrder(e, `${s}_${n}`);
|
|
192
|
-
}
|
|
193
|
-
};
|
|
194
|
-
}
|
|
195
|
-
function f(g, c) {
|
|
196
|
-
const y = [], l = [];
|
|
197
|
-
function d(t, n, s = !1) {
|
|
198
|
-
return g.filter((o) => o.parentId === n).map((o) => ((s || o.id === c || !c) && y.push(o.id), {
|
|
199
|
-
id: o.id,
|
|
200
|
-
name: o.name,
|
|
201
|
-
country: o.country,
|
|
202
|
-
currency: o.currency,
|
|
203
|
-
parentId: o.parentId,
|
|
204
|
-
depth: t,
|
|
205
|
-
children: d(t + 1, o.id, s || o.id === c)
|
|
206
|
-
}));
|
|
207
|
-
}
|
|
208
|
-
const m = d(0, null), e = {};
|
|
209
|
-
function i(t, n = "") {
|
|
210
|
-
const s = t.fullName || t.name, a = n ? `${n} : ${s}` : s;
|
|
211
|
-
l.push({ ...t, fullName: a }), e[t.id] = [t.id];
|
|
212
|
-
for (const o of t.children)
|
|
213
|
-
i(o, a), e[t.id].push(...e[o.id]);
|
|
214
|
-
}
|
|
215
|
-
return m.forEach((t) => i(t)), {
|
|
216
|
-
tree: m,
|
|
217
|
-
available: y,
|
|
218
|
-
flat: l,
|
|
219
|
-
flatMapping: e
|
|
220
|
-
};
|
|
221
|
-
}
|
|
222
|
-
export {
|
|
223
|
-
A as u
|
|
224
|
-
};
|