arabic-version^2
Fatimah.Alshammari 6 years ago
commit 5421842188

1876
Mohem/package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -101,12 +101,13 @@
"cordova.plugins.diagnostic": "^5.0.1",
"core-js": "^2.5.4",
"date-fns": "^1.30.1",
"ionic2-calendar": "^0.5.8",
"mx.ferreyra.callnumber": "0.0.2",
"ng-circle-progress": "^1.5.1",
"ng2-file-upload": "^1.3.0",
"ng2-pdf-viewer": "^5.3.2",
"ngx-gauge": "^1.0.0-beta.10",
"npm": "^6.13.1",
"npm": "^6.13.7",
"phonegap-plugin-barcodescanner": "^8.1.0",
"phonegap-plugin-multidex": "^1.0.0",
"primeicons": "^1.0.0",
@ -139,11 +140,11 @@
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~1.1.2",
"karma-jasmine-html-reporter": "^0.2.2",
"node-sass": "^4.13.0",
"protractor": "~5.4.0",
"node-sass": "^4.13.1",
"protractor": "^5.4.3",
"ts-node": "~8.0.0",
"tslint": "~5.12.0",
"typescript": "~3.1.6"
"typescript": "3.1.6"
},
"description": "An Ionic project",
"cordova": {
@ -201,4 +202,4 @@
"android"
]
}
}
}

@ -109,7 +109,7 @@
<ion-item style="padding-left: 4%;" *ngFor="let employee of approversList">
<div class="timeline-item" slot="start">
<div class="timeline-thumb timeline-icon">
<div [class]="direction == 'en'? 'timeline-thumb-en timeline-icon': 'timeline-thumb-ar timeline-icon'">
<img *ngIf="employee.EMPLOYEE_IMAGE" class="empImge"
[src]="'data:image/png;base64,'+employee.EMPLOYEE_IMAGE">
<img *ngIf="employee.EMPLOYEE_IMAGE == null" class="empImge"

