Merge branch 'MOHEMM-Q2-DEV' of https://gitlab.com/haroon6138/mohemmionic5 into sultan26April

MOE_DEV_NEW_TEMPORARY_DESIGN
Sultan Khan 5 years ago
commit 23bcf583fb

@ -61,8 +61,7 @@
"app": "0.1.0",
"chart.js": "^2.9.3",
"com-badrit-base64": "^0.2.0",
"compare-func": "^2.0.0",
"cordova-android": "8.1.0",
"cordova-android": "^8.1.0",
"cordova-android-support-gradle-release": "^3.0.1",
"cordova-open-native-settings": "^1.5.2",
"cordova-opentok-android-permissions": "^1.0.1",
@ -101,9 +100,9 @@
"core-js": "^2.5.4",
"date-fns": "^1.30.1",
"es6-promise-plugin": "^4.1.0",
"ionic2-calendar": "^0.5.10",
"ionic2-calendar": "^0.5.8",
"ionic4-rating": "^1.0.9",
"ng-circle-progress": "^1.6.0",
"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",
@ -145,7 +144,7 @@
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~1.1.2",
"karma-jasmine-html-reporter": "^0.2.2",
"node-sass": "^4.14.1",
"node-sass": "^4.13.1",
"protractor": "^5.4.3",
"ts-node": "~8.0.0",
"tslint": "~5.12.0",
@ -219,8 +218,8 @@
"wifiwizard2": {}
},
"platforms": [
"ios",
"android"
"android",
"ios"
]
}
}

@ -23,6 +23,7 @@ const routes: Routes = [
{ path: 'attendance-tracking', loadChildren: './attendance-tracking/attendance-tracking.module#AttendanceTrackingPageModule' },
{ path: 'itemforsale', loadChildren: './itemforsale/itemforsale.module#ItemforsalePageModule' },
{ path: 'offersdiscount', loadChildren: './offersdiscount/offersdiscount.module#OffersdiscountPageModule' },
{ path: 'mowadhafi', loadChildren: './mowadhafi/mowadhafi.module#MowadhafiPageModule' },
{ path: 'erm-channel', loadChildren: './erm-channel/erm-channel.module#ErmChannelPageModule' },
{ path: 'backend-integrations', loadChildren: './backend-integrations/backend-integrations.module#BackendIntegrationsPageModule' }

@ -131,6 +131,14 @@
{{ts.trPK('myTeam','myTeam-header')}}
</ion-label>
</ion-item>
<ion-item [hidden]="TeamFlag!='true'" (click)="openMyRequestPage()">
<ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 14px !important;" src="../assets/imgs/my_team_icon.png" item-left>
</ion-thumbnail>
<ion-label class="profile">
HR REQUEST
</ion-label>
</ion-item>
<ion-item (click)="openChangePassword()">
<ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 25px !important;" src="../assets/imgs/lock_icon.png" item-left>

@ -193,7 +193,7 @@ export class AppComponent implements OnInit {
}
public profile() {
this.cs.openEditProfile();
this.cs.openProfile();
this.menu.toggle();
}

@ -30,4 +30,9 @@
}
.start-badge{
right:16px;
}
.my-custom-modal-css .modal-wrapper {
width: 90%;
height: 55%;
}

