|
|
|
|
@ -7,6 +7,7 @@ import { AuthenticatedUser } from "src/app/hmg-common/services/authentication/mo
|
|
|
|
|
import { PerformanceAppraisalResponse } from 'src/app/hmg-common/services/dashbored/performance-appraisal.response';
|
|
|
|
|
import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbored.service';
|
|
|
|
|
import { SharedDataService } from 'src/app/hmg-common/services/shared-data-service/shared-data.service';
|
|
|
|
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
|
|
|
// import { DomSanitizer } from '@angular/platform-browser';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -35,17 +36,19 @@ export class EditProfileComponent implements OnInit {
|
|
|
|
|
public cs: CommonService,
|
|
|
|
|
public authService: AuthenticationService,
|
|
|
|
|
public DS :DashboredService,
|
|
|
|
|
public sharedData: SharedDataService
|
|
|
|
|
public sharedData: SharedDataService,
|
|
|
|
|
public events: Events,
|
|
|
|
|
private sanitizer: DomSanitizer,
|
|
|
|
|
// 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);
|
|
|
|
|
this.events.subscribe("img-change", displayImg => {
|
|
|
|
|
console.log("app compont: "+displayImg);
|
|
|
|
|
this.user_image = this.sanitizer.bypassSecurityTrustUrl("data:Image/*;base64,"+displayImg);
|
|
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
@ -63,9 +66,13 @@ export class EditProfileComponent implements OnInit {
|
|
|
|
|
this.personalInfo = user;
|
|
|
|
|
this.User_name_Emp=this.personalInfo.EMPLOYEE_NAME;
|
|
|
|
|
this.User_Job_name=this.personalInfo.JOB_NAME;
|
|
|
|
|
if(this.cs.getUpdateImage().status){
|
|
|
|
|
this.user_image =this.sanitizer.bypassSecurityTrustUrl("data:image/png;base64,"+this.cs.getUpdateImage().img);
|
|
|
|
|
}else{
|
|
|
|
|
this.user_image = user.EMPLOYEE_IMAGE
|
|
|
|
|
? "data:image/png;base64," + user.EMPLOYEE_IMAGE
|
|
|
|
|
: "../assets/imgs/profile.png";
|
|
|
|
|
}
|
|
|
|
|
console.log("name: "+ this.personalInfo.EMPLOYEE_NAME);
|
|
|
|
|
console.log("user name: "+ user.EMPLOYEE_NAME);
|
|
|
|
|
console.log("name: "+ this.personalInfo.JOB_NAME);
|
|
|
|
|
|