From f468366c88717e1ae3e219502a6385f3b6f89686 Mon Sep 17 00:00:00 2001
From: Aidli Melissa <melissa.aidli@student-cs.fr>
Date: Thu, 10 Nov 2022 16:29:35 +0100
Subject: [PATCH] Restored phone number

---
 src/app/signup/core/registration.model.ts                 | 2 ++
 src/app/signup/student-signup/student-signup.component.ts | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/app/signup/core/registration.model.ts b/src/app/signup/core/registration.model.ts
index 9cb492b..68bad52 100644
--- a/src/app/signup/core/registration.model.ts
+++ b/src/app/signup/core/registration.model.ts
@@ -6,6 +6,7 @@ class RegistrationSchema {
   firstName: string;
   lastName: string;
   dateOfBirth : Date;
+  phoneNumber : string;
 }
 
 export class Registration extends RegistrationSchema {
@@ -29,6 +30,7 @@ export class RegistrationAdapter {
       first_name: obj.firstName,
       last_name: obj.lastName,
       dateOfBirth : obj.dateOfBirth,
+      phoneNumber : obj.phoneNumber,
     }
   }
 }
diff --git a/src/app/signup/student-signup/student-signup.component.ts b/src/app/signup/student-signup/student-signup.component.ts
index 92c556f..319ea5b 100644
--- a/src/app/signup/student-signup/student-signup.component.ts
+++ b/src/app/signup/student-signup/student-signup.component.ts
@@ -112,9 +112,9 @@ export class StudentSignupComponent implements OnInit {
 
   submit() {
     this.loading = true;
-    const {email,firstName,lastName,dateOfBirth} = this.formGroup.value
+    const {email,firstName,lastName,dateOfBirth,phoneNumber} = this.formGroup.value
     //const {gender,adressNumber,street,zipCode,city,personnalPhone,parentsPhone,parentsEmail,school,grade,section,specialTeaching,scholarship,fatherActivity,motherActivity,parentsStatus,dependantsNumber} = this.formGroup.value;
-    const registration: Registration = {email,firstName,lastName,dateOfBirth};
+    const registration: Registration = {email,firstName,lastName,dateOfBirth,phoneNumber};
    // const personnalData: PersonnalData = {gender,adressNumber,street,zipCode,city,personnalPhone,parentsPhone,parentsEmail,school,grade,section,specialTeaching,scholarship,fatherActivity,motherActivity,parentsStatus,dependantsNumber};
    
     const password: string = this.formGroup.controls.password.value;
-- 
GitLab