fix conflict

MOE_DEV_NEW_TEMPORARY_DESIGN
ashwaq 6 years ago
commit e7e9ec7b63

File diff suppressed because it is too large Load Diff

@ -38,7 +38,7 @@
"@ionic-native/file": "^5.18.0",
"@ionic-native/file-path": "^5.18.0",
"@ionic-native/fingerprint-aio": "^5.18.0",
"@ionic-native/firebase-x": "^5.19.1",
"@ionic-native/firebase-x": "^5.21.5",
"@ionic-native/geolocation": "^5.10.0",
"@ionic-native/globalization": "^5.18.0",
"@ionic-native/health": "^5.4.0",
@ -83,7 +83,7 @@
"cordova-plugin-file": "^6.0.2",
"cordova-plugin-filepath": "^1.5.6",
"cordova-plugin-fingerprint-aio": "^3.0.0",
"cordova-plugin-firebasex": "^7.0.1",
"cordova-plugin-firebasex": "^7.0.2",
"cordova-plugin-geolocation": "^4.0.2",
"cordova-plugin-globalization": "^1.11.0",
"cordova-plugin-inappbrowser": "^3.1.0",

@ -1,6 +1,6 @@
<ion-header >
<ion-toolbar class="header-toolbar">
<ion-toolbar class="header-toolbar-new">
<ion-title color="light"> {{ts.trPK('submitAbsenceConfirm','submitAbsenceConfirm')}}</ion-title>
<ion-buttons slot="start">
<nav-buttons></nav-buttons>
@ -11,7 +11,137 @@
<ion-content>
<ion-card>
<!-------------------------------Start New design ---------------------------------------->
<ion-grid>
<ion-row style="margin-top: 20px;margin-left: 12px;">
<ion-col>
<div size="10" class="approvalTitle">{{'general, addAttach' | translate}}</div>
</ion-col>
<ion-col style="padding-left: 7%;" size="2">
<div class="fileDiv">
<input end class="inputfile" style="margin-top: 10px;z-index: 99999;position: absolute;opacity: 0;" type="file" ng2FileSelect [uploader]="uploader"
(change)="onFileSelected($event)" />
<label end for="file" class="attachLable">
<ion-icon style="font-size: 22px;" name="add"></ion-icon>
</label></div>
</ion-col>
</ion-row>
<ion-item class="attachmentDiv" *ngIf="attachListOver?.length == 0">
<ion-img style="height: 26px;width:100%;margin-top:12px" src="../assets/imgs/attach-icon.png"></ion-img>
<ion-label style="margin-top: -24px;" position="floating" class="boldTxtNav">{{ 'general, notAttch' | translate}}</ion-label>
</ion-item>
</ion-grid>
<ion-grid class="attachmentDiv" *ngIf="attachListOver?.length > 0">
<div *ngFor="let attachList of attachListOver ; let i = index">
<ion-row>
<ion-col size="1">
<ion-label style="color: black !important;">
{{attachList.AttachmentID +1 }} .
</ion-label>
</ion-col>
<ion-col style="text-align: left;" size="10">
<ion-label style="color: blue !important;" (click)="OpenAttachFiles(attachList.P_FILE_DATA,attachList.P_FILE_CONTENT_TYPE)">
{{attachList.P_FILE_NAME }}
</ion-label>
</ion-col>
<ion-col size="1">
<!-- <button float-end class="attachImgBtn"
(click)="OpenAttachFiles(attachList.P_FILE_DATA,attachList.P_FILE_CONTENT_TYPE)">
<img class="attachImg" src="../assets/imgs/view.png">
</button> -->
<button float-end [disabled]="attachList.isSuccess" class="attachImgBtn removeLable"
(click)="removeFile(attachList)">
<ion-icon style="font-size:22px;margin-left:-7px;margin-top:-2px;" name="close"></ion-icon>
</button>
</ion-col>
</ion-row>
</div>
</ion-grid>
<ion-grid *ngIf="attachmentRes?.length > 0">
<div *ngFor="let attachRes of attachmentRes">
<ion-row>
<ion-col col-8>
<div> <img float-start class="attachImg" src="../assets/imgs/file.png">
</div>
<ion-label>
{{attachRes.FILE_NAME }} </ion-label>
</ion-col>
<ion-col col-4>
<button float-end class="attachImgBtn"
(click)="OpenAttachFiles(attachRes.FILE_DATA,attachRes.FILE_CONTENT_TYPE)">
<img class="attachImg" src="../assets/imgs/view.png">
</button>
<button float-end [disabled]="!isResubmitEIT" class="attachImgBtn" (click)="delelteFile(attachRes)"><img
class="attachImg" src="../assets/imgs/deletegray.png"></button>
</ion-col>
<!-- <button [disabled]="!isResubmitEIT" class="iconButton" (click)="addAttachment(false,attachRes)"><img
class="imgSize" src="../assets/imgs/editIcon.png"></button>
<button (click)="delelteFile(attachRes)" class="iconButton" [disabled]="!isResubmitEIT"><img
class="imgSize" src="../assets/imgs/cancel.png"></button> -->
</ion-row>
</div>
</ion-grid>
<ion-grid class="">
<div class="approvalTitle">{{'confirmAddEit, comment' | translate}}</div>
<ion-item class="submitNote" lines="none">
<!-- <ion-label position="floating" class="boldTxtNav">{{'confirmAddEit, comment' | translate}}</ion-label> -->
<ion-textarea type="text" [(ngModel)]="absComments"></ion-textarea>
</ion-item>
</ion-grid>
<ion-grid class="approvalList">
<div class="approvalTitle">{{'confirmAddEit, approverList' | translate}}</div>
<div class="noDataDiv" *ngIf="approversList?.length == 0">
<p>{{ 'general, empty' | translate}}</p>
</div>
<div style="background-color: white;border-radius: 32px;border: 1px solid #c8c4c4;" *ngIf="approversList?.length > 0">
<ion-list class="notification-list ">
<div class="timeline">
<ion-item style="padding-left: 4%;" *ngFor="let employee of approversList">
<div class="timeline-item" slot="start">
<div class="timeline-thumb 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"
src="../assets/imgs/profile.png"> </div>
</div>
<ion-col>
<ion-label style="color:black !important ;font-weight: bold;padding-top: 0%;">
{{employee.APPROVER}}
</ion-label>
<ion-label style="color:black !important ;padding-top: 4%;">
{{employee.POSITION_TITLE}}
</ion-label>
</ion-col>
<div class="line"></div>
</ion-item>
</div>
</ion-list>
</div>
</ion-grid>
<!-------------------------------End New design ---------------------------------------->
<!-- <ion-card>
<ion-card-header class="boxHdr">
<div class="hrTitle"> {{ts.trPK('confirmAddEit','approverList')}}</div>
</ion-card-header>
@ -123,14 +253,14 @@
</ion-grid>
</ion-card-content>
</ion-card>
</ion-card> -->
</div>
<!-- </div> -->
</ion-content>
<ion-footer>
<div class="centerDiv">
<ion-button color="customnavy" (click)="startAbApproval()">{{ts.trPK('confirmAddEit','start')}}</ion-button>
<ion-button class="confirmEitOkButton" (click)="openSubmitModal()">{{ts.trPK('confirmAddEit','start')}}</ion-button>
</div>
</ion-footer>

@ -28,4 +28,246 @@ ion-card-content.confirm-details{
}
.confirm-details label{
font-size: 13px;
}
}
/****************** NEW Design ***************************************/
.footer-button {
border-radius: 2px;
padding: 0 1.1em;
min-height: 45px;
min-width: 200px;
}
.Header {
font-weight: bold;
color: #1a586d !important;
font-size: 10px;
}
.tbData {
font-size: 10px;
}
.btnBack {
background: transparent;
float: right;
}
.attachmentDiv{
background: #ffffff;
height: auto;
text-align: center;
padding-top: 1px;
margin: 10px;
border-radius: 15px;
border: 1px solid grey;
}
.noDataDiv{
background: #ffffff;
height: 11%;
text-align: center;
padding-top: 1px;
border-radius: 10px;
margin: 10px;
border-radius: 5px;
}
.submitNote{
background: #ffffff;
height: 80px;
padding-top: 1px;
margin: 10px;
border-radius: 15px;
border: 1px solid grey;
}
.approvalList{
--background: #f0efef;
height: auto;
text-align: center;
padding-top: 1px;
border-radius: 10px;
margin: 10px;
border-radius: 5px;
}
/************************New Design**********************************/
.notification-list{
background: none;
background: none;
border-radius: 32px;
ion-item{
// margin-top: 5px;
// margin-bottom: 5px;
background-color: transparent;
.item-date{
width: 100%;
font-size: 16px;
font-weight: bold;
text-align: start;
padding: 0;
margin: 0;
position: absolute;
left: 0;
top: 12%;
}
ion-label , [item-end]{
white-space: normal;
font-size: 14px;
padding-top: 15%;
// :root[dir="ltr"]{
// margin-left: 10px;
// }
// :root[dir="rtl"]{
// margin-right: 10px;
// }
}
}
}
.timeline {
position: relative;
margin: 15px 0 0 0;
// border-bottom: solid 1px var(--cusgray);
}
.timeline:before {
content: '';
position: inherit !important;
top: 0;
bottom: 0;
width: 4px;
// background: #e4e4e4;
z-index: 1;
left: 35px;
/* margin-left: -10px; */
/* z-index: 1; */
}
.timeline .timeline-thumb {
border-radius: 500px;
width: 70px !important;
z-index: 2;
position: absolute;
left: 0px;
// :root[dir="ltr"]{
// left: 37px;
// }
// :root[dir="rtl"]{
// right: 37px;
// }
float: right;
top: 9px;
}
.timeline .timeline-thumb.timeline-icon {
height: 70px;
// text-align: center;
// color: white;
// border: 5px solid #CBD0D3;
// transform: scale(0.2);
}
.timeline .timeline-item {
width: 40px;
}
.timeline .timeline-stats {
position: relative;
font-size: 12px;
color: var(--darkgray);
}
.empImge{
border-radius: 50%;
width:100%;
height: 100%;
border: #dedede solid 1px;
}
.empImgeRep {
border-radius: 50% !important;
width: 80px;
height: 80px;
border: #dedede solid 1px;
}
.line{
padding-bottom:87px;
}
.attachLable{
position: absolute;
top: 0px;
z-index: 0;
background: #30b8c6;
color: #fff;
border-radius: 50%;
border: 0px;
width: 24px;
height: 24px;
text-align: center;
font-size: 5px;
}
.removeLable{
top: 0px;
z-index: 0;
background: #d8252d;
color: #fff;
border-radius: 50%;
border: 0px;
width: 20px;
height: 20px;
text-align: center;
font-size: 5px;
}
.note-modal {
// width: 90%;
// height: 50%;
// top: 20%;
// left: 5%;
// right: 5%;
// bottom: 5%;
background: rgba(0, 0, 0, 0.5) !important;
padding: 30% 10% !important;
--height: 12cm !important;
// --width: 80% !important;
--border-radius:20px;
}
.header-toolbar-new{
--background: #22c6b3;
}
.confirmEitOkButton{
white-space: normal !important;
text-transform: capitalize !important;
min-height: 45px !important;
min-width: 5px !important;
margin: 8px !important;
--background: #22c6b3;
width: 80% !important;
color: white!important;
border-radius: 16px !important;
}

