|
|
@@ -60,13 +60,16 @@ export class OrdersComponent implements OnInit { |
|
|
|
this.orderService.getOrders().then((data) => { |
|
|
|
this.orderList = data; |
|
|
|
|
|
|
|
this.orderList = this.orderList.filter((order) => { |
|
|
|
return order.orderstatus; |
|
|
|
}); |
|
|
|
for (let i = 0; i < this.orderList.length; i += 1) { |
|
|
|
if (!this.orderList[i].orderstatus) { |
|
|
|
this.orderList[i].orderstatus = { |
|
|
|
orderStatus: "", |
|
|
|
orderstatus_id: 6 |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
this.tempOrderList = this.orderList.filter((order) => { |
|
|
|
return order.orderstatus; |
|
|
|
}); |
|
|
|
this.tempOrderList = JSON.parse(JSON.stringify(this.orderList)); |
|
|
|
}, () => { |
|
|
|
alert("Error getting the orders"); |
|
|
|
}); |
|
|
|