creation-team connection back ok
This commit is contained in:
parent
0b51c771ce
commit
50f5b00b52
5
.vscode/settings.json
vendored
Normal file
5
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"workbench.colorCustomizations": {
|
||||
"titleBar.activeBackground": "#4950a1"
|
||||
}
|
||||
}
|
@ -4,9 +4,6 @@ export interface Membre {
|
||||
email: string;
|
||||
password: string;
|
||||
dateNaissance: Date;
|
||||
profil: boolean;
|
||||
roleList: string[];
|
||||
|
||||
passwordConfirm: string;
|
||||
roleList: string[];
|
||||
}
|
||||
|
@ -1,2 +1,7 @@
|
||||
<app-header></app-header>
|
||||
<app-side-bar></app-side-bar>
|
||||
<div class="d-flex justify-content-center">
|
||||
<button button type="button" class="btn btn-primary btn-lg"
|
||||
routerLink="../creation-team"
|
||||
routerLinkActive="active-custom">Créer ma team</button>
|
||||
</div>
|
||||
|
@ -67,7 +67,6 @@ export class PageAddMemberComponent implements OnInit {
|
||||
email: emailValue,
|
||||
password: passwordValue,
|
||||
dateNaissance: dateNaissanceValue,
|
||||
profil: profilValue,
|
||||
passwordConfirm: passwordConfirmValue,
|
||||
roleList: ["ROLE_PARENT"]
|
||||
};
|
||||
|
@ -25,7 +25,7 @@ export class PageSignupComponent implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
// *********************************penser a changer group car déprécié********************************
|
||||
// *********************************pensser a changer group car déprécié********************************
|
||||
this.signupForm = this.fb.group(
|
||||
{
|
||||
firstNameFc: new FormControl('', [Validators.required]),
|
||||
@ -61,30 +61,16 @@ export class PageSignupComponent implements OnInit {
|
||||
const passwordValue = this.signupForm.value['passwordFc'];
|
||||
const dateNaissanceValue = this.signupForm.value['dateNaissanceFc'];
|
||||
const passwordConfirmValue = this.signupForm.value['passwordConfirmFc'];
|
||||
|
||||
const roleValue = ['ROLE_PARENT'];
|
||||
|
||||
const membre: Membre = {
|
||||
prenom: prenomValue,
|
||||
nom: nomValue,
|
||||
prenom: prenomValue,
|
||||
email: emailValue,
|
||||
password: passwordValue,
|
||||
dateNaissance: dateNaissanceValue,
|
||||
passwordConfirm: passwordConfirmValue,
|
||||
roleList: roleValue,
|
||||
|
||||
const teamValue = '';
|
||||
|
||||
const membre: Membre = {
|
||||
nom: firstNameValue,
|
||||
prenom: lastNameValue,
|
||||
email: emailValue,
|
||||
password: passwordValue,
|
||||
dateNaissance: dateNaissanceValue,
|
||||
profil: profilValue,
|
||||
passwordConfirm: passwordConfirmValue,
|
||||
roleList: ["ROLE_PARENT"]
|
||||
|
||||
};
|
||||
|
||||
if (membre.email !== '' && membre.password !== '') {
|
||||
|
@ -58,7 +58,7 @@ export class AuthService {
|
||||
creationTeam(team: Team): Observable<any> {
|
||||
console.log(team);
|
||||
|
||||
return this.http.post(`${this.apiUrl}/creation-compte`, team);
|
||||
return this.http.post(`${this.apiUrl}/teams/add`, team);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user