@ -21,6 +21,7 @@ import { SubmitAbsenceModalComponent } from '../submit-absence-modal/submit-abse
styleUrls: ["./absence-confirm.component.scss"]
})
export class AbsenceConfirmComponent implements OnInit {
direction:string;
P_TransactionID: number;
approversList: ApproversList;
selEmp: string = "";
@ -51,7 +52,7 @@ export class AbsenceConfirmComponent implements OnInit {
public WorklistAttachService: WorklistAttachService
) {
this.isSubmitBtnClicked = false;
this.direction = TranslatorService.getCurrentLanguageName()
// this.isResubmitAbs = this.navParams.get("isResubmit");
if (this.isResubmitAbs) {
this.P_TransactionID = this.common.sharedService.getSharedData(

@ -1,20 +1,21 @@
<!-- <ion-header >
<ion-header >
<ion-toolbar class="header-toolbar-new">
<ion-title color="light">{{ts.trPK('absenceList','absenceList')}}</ion-title>
<ion-buttons slot="start">
<nav-buttons></nav-buttons>
</ion-buttons>
<ion-buttons slot="end">
<!-- <ion-buttons slot="end">
<button class="headerBtn" (click)="AccrualBalances()">
<img class="headerImg" src="../assets/imgs/accubalance.png">
</button>
</ion-buttons>
</ion-buttons> -->
</ion-toolbar>
</ion-header> -->
</ion-header>
<ion-content class="colorBG">
<ion-content >
<!-- colorBG -->
<div class="contentEit" style="background: #f3f1f1;">
<div class="header-div">
<!-- <ion-buttons slot="end">
@ -22,10 +23,12 @@
<img class="headerImg" src="../assets/imgs/accubalance.png">
</button>
</ion-buttons> -->
<ion-buttons slot="start">
<!-- <ion-buttons slot="start">
<ion-back-button color="light" class="btnBack" defaultHref="/home"></ion-back-button>
</ion-buttons>
<p class="Title">{{ts.trPK('absenceList','absenceList')}}</p>
<p class="Title">{{ts.trPK('absenceList','absenceList')}}</p> -->
</div>
@ -39,7 +42,7 @@
<div style="color: black;">
<div class="result-graph">
<div>
<div >
<!-- <ion-item> -->
<!-- <ion-label class="datelabel">{{request.P_EFFECTIVE_DATE}}</ion-label> -->
<ion-datetime [(ngModel)]="Sdate" class="datetime" displayFormat="DD MMMM YYYY" placeholder="DD MMMM YYYY"
@ -51,9 +54,11 @@
margin-top: -10px; margin-right: -9px;"></div>
<div class="result-text-container">
<!-- <h2>10</h2> -->
<h2>{{accrualNet + accrualUsed + accrualYearly}}</h2>
<h2>{{totalnumber}}</h2>
<!-- <h2>{{accrualNet + accrualUsed + accrualYearly}}</h2> -->
<span>{{ts.trPK('absenceList','totalNumber')}}</span>
@ -139,7 +144,7 @@
<!-- /////////////////////////////////////////////////////////up -->
<ion-content padding>
<!-- <ion-content padding> -->
<div class="no-dataDiv" *ngIf="!GetAbsenceTransactionList || GetAbsenceTransactionList.length <= 0" >
<ion-row>
@ -245,7 +250,7 @@
<ion-icon class="addClass" name="add" (click)="createAbsence()"></ion-icon>
</div>
</ion-content>
<!-- <ion-footer>
<div class="centerDiv">

@ -144,9 +144,9 @@
border-radius: 20px !important;
padding-top: 28px;
padding-bottom: 14px;
margin-left: 9px;
margin-left: 13px;
margin-right: 13px;
margin-top: -94px;
margin-top: -136px;
margin-bottom: 10px;
}
@ -159,7 +159,7 @@
margin: 0;
position: absolute;
left: 31%;
top: 26%;
top: 23%;
display: block;
text-align: center;
transform: translate(-50%, -50%);
@ -204,4 +204,15 @@ margin-top: -13px;
font-size: 17px;
font-family: WorkSans-Bold;
margin-top: -4px;
}
.contentEit:before {
position: absolute;
content: "";
// background: #22c6b3;
height: 140px;
width: 100%;
left: 0;
top: 0px;
z-index: 1;
}

@ -97,7 +97,8 @@ export class HomeComponent implements OnInit {
this.accrualNet = this.leaveAccrualBalance.ACCRUAL_NET_ENTITLEMENT;
this.accrualUsed = this.leaveAccrualBalance.ACCRUAL_USED_ENTITLEMENT;
this.accrualYearly = this.leaveAccrualBalance.ACCRUAL_YEARLY_ENTITLEMENT;
this.totalnumber= this.accrualNet + this.accrualUsed + this.accrualYearly;
this.totalnumber= this.totalnumber.toFixed(3);
this.request = this.common.sharedService.getSharedData('leaveAccrualBalanceDate', false);
console.log("this.request" + this.request.P_EFFECTIVE_DATE);
this.effectiveDate = this.request.P_EFFECTIVE_DATE;
@ -254,7 +255,8 @@ createAbsence() {
this.accrualNet = this.balance[0].ACCRUAL_NET_ENTITLEMENT;
this.accrualUsed = this.balance[0].ACCRUAL_USED_ENTITLEMENT;
this.accrualYearly = this.balance[0].ACCRUAL_YEARLY_ENTITLEMENT;
this.totalnumber= this.accrualNet + this.accrualUsed + this.accrualYearly;
this.totalnumber= this.totalnumber.toFixed(3);
this.data = {
// labels: ['earingTotal', 'deductionTotal'],
datasets: [

@ -10,21 +10,21 @@
</ion-col> -->
<h2><div class="Header">Confirmation</div></h2>
<h2><div class="Header">{{'eit,confirmation' | translate}}</div></h2>
<div>
<div *ngIf="submitAbsAttachmentList.length==0" class="labelcheck" lines="none" style="text-align: center;">
No Attachment
{{'eit,no-attachment' | translate}}
</div>
<div *ngIf="absComments==''" class="labelcheck" style="text-align: center;margin-bottom: 5px;padding-bottom: 16px;">
No Note
{{'eit,no-note' | translate}}
</div>
</div>
<ion-footer style="border-top: 2px solid grey !important;">
<ion-row class="rowBtn">
<ion-label class="labelRadio">Are you sure you want to submit</ion-label>
<ion-label class="labelRadio">{{'eit,submit' | translate}}</ion-label>
<ion-button class="submitOkButton" (click)="OkBtnModal()"> {{ts.trPK('general','ok')}}
</ion-button>
</ion-row>

@ -1,13 +1,13 @@
import { Injectable } from "@angular/core";
import { Observable } from "rxjs";
import { ConnectorService } from "src/app/hmg-common/services/connector/connector.service";
import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service";
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { ConnectorService } from 'src/app/hmg-common/services/connector/connector.service';
import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service';
@Injectable({
providedIn: "root"
providedIn: 'root'
})
export class AccrualService {
public static GET_ACCRUAL_BALANCE =
"Services/ERP.svc/REST/GET_ACCRUAL_BALANCES";
'Services/ERP.svc/REST/GET_ACCRUAL_BALANCES';
constructor(
public con: ConnectorService,
public authService: AuthenticationService

@ -29,6 +29,10 @@ export class AppComponent implements OnInit, AfterViewInit {
companyDesc: string = "Powered By Cloud Solutions";
public direction = "ltr";
User_Job_name: string;
requestGetLoginInfo: {
DeviceType: string; DeviceToken: string; //this.deviceToken
};
user: boolean;
constructor(
public ts: TranslatorService,
private cs: CommonService,
@ -71,6 +75,7 @@ export class AppComponent implements OnInit, AfterViewInit {
}
private startReceivingPushService() {
console.log("platform.ready")
this.pushService.startReceiving();
}
subscribeEvents() {
@ -159,6 +164,7 @@ export class AppComponent implements OnInit, AfterViewInit {
closeMenu(){
this.menu.toggle();
}
}

@ -15,6 +15,9 @@ import { FilePath } from '@ionic-native/file-path/ngx';
import { File } from '@ionic-native/file/ngx';
import { Base64 } from '@ionic-native/base64/ngx';
import { FirebaseX } from '@ionic-native/firebase-x/ngx';
import { NgCalendarModule } from 'ionic2-calendar';
@NgModule({
declarations: [AppComponent],
entryComponents: [],
@ -25,7 +28,8 @@ import { FirebaseX } from '@ionic-native/firebase-x/ngx';
hardwareBackButton: true,
}),
AppRoutingModule,
HmgCommonModule
HmgCommonModule,
NgCalendarModule
],
providers: [
StatusBar,

@ -4,6 +4,9 @@ import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbore
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import {AttendScanService} from '../../hmg-common/services/attend-services/attend-scan.service';
import { AttendanceTrackingResponse } from 'src/app/hmg-common/services/dashbored/attendance-tracking.response';
import { SharedDataService } from '../../hmg-common/services/shared-data-service/shared-data.service';
import { AuthenticatedUser } from 'src/app/hmg-common/services/authentication/models/authenticated-user';
@Component({
selector: 'app-home',
templateUrl: './home.component.html',
@ -22,11 +25,14 @@ export class HomeComponent implements OnInit {
public isCheckedIn = undefined;
public displayTime: any;
public percent: any;
public spentHours: any;
public userData = this.sharedData.getSharedData(AuthenticatedUser.SHARED_DATA, false);
constructor(
public cs: CommonService,
public db: DashboredService,
public ts: TranslatorService,
public attendScanService: AttendScanService
public attendScanService: AttendScanService,
public sharedData: SharedDataService
) { }
ngOnInit() {
@ -91,12 +97,18 @@ export class HomeComponent implements OnInit {
convertAndAssignTime(data) {
this.remainingTime = this.convertInSeconds(data.P_REMAINING_HOURS.split(':'));
this.scheduledTime = this.convertInSeconds(data.P_SCHEDULED_HOURS.split(':'));
this.isCheckedIn = this.remainingTime === this.scheduledTime ? false : true;
this.initTimer();
}
this.spentHours = this.convertInSeconds(data.P_SPENT_HOURS.split(':'));
this.isCheckedIn = this.spentHours === 0 ? false : true;
if (this.isCheckedIn) {
this.initTimer();
}
}
showAttendanceTracking() {
this.db.getAttendanceTracking() .subscribe((result: AttendanceTrackingResponse) => {
const request = {
P_SELECTED_EMPLOYEE_NUMBER: this.userData.EMPLOYEE_NUMBER
};
this.db.getAttendanceTracking(request).subscribe((result: AttendanceTrackingResponse) => {
if (this.cs.validResponse(result)) {
const key = 'GetAttendanceTrackingList';
this.convertAndAssignTime(result[key]);

@ -7,6 +7,8 @@ import { IonicModule } from '@ionic/angular';
import { AttendancePage } from './attendance.page';
import { HomeComponent } from './home/home.component';
import {MonthlyAttendanceComponent} from './monthly-attendance/monthly-attendance.component';
import { HmgCommonModule } from '../hmg-common/hmg-common.module';
const routes: Routes = [
{
@ -16,6 +18,10 @@ const routes: Routes = [
{
path: 'home',
component: HomeComponent
},
{
path: 'monthlyAttendance',
component: MonthlyAttendanceComponent
}
]
}
@ -26,8 +32,9 @@ const routes: Routes = [
CommonModule,
FormsModule,
IonicModule,
HmgCommonModule,
RouterModule.forChild(routes)
],
declarations: [AttendancePage, HomeComponent]
declarations: [AttendancePage, HomeComponent, MonthlyAttendanceComponent]
})
export class AttendancePageModule {}

@ -0,0 +1,113 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<ion-buttons slot="start">
<ion-back-button color="light" class="btnBack" defaultHref="/home"></ion-back-button>
</ion-buttons>
<ion-title color="light">{{ts.trPK('attendance','attendance')}}</ion-title>
</ion-toolbar>
</ion-header>
<ion-content class="colorBG">
<div class="header-div">
<div class="header-div">
<p style="position: absolute; left: 40%; bottom: 65%;">{{currentMonth}}</p>
<ion-slides>
<ion-slide>
<ion-grid class="headerGrid">
<div style="color: black;">
<!-- <ngx-gauge
[type]="gaugeType"
[value]="gaugeValue"
[label]="gaugeLabel">
</ngx-gauge> -->
<div class="result-graph">
<div class="request-heading">
<span>Open Request Analysis</span>
</div>
<div class="result-text-container">
<h2>287</h2>
<span>TOTAL <br> OPEN REQUEST</span>
</div>
<p-chart class="today-graph" type="doughnut" [data]="data" [options]="options"></p-chart>
</div>
<div style="position: relative;
left: 79%;
bottom: 35px;
color: black;
background-color: #22c6b3;
width: 20%; height: 6px;">
</div>
<div style="position: relative;
left: 79%;
bottom: 20px;
color: black;
background-color: #094875;
width: 20%; height: 6px;">
</div>
</div>
</ion-grid>
</ion-slide>
</ion-slides>
</div>
</div>
<div style="margin-top: 45%;">
<ion-grid>
<ion-row>
<ion-col>
<ion-grid class="labelGrid">
<ion-row>
<ion-col>
<label style="font-size: 13px;">SCHEDULE</label>
</ion-col>
<ion-col>
<h2 style="margin-left: 45%; font-size: 25px;">23</h2>
</ion-col>
</ion-row>
</ion-grid>
</ion-col>
<ion-col>
<ion-grid class="labelGrid">
<ion-row>
<ion-col>
<label style="font-size: 12px;">OFF DAYS</label>
</ion-col>
<ion-col>
<h2 style="margin-left: 45%; font-size: 25px;">08</h2>
</ion-col>
</ion-row>
</ion-grid>
</ion-col>
<ion-col>
<ion-grid class="labelGrid">
<label style="font-size: 13px;">NON ANALYZED</label>
<h2 style="margin-left: 45%; font-size: 25px;">01</h2>
</ion-grid>
</ion-col>
<ion-col>
<ion-grid class="labelGrid">
<label style="font-size: 13px;">SHORTAGE HOURS</label>
<h2 style="margin-left: 45%; font-size: 25px;">03</h2>
</ion-grid>
</ion-col>
</ion-row>
</ion-grid>
</div>
<div >
<ion-grid class="bodyGrid">
<app-circle-calendar></app-circle-calendar>
</ion-grid>
</div>
</ion-content>

@ -0,0 +1,242 @@
.colorBG {
--background: #f0efef;
}
.header-div {
background: #22c6b3;
color: var(--light);
text-transform: capitalize;
display: block;
position: relative;
height: 210px;
margin-bottom: 60px;
}
.chart-modal .modal-Wrapper {
--background: rgb(116, 108, 108) !important;
--border-color:white!important ;
width: 85%!important ;
height: 40px !important ;
}
.navbar{
font-size: 10px !important;
--background: #22C6B3 !important;
color: aliceblue !important;
// margin-top: 10px !important;
}
.menu{
// margin-left:330px !important;
margin-top: 0px !important;
font-size: 35px !important;
background: #22C6B3;
color: aliceblue;
margin-left: 0px !important;
}
.person{
margin-left:100px !important;
margin-top: 0px !important;
font-size: 23px !important;
background: #22C6B3 !important;
color: aliceblue !important;
}
.grid{
margin-bottom: 550px !important;
margin-top: 20px !important;
margin-left: 15px !important;
margin-right: 15px !important;
background-color:white !important;
border-radius: 20px !important;
height: 250px !important;
}
.headerGrid{
margin-bottom: 550px !important;
margin-top: 80px !important;
margin-left: 15px !important;
margin-right: 15px !important;
background-color:white !important;
border-radius: 20px !important;
height: 250px !important;
}
.bodyGrid{
margin-bottom: 550px !important;
margin-top: 20px !important;
margin-left: 15px !important;
margin-right: 15px !important;
background-color:white !important;
border-radius: 20px !important;
height: 270px !important;
}
.labelGrid{
margin-top: -30px !important;
background-color:white !important;
border-radius: 20px !important;
height: 100px !important;
}
.ionSliders{
margin: 0px !important;
padding: 0px !important;
}
.ionSlide{
margin-top: 5px !important;
margin-left: 190px !important;
color: black !important;
}
.dateLable{
margin-left: 90px !important;
color: black !important;
font-size: small !important;
margin-top: 15px !important;
}
// h1{
// font-size: 15px !important;
// text-align: center !important;
// }
.arrowDropright{
margin-left:100px !important;
font-size: 20px !important;
color: rgb(168, 165, 165) !important;
margin-top: 15px !important;
}
.arrowDropleft{
font-size: 20px !important;
margin-left: 10px !important;
margin-top: 15px !important;
color: rgb(116, 108, 108) !important;
}
.ionLable{
font-size: 10px !important;
}
.number{
font-size: 18px !important;
font-weight: bolder !important;
color: black !important;
}
.header-div{
background:var(--primary);
background: -moz-linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%);
background: -webkit-linear-gradient(45deg, (--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%);
background: #22C6B3;
// background: linear-gradient(90deg, #85C48D 0%, #85C48D 13%, #2BB5C6 98%, #2BB5C6 100%);
color:var(--light);
text-transform: capitalize;
display: block;
position: relative;
height: 210px;
margin-bottom:60px;
// border-radius: 0px 0px 70px 70px;
}
.request-heading {
span {
text-align: center;
display: block;
padding-top: 8px;
font-family: workSans-Regular;
}
}
.result-graph {
position: relative;
background: white;
margin-right: 20px;
margin-left: 20px;
margin-top: 20px;
padding-bottom: 20px;
border-radius: 20px;
}
.result-text-container {
padding: 0;
margin: 0;
position: absolute;
left: 50%;
top: 50%;
display: block;
text-align: center;
transform: translate(-50%, -50%);
h2 {
font-size: 38px;
font-family: WorkSans-Bold;
margin: 0 auto;
line-height: 36px;
}
span {
width: 125px;
display: block;
margin: 0 auto;
font-size: 12px;
font-family: workSans-Regular;
}
}

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

@ -0,0 +1,101 @@
import { Component, OnInit } from '@angular/core';
import { CommonService } from '../../hmg-common/services/common/common.service';
import { TranslatorService } from '../../hmg-common/services/translator/translator.service';
import { SharedDataService } from '../../hmg-common/services/shared-data-service/shared-data.service';
import { GetSubordinatesAttdStatusRequest } from 'src/app/hmg-common/services/dashbored/models/GetSubordinatesAttdStatusRequest';
import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbored.service';
import { GetSubordinatesAttdStatusResponse } from 'src/app/hmg-common/services/dashbored/models/GetSubordinatesAttdStatusResponse';
@Component({
selector: 'app-monthly-attendance',
templateUrl: './monthly-attendance.component.html',
styleUrls: ['./monthly-attendance.component.scss'],
})
export class MonthlyAttendanceComponent implements OnInit {
constructor(
private cs: CommonService,
public ts: TranslatorService,
public sharedData: SharedDataService,
public DS: DashboredService) { }
gaugeType = 'full';
gaugeValue = 28.3;
gaugeLabel = 'Days';
// gaugeAppendText = "km/hr";
currentMonth: any;
todayYear: any;
todayMonth: any;
public options = {
cutoutPercentage: 80,
tooltips: { enabled: false },
legend: { display: false }
};
public data = {
datasets: [
{
data: [120, 50],
backgroundColor: [
'#22c6b3',
'#094875',
],
borderWidth: 2
}]
};
ngOnInit() { }
ionViewWillEnter() {
this.currentMonth = this.sharedData.getSharedData("currentMonth");
console.log(this.currentMonth);
let day = this.currentMonth.split(" ");
this.todayMonth =day[0];
this.todayYear = day[1];
this.todayYear = parseInt(this.todayYear);
console.log("MONTH: " +this.todayMonth);
console.log("YEAR: " +this.todayYear);
this.getSubordinatesAttStatus()
}
getSubordinatesAttStatus() {
let request: GetSubordinatesAttdStatusRequest = new GetSubordinatesAttdStatusRequest();
// request.P_SCHEDULE_DATE_FROM = "/Date(1578603600000+0300)/"; //test
// request.P_SCHEDULE_DATE_TO = "/Date(1576011600000+0300)/";//test
console.log(this.currentMonth);
request.SearchMonth = this.todayMonth;
request.SearchYear = 2019//this.todayYear;
this.DS.getSubordinatesAttStatus(request, () => { console.log("Error "); }).subscribe((result: GetSubordinatesAttdStatusResponse) => {
if (this.cs.validResponse(result)) {
console.log("response");
console.log(result);
}
});
}
x(){
console.log("ENAD CHANge")
}
}

@ -0,0 +1,20 @@
import { Injectable } from "@angular/core";
import { Observable } from "rxjs";
import { ConnectorService } from "src/app/hmg-common/services/connector/connector.service";
import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service";
import { attendanceSwipeScannerRequest } from '../models/attendanceSwipe.Request';
@Injectable({
providedIn: "root"
})
export class AttendanceService {
public AttendanceSwipeURL : string ='Services/SWP.svc/REST/AuthenticateAndSwipeUser';
constructor(
public con: ConnectorService,
public authService: AuthenticationService
) {}
public attendanceSwipeScanner(attendanceSwipeScanner: attendanceSwipeScannerRequest, onError?: any, errorLabel?: string): Observable<any> {
const request = attendanceSwipeScanner;
this.authService.authenticateRequest(request);
return this.con.post(this.AttendanceSwipeURL,request,onError,errorLabel);
}
}

@ -1,5 +1,5 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<ion-toolbar class="header-toolbar-new">
<ion-buttons slot="start">
<ion-back-button color="light" class="btnBack" defaultHref="/home"></ion-back-button>
</ion-buttons>

@ -78,6 +78,7 @@ export class CheckUserComponent implements OnInit {
console.log(result);
this.loginData.LogInTokenID = result.LogInTokenID;
this.loginData.P_USER_NAME = this.P_USER_NAME;
// this.loginData.EMPLOYEE_NAME=result.MemberLoginList[0].EMPLOYEE_NAME;
this.sharedData.setSharedData(this.loginData, AuthenticationService.LOGIN_DATA);
this.sharedData.setSharedData(true,Password.IS_FORGET_PSW);
this.cs.stopLoading();

@ -1,5 +1,5 @@
<ion-header *ngIf="!accessFromOutSide">
<ion-toolbar class="header-toolbar">
<ion-toolbar class="header-toolbar-new">
<ion-buttons slot="start">
<nav-buttons [enableMenu]="false" [enableBack]="true" [navigate]="true"></nav-buttons>
</ion-buttons>
@ -28,7 +28,10 @@
<!-- <img [src]="logo" class="loginLogo" />
<h1 class="heading1">{{welcome}} </h1> -->
<!-- <p class="text1" style="margin-bottom: -8px;font-weight: bold;font-size: 22px;">{{ts.trPK('login','Verify-text')}} </p> -->
<p class="text1" style="font-size: 28px;margin-bottom: 0px" >{{empname}}</p>
<!--
<p class="text1" style="font-size: 28px;margin-bottom: 0px" >{{empname}}</p>
-->
</ion-col>
</ion-row> <div *ngIf="onlySMSBox"><p>{{ts.trPK('login','verify-login-with')}}</p></div>
<!-- <type-writer *ngIf="!onlySMSBox" [text]="'login, verify-fingerprint' | translate" class="description"

@ -29,6 +29,7 @@ import { PushService } from 'src/app/hmg-common/services/push/push.service';
import { Platform } from '@ionic/angular';
import { CheckUserAuthenticationResponse } from 'src/app/hmg-common/services/authentication/models/check-user-auth.response';
import { LoginModel } from '../models/LoginModel';
import * as moment from "moment";
@ -70,6 +71,8 @@ export class ConfirmLoginComponent implements OnInit {
password:any;
loginType: any;
empname: string;
lastLoginDate: string;
user_name: string;
constructor(
@ -120,6 +123,7 @@ export class ConfirmLoginComponent implements OnInit {
this.password = localStorage.getItem("password");
this.empname = localStorage.getItem("emp-name");
}
@ -674,9 +678,9 @@ export class ConfirmLoginComponent implements OnInit {
console.log("authService.getLoginInfo");
if(result.Mohemm_GetPatientID_List.length > 0){
if(result.Mohemm_GetMobileLoginInfoList.length > 0){
if ( result.Mohemm_GetPatientID_List[0].LoginType == 2 || result.Mohemm_GetPatientID_List[0].LoginType == 3) {
if ( result.Mohemm_GetMobileLoginInfoList[0].LoginType == 2 || result.Mohemm_GetMobileLoginInfoList[0].LoginType == 3) {
this.loginTokenID = result.LogInTokenID;
//send silent sms
@ -742,6 +746,11 @@ export class ConfirmLoginComponent implements OnInit {
console.log("insert");
localStorage.setItem("emp-name",result.MemberInformationList[0].EMPLOYEE_NAME);
console.log("empnmae: "+ localStorage.getItem("emp-name"));
this.user_name=result.MemberInformationList[0].EMPLOYEE_NAME;
//get date and time of last login
let currDateTime = moment().format('MMM DD , YYYY HH:mm')
localStorage.setItem("login-at",currDateTime);
if (this.platform.is("cordova")) {
this.insertMobileLogin();
@ -781,12 +790,13 @@ export class ConfirmLoginComponent implements OnInit {
request.DeviceType= this.cs.getDeviceType();
request.DeviceToken=this.deviceToken;
request.DeviceToken="5ca8a69cf1804db55264c349edffb99b9d63acd9fa9b6b18956bcb2ad3f2ba36";//this.deviceToken;
//request.TokenID=
request.LoginType=this.selectedOption;
request.EmployeeName=this.user_name;
this.authService
@ -840,10 +850,13 @@ private checkUserAuthentication() {
console.log("this.loginData before "+ this.loginData);
this.loginData = new LoginModel();
console.log("this.loginData after "+ this.loginData);
// console.log("result.MemberLoginList.EMPLOYEE_NAME "+ result.MemberInformationList[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.EmployeeName = this.user_name;
this.sharedData.setSharedData(this.loginData, AuthenticationService.LOGIN_DATA);
this.cs.sharedService.setSharedData(this.loginData.P_USER_NAME, LoginRequest.SHARED_DATA);
//this.remeberMyInfo();

@ -1,5 +1,5 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<ion-toolbar class="header-toolbar-new">
<ion-buttons slot="start">
<nav-buttons [enableMenu]="false" [enableBack]="true" [navigate]="true"></nav-buttons>
</ion-buttons>

@ -5,7 +5,7 @@
<img class="centerDiv" src="../assets/imgs/header.png" />
</ion-col>
</ion-row> -->
<ion-row *ngIf="loginDiv">
<ion-row *ngIf="!user">
<div class="content">
@ -19,7 +19,7 @@
</div>
</ion-row>
<ion-row *ngIf="welcomeBack ">
<ion-row *ngIf="user ">
<ion-col [size]="4">
<img [src]="logo" class="logo" />
@ -30,12 +30,12 @@
<ion-row>
<ion-col *ngIf="loginDiv">
<ion-col *ngIf="!user">
<P class="pageTitle text-caps">{{ts.trPK('login','login')}}</P>
</ion-col>
</ion-row>
</ion-grid>
<div *ngIf="loginDiv">
<div *ngIf="!user">
<ion-item class="item-input-login">
<img class="item-icon" src="assets/imgs/username.png" item-start />
<ion-input class="login-input" required type="text" [(ngModel)]="username" placeholder="{{ts.trPK('login','username')}}">
@ -73,7 +73,7 @@
<!-- div login-->
<!-- <div *ngIf="welcomeBack"> -->
<welcome-login (onLogin)="login()" (loginWithUser)="loginWithUser()" *ngIf="welcomeBack ">
<welcome-login (onLogin)="login()" (loginWithUser)="loginWithUser()" *ngIf="user ">
</welcome-login>
<!-- </div> -->
@ -83,7 +83,7 @@
</ion-content>
<ion-footer *ngIf="loginDiv">
<ion-footer *ngIf="!user">
<div class="centerDiv">
<ion-button class="button-login" (click)="onLogin()">{{ts.trPK('login','login')}}</ion-button>
</div>

@ -45,7 +45,10 @@ export class LoginComponent implements OnInit, OnDestroy {
public loginDiv:boolean =true;
public welcomeBack:boolean =false;
public logo = "assets/icon/login/password.png";
deviceToken: any="";
user: boolean =false;
DeviceType: string;
requestGetLoginInfo:any;
constructor(
public cs: CommonService,
@ -64,25 +67,61 @@ export class LoginComponent implements OnInit, OnDestroy {
) { }
ngOnInit() {
// this.deviceToken= this.cs.sharedService.getSharedData(AuthenticationService.DEVICE_TOKEN, false);
// console.log("get deviceToken login"+ this.deviceToken)
this.deviceToken= localStorage.getItem('devicyeToken');
console.log("let deviceToken" + this.deviceToken);
if (this.deviceToken) {
console.log('login enabled first time: ' + this.deviceToken);
} else {
console.log("no deviceToken" );
this.pushService.startReceiving();
setTimeout(() => {
this.deviceToken= localStorage.getItem('deviceToken');
console.log('login enabled second time: ' + this.deviceToken);
}, 1000);
}
setTimeout(() => {
this.getLastLoginInfo();
},5000);
//here will delete below part and depdding on user (response from getMobileInfo)
this.username = localStorage.getItem("user");
this.password = localStorage.getItem("password");
let remember = localStorage.getItem("remember");
this.password = localStorage.getItem("password"); //****//
let remember = localStorage.getItem("remember");//****//
this.empname= localStorage.getItem("emp-name");
this.logintype= localStorage.getItem("login-type");
if (remember == "true") { this.remeberMe = true } else { this.remeberMe = false }
if(this.username || this.empname){
this.loginDiv=false;
this.welcomeBack=true;
//here will be check on user if exite then s part and depdding on user (response from getMobileInfo)
if(this.user){
// this.loginDiv=false;
// this.welcomeBack=true;
}else{
this.loginDiv=true;
this.welcomeBack=false;
// this.user=true;
// this.welcomeBack=false;
}
// alert("user>>" + this.username);
// alert("pass>>>" + this.password);
// alert("remember>>>" + this.remeberMe);
/// call getLoginInfo
}
ngOnDestroy(): void {
@ -125,20 +164,24 @@ export class LoginComponent implements OnInit, OnDestroy {
}
public onLogin() {
// console.log("onLogin");
console.log("onLogin");
// this.checkAppUpdated();
// this.checkUserAuthentication();
let deviceToken = localStorage.getItem('deviceToken');
if (deviceToken) {
console.log('login enabled first time: ' + deviceToken);
this.deviceToken = localStorage.getItem('deviceToken');
console.log("let deviceToken" + this.deviceToken);
if (this.deviceToken) {
console.log('login enabled first time: ' + this.deviceToken);
this.checkAppUpdated();
} else {
console.log("no deviceToken" );
this.pushService.startReceiving();
setTimeout(() => {
deviceToken = localStorage.getItem('deviceToken');
this.deviceToken = localStorage.getItem('deviceToken');
this.checkAppUpdated();
console.log('login enabled second time: ' + deviceToken);
console.log('login enabled second time: ' + this.deviceToken);
}, 1000);
}
}
@ -194,9 +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);
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.sharedData.setSharedData(this.loginData, AuthenticationService.LOGIN_DATA);
this.cs.sharedService.setSharedData(this.loginData.P_USER_NAME, LoginRequest.SHARED_DATA);
this.remeberMyInfo();
@ -279,6 +325,8 @@ 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.cs.sharedService.setSharedData(this.loginData.P_USER_NAME, LoginRequest.SHARED_DATA);
this.sharedData.setSharedData(this.loginData, AuthenticationService.LOGIN_DATA);
this.sharedData.setSharedData(true, Password.IS_FORGET_PSW);
@ -292,8 +340,8 @@ export class LoginComponent implements OnInit, OnDestroy {
console.log("login emit");
console.log("login");
// this.checkUserAuthentication();
this.loginDiv=true;
this.welcomeBack=false;
//this.loginDiv=true;
this.user=false;
}
@ -302,4 +350,33 @@ export class LoginComponent implements OnInit, OnDestroy {
this.cs.openConfirmLoginPage();
}
///
getLastLoginInfo(){
this.requestGetLoginInfo= {
DeviceType:this.cs.getDeviceType(),
DeviceToken:this.deviceToken//"5ca8a69cf1804db55264c349edffb99b9d63acd9fa9b6b18956bcb2ad3f2ba36"//this.deviceToken
}
this.authService.getLoginInfo(this.requestGetLoginInfo,() => {}, this.ts.trPK('general', 'ok')).subscribe(res => {
if (this.cs.validResponse(res)) {
if(res.Mohemm_GetMobileLoginInfoList.length > 0){
this.cs.sharedService.setSharedData(
// res.Patient_SELECTDeviceIMEIbyIMEIList[0],
res.Mohemm_GetMobileLoginInfoList[0],
AuthenticationService.IMEI_USER_DATA
);
this.user = true;
}
else{
this.user=false
}
}
});
}
}

@ -3,4 +3,7 @@ export class LoginModel {
activationCode: string;
P_USER_NAME: string;
MobileNumber: string;
EMPLOYEE_DISPLAY_NAME: string;
EMPLOYEE_NAME:string;
EmployeeName:string;
}

@ -1,5 +1,5 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<ion-toolbar class="header-toolbar-new">
<ion-buttons slot="start">
<nav-buttons [enableMenu]="false" [enableBack]="true" [navigate]="true"></nav-buttons>
</ion-buttons>

@ -22,6 +22,7 @@ import { SMSCheckResponse } from "src/app/hmg-common/services/authentication/mod
import { Password } from "../models/password";
import { GetLoginInfoRequest } from 'src/app/hmg-common/services/authentication/models/get-login-info.request';
import * as moment from "moment";
@ -79,6 +80,7 @@ export class SmsPageComponent implements OnInit {
public smc_code: any = [];
code: any;
user_name: string;
constructor(
@ -346,6 +348,12 @@ export class SmsPageComponent implements OnInit {
console.log("insert");
localStorage.setItem("emp-name",result.MemberInformationList[0].EMPLOYEE_NAME);
console.log("empnmae: "+ localStorage.getItem("emp-name"));
// localStorage.setItem("login-at", new Date().toISOString());
this.user_name=result.MemberInformationList[0].EMPLOYEE_NAME;
//get date and time of last login
let currDateTime = moment().format('MMM DD , YYYY HH:mm')
localStorage.setItem("login-at",currDateTime);
if (this.platform.is("cordova")) {
// localStorage.setItem("full-name", result.P_USER_NAME);
@ -370,7 +378,7 @@ export class SmsPageComponent implements OnInit {
public insertMobileLogin(){
// alert("insertMobileLogin");
console.log("loginData" + this.loginData);
let request = new GetLoginInfoRequest();
@ -388,10 +396,12 @@ export class SmsPageComponent implements OnInit {
request.DeviceType= this.common.getDeviceType();
request.DeviceToken=this.deviceToken;
request.DeviceToken=this.deviceToken;//"5ca8a69cf1804db55264c349edffb99b9d63acd9fa9b6b18956bcb2ad3f2ba36";//this.deviceToken;
request.LoginType=this.loginTypeData.loginType;
request.EmployeeName=this.user_name;
this.authService
.insertMobileLoginInfo(

@ -104,7 +104,7 @@
<ion-item style="padding-left: 4%;" *ngFor="let employee of approversList">
<div class="timeline-item" slot="start">
<div class="timeline-thumb timeline-icon">
<div [class]="direction == 'en'? 'timeline-thumb-en timeline-icon': 'timeline-thumb-ar timeline-icon'">
<img *ngIf="employee.EMPLOYEE_IMAGE" class="empImge"
[src]="'data:image/png;base64,'+employee.EMPLOYEE_IMAGE">
<img *ngIf="employee.EMPLOYEE_IMAGE == null" class="empImge"

@ -60,9 +60,11 @@ export class ConfirmAddEitComponent implements OnInit {
TransactionID: any;
indexLastObj: any = 0;
filterAllowedType: any = ['application/pdf', 'image/jpeg', 'image/png', 'text/plain', 'image/jpg', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'];
direction: string;
constructor(public modalController: ModalController, public cs: CommonService, private ts: TranslatorService, private eitService: EitService) {
this.direction = TranslatorService.getCurrentLanguageName()
this.isSubmitBtnClicked = false;
this.eitRequest = new EitRequest();
}

@ -1,17 +1,16 @@
<ion-header>
<ion-toolbar class="header-toolbar-new">
<nav-buttons [enableMenu]="false" [enableBack]="true" [navigate]="true"></nav-buttons>
<!-- <nav-buttons [ngClass]="direction == 'rtl'? 'icon-right' : 'icon-left' " [enableMenu]="false" [enableBack]="true" [navigate]="true"></nav-buttons> -->
<ion-title>{{headerTitle}}</ion-title>
<nav-buttons [enableMenu]="false" [enableBack]="true" [navigate]="true"></nav-buttons>
<ion-title style="color: white;">{{headerTitle}}</ion-title>
</ion-toolbar>
</ion-header>
<ion-content class="colorBG">
<div class="" [hidden]="functionName!='HMG_TKT_NEW_EIT_SS'">
<ion-content>
<div class="">
<!-- class="colorBG" -->
<div class="content" [hidden]="functionName!='HMG_TKT_NEW_EIT_SS'">
<ion-grid class="headerGrid" style="padding-top: 30%;">
<ion-grid class="headerGrid">
<p class="title">{{ts.trPK('absenceList','tickets-balance')}}</p>
<div style="color: black;">
@ -27,7 +26,7 @@
<div class="light-dote"></div>
<!-- </ion-col>
<ion-col> -->
<label class="light-label">{{ts.trPK('absenceList','adult')}}</label>
<label [ngClass]="direction == 'en' ? 'light-label':'light-label-ar' ">{{ts.trPK('absenceList','adult')}}</label>
</ion-col>
<ion-col class="col" size="4">
<div class="blue-dote"></div>
@ -39,7 +38,7 @@
<div class="green-dote"></div>
<!-- </ion-col>
<ion-col> -->
<label class="green-label">{{ts.trPK('absenceList','infants')}} </label>
<label [ngClass]="direction == 'en'? 'green-label':'green-label-ar'">{{ts.trPK('absenceList','infants')}} </label>
</ion-col>
</ion-row>
@ -55,7 +54,7 @@
<div class="gridService">
<ion-row>
<ion-col class="columns">
<div class="adult-dote"></div>
<div [class]="direction =='en'? 'adult-dote':'adult-dote-ar'"></div>
<label>{{ts.trPK('absenceList','adult')}}</label>
<br>
<br>
@ -63,7 +62,7 @@
<br> <label class="services">{{ts.trPK('absenceList','tickets')}}</label>
</ion-col>
<ion-col class="columns">
<div class="child-dote"></div>
<div [ngClass]="direction == 'en'? 'child-dote' :'child-dote-ar'"></div>
<label>{{ts.trPK('absenceList','child')}} </label>
<br>
<br>
@ -72,7 +71,7 @@
<br> <label class="services">{{ts.trPK('absenceList','tickets')}}</label>
</ion-col>
<ion-col class="columns">
<div class="infants-dote"></div>
<div [ngClass]="direction == 'en'? 'infants-dote': 'infants-dote-ar'"></div>
<label>{{ts.trPK('absenceList','infants')}} </label>
<br>
<br>
@ -226,6 +225,7 @@
<ion-infinite-scroll-content></ion-infinite-scroll-content>
</ion-infinite-scroll>
</div>
</ion-content>
<ion-footer>
@ -235,4 +235,5 @@
<!-- <ion-button class="footer-button" color="customnavy" ion-button (click)="addEITRrq()">
{{'general, add' | translate}}</ion-button> -->
</div>
</ion-footer>

@ -85,6 +85,17 @@ h4 {
}
////////////////////////////////
.content:before {
position: absolute;
content: "";
background: #22c6b3;
height: 140px;
width: 100%;
left: 0;
top: 0px;
z-index: 1;
}
.colorBG{
--background: #f0efef;
@ -99,7 +110,7 @@ h4 {
.title{
text-align: center;
color: black;
margin-top: -10px;
margin-top: 5px;
font-size: 17px;
}
.today-graph{
@ -111,22 +122,37 @@ h4 {
}
.headerGrid{
// background-color: white !important;
// border: 1px solid #cac8c8 !important;
// border-radius: 20px !important;
// padding-top: 28px;
// padding-bottom: 53px;
// margin-left: 9px;
// margin-right: 13px;
// margin-top: -94px;
// margin-bottom: 10px;
background-color: white !important;
border: 1px solid #cac8c8 !important;
border-radius: 20px !important;
padding-top: 28px;
/* padding-top: 28px; */
padding-bottom: 53px;
margin-left: 9px;
padding-top: -30px;
margin-left: 13px;
margin-right: 13px;
margin-top: -94px;
/* margin-top: -86px; */
margin-bottom: 10px;
position: relative;
z-index: 1;
border-radius: 20px;
margin-top: 17px;
}
.result-graph{
font-size: 14px;
margin-left: -48px;
margin-right: 3px;
margin-bottom: -30px;
}
.green-label{
@ -134,6 +160,11 @@ h4 {
margin-left: 7px !important;
margin-right: 42px;
}
.green-label-ar{
font-size: 15px !important;
margin-left: 7px !important;
margin-right: 15px;
}
.blue-label{
font-size: 15px !important;
margin-left: 7px !important;
@ -144,6 +175,11 @@ h4 {
margin-left: 7px !important;
margin-right: -26px;
}
.light-label-ar{
font-size: 15px !important;
margin-right: 7px !important;
margin-left: -26px;
}
.light-dote{
background-color: #3CB9D5;
@ -215,6 +251,16 @@ h4 {
margin-left: -17px;
margin-right: 5px;
}
.adult-dote-ar{
background-color: #3CB9D5;
width: 15px;
height: 15px;
border-radius: 50% !important;
display: inline-block;
margin-right: 0px;
margin-left: 5px;
}
.child-dote{
background-color: #22C6B3;
@ -225,6 +271,15 @@ h4 {
margin-left: -17px;
margin-right: 5px;
}
.child-dote-ar{
background-color: #22C6B3;
width: 15px;
height: 15px;
border-radius: 50% !important;
display: inline-block;
margin-right: 1px;
margin-left: 5px;
}
.infants-dote{
background-color: #1FA269;
width: 15px;
@ -235,9 +290,14 @@ h4 {
margin-right: 5px;
// margin-bottom: 6px;
}
// .icon-left{
// margin-left: 10px;
// }
// .icon-right{
// margin-left: 3px;
// }
.infants-dote-ar{
background-color: #1FA269;
width: 15px;
height: 15px;
border-radius: 50% !important;
display: inline-block;
margin-right: 1px;
margin-left: 5px;
}

@ -44,7 +44,6 @@ export class EitListComponent implements OnInit {
accrualNetInfants: any;
accrualUNetChild: any;
accrualNetAdult: any;
public options = {
cutoutPercentage: 80,
@ -53,10 +52,12 @@ export class EitListComponent implements OnInit {
gaugeType = "full";
accrualBalancesList: any;
common: any;
direction: string;
// gaugeValue = 11.200;
// gaugeLabel = "";
constructor(private cs: CommonService, private EITService: EitService, private ts: TranslatorService, private modalCtrl: ModalController) {
this.direction = TranslatorService.getCurrentLanguageName()
this.selMenu = this.cs.sharedService.getSharedData(MenuResponse.SHARED_DATA, false);
this.selEmp = this.cs.sharedService.getSharedData(MenuResponse.SHARED_SEL_EMP, false);
this.respID = this.cs.sharedService.getSharedData(MenuResponse.SHARED_SEL_RESP_ID, false);
@ -81,6 +82,7 @@ export class EitListComponent implements OnInit {
this.accrualNetAdult = this.accrualBalancesList[1].ACCRUAL_NET_ENTITLEMENT;
this.accrualUNetChild = this.accrualBalancesList[2].ACCRUAL_NET_ENTITLEMENT;
this. accrualNetInfants= this.accrualBalancesList[3].ACCRUAL_NET_ENTITLEMENT;
this.data = {
// labels: ['earingTotal', 'deductionTotal'],
datasets: [

@ -13,8 +13,49 @@
<ion-content>
<ion-list style="margin-top: 40px;border-top: 1px solid #c8c8c8;">
<!--From Home List-->
<ion-list style="margin-top: 40px;border-top: 1px solid #c8c8c8;" [hidden]="pageType=='myteam'" *ngIf="pageType=='home'">
<ion-item lines="none" class="custCollabs ion-item-styling" *ngFor="let menuItem of menu.children; let i=index"
(click)="openPage(menuItem, i);">
<ion-row style="width: 100%;">
<!-- Parent Pages -->
<ion-col size="12" class="">
<div [ngClass]="{'selectedDiv': selectedMenu == i,'notSelected': selectedMenu != i }">
<ion-label>
<b text-wrap>{{menuItem.PROMPT}}</b>
<ion-icon [ngClass]='direction == "en"? "span-arrow-en":"span-arrow-ar"' name="arrow-forward"></ion-icon>
</ion-label>
</div>
<!-- Child Pages -->
<ion-list [hidden]="selectedMenu != i" lines="full">
<ion-item lines="full" class="" *ngFor="let subPage of menuItem.children;let i2=index" text-wrap
(click)="openPage(subPage)">
<!-- <ion-row>
<ion-col size="10" class="menu-name"><span ion-text color="color2">&nbsp;{{subPage.PROMPT}} </span> -->
<ion-label><span ion-text color="color2">&nbsp;{{subPage.PROMPT}} </span>
<ion-icon [ngClass]='direction == "en"? "span-arrow-en":"span-arrow-ar"' name="arrow-forward"></ion-icon>
</ion-label>
<!-- </ion-col>
</ion-row> -->
</ion-item>
</ion-list>
</ion-col>
</ion-row>
<!-- <ion-icon [name]="selectedMenu == i? 'ios-arrow-down' : 'ios-arrow-forward'"
*ngIf="menuItem.children && menuItem.MENU_ENTRY_TYPE=='MENU'" slot="end" class="arrow-down"></ion-icon> -->
</ion-item>
</ion-list>
<!--From My Team List-->
<ion-list style="margin-top: 40px;border-top: 1px solid #c8c8c8;" [hidden]="pageType=='home'" *ngIf="pageType=='myteam'">
<ion-item lines="none" class="custCollabs ion-item-styling" *ngFor="let menuItem of menu; let i=index"
(click)="openPage(menuItem, i);">
<ion-row style="width: 100%;">
<!-- Parent Pages -->
@ -47,4 +88,5 @@
*ngIf="menuItem.children && menuItem.MENU_ENTRY_TYPE=='MENU'" slot="end" class="arrow-down"></ion-icon> -->
</ion-item>
</ion-list>
</ion-content>

@ -67,9 +67,16 @@ ion-icon::before {
// border-bottom: 1px solid #dedede;
// }
// .icon-left{
// margin-left: 10px;
// }
// .icon-right{
// margin-left: 3px;
// }
.span-arrow-en{
float: right;
font-size: 25px;
color: grey;
transform: rotate(0deg);
}
.span-arrow-ar{
float: left;
font-size: 25px;
color: grey;
transform: rotate(180deg);
}

@ -16,9 +16,13 @@ export class HomeComponent implements OnInit {
selMenu: MenuResponse = new MenuResponse();
// Selected Side Menu
selectedMenu: any;
direction: string;
pageType :string;
constructor(private cs: CommonService, private ts: TranslatorService) {
this.direction = TranslatorService.getCurrentLanguageName()
this.menu = this.cs.sharedService.getSharedData('menuEntries', false);
this.pageType = this.cs.sharedService.getSharedData('homemenuentries', false);
this.selMenu = this.cs.sharedService.getSharedData(MenuResponse.SHARED_DATA, false);
const title: string = this.ts.trPK('eit', 'my-requests');
this.headerTitle = this.menu.PROMPT ? this.menu.PROMPT : title;
@ -56,6 +60,9 @@ export class HomeComponent implements OnInit {
if (menuEntry.REQUEST_TYPE === 'PAYSLIP'){
this.cs.openPayslipPage();
}
if (menuEntry.REQUEST_TYPE === 'TIME_CARD') {
this.cs.openTimeCardPage();
}
}
}

@ -10,21 +10,21 @@
</ion-col> -->
<h2><div class="Header">Confirmation</div></h2>
<h2><div class="Header">{{'eit,confirmation' | translate}}</div></h2>
<div>
<div *ngIf="submitAttachmentList.length==0" class="labelcheck" lines="none" style="text-align: center;">
No Attachment
{{'eit,no-attachment' | translate}}
</div>
<div *ngIf="eitComments==''" class="labelcheck" style="text-align: center;margin-bottom: 5px;padding-bottom: 16px;">
No Note
{{'eit,no-note' | translate}}
</div>
</div>
<ion-footer style="border-top: 1px solid grey !important;">
<ion-row class="rowBtn">
<ion-label class="labelRadio">Are you sure you want to submit</ion-label>
<ion-label class="labelRadio">{{'eit,submit' | translate}}</ion-label>
<ion-button class="submitOkButton" (click)="OkBtnModal()"> {{ts.trPK('general','ok')}}
</ion-button>
</ion-row>

@ -101,7 +101,7 @@ import { OpenNativeSettings } from '@ionic-native/open-native-settings/ngx';
import { AccordinCustomComponent } from './ui/accordin-custom/accordin-custom.component';
import { AccordinTabCustomComponent} from './ui/accordin-custom/accordin-tab-custom/accordin-tab-custom.component'
import {DashboredService} from './services/dashbored/dashbored.service';
// import {NgxGaugeModule} from 'ngx-gauge';
import {NgxGaugeModule} from 'ngx-gauge';
import { StatsButtonComponent } from './ui/stats-button/stats-button.component';
import { ServicesButtonComponent } from './ui/services-button/services-button.component';
import {ConfirmLoginComponent} from '../authentication/confirm-login/confirm-login.component'
@ -110,9 +110,12 @@ import {FabButtonComponent} from './ui/fab-button/fab-button.component'
import { AttendScanService } from './services/attend-services/attend-scan.service';
import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';
import { NgCircleProgressModule } from 'ng-circle-progress';
import {ChartModule} from 'primeng/chart';
import { CardFilterComponent} from './ui/card-filter/card-filter.component';
import { CardFilterComponent } from './ui/card-filter/card-filter.component';
import { EmployeeInformationComponent } from './ui/employee-information/employee-information.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';
import { ChartModule } from 'primeng/chart';
@NgModule({
imports: [
CommonModule,
@ -124,8 +127,9 @@ import { CardFilterComponent} from './ui/card-filter/card-filter.component';
ListboxModule,
PdfViewerModule,
NgCircleProgressModule.forRoot(),
NgCalendarModule,
ChartModule,
// NgxGaugeModule
NgxGaugeModule
],
declarations: [
FabButtonComponent,
@ -187,7 +191,12 @@ import { CardFilterComponent} from './ui/card-filter/card-filter.component';
StatsButtonComponent,
ServicesButtonComponent,
ConfirmLoginComponent,
CardFilterComponent
CardFilterComponent,
EmployeeInformationComponent,
ConfirmLoginComponent,
CircleCalendarComponent,
DateInfoModalComponent
],
exports: [
FabButtonComponent,
@ -243,13 +252,20 @@ import { CardFilterComponent} from './ui/card-filter/card-filter.component';
FileUploderProfileComponent,
AccordinTabCustomComponent,
AccordinCustomComponent,
// NgxGaugeModule,
NgxGaugeModule,
StatsButtonComponent,
ServicesButtonComponent,
ConfirmLoginComponent,
NgCircleProgressModule,
ChartModule,
CardFilterComponent
CardFilterComponent,
EmployeeInformationComponent,
ConfirmLoginComponent,
CircleCalendarComponent,
DateInfoModalComponent,
NgCalendarModule,
ChartModule
],
providers: [
AttendScanService,
@ -293,7 +309,8 @@ import { CardFilterComponent} from './ui/card-filter/card-filter.component';
MenuService,
OpenNativeSettings,
BarcodeScanner
]
],
entryComponents: [DateInfoModalComponent],
})
export class HmgCommonModule { }

@ -55,7 +55,7 @@ export class AuthenticationService {
public static smsSendCode='Services/ERP.svc/REST/SendPublicActivationCode';
public static sendActivationCodeByType = 'Services/ERP.svc/REST/Mohemm_SendActivationCodebyOTPNotificationType';
public static getMobileLoginInfo ='Services/ERP.svc/REST/Mohemm_GetMobileLoginInfo';
public static getMobileLoginInfo ='Services/ERP.svc/REST/Mohemm_GetMobileLoginInfo_NEW';//Mohemm_GetMobileLoginInfo
public static insertMobileLoginInfo ='Services/ERP.svc/REST/Mohemm_InsertMobileLoginInfo';
/* register methods */
@ -82,6 +82,7 @@ export class AuthenticationService {
public static LOGIN_DATA="logindata";
public static DEVICE_TOKEN = "device_token";
public static LAST_LOGIN = 'last-login';
public static IMEI_USER_DATA = "imei-user-data";
// private static user: AuthenticatedUser;
@ -107,7 +108,6 @@ export class AuthenticationService {
request.P_USER_NAME = user.EMPLOYEE_NUMBER;
request.UserName = user.EMPLOYEE_NUMBER;
request.P_EMAIL_ADDRESS = user.EMPLOYEE_EMAIL_ADDRESS;
if (AuthenticationService.requireRelogin) {
this.sessionTimeOutDialog();
}
@ -304,11 +304,11 @@ export class AuthenticationService {
}
public getLoginInfo(
request: GetLoginInfoRequest,
request: any,
onError: any,
errorLabel: string
): Observable<GetLoginInfoResponse> {
this.setPublicFields(request);
//this.setPublicFields(request);
return this.con.post(
AuthenticationService.getMobileLoginInfo,
request,

@ -20,5 +20,7 @@ export class CheckUserAuthenticationResponse extends Response {
public IsPasswordExpired: boolean;
//public P_SESSION_ID:string;
public MemberLoginList: MemberList ;
public BasicMemberInformation: BasicInfo;
public BasicMemberInformation: BasicInfo;
public EMPLOYEE_DISPLAY_NAME: string;
public EMPLOYEE_NAME:string;
}

@ -14,6 +14,8 @@ export class GetLoginInfoRequest extends Request {
CompanyID:number;
DeviceType:string;
LoginType:number;
EMPLOYEE_NAME:string;
EmployeeName:string;
// constructor(user: AuthenticatedUser) {
// super();
// this.NationalID = user.IdentificationNo;

@ -5,7 +5,8 @@ export class GetLoginInfoResponse extends Response {
SMSLoginRequired: boolean;
isSMSSent: boolean;
LogInTokenID: string;
Mohemm_GetPatientID_List:any
Mohemm_GetPatientID_List:any //old one
Mohemm_GetMobileLoginInfoList:any
isActiveCode: boolean;
// PatientOutSA: boolean;
}

@ -6,4 +6,6 @@ export class MemberList {
public P_RETURN_MSG: string;
public P_RETURN_STATUS: string;
public P_SESSION_ID: number;
public EMPLOYEE_DISPLAY_NAME: string;
public EMPLOYEE_NAME:string;
}

@ -1107,8 +1107,12 @@ public getMonthNameAr(value: number): string {
this.nav.navigateForward(['/eit/homepage']);
}
public openMyTeamPage() {
console.log('someeeeeeee');
this.nav.navigateForward(['/my-team/home']);
}
public openMyTeamDetailPage() {
this.nav.navigateForward(['/my-team/details']);
}
public openPage(link: string) {
this.nav.navigateForward([link]);
@ -1188,6 +1192,9 @@ public getMonthNameAr(value: number): string {
public openPayslipPage() {
this.nav.navigateForward(['/payslip/home']);
}
public openTimeCardPage() {
this.nav.navigateForward(["/time-card/time-card-details"]);
}
public openEarningsPage() {
this.nav.navigateForward(['/payslip/Earnings']);
}
@ -1205,6 +1212,10 @@ public getMonthNameAr(value: number): string {
}
public navigatePage(path) {
this.nav.navigateForward([path]);
}
public reload(url: string, from: string) {
console.log('force reload called from:' + from);
// window.location.reload();

@ -7,4 +7,9 @@ export class AttendanceTrackingList {
public P_SCHEDULED_HOURS: string;
public P_SHT_NAME: string;
public P_SPENT_HOURS: string;
public P_BREAK_HOURS: string;
public P_LATE_IN_HOURS: string;
public P_SWIPES_EXEMPTED_FLAG: string;
public P_SWIPE_IN: string;
public P_SWIPE_OUT: string;
}

@ -66,8 +66,8 @@ export class DashboredService {
oerrorLable
);
}
public getAttendanceTracking(onError ?: any ,oerrorLable ?: any): Observable<AttendanceTrackingResponse>{
const request = new Request();
public getAttendanceTracking(selectedEmployee: any, onError ?: any , oerrorLable ?: any): Observable<AttendanceTrackingResponse>{
const request = selectedEmployee;
this.authService.authenticateRequest(request);
return this.con.post(
DashboredService.attendancetrackingUrl,

@ -2,6 +2,9 @@ import { Request } from '../../../services/models/request'
export class GetSubordinatesAttdStatusRequest extends Request{
//public static SHARED_DATA = '';
public P_SCHEDULE_DATE_FROM :any;
public P_SCHEDULE_DATE_TO :any;
public P_SCHEDULE_DATE_FROM: any;
public P_SCHEDULE_DATE_TO: any;
public SearchMonth: string;
public SearchYear: number;
}

@ -43,6 +43,7 @@ export class PushService {
) { }
public startReceiving() {
console.log("startReceiving");
// this.processStartReceiving();
this.processStartReceivingWithFirebase();
}
@ -161,10 +162,11 @@ export class PushService {
}
private registerInBackend(data: any) {
console.log('firebasex Token ID: ' + data);
console.log('firebasex Token ID: ' + data);
if (data) {
this.cs.sharedService.setSharedData(data, AuthenticationService.DEVICE_TOKEN);
localStorage.setItem('deviceToken', data);
}
if (this.authService.isAuthenticated()) {
this.registerAuthenticatedUser(data);
@ -216,14 +218,22 @@ export class PushService {
private processStartReceivingWithFirebase() {
console.log("processStartReceivingWithFirebase");
this.firebasex.getToken().then(token => {
console.log(token);
this.registerInBackend(token);
});
this.firebasex.onTokenRefresh().subscribe(token => {
console.log(token);
// alert("token: "+ token);
this.registerInBackend(token);
});
}).catch(error => console.error('Error getting token', error));
// this.firebase.getToken()
// .then(token => console.log(`The token is ${token}`))
// .catch(error => console.error('Error getting token', error));
// this.firebasex.onTokenRefresh().subscribe(token => {
// alert("token: "+ token);
// this.registerInBackend(token);
// });
}
public onPushReceived(payload: any) {
@ -240,4 +250,7 @@ export class PushService {
}

@ -29,4 +29,5 @@
.text-span{
font-size: 14px;
color: #888;
margin: -1px;
}

@ -0,0 +1,14 @@
<calendar #slider [dateFormatter]="calendar.dateFormatter"
[monthviewEventDetailTemplate]="template"
[calendarMode]="calendar.mode"
[currentDate]="currentDateParent"
[lockSwipes]="true"
(onTimeSelected)="onDayClicked($event)">
</calendar>
<ng-template #template let-showEventDetail="showEventDetail" let-selectedDate="selectedDate" let-noEventsLabel="noEventsLabel">
</ng-template>

@ -0,0 +1,124 @@
// .modalCss .modal-Wrapper {
// width: 600px;
// height: 300px;
// }
.chart-modal .modal-Wrapper {
--background: rgb(116, 108, 108) !important;
--border-color:white!important ;
width: 85%!important ;
height: 40px !important ;
}
.navbar{
font-size: 10px !important;
--background: #22C6B3 !important;
color: aliceblue !important;
// margin-top: 10px !important;
}
.menu{
// margin-left:330px !important;
margin-top: 0px !important;
font-size: 35px !important;
background: #22C6B3;
color: aliceblue;
margin-left: 0px !important;
}
.person{
margin-left:100px !important;
margin-top: 0px !important;
font-size: 23px !important;
background: #22C6B3 !important;
color: aliceblue !important;
}
.grid{
margin-bottom: 550px !important;
margin-top: 20px !important;
margin-left: 15px !important;
margin-right: 15px !important;
background-color:white !important;
border-radius: 20px !important;
height: 250px !important;
}
.ionSliders{
margin: 0px !important;
padding: 0px !important;
}
.ionSlide{
margin-top: 5px !important;
margin-left: 190px !important;
color: black !important;
}
.dateLable{
margin-left: 90px !important;
color: black !important;
font-size: small !important;
margin-top: 15px !important;
}
// h1{
// font-size: 15px !important;
// text-align: center !important;
// }
.arrowDropright{
margin-left:100px !important;
font-size: 20px !important;
color: rgb(168, 165, 165) !important;
margin-top: 15px !important;
}
.arrowDropleft{
font-size: 20px !important;
margin-left: 10px !important;
margin-top: 15px !important;
color: rgb(116, 108, 108) !important;
}
.ionLable{
font-size: 10px !important;
}
.number{
font-size: 18px !important;
font-weight: bolder !important;
color: black !important;
}
.header-div{
background:var(--primary);
background: -moz-linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%);
background: -webkit-linear-gradient(45deg, (--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%);
background: #22C6B3;
// background: linear-gradient(90deg, #85C48D 0%, #85C48D 13%, #2BB5C6 98%, #2BB5C6 100%);
color:var(--light);
text-transform: capitalize;
display: block;
position: relative;
height: 210px;
margin-bottom:60px;
// border-radius: 0px 0px 70px 70px;
}
.advanced-search-modal {
--height: 12cm !important;
--width: 80% !important;
--border-radius: 0.4cm;
}

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

@ -0,0 +1,149 @@
import { Component, OnInit, Output, Input, ViewChild, ElementRef, EventEmitter } from '@angular/core';
import { TimeSlot } from './time.slot';
import { SharedDataService } from '../../services/shared-data-service/shared-data.service';
import { ModalController } from '@ionic/angular';
import { DateInfoModalComponent } from './date-info-modal/date-info-modal.component';
import { MenuResponse } from '../../services/menu/models/menu-response';
import * as moment from 'moment';
import { CommonService } from '../../services/common/common.service';
import { GetDayAndHoursDetailsRequest } from 'src/app/time-card/service/models/get-day-hours-type-details.request';
import { TimeCardService } from 'src/app/time-card/service/time-card.service';
import { GetShiftDetailRequest } from 'src/app/time-card/service/models/get-shift-detail.request';
import { GetSwipesRequest } from 'src/app/time-card/service/models/get-swipes-request';
@Component({
selector: 'app-circle-calendar',
templateUrl: './circle-calendar.component.html',
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();
@Output() currentYear = new EventEmitter();
public monthName: any;
public yearDate: any;
public selEmp: string;
public selMenu: MenuResponse = new MenuResponse();
public respID: number;
public menuType: any;
public dayAndHoursPageNumber = 1;
public selectedFilters: any = {};
public selectedShiftFilter: any;
public arrDaysAttendance: any = [];
public arrDaysAbsent: any = [];
public arrDaysOff: any = [];
public selectedShift: any;
public shiftDetailsData: any = [];
public swipeDetailsData: any = [];
public arrOfAllList: any = [];
eventsdata: any = [];
public calendar = {
mode: 'month'
};
public currentAvailableAppoDate: any;
public eventsInput: any = [];
public events: TimeSlot[] = [];
public selectedTime: string;
public selectedDate: string;
public weekDaysEn = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
public weekDaysEnSort = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
public lockSwipeToPrev: any = true;
public currentDate: any;
public selectedDateObject: any;
public currentDateToSwipe: any;
public activeMonth: any;
public isFirst = false;
public selectedIndexData: any;
arrFutrueDays: any;
eventsdateFutrue: any;
detailData: any;
constructor(
public sharedData: SharedDataService,
public mod: ModalController,
public common: CommonService,
public timeCardService: TimeCardService) { }
@ViewChild('slider') slides: ElementRef;
ngOnInit() {
this.reRenderCalendar();
console.log(this.currentDateParent);
}
// tslint:disable-next-line: use-life-cycle-interface
ngAfterViewInit() {
setTimeout(() => {
this.reRenderCalendar();
}, 1000);
}
reRenderCalendar() {
this.renderDate(this.eventsdateAbsent, 'absent');
this.renderDate(this.eventsdateAttend, 'present');
this.renderDate(this.eventsdateDayOff, 'dayoff');
this.renderDate(this.normalDays, 'scheduleDay');
}
public async dateModal(shiftDetails) {
const modal = await this.mod.create({
component: DateInfoModalComponent,
showBackdrop: true,
backdropDismiss: true,
componentProps: {
TODAYDATE: this.selectedIndexData,
SHIFTDETAILS: shiftDetails
}
});
modal.cssClass = 'calendar-modal';
await modal.present();
}
public renderDate(arrayDays, cssClass) {
const td = document.querySelectorAll('.swiper-slide-active .monthview-datetable td:not(.text-muted)');
arrayDays.forEach(dateObj => {
const date = dateObj.startTime;
td.forEach(element => {
// tslint:disable-next-line: triple-equals
if (date.getDate() == element.textContent.trim()) {
element.classList.add(cssClass);
}
});
});
}
onDayClicked(event) {
if (this.isFirst) {
console.log(event.selectedTime.getDate());
const selectedIndex = event.selectedTime.getDate();
this.selectedIndexData = this.dayHoursTypeDetailsList[selectedIndex - 1];
if (this.selectedIndexData.present) {
const rtpID = this.selectedIndexData.RTP_ID;
this.getScheduleShiftDetails(rtpID);
}
} else {
this.isFirst = true;
}
}
getScheduleShiftDetails(RTP_ID) {
const GetShiftDetailRequestObject = new GetShiftDetailRequest();
GetShiftDetailRequestObject.P_RTP_ID = RTP_ID;
GetShiftDetailRequestObject.P_PAGE_NUM = 1;
GetShiftDetailRequestObject.P_PAGE_LIMIT = 10;
this.timeCardService.getShiftDetail(GetShiftDetailRequestObject).subscribe((result) => {
if (this.common.validResponse(result)) {
console.log(result);
this.shiftDetailsData = result.GetScheduleShiftsDetailsList;
this.dateModal(result);
}
});
}
}

@ -0,0 +1,104 @@
<!-- <ion-slides [options]="slideOptsOne" (ionSlideDidChange)="slideChanged($event)">
<ion-slide *ngFor="let shift of SHIFTDETAILS.GetScheduleShiftsDetailsList; let i=index"> -->
<!-- <div> -->
<ion-grid class="headerGrid">
<ion-row style="margin-left: -130px; margin-top: 27px;">
<ion-col size="10">
<div style="width: 100%;">
<div class="result-graph">
<div class="result-text-container">
<h2 class="percentage">{{percentage}}</h2>
<span>Completed <br><br><br><br></span>
</div>
<p-chart class="today-graph" type="doughnut" [data]="data" [options]="options"></p-chart>
</div>
</div>
</ion-col>
<ion-col size="2">
<div class="div" >
<ion-row >
<p class="p0">{{nameDay}}</p>
</ion-row>
<ion-row >
<p class="p1">{{day}}</p>
</ion-row>
<ion-row >
<p class="p2">{{nameMonth}}</p>
</ion-row>
<ion-row >
<p class="p3">{{year}}</p>
</ion-row>
<ion-row>
<p class="p5">{{ts.trPK('attendance','present')}}</p>
</ion-row>
</div>
</ion-col>
</ion-row>
</ion-grid>
<div>
<ion-grid class="grid">
<ion-row class="gridrow">
<ion-col class="liftcol">
<ion-row class="amountlabel"> <p>{{shiftTime}}</p> </ion-row>
<ion-row class="rowlabel">
<p >{{ts.trPK('attendance-tracking','shift-time')}}</p>
</ion-row>
</ion-col>
<ion-col class="rightcol">
<ion-row class="amountlabel"><p >{{scheduled}}</p> </ion-row>
<ion-row class="rowlabel">
<p >{{ts.trPK('attendance-tracking','regular')}}</p>
</ion-row>
</ion-col>
</ion-row>
<ion-row class="gridrow" >
<ion-col class="liftcol">
<ion-row class="amountlabel"><p >{{startDate}}</p> </ion-row>
<ion-row class="rowlabel">
<p >{{ts.trPK('attendance-tracking','check-in')}}</p>
</ion-row>
</ion-col>
<ion-col class="rightcol">
<ion-row class="amountlabel"> <p >{{endDate}}</p> </ion-row>
<ion-row class="rowlabel">
<p >{{ts.trPK('attendance-tracking','check-out')}} </p>
</ion-row>
</ion-col>
</ion-row >
<ion-row class="gridrow">
<ion-col class="liftcol">
<ion-row class="amountlabel"> <p >{{lateIn}}</p> </ion-row>
<ion-row class="rowlabel">
<p >{{ts.trPK('attendance-tracking','late-in')}}</p>
</ion-row>
</ion-col>
<ion-col class="rightcol">
<ion-row class="amountlabel"> <p >{{excess}}</p> </ion-row>
<ion-row class="rowlabel">
<p >{{ts.trPK('attendance-tracking','excess')}}</p>
</ion-row>
</ion-col>
</ion-row>
<ion-row class="gridrow">
<ion-col class="liftcol">
<ion-row class="amountlabel"> <p >{{shortage}}</p> </ion-row>
<ion-row class="rowlabel">
<p>{{ts.trPK('attendance-tracking','shortage')}}</p>
</ion-row>
</ion-col>
<ion-col class="rightcol">
<ion-row class="amountlabel"> <p >{{earlyOut}}</p> </ion-row>
<ion-row class="rowlabel">
<p >{{ts.trPK('attendance-tracking','early-out')}}</p>
</ion-row>
</ion-col>
</ion-row>
</ion-grid>
</div>
<!-- </div> -->
<!-- </ion-slide>
</ion-slides> -->

@ -0,0 +1,180 @@
.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%;
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;
}
}
.today-graph{
display: block;
height: 127px;
width: 288px;
}
.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;
}
.rowlabel{
color: rgb(163, 163, 163) !important;
font-size: 13px !important;
font-family: WorkSans-Bold;
}
.grid{
padding-bottom: -20px !important;
padding-top: -20px !important;
height: 360px !important;
}
.liftcol{
// padding-top: 1px !important;
// padding-bottom: 1px !important;
border-right: 1px solid rgb(163, 163, 163) !important;
}
.rightcol{
margin-left: 5px !important;
}
.gridrow{
border-top: 1px solid rgb(163, 163, 163) !important;
margin-left: 19px;
margin-right: 12px;
}
.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;
}
.p0{
margin-bottom: -13px !important;
color: black !important;
font-weight: bold !important;
font-size: 15px !important;
margin-top: 8px;
text-align: center;
display: block;
width: 100%;
}
.p1{
margin-bottom: -7px !important;
color: black !important;
font-family: WorkSans-Bold !important;
font-size: 33px;
margin-top: 10px;
text-align: center;
display: block;
width: 100%;
}
.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; */
color: black !important;
font-weight: bold !important;
font-size: 19px;
margin-top: -43px;
margin-left: 27px;
}
.p4{ margin-bottom: 56px !important;
margin-top: -26px !important;
color: black !important;
}
// .pdiv{background-color: gray;height: 26px;}
.p5{
font-size: 14px;
text-align: center;
background-color: #094875;
color: white;
margin-top: -13px;
margin-bottom: -3px;
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;
// }

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

@ -0,0 +1,138 @@
import { Component, OnInit, Input, ViewChild } from '@angular/core';
import { ModalController, NavParams, IonInfiniteScroll } from '@ionic/angular';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { IonSlides } from '@ionic/angular';
@Component({
selector: 'app-date-info-modal',
templateUrl: './date-info-modal.component.html',
styleUrls: ['./date-info-modal.component.scss'],
})
export class DateInfoModalComponent implements OnInit {
@ViewChild('slides') slides: IonSlides;
[x: string]: any;
gaugeType = 'full';
gaugeValue = 28.3;
gaugeLabel = 'Days';
@Input() TODAYDATE: any;
@Input() SHIFTDETAILS: any;
today: any;
month: any;
monthDate: any;
excess: any;
shortage: any;
lateIn: any;
scheduled: any;
earlyOut: any;
shiftTime: any;
startDate: any;
endDate: any;
shift: any;
percentage: any;
data: any;
scheduleDate: any;
tests: any;
year: any;
nameMonth: any;
nameDay: any;
public weekDaysEn = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
public options = {
cutoutPercentage: 85,
tooltips: { enabled: false },
legend: { display: false }
};
public slideOptsOne = {
slidesPerView: 1,
spaceBetween: 0
};
constructor(
public modalController: ModalController,
public navParams: NavParams,
public ts: TranslatorService
) { }
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.scheduled = this.TODAYDATE.SCHEDULED_HRS;
this.earlyOut = this.TODAYDATE.EARLY_OUT_HRS ;
this.scheduleDate = this.TODAYDATE.SCHEDULE_DATE;
this.assignData(this.SHIFTDETAILS.GetScheduleShiftsDetailsList[0]);
}
assignData(shiftDetails) {
this.shiftTime = shiftDetails.SHT_NAME;
this.startDate = shiftDetails.SHT_ACTUAL_START_TIME;
this.endDate = shiftDetails.SHT_ACTUAL_END_TIME;
this.percentage = shiftDetails.PERCENTAGE;
this.percChart = this.percentage.substring(0, this.percentage.indexOf('%'));
const test = this.scheduleDate;
const splitdate = test.split(' ');
const date = splitdate[0];
const test1 = date.split('/');
this.day = test1[1];
this.year = test1[2];
this.month = test1[0];
// tslint:disable-next-line: radix
this.nameMonth = this.getMonthName(parseInt(this.month));
this.nameDay = this.getHeaderDay(new Date(date));
const d = new Date(date);
this.data = {
labels: ['percentage'],
datasets: [
{
data: [this.percChart],
backgroundColor: [
'#094875'
],
borderWidth: 2
}]
};
}
slideChanged(ev) {
this.slides.getActiveIndex().then(index => {
const shiftDetails = this.SHIFTDETAILS[index];
this.assignData(shiftDetails);
});
}
public getMonthName(value: number): string {
switch (value) {
case 1:
return 'Jan';
case 2:
return 'Feb';
case 3:
return 'Mar';
case 4:
return 'Apr';
case 5:
return 'May';
case 6:
return 'Jun';
case 7:
return 'Jul';
case 8:
return 'Aug';
case 9:
return 'Sep';
case 10:
return 'Oct';
case 11:
return 'Nov';
case 12:
return 'Dec';
}
}
getHeaderDay(date: any) {
return this.weekDaysEn[date.getDay()];
}
}

@ -0,0 +1,21 @@
export class TimeSlot {
constructor(isoTime: string, startDate: string, end: string) {
this.isoTime = isoTime;
this.start = startDate;
this.end = end;
this.allDay = true;
this.draggable = false;
}
public eventTimeLabel() {
return new Date(this.end).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit', hour12: false });
}
// event time in iso format
isoTime: string;
// start of event day
start: string;
// event date time
end: string;
allDay: boolean;
draggable: boolean;
}

@ -0,0 +1,26 @@
<div class="team-member-container">
<ion-row>
<ion-col [size]="3">
<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 class="employee-name">
<h2 class="name">{{name}}</h2>
<span class="title">{{title}}</span>
</span>
<a class="image-container" href="tel:{{employeePhoneNumber}}">
<img src="../assets/imgs/green_call_icon.png" >
</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,84 @@
.team-member-container{
background: white;
border-radius: 100px 20px 20px 100px;
margin-top: 15px;
font-family: WorkSans-Regular;
}
.user-image-container{
position: relative;
width: 70px;
height: 70px;
display: block;
margin: 0 auto;
// &:before{
// position: absolute;
// content: "";
// width: 20px;
// height: 20px;
// border-radius: 20px;
// border: 1px solid white;
// top: 0;
// right: 0;
// background-color: red;
// z-index: 9;
// }
// &.present:before{
// background-color: green !important;
// }
}
.user-image{
overflow: hidden;
position: relative;
display: block;
width: 100%;
height: 100%;
border-radius: 80px;
border: 1px solid #ccc;
margin: 0px auto 6px;
img {
width: 100%;
max-height: 100%;
}
}
.employee-name{
display: inline-block;
width: 80%;
.name{
font-size: 16px;
color: black;
margin: 0;
width: 100%;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.title{
font-size: 13px;
color: #888;
width: 100%;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
display: block;
}
}
.image-container{
width: 20%;
display: inline-block;
text-align: center;
vertical-align: top;
margin-top: 5px;
}
.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 { EmployeeInformationComponent } from './employee-information.component';
describe('EmployeeInformationComponent', () => {
let component: EmployeeInformationComponent;
let fixture: ComponentFixture<EmployeeInformationComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ EmployeeInformationComponent ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(EmployeeInformationComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,21 @@
import { Component, OnInit, Input } from '@angular/core';
@Component({
selector: 'app-employee-information',
templateUrl: './employee-information.component.html',
styleUrls: ['./employee-information.component.scss'],
})
export class EmployeeInformationComponent implements OnInit {
public userImage: any = '../assets/imgs/profile.png';
@Input() name: string;
@Input() title: string;
@Input() employeeImage: string;
@Input() employeePhoneNumber: string;
constructor() { }
ngOnInit() {}
}

@ -3,10 +3,16 @@
<div class="circle">
<ion-fab class="fab-i ">
<ion-fab-button class="cbookApointmentBtn" (click)="onClick()" >
<ion-fab-button [ngClass]="type === 'add' ? 'addnon' : 'cbookApointmentBtn' " (click)="onClick()" >
<!-- <img style="width: 39%; margin-top: -29%;" src="assets/icon/booking.png" /> -->
<ion-icon class="iconFab" name="finger-print"></ion-icon>
<div *ngIf="type != 'add' ">
<ion-icon class="iconFab" name="finger-print"></ion-icon>
<p class="fab-p">{{ 'attendance-tracking,title' | translate }} </p>
</div>
<div *ngIf="type === 'add' ">
<ion-icon style="margin-top:0px" class="iconFab" name="add"></ion-icon>
<!-- <ion-icon name="add-outline"></ion-icon> -->
</div>
</ion-fab-button>
</ion-fab>

@ -19,6 +19,22 @@ ion-fab-button{
--background: transparent;
}
.addnon{
--background: var(--darkblue)!important;
background-size: cover;
background-position: top right;
border-radius: 50%;
height: 80px;
width: 80px;
width: 80px;
height: 80px;
right: 8%;
position: fixed;
color: white;
bottom: 20%;
border-radius: 50%;
z-index: 999;
}
.fab-p{
// position: absolute;
@ -51,7 +67,7 @@ button-inner{
}
.iconFab{
margin-top: -37px;
margin-top: -37px;
width: 100px;
height: 60px;
}

@ -1,4 +1,4 @@
import { Component, OnInit, Output, EventEmitter } from '@angular/core';
import { Component, OnInit, Output, EventEmitter, Input } from '@angular/core';
import { TranslatorService } from '../../services/translator/translator.service';
@Component({
@ -7,13 +7,14 @@ import { TranslatorService } from '../../services/translator/translator.service'
styleUrls: ['./fab-button.component.scss'],
})
export class FabButtonComponent implements OnInit {
@Input() type:string;
@Output() trigger = new EventEmitter();
public direction: any;
constructor(
) { }
ngOnInit() {
console.log("type" + this.type);
this.direction = TranslatorService.getCurrentDirection();
}

@ -1,6 +1,7 @@
<div feedback class="custom-button">
<div class="iconBox">
<img [src]="icon" class="icon">
<img *ngIf="title != 'My Team' && title != 'Vacation Rule'" [src]="'data:image/png;base64,'+icon" class="icon">
<img *ngIf="title == 'My Team' || title == 'Vacation Rule'" [src]="icon" class="icon">
</div>
<div class="titleBox">
<p class="pClass">{{title}}</p>

@ -1,33 +1,46 @@
<ion-content has-bouncing="false" forceOverscroll="false" class="ion-no-padding">
<ion-grid padding>
<ion-row>
<!-- <ion-row>
<ion-col [size]="12">
<!-- <img [src]="logo" class="loginLogo" />
<h1 class="heading1">{{welcome}} </h1> -->
<img [src]="logo" class="loginLogo" />
<h1 class="heading1">{{welcome}} </h1>
<p class="text1" style="margin-bottom: -8px;font-weight: bold;font-size: 28px;">{{'home,welcome-back' | translate}} </p>
<p class="text1" style="font-size: 28px;margin-top: 0px;" >{{empname}}</p>
<p *ngIf="!empname" class="text1">{{welcome_txt}} </p>
<p class="text1">{{txt_account}} </p>
</ion-col>
</ion-row>
</ion-row> -->
<ion-row class="row-border" *ngIf="empname && isLastLogin">
<ion-row>
<ion-col [size]="12">
<h1 class="heading1">{{welcome}} </h1>
<p *ngIf="!user" class="text1">{{welcome_txt}} </p>
<p class="text1">{{txt_account}} </p>
</ion-col>
</ion-row>
<ion-row class="row-border" *ngIf="user && isLastLogin">
<ion-col size="6" style="padding: 5px 10px; border-right:1px solid #bbbbbb">
<p class="last-login" style="font-weight: bold">{{'login,last-login' | translate}} </p>
<!-- <p class="last-login small-font-size">{{user.EditedOn | date}}
{{lastLoginTime}}</p>-->
<p class="last-login small-font-size">{{user.EditedOn | date}}
{{lastLoginTime }}</p>
<!-- <p class="last-login "> {{lastLoginDate}}</p> -->
</ion-col>
<ion-col size="6" style="padding: 5px 10px;">
<p class="last-login" style="font-weight: bold" [ngClass]="{'fadein':empname && isLastLogin }">
<p class="last-login" style="font-weight: bold" [ngClass]="{'fadein':user && isLastLogin }">
{{'login,last-login-with' | translate}}
</p>
<p class="last-login">{{getLoginType(logintype)}}</p>
</ion-col>
</ion-row>
<ion-row class="ion-no-padding description" *ngIf="empname && isLastLogin">
<ion-row class="ion-no-padding description" *ngIf="user && isLastLogin">
<ion-col style="margin-top:-5px" class="ion-no-padding " [size]=6>
<app-confirm-login [accessFromOutSide]="true" *ngIf="empname"></app-confirm-login>
<app-confirm-login [accessFromOutSide]="true" *ngIf="user"></app-confirm-login>
</ion-col>
<ion-col [size]=6>
<app-button (click)="loginwithuser()" [title]="button.title | translate " [icon]="button.icon"
@ -44,7 +57,7 @@
</ion-content>
<ion-footer class="welcome-footer">
<ion-row class="ion-justify-content-center " *ngIf="empname">
<ion-row class="ion-justify-content-center " *ngIf="user">
<ion-col [size]="12">
<ion-button class="centerDiv button-login" expand="block" (click)="login()">

@ -69,6 +69,8 @@ export class WelcomeComponent implements OnInit, AfterViewInit, OnDestroy {
password: string;
empname: string;
logintype: any;
lastLoginDate: string;
user_name: string;
constructor(
public ts: TranslatorService,
@ -80,12 +82,32 @@ export class WelcomeComponent implements OnInit, AfterViewInit, OnDestroy {
ngOnInit() {
// retrive user info **
this.user = this.cs.sharedService.getSharedData(
AuthenticationService.IMEI_USER_DATA,
false
);
this.userName = localStorage.getItem("user");
this.password = localStorage.getItem("password");
let remember = localStorage.getItem("remember");
this.empname= localStorage.getItem("emp-name");
this.logintype= localStorage.getItem("login-type");
this.lastLoginDate= localStorage.getItem("login-at");
// this.lastLoginDate= new Date(this.lastLoginDate).toISOString()
// let day = this.lastLoginDate.getDate();
// let month = this.lastLoginDate.getMonth() + 1;
// let year = this.lastLoginDate.getFullYear();
// let todayDate = month + '/' + day + '/' + year;
// this.lastLoginTime = moment(this.cs.evaluteDateAsObject(this.lastLoginDate)).format("HH:mm");
this.logintype = parseInt(this.logintype)
console.log(" this.lastLoginTime" + this.lastLoginTime);
console.log(" this.lastLoginDate" + this.lastLoginDate);
this.welcome_txt = this.ts.trPK("home", "welcome-txt");
@ -99,7 +121,7 @@ export class WelcomeComponent implements OnInit, AfterViewInit, OnDestroy {
this.setDescription();
//later to fix below code
if (this.user) {
// this.lastLoginTime = moment(this.cs.evaluteDateAsObject(this.user.EditedOn)).format("HH:mm");
this.lastLoginTime = moment(this.cs.evaluteDateAsObject(this.user.EditedOn)).format("HH:mm");
}
}
@ -107,7 +129,7 @@ export class WelcomeComponent implements OnInit, AfterViewInit, OnDestroy {
}
private setWelcomeMessage() {
private setWelcomeMessage1() {
console.log(this.userName + "this.userName");
if (this.userName) {
@ -117,12 +139,38 @@ export class WelcomeComponent implements OnInit, AfterViewInit, OnDestroy {
this.welcome += " " + this.empname || '';
this.isLastLogin = true;
console.log(this.isLastLogin + "this.isLastLogin");
} else {
this.welcome = this.ts.trPK("home", "welcome-head");
}
}
private setWelcomeMessage() {
console.log(" setWelcomeMessage ");
if (this.user) {
console.log(" this.user.EmployeeName: "+ this.user.EmployeeName);
if(this.user.EmployeeName != null && this.user.EmployeeName !=''){
this.user_name=this.user.EmployeeName;
}
else{
this.user_name="";
}
this.welcome = this.ts.trPK("home", "welcome-back");
this.welcome += " " + this.user_name || '';
this.isLastLogin = true;
} else {
this.welcome = this.ts.trPK("home", "welcome-head");
}
}
private setDescription() {
this.txt_account = this.userName ?
this.ts.trPK("home", "account-info") :"";

@ -23,13 +23,26 @@
</ion-slides>
</ion-row>
<!-- <ion-row *ngFor="let item of menuList; let i=index">
<ng-container *ngIf="item.MENU_TYPE === 'M'">
<ion-col [size]="12">
<ion-label>{{item.MENU_NAME}}</ion-label>
</ion-col>
<app-services-button
(click)="openMyTeamPage()"
[title]="item.MENU_NAME"
icon="assets/icon/new-design/leave_balance.png">
</app-services-button>
</ng-container>
</ion-row> -->
<ion-row *ngFor="let menuItem of menuEntries; let i=index">
<ion-row class="attendance-module" *ngIf="i == 1">
<ion-col [size]="8">
<h3>{{'home,monthly-attendance' | translate}}</h3>
<span>{{'home,monthly-time-sheet-view' | translate}}</span>
<ion-button>
<ion-button (click)="openTimeCard()">
{{'home,view-detail' | translate}}
</ion-button>
</ion-col>
@ -46,100 +59,28 @@
<app-services-button
(click)="openPage(subMenu)"
[title]="subMenu.PROMPT"
icon="assets/icon/new-design/leave_balance.png">
[icon]="subMenu.ICON">
</app-services-button>
</ion-slide>
</ion-slides>
</ion-row>
<!-- <ion-row class="attendance-module">
<ion-col [size]="8">
<h3>Monthly Attendance</h3>
<span>View your Monthly Time Sheet</span>
<ion-button>
View Detail
</ion-button>
</ion-col>
<ion-col [size]="4">
<img src="assets/icon/new-design/attendance_button_icon.png"/>
</ion-col>
</ion-row> -->
<!-- <ion-row>
<ion-col [size]="12">
<ion-label>My Travelling</ion-label>
</ion-col>
<ion-col [size]="4">
<app-services-button
title="Ticket Request"
icon="assets/icon/new-design/ticket_request.png">
</app-services-button>
</ion-col>
<ion-col [size]="4">
<app-services-button
title="Borrowing Passport"
icon="assets/icon/new-design/borrowing_passport.png">
</app-services-button>
</ion-col>
<ion-col [size]="4">
<app-services-button
title="Vacations Rules"
icon="assets/icon/new-design/vacation_rules.png">
</app-services-button>
</ion-col>
</ion-row> -->
<!-- <ion-row>
<ion-col [size]="12">
<ion-label>Miscellaneous</ion-label>
</ion-col>
<ion-col [size]="4">
<app-services-button
title="Uniform Request"
icon="assets/icon/new-design/uniform_request.png">
</app-services-button>
</ion-col>
<ion-col [size]="4">
<app-services-button
title="ID Badge Request"
icon="assets/icon/new-design/id_badge_request.png">
</app-services-button>
</ion-col>
<ion-slide *ngIf="i == 0">
<app-services-button
(click)="openMyTeamPage()"
title="My Team"
icon="assets/icon/new-design/leave_balance.png">
</app-services-button>
</ion-slide>
<ion-slide *ngIf="i == 2">
<app-services-button
(click)="Vacation_Rule()"
title="Vacation Rule"
icon="assets/icon/new-design/vacation_rules_icon.png">
</app-services-button>
</ion-slide>
<ion-col [size]="4">
<app-services-button
title="Separation/ Resignation"
icon="assets/icon/new-design/separation_resignation.png">
</app-services-button>
</ion-col>
</ion-row> -->
<!--
<ion-row>
<ion-col [size]="4">
<app-services-button
title="Recreational Activities"
icon="assets/icon/new-design/recreational_activities.png">
</app-services-button>
</ion-col>
<ion-col [size]="4">
<app-services-button
title="Employee Certificate"
icon="assets/icon/new-design/employee_certificate.png">
</app-services-button>
</ion-col>
</ion-slides>
</ion-row>
<ion-col [size]="4">
<app-services-button
title="IT Forms"
icon="assets/icon/new-design/it_forms.png">
</app-services-button>
</ion-col>
</ion-row> -->
</ion-grid>
<div class="fixed-shift-timer" *ngIf="isCheckedIn" (click)="openattentracking()">
<span class="subTitle"> {{'home,time-left' | translate}} </span>

@ -15,24 +15,27 @@ import { attendanceSwipeScannerRequest } from './models/attendanceSwipe.Request'
import { Response } from 'src/app/hmg-common/services/models/response';
import { AttendanceService } from './services/attendance.services';
import { LoginRequest } from '../hmg-common/services/authentication/models/login.request';
import {FileUploaderComponent} from '../hmg-common/ui/file-uploader/file-uploader.component'
import { Camera} from '@ionic-native/Camera/ngx';
import { FileUploaderComponent } from '../hmg-common/ui/file-uploader/file-uploader.component';
import { Camera } from '@ionic-native/Camera/ngx';
import { File } from '@ionic-native/file/ngx';
import { DomSanitizer } from '@angular/platform-browser';
import { SharedDataService } from '../hmg-common/services/shared-data-service/shared-data.service';
import { DevicePermissionsService } from '../hmg-common/services/device-permissions/device-permissions.service';
import { DashboredService } from '../hmg-common/services/dashbored/dashbored.service';
import { OrganizationSalariesResponse } from '../hmg-common/services/dashbored/organization-salaries.response';
import { OpenMissingSwipesResponse} from '../hmg-common/services/dashbored/open-missing-swipes.response';
import {PerformanceAppraisalResponse} from '../hmg-common/services/dashbored/performance-appraisal.response';
import { OpenMissingSwipesResponse } from '../hmg-common/services/dashbored/open-missing-swipes.response';
import { PerformanceAppraisalResponse } from '../hmg-common/services/dashbored/performance-appraisal.response';
import { AttendanceTrackingResponse } from '../hmg-common/services/dashbored/attendance-tracking.response';
import { OpenPeriodDatesResponse } from '../hmg-common/services/dashbored/models/openPeriodDatesResponse';
import {GetSubordinatesAttdStatusRequest} from '../hmg-common/services/dashbored/models/GetSubordinatesAttdStatusRequest';
import {GetSubordinatesLeavesRequest} from '../hmg-common/services/dashbored/models/GetSubordinatesLeavesRequest'
import {GetOpenNotificationsResponse} from '../hmg-common/services/dashbored/models/GetOpenNotificationsResponse'
import {GetSubordinatesAttdStatusResponse} from '../hmg-common/services/dashbored/models/GetSubordinatesAttdStatusResponse'
import {GetSubordinatesLeavesResponse} from '../hmg-common/services/dashbored/models/GetSubordinatesLeavesResponse'
import { GetSubordinatesAttdStatusRequest } from '../hmg-common/services/dashbored/models/GetSubordinatesAttdStatusRequest';
import { GetSubordinatesLeavesRequest } from '../hmg-common/services/dashbored/models/GetSubordinatesLeavesRequest';
import { GetOpenNotificationsResponse } from '../hmg-common/services/dashbored/models/GetOpenNotificationsResponse';
import { GetSubordinatesAttdStatusResponse } from '../hmg-common/services/dashbored/models/GetSubordinatesAttdStatusResponse';
import { GetSubordinatesLeavesResponse } from '../hmg-common/services/dashbored/models/GetSubordinatesLeavesResponse';
import { AccrualService } from '../accrual-balances/services/accrual.service';
import { GetDayAndHoursDetailsRequest } from '../time-card/service/models/get-day-hours-type-details.request';
import * as moment from 'moment';
import { TimeCardService } from '../time-card/service/time-card.service';
import { WorklistMainService } from '../notification/service/work-list.main.service';
@Component({
@ -54,36 +57,39 @@ export class HomePage implements OnInit {
public fileUploder: FileUploaderComponent;
location: boolean;
camera: boolean;
ticketRequestObject : any;
leaveRequestObject : any;
missingSwipeRequestObject : any;
public statsButtons = [
{
title: 'Work List',
title: this.ts.trPK('home','worklist'),
statsValue: 0,
icon: 'assets/icon/new-design/work_list.png',
link: '/notification/homepage'
link: '1'
},
// {
// title: 'Pending Request',
// statsValue: 13,
// icon: 'assets/icon/new-design/pending_request.png',
// link: ''
// },
{
title: 'Pending Request',
statsValue: 13,
icon: 'assets/icon/new-design/pending_request.png',
link: ''
},
{
title: 'Missing Swipes',
title: this.ts.trPK('home','missing-swipes'),
statsValue: 0,
icon: 'assets/icon/new-design/missing_swipe.png',
link: ''
link: '2'
},
{
title: 'Leave Balance',
title: this.ts.trPK('home','leave-balance'),
statsValue: 0,
icon: 'assets/icon/new-design/leave_balance.png',
link: ''
link: '3'
},
{
title: 'Ticket Balance',
title: this.ts.trPK('absenceList','tickets-balance'),
statsValue: 0,
icon: 'assets/icon/new-design/ticket_balance.png',
link: ''
link: '4'
}
];
@ -107,8 +113,8 @@ export class HomePage implements OnInit {
// ];
public slideOptsOne = {
slidesPerView: 3.5,
spaceBetween: 10
slidesPerView: 3.5,
spaceBetween: 10
};
public slideOptsTwo = {
slidesPerView: 3.2,
@ -119,12 +125,17 @@ export class HomePage implements OnInit {
public hasFinished = false;
public remainingTime: any;
public scheduledTime: any;
public spentHours: any;
public isCheckedIn = undefined;
public displayTime: any;
public menuEntries: any;
public percent: any;
public selEmp: string;
public selMenu: MenuResponse = new MenuResponse();
public respID: number;
public menuType: any;
accrualBalancesList: any;
public countAllNotification: number =0;
public countAllNotification = 0;
constructor(
public ts: TranslatorService,
@ -147,17 +158,21 @@ export class HomePage implements OnInit {
private permissions: DevicePermissionsService,
public DS: DashboredService,
public accrualService: AccrualService,
public workListService: WorklistMainService,
//////////////////////////////////////// TIME AND DATE////////////////////////////
public timeCardService: TimeCardService,
///////////////////// END/////////////////////////////////////////////////////////
public workListService: WorklistMainService
) {
this.events.subscribe('img-change', displayImg => {
this.userImage = this.sanitizer.bypassSecurityTrustUrl('data:Image/*;base64,' + displayImg);
this.userImage = this.sanitizer.bypassSecurityTrustUrl(
'data:Image/*;base64,' + displayImg
);
console.log('html saved img: ' + this.userImage);
});
}
}
ngOnInit() {
// this.getUserDetails();
// this.getCount();
// this.events.subscribe('getNotCount', badge => {
// this.notBadge = badge;
@ -165,20 +180,20 @@ export class HomePage implements OnInit {
}
ionViewWillEnter() {
this.remainingTime = 0;
this.displayTime = '00:00:00';
this.runTimer = false;
this.getUserDetails();
this.remainingTime = 0;
this.displayTime = '00:00:00';
this.runTimer = false;
this.getUserDetails();
}
initTimer() {
this.runTimer = false;
this.hasStarted = false;
this.hasFinished = false;
this.percent = 100 - ((this.remainingTime / this.scheduledTime) * 100);
this.percent = 100 - (this.remainingTime / this.scheduledTime) * 100;
this.displayTime = this.getSecondsAsDigitalClock(this.remainingTime);
this.startTimer();
}
}
startTimer() {
this.runTimer = true;
@ -188,11 +203,16 @@ export class HomePage implements OnInit {
timerTick() {
setTimeout(() => {
if (!this.runTimer) { return; }
if (!this.runTimer) {
return;
}
this.remainingTime--;
this.displayTime = this.getSecondsAsDigitalClock(this.remainingTime);
if (this.remainingTime > 0) {
const newPercent: any = ((this.remainingTime / this.scheduledTime) * 100).toFixed(2);
const newPercent: any = (
(this.remainingTime / this.scheduledTime) *
100
).toFixed(2);
this.percent = 100 - newPercent;
this.timerTick();
} else {
@ -204,21 +224,20 @@ export class HomePage implements OnInit {
getSecondsAsDigitalClock(inputSeconds: number) {
const secNum = parseInt(inputSeconds.toString(), 10); // don't forget the second param
const hours = Math.floor(secNum / 3600);
const minutes = Math.floor((secNum - (hours * 3600)) / 60);
const seconds = secNum - (hours * 3600) - (minutes * 60);
const minutes = Math.floor((secNum - hours * 3600) / 60);
const seconds = secNum - hours * 3600 - minutes * 60;
let hoursString = '';
let minutesString = '';
let secondsString = '';
hoursString = (hours < 10) ? '0' + hours : hours.toString();
minutesString = (minutes < 10) ? '0' + minutes : minutes.toString();
secondsString = (seconds < 10) ? '0' + seconds : seconds.toString();
hoursString = hours < 10 ? '0' + hours : hours.toString();
minutesString = minutes < 10 ? '0' + minutes : minutes.toString();
secondsString = seconds < 10 ? '0' + seconds : seconds.toString();
return hoursString + ':' + minutesString + ':' + secondsString;
}
getDeviceLocation() {
const isVirtual = this.device.isVirtual;
if (isVirtual === true){
if (isVirtual === true) {
alert('emulater>>>>>>>' + isVirtual);
alert('You are using virtual device');
return false;
@ -227,7 +246,11 @@ export class HomePage implements OnInit {
this.location = granted as boolean;
if (this.location) {
this.geolocation
.getCurrentPosition({ maximumAge: 3000, timeout: 10000, enableHighAccuracy: true })
.getCurrentPosition({
maximumAge: 3000,
timeout: 10000,
enableHighAccuracy: true
})
.then(resp => {
this.lat = resp.coords.latitude;
this.longt = resp.coords.longitude;
@ -240,30 +263,32 @@ export class HomePage implements OnInit {
return false;
}
});
}
setServicesPrivilage() {
for (const servicePrivilage of AuthenticationService.servicePrivilage) {
if (servicePrivilage.Previlege === false) {
document.getElementById(servicePrivilage.ServiceName).setAttribute('disabled', 'disabled');
document.getElementById(servicePrivilage.ServiceName).style.filter = 'grayscale(1)';
document
.getElementById(servicePrivilage.ServiceName)
.setAttribute('disabled', 'disabled');
document.getElementById(servicePrivilage.ServiceName).style.filter =
'grayscale(1)';
}
}
}
// getCount() {
// const req: any = {};
// this.menuService.getNotificationCount(req).subscribe((result: any) => {
// if (this.common.validResponse(result)) {
// this.notBadge =
// result.GetOpenNotificationsNumList.P_OPEN_NOTIFICATIONS_NUM;
// if (this.notBadge <= 0) {
// this.notBadge = null;
// }
// this.events.publish("getNotCount", this.notBadge);
// }
// });
// const req: any = {};
// this.menuService.getNotificationCount(req).subscribe((result: any) => {
// if (this.common.validResponse(result)) {
// this.notBadge =
// result.GetOpenNotificationsNumList.P_OPEN_NOTIFICATIONS_NUM;
// if (this.notBadge <= 0) {
// this.notBadge = null;
// }
// this.events.publish("getNotCount", this.notBadge);
// }
// });
// }
ionViewDidEnter() {
@ -283,284 +308,328 @@ export class HomePage implements OnInit {
}
private getUserDetails() {
this.authService
.loadAuthenticatedUser()
.subscribe((user: AuthenticatedUser) => {
if (user) {
this.events.publish('setMenu');
this.userData = user;
this.sharedData.setSharedData(this.userData, AuthenticatedUser.SHARED_DATA);
this.userImage = user.EMPLOYEE_IMAGE ? 'data:image/png;base64,' + user.EMPLOYEE_IMAGE : this.userImage;
this.sharedData.setSharedData(
this.userData,
AuthenticatedUser.SHARED_DATA
);
this.userImage = user.EMPLOYEE_IMAGE
? 'data:image/png;base64,' + user.EMPLOYEE_IMAGE
: this.userImage;
this.callDashboardServices();
} else {
console.log(user);
}
});
}
}
callDashboardServices() {
this.getMenu();
this.setServicesPrivilage();
this.openNotificationsDashbored();
this.showOpenMissingSwipes();
this.showAttendanceTracking();
this.getAccrualBalance();
}
callDashboardServices() {
this.getMenu();
this.setServicesPrivilage();
this.openNotificationsDashbored();
this.showOpenMissingSwipes();
this.showAttendanceTracking();
this.getAccrualBalance();
}
public Vacation_Rule() {
this.common.navigateForward('/vacation-rule/home');
}
public Vacation_Rule() {
this.common.navigateForward('/vacation-rule/home');
}
private getMenu() {
this.menuService.getMenu().subscribe((result: MenuResponse) => {
this.handleMenuResult(result);
});
}
private getMenu() {
this.menuService.getMenu().subscribe((result: MenuResponse) => {
this.handleMenuResult(result);
});
}
private handleMenuResult(result) {
if (this.common.validResponse(result)) {
if (this.common.hasData(result.List_Menu)) {
console.log('list menu');
this.menuList = result.List_Menu;
this.getMenuDetails();
}
private handleMenuResult(result) {
if (this.common.validResponse(result)) {
if (this.common.hasData(result.List_Menu)) {
console.log('list menu');
this.menuList = result.List_Menu;
this.getMenuDetails();
}
}
}
private accrualBalance() {
this.common.openAccuralPage();
}
private accrualBalance() {
this.common.openAccuralPage();
}
private changeImage() {
this.common.openChangeImagePage();
}
private changeImage() {
this.common.openChangeImagePage();
}
public getMenuDetails() {
const item = this.menuList[0];
const selMenu: MenuResponse = new MenuResponse();
selMenu.List_Menu = item;
selMenu.userid = this.userData.EMPLOYEE_NUMBER;
console.log('menu: ' + selMenu.List_Menu);
this.common.sharedService.setSharedData(selMenu, MenuResponse.SHARED_DATA);
this.getMenuEntries(item);
// if (item.MENU_TYPE === 'M') {
// this.common.openMyTeamPage();
// // this.navCtrl.push("MySubordinatePage");
// } else if (item.MENU_TYPE === 'S') {
// this.common.sharedService.setSharedData(item, 'mySpecList');
// this.common.openMySpecialistPage();
// // this.navCtrl.push('MySpecialistPage',{"mySpecList":item});
// } else {
// this.getMenuEntries(item);
// }
}
public getMenuDetails() {
const item = this.menuList[0];
const selMenu: MenuResponse = new MenuResponse();
selMenu.List_Menu = item;
selMenu.userid = this.userData.EMPLOYEE_NUMBER;
console.log("menu: " + selMenu.List_Menu);
this.common.sharedService.setSharedData(selMenu, MenuResponse.SHARED_DATA);
this.getMenuEntries(item);
// if (item.MENU_TYPE === 'M') {
// this.common.openMyTeamPage();
// // this.navCtrl.push("MySubordinatePage");
// } else if (item.MENU_TYPE === 'S') {
// this.common.sharedService.setSharedData(item, 'mySpecList');
// this.common.openMySpecialistPage();
// // this.navCtrl.push('MySpecialistPage',{"mySpecList":item});
// } else {
// this.getMenuEntries(item);
// }
}
getMenuEntries(item) {
const request: any = {};
let selEmpNo: string = null;
let nationality: string = null;
request.P_SELECTED_RESP_ID = -999;
if (item.MENU_TYPE === 'S') {
request.P_SELECTED_RESP_ID = item.RESP_ID;
} else {
selEmpNo = this.common.sharedService.getSharedData(
LoginRequest.SHARED_DATA,
false
);
}
nationality = this.common.sharedService.getSharedData(
LoginRequest.NATIONALITY_CODE,
openMyTeamPage() {
this.common.openMyTeamPage();
}
openTimeCard() {
this.common.openTimeCardPage();
}
getMenuEntries(item) {
const request: any = {};
let selEmpNo: string = null;
let nationality: string = null;
request.P_SELECTED_RESP_ID = -999;
if (item.MENU_TYPE === 'S') {
request.P_SELECTED_RESP_ID = item.RESP_ID;
} else {
selEmpNo = this.common.sharedService.getSharedData(
LoginRequest.SHARED_DATA,
false
);
request.P_SELECTED_EMPLOYEE_NUMBER = selEmpNo;
request.P_MENU_TYPE = item.MENU_TYPE;
request.NationalityCode = nationality;
// set emp and resp id
console.log('set data');
this.common.sharedService.setSharedData(
selEmpNo,
MenuResponse.SHARED_SEL_EMP
);
this.common.sharedService.setSharedData(
request.P_SELECTED_RESP_ID,
MenuResponse.SHARED_SEL_RESP_ID
);
this.eitService
.getMenuEntries(request)
.subscribe((result: MenuResponse) => {
this.handleMenuEntiresResult(result);
});
}
nationality = this.common.sharedService.getSharedData(
LoginRequest.NATIONALITY_CODE,
false
);
request.P_SELECTED_EMPLOYEE_NUMBER = selEmpNo;
request.P_MENU_TYPE = item.MENU_TYPE;
request.NationalityCode = nationality;
// set emp and resp id
console.log("set data");
this.common.sharedService.setSharedData(
selEmpNo,
MenuResponse.SHARED_SEL_EMP
);
this.common.sharedService.setSharedData(
request.P_SELECTED_RESP_ID,
MenuResponse.SHARED_SEL_RESP_ID
);
this.eitService
.getMenuEntries(request)
.subscribe((result: MenuResponse) => {
this.handleMenuEntiresResult(result);
});
}
sortMenuEntires(list) {
const tree = this.common.list_to_tree(list);
this.menuEntries = tree;
console.log(this.menuEntries);
this.common.sharedService.setSharedData(tree, 'menuEntries');
// this.common.navigateForward("/eit/homepage");
// this.common.openEITPage();
}
sortMenuEntires(list) {
const tree = this.common.list_to_tree(list);
this.menuEntries = tree;
console.log(this.menuEntries);
this.common.sharedService.setSharedData(tree, "menuEntries");
this.common.sharedService.setSharedData("home", "homemenuentries");
// this.common.navigateForward("/eit/homepage");
// this.common.openEITPage();
}
private handleMenuEntiresResult(result) {
if (this.common.validResponse(result)) {
if (this.common.hasData(result.GetMenuEntriesList)) {
this.sortMenuEntires(result.GetMenuEntriesList);
private handleMenuEntiresResult(result) {
if (this.common.validResponse(result)) {
if (this.common.hasData(result.GetMenuEntriesList)) {
for(let i=0;i<result.GetMenuEntriesList.length;i++){
if(result.GetMenuEntriesList[i].FUNCTION_NAME=="HMG_TKT_NEW_EIT_SS"){
this.ticketRequestObject=result.GetMenuEntriesList[i];
}else if(result.GetMenuEntriesList[i].FUNCTION_NAME=="HR_LOA_SS"){
this.leaveRequestObject=result.GetMenuEntriesList[i];
} else if(result.GetMenuEntriesList[i].FUNCTION_NAME=="HMG_OTL_MISSING_SWIPE_EIT_SS"){
this.missingSwipeRequestObject=result.GetMenuEntriesList[i];
}
}
this.sortMenuEntires(result.GetMenuEntriesList);
}
}
}
parentFn($event: string) {
console.log($event); // this will output 'hello from child'
}
parentFn($event: string) {
console.log($event); // this will output 'hello from child'
}
private Change_password() {
this.common.openChangePassword();
}
private Change_password() {
this.common.openChangePassword();
}
private openPayslip() {
this.common.openPayslipPage();
}
private openPayslip() {
this.common.openPayslipPage();
}
private attendance() {
this.permissions.requestCameraAutherization().then(granted => {
this.camera = granted as boolean;
if (this.camera) {
this.scanCode();
}
}
);
}
private attendance() {
this.permissions.requestCameraAutherization().then(granted => {
this.camera = granted as boolean;
if (this.camera) {
this.scanCode();
}
});
}
scanCode() {
this.barcodeScanner.scan().then(barcodeData => {
scanCode() {
this.barcodeScanner
.scan()
.then(barcodeData => {
this.scannedResult = barcodeData;
this.deviceID = this.device.uuid;
this.swipeAttendance();
}).catch(err => {
console.log('Error', err);
})
.catch(err => {
console.log("Error", err);
});
}
swipeAttendance() {
const request: attendanceSwipeScannerRequest = new attendanceSwipeScannerRequest();
request.Latitude = this.lat;
request.Longitude = this.longt;
request.QRValue = this.scannedResult.text;
request.UID = this.deviceID;
request.UserName = this.userData.EMPLOYEE_NUMBER;
console.log(JSON.stringify(request));
this.attendanceService
.attendanceSwipeScanner(request, () => {
console.log('Error inside in swipe attendance');
})
.subscribe((result: Response) => {
if (this.common.validResponse(result)) {
this.common.presentAlert(this.ts.trPK('home', 'swipeAlertSuccess'));
this.showAttendanceTracking();
}
// else {
// this.common.presentAlert(this.ts.trPK('home', 'swipeAlertFailed'));
// }
});
}
}
openPersonalInfo() {
this.common.openProfile();
}
swipeAttendance() {
const request: attendanceSwipeScannerRequest = new attendanceSwipeScannerRequest();
request.Latitude = this.lat;
request.Longitude = this.longt;
request.QRValue = this.scannedResult.text;
request.UID = this.deviceID;
request.UserName = this.userData.EMPLOYEE_NUMBER;
console.log(JSON.stringify(request));
this.attendanceService
.attendanceSwipeScanner(request, () => {
console.log("Error inside in swipe attendance");
})
.subscribe((result: Response) => {
if (this.common.validResponse(result)) {
this.common.presentAlert(this.ts.trPK("home", "swipeAlertSuccess"));
this.showAttendanceTracking();
}
// else {
// this.common.presentAlert(this.ts.trPK('home', 'swipeAlertFailed'));
// }
});
}
openPersonalInfo() {
this.common.openProfile();
}
/*************************************Dashboards Services**********************************************************8 */
/*************************************Dashboards Services**********************************************************8 */
showOrganizationSalaries() {
this.DS.getOrganizationSalaries() .subscribe((result: OrganizationSalariesResponse ) => {
});
this.DS.getOrganizationSalaries().subscribe(
(result: OrganizationSalariesResponse) => {}
);
}
showOpenMissingSwipes() {
this.DS.getOpenMissingSwipes() .subscribe((result: OpenMissingSwipesResponse) => {
if (this.common.validResponse(result)) {
const key = 'GetOpenMissingSwipesList';
this.statsButtons[2].statsValue = result[key].P_OPEN_MISSING_SWIPES;
this.DS.getOpenMissingSwipes().subscribe(
(result: OpenMissingSwipesResponse) => {
if (this.common.validResponse(result)) {
const key = "GetOpenMissingSwipesList";
this.statsButtons[1].statsValue = result[key].P_OPEN_MISSING_SWIPES;
}
}
});
);
}
showPerformanceAppraisal() {
this.DS.getPerformanceAppraisal() .subscribe((result: PerformanceAppraisalResponse) => {
});
this.DS.getPerformanceAppraisal().subscribe(
(result: PerformanceAppraisalResponse) => {}
);
}
convertInSeconds(time: any) {
const hours = parseInt(time[0], 10);
const minutes = parseInt(time[1], 10);
let seconds = parseInt(time[2], 10);
seconds = seconds + (hours * 60 * 60) + (minutes * 60);
seconds = seconds + hours * 60 * 60 + minutes * 60;
return seconds;
}
convertAndAssignTime(data) {
convertAndAssignTime(data) {
console.log(data);
this.remainingTime = this.convertInSeconds(data.P_REMAINING_HOURS.split(':'));
this.scheduledTime = this.convertInSeconds(data.P_SCHEDULED_HOURS.split(':'));
this.isCheckedIn = this.remainingTime === this.scheduledTime ? false : true;
this.initTimer();
}
this.spentHours = this.convertInSeconds(data.P_SPENT_HOURS.split(':'));
this.isCheckedIn = this.spentHours === 0 ? false : true;
if (this.isCheckedIn) {
this.initTimer();
}
}
showAttendanceTracking() {
this.DS.getAttendanceTracking() .subscribe((result: AttendanceTrackingResponse) => {
showAttendanceTracking() {
const request = {
P_SELECTED_EMPLOYEE_NUMBER: this.userData.EMPLOYEE_NUMBER
};
this.DS.getAttendanceTracking(request).subscribe((result: AttendanceTrackingResponse) => {
if (this.common.validResponse(result)) {
const key = 'GetAttendanceTrackingList';
this.convertAndAssignTime(result[key]);
}
});
}
}
openPeriodDateDashbored() {
this.DS.getOpenPeriodDates( () => {console.log('Error '); } ).subscribe((result: OpenPeriodDatesResponse) => {
openPeriodDateDashbored() {
this.DS.getOpenPeriodDates(() => { console.log('Error '); }).subscribe((result: OpenPeriodDatesResponse) => {
if (this.common.validResponse(result)) {
console.log('response');
}
});
}
openNotificationsDashbored() { // work list
this.DS.getOpenNotifications( () => { console.log('Error '); }).subscribe((result: GetOpenNotificationsResponse) => {
openNotificationsDashbored() {
// work list
this.DS.getOpenNotifications(() => {
console.log("Error ");
}).subscribe((result: GetOpenNotificationsResponse) => {
if (this.common.validResponse(result)) {
const key = 'P_OPEN_NTF_NUMBER';
this.countAllNotification = result[key];
this.ITGCountAllNotification();
this.common.sharedService.setSharedData(result, 'worklistNotifications');
this.common.sharedService.setSharedData(
result,
'worklistNotifications'
);
}
});
}
ITGCountAllNotification(){
this.workListService.getITGDetails()
.subscribe((result: any) => {
this.statsButtons[0].statsValue = this.countAllNotification + result.TotalCount;
ITGCountAllNotification() {
this.workListService.getITGDetails().subscribe((result: any) => {
this.statsButtons[0].statsValue =
this.countAllNotification + result.TotalCount;
});
}
getSubordinatesLeaves() {
const request: GetSubordinatesLeavesRequest = new GetSubordinatesLeavesRequest();
request.P_DATE_FROM = '/Date(1578603600000+0300)/'; // test
request.P_DATE_TO = '/Date(1576011600000+0300)/'; // test
this.DS.getSubordinatesLeaves( request, () => {console.log('Error '); } ).subscribe((result: GetSubordinatesLeavesResponse) => {
request.P_DATE_FROM = "/Date(1578603600000+0300)/"; // test
request.P_DATE_TO = "/Date(1576011600000+0300)/"; // test
this.DS.getSubordinatesLeaves(request, () => {
console.log("Error ");
}).subscribe((result: GetSubordinatesLeavesResponse) => {
if (this.common.validResponse(result)) {
console.log('response');
console.log(result);
}
});
}
getSubordinatesAttStatus() {
getSubordinatesAttStatus() {
const request: GetSubordinatesAttdStatusRequest = new GetSubordinatesAttdStatusRequest();
request.P_SCHEDULE_DATE_FROM = '/Date(1578603600000+0300)/'; // test
request.P_SCHEDULE_DATE_TO = '/Date(1576011600000+0300)/'; // test
this.DS.getSubordinatesAttStatus( request, () => {console.log('Error '); }).subscribe((result: GetSubordinatesAttdStatusResponse) => {
request.P_SCHEDULE_DATE_FROM = "/Date(1578603600000+0300)/"; // test
request.P_SCHEDULE_DATE_TO = "/Date(1576011600000+0300)/"; // test
this.DS.getSubordinatesAttStatus(request, () => {
console.log("Error ");
}).subscribe((result: GetSubordinatesAttdStatusResponse) => {
if (this.common.validResponse(result)) {
console.log('response');
console.log(result);
@ -571,7 +640,10 @@ export class HomePage implements OnInit {
openPage(subMenu) {
console.log("openPage");
let selMenu: MenuResponse = new MenuResponse();
selMenu = this.common.sharedService.getSharedData(MenuResponse.SHARED_DATA, false);
selMenu = this.common.sharedService.getSharedData(
MenuResponse.SHARED_DATA,
false
);
selMenu.GetMenuEntriesList = subMenu;
this.common.sharedService.setSharedData(selMenu, MenuResponse.SHARED_DATA);
if (subMenu.REQUEST_TYPE === 'ABSENCE') {
@ -581,58 +653,80 @@ export class HomePage implements OnInit {
} else if (subMenu.REQUEST_TYPE === 'PAYSLIP') {
this.common.openPayslipPage();
} else if (subMenu.MENU_ENTRY_TYPE === 'MENU') {
this.common.sharedService.setSharedData(selMenu.GetMenuEntriesList, "menuEntries");
this.common.sharedService.setSharedData(
selMenu.GetMenuEntriesList,
'menuEntries'
);
this.common.openEITPage();
}
if (subMenu.REQUEST_TYPE === 'TIME_CARD') {
this.common.openTimeCardPage();
}
}
getAccrualBalance() {
const today = new Date();
const day = today.getDate();
const month = today.getMonth() + 1;
const year = today.getFullYear();
const todayDate = month + '/' + day + '/' + year;
const effectiveDate = todayDate;
const request = {
P_SELECTED_EMPLOYEE_NUMBER: this.userData.EMPLOYEE_NUMBER,
P_EFFECTIVE_DATE: effectiveDate
};
this.accrualService
.getAccrualBalances(request)
.subscribe((result: any) => {
if (this.common.validResponse(result)) {
let totalTicketsLeft = 0;
this.accrualBalancesList = result.GetAccrualBalancesList;
for (const accrualBalance of result.GetAccrualBalancesList) {
if (accrualBalance.ACCURAL_PLAN_NAME === 'HMG Annual Vacation Accrual Plan') {
this.statsButtons[3].statsValue = accrualBalance.ACCRUAL_NET_ENTITLEMENT;
this.common.sharedService.setSharedData( accrualBalance, 'leaveAccrualBalance');
this.common.sharedService.setSharedData( request, 'leaveAccrualBalanceDate');
this.common.sharedService.setSharedData( this.accrualBalancesList, 'tickitsbalance')
} else {
totalTicketsLeft = totalTicketsLeft + accrualBalance.ACCRUAL_NET_ENTITLEMENT;
}
}
this.statsButtons[4].statsValue = totalTicketsLeft;
const today = new Date();
const day = today.getDate();
const month = today.getMonth() + 1;
const year = today.getFullYear();
const todayDate = month + "/" + day + "/" + year;
const effectiveDate = todayDate;
const request = {
P_SELECTED_EMPLOYEE_NUMBER: this.userData.EMPLOYEE_NUMBER,
P_EFFECTIVE_DATE: effectiveDate
};
this.accrualService.getAccrualBalances(request).subscribe((result: any) => {
if (this.common.validResponse(result)) {
let totalTicketsLeft = 0;
this.accrualBalancesList = result.GetAccrualBalancesList;
for (const accrualBalance of result.GetAccrualBalancesList) {
if (
accrualBalance.ACCURAL_PLAN_NAME ===
"HMG Annual Vacation Accrual Plan"
) {
this.statsButtons[2].statsValue =
accrualBalance.ACCRUAL_NET_ENTITLEMENT;
this.common.sharedService.setSharedData(
accrualBalance,
"leaveAccrualBalance"
);
this.common.sharedService.setSharedData(
request,
"leaveAccrualBalanceDate"
);
this.common.sharedService.setSharedData(
this.accrualBalancesList,
"tickitsbalance"
);
} else {
totalTicketsLeft =
totalTicketsLeft + accrualBalance.ACCRUAL_NET_ENTITLEMENT;
}
});
}
this.statsButtons[3].statsValue = totalTicketsLeft;
}
});
}
openattentracking() {
openattentracking() {
this.common.openAttenTrackingpage();
}
}
openProfilePage() {
openProfilePage() {
this.common.openEditProfile();
}
openStatsButton(link: string) {
console.log(link);
this.common.openPage(link);
}
openStatsButton(link: any) {
// console.log(link);
if (link == "1") {
this.common.openNotificationPage();
} else if (link == "2") {
this.openPage(this.missingSwipeRequestObject);
} else if (link == "3") {
this.openPage(this.leaveRequestObject);
} else if (link =="4") {
this.openPage(this.ticketRequestObject);
}
}
}

@ -1,158 +1,282 @@
<ion-header>
<ion-toolbar class="header-toolbar-new">
<ion-buttons slot="start">
<nav-buttons (backClick)="goback()" [navigate]="false"></nav-buttons>
</ion-buttons>
<ion-title>EMPLOYEE DETAIL</ion-title>
</ion-toolbar>
</ion-header>
<ion-header>
<ion-toolbar class="header-toolbar">
<ion-buttons slot="start">
<nav-buttons [navigate] = "false" (backClick)="goback()"></nav-buttons>
<ion-icon class="search-icons" color="light" name="arrow-back" *ngIf="modalFlag" (click)="dismiss()"></ion-icon>
</ion-buttons>
<ion-title color="light" >{{headerTitle}}</ion-title>
<!-- <ion-buttons slot="end">
<button ion-button icon-only class="btnBack" *ngIf="isSpecialist == false" (click)="goToSubordinate();">
<ion-icon class="search-icons" color="light" name="search"></ion-icon>
</button>
</ion-buttons> -->
</ion-toolbar>
</ion-header>
<ion-content padding>
<div *ngIf="employee">
<ion-card>
<ion-card-header class="boxHdr">
<div class="hrTitle">{{employee.EMPLOYEE_NAME}}</div>
</ion-card-header>
<ion-card-content>
<div>
<div class="centerDiv profileDiv">
<!-- <p class="TxtPlace boldTxt">{{User_name_Emp}}</p> -->
<ion-img class="profileImg"
[src]="employee.EMPLOYEE_IMAGE ? 'data:image/png;base64,'+employee.EMPLOYEE_IMAGE : '../assets/imgs/profile.png'">
</ion-img>
</div>
<ion-grid class="profile-grid">
<ion-row>
<ion-col class="colBold" col-5>
<label>{{ts.trPK('userProfile','empNo')}}</label>
</ion-col>
<ion-col col-7>
<label>{{employee.EMPLOYEE_NUMBER}}</label>
</ion-col>
</ion-row>
<!-- <ion-row>
<ion-col class="colBold" col-5>
<label>{{"userProfile.name" | translate}}</label>
</ion-col>
<ion-content>
<div class="contentBg">
<div class="result-graph" style="padding-top: 12px;">
<div class="user-info">
<div class="user-image-container">
<div class="user-image">
<img [src]="employee.EMPLOYEE_IMAGE ? 'data:image/png;base64,'+employee.EMPLOYEE_IMAGE : '../assets/imgs/profile.png'" alt="Team Member Image"/>
</div>
</div>
<h1>{{employee.EMPLOYEE_NAME}}</h1>
<span>{{employee.JOB_NAME}}</span>
</div>
<div class="user-actions">
<ion-row class="ion-justify-content-center">
<ion-col [size]="4">
<div class="action-button col-button">
<a class="action-button-icon" href="tel:{{employee.EMPLOYEE_MOBILE_NUMBER}}">
<img src="../assets/imgs/call_icon.png">
</a>
<span>Call</span>
</div>
</ion-col>
<ion-col [size]="4" (click)="getMenuEntries(employee)">
<div class="action-button col-button">
<span class="action-button-icon">
<img src="../assets/imgs/create_request_icon.png">
</span>
<span>Create Request</span>
</div>
</ion-col>
<ion-col [size]="4" style="opacity:0.3;">
<div class="action-button col-button">
<span class="action-button-icon">
<img src="../assets/imgs/message_icon.png">
</span>
<span>Message</span>
</div>
</ion-col>
</ion-row>
<ion-row>
<ion-col col-7>
<label>{{employee.EMPLOYEE_NAME}}</label>
</ion-col>
</ion-row> -->
<ion-row>
<ion-col class="colBold" col-5>
<label>{{ts.trPK('userProfile','busG')}}</label>
</ion-col>
<ion-col col-7>
<label>{{employee.BUSINESS_GROUP_NAME}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold" col-5>
<label>{{ts.trPK('userProfile','job')}}</label>
</ion-col>
<ion-col col-7>
<label>{{employee.JOB_NAME}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold" col-5>
<label>{{ts.trPK('userProfile','locName')}} </label>
</ion-col>
<ion-col col-7>
<label>{{employee.LOCATION_NAME}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold" col-5>
<label>{{ts.trPK('userProfile','payrol')}} </label>
</ion-col>
<ion-col col-7>
<label>{{employee.PAYROLL_NAME}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold" col-5>
<label>{{ts.trPK('userProfile','orgEmail')}}</label>
</ion-col>
<ion-col col-7>
<label>{{employee.EMPLOYEE_EMAIL_ADDRESS}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold" col-5>
<label>{{ts.trPK('userProfile','orgName')}}</label>
</ion-col>
<ion-col col-7>
<label>{{employee.ORGANIZATION_NAME}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold" col-5>
<label>{{ts.trPK('userProfile','position')}}</label>
</ion-col>
<ion-col col-7>
<label>{{employee.POSITION_NAME}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold" col-5>
<label>{{ts.trPK('userProfile','grade')}}</label>
</ion-col>
<ion-col col-7>
<label>{{employee.GRADE_NAME}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold" col-5>
<label>{{ts.trPK('userProfile','category')}}</label>
</ion-col>
<ion-col col-7>
<label>{{employee.EMPLOYMENT_CATEGORY_MEANING}}</label>
</ion-col>
</ion-row>
<!-- <ion-row (click)="getMenuEntries(employee);">
<ion-col col-7> -->
<!-- <label for="">Request for {{employee.EMPLOYEE_NAME}}</label> -->
<!-- </ion-col>
</ion-row> -->
</ion-grid>
</div>
</div>
<div class="segments-container">
<ion-segment
(ionChange)="segmentChanged($event)"
[value]="activeSegment">
<ion-segment-button
value="Attendance"
[ngClass]="activeSegment == 'Attendance' ? 'active-Segment' : 'normal-Segment'" >
<ion-label>Attendance</ion-label>
</ion-segment-button>
<ion-segment-button
value="Team Members"
[ngClass]="activeSegment == 'Team Members' ? 'active-Segment' : 'normal-Segment'">
<ion-label>Team Members</ion-label>
</ion-segment-button>
<ion-segment-button
value="About"
[ngClass]="activeSegment == 'About' ? 'active-Segment' : 'normal-Segment'">
<ion-label>About</ion-label>
</ion-segment-button>
</ion-segment>
</div>
<div *ngIf="activeSegment === 'Attendance'">
<div>
<p style="margin-bottom: 1px;">
{{ts.trPK('myTeam','todayAttendance')}}
</p>
<ion-row style="margin: 0 -5px;">
<ion-col [size]="4">
<div class="attendance-information">
<span>{{ts.trPK('myTeam','checkIn')}}</span>
<h2 *ngIf="attendanceTrackingList.P_SWIPE_IN !== null">{{attendanceTrackingList.P_SWIPE_IN | slice:0:-3}}</h2>
<h2 *ngIf="attendanceTrackingList.P_SWIPE_IN === null">--:--</h2>
</div>
</ion-col>
<ion-col [size]="4">
<div class="attendance-information">
<span>{{ts.trPK('myTeam','checkOut')}}</span>
<h2 *ngIf="attendanceTrackingList.P_SWIPE_OUT !== null">{{attendanceTrackingList.P_SWIPE_OUT | slice:0:-3}}</h2>
<h2 *ngIf="attendanceTrackingList.P_SWIPE_OUT === null">--:--</h2>
</div>
</ion-col>
<ion-col [size]="4">
<div class="attendance-information">
<span>{{ts.trPK('myTeam','late')}}</span>
<h2>{{attendanceTrackingList.P_LATE_IN_HOURS | slice:0:-3}} </h2>
</div>
</ion-col>
</ion-row>
</div>
<div class="header">
<div>
<ion-row>
<ion-col [size]="2" style="text-align: left;">
<ion-icon class="activeArrow" ios="ios-arrow-dropleft-circle" md="md-arrow-dropleft-circle" (click)="previousSlide()"></ion-icon>
</ion-col>
<ion-col [size]="8" style="text-align: center;">
<span class="month-year-span">{{month}} {{year}}</span>
</ion-col>
<ion-col [size]="2" style="text-align: right;">
<ion-icon [ngClass]=" currentMonthName === month ? 'disabledArrow' : 'activeArrow'" ios="ios-arrow-dropright-circle" md="md-arrow-dropright-circle" (click)="nextSlide()"></ion-icon>
</ion-col>
</ion-row>
</div>
</div>
<div class="result-graph">
<div class="request-heading">
<span>{{ts.trPK('myTeam','attendance-statistics')}}</span>
</div>
<div style="position: relative;">
<div class="label-container">
<div class="green-label-container">
<span class="span-one">{{ts.trPK('attendance','present')}}</span>
<span class="span-two">{{attendedDays}}</span>
</div>
<div class="blue-label-container">
<span class="span-one">{{ts.trPK('attendance','absent')}}</span>
<span class="span-two">{{absentDays}}</span>
</div>
</div>
<div class="graph-container">
<div class="result-text-container">
<h2>{{totalAttendancePrecentage}}</h2>
<span>{{ts.trPK('absenceList','days')}}</span>
</div>
</ion-card-content>
</ion-card>
<div class="centerDiv">
<ion-button color="customnavy" (click)="getMenuEntries(employee)">{{ts.trPK('myTeam','requestFor')}}
{{employee.EMPLOYEE_NAME}}</ion-button>
<p-chart class="today-graph" type="doughnut" [data]="data" [options]="options"></p-chart>
</div>
</div>
</div>
<div *ngIf="isSpecialist == false" >
<ion-list no-lines *ngIf="empSubordinate && empSubordinate.length>0">
<ion-item no-border *ngFor="let subordinate of empSubordinate;let i=index" (click)="getDetails(i);">
<ion-avatar slot="start">
<!-- <img *ngIf="subordinate.EMPLOYEE_IMAGE" src="data:image/*;base64,{{ subordinate.EMPLOYEE_IMAGE}}"> -->
<img
[src]="subordinate.EMPLOYEE_IMAGE ? 'data:image/png;base64,'+subordinate.EMPLOYEE_IMAGE : '../assets/imgs/profile.png'">
</ion-avatar>
<p class="boldTxt">{{subordinate.EMPLOYEE_NAME}}</p>
<p>{{subordinate.POSITION_NAME}}</p>
<ion-badge slot="end">{{subordinate.NUM_OF_SUBORDINATES}}</ion-badge>
</ion-item>
</ion-list>
<ion-infinite-scroll threshold="100px" (ionInfinite)="doInfinite($event)">
<ion-infinite-scroll-content
loadingSpinner="bubbles"
loadingText="Loading more data...">
</ion-infinite-scroll-content>
</ion-infinite-scroll>
<ion-row class="attendance-summary">
<ion-col [size]="3">
<div class="attendance-information">
<span>{{ts.trPK('attendance-tracking','schedule')}}</span>
<h2>{{timeCardSummaryData.SCHEDULE_DAYS}}</h2>
</div>
</ion-col>
<ion-col [size]="3">
<div class="attendance-information">
<span>{{ts.trPK('attendance-tracking','off-days')}}</span>
<h2>{{timeCardSummaryData.OFF_DAYS}}</h2>
</div>
</ion-col>
<ion-col [size]="3">
<div class="attendance-information">
<span>{{ts.trPK('attendance-tracking','non-analyzed')}}</span>
<h2>{{timeCardSummaryData.UNAUTHORIZED_LEAVE}}</h2>
</div>
</ion-col>
<ion-col [size]="3">
<div class="attendance-information">
<span>{{ts.trPK('attendance-tracking','shortage-hours')}}</span>
<h2>{{timeCardSummaryData.SHORTAGE_HRS}}</h2>
</div>
</ion-col>
</ion-row>
<div *ngIf="showData" class="calendar-container">
<span> {{ts.trPK('attendance','monthly-attendance-calendar')}}</span>
<app-circle-calendar
[eventsdateAttend]='arrDaysAttendance'
[eventsdateAbsent]='arrDaysAbsent'
[eventsdateDayOff]='arrDaysOff'
[currentDateParent]="currentDate"
[dayHoursTypeDetailsList]="dayHoursTypeDetailsList"
[normalDays]="normalDays"
(monthTitle)='changeMonthTitle($event)'
(currentYear)=changeYear($event)>
</app-circle-calendar>
</div>
</div>
</ion-content>
<div *ngIf="activeSegment === 'Team Members'">
<div style="margin-top: 15px;background: white;border-radius: 100px;overflow: hidden;">
<ion-row no-padding>
<ion-col [size]="3" class="search-dropdown" no-padding>
<ion-select okText="{{ts.trPK('general','ok')}}" cancelText="{{ts.trPK('general','cancel')}}"
[(ngModel)]="searchKeySelect" (ionChange)="showSelectedField($event)">
<ion-select-option value="Name" selected="true">{{ts.trPK('searchForReplacment','name')}}</ion-select-option>
<ion-select-option value="User Name">{{ts.trPK('searchForReplacment','userName')}} </ion-select-option>
<ion-select-option value="Email">{{ts.trPK('searchForReplacment','email')}} </ion-select-option>
</ion-select>
</ion-col>
<ion-col [size]="7" class="input-container" no-padding>
<ion-input *ngIf="showEmailInput" placeholder="Employee Email" [(ngModel)]="searchEmail" pattern="email"></ion-input>
<ion-input *ngIf="showUserNameOrNameInput" placeholder="Search" [(ngModel)]="searchNameOrUserName"></ion-input>
</ion-col>
<ion-col [size]="2" style="background: #ccc;text-align: center;" no-padding (click)="searchEmployeeTwo()">
<ion-icon style="margin-top: 10px;font-size: 20px;" class="search-icons" color="light" name="search"></ion-icon>
</ion-col>
</ion-row>
</div>
<div *ngIf="isSearch">
<ion-row class="search-container">
<ion-col style="float: left;" size=[6] (click)="clearSearchTwo()">
<span style="margin-left: 5px;">Clear Search</span>
<ion-icon name="close" ></ion-icon>
</ion-col>
</ion-row>
</div>
<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"
(click)="getDetails(i)">
</app-employee-information>
</ng-container>
<ion-infinite-scroll (ionInfinite)="doInfinite($event)">
<ion-infinite-scroll-content></ion-infinite-scroll-content>
</ion-infinite-scroll>
</div>
<div class="employee-information-indetail" *ngIf="activeSegment === 'About'">
<ion-row>
<ion-col [size]="6" style="border-right: 1px solid #ccc;">
<h2>Employee ID</h2>
<p>{{employee.EMPLOYEE_NUMBER}}</p>
</ion-col>
<ion-col [size]="6">
<h2>Category</h2>
<p>{{employee.EMPLOYMENT_CATEGORY_MEANING}}</p>
</ion-col>
<ion-col [size]="12">
<h2>Address</h2>
<p>{{employee.LOCATION_NAME}}</p>
</ion-col>
<ion-col [size]="12">
<h2>Phone Number</h2>
<p>{{employee.EMPLOYEE_MOBILE_NUMBER}}</p>
</ion-col>
<ion-col [size]="12">
<h2>Business Group</h2>
<p>{{employee.ORGANIZATION_NAME}}</p>
</ion-col>
<ion-col [size]="12">
<h2>Job</h2>
<p>{{employee.JOB_NAME}}</p>
</ion-col>
<ion-col [size]="12">
<h2>Payroll</h2>
<p>{{employee.PAYROLL_NAME}}</p>
</ion-col>
<ion-col [size]="12">
<h2>Organization Email Address</h2>
<p>{{employee.EMPLOYEE_EMAIL_ADDRESS}}</p>
</ion-col>
<ion-col [size]="12">
<h2>Position</h2>
<p>{{employee.POSITION_NAME}}</p>
</ion-col>
<ion-col [size]="12" style="border-bottom: none;">
<h2>Grade</h2>
<p>{{employee.GRADE_NAME}}</p>
</ion-col>
</ion-row>
</div>
</div>
</ion-content>

@ -1 +1,415 @@
.search-icons{font-size:.7cm}
ion-content {
--ion-background-color: whitesmoke;
}
ion-title{
color: white;
position: absolute;
top: 0;
text-align: center;
left: 15%;
right: 15%;
font-size: 0.42cm;
font-weight: bold;
height: 100%;
}
.contentBg{
padding: 0px 20px;
}
.contentBg:before {
position: absolute;
content: "";
background: #22c6b3;
height: 140px;
width: 100%;
left: 0;
top: 0px;
z-index: 1;
}
.user-info{
text-align: center;
margin-bottom: 15px;
.user-image-container{
position: relative;
width: 80px;
height: 80px;
display: block;
margin: 0 auto;
// &:before{
// position: absolute;
// content: "";
// width: 20px;
// height: 20px;
// border-radius: 20px;
// border: 1px solid white;
// top: 0;
// right: 0;
// background-color: red;
// z-index: 9;
// }
// &.present:before{
// background-color: green !important;
// }
}
.user-image{
overflow: hidden;
position: relative;
display: block;
width: 100%;
height: 100%;
border-radius: 80px;
border: 1px solid #ccc;
margin: 0px auto 6px;
}
h1{
margin: 0;
padding: 0;
font-family: WorkSans-Bold;
font-size: 18px;
margin-bottom: 4px;
}
span{
font-size: 14px;
display: block;
color: #888
}
}
$actionBtnSize : 36px;
.user-actions{
text-align: center;
.action-button{
font-size: 11px;
white-space: nowrap;
color: #888;
.action-button-icon{
width: $actionBtnSize;
height: $actionBtnSize;
border-radius: $actionBtnSize;
margin: 0 auto;
display: block;
background-color: #22c6b3;
line-height: $actionBtnSize;
margin-bottom: 3px;
img{
margin: 0 auto;
vertical-align: middle;
}
}
}
}
.employee-information-indetail{
background: white;
margin-top: 15px;
border-radius: 20px;
margin-bottom: 15px;
ion-col{
padding: 15px;
border-bottom: 1px solid #ccc;
}
h2{
font-size: 13px;
font-family: WorkSans-Bold;
margin: 0;
}
p{
font-size: 13px;
margin: 0;
}
}
.segments-container {
border-radius: 100px;
overflow: hidden;
margin-top: 15px;
background: white;
color: black;
}
.active-Segment {
font-size: 0.3cm !important;
background: #22c6b3 !important;
text-transform: none;
--color-checked: none;
border-radius: 100px;
border:0;
}
.active-Segment ion-label{
font-size: 11px;
color: white !important;
}
.normal-Segment ion-label{
color: black !important;
font-size: 11px;
}
.normal-Segment {
font-size: 0.3cm !important;
text-transform: none;
--color-checked: none;
border: 0;
}
.colum-container{
padding: 15px;
border-bottom: 1px solid #ccc;
}
///////////////////////// Team Members css //////////////////////@extend
.filters-row {
margin-top: 10px;
}
.search-dropdown{
background: #22c6b3;
ion-select {
.select-text{
margin-left: -10px;
}
.select-icon{
.select-icon-inner{
opacity: 1;
color: white;
margin-top: -1px;
}
}
}
}
.input-container{
background: white;
ion-input{
border-bottom-color: transparent;
}
}
.search-container{
margin-top: 15px;
ion-col{
background: white;
border-radius: 12px;
padding-right: 10px;
flex: none;
ion-icon{
margin-right: 3px;
font-size: 14px;
margin-left: 3px;
vertical-align: middle;
}
span{
font-size: 12px;
vertical-align: middle;
}
}
}
/////////////////////////////////////////////////////// Attendance ///////////////////////
.header{
margin-top: 20px;
}
.slidPrev{
margin-left: 10px;
background: transparent;
}
.slidNext{
background: transparent;
margin-top: -1px;
margin-left: 43px;
}
.activeArrow{
height: 20px;
width: 20px;
color: #22c6b3;
}
.disabledArrow{
height: 20px;
width: 20px;
color: gray;
}
.result-graph {
position: relative;
background: white;
margin-top: 20px;
padding-bottom: 20px;
border-radius: 20px;
z-index: 1;
margin-bottom: 10px;
}
.request-heading {
span {
text-align: left;
display: block;
padding-top: 8px;
margin-bottom: 10px;
margin-left: 10px;
}
}
.result-text-container {
padding: 0;
margin: 0;
position: absolute;
left: 50%;
top: 50%;
display: block;
text-align: center;
transform: translate(-50%, -50%);
h2 {
font-size: 38px;
font-family: WorkSans-Bold;
margin: 0 auto;
line-height: 36px;
}
span {
width: 125px;
display: block;
margin: 0 auto;
font-size: 12px;
font-family: workSans-Regular;
}
}
.today-graph {
width: 100%;
max-height: 4cm;
}
.green-label{
font-size: 12px;
margin-top: -13px;
}
.green-amount{
font-size: 17px;
font-family: WorkSans-Bold;
margin-top: -3px;
}
.blue-label{
font-size: 12px;
margin-top: -13px;
}
.blue-amount{
font-size: 17px;
font-family: WorkSans-Bold;
margin-top: -4px;
}
.labelGrid{
background-color: white !important;
border-radius: 20px !important;
height: 88px !important;
border: 1px solid #d6d4d4;
position: relative;
padding: 10px;
label {
font-size: 9px;
line-height: 11px !important;
display: block;
}
h2 {
font-size: 25px;
font-weight: bold;
display: block;
text-align: right;
margin:0;
position: absolute;
bottom: 0;
left:0;
width: 100%;
padding: 10px;
}
}
.bodyGrid{
margin-top: 7px !important;
margin-left: 15px !important;
margin-right: 15px !important;
background-color: white !important;
border-radius: 20px !important;
height: 321px !important;
border: 1px solid #d6d4d4 !important;
}
.attendance-information{
background: white;
border-radius: 20px;
padding: 10px;
h2{
padding: 0;
margin: 0;
font-size: 22px;
}
span{
font-size: 11px;
}
}
.month-year-span{
font-size: 20px;
font-family: WorkSans-Bold;
}
.green-label-container{
border-top: 5px solid #22c6b3;
padding: 1px 0px;
margin: 15px 0px
}
.blue-label-container{
border-top: 5px solid #094875;
padding: 1px 0px;
margin: 15px 0px
}
.span-one{
display: block;
font-size: 12px;
color: black;
}
.span-two{
display: block;
font-size: 22px;
font-family: WorkSans-Bold;
}
.graph-container{
margin-left: -50px;
position: relative;
margin-right: 50px;
}
.label-container{
position: absolute;
width: 20%;
right: 30px;
top: 50%;
margin-top: -60px;
}
.attendance-summary .attendance-information {
span{
height: 32px;
display: block;
line-height: 14px;
}
h2{
text-align: right;
font-family: WorkSans-Bold;
}
}
.calendar-container{
background: white;
margin-bottom: 100px;
margin-top: 20px;
border-radius: 20px;
span{
text-align: left;
display: block;
padding-top: 8px;
margin-bottom: 10px;
margin-left: 10px;
}
}

@ -1,36 +1,94 @@
import { Component, OnInit,ViewChild } from "@angular/core";
import { Location } from "@angular/common";
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";
import { MenuService } from "src/app/hmg-common/services/menu/menuservice.service";
import { ModalController } from "@ionic/angular";
import { Component, OnInit, ViewChild } from '@angular/core';
import { Location } from '@angular/common';
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';
import { MenuService } from 'src/app/hmg-common/services/menu/menuservice.service';
import { ModalController } from '@ionic/angular';
import { IonInfiniteScroll } from '@ionic/angular';
import * as moment from 'moment';
import { TimeCardService } from 'src/app/time-card/service/time-card.service';
import { GetDayAndHoursDetailsRequest } from 'src/app/time-card/service/models/get-day-hours-type-details.request';
import { GetTimeCardSummaryRequest } from 'src/app/time-card/service/models/get-time-card-summary.request';
import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbored.service';
import { AttendanceTrackingResponse } from 'src/app/hmg-common/services/dashbored/attendance-tracking.response';
@Component({
selector: "app-details",
templateUrl: "./details.component.html",
styleUrls: ["./details.component.scss"]
selector: 'app-details',
templateUrl: './details.component.html',
styleUrls: ['./details.component.scss']
})
export class DetailsComponent implements OnInit {
public static opendEmployeesARR='opend_employees_arr';
public static opendEmployeesARR = 'opend_employees_arr';
@ViewChild(IonInfiniteScroll) infiniteScroll: IonInfiniteScroll;
pageNum: number = 1;
pageLimit: number = 50;
modalFlag: any = false;
public activeSegment = 'Attendance';
pageNum = 1;
pageLimit = 50;
empSubordinate: any;
employee: any;
IsReachEnd: boolean = false;
isReachEnd = false;
searchKey: any;
public searchKeySelect: any;
public isSearch = false;
public searchKeySelect = 'Name';
public getEmployeeSubordinatesRequestObject: any;
infiniteRequest: any;
isSpecialist: boolean = false;
isSpecialist = false;
selMenu: MenuResponse = new MenuResponse();
public opendEmployees :any=[];
public headerTitle: string = "";
public opendEmployees: any = [];
public headerTitle = '';
public userImage: any = '../assets/imgs/profile.png';
public menuType: any;
public selEmp: string;
public dateFrom: any = new Date();
public dateTo: any = new Date();
public respID: number;
public timeCardSummaryData: any = [];
public dayHoursData: any = [];
public selectedShift: any;
public dayAndHoursPageNumber = 1;
public monthName: any;
public yearDate: any;
public absentDays: number;
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;
public currentMonthName = this.getMonthName(new Date().getMonth() + 1);
public showData = false;
public currentYear = new Date().getFullYear();
public attendanceTrackingList: any = [];
public currentDate = new Date();
public dayHoursTypeDetailsList = [];
month: any;
year: any;
preMonth: number;
nextMonth: any;
public options = {
cutoutPercentage: 80,
tooltips: { enabled: false },
legend: { display: false }
};
public data = {};
public previousActiveIndex = 0;
public currentActiveIndex = 0;
public searchNameOrUserName = '';
public searchEmail = '';
public showEmailInput = false;
public showUserNameOrNameInput = true;
constructor(
public timeCardService: TimeCardService,
public menuService: MenuService,
public common: CommonService,
public myTeamService: MyTeamService,
@ -38,58 +96,281 @@ export class DetailsComponent implements OnInit {
public modalController: ModalController,
private location: Location,
public authService: AuthenticationService,
) {
console.log("Constuctor called");
}
public dashboardService: DashboredService,
) { }
ngOnInit() {
this.intializeMemberDetail();
this.showAttendanceTracking();
}
showAttendanceTracking() {
this.employee = this.common.sharedService.getSharedData(MyTeamService.EMPLOYEE_SHARED_DATA, false);
const request = {
P_SELECTED_EMPLOYEE_NUMBER: this.employee.EMPLOYEE_NUMBER
};
this.dashboardService.getAttendanceTracking(request).subscribe((result: AttendanceTrackingResponse) => {
if (this.common.validResponse(result)) {
const key = 'GetAttendanceTrackingList';
this.attendanceTrackingList = result[key];
}
});
}
public segmentChanged(event: any) {
this.activeSegment = event.detail.value;
if (this.activeSegment === 'Attendance') {
this.normalDays = [];
this.initAttendance();
}
}
initAttendance() {
this.data = {};
this.currentMonthName = this.getMonthName(new Date().getMonth() + 1);
this.currentYear = new Date().getFullYear();
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.calendarConfig(this.getMonthName(new Date().getMonth() + 1) , new Date().getFullYear());
}
calendarConfig(month?, year?) {
this.arrDaysOff = [];
this.arrDaysAttendance = [];
this.arrDaysAbsent = [];
this.month = month;
this.year = year;
this.getTimeCardSummaryDetails(month, year);
this.getDayHoursTypeDetails(month, year);
}
public getDayHoursTypeDetails(month?, year?) {
console.log('getDayHoursTypeDetails');
const dayAndHoursReqObj = new GetDayAndHoursDetailsRequest();
this.monthName = month;
this.yearDate = year;
this.selEmp = this.common.sharedService.getSharedData(MenuResponse.SHARED_SEL_EMP, false);
this.respID = this.common.sharedService.getSharedData(MenuResponse.SHARED_SEL_RESP_ID, false);
this.selMenu = this.common.sharedService.getSharedData(MenuResponse.SHARED_DATA, false);
this.menuType = this.selMenu.List_Menu.MENU_TYPE;
dayAndHoursReqObj.P_SELECTED_EMPLOYEE_NUMBER = this.employee.EMPLOYEE_NUMBER;
dayAndHoursReqObj.P_MENU_TYPE = 'M';
dayAndHoursReqObj.P_SELECTED_RESP_ID = this.respID;
dayAndHoursReqObj.SearchMonth = this.monthName;
dayAndHoursReqObj.SearchYear = this.yearDate;
dayAndHoursReqObj.P_PAGE_NUM = this.dayAndHoursPageNumber;
dayAndHoursReqObj.P_PAGE_LIMIT = 100;
this.timeCardService.getDayHoursTypeDetails(dayAndHoursReqObj).subscribe((result) => {
if (this.common.validResponse(result)) {
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) {
this.currentYear = this.currentYear + 1;
this.nextMonth = 1;
}
this.currentDate = new Date(this.currentYear, (this.nextMonth - 1), 1);
this.calendarConfig(this.getMonthName(this.nextMonth) , this.currentYear);
this.nextMonth = this.nextMonth + 1;
this.preMonth = this.nextMonth - 2;
}
}
previousSlide() {
this.normalDays = [];
this.showData = false;
if (this.preMonth === 0) {
this.currentYear = this.currentYear - 1;
this.preMonth = 12;
}
this.currentDate = new Date(this.currentYear, (this.preMonth - 1), 1);
console.log(this.currentDate);
this.calendarConfig(this.getMonthName(this.preMonth) , this.currentYear);
this.preMonth = this.preMonth - 1;
this.nextMonth = this.preMonth + 2;
}
changeMonthTitle(title) {
this.monthTitle = title;
this.getTimeCardSummaryDetails();
}
changeYear(year) {
this.yearTitle = year;
}
countAllAttendDays(allDays) {
// 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') {
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)
});
// 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
});
// 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)
});
} 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)
});
}
}
this.showData = true;
}
public getTimeCardSummaryDetails(month?, year?) {
const timeCardSummaryReqObj = new GetTimeCardSummaryRequest();
this.monthName = month;
this.yearDate = year;
this.selEmp = this.common.sharedService.getSharedData(MenuResponse.SHARED_SEL_EMP, false);
this.respID = this.common.sharedService.getSharedData(MenuResponse.SHARED_SEL_RESP_ID, false);
this.selMenu = this.common.sharedService.getSharedData(MenuResponse.SHARED_DATA, false);
this.menuType = this.selMenu.List_Menu.MENU_TYPE;
timeCardSummaryReqObj.P_SELECTED_EMPLOYEE_NUMBER = this.employee.EMPLOYEE_NUMBER;
timeCardSummaryReqObj.P_MENU_TYPE = 'M';
timeCardSummaryReqObj.P_SELECTED_RESP_ID = this.respID;
timeCardSummaryReqObj.SearchMonth = this.monthName;
timeCardSummaryReqObj.SearchYear = this.yearDate;
this.timeCardService.getTimeCardSummary(timeCardSummaryReqObj).subscribe((result) => {
if (this.common.validResponse(result)) {
this.timeCardSummaryData = result.GetTimeCardSummaryList[0];
this.absentDays = this.timeCardSummaryData.ABSENT_DAYS;
this.attendedDays = this.timeCardSummaryData.ATTENDED_DAYS;
// this.totalAttendancePrecentage = this.timeCardSummaryData.PERIOD_DAYS - this.timeCardSummaryData.OFF_DAYS;
// if (this.absentDays === 0 && this.attendedDays === 0) {
// this.futrueDays = this.totalAttendancePrecentage;
// }
this.totalAttendancePrecentage = this.absentDays + this.attendedDays;
if (this.totalAttendancePrecentage > 0) {
this.data = {
datasets: [
{
data: [this.absentDays, this.attendedDays],
backgroundColor: [
'#094875',
'#22c6b3'
],
borderWidth: 2
}]
};
}
}
});
}
intializeMemberDetail(userID?){
public getMonthName(value: any): any {
switch (value) {
case 1:
return 'January';
case 2:
return 'February';
case 3:
return 'March';
case 4:
return 'April';
case 5:
return 'May';
case 6:
return 'June';
case 7:
return 'July';
case 8:
return 'August';
case 9 :
return 'September';
case 10:
return 'October';
case 11:
return 'November';
case 12:
return 'December';
}
}
intializeMemberDetail(userID?) {
this.empSubordinate = [];
this.activeSegment = 'About';
this.pageLimit = 50;
this.pageNum = 1;
this.employee = this.common.sharedService.getSharedData(
MyTeamService.EMPLOYEE_SHARED_DATA,
false
);
let employees = this.common.sharedService.getSharedData( DetailsComponent.opendEmployeesARR, false);
if( employees ){
this.employee = this.common.sharedService.getSharedData(MyTeamService.EMPLOYEE_SHARED_DATA, false);
const employees = this.common.sharedService.getSharedData( DetailsComponent.opendEmployeesARR, false);
if ( employees ) {
this.opendEmployees.push(this.employee);
this.common.sharedService.setSharedData(this.opendEmployees, DetailsComponent.opendEmployeesARR);
}
//this.opendEmployees = employees;
console.log(this.employee);
this.selMenu = this.common.sharedService.getSharedData(
MenuResponse.SHARED_DATA,
false
);
this.headerTitle = this.selMenu.List_Menu.MENU_NAME;
this.isSpecialist = this.common.sharedService.getSharedData(
'isSpecialist',
false
) ? true :false;
// this.isSpecialist = this.navParams.get("isSpecialist")
// ? this.navParams.get("isSpecialist")
// : false;
if (this.employee) this.getEmpSubordinate(userID);
this.selMenu = this.common.sharedService.getSharedData(MenuResponse.SHARED_DATA, false);
this.headerTitle = this.selMenu.List_Menu.MENU_NAME;
this.isSpecialist = this.common.sharedService.getSharedData('isSpecialist', false) ? true : false;
if (this.employee) {
this.getEmpSubordinate(userID);
}
}
goback() {
//this.location.back();
const user = this.authService.getAuthenticatedUser();
if(this.employee.SUPERVISOR_NUMBER==user.EMPLOYEE_NUMBER || this.opendEmployees.length == 1){
this.opendEmployees=[];
if (this.employee.SUPERVISOR_NUMBER === user.EMPLOYEE_NUMBER || this.opendEmployees.length === 1) {
this.opendEmployees = [];
this.common.openMyTeamPage();
}else{
for(let i=0;i<this.opendEmployees.length;i++){
if(this.opendEmployees[i].EMPLOYEE_NUMBER==this.employee.SUPERVISOR_NUMBER){
} else {
// tslint:disable-next-line: prefer-for-of
for (let i = 0; i < this.opendEmployees.length; i++) {
if (this.opendEmployees[i].EMPLOYEE_NUMBER === this.employee.SUPERVISOR_NUMBER) {
this.common.sharedService.setSharedData(
this.opendEmployees[i],
MyTeamService.EMPLOYEE_SHARED_DATA
@ -100,50 +381,33 @@ export class DetailsComponent implements OnInit {
this.intializeMemberDetail(this.employee.SUPERVISOR_NUMBER);
}
}
searchEmployeeTwo() {
this.isSearch = true;
this.empSubordinate = [];
this.getEmpSubordinate('');
}
clearSearchTwo() {
this.isSearch = false;
this.getEmployeeSubordinatesRequestObject.P_PAGE_NUM = 1;
this.empSubordinate = [];
this.isReachEnd = false;
this.searchNameOrUserName = '';
this.searchEmail = '';
this.getEmpSubordinate('');
}
getEmpSubordinate(userID) {
this.modalFlag = this.employee.isModal;
let selEmpNo: string = null;
this.pageNum = 1;
this.IsReachEnd = false;
let searchEmpNum = "";
let searchEmpName = "";
let searchEmpEmail = "";
if (this.searchKey) {
switch (this.searchKeySelect) {
case "1": {
searchEmpName = this.searchKey;
searchEmpNum = "";
searchEmpEmail = "";
break;
}
case "2": {
searchEmpNum = this.searchKey;
searchEmpName = "";
searchEmpEmail = "";
break;
}
case "3": {
searchEmpEmail = this.searchKey;
searchEmpNum = "";
searchEmpName = "";
break;
}
default: {
searchEmpNum = "";
searchEmpName = "";
searchEmpEmail = "";
break;
}
}
this.isReachEnd = false;
const searchEmpNum = (this.searchKeySelect === 'User Name') ? this.searchNameOrUserName : '';
const searchEmpName = (this.searchKeySelect === 'Name') ? this.searchNameOrUserName : '';
const searchEmpEmail = (this.searchKeySelect === 'Email') ? this.searchEmail : '';
if (userID) {
selEmpNo = userID;
} else {
searchEmpNum = "";
searchEmpName = "";
searchEmpEmail = "";
}
if(userID){
selEmpNo=userID;
}else{
selEmpNo = this.employee.EMPLOYEE_NUMBER;
}
const body = {
@ -154,118 +418,84 @@ export class DetailsComponent implements OnInit {
P_PAGE_NUM: this.pageNum,
P_PAGE_LIMIT: this.pageLimit
};
this.infiniteRequest = body;
this.myTeamService
.getEmployeeSubordinates(body)
.subscribe((result: any) => {
this.handleEmpResult(result);
});
this.getEmployeeSubordinatesRequestObject = body;
this.myTeamService.getEmployeeSubordinates(body).subscribe((result: any) => {
console.log('one');
if (this.common.validResponse(result)) {
this.handleEmpResult(result.GetEmployeeSubordinatesList);
}
});
}
handleEmpResult(result) {
//let employeeSubordinate=resFlag.GetEmployeeSubordinatesList;
//this.nav.push("MyTeamPage",{empSubordinate:employeeSubordinate});
if (this.common.validResponse(result)) {
if (this.common.hasData(result.GetEmployeeSubordinatesList)) {
this.empSubordinate = result.GetEmployeeSubordinatesList;
// this.pageNum++;
this.infiniteRequest.P_PAGE_NUM= this.pageNum++;
let lastItemIndex = this.empSubordinate.length - 1;
if (result.GetEmployeeSubordinatesList[lastItemIndex]) {
let lastitem = result.GetEmployeeSubordinatesList[lastItemIndex];
if (lastitem.NO_OF_ROWS == lastitem.ROW_NUM) {
this.IsReachEnd = true;
} else {
this.IsReachEnd = false;
}
const lastItemIndex = result.length - 1;
const lastItem = result[lastItemIndex];
if (lastItem) {
if (lastItem.NO_OF_ROWS === lastItem.ROW_NUM) {
this.isReachEnd = true;
if (this.infiniteScroll) {
this.infiniteScroll.complete();
}
} else {
this.empSubordinate = [];
this.isReachEnd = false;
if (this.infiniteScroll) {
this.infiniteScroll.complete();
}
}
}
}
doInfinite(infiniteScroll) {
if (!this.IsReachEnd && this.infiniteRequest) {
// this.infiniteRequest.P_PAGE_NUM = this.pageNum;
this.myTeamService
.getEmployeeSubordinates(this.infiniteRequest)
.subscribe(
(result: any) => {
if (this.common.validResponse(result)) {
this.infiniteRequest.P_PAGE_NUM= this.pageNum++;
if (this.common.hasData(result.GetEmployeeSubordinatesList)) {
result.GetEmployeeSubordinatesList.forEach(vr => {
if (vr.ROW_NUM == vr.NO_OF_ROWS) {
this.IsReachEnd = true;
} else {
this.IsReachEnd = false;
}
this.empSubordinate.push(vr);
// this.pro.GetVacationRulesList.push(vr);
});
} else {
this.IsReachEnd = true;
}
}
//this.P_PAGE_NUM++;
if (infiniteScroll) this.infiniteScroll.complete();
// console.log(resFlag);
},
Error => console.log(Error),
() => this.infiniteScroll.complete()
);
if (this.common.hasData(result)) {
this.getEmployeeSubordinatesRequestObject.P_PAGE_NUM++;
if (this.empSubordinate.length === 0) {
this.empSubordinate = result;
} else {
this.empSubordinate = this.empSubordinate.concat(result);
}
} else {
if (infiniteScroll) this.infiniteScroll.complete();
this.empSubordinate = [];
}
}
doInfinite(infiniteScroll) {
if (!this.isReachEnd) {
this.myTeamService.getEmployeeSubordinates(this.getEmployeeSubordinatesRequestObject).subscribe((result: any) => {
console.log('two');
if (this.common.validResponse(result)) {
this.handleEmpResult(result.GetEmployeeSubordinatesList);
}
this.infiniteScroll.complete();
});
} else {
if (this.infiniteScroll) {
this.infiniteScroll.complete();
}
}
}
getDetails(index) {
//this.empSubordinate[index].isModal = true;
this.common.sharedService.setSharedData(
this.empSubordinate[index],
MyTeamService.EMPLOYEE_SHARED_DATA
);
this.common.sharedService.setSharedData(this.empSubordinate[index], MyTeamService.EMPLOYEE_SHARED_DATA);
this.intializeMemberDetail();
// this.presentModal();
}
async presentModal() {
//this.modalFlag = true;
const modal = await this.modalController.create({
component: DetailsComponent,
keyboardClose: true,
animated: false
});
let dismissed = modal.onDidDismiss();
dismissed.then(() => {
this.modalFlag = false;
});
return await modal.present();
}
getMenuEntries(item) {
let selEmpNo: String = null;
let respID: any = -999;
let menuType: string = "M";
let selEmpNo = null;
const respID: any = -999;
let menuType = 'M';
let nationality: string;
if (this.isSpecialist == true) {
// respID = this.sharedData.getSharedData(
// MenuResponse.SHARED_SEL_RESP_ID,
// true
// );
menuType = "S";
if (this.isSpecialist === true) {
menuType = 'S';
}
selEmpNo = item.EMPLOYEE_NUMBER;
nationality = item.NATIONALITY_CODE;
const body = {
P_MENU_TYPE: menuType, //to check
P_MENU_TYPE: menuType, // to check
P_SELECTED_EMPLOYEE_NUMBER: selEmpNo,
P_SELECTED_RESP_ID: respID,
NationalityCode: nationality
};
//set emp and resp id
this.common.sharedService.setSharedData(selEmpNo, MenuResponse.SHARED_SEL_EMP);
this.common.sharedService.setSharedData(
// set emp and resp id
this.common.sharedService.setSharedData(selEmpNo, MenuResponse.SHARED_SEL_EMP);
this.common.sharedService.setSharedData(
body.P_SELECTED_RESP_ID,
MenuResponse.SHARED_SEL_RESP_ID
);
@ -283,35 +513,29 @@ export class DetailsComponent implements OnInit {
}
sortMenuEntires(list) {
this.close().then(() => {
});
let tree = this.common.list_to_tree(list);
this.common.sharedService.setSharedData(tree, "menuEntries");
// this.common.navigateForward("/eit/homepage");
const tree = this.common.list_to_tree(list);
this.common.sharedService.setSharedData(tree, 'menuEntries');
this.common.sharedService.setSharedData("myteam", "homemenuentries");
this.common.openEITPage();
// let tree = this.common.list_to_tree(list);
// this.navCtrl.push("MenuEntriesPage", { menuEntries: tree });
}
public async close() {
const modal = await this.modalController.getTop();
if (modal) {
modal.dismiss();
}
}
goToSubordinate() {
this.selMenu.search=true;
this.selMenu.search = true;
this.common.sharedService.setSharedData(
this.selMenu,
MenuResponse.SHARED_DATA
);
this.common.openMyTeamPage();
//this.navCtrl.push("MySubordinatePage", { isSearch: true });
}
dismiss() {
this.modalController.dismiss({
dismissed: true
});
showSelectedField(value: any) {
if (this.searchKeySelect === 'User Name' || this.searchKeySelect === 'User Name') {
this.showEmailInput = false;
this.showUserNameOrNameInput = true;
} else if (this.searchKeySelect === 'Email') {
this.showUserNameOrNameInput = false;
this.showEmailInput = true;
}
}
}

@ -1,76 +1,82 @@
<!-- <ion-header>
<ion-toolbar class="header-toolbar">
<div slot="start">
<nav-buttons></nav-buttons>
<ion-title color="light">{{headerTitle}}</ion-title>
</div>
<ion-buttons slot="end">
<ion-button style="background: none !important;" *ngIf="!isSearch" (click)="goToSubordinate()">
<ion-icon slot="icon-only" name="search"></ion-icon>
</ion-button>
</ion-buttons>
</ion-toolbar>
</ion-header> -->
<ion-header>
<ion-toolbar class="header-toolbar">
<ion-buttons slot="start">
<nav-buttons backLink="/home" *ngIf="!isSearch"></nav-buttons>
<ion-icon class="search-icons" color="light" name="arrow-back" *ngIf="isSearch" (click)="dismiss()"></ion-icon>
</ion-buttons>
<ion-title color="light" >{{headerTitle}}</ion-title>
<ion-buttons slot="end">
<button ion-button icon-only class="btnBack" *ngIf="!isSearch" (click)="goToSubordinate();">
<ion-icon class="search-icons" color="light" name="search"></ion-icon>
</button>
</ion-buttons>
<ion-toolbar class="header-toolbar-new">
<ion-buttons slot="start">
<nav-buttons backLink="/home"></nav-buttons>
</ion-buttons>
<ion-title>{{ts.trPK('myTeam','myTeam-header')}}</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
<div class="contentBg">
<div class="result-graph">
<div class="request-heading">
<span>{{ts.trPK('myTeam','todayAttendance')}}</span>
</div>
<div class="result-text-container">
<h2>{{totalEmployees}}</h2>
<span>{{ts.trPK('myTeam','total')}} <br> {{ts.trPK('myTeam','team-members')}}</span>
</div>
<p-chart class="today-graph" type="doughnut" [data]="data" [options]="options"></p-chart>
</div>
<!-- <ion-row class="filters-row">
<ion-slides [options]="slideOptsOne">
<ion-slide *ngFor="let filter of filters; let i=index">
<app-card-filter
[value]="filter.value"
[text]="filter.name"
[color]="filter.color"
[active]="filter.active"
(click)="activeFilter(i)"
></app-card-filter>
</ion-slide>
</ion-slides>
</ion-row> -->
</ion-header>
<ion-content padding>
<ion-list *ngIf="isSearch">
<ion-item>
<ion-label>{{ts.trPK('general','search')}} </ion-label>
<div style="margin-top: 15px;background: white;border-radius: 100px;overflow: hidden;">
<ion-row no-padding>
<ion-col [size]="3" class="search-dropdown" no-padding>
<ion-select okText="{{ts.trPK('general','ok')}}" cancelText="{{ts.trPK('general','cancel')}}"
[(ngModel)]="searchKeySelect">
<ion-select-option value="1" selected="true" selected>{{ts.trPK('searchForReplacment','name')}}</ion-select-option>
<ion-select-option value="2">{{ts.trPK('searchForReplacment','userName')}} </ion-select-option>
<ion-select-option value="3">{{ts.trPK('searchForReplacment','email')}} </ion-select-option>
</ion-select>
</ion-item>
<ion-item>
<ion-input [(ngModel)]="searchKey" placeholder="{{ts.trPK('general','enter')}}"></ion-input>
</ion-item>
</ion-list>
<!-- <div> -->
<ion-list no-lines *ngIf="empSubordinate && empSubordinate.length>0">
<ion-item no-border *ngFor="let subordinate of empSubordinate;let i=index" (click)="getDetails(i);">
<ion-avatar slot="start">
<!-- <img *ngIf="subordinate.EMPLOYEE_IMAGE" src="data:image/*;base64,{{ subordinate.EMPLOYEE_IMAGE}}"> -->
<img [src]="subordinate.EMPLOYEE_IMAGE ? 'data:image/png;base64,'+subordinate.EMPLOYEE_IMAGE : '../assets/imgs/profile.png'">
</ion-avatar>
<p class="boldTxt">{{subordinate.EMPLOYEE_NAME}}</p>
<p>{{subordinate.POSITION_NAME}}</p>
<ion-badge slot="end" class="badge">{{subordinate.NUM_OF_SUBORDINATES}}</ion-badge>
</ion-item>
</ion-list>
<!-- </div> -->
[(ngModel)]="searchKeySelect" (ionChange)="showSelectedField($event)">
<ion-select-option value="Name" selected="true">{{ts.trPK('searchForReplacment','name')}}</ion-select-option>
<ion-select-option value="User Name">{{ts.trPK('searchForReplacment','userName')}} </ion-select-option>
<ion-select-option value="Email">{{ts.trPK('searchForReplacment','email')}} </ion-select-option>
</ion-select>
</ion-col>
<ion-col [size]="7" class="input-container" no-padding>
<ion-input *ngIf="showEmailInput" placeholder="Employee Email" [(ngModel)]="searchEmail" pattern="email"></ion-input>
<ion-input *ngIf="showUserNameOrNameInput" placeholder="Search" [(ngModel)]="searchNameOrUserName"></ion-input>
</ion-col>
<ion-col [size]="2" style="background: #ccc;text-align: center;" no-padding (click)="searchEmployee()">
<ion-icon style="margin-top: 10px;font-size: 20px;" class="search-icons" color="light" name="search"></ion-icon>
</ion-col>
</ion-row>
</div>
<!-- <ion-infinite-scroll (ionInfinite)="doInfinite($event)">
<ion-infinite-scroll-content></ion-infinite-scroll-content>
</ion-infinite-scroll> -->
<div *ngIf="isSearch">
<ion-row class="search-container">
<ion-col style="float: left;" size=[6] (click)="clearSearch()">
<span style="margin-left: 5px;">Clear Search</span>
<ion-icon name="close" ></ion-icon>
</ion-col>
</ion-row>
</div>
<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"
(click)="getDetails(i)">
</app-employee-information>
</ng-container>
<ion-infinite-scroll (ionInfinite)="doInfinite($event)">
<ion-infinite-scroll-content></ion-infinite-scroll-content>
</ion-infinite-scroll>
</div>
<ion-infinite-scroll (ionInfinite)="doInfinite($event)">
<ion-infinite-scroll-content></ion-infinite-scroll-content>
</ion-infinite-scroll>
</ion-content>
<ion-footer *ngIf="isSearch">
<div class="centerDiv">
<ion-button color="customnavy" (click)="getEmpSubordinate()">{{ts.trPK('general','search')}} </ion-button>
</div>
</ion-footer>
</ion-content>

@ -1,6 +1,163 @@
.search-icons{font-size:.7cm}
.badge{
padding: 10px;
border-radius: 50%;
width: 50px;
}
ion-title{
color: white;
position: absolute;
top: 0;
text-align: center;
left: 15%;
right: 15%;
font-size: 0.42cm;
font-weight: bold;
height: 100%;
}
.contentBg{
padding: 0px 20px;
}
.contentBg:before {
position: absolute;
content: "";
background: #22c6b3;
height: 140px;
width: 100%;
left: 0;
top: 0px;
z-index: 1;
}
ion-content {
--ion-background-color: whitesmoke;
}
.request-heading {
span {
text-align: center;
display: block;
padding-top: 8px;
font-family: workSans-Regular;
}
}
.result-graph {
position: relative;
background: white;
margin-top: 20px;
padding-bottom: 20px;
border-radius: 20px;
z-index: 1;
}
.result-text-container {
padding: 0;
margin: 0;
position: absolute;
left: 50%;
top: 50%;
display: block;
text-align: center;
transform: translate(-50%, -50%);
h2 {
font-size: 38px;
font-family: WorkSans-Bold;
margin: 0 auto;
line-height: 36px;
}
span {
width: 125px;
display: block;
margin: 0 auto;
font-size: 12px;
font-family: workSans-Regular;
}
}
.today-graph {
width: 100%;
max-height: 4cm;
}
.swiper-container {
margin: 0 !important;
width: 100% !important;
}
.filters-row {
margin-top: 10px;
}
.search-input {
margin-top: 15px;
background: white;
border-radius: 15px;
ion-input {
border-bottom-color: transparent;
}
}
.search-dropdown{
background: #22c6b3;
ion-select {
.select-text{
margin-left: -10px;
}
.select-icon{
.select-icon-inner{
opacity: 1;
color: white;
margin-top: -1px;
}
}
}
}
.input-container{
background: white;
ion-input{
border-bottom-color: transparent;
}
}
.user-image-container{
position: relative;
width: 80px;
height: 80px;
display: block;
margin: 0 auto;
&:before{
position: absolute;
content: "";
width: 20px;
height: 20px;
border-radius: 20px;
border: 1px solid white;
top: 0;
right: 0;
background-color: red;
z-index: 9;
}
&.present:before{
background-color: green !important;
}
}
.user-image{
overflow: hidden;
position: relative;
display: block;
width: 100%;
height: 100%;
border-radius: 80px;
border: 1px solid #ccc;
margin: 0px auto 6px;
}
.search-container{
margin-top: 15px;
ion-col{
background: white;
border-radius: 12px;
padding-right: 10px;
flex: none;
ion-icon{
margin-right: 3px;
font-size: 14px;
margin-left: 3px;
vertical-align: middle;
}
span{
font-size: 12px;
vertical-align: middle;
}
}
}

@ -1,32 +1,87 @@
import { Component, OnInit, ViewChild } from "@angular/core";
import { Location } from "@angular/common";
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";
import { ModalController, IonInfiniteScroll } from "@ionic/angular";
import { Component, OnInit, ViewChild } from '@angular/core';
import { Location } from '@angular/common';
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';
import { ModalController, IonInfiniteScroll } from '@ionic/angular';
import { DetailsComponent } from '../details/details.component';
@Component({
selector: "app-home",
templateUrl: "./home.component.html",
styleUrls: ["./home.component.scss"]
selector: 'app-home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.scss']
})
export class HomeComponent implements OnInit {
@ViewChild(IonInfiniteScroll) infiniteScroll: IonInfiniteScroll;
pageNum: number = 1;
pageLimit: number = 50;
empSubordinate: any;
employee: any;
public headerTitle: string = "";
IsReachEnd: boolean = false;
searchKey: any;
public isSearch: boolean = false;
public searchKeySelect: any;
infiniteRequest: any;
selMenu: any;
selEmpNo: any;
public pageNum = 1;
public pageLimit = 50;
public empSubordinate = [];
public employee: any;
public isReachEnd = false;
public searchKey: any;
public isSearch = false;
public searchKeySelect = 'Name';
public getEmployeeSubordinatesRequestObject: any;
public selMenu: any;
public selEmpNo: any;
public totalEmployees = 0;
public options = {
cutoutPercentage: 80,
tooltips: { enabled: false },
legend: { display: false }
};
public data = {
datasets: [
{
data: [100],
backgroundColor: [
'#22c6b3'
],
borderWidth: 5
}]
};
// public filters = [
// {
// value: 0,
// name: 'All',
// active: true,
// color: '#124375'
// },
// {
// value: 0,
// name: 'Present',
// active: false,
// color: '#18a169'
// },
// {
// value: 0,
// name: 'Absent',
// active: false,
// color: '#38c9b3'
// },
// {
// value: 0,
// name: 'Late',
// active: false,
// color: '#114475'
// }
// ];
public slideOptsOne = {
slidesPerView: 4,
spaceBetween: 10
};
public previousActiveIndex = 0;
public currentActiveIndex = 0;
public searchNameOrUserName = '';
public searchEmail = '';
public showEmailInput = false;
public showUserNameOrNameInput = true;
constructor(
public ts: TranslatorService,
public authService: AuthenticationService,
@ -40,63 +95,44 @@ export class HomeComponent implements OnInit {
this.common.sharedService.setSharedData( [], DetailsComponent.opendEmployeesARR);
this.setIntitial();
}
// activeFilter(index: number) {
// this.previousActiveIndex = this.currentActiveIndex;
// this.currentActiveIndex = index;
// this.filters[this.previousActiveIndex].active = false;
// this.filters[this.currentActiveIndex].active = true;
// }
goback() {
this.location.back();
}
getData() {}
setIntitial() {
this.selMenu = this.common.sharedService.getSharedData(
MenuResponse.SHARED_DATA,
false
);
this.headerTitle = this.selMenu.List_Menu.MENU_NAME;
this.selMenu = this.common.sharedService.getSharedData(MenuResponse.SHARED_DATA, false);
this.selEmpNo = this.selMenu.userid;
this.isSearch = this.selMenu.search ? this.selMenu.search : this.isSearch;
// this.isSearch=this.navParams.get("isSearch")?this.navParams.get("isSearch") : false;
if (!this.isSearch) this.getEmpSubordinate();
if (!this.isSearch) {
this.getEmpSubordinate();
}
}
searchEmployee() {
this.isSearch = true;
this.empSubordinate = [];
this.getEmpSubordinate();
}
getEmpSubordinate() {
console.log("getEmpSubordinate my team home");
this.pageNum = 1;
this.IsReachEnd = false;
let searchEmpNum = "";
let searchEmpName = "";
let searchEmpEmail = "";
if (this.searchKey) {
switch (this.searchKeySelect) {
case "1": {
searchEmpName = this.searchKey;
searchEmpNum = "";
searchEmpEmail = "";
this.isReachEnd = false;
const searchEmpNum = (this.searchKeySelect === 'User Name') ? this.searchNameOrUserName : '';
const searchEmpName = (this.searchKeySelect === 'Name') ? this.searchNameOrUserName : '';
const searchEmpEmail = (this.searchKeySelect === 'Email') ? this.searchEmail : '';
break;
}
case "2": {
searchEmpNum = this.searchKey;
searchEmpName = "";
searchEmpEmail = "";
break;
}
case "3": {
searchEmpEmail = this.searchKey;
searchEmpNum = "";
searchEmpName = "";
break;
}
default: {
searchEmpNum = "";
searchEmpName = "";
searchEmpEmail = "";
break;
}
}
} else {
searchEmpNum = "";
searchEmpName = "";
searchEmpEmail = "";
}
if (this.isSearch) {
this.selEmpNo = null;
} else {
this.selEmpNo = this.selMenu.userid;
}
const body = {
@ -107,172 +143,85 @@ export class HomeComponent implements OnInit {
P_PAGE_NUM: this.pageNum,
P_PAGE_LIMIT: this.pageLimit
};
this.infiniteRequest = body;
this.myTeamService
.getEmployeeSubordinates(body)
.subscribe((result: any) => {
this.handleEmpResult(result);
});
this.getEmployeeSubordinatesRequestObject = body;
this.myTeamService.getEmployeeSubordinates(body).subscribe((result: any) => {
if (this.common.validResponse(result)) {
this.totalEmployees = result.P_NUM_OF_SUBORDINATES;
this.handleEmpResult(result.GetEmployeeSubordinatesList);
}
});
}
handleEmpResult(result) {
if (this.common.validResponse(result)) {
if (this.common.hasData(result.GetEmployeeSubordinatesList)) {
this.empSubordinate = result.GetEmployeeSubordinatesList;
this.infiniteRequest.P_PAGE_NUM++;
const lastItemIndex = this.empSubordinate.length - 1;
if (result.GetEmployeeSubordinatesList[lastItemIndex]) {
const lastitem = result.GetEmployeeSubordinatesList[lastItemIndex];
if (lastitem.NO_OF_ROWS == lastitem.ROW_NUM) {
this.IsReachEnd = true;
} else {
this.IsReachEnd = false;
const lastItemIndex = result.length - 1;
const lastItem = result[lastItemIndex];
if (lastItem) {
if (lastItem.NO_OF_ROWS === lastItem.ROW_NUM) {
this.isReachEnd = true;
if (this.infiniteScroll) {
this.infiniteScroll.complete();
}
} else {
this.isReachEnd = false;
if (this.infiniteScroll) {
this.infiniteScroll.complete();
}
}
}
if (this.common.hasData(result)) {
this.getEmployeeSubordinatesRequestObject.P_PAGE_NUM++;
if (this.empSubordinate.length === 0) {
this.empSubordinate = result;
} else {
this.empSubordinate = this.empSubordinate.concat(result);
}
} else {
this.empSubordinate = [];
}
}
}
doInfinite1(infiniteScroll) {
console.log("test");
if (!this.IsReachEnd && this.infiniteRequest) {
console.log("not ReachEnd");
this.infiniteRequest.P_PAGE_NUM = this.pageNum;
this.myTeamService
.getEmployeeSubordinates(this.infiniteRequest)
.subscribe(
(result: any) => {
if (this.common.validResponse(result)) {
this.pageNum++;
if (this.common.hasData(result.GetEmployeeSubordinatesList)) {
result.GetEmployeeSubordinatesList.forEach(vr => {
if (vr.ROW_NUM == vr.NO_OF_ROWS) {
this.IsReachEnd = true;
} else {
this.IsReachEnd = false;
}
this.empSubordinate.push(vr);
// this.pro.GetVacationRulesList.push(vr);
});
} else {
this.IsReachEnd = true;
}
}
//this.P_PAGE_NUM++;
if (infiniteScroll) {
infiniteScroll.complete();
}
// console.log(resFlag);
},
Error => console.log(Error),
() => infiniteScroll.complete()
);
} else {
if (infiniteScroll) {
infiniteScroll.complete();
}
}
}
doInfinite(infiniteScroll) {
//this.pageNum= this.pageNum + 1;
console.log("test doInfinite");
if (!this.IsReachEnd) {
console.log("test doInfinite not ReachEnd");
this.myTeamService
.getEmployeeSubordinates(this.infiniteRequest).subscribe(
(result: any) => {
if (!this.isReachEnd) {
this.myTeamService.getEmployeeSubordinates(this.getEmployeeSubordinatesRequestObject).subscribe((result: any) => {
if (this.common.validResponse(result)) {
this.infiniteRequest.P_PAGE_NUM++;
if (this.common.hasData(result.GetEmployeeSubordinatesList)) {
result.GetEmployeeSubordinatesList.forEach(element => {
if (element.ROW_NUM == element.NO_OF_ROWS) {
this.IsReachEnd = true;
} else {
this.IsReachEnd = false;
}
this.empSubordinate.push(element);
});
} // if list length >0
else {
this.IsReachEnd = true;
}
} // if response == 1
//this.pageNum++;
this.handleEmpResult(result.GetEmployeeSubordinatesList);
}
this.infiniteScroll.complete();
}
);
});
} else {
if (this.infiniteScroll)
if (this.infiniteScroll) {
this.infiniteScroll.complete();
}
}
} //end infiniteScroll
}
clearSearch() {
this.isSearch = false;
this.getEmployeeSubordinatesRequestObject.P_PAGE_NUM = 1;
this.empSubordinate = [];
this.isReachEnd = false;
this.searchNameOrUserName = '';
this.searchEmail = '';
this.getEmpSubordinate();
}
getDetails(index) {
this.common.sharedService.setSharedData(
this.empSubordinate[index],
MyTeamService.EMPLOYEE_SHARED_DATA
);
this.common.sharedService.setSharedData(
this.selMenu,
MenuResponse.SHARED_DATA
);
this.close().then(() => {
this.common.openMyTeamDetails();
});
//this.modalController.dismiss();
//this.navCtrl.push("MyTeamPage",{employee:this.empSubordinate[index]});
}
public async close() {
const modal = await this.modalController.getTop();
if (modal) {
modal.dismiss();
}
}
toggleSearch() {
this.isSearch = !this.isSearch;
this.common.sharedService.setSharedData(this.empSubordinate[index], MyTeamService.EMPLOYEE_SHARED_DATA);
this.common.sharedService.setSharedData(this.selMenu, MenuResponse.SHARED_DATA);
this.common.openMyTeamDetails();
}
goToSubordinate() {
//this.navCtrl.push("MySubordinatePage",{isSearch:true});
//this.getEmpSubordinate();
this.presentModal();
}
async presentModal() {
const modal = await this.modalController.create({
component: HomeComponent,
keyboardClose: true,
animated: false,
componentProps: { isSearch: true }
});
modal.cssClass="full-modal";
let dismissed = modal.onDidDismiss();
dismissed.then(() => {
this.isSearch = false;
});
return await modal.present();
// this.presentModal();
}
dismiss() {
this.modalController.dismiss({
dismissed: true
});
showSelectedField(value: any) {
if (this.searchKeySelect === 'User Name' || this.searchKeySelect === 'User Name') {
this.showEmailInput = false;
this.showUserNameOrNameInput = true;
} else if (this.searchKeySelect === 'Email') {
this.showUserNameOrNameInput = false;
this.showEmailInput = true;
}
}
}

@ -1,18 +1,36 @@
<ion-content>
<div>
<div id="notificationDynamicFields">
<ion-header>
<ion-toolbar>
<!-- class="header-toolbar" <nav-buttons></nav-buttons> -->
<ion-title style="text-align: center;font-weight: bold;" color="dark">Confirmation</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
<div class="dynamicFields" id="notificationDynamicFieldsModal">
</div>
</div>
<!-- <div class="msgConfirm">
{{confirmMsg}}
</div> -->
<div class="msgConfirm">
<div *ngIf="getPassActionMode === 'APPROVED'" [innerHTML]='"worklistMain, approveMsg" | translate'></div>
<div *ngIf="getPassActionMode === 'REJECTED'" [innerHTML]='"worklistMain, rejectMsg" | translate'></div>
<div *ngIf="getPassActionMode === 'DEL'" [innerHTML]='"worklistMain, delMsg" | translate'></div>
<div *ngIf="getPassActionMode === 'CLOSE'" [innerHTML]='"worklistMain, closeMsg" | translate'></div>
</div>
<ion-footer>
<ion-row style="text-align: center;">
<ion-col>
<ion-button color="customnavy" class="confirmBtn" (click)="applyAction()"> {{ts.trPK('general','confirm')}}
<ion-col size="12">
<ion-button class="checkOutOkBtn" (click)="actionButton()"> {{ts.trPK('general','confirm')}}
</ion-button>
</ion-col>
<ion-col>
<ion-button color="customnavy" class="cancelBtn" (click)="closeModel()"> {{ts.trPK('general','cancel')}}
<ion-col size="12">
<ion-button class="checkOutCancelBtn" (click)="closeModel()"> {{ts.trPK('general','cancel')}}
</ion-button>
</ion-col>

@ -1 +1,14 @@
.dynamicFields{
width: 93%;
border: #dbdbdb solid 1px;
border-radius: 16px;
margin: 10px;
padding: 10px;
}
.msgConfirm{
text-align: center;
font-size: 20px !important;
// font-weight: bold;
}

@ -4,6 +4,7 @@ import { CommonService } from 'src/app/hmg-common/services/common/common.service
import { WorklistMainService } from '../service/work-list.main.service';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { TextAreaInput } from 'src/app/uI-elements/text-area.input';
import { WorkListActionRequest } from '../models/NotificationActionReq';
@Component({
selector: 'app-apply-action-modal',
@ -15,51 +16,57 @@ export class ApplyActionModalComponent implements OnInit {
getpassResAttr: any;
getPassNotificationDetails: any;
getPassNotification: any;
confirmMsg: string;
getPassActionMode: any;
P_RESPOND_ATTRIBUTES_TBL: any;
selEmployeeID: any;
hideForwordEmployee: any;
private WorkListActionObj: WorkListActionRequest;
messageSuccess: boolean;
constructor( private ts: TranslatorService,private modalCtrl: ModalController, private cs: CommonService,public worklistMainService: WorklistMainService,
) {
this.getPassNotificationDetails = this.cs.sharedService.getSharedData('passNotificationInfo',false);
this.getpassResAttr = this.cs.sharedService.getSharedData('passResAttr' ,false);
this.getpassResAttr = this.cs.sharedService.getSharedData('notificationDynamicAttributeArr' ,false);
this.getPassNotification = this.cs.sharedService.getSharedData('ApplyActionModalPage',false);
this.getPassActionMode = this.cs.sharedService.getSharedData('passActionMode',false);
this.WorkListActionObj = new WorkListActionRequest();
}
ngOnInit() {
document.getElementById("notificationDynamicFields").innerHTML="";
document.getElementById("notificationDynamicFieldsModal").innerHTML="";
console.log(this.getPassNotificationDetails);
//this.applyAction(this.getPassNotificationDetails);
this.notificationDynamicFields(this.getpassResAttr);
}
console.log("confirmMsg" + this.confirmMsg)
if (this.getPassActionMode === "APPROVED") {
this.confirmMsg = this.ts.trPK('worklistMain', 'approveMsg')
}
else if (this.getPassActionMode === "REJECTED") {
this.confirmMsg = this.ts.trPK('worklistMain', 'rejectMsg')
applyAction() {
this.worklistMainService
.actionButton(this.getPassNotification)
.subscribe((result: any) => {
this.handleApplayActionResult(result);
});
}
}
else if (this.getPassActionMode === "DEL") {
this.confirmMsg = this.ts.trPK('worklistMain', 'delMsg')
}
else if (this.getPassActionMode === "CLOSE") {
this.confirmMsg = this.ts.trPK('worklistMain', 'closeMsg')
}
handleApplayActionResult(result) {
if (this.cs.validResponse(result)) {
if (result.MessageStatus == 1) {
// this.navCtrl.push("HomePage");
//this.common.openHome();
//this.common.openNotificationPage();
// for( var i = 0; i < this.notificationArray.length; i++){
// if ( this.notificationArray[i].ROW_NUM === this.getPassNotificationDetails.ROW_NUM) {
// this.notificationArray.splice(i, 1);
// }
// }
////////////// this.getNotificationCountAfterSubmit();
///////////// this.nextNotfification();
}
} // valid it
}
notificationDynamicFields(notificationAttr){
const containerId = 'notificationDynamicFields';
const containerId = 'notificationDynamicFieldsModal';
for(let i=0;i<notificationAttr.length;i++){
if(notificationAttr[i].ATTRIBUTE_TYPE=="VARCHAR2"){
this.textArea = new TextAreaInput(notificationAttr[i].ATTRIBUTE_DISPLAY_NAME, notificationAttr[i].ATTRIBUTE_NAME, "", containerId,"","","");
@ -78,4 +85,80 @@ export class ApplyActionModalComponent implements OnInit {
}
actionButton() {
let ButtonAction: string = this.getPassActionMode;
this.P_RESPOND_ATTRIBUTES_TBL = [];
for (let i = 0; i < this.getpassResAttr.length; i++) {
let obj: any = {};
obj.ATTRIBUTE_NAME = this.getpassResAttr[i].ATTRIBUTE_NAME;
if (this.getpassResAttr[i].ATTRIBUTE_TYPE === "number") {
obj.ATTRIBUTE_NUMBER_VALUE = (document.getElementById(this.getpassResAttr[i].ATTRIBUTE_NAME) as HTMLInputElement).value;
}
else if (this.getpassResAttr[i].ATTRIBUTE_TYPE == "VARCHAR2") {
obj.ATTRIBUTE_TEXT_VALUE = (document.getElementById(this.getpassResAttr[i].ATTRIBUTE_NAME) as HTMLInputElement).value;
}
this.P_RESPOND_ATTRIBUTES_TBL.push(obj);
}
let repUserName = this.selEmployeeID;
if (this.hideForwordEmployee && this.hideForwordEmployee.ATTRIBUTE_NAME) {
let obj: any = {};
repUserName = "";
obj.ATTRIBUTE_NAME = this.hideForwordEmployee.ATTRIBUTE_NAME;
obj.ATTRIBUTE_TEXT_VALUE = this.selEmployeeID;
this.P_RESPOND_ATTRIBUTES_TBL.push(obj);
}
this.WorkListActionObj.P_FORWARD_TO_USER_NAME = "";
this.WorkListActionObj.P_ACTION_MODE = ButtonAction;
this.WorkListActionObj.P_COMMENTS = "";
this.WorkListActionObj.RespondAttributeList = this.P_RESPOND_ATTRIBUTES_TBL;
this.applyAction(this.WorkListActionObj);
}
applyAction(WorkListActionObj) {
this.worklistMainService
.actionButton(WorkListActionObj)
.subscribe((result: any) => {
this.handleApplayActionResult(result);
});
}
handleApplayActionResult(result) {
if (this.cs.validResponse(result)) {
if (result.MessageStatus == 1) {
// this.navCtrl.push("HomePage");
//this.common.openHome();
//this.common.openNotificationPage();
// for( var i = 0; i < this.notificationArray.length; i++){
// if ( this.notificationArray[i].ROW_NUM === this.getPassNotificationDetails.ROW_NUM) {
// this.notificationArray.splice(i, 1);
// }
// }
this.messageSuccess = true;
setTimeout(() => {
this.messageSuccess = false;
}, 5000);
this.cs.openNotificationPage();
// this.getNotificationCountAfterSubmit();
//this.nextNotfification();
}
} // valid it
}
}

@ -61,9 +61,9 @@
</ion-col>
</ion-row>
<div [ngClass]="isEmptyObject() ? 'work-list-container' : ''" *ngIf='selectedFilter != "ITG"'>
<div [ngClass]="isEmptyObject() && direction =='en' ? 'work-list-container-en' : 'work-list-container-ar'" *ngIf='selectedFilter != "ITG"'>
<div *ngFor="let data of showFormattedData | keyvalue; let i = index">
<span class="date-span">{{data.key}}</span>
<span [ngClass]="direction == 'en'? 'date-span':'date-span-ar'">{{data.key}}</span>
<div (click)="openNotificationDetail(data.value)" class="date-data" *ngFor="let workList of data.value; let j = index">
<p>{{workList.SUBJECT}}</p>
</div>
@ -71,9 +71,9 @@
</div>
<div [ngClass]="isEmptyObject() ? 'work-list-container' : ''" *ngIf="selectedFilter == 'ITG'" >
<div [ngClass]="isEmptyObject() && direction =='en' ? 'work-list-container-en' : 'work-list-container-ar'" *ngIf="selectedFilter == 'ITG'" >
<div *ngFor='let segmentInfo of ITGItem[0]; let i= index' (click)='openITG(segmentInfo)'>
<span class="date-span">{{segmentInfo.ModifiedDate |date}}</span>
<span [ngClass]="direction == 'en'? 'date-span':'date-span-ar'">{{segmentInfo.ModifiedDate |date}}</span>
<div class="date-data">
<p>{{segmentInfo.Title}}</p>
</div>

@ -312,7 +312,7 @@ ion-content {
margin-top: 10px;
margin-left: 20px;
}
.work-list-container {
.work-list-container-en {
position: relative;
padding-left: 60px;
clear: both;
@ -320,7 +320,7 @@ ion-content {
margin-bottom: 80px;
padding-top: 15px;
}
.work-list-container:before{
.work-list-container-en:before{
content: "";
position: absolute;
height: 100%;
@ -329,6 +329,26 @@ ion-content {
top: 15px;
background-color: #dddddd;
}
.work-list-container-ar {
position: relative;
padding-right: 60px;
clear: both;
min-height: 200px;
margin-bottom: 80px;
padding-top: 15px;
}
.work-list-container-ar:before{
content: "";
position: absolute;
height: 100%;
width: 4px;
right: 30px;
top: 15px;
background-color: #dddddd;
}
.search-container{
margin-top: 15px;
display: block;
@ -365,6 +385,9 @@ ion-content {
background-color: #38c9b3;
top: 1px;
}
.date-data{
background-color: white;
padding: 1px;
@ -418,3 +441,20 @@ ion-content {
.slideCss{
width: 200px !important;
}
.date-span-ar {
position: relative;
display: block;
margin-bottom: 10px;
}
.date-span-ar:before{
content: "";
position: absolute;
right: -35px;
border-radius: 50%;
width: 15px;
height: 15px;
background-color: #38c9b3;
top: 1px;
}

@ -153,7 +153,9 @@ export class HomeComponent implements OnInit {
}
ngOnInit() {
// this.direction = TranslatorService.getCurrentDirection();
this.direction = TranslatorService.getCurrentLanguageName()//TranslatorService.getCurrentDirection();
console.log(">>>>>>>>>>>>>>>>>>"+this.direction);
this.worklistNotifications = this.common.sharedService.getSharedData('worklistNotifications', false);
this.Details();
this.Count();
@ -406,7 +408,7 @@ export class HomeComponent implements OnInit {
style: false
};
}
if(this.ITGSegment.length !=0 ){
if(this.ITGSegment.length != 0 ){
this.setActive(this.ITGSegment[0].code);
}
});

@ -6,17 +6,22 @@
}
.Header{
// color: black !important;
// font-size: 16px !important;
// font-weight: bold !important;;
// margin: 0;
// position: absolute;
// left: 50%;
// top: 50%;
// transform: translate(-58px, 2px);
color: black !important;
font-size: 16px !important;
font-weight: bold !important;;
margin: 0;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-58px, 2px);
font-weight: bold !important;
margin: auto;
}
.labelRadio{
color: black !important;
font-weight: bold !important;
}
}

@ -75,7 +75,7 @@
</button>
<div
[ngClass]="{'bg-blue-dot' : approvalInfo.Action === 'Submit', 'bg-green-dot':approvalInfo.Action === 'Approved', 'bg-red-dot':approvalInfo.Action === 'Rejected', 'bg-gray-dot':approvalInfo.Action === 'Pending', 'bg-gray-dot':approvalInfo.Action === ''}"
class="timeline-thumb timeline-icon">
[class]="direction == 'en'? 'timeline-thumb-en timeline-icon': 'timeline-thumb-ar timeline-icon'">
</div>
<p style="margin-left: -20%; font-size: 12px !important;">{{approvalInfo.Action}}</p>
</div>

@ -49,6 +49,7 @@ export class WorkListMainItgComponent implements OnInit {
public ExchangeServerSelected: any;
public ExchangeServerDBSelected: any;
public actionBTN: { name: string, image: string, isAvailable: boolean }[] = [];
direction: string;
constructor(
public common: CommonService,
public ts: TranslatorService,
@ -56,6 +57,7 @@ export class WorkListMainItgComponent implements OnInit {
public modalCtrl: ModalController) { }
ngOnInit() {
this.direction = TranslatorService.getCurrentLanguageName()
this.request_info = this.common.sharedService.getSharedData(HomeComponent.REQUSET_INFO);
this.request_name = this.common.sharedService.getSharedData(HomeComponent.REQUSET_NAME);
this.all_request = this.common.sharedService.getSharedData(HomeComponent.ALL_REQUEST);

@ -42,17 +42,7 @@
</div> -->
</ion-list>
<div class="noteInput">
<ion-label [hidden]="isAnswer==false" class="boldTxtNav" padding>{{"replacementRoll, question" | translate}} :
{{pQuestion}} ?</ion-label>
<ion-label [hidden]="isAnswer==false" class="boldTxtNav" padding>{{"replacementRoll, answer" | translate}}
</ion-label>
<ion-label [hidden]="isAnswer==true" class="boldTxtNav" padding>{{"replacementRoll, enterNote" | translate}}
</ion-label>
<ion-item>
<ion-textarea [(ngModel)]="userNote"></ion-textarea>
</ion-item>
</div>
<ion-item [hidden]="isAnswer==true">
<!-- <ion-list *ngIf="ReplacementList"> -->
@ -122,6 +112,19 @@
</ion-content>
<ion-footer>
<div class="noteInput">
<ion-label [hidden]="isAnswer==false" class="boldTxtNav" padding>{{"replacementRoll, question" | translate}} :
{{pQuestion}} ?</ion-label>
<ion-label [hidden]="isAnswer==false" class="boldTxtNav" padding>{{"replacementRoll, answer" | translate}}
</ion-label>
<ion-label [hidden]="isAnswer==true" class="boldTxtNav" padding>{{"replacementRoll, enterNote" | translate}}
</ion-label>
<ion-item>
<ion-textarea [(ngModel)]="userNote"></ion-textarea>
</ion-item>
</div>
<br/>
<div class="centerDiv">
<ion-button class="footer-button" style="background: var(--newgreen)!important;border-radius: 10px; --background: transparent; " ion-button (click)="submitAction()">
{{'general, submit' | translate}}</ion-button>

@ -116,6 +116,7 @@ button.item-button.button.button-md.button-clear.button-clear-md {
color: white;
border-radius: 9px;
text-align: center;
min-height: 92px;
// background-color: #0095ff;
// box-shadow: 0 2px 5px rgba(0, 0, 0, 0.26);
}

@ -63,34 +63,6 @@ export class WorkListReplacementRollComponent implements OnInit {
ngOnInit() {
this.demoeAttach = [{
USER_NAME: '18888',
EMPLOYEE_DISPLAY_NAME: "AAA fgfhfhfhf hyutyututut ",
EMAIL_ADDRESS: "test@yuyuu.hjj",
},
{
USER_NAME: '18888',
EMPLOYEE_DISPLAY_NAME: "AAA fgfhfhfhf hyutyututut ",
EMAIL_ADDRESS: "test@yuyuu.hjj"
},
{
USER_NAME: '18888',
EMPLOYEE_DISPLAY_NAME: "AAA fgfhfhfhf hyutyututut ",
EMAIL_ADDRESS: "test@yuyuu.hjj"
},
{
USER_NAME: '18888',
EMPLOYEE_DISPLAY_NAME: "AAA fgfhfhfhf hyutyututut ",
EMAIL_ADDRESS: "test@yuyuu.hjj"
}
];
}
getreplacmentemployee() {

@ -1,13 +1,14 @@
<ion-header>
<ion-toolbar >
<ion-title color="dark">{{ 'workListMain, rfc' | translate}}</ion-title>
</ion-toolbar>
</ion-header>
<ion-content padding>
<div class="tipsPadding boldTxtNav">
{{"replacementRoll.msgRFC" | translate}}
{{'replacementRoll , msgRFC' | translate}}
</div>
<!-- <ion-list (ionChange)="radioChecked($event)" radio-group>
<ion-item *ngFor="let rfcEmployeeList of RFCEmployeeListListRes; let i = index;">
@ -18,13 +19,7 @@
</ion-list> -->
<div class="noteInput">
<label class="boldTxtNav" padding>{{"replacementRoll.enterNote" | translate}}</label>
<ion-item>
<ion-textarea [(ngModel)]="userNote"></ion-textarea>
</ion-item>
</div>
<ion-item>
@ -59,7 +54,14 @@
</ion-content>
<ion-footer>
<div class="noteInput">
<label class="boldTxtNav" padding>{{'replacementRoll , enterNote' | translate}}</label>
<ion-item>
<ion-textarea [(ngModel)]="userNote"></ion-textarea>
</ion-item>
</div>
<br/>
<div class="centerDiv">
<ion-button class="footer-button" style="background: var(--newgreen)!important;border-radius: 10px; --background: transparent; " ion-button (click)="submitAction()">
{{'general, submit' | translate}}</ion-button>

@ -1,5 +1,5 @@
<ion-header *ngIf="!messageSuccess">
<ion-toolbar class="header-toolbar">
<ion-toolbar class="header-toolbar-new">
<ion-title color="light"> {{ts.trPK('worklistMain','title')}}</ion-title>
<ion-buttons slot="start">
<nav-buttons backLink="/notification/homepage"></nav-buttons>
@ -19,21 +19,22 @@
<ion-segment-button value="item-req" [ngClass]="activeSegment == 'item-req' ? 'active-Segment' : 'normal-Segment'">
{{ts.trPK('worklistMain','itemReq')}}
<ion-label>{{ts.trPK('worklistMain','itemReq')}}</ion-label>
</ion-segment-button>
<ion-segment-button value="action-history"
[ngClass]="activeSegment == 'action-history' ? 'active-Segment' : 'normal-Segment'">
{{'worklistMain, action' | translate}}
<ion-label> {{'worklistMain, action' | translate}}</ion-label>
</ion-segment-button>
<ion-segment-button value="attach" [ngClass]="activeSegment == 'attach' ? 'active-Segment' : 'normal-Segment'">
{{'general, file' | translate}}
<ion-label> {{'general, file' | translate}}</ion-label>
</ion-segment-button>
<ion-segment-button value="info" [ngClass]="activeSegment == 'info' ? 'active-Segment' : 'normal-Segment'">
{{ts.trPK('worklistMain','info')}}
<ion-label> {{ts.trPK('worklistMain','info')}}</ion-label>
</ion-segment-button>
</ion-segment>
@ -179,7 +180,7 @@
</ion-grid>
<button ion-button [hidden]="IsReachEnd" class="itemHISBtn" (click)="loadMoreNotificationBody()">Load
<button ion-button *ngIf="!IsReachEnd" class="itemHISBtn" (click)="loadMoreNotificationBody()">Load
More</button>
</ion-card-content>
@ -455,7 +456,7 @@
</button>
</div> -->
<div class="timeline-thumb timeline-icon">
<div [class]="direction == 'en'? 'timeline-thumb-en timeline-icon': 'timeline-thumb-ar timeline-icon'">
<img *ngIf="actionHistory.EMPLOYEE_IMAGE" class="empImge"
[src]="'data:image/png;base64,'+actionHistory.EMPLOYEE_IMAGE">
<img *ngIf="actionHistory.EMPLOYEE_IMAGE == null" class="empImge" src="../assets/imgs/profile.png">
@ -502,7 +503,7 @@
</ion-list>
</div>
<button ion-button [hidden]="IsReachEnd" class="itemHISBtn" (click)="loadMoreActionHistory()">Load More</button>
<button ion-button *ngIf="!IsReachEnd" class="itemHISBtn" (click)="loadMoreActionHistory()">Load More</button>
</ion-card-content>
</ion-card>

@ -104,4 +104,5 @@
// padding-top: 10px;
// font-weight: bold;
// }

@ -88,7 +88,7 @@ export class WorklistMainMRComponent implements OnInit {
delMsg: string;
closeMsg: string;
activeSegment: any = "info";
lines_note_limit: any = 15;
lines_note_limit: any = 24;
orgNote: string;
truncating: boolean;
selectedIndex: any;
@ -99,6 +99,7 @@ export class WorklistMainMRComponent implements OnInit {
approveDis: boolean = false;
rejectDis: boolean = false;
requestDis: boolean = false;
direction: string;
@ -113,7 +114,7 @@ export class WorklistMainMRComponent implements OnInit {
private modalCtrl: ModalController,
public worklistService: WorklistService
) {
this.direction = TranslatorService.getCurrentLanguageName()
//this.getPassNotificationDetails = this.common.sharedService.getSharedData('passNotificationInfo');
this.WorkListActionHistoryObj = new WorkListActionHistoryRequest();
this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM;
@ -386,14 +387,15 @@ export class WorklistMainMRComponent implements OnInit {
this.confirmMsg = this.ts.trPK('worklistMain', 'closeMsg')
}
this.common.confirmAlertDialogAction(
() => {
this.applyAction(this.WorkListActionObj);
}, this.ts.trPK('general', 'ok'),
() => { }, this.ts.trPK('general', 'cancel'),
this.ts.trPK('vacation-rule', 'confirmation'),
this.confirmMsg);
this.openApplyModal(this.WorkListActionObj);
// this.common.confirmAlertDialogAction(
// () => {
// this.applyAction(this.WorkListActionObj);
// }, this.ts.trPK('general', 'ok'),
// () => { }, this.ts.trPK('general', 'cancel'),
// this.ts.trPK('vacation-rule', 'confirmation'),
// this.confirmMsg);
//////////////////////////////////////////////////////////

@ -1,5 +1,5 @@
<ion-header *ngIf="!messageSuccess">
<ion-toolbar class="header-toolbar">
<ion-toolbar class="header-toolbar-new">
<ion-title color="light"> {{ts.trPK('worklistMain','title')}}</ion-title>
<ion-buttons slot="start">
<nav-buttons backLink="/notification/homepage"></nav-buttons>
@ -24,21 +24,21 @@
<ion-segment-button value="line_details"
[ngClass]="activeSegment == 'line_details' ? 'active-Segment' : 'normal-Segment'">
{{ts.trPK('worklistMain','line_details')}}
<ion-label> {{ts.trPK('worklistMain','line_details')}} </ion-label>
</ion-segment-button>
<ion-segment-button value="action-history"
[ngClass]="activeSegment == 'action-history' ? 'active-Segment' : 'normal-Segment'">
{{'worklistMain, action' | translate}}
<ion-label> {{'worklistMain, action' | translate}} </ion-label>
</ion-segment-button>
<ion-segment-button value="attach"
[ngClass]="activeSegment == 'attach' ? 'active-Segment' : 'normal-Segment'">
{{'general, file' | translate}}
<ion-label> {{'general, file' | translate}} </ion-label>
</ion-segment-button>
<ion-segment-button checked value="info" [ngClass]="activeSegment == 'info' ? 'active-Segment' : 'normal-Segment'" >
{{ts.trPK('worklistMain','info')}}
<ion-label> {{ts.trPK('worklistMain','info')}} </ion-label>
</ion-segment-button>
</ion-segment>
@ -342,7 +342,7 @@
</ion-grid>
<!-- -->
<button ion-button [hidden]="IsReachEnd" class="itemHISBtn" (click)="loadMoreNotificationBody()">Load More</button>
<button ion-button *ngIf="!IsReachEnd" class="itemHISBtn" (click)="loadMoreNotificationBody()">Load More</button>
</ion-card-content>
@ -598,7 +598,7 @@
</button>
</div> -->
<div class="timeline-thumb timeline-icon">
<div [class]="direction == 'en'? 'timeline-thumb-en timeline-icon': 'timeline-thumb-ar timeline-icon'">
<img *ngIf="actionHistory.EMPLOYEE_IMAGE" class="empImge" [src]="'data:image/png;base64,'+actionHistory.EMPLOYEE_IMAGE">
<img *ngIf="actionHistory.EMPLOYEE_IMAGE == null" class="empImge" src="../assets/imgs/profile.png"> </div>
</div>
@ -618,7 +618,7 @@
<div *ngIf="checkLines(actionHistory.NOTE)">
<div class="containerNote" [ngClass]="actionHistory.visible ? 'show' : '' " >
Note: {{actionHistory.NOTE}} {{actionHistory.NOTE}}
Note: {{actionHistory.NOTE}}
</div>
@ -642,7 +642,7 @@
</div>
</ion-list>
</div>
<button ion-button [hidden]="IsReachEnd" class="itemHISBtn" (click)="loadMoreActionHistory()">Load More</button>
<button ion-button *ngIf="!IsReachEnd" class="itemHISBtn" (click)="loadMoreActionHistory()">Load More</button>
</ion-card-content>

@ -101,7 +101,7 @@ export class WorklistMainPoComponent implements OnInit {
itemHistoryRes: any;
QutationAnalysisRes: any;
activeSegment: any = "info";
lines_note_limit: number = 15;
lines_note_limit: number = 24;
notiActionBtnMore: any = [];
demoeAttach: any = [];
orgNote: any;
@ -115,6 +115,7 @@ export class WorklistMainPoComponent implements OnInit {
approveDis: boolean = false;
rejectDis: boolean = false;
requestDis: boolean = false;
direction: string;
constructor(
@ -128,6 +129,7 @@ export class WorklistMainPoComponent implements OnInit {
private modalCtrl: ModalController,
public worklistService: WorklistService,
) {
this.direction = TranslatorService.getCurrentLanguageName()
this.WorkListActionHistoryObj = new WorkListActionHistoryRequest();
this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM;
this.WorkListActionHistoryObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT;

@ -1,5 +1,5 @@
<ion-header *ngIf="!messageSuccess">
<ion-toolbar class="header-toolbar">
<ion-toolbar class="header-toolbar-new">
<ion-title color="light"> {{ts.trPK('worklistMain','title')}}</ion-title>
<ion-buttons slot="start">
<nav-buttons backLink="/notification/homepage"></nav-buttons>
@ -17,21 +17,21 @@
<ion-segment-button value="item-req"
[ngClass]="activeSegment == 'item-req' ? 'active-Segment' : 'normal-Segment'">
{{ts.trPK('worklistMain','itemReq')}}
<ion-label> {{ts.trPK('worklistMain','itemReq')}} </ion-label>
</ion-segment-button>
<ion-segment-button value="action-history"
[ngClass]="activeSegment == 'action-history' ? 'active-Segment' : 'normal-Segment'">
{{'worklistMain, action' | translate}}
<ion-label> {{'worklistMain, action' | translate}} </ion-label>
</ion-segment-button>
<ion-segment-button value="attach" [ngClass]="activeSegment == 'attach' ? 'active-Segment' : 'normal-Segment'">
{{'general, file' | translate}}
<ion-label> {{'general, file' | translate}} </ion-label>
</ion-segment-button>
<ion-segment-button checked value="info"
[ngClass]="activeSegment == 'info' ? 'active-Segment' : 'normal-Segment'">
{{ts.trPK('worklistMain','info')}}
<ion-label> {{ts.trPK('worklistMain','info')}} </ion-label>
</ion-segment-button>
</ion-segment>
@ -165,7 +165,7 @@
</ion-grid>
<button [hidden]="IsReachEnd" ion-button class="itemHISBtn" (click)="loadMoreNotificationBody()">Load
<button *ngIf="!IsReachEnd" ion-button class="itemHISBtn" (click)="loadMoreNotificationBody()">Load
More</button>
</ion-card-content>
@ -307,7 +307,7 @@
</button>
</div> -->
<div class="timeline-thumb timeline-icon">
<div [class]="direction == 'en'? 'timeline-thumb-en timeline-icon': 'timeline-thumb-ar timeline-icon'">
<img *ngIf="actionHistory.EMPLOYEE_IMAGE" class="empImge"
[src]="'data:image/png;base64,'+actionHistory.EMPLOYEE_IMAGE">
<img *ngIf="actionHistory.EMPLOYEE_IMAGE == null" class="empImge"
@ -361,7 +361,7 @@
</div>
</ion-list>
</div>
<button ion-button [hidden]="IsReachEnd" class="itemHISBtn" (click)="loadMoreActionHistory()">Load
<button ion-button *ngIf="!IsReachEnd" class="itemHISBtn" (click)="loadMoreActionHistory()">Load
More</button>
</ion-card-content>

@ -89,7 +89,7 @@ export class WorklistMainPRComponent implements OnInit {
closeMsg: string;
truncating: boolean;
orgNote: any;
lines_note_limit: any = 15;
lines_note_limit: any = 24;
selectedIndex: any;
showLessBtn: boolean;
showMoreBtn: boolean;
@ -100,6 +100,7 @@ export class WorklistMainPRComponent implements OnInit {
approveDis: boolean;
rejectDis: boolean;
requestDis: boolean;
direction: string;
constructor(
@ -113,7 +114,7 @@ export class WorklistMainPRComponent implements OnInit {
private modalCtrl: ModalController,
public worklistService: WorklistService
) {
this.direction = TranslatorService.getCurrentLanguageName()
//this.getPassNotificationDetails = this.common.sharedService.getSharedData('passNotificationInfo');
this.WorkListActionHistoryObj = new WorkListActionHistoryRequest();
this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM;

@ -1,5 +1,5 @@
<ion-header *ngIf="!messageSuccess">
<ion-toolbar class="header-toolbar">
<ion-toolbar class="header-toolbar-new">
<ion-title color="light"> {{ts.trPK('worklistMain','title')}}</ion-title>
<ion-buttons slot="start">
<nav-buttons backLink="/notification/homepage"></nav-buttons>
@ -75,8 +75,13 @@
<ion-grid class="gridSubordinates">
<div class="subOrdinateDiv">
<img class="subOrdinateImg" src="../assets/imgs/profile.png"></div>
<!-- <img class="subOrdinateImg" src="../assets/imgs/profile.png"> -->
<img *ngIf="List.EMPLOYEE_IMAGE" class="empImgeSub"
[src]="'data:image/png;base64,'+List.EMPLOYEE_IMAGE">
<img *ngIf="List.EMPLOYEE_IMAGE == null"
class="empImgeSub" src="../assets/imgs/profile.png">
</div>
<ion-row class="rowHeader subOrdinateRow">
<ion-col size="9">
@ -332,7 +337,7 @@
<ion-item *ngFor="let actionHistory of actionHistoryRes">
<div class="timeline-item" slot="start">
<div class="timeline-thumb timeline-icon">
<div [class]="direction == 'en'? 'timeline-thumb-en timeline-icon': 'timeline-thumb-ar timeline-icon'">
<img *ngIf="actionHistory.EMPLOYEE_IMAGE" class="empImge"
[src]="'data:image/png;base64,'+actionHistory.EMPLOYEE_IMAGE">
<img *ngIf="actionHistory.EMPLOYEE_IMAGE == null" class="empImge"
@ -377,7 +382,7 @@
</ion-list>
</div>
<button ion-button [hidden]="IsReachEnd" class="itemHISBtn" (click)="loadMoreActionHistory()">Load
<button ion-button *ngIf="!IsReachEnd" class="itemHISBtn" (click)="loadMoreActionHistory()">Load
More</button>
</ion-card-content>

@ -92,12 +92,12 @@
.rowBorder{
border-bottom: solid 0.03cm var(--grayBG);
border-bottom: solid 0.02cm var(--grayBG);
}
.colBorder{
border-right: solid 0.03cm var(--grayBG);
border-right: solid 0.02cm var(--grayBG);
}
@ -183,7 +183,7 @@
// border: var(--cusgray) 1px solid !important;
--background: transparent;
margin-left: -15px;
margin-right: 7px;
margin-right: 6px;
}
.status{
text-align: center;
@ -231,7 +231,7 @@ color: white;
.subOrdinateDiv{
z-index: 4;
margin-left: -44px;
margin-left: -32px;
position: absolute;
top: -2px;
}
@ -244,7 +244,7 @@ color: white;
}
.subOrdinateRow{
margin-left: 40px;
margin-left: 55px;
}
.label{

@ -78,7 +78,7 @@ export class WorklistMainComponent implements OnInit {
P_PAGE_LIMIT: number = 100;
notificationCount: any;
activeSegment: any = "info";
lines_note_limit: any = 15;
lines_note_limit: any = 24;
attachmentRes: any;
private WorkListActionHistoryObj: WorkListActionHistoryRequest;
IsReachEnd: boolean = false;
@ -94,6 +94,7 @@ export class WorklistMainComponent implements OnInit {
rejectDis: boolean = false;
requestDis: boolean = false;
moreDisabled: boolean = true;
direction: string;
constructor(
public worklistService: WorklistService,
@ -110,6 +111,7 @@ export class WorklistMainComponent implements OnInit {
) {
this.direction = TranslatorService.getCurrentLanguageName()
this.WorkListActionHistoryObj = new WorkListActionHistoryRequest();
this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM;
this.WorkListActionHistoryObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
@ -401,6 +403,7 @@ export class WorklistMainComponent implements OnInit {
obj.ATTRIBUTE_TEXT_VALUE = this.selEmployeeID;
this.P_RESPOND_ATTRIBUTES_TBL.push(obj);
}
if (
ButtonAction == "APPROVED" ||
ButtonAction == "REJECTED" ||
@ -410,7 +413,7 @@ export class WorklistMainComponent implements OnInit {
this.WorkListActionObj.P_FORWARD_TO_USER_NAME = "";
this.WorkListActionObj.P_ACTION_MODE = ButtonAction;
this.WorkListActionObj.P_COMMENTS = "";
this.WorkListActionObj.RespondAttributeList = this.P_RESPOND_ATTRIBUTES_TBL;
// this.WorkListActionObj.RespondAttributeList = this.P_RESPOND_ATTRIBUTES_TBL;
this.common.sharedService.setSharedData(
this.getPassNotificationDetails,
@ -420,6 +423,7 @@ export class WorklistMainComponent implements OnInit {
ButtonAction,
WorklistMainComponent.PASS_ACTION_MODE
);
this.common.sharedService.setSharedData(
this.P_RESPOND_ATTRIBUTES_TBL,
WorklistMainComponent.PASS_RES_ATTR
@ -450,11 +454,14 @@ export class WorklistMainComponent implements OnInit {
this.ts.trPK('vacation-rule', 'confirmation'),
this.confirmMsg)
// this.openApplyModal(this.WorkListActionObj);
// this.openApplyModal(this.WorkListActionObj);
}
if (ButtonAction == "RFC") {
// alert("Return For Correction");
this.WorkListActionObj.P_ACTION_MODE = ButtonAction;
@ -614,6 +621,10 @@ export class WorklistMainComponent implements OnInit {
}
this.notificationDynamicFields(result.NotificationGetRespondAttributesList);
this.notificationDynamicAttributeArr = result.NotificationGetRespondAttributesList;
this.common.sharedService.setSharedData(
this.notificationDynamicAttributeArr,
"notificationDynamicAttributeArr"
);
if (result.P_Schema) this.schemaNotific = JSON.parse(result.P_Schema);
} // valid it
} // End handleWorkListButtonsResult
@ -701,6 +712,7 @@ export class WorklistMainComponent implements OnInit {
}
handleWorkListActionHistoryResult(result) {
console.log( "1"+ this.IsReachEnd);
if (this.common.validResponse(result)) {
if (this.common.hasData(result.GetActionHistoryList)) {
this.actionHistoryRes = result.GetActionHistoryList;
@ -711,8 +723,12 @@ export class WorklistMainComponent implements OnInit {
let lastitem = result.GetActionHistoryList[lastItemIndex];
if (lastitem.NO_OF_ROWS == lastitem.ROW_NUM) {
this.IsReachEnd = true;
console.log( "2"+ this.IsReachEnd);
} else {
this.IsReachEnd = false;
console.log( "3"+ this.IsReachEnd);
}
}
this.turnCateFun(this.actionHistoryRes);
@ -944,6 +960,40 @@ export class WorklistMainComponent implements OnInit {
loadMoreActionHistory() {
console.log("doInfinite action history MR");
if (!this.IsReachEnd) {
this.worklistService.getActionHistory(this.WorkListActionHistoryObj).
subscribe((result: any) => {
if (this.common.validResponse(result)) {
if (result.GetActionHistoryList != undefined) {
this.P_PAGE_NUM++;
this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM;
(result.GetActionHistoryList).forEach(element => {
if (element.ROW_NUM == element.NO_OF_ROWS) {
this.IsReachEnd = true;
} else {
this.IsReachEnd = false;
}
this.actionHistoryRes.push(element);
}, (Error) => console.log(Error), () =>
//infiniteScroll.target.complete()
console.log("TEST"));
}// if list length >0
else {
this.IsReachEnd = true;
}
}// if response == 1
//this.pageNum++;
// infiniteScroll.target.complete();
});
} else {
//if (infiniteScroll)
//infiniteScroll.target.complete();
}
}//end infiniteScroll
}

@ -1,7 +1,6 @@
<!--
<ion-header>
<!-- <ion-header>
<ion-toolbar class="header-toolbar">
<ion-buttons slot="start">
<ion-back-button color="light" class="btnBack" defaultHref="/home"></ion-back-button>
@ -9,17 +8,25 @@
<ion-title color="light" >{{ts.trPK('payslip','title')}}</ion-title>
</ion-toolbar>
</ion-header> -->
<ion-header>
<ion-toolbar class="header-toolbar-new">
<nav-buttons [enableMenu]="false" [enableBack]="true" [navigate]="true"></nav-buttons>
<ion-title style="color: white;">{{ts.trPK('payslip','monthly-payslip')}}</ion-title>
</ion-toolbar>
</ion-header>
<ion-content class="colorBG">
<div class="header-div">
<ion-buttons slot="start">
<!-- <ion-buttons slot="start">
<ion-back-button color="light" class="btnBack" defaultHref="/home"></ion-back-button>
</ion-buttons>
<p class="Title">{{ts.trPK('payslip','monthly-payslip')}}</p>
<div class="Imgdiv">
<img class="Imgsrc">
</div>
</div> -->
</div>
<!-- <ion-img class="profileImg" [src]="imageSrc"></ion-img> -->

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save