Commit 9caa9a62 by Muhammad Usman

* S69380097 # Sprint 1 #Career Profile Builder || Career Profile Builder is…

* S69380097 # Sprint 1 #Career Profile Builder || Career Profile Builder is missing - Page before Work History
* Clear occupation issue resolved
parent 6f590587
......@@ -35,7 +35,7 @@
<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 || !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>
......
......@@ -125,15 +125,17 @@ export class WorkHistoryComponent extends BaseComponent implements OnInit {
if (this.form.invalid) {
return this.helperService.validateAllFormFields(this.form);
}
if (this.careerProfile.NoWorkExperience) {
if (this.careerProfile.NoWorkExperience && this.careerProfile.WorkExperiences) {
while (this.careerProfile.WorkExperiences.length > 0) {
this.utilsService.removeMultiRefObject(this.careerProfile.WorkExperiences[0], this.careerProfile, 'WorkExperiences', this.createdObjs, this.updatedObjs, this.deletedObjs);
}
}
if (this.careerProfile.WorkExperiences) {
this.careerProfile.WorkExperiences.forEach(exp => {
exp.StartMonth = UtilsService.convertDateToString(exp.StartMonthField);
exp.EndMonth = UtilsService.convertDateToString(exp.EndMonthField);
});
}
this.isSaving = true;
if (this.careerProfile.CompletedPercentageCH <= 40) {
this.careerProfile.CurrentProfileBuilderTab = CAREER_TABS.EDUCATION;
......
......@@ -74,7 +74,7 @@
<div class="col-md-6 form-group" *ngIf="!asChildComponent">
<label>Occupation Preference</label>
<p-autoComplete placeholder="Occupation Preference" (completeMethod)="getJobTitles($event)"
[forceSelection]="true" field="JobTitle"
[forceSelection]="true" field="JobTitle" (onClear)="clearOccupation()"
[suggestions]="jobTitles" name="OccupationPreference"
[(ngModel)]="careerProfile.Candidate.OccupationPreference" dataKey="ObjectID">
</p-autoComplete>
......
......@@ -85,6 +85,10 @@ export class PersonalDetailsComponent extends BaseComponent implements OnInit {
})
}
clearOccupation(): void {
this.careerProfile.Candidate.OccupationPreference = null;
}
getCareerProfile(): void {
this.isLoading = true;
this.personalDetailsService.getCareerProfile(this.assocs)
......
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