Skip to content
Snippets Groups Projects
Unverified Commit ff6808ff authored by florimondmanca's avatar florimondmanca
Browse files

add phone on user and student registration

parent aa261d7e
No related branches found
No related tags found
1 merge request!26Release first-users version to production
...@@ -5,6 +5,7 @@ class RegistrationSchema { ...@@ -5,6 +5,7 @@ class RegistrationSchema {
email: string; email: string;
firstName: string; firstName: string;
lastName: string; lastName: string;
phoneNumber: string;
} }
export class Registration extends RegistrationSchema { export class Registration extends RegistrationSchema {
...@@ -27,6 +28,7 @@ export class RegistrationAdapter { ...@@ -27,6 +28,7 @@ export class RegistrationAdapter {
email: obj.email, email: obj.email,
first_name: obj.firstName, first_name: obj.firstName,
last_name: obj.lastName, last_name: obj.lastName,
phone_number: obj.phoneNumber,
} }
} }
} }
...@@ -16,7 +16,16 @@ ...@@ -16,7 +16,16 @@
<!-- Email --> <!-- Email -->
<mat-form-field class="full-width"> <mat-form-field class="full-width">
<input matInput type="email" formControlName="email" placeholder="Adresse email" required> <input matInput type="email" formControlName="email" placeholder="Adresse email" required>
<mat-hint>Elle te servira d'identifiant de connexion.</mat-hint> <mat-hint>
Elle te servira d'identifiant de connexion.
</mat-hint>
</mat-form-field>
<mat-form-field class="full-width">
<input matInput type="tel" formControlName="phoneNumber" placeholder="Numéro de téléphone" required>
<mat-hint>
Il nous permettra de te contacter en cas de nécessité.
</mat-hint>
</mat-form-field> </mat-form-field>
<!-- Password --> <!-- Password -->
......
...@@ -37,6 +37,7 @@ export class StudentSignupComponent implements OnInit { ...@@ -37,6 +37,7 @@ export class StudentSignupComponent implements OnInit {
firstName: '', firstName: '',
lastName: '', lastName: '',
email: ['', Validators.email], email: ['', Validators.email],
phoneNumber: '',
password: '', password: '',
passwordConfirm: '', passwordConfirm: '',
}, { validator: (group) => this.checkPasswords(group)}) }, { validator: (group) => this.checkPasswords(group)})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment