added employee leaves calendar

MOE-PHASE-2-SPRINT-1
umasoodch 3 years ago
parent 081fea13a7
commit 874b9951be

@ -52,6 +52,15 @@
</ion-label>
</ion-item>
<!-- <ion-item lines="none" (click)="openEmployeeHierarchy()">
<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">
{{ts.trPK('myTeam','employee-hierarchy')}}
</ion-label>
</ion-item> -->
<!-- <ion-item (click)="openMyRequestPage()">
<ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 20px !important;" src="../assets/imgs/hr-request.png" item-left>
@ -188,6 +197,15 @@
{{ts.trPK('myTeam','myTeam-header')}}
</ion-label>
</ion-item>
<!-- <ion-item lines="none" (click)="openEmployeeHierarchy()">
<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">
{{ts.trPK('myTeam','employee-hierarchy')}}
</ion-label>
</ion-item> -->
<!-- <ion-item (click)="openMyRequestPage()">
<ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 14px !important;" src="../assets/imgs/my_team_icon.png" item-left>

@ -263,6 +263,11 @@ export class AppComponent implements OnInit {
this.cs.openMyTeamPage();
}
public openEmployeeHierarchy() {
this.menu.toggle();
this.cs.openEmployeeHierarchy();
}
public openMyRequestPage() {
this.menu.toggle();
this.cs.openMyRequestPage();

@ -103,6 +103,7 @@ import { AttendScanService } from './services/attend-services/attend-scan.servic
import { NgCircleProgressModule } from 'ng-circle-progress';
import { CardFilterComponent } from './ui/card-filter/card-filter.component';
import { EmployeeInformationComponent } from './ui/employee-information/employee-information.component';
import { EmployeeHierarchyCardComponent } from './ui/employee-hierarchy-card/employee-hierarchy-card.component';
import { CircleCalendarComponent } from './ui/circle-calendar/circle-calendar.component';
import { NgCalendarModule } from 'ionic2-calendar';
import { DateInfoModalComponent } from './ui/circle-calendar/date-info-modal/date-info-modal.component';
@ -196,6 +197,7 @@ import { SanitizeHtmlPipe } from '../itemforsale/services/domsafe';
ConfirmLoginComponent,
CardFilterComponent,
EmployeeInformationComponent,
EmployeeHierarchyCardComponent,
ConfirmLoginComponent,
CircleCalendarComponent,
DateInfoModalComponent,
@ -266,6 +268,7 @@ import { SanitizeHtmlPipe } from '../itemforsale/services/domsafe';
ChartModule,
CardFilterComponent,
EmployeeInformationComponent,
EmployeeHierarchyCardComponent,
ConfirmLoginComponent,
CircleCalendarComponent,
DateInfoModalComponent,

@ -1210,6 +1210,9 @@ export class CommonService {
public openMyTeamDetailPage() {
this.nav.navigateForward(['/my-team/details']);
}
public openEmployeeHierarchyPage() {
this.nav.navigateForward(['/my-team/employee-hierarchy']);
}
public openSubordinateLeavePage() {
this.nav.navigateForward(['/my-team/subordinate-leave']);
}
@ -1236,6 +1239,16 @@ export class CommonService {
this.alternateNavigate(CommonService.myTeamDetailUrl, 'teamDetail-open', true);
// this.nav.navigateForward(["/my-team/details"]);
}
//employee hierarchy
public static employeeHierarchyUrl = ['/my-team/employee-hierarchy', '/my-team/employee-hierarchy-2']
public openEmployeeHierarchy() {
this.alternateNavigate(CommonService.employeeHierarchyUrl, 'employeeHierarchy-open', true);
// this.nav.navigateForward(["/my-team/details"]);
}
public openAbsencePage() {
this.nav.navigateForward(['/absence/home']);
}

@ -141,9 +141,8 @@ export class CircleCalendarComponent implements OnInit {
console.log(event.selectedTime.getDate());
const selectedIndex = event.selectedTime.getDate();
this.selectedIndexData = this.dayHoursTypeDetailsList[selectedIndex - 1];
if (this.selectedIndexData.customPresent) {
const rtpID = this.selectedIndexData.RTP_ID;
this.getScheduleShiftDetails(rtpID);
if (this.selectedIndexData.customPresent || this.selectedIndexData.customDaysOff || this.selectedIndexData.customAbsent) {
this.dateModal(this.selectedIndexData);
}
} else {
this.isFirst = true;

@ -1,9 +1,9 @@
<ion-content>
<ion-slides #slides pager="true" [options]="slideOptsOne" (ionSlideDidChange)="slideChanged($event)" class="slider-container">
<ion-slide *ngFor="let shift of SHIFTDETAILS.GetScheduleShiftsDetailsList; let i=index">
<!-- <ion-slides #slides pager="true" [options]="slideOptsOne" (ionSlideDidChange)="slideChanged($event)" class="slider-container">
<ion-slide *ngFor="let shift of SHIFTDETAILS.GetScheduleShiftsDetailsList; let i=index"> -->
<ion-grid class="headerGrid">
<ion-row style="padding: 5px 10px;">
<ion-col size="8">
<!-- <ion-col size="8">
<div style="width: 100%;">
<div class="result-graph">
<div class="result-text-container" [ngStyle]="direction === 'rtl' ? {'left': '65%'} : {}">
@ -13,8 +13,8 @@
<p-chart [ngClass]="direction == 'ltr'? 'today-graph':'today-graph-ar'" type="doughnut" [data]="data" [options]="options"></p-chart>
</div>
</div>
</ion-col>
<ion-col size="4">
</ion-col> -->
<ion-col size="12">
<div class="div" >
<ion-row >
<p class="p0">{{nameDay}}</p>
@ -28,45 +28,45 @@
<ion-row >
<p class="p3">{{year}}</p>
</ion-row>
<ion-row>
<!-- <ion-row>
<p class="p5">{{ts.trPK('attendance','present')}}</p>
</ion-row>
</ion-row> -->
</div>
</ion-col>
</ion-row>
<ion-row class="gridrow">
<ion-col [size]="6" [ngClass]="direction == 'ltr'? 'col':'col-ar'">
<ion-row class="amountlabel"> <p>{{shiftTime}}</p> </ion-row>
<ion-col [size]="12" [ngClass]="direction == 'ltr'? 'col':'col-ar'">
<ion-row class="amountlabel"> <p>{{TODAYDATE.LEAVE_TYPE}}</p> </ion-row>
<ion-row class="rowlabel">
<p >{{ts.trPK('attendance-tracking','shift-time')}}</p>
</ion-row>
</ion-col>
<ion-col [size]="6" style="border-bottom: 1px solid #ccc;">
<ion-row class="amountlabel"><p >{{scheduled}}</p> </ion-row>
<ion-col [size]="12" style="border-bottom: 1px solid #ccc;">
<ion-row class="amountlabel"><p >{{TODAYDATE.ABSENCE_ATTENDANCE_TYPE_NAME}}</p> </ion-row>
<ion-row class="rowlabel">
<p >{{ts.trPK('attendance-tracking','shift-type')}}</p>
</ion-row>
</ion-col>
<ion-col [size]="6" [ngClass]="direction == 'ltr'? 'col':'col-ar'">
<ion-row class="amountlabel"><p >{{actualCheckIn}}</p> </ion-row>
<ion-col [size]="12" [ngClass]="direction == 'ltr'? 'col':'col-ar'">
<ion-row class="amountlabel"><p >{{TODAYDATE.DATE_START}}</p> </ion-row>
<ion-row class="rowlabel">
<p >{{ts.trPK('attendance-tracking','actual-check-in')}}</p>
<p >{{ts.trPK('vacation-rule','start-date')}}</p>
</ion-row>
</ion-col>
<ion-col [size]="6" style="border-bottom: 1px solid #ccc;">
<ion-row class="amountlabel"> <p >{{actualCheckOut}}</p> </ion-row>
<ion-col [size]="12" style="border-bottom: 1px solid #ccc;">
<ion-row class="amountlabel"> <p >{{TODAYDATE.DATE_END}}</p> </ion-row>
<ion-row class="rowlabel">
<p >{{ts.trPK('attendance-tracking','actual-check-out')}} </p>
<p >{{ts.trPK('vacation-rule','end-date')}} </p>
</ion-row>
</ion-col>
<!--
<ion-col [size]="6" [ngClass]="direction == 'ltr'? 'col':'col-ar'">
<ion-row class="amountlabel"><p >{{approvedCheckIn}}</p> </ion-row>
<ion-row class="rowlabel">
@ -107,10 +107,10 @@
<ion-row class="rowlabel">
<p >{{ts.trPK('attendance-tracking','early-out')}}</p>
</ion-row>
</ion-col>
</ion-col> -->
</ion-row>
</ion-grid>
</ion-slide>
</ion-slides>
<!-- </ion-slide>
</ion-slides> -->
</ion-content>

@ -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);
}

@ -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) {

@ -0,0 +1,27 @@
<div class="team-member-container">
<ion-row>
<ion-col [size]="3" (click)="getDetails()">
<div class="user-image-container">
<div class="user-image">
<img [src]="employeeImage" alt="Team Member Image"/>
</div>
</div>
</ion-col>
<ion-col [size]="9" style="padding: 8px 5px 0px;margin-top: 14px;">
<div>
<span [ngClass]=" direction == 'en'? 'employee-name' : 'employee-name-ar'" (click)="getDetails()">
<h2 class="name">{{name}}</h2>
<span class="title">{{title}}</span>
</span>
<a [ngClass]="employeePhoneNumber == '' ? 'disable-phone image-container' : 'image-container'" href="tel:{{employeePhoneNumber}}">
<!-- <img src="../assets/imgs/green_call_icon.png" > -->
<img src="../assets/imgs/call.svg" >
</a>
</div>
<!-- <div class="swipe-information">
<span class="check-in"><strong>Check-In:</strong> {{checkIn}}</span>
<span><strong>Check-Out:</strong> {{checkOut}}</span>
</div> -->
</ion-col>
</ion-row>
</div>

@ -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;
}
}

@ -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<EmployeeHierarchyCardComponent>;
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();
});
});

@ -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();
}
}

@ -51,12 +51,12 @@
<ion-col [size]="8">
<h3>{{'userProfile,personal-informaion' | translate}}</h3>
<span>{{'home,monthly-time-sheet-view' | translate}}</span>
<ion-button (click)="openPersonalInfo()">
<ion-button (click)="openTimeCard()">
{{'home,view-detail' | translate}}
</ion-button>
</ion-col>
<ion-col [size]="4">
<img src="assets/icon/new-design/profile.png"/>
<img src="assets/icon/new-design/attendance_button_icon.png"/>
</ion-col>
</ion-row>

@ -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');
}
});
}

@ -0,0 +1,25 @@
<app-generic-header
showBack="true"
backLink="/home"
[headerText]="'myTeam, employee-hierarchy' | translate">
</app-generic-header>
<ion-content>
<div class="contentBg">
<!-- <ng-container *ngFor="let subordinate of empSubordinate;let i=index">
<app-employee-information
[name]="subordinate.EMPLOYEE_NAME"
[title]="subordinate.POSITION_NAME"
[employeeImage]="subordinate.EMPLOYEE_IMAGE ? 'data:image/png;base64,'+subordinate.EMPLOYEE_IMAGE : '../assets/imgs/profile.png'"
[employeePhoneNumber]="subordinate.EMPLOYEE_MOBILE_NUMBER"
(onGetDetails)="getDetails(i)">
</app-employee-information>
</ng-container> -->
</div>
</ion-content>

@ -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<EmployeeHierarchyComponent>;
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();
});
});

@ -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() {}
}

@ -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 { }

@ -211,6 +211,46 @@
</ion-card-content>
</ion-card>
<!-- <ion-card *ngIf="basicDetailsSegment" [ngClass]="direction === 'ltr'? 'card-size-info-en': 'card-size-info-ar' ">
<ion-card-content *ngIf="!editBasic && employeeQualifications">
<ion-grid>
<ion-row >
<ion-col size="10">
<ion-label>
<h1 [ngClass]="direction === 'ltr'? 'header-label-text-form': 'header-label-text-form-ar' ">{{ts.trPK('general','employee-qualifications')}}</h1>
</ion-label>
</ion-col>
</ion-row>
</ion-grid>
<br>
<ion-label>
<h3 [ngClass]="direction === 'ltr'? 'type-label-text-form': 'type-label-text-form-ar' ">{{ts.trPK('general','establishment-name')}}</h3>
</ion-label>
<h3 [ngClass]="direction === 'ltr'? 'result-label-text-form': 'result-label-text-form-ar' ">{{employeeQualifications.ESTABLISHMENT}}</h3>
<br>
<ion-label>
<h3 [ngClass]="direction === 'ltr'? 'type-label-text-form': 'type-label-text-form-ar' ">{{ts.trPK('general','qualification-grade')}}</h3>
</ion-label>
<h3 [ngClass]="direction === 'ltr'? 'result-label-text-form': 'result-label-text-form-ar' ">{{employeeQualifications.GRADE}}</h3>
<br>
<ion-label>
<h3 [ngClass]="direction === 'ltr'? 'type-label-text-form': 'type-label-text-form-ar' ">{{ts.trPK('general','qualification-grade-description')}}</h3>
</ion-label>
<h3 [ngClass]="direction === 'ltr'? 'result-label-text-form': 'result-label-text-form-ar' ">{{employeeQualifications.GRADE_DESCRIPTION}}</h3>
<br>
<ion-label>
<h3 [ngClass]="direction === 'ltr'? 'type-label-text-form': 'type-label-text-form-ar' ">{{ts.trPK('general','qualification-type')}}</h3>
</ion-label>
<h3 [ngClass]="direction === 'ltr'? 'result-label-text-form': 'result-label-text-form-ar' ">{{employeeQualifications.QUALIFICATION_TYPE}}</h3>
<br>
<ion-label>
<h3 [ngClass]="direction === 'ltr'? 'type-label-text-form': 'type-label-text-form-ar' ">{{ts.trPK('general','qualification-status')}}</h3>
</ion-label>
<h3 [ngClass]="direction === 'ltr'? 'result-label-text-form': 'result-label-text-form-ar' ">{{employeeQualifications.STATUS}}</h3>
<br>
</ion-card-content>
</ion-card> -->
<ion-card *ngIf="contactSegment" [ngClass]="direction === 'ltr'? 'card-size-info-en': 'card-size-info-ar' ">
<ion-card-content *ngIf="!editAddress && employeeAdress">
<ion-grid>

