From 0928d551717d39d4ae04da6b36df07e34278a271 Mon Sep 17 00:00:00 2001 From: Mohamed Mekawy Date: Thu, 27 Feb 2020 14:18:48 +0300 Subject: [PATCH 1/7] edit home last login way --- .../confirm-login/confirm-login.component.ts | 25 +++++++++++-------- .../ui/welcome-login/welcome.component.ts | 8 +++--- Mohem/src/theme/styles.scss | 14 +++++------ 3 files changed, 26 insertions(+), 21 deletions(-) diff --git a/Mohem/src/app/authentication/confirm-login/confirm-login.component.ts b/Mohem/src/app/authentication/confirm-login/confirm-login.component.ts index 5c2853a9..a7f708bf 100644 --- a/Mohem/src/app/authentication/confirm-login/confirm-login.component.ts +++ b/Mohem/src/app/authentication/confirm-login/confirm-login.component.ts @@ -634,23 +634,26 @@ export class ConfirmLoginComponent implements OnInit { // this.deviceToken= this.cs.sharedService.getSharedData(AuthenticationService.DEVICE_TOKEN, false); - let request = new GetLoginInfoRequest(); + let request ={ + DeviceType: this.cs.getDeviceType(), - this.authService.setPublicFields(request); + DeviceToken:this.deviceToken - request.MobileNumber = this.loginData.MobileNumber; + } ; - request.P_USER_NAME=this.loginData.P_USER_NAME; + // this.authService.setPublicFields(request); - request.UserName=this.loginData.P_USER_NAME; + // request.MobileNumber = this.loginData.MobileNumber; - request.LogInTokenID =this.loginData.LogInTokenID; + // request.P_USER_NAME=this.loginData.P_USER_NAME; - request.CompanyID =1;//cs=1 , HMG=2 + // request.UserName=this.loginData.P_USER_NAME; - request.DeviceType= this.cs.getDeviceType(); + // request.LogInTokenID =this.loginData.LogInTokenID; - request.DeviceToken=this.deviceToken; + // request.CompanyID =1;//cs=1 , HMG=2 + + @@ -668,7 +671,7 @@ export class ConfirmLoginComponent implements OnInit { - private getMobileInfo(request: GetLoginInfoRequest) { + private getMobileInfo(request: any) { console.log("2"); @@ -790,7 +793,7 @@ export class ConfirmLoginComponent implements OnInit { request.DeviceType= this.cs.getDeviceType(); - request.DeviceToken="5ca8a69cf1804db55264c349edffb99b9d63acd9fa9b6b18956bcb2ad3f2ba36";//this.deviceToken; + request.DeviceToken=this.deviceToken;//"5ca8a69cf1804db55264c349edffb99b9d63acd9fa9b6b18956bcb2ad3f2ba36";//this.deviceToken; //request.TokenID= diff --git a/Mohem/src/app/hmg-common/ui/welcome-login/welcome.component.ts b/Mohem/src/app/hmg-common/ui/welcome-login/welcome.component.ts index cd19d7f9..31d50324 100644 --- a/Mohem/src/app/hmg-common/ui/welcome-login/welcome.component.ts +++ b/Mohem/src/app/hmg-common/ui/welcome-login/welcome.component.ts @@ -87,7 +87,7 @@ export class WelcomeComponent implements OnInit, AfterViewInit, OnDestroy { false ); - + console.log( this.user); this.userName = localStorage.getItem("user"); this.password = localStorage.getItem("password"); @@ -96,6 +96,8 @@ export class WelcomeComponent implements OnInit, AfterViewInit, OnDestroy { this.logintype= localStorage.getItem("login-type"); this.lastLoginDate= localStorage.getItem("login-at"); + + // this.lastLoginDate= new Date(this.lastLoginDate).toISOString() @@ -185,7 +187,7 @@ export class WelcomeComponent implements OnInit, AfterViewInit, OnDestroy { console.log(this.confimLogin.buttons[0]); this.confimLogin.buttons[0].forEach(element => { - if (this.logintype === element.value) { + if (this.user.LoginType === element.value) { console.log(this.logintype ); console.log(element.value); console.log("this.logintype === element.value"); @@ -199,7 +201,7 @@ export class WelcomeComponent implements OnInit, AfterViewInit, OnDestroy { }); } - }, 200); + }, 100); } public moreLoginOptions() {} diff --git a/Mohem/src/theme/styles.scss b/Mohem/src/theme/styles.scss index c0626ee3..c3380444 100644 --- a/Mohem/src/theme/styles.scss +++ b/Mohem/src/theme/styles.scss @@ -1022,10 +1022,10 @@ color: var(--dark); } .checkOutOkBtn{ - /* margin-left: 50px !important; */ - /* margin-right: 55px !important; */ + margin-left: 50px !important; + margin-right: 55px !important; margin-top: 10px !important; - /* margin-bottom: 10px !important; */ + margin-bottom: 10px !important; border-radius: 5px !important; height: 40px !important; min-height: 40px !important; @@ -1042,10 +1042,10 @@ color: var(--dark); } .checkOutCancelBtn{ - /* margin-left: 55px !important; */ - /* margin-right: 55px !important; */ - /* margin-top: 10px !important; */ - /* margin-bottom: 10px !important; */ + margin-left: 50px !important; + margin-right: 55px !important; + margin-top: 10px !important; + margin-bottom: 10px !important; border-radius: 5px !important; height: 40px !important; min-height: 40px !important; From 4a0ca75f6d4f72ad770510b692ef30cbed216ad0 Mon Sep 17 00:00:00 2001 From: ashwaq Date: Sun, 1 Mar 2020 11:24:40 +0300 Subject: [PATCH 2/7] fix login --- Mohem/src/app/app.component.ts | 1 + .../src/app/authentication/login/login.component.ts | 6 +++--- .../src/app/authentication/sms-page/sms-page.page.ts | 12 +++++++++--- Mohem/src/app/home/home.page.ts | 2 ++ 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/Mohem/src/app/app.component.ts b/Mohem/src/app/app.component.ts index 7378cfea..01c88780 100644 --- a/Mohem/src/app/app.component.ts +++ b/Mohem/src/app/app.component.ts @@ -60,6 +60,7 @@ export class AppComponent implements OnInit, AfterViewInit { ngAfterViewInit() {} initializeApp() { this.start = false; + this.menu.enable(false) this.lazyLoadingService.monitorLazyLoading(15, true); this.platform.ready().then(() => { this.ts.loadResources(() => { diff --git a/Mohem/src/app/authentication/login/login.component.ts b/Mohem/src/app/authentication/login/login.component.ts index 244012bc..7442330d 100644 --- a/Mohem/src/app/authentication/login/login.component.ts +++ b/Mohem/src/app/authentication/login/login.component.ts @@ -237,12 +237,12 @@ export class LoginComponent implements OnInit, OnDestroy { console.log("success"); this.cs.stopLoading(); if (this.cs.validResponse(result)) { - // alert("result.MemberLoginList.EMPLOYEE_NAME :" + result.MemberLoginList.EMPLOYEE_NAME); + // alert("result.MemberLoginList.EMPLOYEE_NAME :" + result.MemberLoginList[0].EMPLOYEE_NAME); this.loginData.LogInTokenID = result.LogInTokenID; this.loginData.MobileNumber = result.MemberLoginList.P_MOBILE_NUMBER; this.loginData.P_USER_NAME = this.username; - // this.loginData.EMPLOYEE_NAME =result.MemberLoginList[0].EMPLOYEE_NAME; + // this.loginData.EMPLOYEE_NAME =result.MemberLoginList[0].EMPLOYEE_NAME; this.sharedData.setSharedData(this.loginData, AuthenticationService.LOGIN_DATA); this.cs.sharedService.setSharedData(this.loginData.P_USER_NAME, LoginRequest.SHARED_DATA); this.remeberMyInfo(); @@ -325,7 +325,7 @@ export class LoginComponent implements OnInit, OnDestroy { console.log(result); this.loginData.LogInTokenID = result.LogInTokenID; this.loginData.P_USER_NAME = this.username; - this.loginData.EmployeeName =result.MemberLoginList[0].EMPLOYEE_NAME; + // this.loginData.EmployeeName =result.MemberLoginList[0].EMPLOYEE_NAME; this.cs.sharedService.setSharedData(this.loginData.P_USER_NAME, LoginRequest.SHARED_DATA); this.sharedData.setSharedData(this.loginData, AuthenticationService.LOGIN_DATA); diff --git a/Mohem/src/app/authentication/sms-page/sms-page.page.ts b/Mohem/src/app/authentication/sms-page/sms-page.page.ts index eb7895b3..20a94df0 100644 --- a/Mohem/src/app/authentication/sms-page/sms-page.page.ts +++ b/Mohem/src/app/authentication/sms-page/sms-page.page.ts @@ -496,9 +496,13 @@ console.log("successful insertMobileLogin" ); const key = e.which; const t = e.target; let sib = t.nextElementSibling; + let sibPre =t.previousElementSibling; if (key !== 9 && (key < 48 || key > 57)) { if (key === 8 || key === 46) { + + + return true; } else { e.preventDefault(); @@ -509,11 +513,13 @@ console.log("successful insertMobileLogin" ); if (key === 9) { return true; } - if (sib) { //sib = document.querySelector('input'); - if (e.target.value) { + if (e.target.value ==="") { + sibPre.setFocus()} + else{ sib.setFocus(); + } } } // } else { @@ -523,6 +529,6 @@ console.log("successful insertMobileLogin" ); - } + } \ No newline at end of file diff --git a/Mohem/src/app/home/home.page.ts b/Mohem/src/app/home/home.page.ts index 77e17c73..442a55fd 100644 --- a/Mohem/src/app/home/home.page.ts +++ b/Mohem/src/app/home/home.page.ts @@ -172,6 +172,8 @@ export class HomePage implements OnInit { } ngOnInit() { + this.menu.enable(true) + // this.getUserDetails(); // this.getCount(); // this.events.subscribe('getNotCount', badge => { From 8f9ef27ee153dac57ed430e65bb52d2e1e9f8c55 Mon Sep 17 00:00:00 2001 From: Mohamed Mekawy Date: Mon, 2 Mar 2020 09:58:36 +0300 Subject: [PATCH 3/7] add my team to side menu & handle accural balance in absence page --- Mohem/src/app/absence/home/home.component.ts | 10 ++++++---- Mohem/src/app/app.component.html | 9 +++++++++ Mohem/src/app/app.component.ts | 14 +++++++++++++- Mohem/src/app/home/home.page.html | 7 ------- Mohem/src/app/home/home.page.ts | 12 +++++++++--- Mohem/src/assets/imgs/my_team_icon.png | Bin 0 -> 470 bytes Mohem/src/assets/localization/i18n.json | 4 ++-- 7 files changed, 39 insertions(+), 17 deletions(-) create mode 100644 Mohem/src/assets/imgs/my_team_icon.png diff --git a/Mohem/src/app/absence/home/home.component.ts b/Mohem/src/app/absence/home/home.component.ts index 398820e9..05b25d8b 100644 --- a/Mohem/src/app/absence/home/home.component.ts +++ b/Mohem/src/app/absence/home/home.component.ts @@ -55,7 +55,9 @@ export class HomeComponent implements OnInit { public absService: AbsenceListService, public accrualService: AccrualService, public authService: AuthenticationService - ) {} + ) { + // this.userData =this.common.sharedService.getSharedData(AuthenticatedUser.SHARED_DATA,false); + } ngOnInit() { @@ -66,8 +68,8 @@ export class HomeComponent implements OnInit { private getUserDetails(){ this.authService.loadAuthenticatedUser().subscribe((user: AuthenticatedUser) => { if (user) { - this.emp_no=user.EMPLOYEE_NUMBER; - this.getAccrualBalance(); + // this.emp_no=user.EMPLOYEE_NUMBER; + // this.getAccrualBalance(); } }); @@ -236,7 +238,7 @@ createAbsence() { let todayDate = month + '/' + day + '/' + year; let effectiveDate = todayDate; const request = { - P_SELECTED_EMPLOYEE_NUMBER: this.emp_no, + P_SELECTED_EMPLOYEE_NUMBER: this.selEmp, P_EFFECTIVE_DATE: effectiveDate }; diff --git a/Mohem/src/app/app.component.html b/Mohem/src/app/app.component.html index 4a975deb..42371b1a 100644 --- a/Mohem/src/app/app.component.html +++ b/Mohem/src/app/app.component.html @@ -114,6 +114,15 @@ --> + + + + + + + {{ts.trPK('myTeam','myTeam-header')}} + + - - - - -
-
-
-

{{percentage}}

- Completed



+ + + + + + +
+
+
+

{{percentage}}

+ Completed



+
+
- -
-
- - -
+
+
+ +
+ +

{{nameDay}}

+
+ +

{{day}}

+
-

{{nameDay}}

-
+

{{nameMonth}}

+ -

{{day}}

-
- -

{{nameMonth}}

-
- -

{{year}}

-
- -

{{ts.trPK('attendance','present')}}

-
-
-
- - - -
- +

{{year}}

+ + +

{{ts.trPK('attendance','present')}}

+
+
+ + - +

{{shiftTime}}

{{ts.trPK('attendance-tracking','shift-time')}}

- + +

{{scheduled}}

{{ts.trPK('attendance-tracking','regular')}}

-
- - + + +

{{startDate}}

{{ts.trPK('attendance-tracking','check-in')}}

- + + +

{{endDate}}

{{ts.trPK('attendance-tracking','check-out')}}

-
- - + +

{{lateIn}}

{{ts.trPK('attendance-tracking','late-in')}}

- + +

{{excess}}

{{ts.trPK('attendance-tracking','excess')}}

-
- - + +

{{shortage}}

{{ts.trPK('attendance-tracking','shortage')}}

- + +

{{earlyOut}}

{{ts.trPK('attendance-tracking','early-out')}}

- -
- - - + + + + diff --git a/Mohem/src/app/hmg-common/ui/circle-calendar/date-info-modal/date-info-modal.component.scss b/Mohem/src/app/hmg-common/ui/circle-calendar/date-info-modal/date-info-modal.component.scss index 53ea08a2..10600f8b 100644 --- a/Mohem/src/app/hmg-common/ui/circle-calendar/date-info-modal/date-info-modal.component.scss +++ b/Mohem/src/app/hmg-common/ui/circle-calendar/date-info-modal/date-info-modal.component.scss @@ -1,54 +1,23 @@ .result-text-container { - - // padding: 0; - - // margin: 0; - - // position: absolute; - - // left: 50%; - - // top: 50%; - - // display: block; - - // text-align: center; - - // transform: translate(-50%, -50%); -//////////////////////////here padding: 0; margin: 0; position: absolute; - left: 58%; - top: 67%; + left: 42%; + top: 60%; display: block; text-align: center; - -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); - h2 { - font-size: 25px; - - // font-family: WorkSans-Bold; font-weight: bold; - margin: 0 auto; - line-height: 36px; - } - span { - width: 125px; - display: block; - margin: 0 auto; - font-size: 12px; - font-family: workSans-Regular; color: rgb(163, 163, 163) !important; } @@ -57,20 +26,26 @@ .today-graph{ display: block; height: 127px; - width: 288px; + width: 270px; + margin-left: -60px; } .amountlabel{ - color: black !important; - font-weight: bold !important; - font-size: 13px !important; -// border-top: 1px solid rgb(163, 163, 163) !important; - margin-left: 0px !important; - margin-bottom: -29px !important; + color: black !important; + font-weight: bold !important; + font-size: 13px !important; + margin-bottom: -29px !important; + width: 100%; + display: block; + text-align: center; } .rowlabel{ -color: rgb(163, 163, 163) !important; -font-size: 13px !important; -font-family: WorkSans-Bold; + color: #a3a3a3 !important; + font-size: 13px !important; + font-family: WorkSans-Bold; + display: block; + width: 100%; + text-align: center; + padding: 1px; } .grid{ padding-bottom: -20px !important; @@ -95,18 +70,9 @@ height: 360px !important; } .div{ - // border: 1px solid #a3a3a3 !important; - // text-align: center; - // width: 274%; - // border-radius: 8%; - // height: 40%; - // margin-right: -11px; border: 1px solid #a3a3a3 !important; - border-radius: 9px; - width: 241%; - margin-right: -226px; - - + border-radius: 10px; + margin-bottom:10px; } .p0{ margin-bottom: -13px !important; @@ -128,22 +94,28 @@ height: 360px !important; display: block; width: 100%; } - .p2{ font-weight: bold !important; + .p2{ + font-weight: bold !important; font-size: 17px !important; margin-bottom: 43px !important; margin-top: 0px !important; color: black !important; font-weight: bold !important; - margin-left: 33px; - } - .p3{ /* margin-bottom: -72px !important; */ + text-align: center; + display: block; + width: 100%; + } + .p3{ color: black !important; font-weight: bold !important; font-size: 19px; margin-top: -43px; - margin-left: 27px; + text-align: center; + display: block; + width: 100%; } - .p4{ margin-bottom: 56px !important; + .p4{ + margin-bottom: 56px !important; margin-top: -26px !important; color: black !important; } @@ -158,23 +130,7 @@ height: 360px !important; height: 21px; width: 110px; padding-top: 7px; - /* font-family: WorkSans-Bold !important; */ padding-bottom: 21px; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; - } - // .less{ background-color: #22C6B3; - // background-color: #22C6B3; - // border: none; - // color: white; - // text-align: center; - // text-decoration: none; - // display: inline-block; - // font-size: 12px; - // border-radius: 30px; - // height: 26px; - // padding: 6px 24px; - // margin-left: 123px; - // /* margin-top: -19px; */ - // margin-bottom: 17px; - // } \ No newline at end of file + } \ No newline at end of file diff --git a/Mohem/src/app/hmg-common/ui/circle-calendar/date-info-modal/date-info-modal.component.ts b/Mohem/src/app/hmg-common/ui/circle-calendar/date-info-modal/date-info-modal.component.ts index 001b4b25..1cc15754 100644 --- a/Mohem/src/app/hmg-common/ui/circle-calendar/date-info-modal/date-info-modal.component.ts +++ b/Mohem/src/app/hmg-common/ui/circle-calendar/date-info-modal/date-info-modal.component.ts @@ -98,7 +98,7 @@ export class DateInfoModalComponent implements OnInit { slideChanged(ev) { this.slides.getActiveIndex().then(index => { - const shiftDetails = this.SHIFTDETAILS[index]; + const shiftDetails = this.SHIFTDETAILS.GetScheduleShiftsDetailsList[index]; this.assignData(shiftDetails); }); } diff --git a/Mohem/src/app/my-team/details/details.component.ts b/Mohem/src/app/my-team/details/details.component.ts index bf839752..ae4acf22 100644 --- a/Mohem/src/app/my-team/details/details.component.ts +++ b/Mohem/src/app/my-team/details/details.component.ts @@ -132,12 +132,7 @@ export class DetailsComponent implements OnInit { this.currentDate = new Date(); this.showData = false; this.nextMonth = new Date().getMonth() + 2; - this.preMonth = new Date().getMonth() - 2; - if (this.preMonth < 0) { - this.preMonth = this.preMonth * - 1; - } else { - this.preMonth = this.preMonth * - 1; - } + this.preMonth = new Date().getMonth(); this.calendarConfig(this.getMonthName(new Date().getMonth() + 1) , new Date().getFullYear()); } @@ -210,6 +205,7 @@ export class DetailsComponent implements OnInit { } + changeMonthTitle(title) { this.monthTitle = title; this.getTimeCardSummaryDetails(); diff --git a/Mohem/src/app/time-card/time-card-details/time-card-details.component.ts b/Mohem/src/app/time-card/time-card-details/time-card-details.component.ts index 8383911a..7b2230aa 100644 --- a/Mohem/src/app/time-card/time-card-details/time-card-details.component.ts +++ b/Mohem/src/app/time-card/time-card-details/time-card-details.component.ts @@ -76,12 +76,7 @@ export class TimeCardDetailsComponent implements OnInit { ngOnInit() { this.showData = false; this.nextMonth = new Date().getMonth() + 2; - this.preMonth = new Date().getMonth() - 2; - if (this.preMonth < 0) { - this.preMonth = this.preMonth * - 1; - } else { - this.preMonth = this.preMonth * - 1; - } + this.preMonth = new Date().getMonth(); this.calendarConfig(this.getMonthName(new Date().getMonth() + 1) , new Date().getFullYear()); } @@ -218,7 +213,6 @@ export class TimeCardDetailsComponent implements OnInit { }); } - nextSlide() { this.normalDays = []; if (this.currentMonthName !== this.month) { diff --git a/Mohem/src/theme/styles.scss b/Mohem/src/theme/styles.scss index c3380444..1e791c08 100644 --- a/Mohem/src/theme/styles.scss +++ b/Mohem/src/theme/styles.scss @@ -1284,12 +1284,9 @@ border:0px } .calendar-modal { - --height: 15cm !important; + --height: 13cm !important; --width: 88% !important; --border-radius: 0.4cm; - - // height: 544px !important; - // width: 332px !important; } From d26cea9024c0cdb53e3ebfa3a3486d8a3865ba19 Mon Sep 17 00:00:00 2001 From: umasoodch Date: Mon, 2 Mar 2020 18:08:33 +0300 Subject: [PATCH 5/7] fixed attendance and calendar issues --- .../circle-calendar.component.ts | 29 ++++---- .../date-info-modal.component.scss | 2 +- .../employee-information.component.html | 6 +- .../employee-information.component.ts | 9 ++- .../my-team/details/details.component.html | 8 +-- .../app/my-team/details/details.component.ts | 66 ++++++------------- .../src/app/my-team/home/home.component.html | 2 +- .../time-card-details.component.html | 4 -- .../time-card-details.component.ts | 65 ++++++------------ Mohem/src/theme/styles.scss | 7 +- 10 files changed, 77 insertions(+), 121 deletions(-) diff --git a/Mohem/src/app/hmg-common/ui/circle-calendar/circle-calendar.component.ts b/Mohem/src/app/hmg-common/ui/circle-calendar/circle-calendar.component.ts index c664d3dc..842cbd83 100644 --- a/Mohem/src/app/hmg-common/ui/circle-calendar/circle-calendar.component.ts +++ b/Mohem/src/app/hmg-common/ui/circle-calendar/circle-calendar.component.ts @@ -17,11 +17,6 @@ import { GetSwipesRequest } from 'src/app/time-card/service/models/get-swipes-re styleUrls: ['./circle-calendar.component.scss'] }) export class CircleCalendarComponent implements OnInit { - - @Input() eventsdateDayOff: any = []; - @Input() eventsdateAttend: any = []; - @Input() eventsdateAbsent: any = []; - @Input() normalDays: any = []; @Input() dayHoursTypeDetailsList: any = []; @Input() currentDateParent: string; @Output() monthTitle = new EventEmitter(); @@ -86,10 +81,7 @@ export class CircleCalendarComponent implements OnInit { } reRenderCalendar() { - this.renderDate(this.eventsdateAbsent, 'absent'); - this.renderDate(this.eventsdateAttend, 'present'); - this.renderDate(this.eventsdateDayOff, 'dayoff'); - this.renderDate(this.normalDays, 'scheduleDay'); + this.renderDate(this.dayHoursTypeDetailsList); } public async dateModal(shiftDetails) { @@ -106,14 +98,23 @@ export class CircleCalendarComponent implements OnInit { await modal.present(); } - public renderDate(arrayDays, cssClass) { + public renderDate(arrayDays) { const td = document.querySelectorAll('.swiper-slide-active .monthview-datetable td:not(.text-muted)'); arrayDays.forEach(dateObj => { - const date = dateObj.startTime; + const date = dateObj.customScheduleDate; td.forEach(element => { // tslint:disable-next-line: triple-equals - if (date.getDate() == element.textContent.trim()) { - element.classList.add(cssClass); + if (date.getDate() == element.textContent.trim() && dateObj.customPresent === true) { + element.classList.add('present'); + // tslint:disable-next-line: triple-equals + } else if (date.getDate() == element.textContent.trim() && dateObj.customAbsent === true) { + element.classList.add('absent'); + // tslint:disable-next-line: triple-equals + } else if (date.getDate() == element.textContent.trim() && dateObj.customDaysOff === true) { + element.classList.add('dayoff'); + // tslint:disable-next-line: triple-equals + } else if (date.getDate() == element.textContent.trim() && dateObj.customSchedule === true) { + element.classList.add('scheduleDay'); } }); }); @@ -124,7 +125,7 @@ export class CircleCalendarComponent implements OnInit { console.log(event.selectedTime.getDate()); const selectedIndex = event.selectedTime.getDate(); this.selectedIndexData = this.dayHoursTypeDetailsList[selectedIndex - 1]; - if (this.selectedIndexData.present) { + if (this.selectedIndexData.customPresent) { const rtpID = this.selectedIndexData.RTP_ID; this.getScheduleShiftDetails(rtpID); } diff --git a/Mohem/src/app/hmg-common/ui/circle-calendar/date-info-modal/date-info-modal.component.scss b/Mohem/src/app/hmg-common/ui/circle-calendar/date-info-modal/date-info-modal.component.scss index 10600f8b..7f648459 100644 --- a/Mohem/src/app/hmg-common/ui/circle-calendar/date-info-modal/date-info-modal.component.scss +++ b/Mohem/src/app/hmg-common/ui/circle-calendar/date-info-modal/date-info-modal.component.scss @@ -78,7 +78,7 @@ height: 360px !important; margin-bottom: -13px !important; color: black !important; font-weight: bold !important; - font-size: 15px !important; + font-size: 14px !important; margin-top: 8px; text-align: center; display: block; diff --git a/Mohem/src/app/hmg-common/ui/employee-information/employee-information.component.html b/Mohem/src/app/hmg-common/ui/employee-information/employee-information.component.html index f3099eaa..a90e4704 100644 --- a/Mohem/src/app/hmg-common/ui/employee-information/employee-information.component.html +++ b/Mohem/src/app/hmg-common/ui/employee-information/employee-information.component.html @@ -1,6 +1,6 @@
- +
Team Member Image @@ -9,11 +9,11 @@
- +

{{name}}

{{title}}
- +
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 47d44bb7..47fe4440 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 @@ -1,4 +1,4 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, EventEmitter, Output } from '@angular/core'; @Component({ selector: 'app-employee-information', @@ -12,10 +12,15 @@ export class EmployeeInformationComponent implements OnInit { @Input() title: string; @Input() employeeImage: string; @Input() employeePhoneNumber: string; - + // tslint:disable-next-line: no-output-on-prefix + @Output() onGetDetails = new EventEmitter(); constructor() { } ngOnInit() {} + getDetails() { + this.onGetDetails.emit(); + } + } diff --git a/Mohem/src/app/my-team/details/details.component.html b/Mohem/src/app/my-team/details/details.component.html index 3e0c7759..af154d2f 100644 --- a/Mohem/src/app/my-team/details/details.component.html +++ b/Mohem/src/app/my-team/details/details.component.html @@ -23,7 +23,7 @@
- + Call @@ -174,12 +174,8 @@
{{ts.trPK('attendance','monthly-attendance-calendar')}} @@ -223,7 +219,7 @@ [title]="subordinate.POSITION_NAME" [employeeImage]="subordinate.EMPLOYEE_IMAGE ? 'data:image/png;base64,'+subordinate.EMPLOYEE_IMAGE : '../assets/imgs/profile.png'" [employeePhoneNumber]="subordinate.EMPLOYEE_MOBILE_NUMBER" - (click)="getDetails(i)"> + (onGetDetails)="getDetails(i)"> diff --git a/Mohem/src/app/my-team/details/details.component.ts b/Mohem/src/app/my-team/details/details.component.ts index ae4acf22..a5e58229 100644 --- a/Mohem/src/app/my-team/details/details.component.ts +++ b/Mohem/src/app/my-team/details/details.component.ts @@ -54,10 +54,6 @@ export class DetailsComponent implements OnInit { public attendedDays: number; public futrueDays = 0; public totalAttendancePrecentage = 0; - public arrDaysAttendance: any = []; - public arrDaysAbsent: any = []; - public arrDaysOff: any = []; - public normalDays: any = []; public monthTitle: string = moment().format('MMMM'); public yearTitle: string; public activeMonth: any; @@ -120,7 +116,6 @@ export class DetailsComponent implements OnInit { public segmentChanged(event: any) { this.activeSegment = event.detail.value; if (this.activeSegment === 'Attendance') { - this.normalDays = []; this.initAttendance(); } } @@ -137,9 +132,6 @@ export class DetailsComponent implements OnInit { } calendarConfig(month?, year?) { - this.arrDaysOff = []; - this.arrDaysAttendance = []; - this.arrDaysAbsent = []; this.month = month; this.year = year; this.getTimeCardSummaryDetails(month, year); @@ -169,14 +161,12 @@ export class DetailsComponent implements OnInit { console.log(result.GetDayHoursTypeDetailsList); this.common.sharedService.setSharedData(result.GetDayHoursTypeDetailsList, 'RTP_IDs'); this.countAllAttendDays(result.GetDayHoursTypeDetailsList); - this.dayHoursTypeDetailsList = result.GetDayHoursTypeDetailsList; } }); } nextSlide() { - this.normalDays = []; if (this.currentMonthName !== this.month) { this.showData = false; if (this.nextMonth > 12) { @@ -191,7 +181,6 @@ export class DetailsComponent implements OnInit { } previousSlide() { - this.normalDays = []; this.showData = false; if (this.preMonth === 0) { this.currentYear = this.currentYear - 1; @@ -219,48 +208,35 @@ export class DetailsComponent implements OnInit { for (let i = 0; i < allDays.length; i++) { // tslint:disable-next-line: triple-equals if (allDays[i].ATTENDED_FLAG == 'Y') { - allDays[i].present = true; - allDays[i].absent = false; - allDays[i].daysOff = false; - allDays[i].schedule = false; - this.arrDaysAttendance.push({ - startTime: new Date(allDays[i].SCHEDULE_DATE), - endTime: new Date(allDays[i].SCHEDULE_DATE) - }); + allDays[i].customPresent = true; + allDays[i].customAbsent = false; + allDays[i].customDaysOff = false; + allDays[i].customSchedule = false; + allDays[i].customScheduleDate = new Date(allDays[i].SCHEDULE_DATE); // tslint:disable-next-line: triple-equals } else if (allDays[i].ATTENDED_FLAG == 'N' && allDays[i].ABSENT_FLAG == 'Y') { - allDays[i].present = false; - allDays[i].absent = true; - allDays[i].daysOff = false; - allDays[i].schedule = false; - this.arrDaysAbsent.push({ - startTime: new Date(allDays[i].SCHEDULE_DATE), - endTime: new Date(allDays[i].SCHEDULE_DATE), - isoTime: '09:00:00', - allDay: false - }); + allDays[i].customPresent = false; + allDays[i].customAbsent = true; + allDays[i].customDaysOff = false; + allDays[i].customSchedule = false; + allDays[i].customScheduleDate = new Date(allDays[i].SCHEDULE_DATE); // tslint:disable-next-line: triple-equals } else if (allDays[i].ATTENDED_FLAG == 'N' && allDays[i].DAY_TYPE === 'OFF') { - allDays[i].present = false; - allDays[i].absent = false; - allDays[i].daysOff = true; - allDays[i].schedule = false; - this.arrDaysOff.push({ - startTime: new Date(allDays[i].SCHEDULE_DATE), - endTime: new Date(allDays[i].SCHEDULE_DATE) - }); + allDays[i].customPresent = false; + allDays[i].customAbsent = false; + allDays[i].customDaysOff = true; + allDays[i].customSchedule = false; + allDays[i].customScheduleDate = new Date(allDays[i].SCHEDULE_DATE); } else { - allDays[i].present = false; - allDays[i].absent = false; - allDays[i].daysOff = false; - allDays[i].schedule = true; - this.normalDays.push({ - startTime: new Date(allDays[i].SCHEDULE_DATE), - endTime: new Date(allDays[i].SCHEDULE_DATE) - }); + allDays[i].customPresent = false; + allDays[i].customAbsent = false; + allDays[i].customDaysOff = false; + allDays[i].customSchedule = true; + allDays[i].customScheduleDate = new Date(allDays[i].SCHEDULE_DATE); } } this.showData = true; + this.dayHoursTypeDetailsList = allDays; } public getTimeCardSummaryDetails(month?, year?) { diff --git a/Mohem/src/app/my-team/home/home.component.html b/Mohem/src/app/my-team/home/home.component.html index 1a297ab0..76a56be7 100644 --- a/Mohem/src/app/my-team/home/home.component.html +++ b/Mohem/src/app/my-team/home/home.component.html @@ -69,7 +69,7 @@ [title]="subordinate.POSITION_NAME" [employeeImage]="subordinate.EMPLOYEE_IMAGE ? 'data:image/png;base64,'+subordinate.EMPLOYEE_IMAGE : '../assets/imgs/profile.png'" [employeePhoneNumber]="subordinate.EMPLOYEE_MOBILE_NUMBER" - (click)="getDetails(i)"> + (onGetDetails)="getDetails(i)"> diff --git a/Mohem/src/app/time-card/time-card-details/time-card-details.component.html b/Mohem/src/app/time-card/time-card-details/time-card-details.component.html index d2f9d80d..9eb7fe15 100644 --- a/Mohem/src/app/time-card/time-card-details/time-card-details.component.html +++ b/Mohem/src/app/time-card/time-card-details/time-card-details.component.html @@ -84,12 +84,8 @@
{{ts.trPK('attendance','monthly-attendance-calendar')}} diff --git a/Mohem/src/app/time-card/time-card-details/time-card-details.component.ts b/Mohem/src/app/time-card/time-card-details/time-card-details.component.ts index 7b2230aa..377dfbd3 100644 --- a/Mohem/src/app/time-card/time-card-details/time-card-details.component.ts +++ b/Mohem/src/app/time-card/time-card-details/time-card-details.component.ts @@ -53,9 +53,6 @@ export class TimeCardDetailsComponent implements OnInit { public attendedDays: number; public futrueDays = 0; public totalAttendancePrecentage = 0; - public arrDaysAttendance: any = []; - public arrDaysAbsent: any = []; - public arrDaysOff: any = []; public monthTitle: string = moment().format('MMMM'); public yearTitle: string; public isChange = false; @@ -64,7 +61,6 @@ export class TimeCardDetailsComponent implements OnInit { public showData = false; public currentYear = new Date().getFullYear(); public dayHoursTypeDetailsList = []; - public normalDays: any = []; public currentDate = new Date(); public options = { cutoutPercentage: 80, @@ -81,9 +77,6 @@ export class TimeCardDetailsComponent implements OnInit { } calendarConfig(month?, year?) { - this.arrDaysOff = []; - this.arrDaysAttendance = []; - this.arrDaysAbsent = []; this.month = month; this.year = year; this.getTimeCardSummaryDetails(month, year); @@ -113,7 +106,6 @@ export class TimeCardDetailsComponent implements OnInit { console.log(result.GetDayHoursTypeDetailsList); this.common.sharedService.setSharedData(result.GetDayHoursTypeDetailsList, 'RTP_IDs'); this.countAllAttendDays(result.GetDayHoursTypeDetailsList); - this.dayHoursTypeDetailsList = result.GetDayHoursTypeDetailsList; } }); @@ -124,48 +116,35 @@ export class TimeCardDetailsComponent implements OnInit { for (let i = 0; i < allDays.length; i++) { // tslint:disable-next-line: triple-equals if (allDays[i].ATTENDED_FLAG == 'Y') { - allDays[i].present = true; - allDays[i].absent = false; - allDays[i].daysOff = false; - allDays[i].schedule = false; - this.arrDaysAttendance.push({ - startTime: new Date(allDays[i].SCHEDULE_DATE), - endTime: new Date(allDays[i].SCHEDULE_DATE) - }); + allDays[i].customPresent = true; + allDays[i].customAbsent = false; + allDays[i].customDaysOff = false; + allDays[i].customSchedule = false; + allDays[i].customScheduleDate = new Date(allDays[i].SCHEDULE_DATE); // tslint:disable-next-line: triple-equals } else if (allDays[i].ATTENDED_FLAG == 'N' && allDays[i].ABSENT_FLAG == 'Y') { - allDays[i].present = false; - allDays[i].absent = true; - allDays[i].daysOff = false; - allDays[i].schedule = false; - this.arrDaysAbsent.push({ - startTime: new Date(allDays[i].SCHEDULE_DATE), - endTime: new Date(allDays[i].SCHEDULE_DATE), - isoTime: '09:00:00', - allDay: false - }); + allDays[i].customPresent = false; + allDays[i].customAbsent = true; + allDays[i].customDaysOff = false; + allDays[i].customSchedule = false; + allDays[i].customScheduleDate = new Date(allDays[i].SCHEDULE_DATE); // tslint:disable-next-line: triple-equals } else if (allDays[i].ATTENDED_FLAG == 'N' && allDays[i].DAY_TYPE === 'OFF') { - allDays[i].present = false; - allDays[i].absent = false; - allDays[i].daysOff = true; - allDays[i].schedule = false; - this.arrDaysOff.push({ - startTime: new Date(allDays[i].SCHEDULE_DATE), - endTime: new Date(allDays[i].SCHEDULE_DATE) - }); + allDays[i].customPresent = false; + allDays[i].customAbsent = false; + allDays[i].customDaysOff = true; + allDays[i].customSchedule = false; + allDays[i].customScheduleDate = new Date(allDays[i].SCHEDULE_DATE); } else { - allDays[i].present = false; - allDays[i].absent = false; - allDays[i].daysOff = false; - allDays[i].schedule = true; - this.normalDays.push({ - startTime: new Date(allDays[i].SCHEDULE_DATE), - endTime: new Date(allDays[i].SCHEDULE_DATE) - }); + allDays[i].customPresent = false; + allDays[i].customAbsent = false; + allDays[i].customDaysOff = false; + allDays[i].customSchedule = true; + allDays[i].customScheduleDate = new Date(allDays[i].SCHEDULE_DATE); } } this.showData = true; + this.dayHoursTypeDetailsList = allDays; } public getTimeCardSummaryDetails(month?, year?) { @@ -214,7 +193,6 @@ export class TimeCardDetailsComponent implements OnInit { } nextSlide() { - this.normalDays = []; if (this.currentMonthName !== this.month) { this.showData = false; if (this.nextMonth > 12) { @@ -229,7 +207,6 @@ export class TimeCardDetailsComponent implements OnInit { } previousSlide() { - this.normalDays = []; this.showData = false; if (this.preMonth === 0) { this.currentYear = this.currentYear - 1; diff --git a/Mohem/src/theme/styles.scss b/Mohem/src/theme/styles.scss index 1e791c08..b2768650 100644 --- a/Mohem/src/theme/styles.scss +++ b/Mohem/src/theme/styles.scss @@ -1284,7 +1284,7 @@ border:0px } .calendar-modal { - --height: 13cm !important; + --height: 13.5cm !important; --width: 88% !important; --border-radius: 0.4cm; } @@ -1409,6 +1409,11 @@ table.monthview-datetable th small { border-radius: 20px !important; } +.disable-phone { + pointer-events: none; + opacity: .3; +} + // .replaceRoll-modal { // padding: 30% 1% !important; From f00e63f49dabd821dd32d440f9aa0d14c9218c7c Mon Sep 17 00:00:00 2001 From: Mohamed Mekawy Date: Tue, 3 Mar 2020 15:50:22 +0300 Subject: [PATCH 6/7] remove image from confirmlogin and sms --- .../confirm-login/confirm-login.component.html | 4 ++-- Mohem/src/app/authentication/login/login.component.html | 6 +++--- Mohem/src/app/authentication/sms-page/sms-page.page.html | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Mohem/src/app/authentication/confirm-login/confirm-login.component.html b/Mohem/src/app/authentication/confirm-login/confirm-login.component.html index 931f7349..5ab6a2b0 100644 --- a/Mohem/src/app/authentication/confirm-login/confirm-login.component.html +++ b/Mohem/src/app/authentication/confirm-login/confirm-login.component.html @@ -13,11 +13,11 @@ [ngClass]="{'content-class':accessFromOutSide, 'ion-padding': !accessFromOutSide}" has-bouncing="false" forceOverscroll="false" scrollY="false" class="ion-no-padding"> - + + - + --> diff --git a/Mohem/src/app/authentication/sms-page/sms-page.page.html b/Mohem/src/app/authentication/sms-page/sms-page.page.html index 725130e9..f2811d6a 100644 --- a/Mohem/src/app/authentication/sms-page/sms-page.page.html +++ b/Mohem/src/app/authentication/sms-page/sms-page.page.html @@ -9,13 +9,13 @@ - + + - + -->

From 215084f797d3472851f5427eacf343161c04b77d Mon Sep 17 00:00:00 2001 From: Mohamed Mekawy Date: Wed, 4 Mar 2020 14:31:15 +0300 Subject: [PATCH 7/7] edit payment info & employee profile update --- Mohem/src/app/app.component.ts | 5 +++++ Mohem/src/app/home/home.page.ts | 4 ++++ Mohem/src/app/payslip/home/home.component.html | 12 +++++++----- Mohem/src/app/payslip/home/home.component.ts | 2 +- .../edit-profile/edit-profile.component.ts | 17 ++++++++++++----- Mohem/src/app/profile/home/home.component.ts | 3 +-- 6 files changed, 30 insertions(+), 13 deletions(-) diff --git a/Mohem/src/app/app.component.ts b/Mohem/src/app/app.component.ts index 9cdfc021..2c882ac2 100644 --- a/Mohem/src/app/app.component.ts +++ b/Mohem/src/app/app.component.ts @@ -57,6 +57,7 @@ export class AppComponent implements OnInit, AfterViewInit { ngOnInit() { this.initializeApp(); + } ngAfterViewInit() {} initializeApp() { @@ -94,9 +95,13 @@ export class AppComponent implements OnInit, AfterViewInit { ? user.CompanyImageDescription : "Powered By Cloud Solutions"; this.User_name_Emp = user.EMPLOYEE_DISPLAY_NAME; + if(this.cs.getUpdateImage().status){ + this.user_image =this.sanitizer.bypassSecurityTrustUrl("data:image/png;base64,"+this.cs.getUpdateImage().img); + }else{ this.user_image = user.EMPLOYEE_IMAGE ? "data:image/png;base64," + user.EMPLOYEE_IMAGE : "../assets/imgs/profile.png"; + } this.User_Job_name=user.JOB_NAME; console.log(user); diff --git a/Mohem/src/app/home/home.page.ts b/Mohem/src/app/home/home.page.ts index 02bde739..64d54133 100644 --- a/Mohem/src/app/home/home.page.ts +++ b/Mohem/src/app/home/home.page.ts @@ -320,9 +320,13 @@ export class HomePage implements OnInit { this.userData, AuthenticatedUser.SHARED_DATA ); + if(this.common.getUpdateImage().status){ + this.userImage =this.sanitizer.bypassSecurityTrustUrl("data:image/png;base64,"+this.common.getUpdateImage().img); + }else{ this.userImage = user.EMPLOYEE_IMAGE ? 'data:image/png;base64,' + user.EMPLOYEE_IMAGE : this.userImage; + } this.callDashboardServices(); } else { console.log(user); diff --git a/Mohem/src/app/payslip/home/home.component.html b/Mohem/src/app/payslip/home/home.component.html index 142a36a5..cb9a57a0 100644 --- a/Mohem/src/app/payslip/home/home.component.html +++ b/Mohem/src/app/payslip/home/home.component.html @@ -257,6 +257,7 @@
{{ts.trPK('payslip','payment-information')}}
+
@@ -265,7 +266,7 @@ - + @@ -276,7 +277,7 @@ - + @@ -285,7 +286,7 @@ - + @@ -297,7 +298,7 @@ - + @@ -306,10 +307,11 @@ - +
+
\ No newline at end of file diff --git a/Mohem/src/app/payslip/home/home.component.ts b/Mohem/src/app/payslip/home/home.component.ts index 7fd9b363..8f826d99 100644 --- a/Mohem/src/app/payslip/home/home.component.ts +++ b/Mohem/src/app/payslip/home/home.component.ts @@ -257,7 +257,7 @@ getPaymentInfo(ActionContextID){ handleGetPaymentInfoResult(result){ if (result.GetPaymentInformationList != null) { - this.GetPaymentInformationList = result.GetPaymentInformationList[0]; + this.GetPaymentInformationList = result.GetPaymentInformationList; } } diff --git a/Mohem/src/app/profile/edit-profile/edit-profile.component.ts b/Mohem/src/app/profile/edit-profile/edit-profile.component.ts index 58c888f3..61b0d210 100644 --- a/Mohem/src/app/profile/edit-profile/edit-profile.component.ts +++ b/Mohem/src/app/profile/edit-profile/edit-profile.component.ts @@ -7,6 +7,7 @@ import { AuthenticatedUser } from "src/app/hmg-common/services/authentication/mo import { PerformanceAppraisalResponse } from 'src/app/hmg-common/services/dashbored/performance-appraisal.response'; import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbored.service'; import { SharedDataService } from 'src/app/hmg-common/services/shared-data-service/shared-data.service'; +import { DomSanitizer } from '@angular/platform-browser'; // import { DomSanitizer } from '@angular/platform-browser'; @@ -35,17 +36,19 @@ export class EditProfileComponent implements OnInit { public cs: CommonService, public authService: AuthenticationService, public DS :DashboredService, - public sharedData: SharedDataService + public sharedData: SharedDataService, + public events: Events, + private sanitizer: DomSanitizer, // private events: Events, // private sanitizer: DomSanitizer, ) { - // this.events.subscribe("img-change", displayImg => { - // console.log("app compont: "+displayImg); - // this.user_image = this.sanitizer.bypassSecurityTrustUrl("data:Image/*;base64,"+displayImg); + this.events.subscribe("img-change", displayImg => { + console.log("app compont: "+displayImg); + this.user_image = this.sanitizer.bypassSecurityTrustUrl("data:Image/*;base64,"+displayImg); - // }); + }); } @@ -63,9 +66,13 @@ export class EditProfileComponent implements OnInit { this.personalInfo = user; this.User_name_Emp=this.personalInfo.EMPLOYEE_NAME; this.User_Job_name=this.personalInfo.JOB_NAME; + if(this.cs.getUpdateImage().status){ + this.user_image =this.sanitizer.bypassSecurityTrustUrl("data:image/png;base64,"+this.cs.getUpdateImage().img); + }else{ this.user_image = user.EMPLOYEE_IMAGE ? "data:image/png;base64," + user.EMPLOYEE_IMAGE : "../assets/imgs/profile.png"; + } console.log("name: "+ this.personalInfo.EMPLOYEE_NAME); console.log("user name: "+ user.EMPLOYEE_NAME); console.log("name: "+ this.personalInfo.JOB_NAME); diff --git a/Mohem/src/app/profile/home/home.component.ts b/Mohem/src/app/profile/home/home.component.ts index 2e192b1f..25192f94 100644 --- a/Mohem/src/app/profile/home/home.component.ts +++ b/Mohem/src/app/profile/home/home.component.ts @@ -51,8 +51,7 @@ export class HomeComponent implements OnInit { if(this.cs.getUpdateImage().status){ // this.imageSrc = this.sanitizer.bypassSecurityTrustUrl("data:Image/*;base64,"+this.cs.getUpdateImage().img); - this.imageSrc = "data:image/png;base64,"+this.cs.getUpdateImage().img; - // alert("this.imageSrc"+ this.imageSrc); + this.imageSrc =this.sanitizer.bypassSecurityTrustUrl("data:image/png;base64,"+this.cs.getUpdateImage().img); }else{ this.imageSrc = user.EMPLOYEE_IMAGE ? "data:image/png;base64," + user.EMPLOYEE_IMAGE