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);
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);
......
<div class="position-relative">
<app-overlay [isActive]="isLoading || isSaving"></app-overlay>
<ng-container *ngIf="showInitial">
<p>Tell us about the amount of work experience and education certificates you have </p>
<div class="row mt-3 d-flex align-items-center">
<div class="col-md-10">
How many previous jobs would you like to add to your Career Profile?
</div>
<div class="col-md-2 form-group mb-0">
<input type="number" pKeyFilter="pint" placeholder="0" class="form-control" [(ngModel)]="careerProfile.NoOfPreviousJobs">
</div>
</div>
<div class="row mt-2 d-flex align-items-center">
<div class="col-md-10">
How many qualifications, education or certifications would you like to add to your Career Profile?
</div>
<div class="col-md-2 form-group mb-0">
<input type="number" pKeyFilter="pint" placeholder="0" class="form-control" [(ngModel)]="careerProfile.NoOfQualifications">
</div>
</div>
<p class="mt-2">You can always add more later.</p>
<div class="d-flex justify-content-center mt-4" style="margin-top: 48px;">
<button pButton label="Next" class="ui-button-info next-section" (click)="startWorkHistory()">
</button>
</div>
</ng-container>
<ng-container *ngIf="!showInitial">
<h4 class="tab-heading">Tell us about your most recent job</h4>
<div class="row" style="margin-top: 24px;" *ngIf="!careerProfile?.WorkExperiences[0]?.Employer && careerProfile?.WorkExperiences?.length <= 1">
......@@ -119,6 +151,8 @@
</button>
</div>
</ng-container>
</div>
......@@ -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