Compare commits
No commits in common. 'itg-new-design' and 'master' have entirely different histories.
itg-new-de
...
master
|
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 93 KiB |
|
Before Width: | Height: | Size: 105 KiB After Width: | Height: | Size: 128 KiB |
|
Before Width: | Height: | Size: 142 KiB After Width: | Height: | Size: 161 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 91 KiB |
|
Before Width: | Height: | Size: 96 KiB After Width: | Height: | Size: 122 KiB |
|
Before Width: | Height: | Size: 137 KiB After Width: | Height: | Size: 154 KiB |
|
Before Width: | Height: | Size: 200 KiB After Width: | Height: | Size: 175 KiB |
|
Before Width: | Height: | Size: 132 KiB After Width: | Height: | Size: 210 KiB |
@ -1,33 +1,32 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
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' }
|
||||
import { NgModule } from '@angular/core';
|
||||
import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
|
||||
|
||||
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
/*RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules}),*/
|
||||
RouterModule.forRoot(routes),
|
||||
],
|
||||
exports: [RouterModule]
|
||||
})
|
||||
export class AppRoutingModule { }
|
||||
|
||||
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' }
|
||||
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
/*RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules}),*/
|
||||
RouterModule.forRoot(routes),
|
||||
],
|
||||
exports: [RouterModule]
|
||||
})
|
||||
export class AppRoutingModule { }
|
||||
|
||||
@ -1,38 +0,0 @@
|
||||
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 {}
|
||||
@ -1,3 +0,0 @@
|
||||
<ion-content>
|
||||
<ion-router-outlet></ion-router-outlet>
|
||||
</ion-content>
|
||||
@ -1,27 +0,0 @@
|
||||
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();
|
||||
});
|
||||
});
|
||||
@ -1,15 +0,0 @@
|
||||
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() {
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,89 +0,0 @@
|
||||
<!-- <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>
|
||||
@ -1,68 +0,0 @@
|
||||
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;
|
||||
}
|
||||
|
||||
@ -1,27 +0,0 @@
|
||||
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();
|
||||
});
|
||||
});
|
||||
@ -1,129 +0,0 @@
|
||||
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';
|
||||
@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;
|
||||
constructor(
|
||||
public cs: CommonService,
|
||||
public db: DashboredService,
|
||||
public ts: TranslatorService,
|
||||
public attendScanService: AttendScanService
|
||||
) { }
|
||||
|
||||
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.isCheckedIn = this.remainingTime === this.scheduledTime ? false : true;
|
||||
this.initTimer();
|
||||
}
|
||||
|
||||
showAttendanceTracking() {
|
||||
this.db.getAttendanceTracking() .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')
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -1,31 +0,0 @@
|
||||
.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;
|
||||
}
|
||||
|
||||
@ -1,10 +0,0 @@
|
||||
.content-class {
|
||||
height: 25vh;
|
||||
}
|
||||
|
||||
.rowOutside{
|
||||
// margin-top: -37px;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
<p>
|
||||
welcome works!
|
||||
</p>
|
||||
@ -1,27 +0,0 @@
|
||||
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();
|
||||
});
|
||||
});
|
||||
@ -1,14 +0,0 @@
|
||||
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() {}
|
||||
|
||||
}
|
||||
@ -1,12 +0,0 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { AttendScanService } from './attend-scan.service';
|
||||
|
||||
describe('AttendScanService', () => {
|
||||
beforeEach(() => TestBed.configureTestingModule({}));
|
||||
|
||||
it('should be created', () => {
|
||||
const service: AttendScanService = TestBed.get(AttendScanService);
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -1,123 +0,0 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
// import { DevicePermissionsService } from '../device-permissions/device-permissions.service';
|
||||
import { DomSanitizer } from '@angular/platform-browser';
|
||||
import { SharedDataService } from '../shared-data-service/shared-data.service';
|
||||
import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';
|
||||
import { AttendanceService } from 'src/app/home/services/attendance.services';
|
||||
import { ZBar } from '@ionic-native/zbar/ngx';
|
||||
import { Geolocation } from "@ionic-native/geolocation/ngx";
|
||||
import { attendanceSwipeScannerRequest } from 'src/app/home/models/attendanceSwipe.Request';
|
||||
import { AuthenticatedUser } from '../authentication/models/authenticated-user';
|
||||
import { CommonService } from '../common/common.service';
|
||||
import { TranslatorService } from '../translator/translator.service';
|
||||
import { Response } from "src/app/hmg-common/services/models/response";
|
||||
import { Camera, CameraOptions,PictureSourceType} from "@ionic-native/Camera/ngx";
|
||||
import { DevicePermissionsService } from '../../services/device-permissions/device-permissions.service'
|
||||
import { Device } from "@ionic-native/device/ngx";
|
||||
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class AttendScanService {
|
||||
location: boolean;
|
||||
camera: boolean;
|
||||
lat: any;
|
||||
longt: any;
|
||||
deviceID: string;
|
||||
scannedResult: any;
|
||||
userData: any = {};
|
||||
constructor(private device: Device,
|
||||
private zbar: ZBar,
|
||||
private geolocation: Geolocation,
|
||||
private attendance_service: AttendanceService,
|
||||
private barcodeScanner: BarcodeScanner,
|
||||
private cameraController: Camera,
|
||||
public sharedData: SharedDataService,
|
||||
private sanitizer: DomSanitizer,
|
||||
private permissions: DevicePermissionsService,
|
||||
public common:CommonService,
|
||||
public ts: TranslatorService,) {
|
||||
this.userData =this.common.sharedService.getSharedData(AuthenticatedUser.SHARED_DATA,false);
|
||||
}
|
||||
|
||||
public getDeviceLocation() {
|
||||
let isVirtual = this.device.isVirtual;
|
||||
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 })
|
||||
.then(resp => {
|
||||
// console.log(resp.coords.latitude);
|
||||
// console.log(resp.coords.longitude);
|
||||
this.lat = resp.coords.latitude;
|
||||
this.longt = resp.coords.longitude;
|
||||
this.attendance();
|
||||
})
|
||||
.catch(error => {
|
||||
console.log("Error getting location", error);
|
||||
});
|
||||
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public attendance() {
|
||||
this.permissions.requestCameraAutherization().then(granted => {
|
||||
this.camera = granted as boolean;
|
||||
if (this.camera) {
|
||||
this.scanCode();
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
public scanCode() {
|
||||
this.barcodeScanner.scan().then(barcodeData => {
|
||||
console.log('Barcode data', barcodeData);
|
||||
// let strResult = JSON.parse(barcodeData);
|
||||
// console.log(strResult.QRValue);
|
||||
this.scannedResult = barcodeData;
|
||||
this.deviceID = this.device.uuid;
|
||||
this.swipeAttendance();
|
||||
}).catch(err => {
|
||||
console.log('Error', err);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public swipeAttendance() {
|
||||
let 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("request");
|
||||
console.log(JSON.stringify(request));
|
||||
this.attendance_service
|
||||
.attendanceSwipeScanner(request, () => {
|
||||
console.log("Error inside in swipe attendance");
|
||||
})
|
||||
.subscribe((result: Response) => {
|
||||
if (this.common.validResponse(result)) {
|
||||
console.log("response");
|
||||
console.log(result);
|
||||
this.common.presentAlert(this.ts.trPK("home", "swipeAlertSuccess"));
|
||||
} else {
|
||||
this.common.presentAlert(this.ts.trPK("home", "swipeAlertFailed"));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -1,10 +0,0 @@
|
||||
|
||||
|
||||
export class AttendanceTrackingList {
|
||||
public P_REMAINING_HOURS: string;
|
||||
public P_RETURN_MSG: string;
|
||||
public P_RETURN_STATUS: string;
|
||||
public P_SCHEDULED_HOURS: string;
|
||||
public P_SHT_NAME: string;
|
||||
public P_SPENT_HOURS: string;
|
||||
}
|
||||
@ -1,5 +0,0 @@
|
||||
export class OpenMissingSwipesList {
|
||||
public P_OPEN_MISSING_SWIPES: number;
|
||||
public P_RETURN_STATUS: string;
|
||||
public P_RETURN_MSG: string;
|
||||
}
|
||||
@ -1,4 +0,0 @@
|
||||
export class OrganizationsSalariesList{
|
||||
public ORGANIZATION_NAME :string;
|
||||
public ORGANIZATIONS_SALARIES : number;
|
||||
}
|
||||
@ -1,6 +0,0 @@
|
||||
|
||||
export class PerformanceAppraisalList{
|
||||
public APPRAISAL_SCORE :string;
|
||||
public APPRAISAL_YEAR : number;
|
||||
|
||||
}
|
||||
@ -1,8 +0,0 @@
|
||||
|
||||
|
||||
import { Response } from 'src/app/hmg-common/services/models/response';
|
||||
import { AttendanceTrackingList } from './AttensanceTrackingList';
|
||||
|
||||
export class AttendanceTrackingResponse extends Response {
|
||||
public GetGetAttendanceTrackingList: AttendanceTrackingList[];
|
||||
}
|
||||
@ -1,12 +0,0 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { DashboredService } from './dashbored.service';
|
||||
|
||||
describe('DashboredService', () => {
|
||||
beforeEach(() => TestBed.configureTestingModule({}));
|
||||
|
||||
it('should be created', () => {
|
||||
const service: DashboredService = TestBed.get(DashboredService);
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -1,99 +0,0 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service';
|
||||
import { ConnectorService } from 'src/app/hmg-common/services/connector/connector.service';
|
||||
import { Observable } from 'rxjs';
|
||||
import { Request } from 'src/app/hmg-common/services/models/request';
|
||||
import { OrganizationSalariesResponse } from './organization-salaries.response';
|
||||
import { OpenMissingSwipesResponse } from './open-missing-swipes.response';
|
||||
import { PerformanceAppraisalResponse } from './performance-appraisal.response';
|
||||
import {AttendanceTrackingResponse} from './attendance-tracking.response'
|
||||
|
||||
import {OpenPeriodDatesResponse} from '../../services/dashbored/models/openPeriodDatesResponse'
|
||||
import {GetSubordinatesLeavesRequest} from './models/GetSubordinatesLeavesRequest';
|
||||
import {GetSubordinatesLeavesResponse} from './models/GetSubordinatesLeavesResponse';
|
||||
import {GetSubordinatesAttdStatusRequest} from './models/GetSubordinatesAttdStatusRequest';
|
||||
import {GetSubordinatesAttdStatusResponse} from './models/GetSubordinatesAttdStatusResponse';
|
||||
import {GetOpenNotificationsResponse} from './models/GetOpenNotificationsResponse'
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class DashboredService {
|
||||
public static organizationSalariesUrl = 'Services/ERP.svc/REST/GET_ORGANIZATIONS_SALARIES';
|
||||
public static openMissingSwipesUrl = 'Services/ERP.svc/REST/GET_OPEN_MISSING_SWIPES';
|
||||
public static performanceappraisalUrl = 'Services/ERP.svc/REST/GET_Performance_Appraisal';
|
||||
public static attendancetrackingUrl = 'Services/ERP.svc/REST/GET_Attendance_Tracking';
|
||||
|
||||
public static getOpenPeriodDates = 'Services/ERP.svc/REST/GET_OPEN_PERIOD_DATES';
|
||||
public static getOpenNotifications = 'Services/ERP.svc/REST/GET_OPEN_NOTIFICATIONS';
|
||||
public static getSubordinatesLeaves = 'Services/ERP.svc/REST/GET_SUBORDINATES_LEAVES';
|
||||
public static getSubordinatesAttStatus = 'Services/ERP.svc/REST/GET_SUBORDINATES_ATTD_STATUS';
|
||||
|
||||
constructor(
|
||||
public con: ConnectorService,
|
||||
public authService: AuthenticationService,
|
||||
) { }
|
||||
|
||||
public getOrganizationSalaries(onError ?: any ,oerrorLable ?: any): Observable<OrganizationSalariesResponse>{
|
||||
const request = new Request();
|
||||
this.authService.authenticateRequest(request);
|
||||
return this.con.post(
|
||||
DashboredService.organizationSalariesUrl,
|
||||
request,
|
||||
onError,
|
||||
oerrorLable
|
||||
);}
|
||||
|
||||
public getOpenMissingSwipes(onError ?: any, oerrorLable ?: any): Observable<OpenMissingSwipesResponse> {
|
||||
const request = new Request();
|
||||
this.authService.authenticateRequest(request);
|
||||
return this.con.post(
|
||||
DashboredService.openMissingSwipesUrl,
|
||||
request,
|
||||
onError,
|
||||
oerrorLable
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
public getPerformanceAppraisal(onError ?: any ,oerrorLable ?: any): Observable<PerformanceAppraisalResponse>{
|
||||
const request = new Request();
|
||||
this.authService.authenticateRequest(request);
|
||||
return this.con.post(
|
||||
DashboredService.performanceappraisalUrl,
|
||||
request,
|
||||
onError,
|
||||
oerrorLable
|
||||
);
|
||||
}
|
||||
public getAttendanceTracking(onError ?: any ,oerrorLable ?: any): Observable<AttendanceTrackingResponse>{
|
||||
const request = new Request();
|
||||
this.authService.authenticateRequest(request);
|
||||
return this.con.post(
|
||||
DashboredService.attendancetrackingUrl,
|
||||
request,
|
||||
onError,
|
||||
oerrorLable
|
||||
);
|
||||
}
|
||||
public getOpenPeriodDates( onError?: any, errorLabel?: string): Observable<OpenPeriodDatesResponse> {
|
||||
const request = new Request();
|
||||
this.authService.authenticateRequest(request);
|
||||
return this.con.post(DashboredService.getOpenPeriodDates, request, onError, errorLabel);
|
||||
}
|
||||
public getOpenNotifications( onError?: any, errorLabel?: string): Observable<GetOpenNotificationsResponse> {
|
||||
const request = new Request();
|
||||
this.authService.authenticateRequest(request);
|
||||
return this.con.post(DashboredService.getOpenNotifications, request, onError, errorLabel);
|
||||
}
|
||||
public getSubordinatesLeaves( req: GetSubordinatesLeavesRequest,onError?: any, errorLabel?: string): Observable<GetSubordinatesLeavesResponse> {
|
||||
this.authService.authenticateRequest(req);
|
||||
return this.con.post(DashboredService.getSubordinatesLeaves, req, onError, errorLabel);
|
||||
}
|
||||
public getSubordinatesAttStatus( req: GetSubordinatesAttdStatusRequest, onError?: any, errorLabel?: string): Observable<GetSubordinatesAttdStatusResponse> {
|
||||
this.authService.authenticateRequest(req);
|
||||
return this.con.post(DashboredService.getSubordinatesAttStatus, req, onError, errorLabel);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -1,6 +0,0 @@
|
||||
export class GetOpenNotificationsList {
|
||||
public ITEM_TYPE: number;
|
||||
public ITEM_TYPE_DISPLAY_NAME: number;
|
||||
public OPEN_NTF_NUMBER: number;
|
||||
public P_OPEN_NTF_NUMBER: number;
|
||||
}
|
||||
@ -1,7 +0,0 @@
|
||||
import { GetOpenNotificationsList } from './GetOpenNotificationsList';
|
||||
import { Response } from '../../../services/models/response'
|
||||
|
||||
|
||||
export class GetOpenNotificationsResponse extends Response {
|
||||
public GetOpenNotificationsList: GetOpenNotificationsList [];
|
||||
}
|
||||
@ -1,16 +0,0 @@
|
||||
export class GetSubordinatesAttdStatusList
|
||||
|
||||
{
|
||||
public NUMBER_OF_EMPLOYEES: number;
|
||||
|
||||
public LATE_IN:number;
|
||||
|
||||
public EARLY_OUT:number;
|
||||
|
||||
public ON_TIME:number;
|
||||
|
||||
public ABSENCE:number;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -1,7 +0,0 @@
|
||||
import { Request } from '../../../services/models/request'
|
||||
|
||||
export class GetSubordinatesAttdStatusRequest extends Request{
|
||||
//public static SHARED_DATA = '';
|
||||
public P_SCHEDULE_DATE_FROM :any;
|
||||
public P_SCHEDULE_DATE_TO :any;
|
||||
}
|
||||
@ -1,7 +0,0 @@
|
||||
import { GetSubordinatesAttdStatusList } from './GetSubordinatesAttdStatusList';
|
||||
import { Response } from '../../../services/models/response'
|
||||
|
||||
|
||||
export class GetSubordinatesAttdStatusResponse extends Response {
|
||||
public GetSubordinatesAttdStatusList: GetSubordinatesAttdStatusList [];
|
||||
}
|
||||
@ -1,35 +0,0 @@
|
||||
export class GetSubordinatesLeavesList
|
||||
|
||||
{
|
||||
public LVL: number;
|
||||
|
||||
public EMPLOYEE_NUMBER:String;
|
||||
|
||||
public EMPLOYEE_NAME:String;
|
||||
|
||||
public ORGANIZATION_ID:number;
|
||||
|
||||
public ORGANIZATION_NAME:String
|
||||
|
||||
public SUPERVISOR_NUMBER:String;
|
||||
|
||||
public SUPERVISOR_NAME:String;
|
||||
|
||||
public SUPERVISOR_ORGANIZATION_ID:number;
|
||||
|
||||
public SUPERVISOR_ORGANIZATION_NAME:String;
|
||||
|
||||
public EVENT_DATE:any;//DATE;
|
||||
|
||||
public LEAVE_TYPE:String;
|
||||
|
||||
public DATE_START:any;//DATE;
|
||||
|
||||
public DATE_END:any;//DATE;
|
||||
|
||||
public ABSENCE_ATTENDANCE_TYPE_NAME:String;
|
||||
|
||||
public CALENDAR_ENTRY_DESC:String;
|
||||
|
||||
public STATUS:String;
|
||||
}
|
||||
@ -1,8 +0,0 @@
|
||||
import { Request } from '../../../services/models/request'
|
||||
|
||||
export class GetSubordinatesLeavesRequest extends Request{
|
||||
//public static SHARED_DATA = '';
|
||||
public P_DATE_FROM :any;
|
||||
public P_DATE_TO :any;
|
||||
public P_SELECTED_EMPLOYEE_NUMBER:any;
|
||||
}
|
||||
@ -1,7 +0,0 @@
|
||||
import { GetSubordinatesLeavesList } from './GetSubordinatesLeavesList';
|
||||
import { Response } from '../../../services/models/response'
|
||||
|
||||
|
||||
export class GetSubordinatesLeavesResponse extends Response {
|
||||
public GetSubordinatesLeavesList: GetSubordinatesLeavesList [];
|
||||
}
|
||||
@ -1,7 +0,0 @@
|
||||
export class OpenPeriodDatesList {
|
||||
public P_CLOSING_PERIOD_DATE: any;
|
||||
public P_PERIOD_END_DATE: any;
|
||||
public P_PERIOD_START_DATE: any;
|
||||
public P_RETURN_MSG: string;
|
||||
public P_RETURN_STATUS: string;
|
||||
}
|
||||
@ -1,7 +0,0 @@
|
||||
import { OpenPeriodDatesList } from './openPeriodDatesList';
|
||||
import { Response } from '../../../services/models/response'
|
||||
|
||||
|
||||
export class OpenPeriodDatesResponse extends Response {
|
||||
public openPeriodDatesList: OpenPeriodDatesList [];
|
||||
}
|
||||
@ -1,8 +0,0 @@
|
||||
|
||||
|
||||
import { Response } from "src/app/hmg-common/services/models/response";
|
||||
import { OpenMissingSwipesList } from './OpenMissingSwipesList';
|
||||
|
||||
export class OpenMissingSwipesResponse extends Response{
|
||||
public GetGetOpenMissingSwipesList: OpenMissingSwipesList[];
|
||||
}
|
||||
@ -1,6 +0,0 @@
|
||||
import { Response } from "src/app/hmg-common/services/models/response";
|
||||
import { OrganizationsSalariesList } from './OrganizationsSalariesList';
|
||||
|
||||
export class OrganizationSalariesResponse extends Response{
|
||||
public GetGetOrganizationsSalariesList : OrganizationsSalariesList[];
|
||||
}
|
||||
@ -1,11 +0,0 @@
|
||||
|
||||
|
||||
|
||||
import { Response } from "src/app/hmg-common/services/models/response";
|
||||
import { PerformanceAppraisalList } from './PerformanceAppraisalList';
|
||||
|
||||
export class PerformanceAppraisalResponse extends Response{
|
||||
public GetPerformanceAppraisalList :PerformanceAppraisalList[];
|
||||
public static PERFORMANCE_DATA = "PERFORMANCE_DATA"
|
||||
|
||||
}
|
||||
@ -1,5 +0,0 @@
|
||||
<div class="main-container" [ngStyle]="active === true ? {'background': color} : {}">
|
||||
<div class="main-container-radius" [ngStyle]="active === true ? {'background-color': '#ffffff'} : {'background-color': color}"></div>
|
||||
<span class="number-span" [ngStyle]="active === true ? {'color': '#ffffff'} : {}">{{value}}</span>
|
||||
<span class="text-span" [ngStyle]="active === true ? {'color': '#ffffff'} : {}">{{text}}</span>
|
||||
</div>
|
||||