Compare commits
131 Commits
master
...
my-request
| Author | SHA1 | Date |
|---|---|---|
|
|
3651f5a04a | 6 years ago |
|
|
8d1ad091e9 | 6 years ago |
|
|
c6409c4620 | 6 years ago |
|
|
8f9ef27ee1 | 6 years ago |
|
|
4a0ca75f6d | 6 years ago |
|
|
0928d55171 | 6 years ago |
|
|
afed126eaf | 6 years ago |
|
|
024ed04baf | 6 years ago |
|
|
b0b76cd5e0 | 6 years ago |
|
|
1aa290f627 | 6 years ago |
|
|
ae3a2e4995 | 6 years ago |
|
|
f1157f48f6 | 6 years ago |
|
|
5557f7d3ba | 6 years ago |
|
|
8c55d3995a | 6 years ago |
|
|
c3339148ed | 6 years ago |
|
|
1f044cfb3e | 6 years ago |
|
|
5d41967ed7 | 6 years ago |
|
|
7ed63baf68 | 6 years ago |
|
|
561db9109f | 6 years ago |
|
|
fee59fb259 | 6 years ago |
|
|
a4ad4e9d49 | 6 years ago |
|
|
e7e9ec7b63 | 6 years ago |
|
|
527ee02627 | 6 years ago |
|
|
dd7cf45685 | 6 years ago |
|
|
69ea2637d6 | 6 years ago |
|
|
f781cd8eae | 6 years ago |
|
|
a694396f82 | 6 years ago |
|
|
c1e72539de | 6 years ago |
|
|
08c8ea71b1 | 6 years ago |
|
|
05387d81d4 | 6 years ago |
|
|
70fd9e5ebc | 6 years ago |
|
|
5fcde27564 | 6 years ago |
|
|
d2940a70d0 | 6 years ago |
|
|
c37d469ea7 | 6 years ago |
|
|
18dabcb13e | 6 years ago |
|
|
1f50906684 | 6 years ago |
|
|
e71dd383da | 6 years ago |
|
|
bf825662a9 | 6 years ago |
|
|
d1d3a307b7 | 6 years ago |
|
|
05ea5e349f | 6 years ago |
|
|
8f83946c48 | 6 years ago |
|
|
0e17984b20 | 6 years ago |
|
|
14e1c27591 | 6 years ago |
|
|
e37311f726 | 6 years ago |
|
|
6385c93e56 | 6 years ago |
|
|
e3cdfa31eb | 6 years ago |
|
|
721066c859 | 6 years ago |
|
|
69db29931f | 6 years ago |
|
|
2ee9d51f7e | 6 years ago |
|
|
a3109bc0a8 | 6 years ago |
|
|
4d6167d6e8 | 6 years ago |
|
|
55f5b391e1 | 6 years ago |
|
|
7ecc3e5048 | 6 years ago |
|
|
573941941f | 6 years ago |
|
|
a78477c192 | 6 years ago |
|
|
c85a5ef82a | 6 years ago |
|
|
2b5265243e | 6 years ago |
|
|
a9128c93e2 | 6 years ago |
|
|
4bf4d4fc24 | 6 years ago |
|
|
b27f976bc9 | 6 years ago |
|
|
32e33e655b | 6 years ago |
|
|
7406d6f990 | 6 years ago |
|
|
2a71811ca2 | 6 years ago |
|
|
2c5c0599d8 | 6 years ago |
|
|
93f973022c | 6 years ago |
|
|
838e7cf99b | 6 years ago |
|
|
eb9413edb9 | 6 years ago |
|
|
ece6e45d97 | 6 years ago |
|
|
93e59d2618 | 6 years ago |
|
|
6eeca7479d | 6 years ago |
|
|
5208584999 | 6 years ago |
|
|
2f55272c91 | 6 years ago |
|
|
96971a6b68 | 6 years ago |
|
|
09afc19dbb | 6 years ago |
|
|
f316629cb0 | 6 years ago |
|
|
396241bc83 | 6 years ago |
|
|
7bd0701d75 | 6 years ago |
|
|
afc8c99639 | 6 years ago |
|
|
9177721b59 | 6 years ago |
|
|
52d9e04dac | 6 years ago |
|
|
a2acf0dcbd | 6 years ago |
|
|
594e875156 | 6 years ago |
|
|
a09bac4b6e | 6 years ago |
|
|
b9e1a95601 | 6 years ago |
|
|
f3fdc1454f | 6 years ago |
|
|
d2fac5c4d5 | 6 years ago |
|
|
e629aab07a | 6 years ago |
|
|
86e96c11d0 | 6 years ago |
|
|
2e6dd95004 | 6 years ago |
|
|
f7002f3eae | 6 years ago |
|
|
ecbdf62c74 | 6 years ago |
|
|
dcf6bd5d79 | 6 years ago |
|
|
9b58f9e9e0 | 6 years ago |
|
|
4fe49bdb18 | 6 years ago |
|
|
884e518971 | 6 years ago |
|
|
d1fbd34330 | 6 years ago |
|
|
6d3dd907a6 | 6 years ago |
|
|
81504b0491 | 6 years ago |
|
|
5df30f114b | 6 years ago |
|
|
5b7e435a31 | 6 years ago |
|
|
a8f9640f68 | 6 years ago |
|
|
ffc3bca0a6 | 6 years ago |
|
|
c7decd88a0 | 6 years ago |
|
|
1c62b10486 | 6 years ago |
|
|
11432b633e | 6 years ago |
|
|
c955a19ae8 | 6 years ago |
|
|
c069ae5282 | 6 years ago |
|
|
f23d6e7bf4 | 6 years ago |
|
|
ab30d50808 | 6 years ago |
|
|
cb1aad91f9 | 6 years ago |
|
|
7779a2ed61 | 6 years ago |
|
|
e90be39807 | 6 years ago |
|
|
a670c06790 | 6 years ago |
|
|
e6642a29e8 | 6 years ago |
|
|
a6fe8c183a | 6 years ago |
|
|
213648a9ed | 6 years ago |
|
|
335758fbd0 | 6 years ago |
|
|
fd663493e6 | 6 years ago |
|
|
338205b305 | 6 years ago |
|
|
4c5153c69d | 6 years ago |
|
|
9218d02195 | 6 years ago |
|
|
3c637df2d5 | 6 years ago |
|
|
5c7a30f308 | 6 years ago |
|
|
8dc3f5a57e | 6 years ago |
|
|
976961e9ee | 6 years ago |
|
|
13df9b7b75 | 6 years ago |
|
|
d5407c8f90 | 6 years ago |
|
|
7456ab6e0a | 6 years ago |
|
|
4bdc08b42d | 6 years ago |
|
|
e01c73a092 | 6 years ago |
|
|
167973cedb | 6 years ago |
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 93 KiB After Width: | Height: | Size: 72 KiB |
|
Before Width: | Height: | Size: 128 KiB After Width: | Height: | Size: 105 KiB |
|
Before Width: | Height: | Size: 161 KiB After Width: | Height: | Size: 142 KiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 91 KiB After Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 122 KiB After Width: | Height: | Size: 96 KiB |
|
Before Width: | Height: | Size: 154 KiB After Width: | Height: | Size: 137 KiB |
|
Before Width: | Height: | Size: 175 KiB After Width: | Height: | Size: 200 KiB |
|
Before Width: | Height: | Size: 210 KiB After Width: | Height: | Size: 132 KiB |
@ -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();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@ -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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
.header-toolbar-new{
|
||||||
|
--background: #22c6b3;
|
||||||
|
}
|
||||||
@ -1,32 +1,33 @@
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
|
import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
|
||||||
|
|
||||||
|
|
||||||
|
const routes: Routes = [
|
||||||
|
{ path: '', redirectTo: 'authentication/login', pathMatch: 'full' },
|
||||||
|
{
|
||||||
|
path: 'authentication', loadChildren: './authentication/authentication.module#AuthenticationPageModule'},
|
||||||
|
{ path: 'home', loadChildren: './home/home.module#HomePageModule' },
|
||||||
|
{ path: 'profile', loadChildren: './profile/profile.module#ProfilePageModule' },
|
||||||
|
{ path: 'vacation-rule', loadChildren: './vacation-rule/vacation-rule.module#VacationRulePageModule' },
|
||||||
|
{ path: 'accrual-balances', loadChildren: './accrual-balances/accrual-balances.module#AccrualBalancesPageModule' },
|
||||||
|
{ path: 'my-team', loadChildren: './my-team/my-team.module#MyTeamPageModule' },
|
||||||
|
{ path: 'attendance', loadChildren: './attendance/attendance.module#AttendancePageModule' },
|
||||||
|
{ path: 'eit', loadChildren: './eit/eit.module#EITPageModule' },
|
||||||
|
{ path: 'absence', loadChildren: './absence/absence.module#AbsencePageModule' },
|
||||||
|
{ path: 'notification', loadChildren: './notification/notification.module#NotificationPageModule' },
|
||||||
|
{ path: 'my-specialist', loadChildren: './my-specialist/my-specialist.module#MySpecialistPageModule' },
|
||||||
|
{ path: 'my-subordinate', loadChildren: './my-subordinate/my-subordinate.module#MySubordinatePageModule' },
|
||||||
|
{ path: 'time-card', loadChildren: './time-card/time-card.module#TimeCardPageModule' },
|
||||||
|
{ path: 'payslip', loadChildren: './payslip/payslip.module#PayslipPageModule' },
{ path: 'attendance-tracking', loadChildren: './attendance-tracking/attendance-tracking.module#AttendanceTrackingPageModule' }
|
||||||
|
|
||||||
|
|
||||||
const routes: Routes = [
|
];
|
||||||
{ path: '', redirectTo: 'authentication/login', pathMatch: 'full' },
|
|
||||||
{
|
@NgModule({
|
||||||
path: 'authentication', loadChildren: './authentication/authentication.module#AuthenticationPageModule'},
|
imports: [
|
||||||
{ path: 'home', loadChildren: './home/home.module#HomePageModule' },
|
/*RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules}),*/
|
||||||
{ path: 'profile', loadChildren: './profile/profile.module#ProfilePageModule' },
|
RouterModule.forRoot(routes),
|
||||||
{ path: 'vacation-rule', loadChildren: './vacation-rule/vacation-rule.module#VacationRulePageModule' },
|
],
|
||||||
{ path: 'accrual-balances', loadChildren: './accrual-balances/accrual-balances.module#AccrualBalancesPageModule' },
|
exports: [RouterModule]
|
||||||
{ path: 'my-team', loadChildren: './my-team/my-team.module#MyTeamPageModule' },
|
})
|
||||||
{ path: 'attendance', loadChildren: './attendance/attendance.module#AttendancePageModule' },
|
export class AppRoutingModule { }
|
||||||
{ path: 'eit', loadChildren: './eit/eit.module#EITPageModule' },
|
|
||||||
{ path: 'absence', loadChildren: './absence/absence.module#AbsencePageModule' },
|
|
||||||
{ path: 'notification', loadChildren: './notification/notification.module#NotificationPageModule' },
|
|
||||||
{ path: 'my-specialist', loadChildren: './my-specialist/my-specialist.module#MySpecialistPageModule' },
|
|
||||||
{ path: 'my-subordinate', loadChildren: './my-subordinate/my-subordinate.module#MySubordinatePageModule' },
|
|
||||||
{ path: 'time-card', loadChildren: './time-card/time-card.module#TimeCardPageModule' },
|
|
||||||
{ path: 'payslip', loadChildren: './payslip/payslip.module#PayslipPageModule' }
|
|
||||||
|
|
||||||
];
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [
|
|
||||||
/*RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules}),*/
|
|
||||||
RouterModule.forRoot(routes),
|
|
||||||
],
|
|
||||||
exports: [RouterModule]
|
|
||||||
})
|
|
||||||
export class AppRoutingModule { }
|
|
||||||
|
|||||||
@ -0,0 +1,38 @@
|
|||||||
|
import { NgModule } from '@angular/core';
|
||||||
|
import { CommonModule } from '@angular/common';
|
||||||
|
import { FormsModule } from '@angular/forms';
|
||||||
|
import { Routes, RouterModule } from '@angular/router';
|
||||||
|
import { IonicModule } from '@ionic/angular';
|
||||||
|
import { AttendanceTrackingPage } from './attendance-tracking.page';
|
||||||
|
import {HomeComponent} from './home/home.component'
|
||||||
|
import { HmgCommonModule } from "./../hmg-common/hmg-common.module";
|
||||||
|
|
||||||
|
const routes: Routes = [
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
component: AttendanceTrackingPage,
|
||||||
|
children:[
|
||||||
|
{
|
||||||
|
path: 'home',
|
||||||
|
component:HomeComponent
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [
|
||||||
|
CommonModule,
|
||||||
|
FormsModule,
|
||||||
|
IonicModule,
|
||||||
|
HmgCommonModule,
|
||||||
|
RouterModule.forChild(routes)
|
||||||
|
],
|
||||||
|
declarations: [AttendanceTrackingPage,HomeComponent]
|
||||||
|
})
|
||||||
|
export class AttendanceTrackingPageModule {}
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
<ion-content>
|
||||||
|
<ion-router-outlet></ion-router-outlet>
|
||||||
|
</ion-content>
|
||||||
@ -0,0 +1,27 @@
|
|||||||
|
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { AttendanceTrackingPage } from './attendance-tracking.page';
|
||||||
|
|
||||||
|
describe('AttendanceTrackingPage', () => {
|
||||||
|
let component: AttendanceTrackingPage;
|
||||||
|
let fixture: ComponentFixture<AttendanceTrackingPage>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ AttendanceTrackingPage ],
|
||||||
|
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(AttendanceTrackingPage);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-attendance-tracking',
|
||||||
|
templateUrl: './attendance-tracking.page.html',
|
||||||
|
styleUrls: ['./attendance-tracking.page.scss'],
|
||||||
|
})
|
||||||
|
export class AttendanceTrackingPage implements OnInit {
|
||||||
|
|
||||||
|
constructor() { }
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,89 @@
|
|||||||
|
<!-- <ion-header>
|
||||||
|
<ion-toolbar class="header-toolbar">
|
||||||
|
<ion-title color="light">Attendance Tracking </ion-title>
|
||||||
|
<ion-buttons slot="start">
|
||||||
|
<nav-buttons></nav-buttons>
|
||||||
|
</ion-buttons>
|
||||||
|
</ion-toolbar>
|
||||||
|
</ion-header> -->
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <ion-header>
|
||||||
|
<ion-toolbar class="header-toolbar-new">
|
||||||
|
<ion-buttons slot="start">
|
||||||
|
<nav-buttons backLink="/home"></nav-buttons>
|
||||||
|
</ion-buttons>
|
||||||
|
<ion-title>Attendance Tracking</ion-title>
|
||||||
|
</ion-toolbar>
|
||||||
|
</ion-header> -->
|
||||||
|
|
||||||
|
|
||||||
|
<ion-content>
|
||||||
|
<div class="back-button-container">
|
||||||
|
<nav-buttons backLink="/home"></nav-buttons>
|
||||||
|
</div>
|
||||||
|
<div class="timer-chart">
|
||||||
|
<ion-label class="shift-title" style="font-weight: bold; font-size: 20px;"> {{curentDate}}</ion-label><br/>
|
||||||
|
<ion-label class="shift-title"> {{ts.trPK('attendance-tracking','today-time-left')}}</ion-label>
|
||||||
|
|
||||||
|
<div class="fixed-shift-timer">
|
||||||
|
<circle-progress
|
||||||
|
[titleFontSize]= '3'
|
||||||
|
[percent]="percent"
|
||||||
|
[radius]="8"
|
||||||
|
[outerStrokeWidth]="0.25"
|
||||||
|
[innerStrokeWidth]="0.25"
|
||||||
|
[outerStrokeColor]="'#3cb9d5'"
|
||||||
|
[innerStrokeColor]="'rgba(0,0,0,0.3)'"
|
||||||
|
[animation]="true"
|
||||||
|
[animationDuration]="300"
|
||||||
|
[responsive]="true"
|
||||||
|
[space]="-0.25"
|
||||||
|
[startFromZero]="false"
|
||||||
|
[title]="displayTime"
|
||||||
|
titleFontWeight="bold"
|
||||||
|
[titleColor]="'#ffffff'"
|
||||||
|
[showUnits]="false"
|
||||||
|
[showSubtitle]="false"
|
||||||
|
[subtitleColor]="'#ffffff'"
|
||||||
|
[clockwise]="false"
|
||||||
|
[renderOnClick]="false">
|
||||||
|
</circle-progress>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div *ngIf="attendanceTrackingList" class="tracking-content">
|
||||||
|
<div class="divstopBtn">
|
||||||
|
<button *ngIf="isCheckedIn"(click)="openDialog();" class="stopBtn" ion-button>
|
||||||
|
<ion-icon class="stopicon" name="pause"></ion-icon>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<ion-grid>
|
||||||
|
<ion-row class="rowBorder">
|
||||||
|
<ion-col [size]="12" class="colBorder" style="border-right: none;">
|
||||||
|
<ion-label class="shift-title">{{ts.trPK('attendance-tracking','shift-time')}}</ion-label>
|
||||||
|
<ion-label class="shift-text shift-title">{{attendanceTrackingList.P_SHT_NAME}} </ion-label>
|
||||||
|
</ion-col>
|
||||||
|
</ion-row>
|
||||||
|
<ion-row class="rowBorder">
|
||||||
|
<ion-col [size]="6" class="colBorder">
|
||||||
|
<ion-label class="shift-title"> {{ts.trPK('attendance-tracking','check-in')}}</ion-label>
|
||||||
|
<ion-label class="shift-text shift-title">08:00</ion-label>
|
||||||
|
</ion-col>
|
||||||
|
<ion-col [size]="6" class="colBorder">
|
||||||
|
<ion-label class="shift-title"> {{ts.trPK('attendance-tracking','check-out')}}</ion-label>
|
||||||
|
<ion-label class="shift-text shift-title">08:00 </ion-label>
|
||||||
|
</ion-col>
|
||||||
|
</ion-row>
|
||||||
|
<ion-row style="text-align: center">
|
||||||
|
<ion-col [size]="6" class="colBorder">
|
||||||
|
<ion-label class="shift-title"> {{ts.trPK('attendance-tracking','late-in')}}</ion-label>
|
||||||
|
<ion-label class="shift-text shift-title">08:00 </ion-label>
|
||||||
|
</ion-col>
|
||||||
|
<ion-col [size]="6" class="colBorder">
|
||||||
|
<ion-label class="shift-title"> {{ts.trPK('attendance-tracking','regular')}}</ion-label>
|
||||||
|
<ion-label class="shift-text shift-title">{{attendanceTrackingList.P_SCHEDULED_HOURS | slice:0:-3}} </ion-label>
|
||||||
|
</ion-col>
|
||||||
|
</ion-row>
|
||||||
|
</ion-grid>
|
||||||
|
</div>
|
||||||
|
</ion-content>
|
||||||
@ -0,0 +1,68 @@
|
|||||||
|
ion-content {
|
||||||
|
font-family: WorkSans-Regular;
|
||||||
|
}
|
||||||
|
ion-grid {
|
||||||
|
padding:30px 15px;
|
||||||
|
}
|
||||||
|
.timer-chart{
|
||||||
|
background: #094773;
|
||||||
|
text-align: center;
|
||||||
|
line-height: .7cm;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tracking-content{
|
||||||
|
background: #053c63;
|
||||||
|
min-height: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rowBorder{
|
||||||
|
text-align: center;
|
||||||
|
border-bottom: var(--lightblue) solid 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.shift-text{
|
||||||
|
font-size: 36px;
|
||||||
|
line-height: 36px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.shift-title{
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
color: white !important;
|
||||||
|
}
|
||||||
|
.stopicon{
|
||||||
|
width: 50px;
|
||||||
|
height: 39px;
|
||||||
|
color: #053c63;
|
||||||
|
}
|
||||||
|
|
||||||
|
.divstopBtn{
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stopBtn{
|
||||||
|
height: 89px;
|
||||||
|
width: 89px;
|
||||||
|
background-color: var(--lightblue) !important;
|
||||||
|
border-radius: 50%;
|
||||||
|
display: inline-block;
|
||||||
|
margin-top: -40px;
|
||||||
|
border: solid 5px #053c63;
|
||||||
|
}
|
||||||
|
.colBorder{
|
||||||
|
padding: 20px 0px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.colBorder:nth-child(1){
|
||||||
|
border-right: var(--lightblue) solid 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fixed-shift-timer{
|
||||||
|
margin-top: -50px;
|
||||||
|
margin-bottom: -10px;
|
||||||
|
}
|
||||||
|
.back-button-container{
|
||||||
|
background: #094773;
|
||||||
|
}
|
||||||
|
|
||||||
@ -0,0 +1,27 @@
|
|||||||
|
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { HomeComponent } from './home.component';
|
||||||
|
|
||||||
|
describe('HomeComponent', () => {
|
||||||
|
let component: HomeComponent;
|
||||||
|
let fixture: ComponentFixture<HomeComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ HomeComponent ],
|
||||||
|
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(HomeComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@ -0,0 +1,141 @@
|
|||||||
|
import { Component, OnInit, EventEmitter, Output } from '@angular/core';
|
||||||
|
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
|
||||||
|
import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbored.service';
|
||||||
|
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
|
||||||
|
import {AttendScanService} from '../../hmg-common/services/attend-services/attend-scan.service';
|
||||||
|
import { AttendanceTrackingResponse } from 'src/app/hmg-common/services/dashbored/attendance-tracking.response';
|
||||||
|
import { SharedDataService } from '../../hmg-common/services/shared-data-service/shared-data.service';
|
||||||
|
import { AuthenticatedUser } from 'src/app/hmg-common/services/authentication/models/authenticated-user';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-home',
|
||||||
|
templateUrl: './home.component.html',
|
||||||
|
styleUrls: ['./home.component.scss'],
|
||||||
|
})
|
||||||
|
export class HomeComponent implements OnInit {
|
||||||
|
attendanceTrackingList: any = [];
|
||||||
|
curentDate: any;
|
||||||
|
direction: string;
|
||||||
|
isCheckOut = false;
|
||||||
|
public runTimer = false;
|
||||||
|
public hasStarted = false;
|
||||||
|
public hasFinished = false;
|
||||||
|
public remainingTime: any;
|
||||||
|
public scheduledTime: any;
|
||||||
|
public isCheckedIn = undefined;
|
||||||
|
public displayTime: any;
|
||||||
|
public percent: any;
|
||||||
|
public spentHours: any;
|
||||||
|
public userData = this.sharedData.getSharedData(AuthenticatedUser.SHARED_DATA, false);
|
||||||
|
constructor(
|
||||||
|
public cs: CommonService,
|
||||||
|
public db: DashboredService,
|
||||||
|
public ts: TranslatorService,
|
||||||
|
public attendScanService: AttendScanService,
|
||||||
|
public sharedData: SharedDataService
|
||||||
|
) { }
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
this.showAttendanceTracking();
|
||||||
|
this.curentDate = new Date();
|
||||||
|
this.direction = TranslatorService.getCurrentLanguageName();
|
||||||
|
this.curentDate = this.getHeaderDate(this.curentDate);
|
||||||
|
}
|
||||||
|
|
||||||
|
initTimer() {
|
||||||
|
this.runTimer = false;
|
||||||
|
this.hasStarted = false;
|
||||||
|
this.hasFinished = false;
|
||||||
|
this.percent = 100 - ((this.remainingTime / this.scheduledTime) * 100);
|
||||||
|
this.displayTime = this.getSecondsAsDigitalClock(this.remainingTime);
|
||||||
|
this.startTimer();
|
||||||
|
}
|
||||||
|
|
||||||
|
startTimer() {
|
||||||
|
this.runTimer = true;
|
||||||
|
this.hasStarted = true;
|
||||||
|
this.timerTick();
|
||||||
|
}
|
||||||
|
|
||||||
|
timerTick() {
|
||||||
|
setTimeout(() => {
|
||||||
|
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);
|
||||||
|
this.percent = 100 - newPercent;
|
||||||
|
this.timerTick();
|
||||||
|
} else {
|
||||||
|
this.hasFinished = true;
|
||||||
|
}
|
||||||
|
}, 1000);
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
return seconds;
|
||||||
|
}
|
||||||
|
|
||||||
|
convertAndAssignTime(data) {
|
||||||
|
this.remainingTime = this.convertInSeconds(data.P_REMAINING_HOURS.split(':'));
|
||||||
|
this.scheduledTime = this.convertInSeconds(data.P_SCHEDULED_HOURS.split(':'));
|
||||||
|
this.spentHours = this.convertInSeconds(data.P_SPENT_HOURS.split(':'));
|
||||||
|
this.isCheckedIn = this.spentHours === 0 ? false : true;
|
||||||
|
if (this.isCheckedIn) {
|
||||||
|
this.initTimer();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
showAttendanceTracking() {
|
||||||
|
const request = {
|
||||||
|
P_SELECTED_EMPLOYEE_NUMBER: this.userData.EMPLOYEE_NUMBER
|
||||||
|
};
|
||||||
|
this.db.getAttendanceTracking(request).subscribe((result: AttendanceTrackingResponse) => {
|
||||||
|
if (this.cs.validResponse(result)) {
|
||||||
|
const key = 'GetAttendanceTrackingList';
|
||||||
|
this.convertAndAssignTime(result[key]);
|
||||||
|
this.attendanceTrackingList = result[key];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
getHeaderDate(date: any) {
|
||||||
|
if (this.direction === 'en') {
|
||||||
|
return this.cs.getMonthName(date.getMonth() + 1) + ', ' + date.getDate() + ' ' + date.getFullYear();
|
||||||
|
} else {
|
||||||
|
return this.cs.getMonthNameAr(date.getMonth() + 1) + ', ' + date.getDate() + ' ' + date.getFullYear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
openDialog() {
|
||||||
|
this.cs.confirmAlertDialogAttendance(
|
||||||
|
() => {
|
||||||
|
this.attendScanService.getDeviceLocation();
|
||||||
|
}, this.ts.trPK('general', 'ok'),
|
||||||
|
() => {}, this.ts.trPK('general', 'cancel'),
|
||||||
|
this.ts.trPK('vacation-rule', 'confirmation'),
|
||||||
|
this.ts.trPK('attendance-tracking', 'confirm-alert3')
|
||||||
|
+ '<br/>' + '<br/>' + this.ts.trPK('attendance-tracking', 'confirm-alert1')
|
||||||
|
+ this.ts.trPK('attendance-tracking', 'confirm-alert2')
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,113 @@
|
|||||||
|
<ion-header>
|
||||||
|
<ion-toolbar class="header-toolbar">
|
||||||
|
<ion-buttons slot="start">
|
||||||
|
<ion-back-button color="light" class="btnBack" defaultHref="/home"></ion-back-button>
|
||||||
|
</ion-buttons>
|
||||||
|
<ion-title color="light">{{ts.trPK('attendance','attendance')}}</ion-title>
|
||||||
|
</ion-toolbar>
|
||||||
|
</ion-header>
|
||||||
|
|
||||||
|
|
||||||
|
<ion-content class="colorBG">
|
||||||
|
<div class="header-div">
|
||||||
|
<div class="header-div">
|
||||||
|
<p style="position: absolute; left: 40%; bottom: 65%;">{{currentMonth}}</p>
|
||||||
|
<ion-slides>
|
||||||
|
<ion-slide>
|
||||||
|
<ion-grid class="headerGrid">
|
||||||
|
<div style="color: black;">
|
||||||
|
<!-- <ngx-gauge
|
||||||
|
[type]="gaugeType"
|
||||||
|
[value]="gaugeValue"
|
||||||
|
[label]="gaugeLabel">
|
||||||
|
</ngx-gauge> -->
|
||||||
|
<div class="result-graph">
|
||||||
|
|
||||||
|
<div class="request-heading">
|
||||||
|
|
||||||
|
<span>Open Request Analysis</span>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="result-text-container">
|
||||||
|
|
||||||
|
<h2>287</h2>
|
||||||
|
|
||||||
|
<span>TOTAL <br> OPEN REQUEST</span>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p-chart class="today-graph" type="doughnut" [data]="data" [options]="options"></p-chart>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div style="position: relative;
|
||||||
|
left: 79%;
|
||||||
|
bottom: 35px;
|
||||||
|
color: black;
|
||||||
|
background-color: #22c6b3;
|
||||||
|
width: 20%; height: 6px;">
|
||||||
|
</div>
|
||||||
|
<div style="position: relative;
|
||||||
|
left: 79%;
|
||||||
|
bottom: 20px;
|
||||||
|
color: black;
|
||||||
|
background-color: #094875;
|
||||||
|
width: 20%; height: 6px;">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</ion-grid>
|
||||||
|
|
||||||
|
</ion-slide>
|
||||||
|
</ion-slides>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="margin-top: 45%;">
|
||||||
|
<ion-grid>
|
||||||
|
<ion-row>
|
||||||
|
<ion-col>
|
||||||
|
<ion-grid class="labelGrid">
|
||||||
|
<ion-row>
|
||||||
|
<ion-col>
|
||||||
|
<label style="font-size: 13px;">SCHEDULE</label>
|
||||||
|
|
||||||
|
</ion-col>
|
||||||
|
<ion-col>
|
||||||
|
<h2 style="margin-left: 45%; font-size: 25px;">23</h2>
|
||||||
|
</ion-col>
|
||||||
|
</ion-row>
|
||||||
|
</ion-grid>
|
||||||
|
</ion-col>
|
||||||
|
<ion-col>
|
||||||
|
<ion-grid class="labelGrid">
|
||||||
|
<ion-row>
|
||||||
|
<ion-col>
|
||||||
|
<label style="font-size: 12px;">OFF DAYS</label>
|
||||||
|
</ion-col>
|
||||||
|
<ion-col>
|
||||||
|
<h2 style="margin-left: 45%; font-size: 25px;">08</h2>
|
||||||
|
</ion-col>
|
||||||
|
</ion-row>
|
||||||
|
</ion-grid>
|
||||||
|
</ion-col>
|
||||||
|
<ion-col>
|
||||||
|
<ion-grid class="labelGrid">
|
||||||
|
<label style="font-size: 13px;">NON ANALYZED</label>
|
||||||
|
<h2 style="margin-left: 45%; font-size: 25px;">01</h2>
|
||||||
|
</ion-grid>
|
||||||
|
</ion-col>
|
||||||
|
<ion-col>
|
||||||
|
<ion-grid class="labelGrid">
|
||||||
|
<label style="font-size: 13px;">SHORTAGE HOURS</label>
|
||||||
|
<h2 style="margin-left: 45%; font-size: 25px;">03</h2>
|
||||||
|
</ion-grid>
|
||||||
|
</ion-col>
|
||||||
|
</ion-row>
|
||||||
|
</ion-grid>
|
||||||
|
</div>
|
||||||
|
<div >
|
||||||
|
<ion-grid class="bodyGrid">
|
||||||
|
<app-circle-calendar></app-circle-calendar>
|
||||||
|
</ion-grid>
|
||||||
|
</div>
|
||||||
|
</ion-content>
|
||||||
@ -0,0 +1,242 @@
|
|||||||
|
.colorBG {
|
||||||
|
--background: #f0efef;
|
||||||
|
}
|
||||||
|
.header-div {
|
||||||
|
background: #22c6b3;
|
||||||
|
color: var(--light);
|
||||||
|
text-transform: capitalize;
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
height: 210px;
|
||||||
|
margin-bottom: 60px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.chart-modal .modal-Wrapper {
|
||||||
|
--background: rgb(116, 108, 108) !important;
|
||||||
|
--border-color:white!important ;
|
||||||
|
width: 85%!important ;
|
||||||
|
height: 40px !important ;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar{
|
||||||
|
font-size: 10px !important;
|
||||||
|
--background: #22C6B3 !important;
|
||||||
|
color: aliceblue !important;
|
||||||
|
// margin-top: 10px !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu{
|
||||||
|
// margin-left:330px !important;
|
||||||
|
margin-top: 0px !important;
|
||||||
|
font-size: 35px !important;
|
||||||
|
background: #22C6B3;
|
||||||
|
color: aliceblue;
|
||||||
|
margin-left: 0px !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.person{
|
||||||
|
|
||||||
|
margin-left:100px !important;
|
||||||
|
margin-top: 0px !important;
|
||||||
|
font-size: 23px !important;
|
||||||
|
background: #22C6B3 !important;
|
||||||
|
color: aliceblue !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid{
|
||||||
|
margin-bottom: 550px !important;
|
||||||
|
margin-top: 20px !important;
|
||||||
|
margin-left: 15px !important;
|
||||||
|
margin-right: 15px !important;
|
||||||
|
background-color:white !important;
|
||||||
|
border-radius: 20px !important;
|
||||||
|
height: 250px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.headerGrid{
|
||||||
|
margin-bottom: 550px !important;
|
||||||
|
margin-top: 80px !important;
|
||||||
|
margin-left: 15px !important;
|
||||||
|
margin-right: 15px !important;
|
||||||
|
background-color:white !important;
|
||||||
|
border-radius: 20px !important;
|
||||||
|
height: 250px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bodyGrid{
|
||||||
|
margin-bottom: 550px !important;
|
||||||
|
margin-top: 20px !important;
|
||||||
|
margin-left: 15px !important;
|
||||||
|
margin-right: 15px !important;
|
||||||
|
background-color:white !important;
|
||||||
|
border-radius: 20px !important;
|
||||||
|
height: 270px !important;
|
||||||
|
}
|
||||||
|
.labelGrid{
|
||||||
|
margin-top: -30px !important;
|
||||||
|
background-color:white !important;
|
||||||
|
border-radius: 20px !important;
|
||||||
|
height: 100px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ionSliders{
|
||||||
|
margin: 0px !important;
|
||||||
|
padding: 0px !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.ionSlide{
|
||||||
|
margin-top: 5px !important;
|
||||||
|
margin-left: 190px !important;
|
||||||
|
color: black !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
.dateLable{
|
||||||
|
|
||||||
|
margin-left: 90px !important;
|
||||||
|
color: black !important;
|
||||||
|
font-size: small !important;
|
||||||
|
margin-top: 15px !important;
|
||||||
|
}
|
||||||
|
// h1{
|
||||||
|
// font-size: 15px !important;
|
||||||
|
// text-align: center !important;
|
||||||
|
// }
|
||||||
|
.arrowDropright{
|
||||||
|
margin-left:100px !important;
|
||||||
|
font-size: 20px !important;
|
||||||
|
color: rgb(168, 165, 165) !important;
|
||||||
|
margin-top: 15px !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
.arrowDropleft{
|
||||||
|
font-size: 20px !important;
|
||||||
|
margin-left: 10px !important;
|
||||||
|
margin-top: 15px !important;
|
||||||
|
color: rgb(116, 108, 108) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ionLable{
|
||||||
|
font-size: 10px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.number{
|
||||||
|
|
||||||
|
font-size: 18px !important;
|
||||||
|
font-weight: bolder !important;
|
||||||
|
color: black !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-div{
|
||||||
|
background:var(--primary);
|
||||||
|
background: -moz-linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%);
|
||||||
|
background: -webkit-linear-gradient(45deg, (--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%);
|
||||||
|
background: #22C6B3;
|
||||||
|
// background: linear-gradient(90deg, #85C48D 0%, #85C48D 13%, #2BB5C6 98%, #2BB5C6 100%);
|
||||||
|
color:var(--light);
|
||||||
|
text-transform: capitalize;
|
||||||
|
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
height: 210px;
|
||||||
|
margin-bottom:60px;
|
||||||
|
// border-radius: 0px 0px 70px 70px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.request-heading {
|
||||||
|
|
||||||
|
span {
|
||||||
|
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
display: block;
|
||||||
|
|
||||||
|
padding-top: 8px;
|
||||||
|
|
||||||
|
font-family: workSans-Regular;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.result-graph {
|
||||||
|
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
background: white;
|
||||||
|
|
||||||
|
margin-right: 20px;
|
||||||
|
|
||||||
|
margin-left: 20px;
|
||||||
|
|
||||||
|
margin-top: 20px;
|
||||||
|
|
||||||
|
padding-bottom: 20px;
|
||||||
|
|
||||||
|
border-radius: 20px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.result-text-container {
|
||||||
|
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
margin: 0;
|
||||||
|
|
||||||
|
position: absolute;
|
||||||
|
|
||||||
|
left: 50%;
|
||||||
|
|
||||||
|
top: 50%;
|
||||||
|
|
||||||
|
display: block;
|
||||||
|
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
|
||||||
|
font-size: 38px;
|
||||||
|
|
||||||
|
font-family: WorkSans-Bold;
|
||||||
|
|
||||||
|
margin: 0 auto;
|
||||||
|
|
||||||
|
line-height: 36px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
span {
|
||||||
|
|
||||||
|
width: 125px;
|
||||||
|
|
||||||
|
display: block;
|
||||||
|
|
||||||
|
margin: 0 auto;
|
||||||
|
|
||||||
|
font-size: 12px;
|
||||||
|
|
||||||
|
font-family: workSans-Regular;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@ -0,0 +1,27 @@
|
|||||||
|
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { MonthlyAttendanceComponent } from './monthly-attendance.component';
|
||||||
|
|
||||||
|
describe('MonthlyAttendanceComponent', () => {
|
||||||
|
let component: MonthlyAttendanceComponent;
|
||||||
|
let fixture: ComponentFixture<MonthlyAttendanceComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ MonthlyAttendanceComponent ],
|
||||||
|
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(MonthlyAttendanceComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@ -0,0 +1,101 @@
|
|||||||
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
import { CommonService } from '../../hmg-common/services/common/common.service';
|
||||||
|
import { TranslatorService } from '../../hmg-common/services/translator/translator.service';
|
||||||
|
import { SharedDataService } from '../../hmg-common/services/shared-data-service/shared-data.service';
|
||||||
|
import { GetSubordinatesAttdStatusRequest } from 'src/app/hmg-common/services/dashbored/models/GetSubordinatesAttdStatusRequest';
|
||||||
|
import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbored.service';
|
||||||
|
import { GetSubordinatesAttdStatusResponse } from 'src/app/hmg-common/services/dashbored/models/GetSubordinatesAttdStatusResponse';
|
||||||
|
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-monthly-attendance',
|
||||||
|
templateUrl: './monthly-attendance.component.html',
|
||||||
|
styleUrls: ['./monthly-attendance.component.scss'],
|
||||||
|
})
|
||||||
|
export class MonthlyAttendanceComponent implements OnInit {
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
private cs: CommonService,
|
||||||
|
public ts: TranslatorService,
|
||||||
|
public sharedData: SharedDataService,
|
||||||
|
public DS: DashboredService) { }
|
||||||
|
gaugeType = 'full';
|
||||||
|
gaugeValue = 28.3;
|
||||||
|
gaugeLabel = 'Days';
|
||||||
|
// gaugeAppendText = "km/hr";
|
||||||
|
|
||||||
|
|
||||||
|
currentMonth: any;
|
||||||
|
todayYear: any;
|
||||||
|
todayMonth: any;
|
||||||
|
public options = {
|
||||||
|
|
||||||
|
cutoutPercentage: 80,
|
||||||
|
|
||||||
|
tooltips: { enabled: false },
|
||||||
|
|
||||||
|
legend: { display: false }
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public data = {
|
||||||
|
|
||||||
|
datasets: [
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
data: [120, 50],
|
||||||
|
|
||||||
|
backgroundColor: [
|
||||||
|
|
||||||
|
'#22c6b3',
|
||||||
|
|
||||||
|
'#094875',
|
||||||
|
],
|
||||||
|
|
||||||
|
borderWidth: 2
|
||||||
|
|
||||||
|
}]
|
||||||
|
|
||||||
|
};
|
||||||
|
ngOnInit() { }
|
||||||
|
|
||||||
|
ionViewWillEnter() {
|
||||||
|
this.currentMonth = this.sharedData.getSharedData("currentMonth");
|
||||||
|
console.log(this.currentMonth);
|
||||||
|
let day = this.currentMonth.split(" ");
|
||||||
|
this.todayMonth =day[0];
|
||||||
|
this.todayYear = day[1];
|
||||||
|
this.todayYear = parseInt(this.todayYear);
|
||||||
|
console.log("MONTH: " +this.todayMonth);
|
||||||
|
console.log("YEAR: " +this.todayYear);
|
||||||
|
this.getSubordinatesAttStatus()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
getSubordinatesAttStatus() {
|
||||||
|
let request: GetSubordinatesAttdStatusRequest = new GetSubordinatesAttdStatusRequest();
|
||||||
|
// request.P_SCHEDULE_DATE_FROM = "/Date(1578603600000+0300)/"; //test
|
||||||
|
// request.P_SCHEDULE_DATE_TO = "/Date(1576011600000+0300)/";//test
|
||||||
|
console.log(this.currentMonth);
|
||||||
|
request.SearchMonth = this.todayMonth;
|
||||||
|
request.SearchYear = 2019//this.todayYear;
|
||||||
|
|
||||||
|
this.DS.getSubordinatesAttStatus(request, () => { console.log("Error "); }).subscribe((result: GetSubordinatesAttdStatusResponse) => {
|
||||||
|
if (this.cs.validResponse(result)) {
|
||||||
|
console.log("response");
|
||||||
|
console.log(result);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
x(){
|
||||||
|
console.log("ENAD CHANge")
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,31 @@
|
|||||||
|
.login-input {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
.item-input{
|
||||||
|
--min-height: 1.0cm !important;
|
||||||
|
--border-radius: 12px;
|
||||||
|
--ion-color-base: white !important;
|
||||||
|
// --background: color: var(--darkgray) !important;
|
||||||
|
// background: #7f8c8d !important;
|
||||||
|
border-radius: 33px;
|
||||||
|
--border: solid #9999992b !important;
|
||||||
|
border: solid #9999992b !important;
|
||||||
|
margin-bottom :12px;
|
||||||
|
margin-left: 12px;
|
||||||
|
margin-right: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-login{
|
||||||
|
|
||||||
|
--background: var(--newgreen) !important;
|
||||||
|
background: var(--newgreen) !important;
|
||||||
|
white-space: normal;
|
||||||
|
color: var(--light);
|
||||||
|
text-transform: capitalize;
|
||||||
|
min-height: 1.0cm;
|
||||||
|
--border-radius: 33px !important;
|
||||||
|
border-radius: 33px !important;
|
||||||
|
--min-height: 1.6cm !important;
|
||||||
|
width: 315px;
|
||||||
|
}
|
||||||
|
|
||||||
@ -0,0 +1,10 @@
|
|||||||
|
.content-class {
|
||||||
|
height: 25vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rowOutside{
|
||||||
|
// margin-top: -37px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
<p>
|
||||||
|
welcome works!
|
||||||
|
</p>
|
||||||
@ -0,0 +1,27 @@
|
|||||||
|
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { WelcomeComponent } from './welcome.component';
|
||||||
|
|
||||||
|
describe('WelcomeComponent', () => {
|
||||||
|
let component: WelcomeComponent;
|
||||||
|
let fixture: ComponentFixture<WelcomeComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ WelcomeComponent ],
|
||||||
|
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(WelcomeComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-welcome',
|
||||||
|
templateUrl: './welcome.component.html',
|
||||||
|
styleUrls: ['./welcome.component.scss'],
|
||||||
|
})
|
||||||
|
export class WelcomeComponent implements OnInit {
|
||||||
|
|
||||||
|
constructor() { }
|
||||||
|
|
||||||
|
ngOnInit() {}
|
||||||
|
|
||||||
|
}
|
||||||