Mise à jours et ajout de fonctionnalités

This commit is contained in:
Julien Gautier
2023-09-13 20:48:18 +02:00
parent 747948a422
commit 1147d5f5bb
24 changed files with 478 additions and 155 deletions
@@ -6,7 +6,7 @@ import { ChartistModule, Configuration } from 'ng-chartist';
import { Observable, Observer, Subscription } from 'rxjs';
import { BackendService, DropZonesService } from 'src/app/core/services';
import { DropZone, DropZoneAggregate, ReduceRow} from 'src/app/core/models';
import { DropZone, DropZoneByOaci, ReduceRow} from 'src/app/core/models';
@Component({
standalone: true,
@@ -16,7 +16,7 @@ import { DropZone, DropZoneAggregate, ReduceRow} from 'src/app/core/models';
})
export class DropZonesComponent implements OnInit {
private _dropzones: Subscription = new Subscription();
aggregate!: Array<DropZoneAggregate>
aggregate!: Array<DropZoneByOaci>
dropzones!: Array<DropZone>;
dropzonesCount = 0;
seriesName: string[] = [];//= ["Arcachon", "Béni-Mellal", "La Réole", "Royan", "Pamiers", "Soulac", "Sables d'Olonne", "Rochefort"];
@@ -155,8 +155,8 @@ export class DropZonesComponent implements OnInit {
}
loadDropZones() {
const dropzones$: Observable<Array<DropZoneAggregate>> = this.dropzonesService.getAll();
this._dropzones = dropzones$.subscribe((aggregate: Array<DropZoneAggregate>) => {
const dropzones$: Observable<Array<DropZoneByOaci>> = this.dropzonesService.getAllByOaci();
this._dropzones = dropzones$.subscribe((aggregate: Array<DropZoneByOaci>) => {
this.aggregate = aggregate;
//this.dropzones = dropzones;
this.dropzonesCount = aggregate.length;