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);
if (this.careerProfile.EducationCertificates.length === 0 && !this.careerProfile.NoEducationQualification) {
for (let i = 0; i < this.careerProfile.NoOfQualifications || 0; i++) {
this.addEducation(true); this.addEducation(true);
}
}
this.careerProfileLoaded.emit(this.careerProfile); this.careerProfileLoaded.emit(this.careerProfile);
}, err => { }, err => {
this.utilsService.handleError(err); this.utilsService.handleError(err);
......
<div class="position-relative"> <div class="position-relative">
<app-overlay [isActive]="isLoading || isSaving"></app-overlay> <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> <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"> <div class="row" style="margin-top: 24px;" *ngIf="!careerProfile?.WorkExperiences[0]?.Employer && careerProfile?.WorkExperiences?.length <= 1">
...@@ -119,6 +151,8 @@ ...@@ -119,6 +151,8 @@
</button> </button>
</div> </div>
</ng-container>
</div> </div>
...@@ -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