@ -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,

@ -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<any> {
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<any> {
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<any> {
const request = BASICDFFStrutreReq;
this.authService.authenticateRequest(request);

@ -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<any> {
const request = body;
this.authService.authenticateRequest(body);
return this.con.post(
TimeCardService.getEmployeeLeaves,
request,
onError,
errorLabel
);
}
public getTimeCardSummary(
timeCardSummaryReq,
onError?: any,

@ -16,7 +16,7 @@
<span class="month-year-span">{{month}} {{year}}</span>
</ion-col>
<ion-col [size]="2" style="text-align: right;">
<ion-icon *ngIf="currentMonthName !== month" [ngClass]=" currentMonthName === month ? 'disabledArrow' : 'activeArrow'" ios="ios-arrow-dropright-circle" md="md-arrow-dropright-circle" (click)="nextSlide()"></ion-icon>
<ion-icon class="activeArrow" ios="ios-arrow-dropright-circle" md="md-arrow-dropright-circle" (click)="nextSlide()"></ion-icon>
</ion-col>
</ion-row>
@ -28,14 +28,14 @@
<span class="month-year-span">{{year}} {{month}}</span>
</ion-col>
<ion-col [size]="2" style="text-align: left;">
<ion-icon *ngIf="currentMonthName !== month" [ngClass]=" currentMonthName === month ? 'disabledArrow' : 'activeArrow'" ios="ios-arrow-dropleft-circle" md="md-arrow-dropleft-circle" (click)="nextSlide()"></ion-icon>
<ion-icon class="activeArrow" ios="ios-arrow-dropleft-circle" md="md-arrow-dropleft-circle" (click)="nextSlide()"></ion-icon>
</ion-col>
</ion-row>
</div>
</div>
<div class="result-graph">
<div >
<!-- <div >
<span [ngClass]="direction == 'ltr' ? 'request-heading':'request-heading-ar'">{{ts.trPK('myTeam','attendance-statistics')}}</span>
</div>
<div style="position: relative;">
@ -57,9 +57,9 @@
<p-chart class="today-graph" type="doughnut" [data]="data" [options]="options"></p-chart>
</div>
</div>
</div>
</div> -->
<ion-row class="attendance-summary">
<!-- <ion-row class="attendance-summary">
<ion-col [size]="3">
<div class="attendance-information">
<span>{{ts.trPK('attendance-tracking','schedule')}}</span>
@ -87,10 +87,10 @@
<h2>{{timeCardSummaryData.SHORTAGE_HRS}}</h2>
</div>
</ion-col>
</ion-row>
</ion-row> -->
<div *ngIf="showData" [ngClass]="direction == 'ltr' ? 'calendar-container':'calendar-container-ar' ">
<span> {{ts.trPK('attendance','monthly-attendance-calendar')}}</span>
<span style="visibility: hidden;"> {{ts.trPK('attendance','monthly-attendance-calendar')}}</span>
<app-circle-calendar
[currentDateParent]="currentDate"
[dayHoursTypeDetailsList]="dayHoursTypeDetailsList"
@ -98,6 +98,7 @@
(currentYear)=changeYear($event)>
</app-circle-calendar>
</div>
</div>
</div>
</div>

@ -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{

@ -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() {

@ -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": {

@ -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;
}
}

Loading…
Cancel
Save