Commit 9125f7f1 by Muhammad Usman

skills issue resolved

parent aa473e22
...@@ -79,6 +79,8 @@ export class CareerHistoryComponent extends BaseComponent implements OnInit { ...@@ -79,6 +79,8 @@ export class CareerHistoryComponent extends BaseComponent implements OnInit {
case 'references': case 'references':
this.referencesComponent.saveReferees('/my-career-web/dashboard/home'); this.referencesComponent.saveReferees('/my-career-web/dashboard/home');
break; break;
default:
this.router.navigate([['/my-career-web/dashboard/home']]);
} }
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<h4 class="tab-heading">Tell us about your Skills</h4> <h4 class="tab-heading">Tell us about your Skills</h4>
<div class="row" style="margin-top: 24px;"> <div class="row" style="margin: 24px 0 12px;">
<div class="col-md-12"> <div class="col-md-12">
<span>We have identified the following skills based on your Work experience, Educational qualifications or certification. How would you rate yourself? </span> <span>We have identified the following skills based on your Work experience, Educational qualifications or certification. How would you rate yourself? </span>
</div> </div>
...@@ -19,11 +19,14 @@ ...@@ -19,11 +19,14 @@
</div> </div>
<div class="col-md-12 form-group"> <div class="col-md-12 form-group">
<app-form-control> <app-form-control *ngIf="skill.IsNew">
<p-autoComplete [suggestions]="skills" name="Skill{{i}}" [(ngModel)]="skill.Skill" placeholder="Enter Skill" required <p-autoComplete [suggestions]="skills" name="Skill{{i}}" [(ngModel)]="skill.Skill" placeholder="Enter Skill" required
(completeMethod)="getSkills($event)" dataKey="ObjectID" field="Description"> (completeMethod)="getSkills($event)" dataKey="ObjectID" field="Description" [forceSelection]="true">
</p-autoComplete> </p-autoComplete>
</app-form-control> </app-form-control>
<div *ngIf="!skill.IsNew">
{{skill?.Skill?.Description}}
</div>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
...@@ -32,6 +35,9 @@ ...@@ -32,6 +35,9 @@
</p-selectButton> </p-selectButton>
</app-form-control> </app-form-control>
</div> </div>
<div class="col-md-8" *ngIf="skill?.Skill">
<div class="added-frm-text">{{skill?.Skill?.AddedFromWhereText}}</div>
</div>
</div> </div>
......
...@@ -7,3 +7,9 @@ ...@@ -7,3 +7,9 @@
} }
} }
} }
.added-frm-text {
font-size: 12px;
margin-top: 10px;
padding: 0 5px;
}
...@@ -57,7 +57,7 @@ export class SkillsComponent extends BaseComponent implements OnInit { ...@@ -57,7 +57,7 @@ export class SkillsComponent extends BaseComponent implements OnInit {
} }
getSkills($event): void { getSkills($event): void {
this.personalDetailsService.getSkills({Description: $event.query}) this.personalDetailsService.getSkills({Details: $event.query})
.pipe(takeUntil(this.componentInView)) .pipe(takeUntil(this.componentInView))
.subscribe(response => { .subscribe(response => {
this.skills = response; this.skills = response;
...@@ -78,6 +78,7 @@ export class SkillsComponent extends BaseComponent implements OnInit { ...@@ -78,6 +78,7 @@ export class SkillsComponent extends BaseComponent implements OnInit {
addSkill(initLoad = false): void { addSkill(initLoad = false): void {
const newModel = new CareerSkillModel(); const newModel = new CareerSkillModel();
newModel.IsNew = true;
newModel.CareerProfile = this.careerProfile.ObjectID; newModel.CareerProfile = this.careerProfile.ObjectID;
if (initLoad && (!this.careerProfile.Skills || this.careerProfile.Skills.length === 0)) { if (initLoad && (!this.careerProfile.Skills || this.careerProfile.Skills.length === 0)) {
this.utilsService.addMultiRefObject(newModel, this.careerProfile, 'Skills', this.createdObjs); this.utilsService.addMultiRefObject(newModel, this.careerProfile, 'Skills', this.createdObjs);
...@@ -100,21 +101,21 @@ export class SkillsComponent extends BaseComponent implements OnInit { ...@@ -100,21 +101,21 @@ export class SkillsComponent extends BaseComponent implements OnInit {
return this.helperService.validateAllFormFields(this.form); return this.helperService.validateAllFormFields(this.form);
} }
this.isSaving = true; this.isSaving = true;
console.log(this.careerProfile); console.log(this.createdObjs, this.updatedObjs, this.deletedObjs);
// console.log(this.createdObjs, this.updatedObjs, this.deletedObjs); this.personalDetailsService.saveProfile(this.createdObjs, this.updatedObjs, this.deletedObjs)
// this.personalDetailsService.saveProfile(this.createdObjs, this.updatedObjs, this.deletedObjs) .pipe(takeUntil(this.componentInView))
// .pipe(takeUntil(this.componentInView)) .subscribe(res => {
// .subscribe(res => { this.isSaving = false;
// this.isSaving = false; this.careerProfile.Skills.forEach(s => s.IsNew = false);
// if (customRoute) { if (customRoute) {
// this.router.navigate([customRoute]) this.router.navigate([customRoute])
// } else { } else {
// this.skillsSaved.emit(); this.skillsSaved.emit();
// } }
// }, err => { }, err => {
// this.isSaving = false; this.isSaving = false;
// this.utilsService.handleError(err); this.utilsService.handleError(err);
// }) })
} }
} }
...@@ -5,7 +5,6 @@ import { PersonalDetailsService } from '../../../services/personal-details.servi ...@@ -5,7 +5,6 @@ import { PersonalDetailsService } from '../../../services/personal-details.servi
import { UtilsService } from '../../../../oneit/services/utils.service'; import { UtilsService } from '../../../../oneit/services/utils.service';
import { takeUntil } from 'rxjs/operators'; import { takeUntil } from 'rxjs/operators';
import { environment } from '../../../../../environments/environment'; import { environment } from '../../../../../environments/environment';
import { CandidateTemplateModel } from '../../../models/candidate-template.model';
import { SaveService } from '../../../../oneit/services/save.service'; import { SaveService } from '../../../../oneit/services/save.service';
@Component({ @Component({
...@@ -52,7 +51,6 @@ export class TemplatesComponent extends BaseComponent implements OnInit { ...@@ -52,7 +51,6 @@ export class TemplatesComponent extends BaseComponent implements OnInit {
}); });
this.careerProfile.Candidate.AllTempletes.sort((t1, t2) => t1.SortOrder - t2.SortOrder); this.careerProfile.Candidate.AllTempletes.sort((t1, t2) => t1.SortOrder - t2.SortOrder);
} }
console.log(this.careerProfile);
}, err => { }, err => {
this.isLoading = false; this.isLoading = false;
this.utilsService.handleError(err); this.utilsService.handleError(err);
...@@ -61,10 +59,11 @@ export class TemplatesComponent extends BaseComponent implements OnInit { ...@@ -61,10 +59,11 @@ export class TemplatesComponent extends BaseComponent implements OnInit {
selectTemplate(template): void { selectTemplate(template): void {
this.careerProfile.Template = template; this.careerProfile.Template = template;
this.isLoading = true;
this.saveService.saveObjectsWithDefaultSvc(this.createdObjs, this.updatedObjs, this.deletedObjs) this.saveService.saveObjectsWithDefaultSvc(this.createdObjs, this.updatedObjs, this.deletedObjs)
.pipe(takeUntil(this.componentInView)) .pipe(takeUntil(this.componentInView))
.subscribe(response => { .subscribe(() => {
console.log(response); this.isLoading = false;
}); });
} }
......
...@@ -2,4 +2,5 @@ export class BaseModel { ...@@ -2,4 +2,5 @@ export class BaseModel {
ObjectID = ''; ObjectID = '';
ObjectCreatedStr = null; ObjectCreatedStr = null;
ObjectLastModifiedStr = null; ObjectLastModifiedStr = null;
IsNew: boolean;
} }
...@@ -13,5 +13,6 @@ export class CareerSkillModel extends BaseModel { ...@@ -13,5 +13,6 @@ export class CareerSkillModel extends BaseModel {
export class SkillModel extends BaseModel { export class SkillModel extends BaseModel {
ObjectClass = CLASSES.SKILL; ObjectClass = CLASSES.SKILL;
AddedFromWhereText: string;
Description: string; Description: string;
} }
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