diff --git a/Mohem/src/app/hmg-common/hmg-common.module.ts b/Mohem/src/app/hmg-common/hmg-common.module.ts index bf854d07..d0fe51ad 100644 --- a/Mohem/src/app/hmg-common/hmg-common.module.ts +++ b/Mohem/src/app/hmg-common/hmg-common.module.ts @@ -119,6 +119,7 @@ import { DateInfoModalComponent } from './ui/circle-calendar/date-info-modal/dat import { ChartModule } from 'primeng/chart'; import { GenericHeaderComponent } from './ui/generic-header/generic-header.component'; import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx'; +import { AttendanceOptionsComponent } from '../home/attendance-options/attendance-options.component'; @NgModule({ imports: [ @@ -202,7 +203,8 @@ import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx' CircleCalendarComponent, DateInfoModalComponent, Modal, - GenericHeaderComponent + GenericHeaderComponent, + AttendanceOptionsComponent ], exports: [ FabButtonComponent, @@ -273,7 +275,8 @@ import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx' ChartModule, FileUploadModule, Modal, - GenericHeaderComponent + GenericHeaderComponent, + AttendanceOptionsComponent ], providers: [ AttendScanService, 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 557390a6..a79420c1 100644 --- a/Mohem/src/app/hmg-common/services/common/common.service.ts +++ b/Mohem/src/app/hmg-common/services/common/common.service.ts @@ -1078,6 +1078,9 @@ public getMonthNameAr(value: number): string { this.nav.navigateForward(['/attendance-tracking/home']); } + public openAttendanceOptionsComponent(){ + this.nav.navigateForward(['/home/attendance-option']); + } public openEitListPage() { this.nav.navigateForward(['/eit/eit-list']); } diff --git a/Mohem/src/app/home/attendance-options/attendance-options.component.html b/Mohem/src/app/home/attendance-options/attendance-options.component.html new file mode 100644 index 00000000..b09fabce --- /dev/null +++ b/Mohem/src/app/home/attendance-options/attendance-options.component.html @@ -0,0 +1,35 @@ + + + + + + + +


+ +
+
+ + +

Select Method to Mark your Attendance

+
+
+ + +
+ +

NFC

+
+
+ +
+ +

QR Code

+
+
+
+
+
+ diff --git a/Mohem/src/app/home/attendance-options/attendance-options.component.scss b/Mohem/src/app/home/attendance-options/attendance-options.component.scss new file mode 100644 index 00000000..000a0944 --- /dev/null +++ b/Mohem/src/app/home/attendance-options/attendance-options.component.scss @@ -0,0 +1,12 @@ +.buttonStyle{ + border: 1px solid black; + border-radius: 16px; + height: 135px; + text-align: -webkit-center; + padding: 10px; +} + +.textAndIcon{ + width: 80px; +} + diff --git a/Mohem/src/app/home/attendance-options/attendance-options.component.spec.ts b/Mohem/src/app/home/attendance-options/attendance-options.component.spec.ts new file mode 100644 index 00000000..95b52668 --- /dev/null +++ b/Mohem/src/app/home/attendance-options/attendance-options.component.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { AttendanceOptionsComponent } from './attendance-options.component'; + +describe('AttendanceOptionsComponent', () => { + let component: AttendanceOptionsComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ AttendanceOptionsComponent ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(AttendanceOptionsComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/home/attendance-options/attendance-options.component.ts b/Mohem/src/app/home/attendance-options/attendance-options.component.ts new file mode 100644 index 00000000..11dd1af6 --- /dev/null +++ b/Mohem/src/app/home/attendance-options/attendance-options.component.ts @@ -0,0 +1,14 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-attendance-options', + templateUrl: './attendance-options.component.html', + styleUrls: ['./attendance-options.component.scss'], +}) +export class AttendanceOptionsComponent implements OnInit { + + constructor() { } + + ngOnInit() {} + +} diff --git a/Mohem/src/app/home/home.module.ts b/Mohem/src/app/home/home.module.ts index 8aea1549..4a14d328 100644 --- a/Mohem/src/app/home/home.module.ts +++ b/Mohem/src/app/home/home.module.ts @@ -7,11 +7,16 @@ import { IonicModule } from '@ionic/angular'; import { HomePage } from './home.page'; import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx'; import { WorklistMainService } from '../notification/service/work-list.main.service'; +import { AttendanceOptionsComponent } from './attendance-options/attendance-options.component'; const routes: Routes = [ { path: '', component: HomePage, + }, + { + path:'attendance-option', + component:AttendanceOptionsComponent, } ]; @@ -24,7 +29,7 @@ const routes: Routes = [ RouterModule.forChild(routes) ], declarations: [ - HomePage + HomePage, ], providers: [ BarcodeScanner, diff --git a/Mohem/src/app/home/home.page.ts b/Mohem/src/app/home/home.page.ts index e97a1c77..00392f67 100644 --- a/Mohem/src/app/home/home.page.ts +++ b/Mohem/src/app/home/home.page.ts @@ -738,11 +738,16 @@ openattentracking() { this.common.openAttenTrackingpage(); } +showAttendanceOptions() { + this.common.openAttendanceOptionsComponent(); +} + openStatsButton(link: any) { // tslint:disable-next-line: triple-equals if (link == '0') { this.isFakeLocationUsed = false; - this.getDeviceLocation(); + // this.getDeviceLocation(); + this.showAttendanceOptions(); // tslint:disable-next-line: triple-equals } else if (link == '1') { this.common.startLoading(); diff --git a/Mohem/src/assets/imgs/asset (1).png b/Mohem/src/assets/imgs/asset (1).png new file mode 100644 index 00000000..0b7c6d2f Binary files /dev/null and b/Mohem/src/assets/imgs/asset (1).png differ diff --git a/Mohem/src/assets/imgs/asset (2).png b/Mohem/src/assets/imgs/asset (2).png new file mode 100644 index 00000000..76af13ef Binary files /dev/null and b/Mohem/src/assets/imgs/asset (2).png differ diff --git a/Mohem/src/assets/imgs/asset (3).png b/Mohem/src/assets/imgs/asset (3).png new file mode 100644 index 00000000..293420bb Binary files /dev/null and b/Mohem/src/assets/imgs/asset (3).png differ diff --git a/Mohem/src/assets/localization/i18n.json b/Mohem/src/assets/localization/i18n.json index 077bf19d..4243a949 100644 --- a/Mohem/src/assets/localization/i18n.json +++ b/Mohem/src/assets/localization/i18n.json @@ -874,6 +874,10 @@ "deletePerm": { "en": "Are you sure from deleting this file permanently?", "ar": "هل أنت متأكد من حذف هذا الملف نهائيًا؟" + }, + "option-attendance": { + "en":"Attendance Options", + "ar":"خيارات التبصيم" } }, "home": {