diff --git a/src/app/components/qcm/qcm.component.ts b/src/app/components/qcm/qcm.component.ts
index d015151..ff68741 100644
--- a/src/app/components/qcm/qcm.component.ts
+++ b/src/app/components/qcm/qcm.component.ts
@@ -1,6 +1,6 @@
import { Component, DestroyRef, inject, OnInit, OnDestroy } from '@angular/core';
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
-import { FormControl, FormGroup, FormBuilder, FormArray, FormsModule, ReactiveFormsModule } from '@angular/forms';
+import { /*FormControl,*/ FormGroup, FormBuilder, FormArray, FormsModule, ReactiveFormsModule } from '@angular/forms';
import { ActivatedRoute } from '@angular/router';
import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
diff --git a/src/app/components/shared/accordion/accordion.directive.ts b/src/app/components/shared/accordion/accordion.directive.ts
index 5b49919..0615641 100755
--- a/src/app/components/shared/accordion/accordion.directive.ts
+++ b/src/app/components/shared/accordion/accordion.directive.ts
@@ -1,9 +1,4 @@
-import {
- Directive,
- OnInit,
- AfterViewInit,
- AfterContentChecked
-} from '@angular/core';
+import { Directive, AfterContentChecked } from '@angular/core';
import { Router, NavigationEnd } from '@angular/router';
import { AccordionLinkDirective } from './accordionlink.directive';
@@ -51,7 +46,7 @@ export class AccordionDirective implements AfterContentChecked {
ngAfterContentChecked(): void {
this.router.events
.pipe(filter(event => event instanceof NavigationEnd))
- .subscribe(e => this.checkOpenLinks());
+ .subscribe(() => this.checkOpenLinks());
}
constructor(private router: Router) {
diff --git a/src/app/components/shared/accordion/accordionanchor.directive.ts b/src/app/components/shared/accordion/accordionanchor.directive.ts
index d8fe1e5..2207736 100755
--- a/src/app/components/shared/accordion/accordionanchor.directive.ts
+++ b/src/app/components/shared/accordion/accordionanchor.directive.ts
@@ -14,7 +14,7 @@ export class AccordionAnchorDirective {
}
@HostListener('click', ['$event'])
- onClick(e: any) {
+ onClick() {
this.navlink.toggle();
}
}
diff --git a/src/app/components/shared/accordion/accordionlink.directive.ts b/src/app/components/shared/accordion/accordionlink.directive.ts
index 60b97cf..daf7ffe 100755
--- a/src/app/components/shared/accordion/accordionlink.directive.ts
+++ b/src/app/components/shared/accordion/accordionlink.directive.ts
@@ -15,7 +15,7 @@ import { AccordionDirective } from './accordion.directive';
})
export class AccordionLinkDirective implements OnInit, OnDestroy {
@Input()
- public group: any;
+ public group!: string;
@HostBinding('class.selected')
@Input()
@@ -37,15 +37,15 @@ export class AccordionLinkDirective implements OnInit, OnDestroy {
this.nav = nav;
}
- ngOnInit(): any {
+ ngOnInit() {
this.nav.addLink(this);
}
- ngOnDestroy(): any {
+ ngOnDestroy(){
this.nav.removeGroup(this);
}
- toggle(): any {
+ toggle() {
this.selected = !this.selected;
}
}
diff --git a/src/app/components/shared/helpers-chart/bar-chart.component.html b/src/app/components/shared/helpers-chart/bar-chart.component.html
index 7437707..14e95f9 100755
--- a/src/app/components/shared/helpers-chart/bar-chart.component.html
+++ b/src/app/components/shared/helpers-chart/bar-chart.component.html
@@ -3,7 +3,7 @@
diff --git a/src/app/components/shared/helpers-chart/bar-horizontal-chart.component.html b/src/app/components/shared/helpers-chart/bar-horizontal-chart.component.html
index 0cbcdc1..d85b0c2 100755
--- a/src/app/components/shared/helpers-chart/bar-horizontal-chart.component.html
+++ b/src/app/components/shared/helpers-chart/bar-horizontal-chart.component.html
@@ -3,7 +3,7 @@
diff --git a/src/app/components/shared/helpers-chart/bars-chart.component.html b/src/app/components/shared/helpers-chart/bars-chart.component.html
index 3cad6ff..aa9fc82 100755
--- a/src/app/components/shared/helpers-chart/bars-chart.component.html
+++ b/src/app/components/shared/helpers-chart/bars-chart.component.html
@@ -3,7 +3,7 @@
diff --git a/src/app/components/shared/helpers-jump/history-table.component.ts b/src/app/components/shared/helpers-jump/history-table.component.ts
index 6f1c1a8..1ccc304 100644
--- a/src/app/components/shared/helpers-jump/history-table.component.ts
+++ b/src/app/components/shared/helpers-jump/history-table.component.ts
@@ -1,4 +1,4 @@
-import { Component, Input, OnChanges, AfterContentChecked } from '@angular/core';
+import { Component, Input, AfterContentChecked } from '@angular/core';
import { NgIf, NgFor } from '@angular/common';
@Component({
@@ -10,7 +10,7 @@ import { NgIf, NgFor } from '@angular/common';
templateUrl: './history-table.component.html',
styleUrls: []
})
-export class HistoryTableComponent implements OnChanges, AfterContentChecked {
+export class HistoryTableComponent implements AfterContentChecked {
public seriesColTotal: number[] = [];
public grandTotal: number = 0;
@@ -22,10 +22,10 @@ export class HistoryTableComponent implements OnChanges, AfterContentChecked {
@Input() rows: Array> = [];
@Input() colors: string[] = [];
- ngOnChanges() {
+ /*ngOnChanges() {
//this._loadHistoryTable();
//console.log('onChanges');
- }
+ }*/
ngAfterContentChecked() {
if (this.rows !== undefined && this.rows.length) {
diff --git a/src/app/components/shared/helpers-jump/jump-list.component.ts b/src/app/components/shared/helpers-jump/jump-list.component.ts
index 75bbc2d..1f087c2 100644
--- a/src/app/components/shared/helpers-jump/jump-list.component.ts
+++ b/src/app/components/shared/helpers-jump/jump-list.component.ts
@@ -1,11 +1,10 @@
-import { Component, OnInit, OnDestroy, Input, computed, Signal, WritableSignal } from '@angular/core';
+import { Component, OnInit, OnDestroy, Input } from '@angular/core';
import { NgClass, DatePipe } from '@angular/common';
import { RouterLink } from '@angular/router';
import { MatButtonModule } from '@angular/material/button';
import { MatIconModule } from '@angular/material/icon';
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
import { Observable, Subscription } from 'rxjs';
-import { take } from 'rxjs/operators';
import { Errors, Jump, JumpList, JumpListConfig } from 'src/app/core/models';
import { JumpsService } from 'src/app/core/services';
diff --git a/src/app/components/shared/helpers-jump/jump-preview.component.ts b/src/app/components/shared/helpers-jump/jump-preview.component.ts
index 50778e6..04133e8 100644
--- a/src/app/components/shared/helpers-jump/jump-preview.component.ts
+++ b/src/app/components/shared/helpers-jump/jump-preview.component.ts
@@ -39,7 +39,7 @@ export class JumpPreviewComponent implements OnDestroy {
deleteJump() {
this.isDeleting = true;
- const jump$: Observable = this.jumpsService.destroy(this.jump.slug);
+ const jump$: Observable = this.jumpsService.destroy(this.jump.slug);
this._jump = jump$.subscribe({
next: () => {
this.router.navigateByUrl('/');
diff --git a/src/app/components/shared/helpers-jump/jump-table.component.html b/src/app/components/shared/helpers-jump/jump-table.component.html
index 3f6444c..513eec7 100644
--- a/src/app/components/shared/helpers-jump/jump-table.component.html
+++ b/src/app/components/shared/helpers-jump/jump-table.component.html
@@ -311,58 +311,4 @@
-
-
+
\ No newline at end of file
diff --git a/src/app/components/shared/show-authed.directive.ts b/src/app/components/shared/show-authed.directive.ts
index b082749..277311d 100644
--- a/src/app/components/shared/show-authed.directive.ts
+++ b/src/app/components/shared/show-authed.directive.ts
@@ -11,7 +11,8 @@ export class ShowAuthedDirective implements OnInit, OnDestroy {
private _auth: Subscription = new Subscription();
constructor(
- private templateRef: TemplateRef,
+ //private templateRef: TemplateRef,
+ private templateRef: TemplateRef,
private userService: UserService,
private viewContainer: ViewContainerRef
) { }
diff --git a/src/app/core/guards/admin.guard.ts b/src/app/core/guards/admin.guard.ts
index 345f0b3..bf3cf4d 100644
--- a/src/app/core/guards/admin.guard.ts
+++ b/src/app/core/guards/admin.guard.ts
@@ -1,10 +1,10 @@
import { inject } from '@angular/core';
-import { ActivatedRouteSnapshot, CanActivateFn, Router, RouterStateSnapshot } from '@angular/router';
+import { CanActivateFn, Router } from '@angular/router';
import { map, take } from 'rxjs/operators';
import { UserService } from 'src/app/core/services';
-export const adminGuard: CanActivateFn = (route: ActivatedRouteSnapshot, state: RouterStateSnapshot) => {
+export const adminGuard: CanActivateFn = () => {
const router = inject(Router);
const userService = inject(UserService);
return userService.currentUser.pipe(take(1)).pipe(map(data => {
diff --git a/src/app/core/guards/auth.guard.ts b/src/app/core/guards/auth.guard.ts
index b48f793..f21497a 100644
--- a/src/app/core/guards/auth.guard.ts
+++ b/src/app/core/guards/auth.guard.ts
@@ -1,10 +1,10 @@
import { inject } from '@angular/core';
-import { ActivatedRouteSnapshot, CanActivateFn, Router, RouterStateSnapshot } from '@angular/router';
+import { CanActivateFn, Router } from '@angular/router';
import { map, take } from 'rxjs/operators';
import { UserService } from 'src/app/core/services';
-export const authGuard: CanActivateFn = (route: ActivatedRouteSnapshot, state: RouterStateSnapshot) => {
+export const authGuard: CanActivateFn = () => {
const router = inject(Router);
const userService = inject(UserService);
return userService.isAuthenticated.pipe(take(1)).pipe(map(data => {
diff --git a/src/app/core/guards/noauth.guard.ts b/src/app/core/guards/noauth.guard.ts
index 5894327..1d422b2 100644
--- a/src/app/core/guards/noauth.guard.ts
+++ b/src/app/core/guards/noauth.guard.ts
@@ -1,11 +1,11 @@
import { inject } from '@angular/core';
-import { ActivatedRouteSnapshot, CanActivateFn, Router, RouterStateSnapshot } from '@angular/router';
+import { CanActivateFn } from '@angular/router';
import { Observable } from 'rxjs';
import { map, take } from 'rxjs/operators';
import { UserService } from 'src/app/core/services';
-export const noauthGuard: CanActivateFn = (route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable => {
+export const noauthGuard: CanActivateFn = (): Observable => {
/*
const router = inject(Router);
const userService = inject(UserService);
diff --git a/src/app/core/models/application-list.model.ts b/src/app/core/models/application-list.model.ts
new file mode 100644
index 0000000..da75041
--- /dev/null
+++ b/src/app/core/models/application-list.model.ts
@@ -0,0 +1,6 @@
+import { Application } from './application.model';
+
+export interface ApplicationList {
+ applications: Array;
+ applicationsCount: number;
+}
diff --git a/src/app/core/models/canopysize.model.ts b/src/app/core/models/canopysize.model.ts
deleted file mode 100644
index 93a8325..0000000
--- a/src/app/core/models/canopysize.model.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-export interface CanopySize {
- id: string;
- key: any;
- value: any;
- doc?: CanopySizeDoc;
-}
-export interface CanopySizeDoc {
- _id: string;
- _rev: string;
- type: string;
- weight: number;
- values: [];
-}
diff --git a/src/app/core/models/chart.model.ts b/src/app/core/models/chart.model.ts
index dc5a6f8..ffee021 100644
--- a/src/app/core/models/chart.model.ts
+++ b/src/app/core/models/chart.model.ts
@@ -3,27 +3,27 @@ import { ChartConfiguration, ChartOptions } from 'chart.js';
export interface BarConfig {
barChartData: ChartConfiguration<'bar'>['data'],
barChartOptions: ChartConfiguration<'bar'>['options'],
- barChartPlugins: any[],
+ barChartPlugins: ChartConfiguration<'bar'>['plugins'],
barChartLegend: boolean
}
export interface CircleConfig {
circleChartLabels: string[],
circleChartDatasets: ChartConfiguration<'doughnut'>['data']['datasets'],
- circleChartOptions: ChartConfiguration<'doughnut'>['options'],
- circleChartPlugins: ChartConfiguration<'doughnut'>['plugins'],
+ circleChartOptions: ChartConfiguration<'doughnut'>['options'],
+ circleChartPlugins: ChartConfiguration<'doughnut'>['plugins'],
circleChartLegend: boolean
}
export interface DoughnutConfig {
doughnutChartLabels: string[],
doughnutChartDatasets: ChartConfiguration<'doughnut'>['data']['datasets'],
- doughnutChartOptions: ChartConfiguration<'doughnut'>['options'],
+ doughnutChartOptions: ChartConfiguration<'doughnut'>['options'],
doughnutChartLegend: boolean
}
export interface LineConfig {
lineChartData: ChartConfiguration<'line'>['data'],
- lineChartOptions: ChartOptions<'line'>,
+ lineChartOptions: ChartOptions<'line'>,
lineChartLegend: boolean
}
diff --git a/src/app/core/models/index.ts b/src/app/core/models/index.ts
index 5e7d7a6..25c978e 100644
--- a/src/app/core/models/index.ts
+++ b/src/app/core/models/index.ts
@@ -1,10 +1,10 @@
export * from './aeronef.model';
export * from './aeronef-list.model';
export * from './application.model';
+export * from './application-list.model';
export * from './application-list-config.model';
export * from './calculator.model';
export * from './canopy.model';
-export * from './canopysize.model';
export * from './chart.model';
export * from './dropzone.model';
export * from './errors.model';
diff --git a/src/app/core/services/api.service.ts b/src/app/core/services/api.service.ts
index fcd8589..3db27da 100644
--- a/src/app/core/services/api.service.ts
+++ b/src/app/core/services/api.service.ts
@@ -1,8 +1,9 @@
import { Injectable } from '@angular/core';
-//import { environment } from 'src/environments/environment';
import { HttpClient, HttpParams } from '@angular/common/http';
import { Observable } from 'rxjs';
+//import { environment } from 'src/environments/environment';
+
@Injectable({ providedIn: 'root' })
export class ApiService {
constructor(
diff --git a/src/app/core/services/applications.service.ts b/src/app/core/services/applications.service.ts
index 6bbaa0a..1a363cd 100644
--- a/src/app/core/services/applications.service.ts
+++ b/src/app/core/services/applications.service.ts
@@ -3,7 +3,7 @@ import { HttpParams } from '@angular/common/http';
import { Observable } from 'rxjs';
import { ApiService } from './api.service';
-import { Application, ApplicationListConfig, ApplicationListFilters } from 'src/app/core/models';
+import { Application, ApplicationList, ApplicationListConfig, ApplicationListFilters } from 'src/app/core/models';
import { map } from 'rxjs/operators';
@Injectable({ providedIn: 'root' })
@@ -12,7 +12,7 @@ export class ApplicationsService {
private apiService: ApiService
) { }
- query(config: ApplicationListConfig): Observable<{ applications: Application[], applicationsCount: number }> {
+ query(config: ApplicationListConfig): Observable {
// Convert any filters over to Angular's URLSearchParams
const params: ApplicationListFilters = {
apikey: config.filters.apikey,
@@ -34,8 +34,8 @@ export class ApplicationsService {
.pipe(map(data => data.application));
}
- destroy(slug: string) {
- return this.apiService.delete(`/applications/${slug}`);
+ destroy(slug: string): Observable {
+ return this.apiService.delete(`/applications/${slug}`).pipe(map(data => data.deleted));
}
save(application: Application): Observable {
diff --git a/src/app/core/services/backend.service.ts b/src/app/core/services/backend.service.ts
deleted file mode 100755
index 0db6342..0000000
--- a/src/app/core/services/backend.service.ts
+++ /dev/null
@@ -1,244 +0,0 @@
-import { Injectable } from '@angular/core';
-import { HttpClient, HttpHeaders } from '@angular/common/http';
-import { Observable } from 'rxjs';
-
-import { Jump } from 'src/app/core/models';
-import { environment } from 'src/environments/environment';
-
-export interface JumpDoc {
- _id?: string;
- _rev?: string;
- type: string;
- date: string;
- numero: number,
- lieu?: string;
- oaci?: string;
- aeronef?: string;
- imat?: string;
- hauteur?: number,
- voile?: string;
- taille?: number,
- categorie?: string;
- module?: string;
- participants?: number,
- programme?: string;
- accessoires?: string;
- zone?: string;
- dossier?: string;
- video?: string;
-}
-
-export interface JumpViewResults {
- rows: Array;
- total_rows: number;
-}
-
-@Injectable({ providedIn: 'root' })
-export class BackendService {
- private _couchdbUrl = environment.couchdbUrl;
- private _couchdbDatabase = environment.couchdbDatabase;
- private _couchdbDesign = environment.couchdbDesign;
- private _couchdbCredential = environment.couchdbCredential;
- //private _couchdbUrl = "http://couchdb.unespace.com/material_grow/_design/netgrowing_app/_view/allDevices";
-
- httpOptions = {
- headers: new HttpHeaders({
- 'Content-Type': 'application/json',
- 'Authorization': 'Basic ' + this._couchdbCredential
- })
- }
-
- constructor(private _http: HttpClient) { }
-
- writeDoc(doc: Object): Promise