Answer the question
In order to leave comments, you need to log in
What is the promise error related to?
getMaterialList() {
const data = this.myhttp.getHTTP('/getMaterialList').toPromise();
return data;
}
async getCalculateInventory(Offer, details) {
....
details['Inventory'] = []
if (this.isEmpty(this.AllMaterial)) {
this.AllMaterial = await this.getMaterialList();
}
for (let y in this.AllMaterial) {
if (this.AllMaterial[y].type == 'inventory') {
var some: any = {};
....
details.Inventory.push(some);
....
}
}
...
return details;
}
getCalculateInventoryToWindow(Offer, details) {
var InventoryCalculate = this.getCalculateInventory(Offer, details);
...
InventoryCalculate['WindowInventory'] = [];
...
for (let y in this.AllMaterial) {
if (this.AllMaterial[y].type == 'window') {
var some: any = {}
.....
InventoryCalculate.WindowInventory.push(some);
ItogMonth = ItogMonth + some.ItogAmortization;
ItogToStart = ItogToStart + some.Itog;
}
}
InventoryCalculate.material= InventoryCalculate.material + ItogMonth;
InventoryCalculate.materialToStart = InventoryCalculate.materialToStart + ItogToStart;
return InventoryCalculate;
}
Property 'WindowInventory' does not exist on type 'Promise<any>'.
Property 'material' does not exist on type 'Promise<any>'.
Property 'material' does not exist on type 'Promise<any>'.
Property 'materialToStart' does not exist on type 'Promise<any>'.
Property 'materialToStart' does not exist on type 'Promise<any>'.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question