Compare commits
26 Commits
master
...
attend-tra
| Author | SHA1 | Date |
|---|---|---|
|
|
9b58f9e9e0 | 6 years ago |
|
|
4fe49bdb18 | 6 years ago |
|
|
6d3dd907a6 | 6 years ago |
|
|
81504b0491 | 6 years ago |
|
|
5df30f114b | 6 years ago |
|
|
5b7e435a31 | 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 |
|
|
5c7a30f308 | 6 years ago |
|
|
13df9b7b75 | 6 years ago |
|
|
d5407c8f90 | 6 years ago |
|
|
7456ab6e0a | 6 years ago |
|
|
4bdc08b42d | 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 |
@ -1,32 +1,33 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
|
||||
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' }
|
||||
|
||||
|
||||
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 { }
|
||||
|
||||
];
|
||||
|
||||
@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,61 @@
|
||||
<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-content>
|
||||
<div class="timer-chart">
|
||||
|
||||
<ion-label class="shift-title" style="font-weight: bold"> {{cuurentDate}}</ion-label><br/>
|
||||
<ion-label class="shift-title"> {{ts.trPK('attendance-tracking','today-time-left')}}</ion-label>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div *ngIf="attendanceTrackingList" class="tracking-content">
|
||||
<div class="divstopBtn">
|
||||
<button *ngIf="!isCheckOut"(click)="openDialog();" class="stopBtn" ion-button>
|
||||
<ion-icon class="stopicon" name="pause"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
<ion-grid>
|
||||
|
||||
<ion-row class="rowBorder">
|
||||
<ion-label class="shift-title">{{ts.trPK('attendance-tracking','shift-time')}}</ion-label>
|
||||
<br /><br />
|
||||
<ion-label class="shift-text shift-title">{{attendanceTrackingList.P_SHT_NAME}} </ion-label>
|
||||
</ion-row>
|
||||
<ion-row class="rowBorder">
|
||||
<ion-col class="colBorder">
|
||||
<ion-label class="shift-title"> {{ts.trPK('attendance-tracking','check-in')}}</ion-label>
|
||||
<br /><br />
|
||||
<ion-label class="shift-text shift-title">08:00</ion-label>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<ion-label class="shift-title"> {{ts.trPK('attendance-tracking','check-out')}}</ion-label>
|
||||
<br /><br />
|
||||
<ion-label class="shift-text shift-title">08:00 </ion-label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row style="text-align: center">
|
||||
<ion-col class="colBorder">
|
||||
<ion-label class="shift-title"> {{ts.trPK('attendance-tracking','late-in')}}</ion-label>
|
||||
<br /><br />
|
||||
<ion-label class="shift-text shift-title">08:00 </ion-label>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<ion-label class="shift-title"> {{ts.trPK('attendance-tracking','regular')}}</ion-label>
|
||||
<br /><br />
|
||||
<ion-label class="shift-text shift-title">{{attendanceTrackingList.P_SCHEDULED_HOURS}} </ion-label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
|
||||
|
||||
</div>
|
||||
</ion-content>
|
||||
@ -0,0 +1,52 @@
|
||||
.timer-chart{
|
||||
padding-top:18px;
|
||||
background: #094773;
|
||||
height: 50%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.tracking-content{
|
||||
background: #053c63;
|
||||
height: 50%;
|
||||
}
|
||||
.rowBorder{
|
||||
text-align: center;
|
||||
border-bottom: var(--lightblue) solid 1px;
|
||||
}
|
||||
|
||||
.shift-text{
|
||||
// text-align: center;
|
||||
// width: 100%;
|
||||
// color: white !important;
|
||||
margin-bottom: 12px;
|
||||
margin-top: -9px;
|
||||
font-size: 30px;
|
||||
}
|
||||
.shift-title{
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
color: white !important;
|
||||
}
|
||||
.stopicon{
|
||||
width: 50px;
|
||||
height: 39px;
|
||||
color: #053c63;
|
||||
}
|
||||
|
||||
.divstopBtn{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.stopBtn{
|
||||
height: 70px;
|
||||
width: 70px;
|
||||
background-color: var(--lightblue) !important;
|
||||
border-radius: 50%;
|
||||
display: inline-block;
|
||||
margin-top: -24px;
|
||||
border: solid 3px #053c63;
|
||||
}
|
||||
.colBorder{
|
||||
border-right: var(--lightblue) solid 1px;
|
||||
}
|
||||
|
||||
@ -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,85 @@
|
||||
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 =[];
|
||||
cuurentDate:any;
|
||||
direction: string;
|
||||
isCheckOut:boolean= false;
|
||||
|
||||
constructor(
|
||||
public cs:CommonService,
|
||||
public db:DashboredService,
|
||||
public ts:TranslatorService,
|
||||
public AttendScanService:AttendScanService
|
||||
) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.attendanceTracking();
|
||||
this.cuurentDate = new Date();
|
||||
this.direction = TranslatorService.getCurrentLanguageName();
|
||||
this.cuurentDate =this.getHeaderDate(this.cuurentDate);
|
||||
}
|
||||
|
||||
// call services
|
||||
public attendanceTracking(){
|
||||
this.db.getAttendanceTracking(()=> {},this.ts.trPK('general', 'retry')).subscribe(
|
||||
(result)=>{
|
||||
console.log("result: "+result);
|
||||
this.handleRespondGetAttendanceTracking(result);
|
||||
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
public handleRespondGetAttendanceTracking(result){
|
||||
if (this.cs.validResponse(result)) {
|
||||
if(result.GetAttendanceTrackingList != null){
|
||||
this.attendanceTrackingList=result.GetAttendanceTrackingList;
|
||||
//**condition to check is checkout or not to display PUSE Button**
|
||||
if(this.attendanceTrackingList.P_REMAINING_HOURS ==='0'){
|
||||
this.isCheckOut=true;
|
||||
}else{
|
||||
this.isCheckOut=false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
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(
|
||||
() => {
|
||||
//to open scan();
|
||||
//this.cs.openScan();
|
||||
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')
|
||||
);
|
||||
|
||||
}
|
||||
}// end home
|
||||
@ -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() {}
|
||||
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
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();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,123 @@
|
||||
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"));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
|
||||
|
||||
export class AttendanceTrackingList{
|
||||
public SCHEDULED_HOURS :string;
|
||||
public SPENT_HOURS : string;
|
||||
public REMAINING_HOURS : string;
|
||||
public RETURN_STATUS : string;
|
||||
public RETURN_MSG : string;
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
|
||||
|
||||
export class OpenMissingSwipesList{
|
||||
public OPEN_MISSING_SWIPES :number;
|
||||
public RETURN_STATUS : string;
|
||||
public RETURN_MSG : string;
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,4 @@
|
||||
export class OrganizationsSalariesList{
|
||||
public ORGANIZATION_NAME :string;
|
||||
public ORGANIZATIONS_SALARIES : number;
|
||||
}
|
||||
@ -0,0 +1,6 @@
|
||||
|
||||
export class PerformanceAppraisalList{
|
||||
public APPRAISAL_SCORE :string;
|
||||
public APPRAISAL_YEAR : number;
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
|
||||
|
||||
import { Response } from "src/app/hmg-common/services/models/response";
|
||||
import { AttendanceTrackingList } from './AttensanceTrackingList';
|
||||
|
||||
export class AttendanceTrackingResponse extends Response{
|
||||
public GetGetAttendanceTrackingList : AttendanceTrackingList[];
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
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();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,99 @@
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
export class GetOpenNotificationsList
|
||||
|
||||
{
|
||||
public ITEM_TYPE: number;
|
||||
|
||||
public ITEM_TYPE_DISPLAY_NAME:number;
|
||||
|
||||
public OPEN_NTF_NUMBER:number;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
import { GetOpenNotificationsList } from './GetOpenNotificationsList';
|
||||
import { Response } from '../../../services/models/response'
|
||||
|
||||
|
||||
export class GetOpenNotificationsResponse extends Response {
|
||||
public GetOpenNotificationsList: GetOpenNotificationsList [];
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
export class GetSubordinatesAttdStatusList
|
||||
|
||||
{
|
||||
public NUMBER_OF_EMPLOYEES: number;
|
||||
|
||||
public LATE_IN:number;
|
||||
|
||||
public EARLY_OUT:number;
|
||||
|
||||
public ON_TIME:number;
|
||||
|
||||
public ABSENCE:number;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
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;
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
import { GetSubordinatesAttdStatusList } from './GetSubordinatesAttdStatusList';
|
||||
import { Response } from '../../../services/models/response'
|
||||
|
||||
|
||||
export class GetSubordinatesAttdStatusResponse extends Response {
|
||||
public GetSubordinatesAttdStatusList: GetSubordinatesAttdStatusList [];
|
||||
}
|
||||
@ -0,0 +1,35 @@
|
||||
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;
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
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;
|
||||
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
import { GetSubordinatesLeavesList } from './GetSubordinatesLeavesList';
|
||||
import { Response } from '../../../services/models/response'
|
||||
|
||||
|
||||
export class GetSubordinatesLeavesResponse extends Response {
|
||||
public GetSubordinatesLeavesList: GetSubordinatesLeavesList [];
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
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;
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
import { OpenPeriodDatesList } from './openPeriodDatesList';
|
||||
import { Response } from '../../../services/models/response'
|
||||
|
||||
|
||||
export class OpenPeriodDatesResponse extends Response {
|
||||
public openPeriodDatesList: OpenPeriodDatesList [];
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
|
||||
|
||||
import { Response } from "src/app/hmg-common/services/models/response";
|
||||
import { OpenMissingSwipesList } from './OpenMissingSwipesList';
|
||||
|
||||
export class OpenMissingSwipesResponse extends Response{
|
||||
public GetGetOpenMissingSwipesList : OpenMissingSwipesList[];
|
||||
}
|
||||
@ -0,0 +1,6 @@
|
||||
import { Response } from "src/app/hmg-common/services/models/response";
|
||||
import { OrganizationsSalariesList } from './OrganizationsSalariesList';
|
||||
|
||||
export class OrganizationSalariesResponse extends Response{
|
||||
public GetGetOrganizationsSalariesList : OrganizationsSalariesList[];
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
|
||||
|
||||
|
||||
import { Response } from "src/app/hmg-common/services/models/response";
|
||||
import { PerformanceAppraisalList } from './PerformanceAppraisalList';
|
||||
|
||||
export class PerformanceAppraisalResponse extends Response{
|
||||
public GetGetPerformanceAppraisalList :PerformanceAppraisalList[];
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
<div [class]=" direction == 'rtl' ? ' wrapper wrapper_left' : 'wrapper wrapper_right '">
|
||||
<div class="circle pulse"></div>
|
||||
<div class="circle">
|
||||
<ion-fab class="fab-i ">
|
||||
|
||||
<ion-fab-button class="cbookApointmentBtn" (click)="onClick()" >
|
||||
<!-- <img style="width: 39%; margin-top: -29%;" src="assets/icon/booking.png" /> -->
|
||||
<ion-icon class="iconFab" name="finger-print"></ion-icon>
|
||||
<p class="fab-p">{{ 'attendance-tracking,title' | translate }} </p>
|
||||
</ion-fab-button>
|
||||
|
||||
</ion-fab>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,233 @@
|
||||
|
||||
|
||||
////////////////////book btn/////////////////////
|
||||
ion-fab-button{
|
||||
--background: var(--darkblue)!important;
|
||||
// background: url(/assets/icon/sliderBG.jpg);
|
||||
background-size: cover;
|
||||
background-position: top right;
|
||||
border-radius: 50%;
|
||||
height:110px;
|
||||
width: 110px;
|
||||
}
|
||||
.cbookApointmentBtn{
|
||||
// --background:transparent !important;
|
||||
|
||||
--background-focused: transparent;
|
||||
--background-hover:transparent;
|
||||
--background-activated: transparent;
|
||||
--background: transparent;
|
||||
}
|
||||
|
||||
|
||||
.fab-p{
|
||||
// position: absolute;
|
||||
// bottom: 0;
|
||||
// left: 0;
|
||||
// right: 0;
|
||||
// line-height: 0;
|
||||
// margin: 12px;
|
||||
// margin-bottom: 28%;
|
||||
// margin-top: 27px;
|
||||
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
/* line-height: 0; */
|
||||
margin: 12px;
|
||||
margin-bottom: 14%;
|
||||
white-space: pre-line;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.fab-i{
|
||||
top:0px;
|
||||
left:0px;
|
||||
}
|
||||
|
||||
button-inner{
|
||||
--top: -11px !important;
|
||||
}
|
||||
|
||||
.iconFab{
|
||||
margin-top: -37px;
|
||||
width: 100px;
|
||||
height: 60px;
|
||||
}
|
||||
|
||||
|
||||
////////////////animation/////////////////////////
|
||||
|
||||
|
||||
|
||||
// .wrapper {
|
||||
// position: fixed;
|
||||
// width: 60px;
|
||||
// height: 60px;
|
||||
// margin: 0 auto;
|
||||
// left: 65px;
|
||||
// bottom: 84px;
|
||||
// z-index: 100;
|
||||
// }
|
||||
// .wrapper1{
|
||||
// left:inherit;
|
||||
// right: 65px;
|
||||
|
||||
|
||||
// }
|
||||
// .wrapper .circle {
|
||||
// width: 110px;
|
||||
// height: 110px;
|
||||
// position: absolute;
|
||||
// top: 0;
|
||||
// left: -40px;
|
||||
// right: 0;
|
||||
// bottom: 20px;
|
||||
// border-radius: 50%;
|
||||
// margin: auto;
|
||||
// -webkit-transform: scale(1, 1);
|
||||
// transform: scale(1, 1);
|
||||
// }
|
||||
|
||||
.wrapper {
|
||||
position: fixed;
|
||||
width: 3cm;
|
||||
height: 3cm;
|
||||
/* margin: 0 auto; */
|
||||
bottom: 2.1cm;
|
||||
padding: 0;
|
||||
z-index: 100;
|
||||
}
|
||||
.wrapper1{
|
||||
left:inherit;
|
||||
right: 65px;
|
||||
|
||||
}
|
||||
|
||||
.wrapper_left {
|
||||
|
||||
left: 4%;
|
||||
}
|
||||
.wrapper_right {
|
||||
right: 4%;
|
||||
}
|
||||
|
||||
.wrapper .circle {
|
||||
width: 3.3cm;
|
||||
height: 3.3cm;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0px;
|
||||
right: 0;
|
||||
bottom: 20px;
|
||||
border-radius: 50%;
|
||||
margin: auto;
|
||||
-webkit-transform: scale(1, 1);
|
||||
transform: scale(1, 1);
|
||||
}
|
||||
|
||||
.wrapper .circle {
|
||||
width: 110px;
|
||||
height: 110px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0px;
|
||||
right: 0;
|
||||
bottom: 20px;
|
||||
border-radius: 50%;
|
||||
margin: auto;
|
||||
-webkit-transform: scale(1, 1);
|
||||
transform: scale(1, 1);
|
||||
}
|
||||
|
||||
|
||||
.wrapper .circle.pulse {
|
||||
-webkit-animation-timing-function: ease;
|
||||
animation-timing-function: ease;
|
||||
-webkit-animation: pulse 2s infinite;
|
||||
animation: pulse 2s infinite;
|
||||
background-color: var(--ion-color-secondary-tint);
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
|
||||
@-webkit-keyframes pulse {
|
||||
0% {
|
||||
-webkit-transform: scale(1, 1);
|
||||
transform: scale(1, 1);
|
||||
}
|
||||
25% {
|
||||
-webkit-transform: scale(1, 1);
|
||||
transform: scale(1, 1);
|
||||
}
|
||||
50% {
|
||||
-webkit-transform: scale(1.2, 1.2);
|
||||
transform: scale(1.2, 1.2);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: scale(1, 1);
|
||||
transform: scale(1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes pulse {
|
||||
0% {
|
||||
-webkit-transform: scale(1, 1);
|
||||
transform: scale(1, 1);
|
||||
}
|
||||
25% {
|
||||
-webkit-transform: scale(1, 1);
|
||||
transform: scale(1, 1);
|
||||
}
|
||||
50% {
|
||||
-webkit-transform: scale(1.2, 1.2);
|
||||
transform: scale(1.2, 1.2);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: scale(1, 1);
|
||||
transform: scale(1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@media only screen and (max-width: 350px) {
|
||||
ion-fab-button{
|
||||
--background: var(--ion-color-secondary);
|
||||
height:90px;
|
||||
width: 90px;
|
||||
left: 0px;
|
||||
|
||||
}
|
||||
.wrapper .circle {
|
||||
width: 90px;
|
||||
height: 90px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0px;
|
||||
right: 0;
|
||||
bottom: 20px;
|
||||
border-radius: 50%;
|
||||
margin: auto;
|
||||
-webkit-transform: scale(1, 1);
|
||||
transform: scale(1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.dashboard-container {
|
||||
margin-bottom: 0.9cm;
|
||||
}
|
||||
|
||||
.clicked {
|
||||
|
||||
}
|
||||
.clicked:hover {
|
||||
background-color: green;
|
||||
}
|
||||
|
||||
|
||||
.clicked:focus {
|
||||
background-color: orange;
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { FabButtonComponent } from './fab-button.component';
|
||||
|
||||
describe('FabButtonComponent', () => {
|
||||
let component: FabButtonComponent;
|
||||
let fixture: ComponentFixture<FabButtonComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ FabButtonComponent ],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(FabButtonComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,24 @@
|
||||
import { Component, OnInit, Output, EventEmitter } from '@angular/core';
|
||||
import { TranslatorService } from '../../services/translator/translator.service';
|
||||
|
||||
@Component({
|
||||
selector: 'fab-button',
|
||||
templateUrl: './fab-button.component.html',
|
||||
styleUrls: ['./fab-button.component.scss'],
|
||||
})
|
||||
export class FabButtonComponent implements OnInit {
|
||||
|
||||
@Output() trigger = new EventEmitter();
|
||||
public direction: any;
|
||||
constructor(
|
||||
) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.direction = TranslatorService.getCurrentDirection();
|
||||
}
|
||||
|
||||
public onClick() {
|
||||
this.trigger.emit();
|
||||
}
|
||||
|
||||
}
|
||||