diff --git a/src/app/members/account/core/personal-data.service.ts b/src/app/members/account/core/personal-data.service.ts index 46be6932dfc5a061e47d693b3cf3fc2f59de1ce2..8c928e93e83ebc4d211860958bfb006be0581130 100644 --- a/src/app/members/account/core/personal-data.service.ts +++ b/src/app/members/account/core/personal-data.service.ts @@ -31,10 +31,20 @@ export class PersonalDataService extends ApiService { ); } retrieve(id: number | string): Observable<PersonalData> { - let url = this.baseUrl ; + + let url = this.baseUrl; return this.http.get<PersonalData>(url).pipe( map(v =>{ - return this.adapter.adapt(v[0])}), + console.log('get',v) + if(v instanceof Array){ + if (v.length>1){ + return this.adapter.adapt(v.find((user)=>user.user_id===id)) + } + return this.adapter.adapt(v[0]) + } + + }), + ); } diff --git a/src/app/members/account/my-data/my-data.component.ts b/src/app/members/account/my-data/my-data.component.ts index 06aa58fac67422f6dfc92ae25636b4bb8c74907c..b19ef19cfdd9e4d55c64bcc254ce31270a814451 100644 --- a/src/app/members/account/my-data/my-data.component.ts +++ b/src/app/members/account/my-data/my-data.component.ts @@ -34,6 +34,7 @@ export class MyDataComponent implements OnInit { } + public editData = ()=> { this.router.navigate(['./membres/compte/modifier_donnees']) diff --git a/src/app/signup/student-signup/student-signup.component.html b/src/app/signup/student-signup/student-signup.component.html index 64ba46da0421255eb37e9b2ad0c7ebb5b2e64d8c..23e73c807456173ed609c6f318ae754fa8640140 100644 --- a/src/app/signup/student-signup/student-signup.component.html +++ b/src/app/signup/student-signup/student-signup.component.html @@ -33,6 +33,7 @@ </mat-hint> </mat-form-field> + <p> Il ne te reste plus qu'à choisir un mot de passe. :-) </p>