From 31621fbb44a7a45ccab3cb872494fb82c92649c4 Mon Sep 17 00:00:00 2001 From: Danglot Date: Fri, 27 Mar 2020 21:32:19 +0100 Subject: [PATCH 1/3] fix: update field birthdate of the user model in the front --- .../src/app/shared/models/user.ts | 41 +++++++++---------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/skillful_network_client/src/app/shared/models/user.ts b/skillful_network_client/src/app/shared/models/user.ts index 9bd4ebc6..83961f9d 100755 --- a/skillful_network_client/src/app/shared/models/user.ts +++ b/skillful_network_client/src/app/shared/models/user.ts @@ -10,7 +10,7 @@ export class User { private _lastName: string; private _password: string; private _email: string; - private _birthDate: string; + private _birthDate: Date; private _qualification: string; private _competences: string[]; private _mobileNumber: string; @@ -24,25 +24,24 @@ export class User { private _careerGoal: string; constructor(data: any) { - this.id = data.id; - this.firstName = data.firstName; - - this.email = data.email; - this.status = data.status; + this._id = data.id; + this._firstName = data.firstName; + this._email = data.email; + this._status = data.status; this._qualification = data.qualification; - this.lastName = data.lastName; - this.password = data.password; + this._lastName = data.lastName; + this._password = data.password; this._birthDate = data.birthDate; - this.email = data.email; + this._email = data.email; this._mobileNumber = data.mobileNumber; - this.status = data.status; - this.validated = data.validated; - this.photo = data.photo; - this.skillSet = data.skillSet; - this.qualificationSet = data.qualificationSet; - this.subscriptionSet = data.subscriptionSet; - this.photoProfile = data.photoProfile; - this.careerGoal = data.careerGoal; + this._status = data.status; + this._validated = data.validated; + this._photo = data.photo; + this._skillSet = data.skillSet; + this._qualificationSet = data.qualificationSet; + this._subscriptionSet = data.subscriptionSet; + this._photoProfile = data.photoProfile; + this._careerGoal = data.careerGoal; } /* GETTERS & SETTERS */ public get id(): number { @@ -69,12 +68,12 @@ export class User { public set password(value: string) { this._password = value; } - /* get birthDate(): Date { + get birthDate(): Date { return this._birthDate; } set birthDate(value: Date) { this._birthDate = value; - }*/ + } public get email(): string { return this._email; } @@ -87,8 +86,7 @@ export class User { public set status(value: string) { this._status = value; } - - public get mobileNumber(): string { + public get mobileNumber(): string { return this._mobileNumber; } public set mobileNumber(value: string) { @@ -113,7 +111,6 @@ export class User { public set skillSet(value: Skill[]) { this._skillSet = value; } - public get qualificationSet(): Qualif[] { return this._qualificationSet; } From 7d30ced38cba04d7edb28897803bd36ec0c4693e Mon Sep 17 00:00:00 2001 From: Danglot Date: Sat, 28 Mar 2020 20:53:22 +0100 Subject: [PATCH 2/3] fix: using right getters for skills, subscriptions and qualifications --- .../src/app/home/dashboard/profile/profile.component.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/skillful_network_client/src/app/home/dashboard/profile/profile.component.html b/skillful_network_client/src/app/home/dashboard/profile/profile.component.html index 20003ad0..06bb0ee1 100644 --- a/skillful_network_client/src/app/home/dashboard/profile/profile.component.html +++ b/skillful_network_client/src/app/home/dashboard/profile/profile.component.html @@ -16,11 +16,11 @@
  • Statut : {{ user.status }}
  • -
  • Qualification : {{ user.qualification }}
  • +
  • Qualification : {{ user.qualificationSet }}
  • -
  • Competences : {{ user.competences }}
  • -
  • Competences : {{ user.skillSet }}
  • + +
  • Abonnements : {{ user.subscriptionSet }}
  • From 4bfa247060794dc81be86cf5234ba45478174306 Mon Sep 17 00:00:00 2001 From: Danglot Date: Sat, 28 Mar 2020 20:53:40 +0100 Subject: [PATCH 3/3] fix: remove dependency to zone.js --- skillful_network_client/tsconfig.app.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/skillful_network_client/tsconfig.app.json b/skillful_network_client/tsconfig.app.json index ec3a1149..f758d982 100755 --- a/skillful_network_client/tsconfig.app.json +++ b/skillful_network_client/tsconfig.app.json @@ -6,8 +6,7 @@ }, "files": [ "src/main.ts", - "src/polyfills.ts", - "node_modules/zone.js/lib/zone-spec/long-stack-trace.d.ts" + "src/polyfills.ts" ], "include": [ "src/**/*.d.ts"