@feedmepos/mf-inventory-portal 0.0.23-dev.4 → 0.0.23-dev.6
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-DReDvY0M.js → App-CpS8bz8y.js} +3 -3
- package/dist/{ApprovalView-BMZlYmRk.js → ApprovalView-BaAkilac.js} +4 -4
- package/dist/{BindingsDialog-Y2K4I7H7.js → BindingsDialog-2XXRx4lk.js} +2 -2
- package/dist/{BindingsPicker-DKBq9c37.js → BindingsPicker-Dvim94UE.js} +2 -2
- package/dist/{BindingsTable-45v4SDfp.js → BindingsTable-BqEaLZBo.js} +4 -4
- package/dist/{ClosingTemplateView-CKJVYSbj.js → ClosingTemplateView-CuiuCYbL.js} +10 -10
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CMEOp-0r.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CjPxBy2G.js} +4 -4
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BhdcqRh-.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-LohSJO6y.js} +2 -2
- package/dist/{FmMultiselectDialog-D7YtdoyJ.js → FmMultiselectDialog-BU399-z7.js} +3 -3
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-C1DjyjyH.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BRdc0tSs.js} +2 -2
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-zjvFEF5C.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-r9udN1Fi.js} +1 -1
- package/dist/{IngredientGroupView-BuP-HGeg.js → IngredientGroupView-DQDn5HC2.js} +5 -5
- package/dist/IngredientsView-BkmK9Km6.js +1665 -0
- package/dist/{IntegrationView-kYCaKG0o.js → IntegrationView-y3_6lfnA.js} +4 -4
- package/dist/{InventoryBindingForm-BXHq4h-n.js → InventoryBindingForm-DvoK_yl7.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CVxJ_bV3.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-Bs4QnmyR.js} +5 -5
- package/dist/{InventoryBindingSummary-Bjasfc_v.js → InventoryBindingSummary-Bsb96T1i.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DM0C4raP.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-hFoaEGZH.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-C3O3JebE.js → PremiumBadge.vue_vue_type_script_setup_true_lang-Bbn8JMZo.js} +2 -2
- package/dist/{PurchaseOrderPrintPreview-CmjkfTTS.js → PurchaseOrderPrintPreview-C-_BepiN.js} +1 -1
- package/dist/{ReceiveRequestView-aQZJO8sq.js → ReceiveRequestView-o4YjzcbG.js} +18 -18
- package/dist/{RecipeView-DXO43tFi.js → RecipeView-CKXz1qAw.js} +7 -7
- package/dist/{StockView-D9no-mrA.js → StockView-CyY8hbMg.js} +12 -12
- package/dist/{SupplierView-DAx7E7sR.js → SupplierView-fwI-Y9WB.js} +2334 -787
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-0CSMleWi.js +1224 -0
- package/dist/{TransferTemplateView-CfxdQF1t.js → TransferTemplateView-BUbVs-yI.js} +13 -13
- package/dist/{UnitView-CQPGZ8-r.js → UnitView-CVbxV_LV.js} +5 -5
- package/dist/{WarehouseView-jy-RNCgy.js → WarehouseView-koM4j5Qo.js} +4 -4
- package/dist/api/netsuite.d.ts +1 -1
- package/dist/{app-KnSMkJBV.js → app-BRONF5GM.js} +755 -748
- package/dist/app.js +1 -1
- package/dist/{date2-CIeUqUIc.js → date2-BofoGJlV.js} +1 -1
- package/dist/{dayjs.min-Df5jSnDJ.js → dayjs.min-Byiq9_Vp.js} +1 -1
- package/dist/{decimal-BAc9M88Q.js → decimal-BB1foOxB.js} +1 -1
- package/dist/{defineDeepModel-BfuQAIoM.js → defineDeepModel-CJyeAQ6C.js} +1 -1
- package/dist/{feature-dwB4OxRQ.js → feature-CKZ3kQZ2.js} +12 -6
- package/dist/{format-time-from-id-BbvzyIN6.js → format-time-from-id-lup3KN2m.js} +1 -1
- package/dist/{format-unit-display-BBWblJEt.js → format-unit-display-CG-uhy8Z.js} +8 -8
- package/dist/{fuzzy-B9ryZ9VZ.js → fuzzy-B7mmyoPI.js} +1 -1
- package/dist/{index-BN0CY3sZ.js → index-B2CSxKjC.js} +27 -21
- package/dist/index-BLO8M-w8.js +12087 -0
- package/dist/{index-Bj1fJum-.js → index-Dy5RTqm_.js} +1 -1
- package/dist/netsuite-rb1w7C1L.js +225 -0
- package/dist/{rules-C12nWDD1.js → rules-CQex0PG8.js} +3 -2
- package/dist/stores/feature.d.ts +1 -0
- package/dist/stores/integration/netsuite.d.ts +68 -1
- package/dist/{supplier-DJC0UZWv.js → supplier-DnK2g2O2.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-inventory-binding-dialog-PEQbFRvO.js → use-inventory-binding-dialog-C18erVXs.js} +2 -2
- package/dist/{use-template-enabled-locations-2-k9g5t8tt.js → use-template-enabled-locations-2-fcGKuJ6x.js} +2 -2
- package/dist/{xlsx-B4XHad7S.js → xlsx-KAYN3sog.js} +1 -1
- package/dist/{xlsx.util-BSO4SHJi.js → xlsx.util-_6KMttZO.js} +1 -1
- package/package.json +3 -3
- package/dist/IngredientsView-DMRN-odY.js +0 -1613
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-DCA0RUfu.js +0 -1209
- package/dist/index-C4yL_7rR.js +0 -10545
- package/dist/netsuite-ByWOS6tI.js +0 -194
- package/dist/normalizeArguments-DP7Hrren.js +0 -1552
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
import { j as b, h as S, u as p } from "./app-KnSMkJBV.js";
|
|
2
|
-
import { useCoreStore as I } from "@feedmepos/mf-common";
|
|
3
|
-
import { useSnackbar as N } from "@feedmepos/ui-library";
|
|
4
|
-
import { ref as h, computed as y } from "vue";
|
|
5
|
-
const v = b((m, l) => {
|
|
6
|
-
const t = I(), i = N();
|
|
7
|
-
return l.onError(async (n) => {
|
|
8
|
-
if (n instanceof S)
|
|
9
|
-
throw i == null || i.open({
|
|
10
|
-
title: n.title,
|
|
11
|
-
message: n.message,
|
|
12
|
-
type: "error"
|
|
13
|
-
}), n;
|
|
14
|
-
}), {
|
|
15
|
-
async readSetting() {
|
|
16
|
-
var s;
|
|
17
|
-
const n = ((s = t.currentBusiness.value) == null ? void 0 : s._id) ?? "", e = `${m.netSuiteBackendUrl}/${n}/settings`;
|
|
18
|
-
return await l.get(e);
|
|
19
|
-
},
|
|
20
|
-
async syncPurchaseOrder(n, e) {
|
|
21
|
-
var o;
|
|
22
|
-
const s = ((o = t.currentBusiness.value) == null ? void 0 : o._id) ?? "", a = `${m.netSuiteBackendUrl}/${s}/sync/purchase-order`;
|
|
23
|
-
return await l.post(a, {
|
|
24
|
-
purchaseOrderId: n,
|
|
25
|
-
locationId: e
|
|
26
|
-
});
|
|
27
|
-
},
|
|
28
|
-
urls: m
|
|
29
|
-
};
|
|
30
|
-
});
|
|
31
|
-
function L() {
|
|
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 u = h(L());
|
|
49
|
-
function w() {
|
|
50
|
-
const m = y(() => u.value.setting.items.groupBy("netSuiteId", (t) => t.id)), l = y(() => u.value.setting.units.flatMap((t) => t.measurements).groupBy("netSuiteId", (t) => t.id));
|
|
51
|
-
return {
|
|
52
|
-
// state
|
|
53
|
-
get isReady() {
|
|
54
|
-
return u.value.isReady;
|
|
55
|
-
},
|
|
56
|
-
get isEnabled() {
|
|
57
|
-
return u.value.setting.enable;
|
|
58
|
-
},
|
|
59
|
-
get isBusinessLocation() {
|
|
60
|
-
return p().businessLevel;
|
|
61
|
-
},
|
|
62
|
-
get state() {
|
|
63
|
-
return u.value;
|
|
64
|
-
},
|
|
65
|
-
get netSuiteItemIdToSkuId() {
|
|
66
|
-
return m.value;
|
|
67
|
-
},
|
|
68
|
-
get netSuiteMeasurementIdToMeasurementId() {
|
|
69
|
-
return l.value;
|
|
70
|
-
},
|
|
71
|
-
getNetSuiteVendor(t) {
|
|
72
|
-
return u.value.setting.vendors.find((i) => i.id === t);
|
|
73
|
-
},
|
|
74
|
-
getNetSuiteLocation(t) {
|
|
75
|
-
const [i, n] = t.split("_");
|
|
76
|
-
return u.value.setting.locations.find((s) => s.id == n && s.type == i);
|
|
77
|
-
},
|
|
78
|
-
getLocationSubsidiary(t) {
|
|
79
|
-
var s;
|
|
80
|
-
if (!t)
|
|
81
|
-
return {
|
|
82
|
-
id: void 0,
|
|
83
|
-
name: "",
|
|
84
|
-
fullName: ""
|
|
85
|
-
};
|
|
86
|
-
const i = ((s = u.value.setting.locations.find((a) => a.netSuiteId === t)) == null ? void 0 : s.subsidiaryId) ?? null, { flat: n } = g(u.value.setting.subsidiaries), e = n.find((a) => a.id === i);
|
|
87
|
-
return {
|
|
88
|
-
id: e == null ? void 0 : e.id,
|
|
89
|
-
name: (e == null ? void 0 : e.name) || "",
|
|
90
|
-
fullName: `${(e == null ? void 0 : e.fullName) ?? ""}`
|
|
91
|
-
};
|
|
92
|
-
},
|
|
93
|
-
currentLocationSubsidiary() {
|
|
94
|
-
var o;
|
|
95
|
-
const t = p(), i = t.currentLocation.doc._id, n = t.currentLocation.type, e = ((o = u.value.setting.locations.find(
|
|
96
|
-
(r) => r.id === i && r.type == n
|
|
97
|
-
)) == null ? void 0 : o.subsidiaryId) ?? null, { flat: s } = g(u.value.setting.subsidiaries), a = s.find((r) => r.id === e);
|
|
98
|
-
return {
|
|
99
|
-
id: a == null ? void 0 : a.id,
|
|
100
|
-
name: (a == null ? void 0 : a.name) || "",
|
|
101
|
-
fullName: `${(a == null ? void 0 : a.fullName) ?? ""}`
|
|
102
|
-
};
|
|
103
|
-
},
|
|
104
|
-
currentVendorSubsidiary(t) {
|
|
105
|
-
var s;
|
|
106
|
-
const i = ((s = u.value.setting.vendors.find((a) => a.id === t)) == null ? void 0 : s.subsidiaryId) ?? null, { flat: n } = g(u.value.setting.subsidiaries), e = n.find((a) => a.id === i);
|
|
107
|
-
return {
|
|
108
|
-
id: e == null ? void 0 : e.id,
|
|
109
|
-
name: (e == null ? void 0 : e.name) || "",
|
|
110
|
-
fullName: `${(e == null ? void 0 : e.fullName) ?? ""}`
|
|
111
|
-
};
|
|
112
|
-
},
|
|
113
|
-
get subsidiaryOptions() {
|
|
114
|
-
const { flat: t } = g(u.value.setting.subsidiaries);
|
|
115
|
-
return t.map((i) => ({
|
|
116
|
-
label: `${" ".repeat(i.depth)}${i.name}`,
|
|
117
|
-
value: {
|
|
118
|
-
id: i.id,
|
|
119
|
-
name: i.name
|
|
120
|
-
}
|
|
121
|
-
}));
|
|
122
|
-
},
|
|
123
|
-
getAvailableItems(t) {
|
|
124
|
-
const { available: i } = g(u.value.setting.subsidiaries, t);
|
|
125
|
-
return u.value.setting.items.filter((n) => n.subsidiaryIds.some((e) => i.includes(e))).map((n) => n.id);
|
|
126
|
-
},
|
|
127
|
-
getAvailableMeasurements(t, i) {
|
|
128
|
-
const n = u.value.setting.items.find((r) => r.id === t);
|
|
129
|
-
if (!n)
|
|
130
|
-
return [];
|
|
131
|
-
const { available: e, flatMapping: s } = g(
|
|
132
|
-
u.value.setting.subsidiaries,
|
|
133
|
-
i
|
|
134
|
-
), o = u.value.setting.childItems.filter((r) => {
|
|
135
|
-
let c = r.subsidiaryIds;
|
|
136
|
-
if (r.includeChildren == !0)
|
|
137
|
-
for (const f of r.subsidiaryIds)
|
|
138
|
-
c = c.concat(s[f]);
|
|
139
|
-
return c = [...new Set(c)], r.parentNetSuiteId === n.netSuiteId && c.some((f) => e.includes(f));
|
|
140
|
-
}).flatMap((r) => r.unitTypeId);
|
|
141
|
-
return u.value.setting.units.filter((r) => o.includes(r.netSuiteId)).flatMap((r) => r.measurements).map((r) => r.id);
|
|
142
|
-
},
|
|
143
|
-
async readSetting() {
|
|
144
|
-
console.log("netsuite init");
|
|
145
|
-
const i = await v().readSetting();
|
|
146
|
-
if (i) {
|
|
147
|
-
this.state.setting = i;
|
|
148
|
-
const { flat: n } = g(u.value.setting.subsidiaries);
|
|
149
|
-
for (const e of i.vendors) {
|
|
150
|
-
const s = n.find((a) => a.id === e.subsidiaryId);
|
|
151
|
-
this.state.vendorSubsidiary[e.id] = (s == null ? void 0 : s.fullName) || "";
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
this.state.isReady = !0;
|
|
155
|
-
},
|
|
156
|
-
getVendorSubsidiaryName(t) {
|
|
157
|
-
return this.state.vendorSubsidiary[t] || "";
|
|
158
|
-
},
|
|
159
|
-
async syncPurchaseOrder(t) {
|
|
160
|
-
const i = v(), n = p(), e = n.currentLocation.doc._id, s = n.currentLocation.type;
|
|
161
|
-
await i.syncPurchaseOrder(t, `${s}_${e}`);
|
|
162
|
-
}
|
|
163
|
-
};
|
|
164
|
-
}
|
|
165
|
-
function g(m, l) {
|
|
166
|
-
const t = [], i = [];
|
|
167
|
-
function n(o, r, c = !1) {
|
|
168
|
-
return m.filter((d) => d.parentId === r).map((d) => ((c || d.id === l || !l) && t.push(d.id), {
|
|
169
|
-
id: d.id,
|
|
170
|
-
name: d.name,
|
|
171
|
-
country: d.country,
|
|
172
|
-
currency: d.currency,
|
|
173
|
-
parentId: d.parentId,
|
|
174
|
-
depth: o,
|
|
175
|
-
children: n(o + 1, d.id, c || d.id === l)
|
|
176
|
-
}));
|
|
177
|
-
}
|
|
178
|
-
const e = n(0, null), s = {};
|
|
179
|
-
function a(o, r = "") {
|
|
180
|
-
const c = o.fullName || o.name, f = r ? `${r} : ${c}` : c;
|
|
181
|
-
i.push({ ...o, fullName: f }), s[o.id] = [o.id];
|
|
182
|
-
for (const d of o.children)
|
|
183
|
-
a(d, f), s[o.id].push(...s[d.id]);
|
|
184
|
-
}
|
|
185
|
-
return e.forEach((o) => a(o)), {
|
|
186
|
-
tree: e,
|
|
187
|
-
available: t,
|
|
188
|
-
flat: i,
|
|
189
|
-
flatMapping: s
|
|
190
|
-
};
|
|
191
|
-
}
|
|
192
|
-
export {
|
|
193
|
-
w as u
|
|
194
|
-
};
|