Commit 9b553f13 by Muhammad Usman

personal details update fixes

parent c77fec7c
......@@ -14,88 +14,93 @@
</div>
</div>
<form #form="ngForm" *ngIf="!careerProfile.NoEducationQualification" style="margin-top: 15px;">
<form #form="ngForm" style="margin-top: 15px;">
<div class="row education-wrapper" *ngFor="let education of careerProfile.EducationCertificates; let i = index;">
<ng-container *ngIf="!careerProfile.NoEducationQualification">
<div class="remove-record">
<i class="fa fa-remove" (click)="removeEducation(education)"></i>
</div>
<div class="row education-wrapper" *ngFor="let education of careerProfile.EducationCertificates; let i = index;">
<div class="col-md-9">
<div class="row">
<div class="col-md-6 form-group">
<label>Course or Certification</label>
<app-form-control>
<p-autoComplete [suggestions]="certifications" name="Certification{{i}}" [(ngModel)]="education.Certification" placeholder="Enter Certificate" required
(completeMethod)="getCertificates($event)" dataKey="ObjectID" field="CertificateName">
</p-autoComplete>
</app-form-control>
</div>
<div class="remove-record">
<i class="fa fa-remove" (click)="removeEducation(education)"></i>
</div>
<div class="row" *ngIf="education.Certification">
<div class="col-md-6 form-group">
<label>Where Studied</label>
<app-form-control>
<input type="text" class="form-control" placeholder="Where studied" name="WhereStudied{{i}}" [(ngModel)]="education.WhereStudied">
</app-form-control>
<div class="col-md-9">
<div class="row">
<div class="col-md-6 form-group">
<label>Course or Certification</label>
<app-form-control>
<p-autoComplete [suggestions]="certifications" name="Certification{{i}}" [(ngModel)]="education.Certification" placeholder="Enter Certificate" required
(completeMethod)="getCertificates($event)" dataKey="ObjectID" field="CertificateName">
</p-autoComplete>
</app-form-control>
</div>
</div>
<div class="col-md-6 form-group">
<label>Where Issued</label>
<app-form-control>
<input type="text" class="form-control" placeholder="Where issued" name="WhereIssued{{i}}" [(ngModel)]="education.WhereIssued">
</app-form-control>
</div>
</div>
<div class="row" *ngIf="education.Certification">
<div class="col-md-6 form-group">
<label>Where Studied</label>
<app-form-control>
<input type="text" class="form-control" placeholder="Where studied" name="WhereStudied{{i}}" [(ngModel)]="education.WhereStudied">
</app-form-control>
</div>
<div class="row" *ngIf="education.Certification">
<div class="col-md-3 form-group">
<label>GPA or Outcome</label>
<app-form-control>
<input type="text" class="form-control" placeholder="Outcome" name="Outcome{{i}}" [(ngModel)]="education.Outcome" pKeyFilter="pnum" maxlength="5">
</app-form-control>
<div class="col-md-6 form-group">
<label>Where Issued</label>
<app-form-control>
<input type="text" class="form-control" placeholder="Where issued" name="WhereIssued{{i}}" [(ngModel)]="education.WhereIssued">
</app-form-control>
</div>
</div>
<div class="col-md-6 col-md-offset-3 form-group">
<label>When Completed</label>
<app-form-control>
<p-calendar [(ngModel)]="education.WhenCompletedField" name="WhenCompletedField{{i}}">
</p-calendar>
</app-form-control>
<div class="row" *ngIf="education.Certification">
<div class="col-md-3 form-group">
<label>GPA or Outcome</label>
<app-form-control>
<input type="text" class="form-control" placeholder="Outcome" name="Outcome{{i}}" [(ngModel)]="education.Outcome" pKeyFilter="pnum" maxlength="5">
</app-form-control>
</div>
</div>
</div>
<div class="col-md-6 col-md-offset-3 form-group">
<label>When Completed</label>
<app-form-control>
<p-calendar [(ngModel)]="education.WhenCompletedField" name="WhenCompletedField{{i}}">
</p-calendar>
</app-form-control>
<div class="row" *ngIf="education.Certification">
<div class="col-md-4 form-group">
<label>Upload Certificate</label>
<p-fileUpload *ngIf="!education.Certificate" name="File" withCredentials="true" auto="true" chooseLabel="Browse" [disabled]="uploadingFile"
url="{{apiUrl}}uploadFile" (onUpload)="onUpload($event, education)" (onBeforeUpload)="uploadStarted()">
<ng-template let-file pTemplate="file">
<div>Uploading...</div>
</ng-template>
</p-fileUpload>
<div class="uploaded-attachment" *ngIf="education?.Certificate">
<span *ngIf="!education.Certificate.URI">{{education.Certificate.Name}}</span>
<a *ngIf="education.Certificate.URI" target="_blank" [href]="apiUrl + education.Certificate.URI">{{education.Certificate.Name}}</a>
<i class="pi pi-times" (click)="removeAttachment(education)"></i>
</div>
</div>
<div class="row" *ngIf="education.Certification">
<div class="col-md-4 form-group">
<label>Upload Certificate</label>
<p-fileUpload *ngIf="!education.Certificate" name="File" withCredentials="true" auto="true" chooseLabel="Browse" [disabled]="uploadingFile"
url="{{apiUrl}}uploadFile" (onUpload)="onUpload($event, education)" (onBeforeUpload)="uploadStarted()">
<ng-template let-file pTemplate="file">
<div>Uploading...</div>
</ng-template>
</p-fileUpload>
<div class="uploaded-attachment" *ngIf="education?.Certificate">
<span *ngIf="!education.Certificate.URI">{{education.Certificate.Name}}</span>
<a *ngIf="education.Certificate.URI" target="_blank" [href]="apiUrl + education.Certificate.URI">{{education.Certificate.Name}}</a>
<i class="pi pi-times" (click)="removeAttachment(education)"></i>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<button pButton class="btn btn-info-outline add-more" label="Add education +" (click)="addEducation()"></button>
<div class="row">
<div class="col-md-12">
<button pButton class="btn btn-info-outline add-more" label="Add education +" (click)="addEducation()"></button>
</div>
</div>
</div>
</ng-container>
</form>
......
......@@ -19,7 +19,7 @@ import { CAREER_TABS } from '../../../config/constants';
})
export class EducationComponent extends BaseComponent implements OnInit {
assocs = ['EducationCertificates.Certification'];
assocs = ['EducationCertificates', 'EducationCertificates.Certification'];
careerProfile = new CareerProfileModel();
apiUrl = environment.baseUrl;
uploadingFile = false;
......
......@@ -12,6 +12,7 @@
<form #form="ngForm" style="margin-top: 15px;">
<ng-container *ngIf="!careerProfile?.NoReference">
<div class="row reference-wrapper" *ngFor="let referee of careerProfile.Referees; let i = index;">
<div class="remove-record" (click)="removeReferee(referee)">
......@@ -74,15 +75,15 @@
</div>
</ng-container>
<div class="row">
<div class="col-md-12">
<button pButton class="btn btn-info-outline add-more" label="Add reference +" (click)="addReferee()">
</button>
<div class="row">
<div class="col-md-12">
<button pButton class="btn btn-info-outline add-more" label="Add reference +" (click)="addReferee()">
</button>
</div>
</div>
</div>
</ng-container>
</form>
......
......@@ -25,7 +25,8 @@
<div class="col-md-6 form-group">
<label>Employer</label>
<app-form-control>
<input type="text" class="form-control" placeholder="Employeer name" name="Employer{{i}}" [(ngModel)]="experience.Employer" required>
<p-autoComplete [suggestions]="employers" (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">
......@@ -63,7 +64,19 @@
</app-form-control>
</div>
<div class="col-md-6 form-group">
<label class="with-help-text">ILO job title <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></label>
<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>
<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">
......@@ -89,13 +102,13 @@
</div>
</ng-container>
<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>
</form>
......
......@@ -22,6 +22,7 @@ export class WorkHistoryComponent extends BaseComponent implements OnInit {
assocs = ['WorkExperiences', 'WorkExperiences.ILOJobTitle'];
careerProfile = new CareerProfileModel();
jobTitles = [];
employers = [];
@ViewChild('form') form: NgForm;
@Output() workSaved = new EventEmitter();
......@@ -63,6 +64,16 @@ export class WorkHistoryComponent extends BaseComponent implements OnInit {
})
}
suggestedEmployer($event): void {
this.personalDetailsService.getEmployers({Details: $event.query})
.pipe(takeUntil(this.componentInView))
.subscribe(response => {
this.employers = response;
}, err => {
this.utilsService.handleError(err);
});
}
addWorkExperience(initLoad = false): void {
const newModel = new WorkExperienceModel();
newModel.CareerProfile = this.careerProfile.ObjectID;
......
......@@ -42,6 +42,7 @@ export const SERVICES = {
CAREER_PROFILES: 'CareerProfiles',
JOB_TITLES: 'JobTitles',
SKILLS: 'Skills',
EMPLOYERS: 'Employers',
CERTIFICATIONS: 'Certifications',
LOGIN_LINKEDIN: 'LoginWithLinkedIn',
LOGIN_GOOGLE: 'LoginWithGoogle',
......
......@@ -141,12 +141,12 @@
<label class="with-help-text">Achievements
<span class="help-text">
<ng-container *ngIf="!isMobileView">
<i *ngIf="!isMobileView" class="fa fa-question" tooltipStyleClass="t-w300" tooltipEvent="focus" pTooltip="Your Achievements will appear on your Career Profile. It describes the significant events in your work career. This can include projects you worked on, awards, recognition or just activities you have performed well. You don’t need to add Achievements now (or at all) … you can add it later via the Career Profile editor. If you want more help with describing your Achievements, see the article on our Knowledgebase."></i>
<i class="fa fa-question" tooltipStyleClass="t-w300" tooltipEvent="focus" pTooltip="Your Achievements will appear on your Career Profile. It describes the significant events in your work career. This can include projects you worked on, awards, recognition or just activities you have performed well. You don’t need to add Achievements now (or at all) … you can add it later via the Career Profile editor. If you want more help with describing your Achievements, see the article on our Knowledgebase."></i>
</ng-container>
<ng-container *ngIf="isMobileView">
<i class="fa fa-question" (click)="tooltip2.focus()"></i>
<input type="text" tooltipStyleClass="t-w300" pTooltip="Your Achievements will appear on your Career Profile. It describes the significant events in your work career. This can include projects you worked on, awards, recognition or just activities you have performed well. You don’t need to add Achievements now (or at all) … you can add it later via the Career Profile editor. If you want more help with describing your Achievements, see the article on our Knowledgebase." tooltipEvent="focus" #tooltip2 style="border: 0; width: 0; height: 0;">
<input type="text" tooltipStyleClass="t-w200" pTooltip="Your Achievements will appear on your Career Profile. It describes the significant events in your work career. This can include projects you worked on, awards, recognition or just activities you have performed well. You don’t need to add Achievements now (or at all) … you can add it later via the Career Profile editor. If you want more help with describing your Achievements, see the article on our Knowledgebase." tooltipEvent="focus" #tooltip2 style="border: 0; width: 0; height: 0;">
</ng-container>
</span>
</label>
......
......@@ -65,6 +65,15 @@ export class PersonalDetailsService {
)
}
getEmployers(queryParams = {}, assocs = []): Observable<any> {
return this.searchService.getObjects(SERVICES.EMPLOYERS, 'All', queryParams, assocs, null, null, null, null)
.map(
data => {
return data.Employees;
}
)
}
getCertifications(queryParams = {}, assocs = []): Observable<any> {
return this.searchService.getObjects(SERVICES.CERTIFICATIONS, 'All', queryParams, assocs, 'Autocomplete', null, null, null)
.map(
......
......@@ -21,7 +21,6 @@
.ui-carousel-viewport {
width: 75%;
max-height: 90vh;
overflow: auto;
}
.ui-carousel-item {
......
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