|
|
|
|
@ -19,57 +19,61 @@ import { AuthenticatedUser } from "src/app/hmg-common/services/authentication/mo
|
|
|
|
|
export class PerformanceEvaluationComponent implements OnInit {
|
|
|
|
|
personalInfo: any;
|
|
|
|
|
user_image: any = "../assets/imgs/profile.png";
|
|
|
|
|
setImage:any;
|
|
|
|
|
setImage: any;
|
|
|
|
|
view: any = [380, 450];
|
|
|
|
|
public performanceData: any=[];
|
|
|
|
|
public performanceData: any = [];
|
|
|
|
|
public length;
|
|
|
|
|
public direction: string;
|
|
|
|
|
// public showText:boolean =false;
|
|
|
|
|
|
|
|
|
|
constructor( public ts: TranslatorService,
|
|
|
|
|
constructor(public ts: TranslatorService,
|
|
|
|
|
public cs: CommonService,
|
|
|
|
|
public DS :DashboredService,
|
|
|
|
|
public DS: DashboredService,
|
|
|
|
|
public authService: AuthenticationService,
|
|
|
|
|
// private events: Events,
|
|
|
|
|
// private sanitizer: DomSanitizer,
|
|
|
|
|
|
|
|
|
|
) {
|
|
|
|
|
|
|
|
|
|
// this.events.subscribe("img-change", displayImg => {
|
|
|
|
|
// console.log("app compont: "+displayImg);
|
|
|
|
|
// this.user_image = this.sanitizer.bypassSecurityTrustUrl("data:Image/*;base64,"+displayImg);
|
|
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
// private events: Events,
|
|
|
|
|
// private sanitizer: DomSanitizer,
|
|
|
|
|
|
|
|
|
|
) {
|
|
|
|
|
this.direction = TranslatorService.getCurrentDirection();
|
|
|
|
|
// this.events.subscribe("img-change", displayImg => {
|
|
|
|
|
// console.log("app compont: "+displayImg);
|
|
|
|
|
// this.user_image = this.sanitizer.bypassSecurityTrustUrl("data:Image/*;base64,"+displayImg);
|
|
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
colorScheme = {
|
|
|
|
|
domain: ['#22C6B3', '#094875','#3CB9D5','#1FA269','#0D155E']
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
colorScheme = {
|
|
|
|
|
domain: ['#22C6B3', '#094875', '#3CB9D5', '#1FA269', '#0D155E']
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
ngOnInit() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.getProfile();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.performanceData = this.cs.sharedService.getSharedData(
|
|
|
|
|
PerformanceAppraisalResponse.PERFORMANCE_DATA,
|
|
|
|
|
true
|
|
|
|
|
);
|
|
|
|
|
console.log(this.performanceData.length);
|
|
|
|
|
//i % 2 == 0
|
|
|
|
|
this.length=this.performanceData.length;
|
|
|
|
|
//i % 2 == 0
|
|
|
|
|
this.length = this.performanceData.length;
|
|
|
|
|
|
|
|
|
|
for(let i=0;i<this.performanceData.length;i++){
|
|
|
|
|
this.performanceData[i].color =this.colorScheme.domain[i];
|
|
|
|
|
console.log( i+" : "+this.performanceData[i].name)
|
|
|
|
|
for (let i = 0; i < this.performanceData.length; i++) {
|
|
|
|
|
this.performanceData[i].color = this.colorScheme.domain[i];
|
|
|
|
|
console.log(i + " : " + this.performanceData[i].name)
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
console.log( this.performanceData[0].color)
|
|
|
|
|
}
|
|
|
|
|
console.log(this.performanceData[0].color)
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ngAfterViewInit() {
|
|
|
|
|
document.querySelector("svg .gauge.chart > text").remove();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getProfile() {
|
|
|
|
|
console.log("getProfile");
|
|
|
|
|
@ -79,11 +83,12 @@ export class PerformanceEvaluationComponent implements OnInit {
|
|
|
|
|
if (user) {
|
|
|
|
|
this.personalInfo = user;
|
|
|
|
|
this.user_image = user.EMPLOYEE_IMAGE
|
|
|
|
|
? "data:image/png;base64," + user.EMPLOYEE_IMAGE
|
|
|
|
|
: "../assets/imgs/profile.png";
|
|
|
|
|
|
|
|
|
|
? "data:image/png;base64," + user.EMPLOYEE_IMAGE
|
|
|
|
|
: "../assets/imgs/profile.png";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|