FE-404: fix type for shopID (#137)

This commit is contained in:
andrey 2017-07-14 15:16:03 +03:00 committed by GitHub
parent 9ea47b1954
commit 5adda5d481
3 changed files with 3 additions and 3 deletions

View File

@ -25,7 +25,7 @@ export class AnalyticsService {
} }
public getActiveShopID(): number { public getActiveShopID(): number {
const routeShopID = Number(this.route.snapshot.params['shopID']); const routeShopID = this.route.snapshot.params['shopID'];
return routeShopID ? routeShopID : this.getFromStorage(this.shops); return routeShopID ? routeShopID : this.getFromStorage(this.shops);
} }

View File

@ -40,7 +40,7 @@ export class DashboardComponent implements OnInit {
public ngOnInit() { public ngOnInit() {
this.route.parent.params.subscribe((params: Params) => { this.route.parent.params.subscribe((params: Params) => {
this.shopID = Number(params['shopID']); this.shopID = params['shopID'];
this.loadData(new DateRange(this.fromTime, this.toTime)); this.loadData(new DateRange(this.fromTime, this.toTime));
}); });
} }

View File

@ -11,7 +11,7 @@
a([routerLink]=["/analytics"]) a([routerLink]=["/analytics"])
i.fa.fa-bar-chart-o i.fa.fa-bar-chart-o
| Аналитика | Аналитика
li([routerLinkActive]="['active']") //li([routerLinkActive]="['active']")
a([routerLink]=["/management"]) a([routerLink]=["/management"])
i.fa.fa-shopping-cart i.fa.fa-shopping-cart
| Управление магазинами | Управление магазинами