diff --git a/Mohem/src/app/app.component.html b/Mohem/src/app/app.component.html index 45f06cea..1127ed78 100644 --- a/Mohem/src/app/app.component.html +++ b/Mohem/src/app/app.component.html @@ -52,6 +52,15 @@ + + - + +

{{nameDay}}

@@ -28,45 +28,45 @@

{{year}}

- +
- -

{{shiftTime}}

+ +

{{TODAYDATE.LEAVE_TYPE}}

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

- -

{{scheduled}}

+ +

{{TODAYDATE.ABSENCE_ATTENDANCE_TYPE_NAME}}

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

- -

{{actualCheckIn}}

+ +

{{TODAYDATE.DATE_START}}

-

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

+

{{ts.trPK('vacation-rule','start-date')}}

- -

{{actualCheckOut}}

+ +

{{TODAYDATE.DATE_END}}

-

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

+

{{ts.trPK('vacation-rule','end-date')}}

- +
- - + 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 3dcb3689..407a3565 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 @@ -74,7 +74,7 @@ margin-right: -70px; } .amountlabel{ - color: black !important; + color: #024d71 !important; font-weight: bold !important; font-size: 13px !important; margin-bottom: -29px !important; @@ -208,10 +208,10 @@ height: 360px !important; } .col{ border-bottom: 1px solid rgb(204, 204, 204); - border-right: 1px solid rgb(204, 204, 204); + // border-right: 1px solid rgb(204, 204, 204); } .col-ar{ border-bottom: 1px solid rgb(204, 204, 204); - border-left: 1px solid rgb(204, 204, 204); + // border-left: 1px solid rgb(204, 204, 204); } 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 12cf5f31..480d9723 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 @@ -60,12 +60,21 @@ export class DateInfoModalComponent implements OnInit { ngOnInit() { console.log(this.TODAYDATE); - this.excess = this.TODAYDATE.EXCESS_HRS; - this.lateIn = this.TODAYDATE.LATE_IN_HRS; - this.shortage = this.TODAYDATE.SHORTAGE_HRS; - this.earlyOut = this.TODAYDATE.EARLY_OUT_HRS ; - this.scheduleDate = this.TODAYDATE.SCHEDULE_DATE; - this.assignData(this.SHIFTDETAILS.GetScheduleShiftsDetailsList[0]); + const splitdate = this.TODAYDATE.EVENT_DATE.split(' '); + const date = splitdate[0]; + const localDate = date.split('/'); + this.day = localDate[1]; + this.year = localDate[2]; + this.month = parseInt(localDate[0]); + this.nameMonth = this.direction === 'ltr' ? this.common.getMonthName(this.month) : this.common.getMonthNameAr(this.month); + this.nameDay = this.getHeaderDay(new Date(date)); + + // this.excess = this.TODAYDATE.EXCESS_HRS; + // this.lateIn = this.TODAYDATE.LATE_IN_HRS; + // this.shortage = this.TODAYDATE.SHORTAGE_HRS; + // this.earlyOut = this.TODAYDATE.EARLY_OUT_HRS ; + // this.scheduleDate = this.TODAYDATE.EVENT_DATE; + // this.assignData(this.SHIFTDETAILS.GetScheduleShiftsDetailsList[0]); } assignData(shiftDetails) { diff --git a/Mohem/src/app/hmg-common/ui/employee-hierarchy-card/employee-hierarchy-card.component.html b/Mohem/src/app/hmg-common/ui/employee-hierarchy-card/employee-hierarchy-card.component.html new file mode 100644 index 00000000..fbea2ff7 --- /dev/null +++ b/Mohem/src/app/hmg-common/ui/employee-hierarchy-card/employee-hierarchy-card.component.html @@ -0,0 +1,27 @@ +
+ + +
+
+ Team Member Image +
+
+
+ +
+ +

{{name}}

+ {{title}} +
+ + + + +
+ +
+
+
\ No newline at end of file diff --git a/Mohem/src/app/hmg-common/ui/employee-hierarchy-card/employee-hierarchy-card.component.scss b/Mohem/src/app/hmg-common/ui/employee-hierarchy-card/employee-hierarchy-card.component.scss new file mode 100644 index 00000000..cf3ba641 --- /dev/null +++ b/Mohem/src/app/hmg-common/ui/employee-hierarchy-card/employee-hierarchy-card.component.scss @@ -0,0 +1,122 @@ +.team-member-container { + + background: white; + /* margin-top: 2px; */ + font-family: WorkSans-Regular; + border: 1px solid #ccc; + border-radius: 15px; + padding-bottom: 5px; + margin-bottom: 15px; + box-shadow: 0px 1px 5px #cdcdcd; +} + +.user-image { + + img { + width: 60px; + height: 60px; + + border-radius: 30px; + margin: 5px; + } +} + +.employee-name { + display: inline-block; + width: 80%; + + .name { + + font-size: 16px; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + margin-left: -10px; + margin-top: -5px; + text-align: left; + font-weight: bold; + line-height: 25px; + letter-spacing: -0.64px; + color: #2B353E; + opacity: 1; + font-family: 'Inter' !important; + } + + .title { + + font-family: 'Inter' !important; + line-height: 12px; + letter-spacing: -0.56px; + color: #575757; + opacity: 1; + font-size: 14px; + width: 100%; + text-overflow: ellipsis; + white-space: nowrap; + // overflow: hidden; + display: block; + margin-left: -10px; + margin-top: -10px; + } +} + +.employee-name-ar { + display: inline-block; + width: 80%; + + .name { + font-size: 16px; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + margin-left: -10px; + margin-top: -5px; + text-align: right; + font-family: 'Inter' !important; + line-height: 25px; + letter-spacing: -0.64px; + color: #2B353E; + opacity: 1; + font-weight: bold; + } + + .title { + + font-family: 'Inter' !important; + line-height: 12px; + letter-spacing: -0.56px; + color: #575757; + opacity: 1; + font-size: 14px; + width: 100%; + text-overflow: ellipsis; + white-space: nowrap; + // overflow: hidden; + display: block; + margin-left: -10px; + margin-top: -10px; + } +} + +.image-container { + width: 20%; + display: inline-block; + text-align: center; + vertical-align: top; + margin-top: 5px; + position: relative; + top: 12px; +} + +.swipe-information { + color: #888; + font-size: 12px; + border-top: 1px solid #ccc; + padding-top: 6px; + margin-top: 6px; + + .check-in { + font-size: 12px; + margin-right: 15px; + } +} \ No newline at end of file diff --git a/Mohem/src/app/hmg-common/ui/employee-hierarchy-card/employee-hierarchy-card.component.spec.ts b/Mohem/src/app/hmg-common/ui/employee-hierarchy-card/employee-hierarchy-card.component.spec.ts new file mode 100644 index 00000000..5a018af5 --- /dev/null +++ b/Mohem/src/app/hmg-common/ui/employee-hierarchy-card/employee-hierarchy-card.component.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { EmployeeHierarchyCardComponent } from './employee-hierarchy-card.component'; + +describe('EmployeeHierarchyCardComponent', () => { + let component: EmployeeHierarchyCardComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ EmployeeHierarchyCardComponent ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(EmployeeHierarchyCardComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/hmg-common/ui/employee-hierarchy-card/employee-hierarchy-card.component.ts b/Mohem/src/app/hmg-common/ui/employee-hierarchy-card/employee-hierarchy-card.component.ts new file mode 100644 index 00000000..32812f3e --- /dev/null +++ b/Mohem/src/app/hmg-common/ui/employee-hierarchy-card/employee-hierarchy-card.component.ts @@ -0,0 +1,38 @@ +import { Component, OnInit, Input, EventEmitter, Output } from '@angular/core'; +import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; + +@Component({ + selector: 'app-employee-hierarchy-card', + templateUrl: './employee-hierarchy-card.component.html', + styleUrls: ['./employee-hierarchy-card.component.scss'], +}) +export class EmployeeHierarchyCardComponent implements OnInit { + + public direction: string; + public userImage: any = '../assets/imgs/profile.png'; + @Input() name: string; + @Input() title: string; + @Input() employeeImage: string; + @Input() employeePhoneNumber: string; + // tslint:disable-next-line: no-output-on-prefix + @Output() onGetDetails = new EventEmitter(); + + constructor( + public ts: TranslatorService, + ) { + this.direction = TranslatorService.getCurrentLanguageName(); + } + + 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/home/home.page.html b/Mohem/src/app/home/home.page.html index bae37b5d..913d5032 100644 --- a/Mohem/src/app/home/home.page.html +++ b/Mohem/src/app/home/home.page.html @@ -51,12 +51,12 @@

{{'userProfile,personal-informaion' | translate}}

{{'home,monthly-time-sheet-view' | translate}} - + {{'home,view-detail' | translate}}
- + diff --git a/Mohem/src/app/home/home.page.ts b/Mohem/src/app/home/home.page.ts index b3243c4c..c6850262 100644 --- a/Mohem/src/app/home/home.page.ts +++ b/Mohem/src/app/home/home.page.ts @@ -69,7 +69,7 @@ export class HomePage implements OnInit { businessLeaveRequestObject: any; missingSwipeRequestObject: any; public isShow = false; - public showVcationRule = false; + public showVcationRule = true; public isFakeLocationUsed = false; public intervalCountdown: any; public showLoader = true; @@ -848,21 +848,24 @@ export class HomePage implements OnInit { this.accrualService.getAccrualBalances(request, '', '', this.isPostNoLoad).subscribe((result: any) => { if (this.common.validResponse(result)) { let totalTicketsLeft = 0; + let totalAccuralAvailable = 0; + let totalOldAvailable = 0; this.accrualBalancesList = result.GetAccrualBalancesList; for (const accrualBalance of result.GetAccrualBalancesList) { if (accrualBalance.ACCURAL_PLAN_NAME === 'Annual Vacation Accrual' || accrualBalance.ACCURAL_PLAN_NAME == " خطة استحقاق الاجازة الاعتيادية") { - this.statsButtons[1].statsValue = accrualBalance.ACCRUAL_NET_ENTITLEMENT === null ? 0 : Number(accrualBalance.ACCRUAL_NET_ENTITLEMENT.toFixed(2)); - this.common.sharedService.setSharedData(accrualBalance, 'leaveAccrualBalance'); - this.common.sharedService.setSharedData(request, 'leaveAccrualBalanceDate'); - // this.common.sharedService.setSharedData(this.accrualBalancesList, 'tickitsbalance'); + totalAccuralAvailable = accrualBalance.ACCRUAL_NET_ENTITLEMENT === null ? 0 : Number(accrualBalance.ACCRUAL_NET_ENTITLEMENT.toFixed(2)); } else if (accrualBalance.ACCURAL_PLAN_NAME === 'Business Trip Accrual' || accrualBalance.ACCURAL_PLAN_NAME == "خطة استحقاق الإنتدابات") { this.statsButtons[2].statsValue = accrualBalance.ACCRUAL_NET_ENTITLEMENT === null ? 0 : Number(accrualBalance.ACCRUAL_NET_ENTITLEMENT.toFixed(2)); + } else if (accrualBalance.ACCURAL_PLAN_NAME === 'Old Leave Balance' || accrualBalance.ACCURAL_PLAN_NAME == "خطة فصل الارصدة 1439") { + totalOldAvailable = accrualBalance.ACCRUAL_NET_ENTITLEMENT === null ? 0 : Number(accrualBalance.ACCRUAL_NET_ENTITLEMENT.toFixed(2)); } - // else { - // totalTicketsLeft = totalTicketsLeft + accrualBalance.ACCRUAL_NET_ENTITLEMENT; - // } } - // this.statsButtons[4].statsValue = Number(totalTicketsLeft.toFixed(2)); + + const accrualBalanceNew = totalAccuralAvailable + totalOldAvailable; + this.statsButtons[1].statsValue = accrualBalanceNew; + this.common.sharedService.setSharedData(accrualBalanceNew, 'leaveAccrualBalance'); + this.common.sharedService.setSharedData(request, 'leaveAccrualBalanceDate'); + } }); } diff --git a/Mohem/src/app/my-team/employee-hierarchy/employee-hierarchy.component.html b/Mohem/src/app/my-team/employee-hierarchy/employee-hierarchy.component.html new file mode 100644 index 00000000..c127c302 --- /dev/null +++ b/Mohem/src/app/my-team/employee-hierarchy/employee-hierarchy.component.html @@ -0,0 +1,25 @@ + + + + + +
+ +
+
+ + + + + \ No newline at end of file diff --git a/Mohem/src/app/my-team/employee-hierarchy/employee-hierarchy.component.scss b/Mohem/src/app/my-team/employee-hierarchy/employee-hierarchy.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/Mohem/src/app/my-team/employee-hierarchy/employee-hierarchy.component.spec.ts b/Mohem/src/app/my-team/employee-hierarchy/employee-hierarchy.component.spec.ts new file mode 100644 index 00000000..a4134423 --- /dev/null +++ b/Mohem/src/app/my-team/employee-hierarchy/employee-hierarchy.component.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { EmployeeHierarchyComponent } from './employee-hierarchy.component'; + +describe('EmployeeHierarchyComponent', () => { + let component: EmployeeHierarchyComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ EmployeeHierarchyComponent ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(EmployeeHierarchyComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/my-team/employee-hierarchy/employee-hierarchy.component.ts b/Mohem/src/app/my-team/employee-hierarchy/employee-hierarchy.component.ts new file mode 100644 index 00000000..9a99b95d --- /dev/null +++ b/Mohem/src/app/my-team/employee-hierarchy/employee-hierarchy.component.ts @@ -0,0 +1,24 @@ +import { Component, OnInit } from '@angular/core'; +import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; +import { CommonService } from 'src/app/hmg-common/services/common/common.service'; +import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service'; +import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response'; +import { MyTeamService } from '../service/my-team.service'; + +@Component({ + selector: 'app-employee-hierarchy', + templateUrl: './employee-hierarchy.component.html', + styleUrls: ['./employee-hierarchy.component.scss'], +}) +export class EmployeeHierarchyComponent implements OnInit { + + constructor( + public ts: TranslatorService, + public authService: AuthenticationService, + public common: CommonService, + public myTeamService: MyTeamService + ) { } + + ngOnInit() {} + +} diff --git a/Mohem/src/app/my-team/my-team.module.ts b/Mohem/src/app/my-team/my-team.module.ts index 17fa5ede..bed89f55 100644 --- a/Mohem/src/app/my-team/my-team.module.ts +++ b/Mohem/src/app/my-team/my-team.module.ts @@ -11,6 +11,7 @@ import { HmgCommonModule } from '../hmg-common/hmg-common.module'; import { from } from 'rxjs'; import { WorklistService } from '../notification/service/worklist.service'; import { SubordinateLeaveComponent } from './subordinate-leave/subordinate-leave.component'; +import { EmployeeHierarchyComponent } from './employee-hierarchy/employee-hierarchy.component'; const routes: Routes = [ @@ -32,8 +33,15 @@ const routes: Routes = [ { path: 'subordinate-leave', component: SubordinateLeaveComponent + }, + { + path: 'employee-hierarchy', + component: EmployeeHierarchyComponent + }, + { + path: 'employee-hierarchy-2', + component: EmployeeHierarchyComponent } - ] } ]; @@ -52,7 +60,8 @@ const routes: Routes = [ MyTeamPage, HomeComponent, DetailsComponent, - SubordinateLeaveComponent + SubordinateLeaveComponent, + EmployeeHierarchyComponent ] }) export class MyTeamPageModule { } diff --git a/Mohem/src/app/profile/home/home.component.html b/Mohem/src/app/profile/home/home.component.html index 357464ec..5eb3c359 100644 --- a/Mohem/src/app/profile/home/home.component.html +++ b/Mohem/src/app/profile/home/home.component.html @@ -211,6 +211,46 @@ + + diff --git a/Mohem/src/app/profile/home/home.component.ts b/Mohem/src/app/profile/home/home.component.ts index b2e645ca..831f61b9 100644 --- a/Mohem/src/app/profile/home/home.component.ts +++ b/Mohem/src/app/profile/home/home.component.ts @@ -37,6 +37,7 @@ export class HomeComponent implements OnInit { public editAddress = false; public targetValue: any; public employeeBasicDetails: any = []; + public employeeQualifications: any = []; public fullName: string; public maritalStatus: string; public birthDate: any; @@ -180,11 +181,45 @@ export class HomeComponent implements OnInit { : '../assets/imgs/profile.png'; } this.getBasicDetails(); + this.getEmployeeQualifications(); + this.getEmployeeHierachy(); this.getAddress(); } }); } + public getEmployeeHierachy() { + const body = { + P_SELECTED_EMPLOYEE_NUMBER: this.personalInfo.EMPLOYEE_NUMBER, + P_MENU_TYPE: "E", + P_SELECTED_RESP_ID: -999 + }; + this.profileService.getEmployeeHierachy(body).subscribe((result: any) => { + if (this.cs.validResponse(result)) { + // this.employeeQualifications = result.EmployeeQualificationsList[0]; + // this.cs.sharedService.setSharedData(this.employeeQualifications, 'employeeQualifications'); + // console.log(this.employeeQualifications); + } + }); + + } + + public getEmployeeQualifications() { + const body = { + P_SELECTED_EMPLOYEE_NUMBER: this.personalInfo.EMPLOYEE_NUMBER, + P_MENU_TYPE: "E", + P_SELECTED_RESP_ID: -999 + }; + this.profileService.getEmployeeQualifications(body).subscribe((result: any) => { + if (this.cs.validResponse(result)) { + this.employeeQualifications = result.EmployeeQualificationsList[0]; + this.cs.sharedService.setSharedData(this.employeeQualifications, 'employeeQualifications'); + console.log(this.employeeQualifications); + } + }); + + } + public getBasicDetails() { const body = { P_SELECTED_EMPLOYEE_NUMBER: this.personalInfo.EMPLOYEE_NUMBER, diff --git a/Mohem/src/app/profile/service/profile.service.ts b/Mohem/src/app/profile/service/profile.service.ts index ec79d825..2458d24b 100644 --- a/Mohem/src/app/profile/service/profile.service.ts +++ b/Mohem/src/app/profile/service/profile.service.ts @@ -8,6 +8,9 @@ import { AuthenticationService } from "src/app/hmg-common/services/authenticatio export class ProfileService { public static updateEmpImage = "Services/ERP.svc/REST/UPDATE_EMPLOYEE_IMAGE"; public static getEmployeeBasicDetails = "Services/ERP.svc/REST/GET_EMPLOYEE_BASIC_DETAILS"; + public static getEmployeeQualifications = "Services/ERP.svc/REST/GET_EMPLOYEE_QUALIFICATIONS"; + public static getEmployeeHierachy = "Services/ERP.svc/REST/GET_SUPERVISOR_HIERARCHY"; + /* EIT Services URLs */ public static getMenuEntries = 'Services/ERP.svc/REST/GET_MENU_ENTRIES'; public static getEITTransctions = 'Services/ERP.svc/REST/GET_EIT_TRANSACTIONS'; @@ -83,6 +86,18 @@ export class ProfileService { return this.con.post(ProfileService.getEmployeeBasicDetails, request, onError, errorLabel); } + public getEmployeeHierachy(employeeQualificationRequest: any, onError?: any, errorLabel?: string): Observable { + const request = employeeQualificationRequest; + this.authService.authenticateRequest(request); + return this.con.post(ProfileService.getEmployeeHierachy, request, onError, errorLabel); + } + + public getEmployeeQualifications(employeeQualificationRequest: any, onError?: any, errorLabel?: string): Observable { + const request = employeeQualificationRequest; + this.authService.authenticateRequest(request); + return this.con.post(ProfileService.getEmployeeQualifications, request, onError, errorLabel); + } + public getBasicDFFStrutre(BASICDFFStrutreReq: any, onError?: any, errorLabel?: string): Observable { const request = BASICDFFStrutreReq; this.authService.authenticateRequest(request); diff --git a/Mohem/src/app/time-card/service/time-card.service.ts b/Mohem/src/app/time-card/service/time-card.service.ts index d42b10db..db2b63bc 100644 --- a/Mohem/src/app/time-card/service/time-card.service.ts +++ b/Mohem/src/app/time-card/service/time-card.service.ts @@ -15,6 +15,7 @@ import { GetSwipesResponse } from './models/get-swipes-response'; }) export class TimeCardService { public static getShiftTypeUrl = 'Services/ERP.svc/REST/GET_SHIFT_TYPES'; + public static getEmployeeLeaves = 'Services/ERP.svc/REST/GET_EMPLOYEE_LEAVES'; public static getTimeCardSummaryUrl = 'Services/ERP.svc/REST/GET_TIME_CARD_SUMMARY'; public static getDayHourDetailsUrl = @@ -42,6 +43,21 @@ export class TimeCardService { ); } + public getEmployeeLeaves( + body, + onError?: any, + errorLabel?: string + ): Observable { + const request = body; + this.authService.authenticateRequest(body); + return this.con.post( + TimeCardService.getEmployeeLeaves, + request, + onError, + errorLabel + ); + } + public getTimeCardSummary( timeCardSummaryReq, onError?: any, 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 0ac19449..eca932bf 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 @@ -16,7 +16,7 @@ {{month}} {{year}} - + @@ -28,14 +28,14 @@ {{year}} {{month}} - +
-
+ - +
- {{ts.trPK('attendance','monthly-attendance-calendar')}} + {{ts.trPK('attendance','monthly-attendance-calendar')}}
+
diff --git a/Mohem/src/app/time-card/time-card-details/time-card-details.component.scss b/Mohem/src/app/time-card/time-card-details/time-card-details.component.scss index 735b6c00..c7b257a0 100644 --- a/Mohem/src/app/time-card/time-card-details/time-card-details.component.scss +++ b/Mohem/src/app/time-card/time-card-details/time-card-details.component.scss @@ -724,7 +724,7 @@ $actionBtnSize : 36px; position: relative; background: white; margin-top: 20px; - padding-bottom: 20px; + // padding-bottom: 20px; border-radius: 20px; z-index: 1; margin-bottom: 10px; @@ -860,7 +860,7 @@ $actionBtnSize : 36px; .month-year-span { font-size: 20px; font-family: WorkSans-Bold; - color: #0a5d53; + color: white; } .green-label-container{ 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 4a395f83..7c3933be 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 @@ -8,6 +8,7 @@ import { GetTimeCardSummaryRequest } from 'src/app/time-card/service/models/get- import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response'; import * as moment from 'moment'; import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; +import { last } from '@angular/router/src/utils/collection'; @Component({ selector: 'app-time-card-details', @@ -89,8 +90,29 @@ export class TimeCardDetailsComponent implements OnInit { const index = this.monthsNameArray.indexOf(month); this.month = this.direction === 'ltr' ? month : this.common.getMonthNameAr(index + 1); this.year = year; - this.getTimeCardSummaryDetails(month, year); - this.getDayHoursTypeDetails(month, year); + + // GET_EMPLOYEE_LEAVES + const date = new Date(); + const firstDay = moment(new Date(year, index, 1)).format("YYYY-MM-DD"); + const lastDay = moment(new Date(year, index + 1, 0)).format("YYYY-MM-DD"); + + this.getEmployeeLeaves(firstDay, lastDay); + } + + public getEmployeeLeaves(firstDay, lastDay) { + this.selEmp = this.common.sharedService.getSharedData(MenuResponse.SHARED_SEL_EMP, false); + const body = { + P_SELECTED_EMPLOYEE_NUMBER: this.selEmp, + P_DATE_FROM_STR: firstDay, + P_DATE_TO_STR: lastDay, + P_MENU_TYPE: "E", + P_SELECTED_RESP_ID: -999 + }; + this.timeCardService.getEmployeeLeaves(body).subscribe((result) => { + if (this.common.validResponse(result)) { + this.countAllAttendDays(result.EmployeeLeavesList); + } + }); } public getDayHoursTypeDetails(month?, year?) { @@ -124,32 +146,32 @@ export class TimeCardDetailsComponent implements OnInit { // tslint:disable-next-line:prefer-for-of for (let i = 0; i < allDays.length; i++) { // tslint:disable-next-line: triple-equals - if (allDays[i].ATTENDED_FLAG == 'Y') { + if (allDays[i].LEAVE_TYPE == 'BUSINESS_TRIP') { 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); + allDays[i].customScheduleDate = new Date(allDays[i].EVENT_DATE); // tslint:disable-next-line: triple-equals - } else if (allDays[i].ATTENDED_FLAG == 'N' && allDays[i].ABSENT_FLAG == 'Y') { + } else if (allDays[i].LEAVE_TYPE == 'ABSENCE') { 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); + allDays[i].customScheduleDate = new Date(allDays[i].EVENT_DATE); // tslint:disable-next-line: triple-equals - } else if (allDays[i].ATTENDED_FLAG == 'N' && allDays[i].DAY_TYPE === 'OFF') { + } else if (allDays[i].LEAVE_TYPE == 'HOLIDAY') { 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); + allDays[i].customScheduleDate = new Date(allDays[i].EVENT_DATE); } else { 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); + allDays[i].customScheduleDate = new Date(allDays[i].EVENT_DATE); } } this.showData = true; @@ -196,7 +218,7 @@ export class TimeCardDetailsComponent implements OnInit { } nextSlide() { - if (this.currentMonthName !== this.month) { + // if (this.currentMonthName !== this.month) { this.common.startLoading(); this.showData = false; if (this.nextMonth > 12) { @@ -207,7 +229,7 @@ export class TimeCardDetailsComponent implements OnInit { this.calendarConfig(this.common.getMonthName(this.nextMonth) , this.currentYear); this.nextMonth = this.nextMonth + 1; this.preMonth = this.nextMonth - 2; - } + // } } previousSlide() { diff --git a/Mohem/src/assets/localization/i18n.json b/Mohem/src/assets/localization/i18n.json index a61a6df4..cab219ec 100644 --- a/Mohem/src/assets/localization/i18n.json +++ b/Mohem/src/assets/localization/i18n.json @@ -1093,10 +1093,34 @@ "en": "Basic Details", "ar": "المعلومات الاساسية" }, + "employee-qualifications": { + "en": "Employee Qualifications", + "ar": "مؤهلات الموظف" + }, "full-name": { "en": "Full Name", "ar": "الاسم كامل" }, + "establishment-name": { + "en": "Establishment Name", + "ar": "اسم المؤسسة" + }, + "qualification-grade": { + "en": "Grade", + "ar": "درجة" + }, + "qualification-grade-description": { + "en": "Grade Description", + "ar": "وصف الصف" + }, + "qualification-type": { + "en": "Type", + "ar": "يكتب" + }, + "qualification-status": { + "en": "Status", + "ar": "حالة" + }, "marital-status": { "en": "Marital Status", "ar": "الحالة الاجتماعية" @@ -1244,12 +1268,12 @@ "ar": "هل ترغب في تسجيل الدخول باسم المستخدم الحالي؟" }, "monthly-attendance": { - "en": "Monthly Attendance", - "ar": "الحضور الشهري" + "ar": "التقويم يترك", + "en": "Leaves Calendar" }, "monthly-time-sheet-view": { - "en": "View profile and Personal Information", - "ar": "عرض الملف الشخصي والمعلومات الشخصية" + "en": "View your Leaves Information", + "ar": "عرض معلومات الأوراق الخاصة بك" }, "view-detail": { "en": "View Detail", @@ -1476,8 +1500,8 @@ "ar": "تم تغيير الصورة الشخصية بنجاح" }, "personal-informaion": { - "en": "Personal Informaion", - "ar": "المعلومات الشخصية" + "en": "Employee Leaves Calendar", + "ar": "تقويم إجازات الموظف" }, "family-name": { "en": "Family Name", @@ -1624,12 +1648,12 @@ "en": "Attendance" }, "monthly-attendance": { - "ar": "الحضور الشهري", - "en": "Monthly Attendance" + "ar": "التقويم يترك", + "en": "Leaves Calendar" }, "monthly-attendance-calendar": { - "ar": "سجل الحضور الشهري", - "en": "Monthly Attendance" + "ar": "التقويم يترك", + "en": "Leaves Calendar" }, "completed": { "ar": "منجز", @@ -2011,6 +2035,10 @@ "en": "My Team", "ar": "فريقي" }, + "employee-hierarchy": { + "en": "Hierarchy", + "ar": "تَسَلسُل" + }, "search-email": { "en": "Search By Email", "ar": "البحث عن طريق البريد الإلكتروني" @@ -3608,12 +3636,12 @@ "ar": "وقت العمل لم ينتهي بعد" }, "shift-time": { - "en": "Shift Time", - "ar": "وقت المناوبة " + "en": "Leave Type", + "ar": "نوع الإجازة" }, "shift-type": { - "en": "Shift Type", - "ar": "نوع المناوبة" + "en": "Attendance Type", + "ar": "نوع الحضور" } }, "sms": { diff --git a/Mohem/src/theme/styles.scss b/Mohem/src/theme/styles.scss index 90f1ba3b..87b6656d 100644 --- a/Mohem/src/theme/styles.scss +++ b/Mohem/src/theme/styles.scss @@ -1630,7 +1630,7 @@ div.no-dataDiv { @media screen and (min-width: 361px) { * { - font-size: 11px !important; + font-size: 9px !important; font-weight: normal !important; } } @@ -1659,7 +1659,7 @@ div.no-dataDiv { color: #fff !important; &:before { - background-color: #024d71 !important; + background-color: #004D71 !important; } } @@ -1668,16 +1668,16 @@ div.no-dataDiv { color: #fff !important; &:before { - background-color: #292F42 !important; + background-color: #db5b6a !important; } } &.monthview-selected.dayoff, &.dayoff { - color: #555 !important; + color: #fff !important; &:before { - background-color: #e5e5e5 !important; + background-color: #43a6a0 !important; } }