edit payment info & employee profile update

MOHEMM-SFH-COLORS
Mohamed Mekawy 6 years ago
parent f00e63f49d
commit 215084f797

@ -57,6 +57,7 @@ export class AppComponent implements OnInit, AfterViewInit {
ngOnInit() {
this.initializeApp();
}
ngAfterViewInit() {}
initializeApp() {
@ -94,9 +95,13 @@ export class AppComponent implements OnInit, AfterViewInit {
? user.CompanyImageDescription
: "Powered By Cloud Solutions";
this.User_name_Emp = user.EMPLOYEE_DISPLAY_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";
}
this.User_Job_name=user.JOB_NAME;
console.log(user);

@ -320,9 +320,13 @@ export class HomePage implements OnInit {
this.userData,
AuthenticatedUser.SHARED_DATA
);
if(this.common.getUpdateImage().status){
this.userImage =this.sanitizer.bypassSecurityTrustUrl("data:image/png;base64,"+this.common.getUpdateImage().img);
}else{
this.userImage = user.EMPLOYEE_IMAGE
? 'data:image/png;base64,' + user.EMPLOYEE_IMAGE
: this.userImage;
}
this.callDashboardServices();
} else {
console.log(user);

@ -257,6 +257,7 @@
<div class="hrTitle"> {{ts.trPK('payslip','payment-information')}} </div>
<div *ngIf="GetPaymentInformationList !=''">
<div *ngFor="let paymentInfo of GetPaymentInformationList">
<ion-grid class="grids" >
<ion-row class="rowtables">
<ion-col class="colPayslips">
@ -265,7 +266,7 @@
</ion-row>
<ion-row>
<label class="label" for="">{{GetPaymentInformationList.PAYMENT_METHOD_NAME}}</label>
<label class="label" for="">{{paymentInfo.PAYMENT_METHOD_NAME}}</label>
</ion-row>
</ion-col>
@ -276,7 +277,7 @@
<label class="label" for="">{{ts.trPK('payslip','bank-name')}} </label>
</ion-row>
<ion-row >
<label class="label" for="">{{GetPaymentInformationList.BANK_NAME}}</label>
<label class="label" for="">{{paymentInfo.BANK_NAME}}</label>
</ion-row>
</ion-col>
<ion-col class="colPayslips">
@ -285,7 +286,7 @@
</label>
</ion-row>
<ion-row >
<label class="label" for="">{{GetPaymentInformationList.BRANCH_NAME}}</label>
<label class="label" for="">{{paymentInfo.BRANCH_NAME}}</label>
</ion-row>
</ion-col>
</ion-row>
@ -297,7 +298,7 @@
</label>
</ion-row>
<ion-row >
<label class="label" for="">{{GetPaymentInformationList.ACCOUNT_NUMBER}}</label>
<label class="label" for="">{{paymentInfo.ACCOUNT_NUMBER}}</label>
</ion-row>
</ion-col>
<ion-col class="colPayslips">
@ -306,10 +307,11 @@
</label>
</ion-row>
<ion-row >
<label class="label" for="">{{GetPaymentInformationList.AMOUNT}}</label>
<label class="label" for="">{{paymentInfo.AMOUNT}}</label>
</ion-row>
</ion-col>
</ion-row>
</ion-grid>
</div>
</div>
</ion-content>

@ -257,7 +257,7 @@ getPaymentInfo(ActionContextID){
handleGetPaymentInfoResult(result){
if (result.GetPaymentInformationList != null) {
this.GetPaymentInformationList = result.GetPaymentInformationList[0];
this.GetPaymentInformationList = result.GetPaymentInformationList;
}
}

@ -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);

@ -51,8 +51,7 @@ export class HomeComponent implements OnInit {
if(this.cs.getUpdateImage().status){
// this.imageSrc = this.sanitizer.bypassSecurityTrustUrl("data:Image/*;base64,"+this.cs.getUpdateImage().img);
this.imageSrc = "data:image/png;base64,"+this.cs.getUpdateImage().img;
// alert("this.imageSrc"+ this.imageSrc);
this.imageSrc =this.sanitizer.bypassSecurityTrustUrl("data:image/png;base64,"+this.cs.getUpdateImage().img);
}else{
this.imageSrc = user.EMPLOYEE_IMAGE
? "data:image/png;base64," + user.EMPLOYEE_IMAGE

Loading…
Cancel
Save