diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts
index 7071dda..e8c18fa 100644
--- a/src/app/app-routing.module.ts
+++ b/src/app/app-routing.module.ts
@@ -2,14 +2,14 @@ import { NgModule } from '@angular/core';
import { Routes, RouterModule, PreloadAllModules } from '@angular/router';
const routes: Routes = [
- {
- path: 'dashboard',
- loadChildren: () => import('./components/home/home.module').then(m => m.HomeModule)
- },
{
path: 'calculator',
loadChildren: () => import('./components/calculator/calculator.module').then(m => m.CalculatorModule)
},
+ {
+ path: 'dashboard',
+ loadChildren: () => import('./components/dashboard/dashboard.module').then(m => m.DashboardModule)
+ },
{
path: 'logbook',
loadChildren: () => import('./components/logbook/logbook.module').then(m => m.LogbookModule)
diff --git a/src/app/app.module.ts b/src/app/app.module.ts
index 6e58c18..407efe4 100644
--- a/src/app/app.module.ts
+++ b/src/app/app.module.ts
@@ -8,7 +8,7 @@ import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { CoreModule } from './core/core.module';
import { AuthModule } from './components/auth/auth.module';
-import { HomeModule } from './components/home/home.module';
+import { DashboardModule } from './components/dashboard/dashboard.module';
import { SpinnerComponent } from './components/shared';
import { FullComponent } from 'src/app/components/shared/layout';
//import { FullComponent } from 'src/app/components/shared/layout/full.component';
@@ -27,7 +27,7 @@ registerLocaleData(localeFr);
SpinnerComponent,
FullComponent,
//HeaderComponent, FooterComponent, FullComponent,
- HomeModule
+ DashboardModule
],
providers: [ Title, { provide: LOCALE_ID, useValue: 'fr-FR' } ],
bootstrap: [ AppComponent ]
diff --git a/src/app/components/calculator/calculator.component.html b/src/app/components/calculator/calculator.component.html
index 2a3ce29..5dc2d32 100644
--- a/src/app/components/calculator/calculator.component.html
+++ b/src/app/components/calculator/calculator.component.html
@@ -125,54 +125,54 @@
Tableau des tailles de voile par poids
-
+
|
{{element.weight}}
|
-
+
{{tableHeader[1].name}} |
{{element.ranges[0].value}} |
-
+
{{tableHeader[2].name}} |
{{element.ranges[1].value}} |
-
+
{{tableHeader[3].name}} |
{{element.ranges[2].value}} |
-
+
{{tableHeader[4].name}} |
{{element.ranges[3].value}} |
-
+
{{tableHeader[5].name}} |
{{element.ranges[4].value}} |
-
+
{{tableHeader[6].name}} |
{{element.ranges[5].value}} |
-
+
{{tableHeader[7].name}} |
{{element.ranges[6].value}} |
-
+
{{tableHeader[8].name}} |
{{element.ranges[7].value}} |
-
+
{{tableHeader[9].name}} |
{{element.ranges[8].value}} |
@@ -186,11 +186,11 @@
+
@@ -206,7 +206,6 @@
-
@@ -222,7 +221,6 @@
-
@@ -238,7 +236,6 @@
-
@@ -254,7 +251,6 @@
-
@@ -270,7 +266,6 @@
-
@@ -463,4 +458,5 @@
-
\ No newline at end of file
+
+-->
\ No newline at end of file
diff --git a/src/app/components/home/home-routing.module.ts b/src/app/components/dashboard/dashboard-routing.module.ts
similarity index 72%
rename from src/app/components/home/home-routing.module.ts
rename to src/app/components/dashboard/dashboard-routing.module.ts
index ba5bd56..2a51a14 100644
--- a/src/app/components/home/home-routing.module.ts
+++ b/src/app/components/dashboard/dashboard-routing.module.ts
@@ -1,13 +1,13 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
-import { HomeComponent } from './home.component';
+import { DashboardComponent } from './dashboard.component';
import { AuthResolver } from 'src/app/core/services';
const routes: Routes = [
{
path: '',
- component: HomeComponent,
+ component: DashboardComponent,
resolve: {
isAuthenticated: AuthResolver
}
@@ -18,4 +18,4 @@ const routes: Routes = [
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
-export class HomeRoutingModule { }
+export class DashboardRoutingModule { }
diff --git a/src/app/components/home/home.component.html b/src/app/components/dashboard/dashboard.component.html
similarity index 100%
rename from src/app/components/home/home.component.html
rename to src/app/components/dashboard/dashboard.component.html
diff --git a/src/app/components/home/home.component.scss b/src/app/components/dashboard/dashboard.component.scss
similarity index 100%
rename from src/app/components/home/home.component.scss
rename to src/app/components/dashboard/dashboard.component.scss
diff --git a/src/app/components/home/home.component.spec.ts b/src/app/components/dashboard/dashboard.component.spec.ts
similarity index 50%
rename from src/app/components/home/home.component.spec.ts
rename to src/app/components/dashboard/dashboard.component.spec.ts
index ba1b4a3..5e98991 100644
--- a/src/app/components/home/home.component.spec.ts
+++ b/src/app/components/dashboard/dashboard.component.spec.ts
@@ -1,16 +1,16 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
-import { HomeComponent } from './home.component';
+import { DashboardComponent } from './dashboard.component';
-describe('HomeComponent', () => {
- let component: HomeComponent;
- let fixture: ComponentFixture;
+describe('DashboardComponent', () => {
+ let component: DashboardComponent;
+ let fixture: ComponentFixture;
beforeEach(() => {
TestBed.configureTestingModule({
- declarations: [HomeComponent]
+ declarations: [DashboardComponent]
});
- fixture = TestBed.createComponent(HomeComponent);
+ fixture = TestBed.createComponent(DashboardComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
diff --git a/src/app/components/home/home.component.ts b/src/app/components/dashboard/dashboard.component.ts
similarity index 88%
rename from src/app/components/home/home.component.ts
rename to src/app/components/dashboard/dashboard.component.ts
index 7c27490..6fcf693 100644
--- a/src/app/components/home/home.component.ts
+++ b/src/app/components/dashboard/dashboard.component.ts
@@ -6,7 +6,8 @@ import { Observable, Subscription } from 'rxjs';
import { take } from 'rxjs/operators';
import { User, Errors, Aeronef, AeronefByImat, Canopy, CanopyModelBySize, DropZone, DropZoneByYear } from 'src/app/core/models';
-import { AeronefsService, CanopiesService, DropZonesService, UserService } from 'src/app/core/services';
+//import { AeronefsService, CanopiesService, DropZonesService, UserService } from 'src/app/core/services';
+import { UserService } from 'src/app/core/services';
import { ShowAuthedDirective } from 'src/app/components/shared/show-authed.directive';
import {
AeronefsComponent, AeronefsBarComponent,
@@ -24,16 +25,18 @@ import {
DropZonesComponent, DropZonesBarComponent,
JumpsByMonthComponent
],
- selector: 'huapp-home',
- templateUrl: './home.component.html',
- styleUrls: ['./home.component.scss']
+ selector: 'huapp-dashboard',
+ templateUrl: './dashboard.component.html',
+ styleUrls: ['./dashboard.component.scss']
})
-export class HomeComponent implements OnInit, OnDestroy {
+export class DashboardComponent implements OnInit, OnDestroy {
private _currentUser: Subscription = new Subscription();
private _data: Subscription = new Subscription();
+ /*
private _aeronefs: Subscription = new Subscription();
private _canopies: Subscription = new Subscription();
private _dropzones: Subscription = new Subscription();
+ */
title = 'Dashboard';
errors!: Errors;
isAuthenticated = false;
@@ -45,7 +48,7 @@ export class HomeComponent implements OnInit, OnDestroy {
canopyAggregate!: Array;
canopies!: Array;
canopiesCount = 0;
- dropzoneAggregate!: Array; // Array
+ dropzoneAggregate!: Array;
dropzones!: Array;
dropzonesCount = 0;
@@ -53,10 +56,12 @@ export class HomeComponent implements OnInit, OnDestroy {
private route: ActivatedRoute,
private router: Router,
private titleService: Title,
- private userService: UserService,
+ private userService: UserService
+ /*
private aeronefsService: AeronefsService,
private canopiesService: CanopiesService,
private dropzonesService: DropZonesService
+ */
) {
this._resetErrors();
}
@@ -85,6 +90,7 @@ export class HomeComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this._currentUser.unsubscribe();
+ this._data.unsubscribe();
/*
this._aeronefs.unsubscribe();
this._canopies.unsubscribe();
@@ -96,6 +102,7 @@ export class HomeComponent implements OnInit, OnDestroy {
this.errors = { errors: {} };
}
+ /*
private _loadAeronefs(): void {
const aeronefs$: Observable> = this.aeronefsService.getAllByImat();
this._aeronefs = aeronefs$.subscribe((aggregate: Array) => {
@@ -117,8 +124,6 @@ export class HomeComponent implements OnInit, OnDestroy {
}
private _loadDropzones(): void {
- //const dropzones$: Observable> = this.dropzonesService.getAllByOaci();
- //this._dropzones = dropzones$.subscribe((aggregate: Array) => {
const dropzones$: Observable> = this.dropzonesService.getAllByDate();
this._dropzones = dropzones$.subscribe((aggregate: Array) => {
this.dropzoneAggregate = aggregate;
@@ -127,4 +132,5 @@ export class HomeComponent implements OnInit, OnDestroy {
console.log(this.dropzonesCount);
});
}
+ */
}
diff --git a/src/app/components/dashboard/dashboard.module.ts b/src/app/components/dashboard/dashboard.module.ts
new file mode 100644
index 0000000..b7271b7
--- /dev/null
+++ b/src/app/components/dashboard/dashboard.module.ts
@@ -0,0 +1,15 @@
+import { NgModule } from '@angular/core';
+
+import { AuthResolver } from 'src/app/core/services';
+import { DashboardComponent } from './dashboard.component';
+import { DashboardRoutingModule } from './dashboard-routing.module';
+
+@NgModule({
+ imports: [
+ DashboardRoutingModule,
+ DashboardComponent
+ ],
+ exports: [],
+ providers: [AuthResolver]
+})
+export class DashboardModule { }
diff --git a/src/app/components/home/home.module.ts b/src/app/components/home/home.module.ts
deleted file mode 100644
index d05a7e2..0000000
--- a/src/app/components/home/home.module.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { NgModule } from '@angular/core';
-
-import { AuthResolver } from 'src/app/core/services';
-import { HomeComponent } from './home.component';
-import { HomeRoutingModule } from './home-routing.module';
-
-@NgModule({
- imports: [
- HomeRoutingModule,
- HomeComponent
- ],
- exports: [],
- providers: [AuthResolver]
-})
-export class HomeModule { }
diff --git a/src/app/components/index.ts b/src/app/components/index.ts
index ff31bfa..87cc1cc 100644
--- a/src/app/components/index.ts
+++ b/src/app/components/index.ts
@@ -1,6 +1,6 @@
export * from './auth/auth.component';
export * from './calculator/calculator.component';
-export * from './home/home.component';
+export * from './dashboard/dashboard.component';
export * from './logbook/logbook.component';
export * from './profile/profile.component';
export * from './shared';
\ No newline at end of file
diff --git a/src/app/routes/front.routes.ts b/src/app/routes/front.routes.ts
index d18c7d6..93752f6 100644
--- a/src/app/routes/front.routes.ts
+++ b/src/app/routes/front.routes.ts
@@ -1,14 +1,14 @@
import { Routes } from '@angular/router';
-import { AuthComponent, CalculatorComponent, HomeComponent, LogbookComponent, ProfileComponent } from 'src/app/components';
-import { AuthResolver, NoAuthGuard } from 'src/app/core/services';
+import { AuthComponent, CalculatorComponent, DashboardComponent, LogbookComponent, ProfileComponent } from 'src/app/components';
+import { NoAuthGuard } from 'src/app/core/services';
export const FRONT_ROUTES: Routes = [
+ { path: 'authenticate', component: AuthComponent, canActivate: [ NoAuthGuard ] },
{ path: 'calculator', component: CalculatorComponent },
- { path: 'dashboard', component: HomeComponent},
+ { path: 'dashboard', component: DashboardComponent},
{ path: 'logbook', component: LogbookComponent },
- { path: 'profile', component: ProfileComponent },
{ path: 'login', component: AuthComponent, canActivate: [ NoAuthGuard ] },
- { path: 'register', component: AuthComponent, canActivate: [ NoAuthGuard ] },
- { path: 'authenticate', component: AuthComponent, canActivate: [ NoAuthGuard ] }
+ { path: 'profile', component: ProfileComponent },
+ { path: 'register', component: AuthComponent, canActivate: [ NoAuthGuard ] }
];