diff --git a/Mohem/package-lock.json b/Mohem/package-lock.json
index 0b7b6fcf..2a5976ca 100644
--- a/Mohem/package-lock.json
+++ b/Mohem/package-lock.json
@@ -9438,6 +9438,14 @@
"tslib": "^1.9.0"
}
},
+ "ngx-gauge": {
+ "version": "1.0.0-beta.10",
+ "resolved": "https://registry.npmjs.org/ngx-gauge/-/ngx-gauge-1.0.0-beta.10.tgz",
+ "integrity": "sha512-j/YOntC31Pe24Et0wooi1YOmkA11Xw5YzsdBUIvYtvikvO6jwQ5tKwHimP981QAWW3S6/FQ9y94Fd/auJfyGkw==",
+ "requires": {
+ "tslib": "^1.9.0"
+ }
+ },
"nice-try": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
diff --git a/Mohem/package.json b/Mohem/package.json
index 409df5c5..43dc7e46 100755
--- a/Mohem/package.json
+++ b/Mohem/package.json
@@ -107,6 +107,7 @@
"ng-circle-progress": "^1.5.1",
"ng2-file-upload": "^1.3.0",
"ng2-pdf-viewer": "^5.3.2",
+ "ngx-gauge": "^1.0.0-beta.10",
"npm": "^6.13.1",
"phonegap-plugin-barcodescanner": "^8.1.0",
"phonegap-plugin-multidex": "^1.0.0",
@@ -203,4 +204,4 @@
"android"
]
}
-}
+}
\ No newline at end of file
diff --git a/Mohem/src/app/app.component.html b/Mohem/src/app/app.component.html
index 73b85b95..4a975deb 100644
--- a/Mohem/src/app/app.component.html
+++ b/Mohem/src/app/app.component.html
@@ -37,10 +37,10 @@
-
+
diff --git a/Mohem/src/app/app.component.scss b/Mohem/src/app/app.component.scss
index d7c1c6e7..e2901722 100644
--- a/Mohem/src/app/app.component.scss
+++ b/Mohem/src/app/app.component.scss
@@ -26,19 +26,7 @@ header
--background: white !important;
}
-// .editIcon{
-// margin-left: 174px !important;
-// margin-bottom: -104px !important;
-// padding: 6px -3px !important;
-// // margin-top: 50px !important;
-// background: transparent;
-// --background: rgb(235, 232, 232) !important;
-// --border-radius: 80% !important;
-// // border-color: rgb(211, 208, 208) !important;
-// --box-shadow: 3px 0 rgb(194, 191, 191) !important;
-// z-index: 3 !important;
-
-// }
+
.menubutton{
white-space: normal;
@@ -53,15 +41,7 @@ header
box-shadow: 3px 0px 7px 0px #c5c2c2;
border-radius: 50%;
- // box-shadow: 0px 2px 7px 0px #dfe1e3 #7f8c8d;
- // white-space: normal;
- // color: var(--light);
- // text-transform: capitalize;
- // min-height: 47px;
- // background: transparent;
- // font-size: 2rem;
- // position: absolute;
- // top: 40px;
+
}
.changeIcon{
@@ -72,13 +52,7 @@ header
position: relative;
color: #7f8c8d;
- // background: #c1c1c1;
- // width: 40px;
- // height: 39px;
- // border-radius: 50% !important;
- // position: relative;
- // left: 51px;
- // top:16px;
+
}
.changeImgBtn{
@@ -228,11 +202,7 @@ padding: 6px 24px;
.sidebar-menu .header-div {
- // background: var(--primary);
- // background: -moz-linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%, var(--secondary) 59%, var(--customnavy) 100%);
- // background: -webkit-linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%, var(--secondary) 59%, var(--customnavy) 100%);
- // background: linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%, var(--secondary) 59%, var(--customnavy) 100%);
- // color: var(--light);
+
text-transform: capitalize;
height: 100px;
position: relative;
@@ -319,4 +289,17 @@ font-weight: bolder !important;
color: black !important;
font-weight: bolder !important;
+}
+
+.profileImg{
+ width: 160px;
+ height: 160px;
+ display: -webkit-inline-box;
+ display: inline-flex;
+ overflow: hidden;
+ background: transparent;
+ border-radius: 70% !important;
+ position: relative;
+ top: 7px;
+
}
\ No newline at end of file
diff --git a/Mohem/src/app/app.component.ts b/Mohem/src/app/app.component.ts
index ccfe1c9d..28f84927 100644
--- a/Mohem/src/app/app.component.ts
+++ b/Mohem/src/app/app.component.ts
@@ -126,8 +126,13 @@ export class AppComponent implements OnInit, AfterViewInit {
this.cs.openLogin();
}
+ // profile() {
+ // this.cs.openProfile();
+ // this.menu.toggle();
+ // }
+
profile() {
- this.cs.openProfile();
+ this.cs.openEditProfile();
this.menu.toggle();
}
openNotification(){
@@ -155,4 +160,5 @@ export class AppComponent implements OnInit, AfterViewInit {
this.menu.toggle();
}
+
}
diff --git a/Mohem/src/app/hmg-common/hmg-common.module.ts b/Mohem/src/app/hmg-common/hmg-common.module.ts
index 40b14ab7..85bb9ce8 100644
--- a/Mohem/src/app/hmg-common/hmg-common.module.ts
+++ b/Mohem/src/app/hmg-common/hmg-common.module.ts
@@ -33,6 +33,7 @@ import { KeysPipe } from './pipes/keys/keys.pipe';
import { SegmentContentComponent } from './ui/segment-content/segment-content.component';
import { GraphComponent } from './ui/graph/graph.component';
import { NgxChartsModule } from '@swimlane/ngx-charts';
+
import { ExpandableComponent } from './ui/expandable/expandable.component';
import { ProjectsService } from './services/projects/projects.service';
import { NationalityService } from './services/nationality/nationality.service';
@@ -92,11 +93,12 @@ import {FileUploderProfileComponent} from './ui/file-uploder-profile/file-uplode
import { OpenNativeSettings } from '@ionic-native/open-native-settings/ngx';
import { AccordinCustomComponent } from './ui/accordin-custom/accordin-custom.component';
import { AccordinTabCustomComponent} from './ui/accordin-custom/accordin-tab-custom/accordin-tab-custom.component'
+import {DashboredService} from './services/dashbored/dashbored.service';
+import {NgxGaugeModule} from 'ngx-gauge';
import { StatsButtonComponent } from './ui/stats-button/stats-button.component';
import { ServicesButtonComponent } from './ui/services-button/services-button.component';
import {ConfirmLoginComponent} from '../authentication/confirm-login/confirm-login.component'
import {WelcomeComponent} from './ui/welcome-login/welcome.component'
-import {DashboredService} from './services/dashbored/dashbored.service'
import {FabButtonComponent} from './ui/fab-button/fab-button.component'
import { AttendScanService } from './services/attend-services/attend-scan.service';
import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';
@@ -113,7 +115,8 @@ import { ChartModule } from 'primeng/chart';
ListboxModule,
PdfViewerModule,
NgCircleProgressModule.forRoot(),
- ChartModule
+ ChartModule,
+ NgxGaugeModule
],
declarations: [
FabButtonComponent,
@@ -229,6 +232,7 @@ import { ChartModule } from 'primeng/chart';
FileUploderProfileComponent,
AccordinTabCustomComponent,
AccordinCustomComponent,
+ NgxGaugeModule,
StatsButtonComponent,
ServicesButtonComponent,
ConfirmLoginComponent,
diff --git a/Mohem/src/app/hmg-common/services/authentication/models/authenticated-user.ts b/Mohem/src/app/hmg-common/services/authentication/models/authenticated-user.ts
index 76d05310..2438134c 100644
--- a/Mohem/src/app/hmg-common/services/authentication/models/authenticated-user.ts
+++ b/Mohem/src/app/hmg-common/services/authentication/models/authenticated-user.ts
@@ -78,5 +78,8 @@ MobileNumber:string;
LogInTokenID:string;
CompanyImageDescription: string;
CompanyImageURL: string;
+SERVICE_DAYS:Number;
+SERVICE_MONTHS:Number;
+SERVICE_YEARS:Number;
}
diff --git a/Mohem/src/app/hmg-common/services/common/common.service.ts b/Mohem/src/app/hmg-common/services/common/common.service.ts
index 17bc82a5..88fdba44 100644
--- a/Mohem/src/app/hmg-common/services/common/common.service.ts
+++ b/Mohem/src/app/hmg-common/services/common/common.service.ts
@@ -1097,6 +1097,9 @@ public getMonthNameAr(value: number): string {
public openProfile() {
this.nav.navigateForward(["/profile/home"]);
}
+ public openEditProfile() {
+ this.nav.navigateForward(["/profile/editprofile"]);
+ }
public openAccuralPage() {
this.nav.navigateForward(["/accrual-balances/home"]);
}
@@ -1187,6 +1190,13 @@ public getMonthNameAr(value: number): string {
public openConfirmLoginPage() {
this.nav.navigateForward(["/authentication/confirmLogin"]);
}
+ public openEditprofile() {
+ this.nav.navigateForward(["/profile/editProfile"]);
+ }
+ public openPerformanceevaluation() {
+ this.nav.navigateForward(["/profile/performanceevaluation"]);
+ }
+
public reload(url: string, from: string) {
console.log("force reload called from:" + from);
diff --git a/Mohem/src/app/hmg-common/services/dashbored/performance-appraisal.response.ts b/Mohem/src/app/hmg-common/services/dashbored/performance-appraisal.response.ts
index 9dbe5845..65b4e686 100644
--- a/Mohem/src/app/hmg-common/services/dashbored/performance-appraisal.response.ts
+++ b/Mohem/src/app/hmg-common/services/dashbored/performance-appraisal.response.ts
@@ -5,5 +5,7 @@ import { Response } from "src/app/hmg-common/services/models/response";
import { PerformanceAppraisalList } from './PerformanceAppraisalList';
export class PerformanceAppraisalResponse extends Response{
-public GetGetPerformanceAppraisalList :PerformanceAppraisalList[];
+ public GetPerformanceAppraisalList :PerformanceAppraisalList[];
+ public static PERFORMANCE_DATA = "PERFORMANCE_DATA"
+
}
\ No newline at end of file
diff --git a/Mohem/src/app/home/home.page.ts b/Mohem/src/app/home/home.page.ts
index 95e58003..c29c014b 100644
--- a/Mohem/src/app/home/home.page.ts
+++ b/Mohem/src/app/home/home.page.ts
@@ -593,7 +593,7 @@ export class HomePage implements OnInit {
}
openProfilePage() {
- this.common.openProfile();
+ this.common.openEditProfile();
}
}
diff --git a/Mohem/src/app/payslip/home/home.component.ts b/Mohem/src/app/payslip/home/home.component.ts
index 6bd1875b..7fd9b363 100644
--- a/Mohem/src/app/payslip/home/home.component.ts
+++ b/Mohem/src/app/payslip/home/home.component.ts
@@ -186,7 +186,6 @@ slidePrev(object, slideView) {
if (result.GetPayslipList != null) {
this.GetPayslipList = result.GetPayslipList;
- alert(this.GetPayslipList.length);
this.firstPayslip= this.GetPayslipList[0]
this.defultSelected=this.firstPayslip.PAYSLIP_CHOICE
}
diff --git a/Mohem/src/app/profile/edit-profile/edit-profile.component.html b/Mohem/src/app/profile/edit-profile/edit-profile.component.html
new file mode 100644
index 00000000..9163ba2a
--- /dev/null
+++ b/Mohem/src/app/profile/edit-profile/edit-profile.component.html
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ts.trPK('userProfile','edit-profile')}}
+
+
+
+
+
+
+
+ {{ts.trPK('userProfile','performance-evaluation')}}
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Mohem/src/app/profile/edit-profile/edit-profile.component.scss b/Mohem/src/app/profile/edit-profile/edit-profile.component.scss
new file mode 100644
index 00000000..651acf4b
--- /dev/null
+++ b/Mohem/src/app/profile/edit-profile/edit-profile.component.scss
@@ -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;
+
+ }
+
\ No newline at end of file
diff --git a/Mohem/src/app/profile/edit-profile/edit-profile.component.spec.ts b/Mohem/src/app/profile/edit-profile/edit-profile.component.spec.ts
new file mode 100644
index 00000000..7ef1986f
--- /dev/null
+++ b/Mohem/src/app/profile/edit-profile/edit-profile.component.spec.ts
@@ -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
;
+
+ 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();
+ });
+});
diff --git a/Mohem/src/app/profile/edit-profile/edit-profile.component.ts b/Mohem/src/app/profile/edit-profile/edit-profile.component.ts
new file mode 100644
index 00000000..58c888f3
--- /dev/null
+++ b/Mohem/src/app/profile/edit-profile/edit-profile.component.ts
@@ -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
+
-
-
-