Correction sur la mise en cache des
données référentiel et leurs utilisation sur la liste des sauts.
This commit is contained in:
@@ -2,15 +2,10 @@ import { Component, OnInit, ViewChild, AfterViewInit } from '@angular/core';
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { MatInput } from '@angular/material/input';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
import { first } from 'rxjs/operators';
|
||||
|
||||
import { AuthenticationService } from '../../services/authentication.service';
|
||||
import { AircraftService } from "../../services/aircraft.service";
|
||||
import { GearService } from "../../services/gear.service";
|
||||
import { JumpTypeService } from "../../services/jump-type.service";
|
||||
import { DropzoneService } from "../../services/dropzone.service";
|
||||
|
||||
@Component({
|
||||
selector: 'app-login-user',
|
||||
@@ -28,12 +23,7 @@ export class LoginUserComponent implements OnInit, AfterViewInit {
|
||||
constructor(private formBuilder: FormBuilder,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private authenticationService: AuthenticationService,
|
||||
private serviceApiAircraft : AircraftService,
|
||||
private serviceApiJumpType : JumpTypeService,
|
||||
private serviceApiDropzone : DropzoneService,
|
||||
private serviceApiGear : GearService,
|
||||
private translateService: TranslateService) {
|
||||
private authenticationService: AuthenticationService) {
|
||||
if (this.authenticationService.currentUserValue) {
|
||||
this.router.navigate(['/']);
|
||||
}
|
||||
@@ -64,7 +54,6 @@ export class LoginUserComponent implements OnInit, AfterViewInit {
|
||||
onLoginSubmit() {
|
||||
this.submitted = true;
|
||||
|
||||
// stop here if form is invalid
|
||||
if (this.loginForm.invalid) {
|
||||
return;
|
||||
}
|
||||
@@ -74,11 +63,6 @@ export class LoginUserComponent implements OnInit, AfterViewInit {
|
||||
.pipe(first())
|
||||
.subscribe(
|
||||
data => {
|
||||
this.serviceApiAircraft.getListOfAircrafts(false).subscribe();
|
||||
this.serviceApiJumpType.getListOfJumpTypes().subscribe();
|
||||
this.serviceApiDropzone.getListOfDropZones(false).subscribe();
|
||||
this.serviceApiGear.getListOfGears().subscribe();
|
||||
|
||||
this.router.navigate([this.returnUrl]);
|
||||
},
|
||||
error => {
|
||||
|
||||
Reference in New Issue
Block a user