Commit 5b85b3ee by Muhammad Usman

missing screen added on work hitory

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