Mise à jours et ajout de fonctionnalités
This commit is contained in:
@@ -5,7 +5,7 @@ import { ActivatedRoute, Data, Router } from '@angular/router';
|
||||
import { Observable, Observer, Subscription } from 'rxjs';
|
||||
import { take } from 'rxjs/operators';
|
||||
|
||||
import { User, Errors, Aeronef, AeronefAggregate, AeronefList, Canopy, CanopyAggregate, DropZone, DropZoneAggregate } from 'src/app/core/models';
|
||||
import { User, Errors, Aeronef, AeronefByImat, AeronefList, Canopy, CanopyBySize, DropZone, DropZoneByOaci } from 'src/app/core/models';
|
||||
import { AeronefsService, CanopiesService, DropZonesService, UserService } from 'src/app/core/services';
|
||||
import { ShowAuthedDirective } from 'src/app/components/shared/show-authed.directive';
|
||||
import { AeronefsComponent, DropZonesComponent, CanopyModelsComponent } from './dashboard-components';
|
||||
@@ -32,13 +32,13 @@ export class HomeComponent implements OnInit, OnDestroy {
|
||||
errors!: Errors;
|
||||
isAuthenticated = false;
|
||||
canModify = false;
|
||||
aeronefAggregate!: Array<AeronefAggregate>
|
||||
aeronefAggregate!: Array<AeronefByImat>
|
||||
aeronefs!: Array<Aeronef>;
|
||||
aeronefsCount = 0;
|
||||
canopyAggregate!: Array<CanopyAggregate>
|
||||
canopyAggregate!: Array<CanopyBySize>
|
||||
canopies!: Array<Canopy>;
|
||||
canopiesCount = 0;
|
||||
dropzoneAggregate!: Array<DropZoneAggregate>
|
||||
dropzoneAggregate!: Array<DropZoneByOaci>
|
||||
dropzones!: Array<DropZone>;
|
||||
dropzonesCount = 0;
|
||||
|
||||
@@ -75,8 +75,8 @@ export class HomeComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
loadAeronefs() {
|
||||
const aeronefs$: Observable<Array<AeronefAggregate>> = this.aeronefsService.getAll();
|
||||
this._aeronefs = aeronefs$.subscribe((aggregate: Array<AeronefAggregate>) => {
|
||||
const aeronefs$: Observable<Array<AeronefByImat>> = this.aeronefsService.getAllByImat();
|
||||
this._aeronefs = aeronefs$.subscribe((aggregate: Array<AeronefByImat>) => {
|
||||
this.aeronefAggregate = aggregate;
|
||||
this.aeronefsCount = aggregate.length;
|
||||
console.log(this.aeronefs);
|
||||
@@ -84,8 +84,8 @@ export class HomeComponent implements OnInit, OnDestroy {
|
||||
});
|
||||
}
|
||||
loadCanopies() {
|
||||
const canopies$: Observable<Array<CanopyAggregate>> = this.canopiesService.getAll();
|
||||
this._canopies = canopies$.subscribe((aggregate: Array<CanopyAggregate>) => {
|
||||
const canopies$: Observable<Array<CanopyBySize>> = this.canopiesService.getAllBySize();
|
||||
this._canopies = canopies$.subscribe((aggregate: Array<CanopyBySize>) => {
|
||||
this.canopyAggregate = aggregate;
|
||||
this.canopiesCount = aggregate.length;
|
||||
// console.log(this.canopies);
|
||||
@@ -93,8 +93,8 @@ export class HomeComponent implements OnInit, OnDestroy {
|
||||
});
|
||||
}
|
||||
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.dropzoneAggregate = aggregate;
|
||||
this.dropzonesCount = aggregate.length;
|
||||
// console.log(this.dropzones);
|
||||
|
||||
Reference in New Issue
Block a user