Commit 0eb6c1cd by Muhammad Usman

career history percentage updated

parent 6d772dd9
...@@ -49,6 +49,7 @@ export class EducationComponent extends BaseComponent implements OnInit { ...@@ -49,6 +49,7 @@ export class EducationComponent extends BaseComponent implements OnInit {
.subscribe(response => { .subscribe(response => {
this.isLoading = false; this.isLoading = false;
this.careerProfile = response; this.careerProfile = response;
this.updatedObjs[this.careerProfile.ObjectID] = this.careerProfile;
if (this.careerProfile.EducationCertificates) { if (this.careerProfile.EducationCertificates) {
this.careerProfile.EducationCertificates.forEach(edu => { this.careerProfile.EducationCertificates.forEach(edu => {
edu.WhenCompletedField = UtilsService.convertStringToDate(edu.WhenCompleted); edu.WhenCompletedField = UtilsService.convertStringToDate(edu.WhenCompleted);
...@@ -101,7 +102,9 @@ export class EducationComponent extends BaseComponent implements OnInit { ...@@ -101,7 +102,9 @@ export class EducationComponent extends BaseComponent implements OnInit {
exp.WhenCompleted = UtilsService.convertDateToString(exp.WhenCompletedField); exp.WhenCompleted = UtilsService.convertDateToString(exp.WhenCompletedField);
}); });
this.isSaving = true; this.isSaving = true;
if (this.careerProfile.CompletedPercentageCH <= 60) {
this.careerProfile.CurrentProfileBuilderTab = CAREER_TABS.SKILLS; this.careerProfile.CurrentProfileBuilderTab = CAREER_TABS.SKILLS;
}
this.personalDetailsService.saveProfile(this.createdObjs, this.updatedObjs, this.deletedObjs) this.personalDetailsService.saveProfile(this.createdObjs, this.updatedObjs, this.deletedObjs)
.pipe(takeUntil(this.componentInView)) .pipe(takeUntil(this.componentInView))
.subscribe(res => { .subscribe(res => {
......
...@@ -50,6 +50,7 @@ export class ReferencesComponent extends BaseComponent implements OnInit { ...@@ -50,6 +50,7 @@ export class ReferencesComponent extends BaseComponent implements OnInit {
.subscribe(response => { .subscribe(response => {
this.isLoading = false; this.isLoading = false;
this.careerProfile = response; this.careerProfile = response;
this.updatedObjs[this.careerProfile.ObjectID] = this.careerProfile;
this.utilsService.addObjsToJSONByObjectID(this.updatedObjs, this.careerProfile.Referees); this.utilsService.addObjsToJSONByObjectID(this.updatedObjs, this.careerProfile.Referees);
this.addReferee(true); this.addReferee(true);
this.isLoading = false; this.isLoading = false;
...@@ -94,7 +95,9 @@ export class ReferencesComponent extends BaseComponent implements OnInit { ...@@ -94,7 +95,9 @@ export class ReferencesComponent extends BaseComponent implements OnInit {
} }
} }
this.isSaving = true; this.isSaving = true;
if (this.careerProfile.CompletedPercentageCH <= 80) {
this.careerProfile.CurrentProfileBuilderTab = CAREER_TABS.PUBLISH; this.careerProfile.CurrentProfileBuilderTab = CAREER_TABS.PUBLISH;
}
this.personalDetailsService.saveProfile(this.createdObjs, this.updatedObjs, this.deletedObjs) this.personalDetailsService.saveProfile(this.createdObjs, this.updatedObjs, this.deletedObjs)
.pipe(takeUntil(this.componentInView)) .pipe(takeUntil(this.componentInView))
.subscribe(res => { .subscribe(res => {
......
...@@ -48,6 +48,7 @@ export class SkillsComponent extends BaseComponent implements OnInit { ...@@ -48,6 +48,7 @@ export class SkillsComponent extends BaseComponent implements OnInit {
.subscribe(response => { .subscribe(response => {
this.isLoading = false; this.isLoading = false;
this.careerProfile = response; this.careerProfile = response;
this.updatedObjs[this.careerProfile.ObjectID] = this.careerProfile;
this.utilsService.addObjsToJSONByObjectID(this.updatedObjs, this.careerProfile.Skills); this.utilsService.addObjsToJSONByObjectID(this.updatedObjs, this.careerProfile.Skills);
this.addSkill(true); this.addSkill(true);
this.isLoading = false; this.isLoading = false;
...@@ -102,8 +103,9 @@ export class SkillsComponent extends BaseComponent implements OnInit { ...@@ -102,8 +103,9 @@ export class SkillsComponent extends BaseComponent implements OnInit {
return this.helperService.validateAllFormFields(this.form); return this.helperService.validateAllFormFields(this.form);
} }
this.isSaving = true; this.isSaving = true;
if (this.careerProfile.CompletedPercentageCH <= 60) {
this.careerProfile.CurrentProfileBuilderTab = CAREER_TABS.REFERENCES; this.careerProfile.CurrentProfileBuilderTab = CAREER_TABS.REFERENCES;
console.log(this.createdObjs, this.updatedObjs, this.deletedObjs); }
this.personalDetailsService.saveProfile(this.createdObjs, this.updatedObjs, this.deletedObjs) this.personalDetailsService.saveProfile(this.createdObjs, this.updatedObjs, this.deletedObjs)
.pipe(takeUntil(this.componentInView)) .pipe(takeUntil(this.componentInView))
.subscribe(res => { .subscribe(res => {
......
...@@ -48,6 +48,7 @@ export class WorkHistoryComponent extends BaseComponent implements OnInit { ...@@ -48,6 +48,7 @@ export class WorkHistoryComponent extends BaseComponent implements OnInit {
.subscribe(response => { .subscribe(response => {
this.isLoading = false; this.isLoading = false;
this.careerProfile = response; this.careerProfile = response;
this.updatedObjs[this.careerProfile.ObjectID] = this.careerProfile;
if (this.careerProfile.WorkExperiences) { if (this.careerProfile.WorkExperiences) {
this.careerProfile.WorkExperiences.forEach(exp => { this.careerProfile.WorkExperiences.forEach(exp => {
exp.StartMonthField = UtilsService.convertStringToDate(exp.StartMonth); exp.StartMonthField = UtilsService.convertStringToDate(exp.StartMonth);
...@@ -105,7 +106,9 @@ export class WorkHistoryComponent extends BaseComponent implements OnInit { ...@@ -105,7 +106,9 @@ export class WorkHistoryComponent extends BaseComponent implements OnInit {
exp.EndMonth = UtilsService.convertDateToString(exp.EndMonthField); exp.EndMonth = UtilsService.convertDateToString(exp.EndMonthField);
}); });
this.isSaving = true; this.isSaving = true;
if (this.careerProfile.CompletedPercentageCH <= 40) {
this.careerProfile.CurrentProfileBuilderTab = CAREER_TABS.EDUCATION; this.careerProfile.CurrentProfileBuilderTab = CAREER_TABS.EDUCATION;
}
this.personalDetailsService.saveProfile(this.createdObjs, this.updatedObjs, this.deletedObjs) this.personalDetailsService.saveProfile(this.createdObjs, this.updatedObjs, this.deletedObjs)
.pipe(takeUntil(this.componentInView)) .pipe(takeUntil(this.componentInView))
.subscribe(res => { .subscribe(res => {
......
...@@ -110,7 +110,7 @@ export class PersonalDetailsComponent extends BaseComponent implements OnInit { ...@@ -110,7 +110,7 @@ export class PersonalDetailsComponent extends BaseComponent implements OnInit {
} }
this.careerProfile.Candidate.User.UserName = this.careerProfile.Candidate.User.Email; this.careerProfile.Candidate.User.UserName = this.careerProfile.Candidate.User.Email;
this.isSaving = true; this.isSaving = true;
if (this.asChildComponent) { if (this.careerProfile.CompletedPercentageCH <= 20) {
this.careerProfile.CurrentProfileBuilderTab = CAREER_TABS.WORK_HISTORY; this.careerProfile.CurrentProfileBuilderTab = CAREER_TABS.WORK_HISTORY;
} }
this.personalDetailsService.saveProfile(this.createdObjs, this.updatedObjs, this.deletedObjs) this.personalDetailsService.saveProfile(this.createdObjs, this.updatedObjs, this.deletedObjs)
......
...@@ -13,6 +13,7 @@ export class CareerProfileModel extends BaseModel { ...@@ -13,6 +13,7 @@ export class CareerProfileModel extends BaseModel {
Skype: string; Skype: string;
Candidate = new CandidateModel(); Candidate = new CandidateModel();
CompletedPercentage: number; CompletedPercentage: number;
CompletedPercentageCH: number;
PersonalStatement: string; PersonalStatement: string;
Achievements: string; Achievements: string;
IsGoogleConnected: boolean; IsGoogleConnected: boolean;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment