From 5df30f114be42504a549990edf0ddcf2bad82f7b Mon Sep 17 00:00:00 2001 From: ashwaq Date: Mon, 27 Jan 2020 10:48:21 +0300 Subject: [PATCH] add attend-tracking --- Mohem/src/app/app-routing.module.ts | 63 ++--- .../attendance-tracking.module.ts | 38 +++ .../attendance-tracking.page.html | 3 + .../attendance-tracking.page.scss | 0 .../attendance-tracking.page.spec.ts | 27 ++ .../attendance-tracking.page.ts | 15 ++ .../home/home.component.html | 61 +++++ .../home/home.component.scss | 52 ++++ .../home/home.component.spec.ts | 27 ++ .../home/home.component.ts | 83 +++++++ Mohem/src/app/hmg-common/hmg-common.module.ts | 3 + .../services/common/common.service.ts | 107 ++++++++ .../ui/fab-button/fab-button.component.html | 14 ++ .../ui/fab-button/fab-button.component.scss | 233 ++++++++++++++++++ .../fab-button/fab-button.component.spec.ts | 27 ++ .../ui/fab-button/fab-button.component.ts | 24 ++ Mohem/src/app/home/home.page.html | 2 + Mohem/src/app/home/home.page.ts | 6 +- Mohem/src/assets/localization/i18n.json | 48 ++++ Mohem/src/theme/styles.scss | 34 +++ Mohem/src/theme/variables.scss | 4 + 21 files changed, 839 insertions(+), 32 deletions(-) create mode 100644 Mohem/src/app/attendance-tracking/attendance-tracking.module.ts create mode 100644 Mohem/src/app/attendance-tracking/attendance-tracking.page.html create mode 100644 Mohem/src/app/attendance-tracking/attendance-tracking.page.scss create mode 100644 Mohem/src/app/attendance-tracking/attendance-tracking.page.spec.ts create mode 100644 Mohem/src/app/attendance-tracking/attendance-tracking.page.ts create mode 100644 Mohem/src/app/attendance-tracking/home/home.component.html create mode 100644 Mohem/src/app/attendance-tracking/home/home.component.scss create mode 100644 Mohem/src/app/attendance-tracking/home/home.component.spec.ts create mode 100644 Mohem/src/app/attendance-tracking/home/home.component.ts create mode 100644 Mohem/src/app/hmg-common/ui/fab-button/fab-button.component.html create mode 100644 Mohem/src/app/hmg-common/ui/fab-button/fab-button.component.scss create mode 100644 Mohem/src/app/hmg-common/ui/fab-button/fab-button.component.spec.ts create mode 100644 Mohem/src/app/hmg-common/ui/fab-button/fab-button.component.ts diff --git a/Mohem/src/app/app-routing.module.ts b/Mohem/src/app/app-routing.module.ts index ef409bfb..4139c84e 100644 --- a/Mohem/src/app/app-routing.module.ts +++ b/Mohem/src/app/app-routing.module.ts @@ -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 { } diff --git a/Mohem/src/app/attendance-tracking/attendance-tracking.module.ts b/Mohem/src/app/attendance-tracking/attendance-tracking.module.ts new file mode 100644 index 00000000..b2c2358d --- /dev/null +++ b/Mohem/src/app/attendance-tracking/attendance-tracking.module.ts @@ -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 {} diff --git a/Mohem/src/app/attendance-tracking/attendance-tracking.page.html b/Mohem/src/app/attendance-tracking/attendance-tracking.page.html new file mode 100644 index 00000000..8b172850 --- /dev/null +++ b/Mohem/src/app/attendance-tracking/attendance-tracking.page.html @@ -0,0 +1,3 @@ + + + diff --git a/Mohem/src/app/attendance-tracking/attendance-tracking.page.scss b/Mohem/src/app/attendance-tracking/attendance-tracking.page.scss new file mode 100644 index 00000000..e69de29b diff --git a/Mohem/src/app/attendance-tracking/attendance-tracking.page.spec.ts b/Mohem/src/app/attendance-tracking/attendance-tracking.page.spec.ts new file mode 100644 index 00000000..ca11e013 --- /dev/null +++ b/Mohem/src/app/attendance-tracking/attendance-tracking.page.spec.ts @@ -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; + + 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(); + }); +}); diff --git a/Mohem/src/app/attendance-tracking/attendance-tracking.page.ts b/Mohem/src/app/attendance-tracking/attendance-tracking.page.ts new file mode 100644 index 00000000..7eff1575 --- /dev/null +++ b/Mohem/src/app/attendance-tracking/attendance-tracking.page.ts @@ -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() { + } + +} diff --git a/Mohem/src/app/attendance-tracking/home/home.component.html b/Mohem/src/app/attendance-tracking/home/home.component.html new file mode 100644 index 00000000..a391e4e3 --- /dev/null +++ b/Mohem/src/app/attendance-tracking/home/home.component.html @@ -0,0 +1,61 @@ + + + Attendance Tracking + + + + + + + + +
+ + {{cuurentDate}}
+ {{ts.trPK('attendance-tracking','today-time-left')}} + + + +
+
+
+ +
+ + + + {{ts.trPK('attendance-tracking','shift-time')}} +

+ 08:00 - 17:00 +
+ + + {{ts.trPK('attendance-tracking','check-in')}} +

+ 08:00 +
+ + {{ts.trPK('attendance-tracking','check-out')}} +

+ 08:00 +
+
+ + + {{ts.trPK('attendance-tracking','late-in')}} +

+ 08:00 +
+ + {{ts.trPK('attendance-tracking','regular')}} +

+ {{attendanceTrackingList.P_SCHEDULED_HOURS}} +
+
+
+ + +
+
\ No newline at end of file diff --git a/Mohem/src/app/attendance-tracking/home/home.component.scss b/Mohem/src/app/attendance-tracking/home/home.component.scss new file mode 100644 index 00000000..3df2c17a --- /dev/null +++ b/Mohem/src/app/attendance-tracking/home/home.component.scss @@ -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; +} + diff --git a/Mohem/src/app/attendance-tracking/home/home.component.spec.ts b/Mohem/src/app/attendance-tracking/home/home.component.spec.ts new file mode 100644 index 00000000..5ec1377b --- /dev/null +++ b/Mohem/src/app/attendance-tracking/home/home.component.spec.ts @@ -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; + + 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(); + }); +}); diff --git a/Mohem/src/app/attendance-tracking/home/home.component.ts b/Mohem/src/app/attendance-tracking/home/home.component.ts new file mode 100644 index 00000000..73884a0a --- /dev/null +++ b/Mohem/src/app/attendance-tracking/home/home.component.ts @@ -0,0 +1,83 @@ +import { Component, OnInit } 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 { 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; + checkOut:boolean= true; + + constructor( + public cs:CommonService, + public db:DashboredService, + public ts:TranslatorService + ) { } + + ngOnInit() { + this.attendanceTracking(); + this.cuurentDate = new Date(); + this.direction = TranslatorService.getCurrentLanguageName(); + this.cuurentDate =this.getHeaderDate(this.cuurentDate); + //**condition to check is checkout or not to display PUSE Button** + // if(ischeckOut){ + // this.checkOut=true; + // }else{ + // this.checkOut=false; + // } + + } + + // 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)) { + this.attendanceTrackingList=result.GetAttendanceTrackingList; + + } + + } + 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.ts.trPK('general', 'ok'), + () => {}, this.ts.trPK('general', 'cancel'), + this.ts.trPK('vacation-rule', 'confirmation'), + this.ts.trPK('attendance-tracking', 'confirm-alert3') + + "
"+"
"+ this.ts.trPK('attendance-tracking', 'confirm-alert1') + + this.ts.trPK('attendance-tracking', 'confirm-alert2') + ); + +} +}// end home diff --git a/Mohem/src/app/hmg-common/hmg-common.module.ts b/Mohem/src/app/hmg-common/hmg-common.module.ts index 84e44c4f..fad1c4e1 100644 --- a/Mohem/src/app/hmg-common/hmg-common.module.ts +++ b/Mohem/src/app/hmg-common/hmg-common.module.ts @@ -101,6 +101,7 @@ import { OpenNativeSettings } from '@ionic-native/open-native-settings/ngx'; import { AccordinCustomComponent } from './ui/accordin-custom/accordin-custom.component'; import { AccordinTabCustomComponent} from './ui/accordin-custom/accordin-tab-custom/accordin-tab-custom.component' import {DashboredService} from './services/dashbored/dashbored.service' +import {FabButtonComponent} from './ui/fab-button/fab-button.component' @NgModule({ imports: [ CommonModule, @@ -113,6 +114,7 @@ import {DashboredService} from './services/dashbored/dashbored.service' PdfViewerModule ], declarations: [ + FabButtonComponent, NumberRangeComponent, SSpacerComponent, MSpacerComponent, @@ -169,6 +171,7 @@ import {DashboredService} from './services/dashbored/dashbored.service' AccordinCustomComponent ], exports: [ + FabButtonComponent, NumberRangeComponent, SSpacerComponent, MSpacerComponent, diff --git a/Mohem/src/app/hmg-common/services/common/common.service.ts b/Mohem/src/app/hmg-common/services/common/common.service.ts index 532e6bd4..17bc82a5 100644 --- a/Mohem/src/app/hmg-common/services/common/common.service.ts +++ b/Mohem/src/app/hmg-common/services/common/common.service.ts @@ -112,6 +112,64 @@ export class CommonService { this.nav.pop(); } + public getMonthName(value: number): string { + switch (value) { + case 1: + return "January"; + case 2: + return "February"; + case 3: + return "March"; + case 4: + return "April"; + case 5: + return "May"; + case 6: + return "June"; + case 7: + return "July"; + case 8: + return "August"; + case 9: + return "September"; + case 10: + return "October"; + case 11: + return "November"; + case 12: + return "December"; + } +} + +public getMonthNameAr(value: number): string { + switch (value) { + case 1: + return "يناير"; + case 2: + return " فبراير"; + case 3: + return "مارس"; + case 4: + return "أبريل"; + case 5: + return "مايو"; + case 6: + return "يونيو"; + case 7: + return "يوليو"; + case 8: + return "أغسطس"; + case 9: + return "سبتمبر"; + case 10: + return " اكتوبر"; + case 11: + return " نوفمبر"; + case 12: + return "ديسمبر"; + } +} + public round(value: number, decimal: number): string { const valueStr = value.toString(); const dotIndex = valueStr.indexOf("."); @@ -453,6 +511,51 @@ export class CommonService { } + async confirmAlertDialogAttendance( + onAccept: any, + acceptLabel: string, + onCancel: any, + cancelLabel: string, + title: string, + message: string + ) { + this.clearAllAlerts(); + const alert = await this.alertControllerIonic.create({ + header: this.ts.trPK("general", "confirm"), + message: message, + buttons: [ + { + text: cancelLabel, + role: "cancel", + cssClass: "checkOutCancelBtn", + handler: () => { + if (onCancel) { + onCancel(); + } + this.alertControllerIonic.dismiss(); + } + }, + { + text: acceptLabel, + role: "Confirm", + + cssClass: "checkOutOkBtn", + + handler: () => { + + if (onAccept) { + onAccept(); + } + this.alertControllerIonic.dismiss(); + } + } + ] + }); + // this.alerts.push(alert); + await alert.present(); + } + + public clearAllAlerts() { // custom solutions because of async issue const alerts = document.getElementsByTagName("ion-alert"); @@ -969,6 +1072,10 @@ export class CommonService { /* open calls */ + public openAttenTrackingpage(){ + this.nav.navigateForward(["/attendance-tracking/home"]); + + } public openEitListPage() { this.nav.navigateForward(["/eit/eit-list"]); } diff --git a/Mohem/src/app/hmg-common/ui/fab-button/fab-button.component.html b/Mohem/src/app/hmg-common/ui/fab-button/fab-button.component.html new file mode 100644 index 00000000..8e405be4 --- /dev/null +++ b/Mohem/src/app/hmg-common/ui/fab-button/fab-button.component.html @@ -0,0 +1,14 @@ +
+
+
+ + + + + +

{{ 'attendance-tracking,title' | translate }}

+
+ +
+
+
\ No newline at end of file diff --git a/Mohem/src/app/hmg-common/ui/fab-button/fab-button.component.scss b/Mohem/src/app/hmg-common/ui/fab-button/fab-button.component.scss new file mode 100644 index 00000000..811e2e55 --- /dev/null +++ b/Mohem/src/app/hmg-common/ui/fab-button/fab-button.component.scss @@ -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; +} \ No newline at end of file diff --git a/Mohem/src/app/hmg-common/ui/fab-button/fab-button.component.spec.ts b/Mohem/src/app/hmg-common/ui/fab-button/fab-button.component.spec.ts new file mode 100644 index 00000000..3d04ef70 --- /dev/null +++ b/Mohem/src/app/hmg-common/ui/fab-button/fab-button.component.spec.ts @@ -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; + + 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(); + }); +}); diff --git a/Mohem/src/app/hmg-common/ui/fab-button/fab-button.component.ts b/Mohem/src/app/hmg-common/ui/fab-button/fab-button.component.ts new file mode 100644 index 00000000..c61f785e --- /dev/null +++ b/Mohem/src/app/hmg-common/ui/fab-button/fab-button.component.ts @@ -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(); + } + +} diff --git a/Mohem/src/app/home/home.page.html b/Mohem/src/app/home/home.page.html index fe151468..c8fe1482 100644 --- a/Mohem/src/app/home/home.page.html +++ b/Mohem/src/app/home/home.page.html @@ -114,4 +114,6 @@ + + diff --git a/Mohem/src/app/home/home.page.ts b/Mohem/src/app/home/home.page.ts index dee4f44b..ccb0f18d 100644 --- a/Mohem/src/app/home/home.page.ts +++ b/Mohem/src/app/home/home.page.ts @@ -471,7 +471,11 @@ showAttendanceTracking(){ } - + openattentracking(){ + this.common.openAttenTrackingpage(); + //this.cs.navigateForward('/eservices/doctors/search'); + + } } diff --git a/Mohem/src/assets/localization/i18n.json b/Mohem/src/assets/localization/i18n.json index e7adec94..a70beaab 100644 --- a/Mohem/src/assets/localization/i18n.json +++ b/Mohem/src/assets/localization/i18n.json @@ -2082,5 +2082,53 @@ "ar":"المجموع " } + }, + "attendance-tracking": { + "title":{ + "en": "Mark Attendance", + "ar":"Mark Attendance " + }, + "check-in":{ + "en": "Check In", + "ar":"Check In" + }, + "check-out":{ + "en": "Check Out", + "ar":"Check Out" + }, + "regular":{ + "en": "Regular", + "ar":"Regular" + }, + "late-in":{ + "en": "Late In", + "ar":"Late In" + }, + "today-time-left":{ + "en": "TODAY TIME LEFT", + "ar":"TODAY TIME LEFT" + }, + + + "confirm-alert1":{ + "en": "Are you sure, you want to", + "ar":"Are you sure, you want to" + }, + "confirm-alert2":{ + "en":" check out", + "ar":" check out" + }, + "confirm-alert3":{ + "en":"You did't complate today shift", + "ar":"You did't complate today shift" + }, + "shift-time":{ + "en":"SHIFT TIME", + "ar":"SHIFT TIME" } + + + + +} } \ No newline at end of file diff --git a/Mohem/src/theme/styles.scss b/Mohem/src/theme/styles.scss index 73b3023f..a274825f 100644 --- a/Mohem/src/theme/styles.scss +++ b/Mohem/src/theme/styles.scss @@ -845,7 +845,41 @@ color: var(--dark); margin: 8px !important; } +.checkOutOkBtn{ + margin-left: 55px !important; + margin-right: 55px !important; + margin-top: 10px !important; + margin-bottom: 10px !important; + border-radius: 5px !important; + height: 32px !important; + min-height: 30px !important; + background: var(--lightblue) !important; + -webkit-box-flex: 1; + flex: 1 1 auto; + border-top: 0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2); + border-right: 0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2); + color: white !important; + border: none !important; + +} + +.checkOutCancelBtn{ + margin-left: 55px !important; + margin-right: 55px !important; + margin-top: 10px !important; + margin-bottom: 10px !important; + border-radius: 5px !important; + height: 32px !important; + min-height: 30px !important; + background: var(--darkblue) !important; + -webkit-box-flex: 1; + flex: 1 1 auto; + border-top: 0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2); + border-right: 0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2); + color: white !important; + border: none !important; +} // .slides-gray-bullets .swiper-wrapper { // margin-top: 14px !important; // } diff --git a/Mohem/src/theme/variables.scss b/Mohem/src/theme/variables.scss index 33bb3b43..f50870c6 100644 --- a/Mohem/src/theme/variables.scss +++ b/Mohem/src/theme/variables.scss @@ -69,6 +69,10 @@ --red:#BE1E2D; --blue:#223262; --cyanblue:#1b75bc; + --darkblue:#094875;//dublicate in login branch + --lightblue:#3cb9d5;//dublicate in login branch + + // $font-family-base: $fontFamilyMediumEN !default; // $font-family-ios-base: $fontFamilyMediumEN !default;