Début d'ajout d'une image pour les avions
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
import { Component, OnInit } from "@angular/core";
|
||||
import { FormGroup, FormControl, Validators } from "@angular/forms";
|
||||
import { AuthenticationService } from "../../services/authentication.service";
|
||||
import { User } from "../../models/user";
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { FormGroup, FormControl, Validators } from '@angular/forms';
|
||||
import { AuthenticationService } from '../../services/authentication.service';
|
||||
import { User } from '../../models/user';
|
||||
|
||||
@Component({
|
||||
selector: "app-user-profile",
|
||||
templateUrl: "./user-profile.component.html",
|
||||
styleUrls: ["./user-profile.component.css"],
|
||||
selector: 'app-user-profile',
|
||||
templateUrl: './user-profile.component.html',
|
||||
styleUrls: ['./user-profile.component.css'],
|
||||
})
|
||||
export class UserProfileComponent implements OnInit {
|
||||
public userForm: FormGroup;
|
||||
|
||||
constructor(private authenticationService: AuthenticationService) {}
|
||||
constructor(private authenticationService: AuthenticationService) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
let currentUser = this.authenticationService.currentUserValue;
|
||||
const currentUser = this.authenticationService.currentUserValue;
|
||||
|
||||
this.userForm = new FormGroup(
|
||||
{
|
||||
@@ -32,15 +32,15 @@ export class UserProfileComponent implements OnInit {
|
||||
Validators.email,
|
||||
]),
|
||||
currentPassword: new FormControl(
|
||||
"",
|
||||
Validators.pattern("^[A-Za-z0-9_-]{8,15}$")
|
||||
'',
|
||||
Validators.pattern('^[A-Za-z0-9_-]{8,15}$')
|
||||
),
|
||||
newPassword: new FormControl(
|
||||
"",
|
||||
Validators.pattern("^[A-Za-z0-9_-]{8,15}$")
|
||||
'',
|
||||
Validators.pattern('^[A-Za-z0-9_-]{8,15}$')
|
||||
),
|
||||
},
|
||||
{ updateOn: "blur" }
|
||||
{ updateOn: 'blur' }
|
||||
);
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ export class UserProfileComponent implements OnInit {
|
||||
return;
|
||||
}
|
||||
|
||||
let updatedUser = new User();
|
||||
const updatedUser = new User();
|
||||
updatedUser.login = formData.username;
|
||||
updatedUser.password = formData.password;
|
||||
updatedUser.firstName = formData.firstname;
|
||||
|
||||
Reference in New Issue
Block a user