Commit 0eb6c1cd by Muhammad Usman

career history percentage updated

parent 6d772dd9
......@@ -49,6 +49,7 @@ export class EducationComponent extends BaseComponent implements OnInit {
.subscribe(response => {
this.isLoading = false;
this.careerProfile = response;
this.updatedObjs[this.careerProfile.ObjectID] = this.careerProfile;
if (this.careerProfile.EducationCertificates) {
this.careerProfile.EducationCertificates.forEach(edu => {
edu.WhenCompletedField = UtilsService.convertStringToDate(edu.WhenCompleted);
......@@ -101,7 +102,9 @@ export class EducationComponent extends BaseComponent implements OnInit {
exp.WhenCompleted = UtilsService.convertDateToString(exp.WhenCompletedField);
});
this.isSaving = true;
if (this.careerProfile.CompletedPercentageCH <= 60) {
this.careerProfile.CurrentProfileBuilderTab = CAREER_TABS.SKILLS;
}
this.personalDetailsService.saveProfile(this.createdObjs, this.updatedObjs, this.deletedObjs)
.pipe(takeUntil(this.componentInView))
.subscribe(res => {
......
......@@ -50,6 +50,7 @@ export class ReferencesComponent extends BaseComponent implements OnInit {
.subscribe(response => {
this.isLoading = false;
this.careerProfile = response;
this.updatedObjs[this.careerProfile.ObjectID] = this.careerProfile;
this.utilsService.addObjsToJSONByObjectID(this.updatedObjs, this.careerProfile.Referees);
this.addReferee(true);
this.isLoading = false;
......@@ -94,7 +95,9 @@ export class ReferencesComponent extends BaseComponent implements OnInit {
}
}
this.isSaving = true;
if (this.careerProfile.CompletedPercentageCH <= 80) {
this.careerProfile.CurrentProfileBuilderTab = CAREER_TABS.PUBLISH;
}
this.personalDetailsService.saveProfile(this.createdObjs, this.updatedObjs, this.deletedObjs)
.pipe(takeUntil(this.componentInView))
.subscribe(res => {
......
......@@ -48,6 +48,7 @@ export class SkillsComponent extends BaseComponent implements OnInit {
.subscribe(response => {
this.isLoading = false;
this.careerProfile = response;
this.updatedObjs[this.careerProfile.ObjectID] = this.careerProfile;
this.utilsService.addObjsToJSONByObjectID(this.updatedObjs, this.careerProfile.Skills);
this.addSkill(true);
this.isLoading = false;
......@@ -102,8 +103,9 @@ export class SkillsComponent extends BaseComponent implements OnInit {
return this.helperService.validateAllFormFields(this.form);
}
this.isSaving = true;
if (this.careerProfile.CompletedPercentageCH <= 60) {
this.careerProfile.CurrentProfileBuilderTab = CAREER_TABS.REFERENCES;
console.log(this.createdObjs, this.updatedObjs, this.deletedObjs);
}
this.personalDetailsService.saveProfile(this.createdObjs, this.updatedObjs, this.deletedObjs)
.pipe(takeUntil(this.componentInView))
.subscribe(res => {
......
......@@ -48,6 +48,7 @@ export class WorkHistoryComponent extends BaseComponent implements OnInit {
.subscribe(response => {
this.isLoading = false;
this.careerProfile = response;
this.updatedObjs[this.careerProfile.ObjectID] = this.careerProfile;
if (this.careerProfile.WorkExperiences) {
this.careerProfile.WorkExperiences.forEach(exp => {
exp.StartMonthField = UtilsService.convertStringToDate(exp.StartMonth);
......@@ -105,7 +106,9 @@ export class WorkHistoryComponent extends BaseComponent implements OnInit {
exp.EndMonth = UtilsService.convertDateToString(exp.EndMonthField);
});
this.isSaving = true;
if (this.careerProfile.CompletedPercentageCH <= 40) {
this.careerProfile.CurrentProfileBuilderTab = CAREER_TABS.EDUCATION;
}
this.personalDetailsService.saveProfile(this.createdObjs, this.updatedObjs, this.deletedObjs)
.pipe(takeUntil(this.componentInView))
.subscribe(res => {
......
......@@ -110,7 +110,7 @@ export class PersonalDetailsComponent extends BaseComponent implements OnInit {
}
this.careerProfile.Candidate.User.UserName = this.careerProfile.Candidate.User.Email;
this.isSaving = true;
if (this.asChildComponent) {
if (this.careerProfile.CompletedPercentageCH <= 20) {
this.careerProfile.CurrentProfileBuilderTab = CAREER_TABS.WORK_HISTORY;
}
this.personalDetailsService.saveProfile(this.createdObjs, this.updatedObjs, this.deletedObjs)
......
......@@ -13,6 +13,7 @@ export class CareerProfileModel extends BaseModel {
Skype: string;
Candidate = new CandidateModel();
CompletedPercentage: number;
CompletedPercentageCH: number;
PersonalStatement: string;
Achievements: string;
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