@ -1,5 +1,8 @@
import { Component, OnInit } from '@angular/core';
import { detachEmbeddedView } from '@angular/core/src/view';
import { AnnouncementService } from 'src/app/hmg-common/services/announcement-services/announcement.service';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
@Component({
selector: 'app-announcement',
@ -7,8 +10,8 @@ import { detachEmbeddedView } from '@angular/core/src/view';
styleUrls: ['./announcement.component.scss'],
})
export class AnnouncementComponent implements OnInit {
dt = new Date().toJSON().slice(0,10).replace(/-/g,'/');
public arr =[
dt = new Date().toJSON().slice(0, 10).replace(/-/g, '/');
public arr = [
{
title:"Basic Microsoft Excel Cource",
body:" is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.",
@ -33,10 +36,15 @@ export class AnnouncementComponent implements OnInit {
];
public arrList = [];
constructor() { }
constructor(
public announcementService: AnnouncementService,
public translate: TranslatorService,
public common: CommonService
) { }
ngOnInit() {
this.arrList = this.arr;
// this.getAnnouncementListService();
}
filterList(event) {
@ -59,4 +67,11 @@ export class AnnouncementComponent implements OnInit {
});
}
getAnnouncementListService(){
this.announcementService.getAnnouncementListService().subscribe((result: any) => {
if (this.common.validResponse(result)) {
}
});
}
}

@ -0,0 +1,12 @@
import { TestBed } from '@angular/core/testing';
import { AnnouncementService } from './announcement.service';
describe('AnnouncementService', () => {
beforeEach(() => TestBed.configureTestingModule({}));
it('should be created', () => {
const service: AnnouncementService = TestBed.get(AnnouncementService);
expect(service).toBeTruthy();
});
});

@ -0,0 +1,30 @@
import { Injectable } from '@angular/core';
import { Request } from 'src/app/hmg-common/services/models/request';
import { Observable } from 'rxjs';
import { AuthenticationService } from '../authentication/authentication.service';
import { ConnectorService } from '../connector/connector.service';
@Injectable({
providedIn: 'root'
})
export class AnnouncementService {
public static getAnnouncemntList = '';
constructor(
public authService: AuthenticationService,
public con: ConnectorService,
) { }
getAnnouncementListService(onError ?: any , oerrorLable ?: any) {
const request = new Request();
this.authService.authenticateRequest(request);
console.log(request);
return this.con.post(
AnnouncementService.getAnnouncemntList,
request,
onError,
oerrorLable
);
}
}

@ -1119,11 +1119,15 @@ export class CommonService {
this.nav.navigateForward(['/my-team/details']);
}
public openMyRequestPage() {
this.nav.navigateForward(['/my-team/my-request']);
this.nav.navigateForward(['/mowadhafi/my-request']);
}
public openHRRequestPage() {
this.nav.navigateForward(['/my-team/hr-request']);
this.nav.navigateForward(['/mowadhafi/hr-request']);
}
public openRequestDetailsPage() {
this.nav.navigateForward(['/mowadhafi/request-details']);
}
public openPage(link: string) {

@ -28,7 +28,7 @@ export class ConnectorService {
public static timeOut = 120 * 1000;
public static host = 'https://uat.hmgwebservices.com/';
//public static host = 'https://hmgwebservices.com/';
// public static host = 'https://hmgwebservices.com/';
constructor(public httpClient: HttpClient,
public cs: CommonService,

@ -1,6 +1,6 @@
<div feedback class="custom-button">
<div class="iconBox">
<img *ngIf="title !='Items for sale' && title !='بضاعه للبع' && title !='العروض والخصومات' && title !='Offers & Discount' && title != 'My Team' && title != 'Vacation Rule' && title != 'فريقي' && title != 'الإنابة بالإجازات' " [src]="'data:image/png;base64,'+icon" class="icon">
<img *ngIf="title !='Announcement' && title !='اعلان' && title !='Items for sale' && title !='بضاعه للبع' && title !='العروض والخصومات' && title !='Offers & Discount' && title != 'My Team' && title != 'Vacation Rule' && title != 'فريقي' && title != 'الإنابة بالإجازات' " [src]="'data:image/png;base64,'+icon" class="icon">
<!-- <img *ngIf="title == 'My Team' || title == 'Vacation Rule'" [src]="icon" class="icon"> -->
<img *ngIf="title == 'My Team' || title == 'فريقي' " [src]="myTeamIcon" class="icon">
<img *ngIf="title == 'Vacation Rule' || title == 'الإنابة بالإجازات'" [src]="vacationRuleIcon" class="icon">
@ -8,6 +8,7 @@
<img *ngIf="title =='Items for sale' || title=='بضاعه للبع'" src="/assets/icon/home/item_for_sale.png" class="icon" style="height:40px" />
<img *ngIf="title =='Offers & Discount' || title =='العروض والخصومات'" src="/assets/icon/home/offers_discount.png" class="icon" style="height:40px" />
<img *ngIf="title =='Announcement' || title =='اعلان'" src="/assets/icon/home/announcementIntegration.png" class="icon" style="height:40px" />
</div>
<div class="titleBox">

@ -63,15 +63,22 @@
<ion-label> {{'general,other-services' | translate}} </ion-label>
</ion-col>
<ion-slides [options]="slideOptsTwo" >
<ion-slide>
<app-services-button (click)="itemForSale()" [title]="'general,items-sales' | translate" >
</app-services-button>
</ion-slide>
<ion-slide>
<app-services-button (click)="offersDiscount()" [title]="'general,offers-discount' | translate" >
</app-services-button>
</ion-slide>
<ion-slide>
<app-services-button (click)="openAnnouncement()" [title]="'login,announcement' | translate" >
</app-services-button>
</ion-slide>
</ion-slides>

@ -5,7 +5,7 @@
<ion-buttons slot="start">
<nav-buttons (backClick)="goback()" [navigate]="false"></nav-buttons>
</ion-buttons>
<ion-title style=" color:white; text-align: center;">{{ts.trPK('userProfile','HR-request')}}</ion-title>
<ion-title style=" color:white; text-align: center;">{{ts.trPK('userProfile','createHR-Request')}}</ion-title>
</ion-toolbar>
</ion-header>
@ -89,9 +89,11 @@
</ion-col>
</ion-row>
</div>
<div>
<ion-button class="sendCodeBtn" (click)="createRequest()" >{{ts.trPK('userProfile','createHR-Request')}}</ion-button>
<ion-footer class="footer">
<div class="Btn">
<ion-button class="CreateBtn" (click)="createRequest()" >{{ts.trPK('userProfile','createHR-Request')}}</ion-button>
</div>
</ion-footer>
</div>
<!-- ///////////////////////////////////////////////////////////////////next page -->
@ -128,7 +130,9 @@
<!-- ///////////////////////////////////////////////////////////////////next page -->
<div *ngIf="showRequestDetails" class="result-serviceType">
<div *ngIf="showRequestDetails" >
<ion-card class="result-serviceType">
<ion-card-content>
<div class="request-heading">
<span>{{ts.trPK('userProfile','ServiceType')}}</span>
</div>
@ -149,47 +153,64 @@
</ion-row>
</div>
<div class="request-heading">
<span>{{ts.trPK('userProfile','DeptName')}}</span>
</div>
<div class="filed">
<label class="selectLabel">Select Department</label>
</div>
<div class="request-heading">
<span>{{ts.trPK('userProfile','RelatedSection')}}</span>
</div>
<div class="filed">
<label class="selectLabel">Select Section</label>
</div>
<div class="request-heading">
<span>{{ts.trPK('userProfile','RelatedTopic')}}</span>
</div>
<div class="filed">
<label class="selectLabel">Select Topic</label>
</div>
<!-- /////////////////////////////////////////// -->
<div>
<div>
<ion-list>
<label class="labels">{{ts.trPK('userProfile','DeptName')}}</label>
<ion-item lines="none" class="filed-container">
<select class="filed" placeholder="Select Department" type="text">
<option value="1">1</option>
<option value="2">2</option>
</select>
</ion-item>
<label class="labels">{{ts.trPK('userProfile','RelatedSection')}}</label>
<ion-item lines="none" class="filed-container">
<select class="filed" placeholder="Select Sectiont" type="text">
<option value="1">1</option>
<option value="2">2</option>
</select>
</ion-item>
<label class="labels">{{ts.trPK('userProfile','RelatedTopic')}}</label>
<ion-item lines="none" class="filed-container" placeholder="Select Topic" type="text">
<select class="filed" placeholder="Select Topic" type="text">
<option value="1">1</option>
<option value="2">2</option>
</select>
</ion-item>
</ion-list>
</div>
<div class="request-heading">
<span>{{ts.trPK('userProfile','SupportingDocument')}}</span>
</div>
<div style="margin-left: 15px; margin-top: 12px;">
<img (click)="uploadDocument()" src="../assets/imgs/add-photo.svg">
<div>
<img slot="start" style=" height: 55px;" (click)="uploadDocument()" src="../assets/imgs/add-photo.svg">
</div>
<div class="request-heading">
<span>{{ts.trPK('userProfile','Description')}}</span>
</div>
<div class="filedDesc">
<label class="labelDesc">Description</label>
</div>
<!-- <div class="filedDesc">
<ion-input class="labelDesc" placeholder="{{ts.trPK('userProfile','Description')}}" type="text">
</ion-input>
</div> -->
<ion-col size="12">
<ion-item style="margin-left: -20px;margin-right: -13px;" lines="none">
<ion-input [ngClass]="direction == 'en' ? 'filedDesc':'filedDesc-ar' " placeholder="{{ts.trPK('userProfile','Description')}}" type="text"></ion-input>
</ion-item>
</ion-col>
<ion-row style="margin-left: 5px;">
<div class="cancelRequest">
<ion-button (click)="cancelRequest()">Cancel
</ion-button>
</div>
<div class="submitRequest">
<ion-button (click)="submitRequest()">Submit
</ion-button>
</ion-card-content>
</ion-card>
<ion-footer style=" padding:15px !important;" >
<div ng class="gridDiv" aria-disabled="true">
<button class="gridCancelBtn" ion-button (click)="cancelRequest()">{{ts.trPK('general','cancel')}}</button>
<button class="gridSubmitBtn" ion-button (click)="submitRequest()">{{ts.trPK('general','submit')}}</button>
</div>
</ion-row>
</ion-footer>
</div>
</ion-content>

@ -230,31 +230,29 @@ ion-input {
font-family: 'WorkSans-Bold';
}
.radio-list{
background: white;
margin-left: 18px;
/* margin-right: 10px; */
margin-top: 12px;
}
// .radio-list{
// background: white;
// margin-left: 18px;
// /* margin-right: 10px; */
// margin-top: 12px;
// }
.result-serviceType{
position: relative;
background: white;
padding-bottom: 20px;
border-radius: 20px;
z-index: 1;
border-radius: 20px;
border-radius: 25px;
border: 1px solid #ccc;
padding-top: 12px;
margin: 25px 22px 2px 22px;
padding-bottom: 241px;
margin: 15px;
}
.request-heading {
span {
display: block;
padding-top: 8px;
padding-left: 15px;
margin-bottom: 15px;
// padding-top: 8px;
// padding-left: 15px;
/* font-weight: bold; */
font-size: 14px;
font-family: 'WorkSans-Bold';
@ -269,15 +267,29 @@ ion-input {
padding-top: 6px !important;
color: #636161;
padding-bottom: 15px;
padding-right: 252px;
}
.filedDesc{
border-radius: 30px;
border: 1px solid #d3d5d5 !important;
margin: 10px;
padding-left: 11px !important;
// margin: 10px;
padding-left: 20px !important;
padding-top: 6px !important;
color: #636161;
--padding-bottom: 90px;
font-size: 13px;
text-align: start;
}
.filedDesc-ar{
border-radius: 30px;
border: 1px solid #d3d5d5 !important;
// margin: 10px;
padding-right: 20px !important;
padding-top: 6px !important;
color: #636161;
padding-bottom: 110px;
--padding-bottom: 90px;
font-size: 13px;
text-align: start;
}
.labelDesc{
@ -299,30 +311,120 @@ ion-input {
color: black;
}
.cancelRequest{
padding: 10px 0px 10px 10px;
ion-button{
border-radius: 7px;
padding: 12px 25px 12px 25px;
background: #d00a0a;
--background: transparent;
--box-shadow: none !important;
height: auto;
min-height: inherit;
font-size: 16px;
font-weight: bold;
}
}
.submitRequest{
padding: 10px 10px 10px 1px;
ion-button{
border-radius: 7px;
padding: 12px 25px 12px 25px;
// .cancelRequest{
// padding: 10px 7px 10px 0px;
// ion-button{
// border-radius: 7px;
// padding: 12px 30px 12px 30px;
// background: #d00a0a;
// --background: transparent;
// --box-shadow: none !important;
// height: auto;
// min-height: inherit;
// font-size: 16px;
// font-weight: bold;
// margin-top: -5px;
// }}
// .submitRequest{
// padding: 10px 7px 10px 0px;
// ion-button{
// border-radius: 7px;
// padding: 12px 30px 12px 30px;
// background: #19a163;
// --background: transparent;
// --box-shadow: none !important;
// height: auto;
// min-height: inherit;
// font-size: 16px;
// font-weight: bold;
// margin-top: -5px;
// }}
.gridDiv{
width: 100%;
height: 40px;
margin-top: 18px;
font-size: 14px;
}
.gridCancelBtn{
min-width: auto;
// margin: 0px;
padding: 10px;
border: 1px solid var(--cusgray);
box-shadow: none;
-webkit-box-shadow: none;
-moz-box-shadow: none;
width: 45%;
height: 100%;
border-radius: 8px;
background: #d00a0a;
color: white;
margin-left: 15px;
margin-right: 5px;
font-family: 'WorkSans-bold';
}
.gridSubmitBtn{
min-width: auto;
// margin: 0px;
padding: 10px;
border: 1px solid var(--cusgray);
box-shadow: none;
-webkit-box-shadow: none;
-moz-box-shadow: none;
width: 45%;
height: 100%;
border-radius: 8px;
background: #19a163;
--background: transparent;
--box-shadow: none !important;
height: auto;
min-height: inherit;
font-size: 16px;
font-weight: bold;
}}
color: white;
// margin-left: 15px;
// margin-right: 5px;
font-family: 'WorkSans-bold';}
.filed-container{
margin-right: -17px;
margin-left: -25px;
}
.labels{
display: block;
margin-top: 15px;
padding-top: 8px;
padding-left: 15px;
font-size: 14px;
font-family: 'WorkSans-Bold';
}
.CreateBtn{
--background: var(--newgreen) !important;
background: var(--newgreen) !important;
white-space: normal;
color: var(--light);
text-transform: capitalize;
min-height: 1.0cm;
--border-radius: 7px !important;
border-radius: 7px !important;
--min-height: 1.6cm !important;
width: 315px;
}
.footer{
padding: 15px 0px 0px 0px;
background-color: var(--light) !important;
border: 0px !important;
box-shadow: none !important;
-webkit-box-shadow: none;
}
.Btn{
margin: auto; text-align: center; display: block;
}
.footer2{
padding: 15px 0px 0px 24px;
background-color: var(--light) !important;
border: 0px !important;
box-shadow: none !important;
-webkit-box-shadow: none;
}

@ -3,7 +3,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { HRRequestComponent } from './hr-request.component';
describe('HRRequestComponent', () => {
describe('HrRequestComponent', () => {
let component: HRRequestComponent;
let fixture: ComponentFixture<HRRequestComponent>;

@ -5,7 +5,7 @@ import { TranslatorService } from 'src/app/hmg-common/services/translator/transl
import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service';
import { AuthenticatedUser } from 'src/app/hmg-common/services/authentication/models/authenticated-user';
import { SharedDataService } from 'src/app/hmg-common/services/shared-data-service/shared-data.service';
import { MyTeamService } from '../service/my-team.service';
import { MowadhafiService } from '../mowadhafi.service';
import { Location } from '@angular/common';
import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response';
import { LoginModel } from 'src/app/authentication/models/LoginModel';
@ -36,6 +36,7 @@ export class HRRequestComponent implements OnInit {
public searchKeySelect = 'Complaints';
myColor: string = 'secondary';
public showRequestDetails = false;
public proID= "CS"
public direction: string;
@ -45,16 +46,22 @@ export class HRRequestComponent implements OnInit {
public authService: AuthenticationService,
public sharedData: SharedDataService,
public events: Events,
public myTeamService: MyTeamService,
public MowadhafiService: MowadhafiService,
private location: Location,
private menu: MenuController,
) {
this.direction = TranslatorService.getCurrentDirection();
this.direction = TranslatorService.getCurrentLanguageName();
}
ngOnInit() {
this.getUserInformation();
this.getTicketTypes();
this.getProject();
this.getProjectDepartments();
this.getDepartmentSections();
this.getSectionTopics();
}
@ -65,13 +72,13 @@ export class HRRequestComponent implements OnInit {
getUserInformation(){
const request = {
P_SELECTED_EMPLOYEE_NUMBER:"121816",
// P_SELECTED_EMPLOYEE_NUMBER:"121816",
P_SELECTED_RESP_ID:-999,
P_PAGE_NUM:1,
P_PAGE_LIMIT:1
};
this.myTeamService.getUserInfo(request, ()=> {} , this.ts.trPK('general', 'retry')).subscribe((result)=>
this.MowadhafiService.getUserInfo(request, ()=> {} , this.ts.trPK('general', 'retry')).subscribe((result)=>
{
this.handleUserInfoResult(result);
@ -96,17 +103,91 @@ export class HRRequestComponent implements OnInit {
// console.log("total no "+this.EmpTotal)
}
getTicketTypes(){
const request = {
// TokenID:"xxx",
// EmployeeNumber:"191817"
};
this.MowadhafiService.getTicketTypes(request, ()=> {} , this.ts.trPK('general', 'retry')).subscribe((result)=>
{
this.handlegetTicketTypesResult(result);
}) }
handlegetTicketTypesResult(result){
}
getProject(){
const request = {
// TokenID:"xxx",
// EmployeeNumber:"191817",
ItgProjectCode:"CS"
};
this.MowadhafiService.getProject(request, ()=> {} , this.ts.trPK('general', 'retry')).subscribe((result)=>
{
this.handlegetProjectResult(result);
}) }
handlegetProjectResult(result){
}
getProjectDepartments(){
const request = {
// TokenID:"xxx",
// EmployeeNumber:"191817",
ItgProjectId:11,
};
this.MowadhafiService.getProjectDepartments(request, ()=> {} , this.ts.trPK('general', 'retry')).subscribe((result)=>
{
this.handlegetProjectDepartmentsResult(result);
}) }
handlegetProjectDepartmentsResult(result){
}
getDepartmentSections(){
const request = {
// TokenID:"xxx",
// EmployeeNumber:"191817",
ItgProjectDepartmentId:1
};
this.MowadhafiService.getDepartmentSections(request, ()=> {} , this.ts.trPK('general', 'retry')).subscribe((result)=>
{
this.handlegetDepartmentSectionsResult(result);
}) }
handlegetDepartmentSectionsResult(result){
}
getSectionTopics(){
const request = {
// TokenID:"xxx",
// EmployeeNumber:"191817",
ItgDepartmentSectionId:1
};
this.MowadhafiService.getSectionTopics(request, ()=> {} , this.ts.trPK('general', 'retry')).subscribe((result)=>
{
this.handlegetSectionTopicsResult(result);
}) }
handlegetSectionTopicsResult(result){
}
// public sendActivationCode() {
// }
// VerifyCode(){
// }
createRequest(){
if(this.showRequestDetails){
this.showRequestDetails = false

@ -0,0 +1,46 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { Routes, RouterModule } from '@angular/router';
import { IonicModule } from '@ionic/angular';
import { MowadhafiPage } from './mowadhafi.page';
import { HmgCommonModule } from '../hmg-common/hmg-common.module';
import {MyRequestComponent} from './my-request/my-request.component';
import {HRRequestComponent} from './hr-request/hr-request.component';
import {RequestDetailsComponent} from'./request-details/request-details.component';
const routes: Routes = [
{
path: '',
component: MowadhafiPage,
children:[{
path: 'my-request',
component: MyRequestComponent
},
{
path: 'hr-request',
component: HRRequestComponent
},
{
path: 'request-details',
component: RequestDetailsComponent
}
]
}
];
@NgModule({
imports: [
HmgCommonModule,
CommonModule,
FormsModule,
IonicModule,
RouterModule.forChild(routes)
],
declarations: [MowadhafiPage,MyRequestComponent,HRRequestComponent,RequestDetailsComponent]
})
export class MowadhafiPageModule {}

@ -0,0 +1,10 @@
<!-- <ion-header>
<ion-toolbar>
<ion-title>mowadhafi</ion-title>
</ion-toolbar>
</ion-header>
-->
<ion-content>
<ion-router-outlet></ion-router-outlet>
</ion-content>

@ -0,0 +1,27 @@
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { MowadhafiPage } from './mowadhafi.page';
describe('MowadhafiPage', () => {
let component: MowadhafiPage;
let fixture: ComponentFixture<MowadhafiPage>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ MowadhafiPage ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(MowadhafiPage);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-mowadhafi',
templateUrl: './mowadhafi.page.html',
styleUrls: ['./mowadhafi.page.scss'],
})
export class MowadhafiPage implements OnInit {
constructor() { }
ngOnInit() {
}
}

@ -0,0 +1,12 @@
import { TestBed } from '@angular/core/testing';
import { MowadhafiService } from './mowadhafi.service';
describe('MowadhafiService', () => {
beforeEach(() => TestBed.configureTestingModule({}));
it('should be created', () => {
const service: MowadhafiService = TestBed.get(MowadhafiService);
expect(service).toBeTruthy();
});
});

@ -0,0 +1,92 @@
import { Injectable } from '@angular/core';
import { ConnectorService } from 'src/app/hmg-common/services/connector/connector.service';
import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service";
@Injectable({
providedIn: 'root'
})
export class MowadhafiService {
public static EMPLOYEE_SHARED_DATA = 'employee';
public static getMyTeam = 'Services/ERP.svc/REST/GET_EMPLOYEE_SUBORDINATES';
public static getSuborinateStatus = 'Services/ERP.svc/REST/GET_SUBORDINATES_ATTD_STATUS';
public static getUserInfo ='Services/ERP.svc/REST/Get_UserInformation';
public static getTicketTypes ='Services/COCWS.svc/REST/Mohemm_ITG_GetTicketTypes';
public static getProject ='Services/COCWS.svc/REST/Mohemm_ITG_GetProjects';
public static getProjectDepartments ='Services/COCWS.svc/REST/Mohemm_ITG_GetProjectDepartments';
public static getDepartmentSections ='Services/COCWS.svc/REST/Mohemm_ITG_GetDepartmentSections';
public static getSectionTopics ='Services/COCWS.svc/REST/Mohemm_ITG_GetSectionTopics';
public static getTicketsByEmployee ='Services/COCWS.svc/REST/Mohemm_ITG_GetTicketsByEmployee';
public static getTicketStatisticsByEmp ='Services/COCWS.svc/REST/Mohemm_ITG_GetTicketStatisticsByEmployee';
public static getTicketTransaction ='Services/COCWS.svc/REST/Mohemm_ITG_GetTicketTransaction';
public static getTicketDetails =' Services/COCWS.svc/REST/Mohemm_ITG_GetTicketDetails';
constructor(
public con: ConnectorService,
private authService: AuthenticationService
) { }
public getEmployeeSubordinates(absence: any, onError?: any, errorLabel?: string){
const request = absence;
this.authService.authenticateRequest(request);
return this.con.post(MowadhafiService.getMyTeam, request, onError, errorLabel);
}
public getSuborinatesAttStatus(absence: any, onError?: any, errorLabel?: string){
const request = absence;
this.authService.authenticateRequest(request);
return this.con.post(MowadhafiService.getSuborinateStatus, request, onError, errorLabel);
}
public getUserInfo(absence: any, onError?: any, errorLabel?: string){
const request = absence;
this.authService.authenticateRequest(request);
return this.con.post(MowadhafiService.getUserInfo, request, onError, errorLabel);
}
public getTicketTypes(absence: any, onError?: any, errorLabel?: string){
const request = absence;
this.authService.authenticateRequest(request);
return this.con.post(MowadhafiService.getTicketTypes, request, onError, errorLabel);
}
public getProject(absence: any, onError?: any, errorLabel?: string){
const request = absence;
this.authService.authenticateRequest(request);
return this.con.post(MowadhafiService.getProject, request, onError, errorLabel);
}
public getProjectDepartments(absence: any, onError?: any, errorLabel?: string){
const request = absence;
this.authService.authenticateRequest(request);
return this.con.post(MowadhafiService.getProjectDepartments, request, onError, errorLabel);
}
public getDepartmentSections(absence: any, onError?: any, errorLabel?: string){
const request = absence;
this.authService.authenticateRequest(request);
return this.con.post(MowadhafiService.getDepartmentSections, request, onError, errorLabel);
}
public getSectionTopics(absence: any, onError?: any, errorLabel?: string){
const request = absence;
this.authService.authenticateRequest(request);
return this.con.post(MowadhafiService.getSectionTopics, request, onError, errorLabel);
}
public getTicketsByEmployee(absence: any, onError?: any, errorLabel?: string){
const request = absence;
this.authService.authenticateRequest(request);
return this.con.post(MowadhafiService.getTicketsByEmployee, request, onError, errorLabel);
}
public getTicketStatisticsByEmp(absence: any, onError?: any, errorLabel?: string){
const request = absence;
this.authService.authenticateRequest(request);
return this.con.post(MowadhafiService.getTicketStatisticsByEmp, request, onError, errorLabel);
}
public getTicketTransaction(absence: any, onError?: any, errorLabel?: string){
const request = absence;
this.authService.authenticateRequest(request);
return this.con.post(MowadhafiService.getTicketTransaction, request, onError, errorLabel);
}
public getTicketDetails(absence: any, onError?: any, errorLabel?: string){
const request = absence;
this.authService.authenticateRequest(request);
return this.con.post(MowadhafiService.getTicketDetails, request, onError, errorLabel);
}
}

@ -0,0 +1,34 @@
<ion-header>
<ion-toolbar class="header-toolbar-new" >
<ion-buttons slot="start">
<nav-buttons (backClick)="goback()" [navigate]="false"></nav-buttons>
</ion-buttons>
<ion-title style=" color:white; text-align: center;">{{ts.trPK('userProfile','MyHR-request')}}</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
<!-- <div>
<ion-row [ngClass]="direction == 'en' ? 'empty-en':'empty-ar' ">{{ts.trPK('general','empty')}}</ion-row>
</div> -->
<div>
<ion-card class="result-container" (click)="openRequestDetailsPage()">
<ion-card-content>
<ion-row style="margin-left: -3px; margin-right: -9px;">
<ion-col class="text">Complaints</ion-col>
<ion-col class="date">{{ts.trPK('userProfile','postedDate')}} May2,2021</ion-col>
</ion-row>
<ion-row>There is some Complaints</ion-row>
<ion-row style="margin-top: 5px;">Pending</ion-row>
</ion-card-content>
</ion-card>
</div>
</ion-content>
<ion-footer class="footer">
<div class="Btn">
<ion-button class="CreateBtn" (click)="openHRRequestPage()" >{{ts.trPK('userProfile','createHR-Request')}}</ion-button>
</div>
</ion-footer>

@ -0,0 +1,63 @@
.empty-en{
color: black;
text-align: center;
font-size: 15px;
font-family: WorkSans-Bold;
margin: 50px 0px 0px 100px;
}
.empty-ar{
color: black;
text-align: center;
font-size: 15px;
font-family: WorkSans-Bold;
margin: 50px 100px 0px 0px;
}
.result-container{
position: relative;
background: white;
/* padding-bottom: 3px; */
border-radius: 20px;
z-index: 1;
margin: 15px;
border-radius: 10px;
border: 1px solid #ccc;
}
.text{
font-size: 15px;
margin-top: -9px;
font-family: 'WorkSans-bold';
}
.date{
margin-top: -9px;
margin-right: -49px;
color: gray;
font-size: 12px;
}
.CreateBtn{
--background: var(--newgreen) !important;
background: var(--newgreen) !important;
white-space: normal;
color: var(--light);
text-transform: capitalize;
min-height: 1.0cm;
--border-radius: 7px !important;
border-radius: 7px !important;
--min-height: 1.6cm !important;
width: 315px;
}
.footer{
padding: 15px 0px;
background-color: var(--light) !important;
border: 0px !important;
box-shadow: none !important;
-webkit-box-shadow: none;
}
.Btn{
margin: auto; text-align: center; display: block;
}

@ -5,7 +5,7 @@ import { TranslatorService } from 'src/app/hmg-common/services/translator/transl
import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service';
import { AuthenticatedUser } from 'src/app/hmg-common/services/authentication/models/authenticated-user';
import { SharedDataService } from 'src/app/hmg-common/services/shared-data-service/shared-data.service';
import { MyTeamService } from '../service/my-team.service';
import { MowadhafiService } from '../mowadhafi.service';
import { Location } from '@angular/common';
@Component({
@ -23,7 +23,7 @@ public direction : String;
public authService: AuthenticationService,
public sharedData: SharedDataService,
public events: Events,
public myTeamService: MyTeamService,
public MowadhafiService: MowadhafiService,
private location: Location,
private menu: MenuController,
@ -31,7 +31,9 @@ public direction : String;
this.direction = TranslatorService.getCurrentLanguageName();
}
ngOnInit() {}
ngOnInit() {
this.getTicketsByEmployee();
}
goback() {
this.location.back();
@ -43,4 +45,27 @@ public direction : String;
this.menu.toggle();
}
public openRequestDetailsPage() {
this.cs.openRequestDetailsPage();
this.menu.toggle();
}
getTicketsByEmployee(){
const request = {
// TokenID:"xxx",
// EmployeeNumber:"191817",
ItgPageSize:10,
ItgPageNo:1
};
this.MowadhafiService.getTicketsByEmployee(request, ()=> {} , this.ts.trPK('general', 'retry')).subscribe((result)=>
{
this.handlegetTicketsByEmployeeResult(result);
}) }
handlegetTicketsByEmployeeResult(result){
}
}

@ -0,0 +1,66 @@
<ion-header>
<ion-toolbar class="header-toolbar-new">
<ion-buttons slot="start">
<nav-buttons (backClick)="goback()" [navigate]="false"></nav-buttons>
</ion-buttons>
<ion-title style=" color:white; text-align: center;">{{ts.trPK('userProfile','MyHR-request')}}</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
<!-- <div>
<ion-row [ngClass]="direction == 'en' ? 'empty-en':'empty-ar' ">{{ts.trPK('general','empty')}}</ion-row>
</div> -->
<div>
<ion-card class="result-container" >
<ion-card-content>
<ion-row style="margin-left: -3px; margin-right: -9px;">
<ion-col >Pending</ion-col>
<ion-col class="date">{{ts.trPK('userProfile','postedDate')}} May2,2021</ion-col>
</ion-row>
<ion-col [size]="12">
<h2 class="labels">{{ts.trPK('userProfile','refrence')}}</h2>
<p class="text">453388</p>
</ion-col>
<ion-col [size]="12">
<h2 class="labels"> {{ts.trPK('userProfile','section')}}</h2>
<p class="text">Employee</p>
</ion-col>
<ion-col [size]="12">
<h2 class="labels"> {{ts.trPK('userProfile','topic')}}</h2>
<p class="text">Change Tiket</p>
</ion-col>
<ion-col [size]="12">
<h2 class="labels">{{ts.trPK('userProfile','Description')}}</h2>
<p class="DescrText">descriptions</p>
</ion-col>
</ion-card-content>
</ion-card>
</div>
<div>
<ion-card class="result-containerList" >
<ion-card-content>
<div style="position: relative;">
<div [ngClass]=" direction == 'en'? 'request-list-container' : 'request-list-container-ar'" >
<div>
<!-- <div *ngFor="let formattedAction of showFormattedAction; let i = index"> -->
<span [ngClass]="direction == 'en'? 'text-span':'text-span-ar'">Action By</span>
<div class="action-data">
<p >descriptions</p>
<span [ngClass]="direction == 'en'? 'date-span':'date-span-ar'">May 16,2021</span>
</div>
</div>
</div>
</div>
</ion-card-content>
</ion-card>
</div>
</ion-content>

@ -0,0 +1,174 @@
.sendCodeBtn{
--background: #269DB8;
color: white;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 12px;
margin-left: 23px !important;
margin-top: 15px !important;
margin-bottom: 20px !important;
/* border-radius: 4px; */
height: 26px;
/* padding: 6px 24px; */
font-size: 15px;
width: 322px;
}
.empty-en{
color: black;
text-align: center;
font-size: 15px;
font-family: WorkSans-Bold;
margin: 50px 0px 0px 100px;
}
.empty-ar{
color: black;
text-align: center;
font-size: 15px;
font-family: WorkSans-Bold;
margin: 50px 100px 0px 0px;
}
.result-container{
position: relative;
background: white;
/* padding-bottom: 3px; */
border-radius: 20px;
z-index: 1;
margin: 15px;
border-radius: 10px;
border: 1px solid #ccc;
}
.result-containerList{
position: relative;
background: white;
/* padding-bottom: 3px; */
border-radius: 20px;
z-index: 1;
margin: 15px;
border-radius: 10px;
border: 1px solid #ccc;
}
.text{
font-size: 15px;
// margin-top: -9px;
font-family: 'WorkSans-bold';
}
.date{
// margin-top: -9px;
margin-right: -49px;
color: gray;
font-size: 12px;
}
.labels{
font-size: 13px;
margin-bottom: 0px;
margin-top: -10px;
color: gray;
}
.request-list-container {
position: relative;
padding-left: 37px;
clear: both;
min-height: 200px;
margin-bottom: 80px;
padding-top: 15px;
}
.request-list-container:before{
content: "";
position: absolute;
height: 100%;
width: 4px;
left: 7px;
top: 15px;
background-color: #f5f4f4;
}
.request-list-container-ar {
position: relative;
padding-left: 60px;
clear: both;
min-height: 200px;
margin-bottom: 80px;
padding-top: 15px;
}
.request-list-container-ar:before{
content: "";
position: absolute;
height: 100%;
width: 4px;
left: 30px;
top: 15px;
right: 6px;
background-color: #dddddd;
}
.text-span {
position: relative;
display: block;
// margin-bottom: 10px;
font-family: 'WorkSans-bold';
}
.text-span:before{
content: "";
position: absolute;
left: -35px;
border-radius: 50%;
width: 15px;
height: 15px;
background-color: #269db8;
top: 1px;
}
.text-span-ar{
position: relative;
display: block;
// margin-bottom: 10px;
/* margin-top: 10px; */
margin-right: 30px;
}
.text-span-ar:before{
content: "";
position: absolute;
right: -29px;
border-radius: 50%;
width: 15px;
height: 15px;
background-color: #269db8;
top: 1px;
}
.action-data{
background-color: white;
padding: 1px;
border-radius: 20px;
font-family: WorkSans-Regular;
// padding-left: 15px;
margin-right: 20px;
margin-bottom: 15px;
p{
font-size: 14px;
}
}
.date-span{
font-size: 13px;
margin-bottom: 0px;
margin-top: -10px;
color: gray;
margin-left: 178px;
}
.date-span-ar{
font-size: 13px;
margin-bottom: 0px;
margin-top: -10px;
color: gray;
margin-right: 155px;
}

@ -0,0 +1,27 @@
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { RequestDetailsComponent } from './request-details.component';
describe('RequestDetailsComponent', () => {
let component: RequestDetailsComponent;
let fixture: ComponentFixture<RequestDetailsComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ RequestDetailsComponent ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(RequestDetailsComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,75 @@
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 { SharedDataService } from 'src/app/hmg-common/services/shared-data-service/shared-data.service';
import { MowadhafiService } from '../mowadhafi.service';
import { Location } from '@angular/common';
@Component({
selector: 'app-request-details',
templateUrl: './request-details.component.html',
styleUrls: ['./request-details.component.scss'],
})
export class RequestDetailsComponent implements OnInit {
public direction : String;
constructor(
public ts: TranslatorService,
public cs: CommonService,
public authService: AuthenticationService,
public sharedData: SharedDataService,
public events: Events,
public MowadhafiService: MowadhafiService,
private location: Location,
private menu: MenuController,
) {
this.direction = TranslatorService.getCurrentLanguageName();
}
ngOnInit() {
this.getTicketTransaction();
this.getTicketDetails()
}
goback() {
this.location.back();
}
getTicketTransaction(){
const request = {
// EmployeeNumber:"191817",
ItgTicketId:"5a10de61-c4db-4c77-e464-08d8a1beaaac",
};
this.MowadhafiService.getTicketTransaction(request, ()=> {} , this.ts.trPK('general', 'retry')).subscribe((result)=>
{
this.handlegetTicketTransactionResult(result);
}) }
handlegetTicketTransactionResult(result){
}
getTicketDetails(){
const request = {
// EmployeeNumber:"191817",
ItgTicketId:"5a10de61-c4db-4c77-e464-08d8a1beaaac",
};
this.MowadhafiService.getTicketDetails(request, ()=> {} , this.ts.trPK('general', 'retry')).subscribe((result)=>
{
this.handlegetTicketDetailsResult(result);
}) }
handlegetTicketDetailsResult(result){
}
}

@ -17,7 +17,7 @@
<!-- <ion-col><img src="../assets/imgs/fav filled.svg"></ion-col> -->
</div>
<div class="user-image">
<img [src]="employee.EMPLOYEE_IMAGE ? 'data:image/png;base64,'+employee.EMPLOYEE_IMAGE : '../assets/imgs/profile.png'" alt="Team Member Image"/>
<img class="img" [src]="employee.EMPLOYEE_IMAGE ? 'data:image/png;base64,'+employee.EMPLOYEE_IMAGE : '../assets/imgs/profile.png'" alt="Team Member Image"/>
</div>
<div style="margin-right: 16px;" slot="end" >
<a [ngClass]="employee.EMPLOYEE_MOBILE_NUMBER == '' ? 'disable-phone action-button-icon' : 'action-button-icon'" href="tel:{{employee.EMPLOYEE_MOBILE_NUMBER}}"></a>

@ -232,7 +232,17 @@ ion-title{
padding: 15px;
border-bottom: 1px solid #ccc;
}
.img{
width: 100px;
height: 100px;
display: inline-flex;
overflow: hidden;
border-radius: 78% !important;
position: relative;
/* top: 34px; */
background: transparent;
margin-left: -3px;
}
///////////////////////// Team Members css //////////////////////@extend
.filters-row {

@ -1,22 +0,0 @@
<ion-header>
<ion-toolbar class="header-toolbar-new">
<ion-buttons slot="start">
<nav-buttons (backClick)="goback()" [navigate]="false"></nav-buttons>
</ion-buttons>
<ion-title style=" color:white; text-align: center;">{{ts.trPK('userProfile','MyHR-request')}}</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
<div>
<ion-row [ngClass]="direction == 'en' ? 'empty-en':'empty-ar' ">{{ts.trPK('general','empty')}}</ion-row>
</div>
</ion-content>
<ion-footer>
<div>
<ion-button class="sendCodeBtn" (click)="openHRRequestPage()" >{{ts.trPK('userProfile','createHR-Request')}}</ion-button>
</div>
</ion-footer>

@ -1,33 +0,0 @@
.sendCodeBtn{
--background: #269DB8;
color: white;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 12px;
margin-left: 23px !important;
margin-top: 15px !important;
margin-bottom: 20px !important;
/* border-radius: 4px; */
height: 26px;
/* padding: 6px 24px; */
font-size: 15px;
width: 322px;
}
.empty-en{
color: black;
text-align: center;
font-size: 15px;
font-family: WorkSans-Bold;
margin: 50px 0px 0px 100px;
}
.empty-ar{
color: black;
text-align: center;
font-size: 15px;
font-family: WorkSans-Bold;
margin: 50px 100px 0px 0px;
}

@ -8,8 +8,7 @@ import { IonicModule } from '@ionic/angular';
import { MyTeamPage } from './my-team.page';
import { HmgCommonModule } from '../hmg-common/hmg-common.module';
import { MyRequestComponent } from './my-request/my-request.component';
import { HRRequestComponent } from './/hr-request/hr-request.component';
import { from } from 'rxjs';
import { WorklistService } from '../notification/service/worklist.service';
@ -29,14 +28,7 @@ const routes: Routes = [
path: 'details-2',
component: DetailsComponent
},
{
path: 'my-request',
component: MyRequestComponent
},
{
path: 'hr-request',
component: HRRequestComponent
}
]
}
@ -50,7 +42,8 @@ const routes: Routes = [
IonicModule,
RouterModule.forChild(routes)
],
declarations: [MyTeamPage, HomeComponent, DetailsComponent,
],
providers: [WorklistService],
declarations: [MyTeamPage, HomeComponent, DetailsComponent, MyRequestComponent, HRRequestComponent]
})
export class MyTeamPageModule { }

@ -8,7 +8,8 @@ export class MyTeamService {
public static EMPLOYEE_SHARED_DATA = 'employee';
public static getMyTeam = 'Services/ERP.svc/REST/GET_EMPLOYEE_SUBORDINATES';
public static getSuborinateStatus = 'Services/ERP.svc/REST/GET_SUBORDINATES_ATTD_STATUS';
public static getUserInfo ='Services/ERP.svc/REST/Get_UserInformation';
constructor(
public con: ConnectorService,
private authService: AuthenticationService
@ -25,11 +26,7 @@ export class MyTeamService {
return this.con.post(MyTeamService.getSuborinateStatus, request, onError, errorLabel);
}
public getUserInfo(absence: any, onError?: any, errorLabel?: string){
const request = absence;
this.authService.authenticateRequest(request);
return this.con.post(MyTeamService.getUserInfo, request, onError, errorLabel);
}
}

@ -1,121 +1,153 @@
<app-generic-header
showBack="true"
[headerText]="'userProfile,title' | translate">
[headerText]="'userProfile, title' | translate">
</app-generic-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>
<div class="centerDiv homeBox">
<div class="centerDiv homeBox">
<!-- <div class="profileDiv"> -->
<img class="profileImg" [src]="user_image">
<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="empName">{{User_name_Emp}}</p>
<p class="empJob"> {{User_Job_name}}</p>
<p class="Text">{{personalInfo.EMPLOYEE_NAME}}</p>
</div>
</div>
</div>
<ion-grid *ngIf="personalInfo" style="position: relative; display: block; z-index: 5;">
<div [ngClass]=" direction == 'ltr' ? 'gridService-en' : 'gridService-ar'" style="background: #0B4775; border-radius: 20px;">
<ion-row>
<ion-col>
<label style="font-size: 12px; color: white; margin: 10px 0px 0px 0px; display: block; text-align: center;font-weight: bold;">
{{ 'general, appreciate-service' | translate}}
</label>
</ion-col>
</ion-row>
<ion-row [ngClass]=" direction == 'ltr' ? 'service-row-en' : 'service-row-ar'">
<ion-col [ngClass]=" direction == 'ltr' ? 'columns' : 'columns-ar'">
<ion-grid>
<ion-row style="text-align:center">
<ion-col>
<label [ngClass]=" direction == 'ltr' ? 'service' : 'service-ar'">{{personalInfo.SERVICE_YEARS}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<label [ngClass]=" direction == 'ltr' ? 'services' : 'services-ar'">{{ts.trPK('userProfile','years')}}</label>
</ion-col>
</ion-row>
</ion-grid>
</ion-col>
<ion-col>
<div class="verticalLine"></div>
</ion-col>
<ion-col [ngClass]=" direction == 'ltr' ? 'columns' : 'columns-ar'">
<ion-grid>
<ion-row style="text-align:center">
<ion-col>
<label [ngClass]=" direction == 'ltr' ? 'service' : 'service-ar'">{{personalInfo.SERVICE_MONTHS}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<label [ngClass]=" direction == 'ltr' ? 'services' : 'services-ar'">{{ts.trPK('userProfile','months')}}</label>
</ion-col>
</ion-row>
</ion-grid>
</ion-col>
<ion-col>
<div class="verticalLine"></div>
</ion-col>
<ion-col [ngClass]=" direction == 'ltr' ? 'columns' : 'columns-ar'">
<ion-grid>
<ion-row style="text-align:center">
<ion-col>
<label [ngClass]=" direction == 'ltr' ? 'service' : 'service-ar'">{{personalInfo.SERVICE_DAYS}}</label>
</ion-col>
<ion-col>
<label [ngClass]=" direction == 'ltr' ? 'services' : 'services-ar'">{{ts.trPK('absenceList','days')}}</label>
</ion-col>
</ion-row>
</ion-grid>
</ion-col>
</ion-row>
<div [ngClass]=" direction == 'ltr' ? 'changeImgBtn' : 'changeImgBtn-ar'">
<button ion-button icon-only menuToggle class="menubutton" (click)="ChangeImage()">
<!-- <ion-icon (click)="ChangeImage();" class="changeIcon" name="md-create"></ion-icon> -->
<img (click)="ChangeImage();" class="changeIcon" src="../assets/imgs/edit-image.svg">
</button>
</div>
</ion-grid>
</div> <!-- end header-div -->
<div>
<div class="list">
<ion-list class="list-ios">
<div class="p">
<p>{{ts.trPK('userProfile','Years of Services')}}</p>
</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-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 [ngClass]=" direction == 'ltr' ? 'arrow' : 'arrow-ar'" 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 [ngClass]=" direction == 'ltr' ? 'arrow' : 'arrow-ar'" name="arrow-forward" item-right></ion-icon>
</ion-item>
</ion-list>
</div>
<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,216 +1,130 @@
ion-col.colBold, ion-col.colBold > label{
font-weight:bold;
}
.list-ios {
// margin-left: 0;
// margin-right: 0;
// margin-top: 32px;
// margin-bottom: 32px;
// background: var(--ion-item-background,var(--ion-background-color,#fff));
margin-left: 0;
margin-right: 0;
margin-top: -15px;
margin-bottom: 32px;
border: 1px solid #d8d8d8;
background: var(--ion-item-background, var(--ion-background-color, #fff));
border-radius: 10px;
padding-top: 60px;
.colorBG{
--background: #f0efef;
}
.header-div{
text-transform: capitalize;
background: #269DB8;
display: block;
position: relative;
height: 160px;
margin-bottom: 60px;
}
.header-toolbar-new{
--background: #269DB8;
// .profileCont{
// background-color: #d9d7d7 !important;
.menubutton {
background: #f0ecec;
min-height: 39px;
width: 35px !important;
height: 20px;
border-radius: 50%;
}
.colorBG{
--background: #f0efef;
}
.header-div{
text-transform: capitalize;
background: #269DB8;
display: block;
.changeIcon{
/* background: #c1c1c1; */
width: 21px;
/* height: 26px; */
border-radius: 50% !important;
position: relative;
height: 113px;
margin-bottom: 60px;
}
color: #7f8c8d;
height: 35px;
}
.changeImgBtn{
position: absolute;
top: 80%;
left: 65%;
}
.changeImgBtn-ar{
position: absolute;
top: 80%;
left: 66%;
}
.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;
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;
}
.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-en{
margin-top: 87px;
border-radius: 10px;
margin-bottom: -49px;
margin-left: 30px;
margin-right: 30px;
}
.gridService-ar{
margin-top: 87px;
border-radius: 10px;
margin-bottom: -49px;
margin-left: 17px;
margin-right: 17px;
}
.columns{
// margin: 10px;
// background: #0B4775;
// border-radius: 27px;
// padding-left: 30px;
// padding-right: 6px;
// padding-top: 19px;
// padding-bottom: 26px;
}
.columns-ar{
// margin: 10px;
// background: #0B4775;
// border-radius: 27px;
// padding-left: 7px;
// padding-right: 3px;
// 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;
}
.service-ar{
font-size: 28px;
color: white;
letter-spacing: 1px;
font-weight: bold;
margin-right: 26px;
}
.services-ar{
font-size: 20px;
color: white;
margin-right: 25px;
}
.list{
margin-left: 14px;
margin-right: 14px;
border-radius: 10px;
// background: white;
border:#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;
.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;
}
.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;
}
.arrow{
width: 20px;
height: 22px !important;
}
.arrow-ar{
float: left;
font-size: 25px;
color: grey;
-webkit-transform: rotate(180deg);
transform: rotate(180deg);
}
.verticalLine {
width:1%;
height:50px;
background:white;
margin-top: 100%;
// margin-left: 10%;
}
.service-row-en{
width: 79%;
margin: -12px 0px 0px 35px;
.lebl{
color: black;
font-size: 14px !important;
font-weight: bold !important;
padding-top: 9px;
padding-left: 5px;
}
.service-row-ar{
width: 95%;
margin: -12px 0px 35px 0px;
.rowBolds{
color: black !important;
font-size: 14px !important;
/* padding: 6px !important; */
padding-bottom: 9px;
padding-left: 5px;
padding-top: 4px;
}

@ -1,14 +1,11 @@
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 { Events } from '@ionic/angular';
import { DomSanitizer } from '@angular/platform-browser';
// import { DomSanitizer } from '@angular/platform-browser';
@Component({
@ -17,47 +14,35 @@ import { DomSanitizer } from '@angular/platform-browser';
styleUrls: ['./edit-profile.component.scss'],
})
export class EditProfileComponent implements OnInit {
User_name_Emp: string = '';
User_Job_name: string;
public direction: 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';
setImage:any;
imageSrc: any = '../assets/imgs/profile.png';
public direction: string;
// user_image: any = "../assets/imgs/profile.png";
constructor(
public ts: TranslatorService,
public cs: CommonService,
public authService: AuthenticationService,
public DS :DashboredService,
public sharedData: SharedDataService,
public events: Events,
private events: Events,
private sanitizer: DomSanitizer,
// 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);
});
) {
this.direction = TranslatorService.getCurrentDirection();
this.events.subscribe('img-change', displayImg => {
// alert("1 - profile home : "+displayImg);
//this.user_image = "data:image/png;base64"+displayImg;
this.setImage = this.sanitizer.bypassSecurityTrustUrl('data:Image/*;base64,'+displayImg);
this.imageSrc = this.sanitizer.bypassSecurityTrustUrl('data:Image/*;base64,'+displayImg);
});
}
ngOnInit() {
this.getProfile();
this.getProfile();
}
getProfile() {
console.log('getProfile');
this.authService
@ -65,60 +50,27 @@ export class EditProfileComponent implements OnInit {
.subscribe((user: AuthenticatedUser) => {
if (user) {
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);
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 :parseInt(this.appraisalArr[i].APPRAISAL_SCORE).toFixed()});
if(this.cs.getUpdateImage().status){
// this.imageSrc = this.sanitizer.bypassSecurityTrustUrl("data:Image/*;base64,"+this.cs.getUpdateImage().img);
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
: this.imageSrc;
console.log('2-'+user);
}
}
console.log('PerformanceAppraisalResponse');
this.sharedData.setSharedData(this.performanceData, PerformanceAppraisalResponse.PERFORMANCE_DATA);
//localStorage.setItem("performanceData", this.performanceData)
this.cs.openPerformanceevaluation();
}else{
let msg: string = this.ts.trPK("userProfile", "no-appraisal");
this.cs.presentAlert(msg);
else {
console.log('3-'+user);
}
});
}
}
public ChangeImage() {
this.cs.openChangeImagePage();
}
}
}

@ -1,153 +1,539 @@
<app-generic-header
showBack="true"
[headerText]="'userProfile, title' | translate">
<app-generic-header showBack="true" [headerText]="'userProfile,title' | translate">
</app-generic-header>
<ion-content class="colorBG">
<div class="header-div">
<div class="centerDiv homeBox">
<div class="centerDiv homeBox">
<!-- <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 class="header-background-style-card">
</div>
<div [ngClass]="direction == 'ltr' ? 'result-graph' : 'result-graph-ar'" style="margin-top: -50px;">
<div class="user-info">
<div class="user-image-container">
<div class="user-image">
<img [ngClass]="direction == 'ltr'? 'img':'img-ar' "
[src]="personalInfo?.EMPLOYEE_IMAGE ? 'data:image/png;base64,'+personalInfo.EMPLOYEE_IMAGE : '../assets/imgs/profile.png'"
alt="Team Member Image" />
</div>
<div [ngClass]=" direction == 'ltr' ? 'changeImgBtn' : 'changeImgBtn-ar'">
<button ion-button icon-only menuToggle class="menubutton">
<img class="changeIcon" src="../assets/imgs/edit-image.svg">
</button>
</div>
</div>
<div style="margin-top: 18px;">
<h1>{{User_name_Emp}}</h1>
<span>{{personalInfo?.EMPLOYEE_EMAIL_ADDRESS}}</span>
</div>
<div>
<ion-row>
<ion-col style="border-right: 1px solid rgb(221 221 221);">
<p style="font-size: 12px; color: rgb(128, 124, 124);">{{ts.trPK('userProfile','role')}}</p>
<span class="Boldtext">{{personalInfo?.JOB_NAME}}</span>
</ion-col>
<ion-col>
<p style="font-size: 12px; color: rgb(128, 124, 124);">{{ts.trPK('userProfile','empNo')}}</p>
<span class="Boldtext">{{personalInfo?.EMPLOYEE_NUMBER}}</span>
</ion-col>
</ion-row>
</div>
</div>
<div [ngClass]=" direction == 'ltr' ? 'changeImgBtn' : 'changeImgBtn-ar'">
<button ion-button icon-only menuToggle class="menubutton" (click)="ChangeImage()">
<!-- <ion-icon (click)="ChangeImage();" class="changeIcon" name="md-create"></ion-icon> -->
<img (click)="ChangeImage();" class="changeIcon" src="../assets/imgs/edit-image.svg">
</button>
<div class="user-actions">
<ion-row class="ion-justify-content-center">
<ion-col [size]="4" (click)="selectedSegment('personal')">
<div class="action-button col-button">
<img style="width: 50px;" src="../assets/imgs/check_padding.png">
<span>{{ts.trPK('general','personal-info')}}</span>
</div>
</ion-col>
<ion-col [size]="4" (click)="selectedSegment('basic')">
<div class="action-button col-button">
<img style="width: 50px;" src="../assets/imgs/check_padding.png">
<span>{{ts.trPK('general','basic-details')}}</span>
</div>
</ion-col>
<ion-col [size]="4" (click)="selectedSegment('address')">
<div class="action-button col-button">
<img style="width: 50px;" src="../assets/imgs/check_padding.png">
<span>{{ts.trPK('userProfile','address')}} </span>
</div>
</ion-col>
</ion-row>
</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-grid *ngIf="personalInfo" [ngClass]="direction === 'ltr'? 'grid-card':'grid-card-ar' ">
<div [ngClass]=" direction == 'ltr' ? 'gridService-en' : 'gridService-ar'"
style="background: #002948; border-radius: 0px 0px 10px 10px;">
<ion-row>
<ion-col>
<label
style="font-size: 12px; color: white; margin: 10px 0px 0px 0px; display: block; text-align: center;font-weight: bold;">
{{ 'general, appreciate-service' | translate}}
</label>
</ion-col>
</ion-row>
<ion-row [ngClass]=" direction == 'ltr' ? 'service-row-en' : 'service-row-ar'">
<ion-col [ngClass]=" direction == 'ltr' ? 'columns' : 'columns-ar'">
<ion-grid>
<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-col class="text-years">
<label [ngClass]=" direction == 'ltr' ? 'service' : 'service-ar'">{{personalInfo.SERVICE_YEARS}}
{{ts.trPK('userProfile','years')}}</label>
<!-- <label [ngClass]=" direction == 'ltr' ? 'services' : 'services-ar'">{{ts.trPK('userProfile','years')}}</label> -->
</ion-col>
</ion-row>
</ion-grid>
</ion-col>
<ion-col [ngClass]=" direction == 'ltr' ? 'columns' : 'columns-ar'">
<ion-grid>
<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-col class="text-years">
<label [ngClass]=" direction == 'ltr' ? 'service' : 'service-ar'">{{personalInfo.SERVICE_MONTHS}}
{{ts.trPK('userProfile','months')}}</label>
<!-- <label [ngClass]=" direction == 'ltr' ? 'services' : 'services-ar'">{{ts.trPK('userProfile','months')}}</label> -->
</ion-col>
</ion-row>
</ion-grid>
</ion-col>
<ion-col [ngClass]=" direction == 'ltr' ? 'columns' : 'columns-ar'">
<ion-grid>
<ion-row>
<label class="rowBolds"></label>
<ion-col class="text-years">
<label [ngClass]=" direction == 'ltr' ? 'service' : 'service-ar'">{{personalInfo.SERVICE_DAYS}}
{{ts.trPK('absenceList','days')}}</label>
<!-- <label [ngClass]=" direction == 'ltr' ? 'services' : 'services-ar'">{{ts.trPK('absenceList','days')}}</label> -->
</ion-col>
</ion-row>
</ion-col>
</ion-row>
</ion-grid>
</ion-col>
</ion-row>
</div>
</ion-grid>
</div>
<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>
<br>
<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-card *ngIf="personalInfoSegment">
<ion-card-content>
<ion-label>
<h1 style="color: black;">{{ts.trPK('userProfile','personal-informaion')}}</h1>
</ion-label>
<br>
<ion-label>
<h3>{{ts.trPK('userProfile','category')}}</h3>
</ion-label>
<h3 style="font-weight: bold;">part-time</h3>
<br>
<ion-label>
<h3>{{ts.trPK('userProfile','address')}}</h3>
</ion-label>
<h3 style="font-weight: bold;">DR.Sulaiman Alhabib Medical Group</h3>
<br>
<ion-label>
<h3>{{ts.trPK('userProfile','phone-no')}}</h3>
</ion-label>
<h3 style="font-weight: bold;">0567845661</h3>
<br>
<ion-label>
<h3>{{ts.trPK('userProfile','busG')}}</h3>
</ion-label>
<h3 style="font-weight: bold;">CORP Cloud Solutions</h3>
<br>
<ion-label>
<h3>{{ts.trPK('userProfile','payrol')}}</h3>
</ion-label>
<h3 style="font-weight: bold;">Cloud Solutions Payroll</h3>
<br>
</ion-card-content>
</ion-card>
<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-card *ngIf="basicDetailsSegment">
<ion-card-content *ngIf="!editBasic">
<ion-grid>
<ion-row>
<ion-col size="10">
<ion-label>
<h1 style="color: black;">{{ts.trPK('general','basic-details')}}</h1>
</ion-label>
</ion-col>
<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-col size="2">
<img style="width: 70%;border: 1px solid;border-radius: 15px;" src="../assets/imgs/edit_icon.png"
(click)="allowEdit(1)">
</ion-col>
</ion-row>
</ion-grid>
<br>
<ion-label>
<h3>{{ts.trPK('general','full-name')}}</h3>
</ion-label>
<h3 style="font-weight: bold;">ENAD HILAL NASSER MOHAMMED</h3>
<br>
<ion-label>
<h3>{{ts.trPK('general','marital-status')}}</h3>
</ion-label>
<h3 style="font-weight: bold;">Married</h3>
<br>
<ion-label>
<h3>{{ts.trPK('general','birth_date')}}</h3>
</ion-label>
<h3 style="font-weight: bold;">01-FEB-1991</h3>
<br>
<ion-label>
<h3>{{ts.trPK('general','civil-identity-number')}}</h3>
</ion-label>
<h3 style="font-weight: bold;">2093486013</h3>
<br>
</ion-card-content>
<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-card-content *ngIf="editBasic">
<ion-label>
<h1 style="color: black;">{{ts.trPK('general','basic-details')}}</h1>
</ion-label>
<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-label>
<h3>{{ts.trPK('general','effective-date')}}</h3>
</ion-label>
<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>
<ion-item lines="none" class="item-input-login" style="--background: white">
<ion-label>MMMM</ion-label>
<ion-datetime displayFormat="MMMM" value="2012-12-15T13:47:20.789"></ion-datetime>
</ion-item>
<br>
</div>
<ion-item lines="none" class="item-input-login" style="--background: white">
<ion-label>{{ts.trPK('general','title')}}</ion-label>
<ion-select placeholder="Select One">
<ion-select-option value="mr">Mr</ion-select-option>
<ion-select-option value="ms">Miss</ion-select-option>
</ion-select>
</ion-item>
<br>
<ion-item lines="none" class="item-input-login" style="--background: white">
<ion-label position="floating">{{ts.trPK('userProfile','family-name')}}</ion-label>
<ion-input class="login-input" type="text"></ion-input>
</ion-item>
<br>
<ion-item lines="none" class="item-input-login" style="--background: white">
<ion-label position="floating">{{ts.trPK('userProfile','preferred-name')}}</ion-label>
<ion-input class="login-input" type="text"></ion-input>
</ion-item>
<br>
<ion-item lines="none" class="item-input-login" style="--background: white">
<ion-label position="floating">{{ts.trPK('userProfile','previous-family-name')}}</ion-label>
<ion-input class="login-input" type="text"></ion-input>
</ion-item>
<br>
<ion-item lines="none" class="item-input-login" style="--background: white">
<ion-label position="floating">{{ts.trPK('userProfile','father-name')}}</ion-label>
<ion-input class="login-input" type="text"></ion-input>
</ion-item>
<br>
<ion-item lines="none" class="item-input-login" style="--background: white">
<ion-label position="floating">{{ts.trPK('userProfile','grand-father-name')}}</ion-label>
<ion-input class="login-input" required type="text"></ion-input>
</ion-item>
<br>
<ion-item lines="none" class="item-input-login" style="--background: white">
<ion-label position="floating">{{ts.trPK('userProfile','arabic-first-name')}}</ion-label>
<ion-input class="login-input" type="text"></ion-input>
</ion-item>
<ion-item lines="none" class="item-input-login" style="--background: white">
<ion-label position="floating">{{ts.trPK('userProfile','arabic-father-name')}}</ion-label>
<ion-input class="login-input" type="text"></ion-input>
</ion-item>
<ion-item lines="none" class="item-input-login" style="--background: white">
<ion-label position="floating">{{ts.trPK('userProfile','arabic-grand-father-name')}}</ion-label>
<ion-input class="login-input" type="text"></ion-input>
</ion-item>
</ion-card-content>
</ion-card>
<ion-card>
<ion-card-content *ngIf="editBasic">
<ion-label>
<h1 style="color: black;">{{ts.trPK('general','other')}}</h1>
</ion-label>
<ion-item lines="none" class="item-input-login" style="--background: white">
<ion-label>{{ts.trPK('general','gender')}}</ion-label>
<ion-select placeholder="Select One">
<ion-select-option value="m">Male</ion-select-option>
<ion-select-option value="f">Female</ion-select-option>
</ion-select>
</ion-item>
<br>
<ion-item lines="none" class="item-input-login" style="--background: white">
<ion-label>{{ts.trPK('general','marital-status')}}</ion-label>
<ion-select placeholder="Select One">
<ion-select-option value="s">Singal</ion-select-option>
<ion-select-option value="m">Married</ion-select-option>
</ion-select>
</ion-item>
<br>
<ion-item lines="none" class="item-input-login" style="--background: white">
<ion-label>{{ts.trPK('general','nationality')}}</ion-label>
<ion-select placeholder="Select One">
<ion-select-option value="mr">Mr</ion-select-option>
<ion-select-option value="ms">Miss</ion-select-option>
</ion-select>
</ion-item>
<br>
<ion-item lines="none" class="item-input-login" style="--background: white">
<ion-label>{{ts.trPK('general','religion')}}</ion-label>
<ion-select placeholder="Select One">
<ion-select-option value="i">Islam</ion-select-option>
<ion-select-option value="o">Other</ion-select-option>
</ion-select>
</ion-item>
<br>
<ion-item lines="none" class="item-input-login" style="--background: white">
<ion-label>{{ts.trPK('general','education-level')}}</ion-label>
<ion-select placeholder="Select One">
<ion-select-option value="u">University</ion-select-option>
<ion-select-option value="o">other</ion-select-option>
</ion-select>
</ion-item>
<br>
</ion-card-content>
</ion-card>
<ion-card *ngIf="addressSegment">
<ion-card-content *ngIf="!editAddress">
<ion-grid>
<ion-row>
<ion-col size="10">
<ion-label>
<h1 style="color: black;">{{ts.trPK('general','main-address')}}</h1>
</ion-label>
</ion-col>
<ion-col size="2">
<img style="width: 70%;border: 1px solid;border-radius: 15px;" src="../assets/imgs/edit_icon.png"
(click)="allowEdit(2)">
</ion-col>
</ion-row>
</ion-grid>
<br>
<ion-label>
<h3>{{ts.trPK('general','address')}}</h3>
</ion-label>
<h3 style="font-weight: bold;">Riyadh</h3>
<br>
<ion-label>
<h3>{{ts.trPK('general','street')}}</h3>
</ion-label>
<h3 style="font-weight: bold;">-</h3>
<br>
<ion-label>
<h3>{{ts.trPK('general','area')}}</h3>
</ion-label>
<h3 style="font-weight: bold;">-</h3>
<br>
<ion-label>
<h3>{{ts.trPK('general','p-o-box')}}</h3>
</ion-label>
<h3 style="font-weight: bold;">22617</h3>
<br>
<ion-label>
<h3>{{ts.trPK('general','city')}}</h3>
</ion-label>
<h3 style="font-weight: bold;">Riyadh</h3>
<br>
<ion-label>
<h3>{{ts.trPK('general','postal-code')}}</h3>
</ion-label>
<h3 style="font-weight: bold;">11416</h3>
<br>
</ion-card-content>
<ion-card-content *ngIf="editAddress">
<ion-label>
<h1 style="color: black;">{{ts.trPK('general','address')}}</h1>
</ion-label>
<ion-label>
<h3>{{ts.trPK('general','effective-date')}}</h3>
</ion-label>
<ion-item lines="none" class="item-input-login" style="--background: white">
<ion-label>MMMM</ion-label>
<ion-datetime displayFormat="MMMM" value="2012-12-15T13:47:20.789"></ion-datetime>
</ion-item>
<br>
<ion-item lines="none" class="item-input-login" style="--background: white">
<ion-label>{{ts.trPK('general','nationality')}}</ion-label>
<ion-select placeholder="Select One">
<ion-select-option value="mr">Mr</ion-select-option>
<ion-select-option value="ms">Miss</ion-select-option>
</ion-select>
</ion-item>
<br>
<ion-item lines="none" class="item-input-login" style="--background: white">
<ion-label position="floating">{{ts.trPK('userProfile','address')}}</ion-label>
<ion-input class="login-input" type="text"></ion-input>
</ion-item>
<br>
<ion-item lines="none" class="item-input-login" style="--background: white">
<ion-label position="floating">{{ts.trPK('userProfile','street')}}</ion-label>
<ion-input class="login-input" type="text"></ion-input>
</ion-item>
<br>
<ion-item lines="none" class="item-input-login" style="--background: white">
<ion-label position="floating">{{ts.trPK('userProfile','area')}}</ion-label>
<ion-input class="login-input" type="text"></ion-input>
</ion-item>
<br>
<ion-item lines="none" class="item-input-login" style="--background: white">
<ion-label position="floating">{{ts.trPK('userProfile','p-o-box')}}</ion-label>
<ion-input class="login-input" type="text"></ion-input>
</ion-item>
<br>
<ion-item lines="none" class="item-input-login" style="--background: white">
<ion-label position="floating">{{ts.trPK('userProfile','city')}}</ion-label>
<ion-input class="login-input" type="text"></ion-input>
</ion-item>
<br>
<ion-item lines="none" class="item-input-login" style="--background: white">
<ion-label position="floating">{{ts.trPK('userProfile','postal-code')}}</ion-label>
<ion-input class="login-input" type="text"></ion-input>
</ion-item>
</ion-card-content>
</ion-card>
<!-- <div class="header-div">
<div>
<div class="centerDiv homeBox">
<img class="profileImg" [src]="user_image">
</div>
<div *ngIf="personalInfo">
<p class="empName">{{User_name_Emp}}</p>
<p class="empJob"> {{User_Job_name}}</p>
</div>
</div>
<!-- </ion-card-content> -->
<!-- </ion-card> -->
</div>
</div>
<ion-grid *ngIf="personalInfo" style="position: relative; display: block; z-index: 5;">
<div [ngClass]=" direction == 'ltr' ? 'gridService-en' : 'gridService-ar'" style="background: #0B4775; border-radius: 20px;">
<ion-row>
<ion-col>
<label style="font-size: 12px; color: white; margin: 10px 0px 0px 0px; display: block; text-align: center;font-weight: bold;">
{{ 'general, appreciate-service' | translate}}
</label>
</ion-col>
</ion-row>
<ion-row [ngClass]=" direction == 'ltr' ? 'service-row-en' : 'service-row-ar'">
<ion-col [ngClass]=" direction == 'ltr' ? 'columns' : 'columns-ar'">
<ion-grid>
<ion-row style="text-align:center">
<ion-col>
<label [ngClass]=" direction == 'ltr' ? 'service' : 'service-ar'">{{personalInfo.SERVICE_YEARS}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<label [ngClass]=" direction == 'ltr' ? 'services' : 'services-ar'">{{ts.trPK('userProfile','years')}}</label>
</ion-col>
</ion-row>
</ion-grid>
</ion-col>
<ion-col>
<div class="verticalLine"></div>
</ion-col>
<ion-col [ngClass]=" direction == 'ltr' ? 'columns' : 'columns-ar'">
<ion-grid>
<ion-row style="text-align:center">
<ion-col>
<label [ngClass]=" direction == 'ltr' ? 'service' : 'service-ar'">{{personalInfo.SERVICE_MONTHS}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<label [ngClass]=" direction == 'ltr' ? 'services' : 'services-ar'">{{ts.trPK('userProfile','months')}}</label>
</ion-col>
</ion-row>
</ion-grid>
</ion-col>
<ion-col>
<div class="verticalLine"></div>
</ion-col>
<ion-col [ngClass]=" direction == 'ltr' ? 'columns' : 'columns-ar'">
<ion-grid>
<ion-row style="text-align:center">
<ion-col>
<label [ngClass]=" direction == 'ltr' ? 'service' : 'service-ar'">{{personalInfo.SERVICE_DAYS}}</label>
</ion-col>
<ion-col>
<label [ngClass]=" direction == 'ltr' ? 'services' : 'services-ar'">{{ts.trPK('absenceList','days')}}</label>
</ion-col>
</ion-row>
</ion-grid>
</ion-col>
</ion-row>
</div>
</ion-grid>
<div class="list">
<ion-list class="list-ios">
<div class="p">
<p>{{ts.trPK('userProfile','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 [ngClass]=" direction == 'ltr' ? 'arrow' : 'arrow-ar'" 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 [ngClass]=" direction == 'ltr' ? 'arrow' : 'arrow-ar'" name="arrow-forward" item-right></ion-icon>
</ion-item>
</ion-list>
</div> -->
<ion-footer *ngIf="editBasic||editAddress">
<ion-grid>
<ion-row>
<ion-col>
<ion-button style="--background: #f44336; background: white; width: 100%;" (click)="disableEdit(1)">Cancel
</ion-button>
</ion-col>
<ion-col>
<ion-button style="--background: #46da59; background: white; width: 100%;" (click)="presentModal()">Update</ion-button>
</ion-col>
</ion-row>
</ion-grid>
</ion-footer>
</ion-content>

File diff suppressed because it is too large Load Diff

@ -1,45 +1,68 @@
import { Component, OnInit } from '@angular/core';
import { Platform, Events, MenuController, ModalController } 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 { Events } from '@ionic/angular';
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 { EditDetailProfileComponent } from '../modal/edit-detail-profile/edit-detail-profile.component';
@Component({
selector: 'app-home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.scss']
})
export class HomeComponent implements OnInit {
personalInfo: any;
setImage:any;
imageSrc: any = '../assets/imgs/profile.png';
User_name_Emp: string = '';
User_Job_name: string;
public direction: string;
// user_image: any = "../assets/imgs/profile.png";
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';
public personalInfoSegment = true;
public basicDetailsSegment = false;
public addressSegment = false;
public editBasic = false;
public editAddress = false;
constructor(
public ts: TranslatorService,
public cs: CommonService,
public authService: AuthenticationService,
private events: Events,
public DS: DashboredService,
public sharedData: SharedDataService,
public events: Events,
private sanitizer: DomSanitizer,
public modalController: ModalController
// private events: Events,
// private sanitizer: DomSanitizer,
) {
this.direction = TranslatorService.getCurrentDirection();
this.events.subscribe('img-change', displayImg => {
// alert("1 - profile home : "+displayImg);
//this.user_image = "data:image/png;base64"+displayImg;
this.setImage = this.sanitizer.bypassSecurityTrustUrl('data:Image/*;base64,'+displayImg);
this.imageSrc = this.sanitizer.bypassSecurityTrustUrl('data:Image/*;base64,'+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
@ -47,28 +70,122 @@ export class HomeComponent implements OnInit {
.subscribe((user: AuthenticatedUser) => {
if (user) {
this.personalInfo = user;
console.log('name: '+ this.personalInfo.EMPLOYEE_NAME);
console.log('user name: '+ user.EMPLOYEE_NAME);
if(this.cs.getUpdateImage().status){
// this.imageSrc = this.sanitizer.bypassSecurityTrustUrl("data:Image/*;base64,"+this.cs.getUpdateImage().img);
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
: this.imageSrc;
console.log('2-'+user);
}
}
else {
console.log('3-'+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(user);
console.log(this.personalInfo);
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);
public ChangeImage() {
this.cs.openChangeImagePage();
});
}
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: parseInt(this.appraisalArr[i].APPRAISAL_SCORE).toFixed() });
}
console.log('PerformanceAppraisalResponse');
this.sharedData.setSharedData(this.performanceData, PerformanceAppraisalResponse.PERFORMANCE_DATA);
//localStorage.setItem("performanceData", this.performanceData)
this.cs.openPerformanceevaluation();
} else {
let msg: string = this.ts.trPK("userProfile", "no-appraisal");
this.cs.presentAlert(msg);
}
}
}
selectedSegment(segmentData){
switch (segmentData){
case "personal":
this.personalInfoSegment = true;
this.basicDetailsSegment = false;
this.addressSegment = false;
this.editBasic = false;
this.editAddress = false;
break;
case "basic":
this.personalInfoSegment = false;
this.basicDetailsSegment = true;
this.addressSegment = false;
this.editBasic = false;
this.editAddress = false;
break;
case "address":
this.personalInfoSegment = false;
this.basicDetailsSegment = false;
this.addressSegment = true;
this.editBasic = false;
this.editAddress = false;
break;
}
}
allowEdit(allowVal){
switch(allowVal){
case 1:
this.editBasic = true;
break;
case 2:
this.editAddress = true;
break;
}
}
disableEdit(disableVal){
switch(disableVal){
case 1:
this.editBasic = false;
break;
case 2:
this.editAddress = false;
break;
}
}
async presentModal() {
const modal = await this.modalController.create({
component: EditDetailProfileComponent,
cssClass: 'my-custom-modal-css'
});
return await modal.present();
}
}

@ -0,0 +1,39 @@
<ion-content padding>
<ion-label padding>
<h2 style=" font-weight: bold; color: black; font-size: 20px;">
{{ts.trPK('general','type-of-change')}}</h2>
</ion-label>
<ion-list>
<ion-radio-group value="1">
<ion-item lines="none">
<ion-label >
<h3 style="color: black; font-size: 20px; white-space: break-spaces !important">{{ts.trPK('general','correct-or-complete')}}</h3></ion-label>
<ion-radio slot="start" color="secondary" mode='md' value="1"></ion-radio>
</ion-item>
<ion-item lines="none">
<ion-label>
<h3 style="color: black; font-size: 20px; white-space: break-spaces !important">{{ts.trPK('general','new-info')}}</h3>
</ion-label>
<ion-radio slot="start" color="secondary" mode='md' value="2"></ion-radio>
</ion-item>
</ion-radio-group>
</ion-list>
<ion-footer>
<ion-grid>
<ion-row>
<ion-col>
<ion-button style=" width: 90%; background: white; --background: #b4b4b4">{{ts.trPK('userProfile','cancel-text')}}</ion-button>
</ion-col>
<ion-col>
<ion-button style=" width: 90%; background: white; --background: #269db8">{{ts.trPK('general','next')}}</ion-button>
</ion-col>
</ion-row>
</ion-grid>
</ion-footer>
</ion-content>

@ -0,0 +1,27 @@
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { EditDetailProfileComponent } from './edit-detail-profile.component';
describe('EditDetailProfileComponent', () => {
let component: EditDetailProfileComponent;
let fixture: ComponentFixture<EditDetailProfileComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ EditDetailProfileComponent ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(EditDetailProfileComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,30 @@
import { Component, OnInit } from '@angular/core';
import { ModalController } from '@ionic/angular';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
@Component({
selector: 'app-edit-detail-profile',
templateUrl: './edit-detail-profile.component.html',
styleUrls: ['./edit-detail-profile.component.scss'],
})
export class EditDetailProfileComponent implements OnInit {
constructor(
public modalController: ModalController,
public ts: TranslatorService,
) { }
colorRadio = "#269db8"
ngOnInit() {}
dismiss() {
// using the injected ModalController this page
// can "dismiss" itself and optionally pass back data
this.modalController.dismiss({
'dismissed': true
});
}
}

@ -15,6 +15,7 @@ import {EditProfileComponent} from './edit-profile/edit-profile.component';
import {ProfileImageComponent} from './profile-image/profile-image.component'
import {PerformanceEvaluationComponent} from './performance-evaluation/performance-evaluation.component'
import { from } from 'rxjs';
import { EditDetailProfileComponent } from './modal/edit-detail-profile/edit-detail-profile.component';
const routes: Routes = [
{
@ -70,9 +71,9 @@ const routes: Routes = [
IonicModule,
HmgCommonModule,
NgxChartsModule,
RouterModule.forChild(routes)
],
declarations: [ProfilePage , HomeComponent,ProfileImageComponent,EditProfileComponent,PerformanceEvaluationComponent]
declarations: [ProfilePage ,EditDetailProfileComponent, HomeComponent,ProfileImageComponent,EditProfileComponent,PerformanceEvaluationComponent],
entryComponents:[EditDetailProfileComponent]
})
export class ProfilePageModule {}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

@ -38,8 +38,8 @@
"ar": "هل أنت متأكد من إغلاق الحساب"
},
"forgot-id": {
"en": "Forgot Patient ID",
"ar": "نسيت رقم الملف"
"en": "Forgot Employee ID",
"ar": "نسيت رقم الموظف"
},
"forgot-password": {
"en": "Forgot Password",
@ -62,12 +62,12 @@
"ar": "كشف بالراتب"
},
"forgot-your-id": {
"en": "Forgot Your Patient ID",
"ar": "هل نسيت رقم ملف المريض"
"en": "Forgot Your Employee ID",
"ar": "هل نسيت رقمك الوظيفي"
},
"forgot-desc": {
"en": "Enter your mobile number to receive your patient file number via SMS",
"ar": "أدخل رقم جوالك لاستلام رقم الملف الخاص بك عن طريق الرسائل النصية"
"en": "Enter your mobile number to receive your ID number via SMS",
"ar": "أدخل رقم جوالك لاستلام الرقم الوظيفي الخاص بك عن طريق الرسائل النصية"
},
"enter-email": {
"en": "Please you need to enter your email",
@ -98,8 +98,8 @@
"ar": "دخول / تسجيل"
},
"id-or-file": {
"en": "ID or File No",
"ar": "هوية أو رقم الملف"
"en": "Employee ID ",
"ar": "الرقم الوظيفي"
},
"national-id-or-iqama": {
"en": "National ID or Iqama",
@ -122,12 +122,12 @@
"ar": "الرجاء التحقق من تسجيل الدخول باستخدام أحد هذه الخيارات"
},
"verify-with-fingerprint": {
"en": "Verify with fingerprint",
"ar": "تحقق باستخدام بصمة"
"en": "Verify with fingerprint",
"ar": "تحقق باستخدام بصمة الإصبع"
},
"verify-with-faceid": {
"en": "Verify with face ID",
"ar": "تحقق باستخدام معرف الوجه"
"en": "Verify with face ID",
"ar": "تحقق باستخدام بصمة الوجه"
},
"verify-with-sms": {
"en": "Verify with SMS",
@ -142,12 +142,12 @@
"ar": ":آخر تسجيل دخول"
},
"last-login-with": {
"en": "Last login using:",
"ar": "آخر تسجيل دخول مع"
"en": "Last login using:",
"ar": "آخر تسجيل دخول بإستخدام"
},
"biometric-support": {
"en": "It seems that your phone is supporting biometric feature, do you want login with with biometric?",
"ar": "يبدو أن هاتفك يدعم ميزة البيومترية ، هل تريد تسجيل الدخول باستخدام البيومترية؟"
"en": "It seems that your phone is supporting biometric feature, do you want login with biometric?",
"ar": "يبدو أن هاتفك يدعم ميزة البصمة ، هل تريد تسجيل الدخول باستخدام البصمة؟"
},
"verify-fingerprint": {
"en": "To activate fingerprint login service, please verify by using one of the following options. ",
@ -361,6 +361,10 @@
"en": "Nationality",
"ar": "الجنسية"
},
"religion":{
"en":"Religion",
"ar":"الديانة"
},
"empty": {
"en": "Sorry no data avaiable",
"ar": "لا يوجد بيانات"
@ -427,7 +431,7 @@
},
"other": {
"en": "Other",
"ar": "أخري"
"ar": "أخرى"
},
"provide-missing": {
"en": "Please provide required information",
@ -666,8 +670,8 @@
"ar": "إستخدم الرقم التعريفي"
},
"auth-please": {
"en": "Please Authenticated",
"ar": "عرف نفسك"
"en": "Please Authenticated",
"ar": "عرف نفسك"
},
"dial-code": {
"en": "Dial Code",
@ -727,7 +731,7 @@
},
"send-email-short": {
"en": "Email",
"ar": "بريد"
"ar": "بريد إلكتروني"
},
"hi": {
"en": "HI",
@ -742,8 +746,8 @@
"ar": "تمت مزامنة البيانات بنجاح"
},
"already-synced": {
"en": "Latest data already synced",
"ar": "أحدث البيانات المتزامنة بالفعل"
"en": "Latest data has already been synced",
"ar": "تمت مزامنة أحدث البيانات مسبقاً"
},
"weekly": {
"en": "Weekly",
@ -774,8 +778,8 @@
"ar": "الخطوات المغطاة"
},
"hours-asleep": {
"en": "Time asleep in hours",
"ar": "الوقت نائم في ساعات"
"en": "Time asleep in hours",
"ar": "وقت النوم بالساعات"
},
"bad": {
"en": "Bad",
@ -910,8 +914,8 @@
"ar": "فشل التحقق ، يرجى زيارة أقرب مكتب استقبال في الفرع"
},
"forget-wifi-connection-text": {
"en": "Invalid Wi-Fi configuration exists with 'HMG-MOHEMM', please forget the Wi-Fi from settings.",
"ar": "فشل الاتصال بشبكة 'HMG-MOHEMM' الرجاء اختيار نسيت الاتصال من اعدادت الشبكة"
"en": "Invalid Wi-Fi configuration exists with 'HMG-MOHEMM', please forget the network from settings.",
"ar": "الرجاء اختيار نسيان الشبكه من اعدادت الشبكة 'HMG-MOHEMM'فشل الاتصال بشبكة "
},
"qr-text": {
"en": "QR Code",
@ -943,7 +947,7 @@
},
"wifi-connect-message": {
"en": "Connecting",
"ar": "توصيل"
"ar": "جاري الإتصال"
},
"success-attendance": {
"en": "Your attendance is marked successfully.",
@ -956,6 +960,50 @@
"appreciate-service": {
"en": "We appreciate you for completing the service of",
"ar": "نحن نقدر لك استكمال خدمة"
},
"basic-details":{
"en":"Basic Details",
"ar":"المعلومات الاساسية"
},
"full-name":{
"en":"Full Name",
"ar":"الاسم كامل"
},
"marital-status":{
"en":"Marital Status",
"ar":"الاحالة الاجتماعية"
},
"civil-identity-number":{
"en":"Civil identity number",
"ar":"رقم الهوية المدنية"
},
"effective-date":{
"en":"Effective Date",
"ar":"تاريخ الفعالية "
},
"gender":{
"en":"Gender",
"ar":"النوع"
},
"education-level":{
"en":"Education Level",
"ar":"المستوى التعليمي"
},
"main-address":{
"en":"Main Address",
"ar":"العنوان الرئيسي"
},
"correct-or-complete":{
"en":"correct or complete the current details",
"ar":"تعديل او اكمال التفاصيل الحالية"
},
"new-info":{
"en":"enter new Information because of a real change to the current details (e.g because of a change in marital status)",
"ar":"أدخل معلومات جديدة بسبب تغيير حقيقي في التفاصيل الحالية (على سبيل المثال بسبب تغيير في الحالة الاجتماعية)"
},
"type-of-change":{
"en":" Select the type of change you want to make.",
"ar":" حدد نوع التغيير الذي تريد القيام به."
}
},
"home": {
@ -988,8 +1036,8 @@
"ar": "طلبات قيد الانتظار"
},
"missing-swipes": {
"en": "Missing Swipes",
"ar": "فقدان البصمة"
"en": "Missing Swipes",
"ar": "تسجيل بصمة حضور سابقة "
},
"leave-balance": {
"en": "Leave Balance",
@ -1054,8 +1102,8 @@
},
"work-list": {
"open-analysis": {
"en": "Open Request Analysis",
"ar": "فتح تحليل الطلب"
"en": "Open Request Analysis",
"ar": "تحليل الطلبات المفتوحة"
},
"total": {
"en": "Total",
@ -1078,8 +1126,8 @@
"ar": "بحث متقدم"
},
"No-data-available": {
"en": "No History Available",
"ar": "لا يوجد محفوظات متاحة"
"en": "No History Available",
"ar": "لايوجد سجل بيانات سابقة "
}
},
"userProfile": {
@ -1095,6 +1143,54 @@
"en": "Edit Profile",
"ar": "تعديل المعلومات"
},
"ServiceType": {
"en": "Service Type",
"ar": "نوع الخدمة"
},
"DeptName": {
"en": "Department Name",
"ar": "اسم القسم"
},
"refrence": {
"en": "Tiket Reference",
"ar": "مرجع التذكره"
},
"section": {
"en": "Section",
"ar": " القسم"
},
"topic": {
"en": "Topic",
"ar": "العنوان"
},
"postedDate": {
"en": "Posted on",
"ar": "نشر في"
},
"RelatedSection": {
"en": "Related Section",
"ar": "قسم ذو صله"
},
"RelatedTopic": {
"en": "Related Topic",
"ar": "عنوان ذو صله"
},
"SupportingDocument": {
"en": "Supporting Document",
"ar": "ارفاق ملف"
},
"Description": {
"en": "Description",
"ar": "الوصف"
},
"MyHR-request": {
"en": "MY HR REQUEST",
"ar": "طلباتي"
},
"createHR-Request": {
"en": "CREATE HR REQUEST",
"ar": "انشاء طلب"
},
"performance-evaluation": {
"en": "Performance Evaluation",
"ar": "تقييم الاداء"
@ -1149,7 +1245,7 @@
},
"payrol": {
"en": "Payroll",
"ar": "المشروع"
"ar": "سجل الرواتب"
},
"orgEmail": {
"en": "Organization Email Address",
@ -1194,6 +1290,62 @@
"successChange": {
"en": "Profile Photo changed successfully ",
"ar": "تم تغيير الصورة الشخصية بنجاح"
},
"personal-informaion":{
"en":"Personal Informaion",
"ar":"المعلومات الشخصية"
},
"family-name":{
"en":"Family Name",
"ar":"اسم العائلة"
},
"preferred-name":{
"en":"Preferred Name",
"ar":"الاسم المفضل"
},
"previous-family-name":{
"en":"Previous Family Name",
"ar":"اسم العائلة السابق"
},
"father-name":{
"en":"Father Name<",
"ar":"اسم الاب"
},
"grand-father-name":{
"en":"GrandFather Name",
"ar":"اسم الجد"
},
"arabic-first-name":{
"en":"Arabic First Name",
"ar":"الاسم الاول بالعربي"
},
"arabic-father-name":{
"en":"Arabic Father Name",
"ar":"اسم الاب بالعربي"
},
"arabic-grand-father-name":{
"en":"Arabic GrandFather Name",
"ar":"اسم الجد بالعربي"
},
"street":{
"en":"Street",
"ar":"شارع"
},
"area":{
"en":"Area",
"ar":"المنطقة"
},
"p-o-box":{
"en":"P.O Box",
"ar":"صندوق البريد"
},
"city":{
"en":"City",
"ar":"المدينة"
},
"postal-code":{
"en":"Postal Code",
"ar":"الرمز البريدي"
}
},
"changePassword": {
@ -1263,7 +1415,7 @@
"vacation-rule": {
"vacationRule": {
"en": "Vacation Rule",
"ar": "الإنابة بالإجازات"
"ar": "الإنابة بالإجازات"
},
"apply-for-vacation-rule": {
"en": "Apply for vacation Rule",
@ -1342,8 +1494,8 @@
"ar": "التالى"
},
"notification-type": {
"en": "Notification Type",
"ar": "نوع إعلام"
"en": "Notification Type",
"ar": "نوع الإشعار"
},
"notification-tip": {
"en": "Indicate the <span class=\"boldTxtNav\">notification format </span>that will activate this rule",
@ -1439,7 +1591,7 @@
},
"confirmation": {
"en": "Confirmation",
"ar": "البريد الإلكتروني"
"ar": "تأكيد"
},
"rule-success": {
"en": "Rule created successfully",
@ -1455,11 +1607,11 @@
},
"confirm-msg-success": {
"en": "Are you sure, you want to Apply for Vacation Rule?",
"ar": " تريد التقديم على قواعد الاجازات ؟, هل انت متأكد"
"ar": " هل أنت متأكد من رغبتك في التقديم على قواعد الإجازات ؟"
},
"update-msg-success": {
"en": "Are you sure, you want to Update this Vacation Rule?",
"ar": "تريد تحديث قواعد الاجازات ؟, هل انت متأكد"
"ar": "هل أنت متأكد من رغبتك في تحديث قاعدة الإجازات هذه ؟"
}
},
"absenceList": {
@ -2342,23 +2494,23 @@
"ar": "رمز"
},
"itemReq": {
"en": "Items Requsted",
"en": "Requsted Items",
"ar": "العناصر المطلوبة"
},
"approveMsg": {
"en": "<p class=\"boldP\"> Are you sure to <span class=\"boldText\"> Approve </span>this request ?</p>",
"en": "Requsted Items",
"ar": "العناصر المطلوبة"
},
"rejectMsg": {
"en": "<p class=\"boldP\">Are you sure to <span class=\"boldText\"> Reject </span> this request ?</p>",
"en": "Requsted Items",
"ar": "العناصر المطلوبة"
},
"delMsg": {
"en": "<p class=\"boldP\">Are you sure to <span class=\"boldText\"> Delete </span> this request ?</p>",
"en": "Requsted Items",
"ar": "العناصر المطلوبة"
},
"closeMsg": {
"en": "<p class=\"boldP\">Are you sure to <span class=\"boldText\"> Close </span>this request ?</p>",
"en": "Requsted Items",
"ar": "العناصر المطلوبة"
},
"Supplier": {
@ -2921,7 +3073,7 @@
},
"shift-time": {
"en": "Shift Time",
"ar": "وقت التناوب"
"ar": "وقت المناوبة "
},
"shift-type": {
"en": "Shift Type",

@ -1585,4 +1585,4 @@ ion-segment-button {
background: #fff;
width: 75%;
margin: auto;
}
}

Loading…
Cancel
Save