resolved conflict issues with master branch
commit
96971a6b68
@ -0,0 +1,77 @@
|
||||
<ion-content class="colorBG">
|
||||
<div class="header-div">
|
||||
<ion-buttons slot="start">
|
||||
<ion-back-button color="light" class="btnBack" defaultHref="/home"></ion-back-button>
|
||||
</ion-buttons>
|
||||
<p class="proTitles">{{ts.trPK('userProfile','title')}}</p>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
<div class="centerDiv homeBox" (click)="openPersonalInfo()">
|
||||
<!-- <div class="profileDiv"> -->
|
||||
<img class="profileImg" [src]="user_image">
|
||||
</div>
|
||||
|
||||
<!-- <ion-img class="profileImg" [src]="imageSrc"></ion-img> -->
|
||||
<div *ngIf="personalInfo">
|
||||
<p class="empName">{{User_name_Emp}}</p>
|
||||
<p class="empJob"> {{User_Job_name}}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<ion-grid *ngIf="personalInfo">
|
||||
<div class="gridService">
|
||||
<ion-row>
|
||||
<ion-col class="columns">
|
||||
<label class="service">{{personalInfo.SERVICE_YEARS}}</label>
|
||||
<br> <label class="services">YEARS</label>
|
||||
</ion-col>
|
||||
<ion-col class="columns">
|
||||
<label class="service">{{personalInfo.SERVICE_MONTHS}}</label>
|
||||
<br> <label class="services">MONTHS</label>
|
||||
</ion-col>
|
||||
<ion-col class="columns">
|
||||
<label class="service">{{personalInfo.SERVICE_DAYS}}</label>
|
||||
<br> <label class="services">DAYS</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
|
||||
</div>
|
||||
</ion-grid>
|
||||
|
||||
|
||||
<div class="list">
|
||||
<ion-list class="list-ios">
|
||||
<div class="p">
|
||||
<p>Years of Services</p>
|
||||
</div>
|
||||
|
||||
<ion-item class="itemline" (click)="openEditprofile()">
|
||||
<ion-thumbnail slot="start" class="menu-thumb">
|
||||
<img style= "height: 22px !important;" src="../assets/imgs/profile_icon.png" item-left>
|
||||
</ion-thumbnail>
|
||||
|
||||
<ion-label class="profile">
|
||||
{{ts.trPK('userProfile','edit-profile')}}
|
||||
</ion-label>
|
||||
<ion-icon style= "width: 20px; height: 22px !important;" name="arrow-forward" item-right></ion-icon>
|
||||
</ion-item>
|
||||
|
||||
<ion-item class="itemlins" (click)="openPerormance()">
|
||||
<ion-thumbnail slot="start" class="menu-thumb">
|
||||
<ion-icon style= "width: 23px; height: 24px !important;" name="speedometer" item-left></ion-icon>
|
||||
|
||||
</ion-thumbnail>
|
||||
<ion-label class="profile">
|
||||
{{ts.trPK('userProfile','performance-evaluation')}}
|
||||
</ion-label>
|
||||
<ion-icon style= "width: 20px; height: 22px !important;" name="arrow-forward" item-right></ion-icon>
|
||||
</ion-item>
|
||||
|
||||
</ion-list>
|
||||
</div>
|
||||
</ion-content>
|
||||
@ -0,0 +1,153 @@
|
||||
|
||||
|
||||
.list-ios {
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
margin-top: 32px;
|
||||
margin-bottom: 32px;
|
||||
background: var(--ion-item-background,var(--ion-background-color,#fff));
|
||||
}
|
||||
|
||||
.colorBG{
|
||||
--background: #f0efef;
|
||||
}
|
||||
.header-div{
|
||||
text-transform: capitalize;
|
||||
background: #22C6B3;
|
||||
display: block;
|
||||
position: relative;
|
||||
height: 160px;
|
||||
margin-bottom: 60px;
|
||||
}
|
||||
|
||||
|
||||
.profileImg{
|
||||
width: 160px;
|
||||
height: 160px;
|
||||
display: -webkit-inline-box;
|
||||
display: inline-flex;
|
||||
overflow: hidden;
|
||||
/* background: transparent; */
|
||||
border-radius: 78% !important;
|
||||
position: relative;
|
||||
top: 34px;
|
||||
// background: white;
|
||||
background: transparent;
|
||||
margin-left: -3px;
|
||||
|
||||
}
|
||||
|
||||
.proTitles {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: 16px;
|
||||
text-align: center;
|
||||
font-weight: bolder;
|
||||
color: white;
|
||||
margin-top: -33px;
|
||||
}
|
||||
|
||||
.Text {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
font-weight: bolder;
|
||||
color: black;
|
||||
font-size: 16px;
|
||||
margin-top: 34px;
|
||||
margin-bottom: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
|
||||
ion-thumbnail.menu-thumb{
|
||||
width:20px;
|
||||
height:20px;
|
||||
// margin-top: 5px !important;
|
||||
}
|
||||
|
||||
.profile{
|
||||
color: black !important;
|
||||
// font-weight: bolder !important;
|
||||
|
||||
}
|
||||
|
||||
.gridService{
|
||||
|
||||
// background-color: #094875;
|
||||
margin-top: 87px;
|
||||
border-radius: 10px;
|
||||
margin-bottom: -49px;
|
||||
margin-left: 14px;
|
||||
margin-right: 14px;
|
||||
|
||||
}
|
||||
.columns{
|
||||
margin: 10px;
|
||||
background: #094875;
|
||||
border-radius: 27px;
|
||||
padding-left: 30px;
|
||||
padding-right: 6px;
|
||||
padding-top: 19px;
|
||||
padding-bottom: 26px;
|
||||
}
|
||||
|
||||
|
||||
.service{
|
||||
font-size: 28px;
|
||||
// font-weight: bolder;
|
||||
color: white;
|
||||
letter-spacing: 1px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.services{
|
||||
|
||||
font-size: 12px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.list{
|
||||
margin-left: 14px;
|
||||
margin-right: 14px;
|
||||
border-radius: 10px;
|
||||
background: white;
|
||||
border: solid #bebbbb !important;
|
||||
padding: 2px;
|
||||
}
|
||||
.p{
|
||||
color: black !important;
|
||||
font-size: medium;
|
||||
text-align: center;
|
||||
border-bottom: rgb(190, 187, 187) solid 1px;
|
||||
}
|
||||
.itemline{
|
||||
border-bottom: rgb(190, 187, 187) solid 1px;
|
||||
}
|
||||
.itemlins{
|
||||
border-bottom: rgb(190, 187, 187) solid 1px;
|
||||
margin-bottom: 209px;
|
||||
|
||||
|
||||
}
|
||||
.empName {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
font-weight: bolder;
|
||||
color: black;
|
||||
font-size: 16px;
|
||||
margin-top: 38px;
|
||||
|
||||
}
|
||||
.empJob{
|
||||
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
color: black;
|
||||
font-size: 16px;
|
||||
margin-top: 4px;
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,27 @@
|
||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { EditProfileComponent } from './edit-profile.component';
|
||||
|
||||
describe('EditProfileComponent', () => {
|
||||
let component: EditProfileComponent;
|
||||
let fixture: ComponentFixture<EditProfileComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ EditProfileComponent ],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(EditProfileComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,112 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Platform, Events, MenuController } from "@ionic/angular";
|
||||
import { CommonService } from "src/app/hmg-common/services/common/common.service";
|
||||
import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service";
|
||||
import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service";
|
||||
import { AuthenticatedUser } from "src/app/hmg-common/services/authentication/models/authenticated-user";
|
||||
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';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-edit-profile',
|
||||
templateUrl: './edit-profile.component.html',
|
||||
styleUrls: ['./edit-profile.component.scss'],
|
||||
})
|
||||
export class EditProfileComponent implements OnInit {
|
||||
|
||||
|
||||
User_name_Emp: string = "";
|
||||
User_Job_name: string;
|
||||
|
||||
private menu: MenuController;
|
||||
setImage:any;
|
||||
// imageSrc: any = "../assets/imgs/profile.png";
|
||||
user_image: any = "../assets/imgs/profile.png";
|
||||
personalInfo: any;
|
||||
appraisalArr :any =[];
|
||||
public performanceData: any=[];
|
||||
public static PERFORMANCE_DATA = 'perAppData';
|
||||
|
||||
constructor(
|
||||
public ts: TranslatorService,
|
||||
public cs: CommonService,
|
||||
public authService: AuthenticationService,
|
||||
public DS :DashboredService,
|
||||
public sharedData: SharedDataService
|
||||
// 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);
|
||||
|
||||
// });
|
||||
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.getProfile();
|
||||
}
|
||||
|
||||
getProfile() {
|
||||
console.log("getProfile");
|
||||
this.authService
|
||||
.loadAuthenticatedUser()
|
||||
.subscribe((user: AuthenticatedUser) => {
|
||||
if (user) {
|
||||
this.personalInfo = user;
|
||||
this.User_name_Emp=this.personalInfo.EMPLOYEE_NAME;
|
||||
this.User_Job_name=this.personalInfo.JOB_NAME;
|
||||
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);
|
||||
console.log("job name: "+ user.JOB_NAME);
|
||||
|
||||
|
||||
}});
|
||||
}
|
||||
|
||||
openEditprofile(){
|
||||
this.cs.openProfile();
|
||||
}
|
||||
|
||||
openPerormance(){
|
||||
this.showPerformanceAppraisal();
|
||||
|
||||
}
|
||||
|
||||
showPerformanceAppraisal(){
|
||||
this.DS.getPerformanceAppraisal(()=>{
|
||||
this.showPerformanceAppraisal();
|
||||
}).subscribe((result: PerformanceAppraisalResponse) => {
|
||||
this.handlePerformanceAppraisalResult(result);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
private handlePerformanceAppraisalResult(result){
|
||||
if (this.cs.validResponse(result)) {
|
||||
if (this.cs.hasData(result.GetPerformanceAppraisalList)) {
|
||||
this.appraisalArr =result.GetPerformanceAppraisalList;
|
||||
this.performanceData=[];
|
||||
|
||||
for(let i=0;i<this.appraisalArr.length;i++){
|
||||
this.performanceData.push({name:this.appraisalArr[i].APPRAISAL_YEAR,value :this.appraisalArr[i].APPRAISAL_SCORE});
|
||||
}
|
||||
console.log("PerformanceAppraisalResponse");
|
||||
this.sharedData.setSharedData(this.performanceData, PerformanceAppraisalResponse.PERFORMANCE_DATA);
|
||||
//localStorage.setItem("performanceData", this.performanceData)
|
||||
this.cs.openPerformanceevaluation();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,111 +1,168 @@
|
||||
<ion-header>
|
||||
<!-- <ion-header>
|
||||
|
||||
<div class="profileHead">
|
||||
<ion-toolbar class="header-toolbar">
|
||||
<ion-buttons slot="start">
|
||||
<ion-back-button color="light" class="btnBack" defaultHref="/home"></ion-back-button>
|
||||
</ion-buttons>
|
||||
<ion-title color="light" > {{ts.trPK('userProfile','title')}}</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
|
||||
<ion-content>
|
||||
<ion-card *ngIf="personalInfo">
|
||||
|
||||
<ion-card-header class="boxHdr">
|
||||
<div class="hrTitle">{{personalInfo.EMPLOYEE_NAME}}</div>
|
||||
</ion-card-header>
|
||||
<ion-card-content>
|
||||
<div>
|
||||
<div class="centerDiv profileDiv">
|
||||
<!-- <p class="TxtPlace boldTxt">{{User_name_Emp}}</p> -->
|
||||
<ion-img class="profileImg" [src]="imageSrc"></ion-img>
|
||||
</div>
|
||||
<ion-grid class="profile-grid">
|
||||
<div>
|
||||
<ion-row>
|
||||
<ion-col class="colBold" size="5">
|
||||
<label> {{ts.trPK('userProfile','empNo')}}</label>
|
||||
</ion-col>
|
||||
<ion-col size="7">
|
||||
<label>{{personalInfo.EMPLOYEE_NUMBER}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
<ion-row>
|
||||
<ion-col class="colBold" size="5">
|
||||
<label>{{ts.trPK('userProfile','busG')}}</label>
|
||||
</ion-col>
|
||||
<ion-col size="7">
|
||||
<label>{{personalInfo.BUSINESS_GROUP_NAME}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col class="colBold" size="5">
|
||||
<label>{{ts.trPK('userProfile','job')}}</label>
|
||||
</ion-col>
|
||||
<ion-col size="7">
|
||||
<label>{{personalInfo.JOB_NAME}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col class="colBold" size="5">
|
||||
<label>{{ts.trPK('userProfile','locName')}}</label>
|
||||
</ion-col>
|
||||
<ion-col size="7">
|
||||
<label>{{personalInfo.LOCATION_NAME}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col class="colBold" size="5">
|
||||
<label>{{ts.trPK('userProfile','payrol')}}</label>
|
||||
</ion-col>
|
||||
<ion-col size="7">
|
||||
<label>{{personalInfo.PAYROLL_NAME}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col class="colBold" size="5">
|
||||
<label>{{ts.trPK('userProfile','orgEmail')}}</label>
|
||||
</ion-col>
|
||||
<ion-col size="7">
|
||||
<label>{{personalInfo.EMPLOYEE_EMAIL_ADDRESS}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col class="colBold" size="5">
|
||||
<label>{{ts.trPK('userProfile','orgName')}} </label>
|
||||
</ion-col>
|
||||
<ion-col size="7">
|
||||
<label>{{personalInfo.ORGANIZATION_NAME}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col class="colBold" size="5">
|
||||
<label>{{ts.trPK('userProfile','position')}}</label>
|
||||
</ion-col>
|
||||
<ion-col size="7">
|
||||
<label>{{personalInfo.POSITION_NAME}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col class="colBold" size="5">
|
||||
<label>{{ts.trPK('userProfile','grade')}} </label>
|
||||
</ion-col>
|
||||
<ion-col size="7">
|
||||
<label>{{personalInfo.GRADE_NAME}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col class="colBold" size="5">
|
||||
<label>{{ts.trPK('userProfile','category')}}</label>
|
||||
</ion-col>
|
||||
<ion-col size="7">
|
||||
<label>{{personalInfo.EMPLOYMENT_CATEGORY_MEANING}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</div>
|
||||
</ion-grid>
|
||||
</div>
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
</ion-content>
|
||||
</div>
|
||||
</ion-header> -->
|
||||
|
||||
|
||||
<ion-content class="colorBG">
|
||||
<div class="header-div">
|
||||
<ion-buttons slot="start">
|
||||
<ion-back-button color="light" class="btnBack" defaultHref="/home"></ion-back-button>
|
||||
</ion-buttons>
|
||||
<p class="proTitles">{{ts.trPK('userProfile','title')}}</p>
|
||||
|
||||
<!-- <div class="centerDiv profileDiv"> -->
|
||||
<div class="centerDiv homeBox">
|
||||
<div class="centerDiv homeBox" (click)="openPersonalInfo()">
|
||||
<!-- <div class="profileDiv"> -->
|
||||
<img class="profileImg" [src]="imageSrc">
|
||||
</div>
|
||||
<!-- <ion-img class="profileImg" [src]="imageSrc"></ion-img> -->
|
||||
<!-- <div class="Text">{{personalInfo.EMPLOYEE_NAME}}</div> -->
|
||||
<div *ngIf="personalInfo">
|
||||
<p class="Text">{{personalInfo.EMPLOYEE_NAME}}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="changeImgBtn">
|
||||
<button ion-button icon-only menuToggle class="menubutton" (click)="ChangeImage()">
|
||||
<ion-icon (click)="ChangeImage();" class="changeIcon" name="md-create"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div> <!-- end header-div -->
|
||||
|
||||
|
||||
<div>
|
||||
|
||||
<!-- <ion-card *ngIf="personalInfo"> -->
|
||||
|
||||
<!-- <ion-card-header class="boxHdr">
|
||||
<div class="hrTitle">{{personalInfo.EMPLOYEE_NAME}}</div>
|
||||
</ion-card-header> -->
|
||||
<!-- <ion-card-content> -->
|
||||
<div *ngIf="personalInfo">
|
||||
|
||||
<ion-grid>
|
||||
<div class="profileGrid">
|
||||
<ion-row style="border-bottom: rgb(190, 187, 187) solid 1px;">
|
||||
<ion-col class="line">
|
||||
<ion-row>
|
||||
<label class="lebl">
|
||||
{{ts.trPK('userProfile','empNo')}}</label></ion-row>
|
||||
<ion-row > <label
|
||||
class="rowBolds">{{personalInfo.EMPLOYEE_NUMBER}}</label> </ion-row>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<ion-row> <label class="lebl">{{ts.trPK('userProfile','category')}}</label>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<label class="rowBolds">{{personalInfo.EMPLOYMENT_CATEGORY_MEANING}}</label> </ion-row>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
<ion-row style="border-bottom: rgb(190, 187, 187) solid 1px;">
|
||||
<ion-col>
|
||||
<ion-row>
|
||||
<label class="lebl">{{ts.trPK('userProfile','address')}}</label>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<label class="rowBolds"></label>
|
||||
</ion-row>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
<ion-row style="border-bottom: rgb(190, 187, 187) solid 1px;">
|
||||
<ion-col>
|
||||
<ion-row>
|
||||
<label class="lebl">{{ts.trPK('general','mobile')}}</label>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<label class="rowBolds">{{personalInfo.EMPLOYEE_MOBILE_NUMBER}}</label>
|
||||
</ion-row>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
<ion-row style="border-bottom: rgb(190, 187, 187) solid 1px;">
|
||||
<ion-col>
|
||||
<ion-row>
|
||||
<label class="lebl">{{ts.trPK('userProfile','busG')}}</label>
|
||||
</ion-row>
|
||||
<ion-row> <label class="rowBolds">{{personalInfo.BUSINESS_GROUP_NAME}}</label>
|
||||
</ion-row>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
|
||||
<ion-row style="border-bottom: rgb(190, 187, 187) solid 1px;">
|
||||
<ion-col>
|
||||
<ion-row>
|
||||
<label class="lebl">{{ts.trPK('userProfile','job')}}</label>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<label class="rowBolds">{{personalInfo.JOB_NAME}}</label>
|
||||
</ion-row>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
<ion-row style="border-bottom: rgb(190, 187, 187) solid 1px;">
|
||||
<ion-col>
|
||||
<ion-row>
|
||||
<label class="lebl">{{ts.trPK('userProfile','payrol')}}</label>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<label class="rowBolds">{{personalInfo.PAYROLL_NAME}}</label>
|
||||
</ion-row>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
|
||||
<ion-row style="border-bottom: rgb(190, 187, 187) solid 1px;">
|
||||
<ion-col>
|
||||
<ion-row>
|
||||
<label class="lebl">{{ts.trPK('userProfile','orgEmail')}}</label>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<label class="rowBolds">{{personalInfo.EMPLOYEE_EMAIL_ADDRESS}}</label>
|
||||
</ion-row>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
<ion-row style="border-bottom: rgb(190, 187, 187) solid 1px;">
|
||||
<ion-col>
|
||||
<ion-row>
|
||||
<label class="lebl">{{ts.trPK('userProfile','position')}}</label>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<label class="rowBolds">{{personalInfo.POSITION_NAME}}</label>
|
||||
</ion-row>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<ion-row>
|
||||
<label class="lebl">{{ts.trPK('userProfile','grade')}} </label>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<label class="rowBolds">{{personalInfo.GRADE_NAME}}</label>
|
||||
</ion-row>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
</div>
|
||||
</ion-grid>
|
||||
</div>
|
||||
<!-- </ion-card-content> -->
|
||||
<!-- </ion-card> -->
|
||||
</div>
|
||||
</ion-content>
|
||||
@ -1,3 +1,132 @@
|
||||
ion-col.colBold, ion-col.colBold > label{
|
||||
font-weight:bold;
|
||||
}
|
||||
}
|
||||
|
||||
.colorBG{
|
||||
--background: #f0efef;
|
||||
}
|
||||
.header-div{
|
||||
text-transform: capitalize;
|
||||
background: #22C6B3;
|
||||
display: block;
|
||||
position: relative;
|
||||
height: 160px;
|
||||
margin-bottom: 60px;
|
||||
}
|
||||
|
||||
// .profileCont{
|
||||
// background-color: #d9d7d7 !important;
|
||||
|
||||
|
||||
.menubutton{
|
||||
white-space: normal;
|
||||
color: var(--light);
|
||||
text-transform: capitalize;
|
||||
min-height: 39px;
|
||||
background: #f0ecec;
|
||||
font-size: 2rem;
|
||||
position: absolute;
|
||||
width: 35px !important;
|
||||
height: 19px;
|
||||
box-shadow: 3px 0px 7px 0px #c5c2c2;
|
||||
border-radius: 50%;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.changeIcon{
|
||||
/* background: #c1c1c1; */
|
||||
width: 21px;
|
||||
/* height: 26px; */
|
||||
border-radius: 50% !important;
|
||||
position: relative;
|
||||
color: #7f8c8d;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.changeImgBtn{
|
||||
position: absolute;
|
||||
top: 80%;
|
||||
left: 65%;
|
||||
}
|
||||
.profileImg{
|
||||
width: 160px;
|
||||
height: 160px;
|
||||
display: -webkit-inline-box;
|
||||
display: inline-flex;
|
||||
overflow: hidden;
|
||||
// background: transparent;
|
||||
border-radius: 69% !important;
|
||||
position: relative;
|
||||
top: 34px;
|
||||
// background: white;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.Text {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
font-weight: bolder;
|
||||
color: black;
|
||||
font-size: 16px;
|
||||
margin-top: 34px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.line{
|
||||
|
||||
padding-top: 0px !important;
|
||||
/* margin-bottom: 0px; */
|
||||
/* margin: 0px; */
|
||||
border-right: 1px #c5c2c2 solid !important;
|
||||
line-height: 10px !important;
|
||||
|
||||
}
|
||||
.proTitles {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: 16px;
|
||||
text-align: center;
|
||||
font-weight: bolder;
|
||||
color: white;
|
||||
margin-top: -33px;
|
||||
}
|
||||
|
||||
|
||||
.profileGrid{
|
||||
border: #bebbbb solid 1px;
|
||||
border-radius: 9px;
|
||||
padding: 0px;
|
||||
margin-top: 54px;
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
margin-bottom: 10px;
|
||||
color: black;
|
||||
// font-weight: bold;
|
||||
background: white;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.lebl{
|
||||
|
||||
color: black;
|
||||
font-size: 14px !important;
|
||||
font-weight: bold !important;
|
||||
padding-top: 9px;
|
||||
padding-left: 5px;
|
||||
|
||||
}
|
||||
.rowBolds{
|
||||
color: black !important;
|
||||
font-size: 14px !important;
|
||||
/* padding: 6px !important; */
|
||||
padding-bottom: 9px;
|
||||
padding-left: 5px;
|
||||
padding-top: 4px;
|
||||
|
||||
}
|
||||
@ -0,0 +1,77 @@
|
||||
<ion-content class="colorBG">
|
||||
<div class="header-div">
|
||||
<ion-buttons slot="start">
|
||||
<ion-back-button color="light" class="btnBack" defaultHref="/home"></ion-back-button>
|
||||
</ion-buttons>
|
||||
<p class="proTitles">{{ts.trPK('userProfile','performance')}}</p>
|
||||
|
||||
<div class="profilediv" (click)="openPersonalInfo()">
|
||||
<img class="profileImg" [src]="user_image">
|
||||
</div>
|
||||
<!-- <ion-img class="profileImg" [src]="imageSrc"></ion-img> -->
|
||||
|
||||
|
||||
|
||||
<ion-grid>
|
||||
<div class="grid">
|
||||
<ion-row>
|
||||
<p class="Text">Performance Evaluation</p>
|
||||
|
||||
<div class="gauge">
|
||||
|
||||
|
||||
<ngx-charts-gauge [view]="view" [scheme]="colorScheme" [results]="performanceData" [min]="0" [max]="100"
|
||||
[angleSpan]="240" [startAngle]="-120" [bigSegments]="5"
|
||||
[smallSegments]="10" (select)="onSelect($event)">
|
||||
</ngx-charts-gauge>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</ion-row>
|
||||
</div>
|
||||
|
||||
<!-- <div>
|
||||
<div *ngFor="let data of performanceData">
|
||||
<ion-row class="gridvalue">
|
||||
<ion-col >
|
||||
<div class="performancecolor" [style.background]="data.color"></div>
|
||||
<br>
|
||||
<label class="label"> Your Performance In </label>
|
||||
<label class="labelvalue"> {{data.value}} </label>
|
||||
<label class="label"> {{data.name}} </label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- class="gridvalue" -->
|
||||
<!-- ///// -->
|
||||
|
||||
<div>
|
||||
<div *ngIf="performanceData">
|
||||
<div >
|
||||
<ion-row >
|
||||
<ion-col *ngFor="let data of performanceData ;let i = index" [ngClass]="length % 2 != 0 && i == length - 1 ? 'rightgrid' : 'leftgrid'" >
|
||||
<div class="performancecolor" [style.background]="data.color"></div>
|
||||
<br>
|
||||
<label class="label"> Your Performance In </label>
|
||||
<label class="label"> {{data.name}} </label>
|
||||
<br>
|
||||
<label class="labelvalue"> {{data.value}} </label>
|
||||
<label class="percentage"> %</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</ion-grid>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</ion-content>
|
||||
@ -0,0 +1,144 @@
|
||||
|
||||
|
||||
|
||||
.colorBG{
|
||||
--background: #f0efef;
|
||||
}
|
||||
.header-div{
|
||||
text-transform: capitalize;
|
||||
background: #22C6B3;
|
||||
display: block;
|
||||
position: relative;
|
||||
height: 160px;
|
||||
margin-bottom: 60px;
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
.btnBack{
|
||||
background: var(--customnavy);
|
||||
white-space: normal;
|
||||
color: var(--light);
|
||||
text-transform: capitalize;
|
||||
min-height: 45px;
|
||||
margin-top: -8px !important;
|
||||
}
|
||||
|
||||
.profilediv{
|
||||
|
||||
margin-left: 337px;
|
||||
}
|
||||
.profileImg{
|
||||
width: 25px;
|
||||
height: 24px;
|
||||
/* display: -webkit-inline-box; */
|
||||
/* display: inline-flex; */
|
||||
overflow: hidden;
|
||||
background: transparent;
|
||||
border-radius: 90% !important;
|
||||
position: relative;
|
||||
top: -22px;
|
||||
// margin-left: 337px;
|
||||
|
||||
}
|
||||
|
||||
.proTitles {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: 16px;
|
||||
text-align: center;
|
||||
font-weight: bolder;
|
||||
color: white;
|
||||
margin-top: -33px;
|
||||
}
|
||||
|
||||
.grid{
|
||||
|
||||
background-color: #f9f9f9;
|
||||
margin-top: 9px;
|
||||
margin-bottom: 7px !important;
|
||||
border-radius: 21px;
|
||||
margin-bottom: 26px;
|
||||
margin-left: 14px;
|
||||
margin-right: 14px;
|
||||
padding-bottom: 1px;
|
||||
border: solid #d7d4d4 !important;
|
||||
|
||||
}
|
||||
.Text {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
font-weight: bolder;
|
||||
color: black;
|
||||
font-size: 16px;
|
||||
margin-top: 5px;
|
||||
margin-bottom: 10px;
|
||||
text-align: center;
|
||||
margin-left: 74px;
|
||||
}
|
||||
|
||||
.leftgrid{
|
||||
margin-left: 10px;
|
||||
background: white;
|
||||
border: solid #d7d4d4;
|
||||
margin: 7px;
|
||||
border-radius: 24px;
|
||||
width: 30% !important;
|
||||
padding-bottom: 9px;
|
||||
padding-top: 11px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.rightgrid{
|
||||
margin-left: 10px;
|
||||
background: white;
|
||||
border: solid #d7d4d4;
|
||||
// margin: 7px;
|
||||
border-radius: 24px;
|
||||
width: 30% !important;
|
||||
padding-bottom: 9px;
|
||||
padding-top: 11px;
|
||||
padding-left: 10px;
|
||||
margin-right: 189px;
|
||||
|
||||
}
|
||||
|
||||
.performancecolor{
|
||||
border: solid #bebbbb 1px !important;
|
||||
border-radius: 13px;
|
||||
margin-top: 0px !important;
|
||||
height: 10px;
|
||||
padding-right: 8px !important;
|
||||
width: 65px;
|
||||
margin-bottom: -10px;
|
||||
|
||||
}
|
||||
|
||||
.label{
|
||||
|
||||
font-size: 13px !important;
|
||||
margin-top: -7px !important;
|
||||
font-weight: bold !important;
|
||||
}
|
||||
|
||||
.labelvalue{
|
||||
font-size: 28px !important;
|
||||
font-weight: bold !important;
|
||||
margin-top: 7px !important;
|
||||
margin-left: 72px !important;
|
||||
}
|
||||
|
||||
.percentage{
|
||||
font-size: 15px !important;
|
||||
margin-top: 15px !important;
|
||||
|
||||
}
|
||||
|
||||
.gauge{
|
||||
transform: translate(-24px, -65px);
|
||||
margin-bottom: -187px;
|
||||
margin-top: -20px;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,27 @@
|
||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { PerformanceEvaluationComponent } from './performance-evaluation.component';
|
||||
|
||||
describe('PerformanceEvaluationComponent', () => {
|
||||
let component: PerformanceEvaluationComponent;
|
||||
let fixture: ComponentFixture<PerformanceEvaluationComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ PerformanceEvaluationComponent ],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PerformanceEvaluationComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,88 @@
|
||||
import { Component, OnInit, NgModule } from '@angular/core';
|
||||
import { Platform, Events, MenuController } from "@ionic/angular";
|
||||
import { CommonService } from "src/app/hmg-common/services/common/common.service";
|
||||
import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service";
|
||||
import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service";
|
||||
import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbored.service';
|
||||
import { PerformanceAppraisalResponse } from 'src/app/hmg-common/services/dashbored/performance-appraisal.response';
|
||||
// import { DomSanitizer } from '@angular/platform-browser';
|
||||
// import {NgxGaugeModule} from 'ngx-gauge';
|
||||
import { AuthenticatedUser } from "src/app/hmg-common/services/authentication/models/authenticated-user";
|
||||
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-performance-evaluation',
|
||||
templateUrl: './performance-evaluation.component.html',
|
||||
styleUrls: ['./performance-evaluation.component.scss'],
|
||||
})
|
||||
export class PerformanceEvaluationComponent implements OnInit {
|
||||
personalInfo: any;
|
||||
user_image: any = "../assets/imgs/profile.png";
|
||||
setImage:any;
|
||||
view: any = [380, 450];
|
||||
public performanceData: any=[];
|
||||
public length;
|
||||
|
||||
|
||||
constructor( public ts: TranslatorService,
|
||||
public cs: CommonService,
|
||||
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);
|
||||
|
||||
// });
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
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;
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
|
||||
|
||||
getProfile() {
|
||||
console.log("getProfile");
|
||||
this.authService
|
||||
.loadAuthenticatedUser()
|
||||
.subscribe((user: AuthenticatedUser) => {
|
||||
if (user) {
|
||||
this.personalInfo = user;
|
||||
this.user_image = user.EMPLOYEE_IMAGE
|
||||
? "data:image/png;base64," + user.EMPLOYEE_IMAGE
|
||||
: "../assets/imgs/profile.png";
|
||||
|
||||
|
||||
}});
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue