Commit 5b85b3ee by Muhammad Usman

missing screen added on work hitory

parent 8802a81e
......@@ -65,8 +65,13 @@ export class EducationComponent extends BaseComponent implements OnInit {
edu.WhenCompletedField = UtilsService.convertStringToDate(edu.WhenCompleted);
})
}
console.log(this.careerProfile);
this.utilsService.addObjsToJSONByObjectID(this.updatedObjs, this.careerProfile.EducationCertificates);
this.addEducation(true);
if (this.careerProfile.EducationCertificates.length === 0 && !this.careerProfile.NoEducationQualification) {
for (let i = 0; i < this.careerProfile.NoOfQualifications || 0; i++) {
this.addEducation(true);
}
}
this.careerProfileLoaded.emit(this.careerProfile);
}, err => {
this.utilsService.handleError(err);
......
......@@ -24,6 +24,7 @@ export class WorkHistoryComponent extends BaseComponent implements OnInit {
jobTitles = [];
employers = [];
filteredEmployers = [];
showInitial = false;
@ViewChild('form') form: NgForm;
@Output() workSaved = new EventEmitter();
......@@ -65,8 +66,8 @@ export class WorkHistoryComponent extends BaseComponent implements OnInit {
exp.EndMonthField = UtilsService.convertStringToDate(exp.EndMonth);
})
}
this.showInitial = !(!!this.careerProfile.NoOfQualifications || !!this.careerProfile.NoOfPreviousJobs);
this.utilsService.addObjsToJSONByObjectID(this.updatedObjs, this.careerProfile.WorkExperiences);
this.addWorkExperience(true);
this.careerProfileLoaded.emit(this.careerProfile);
}, err => {
this.isLoading = false;
......@@ -74,6 +75,15 @@ export class WorkHistoryComponent extends BaseComponent implements OnInit {
})
}
startWorkHistory(): void {
this.showInitial = false;
if ((!this.careerProfile.WorkExperiences || this.careerProfile.WorkExperiences.length === 0) && !this.careerProfile.NoWorkExperience) {
for (let i = 0; i < this.careerProfile.NoOfPreviousJobs; i++) {
this.addWorkExperience();
}
}
}
suggestedEmployer($event): void {
setTimeout(() => {
this.filteredEmployers = $event.query ? this.employers.filter(s => s.startsWith($event.query)) : this.employers.slice();
......@@ -102,7 +112,7 @@ export class WorkHistoryComponent extends BaseComponent implements OnInit {
removeExperience(exp): void {
this.confirmationService.confirm({
message:'Are you sure you want to remove this experience?',
message: 'Are you sure you want to remove this experience?',
accept: () => {
this.utilsService.removeMultiRefObject(exp, this.careerProfile, 'WorkExperiences', this.createdObjs, this.updatedObjs, this.deletedObjs);
}
......
......@@ -16,6 +16,8 @@ export class CareerProfileModel extends BaseModel {
CompletedPercentageCH: number;
CompletedPercentageWP: number;
CompletedPercentageWS: number;
NoOfPreviousJobs: number;
NoOfQualifications: 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