Explorar el Código

Prototype For vendor app

master
kj1352 hace 5 años
padre
commit
1df49b534c
Se han modificado 3 ficheros con 21 adiciones y 13 borrados
  1. +8
    -3
      src/app/dashboard/dashboard.component.ts
  2. +9
    -6
      src/app/orders/orders.component.ts
  3. +4
    -4
      src/app/widgets-holder/widgets-holder.component.html

+ 8
- 3
src/app/dashboard/dashboard.component.ts Ver fichero

@@ -31,9 +31,14 @@ export class DashboardComponent 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
}
}
}
}, () => {
alert("Error getting the orders");
});


+ 9
- 6
src/app/orders/orders.component.ts Ver fichero

@@ -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");
});


+ 4
- 4
src/app/widgets-holder/widgets-holder.component.html Ver fichero

@@ -1,10 +1,10 @@
<section class="nav-bar">
<img src="assets/logo.svg" alt="Logo">
<nav>
<a [ngClass]="{'active' : selected_nav === 'faq'}"
(click)="selected_nav = 'faq'"> FAQ's </a>
<a [ngClass]="{'active' : selected_nav === 'support'}"
(click)="selected_nav = 'support'"> Support </a>
<a [ngClass]="{'active' : selected_nav.name === 'faq'}"
(click)="selected_nav.name = 'faq'"> FAQ's </a>
<a [ngClass]="{'active' : selected_nav.name === 'support'}"
(click)="selected_nav.name = 'support'"> Support </a>
<button class="rect-button" (click)="logout()"> Logout </button>
</nav>
</section>


Cargando…
Cancelar
Guardar