diff --git a/Mohem/src/app/authentication/digital-id/digital-id.component.html b/Mohem/src/app/authentication/digital-id/digital-id.component.html index 5d4807eb..54e4d4fc 100644 --- a/Mohem/src/app/authentication/digital-id/digital-id.component.html +++ b/Mohem/src/app/authentication/digital-id/digital-id.component.html @@ -18,7 +18,7 @@

{{userInfo.EMPLOYEE_DISPLAY_NAME}}

-

{{userInfo.JOB_NAME}}

+

{{userJobName}}

@@ -50,7 +50,7 @@ -

{{userInfo.JOB_NAME}}

+

{{userJobName}}

diff --git a/Mohem/src/app/authentication/digital-id/digital-id.component.ts b/Mohem/src/app/authentication/digital-id/digital-id.component.ts index 9472fff8..ab17b063 100644 --- a/Mohem/src/app/authentication/digital-id/digital-id.component.ts +++ b/Mohem/src/app/authentication/digital-id/digital-id.component.ts @@ -9,6 +9,7 @@ import { TranslatorService } from 'src/app/hmg-common/services/translator/transl }) export class DigitalIdComponent implements OnInit { @Input() userInfo: any; + public userJobName: any; constructor( public modalCtrl: ModalController, @@ -20,6 +21,12 @@ export class DigitalIdComponent implements OnInit { this.userInfo = JSON.parse(localStorage.getItem('digitalIDUser')); } console.log(this.userInfo); + if (this.userInfo) { + let jobTitle = this.userInfo.POSITION_NAME.split('.'); + if (jobTitle && jobTitle.length > 1) { + this.userJobName = jobTitle[0] + " " + jobTitle[1]; + }​ + } } diff --git a/Mohem/src/app/hmg-common/ui/employee-information/employee-information.component.ts b/Mohem/src/app/hmg-common/ui/employee-information/employee-information.component.ts index 26b1ab47..9125f322 100644 --- a/Mohem/src/app/hmg-common/ui/employee-information/employee-information.component.ts +++ b/Mohem/src/app/hmg-common/ui/employee-information/employee-information.component.ts @@ -22,7 +22,13 @@ public direction: string; this.direction = TranslatorService.getCurrentLanguageName(); } - ngOnInit() {} + ngOnInit() { + console.log(this.title); + let jobTitle = this.title.split('.'); + if (jobTitle && jobTitle.length > 1) { + this.title = jobTitle[0] + " " + jobTitle[1]; + }​ + } getDetails() { this.onGetDetails.emit(); diff --git a/Mohem/src/app/mowadhafi/hr-request/hr-request.component.html b/Mohem/src/app/mowadhafi/hr-request/hr-request.component.html index 80f753d0..d201af44 100644 --- a/Mohem/src/app/mowadhafi/hr-request/hr-request.component.html +++ b/Mohem/src/app/mowadhafi/hr-request/hr-request.component.html @@ -19,13 +19,12 @@ {{EmpName}}

{{EmpEmail}}

-

{{ts.trPK('userProfile','role')}}

- {{EmpJob}} + {{EmpPosition}}
@@ -65,7 +64,7 @@

{{ts.trPK('userProfile','job')}}

-

{{EmpJob}}

+

{{EmpPosition}}