@ -13,7 +13,8 @@ import { ConfirmAddEitService } from '../service/confirm-add-eit-service';
import { AbsenceNotificatonBodyResponse } from '../models/AbsenceNotificationBodyRes';
import { AbsenceAttachmentComponent } from '../absence-attachment/absence-attachment.component';
import { WorkListAttachViewComponent } from 'src/app/notification/work-list-attach-view/work-list-attach-view.component';
import { FileUploader } from 'ng2-file-upload';
import { SubmitAbsenceModalComponent } from '../submit-absence-modal/submit-absence-modal.component';
@Component({
selector: "app-absence-confirm",
templateUrl: "./absence-confirm.component.html",
@ -38,6 +39,9 @@ export class AbsenceConfirmComponent implements OnInit {
attachReqObj: WorkListButtonRequest = new WorkListButtonRequest();
private isResubmitAbs: boolean = false;
private isSubmitBtnClicked: boolean;
filterAllowedType: any = ['application/pdf', 'image/jpeg', 'image/png', 'text/plain', 'image/jpg', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'];
constructor(
public common: CommonService,
public ts: TranslatorService,
@ -225,6 +229,41 @@ export class AbsenceConfirmComponent implements OnInit {
}
/*****submit modal********/
async openSubmitModal() {
this.common.sharedService.setSharedData( this.attachListOver, 'submitAbsAttachmentList');
this.common.sharedService.setSharedData(this.absComments, 'absComments');
const modal = await this.modalCtrl.create({
component: SubmitAbsenceModalComponent,
backdropDismiss: false,
});
modal.cssClass = 'note-modal';
modal.onDidDismiss()
.then((data) => {
console.log(data.data);
if (data.data == "cancel" || data.data == undefined) {
return;
} else {
this.startAbApproval();
}
});
return await modal.present();
}
removeFile(objectitem) {
if (this.attachListOver) {
@ -324,4 +363,96 @@ export class AbsenceConfirmComponent implements OnInit {
if (this.P_TransactionID && this.isSubmitBtnClicked == false)
this.cancelAbProcess();
}
/*******************Add attchement Functions*************/
public uploader: FileUploader = new FileUploader({
allowedMimeType: ['application/pdf', 'image/jpeg', 'image/png', 'text/plain', 'image/jpg', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'],
maxFileSize: 10 * 1024 * 1024,
formatDataFunctionIsAsync: true,
formatDataFunction: async (item) => {
return new Promise((resolve, reject) => {
resolve({
name: item._file.name,
length: item._file.size,
contentType: item._file.type,
date: new Date()
});
});
}
});
onFileSelected(input) {
// this.uploader.onWhenAddingFileFailed = function (item: any, filter: any, options: any){
if (!(this.filterAllowedType.indexOf(input.target.files[0].type) > -1)) {
let msg: string = "";
msg = this.ts.trPK("general", "notSupport");
this.common.presentAlert(msg);
return
} // todo: show alert that you tried uploading wrong files
else {
const file = input.target.files[0];
// console.log(file);
//var encoded = Base64.encode(file);
this.getBase64(file).then(
data => this.pushObject(data, file.name, file.type)
);
// }
// };
}
}
getBase64(file) {
return new Promise((resolve, reject) => {
const reader = new FileReader();
reader.readAsDataURL(file);
reader.onload = () => resolve(reader.result);
reader.onerror = error => reject(error);
});
}
pushObject(fileData, name, type) {
console.log("before push: "+ this.index);
//this.attachListOver.length++;
try {
let array = name.split('.');
let attachType: string = array[array.length - 1];
this.attachListOver.push(
{
AttachmentID: this.attachListOver.length,
P_FILE_CONTENT_TYPE: attachType,//type.split('/')[1],
P_FILE_DATA: fileData.split(',')[1],
P_FILE_NAME: name,//.split('.')[0],
P_TRANSACTION_ID: this.P_TransactionID
})
} catch (e) {
}
//console.log("after push: "+ this.index);
// return this.addAttachRequest
}
}

@ -0,0 +1,132 @@
<ion-header>
<ion-toolbar>
<!-- class="header-toolbar" <nav-buttons></nav-buttons> -->
<ion-title color="dark">{{ 'replacementRoll, title' | translate}}</ion-title>
</ion-toolbar>
</ion-header>
<ion-content >
<ion-list syle="margin-bottom:2px !important" [hidden]="isAnswer==true">
<ion-item>
<ion-label class="boldTxtNav">{{'replacementRoll, searchBy' | translate}}</ion-label>
<ion-select okText='{{"general, ok" | translate }}' cancelText='{{"general, cancel" | translate }}'
[(ngModel)]="searchBy">
<ion-select-option value="1" selected="true">{{'addAttach, name' | translate}}</ion-select-option>
<ion-select-option value="2">{{'login, username' | translate}}</ion-select-option>
<ion-select-option value="3">{{'general, email' | translate}}</ion-select-option>
</ion-select>
</ion-item>
<ion-item lines="none">
<ion-button class="filterBtn" button-type="clear" (click)="getreplacmentemployee()" item-end>
<ion-icon slot="icon-only" color="white" name="search"></ion-icon>
</ion-button>
<ion-input class="filterInput" [(ngModel)]="inputSearch" placeholder='{{"general, search" | translate}}'></ion-input>
<!-- <button ion-button icon-only (click)="getreplacmentemployee()" clear type="button" item-end>
<ion-icon name="search"></ion-icon>
</button> -->
</ion-item>
<!-- <ion-item>
<ion-label>
{{selEmpName}}
</ion-label>
</ion-item> -->
<!-- <div class="centerDiv">
<button ion-button (click)="closePage()">{{'general.save' | translate}}</button>
</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"> -->
<!-- <ion-list *ngIf="ReplacementList">
-->
<!-- <ion-radio-group mode="md" [(ngModel)]="selEmp"> -->
<!-- <ion-grid fixed>
<ion-row justify-content-end>
<ion-col [ngClass]="{'activated': (active == i),'deactivated': (active != i)}" (click)="select(employee,i)"
*ngFor="let employee of demoeAttach;let i=index;"
size-xs="6" size-sm="6" size-md="6" size-lg="6" align-self-stretch>
<div class="profileImageDiv"> <img class="profileImage" src="../assets/imgs/profile.png"></div>
<div *ngIf="active == i" class="selIEmpDiv"> <img class="selIEmpImage" src="../assets/imgs/green.png"></div>
<br/>
<div class="repContentDiv">
<ion-label style="color:var(--dark) !important">
<span style="font-weight: bold !important">{{employee.EMPLOYEE_DISPLAY_NAME}}</span>
<br>{{employee.USER_NAME}}<br>
{{employee.EMAIL_ADDRESS}}</ion-label>
</div>
</ion-col>
</ion-row>
</ion-grid> -->
<!-- </ion-radio-group> -->
<!--
</ion-list> -->
<div class="square-container">
<div (click)="select(employee,i)" *ngFor="let employee of ReplacementList;let i=index;" class="square">
<div class="profileImageDiv">
<!-- <img class="profileImage" src="../assets/imgs/profile.png"> -->
<img *ngIf="employee.EMPLOYEE_IMAGE" class="empImgeRep" [src]="'data:image/png;base64,'+employee.EMPLOYEE_IMAGE">
<img *ngIf="employee.EMPLOYEE_IMAGE == null" class="empImgeRep" src="../assets/imgs/profile.png">
</div>
<div *ngIf="active == i" class="selIEmpDiv">
<img class="selIEmpImage" src="../assets/imgs/green.png">
</div>
<div [ngClass]="{'activated': (active == i),'deactivated': (active != i)}"
class="content">
<ion-label>
<span style="font-weight: bold !important">{{employee.EMPLOYEE_DISPLAY_NAME}}</span>
<br>{{employee.USER_NAME}}<br>
{{employee.EMAIL_ADDRESS}}
</ion-label>
</div>
</div>
</div>
</ion-item>
<ion-infinite-scroll (ionInfinite)="doInfinite($event)">
<ion-infinite-scroll-content></ion-infinite-scroll-content>
</ion-infinite-scroll>
</ion-content>
<ion-footer>
<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>
<ion-button class="footer-button" style="background: var(--darkblue)!important;border-radius: 10px; --background: transparent; " ion-button (click)="closeModal()">
{{'general, cancel' | translate}}</ion-button>
</div>
</ion-footer>

@ -0,0 +1,121 @@
button.item-button.button.button-md.button-clear.button-clear-md {
background-color: transparent;
}
.footer-button {
border-radius: 3px;
padding: 0 1.1em;
min-height: 45px;
min-width: 200px;
}
// ion-item {
// margin-top: 5%;
// margin-right: 7%;
// width: 100%;
// }
.ionItem{
border: #e4e4e4 solid;
/* margin: 6px; */
/* padding: 11px; */
height: 85px;
width: 164px;
border-radius: 5px;
text-align: center;
}
.profileImageDiv{
text-align: center;
margin-bottom: -27px;
z-index: 3;
position: relative;
top: 0;
}
.profileImage{
width:60px !important;
// margin-left: -25px;
// margin-right: 22px;
}
.activated{
border: #209a83 0.02cm solid ;
}
.deactivated{ border: #e4e4e4 0.02cm solid;
}
.repContentDiv{
text-align: center;
width: 85%;
font-size: 14px;
border: #e4e4e4 solid;
border-radius: 5px;
padding: 20px 8px 8px 8px;
margin-top: -9px;
margin-right: -35px
}
.selIEmpDiv{
text-align: right;
margin-bottom: -26px;
margin-right: 0px;
z-index: 3;
position: relative;
top: 0;
}
.selIEmpImage{
width:22px !important
}
.noteInput{
border: solid var(--gray) 1px;
border-radius: 15px;
margin: 8px 17px 0px 17px;
padding: 10px 2px 10px 2px;
}
.filterInput{
border: solid var(--gray) 1px;
border-radius: 21px;
padding-left: 10px !important;
}
.filterBtn{
background: var(--newgreen);
--background: var (--newgreen);
border-radius: 50%;
height: 60px;
width: 60px;
}
*{
box-sizing: border-box;
}
.square-container{
// padding: 8px;
width:100%;
}
.square{
// width:calc(100% / 2);
width:50%;
float:left;
position: relative;
// padding-bottom: calc(100% / 2);
}
.square .content{
width: calc(100% - 16px) !important;
height: calc(100% - 16px) !important;
margin: 8px;
padding: 16px;
// position: absolute;
color: white;
border-radius: 9px;
text-align: center;
// background-color: #0095ff;
// box-shadow: 0 2px 5px rgba(0, 0, 0, 0.26);
}

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

@ -0,0 +1,342 @@
import { ModalController } from '@ionic/angular';
import { Component, OnInit } from '@angular/core';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { WorKListReplacmentEmployeeResponse } from 'src/app/notification/models/ReplacmentEmployeeRes';
import { WorkListReplacmentEmployeeRequest } from 'src/app/notification/models/ReplacmentEmployeeReq';
import { WorkListActionRequest } from 'src/app/notification/models/NotificationActionReq';
import { WorklistMainService } from 'src/app/notification/service/work-list.main.service';
import { ViewReplacementModalComponent } from 'src/app/notification/view-replacement-modal/view-replacement-modal.component';
import { WorklistService } from 'src/app/notification/service/worklist.service';
@Component({
selector: 'app-absence-replacement-list',
templateUrl: './absence-replacement-list.component.html',
styleUrls: ['./absence-replacement-list.component.scss'],
})
export class AbsenceReplacementListComponent implements OnInit {
P_SEARCH_EMPLOYEE_DISPLAY_NAME: string = "";
P_SEARCH_EMAIL_ADDRESS: string = "";
getPassActionMode: any;
selectedValue: any;
inputSearch: any;
selEmpName: any;
selectedUserInf: any;
userNote: any;
getPassNotificationDetails: any;
isAnswer: boolean = false;
pQuestion: string = "";
selEmp: any;
P_PAGE_NUM: number;
P_PAGE_LIMIT: number;
ReplacementList: any = [];
searchBy: string = "";
IsReachEnd: boolean = false;
ReplacmentListRes: WorKListReplacmentEmployeeResponse;
private WorkListReplacmentEmployeeObj: WorkListReplacmentEmployeeRequest = new WorkListReplacmentEmployeeRequest();
private WorkListActionObj: WorkListActionRequest;
getpassResAttr: any = [];
active: any;
demoeAttach:any=[];
constructor(public worklistService: WorklistService, private cs: CommonService, private ts: TranslatorService, public workListMainService: WorklistMainService, public modalCtrl: ModalController) {
this.P_PAGE_NUM = 1;
this.P_PAGE_LIMIT = 50;
// this.getPassActionMode = this.cs.sharedService.getSharedData('passActionMode', false);
// this.getPassNotificationDetails = this.cs.sharedService.getSharedData('passNotificationInfo', false);
// this.getpassResAttr = this.cs.sharedService.getSharedData('passResAttr', false);
// this.pQuestion = this.cs.sharedService.getSharedData('pQuestion', false);
// if (this.getPassActionMode == "ANSWER_INFO") {
// this.isAnswer = true;
// }
this.WorkListReplacmentEmployeeObj.P_PAGE_NUM = this.P_PAGE_NUM;
this.WorkListReplacmentEmployeeObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
// this.WorkListActionObj = new WorkListActionRequest();
// this.WorkListActionObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;//26919060;
// this.WorkListActionObj.P_FORWARD_TO_USER_NAME = "";
// this.WorkListActionObj.P_ACTION_MODE = "";
// this.WorkListActionObj.P_COMMENTS = "";
// this.WorkListActionObj.RespondAttributeList =[];// this.getpassResAttr;
// this.WorkListActionObj.P_APPROVER_INDEX = null;
}
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() {
this.ReplacementList = [];
this.IsReachEnd = false;
this.P_PAGE_NUM = 1;
if (this.inputSearch) {
switch (this.searchBy) {
case '1': {
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME = this.inputSearch;
this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME = "";
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS = "";
break;
}
case '2': {
this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME = this.inputSearch;
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME = "";
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS = "";
break;
}
case '3': {
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS = this.inputSearch;
this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME = "";
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME = "";
break;
}
default: {
this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME = "";
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME = "";
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS = "";
break;
}
}
} else {
this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME = "";
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME = "";
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS = "";
}
// if(this.selectedValue =="1"){
// this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME=this.inputSearch;
// this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME="";
// this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS="";
// }
// else if(this.selectedValue =="2"){
// this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME="";
// this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME=this.inputSearch;
// this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS="";
// }
// else if(this.selectedValue =="3"){
// this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME="";
// this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME="";
// this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS=this.inputSearch;
// }
this.worklistService.getReplacmentEmployeeList(this.WorkListReplacmentEmployeeObj).
subscribe((result: WorKListReplacmentEmployeeResponse) => {
this.handleWorkListReplacmentEmployeeResult(result);
});
}//End replacment Employee
handleWorkListReplacmentEmployeeResult(result) {
if (this.cs.validResponse(result)) {
// this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA);
if (this.cs.hasData(result.ReplacementList)) {
//this.ReplacmentListRes =result.ReplacementList;
this.ReplacementList = result.ReplacementList;
this.P_PAGE_NUM++;
let lastItemIndex = this.ReplacementList.length - 1;
if (result.ReplacementList[lastItemIndex]) {
let lastitem = result.ReplacementList[lastItemIndex];
if (lastitem.NO_OF_ROWS == lastitem.ROW_NUM) {
this.IsReachEnd = true;
} else {
this.IsReachEnd = false;
}
}
} else {
let msg: string = this.ts.trPK('general', 'noResult');
this.cs.presentAlert(msg);
}
// if(result.ReplacementList.length == 0){
// }
// else if(result.ReplacementList != null)
// {
// this.ReplacmentListRes =result.ReplacementList;
// //open modal
// this.openModale(this.ReplacmentListRes);
// } // if result == null
} // valid it
}
getValueSelected(Value) {
this.selectedValue = Value;
}
select(selectEmp,index){
console.log(selectEmp.EMPLOYEE_DISPLAY_NAME);
this.selEmp=selectEmp
this.active=index;
}
clear() {
this.selEmpName = "";
this.selectedUserInf = null;
}
async openModale(ReplacmentListRes) {
const modal = await this.modalCtrl.create({
component: ViewReplacementModalComponent
});
modal.onDidDismiss()
.then((data) => {
if (data == "cancel" || data == "undefined") {
//this.selEmpName="";
return;
} else {
this.selectedUserInf = data;
this.selEmpName = this.selectedUserInf.EMPLOYEE_DISPLAY_NAME;
}
});
return await modal.present();
}
submitAction() {
this.selEmp
if( this.selEmp){
let data = this.selEmp;
this.modalCtrl.dismiss(data);
}else{
let msg: string = this.ts.trPK("replacementRoll", "msg");
this.cs.showErrorMessageDialog(() => {
}, this.ts.trPK('general', 'ok'), msg);
return false;
}
// if (this.selEmp && this.isAnswer == false) {
// // this.selectedUserInf = this.ReplacementList[this.selEmp];
// this.selectedUserInf = this.selEmp;
// console.log("selEmp "+ this.selEmp.USER_NAME);
// if (this.selectedUserInf && this.selectedUserInf.USER_NAME) {
// console.log("userInfo "+this.selectedUserInf.USER_NAME);
// if (this.userNote) {
// this.WorkListActionObj.P_FORWARD_TO_USER_NAME = this.selectedUserInf.USER_NAME;
// this.WorkListActionObj.P_ACTION_MODE = this.getPassActionMode;
// this.WorkListActionObj.P_COMMENTS = this.userNote;// response Attr
// this.workListMainService.actionButton(this.WorkListActionObj).
// subscribe((result: any) => {
// this.handleApplayActionResult(result);
// });
// } else {
// let msg: string = this.ts.trPK("replacementRoll", "enterNote");
// this.cs.showErrorMessageDialog(() => {
// }, this.ts.trPK('general', 'ok'), msg);
// }
// } else {
// let msg: string = this.ts.trPK("replacementRoll", "msg");
// this.cs.showErrorMessageDialog(() => {
// }, this.ts.trPK('general', 'ok'), msg);
// }
// } else if (this.isAnswer == true) {
// if (this.userNote) {
// this.WorkListActionObj.P_FORWARD_TO_USER_NAME = null;
// this.WorkListActionObj.P_ACTION_MODE = this.getPassActionMode;
// this.WorkListActionObj.P_COMMENTS = this.userNote;// response Attr
// this.workListMainService.actionButton(this.WorkListActionObj).
// subscribe((result: any) => {
// this.handleApplayActionResult(result);
// });
// } else {
// let msg: string = this.ts.trPK("replacementRoll", "enterNote");
// this.cs.showErrorMessageDialog(() => {
// }, this.ts.trPK('general', 'ok'), msg);
// }
// } else {
// let msg: string = this.ts.trPK("replacementRoll", "msg");
// this.cs.showErrorMessageDialog(() => {
// }, this.ts.trPK('general', 'ok'), msg);
// }
}
doInfinite(infiniteScroll) {
if (!this.IsReachEnd) {
//const request =new WorkListActionRequest();
// request.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME=this.P_SEARCH_USER_NAME;
// request.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME=this.P_SEARCH_EMPLOYEE_DISPLAY_NAME;
// request.P_SEARCH_EMAIL_ADDRESS=this.P_SEARCH_EMAIL_ADDRESS;
this.WorkListReplacmentEmployeeObj.P_PAGE_NUM = this.P_PAGE_NUM;
this.WorkListReplacmentEmployeeObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
// request.P_SELECTED_EMPLOYEE_NUMBER=this.selEmp;
this.worklistService.getReplacmentEmployeeList(this.WorkListReplacmentEmployeeObj).
subscribe((result: any) => {
if (this.cs.validResponse(result)) {
if (this.cs.hasData(result.ReplacementList)) {
this.P_PAGE_NUM++;
result.ReplacementList.forEach(vr => {
if (vr.ROW_NUM == vr.NO_OF_ROWS) {
this.IsReachEnd = true;
}
else {
this.IsReachEnd = false;
}
this.ReplacementList.push(vr);
// this.pro.GetVacationRulesList.push(vr);
});
} else {
this.IsReachEnd = true;
}
}
//this.P_PAGE_NUM++;
if (infiniteScroll)
infiniteScroll.target.complete();
// console.log(resFlag);
}, (Error) => console.log(Error), () => infiniteScroll.target.complete());
} else {
if (infiniteScroll)
infiniteScroll.target.complete();
}
}
closeModal() {
this.modalCtrl.dismiss();
}
}

@ -20,6 +20,10 @@ import { AbsenceAttachmentComponent } from "./absence-attachment/absence-attachm
import { AddAttachService } from "./service/add-attach-service";
import { WorkListAttachViewComponent } from "src/app/notification/work-list-attach-view/work-list-attach-view.component";
import { ViewAttachmentsComponent } from './view-attachments/view-attachments.component';
import { SubmitAbsenceModalComponent } from './submit-absence-modal/submit-absence-modal.component';
import { AbsenceReplacementListComponent } from './absence-replacement-list/absence-replacement-list.component';
import { WorklistService } from 'src/app/notification/service/worklist.service';
import { WorklistMainService } from 'src/app/notification/service/work-list.main.service';
const routes: Routes = [
{
path: "",
@ -52,6 +56,14 @@ const routes: Routes = [
{
path:'view-attachements',
component:ViewAttachmentsComponent
},
{
path:'absence-submit-modal',
component:SubmitAbsenceModalComponent
},
{
path:'absence-replacment-modal',
component:AbsenceReplacementListComponent
}
]
}
@ -73,7 +85,9 @@ const routes: Routes = [
SubmitAbConfirmService,
DatePicker,
ConfirmAddEitService,
AddAttachService
AddAttachService,
WorklistService,
WorklistMainService
],
declarations: [
AbsencePage,
@ -81,7 +95,9 @@ const routes: Routes = [
SubmitAbsenceComponent,
AbsenceConfirmComponent,
AbsenceAttachmentComponent,
ViewAttachmentsComponent
ViewAttachmentsComponent,
SubmitAbsenceModalComponent,
AbsenceReplacementListComponent
]
})
export class AbsencePageModule {}

@ -1,19 +1,150 @@
<ion-header >
<ion-toolbar class="header-toolbar">
<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-content padding>
<ion-content >
<!-- colorBG -->
<div class="contentEit" style="background: #f3f1f1;">
<div class="header-div">
<!-- <ion-buttons slot="end">
<button class="headerBtn" (click)="AccrualBalances()">
<img class="headerImg" src="../assets/imgs/accubalance.png">
</button>
</ion-buttons> -->
<!-- <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> -->
</div>
<div class="">
<div >
<ion-grid class="headerGrid">
<div style="color: black;">
<div class="result-graph">
<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"
(ionChange)="getAccrualBalance()"></ion-datetime>
<ion-icon class="iconCalendar" ios="ios-calendar" md="md-calendar"></ion-icon>
<!-- </ion-item> -->
</div>
<div style=" border-bottom: 1px solid #a7a4a4; margin-bottom: 12px;
margin-top: -10px; margin-right: -9px;"></div>
<div class="result-text-container">
<h2>{{totalnumber}}</h2>
<!-- <h2>{{accrualNet + accrualUsed + accrualYearly}}</h2> -->
<span>{{ts.trPK('absenceList','totalNumber')}}</span>
</div>
<p-chart #chart class="today-graph" type="doughnut" [data]="data" [options]="options"></p-chart>
</div>
<div style="position: relative;
left: 82%;
bottom: 128px;
color: black;
background-color: #DDB017;
width: 13%;
height: 6px;">
<ion-col>
<ion-row>
<label class="green-label">{{ts.trPK('absenceList','accrualNet')}}</label>
</ion-row>
<ion-row>
<label class="green-amount">{{accrualNet}}</label>
</ion-row>
</ion-col>
</div>
<div style="position: relative;
left: 59%;
bottom: 131px;
color: black;
background-color: #094875;
width: 13%;
height: 6px;">
<ion-col>
<ion-row>
<label class="blue-label">{{ts.trPK('absenceList','accrualUsed')}}</label>
</ion-row>
<ion-row>
<label class="blue-amount" for="">{{accrualUsed}}</label>
</ion-row>
</ion-col>
</div>
<div style="position: relative;
left: 82%;
bottom: 80px;
color: black;
background-color: #CB3232;
width: 13%;
height: 6px;">
<ion-col>
<ion-row>
<label class="blue-label">{{ts.trPK('absenceList','accrualYearly')}}</label>
</ion-row>
<ion-row>
<label class="blue-amount" for="">{{accrualYearly}}</label>
</ion-row>
</ion-col>
</div>
<!-- <div style="position: relative;
left: 59%;
bottom: 73px;
color: black;
background-color: #094875;
width: 16%;
height: 6px;">
<ion-col>
<ion-row>
<label class="blue-label">text</label>
</ion-row>
<ion-row> -->
<!-- <label class="blue-amount" for="">{{getleaveAccrualBalance.ACCRUAL_YEARLY_ENTITLEMENT}}</label> -->
<!-- </ion-row>
</ion-col>
</div> -->
</div>
</ion-grid>
</div>
</div>
<!-- /////////////////////////////////////////////////////////up -->
<!-- <ion-content padding> -->
<div class="no-dataDiv" *ngIf="!GetAbsenceTransactionList || GetAbsenceTransactionList.length <= 0" >
<ion-row>
@ -25,92 +156,104 @@
</div>
<div *ngIf="GetAbsenceTransactionList && GetAbsenceTransactionList.length > 0 ">
<ion-card *ngFor="let item of GetAbsenceTransactionList; let i=index;">
<div *ngFor="let item of GetAbsenceTransactionList; let i=index;">
<ion-card-header class="boxHdr">
<!-- <ion-card-header class="boxHdr">
<div class="hrTitle">{{ts.trPK('absenceList','absHeader')}}</div>
<img class="imgSize" src="../assets/imgs/attachment.png" *ngIf="item.ATTACHMENT_EXIST=='Y'" (click)="AttachmentDocuments(item.ABSENCE_ATTENDANCE_ID)">
</ion-card-header>
<ion-card-content>
<ion-grid>
</ion-card-header> -->
<ion-grid class="grids">
<div>
<ion-row>
<ion-col class="colBold">
<label for="">{{ts.trPK('absenceList','startDate')}} </label>
</ion-col>
<ion-col>
<label for=""> {{item.START_DATE}}</label>
<label style="color:#094875;font-weight: bold;" class="label" for="">{{ts.trPK('absenceList','startDate')}} </label>
<br>
<label class="label" style="color:black;" for=""> {{item.START_DATE}}</label>
<br>
<hr style="background-color: grey;height: 1px">
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold">
<label for="">{{ts.trPK('absenceList','endDate')}}</label>
</ion-col>
<ion-col>
<label for=""> {{item.END_DATE}}</label>
</ion-col>
<label style="color:#094875;font-weight: bold;" class="label" for="">{{ts.trPK('absenceList','endDate')}}</label>
<br>
<label class="label" style="color:black;" for=""> {{item.END_DATE}}</label>
<br>
<hr style="background-color: grey;height: 1px">
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold">
<label for="">{{ts.trPK('absenceList','absenceType')}} </label>
</ion-col>
<ion-col>
<label for="">{{item.ABSENCE_TYPE}}</label>
<label style="color:#094875;font-weight: bold;" class="label" for="">{{ts.trPK('absenceList','absenceType')}} </label>
<br>
<label class="label" style="color:black;" for="">{{item.ABSENCE_TYPE}}</label>
<br>
<hr style="background-color: grey;height: 1px">
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold">
<label for="">{{ts.trPK('absenceList','absenceCategory')}}</label>
</ion-col>
<ion-col>
<label for="">{{item.ABSENCE_CATEGORY}}</label>
<label style="color:#094875;font-weight: bold;" class="label" for="">{{ts.trPK('absenceList','absenceCategory')}}</label>
<br>
<label class="label" style="color:black;" for="">{{item.ABSENCE_CATEGORY}}</label>
<br>
<hr style="background-color: grey;height: 1px">
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold">
<label for="">{{ts.trPK('absenceList','days')}}</label>
</ion-col>
<ion-col>
<label for="">{{item.ABSENCE_DAYS}}</label>
<label style="color:#094875;font-weight: bold;" class="label" for="">{{ts.trPK('absenceList','days')}}</label>
<br>
<label class="label" style="color:black;" for="">{{item.ABSENCE_DAYS}}</label>
<br>
<hr style="background-color: grey;height: 1px">
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold">
<label for="">{{ts.trPK('absenceList','hours')}}</label>
</ion-col>
<ion-col>
<label for="">{{item.ABSENCE_HOURS}}</label>
<label style="color:#094875;font-weight: bold;" class="label" for="">{{ts.trPK('absenceList','hours')}}</label>
<br>
<label class="label" style="color:black;" for="">{{item.ABSENCE_HOURS}}</label>
<br>
<hr style="background-color: grey;height: 1px">
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold">
<label for="">{{ts.trPK('absenceList','approvalStatus')}}</label>
</ion-col>
<ion-col>
<label for="">{{item.APPROVAL_STATUS}}</label>
<label style="color:#094875;font-weight: bold;" for="">{{ts.trPK('absenceList','approvalStatus')}}</label>
<br>
<label class="label" style="color:black;" for="">{{item.APPROVAL_STATUS}}</label>
<br>
<hr style="background-color: grey;height: 1px">
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold">
<label for="">{{ts.trPK('absenceList','absenceStatus')}}</label>
</ion-col>
<ion-col>
<label for="">{{item.ABSENCE_STATUS}}</label>
<label style="color:#094875;font-weight: bold;" for="">{{ts.trPK('absenceList','absenceStatus')}}</label>
<br>
<label class="label" style="color:black;" for="">{{item.ABSENCE_STATUS}}</label>
<br>
<hr style="background-color: grey;height: 1px">
</ion-col>
</ion-row>
</div>
</ion-grid>
</ion-card-content>
</ion-card>
</div>
</div>
<ion-infinite-scroll (ionInfinite)="doInfinite($event)">
<ion-infinite-scroll-content></ion-infinite-scroll-content>
</ion-infinite-scroll>
<ion-icon class="addClass" name="add" (click)="createAbsence()"></ion-icon>
</div>
</ion-content>
<ion-footer>
<!-- <ion-footer>
<div class="centerDiv">
<ion-button color="customnavy" class="gridBtn" (click)="createAbsence()">{{ts.trPK('absenceList','createAbs')}}</ion-button>
</div>
</ion-footer>
</ion-footer> -->

@ -7,3 +7,212 @@
height:20px;
width:20px;
}
.addClass{
background-color: #094875;
width: 80px;
height: 80px;
right: 8%;
position: fixed;
color: white;
bottom: 20%;
border-radius: 50%;
z-index: 999;
-webkit-box-shadow: 2px -1px 13px 0px rgba(0,0,0,0.59);
-moz-box-shadow: 2px -1px 13px 0px rgba(0,0,0,0.59);
box-shadow: 2px -1px 13px 0px rgba(0,0,0,0.59);
}
.grids{
border-radius: 20px !important;
background: white;
padding-left: 1px;
padding-right: 1px;
margin: 13px;
padding-top: 0px;
padding-bottom: 3px;
padding-left: 13px;
padding-right: 13px;
border: 1px solid #cac8c8;
margin-bottom: 10% !important;
}
.bgcolor {
color: white;
border-top-right-radius: 19px;
border-top-left-radius: 15px;
padding-top: 1;
padding-bottom: 0;
margin-top: 0;
margin-bottom: 0;
/* border-radius: 12px !important; */
background: #094875;
border-bottom: 1px solid #a7a4a4;
border-top: 1px solid #cac8c8;
margin-left: -13px;
margin-right: -13px;
}
.header-div {
background-color: #22C6B3;
text-transform: capitalize;
height: 160px;
/* position: relative; */
/* display: block; */
margin-bottom: -28px;
}
.header-toolbar-new{
--background: #22c6b3;
}
.hrClass{
border-width: 0;
box-sizing: content-box;
border-bottom: 1px solid #e6e6e6;
background: #fff !important;
height: 1px;
}
//////////////////////////////////////////////down
.colorBG{
--background: #f0efef;
}
.Title{
text-align: center;
color: white;
margin-top: -33px;
font-size: 17px;
}
.result-graph{
font-size: 14px;
margin-left: -48px;
margin-right: 3px;
margin-bottom: -30px;
}
.datetime{
// text-align: center;
// font-family: WorkSans-Bold;
// margin-left: 111px;
text-align: center;
font-family: WorkSans-Bold;
margin-left: 47px;
margin-top: -19px;
}
.datelabel{
margin-left: 150px;
color: black !important;
font-family: WorkSans-Bold;
}
.iconCalendar{
// margin-left: -241px;
// margin-top: 5px;
margin-left: 30px !important;
width: 22% !important;
height: 26px !important;
margin-top: -69px !important;
margin-bottom: 20px !important;
}
.today-graph{
// display:block !important;
// height: 150px !important;
// width: 300 !important;
// margin-left: -70px !important;
display: block !important;
height: 196px;
width: 385px;
padding-left: 51px;
// padding-top: 29px;
margin-left: -70px !important;
}
.headerGrid{
background-color: white !important;
border: 1px solid #cac8c8 !important;
border-radius: 20px !important;
padding-top: 28px;
padding-bottom: 14px;
margin-left: 13px;
margin-right: 13px;
margin-top: -136px;
margin-bottom: 10px;
}
.header{
margin-top: -126px;
}
.result-text-container {
padding: 0;
margin: 0;
position: absolute;
left: 31%;
top: 23%;
display: block;
text-align: center;
transform: translate(-50%, -50%);
h2 {
font-size: 25px;
font-family: WorkSans-Bold;
margin: 0 auto;
// margin-top: 289px;
line-height: 36px;
}
span {
width: 125px;
display: block;
margin: 0 auto;
font-size: 12px;
// margin-top: 289px;
font-family: workSans-Regular;
}
}
.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;
}
.contentEit:before {
position: absolute;
content: "";
// background: #22c6b3;
height: 140px;
width: 100%;
left: 0;
top: 0px;
z-index: 1;
}

@ -6,6 +6,9 @@ import { MenuService } from "src/app/hmg-common/services/menu/menuservice.servic
import { AbsenceAttahcmentResponse } from "../models/abs.attach.response";
import { AbsenceListService } from "../service/service.service";
import { IonInfiniteScroll } from "@ionic/angular";
import { AccrualService } from 'src/app/accrual-balances/services/accrual.service';
import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service';
import { AuthenticatedUser } from 'src/app/hmg-common/services/authentication/models/authenticated-user';
@Component({
selector: "app-home",
@ -13,6 +16,7 @@ import { IonInfiniteScroll } from "@ionic/angular";
styleUrls: ["./home.component.scss"]
})
export class HomeComponent implements OnInit {
[x: string]: any;
@ViewChild(IonInfiniteScroll) infiniteScroll: IonInfiniteScroll;
P_PAGE_NUM: number;
P_PAGE_LIMIT: number;
@ -21,14 +25,55 @@ export class HomeComponent implements OnInit {
selEmp: string = "";
respID: number;
selMenu: MenuResponse;
leaveAccrualBalance: any;
data: any;
accrualNet: any;
getleaveAccrualBalance: any;
accrualUsed: any;
accrualYearly: any;
effectiveDate: any;
Sdate: any;
emp_no: any;
balance: any;
ACCRUAL_NET_ENTITLEMENT: any;
ACCRUAL_USED_ENTITLEMENT: any;
ACCRUAL_YEARLY_ENTITLEMENT: any;
totalnumber: any;
public options = {
cutoutPercentage: 80,
tooltips: { enabled: false },
legend: { display: false }};
gaugeType = "full";
// gaugeValue = 11.200;
// gaugeLabel = "";
constructor(
public common: CommonService,
public ts: TranslatorService,
public menuService: MenuService,
public absService: AbsenceListService
public absService: AbsenceListService,
public accrualService: AccrualService,
public authService: AuthenticationService
) {}
ngOnInit() {
this.Sdate = new Date().toISOString();
this.getUserDetails();
}
private getUserDetails(){
this.authService.loadAuthenticatedUser().subscribe((user: AuthenticatedUser) => {
if (user) {
this.emp_no=user.EMPLOYEE_NUMBER;
this.getAccrualBalance();
}
});
this.P_PAGE_LIMIT = 50;
this.P_PAGE_NUM = 1;
this.selMenu = this.common.sharedService.getSharedData(
@ -43,13 +88,42 @@ export class HomeComponent implements OnInit {
MenuResponse.SHARED_SEL_RESP_ID,
false
);
this.leaveAccrualBalance = this.common.sharedService.getSharedData('leaveAccrualBalance', false);
console.log("this.leaveAccrualBalance>>>>>>>>>>" + this.leaveAccrualBalance.ACCRUAL_NET_ENTITLEMENT);
/***
ACCRUAL_NET_ENTITLEMENT: 24.59
ACCRUAL_USED_ENTITLEMENT: 0
ACCRUAL_YEARLY_ENTITLEMENT: 50.4*/
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;
this.data = {
// labels: ['earingTotal', 'deductionTotal'],
datasets: [
{ data: [this.accrualNet,this.accrualUsed,this.accrualYearly],
backgroundColor: [
'#DDB017',
'#094875',
'#CB3232',],
borderWidth: 2
}
]
};
this.getAbsenceTransaction();
}
AccrualBalances() {
AccrualBalances() {
this.common.openAccuralPage();
}
AttachmentDocuments(id) {
AttachmentDocuments(id) {
const request = {
P_ABSENCE_ATTENDANCE_ID: id
};
@ -77,7 +151,7 @@ export class HomeComponent implements OnInit {
//this.GetAbsenceTransactionList =result.GetAbsenceTransactionList;
}
}
getAbsenceTransaction() {
getAbsenceTransaction() {
this.IsReachEnd = false;
const request = {
P_SELECTED_EMPLOYEE_NUMBER: this.selEmp,
@ -91,7 +165,7 @@ export class HomeComponent implements OnInit {
});
}
private handleAbsListResult(result) {
handleAbsListResult(result) {
if (this.common.validResponse(result)) {
if (this.common.hasData(result.GetAbsenceTransactionList)) {
this.GetAbsenceTransactionList = result.GetAbsenceTransactionList;
@ -108,7 +182,7 @@ export class HomeComponent implements OnInit {
}
}
}
doInfinite(infiniteScroll) {
doInfinite() {
if (!this.IsReachEnd) {
//this.P_PAGE_NUM++;
const request = {
@ -148,7 +222,54 @@ export class HomeComponent implements OnInit {
}
}
}
createAbsence() {
createAbsence() {
this.common.openSubmitAbsencePage();
}
///////////////////////////////////////////////////////////////
getAccrualBalance() {
if (this.Sdate) {
let today = new Date(this.Sdate);
let day = today.getDate();
let month = today.getMonth() + 1;
let year = today.getFullYear();
let todayDate = month + '/' + day + '/' + year;
let effectiveDate = todayDate;
const request = {
P_SELECTED_EMPLOYEE_NUMBER: this.emp_no,
P_EFFECTIVE_DATE: effectiveDate
};
this.accrualService
.getAccrualBalances(request)
.subscribe((result: any) => {
this.handleAccrualResult(result);
});
}
}
handleAccrualResult(result) {
if (this.common.validResponse(result)) {
this.balance = result.GetAccrualBalancesList;
}
if(this.balance){
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: [
{ data: [this.accrualNet,this.accrualUsed,this.accrualYearly],
backgroundColor: [
'#DDB017',
'#094875',
'#CB3232',],
borderWidth: 2
}
]
};
}
}
}

@ -0,0 +1,39 @@
<ion-content padding>
<!--
<ion-col col-1
style="margin-right: -22px;margin-top: -10px;">
<ion-button class="closeIcon" (click)="closeModal()">
<img src="../assets/imgs/close.png">
</ion-button>
</ion-col> -->
<h2><div class="Header">Confirmation</div></h2>
<div>
<div *ngIf="submitAbsAttachmentList.length==0" class="labelcheck" lines="none" style="text-align: center;">
No Attachment
</div>
<div *ngIf="absComments==''" class="labelcheck" style="text-align: center;margin-bottom: 5px;padding-bottom: 16px;">
No Note
</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-button class="submitOkButton" (click)="OkBtnModal()"> {{ts.trPK('general','ok')}}
</ion-button>
</ion-row>
<ion-row class="rowBtn">
<ion-button class="submitCancelButton" (click)="closeModal()"> {{ts.trPK('general','cancel')}}
</ion-button>
</ion-row>
</ion-footer>
</ion-content>

@ -0,0 +1,53 @@
.rowBtn{
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}
.Header{
color: black !important;
font-size: 25px !important;
font-weight: bold !important;;
margin: 0;
text-align: center;
margin-bottom: 20px;
}
.labelRadio{
color: black !important;
font-weight: bold !important;
padding-bottom: 20px;
}
.labelcheck{
color: red !important;
font-weight: bold !important;
margin-bottom: 10px;
}
.submitOkButton{
white-space: normal !important;
text-transform: capitalize !important;
min-height: 45px !important;
min-width: 5px !important;
margin: 8px !important;
--background:: #22c6b3;
width: 100% !important;
color: white!important;
border-radius: 16px !important;
}
.submitCancelButton{
white-space: normal !important;
text-transform: capitalize !important;
min-height: 45px !important;
min-width: 5px !important;
margin: 8px !important;
--background:: #094875;
width: 100% !important;
color: white!important;
border-radius: 16px !important;
}

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

@ -0,0 +1,36 @@
import { Component, OnInit } from '@angular/core';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { ModalController } from '@ionic/angular';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
@Component({
selector: 'app-submit-absence-modal',
templateUrl: './submit-absence-modal.component.html',
styleUrls: ['./submit-absence-modal.component.scss'],
})
export class SubmitAbsenceModalComponent implements OnInit {
submitAbsAttachmentList :any =[];
absComments: string;
constructor( private ts: TranslatorService,private modalCtrl: ModalController, private cs: CommonService){
this.submitAbsAttachmentList = this.cs.sharedService.getSharedData('submitAbsAttachmentList', false);
this.absComments = this.cs.sharedService.getSharedData('absComments', false);
}
ngOnInit() {
console.log("modal");
//this.actionBtns = this.cs.sharedService.getSharedData("passActionMore" , false);
console.log("modal");
}
closeModal() {
this.modalCtrl.dismiss();
}
OkBtnModal() {
let data = "ok";
this.modalCtrl.dismiss(data);
}
}

@ -1,5 +1,5 @@
<ion-header >
<ion-toolbar class="header-toolbar">
<ion-toolbar class="header-toolbar-new">
<ion-title color="light"> {{ts.trPK('submitAbsence','submitAbsence')}}</ion-title>
<ion-buttons slot="start">
<nav-buttons></nav-buttons>
@ -8,37 +8,36 @@
</ion-header>
<ion-content padding>
<ion-item>
<ion-label class="colBold requiredClass">{{ts.trPK('submitAbsence','absenceType')}} </ion-label>
<ion-item class='dynamicField'>
<ion-label position='floating' class="colBold requiredClass">{{ts.trPK('submitAbsence','absenceType')}} </ion-label>
<ion-select (ionChange)="calcDay()" okText="{{ts.trPK('general','ok')}}" cancelText="{{ts.trPK('general','cancel')}}" [(ngModel)]="absenceType" (ionChange)="onTypeAbsenceChange()" required>
<!-- let item of AbsenceType; let i=index; -->
<ion-select-option value= "{{item.ABSENCE_ATTENDANCE_TYPE_ID}}" *ngFor="let item of absenceTypeList; let i=index;">{{item.ABSENCE_ATTENDANCE_TYPE_NAME}} </ion-select-option>
</ion-select>
</ion-item>
<ion-item>
<ion-label class="colBold requiredClass">{{ts.trPK('submitAbsence','startDate')}} </ion-label>
<ion-item class='dynamicField'>
<ion-label position='floating' class="colBold requiredClass">{{ts.trPK('submitAbsence','startDate')}} </ion-label>
<ion-datetime (ionChange)="calcDay()" [(ngModel)]="startDate" min="1900" max="2100" displayFormat="MMM/DD/YYYY" placeholder="MM/DD/YYYY" required></ion-datetime>
</ion-item>
<ion-item *ngIf="hoursOrDay!='D'">
<ion-label class="colBold requiredClass">{{ts.trPK('submitAbsence','startTime')}} </ion-label>
<ion-item *ngIf="hoursOrDay!='D'" class='dynamicField'>
<ion-label position='floating' class="colBold requiredClass">{{ts.trPK('submitAbsence','startTime')}} </ion-label>
<ion-datetime displayFormat="HH:mm" [(ngModel)]="startTime" required></ion-datetime>
</ion-item>
<ion-item>
<ion-label class="colBold requiredClass">{{ts.trPK('submitAbsence','endDate')}}</ion-label>
<ion-item class='dynamicField'>
<ion-label position='floating' class="colBold requiredClass">{{ts.trPK('submitAbsence','endDate')}}</ion-label>
<ion-datetime (ionChange)="calcDay()" [(ngModel)]="endDate" min="1900" max="2100" displayFormat="MMM/DD/YYYY" placeholder="MM/DD/YYYY" required ></ion-datetime>
</ion-item>
<ion-item *ngIf="hoursOrDay!='D'">
<ion-label class="colBold requiredClass">{{ts.trPK('submitAbsence','endTime')}}</ion-label>
<ion-item *ngIf="hoursOrDay!='D'" class='dynamicField'>
<ion-label position='floating' class="colBold requiredClass">{{ts.trPK('submitAbsence','endTime')}}</ion-label>
<ion-datetime displayFormat="HH:mm" [(ngModel)]="endTime" required></ion-datetime>
</ion-item>
<ion-item>
<ion-item class='dynamicField'>
<ion-label class="colBold" >{{ts.trPK('submitAbsence','totalDays')}} </ion-label>
<ion-label end style="text-align: center;">{{totalDays}}</ion-label>
</ion-item>
<ion-item>
<ion-item class='dynamicField'>
<ion-input placeholder="{{ts.trPK('searchForReplacment','searchForReplacment')}}" type="text" [(ngModel)]="employeeSel">
</ion-input>
<button ion-button class="search-button" icon-only (click)="SearchReplacment()" clear type="button" item-end >
@ -46,8 +45,8 @@
</button>
</ion-item>
<ion-item>
<ion-label class="colBold">{{ts.trPK('submitAbsence','comments')}}</ion-label>
<ion-item class='dynamicField'>
<ion-label position='floating' class="colBold">{{ts.trPK('submitAbsence','comments')}}</ion-label>
<ion-textarea [(ngModel)]="absComments"></ion-textarea>
</ion-item>
<div id="dynamic-abs-container" >
@ -55,6 +54,6 @@
</ion-content>
<ion-footer>
<div class="centerDiv">
<ion-button color="customnavy" (click)="validateAbcenseTransaction()">{{ts.trPK('general','next')}}</ion-button>
<ion-button class="confirmEitOkButton" (click)="validateAbcenseTransaction()">{{ts.trPK('general','next')}}</ion-button>
</div>
</ion-footer>

@ -3,3 +3,21 @@
font-size: 25px;
color: #7F8C8D;
}
.header-toolbar-new{
--background: #22c6b3;
}
.confirmEitOkButton{
white-space: normal !important;
text-transform: capitalize !important;
min-height: 45px !important;
min-width: 5px !important;
margin: 8px !important;
--background: #22c6b3;
width: 80% !important;
color: white!important;
border-radius: 16px !important;
}

@ -26,6 +26,7 @@ import * as moment from "moment";
import {ReplacementListComponent} from "../../vacation-rule/replacement-list/replacement-list.component";
import {ReplacmentResponse} from "../models/replacment-response";
import { AbsenceResponse } from '../models/absence.response';
import { AbsenceReplacementListComponent } from '../absence-replacement-list/absence-replacement-list.component';
@Component({
selector: "app-submit-absence",
templateUrl: "./submit-absence.component.html",
@ -230,12 +231,13 @@ export class SubmitAbsenceComponent implements OnInit {
async SearchReplacment() {
const modal = await this.modalCtrl.create({
component: ReplacementListComponent
component: AbsenceReplacementListComponent,
backdropDismiss: false
});
modal.cssClass = 'replaceRoll-modal';
modal.onDidDismiss()
.then((data) => {
const user = data.data.empData;
const user = data.data;
console.log(data)
console.log(user);
if (data) {

@ -1,6 +1,6 @@
<ion-header >
<ion-toolbar class="header-toolbar">
<ion-toolbar class="header-toolbar-new">
<ion-title color="light"> {{ts.trPK('absenceList','attach')}}</ion-title>
<ion-buttons slot="start">
<nav-buttons></nav-buttons>

@ -0,0 +1,3 @@
.header-toolbar-new{
--background: #22c6b3;
}

@ -1,5 +1,5 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<ion-toolbar class="header-toolbar-new">
<ion-buttons slot="start">
<nav-buttons backLink=""></nav-buttons>
<!-- <ion-back-button color="light" class="btnBack" defaultHref="/eit/eit-list/" ></ion-back-button> -->
@ -22,7 +22,7 @@
<ion-footer>
<div class="centerDiv">
<ion-button class="footer-button" color="customnavy" ion-button (click)="validateEITTransaction()">
<ion-button class="addEitOkButton" color="customnavy" ion-button (click)="validateEITTransaction()">
{{'vacation-rule, next-label' | translate}}</ion-button>
</div>
</ion-footer>

@ -11,7 +11,7 @@ ion-label {
.daynamicForm-Label {
font-size: 16px;
color: var(--customnavy) !important;
color: #a2a5a6 !important;
display: block;
overflow: hidden;
-webkit-flex: 1;
@ -20,4 +20,20 @@ ion-label {
white-space: normal;
padding: 5px 0px;
margin: 10px auto;
padding-left: 10px;
}
.header-toolbar-new{
--background: #22c6b3;
}
.addEitOkButton{
white-space: normal !important;
text-transform: capitalize !important;
min-height: 45px !important;
min-width: 5px !important;
margin: 8px !important;
background-color: #22c6b3;
width: 80% !important;
color: white!important;
border-radius: 16px !important;
}

@ -1,19 +1,139 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<ion-toolbar class="header-toolbar-new">
<nav-buttons></nav-buttons>
<ion-title color="light">{{headerTitle}}</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
<!-------------------------------Start New design ---------------------------------------->
<ion-grid>
<ion-row style="margin-top: 20px;margin-left: 12px;">
<ion-col>
<div size="10" class="approvalTitle">{{'general, addAttach' | translate}}</div>
</ion-col>
<ion-col style="padding-left: 7%;" size="2">
<div class="fileDiv">
<input end class="inputfile" style="margin-top: 10px;z-index: 99999;position: absolute;opacity: 0;" type="file" ng2FileSelect [uploader]="uploader"
(change)="onFileSelected($event)" />
<label end for="file" class="attachLable">
<ion-icon style="font-size: 22px;" name="add"></ion-icon>
</label></div>
</ion-col>
</ion-row>
<ion-item class="attachmentDiv" *ngIf="attachListOver?.length == 0">
<ion-img style="height: 26px;width:100%;margin-top:12px" src="../assets/imgs/attach-icon.png"></ion-img>
<ion-label style="margin-top: -24px;" position="floating" class="boldTxtNav">{{ 'general, notAttch' | translate}}</ion-label>
</ion-item>
</ion-grid>
<ion-grid class="attachmentDiv" *ngIf="attachListOver?.length > 0">
<div *ngFor="let attachList of attachListOver ; let i = index">
<ion-row>
<ion-col size="1">
<ion-label style="color: black !important;">
{{attachList.AttachmentID +1 }} .
</ion-label>
</ion-col>
<ion-col style="text-align: left;" size="10">
<ion-label style="color: blue !important;" (click)="OpenAttachFiles(attachList.P_FILE_DATA,attachList.P_FILE_CONTENT_TYPE)">
{{attachList.P_FILE_NAME }}
</ion-label>
</ion-col>
<ion-col size="1">
<!-- <button float-end class="attachImgBtn"
(click)="OpenAttachFiles(attachList.P_FILE_DATA,attachList.P_FILE_CONTENT_TYPE)">
<img class="attachImg" src="../assets/imgs/view.png">
</button> -->
<button float-end [disabled]="attachList.isSuccess" class="attachImgBtn removeLable"
(click)="removeFile(attachList)">
<ion-icon style="font-size:22px;margin-left:-7px;margin-top:-2px;" name="close"></ion-icon>
</button>
</ion-col>
</ion-row>
</div>
</ion-grid>
<ion-grid *ngIf="attachmentRes?.length > 0">
<div *ngFor="let attachRes of attachmentRes">
<ion-row>
<ion-col col-8>
<div> <img float-start class="attachImg" src="../assets/imgs/file.png">
</div>
<ion-label>
{{attachRes.FILE_NAME }} </ion-label>
</ion-col>
<ion-col col-4>
<button float-end class="attachImgBtn"
(click)="OpenAttachFiles(attachRes.FILE_DATA,attachRes.FILE_CONTENT_TYPE)">
<img class="attachImg" src="../assets/imgs/view.png">
</button>
<button float-end [disabled]="!isResubmitEIT" class="attachImgBtn" (click)="delelteFile(attachRes)"><img
class="attachImg" src="../assets/imgs/deletegray.png"></button>
</ion-col>
<!-- <button [disabled]="!isResubmitEIT" class="iconButton" (click)="addAttachment(false,attachRes)"><img
class="imgSize" src="../assets/imgs/editIcon.png"></button>
<button (click)="delelteFile(attachRes)" class="iconButton" [disabled]="!isResubmitEIT"><img
class="imgSize" src="../assets/imgs/cancel.png"></button> -->
</ion-row>
</div>
</ion-grid>
<ion-card>
<ion-grid class="">
<div class="approvalTitle">{{'confirmAddEit, comment' | translate}}</div>
<ion-item class="submitNote" lines="none">
<!-- <ion-label position="floating" class="boldTxtNav">{{'confirmAddEit, comment' | translate}}</ion-label> -->
<ion-textarea type="text" [(ngModel)]="eitComments"></ion-textarea>
</ion-item>
</ion-grid>
<ion-grid class="approvalList">
<div class="approvalTitle">{{'confirmAddEit, approverList' | translate}}</div>
<div class="noDataDiv" *ngIf="approversList?.length == 0">
<p>{{ 'general, empty' | translate}}</p>
</div>
<div style="background-color: white;border-radius: 32px;border: 1px solid #c8c4c4;" *ngIf="approversList?.length > 0">
<ion-list class="notification-list ">
<div class="timeline">
<ion-item style="padding-left: 4%;" *ngFor="let employee of approversList">
<div class="timeline-item" slot="start">
<div class="timeline-thumb 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"
src="../assets/imgs/profile.png"> </div>
</div>
<ion-col>
<ion-label style="color:black !important ;font-weight: bold;padding-top: 0%;">
{{employee.APPROVER}}
</ion-label>
<ion-label style="color:black !important ;padding-top: 4%;">
{{employee.POSITION_TITLE}}
</ion-label>
</ion-col>
<div class="line"></div>
</ion-item>
</div>
</ion-list>
</div>
</ion-grid>
<!-------------------------------End New design ---------------------------------------->
<!-- <ion-card>
<ion-card-header class="boxHdr">
<div class="hrTitle">{{'confirmAddEit, approverList' | translate}}</div>
</ion-card-header>
<ion-card-content>
<!-- <ion-item class="itemAH" > -->
<ion-grid no-padding class=" gridAH" *ngIf="approversList?.length > 0">
<ion-row class="rowAH titleH" nowrap>
<ion-col size="1">
@ -32,14 +152,10 @@
<ion-label class="Header" for="">{{'confirmAddEit, status' | translate}}</ion-label>
</ion-col>
</ion-row>
<!-- </ion-grid>
</ion-item> -->
<!-- <ion-list *ngIf="approversList?.length > 0"> -->
<!-- <ion-item class="itemAH" *ngFor="let item of approversList" >
<ion-grid class=" gridAH"> -->
<ion-row class="rowAH" *ngFor="let item of approversList" nowrap>
<ion-col size="1">
<ion-label class="tbData" for="">{{item.APPROVER_ORDER_NUMBER}}</ion-label>
@ -58,9 +174,7 @@
</ion-col>
</ion-row>
</ion-grid>
<!-- </ion-item>
</ion-list> -->
</ion-card-content>
</ion-card>
@ -69,44 +183,7 @@
<ion-textarea type="text" [(ngModel)]="eitComments"></ion-textarea>
</ion-item>
<!-- <div padding *ngIf="attachmentRes?.length > 0 || attachListOver?.length > 0">
<p class="boldTxt"> {{"absenceList.attachList" | translate}}</p>
</div>
<div *ngIf="attachListOver?.length > 0">
<ion-row *ngFor="let attachList of attachListOver ; let i = index">
<ion-col col-8 (click)="OpenAttachFiles(attachList.P_FILE_DATA,attachList.P_FILE_CONTENT_TYPE)">
{{ attachList.P_FILE_NAME }}</ion-col>
<ion-col col-4>
<button [disabled]="attachList.isSuccess" class="iconButton" (click)="removeFile(attachList)"><img
class="imgSize" src="../assets/imgs/cancel.png"></button>
</ion-col>
</ion-row>
</div> -->
<!-- <div *ngIf="attachmentRes?.length > 0">
<ion-row *ngFor="let attachRes of attachmentRes">
<ion-col col-8 (click)="OpenAttachFiles(attachRes.FILE_DATA,attachRes.FILE_CONTENT_TYPE)">
{{ attachRes.FILE_NAME }}</ion-col>
<ion-col col-4>
<button [disabled]="!isResubmitEIT" class="iconButton" (click)="addAttachment(false,attachRes)"><img
class="imgSize" src="../assets/imgs/editIcon.png"></button>
<button (click)="delelteFile(attachRes)" class="iconButton" [disabled]="!isResubmitEIT"><img
class="imgSize" src="../assets/imgs/cancel.png"></button>
</ion-col>
</ion-row>
</div> -->
<div>
<ion-card>
@ -169,24 +246,21 @@
</ion-col>
<!-- <button [disabled]="!isResubmitEIT" class="iconButton" (click)="addAttachment(false,attachRes)"><img
class="imgSize" src="../assets/imgs/editIcon.png"></button>
<button (click)="delelteFile(attachRes)" class="iconButton" [disabled]="!isResubmitEIT"><img
class="imgSize" src="../assets/imgs/cancel.png"></button> -->
</ion-row>
</div>
</ion-grid>
</ion-card-content>
</ion-card>
</ion-card> -->
</div>
</ion-content>
<ion-footer>
<div class="centerDiv">
<ion-button class="footer-button" color="customnavy" ion-button (click)="startEitApproval()">
<ion-button class="confirmEitOkButton" color="customnavy" ion-button (click)="openSubmitModal()">
{{ (isDelete ? 'general, delete' : 'general, submit') | translate }}</ion-button>
</div>
</ion-footer>

@ -24,3 +24,220 @@
background: transparent;
float: right;
}
.attachmentDiv{
background: #ffffff;
height: auto;
text-align: center;
padding-top: 1px;
margin: 10px;
border-radius: 15px;
border: 1px solid grey;
}
.noDataDiv{
background: #ffffff;
height: 11%;
text-align: center;
padding-top: 1px;
border-radius: 10px;
margin: 10px;
border-radius: 5px;
}
.submitNote{
background: #ffffff;
height: 80px;
padding-top: 1px;
margin: 10px;
border-radius: 15px;
border: 1px solid grey;
}
.approvalList{
--background: #f0efef;
height: auto;
text-align: center;
padding-top: 1px;
border-radius: 10px;
margin: 10px;
border-radius: 5px;
}
/************************New Design**********************************/
.notification-list{
background: none;
background: none;
border-radius: 32px;
ion-item{
// margin-top: 5px;
// margin-bottom: 5px;
background-color: transparent;
.item-date{
width: 100%;
font-size: 16px;
font-weight: bold;
text-align: start;
padding: 0;
margin: 0;
position: absolute;
left: 0;
top: 12%;
}
ion-label , [item-end]{
white-space: normal;
font-size: 14px;
padding-top: 15%;
// :root[dir="ltr"]{
// margin-left: 10px;
// }
// :root[dir="rtl"]{
// margin-right: 10px;
// }
}
}
}
.timeline {
position: relative;
margin: 15px 0 0 0;
// border-bottom: solid 1px var(--cusgray);
}
.timeline:before {
content: '';
position: inherit !important;
top: 0;
bottom: 0;
width: 4px;
// background: #e4e4e4;
z-index: 1;
left: 35px;
/* margin-left: -10px; */
/* z-index: 1; */
}
.timeline .timeline-thumb {
border-radius: 500px;
width: 70px !important;
z-index: 2;
position: absolute;
left: 0px;
// :root[dir="ltr"]{
// left: 37px;
// }
// :root[dir="rtl"]{
// right: 37px;
// }
float: right;
top: 9px;
}
.timeline .timeline-thumb.timeline-icon {
height: 70px;
// text-align: center;
// color: white;
// border: 5px solid #CBD0D3;
// transform: scale(0.2);
}
.timeline .timeline-item {
width: 40px;
}
.timeline .timeline-stats {
position: relative;
font-size: 12px;
color: var(--darkgray);
}
.empImge{
border-radius: 50%;
width:100%;
height: 100%;
border: #dedede solid 1px;
}
.empImgeRep {
border-radius: 50% !important;
width: 80px;
height: 80px;
border: #dedede solid 1px;
}
.line{
padding-bottom:87px;
}
.attachLable{
position: absolute;
top: 0px;
z-index: 0;
background: #30b8c6;
color: #fff;
border-radius: 50%;
border: 0px;
width: 24px;
height: 24px;
text-align: center;
font-size: 5px;
}
.removeLable{
top: 0px;
z-index: 0;
background: #d8252d;
color: #fff;
border-radius: 50%;
border: 0px;
width: 20px;
height: 20px;
text-align: center;
font-size: 5px;
}
.note-modal {
// width: 90%;
// height: 50%;
// top: 20%;
// left: 5%;
// right: 5%;
// bottom: 5%;
background: rgba(0, 0, 0, 0.5) !important;
padding: 30% 10% !important;
--height: 12cm !important;
// --width: 80% !important;
--border-radius:20px;
}
.header-toolbar-new{
--background: #22c6b3;
}
.confirmEitOkButton{
white-space: normal !important;
text-transform: capitalize !important;
min-height: 45px !important;
min-width: 5px !important;
margin: 8px !important;
background-color: #22c6b3;
width: 80% !important;
color: white!important;
border-radius: 16px !important;
}

@ -12,6 +12,8 @@ import { CommonService } from 'src/app/hmg-common/services/common/common.service
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { EitService } from '../services/eit.service';
import { AddEitResponse } from '../models/add.eit.response';
import { FileUploader } from 'ng2-file-upload';
import { SubmitEitModalComponent } from '../submit-eit-modal/submit-eit-modal.component';
@Component({
selector: 'app-confirm-add-eit',
@ -46,6 +48,20 @@ export class ConfirmAddEitComponent implements OnInit {
isSubmitBtnClicked: boolean;
isDelete: boolean = false;
/***Add Attchment Vars */
isUpload: boolean = false;
inQueue: boolean = false;
addAttachmentListReq: any;
attachmentID: number = 0;
addAttachRequest: any = [];
fileData: any;
fileType: any;
dirPage: any;
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'];
constructor(public modalController: ModalController, public cs: CommonService, private ts: TranslatorService, private eitService: EitService) {
this.isSubmitBtnClicked = false;
this.eitRequest = new EitRequest();
@ -277,6 +293,37 @@ export class ConfirmAddEitComponent implements OnInit {
return await modal.present();
}
/*****submit modal********/
async openSubmitModal() {
this.cs.sharedService.setSharedData( this.attachListOver, 'submitAttachmentList');
this.cs.sharedService.setSharedData(this.eitComments, 'eitComments');
const modal = await this.modalController.create({
component: SubmitEitModalComponent,
backdropDismiss: false,
});
modal.cssClass = 'note-modal';
modal.onDidDismiss()
.then((data) => {
console.log(data.data);
if (data.data == "cancel" || data.data == undefined) {
return;
} else {
this.startEitApproval();
}
});
return await modal.present();
}
removeFile(objectitem) {
@ -413,4 +460,100 @@ export class ConfirmAddEitComponent implements OnInit {
this.cancelEitProcess();
}
/*******************Add attchement Functions*************/
public uploader: FileUploader = new FileUploader({
allowedMimeType: ['application/pdf', 'image/jpeg', 'image/png', 'text/plain', 'image/jpg', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'],
maxFileSize: 10 * 1024 * 1024,
formatDataFunctionIsAsync: true,
formatDataFunction: async (item) => {
return new Promise((resolve, reject) => {
resolve({
name: item._file.name,
length: item._file.size,
contentType: item._file.type,
date: new Date()
});
});
}
});
onFileSelected(input) {
// this.uploader.onWhenAddingFileFailed = function (item: any, filter: any, options: any){
if (!(this.filterAllowedType.indexOf(input.target.files[0].type) > -1)) {
let msg: string = "";
msg = this.ts.trPK("general", "notSupport");
this.cs.presentAlert(msg);
return
} // todo: show alert that you tried uploading wrong files
else {
const file = input.target.files[0];
// console.log(file);
//var encoded = Base64.encode(file);
this.getBase64(file).then(
data => this.pushObject(data, file.name, file.type)
);
// }
// };
}
}
getBase64(file) {
return new Promise((resolve, reject) => {
const reader = new FileReader();
reader.readAsDataURL(file);
reader.onload = () => resolve(reader.result);
reader.onerror = error => reject(error);
});
}
pushObject(fileData, name, type) {
console.log("before push: "+ this.index);
//this.attachListOver.length++;
try {
let array = name.split('.');
let attachType: string = array[array.length - 1];
this.attachListOver.push(
{
AttachmentID: this.attachListOver.length,
P_FILE_CONTENT_TYPE: attachType,//type.split('/')[1],
P_FILE_DATA: fileData.split(',')[1],
P_FILE_NAME: name,//.split('.')[0],
P_TRANSACTION_ID: this.P_TransactionID
})
} catch (e) {
}
//console.log("after push: "+ this.index);
// return this.addAttachRequest
}
// removeFile(objectitem) {
// let objIndex1 = this.uploader.queue.findIndex(item => item == objectitem);
// this.uploader.queue.splice(objIndex1, 1);
// let objIndex = this.addAttachRequest.findIndex(item => item.AttachmentID == objectitem.AttachmentID);
// this.addAttachRequest.splice(objIndex, 1);
// // this.addAttachRequest =this.addAttachRequest.filter(item => item.AttachmentID !== objectitem.AttachmentID);
// }
}

@ -1,15 +1,116 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<ion-buttons slot="start">
<!-- <ion-back-button color="light" class="btnBack" defaultHref="/eit/homepage" ></ion-back-button> -->
<nav-buttons backLink=""></nav-buttons>
</ion-buttons>
<ion-title color="light">{{headerTitle}}</ion-title>
</ion-toolbar>
<ion-toolbar class="header-toolbar-new">
<nav-buttons [enableMenu]="false" [enableBack]="true" [navigate]="true"></nav-buttons>
<ion-title style="color: white;">{{headerTitle}}</ion-title>
</ion-toolbar>
</ion-header>
<ion-content padding>
<ion-content>
<div class="">
<!-- class="colorBG" -->
<div class="content" [hidden]="functionName!='HMG_TKT_NEW_EIT_SS'">
<ion-grid class="headerGrid">
<p class="title">{{ts.trPK('absenceList','tickets-balance')}}</p>
<div style="color: black;">
<div class="result-graph">
<p-chart #chart class="today-graph" type="doughnut" [data]="data" [options]="options"></p-chart>
<div>
<ion-row>
<ion-col class="col" size="4">
<div class="light-dote"></div>
<!-- </ion-col>
<ion-col> -->
<label class="light-label">{{ts.trPK('absenceList','adult')}}</label>
</ion-col>
<ion-col class="col" size="4">
<div class="blue-dote"></div>
<!-- </ion-col>
<ion-col> -->
<label class="blue-label">{{ts.trPK('absenceList','child')}}</label>
</ion-col>
<ion-col class="col" size="4">
<div class="green-dote"></div>
<!-- </ion-col>
<ion-col> -->
<label class="green-label">{{ts.trPK('absenceList','infants')}} </label>
</ion-col>
</ion-row>
</div>
</div>
</div>
</ion-grid>
</div>
<!-- ///////////////////////////////////////////////// -->
<ion-grid [hidden]="functionName!='HMG_TKT_NEW_EIT_SS'" >
<div class="gridService">
<ion-row>
<ion-col class="columns">
<div class="adult-dote"></div>
<label>{{ts.trPK('absenceList','adult')}}</label>
<br>
<br>
<label class="service">{{accrualNetAdult}}</label>
<br> <label class="services">{{ts.trPK('absenceList','tickets')}}</label>
</ion-col>
<ion-col class="columns">
<div class="child-dote"></div>
<label>{{ts.trPK('absenceList','child')}} </label>
<br>
<br>
<label class="service">{{accrualUNetChild}}</label>
<br> <label class="services">{{ts.trPK('absenceList','tickets')}}</label>
</ion-col>
<ion-col class="columns">
<div class="infants-dote"></div>
<label>{{ts.trPK('absenceList','infants')}} </label>
<br>
<br>
<label class="service">{{accrualNetInfants}}</label>
<br> <label class="services">{{ts.trPK('absenceList','tickets')}}</label>
</ion-col>
</ion-row>
</div>
</ion-grid>
<!--
<ion-grid class="three-grid">
<ion-row>
<ion-col >
infants
</ion-col>
<ion-col >2</ion-col>
<ion-col >tickit</ion-col>
</ion-row>
<ion-row>
<ion-col >
child
</ion-col>
<ion-col >2</ion-col>
<ion-col >tickit</ion-col>
</ion-row>
<ion-row>
<ion-col >
adult
</ion-col>
<ion-col >2</ion-col>
<ion-col >tickit</ion-col>
</ion-row>
</ion-grid> -->
<!-- //////////////////////////////////////////////////// -->
<!-- <ion-content padding> -->
<div *ngIf="eitAddedList && eitAddedList.length > 0 ">
<ion-card *ngFor="let eitAddedObj of eitAddedList; let i=index ">
@ -63,9 +164,9 @@
<!-- <no-data *ngIf="!getResEITTransactionList || getResEITTransactionList[0]?.Collection_Transaction.length <= 0" txt="{{'general.noData' | translate}}"></no-data> -->
<div *ngIf="getResEITTransactionList && getResEITTransactionList[0]?.Collection_Transaction.length > 0 ">
<!-- <div> -->
<ion-card *ngFor="let EITTransactionList of getResEITTransactionList; let i=index ">
<div *ngFor="let EITTransactionList of getResEITTransactionList; let i=index ">
<ion-card-header class="boxHdr">
<!-- <ion-card-header class="boxHdr">
<div class="hrTitle">{{this.headerTitle}}</div>
<button ion-button (click)="deleteEIT(i)"
@ -74,48 +175,65 @@
<button ion-button *ngIf="getPassMnuEntryObj.UPDATE_BUTTON == 'Y' && EITTransactionList.statusID!=2"
(click)="updateEITRrq(i)">
<img class="imgSize" src="../assets/imgs/edit.png"></button>
</ion-card-header>
<ion-card-content>
</ion-card-header> -->
<!-- <ion-card-content> -->
<ion-grid>
<div>
<ion-row>
<!-- <ion-row>
<ion-col class="colBold">
<label for="">status</label>
</ion-col>
<ion-col>
<label for="">{{EITTransactionList.status}}</label>
</ion-col>
</ion-row>
</ion-row> -->
</div>
<ion-grid class="grids">
<div *ngFor="let item of EITTransactionList.Collection_Transaction">
<ion-row *ngIf="item.DISPLAY_FLAG != 'N' ">
<!-- <ion-row *ngIf="item.DISPLAY_FLAG != 'N' ">
<ion-col class="colBold">
<label for="">{{item.SEGMENT_PROMPT}}</label>
</ion-col>
<ion-col>
<label for="">{{item.SEGMENT_VALUE_DSP}}</label>
</ion-col>
</ion-row>
</ion-row> -->
<ion-row class="">
<ion-col class="" *ngIf="item.SEGMENT_PROMPT!=''">
<label style="color:#094875;font-weight: bold;" class="label" for="">{{item.SEGMENT_PROMPT}} </label>
<br>
<label class="label" style="color:black;" for="">{{item.SEGMENT_VALUE_DSP}} </label>
<br>
<hr style="background-color: grey;height: 1px">
</ion-col>
</ion-row>
</div>
</ion-grid>
</ion-card-content>
</ion-card>
</ion-grid>
<!-- </ion-card-content> -->
</div>
<div>
</div>
</div>
<ion-icon class="addClass" name="add" (click)="addEITRrq()"></ion-icon>
<ion-infinite-scroll (ionInfinite)="doInfinite($event)">
<ion-infinite-scroll-content></ion-infinite-scroll-content>
</ion-infinite-scroll>
</div>
</ion-content>
<ion-footer>
<div class="centerDiv">
<!-- <button *ngIf="getPassMnuEntryObj.ADD_BUTTON == 'Y'" ion-button (click)="addEITRrq()">{{'requestEit.add'
| translate}} </button> -->
<ion-button class="footer-button" color="customnavy" ion-button (click)="addEITRrq()">
{{'general, add' | translate}}</ion-button>
<!-- <ion-button class="footer-button" color="customnavy" ion-button (click)="addEITRrq()">
{{'general, add' | translate}}</ion-button> -->
</div>
</ion-footer>

@ -9,3 +9,256 @@ h4 {
text-align: center;
color: #000000;
}
.grids{
border-radius: 20px !important;
background: white;
padding-left: 1px;
padding-right: 1px;
margin: 13px;
padding-top: 0px;
padding-bottom: 3px;
padding-left: 13px;
padding-right: 13px;
border: 1px solid #cac8c8;
}
.bgcolor {
color: white;
border-top-right-radius: 19px;
border-top-left-radius: 15px;
padding-top: 1;
padding-bottom: 0;
margin-top: 0;
margin-bottom: 0;
/* border-radius: 12px !important; */
background: #094875;
border-bottom: 1px solid #a7a4a4;
border-top: 1px solid #cac8c8;
margin-left: -13px;
margin-right: -13px;
}
.colEit{
border-right: 1px solid #cac8c8;
border-bottom-left-radius: -10px !important;
padding-top: 8px;
padding-bottom: 8px;
margin-left: 18px;
font-size: 12px !important;
}
.header-div {
background-color: #22C6B3;
text-transform: capitalize;
height: 160px;
// position: relative;
display: block;
margin-bottom: -28px;
}
.header-toolbar-new{
--background: #22c6b3;
}
.addClass{
background-color: #094875;
width: 80px;
height: 80px;
right: 8%;
position: fixed;
color: white;
bottom: 20%;
border-radius: 50%;
z-index: 999;
-webkit-box-shadow: 2px -1px 13px 0px rgba(0,0,0,0.59);
-moz-box-shadow: 2px -1px 13px 0px rgba(0,0,0,0.59);
box-shadow: 2px -1px 13px 0px rgba(0,0,0,0.59);
}
.hrClass{
border-width: 0;
box-sizing: content-box;
border-bottom: 1px solid #e6e6e6;
background: #fff !important;
height: 1px;
}
////////////////////////////////
.content:before {
position: absolute;
content: "";
background: #22c6b3;
height: 140px;
width: 100%;
left: 0;
top: 0px;
z-index: 1;
}
.colorBG{
--background: #f0efef;
}
.Title{
text-align: center;
color: white;
margin-top: -33px;
font-size: 17px;
}
.title{
text-align: center;
color: black;
margin-top: 5px;
font-size: 17px;
}
.today-graph{
display: block !important;
height: 196px;
width: 365px;
/* padding-left: 51px; */
margin-left: 28px !important;
}
.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;
/* padding-top: 28px; */
padding-bottom: 53px;
padding-top: -30px;
margin-left: 13px;
margin-right: 13px;
/* 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{
font-size: 15px !important;
margin-left: 7px !important;
margin-right: 42px;
}
.blue-label{
font-size: 15px !important;
margin-left: 7px !important;
margin-right: 13px;
}
.light-label{
font-size: 15px !important;
margin-left: 7px !important;
margin-right: -26px;
}
.light-dote{
background-color: #3CB9D5;
width: 12px;
height: 12px;
border-radius: 50% !important;
display: inline-block;
}
.blue-dote{
background-color: #22C6B3;
width: 12px;
height: 12px;
border-radius: 50% !important;
display: inline-block;
}
.green-dote{
background-color: #1FA269;
width: 12px;
height: 12px;
border-radius: 50% !important;
display: inline-block;
margin-right: -1px;
}
.col{
text-align: right;
}
.gridService{
/* margin-top: 87px; */
border-radius: 10px;
/* margin-bottom: -49px; */
margin-left: 14px;
margin-right: 14px;
}
.columns{
margin: 3px;
margin-bottom: 13px;
background: white;
border-radius: 27px;
padding-left: 30px;
padding-right: 6px;
padding-top: 19px;
padding-bottom: 8px;
border: 1px solid #cac8c8 !important;
}
.service{
font-size: 22px;
color: black;
letter-spacing: 1px;
font-weight: bold;
}
.services{
font-size: 12px;
color: black;
}
.adult-dote{
background-color: #3CB9D5;
width: 15px;
height: 15px;
border-radius: 50% !important;
display: inline-block;
margin-left: -17px;
margin-right: 5px;
}
.child-dote{
background-color: #22C6B3;
width: 15px;
height: 15px;
border-radius: 50% !important;
display: inline-block;
margin-left: -17px;
margin-right: 5px;
}
.infants-dote{
background-color: #1FA269;
width: 15px;
height: 15px;
border-radius: 50% !important;
display: inline-block;
margin-left: -17px;
margin-right: 5px;
// margin-bottom: 6px;
}

@ -40,6 +40,20 @@ export class EitListComponent implements OnInit {
private selectedIndex: number;
private pAction: number = 0;
public headerTitle: string = "";
data: any;
accrualNetInfants: any;
accrualUNetChild: any;
accrualNetAdult: any;
public options = {
cutoutPercentage: 80,
tooltips: { enabled: false },
legend: { display: false }};
gaugeType = "full";
accrualBalancesList: any;
common: any;
// gaugeValue = 11.200;
// gaugeLabel = "";
constructor(private cs: CommonService, private EITService: EitService, private ts: TranslatorService, private modalCtrl: ModalController) {
this.selMenu = this.cs.sharedService.getSharedData(MenuResponse.SHARED_DATA, false);
@ -49,6 +63,7 @@ export class EitListComponent implements OnInit {
this.menuType = this.selMenu.List_Menu.MENU_TYPE;
this.transactionNo = 0;
this.functionName = this.getPassMnuEntryObj.FUNCTION_NAME;
console.log("fN>>>>>>>>>>>>>>>>>"+this.functionName);
this.headerTitle = this.selMenu.GetMenuEntriesList.PROMPT;
this.validEitTransactionTbl = [];
this.P_PAGE_NUM = 1;
@ -57,6 +72,27 @@ export class EitListComponent implements OnInit {
ngOnInit() {
this.getEITTransactions();
this.accrualBalancesList = this.cs.sharedService.getSharedData('tickitsbalance', false);
// accrualNetInfants
// accrualUNetChild
// accrualNetAdult
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: [
{ data: [this.accrualNetInfants, this.accrualUNetChild, this.accrualNetAdult],
backgroundColor: [
'#1FA269',
'#22C6B3',
'#3CB9D5',],
borderWidth: 2
}
]
};
}
getEITTransactions() {
@ -334,7 +370,7 @@ export class EitListComponent implements OnInit {
// this.P_TransactionID=result.SubmitEITTransactionList.P_TRANSACTION_ID;
// this.sharedData.setSharedData(result,AddEitResponse.SHARED_DATA);
// // this.sharedData.setSharedData(result.SubmitEITTransactionList.P_TRANSACTION_ID,"TransactionIDResubmit");
// //this.cs.sharedService.setSharedData(result.SubmitEITTransactionList.P_TRANSACTION_ID,"TransactionIDResubmit");
// // this.sharedData.setSharedData(this.eitRequest,EitRequest.SHARED_DATA);
this.cs.sharedService.setSharedData({ isResubmit: false, isDelete: this.isDelete }, 'confirmAddEITData')
this.cs.openConfirmEitPage();
@ -455,4 +491,6 @@ export class EitListComponent implements OnInit {
this.eitAddedList = list;
this.removeItems(item.Collection_Transaction[0].TRANSACTION_NUMBER);
}
}

@ -13,6 +13,7 @@ import { EitListComponent } from './eit-list/eit-list.component';
import { DatePicker } from '@ionic-native/date-picker/ngx';
import { WorkListAttachViewComponent } from '../notification/work-list-attach-view/work-list-attach-view.component';
import { EitUpdateListComponent } from './eit-update-list/eit-update-list.component';
import { SubmitEitModalComponent } from './submit-eit-modal/submit-eit-modal.component';
const routes: Routes = [
@ -43,6 +44,10 @@ const routes: Routes = [
{
path: 'eit-update-list',
component: EitUpdateListComponent
},
{
path: 'eit-submit-modal',
component: SubmitEitModalComponent
}
]
}
@ -63,7 +68,8 @@ const routes: Routes = [
AddEitComponent,
ConfirmAddEitComponent,
AddAttachComponent,
EitUpdateListComponent
EitUpdateListComponent,
SubmitEitModalComponent
],
entryComponents: [
WorkListAttachViewComponent

@ -1,5 +1,5 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<ion-toolbar class="header-toolbar-new">
<ion-title color="light">{{headerTitle}}</ion-title>
<ion-buttons slot="start">
<nav-buttons backLink=""></nav-buttons>
@ -10,34 +10,40 @@
<ion-content padding>
<ion-list>
<ion-item lines="none" class="custCollabs ion-item-styling" *ngFor="let menuItem of menu; let i=index"
<ion-content>
<ion-list style="margin-top: 40px;border-top: 1px solid #c8c8c8;">
<ion-item lines="none" class="custCollabs ion-item-styling" *ngFor="let menuItem of menu.children; let i=index"
(click)="openPage(menuItem, i);">
<ion-row>
<ion-row style="width: 100%;">
<!-- Parent Pages -->
<ion-col size="12" class="menu-name">
<ion-col size="12" class="">
<div [ngClass]="{'selectedDiv': selectedMenu == i,'notSelected': selectedMenu != i }">
<ion-text>
<b>{{menuItem.PROMPT}}</b>
</ion-text>
<ion-label>
<b text-wrap>{{menuItem.PROMPT}}</b>
<ion-icon style="float: right;font-size: 25px;color: grey;" name="arrow-forward"></ion-icon>
</ion-label>
</div>
<!-- Child Pages -->
<ion-list [hidden]="selectedMenu != i">
<ion-item lines="none" class="childItem" *ngFor="let subPage of menuItem.children;let i2=index" text-wrap
<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="12" class="menu-name"><span ion-text color="color2">&nbsp;{{subPage.PROMPT}}</span>
</ion-col>
</ion-row>
<!-- <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 style="float: right;font-size: 25px;color: grey;" 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-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>
</ion-content>

@ -4,16 +4,16 @@ ion-item.custCollabs.item.item-block.item-ios {
}
.ion-item-styling {
-webkit-box-shadow: 0px 2px 7px 0px #7f8c8d;
-moz-box-shadow: 0px 2px 7px 0px #7f8c8d;
box-shadow: 0px 2px 7px 0px #7f8c8d;
color: #209a83 !important;
border: 0px;
border-radius: 5px;
color: black;
line-height: 2;
margin: 8px 2px;
min-height: 40px;
background-color: #ffffff;
border-bottom: 1px solid #c8c8c8;
}
.header-toolbar-new{
--background: #22c6b3;
}
ion-item.item.item-block {

@ -21,7 +21,7 @@ export class HomeComponent implements OnInit {
this.menu = this.cs.sharedService.getSharedData('menuEntries', false);
this.selMenu = this.cs.sharedService.getSharedData(MenuResponse.SHARED_DATA, false);
const title: string = this.ts.trPK('eit', 'my-requests');
this.headerTitle = this.selMenu.List_Menu.MENU_NAME ? this.selMenu.List_Menu.MENU_NAME : title;
this.headerTitle = this.menu.PROMPT ? this.menu.PROMPT : title;
}
ngOnInit() { }
@ -40,6 +40,7 @@ export class HomeComponent implements OnInit {
this.selectedMenu = index;
}
}
console.log("selected>>>>>>>"+this.selectedMenu);
}
goToRequest(menuEntry) {

@ -0,0 +1,39 @@
<ion-content padding>
<!--
<ion-col col-1
style="margin-right: -22px;margin-top: -10px;">
<ion-button class="closeIcon" (click)="closeModal()">
<img src="../assets/imgs/close.png">
</ion-button>
</ion-col> -->
<h2><div class="Header">Confirmation</div></h2>
<div>
<div *ngIf="submitAttachmentList.length==0" class="labelcheck" lines="none" style="text-align: center;">
No Attachment
</div>
<div *ngIf="eitComments==''" class="labelcheck" style="text-align: center;margin-bottom: 5px;padding-bottom: 16px;">
No Note
</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-button class="submitOkButton" (click)="OkBtnModal()"> {{ts.trPK('general','ok')}}
</ion-button>
</ion-row>
<ion-row class="rowBtn">
<ion-button class="submitCancelButton" (click)="closeModal()"> {{ts.trPK('general','cancel')}}
</ion-button>
</ion-row>
</ion-footer>
</ion-content>

@ -0,0 +1,53 @@
.rowBtn{
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}
.Header{
color: black !important;
font-size: 25px !important;
font-weight: bold !important;;
margin: 0;
text-align: center;
margin-bottom: 20px;
}
.labelRadio{
color: black !important;
font-weight: bold !important;
padding-bottom: 20px;
}
.labelcheck{
color: red !important;
font-weight: bold !important;
margin-bottom: 10px;
}
.submitOkButton{
white-space: normal !important;
text-transform: capitalize !important;
min-height: 45px !important;
min-width: 5px !important;
margin: 8px !important;
--background:: #22c6b3;
width: 100% !important;
color: white!important;
border-radius: 16px !important;
}
.submitCancelButton{
white-space: normal !important;
text-transform: capitalize !important;
min-height: 45px !important;
min-width: 5px !important;
margin: 8px !important;
--background:: #094875;
width: 100% !important;
color: white!important;
border-radius: 16px !important;
}

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

@ -0,0 +1,36 @@
import { Component, OnInit } from '@angular/core';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { ModalController } from '@ionic/angular';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
@Component({
selector: 'app-submit-eit-modal',
templateUrl: './submit-eit-modal.component.html',
styleUrls: ['./submit-eit-modal.component.scss'],
})
export class SubmitEitModalComponent implements OnInit {
submitAttachmentList :any =[];
eitComments: string;
constructor( private ts: TranslatorService,private modalCtrl: ModalController, private cs: CommonService){
this.submitAttachmentList = this.cs.sharedService.getSharedData('submitAttachmentList', false);
this.eitComments = this.cs.sharedService.getSharedData('eitComments', false);
}
ngOnInit() {
console.log("modal");
//this.actionBtns = this.cs.sharedService.getSharedData("passActionMore" , false);
console.log("modal");
}
closeModal() {
this.modalCtrl.dismiss();
}
OkBtnModal() {
let data = "ok";
this.modalCtrl.dismiss(data);
}
}

@ -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'
@ -125,7 +125,7 @@ import { CardFilterComponent} from './ui/card-filter/card-filter.component';
PdfViewerModule,
NgCircleProgressModule.forRoot(),
ChartModule,
NgxGaugeModule
// NgxGaugeModule
],
declarations: [
FabButtonComponent,
@ -243,7 +243,7 @@ import { CardFilterComponent} from './ui/card-filter/card-filter.component';
FileUploderProfileComponent,
AccordinTabCustomComponent,
AccordinCustomComponent,
NgxGaugeModule,
// NgxGaugeModule,
StatsButtonComponent,
ServicesButtonComponent,
ConfirmLoginComponent,

@ -1172,6 +1172,9 @@ public getMonthNameAr(value: number): string {
public openWorklistMainMRPage() {
this.nav.navigateForward(['/notification/worklist-main-MR']);
}
public openWorklistITGPage() {
this.nav.navigateForward(['/notification/worklist-main-ITG']);
}
public openMySpecialistPage() {
this.nav.navigateForward(['/my-specialist/home']);
}

@ -1,6 +1,6 @@
<div feedback class="custom-button">
<div class="iconBox">
<img [src]="icon" class="icon">
<img [src]="'data:image/png;base64,'+icon" class="icon">
</div>
<div class="titleBox">
<p class="pClass">{{title}}</p>

@ -6,6 +6,7 @@ import { HmgCommonModule } from '../hmg-common/hmg-common.module';
import { IonicModule } from '@ionic/angular';
import { HomePage } from './home.page';
import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';
import { WorklistMainService } from '../notification/service/work-list.main.service';
const routes: Routes = [
{
@ -26,7 +27,8 @@ const routes: Routes = [
HomePage
],
providers: [
BarcodeScanner
BarcodeScanner,
WorklistMainService
]
})
export class HomePageModule { }

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

@ -1,47 +1,48 @@
import { EitService } from './../eit/services/eit.service';
import { Component, OnInit } from '@angular/core';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { MenuController, Events, ActionSheetController } from '@ionic/angular';
import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service';
import { AuthenticatedUser } from 'src/app/hmg-common/services/authentication/models/authenticated-user';
import { MenuService } from 'src/app/hmg-common/services/menu/menuservice.service';
import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { Geolocation } from '@ionic-native/geolocation/ngx';
import { ZBar, ZBarOptions } from '@ionic-native/zbar/ngx';
import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';
import { Device } from '@ionic-native/device/ngx';
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 { 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 { 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 { AccrualService } from '../accrual-balances/services/accrual.service';
import { EitService } from "./../eit/services/eit.service";
import { Component, OnInit } from "@angular/core";
import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service";
import { MenuController, Events, ActionSheetController } from "@ionic/angular";
import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service";
import { AuthenticatedUser } from "src/app/hmg-common/services/authentication/models/authenticated-user";
import { MenuService } from "src/app/hmg-common/services/menu/menuservice.service";
import { MenuResponse } from "src/app/hmg-common/services/menu/models/menu-response";
import { CommonService } from "src/app/hmg-common/services/common/common.service";
import { Geolocation } from "@ionic-native/geolocation/ngx";
import { ZBar, ZBarOptions } from "@ionic-native/zbar/ngx";
import { BarcodeScanner } from "@ionic-native/barcode-scanner/ngx";
import { Device } from "@ionic-native/device/ngx";
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 { 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 { 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 { AccrualService } from "../accrual-balances/services/accrual.service";
import { WorklistMainService } from "../notification/service/work-list.main.service";
@Component({
selector: 'app-home',
templateUrl: './home.page.html',
styleUrls: ['./home.page.scss']
selector: "app-home",
templateUrl: "./home.page.html",
styleUrls: ["./home.page.scss"]
})
export class HomePage implements OnInit {
userData: any = {};
userImage: any = '../assets/imgs/profile.png';
userImage: any = "../assets/imgs/profile.png";
menuList: any = [];
zbarOptions: any;
scannedResult: any;
@ -53,36 +54,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: "Work List",
statsValue: 0,
icon: 'assets/icon/new-design/work_list.png',
link: '/notification/homepage'
icon: "assets/icon/new-design/work_list.png",
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: "Missing Swipes",
statsValue: 0,
icon: 'assets/icon/new-design/missing_swipe.png',
link: ''
icon: "assets/icon/new-design/missing_swipe.png",
link: "2"
},
{
title: 'Leave Balance',
title: "Leave Balance",
statsValue: 0,
icon: 'assets/icon/new-design/leave_balance.png',
link: ''
icon: "assets/icon/new-design/leave_balance.png",
link: "3"
},
{
title: 'Ticket Balance',
title: "Ticket Balance",
statsValue: 0,
icon: 'assets/icon/new-design/ticket_balance.png',
link: ''
icon: "assets/icon/new-design/ticket_balance.png",
link: "4"
}
];
@ -106,8 +110,8 @@ export class HomePage implements OnInit {
// ];
public slideOptsOne = {
slidesPerView: 3.5,
spaceBetween: 10
slidesPerView: 3.5,
spaceBetween: 10
};
public slideOptsTwo = {
slidesPerView: 3.2,
@ -122,6 +126,8 @@ export class HomePage implements OnInit {
public displayTime: any;
public menuEntries: any;
public percent: any;
accrualBalancesList: any;
public countAllNotification: number = 0;
constructor(
public ts: TranslatorService,
@ -143,17 +149,19 @@ export class HomePage implements OnInit {
private file: File,
private permissions: DevicePermissionsService,
public DS: DashboredService,
public accrualService: AccrualService
public accrualService: AccrualService,
public workListService: WorklistMainService
) {
this.events.subscribe('img-change', displayImg => {
this.userImage = this.sanitizer.bypassSecurityTrustUrl('data:Image/*;base64,' + displayImg);
console.log('html saved img: ' + this.userImage);
this.events.subscribe("img-change", 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;
@ -161,20 +169,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;
@ -184,11 +192,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 {
@ -200,66 +213,71 @@ 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);
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();
return hoursString + ':' + minutesString + ':' + secondsString;
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();
return hoursString + ":" + minutesString + ":" + secondsString;
}
getDeviceLocation() {
const isVirtual = this.device.isVirtual;
if (isVirtual === true){
alert('emulater>>>>>>>' + isVirtual);
alert('You are using virtual device');
if (isVirtual === true) {
alert("emulater>>>>>>>" + isVirtual);
alert("You are using virtual device");
return false;
}
this.permissions.requestLocationAutherization().then(granted => {
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;
this.attendance();
})
.catch(error => {
console.log('Error getting location', error);
console.log("Error getting location", error);
});
} else {
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() {
@ -270,7 +288,7 @@ export class HomePage implements OnInit {
this.longt = resp.coords.longitude;
})
.catch(error => {
console.log('Error getting location', error);
console.log("Error getting location", error);
});
}
@ -279,324 +297,394 @@ export class HomePage implements OnInit {
}
private getUserDetails() {
this.authService
.loadAuthenticatedUser()
.subscribe((user: AuthenticatedUser) => {
if (user) {
this.events.publish('setMenu');
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,
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.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) {
console.log(data);
this.remainingTime = this.convertInSeconds(data.P_REMAINING_HOURS.split(':'));
this.scheduledTime = this.convertInSeconds(data.P_SCHEDULED_HOURS.split(':'));
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();
}
showAttendanceTracking() {
this.DS.getAttendanceTracking() .subscribe((result: AttendanceTrackingResponse) => {
if (this.common.validResponse(result)) {
const key = 'GetAttendanceTrackingList';
this.convertAndAssignTime(result[key]);
this.DS.getAttendanceTracking().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) => {
this.DS.getOpenPeriodDates(() => {
console.log("Error ");
}).subscribe((result: OpenPeriodDatesResponse) => {
if (this.common.validResponse(result)) {
console.log('response');
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.statsButtons[0].statsValue = result[key];
this.common.sharedService.setSharedData(result, 'worklistNotifications');
const key = "P_OPEN_NTF_NUMBER";
this.countAllNotification = result[key];
this.ITGCountAllNotification();
this.common.sharedService.setSharedData(
result,
"worklistNotifications"
);
}
});
}
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("response");
console.log(result);
}
});
}
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("response");
console.log(result);
}
});
}
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') {
if (subMenu.REQUEST_TYPE === "ABSENCE") {
this.common.openAbsencePage();
} else if (subMenu.REQUEST_TYPE === 'EIT') {
} else if (subMenu.REQUEST_TYPE === "EIT") {
this.common.openEitListPage();
}
if (subMenu.REQUEST_TYPE === 'PAYSLIP') {
} 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.openEITPage();
}
}
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;
for (const accrualBalance of result.GetAccrualBalancesList) {
if (accrualBalance.ACCURAL_PLAN_NAME === 'HMG Annual Vacation Accrual Plan') {
this.statsButtons[3].statsValue = accrualBalance.ACCRUAL_NET_ENTITLEMENT;
} 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() {
@ -607,11 +695,16 @@ export class HomePage implements OnInit {
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);
}
}
}

@ -4,16 +4,13 @@
<nav-buttons backLink="/home"></nav-buttons>
</ion-buttons>
<ion-title>WORK LIST</ion-title>
<!-- <div class="profile-image-container" (click)="openProfilePage()">
<img [src]="userImage"/>
</div> -->
</ion-toolbar>
</ion-header>
<ion-content>
<div class="contentBg">
<div class="result-graph">
<div class="result-graph">
<div class="request-heading">
<span>Open Request Analysis</span>
</div>
@ -46,11 +43,25 @@
<ion-col style="float: right;" size=[6] (click)="openSearchModal()" *ngIf="selectedFilter === 'ALL'">
<ion-icon name="search" ></ion-icon>
<span>Advanced Search</span>
</ion-col>
</ion-col>
</ion-row>
<!-- <div class="total-result" *ngIf="isEmptyObject() && selectedFilter === 'ALL' && showSearchButton === false">
<span>showing {{newWorkListResponse.length}} of {{filters[0].value}}</span>
</div> -->
<ion-row *ngIf='selectedFilter === "ITG"'>
<ion-col>
<ion-slides>
<ion-slide class='slideCss' *ngFor="let segment of ITGSegment">
<span [ngClass]="segment.style? 'text-span-active': 'text-span'" (click)="setActive(segment.code)">
{{segment.name}}
</span>
</ion-slide>
</ion-slides>
</ion-col>
</ion-row>
<div [ngClass]="isEmptyObject() ? 'work-list-container' : ''">
<div [ngClass]="isEmptyObject() ? 'work-list-container' : ''" *ngIf='selectedFilter != "ITG"'>
<div *ngFor="let data of showFormattedData | keyvalue; let i = index">
<span class="date-span">{{data.key}}</span>
<div (click)="openNotificationDetail(data.value)" class="date-data" *ngFor="let workList of data.value; let j = index">
@ -58,12 +69,24 @@
</div>
</div>
</div>
<div [ngClass]="isEmptyObject() ? 'work-list-container' : ''" *ngIf="selectedFilter == 'ITG'" >
<div *ngFor='let segmentInfo of ITGItem[0]; let i= index' (click)='openITG(segmentInfo)'>
<span class="date-span">{{segmentInfo.ModifiedDate |date}}</span>
<div class="date-data">
<p>{{segmentInfo.Title}}</p>
</div>
</div>
</div>
<div class="no-data-available" *ngIf="!isEmptyObject()">
<span>No Data Available</span>
</div>
</div>
<ion-infinite-scroll *ngIf="selectedFilter === 'ALL'" (ionInfinite)="doInfinite($event)">
<ion-infinite-scroll (ionInfinite)="doInfinite($event)">
<ion-infinite-scroll-content></ion-infinite-scroll-content>
</ion-infinite-scroll>

@ -390,3 +390,31 @@ ion-content {
pointer-events: none;
opacity: .3;
}
.total-result {
margin-top: 55px;
padding-left: 20px;
color: #888;
font-size: 15px;
}
.text-span{
font-size: 14px;
color: #888;
background-color: white;
width: 93%;
height: 30px;
border: 1px solid;
border-radius: 15px;
}
.text-span-active{
font-size: 14px;
color: #888;
background-color:#22c6b3;
width: 93%;
height: 30px;
border: 1px solid;
border-radius: 15px;
}
.slideCss{
width: 200px !important;
}

@ -4,12 +4,10 @@ import { CommonService } from 'src/app/hmg-common/services/common/common.service
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { WorkListRequest } from '../models/workListRequest';
import * as moment from 'moment';
import { WorKListResponse } from '../models/workListResponse';
import { WorklistService } from '../service/worklist.service';
import { IonInfiniteScroll } from '@ionic/angular';
import { WorklistMainService } from '../service/work-list.main.service';
import { WorklistAdvancedSearchComponent } from '../worklist-advanced-search/worklist-advanced-search.component';
import { AuthenticatedUser } from 'src/app/hmg-common/services/authentication/models/authenticated-user';
import { DatePipe } from '@angular/common';
@Component({
@ -18,6 +16,9 @@ import { DatePipe } from '@angular/common';
styleUrls: ['./home.component.scss']
})
export class HomeComponent implements OnInit {
public static REQUSET_NAME = 'requst_name';
public static REQUSET_INFO = 'requset_info';
public static ALL_REQUEST = 'all_request';
public static NOTIFICATION_DATA = 'notification_data';
public static NOTIFICATION_ARR = 'notification_arr';
@ViewChild(IonInfiniteScroll) infiniteScroll: IonInfiniteScroll;
@ -35,23 +36,28 @@ export class HomeComponent implements OnInit {
inputSearch = '';
inputDate: string;
filteredNotificationList: any;
IsReachEnd = false;
public noData = false;
isReachEnd = false;
public isAll = true;
public isPR = false;
public isPO = false;
public isMR = false;
public isHR = false;
public noData = false;
public isITG = false;
public isSearch = false;
public direction = 'ltr';
public ITGCount = 0;
public ITGSegment: {name: string, code: any, data: any, style: boolean} [] = [];
public ITGAllItem: any = [];
public selectedITGToActive = false;
public ITGItem: any = [];
public activeSegment: any;
public currentActiveIndex = 0;
public previousActiveIndex = 0;
public worklistNotifications: any;
public totalRequestCount = 0;
public newWorkListResponse = [];
public allFormattedData = {};
public showFormattedData = {};
public selectedFilter = 'ALL';
public showSearchButton = false;
@ -149,9 +155,11 @@ export class HomeComponent implements OnInit {
ngOnInit() {
// this.direction = TranslatorService.getCurrentDirection();
this.worklistNotifications = this.common.sharedService.getSharedData('worklistNotifications', false);
this.totalRequestCount = this.worklistNotifications.P_OPEN_NTF_NUMBER;
this.Details();
this.Count();
this.assignDataToFilters();
this.getAllPushNotificationFun();
this.totalRequestCount = this.worklistNotifications.P_OPEN_NTF_NUMBER;
}
assignDataToFilters() {
@ -170,31 +178,30 @@ export class HomeComponent implements OnInit {
} else if (notification.ITEM_TYPE === 'INVMOA') {
this.filters[4].value = notification.OPEN_NTF_NUMBER;
this.data.datasets[0].data[3] = notification.OPEN_NTF_NUMBER;
}
} else if (notification.ITEM_TYPE === 'ITG') {
this.filters[5].value = notification.OPEN_NTF_NUMBER;
this.data.datasets[0].data[4] = notification.OPEN_NTF_NUMBER;
}
}
}
getFilteredData(filter: string) {
if (filter === 'ALL') {
this.showFormattedData = this.allFormattedData;
} else {
let arrayToFilter;
arrayToFilter = this.newWorkListResponse.filter((workList) => {
return workList.ITEM_TYPE === filter;
});
this.showFormattedData = this.categorizeData(arrayToFilter);
}
}
activeFilter(index: number) {
this.showFormattedData = {};
this.previousActiveIndex = this.currentActiveIndex;
this.currentActiveIndex = index;
this.filters[this.previousActiveIndex].active = false;
this.filters[this.currentActiveIndex].active = true;
this.selectedFilter = this.filters[this.currentActiveIndex].key;
this.getFilteredData(this.selectedFilter);
activeFilter(index: number) {
if (this.currentActiveIndex !== index) {
this.showFormattedData = {};
this.previousActiveIndex = this.currentActiveIndex;
this.currentActiveIndex = index;
this.filters[this.previousActiveIndex].active = false;
this.filters[this.currentActiveIndex].active = true;
if (this.filters[this.currentActiveIndex].value !== 0) {
const selectedKey = this.filters[this.currentActiveIndex].key;
this.resetData();
this.itemType = (selectedKey !== 'ITG' && selectedKey !== 'ALL') ? this.filters[this.currentActiveIndex].key : '';
this.getAllPushNotificationFun();
}
this.selectedFilter = this.filters[this.currentActiveIndex].key;
}
}
openProfilePage() {
@ -207,7 +214,7 @@ export class HomeComponent implements OnInit {
filter.disable = false;
filter.active = true;
this.selectedFilter = filter.name;
} else if (this.itemType === 'none') {
} else if (this.itemType === '') {
filter.disable = false;
filter.active = false;
} else {
@ -215,7 +222,7 @@ export class HomeComponent implements OnInit {
filter.active = false;
}
}
if (this.itemType === 'none') {
if (this.itemType === '') {
this.filters[0].active = true;
}
}
@ -228,7 +235,6 @@ export class HomeComponent implements OnInit {
componentProps: {}
});
modal.onDidDismiss().then(result => {
console.log(result.data);
if (result.data) {
if (result.data.notificationType !== '' || result.data.selectedValue !== '' || result.data.itemType !== '') {
this.showSearchButton = true;
@ -239,17 +245,16 @@ export class HomeComponent implements OnInit {
this.inputSearch = result.data.inputSearch;
this.WorkListObj.P_PAGE_NUM = 1;
this.newWorkListResponse = [];
this.allFormattedData = {};
this.showFormattedData = {};
this.selectedFilter = 'ALL';
this.filters[this.currentActiveIndex].active = false;
this.currentActiveIndex = 0;
this.previousActiveIndex = 0;
this.filters[this.currentActiveIndex].active = true;
this.getAllPushNotificationFun();
if (this.itemType !== '') {
this.disableFilters();
}
this.getAllPushNotificationFun();
}
}
});
@ -258,12 +263,14 @@ export class HomeComponent implements OnInit {
getAllPushNotificationFun() {
this.WorkListObj.P_PAGE_NUM = 1;
this.IsReachEnd = false;
this.isReachEnd = false;
this.WorkListObj.P_SEARCH_FROM_USER = this.selectedValue === '1' ? this.inputSearch : '';
this.WorkListObj.P_SEARCH_SUBJECT = this.selectedValue === '2' ? this.inputSearch : '';
this.WorkListObj.P_SEARCH_SENT_DATE = (this.inputDate && this.selectedValue === '3')
? moment(this.inputDate).format('DD-MMM-YYYY') : '';
this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = this.selectedValue === '4' ? this.inputSearch : '';;
this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = this.selectedValue === '4' ? this.inputSearch : ''; ;
this.WorkListObj.P_ITEM_TYPE = this.itemType !== '' ? this.itemType : '';
this.WorkListObj.P_NOTIFICATION_TYPE = this.notificationType !== '' ? this.notificationType : '1';
if (this.selectedValue === '5') {
this.WorkListObj.P_SEARCH_FROM_USER = '';
this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = '';
@ -305,11 +312,15 @@ export class HomeComponent implements OnInit {
const lastitem = result[lastItemIndex];
if (lastitem) {
if (lastitem.NO_OF_ROWS === lastitem.ROW_NUM) {
this.IsReachEnd = true;
this.infiniteScroll.complete();
this.isReachEnd = true;
if (this.infiniteScroll) {
this.infiniteScroll.complete();
}
} else {
this.IsReachEnd = false;
this.infiniteScroll.complete();
this.isReachEnd = false;
if (this.infiniteScroll) {
this.infiniteScroll.complete();
}
}
}
if (this.common.hasData(result)) {
@ -321,8 +332,7 @@ export class HomeComponent implements OnInit {
}
this.newWorkListResponse = this.sortArray(this.newWorkListResponse);
console.log(this.newWorkListResponse);
this.allFormattedData = this.categorizeData(this.newWorkListResponse);
this.showFormattedData = this.allFormattedData;
this.showFormattedData = this.categorizeData(this.newWorkListResponse);
this.common.sharedService.setSharedData(this.newWorkListResponse, HomeComponent.NOTIFICATION_ARR);
} else {
this.newWorkListResponse = [];
@ -330,9 +340,7 @@ export class HomeComponent implements OnInit {
}
openNotificationDetail(obj) {
console.log(obj);
this.common.sharedService.setSharedData(obj[0], HomeComponent.NOTIFICATION_DATA);
// this.common.openWorklistMainPage();
if (obj.REQUEST_TYPE === 'PR') {
this.common.openWorklistMainPRPage();
} else if (obj[0].REQUEST_TYPE === 'PO') {
@ -341,51 +349,47 @@ export class HomeComponent implements OnInit {
this.common.openWorklistMainMRPage();
} else {
this.common.openWorklistMainPage();
}
}
isEmptyObject() {
return (this.showFormattedData && (Object.keys(this.showFormattedData).length > 0));
return (this.showFormattedData && (Object.keys(this.showFormattedData).length > 0) || this.ITGItem.length > 0);
}
clearSearch() {
this.itemType = 'none';
this.disableFilters();
resetData() {
if (this.infiniteScroll) {
this.infiniteScroll.complete();
}
this.showSearchButton = false;
this.notificationType = '';
this.notificationType = '1';
this.selectedValue = '';
this.inputDate = '';
this.inputSearch = '';
this.WorkListObj.P_PAGE_NUM = 1;
this.newWorkListResponse = [];
this.allFormattedData = {};
this.showFormattedData = {};
this.selectedFilter = 'ALL';
this.filters[this.currentActiveIndex].active = false;
this.currentActiveIndex = 0;
this.previousActiveIndex = 0;
this.filters[this.currentActiveIndex].active = true;
this.WorkListObj.P_SEARCH_FROM_USER = '';
this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = '';
this.WorkListObj.P_SEARCH_SENT_DATE = '';
this.WorkListObj.P_SEARCH_SUBJECT = '';
this.getAllPushNotificationFun();
}
onChangeView(selectedValue: any) {
this.WorkListObj.P_NOTIFICATION_TYPE = selectedValue.detail.value;
clearSearch() {
this.itemType = '';
this.selectedFilter = 'ALL';
this.disableFilters();
this.resetData();
this.getAllPushNotificationFun();
}
doInfinite(infiniteScroll) {
if (!this.IsReachEnd && this.selectedFilter === 'ALL') {
if (!this.isReachEnd && this.selectedFilter !== 'ITG') {
this.WorklistService.getWorkList(this.WorkListObj).subscribe((result) => {
if (this.common.validResponse(result)) {
this.handleWorkListResult(result.GetWorkList);
}
});
} else {
if (this.infiniteScroll && this.selectedFilter === 'ALL') {
if (this.infiniteScroll) {
this.infiniteScroll.complete();
}
}
@ -394,51 +398,23 @@ export class HomeComponent implements OnInit {
Count() {
this.workListService.getITGCount()
.subscribe((result: any) => {
console.log('ENAD ITG COUNT:');
console.log(result);
for (let i = 0; i < result.RequestType.length; i++) {
this.ITGSegment[i] = {
name: result.RequestType[i].RequestTypeName,
code: result.RequestType[i].RequestTypeCode,
data: result.RequestType[i].RequestDetails,
style: false
};
}
this.setActive(this.ITGSegment[0].code);
});
}
// filterNotificationByRequestType(reqType) {
// const filterdType = [];
// if (reqType === 'All') {
// this.filteredNotificationList = this.WorkListResObj;
// if (this.filteredNotificationList === [] || this.filteredNotificationList == null || this.filteredNotificationList === '') {
// this.noData = true;
// return false;
// } else {
// this.noData = false;
// return false;
// }
// }
// for (let i = 0; i < this.WorkListResObj.length; i++) {
// if (reqType === 'HR') {
// if ('EIT' === this.WorkListResObj[i].REQUEST_TYPE || 'ABSENCE' === this.WorkListResObj[i].REQUEST_TYPE) {
// filterdType.push(this.WorkListResObj[i]);
// }
// } else {
// if (reqType === this.WorkListResObj[i].REQUEST_TYPE) {
// filterdType.push(this.WorkListResObj[i]);
// }
// }
// }
// this.filteredNotificationList = filterdType;
// if (this.filteredNotificationList === [] || this.filteredNotificationList == null || this.filteredNotificationList === '') {
// this.noData = true;
// return false;
// } else {
// this.noData = false;
// return false;
// }
// }
Details() {
this.workListService.getITGDetails()
.subscribe((result: any) => {
console.log('ENAD ITG Details:');
console.log(result);
this.totalRequestCount = this.totalRequestCount + result.TotalCount;
this.filters[5].value = result.TotalCount;
});
}
@ -455,4 +431,28 @@ export class HomeComponent implements OnInit {
searchBtn() {
this.isSearch = !this.isSearch;
}
setActive(selectedSegment) {
this.ITGItem = [];
let count = 0;
this.activeSegment = selectedSegment;
// tslint:disable-next-line: prefer-for-of
for (let i = 0; i < this.ITGSegment.length; i++) {
if (this.ITGSegment[i].code === selectedSegment) {
this.ITGSegment[i].style = true;
this.ITGItem[count] = this.ITGSegment[i].data;
count++;
} else {
this.ITGSegment[i].style = false;
}
}
}
openITG(segmentInfo) {
this.common.sharedService.setSharedData(segmentInfo, HomeComponent.REQUSET_INFO);
this.common.sharedService.setSharedData(this.activeSegment, HomeComponent.REQUSET_NAME);
this.common.sharedService.setSharedData(this.ITGItem, HomeComponent.ALL_REQUEST);
this.common.openWorklistITGPage();
}
}

@ -0,0 +1,12 @@
import { Request } from 'src/app/hmg-common/services/models/request';
export class itgRequest extends Request {
public RequestType: string;
public ItemID: number;
public TaskID: number;
public EmployeeNumber: string;
public Comments: string;
public IsSubTask: boolean;
public NewUserEMPId: string;
public AdditionalFields?: [{}];
}

@ -9,4 +9,5 @@ export class WorkListRequest extends Request{
public P_SEARCH_ITEM_TYPE_DSP_NAME: string;
public P_PAGE_NUM: number;
public P_PAGE_LIMIT: number;
public P_ITEM_TYPE : string;
}

@ -26,9 +26,11 @@ import { ItemHistoryComponent } from './item-history/item-history.component';
import { QutationAnalysisComponent } from './qutation-analysis/qutation-analysis.component';
import { WorklistMainMRComponent } from './worklist-main-mr/worklist-main-mr.component';
import { WorklistAdvancedSearchComponent } from './worklist-advanced-search/worklist-advanced-search.component';
import { WorkListMainItgComponent } from './work-list-main-itg/work-list-main-itg.component';
// import { WorklistMainComponent } from './worklist-main/worklist-main.component';
import {MoreActionModalComponent} from './more-action-modal/more-action-modal.component'
import { WorkListReplacementItgComponent } from './work-list-replacement-itg/work-list-replacement-itg.component';
const routes: Routes = [
@ -98,13 +100,21 @@ const routes: Routes = [
component: QutationAnalysisComponent
},
{
path:'worklist-main-MR',
component:WorklistMainMRComponent
path: 'worklist-main-MR',
component: WorklistMainMRComponent
},
{
path: 'worklist-main-ITG',
component: WorkListMainItgComponent
},
{
path: 'more-action-modal',
component: MoreActionModalComponent
},
{
path: 'worklist-replacement-itg',
component: WorkListReplacementItgComponent
}
]
}
];
@ -136,7 +146,9 @@ const routes: Routes = [
ItemHistoryComponent,
QutationAnalysisComponent,
WorklistMainMRComponent,
WorklistAdvancedSearchComponent
WorklistAdvancedSearchComponent,
WorkListMainItgComponent,
WorkListReplacementItgComponent
// WorklistMainComponent
],
entryComponents: [

@ -19,6 +19,7 @@ import { MOItemHistoryRes } from "../models/MOItemHistoryRes";
import { QuotationAnalysisResponse } from '../models/quotationAnalysisRes';
import { Request } from 'src/app/hmg-common/services/models/request';
import { LoginModel } from '../../authentication/models/LoginModel';
import { itgRequest } from '../models/itgFormDetailsRequest';
@Injectable()
export class WorklistMainService {
@ -44,9 +45,11 @@ export class WorklistMainService {
public static getQutationAnalysisUrl =
"Services/ERP.svc/REST/GET_QUOTATION_ANALYSIS";
public static getITGFormTaskCount =
'http://10.80.100.124:7086/Services/COCWS.svc/REST/ITGGetTaskCountRequestType';
'Services/COCWS.svc/REST/ITGGetTaskCountRequestType';
public static getITGFormTaskDetails =
'http://10.80.100.124:7086/Services/COCWS.svc/REST/ITGFormsPendingTasks';
'Services/COCWS.svc/REST/ITGFormsPendingTasks';
public static getITGFormDetails =
'Services/COCWS.svc/REST/ITGGetFormDetials';
@ -241,7 +244,7 @@ export class WorklistMainService {
const request = new Request;
console.log(request)
this.authService.authenticateRequest(request);
return this.api.postToken(
return this.api.post(
WorklistMainService.getITGFormTaskCount,
request,
onError,
@ -249,12 +252,25 @@ export class WorklistMainService {
);
}
public getITGFormDetails(request:itgRequest, onError?: any, errorLabel?: string): Observable<any> {
this.authService.authenticateRequest(request);
request.EmployeeNumber = request.P_USER_NAME;
console.log(request);
return this.api.post(
WorklistMainService.getITGFormDetails,
request,
onError,
errorLabel
);
}
public getITGDetails( onError?: any, errorLabel?: string): Observable<any> {
const request = new Request;
console.log(request)
this.authService.authenticateRequest(request);
return this.api.postToken(
return this.api.post(
WorklistMainService.getITGFormTaskDetails,
request,
onError,
@ -262,4 +278,19 @@ export class WorklistMainService {
);
}
public getITGActionRequest(itgrequest:itgRequest,actionURL:string, onError?: any, errorLabel?: string): Observable<any> {
this.authService.authenticateRequest(itgrequest);
itgrequest.EmployeeNumber = itgrequest.P_USER_NAME;
console.log(itgrequest);
console.log(actionURL);
return this.api.post(
actionURL,
itgrequest,
onError,
errorLabel
);
}
}

@ -1,5 +1,5 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<ion-toolbar class="header-toolbar-new">
<ion-title color="light">{{'workListMain, suppDoc' | translate}}</ion-title>
<ion-buttons slot="primary">

@ -32,6 +32,7 @@ export class WorkListAttachComponent implements OnInit {
// modal.present();
this.cs.sharedService.setSharedData({ displayData: value, TypeData: Type }, 'WorkListAttachViewPage')
const modal = await this.modalCtrl.create({
component: WorkListAttachViewComponent
});

@ -0,0 +1,151 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<ion-title color="light"> {{ts.trPK('worklistMain','title')}}</ion-title>
<ion-buttons slot="start">
<nav-buttons backLink="/notification/homepage"></nav-buttons>
</ion-buttons>
</ion-toolbar>
</ion-header>
<ion-content class="colorBG">
<ion-segment [dir]="directionLTR" mode="md" color="secondary" (ionChange)="segmentChangedClick($event)"
[value]="defaultSegment" class="ion-segment-all">
<ion-segment-button value="{{segmentVal.name}}"
[ngClass]="activeSegment == segmentVal.name ? 'active-Segment' : 'normal-Segment'"
*ngFor="let segmentVal of segmentsArray">
{{segmentVal.name}}
</ion-segment-button>
</ion-segment>
<ion-card class="cardContent" *ngFor='let segmentContant of segmentData'>
<ion-card-content *ngIf='activeSegment === segmentContant.name'>
<ion-grid style="text-align: left" *ngFor='let dataContant of segmentContant.data'>
<ion-row>
<ion-col>
<label class="colItemReq"> {{dataContant.Title}}</label>
<br />
<label>{{dataContant.Value}}</label>
</ion-col>
</ion-row>
<ion-row *ngIf='dataContant.TableValue'>
<ion-col style="border: 1px solid gainsboro; border-radius: 15px; padding-left: 20px;">
<label class="colItemReq" *ngFor="let header of dataContant.TableValue.Header"><br /> {{header}}</label>
<br />
<label *ngFor="let rows of dataContant.TableValue.Rows"><br />{{rows}}</label>
<label *ngIf="dataContant.TableValue.Rows"><br />none</label>
</ion-col>
</ion-row>
</ion-grid>
</ion-card-content>
</ion-card>
<!-- if there is additional screen like in VIDA -->
<!-- <ng-container>
<ion-card class="cardContent" *ngFor='let segmentContant of segmentDataTable'>
<ion-card-content *ngIf='activeSegment === segmentContant.name'>
<ion-grid style="text-align: left" *ngFor='let dataContant of segmentContant.data'>
<ion-row *ngFor="let headerData of dataContant.Header">
<ion-col>
<label class="colItemReq"> {{headerData}}</label>
<br />
<label>{{headerData}}</label>
</ion-col>
</ion-row>
</ion-grid>
</ion-card-content>
</ion-card>
</ng-container> -->
<!-- END -->
<ion-card class="cardContent" *ngIf='activeSegment === "Approval Level"'>
<ion-card-content>
<ion-grid>
<ion-row>
<ion-col>
<ion-list class="notification-list" style="margin-left: -30px;" *ngFor="let approvalInfo of workList">
<div class="timeline">
<ion-item>
<div class="timeline-item" slot="start">
<div>
<button ion-button style=" background: none;width: 60%;">
<img src="../assets/imgs/noteSmall.png">
</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">
</div>
<p style="margin-left: -20%; font-size: 12px !important;">{{approvalInfo.Action}}</p>
</div>
</div>
<p style="margin-left: 10%;">{{approvalInfo.Name}}</p>
</ion-item>
</div>
</ion-list>
</ion-col>
</ion-row>
</ion-grid>
</ion-card-content>
</ion-card>
<ion-card class="cardContent">
<ion-card-content>
<ion-grid>
<ion-row>
<ion-col>
<ion-label>
<h2 class="boldTxtNav">Comment</h2>
</ion-label>
<ion-input type='text' [(ngModel)]='commentText'></ion-input>
<ion-item *ngFor="let object of grantInfo">
<ion-label>{{object.Label}}</ion-label>
<ion-select *ngIf="!object.ConditionalFieldName" [(ngModel)]='ExchangeServerSelected'
(ionChange)="filterGrantDB(ExchangeServerSelected,object, object.FieldName)" id='{{object.FieldName}}'>
<ion-select-option value="{{value}}" *ngFor="let value of object.Value">
{{value}}</ion-select-option>
</ion-select>
<ion-select *ngIf="object.ConditionalFieldName" [(ngModel)]='ExchangeServerDBSelected'
(ionChange)="filterGrantDB(ExchangeServerDBSelected,object)" id='{{object.FieldName}}'>
<ion-select-option value="{{value}}" *ngFor="let value of filteredGrantFieldsConditionalValue">
{{value}}</ion-select-option>
</ion-select>
</ion-item>
</ion-col>
</ion-row>
</ion-grid>
</ion-card-content>
</ion-card>
</ion-content>
<ion-footer class="footerSearchBtn">
<ion-tabs>
<ion-tab-bar class="tabBar" slot="bottom">
<!-- <ion-tab-button *ngFor='let action of actionBTN' [hidden]="action.isAvailable" > -->
<ion-tab-button *ngFor='let action of actionBTN' [hidden]='!action.isAvailable'
(click)="selectAtion(action.name)">
<img [src]="action.image">
<ion-label style="font-size: 12px;">{{action.name}}</ion-label>
</ion-tab-button>
<ion-tab-button (click)="skip()">
<img src="../assets/imgs/action-skip.png">
<ion-label style="font-size: 12px;">Skip</ion-label>
</ion-tab-button>
</ion-tab-bar>
</ion-tabs>
</ion-footer>

@ -0,0 +1,13 @@
.timeline-thumb {
height: 30px !important;
left: 54px !important;
}
.timeline-icon{
width: 30px !important;
}
.timeline:before{
position: fixed !important;
}

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

@ -0,0 +1,342 @@
import { Component, OnInit } from '@angular/core';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { HomeComponent } from '../home/home.component';
import { WorklistMainService } from '../service/work-list.main.service';
import { itgRequest } from '../models/itgFormDetailsRequest';
import { ModalController } from '@ionic/angular';
import { WorkListReplacementRollComponent } from '../work-list-replacement-roll/work-list-replacement-roll.component';
import { WorkListReplacementItgComponent } from '../work-list-replacement-itg/work-list-replacement-itg.component';
@Component({
selector: 'app-work-list-main-itg',
templateUrl: './work-list-main-itg.component.html',
styleUrls: ['./work-list-main-itg.component.scss'],
})
export class WorkListMainItgComponent implements OnInit {
public static APPROVAL = "Services/COCWS.svc/REST/ITGApproveRequest"
public static REJECT = 'Services/COCWS.svc/REST/ITGRejectRequest'
public static DELEGATE = 'Services/COCWS.svc/REST/ITGDelegateRequest';
public static REQUEST_INFORMATION = 'Services/COCWS.svc/REST/ITGRequestInformation';
public static ANSWER = 'Services/COCWS.svc/REST/ITGAnswer';
public static GRANT = 'Services/COCWS.svc/REST/ITGGrantAccess';
public request_info: any;
public request_name: any;
public all_request: any;
public request = new itgRequest();
public activeSegment: any = "info";
public request_details: any;
public segmentsArray: { name: string, number: number }[] = [];
public segmentData: { name: string, data: any }[] = [];
public header: any = [];
public rows: any = [];
public workList: any;
public commentText: string;
public replcamentID: string;
public actionSelected: any;
public options: any;
public index: number = 0;
public grantDATA: any;
public grantInfo: any;
public grantFieldsConditionalValue: any = [];
public filteredGrantFieldsConditionalValue: any = [];
public grantFieldsLabel: any = [];
public grantFieldsValue: any = [];
public grantRequest: any = [];
public ExchangeServerSelected: any;
public ExchangeServerDBSelected: any;
public actionBTN: { name: string, image: string, isAvailable: boolean }[] = [];
constructor(
public common: CommonService,
public ts: TranslatorService,
public workListService: WorklistMainService,
public modalCtrl: ModalController) { }
ngOnInit() {
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);
this.all_request = this.all_request[0];
this.changeITGForm(this.request_info, this.request_name);
}
changeITGForm(data, requestName) {
this.request_info = data;
this.request_name = requestName;
this.request.RequestType = this.request_name;
this.request.ItemID = this.request_info.ItemID;
this.request.TaskID = this.request_info.ID;
this.request.Comments = this.request_info.Comments;
this.request.NewUserEMPId = this.request_info.NewUserEMPId;
this.workListService.getITGFormDetails(this.request).subscribe((result: any) => {
this.request_details = result.ITGRequest;
this.grantInfo = result.ITGRequest.GrantFields;
let count = 0;
for (let i = 0; i < result.ITGRequest.FieldGoups.length; i++) {
this.segmentsArray[i] = { name: result.ITGRequest.FieldGoups[i].Title, number: i };
this.segmentData[i] = { name: result.ITGRequest.FieldGoups[i].Title, data: result.ITGRequest.FieldGoups[i].Fields}
}
this.segmentsArray[this.segmentsArray.length] = { name: 'Approval Level', number: this.segmentsArray.length }
this.workList = this.request_details.WFHistory;
this.options = this.request_details.AllowedActions;
this.activeSegment = this.segmentsArray[0].name;
for (let i = 0; i < this.options.length; i++) {
this.imageURL(this.options[i].Action);
this.actionBTN[i] = { name: this.options[i].Action, image: this.imageURL(this.options[i].Action), isAvailable: this.options[i].IsAvailable }
}
if (this.grantInfo) {
let count = 0;
this.grantFieldsConditionalValue = [];
for (let i = 0; i < this.grantInfo.length; i++) {
if (this.grantInfo[i].Value) {
for (let j = 0; j < this.grantInfo[i].Value.length; j++) {
this.grantFieldsValue[j] = this.grantInfo[i].Value[j];
}
}
if (this.grantInfo[i].ConditionalValue) {
for (let j = 0; j < this.grantInfo[i].ConditionalValue.length; j++) {
this.grantFieldsConditionalValue[count] = this.grantInfo[i].ConditionalValue[j];
count++;
}
}
}
}
//result.ITGRequest.FieldGoups.Fields
});
}
imageURL(actionName) {
if (actionName == "Approve") {
return "../assets/imgs/action-approve.png"
}
if (actionName == "Reject") {
return "../assets/imgs/action-reject.png"
}
if (actionName == "RequestInformation") {
return "../assets/imgs/action-info.png"
}
if (actionName == "Grant") {
return "../assets/imgs/action-info.png"
}
if (actionName == "Delegate") {
return "../assets/imgs/action-info.png"
}
}
public segmentChangedClick(event: any) {
this.activeSegment = event.detail.value;
}
skip() {
for (let i = 0; i < this.all_request.length; i++) { // search for the request that clicked on all request
if (this.request_info.ID == this.all_request[i].ID) { // check if the ID for the request is found.
this.index = i + 1;
if (this.index !== this.all_request.length) { // check if its last one to redirecte to home otherwise to next request.
this.clearDataArray();
this.changeITGForm(this.all_request[this.index], this.request_name);
break;
} else {
this.common.openNotificationPage();
break;
}
} else {
this.common.openNotificationPage();
break;
}
}
}
clearDataArray() {
this.commentText = '';
this.actionSelected = '';
this.segmentsArray = [];
this.segmentData = [];
this.workList = [];
this.actionBTN = [];
}
actionService(action, comments?, grantRequests?) {
let url: string;
let request = new itgRequest();
request.RequestType = this.request_name;
request.ItemID = this.request_info.ItemID;
request.TaskID = this.request_info.ID;
request.Comments = this.commentText;
request.Comments = this.request_info.Comments;
request.EmployeeNumber = this.request_info.EmployeeNumber;
request.NewUserEMPId = this.replcamentID;
this.common.confirmAlertDialogAction(
() => {
if (action == 1) { //approved
url = WorkListMainItgComponent.APPROVAL;
this.workListService.getITGActionRequest(request, url)
.subscribe((result: any) => {
// this.common.openNotificationPage();
this.skip();
});
} else if (action == 2) {//reject
url = WorkListMainItgComponent.REJECT;
this.workListService.getITGActionRequest(request, url)
.subscribe((result: any) => {
// this.common.openNotificationPage();
this.skip();
});
} else if (action == 3) {//request more info
request.NewUserEMPId = this.replcamentID;
url = WorkListMainItgComponent.REQUEST_INFORMATION;
if (!comments) {
this.common.presentAlert(this.ts.trPK('worklist', 'empty-comment'));
} else {
this.workListService.getITGActionRequest(request, url)
.subscribe((result: any) => {
// this.common.openNotificationPage();
this.skip();
});
}
} else if (action == 4) {//delegate
request.NewUserEMPId = this.replcamentID;
url = WorkListMainItgComponent.DELEGATE;
this.workListService.getITGActionRequest(request, url)
.subscribe((result: any) => {
// this.common.openNotificationPage();
this.skip();
});
} else if (action == 5) { //answer
url = WorkListMainItgComponent.ANSWER;
if (!comments) {
this.common.presentAlert(this.ts.trPK('worklist', 'empty-comment'));
} else {
this.workListService.getITGActionRequest(request, url)
.subscribe((result: any) => {
// this.common.openNotificationPage();
this.skip();
});
}
} else if (action == 6) { //grant
url = WorkListMainItgComponent.GRANT;
if (!comments) {
this.common.presentAlert(this.ts.trPK('worklist', 'empty-comment'));
}
else {
if (this.grantRequest) {
request.AdditionalFields = this.grantRequest;
this.workListService.getITGActionRequest(request, url)
.subscribe((result: any) => {
// this.common.openNotificationPage();
this.skip();
});
} else {
this.common.presentAlert(this.ts.trPK('worklist', 'empty-comment'));
}
}
}
}, this.ts.trPK('general', 'ok'),
() => { this.actionSelected = '' }, this.ts.trPK('general', 'cancel'),
this.ts.trPK('vacation-rule', 'confirmation'),
this.confirmMsg(action));
}
confirmMsg(action) {
if (action === 1) {
return this.ts.trPK('worklist', 'approveMsg');
}
if (action === 2) {
return this.ts.trPK('worklist', 'rejectMsg');
}
if (action === 3) {
return this.ts.trPK('worklist', 'requestInformationMsg');
}
if (action === 4) {
return this.ts.trPK('worklist', 'delegateMsg');
}
if (action === 5) {
return this.ts.trPK('worklist', 'answerMsg');
}
if (action === 6) {
return this.ts.trPK('worklist', 'grantMsg');
}
}
selectAtion(actionSelected) {
this.actionSelected = actionSelected;
if (this.actionSelected == "Answer") {
this.actionService(5, this.commentText)
}
if (this.actionSelected == "Approve") {
this.actionService(1, this.commentText);
}
if (this.actionSelected == "Delegate") {
// this.actionService(4, this.commentText)
// this.common.openWorklistRollReplacement();
this.presentModal(4);
}
if (this.actionSelected === 'Doable') {
}
if (this.actionSelected === 'Grant') {
this.actionService(6, this.commentText, this.grantRequest);
}
if (this.actionSelected === 'NotDoable') {
}
if (this.actionSelected === 'Question') {
}
if (this.actionSelected === 'Reject') {
this.actionService(2, this.commentText);
}
if (this.actionSelected === 'RequestInformation') {
this.presentModal(3);
}
}
async presentModal(actionNumber) {
const modal = await this.modalCtrl.create({
component: WorkListReplacementItgComponent,
backdropDismiss: false,
});
modal.cssClass = 'replaceRoll-modal';
modal.onDidDismiss()
.then((data) => {
this.replcamentID = data.data.empData.USER_NAME;
if (actionNumber == 3) {
this.actionService(3, this.commentText);
} else if (actionNumber == 4) {
this.actionService(4);
}
});
return await modal.present();
}
filterGrantDB(valueSelected, object, selectedOption?) {
let count = 0;
this.filteredGrantFieldsConditionalValue = [];
this.grantRequest.push({ Key: object.FieldName, Value: valueSelected });
for (let i = 0; i < this.grantInfo.length; i++) {
if (selectedOption === this.grantInfo[i].ConditionalFieldName) {
for (let j = 0; j < this.grantFieldsConditionalValue.length; j++) {
if (valueSelected === this.grantFieldsConditionalValue[j].Key) {
this.filteredGrantFieldsConditionalValue[count] = this.grantInfo[i].ConditionalValue[j].Value[0];
count++;
}
}
}
}
}
}

@ -0,0 +1,60 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<!-- <nav-buttons></nav-buttons> -->
<ion-title color="light">{{ 'vacation-rule, search-employee' | translate}}</ion-title>
<ion-buttons slot="primary">
<ion-button style="background: none !important;" (click)="closePage()">
<ion-icon slot="icon-only" name="close"></ion-icon>
</ion-button>
</ion-buttons>
</ion-toolbar>
</ion-header>
<ion-content padding>
<div style="padding: 0 10px;" [innerHTML]='"vacation-rule, replacement-employee-tip" | translate'></div>
<ion-item lines="none">
<ion-label class="boldTxtNav">{{'vacation-rule, search-by' | translate}}</ion-label>
<ion-select okText='{{"general, ok" | translate }}' cancelText='{{"general, cancel" | translate }}'
[(ngModel)]="searchKeySelect">
<ion-select-option value="1" selected="true">{{'vacation-rule, search-by-name' | translate}}</ion-select-option>
<ion-select-option value="2">{{'vacation-rule, search-by-username' | translate}}</ion-select-option>
<ion-select-option value="3">{{'vacation-rule, search-by-email' | translate}}</ion-select-option>
</ion-select>
</ion-item>
<ion-item lines='none'>
<ion-input [(ngModel)]="searchKey" placeholder="{{'vacation-rule, search-employee' | translate}}"></ion-input>
<ion-button style="width: 19%;" button-type="clear" (click)="SearchReplacementList()">
<ion-icon slot="icon-only" name="search"></ion-icon>
</ion-button>
</ion-item>
<!-- <ion-item>
<ion-list [(ngModel)]="selEmp" *ngIf="ReplacementList">
<ion-item *ngFor="let employee of ReplacementList;let i=index;">
<ion-label><span class="boldTxt">{{employee.EMPLOYEE_DISPLAY_NAME}}</span> <br>{{employee.USER_NAME}}<br>
{{employee.EMAIL_ADDRESS}}</ion-label>
<ion-radio value="{{i}}"></ion-radio>
</ion-item>
</ion-list>
</ion-item> -->
<ion-list>
<ion-radio-group mode="md" [(ngModel)]="selEmp" *ngIf="ReplacementList">
<ion-item *ngFor="let employee of ReplacementList;let i=index;">
<ion-label><span class="boldTxt">{{employee.EMPLOYEE_DISPLAY_NAME}}</span> <br>{{employee.USER_NAME}}<br>
{{employee.EMAIL_ADDRESS}}</ion-label>
<ion-radio value="{{i}}"></ion-radio>
</ion-item>
</ion-radio-group>
</ion-list>
</ion-content>
<ion-footer>
<div class="centerDiv">
<ion-button (click)="closePage()" class="footer-button" color="customnavy">{{'general, save' | translate}}
</ion-button>
</div>
</ion-footer>

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

@ -0,0 +1,131 @@
import { Component, OnInit } from '@angular/core';
import { ModalController } from '@ionic/angular';
import { ReplacementServiceRequest } from 'src/app/vacation-rule/model/replacement-Service.request';
import { VacationRuleServiceService } from 'src/app/vacation-rule/service/vacation-rule-service.service';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
@Component({
selector: 'app-work-list-replacement-itg',
templateUrl: './work-list-replacement-itg.component.html',
styleUrls: ['./work-list-replacement-itg.component.scss'],
})
export class WorkListReplacementItgComponent implements OnInit {
P_SEARCH_USER_NAME: string = "";
P_SEARCH_EMPLOYEE_DISPLAY_NAME: string = "";
P_SEARCH_EMAIL_ADDRESS: string = "";
P_PAGE_NUM: number = 1;
P_PAGE_LIMIT: number = 50;
ReplacementList: any = [];
IsReachEnd: boolean = false;
selEmp: string = null;
callback: any;
searchKey: any = "";
searchKeySelect: string = "";
replacmentRequest: any = "";
isAbs: boolean = false;
isSave: boolean = false;
constructor(public vacationRuleService: VacationRuleServiceService,
public ts: TranslatorService,
public cs: CommonService,
public modalController: ModalController) { }
ngOnInit() {}
SearchReplacementList() {
this.ReplacementList = [];
this.IsReachEnd = false;
this.P_PAGE_NUM = 1;
if (this.searchKey) {
switch (this.searchKeySelect) {
case '1': {
this.P_SEARCH_EMPLOYEE_DISPLAY_NAME = this.searchKey;
this.P_SEARCH_USER_NAME = "";
this.P_SEARCH_EMAIL_ADDRESS = "";
break;
}
case '2': {
this.P_SEARCH_USER_NAME = this.searchKey;
this.P_SEARCH_EMPLOYEE_DISPLAY_NAME = "";
this.P_SEARCH_EMAIL_ADDRESS = "";
break;
}
case '3': {
this.P_SEARCH_EMAIL_ADDRESS = this.searchKey;
this.P_SEARCH_USER_NAME = "";
this.P_SEARCH_EMPLOYEE_DISPLAY_NAME = "";
break;
}
default: {
this.P_SEARCH_USER_NAME = "";
this.P_SEARCH_EMPLOYEE_DISPLAY_NAME = "";
this.P_SEARCH_EMAIL_ADDRESS = "";
break;
}
}
} else {
this.P_SEARCH_USER_NAME = "";
this.P_SEARCH_EMPLOYEE_DISPLAY_NAME = "";
this.P_SEARCH_EMAIL_ADDRESS = "";
}
const request = new ReplacementServiceRequest();
request.P_SEARCH_USER_NAME = this.P_SEARCH_USER_NAME;
request.P_SEARCH_EMPLOYEE_DISPLAY_NAME = this.P_SEARCH_EMPLOYEE_DISPLAY_NAME;
request.P_SEARCH_EMAIL_ADDRESS = this.P_SEARCH_EMAIL_ADDRESS;
request.P_PAGE_NUM = this.P_PAGE_NUM;
request.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
request.P_SELECTED_EMPLOYEE_NUMBER = this.selEmp;
this.vacationRuleService.getReplacementList(request).
subscribe((result: any) => {
this.handleReplacment(result);
});
}
handleReplacment(result) {
if (this.cs.validResponse(result)) {
if (this.cs.hasData(result.ReplacementList)) {
this.ReplacementList = result.ReplacementList;
this.P_PAGE_NUM++;
let lastItemIndex = this.ReplacementList.length - 1;
if (result.ReplacementList[lastItemIndex]) {
let lastitem = result.ReplacementList[lastItemIndex];
if (lastitem.NO_OF_ROWS == lastitem.ROW_NUM) {
this.IsReachEnd = true;
} else {
this.IsReachEnd = false;
}
}
}
}
}
doInfinite(infiniteScroll) {
}
closePage() {
this.isSave = true;
let data: any = null;
if (this.isSave == true) {
if (this.selEmp) {
data = this.ReplacementList[this.selEmp];
} else {
data = null;
}
if (typeof this.callback == 'function') {
this.callback(data);
}
this.modalController.dismiss({
'dismissed': true,
empData: data
});
}
}
}

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

@ -58,19 +58,20 @@
color: var(--red);
}
.header-toolbar-new{
--background: #22c6b3;
}
.colorBG{
--background: #f0efef;
}
.header-div {
background-color: #22C6B3;
text-transform: capitalize;
height: 180px;
position: relative;
display: block;
margin-bottom: -28px;
background-color: #22C6B3;
text-transform: capitalize;
height: 119px;
position: relative;
display: block;
margin-bottom: -28px;
}
.Title{
text-align: center;
@ -142,8 +143,8 @@
border-radius: 20px !important;
padding-top: 13px;
padding-bottom: 14px;
margin-left: 30px;
margin-right: 32px;
margin-left: 26px;
margin-right: 28px;
margin-top: -2px;
margin-bottom: 10px;
padding-right: 21px;
@ -214,7 +215,7 @@ margin-top: -13px;
.header{
margin-top: -126px;
margin-top: -119px;
}
.bgcolor {

@ -5,7 +5,7 @@
</ion-buttons>
<p class="proTitles">{{ts.trPK('userProfile','performance')}}</p>
<div class="profilediv" (click)="openPersonalInfo()">
<div class="profilediv">
<img class="profileImg" [src]="user_image">
</div>
<!-- <ion-img class="profileImg" [src]="imageSrc"></ion-img> -->

@ -42,8 +42,8 @@ export class DateTimeInput extends UiElement {
// timeValue=arrayDate[1];
// }
const template =
"<ion-item>" +
" <ion-label style='font-size: medium !important;' class='daynamicForm-Label " + requiredClass + "' id='title' >" + this.label + "</ion-label>" +
"<ion-item class='dynamicField'>" +
" <ion-label position='floating' style='font-size: medium !important;' class='daynamicForm-Label " + requiredClass + "' id='title' >" + this.label + "</ion-label>" +
// " <div class='daynamicForm-DateTime " + disaledClass + "' id='" + this.elementId + "' data-dtvalue='" + this.value + "' " + this.disabled + ">" + this.value + "</div>" +
"<ion-datetime min='1900' max='2100' displayFormat='DD/MM/YYYY' value='" + this.value + "' id='" + this.elementId + "' data-dtvalue='" + this.value + "' " + this.disabled + "></ion-datetime>" +
// " <input class='daynamicForm-DateTime' type='text' id='" + this.elementId + "' value='" + this.value + "' "+this.disabled+" (click)='showDateTimePicker()'/>"+

@ -41,8 +41,8 @@ export class DateInput extends UiElement {
// " <input class='daynamicForm-DateTime' type='date' id='" + this.elementId + "' value='" + this.value + "' "+this.disabled+" />"+
// "</div> ";
"<ion-item>" +
" <ion-label style='font-size: medium !important;' class='daynamicForm-Label " + requiredClass + "' id='title' >" + this.label + "</ion-label>" +
"<ion-item class='dynamicField'>" +
" <ion-label position='floating' style='font-size: medium !important;' class='dynamiclable-float " + requiredClass + "' id='title' >" + this.label + "</ion-label>" +
// " <div class='daynamicForm-DateTime " + disaledClass + "' id='" + this.elementId + "' data-dtvalue='" + this.value + "' " + this.disabled + ">" + this.value + "</div>" +
"<ion-datetime min='1900' max='2100' class='onic-date' (ionChange)='setDate()' displayFormat='MMM/DD/YYYY' value='" + this.value + "' id='" + this.elementId + "' data-dtvalue='" + this.value + "' " + this.disabled + " ></ion-datetime>" +
// " <input class='daynamicForm-DateTime' type='text' id='" + this.elementId + "' value='" + this.value + "' "+this.disabled+" (click)='showDateTimePicker()'/>"+

@ -26,8 +26,8 @@ export class NumberInput extends UiElement {
// " <input class='daynamicForm-Input' type='number' id='" + this.elementId + "' value='" + this.value + "' " + this.disabled + " />" +
// "</div> ";
"<ion-item style='" + this.hidden + "'>" +
"<ion-label style='font-size: medium !important;' class='" + requiredClass + "'>" + this.label + "</ion-label>" +
"<ion-item style='" + this.hidden + "' class='dynamicField'> " +
"<ion-label position='floating' style='font-size: medium !important;' class='" + requiredClass + " dynamiclable-float'>" + this.label + "</ion-label>" +
"<ion-input type='number' id='" + this.elementId + "' value='" + this.value + "' " + this.disabled + "> </ion-input>" +
"</ion-item> ";

@ -23,7 +23,7 @@ export class SelectInput extends UiElement {
if (this.disabled == "N") { this.disabled = "disabled" } else { this.disabled = "" }
if (this.hidden == "N") { this.hidden = "display:none;" } else { this.hidden = "" }
const template =
"<div class='custom-text-area-element' style='"+this.hidden+"'>" +
"<div class='custom-text-area-element dynamicField' style='"+this.hidden+"'>" +
" <label class='daynamicForm-Label "+requiredClass+"' id='title' >" + this.label + "</label>" +
" <select class='daynamicForm-Select' id='" + this.elementId + "' "+this.disabled+">"+
"<option value='"+this.value+"' >"+this.value+"</option>"+

@ -26,8 +26,8 @@ export class TextAreaInput extends UiElement {
// "<textarea class='daynamicForm-Input' id='" + this.elementId + "' " + this.disabled + " >" + this.value + "</textarea>" +
// "</div> ";
"<ion-item style='" + this.hidden + "' >" +
"<ion-label style='font-size: medium !important;' id='title' >" + this.label + "</ion-label>" +
"<ion-item style='" + this.hidden + "' class='dynamicField'>" +
"<ion-label class='dynamiclable-float' position='floating' style='font-size: medium !important;' id='title' >" + this.label + "</ion-label>" +
"<ion-textarea id='" + this.elementId + "' " + this.disabled + " >" + this.value + "</ion-textarea>" +
"</ion-item>";

@ -24,9 +24,9 @@ export class TextInput extends UiElement {
if (this.hidden === "N") { this.hidden = "display:none;" } else { this.hidden = "" }
const template =
// "<div class='custom-text-area-element' style='" + this.hidden + "'>" +
"<ion-item style='" + this.hidden + "'>" +
" <ion-label style='font-size: medium;' class='" + requiredClass + "'>" + this.label + "</ion-label>" +
" <ion-input type='text' data-colm-text='" + this.textVal + "' id='" + this.elementId + "' value='" + this.value + "' " + this.disabled + "> </ion-input>" +
"<ion-item style='" + this.hidden + "' class='dynamicField'>" +
" <ion-label position='floating' style='font-size: medium;' class='" + requiredClass + " dynamiclable-float'>" + this.label + "</ion-label>" +
" <ion-input style='' type='text' data-colm-text='" + this.textVal + "' id='" + this.elementId + "' value='" + this.value + "' " + this.disabled + "> </ion-input>" +
"</ion-item> ";
return template;

@ -32,7 +32,7 @@ export class TimeInput extends UiElement {
}
const template =
"<div class='custom-text-area-element' style='"+this.hidden+"'>" +
" <label class='daynamicForm-Label "+requiredClass+"' id='title' >" + this.label + "</label>" +
" <label class='daynamicForm-Label "+requiredClass+"' id='title' >" + this.label + "</label>" +
// " <input class='daynamicForm-DateTime' type='time' id='" + this.elementId + "' value='" + this.value + "' "+this.disabled+" />"+
" <div class='daynamicForm-DateTime "+disaledClass+"' id='" + this.elementId + "' data-dtvalue='" + this.value + "' "+this.disabled+">"+this.value+"</div>"+
"</div> ";

Binary file not shown.

After

Width:  |  Height:  |  Size: 537 B

@ -1214,6 +1214,22 @@
"en": "Accrual Balances",
"ar": "رصيد حساب المستحقات"
},
"accrualNet": {
"en": "Accrual Net",
"ar": "صافي الاستحقاق"
},
"accrualUsed": {
"en": "Accrual Used",
"ar": "الاستحقاق المستخدم"
},
"accrualYearly": {
"en": "Accrual Yearly",
"ar": "الاستحقاق السنوي"
},
"totalNumber": {
"en": "TOTAL NUMBERS",
"ar": "المجموع"
},
"createAbsence": {
"en": "Create Absence",
"ar": "إنشاء إجازة"
@ -1265,6 +1281,26 @@
"attachList": {
"en": "Attachment List",
"ar": "قائمة المرفقات"
},
"adult": {
"en": "Adult",
"ar": "بالغ"
},
"child": {
"en": "Child",
"ar": "طفل"
},
"infants": {
"en": "Infants",
"ar": "رضيع"
},
"tickets": {
"en": "Tickets",
"ar": "تذاكر"
},
"tickets-balance": {
"en": "Ticket Balance",
"ar": "رصيد التذاكر"
}
},
"accrualBalances": {
@ -1591,7 +1627,7 @@
},
"msg":{
"en": "Select a replacement",
"ar":"اختيار بديل"
"ar":"اختر بديل"
},
"title":{
"en": "Replacement Roll",
@ -1678,6 +1714,34 @@
"note": {
"en":"Note",
"ar":"مذكرة"
},
"approveMsg":{
"en":"are you sure that you want to approve this request?",
"ar":"هل انت متاكد من قبول هذا الطلب؟"
},
"rejectMsg":{
"en":"are you sure that you want to reject this request?",
"ar":"هل انت متاكد من رفض هذا الطلب؟"
},
"delegateMsg":{
"en":"are you sure that you want to delegate this request?",
"ar":"هل انت متاكد من تحويل هذا الطلب؟"
},
"requestInformationMsg":{
"en":"are you sure that you want to more information for this request?",
"ar":"هل انت متاكد من طلب مزيد من المعلومات لهذا الطلب؟"
},
"grantMsg":{
"en":"are you sure that you want to grant access for this request?",
"ar":"هل انت متاكد من انشاء صلاحيه لهذا الطلب؟"
},
"answerMsg":{
"en":"press on ok to continue",
"ar":"اضغط على موافق للاستمرار"
},
"empty-comment":{
"en":"you shoud add comment",
"ar":"يجب عليك اضافة تعليق"
}
},
"worklistMain": {

Binary file not shown.

After

Width:  |  Height:  |  Size: 537 B

@ -95,6 +95,8 @@ ion-label{
.btnBack{
background: transparent !important;
}
/***************/
.attachImg{
max-width: 30px;
@ -393,11 +395,164 @@ ion-col.colBold,ion-col.colBold>label{
// padding:0px;
// }
.floating-form {
width:320px;
}
// /**** floating-Lable style start ****/
// .floating-label {
// position:relative;
// margin-bottom:20px;
// }
// .floating-input , .floating-select {
// font-size:14px;
// padding:4px 4px;
// display:block;
// width:100%;
// height:30px;
// background-color: transparent;
// border:none;
// border-bottom:1px solid #757575;
// }
// .floating-input:focus , .floating-select:focus {
// outline:none;
// border-bottom:2px solid #5264AE;
// }
// label {
// color:#999;
// font-size:14px;
// font-weight:normal;
// position:absolute;
// pointer-events:none;
// left:5px;
// top:5px;
// transition:0.2s ease all;
// -moz-transition:0.2s ease all;
// -webkit-transition:0.2s ease all;
// }
// .floating-input:focus ~ label, .floating-input:not(:placeholder-shown) ~ label {
// top:-18px;
// font-size:14px;
// color:#5264AE;
// }
// .floating-select:focus ~ label , .floating-select:not([value=""]):valid ~ label {
// top:-18px;
// font-size:14px;
// color:#5264AE;
// }
// /* active state */
// .floating-input:focus ~ .bar:before, .floating-input:focus ~ .bar:after, .floating-select:focus ~ .bar:before, .floating-select:focus ~ .bar:after {
// width:50%;
// }
// *, *:before, *:after {
// -webkit-box-sizing: border-box;
// -moz-box-sizing: border-box;
// box-sizing: border-box;
// }
// .floating-textarea {
// min-height: 30px;
// max-height: 260px;
// overflow:hidden;
// overflow-x: hidden;
// }
// /* highlighter */
// .highlight {
// position:absolute;
// height:50%;
// width:100%;
// top:15%;
// left:0;
// pointer-events:none;
// opacity:0.5;
// }
// /* active state */
// .floating-input:focus ~ .highlight , .floating-select:focus ~ .highlight {
// -webkit-animation:inputHighlighter 0.3s ease;
// -moz-animation:inputHighlighter 0.3s ease;
// animation:inputHighlighter 0.3s ease;
// }
// /* animation */
// @-webkit-keyframes inputHighlighter {
// from { background:#5264AE; }
// to { width:0; background:transparent; }
// }
// @-moz-keyframes inputHighlighter {
// from { background:#5264AE; }
// to { width:0; background:transparent; }
// }
// @keyframes inputHighlighter {
// from { background:#5264AE; }
// to { width:0; background:transparent; }
// }
// /**** floating-Lable style end ****/
/*** Body style start ***/
// html {
// font-family: "Helvetica Neue", Helvetica, "Noto Sans", sans-serif, Arial, sans-serif;
// font-size: 12px;
// line-height: 1.42857143;
// color: #949494;
// background-color: #ffffff;
// }
/*** Body style end ***/
/*** daniel - Fork me friend - style ***/
// .floating-credit { position:fixed; bottom:10px;right:10px; color:#aaa; font-size:13px;font-family:arial,sans-serif; }
// .floating-credit a { text-decoration:none; color:#000000; font-weight:bold; }
// .floating-credit a:hover { border-bottom:1px dotted #f8f8f8; }
// .floating-heading { position:fixed; color:#aaa; font-size:20px; font-family:arial,sans-serif; }
/*** daniel - Fork me friend - style ***/
/**************************TEST********************888/
/*****************dynamic form*******************/
.dynamicField{
border-radius: 30px;
border: 1px solid #a2a5a6!important;
margin-bottom: 20px;
}
.daynamicForm-Label{
font-size: 16px;
// margin-left: 15px;
color: var(--customnavy);
color: #a2a5a6 !important;
display: block;
overflow: hidden;
-webkit-box-flex: 1;
@ -410,6 +565,7 @@ ion-col.colBold,ion-col.colBold>label{
white-space: normal;
// padding-top: 10px;
padding: 5px 0px;
padding-left: 10px !important;
margin: 10px auto;
:root[dir="ltr"]{
font-family: var(--fontFamilySemiBoldEN) !important;
@ -522,11 +678,13 @@ img.flipImg{
font-weight: 400;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
width: 100%;
width: 80%;
padding: 6px 0px;
background-color: var(--light);
border-bottom: var(--cusgray) solid 1px;
border-radius: 0px;
margin-left: 20px;
margin-top: -10px;
// -webkit-appearance: none;
// -moz-appearance: none;
text-indent: 1px;
@ -1079,4 +1237,16 @@ border:0px
.boldP{
font-size: 20px;
}
}
.modal-wrapper{
border-radius: 20px !important;
}
// .replaceRoll-modal {
// padding: 30% 1% !important;
// --height: 15cm !important;
// --width: 100% !important;
// --border-radius: 0.4cm;
// }

@ -64,10 +64,6 @@ margin-left: 10px !important;
white-space: normal;
overflow: hidden;
box-sizing: border-box;
}
.colItemReqHeader{
@ -395,7 +391,7 @@ ion-item{
--flex:none;
}
ion-input ,ion-datetime{
border-bottom: #dedede 1px solid;
// border-bottom: #dedede 1px solid;
}
.left {
.timeline:before{
@ -570,4 +566,9 @@ left: 66px;
.colItems ion-label {
color: black !important;
}
}
.approvalTitle{
font-weight: bold;
font-size: 16px;
text-align: left;
}

Loading…
Cancel
Save