diff --git a/projects/project-3/frontend/src/app/dashboard/table/table.component.ts b/projects/project-3/frontend/src/app/dashboard/table/table.component.ts index 597761f..dc1bc2f 100644 --- a/projects/project-3/frontend/src/app/dashboard/table/table.component.ts +++ b/projects/project-3/frontend/src/app/dashboard/table/table.component.ts @@ -79,13 +79,19 @@ export class TableComponent implements OnInit { await this.service.fetchDashboardStationTo(this.bikePoint.id, actualStartDate, actualEndDate).then((source) => { this.colors = ['black', 'gray', 'green', 'orange', 'purple', 'red']; this.isLoadingToSource = false; - this.stationToSource = source; - this.iterableToSource = this.setBikePointColorToSource(source); + this.stationToSource = this.setBikePointColorFromSource(source); + this.iterableToSource = source; + this.iterableToSource.forEach(bikePoint => { + bikePoint.polyLineColor = 'green'; + }); }); this.service.fetchDashboardStationFrom(this.bikePoint.id, actualStartDate, actualEndDate).then((source) => { this.isLoadingFromSource = false; - this.stationFromSource = source; - this.iterableFromSource = this.setBikePointColorFromSource(source); + this.stationFromSource = this.setBikePointColorFromSource(source); + this.iterableFromSource = source; + this.iterableFromSource.forEach(bikePoint => { + bikePoint.polyLineColor = 'red'; + }); }); } diff --git a/projects/project-3/frontend/src/app/service/map.service.ts b/projects/project-3/frontend/src/app/service/map.service.ts index 15c5cbc..aad157d 100644 --- a/projects/project-3/frontend/src/app/service/map.service.ts +++ b/projects/project-3/frontend/src/app/service/map.service.ts @@ -161,7 +161,7 @@ export class MapService { } drawLegend(): void { - this.legend.onAdd = map => { + this.legend.onAdd = () => { const div = L.DomUtil.create('div', 'legend'); div.innerHTML += `

trips from/to bike station

`; div.innerHTML += `rents with ${this.dashBoardBikePoint.commonName} as destination
`;