From 50f5b00b5297b1bc7db769d79d22a53f9e037da1 Mon Sep 17 00:00:00 2001 From: Sana EL HIRI Date: Fri, 21 Jan 2022 12:56:22 +0100 Subject: [PATCH] creation-team connection back ok --- .vscode/settings.json | 5 +++++ src/app/models/membre.ts | 3 --- .../page-account/page-account.component.html | 7 ++++++- .../page-add-member.component.ts | 1 - .../pages/page-signup/page-signup.component.ts | 18 ++---------------- src/app/services/auth.service.ts | 2 +- 6 files changed, 14 insertions(+), 22 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..b4f8d39 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "workbench.colorCustomizations": { + "titleBar.activeBackground": "#4950a1" + } +} diff --git a/src/app/models/membre.ts b/src/app/models/membre.ts index e2da4de..acad742 100644 --- a/src/app/models/membre.ts +++ b/src/app/models/membre.ts @@ -4,9 +4,6 @@ export interface Membre { email: string; password: string; dateNaissance: Date; - profil: boolean; - roleList: string[]; - passwordConfirm: string; roleList: string[]; } diff --git a/src/app/pages/page-account/page-account.component.html b/src/app/pages/page-account/page-account.component.html index 2d3d7d1..09a4426 100644 --- a/src/app/pages/page-account/page-account.component.html +++ b/src/app/pages/page-account/page-account.component.html @@ -1,2 +1,7 @@ - \ No newline at end of file + +
+ +
diff --git a/src/app/pages/page-add-member/page-add-member.component.ts b/src/app/pages/page-add-member/page-add-member.component.ts index 426a262..e750e97 100644 --- a/src/app/pages/page-add-member/page-add-member.component.ts +++ b/src/app/pages/page-add-member/page-add-member.component.ts @@ -67,7 +67,6 @@ export class PageAddMemberComponent implements OnInit { email: emailValue, password: passwordValue, dateNaissance: dateNaissanceValue, - profil: profilValue, passwordConfirm: passwordConfirmValue, roleList: ["ROLE_PARENT"] }; diff --git a/src/app/pages/page-signup/page-signup.component.ts b/src/app/pages/page-signup/page-signup.component.ts index 4e80ea4..c31228f 100644 --- a/src/app/pages/page-signup/page-signup.component.ts +++ b/src/app/pages/page-signup/page-signup.component.ts @@ -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 !== '') { diff --git a/src/app/services/auth.service.ts b/src/app/services/auth.service.ts index 1de854c..6098579 100644 --- a/src/app/services/auth.service.ts +++ b/src/app/services/auth.service.ts @@ -58,7 +58,7 @@ export class AuthService { creationTeam(team: Team): Observable { console.log(team); - return this.http.post(`${this.apiUrl}/creation-compte`, team); + return this.http.post(`${this.apiUrl}/teams/add`, team); }