@feedmepos/mf-inventory-portal 0.0.23-dev.23 → 0.0.23-dev.25
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-BvEB-iR6.js → App-CNgj7enS.js} +49 -45
- package/dist/{ApprovalView-BmPYoGNQ.js → ApprovalView-CaVxfwVZ.js} +15 -15
- package/dist/{BindingsDialog-BqKMRdvl.js → BindingsDialog-jRZXoJFn.js} +9 -9
- package/dist/{BindingsPicker-BaEdafvS.js → BindingsPicker-B1HSa3PR.js} +5 -5
- package/dist/{BindingsTable--d-nM2Gv.js → BindingsTable-OF56C-md.js} +8 -8
- package/dist/ClosingDraftView-B6okKype.js +1134 -0
- package/dist/{ClosingTemplateView-BdUGSMOi.js → ClosingTemplateView-iX4shLcv.js} +251 -255
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CIk6CwoD.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Bj2M9OAD.js} +13 -13
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-Bt1hyXul.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CnPZaNTp.js} +46 -46
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-wYnVSXtH.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-CGpmbbpm.js} +7 -7
- package/dist/{IngredientGroupView-0-nzZJcl.js → IngredientGroupView-BeW-0hWb.js} +40 -40
- package/dist/{IngredientsView-ClRyZ-cb.js → IngredientsView-CuVBlnOu.js} +207 -210
- package/dist/{IntegrationView-CgmsV7oX.js → IntegrationView-lDfeScNo.js} +89 -90
- package/dist/{InventoryBindingForm-DnnGejy0.js → InventoryBindingForm-D6EuWIkE.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CapSS-KQ.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CUpKKG4l.js} +27 -27
- package/dist/{InventoryBindingSummary-Dz-F2ofe.js → InventoryBindingSummary-CD60iCr_.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-glXw963h.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-7jkFhj27.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-DpIyyZL-.js → PremiumBadge.vue_vue_type_script_setup_true_lang-DDXsfGVf.js} +17 -18
- package/dist/{PurchaseOrderPrintPreview--hGI0aFU.js → PurchaseOrderPrintPreview-eJxn76Ir.js} +1 -1
- package/dist/{ReceiveRequestView-cPIOC0rj.js → ReceiveRequestView-D6Cdkd36.js} +26 -27
- package/dist/{RecipeView-BK74973y.js → RecipeView-BWy56DhW.js} +47 -48
- package/dist/{StockView-D6TYfv5x.js → StockView-BEXAvBjP.js} +7 -7
- package/dist/{SupplierView-BFwzHw7l.js → SupplierView-C4vwkzdX.js} +203 -206
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-ChwtBdsS.js → TransferDetails.vue_vue_type_script_setup_true_lang-CIcj9NWg.js} +61 -62
- package/dist/{TransferTemplateView-De5sG12Q.js → TransferTemplateView-27Ng_EgG.js} +144 -145
- package/dist/{UnitView-CQoB6Uq_.js → UnitView-CXvkO_fh.js} +3 -3
- package/dist/{WarehouseView-Di4mLjoS.js → WarehouseView-Cl6HN1EW.js} +52 -52
- package/dist/app-Dt6Yd1pM.js +84133 -0
- package/dist/app.js +1 -1
- package/dist/{decimal-D2WMzK1d.js → decimal-D1M8NkLV.js} +1 -1
- package/dist/{feature-SYqA_m5m.js → feature-CqDcAtUy.js} +1 -1
- package/dist/{format-unit-display-D0G-LaQY.js → format-unit-display-BI9EVHb3.js} +50 -53
- package/dist/{index-Bj8PDCww.js → index-7V6E004u.js} +1 -1
- package/dist/{stock-CEexJdO3.js → stock-wjdjOqbM.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{supplier-BdB47EjI.js → supplier-D3-7dgm5.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-inventory-binding-dialog-n3khDS2D.js → use-inventory-binding-dialog-BLHffZgi.js} +1 -1
- package/dist/views/adjustment-template/import/AdjustmentTemplateImport.vue.d.ts +2 -0
- package/dist/views/adjustment-template/import/AdjustmentTemplateImportItem.vue.d.ts +18 -0
- package/dist/views/adjustment-template/import/export.d.ts +60 -0
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +178 -8
- package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +1498 -478
- package/package.json +3 -3
- package/dist/ClosingDraftView-Clh7bujC.js +0 -1116
- package/dist/FmDroppableField-DHhcKcJf.js +0 -154
- package/dist/app-DpJictvi.js +0 -58871
- package/dist/netsuite-TWj-9PDj.js +0 -251
- package/dist/xlsx-Cbd5szA2.js +0 -24004
- package/dist/xlsx.util-hCH_XTAD.js +0 -78
|
@@ -1,251 +0,0 @@
|
|
|
1
|
-
import { N as L, m as $, a as M, u as N } from "./app-DpJictvi.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
|
-
};
|