diff --git a/src/app/pages/dashboard/contacts/contacts.component.ts b/src/app/pages/dashboard/contacts/contacts.component.ts index c8a523d6..4f93f50f 100644 --- a/src/app/pages/dashboard/contacts/contacts.component.ts +++ b/src/app/pages/dashboard/contacts/contacts.component.ts @@ -17,10 +17,10 @@ export class ContactsComponent implements OnDestroy { recent: any[]; constructor(private userService: UserData) { - forkJoin( + forkJoin([ this.userService.getContacts(), this.userService.getRecentUsers(), - ) + ]) .pipe(takeWhile(() => this.alive)) .subscribe(([contacts, recent]: [Contacts[], RecentUsers[]]) => { this.contacts = contacts; diff --git a/src/app/pages/dashboard/electricity/electricity.component.ts b/src/app/pages/dashboard/electricity/electricity.component.ts index bf16e494..7a1c34b5 100644 --- a/src/app/pages/dashboard/electricity/electricity.component.ts +++ b/src/app/pages/dashboard/electricity/electricity.component.ts @@ -1,6 +1,5 @@ import { Component, OnDestroy } from '@angular/core'; import { NbThemeService } from '@nebular/theme'; - import { Electricity, ElectricityChart, ElectricityData } from '../../../@core/data/electricity'; import { takeWhile } from 'rxjs/operators'; import { forkJoin } from 'rxjs'; @@ -24,19 +23,19 @@ export class ElectricityComponent implements OnDestroy { themeSubscription: any; constructor(private electricityService: ElectricityData, - private themeService: NbThemeService) { + private themeService: NbThemeService) { this.themeService.getJsTheme() .pipe(takeWhile(() => this.alive)) .subscribe(theme => { this.currentTheme = theme.name; - }); + }); - forkJoin( + forkJoin([ this.electricityService.getListData(), - this.electricityService.getChartData(), - ) + this.electricityService.getChartData() + ]) .pipe(takeWhile(() => this.alive)) - .subscribe(([listData, chartData]: [Electricity[], ElectricityChart[]] ) => { + .subscribe(([listData, chartData]: [Electricity[], ElectricityChart[]]) => { this.listData = listData; this.chartData = chartData; }); diff --git a/src/app/pages/dashboard/temperature/temperature.component.ts b/src/app/pages/dashboard/temperature/temperature.component.ts index 4706f5fc..390b20e0 100644 --- a/src/app/pages/dashboard/temperature/temperature.component.ts +++ b/src/app/pages/dashboard/temperature/temperature.component.ts @@ -27,17 +27,17 @@ export class TemperatureComponent implements OnDestroy { themeSubscription: any; constructor(private themeService: NbThemeService, - private temperatureHumidityService: TemperatureHumidityData) { + private temperatureHumidityService: TemperatureHumidityData) { this.themeService.getJsTheme() .pipe(takeWhile(() => this.alive)) .subscribe(config => { - this.theme = config.variables.temperature; - }); + this.theme = config.variables.temperature; + }); - forkJoin( + forkJoin([ this.temperatureHumidityService.getTemperatureData(), this.temperatureHumidityService.getHumidityData(), - ) + ]) .subscribe(([temperatureData, humidityData]: [Temperature, Temperature]) => { this.temperatureData = temperatureData; this.temperature = this.temperatureData.value; diff --git a/src/app/pages/e-commerce/visitors-analytics/visitors-analytics.component.ts b/src/app/pages/e-commerce/visitors-analytics/visitors-analytics.component.ts index c5c254bc..8e302568 100644 --- a/src/app/pages/e-commerce/visitors-analytics/visitors-analytics.component.ts +++ b/src/app/pages/e-commerce/visitors-analytics/visitors-analytics.component.ts @@ -14,22 +14,22 @@ export class ECommerceVisitorsAnalyticsComponent implements OnDestroy { private alive = true; pieChartValue: number; - chartLegend: {iconColor: string; title: string}[]; + chartLegend: { iconColor: string; title: string }[]; visitorsAnalyticsData: { innerLine: number[]; outerLine: OutlineData[]; }; constructor(private themeService: NbThemeService, - private visitorsAnalyticsChartService: VisitorsAnalyticsData) { + private visitorsAnalyticsChartService: VisitorsAnalyticsData) { this.themeService.getJsTheme() .pipe(takeWhile(() => this.alive)) .subscribe(theme => { this.setLegendItems(theme.variables.visitorsLegend); }); - forkJoin( + forkJoin([ this.visitorsAnalyticsChartService.getInnerLineChartData(), this.visitorsAnalyticsChartService.getOutlineLineChartData(), this.visitorsAnalyticsChartService.getPieChartData(), - ) + ]) .pipe(takeWhile(() => this.alive)) .subscribe(([innerLine, outerLine, pieChartValue]: [number[], OutlineData[], number]) => { this.visitorsAnalyticsData = {