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);
......
<div class="position-relative">
<app-overlay [isActive]="isLoading || isSaving"></app-overlay>
<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="col-md-12 form-group">
<p-checkbox label="I don't have any work experience" [binary]="true" [(ngModel)]="careerProfile.NoWorkExperience">
</p-checkbox>
<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>
<form #form="ngForm" style="margin-top: 15px;">
<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>
<ng-container *ngIf="!careerProfile.NoWorkExperience">
<p class="mt-2">You can always add more later.</p>
<div class="row experience-wrapper" *ngFor="let experience of careerProfile.WorkExperiences; let i = index;">
<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>
<div class="remove-record" (click)="removeExperience(experience)">
<i class="fa fa-remove"></i>
</div>
<div class="col-md-9">
<div class="row">
<div class="col-md-6 form-group">
<label>Employer</label>
<app-form-control>
<p-autoComplete [suggestions]="filteredEmployers" (completeMethod)="suggestedEmployer($event)" placeholder="Employeer name" name="Employer{{i}}" [(ngModel)]="experience.Employer" required>
</p-autoComplete>
</app-form-control>
</div>
<div class="col-md-4" *ngIf="experience.Employer">
<div class="row">
<div class="col-md-6 form-group">
<label>Start month</label>
<app-form-control>
<p-calendar [maxDate]="experience.EndMonthField" placeholder="MM/YYYY" dateFormat="mm/yy" view="month" [icon]="true" [(ngModel)]="experience.StartMonthField" required name="StartMonth{{i}}">
</p-calendar>
</app-form-control>
</div>
<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">
<div class="col-md-12 form-group">
<p-checkbox label="I don't have any work experience" [binary]="true" [(ngModel)]="careerProfile.NoWorkExperience">
</p-checkbox>
</div>
</div>
<form #form="ngForm" style="margin-top: 15px;">
<ng-container *ngIf="!careerProfile.NoWorkExperience">
<div class="row experience-wrapper" *ngFor="let experience of careerProfile.WorkExperiences; let i = index;">
<div class="remove-record" (click)="removeExperience(experience)">
<i class="fa fa-remove"></i>
</div>
<div class="col-md-6 form-group" *ngIf="!experience.StillInRole">
<label>End month</label>
<app-form-control>
<p-calendar [minDate]="experience.StartMonthField" placeholder="MM/YYYY" dateFormat="mm/yy" view="month" [icon]="true" [(ngModel)]="experience.EndMonthField" required name="EndMonth{{i}}">
</p-calendar>
</app-form-control>
<div class="col-md-9">
<div class="row">
<div class="col-md-6 form-group">
<label>Employer</label>
<app-form-control>
<p-autoComplete [suggestions]="filteredEmployers" (completeMethod)="suggestedEmployer($event)" placeholder="Employeer name" name="Employer{{i}}" [(ngModel)]="experience.Employer" required>
</p-autoComplete>
</app-form-control>
</div>
<div class="col-md-4" *ngIf="experience.Employer">
<div class="row">
<div class="col-md-6 form-group">
<label>Start month</label>
<app-form-control>
<p-calendar [maxDate]="experience.EndMonthField" placeholder="MM/YYYY" dateFormat="mm/yy" view="month" [icon]="true" [(ngModel)]="experience.StartMonthField" required name="StartMonth{{i}}">
</p-calendar>
</app-form-control>
</div>
<div class="col-md-6 form-group" *ngIf="!experience.StillInRole">
<label>End month</label>
<app-form-control>
<p-calendar [minDate]="experience.StartMonthField" placeholder="MM/YYYY" dateFormat="mm/yy" view="month" [icon]="true" [(ngModel)]="experience.EndMonthField" required name="EndMonth{{i}}">
</p-calendar>
</app-form-control>
</div>
</div>
</div>
</div>
<div class="col-md-2 currently-work-checkbox" *ngIf="experience.Employer">
<p-checkbox label="I currently work here" [binary]="true" [(ngModel)]="experience.StillInRole" name="StillInRole{{i}}">
</p-checkbox>
<div class="col-md-2 currently-work-checkbox" *ngIf="experience.Employer">
<p-checkbox label="I currently work here" [binary]="true" [(ngModel)]="experience.StillInRole" name="StillInRole{{i}}">
</p-checkbox>
</div>
</div>
</div>
</div>
<div class="col-md-9" *ngIf="experience.Employer">
<div class="row">
<div class="col-md-6 form-group">
<label>Actual job title</label>
<app-form-control>
<input type="text" class="form-control" placeholder="Actual Title" name="ActualJobTitle{{i}}" [(ngModel)]="experience.ActualJobTitle">
</app-form-control>
</div>
<div class="col-md-6 form-group">
<div class="col-md-9" *ngIf="experience.Employer">
<div class="row">
<div class="col-md-6 form-group">
<label>Actual job title</label>
<app-form-control>
<input type="text" class="form-control" placeholder="Actual Title" name="ActualJobTitle{{i}}" [(ngModel)]="experience.ActualJobTitle">
</app-form-control>
</div>
<div class="col-md-6 form-group">
<label class="with-help-text">ILO job title
<ng-container *ngIf="!isMobileView">
<span class="help-text"><i class="fa fa-question" pTooltip="This is the set of International Labour Organisation (ILO) job titles. It helps Matchd to determine the type of occupation for this job." tooltipStyleClass="t-w300"></i></span>
</ng-container>
<label class="with-help-text">ILO job title
<ng-container *ngIf="!isMobileView">
<span class="help-text"><i class="fa fa-question" pTooltip="This is the set of International Labour Organisation (ILO) job titles. It helps Matchd to determine the type of occupation for this job." tooltipStyleClass="t-w300"></i></span>
</ng-container>
<ng-container *ngIf="isMobileView">
<i class="fa fa-question" (click)="tooltip1.focus()"></i>
<input type="text" tooltipStyleClass="t-w200" pTooltip="This is the set of International Labour Organisation (ILO) job titles. It helps Matchd to determine the type of occupation for this job." tooltipEvent="focus" #tooltip1 style="border: 0; width: 0; height: 0;">
</ng-container>
</label>
<ng-container *ngIf="isMobileView">
<i class="fa fa-question" (click)="tooltip1.focus()"></i>
<input type="text" tooltipStyleClass="t-w200" pTooltip="This is the set of International Labour Organisation (ILO) job titles. It helps Matchd to determine the type of occupation for this job." tooltipEvent="focus" #tooltip1 style="border: 0; width: 0; height: 0;">
</ng-container>
</label>
<app-form-control>
<p-autoComplete [suggestions]="jobTitles" name="ILOJobTitle{{i}}" [(ngModel)]="experience.ILOJobTitle" placeholder="ILO Job Title"
(completeMethod)="getJobTitles($event)" [forceSelection]="true" dataKey="ObjectID" field="JobTitle">
</p-autoComplete>
</app-form-control>
<app-form-control>
<p-autoComplete [suggestions]="jobTitles" name="ILOJobTitle{{i}}" [(ngModel)]="experience.ILOJobTitle" placeholder="ILO Job Title"
(completeMethod)="getJobTitles($event)" [forceSelection]="true" dataKey="ObjectID" field="JobTitle">
</p-autoComplete>
</app-form-control>
</div>
</div>
</div>
</div>
<div class="col-md-6 form-group" *ngIf="experience.Employer">
<label>Reason for Leaving (OPTIONAL)</label>
<app-form-control>
<textarea class="form-control" [(ngModel)]="experience.ReasonForLeaving" name="ReasonForLeaving{{i}}"></textarea>
</app-form-control>
</div>
<div class="col-md-6 form-group" *ngIf="experience.Employer">
<label>Reason for Leaving (OPTIONAL)</label>
<app-form-control>
<textarea class="form-control" [(ngModel)]="experience.ReasonForLeaving" name="ReasonForLeaving{{i}}"></textarea>
</app-form-control>
</div>
<div class="col-md-6 form-group" *ngIf="experience.Employer">
<label>Duties and Responsibilities</label>
<app-form-control>
<textarea class="form-control" [(ngModel)]="experience.JobRoleSummary" name="JobRoleSummary{{i}}"></textarea>
</app-form-control>
</div>
<div class="col-md-6 form-group" *ngIf="experience.Employer">
<label>Duties and Responsibilities</label>
<app-form-control>
<textarea class="form-control" [(ngModel)]="experience.JobRoleSummary" name="JobRoleSummary{{i}}"></textarea>
</app-form-control>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<button pButton class="btn btn-info-outline add-more" label="Add work experience +" (click)="addWorkExperience()"></button>
<div class="row">
<div class="col-md-12">
<button pButton class="btn btn-info-outline add-more" label="Add work experience +" (click)="addWorkExperience()"></button>
</div>
</div>
</div>
</ng-container>
</ng-container>
</form>
</form>
<div class="d-flex justify-content-center" style="margin-top: 48px;">
<button pButton label="Next Section" class="ui-button-info next-section" (click)="saveWorkHistory()" [disabled]="isSaving">
</button>
</div>
<div class="d-flex justify-content-center" style="margin-top: 48px;">
<button pButton label="Next Section" class="ui-button-info next-section" (click)="saveWorkHistory()" [disabled]="isSaving">
</button>
</div>
</ng-container>
......
......@@ -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