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;
|
email: string;
|
||||||
password: string;
|
password: string;
|
||||||
dateNaissance: Date;
|
dateNaissance: Date;
|
||||||
profil: boolean;
|
|
||||||
roleList: string[];
|
|
||||||
|
|
||||||
passwordConfirm: string;
|
passwordConfirm: string;
|
||||||
roleList: string[];
|
roleList: string[];
|
||||||
}
|
}
|
||||||
|
@ -1,2 +1,7 @@
|
|||||||
<app-header></app-header>
|
<app-header></app-header>
|
||||||
<app-side-bar></app-side-bar>
|
<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,
|
email: emailValue,
|
||||||
password: passwordValue,
|
password: passwordValue,
|
||||||
dateNaissance: dateNaissanceValue,
|
dateNaissance: dateNaissanceValue,
|
||||||
profil: profilValue,
|
|
||||||
passwordConfirm: passwordConfirmValue,
|
passwordConfirm: passwordConfirmValue,
|
||||||
roleList: ["ROLE_PARENT"]
|
roleList: ["ROLE_PARENT"]
|
||||||
};
|
};
|
||||||
|
@ -25,7 +25,7 @@ export class PageSignupComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
// *********************************penser a changer group car déprécié********************************
|
// *********************************pensser a changer group car déprécié********************************
|
||||||
this.signupForm = this.fb.group(
|
this.signupForm = this.fb.group(
|
||||||
{
|
{
|
||||||
firstNameFc: new FormControl('', [Validators.required]),
|
firstNameFc: new FormControl('', [Validators.required]),
|
||||||
@ -61,30 +61,16 @@ export class PageSignupComponent implements OnInit {
|
|||||||
const passwordValue = this.signupForm.value['passwordFc'];
|
const passwordValue = this.signupForm.value['passwordFc'];
|
||||||
const dateNaissanceValue = this.signupForm.value['dateNaissanceFc'];
|
const dateNaissanceValue = this.signupForm.value['dateNaissanceFc'];
|
||||||
const passwordConfirmValue = this.signupForm.value['passwordConfirmFc'];
|
const passwordConfirmValue = this.signupForm.value['passwordConfirmFc'];
|
||||||
|
|
||||||
const roleValue = ['ROLE_PARENT'];
|
const roleValue = ['ROLE_PARENT'];
|
||||||
|
|
||||||
const membre: Membre = {
|
const membre: Membre = {
|
||||||
prenom: prenomValue,
|
|
||||||
nom: nomValue,
|
nom: nomValue,
|
||||||
|
prenom: prenomValue,
|
||||||
email: emailValue,
|
email: emailValue,
|
||||||
password: passwordValue,
|
password: passwordValue,
|
||||||
dateNaissance: dateNaissanceValue,
|
dateNaissance: dateNaissanceValue,
|
||||||
passwordConfirm: passwordConfirmValue,
|
passwordConfirm: passwordConfirmValue,
|
||||||
roleList: roleValue,
|
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 !== '') {
|
if (membre.email !== '' && membre.password !== '') {
|
||||||
|
@ -58,7 +58,7 @@ export class AuthService {
|
|||||||
creationTeam(team: Team): Observable<any> {
|
creationTeam(team: Team): Observable<any> {
|
||||||
console.log(team);
|
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