diff --git a/Mohem/src/app/mowadhafi/hr-request/hr-request.component.ts b/Mohem/src/app/mowadhafi/hr-request/hr-request.component.ts index baed17b0..149a8596 100644 --- a/Mohem/src/app/mowadhafi/hr-request/hr-request.component.ts +++ b/Mohem/src/app/mowadhafi/hr-request/hr-request.component.ts @@ -85,10 +85,19 @@ export class HRRequestComponent implements OnInit { this.EmpNum = result.MemberInformationList[0].EMPLOYEE_NUMBER; this.EmpGroup = result.MemberInformationList[0].BUSINESS_GROUP_NAME; this.EmpMobile = result.MemberInformationList[0].EMPLOYEE_MOBILE_NUMBER; - this.EmpJob = result.MemberInformationList[0].JOB_NAME; + // this.EmpJob = result.MemberInformationList[0].JOB_NAME; this.EmpOrgName = result.MemberInformationList[0].ORGANIZATION_NAME; this.EmpPayrol = result.MemberInformationList[0].PAYROLL_NAME; - this.EmpPosition = result.MemberInformationList[0].POSITION_NAME; + // this.EmpPosition = result.MemberInformationList[0].POSITION_NAME; + + let jobTitle = result.MemberInformationList[0].POSITION_NAME + jobTitle = jobTitle.split('.'); + if (jobTitle && jobTitle.length > 1) { + this.EmpPosition = jobTitle[0] + " " + jobTitle[1]; + }​ else { + this.EmpPosition = ''; + } + this.EmpEmail = result.MemberInformationList[0].EMPLOYEE_EMAIL_ADDRESS; this.EmpCatMeaning = result.MemberInformationList[0].EMPLOYMENT_CATEGORY_MEANING; this.EmpGRADENAME = result.MemberInformationList[0].GRADE_NAME; diff --git a/Mohem/src/app/my-team/details/details.component.html b/Mohem/src/app/my-team/details/details.component.html index 6123eb8f..f65b4100 100644 --- a/Mohem/src/app/my-team/details/details.component.html +++ b/Mohem/src/app/my-team/details/details.component.html @@ -32,13 +32,12 @@

{{employee.EMPLOYEE_NAME}}

-

{{ts.trPK('userProfile','role')}}

- {{employee.JOB_NAME}} + {{jobName}}

{{ts.trPK('userProfile','empNo')}}

@@ -505,7 +504,7 @@

{{ts.trPK('userProfile','job')}}

-

{{employee.JOB_NAME}}

+

{{jobName}}

{{ts.trPK('userProfile','payrol')}}

@@ -517,7 +516,7 @@
-->

{{ts.trPK('userProfile','position')}}

-

{{employee.POSITION_NAME}}

+

{{jobName}}

{{ts.trPK('userProfile','grade')}}

diff --git a/Mohem/src/app/my-team/details/details.component.ts b/Mohem/src/app/my-team/details/details.component.ts index 0a4a5311..4a2b0d4a 100644 --- a/Mohem/src/app/my-team/details/details.component.ts +++ b/Mohem/src/app/my-team/details/details.component.ts @@ -215,6 +215,8 @@ export class DetailsComponent implements OnInit { spaceBetween: 1 }; + public jobName: any; + constructor( public timeCardService: TimeCardService, public menuService: MenuService, @@ -235,15 +237,18 @@ export class DetailsComponent implements OnInit { this.showAttendanceTracking(); // tslint:disable-next-line: max-line-length this.currentMonthName = this.direction === 'en' ? this.common.getMonthName(this.monthIndex) : this.common.getMonthNameAr(this.monthIndex); - // this.getSuborinatesAttStatus(); - // this.getFavorit(); - - } showAttendanceTracking() { this.common.startLoading(); this.employee = this.common.sharedService.getSharedData(MyTeamService.EMPLOYEE_SHARED_DATA, false); + console.log(this.employee); + + let jobTitle = this.employee.POSITION_NAME.split('.'); + if (jobTitle && jobTitle.length > 1) { + this.jobName = jobTitle[0] + " " + jobTitle[1]; + }​ + const request = { P_SELECTED_EMPLOYEE_NUMBER: this.employee.EMPLOYEE_NUMBER }; diff --git a/Mohem/src/app/notification/work-list-details/work-list-details.component.html b/Mohem/src/app/notification/work-list-details/work-list-details.component.html index eefc7a43..3c25611b 100644 --- a/Mohem/src/app/notification/work-list-details/work-list-details.component.html +++ b/Mohem/src/app/notification/work-list-details/work-list-details.component.html @@ -38,7 +38,7 @@
- +
@@ -54,7 +54,7 @@ - + diff --git a/Mohem/src/app/notification/work-list-details/work-list-details.component.ts b/Mohem/src/app/notification/work-list-details/work-list-details.component.ts index 460148c8..2635ee81 100644 --- a/Mohem/src/app/notification/work-list-details/work-list-details.component.ts +++ b/Mohem/src/app/notification/work-list-details/work-list-details.component.ts @@ -44,6 +44,19 @@ export class WorkListDetailsComponent implements OnInit { this.handleNotificationBody(); } + public formatJobName(title: any) { + let jobName: any; + if (title) { + let jobTitle = title.split('.'); + if (jobTitle && jobTitle.length > 1) { + jobName = jobTitle[0] + " " + jobTitle[1]; + }​ + } else { + jobName = ''; + } + return jobName; + } + getsubmitterInfo(notificationSubmitterInfoObj) { this.worklistMainService.getSubmitterInfo(notificationSubmitterInfoObj). subscribe((result: WorklistsubmitterInfoResponse) => { diff --git a/Mohem/src/app/notification/worklist-main/worklist-main.component.html b/Mohem/src/app/notification/worklist-main/worklist-main.component.html index bcf24b29..ca1f329b 100644 --- a/Mohem/src/app/notification/worklist-main/worklist-main.component.html +++ b/Mohem/src/app/notification/worklist-main/worklist-main.component.html @@ -223,7 +223,7 @@
- +
@@ -239,7 +239,7 @@
- +
diff --git a/Mohem/src/app/notification/worklist-main/worklist-main.component.ts b/Mohem/src/app/notification/worklist-main/worklist-main.component.ts index 6d04874c..429f0f29 100644 --- a/Mohem/src/app/notification/worklist-main/worklist-main.component.ts +++ b/Mohem/src/app/notification/worklist-main/worklist-main.component.ts @@ -868,6 +868,19 @@ export class WorklistMainComponent implements OnInit { } } + public formatJobName(title: any) { + let jobName: any; + if (title) { + let jobTitle = title.split('.'); + if (jobTitle && jobTitle.length > 1) { + jobName = jobTitle[0] + " " + jobTitle[1]; + }​ + } else { + jobName = ''; + } + return jobName; + } + public checkLines(note) { if (note && note != null) { return (note.length > this.lines_note_limit) ? true : false; diff --git a/Mohem/src/app/profile/home/home.component.html b/Mohem/src/app/profile/home/home.component.html index 4114138f..7b87ba62 100644 --- a/Mohem/src/app/profile/home/home.component.html +++ b/Mohem/src/app/profile/home/home.component.html @@ -26,7 +26,7 @@

{{ts.trPK('userProfile','role')}}

- {{personalInfo.JOB_NAME}} + {{jobName}}

{{ts.trPK('userProfile','empNo')}}

diff --git a/Mohem/src/app/profile/home/home.component.ts b/Mohem/src/app/profile/home/home.component.ts index 626c7b98..36520a84 100644 --- a/Mohem/src/app/profile/home/home.component.ts +++ b/Mohem/src/app/profile/home/home.component.ts @@ -50,6 +50,8 @@ export class HomeComponent implements OnInit { public postalCode: any; public country: any; public employeeAdress: any = []; + public jobName: any; + constructor( public ts: TranslatorService, public cs: CommonService, @@ -143,6 +145,12 @@ export class HomeComponent implements OnInit { if (user) { console.log(user); this.personalInfo = user; + + let jobTitle = user.POSITION_NAME.split('.'); + if (jobTitle && jobTitle.length > 1) { + this.jobName = jobTitle[0] + " " + jobTitle[1]; + }​ + if (this.cs.getUpdateImage().status) { this.user_image = this.sanitizer.bypassSecurityTrustUrl('data:image/png;base64,' + this.cs.getUpdateImage().img); } else {