From c955a19ae86635fd5a2727bff1d83355795bd265 Mon Sep 17 00:00:00 2001 From: umasoodch Date: Thu, 23 Jan 2020 14:33:25 +0300 Subject: [PATCH 01/14] pushed timer code --- Mohem/package-lock.json | 21 ++ Mohem/package.json | 9 +- Mohem/src/app/app.component.html | 2 +- Mohem/src/app/app.module.ts | 10 +- .../feedback/feedback.directive.spec.ts | 8 + .../directive/feedback/feedback.directive.ts | 24 ++ .../feedback/feedback.service.spec.ts | 12 + .../directive/feedback/feedback.service.ts | 20 ++ Mohem/src/app/hmg-common/hmg-common.module.ts | 29 +- .../ui/nav-buttons/nav-buttons.component.scss | 5 + .../services-button.component.html | 8 + .../services-button.component.scss | 34 ++ .../services-button.component.spec.ts | 27 ++ .../services-button.component.ts | 28 ++ .../stats-button/stats-button.component.html | 9 + .../stats-button/stats-button.component.scss | 42 +++ .../stats-button.component.spec.ts | 27 ++ .../ui/stats-button/stats-button.component.ts | 29 ++ Mohem/src/app/home/home.module.ts | 6 +- Mohem/src/app/home/home.page.html | 251 +++++++++------ Mohem/src/app/home/home.page.scss | 224 +++++-------- Mohem/src/app/home/home.page.ts | 304 ++++++++++++------ .../icon/new-design/advance_payments.png | Bin 0 -> 1116 bytes .../new-design/attendance_button_icon.png | Bin 0 -> 2460 bytes .../icon/new-design/borrowing_passport.png | Bin 0 -> 1549 bytes .../icon/new-design/employee_certificate.png | Bin 0 -> 1401 bytes .../icon/new-design/id_badge_request.png | Bin 0 -> 1231 bytes Mohem/src/assets/icon/new-design/it_forms.png | Bin 0 -> 853 bytes .../assets/icon/new-design/leave_balance.png | Bin 0 -> 1324 bytes .../icon/new-design/leave_management.png | Bin 0 -> 1050 bytes .../icon/new-design/medical_insurance.png | Bin 0 -> 815 bytes .../assets/icon/new-design/missing_swipe.png | Bin 0 -> 975 bytes Mohem/src/assets/icon/new-design/pay_slip.png | Bin 0 -> 1200 bytes .../icon/new-design/pending_request.png | Bin 0 -> 864 bytes .../new-design/recreational_activities.png | Bin 0 -> 1420 bytes .../new-design/separation_resignation.png | Bin 0 -> 1306 bytes .../assets/icon/new-design/ticket_balance.png | Bin 0 -> 999 bytes .../assets/icon/new-design/ticket_request.png | Bin 0 -> 1060 bytes .../icon/new-design/uniform_request.png | Bin 0 -> 1069 bytes .../assets/icon/new-design/vacation_rules.png | Bin 0 -> 984 bytes .../src/assets/icon/new-design/work_list.png | Bin 0 -> 759 bytes Mohem/src/theme/styles.scss | 14 + Mohem/tsconfig.json | 5 + 43 files changed, 778 insertions(+), 370 deletions(-) create mode 100644 Mohem/src/app/hmg-common/directive/feedback/feedback.directive.spec.ts create mode 100644 Mohem/src/app/hmg-common/directive/feedback/feedback.directive.ts create mode 100644 Mohem/src/app/hmg-common/directive/feedback/feedback.service.spec.ts create mode 100644 Mohem/src/app/hmg-common/directive/feedback/feedback.service.ts create mode 100644 Mohem/src/app/hmg-common/ui/services-button/services-button.component.html create mode 100644 Mohem/src/app/hmg-common/ui/services-button/services-button.component.scss create mode 100644 Mohem/src/app/hmg-common/ui/services-button/services-button.component.spec.ts create mode 100644 Mohem/src/app/hmg-common/ui/services-button/services-button.component.ts create mode 100644 Mohem/src/app/hmg-common/ui/stats-button/stats-button.component.html create mode 100644 Mohem/src/app/hmg-common/ui/stats-button/stats-button.component.scss create mode 100644 Mohem/src/app/hmg-common/ui/stats-button/stats-button.component.spec.ts create mode 100644 Mohem/src/app/hmg-common/ui/stats-button/stats-button.component.ts create mode 100644 Mohem/src/assets/icon/new-design/advance_payments.png create mode 100644 Mohem/src/assets/icon/new-design/attendance_button_icon.png create mode 100644 Mohem/src/assets/icon/new-design/borrowing_passport.png create mode 100644 Mohem/src/assets/icon/new-design/employee_certificate.png create mode 100644 Mohem/src/assets/icon/new-design/id_badge_request.png create mode 100644 Mohem/src/assets/icon/new-design/it_forms.png create mode 100644 Mohem/src/assets/icon/new-design/leave_balance.png create mode 100644 Mohem/src/assets/icon/new-design/leave_management.png create mode 100644 Mohem/src/assets/icon/new-design/medical_insurance.png create mode 100644 Mohem/src/assets/icon/new-design/missing_swipe.png create mode 100644 Mohem/src/assets/icon/new-design/pay_slip.png create mode 100644 Mohem/src/assets/icon/new-design/pending_request.png create mode 100644 Mohem/src/assets/icon/new-design/recreational_activities.png create mode 100644 Mohem/src/assets/icon/new-design/separation_resignation.png create mode 100644 Mohem/src/assets/icon/new-design/ticket_balance.png create mode 100644 Mohem/src/assets/icon/new-design/ticket_request.png create mode 100644 Mohem/src/assets/icon/new-design/uniform_request.png create mode 100644 Mohem/src/assets/icon/new-design/vacation_rules.png create mode 100644 Mohem/src/assets/icon/new-design/work_list.png diff --git a/Mohem/package-lock.json b/Mohem/package-lock.json index fc11c970..64101252 100644 --- a/Mohem/package-lock.json +++ b/Mohem/package-lock.json @@ -1209,6 +1209,14 @@ "@types/cordova": "^0.0.34" } }, + "@ionic-native/vibration": { + "version": "5.19.1", + "resolved": "https://registry.npmjs.org/@ionic-native/vibration/-/vibration-5.19.1.tgz", + "integrity": "sha512-f9fMtBRJmVLklRrnqcSqKktw6skdp+dDQpbBOq1m5VSQF7b6EKkCIUTN69EjeSn2z3AD0kSYn1hCGTp2q+cJIw==", + "requires": { + "@types/cordova": "^0.0.34" + } + }, "@ionic-native/zbar": { "version": "5.19.1", "resolved": "https://registry.npmjs.org/@ionic-native/zbar/-/zbar-5.19.1.tgz", @@ -4550,6 +4558,11 @@ "resolved": "https://registry.npmjs.org/cordova-plugin-themeablebrowser/-/cordova-plugin-themeablebrowser-0.2.18.tgz", "integrity": "sha512-FdE1L3wItbTtUudysX/QxN6DTnfGPTMiS4Np/XKeSfYM0bU8sP6DhUIUp1vA8GAulihkEfbNIvy68oVkx2xtFQ==" }, + "cordova-plugin-vibration": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/cordova-plugin-vibration/-/cordova-plugin-vibration-3.1.1.tgz", + "integrity": "sha512-qgv67Rueo4Pydfant3TwnXeFiN9dl+6lKMM6h5jYg9XewiGAGOr8vfWsTvQssC3m3xMKGS1ap3xPNH+BzZ4RMA==" + }, "cordova-plugin-whitelist": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/cordova-plugin-whitelist/-/cordova-plugin-whitelist-1.3.4.tgz", @@ -9392,6 +9405,14 @@ "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", "dev": true }, + "ng-circle-progress": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/ng-circle-progress/-/ng-circle-progress-1.5.1.tgz", + "integrity": "sha512-gJ0SdWc+TkXckfbhbvUY522yjya3qcc1a3lGvvVyLsUfSOgll8LQaZGDEko84d8dk8vYO83n0O5vP+e8bJTInQ==", + "requires": { + "tslib": "^1.9.0" + } + }, "ng2-file-upload": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/ng2-file-upload/-/ng2-file-upload-1.4.0.tgz", diff --git a/Mohem/package.json b/Mohem/package.json index b4fc242d..409df5c5 100755 --- a/Mohem/package.json +++ b/Mohem/package.json @@ -52,6 +52,7 @@ "@ionic-native/sqlite": "^5.18.0", "@ionic-native/status-bar": "^5.0.0", "@ionic-native/themeable-browser": "^5.18.0", + "@ionic-native/vibration": "^5.19.1", "@ionic-native/zbar": "^5.10.0", "@ionic/angular": "^4.1.0", "@ng-bootstrap/ng-bootstrap": "^4.2.2", @@ -95,6 +96,7 @@ "cordova-plugin-splashscreen": "^5.0.3", "cordova-plugin-statusbar": "^2.4.3", "cordova-plugin-themeablebrowser": "^0.2.18", + "cordova-plugin-vibration": "^3.1.1", "cordova-plugin-whitelist": "^1.3.4", "cordova-sqlite-storage": "^3.4.0", "cordova-support-google-services": "^1.3.2", @@ -102,6 +104,7 @@ "core-js": "^2.5.4", "date-fns": "^1.30.1", "mx.ferreyra.callnumber": "0.0.2", + "ng-circle-progress": "^1.5.1", "ng2-file-upload": "^1.3.0", "ng2-pdf-viewer": "^5.3.2", "npm": "^6.13.1", @@ -111,6 +114,7 @@ "primeng": "^7.1.3", "run": "1.4.0", "rxjs": "~6.3.3", + "tslib": "^1.10.0", "uk.co.workingedge.phonegap.plugin.launchnavigator": "^3.2.2", "xlsx": "^0.14.3", "zone.js": "~0.8.29" @@ -190,7 +194,8 @@ "cordova-plugin-fingerprint-aio": { "FACEID_USAGE_DESCRIPTION": "User Authentication" }, - "cordova-plugin-firebasex": {} + "cordova-plugin-firebasex": {}, + "cordova-plugin-vibration": {} }, "platforms": [ "browser", @@ -198,4 +203,4 @@ "android" ] } -} \ No newline at end of file +} diff --git a/Mohem/src/app/app.component.html b/Mohem/src/app/app.component.html index 1556b050..936d023a 100644 --- a/Mohem/src/app/app.component.html +++ b/Mohem/src/app/app.component.html @@ -14,7 +14,7 @@ - + diff --git a/Mohem/src/app/app.module.ts b/Mohem/src/app/app.module.ts index 40ac3f80..f6013cf6 100644 --- a/Mohem/src/app/app.module.ts +++ b/Mohem/src/app/app.module.ts @@ -5,18 +5,16 @@ import { HmgCommonModule } from './hmg-common/hmg-common.module'; import { IonicModule, IonicRouteStrategy } from '@ionic/angular'; import { SplashScreen } from '@ionic-native/splash-screen/ngx'; import { StatusBar } from '@ionic-native/status-bar/ngx'; - import { AppComponent } from './app.component'; import { AppRoutingModule } from './app-routing.module'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { ZBar } from '@ionic-native/zbar/ngx'; import { Geolocation } from '@ionic-native/geolocation/ngx'; -import {Camera,CameraOptions,PictureSourceType} from'@ionic-native/Camera/ngx'; -import { FilePath } from "@ionic-native/file-path/ngx"; -import { File } from "@ionic-native/file/ngx"; -import { Base64 } from "@ionic-native/base64/ngx"; +import {Camera, CameraOptions, PictureSourceType} from '@ionic-native/Camera/ngx'; +import { FilePath } from '@ionic-native/file-path/ngx'; +import { File } from '@ionic-native/file/ngx'; +import { Base64 } from '@ionic-native/base64/ngx'; import { FirebaseX } from '@ionic-native/firebase-x/ngx'; - @NgModule({ declarations: [AppComponent], entryComponents: [], diff --git a/Mohem/src/app/hmg-common/directive/feedback/feedback.directive.spec.ts b/Mohem/src/app/hmg-common/directive/feedback/feedback.directive.spec.ts new file mode 100644 index 00000000..7acbd168 --- /dev/null +++ b/Mohem/src/app/hmg-common/directive/feedback/feedback.directive.spec.ts @@ -0,0 +1,8 @@ +import { FeedbackDirective } from './feedback.directive'; + +describe('FeedbackDirective', () => { + it('should create an instance', () => { + const directive = new FeedbackDirective(); + expect(directive).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/hmg-common/directive/feedback/feedback.directive.ts b/Mohem/src/app/hmg-common/directive/feedback/feedback.directive.ts new file mode 100644 index 00000000..14637341 --- /dev/null +++ b/Mohem/src/app/hmg-common/directive/feedback/feedback.directive.ts @@ -0,0 +1,24 @@ +import { Directive, ElementRef, HostListener } from '@angular/core'; +import { TranslatorService } from '../../services/translator/translator.service'; +import { CommonService } from '../../services/common/common.service'; +import { FeedbackService } from './feedback.service'; + +@Directive({ + selector: '[feedback]' +}) +export class FeedbackDirective { + + constructor( + private cs: CommonService, + private ts: TranslatorService, + private el: ElementRef, + private feedBackService: FeedbackService + ) { + + } + + + @HostListener('mousedown') onMouseEnter() { + this.feedBackService.vibrate(); + } +} diff --git a/Mohem/src/app/hmg-common/directive/feedback/feedback.service.spec.ts b/Mohem/src/app/hmg-common/directive/feedback/feedback.service.spec.ts new file mode 100644 index 00000000..dabb73db --- /dev/null +++ b/Mohem/src/app/hmg-common/directive/feedback/feedback.service.spec.ts @@ -0,0 +1,12 @@ +import { TestBed } from '@angular/core/testing'; + +import { FeedbackService } from './feedback.service'; + +describe('FeedbackService', () => { + beforeEach(() => TestBed.configureTestingModule({})); + + it('should be created', () => { + const service: FeedbackService = TestBed.get(FeedbackService); + expect(service).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/hmg-common/directive/feedback/feedback.service.ts b/Mohem/src/app/hmg-common/directive/feedback/feedback.service.ts new file mode 100644 index 00000000..a2b446da --- /dev/null +++ b/Mohem/src/app/hmg-common/directive/feedback/feedback.service.ts @@ -0,0 +1,20 @@ +import { Injectable } from '@angular/core'; +import { Vibration } from '@ionic-native/vibration/ngx'; +// import { SettingsService } from 'src/app/settings/service/settings.service'; + +@Injectable({ +providedIn: 'root' +}) +export class FeedbackService { +// constructor(private vibration: Vibration, private settings: SettingsService) {} +constructor(private vibration: Vibration) {} + +public async vibrate() { +try { +const on = true; +if (on) { +this.vibration.vibrate(500); +}} catch (e) { +} +} +} diff --git a/Mohem/src/app/hmg-common/hmg-common.module.ts b/Mohem/src/app/hmg-common/hmg-common.module.ts index 520715e4..3be427e4 100644 --- a/Mohem/src/app/hmg-common/hmg-common.module.ts +++ b/Mohem/src/app/hmg-common/hmg-common.module.ts @@ -42,19 +42,14 @@ import { NativeStorage } from '@ionic-native/native-storage/ngx'; import { ProgressLoadingService } from './ui/progressLoading/progress-loading.service'; import { BarChartComponent } from './ui/bar-chart/bar-chart.component'; import { DonutChartComponent } from './ui/donut-chart/donut-chart.component'; -//import { UserLocalNotificationService } from './services/user-local-notification/user-local-notification.service'; -//import { LocalNotifications } from '@ionic-native/local-notifications/ngx'; import { EmailComponent } from './ui/email/email.component'; import { Badge } from '@ionic-native/badge/ngx'; -// import { Push } from '@ionic-native/push/ngx'; import { PushService } from './services/push/push.service'; import { LifeCycleService } from './services/life-cycle/life-cycle.service'; import { HmgBrowserService } from './services/hmg-browser/hmg-browser.service'; import { GuidService } from './services/guid/guid.service'; import { TabsBarComponent } from './ui/tabs-bar/tabs-bar.component'; import { PageTrailerComponent } from './ui/spacer/page-trailer/page-trailer.component'; -//import { GeofencingService } from './services/geofencing/geofencing.service'; -// import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx'; import { ButtonComponent } from './ui/button/button.component'; import { ToolbarButtonComponent } from './ui/toolbar-button/toolbar-button.component'; import { ListboxModule } from 'primeng/listbox'; @@ -82,24 +77,23 @@ import { Diagnostic } from '@ionic-native/diagnostic/ngx'; import { DetailButtonComponent } from './ui/detail-button/detail-button.component'; import { RouterModule } from '@angular/router'; import { HeaderButtonComponent } from './ui/header-button/header-button.component'; -//import { CallNumber } from '@ionic-native/call-number/ngx'; import { AppRate } from '@ionic-native/app-rate/ngx'; import { RatingService } from './services/rating/rating.service'; import { InAppBrowser } from '@ionic-native/in-app-browser/ngx'; import { RateService } from './services/rate/rate.service'; -//import { PaymentComponent } from './ui/payment/payment.component'; -//import { PaymentService } from './ui/payment/service/payment.service'; import { MenuService } from './services/menu/menuservice.service'; import { ReplacementListComponent } from '../vacation-rule/replacement-list/replacement-list.component'; import { FileSelectDirective } from 'ng2-file-upload'; - import { PdfViewerModule } from 'ng2-pdf-viewer'; +import { PdfViewerModule } from 'ng2-pdf-viewer'; import { WorkListAttachViewComponent } from '../notification/work-list-attach-view/work-list-attach-view.component'; -import {Camera,CameraOptions, PictureSourceType} from '@ionic-native/Camera/ngx'; +import {Camera, CameraOptions, PictureSourceType} from '@ionic-native/Camera/ngx'; import {File} from '@ionic-native/file/ngx'; import {FileUploderProfileComponent} from './ui/file-uploder-profile/file-uploder-profile.component' 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 { StatsButtonComponent } from './ui/stats-button/stats-button.component'; +import { ServicesButtonComponent } from './ui/services-button/services-button.component'; @NgModule({ imports: [ CommonModule, @@ -165,7 +159,9 @@ import { AccordinTabCustomComponent} from './ui/accordin-custom/accordin-tab-cus WorkListAttachViewComponent, FileUploderProfileComponent, AccordinTabCustomComponent, - AccordinCustomComponent + AccordinCustomComponent, + StatsButtonComponent, + ServicesButtonComponent ], exports: [ NumberRangeComponent, @@ -212,13 +208,14 @@ import { AccordinTabCustomComponent} from './ui/accordin-custom/accordin-tab-cus EmptyDataComponent, DetailButtonComponent, HeaderButtonComponent, - //PaymentComponent, ReplacementListComponent, FileSelectDirective, WorkListAttachViewComponent, FileUploderProfileComponent, AccordinTabCustomComponent, - AccordinCustomComponent + AccordinCustomComponent, + StatsButtonComponent, + ServicesButtonComponent ], providers: [ ConnectorService, @@ -234,14 +231,10 @@ import { AccordinTabCustomComponent} from './ui/accordin-custom/accordin-tab-cus NativeStorage, ProgressLoadingService, PushService, - //UserLocalNotificationService, - //LocalNotifications, Badge, LifeCycleService, HmgBrowserService, GuidService, - // BackgroundGeolocation, - //GeofencingService, Keyboard, KeyboardService, Diagnostic, @@ -250,14 +243,12 @@ import { AccordinTabCustomComponent} from './ui/accordin-custom/accordin-tab-cus HMGPreloadingStrategy, HMGPreloadingStrategyLoading, Diagnostic, - // CallNumber, AppRate, RatingService, InAppBrowser, RateService, Camera, File, - //PaymentService, MenuService, OpenNativeSettings ] diff --git a/Mohem/src/app/hmg-common/ui/nav-buttons/nav-buttons.component.scss b/Mohem/src/app/hmg-common/ui/nav-buttons/nav-buttons.component.scss index b2fe3562..ab0299d1 100644 --- a/Mohem/src/app/hmg-common/ui/nav-buttons/nav-buttons.component.scss +++ b/Mohem/src/app/hmg-common/ui/nav-buttons/nav-buttons.component.scss @@ -1,3 +1,8 @@ .float-left{ float: left; +} +ion-menu-button { + font-size: 0.8cm; + color: white; + background: #22c6b3; } \ No newline at end of file diff --git a/Mohem/src/app/hmg-common/ui/services-button/services-button.component.html b/Mohem/src/app/hmg-common/ui/services-button/services-button.component.html new file mode 100644 index 00000000..ef14b4af --- /dev/null +++ b/Mohem/src/app/hmg-common/ui/services-button/services-button.component.html @@ -0,0 +1,8 @@ +
+
+ +
+
+

{{title}}

+
+
\ No newline at end of file diff --git a/Mohem/src/app/hmg-common/ui/services-button/services-button.component.scss b/Mohem/src/app/hmg-common/ui/services-button/services-button.component.scss new file mode 100644 index 00000000..ff7c3d40 --- /dev/null +++ b/Mohem/src/app/hmg-common/ui/services-button/services-button.component.scss @@ -0,0 +1,34 @@ +.custom-button { + background: white; + margin-bottom: 0px; + border: 1px solid #ccc; + border-radius: 20px; + width: 100%; + max-width: 105px; + height: 100px; + padding: 10px; + min-width: 96px; +} + +.iconBox { + display: block; + width: 100%; + position: static; +} +.iconBox img{ + margin: 0px auto 10px; + display: block; + // max-width: 35%; +} + +.titleBox { + display: block; +} + +.pClass { + font-size: 12PX; + text-align: center; + margin-top: 10px; + color: black; + font-weight: bold; +} \ No newline at end of file diff --git a/Mohem/src/app/hmg-common/ui/services-button/services-button.component.spec.ts b/Mohem/src/app/hmg-common/ui/services-button/services-button.component.spec.ts new file mode 100644 index 00000000..67215f5b --- /dev/null +++ b/Mohem/src/app/hmg-common/ui/services-button/services-button.component.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ServicesButtonComponent } from './services-button.component'; + +describe('ServicesButtonComponent', () => { + let component: ServicesButtonComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ServicesButtonComponent ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ServicesButtonComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/hmg-common/ui/services-button/services-button.component.ts b/Mohem/src/app/hmg-common/ui/services-button/services-button.component.ts new file mode 100644 index 00000000..bdc3b3b1 --- /dev/null +++ b/Mohem/src/app/hmg-common/ui/services-button/services-button.component.ts @@ -0,0 +1,28 @@ +import { Component, OnInit, Input, Output, EventEmitter} from '@angular/core'; +import { TranslatorService } from '../../services/translator/translator.service'; + +@Component({ + selector: 'app-services-button', + templateUrl: './services-button.component.html', + styleUrls: ['./services-button.component.scss'], +}) +export class ServicesButtonComponent implements OnInit { + + @Input() class: any = ''; + @Input() buttonClass: any = ''; + @Input() icon: string; + @Input() title: string; + @Output() trigger = new EventEmitter(); + @Input() focusicon: string; + @Input() disabled = false; + public direction: string; + public style: any; + constructor( + public ts: TranslatorService + ) {} + + ngOnInit() {} + + public onClicked() {} +} + diff --git a/Mohem/src/app/hmg-common/ui/stats-button/stats-button.component.html b/Mohem/src/app/hmg-common/ui/stats-button/stats-button.component.html new file mode 100644 index 00000000..554414ee --- /dev/null +++ b/Mohem/src/app/hmg-common/ui/stats-button/stats-button.component.html @@ -0,0 +1,9 @@ +
+
+ +
+
+ {{statsValue}} +

{{title}}

+
+
\ No newline at end of file diff --git a/Mohem/src/app/hmg-common/ui/stats-button/stats-button.component.scss b/Mohem/src/app/hmg-common/ui/stats-button/stats-button.component.scss new file mode 100644 index 00000000..5c7cc59c --- /dev/null +++ b/Mohem/src/app/hmg-common/ui/stats-button/stats-button.component.scss @@ -0,0 +1,42 @@ +.custom-button { + background: white; + margin-bottom: 0px; + border: 1px solid #ccc; + border-radius: 20px; + width: 100%; + max-width: 105px; + height: 160px; + padding: 10px; +} + +.iconBox { + display: block; + width: 100%; + position: static; + img { + display: block; + max-width: 45%; + padding-bottom: 5px; + padding-top: 5px; + } +} + +.titleBox { + display: block; + span { + font-size: 40px; + font-weight: bold; + color: black; + text-align: left; + display: block; + } +} + +.pClass { + color: black; + width: 85%; + margin-top: 5px; + font-weight: bold; + text-align: left; + display: block; +} diff --git a/Mohem/src/app/hmg-common/ui/stats-button/stats-button.component.spec.ts b/Mohem/src/app/hmg-common/ui/stats-button/stats-button.component.spec.ts new file mode 100644 index 00000000..8446e7cd --- /dev/null +++ b/Mohem/src/app/hmg-common/ui/stats-button/stats-button.component.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { StatsButtonComponent } from './stats-button.component'; + +describe('StatsButtonComponent', () => { + let component: StatsButtonComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ StatsButtonComponent ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(StatsButtonComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/hmg-common/ui/stats-button/stats-button.component.ts b/Mohem/src/app/hmg-common/ui/stats-button/stats-button.component.ts new file mode 100644 index 00000000..b204d12d --- /dev/null +++ b/Mohem/src/app/hmg-common/ui/stats-button/stats-button.component.ts @@ -0,0 +1,29 @@ +import { Component, OnInit, Input, Output, EventEmitter} from '@angular/core'; +import { TranslatorService } from '../../services/translator/translator.service'; + +@Component({ + selector: 'app-stats-button', + templateUrl: './stats-button.component.html', + styleUrls: ['./stats-button.component.scss'], +}) +export class StatsButtonComponent implements OnInit { + + @Input() class: any = ''; + @Input() buttonClass: any = ''; + @Input() icon: string; + @Input() title: string; + @Input() statsValue: string; + @Output() trigger = new EventEmitter(); + @Input() focusicon: string; + @Input() disabled = false; + public direction: string; + public style: any; + constructor( + public ts: TranslatorService + ) {} + + ngOnInit() {} + + public onClicked() {} + +} diff --git a/Mohem/src/app/home/home.module.ts b/Mohem/src/app/home/home.module.ts index 58e6cd52..781a20ec 100644 --- a/Mohem/src/app/home/home.module.ts +++ b/Mohem/src/app/home/home.module.ts @@ -6,7 +6,7 @@ import { HmgCommonModule } from '../hmg-common/hmg-common.module'; import { IonicModule } from '@ionic/angular'; import { HomePage } from './home.page'; import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx'; - +import { NgCircleProgressModule } from 'ng-circle-progress'; const routes: Routes = [ { path: '', @@ -20,7 +20,9 @@ const routes: Routes = [ FormsModule, IonicModule, HmgCommonModule, - RouterModule.forChild(routes) + RouterModule.forChild(routes), + // Specify ng-circle-progress as an import + NgCircleProgressModule.forRoot() ], declarations: [ HomePage diff --git a/Mohem/src/app/home/home.page.html b/Mohem/src/app/home/home.page.html index fe151468..4d425c4d 100644 --- a/Mohem/src/app/home/home.page.html +++ b/Mohem/src/app/home/home.page.html @@ -1,117 +1,164 @@ - - --> - -
- - -
-

{{ts.trPK('home','hello')}}, {{userData.EMPLOYEE_DISPLAY_NAME}}

-
- - + -
- - -
-
- - - - + + + + + + + + + + + -
-
+ + +

Monthly Attendance

+ View your Monthly Time Sheet + + View Detail + +
+ + + +
+ + {{menuItem.PROMPT}} + + + + + + + + + -
-
-

{{ts.trPK('home','dashboard')}}

-
-
- - - - - - - - - - - - - - - - - + + + - - - + --> - + + + + + + + +{{displayTime}} + + diff --git a/Mohem/src/app/home/home.page.scss b/Mohem/src/app/home/home.page.scss index 280c4b4a..81add380 100644 --- a/Mohem/src/app/home/home.page.scss +++ b/Mohem/src/app/home/home.page.scss @@ -1,153 +1,85 @@ -.button-menutoggle.button-menutoggle-md,button-menutoggle.button-menutoggle-ios, -.bar-buttons.bar-buttons-ios.button.button-ios.button-default.button-default-ios.button-menutoggle.button-menutoggle-ios{ - box-shadow: none; - -webkit-box-shadow:none; - -moz-box-shadow: none; - background: transparent !important; - } - .colorBG{ - --background: #f0efef; - } +ion-row { + margin-bottom: 15px; + margin-top: 10px; +} - .menubutton{ - white-space: normal; - color: var(--light); - text-transform: capitalize; - min-height: 47px; - background: transparent; - font-size: 2rem; +.header-toolbar-new{ + --background: #22c6b3; +} +ion-title{ + color: white; position: absolute; - top: 40px; - } - .menubuttonTrans{ - white-space: normal; - color: var(--light); - text-transform: capitalize; - min-height: 47px; - background: transparent; - font-size: 2rem; - position: absolute; - top: 40px; - left: 315px - } - #homeBadgeBtn{ - position: absolute; - top: 2px; - width: 20px; - font-size: 10px; - height: 20px; - padding: 0px; - line-height: 2; - min-width: auto; - min-height: auto; - border-radius: 50%; - } - .homeBox{ - - - } - .header-div{ - background:var(--primary); - background: -moz-linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%); - background: -webkit-linear-gradient(45deg, (--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%); - background: linear-gradient(90deg, #85C48D 0%, #85C48D 13%, #2BB5C6 98%, #2BB5C6 100%); - color:var(--light); - text-transform: capitalize; - - display: block; - position: relative; - height: 210px; - margin-bottom:60px; - border-radius: 0px 0px 70px 70px; - } - - .dash-header{ + top: 0; text-align: center; - margin: 16px 0 0 0; - - } - - .TxtPlace { - margin: 0; - padding: 50px 0 10px 0; - text-align: center; - width:100%; - } - - .serviceItem { - // min-height: 160px !important; - // padding: 0; - // width: 95%; - // border: 0px solid #e4e5e7; - // background: white; - // color: var(--dark); - // border-radius: 7px; - min-height: 200px !important; - padding-top: 0; - width: 95%; - margin-left: 4px; - margin-bottom: 13px; - border: 0px solid #e4e5e7; - background: white; - color: var(--dark); - border-radius: 7px; - p{ - margin-top: 0px; margin-bottom:0px; - font-weight: normal; + left: 15%; + right: 15%; + font-size: 0.42cm; + font-weight: bold; + height: 100%; +} +ion-label{ + display: block; + color: black !important; font-size: 14px; - min-height: 20px; - // white-space: normal; - text-align: center; - -webkit-line-clamp: 3; - -webkit-box-orient: vertical; - overflow: hidden; + font-weight: bold; +} +.main-dashboard-container{ + position: relative; + width: 100%; +} +.header-md:after { + height: 0px !important; + display: none !important; +} +.contentBg:before { + position: absolute; + content: ""; + background: #22c6b3; + height: 100px; + width: 100%; + left: 0; + top: 0px; + z-index: 1; +} +.main-container{ + position: relative; + z-index: 2; + padding-right: 15px; + padding-left: 15px; +} +.attendance-module{ + border-radius: 20px; + background-color: #094875; + padding: 10px; + color: white; + width: 100%; + h3{ + font-size: 18px; + font-weight: bold; + margin: 0; } - span { - display: block; - + span{ + font-size: 13px; + display: block; } - .serviceItemImg { - min-width: 60px !important; - min-height: 70px !important; - width: 80px; - height: 80px; - margin: 10px auto; - background: transparent !important; + img{ + display: block; + margin: 10px auto; + width: 80%; } - - } - .serviceItem.button,.serviceItem.button-md, .serviceItem.button-ios{ - background: transparent !important; - color:var(--dark); - box-shadow: none; - -webkit-box-shadow:none; - -moz-box-shadow: none; - border: 2px solid var(--gray); - min-width: auto; - } - //test - .changeImgBtn{ - margin: 0; - position: absolute; - top: 80%; - left: 53%; - -ms-transform: translate(-50%, -50%); - transform: translate(-50%, -50%); - } -//test - .changeIcon{ - background: #c1c1c1; - width: 40px; - height: 39px; - border-radius: 50% !important; - position: relative; - left: 51px; - top:16px; - } - .menuImg{ - max-width: 30px; - } - .transImg{ - max-width: 45px; - } - + ion-button{ + border-radius: 10px; + padding: 10px; + background: #3CB9DF; + --background: transparent; + --box-shadow: none !important; + height: auto; + min-height: inherit; + margin-top: 10px; + font-size: 12px; + } +} +.swiper-container { + margin: 0 !important; + width: 100% !important; +} \ No newline at end of file diff --git a/Mohem/src/app/home/home.page.ts b/Mohem/src/app/home/home.page.ts index 85d2fe20..3ac99758 100644 --- a/Mohem/src/app/home/home.page.ts +++ b/Mohem/src/app/home/home.page.ts @@ -1,39 +1,36 @@ -import { EitService } from "./../eit/services/eit.service"; -import { Component, OnInit } from "@angular/core"; -import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service"; -import { MenuController, Events, ActionSheetController } from "@ionic/angular"; -import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service"; -import { AuthenticatedUser } from "src/app/hmg-common/services/authentication/models/authenticated-user"; -import { MenuService } from "src/app/hmg-common/services/menu/menuservice.service"; -import { MenuResponse } from "src/app/hmg-common/services/menu/models/menu-response"; -import { CommonService } from "src/app/hmg-common/services/common/common.service"; -import { Geolocation } from "@ionic-native/geolocation/ngx"; -import { ZBar, ZBarOptions } from "@ionic-native/zbar/ngx"; +import { EitService } from './../eit/services/eit.service'; +import { Component, OnInit } from '@angular/core'; +import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; +import { MenuController, Events, ActionSheetController } from '@ionic/angular'; +import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service'; +import { AuthenticatedUser } from 'src/app/hmg-common/services/authentication/models/authenticated-user'; +import { MenuService } from 'src/app/hmg-common/services/menu/menuservice.service'; +import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response'; +import { CommonService } from 'src/app/hmg-common/services/common/common.service'; +import { Geolocation } from '@ionic-native/geolocation/ngx'; +import { ZBar, ZBarOptions } from '@ionic-native/zbar/ngx'; import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx'; -import { Device } from "@ionic-native/device/ngx"; -import { attendanceSwipeScannerRequest } from "./models/attendanceSwipe.Request"; -import { Response } from "src/app/hmg-common/services/models/response"; -import { AttendanceService } from "./services/attendance.services"; -import { LoginRequest } from "../hmg-common/services/authentication/models/login.request"; +import { Device } from '@ionic-native/device/ngx'; +import { attendanceSwipeScannerRequest } from './models/attendanceSwipe.Request'; +import { Response } from 'src/app/hmg-common/services/models/response'; +import { AttendanceService } from './services/attendance.services'; +import { LoginRequest } from '../hmg-common/services/authentication/models/login.request'; import {FileUploaderComponent} from '../hmg-common/ui/file-uploader/file-uploader.component' -import { Camera, CameraOptions,PictureSourceType} from "@ionic-native/Camera/ngx"; -//import { FileChooser } from "@ionic-native/file-chooser/ngx"; -import { File } from "@ionic-native/file/ngx"; +import { Camera, CameraOptions,PictureSourceType} from '@ionic-native/Camera/ngx'; +import { File } from '@ionic-native/file/ngx'; import { DomSanitizer } from '@angular/platform-browser'; -//import { FilePath } from "@ionic-native/file-path/ngx"; -//import { Base64 } from "@ionic-native/base64/ngx"; import {FileUploderProfileComponent} from '../hmg-common/ui/file-uploder-profile/file-uploder-profile.component' import { SharedDataService } from '../hmg-common/services/shared-data-service/shared-data.service'; import { DevicePermissionsService } from '../hmg-common/services/device-permissions/device-permissions.service'; @Component({ - selector: "app-home", - templateUrl: "./home.page.html", - styleUrls: ["./home.page.scss"] + selector: 'app-home', + templateUrl: './home.page.html', + styleUrls: ['./home.page.scss'] }) export class HomePage implements OnInit { userData: any = {}; - user_image: any = "../assets/imgs/profile.png"; + user_image: any = '../assets/imgs/profile.png'; menuList: any = []; zbarOptions: any; scannedResult: any; @@ -41,11 +38,77 @@ export class HomePage implements OnInit { lat: any; longt: any; deviceID: string; - public maxFileSize =10 * 1024 * 1024; - public fileUploder :FileUploaderComponent; + public maxFileSize = 10 * 1024 * 1024; + public fileUploder: FileUploaderComponent; // public fileUploderProfile:FileUploderProfileComponent location: boolean; - camera: boolean + camera: boolean; + public statsButtons = [ + { + title: 'Work List', + statsValue: '79', + icon: 'assets/icon/new-design/work_list.png' + }, + { + title: 'Pending Request', + statsValue: '13', + icon: 'assets/icon/new-design/pending_request.png' + }, + { + title: 'Missing Swipes', + statsValue: '99', + icon: 'assets/icon/new-design/missing_swipe.png' + }, + { + title: 'Leave Balance', + statsValue: '02', + icon: 'assets/icon/new-design/leave_balance.png' + }, + { + title: 'Ticket Balance', + statsValue: '01', + icon: 'assets/icon/new-design/ticket_balance.png' + } + ]; + + public employeeServicesButtons = [ + { + title: 'Leave Management', + icon: 'assets/icon/new-design/leave_management.png' + }, + { + title: 'Advance Payments', + icon: 'assets/icon/new-design/advance_payments.png' + }, + { + title: 'Medical Insurance', + icon: 'assets/icon/new-design/medical_insurance.png' + }, + { + title: 'Pay Slip', + icon: 'assets/icon/new-design/pay_slip.png' + } + ]; + public slideOptsOne = { + slidesPerView: 3.5, + spaceBetween: 10 +}; +public slideOptsTwo = { + slidesPerView: 3.2, + spaceBetween: 10 +}; + +public timeInSeconds: any = 200; +public time: any; +public runTimer = false; +public hasStarted = false; +public hasFinished = false; +public remainingTime: any; +public displayTime: any; +public menuEntries: any; +public titleFormat: any; +public percent = 10; + constructor( public ts: TranslatorService, public menu: MenuController, @@ -63,44 +126,86 @@ export class HomePage implements OnInit { private cameraController: Camera, public sharedData: SharedDataService, private sanitizer: DomSanitizer, - //private transfer: Transfer, - private file: File, - //private filePath: FilePath + private file: File, private permissions: DevicePermissionsService ) { - this.events.subscribe("img-change", displayImg => { - - // this.user_image = "data:image/jpeg;base64"+displayImg; - // alert("home app: "); - this.user_image = this.sanitizer.bypassSecurityTrustUrl("data:Image/*;base64,"+displayImg); - console.log("html saved img: "+this.user_image); + this.events.subscribe('img-change', displayImg => { + this.user_image = this.sanitizer.bypassSecurityTrustUrl('data:Image/*;base64,'+displayImg); + console.log('html saved img: ' + this.user_image); }); } - ngOnInit() { - this.getUserDetails(); - this.getMenu(); - this.setServicesPrivilage(); + // this.getUserDetails(); + // this.getMenu(); + // this.setServicesPrivilage(); - this.getCount(); + // this.getCount(); - - this.events.subscribe("getNotCount", badge => { - this.notBadge = badge; - }); + this.initTimer(); + // this.events.subscribe('getNotCount', badge => { + // this.notBadge = badge; + // }); } + // formatSubtitle = (time: number) : string => { + // return + // } + + initTimer() { + this.time = this.timeInSeconds; + this.runTimer = false; + this.hasStarted = false; + this.hasFinished = false; + this.remainingTime = this.timeInSeconds; + 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); + this.percent = this.percent + 1; + if (this.remainingTime > 0) { + 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; +} + getDeviceLocation() { - let isVirtual = this.device.isVirtual; - if(isVirtual==true){ - alert("emulater>>>>>>>"+isVirtual); - alert("You are using virtual device"); + const 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) { @@ -114,9 +219,8 @@ export class HomePage implements OnInit { this.attendance(); }) .catch(error => { - console.log("Error getting location", error); + console.log('Error getting location', error); }); - } else { return false; } @@ -128,8 +232,8 @@ export class HomePage implements OnInit { setServicesPrivilage() { for (let i = 0; i < AuthenticationService.servicePrivilage.length; i++) if (AuthenticationService.servicePrivilage[i].Previlege == false) { - document.getElementById(AuthenticationService.servicePrivilage[i].ServiceName).setAttribute("disabled", "disabled"); - document.getElementById(AuthenticationService.servicePrivilage[i].ServiceName).style.filter = "grayscale(1)" + document.getElementById(AuthenticationService.servicePrivilage[i].ServiceName).setAttribute('disabled', 'disabled'); + document.getElementById(AuthenticationService.servicePrivilage[i].ServiceName).style.filter = 'grayscale(1)' } } getCount() { @@ -169,20 +273,19 @@ export class HomePage implements OnInit { ionViewDidLoad() { this.getUserDetails(); - console.log("getUserDetails"); + console.log('getUserDetails'); this.geolocation .getCurrentPosition() .then(resp => { // resp.coords.latitude // resp.coords.longitude - //console.log("Loc 1"); console.log(resp.coords.latitude); console.log(resp.coords.longitude); this.lat = resp.coords.latitude; this.longt = resp.coords.longitude; }) .catch(error => { - console.log("Error getting location", error); + console.log('Error getting location', error); }); } private openMenu() { @@ -193,12 +296,12 @@ export class HomePage implements OnInit { .loadAuthenticatedUser() .subscribe((user: AuthenticatedUser) => { if (user) { - this.events.publish("setMenu"); + this.events.publish('setMenu'); this.userData = user; - //set User Info + // set User Info this.sharedData.setSharedData(this.userData, AuthenticatedUser.SHARED_DATA); this.user_image = user.EMPLOYEE_IMAGE - ? "data:image/png;base64," + user.EMPLOYEE_IMAGE + ? 'data:image/png;base64,' + user.EMPLOYEE_IMAGE : this.user_image; console.log(user); } else { @@ -207,7 +310,7 @@ export class HomePage implements OnInit { }); } public Vacation_Rule() { - this.common.navigateForward("/vacation-rule/home"); + this.common.navigateForward('/vacation-rule/home'); } private getMenu() { this.menuService.getMenu().subscribe((result: MenuResponse) => { @@ -217,8 +320,10 @@ export class HomePage implements OnInit { private handleMenuResult(result) { if (this.common.validResponse(result)) { if (this.common.hasData(result.List_Menu)) { - console.log("list menu"); + console.log('list menu'); this.menuList = result.List_Menu; + console.log('umar: ' + this.menuList); + this.getMenuDetails(); } } } @@ -230,31 +335,33 @@ export class HomePage implements OnInit { this.common.openChangeImagePage(); } - public getMeunDetails(index) { - let item = this.menuList[index]; - let selMenu: MenuResponse = new MenuResponse(); + public getMenuDetails() { + const item = this.menuList[0]; + const selMenu: MenuResponse = new MenuResponse(); selMenu.List_Menu = item; selMenu.userid = this.userData.EMPLOYEE_NUMBER; - console.log("menu: "+selMenu.List_Menu); + console.log('menu: ' + selMenu.List_Menu); this.common.sharedService.setSharedData(selMenu, MenuResponse.SHARED_DATA); - if (item.MENU_TYPE == "M") { - this.common.openMyTeamPage(); - // this.navCtrl.push("MySubordinatePage"); - } else if (item.MENU_TYPE == "S") { - this.common.sharedService.setSharedData(item, 'mySpecList'); - this.common.openMySpecialistPage(); - //this.navCtrl.push('MySpecialistPage',{"mySpecList":item}); - } else { - this.getMenuEntries(item); - } + this.getMenuEntries(item); + // if (item.MENU_TYPE === 'M') { + // this.common.openMyTeamPage(); + // // this.navCtrl.push("MySubordinatePage"); + // } else if (item.MENU_TYPE === 'S') { + // this.common.sharedService.setSharedData(item, 'mySpecList'); + // this.common.openMySpecialistPage(); + // // this.navCtrl.push('MySpecialistPage',{"mySpecList":item}); + // } else { + // this.getMenuEntries(item); + // } } getMenuEntries(item) { - let request: any = {}; + console.log('umar I am clicked2'); + const request: any = {}; let selEmpNo: string = null; let nationality: string = null; request.P_SELECTED_RESP_ID = -999; - if (item.MENU_TYPE == "S") { + if (item.MENU_TYPE === 'S') { request.P_SELECTED_RESP_ID = item.RESP_ID; } else { selEmpNo = this.common.sharedService.getSharedData( @@ -269,8 +376,8 @@ export class HomePage implements OnInit { request.P_SELECTED_EMPLOYEE_NUMBER = selEmpNo; request.P_MENU_TYPE = item.MENU_TYPE; request.NationalityCode = nationality; - //set emp and resp id - console.log("set data"); + // set emp and resp id + console.log('set data'); this.common.sharedService.setSharedData( selEmpNo, MenuResponse.SHARED_SEL_EMP @@ -288,10 +395,12 @@ export class HomePage implements OnInit { } sortMenuEntires(list) { - let tree = this.common.list_to_tree(list); - this.common.sharedService.setSharedData(tree, "menuEntries"); + const tree = this.common.list_to_tree(list); + this.menuEntries = tree; + console.log(this.menuEntries); + this.common.sharedService.setSharedData(tree, 'menuEntries'); // this.common.navigateForward("/eit/homepage"); - this.common.openEITPage(); + // this.common.openEITPage(); } private handleMenuEntiresResult(result) { @@ -313,8 +422,8 @@ export class HomePage implements OnInit { // flash: "off", // drawSight: false // }; - //console.log("your currnt location is"); - //console.log("Loc"); + // console.log("your currnt location is"); + // console.log("Loc"); this.permissions.requestCameraAutherization().then(granted => { this.camera = granted as boolean; if (this.camera) { @@ -352,25 +461,25 @@ export class HomePage implements OnInit { } swipeAttendance() { - let request: attendanceSwipeScannerRequest = new attendanceSwipeScannerRequest(); + const 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('request'); console.log(JSON.stringify(request)); this.attendance_service .attendanceSwipeScanner(request, () => { - console.log("Error inside in swipe attendance"); + console.log('Error inside in swipe attendance'); }) .subscribe((result: Response) => { if (this.common.validResponse(result)) { - console.log("response"); + console.log('response'); console.log(result); - this.common.presentAlert(this.ts.trPK("home", "swipeAlertSuccess")); + this.common.presentAlert(this.ts.trPK('home', 'swipeAlertSuccess')); } else { - this.common.presentAlert(this.ts.trPK("home", "swipeAlertFailed")); + this.common.presentAlert(this.ts.trPK('home', 'swipeAlertFailed')); } }); } @@ -378,3 +487,14 @@ export class HomePage implements OnInit { this.common.openProfile(); } } + + + + + + + + + + + diff --git a/Mohem/src/assets/icon/new-design/advance_payments.png b/Mohem/src/assets/icon/new-design/advance_payments.png new file mode 100644 index 0000000000000000000000000000000000000000..f867e01349c9ddc9d06a5a2d838ceb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request.png new file mode 100644 index 0000000000000000000000000000000000000000..2af2dff76a790ef6b6edb463404b5094089fe23f GIT binary patch literal 1231 zcmV;=1Tg!FP)Px#IAvH#W=%~1DgXcg2mk?xX#fNO00031000^Q000000-yo_1ONa40RR91E1&}a z1ONa40RR91A^-pY06+u>vj6}DMM*?KR9FesSY1q1M--lA0e59#X($m=lZ{|3HKi;K zjmBVBqCPe)FKyBXO^UJh#gMdVN-#cIc`0chn)nm@&=(~pZT)#MQQIXnBz@thRok?p zX=%hZX<#c2Y+xO~Z=9Ljyn6bxR5&SfSrZhRDx&3A=XPPBBS4b}q zgiE5`I$WPVTpXV19=D!0F$YAn9f!_YN^`D|Uf=-Ss{lLtE$|1BSK+zh17SLnt&T6j zD%*Ny-U8~5ur{x*1z%ZdNw~Qw>+?G^azm7bE5{cS527sU5?LCm5TPxbT;a^z#o7PG z>~D9O{3VY;X{aHRXg%>sIJ4AiQvgI^}nE3ToZ$R?*}$|nadXSa-x$38R3dJSEkD{;%7 z1sOEQfP48x5i|bGaARlV#wk**IA(GiwBr}}8sInUG{6h`G!Ov_F3WXx6l^#y{p$mZ z{)+Vv@d8Qd7~d>?Kp{kNG-uXpL4Jq?s$YFsG#x!Gg7q8xI>|RPc2nH=s88T-{TQ)Y z;D8=;s-K(=?1R8oz`}}?q=2>1#Q5?MTd0eUi{*r4dUT3xg-Ab7=im$0<2|VBaTID}i2AR_a{NPCb)M2k=ex(!kL-V2i z*K2|oSy576W^*I&z9ptET@#IsjUp5Zi9{kHf*b2pSDCb7?@n>+h~gE4`?;Q21Fd#Q z`zxvcbOPsm0}Ojj@FF{xnom}l)~8hQmTD)|BkRaGfshN#gb%$)kR$F~FQ+j{Ows>zXHY+iH5b_}PPmZLQs z!>YURWh@pm9Md$fGLCDwZvtLre*zT#`zQ{O5cB(i!`glwdO+Jy;%9(6@O6&pl({PF9Xbo2a z-9DesXTAlPXMy;A_=W^?*HSD;Yb>)GJH?|B2Y3%gfI^DpXpKUyzRI-}N8YpC<`&?) tRTd~zI$!0K+x*cDECOU-tl+~g9s#|%-`q`GsDuCj002ovPDHLkV1g;5BM1Nh literal 0 HcmV?d00001 diff --git a/Mohem/src/assets/icon/new-design/it_forms.png b/Mohem/src/assets/icon/new-design/it_forms.png new file mode 100644 index 0000000000000000000000000000000000000000..793d983c6c19057211b074646fb14094a22158b5 GIT binary patch literal 853 zcmV-b1FHOqP)Px#IAvH#W=%~1DgXcg2mk?xX#fNO00031000^Q000000-yo_1ONa40RR91AD{yO z1ONa40RR91C;$Ke06Ap^_b+hh<<{m)YGTpv67O!~4!V z^S;mSJ2QX~5sqO3P;Z$d)b~Lb6cTKKZ@{-;7u*J16eWoUxCd4_2*3`V9ia@JG1zqQ zQ2}3pg>X3NwX_K9Qpn-Se!WOOg@>S9Dx!GM_bXoDmr0?+XAt&~->L<^%R04z@6qN( zZt+^b*K}klxb<5Gx2L6%kdhsnK~75-wSM{Q4YqWu!zxZYw`l>b?IiE3B zm?vik&ZDzKC}_292afmjCO87`%zc=`VE(UlS-fgq%H$WsIQJMdKF3AL{3H|t);H%9 ze+Pep#)n%N%uj`_?JtnQwi7QSbEQu{cq(k-ACd7WHLFRS8Dsy zc!h2Fwl_CdZBt!#F!ie0#NQ$5{-(;ve*%6@t78+tZhKnCip2iUw&(smFY>B+*V+!; z^;OH;#lq|U>7E;L?(Z(KXT*kZd^6aAb)mt3Lk<3W^}th5%?YzLu)|I89P}toRKPa4 fi}ow%binZ+oYL{r!%}AV00000NkvXXu0mjfiJ*fB literal 0 HcmV?d00001 diff --git a/Mohem/src/assets/icon/new-design/leave_balance.png b/Mohem/src/assets/icon/new-design/leave_balance.png new file mode 100644 index 0000000000000000000000000000000000000000..c915cc7eeceed83b46d15d8587cffb827c6f63cb GIT binary patch literal 1324 zcmV+{1=IS8P)Px#IAvH#W=%~1DgXcg2mk?xX#fNO00031000^Q000000-yo_1ONa40RR91B%lKT z1ONa40RR91Bme*a013vy#sB~WqDe$SR9FeMmTQPrRTRf(EFYz!7@>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diff --git a/Mohem/src/assets/icon/new-design/medical_insurance.png b/Mohem/src/assets/icon/new-design/medical_insurance.png new file mode 100644 index 0000000000000000000000000000000000000000..21196156649bbbb7ffeb92bb5ac2d9d9c245566b GIT binary patch literal 815 zcmV+~1JL}5P)Px#IAvH#W=%~1DgXcg2mk?xX#fNO00031000^Q000000-yo_1ONa40RR919iRgM z1ONa40RR91A^-pY0N%nIJOBU!rAb6VR7efAl|5G5KomyDA_bvxR)ET!G;!(_%noo? zfOY^ou(AVK0op;FY#^dYT1=DH$_j8Ak|tK}XXbGfSuz+)-#M3gKQr&mXe8s@_KI2Z z6-u~-A@nLw^;=Lw;~IMeolB>gfHj(8tI;gPw2>3&L@KOi)zhVw%0ui7Y%_CgHIJcH zgOE}2w-5(kqX&(qD~uF!sLK;b;Rs9x#uOGIAYU~!x-+ny)<;dqz{68CW|B3k*D`-R zVA337xPa=ea{L0Gs}T!53_}6=$Dq?boKkk5@)Xx;^Qg}*ZM9#tC7R;#^{3&%U36N{ z-5o41igzFEYU=4Vf2*c6Jfp&-USRZ(J^u1ht;HUaI~ZzOg!Q8x>O5s>945`wbP=3hP8Divh=aXQ(^+u( zKB?88=|yU7T1Lxsu#9}zl>LVf%47 z$5!G5QYc_ex~rv&d_BS4XZ2XcPq1Uqqs`zyWq2iM>{7Z*)lHj<#srlV9=gyOMO3eV zAv7u_s!6vnf?brb*bXs%tWX{%t8we@9x0*?YrUGDKQecfR-+kc!5lnnqlC%UFxzHf zwXvE{p0HSJEJHaErINuJdOSV0v(g%M1^9;NcL5NGH{ t31t>w&8uTUJb~VnPPx#IAvH#W=%~1DgXcg2mk?xX#fNO00031000^Q000000-yo_1ONa40RR918lVFJ z1ONa40RR91Bme*a0C5nK*8l(mMM*?KR7efAlZ|m3HxNcWo)mB$1SPNoqXc#kqyk?D zLJ90Z=s@g1NCjdCx>OLlg5*64%Q?~xN7RhInWz2s2MZiM{_^GXlvw=~>%WHigxJ{m z;}iB?tjuIbn4V(C`yDd;N}b~0ut2C`cHm_f{J-xy*X9hV#PNwCiqDXyReT=8qvH#^j(}l zHSmnJ2T1TP6{g~K9@xSWCKI#+7r#K%>Zn;?qGq_j|5SMN6D!~jLqHl~o z_WxCBEs!71f3 literal 0 HcmV?d00001 diff --git a/Mohem/src/assets/icon/new-design/pay_slip.png b/Mohem/src/assets/icon/new-design/pay_slip.png new file mode 100644 index 0000000000000000000000000000000000000000..7aab9d1e6ba21dfcaf076d6a8c9f5f48f880fac2 GIT binary patch literal 1200 zcmV;h1W)^kP)Px#IAvH#W=%~1DgXcg2mk?xX#fNO00031000^Q000000-yo_1ONa40RR91A)o^Q z1ONa40RR91B>(^b0Kf1duvPc0# z0F&+}5Uw$$w0QI{s96aIv}n(D$c{I5ZA-)0rn?;jIOI>ORNf!z-75MIy)Sxp4vOB9 zcSZ3|PLv-mi`Bnxi1MRlp+zINt=ah^C1~(m$BMDR>dRq^N2KRjTjffBLZW^!htRR*?pOO`V zvFYRR1!Sz!6`)_~SFj#YdoD5wc`-wMy+2r`(%{hfuUkrh-mDT6X4^n1z`t@3*1$9*xVC}KZH6>J&pZJEcHM)G3DhHF7=M`3B&_`-p)1e$iqP9S;xYFe|b znVON>aF!^#h}BdWQ?i9R8TTHNAF$$L&Z7_;8xzTe*(=$R&nBsClmK-cWQuq>^J;IZ zl~0&Z`@C8mOE}!$ceA*Zd(R;SqiI^wS`%|f&kjrmo;_Nhz4uw`{?9($r8>6O)I z2FLN*;$4ps6VZzL)1UP+s?{? zNv!BwV;2hl-Vz)W|T}ga1=IW4=((2f@<+DoWSmfKW@x1tz7Kto!^0k@> z6IePuC0?!-`4yW7G#B#VNh^S@YdE&0C4L5w$PH_KeYpS7e)0Ci3Eu(657*;ge?tX+ z;;1X&EjkF_tR1Ayl~r_n%B4SAa~_qEqntx1hA%3I89&>_J9h=!CW#lZTseh(zAEVG zS0>TOGXX^gpivEaJhlY>B9H{SL5yv(S3yLhb3i7@s7{x_epemu-ttb=w~q1WTlvfH z4iv;^pgbOA0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hU;BRzXe1Ovi-neZ@iu;J_48S_DYPG?@m3ps9FZq$ZXj zfm*i8SG=!M!FgB%H4%W3kD-`W_4$wPM-xIu0aU;ie|wm z%#1p#a&JQw5|GL;1q)Dt2B^Uh^14JI$_H)V$I)RG@xVxzBv8u&@)zMT#IOz?NZOMh zfRSPiP`+qFl%f0fl*^71d}yUALG90jE>&?4By-_1_7dpQyaEDs(4O*)>^dg4y@pt# zodPyvsDX-AKx#k;5j2NOrE|{U;2mt`6lQ32^!v%vr(PN0u%_@XM9_^wl0LK&U&q!I z)acr4pMK(u9yx4ncW-W7TyY-$cI&1d^m6yd(oC11UqJ|~V9tA`myg_@eCO>cVm<5X z$1BGMdpzCXTm;vw^X08S?oR#l@R1cNW^Vp+BR$YdQ*)e5vg@>ZnVl}be*UGCZ)|Jh zPv`gZ7q;2>ZpA*5+I(%!oeSTlw*8*kmDncG%=XOswAlFA0~(mP{K10r{2Rx&pRN0s zF4O4WPAPlVZk@luv$O6Dj~z7 z(lgdp<40$h#!TBBdvnlsy0l{}&$g}b{>-9Hd0ZD;R~p+Rrm6KsdZVkD{!fZQ@*#!@ z^70A95P?yE5oV76(t9T#jf{=`oB4&7`#=6v8hZAbrke6I3Kck@eAU QMgRZ+07*qoM6N<$f&zSIVgLXD literal 0 HcmV?d00001 diff --git a/Mohem/src/assets/icon/new-design/ticket_balance.png b/Mohem/src/assets/icon/new-design/ticket_balance.png new file mode 100644 index 0000000000000000000000000000000000000000..f769f41c055d87112edf27d4aec6beca4f5468e1 GIT binary patch literal 999 zcmVPx#IAvH#W=%~1DgXcg2mk?xX#fNO00031000^Q000000-yo_1ONa40RR91FrWhf z1ONa40RR919smFU0EQ0VQvd)1T}ebiR9Fekm+@8GFc60Wum9r>@CLXOMBN}8U?w0; z5HSJi1W6|#od7Wb?gTXxkWP?(KS$yzj_jl~Kz{FizSG@VI$3sj3e0;U9u!pGd*op zjQrSQYwsVUu{5O<8n!o}`Zx>(4TIzD z0;`$~D(@TYAvI^RV#kDz{A$+;7>ZP=S0zYIOIo0mgOtx2?=Y8=X~H_1(SX+5Qv40% zWcB+iUBVD@kV;U4n)Do`2{=$plh3@5Ik-w@)T?VCscWLEBj<(w^q_(q&PpdRf+_q0 z3rqNDl`MD(UB5<#oKE~6^sBegqa&cFpTlR#vaotE&?QSkH6=(6nvZyh^9VJhlo3>o zC{hLQ6l<^L{5pBOUi=Zq@z@_Tm_z{`VHJ&2ZbtADWK+@ubE$-n71$@Zf;n_*pAFRh zZha#cFavF(Ph*ntrrWj81oC$9E#rMQQ2B`+R$PPiV3M*#T{5!{);&3;wB|l1-AuFM z>Kbo-u^4^r*?QPqLyclJXk5UdWSK~F8t9TCp&AS7;{{ym1PqBGsro40to=aX3S6APR}ac%FokAUPL7wuuKtnV{@!55JMM4STVHRm zk^%K#A;{pweQAwB>I4)I`i`@N63*ckGPnjwW2su3*Q>(|xz}LiwCkhPPWLAjW2jZx zw*ejBTt!GX=-4exK~jTOPC{x>yoWSz9VSj~pd^`t11Sf+%ev8ko_^R2?&m7Cftr>? zQ0|>2_8$Jg$j7>j^5Hd0)zk!a!vC$*2HKMv9|#TIFs^;9&z$rm`*JbD>E@?8;m3*i8l6lM4+?gLM_o`Do2RTgOSe4V* zoo{XtH>r0~J9BUWwFmQ|%2`cRuf5T`KN>mX4wL2Ey(U*ZO{RJdV VH@zR-a*6-|002ovPDHLkV1oVSxQGA% literal 0 HcmV?d00001 diff --git a/Mohem/src/assets/icon/new-design/ticket_request.png b/Mohem/src/assets/icon/new-design/ticket_request.png new file mode 100644 index 0000000000000000000000000000000000000000..f455ce2eb69a6919e75a8a431be7e7fed93dbc15 GIT binary patch literal 1060 zcmV+<1l#+GP)Px#IAvH#W=%~1DgXcg2mk?xX#fNO00031000^Q000000-yo_1ONa40RR91FrWhf z1ONa40RR919smFU0EQ0VQvd)1nn^@KR9FekS3y?WFcg&1Zdl0LQYqp2MWnc1u^ro%?12e*1eV~V$EQw__D3MZq|6}( zn-D`_%&1d|=$n3wHZ}G(HZhXo8|qaH;Oir1dE>l};k`2qoDu7H4lpEXBSk0pYsGA9srn?(38z+{PD%sHyYRNp{VclC?SbqO&5YlFIOf=@2ttl^%*tzeL? zh!Mff5rPGJg<;wWTE=)_V(bv@I&p)+f|dalblvs_LIg38OQislCOAPv1EB6@)_N`x zhAHOZh#|=NYOwc!50&RHaSHZ8A0#4>33AXqkQjmrq>qDN8yn5q5n)6w-4Jx*9A3TU z{Ehthpb97$ns1;Fj=(7xgEMf`h%n(P*mN3&(D=s3AWywgjtUMweINWN#F&^lgkTe5 z2#kq9LV?*P?!mYRQ_zXvY3v0L^X`!N)Atwvgqu2 z@ScKfUEl*#F5$Jl)e7jyRBGXAot-pXgKa>;i!WMNEKd~QCA`+RS^@KyM97YiQU<}p zZJZo_i(4k5u9n24OSD%>wE~!+ka}P2=(D7IGUI4mHr>bDY+xzH5KC#Y!ctP%4exW| z(&TT}eXRg|v4m2{o_-d7_wfgpLIy47Dg1uc5%RjE?YvBjVskya2Dt88ecPO(lRX^U zxuVU)??4tYsuy5J;c~&oRi=x&WMO7Y$=1YQnL_-s2*^KuudII6OyRKOtNOBj--s7z zCyfO#2#4->T(T!6rH=4Hxko>N4SktgxXMq-!p;qa=D%JM(XGbUBbq&2%L6cFNMiw7 z%CqF)_=Z75_i@6TGBEj;jm!k!lBAi**>K#nQ0fK9d4wnLCkH302nv3VeW7K(p0${^ zBwyUNk+xO<5>GKRX~WMu`j77DzAZG^j5%-6=uW{i8gE6d0Ox@7PRKp1MJL9xN}Vxv zC+=v(GOh6@m#|s^Vm?9gUh?&Lyq6`(SE_W~1;i8<~KmCyYK3X4m`=&&b%NhDA_FK%Amm eM}?e1u!etfhEB3GO)PN$0000tN literal 0 HcmV?d00001 diff --git a/Mohem/src/assets/icon/new-design/uniform_request.png b/Mohem/src/assets/icon/new-design/uniform_request.png new file mode 100644 index 0000000000000000000000000000000000000000..3e104c708964a8b4fe2d0c26e20b79e75ffd4e4b GIT binary patch literal 1069 zcmV+|1k(G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$_L6F^ zO?F+g?LN!*uiX98`tjX~Qo*;A?ymJu=`7Cie9pIpVI%WXpXy?gTe~DWM4f9tcAY literal 0 HcmV?d00001 diff --git a/Mohem/src/theme/styles.scss b/Mohem/src/theme/styles.scss index 73b3023f..d1df6cd7 100644 --- a/Mohem/src/theme/styles.scss +++ b/Mohem/src/theme/styles.scss @@ -855,3 +855,17 @@ color: var(--dark); // left: 0; // width: 100%; // +// .employee-slider .custom-button{ +// padding: 13px !important; +// } +// .employee-slider .iconBox img{ +// max-width: 40% !important; +// } + +.slideFullWidth { + margin-left:-15px; + margin-right:-15px; +} +.slideFullWidth .swiper-container .swiper-wrapper .swiper-slide:first-child { + margin-left:15px; +} \ No newline at end of file diff --git a/Mohem/tsconfig.json b/Mohem/tsconfig.json index b271fd9f..1d9c2de7 100644 --- a/Mohem/tsconfig.json +++ b/Mohem/tsconfig.json @@ -18,5 +18,10 @@ "es2018", "dom" ] + }, + "angularCompilerOptions": { + "fullTemplateTypeCheck": true, + "strictInjectionParameters": true } } + From 11432b633e2530ee9fa95362c338aca6f11dd7de Mon Sep 17 00:00:00 2001 From: umasoodch Date: Sun, 26 Jan 2020 09:11:04 +0300 Subject: [PATCH 02/14] timer added according to the shift hours --- Mohem/package.json | 2 +- Mohem/src/app/home/home.page.html | 42 ++++++++++++++++++------------- Mohem/src/app/home/home.page.scss | 20 ++++++++++++++- Mohem/src/app/home/home.page.ts | 25 +++++++++--------- 4 files changed, 57 insertions(+), 32 deletions(-) diff --git a/Mohem/package.json b/Mohem/package.json index 409df5c5..43033639 100755 --- a/Mohem/package.json +++ b/Mohem/package.json @@ -203,4 +203,4 @@ "android" ] } -} +} \ No newline at end of file diff --git a/Mohem/src/app/home/home.page.html b/Mohem/src/app/home/home.page.html index 4d425c4d..15daa898 100644 --- a/Mohem/src/app/home/home.page.html +++ b/Mohem/src/app/home/home.page.html @@ -138,25 +138,31 @@ --> +

+ Time Left Today + + - -{{displayTime}} - +
+ +

{{ '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; From 6d3dd907a608c3740a61b150ce6e5e840f437172 Mon Sep 17 00:00:00 2001 From: ashwaq Date: Mon, 27 Jan 2020 11:50:18 +0300 Subject: [PATCH 07/14] fix attend-tracking --- .../attendance-tracking/home/home.component.html | 4 ++-- .../attendance-tracking/home/home.component.ts | 15 +++++++++++---- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Mohem/src/app/attendance-tracking/home/home.component.html b/Mohem/src/app/attendance-tracking/home/home.component.html index a391e4e3..b99c4ead 100644 --- a/Mohem/src/app/attendance-tracking/home/home.component.html +++ b/Mohem/src/app/attendance-tracking/home/home.component.html @@ -19,7 +19,7 @@
-
@@ -28,7 +28,7 @@ {{ts.trPK('attendance-tracking','shift-time')}}

- 08:00 - 17:00 + {{attendanceTrackingList.P_SHT_NAME}}
diff --git a/Mohem/src/app/attendance-tracking/home/home.component.ts b/Mohem/src/app/attendance-tracking/home/home.component.ts index 73884a0a..422355c2 100644 --- a/Mohem/src/app/attendance-tracking/home/home.component.ts +++ b/Mohem/src/app/attendance-tracking/home/home.component.ts @@ -13,7 +13,7 @@ export class HomeComponent implements OnInit { attendanceTrackingList:any =[]; cuurentDate:any; direction: string; - checkOut:boolean= true; + isCheckOut:boolean= false; constructor( public cs:CommonService, @@ -27,7 +27,7 @@ export class HomeComponent implements OnInit { this.direction = TranslatorService.getCurrentLanguageName(); this.cuurentDate =this.getHeaderDate(this.cuurentDate); //**condition to check is checkout or not to display PUSE Button** - // if(ischeckOut){ + // if(ischeckOutP_REMAINING_HOURS){ // this.checkOut=true; // }else{ // this.checkOut=false; @@ -49,8 +49,15 @@ export class HomeComponent implements OnInit { 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 ==='00:00'){ + this.isCheckOut=true; + }else{ + this.isCheckOut=false; + } + } } } @@ -70,7 +77,7 @@ openDialog(){ this.cs.confirmAlertDialogAttendance( () => { //to open scan(); - + //this.cs.openScan(); }, this.ts.trPK('general', 'ok'), () => {}, this.ts.trPK('general', 'cancel'), this.ts.trPK('vacation-rule', 'confirmation'), From d1fbd343307fa1fd5b266c15d17ab868171e507f Mon Sep 17 00:00:00 2001 From: umasoodch Date: Mon, 27 Jan 2020 16:36:14 +0300 Subject: [PATCH 08/14] added logic for attendance --- .../dashbored/AttensanceTrackingList.ts | 15 +++-- .../dashbored/attendance-tracking.response.ts | 10 +-- .../stats-button/stats-button.component.scss | 2 +- Mohem/src/app/home/home.page.html | 12 ++-- Mohem/src/app/home/home.page.scss | 44 ++++++++++++- Mohem/src/app/home/home.page.ts | 66 ++++++++++++------- 6 files changed, 107 insertions(+), 42 deletions(-) diff --git a/Mohem/src/app/hmg-common/services/dashbored/AttensanceTrackingList.ts b/Mohem/src/app/hmg-common/services/dashbored/AttensanceTrackingList.ts index e4b22244..b5083234 100644 --- a/Mohem/src/app/hmg-common/services/dashbored/AttensanceTrackingList.ts +++ b/Mohem/src/app/hmg-common/services/dashbored/AttensanceTrackingList.ts @@ -1,9 +1,10 @@ -export class AttendanceTrackingList{ - public SCHEDULED_HOURS :string; - public SPENT_HOURS : string; - public REMAINING_HOURS : string; - public RETURN_STATUS : string; - public RETURN_MSG : string; -} \ No newline at end of file +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; +} diff --git a/Mohem/src/app/hmg-common/services/dashbored/attendance-tracking.response.ts b/Mohem/src/app/hmg-common/services/dashbored/attendance-tracking.response.ts index 82ec2ae0..dd6ff457 100644 --- a/Mohem/src/app/hmg-common/services/dashbored/attendance-tracking.response.ts +++ b/Mohem/src/app/hmg-common/services/dashbored/attendance-tracking.response.ts @@ -1,8 +1,8 @@ -import { Response } from "src/app/hmg-common/services/models/response"; +import { Response } from 'src/app/hmg-common/services/models/response'; import { AttendanceTrackingList } from './AttensanceTrackingList'; - - export class AttendanceTrackingResponse extends Response{ - public GetGetAttendanceTrackingList : AttendanceTrackingList[]; - } \ No newline at end of file + +export class AttendanceTrackingResponse extends Response { + public GetGetAttendanceTrackingList: AttendanceTrackingList[]; + } diff --git a/Mohem/src/app/hmg-common/ui/stats-button/stats-button.component.scss b/Mohem/src/app/hmg-common/ui/stats-button/stats-button.component.scss index 272fad14..d2cfa8ae 100644 --- a/Mohem/src/app/hmg-common/ui/stats-button/stats-button.component.scss +++ b/Mohem/src/app/hmg-common/ui/stats-button/stats-button.component.scss @@ -24,7 +24,7 @@ .titleBox { display: block; span { - font-size: 35px; + font-size: 30px; font-weight: bold; color: black; text-align: left; diff --git a/Mohem/src/app/home/home.page.html b/Mohem/src/app/home/home.page.html index 603de802..f587bb81 100644 --- a/Mohem/src/app/home/home.page.html +++ b/Mohem/src/app/home/home.page.html @@ -2,7 +2,9 @@ DASHBOARD - +
+ +
@@ -139,7 +141,7 @@
--> -
+
Time Left Today - +
+
+ + Monthly Attendance
- diff --git a/Mohem/src/app/home/home.page.scss b/Mohem/src/app/home/home.page.scss index be31b62d..118eda9d 100644 --- a/Mohem/src/app/home/home.page.scss +++ b/Mohem/src/app/home/home.page.scss @@ -6,6 +6,18 @@ ion-row { .header-toolbar-new{ --background: #22c6b3; } +.profile-image-container{ + position: relative; + z-index: 999; + img { + width: 32px; + float: right; + margin-top: -42px; + border-radius: 20px; + height: 32px; + margin-right: 4px; + } +} ion-title{ color: white; position: absolute; @@ -98,6 +110,36 @@ ion-label{ width: 80%; text-align: center; font-size: 11px; - text-transform: uppercase;; + text-transform: uppercase; + } +} + +.attendance-timer { + position: fixed; + bottom: 20px; + right: 20px; + z-index: 2; + height: 112px; + width: 112px; + background-color: #094875; + border-radius: 50%; + display: inline-block; + img { + position: absolute; + left: 33%; + top: 8%; + width: 35%; + } + span { + position: absolute; + left: 50%; + top: 70%; + -webkit-transform: translate(-50%, -50%); + transform: translate(-50%, -50%); + color: white; + width: 80%; + text-align: center; + font-size: 11px; + text-transform: uppercase; } } diff --git a/Mohem/src/app/home/home.page.ts b/Mohem/src/app/home/home.page.ts index 08a232f5..fedf18e7 100644 --- a/Mohem/src/app/home/home.page.ts +++ b/Mohem/src/app/home/home.page.ts @@ -70,7 +70,7 @@ export class HomePage implements OnInit { icon: 'assets/icon/new-design/missing_swipe.png' }, { - title: 'Leave Balance', // getAccrualBalance ticket balance + title: 'Leave Balance', statsValue: 0, icon: 'assets/icon/new-design/leave_balance.png' }, @@ -108,15 +108,15 @@ export class HomePage implements OnInit { slidesPerView: 3.2, spaceBetween: 10 }; - public timeInSeconds: any = 0.15 * 60 * 60; - public time: any; public runTimer = false; public hasStarted = false; public hasFinished = false; public remainingTime: any; + public scheduledTime: any; + public isCheckedIn: any; public displayTime: any; public menuEntries: any; - public percent: any = 100 - ((this.timeInSeconds / 32400) * 100); + public percent: any; constructor( public ts: TranslatorService, @@ -146,18 +146,8 @@ export class HomePage implements OnInit { }); } - ionViewWillEnter() { - this.getAccrualBalance(); - } - ngOnInit() { this.getUserDetails(); - this.getMenu(); - this.setServicesPrivilage(); - this.initTimer(); - this.openNotificationsDashbored(); - this.showOpenMissingSwipes(); - this.showAttendanceTracking(); // this.getCount(); // this.events.subscribe('getNotCount', badge => { @@ -166,11 +156,10 @@ export class HomePage implements OnInit { } initTimer() { - this.time = this.timeInSeconds; this.runTimer = false; this.hasStarted = false; this.hasFinished = false; - this.remainingTime = this.timeInSeconds; + this.percent = 100 - ((this.remainingTime / this.scheduledTime) * 100); this.displayTime = this.getSecondsAsDigitalClock(this.remainingTime); this.startTimer(); } @@ -187,7 +176,7 @@ export class HomePage implements OnInit { this.remainingTime--; this.displayTime = this.getSecondsAsDigitalClock(this.remainingTime); if (this.remainingTime > 0) { - const newPercent: any = ((this.remainingTime / 32400) * 100).toFixed(2); + const newPercent: any = ((this.remainingTime / this.scheduledTime) * 100).toFixed(2); this.percent = 100 - newPercent; this.timerTick(); } else { @@ -262,7 +251,6 @@ export class HomePage implements OnInit { // } ionViewDidLoad() { - // this.getUserDetails(); this.geolocation .getCurrentPosition() .then(resp => { @@ -279,24 +267,31 @@ export class HomePage implements OnInit { } private getUserDetails() { + this.authService .loadAuthenticatedUser() .subscribe((user: AuthenticatedUser) => { if (user) { this.events.publish('setMenu'); this.userData = user; - // set User Info this.sharedData.setSharedData(this.userData, AuthenticatedUser.SHARED_DATA); - this.userImage = user.EMPLOYEE_IMAGE - ? 'data:image/png;base64,' + user.EMPLOYEE_IMAGE - : this.userImage; - console.log(user); + this.userImage = user.EMPLOYEE_IMAGE ? 'data:image/png;base64,' + user.EMPLOYEE_IMAGE : this.userImage; + this.callDashboardServices(); } else { console.log(user); } }); } + callDashboardServices() { + this.getMenu(); + this.setServicesPrivilage(); + this.openNotificationsDashbored(); + this.showOpenMissingSwipes(); + this.showAttendanceTracking(); + this.getAccrualBalance(); + } + public Vacation_Rule() { this.common.navigateForward('/vacation-rule/home'); } @@ -475,10 +470,29 @@ export class HomePage implements OnInit { }); } + convertInSeconds(time: any) { + const hours = parseInt(time[0], 10); + const minutes = parseInt(time[1], 10); + const seconds = (hours * 60 * 60) + (minutes * 60); + return seconds; + } + + convertAndAssignTime(data) { + console.log(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 ? true : false; + this.initTimer(); + console.log('remainingTime: ' + this.remainingTime); + console.log('scheduledTime: ' + this.scheduledTime); + console.log('isCheckedIn: ' + this.isCheckedIn); + } + showAttendanceTracking() { // spent hours left hours this.DS.getAttendanceTracking() .subscribe((result: AttendanceTrackingResponse) => { if (this.common.validResponse(result)) { - console.log(result); + const key = 'GetAttendanceTrackingList'; + this.convertAndAssignTime(result[key]); } }); } @@ -567,6 +581,10 @@ export class HomePage implements OnInit { } }); } + + openProfilePage() { + this.common.openProfile(); + } } From 4fe49bdb181867da9838d8476020947985291fc7 Mon Sep 17 00:00:00 2001 From: ashwaq Date: Mon, 27 Jan 2020 17:04:49 +0300 Subject: [PATCH 09/14] add attend scan service + fix design alert --- .../home/home.component.ts | 17 +-- Mohem/src/app/hmg-common/hmg-common.module.ts | 8 +- .../attend-scan.service.spec.ts | 12 ++ .../attend-services/attend-scan.service.ts | 123 ++++++++++++++++++ Mohem/src/app/home/home.page.ts | 4 +- Mohem/src/theme/styles.scss | 21 +++ 6 files changed, 172 insertions(+), 13 deletions(-) create mode 100644 Mohem/src/app/hmg-common/services/attend-services/attend-scan.service.spec.ts create mode 100644 Mohem/src/app/hmg-common/services/attend-services/attend-scan.service.ts diff --git a/Mohem/src/app/attendance-tracking/home/home.component.ts b/Mohem/src/app/attendance-tracking/home/home.component.ts index 422355c2..d091003d 100644 --- a/Mohem/src/app/attendance-tracking/home/home.component.ts +++ b/Mohem/src/app/attendance-tracking/home/home.component.ts @@ -1,9 +1,9 @@ -import { Component, OnInit } from '@angular/core'; +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', @@ -18,7 +18,8 @@ export class HomeComponent implements OnInit { constructor( public cs:CommonService, public db:DashboredService, - public ts:TranslatorService + public ts:TranslatorService, + public AttendScanService:AttendScanService ) { } ngOnInit() { @@ -26,13 +27,6 @@ export class HomeComponent implements OnInit { 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(ischeckOutP_REMAINING_HOURS){ - // this.checkOut=true; - // }else{ - // this.checkOut=false; - // } - } // call services @@ -52,7 +46,7 @@ export class HomeComponent implements OnInit { 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 ==='00:00'){ + if(this.attendanceTrackingList.P_REMAINING_HOURS !='0'){ this.isCheckOut=true; }else{ this.isCheckOut=false; @@ -78,6 +72,7 @@ openDialog(){ () => { //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'), diff --git a/Mohem/src/app/hmg-common/hmg-common.module.ts b/Mohem/src/app/hmg-common/hmg-common.module.ts index 8a9169e3..83d0ed82 100644 --- a/Mohem/src/app/hmg-common/hmg-common.module.ts +++ b/Mohem/src/app/hmg-common/hmg-common.module.ts @@ -104,6 +104,9 @@ import{ConfirmLoginComponent} from '../authentication/confirm-login/confirm-logi import{WelcomeComponent} from './ui/welcome-login/welcome.component' import {DashboredService} from './services/dashbored/dashbored.service' import {FabButtonComponent} from './ui/fab-button/fab-button.component' +import { AttendScanService } from './services/attend-services/attend-scan.service'; +import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx'; + @NgModule({ imports: [ CommonModule, @@ -233,6 +236,7 @@ import {FabButtonComponent} from './ui/fab-button/fab-button.component' ], providers: [ + AttendScanService, DashboredService, ConnectorService, TranslatorService, @@ -272,7 +276,9 @@ import {FabButtonComponent} from './ui/fab-button/fab-button.component' File, //PaymentService, MenuService, - OpenNativeSettings + OpenNativeSettings, + BarcodeScanner, + ] }) export class HmgCommonModule { } diff --git a/Mohem/src/app/hmg-common/services/attend-services/attend-scan.service.spec.ts b/Mohem/src/app/hmg-common/services/attend-services/attend-scan.service.spec.ts new file mode 100644 index 00000000..b38b6ba2 --- /dev/null +++ b/Mohem/src/app/hmg-common/services/attend-services/attend-scan.service.spec.ts @@ -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(); + }); +}); diff --git a/Mohem/src/app/hmg-common/services/attend-services/attend-scan.service.ts b/Mohem/src/app/hmg-common/services/attend-services/attend-scan.service.ts new file mode 100644 index 00000000..dc780d83 --- /dev/null +++ b/Mohem/src/app/hmg-common/services/attend-services/attend-scan.service.ts @@ -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")); + } + }); + } +} diff --git a/Mohem/src/app/home/home.page.ts b/Mohem/src/app/home/home.page.ts index ccb0f18d..238610af 100644 --- a/Mohem/src/app/home/home.page.ts +++ b/Mohem/src/app/home/home.page.ts @@ -336,7 +336,9 @@ export class HomePage implements OnInit { } ); } - + parentFn($event: string) { + console.log($event); // this will output 'hello from child' + } scanCode() { // this.zbar // .scan(this.zbarOptions) diff --git a/Mohem/src/theme/styles.scss b/Mohem/src/theme/styles.scss index 4943eceb..a9a34688 100644 --- a/Mohem/src/theme/styles.scss +++ b/Mohem/src/theme/styles.scss @@ -279,6 +279,7 @@ ion-datetime.datetime.datetime-ios.ng-valid.ng-dirty.ng-touched { .alert-md .alert-head,.alert-ios .alert-head{ background-color:var(--grayBG); color: var(--light); + } /********profile grid************/ // .profile-grid{ @@ -952,3 +953,23 @@ border:0px width: 315px; } +.alert-button-group.sc-ion-alert-md, +.alert-button.sc-ion-alert-ios { + text-align: center; +} + + +.alert-message.sc-ion-alert-md, +.alert-message.sc-ion-alert-ios, +.alert-sub-title.sc-ion-alert-md, +.alert-title.sc-ion-alert-md, +.alert-sub-title.sc-ion-alert-ios, +.alert-title.sc-ion-alert-ios { + + text-align: center; +} + +.alert-button-inner.sc-ion-alert-md { + + justify-content: center !important; +} \ No newline at end of file From 9b58f9e9e00cc630327c2a8c82223453ffe66380 Mon Sep 17 00:00:00 2001 From: ashwaq Date: Mon, 27 Jan 2020 17:06:33 +0300 Subject: [PATCH 10/14] add --- Mohem/src/app/attendance-tracking/home/home.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mohem/src/app/attendance-tracking/home/home.component.ts b/Mohem/src/app/attendance-tracking/home/home.component.ts index d091003d..276b32ab 100644 --- a/Mohem/src/app/attendance-tracking/home/home.component.ts +++ b/Mohem/src/app/attendance-tracking/home/home.component.ts @@ -46,7 +46,7 @@ export class HomeComponent implements OnInit { 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'){ + if(this.attendanceTrackingList.P_REMAINING_HOURS ==='0'){ this.isCheckOut=true; }else{ this.isCheckOut=false; From f7002f3eae54ef693062aca9d618266bd1d76351 Mon Sep 17 00:00:00 2001 From: umasoodch Date: Wed, 29 Jan 2020 09:14:14 +0300 Subject: [PATCH 11/14] completed dashboard and attendance timer work --- .../home/home.component.html | 40 +++-- .../home/home.component.scss | 7 +- .../home/home.component.ts | 145 ++++++++++++------ Mohem/src/app/hmg-common/hmg-common.module.ts | 8 +- .../ui/fab-button/fab-button.component.scss | 30 +--- Mohem/src/app/home/home.module.ts | 8 +- Mohem/src/app/home/home.page.html | 52 +++---- Mohem/src/app/home/home.page.scss | 58 +++---- Mohem/src/app/home/home.page.ts | 12 +- 9 files changed, 207 insertions(+), 153 deletions(-) diff --git a/Mohem/src/app/attendance-tracking/home/home.component.html b/Mohem/src/app/attendance-tracking/home/home.component.html index b99c4ead..1a28a602 100644 --- a/Mohem/src/app/attendance-tracking/home/home.component.html +++ b/Mohem/src/app/attendance-tracking/home/home.component.html @@ -10,21 +10,41 @@
- - {{cuurentDate}}
- {{ts.trPK('attendance-tracking','today-time-left')}} - - - -
+ {{curentDate}}
+ {{ts.trPK('attendance-tracking','today-time-left')}} + +
+ + +
+
-
- {{ts.trPK('attendance-tracking','shift-time')}}

@@ -55,7 +75,5 @@
- -
\ 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 index 3df2c17a..f09a8a87 100644 --- a/Mohem/src/app/attendance-tracking/home/home.component.scss +++ b/Mohem/src/app/attendance-tracking/home/home.component.scss @@ -1,7 +1,7 @@ .timer-chart{ padding-top:18px; background: #094773; -height: 50%; +// height: 50%; text-align: center; } @@ -50,3 +50,8 @@ text-align: center; border-right: var(--lightblue) solid 1px; } +.fixed-shift-timer{ + margin-top: -50px; + margin-bottom: -30px; +} + diff --git a/Mohem/src/app/attendance-tracking/home/home.component.ts b/Mohem/src/app/attendance-tracking/home/home.component.ts index 276b32ab..a872b22a 100644 --- a/Mohem/src/app/attendance-tracking/home/home.component.ts +++ b/Mohem/src/app/attendance-tracking/home/home.component.ts @@ -1,8 +1,8 @@ import { Component, OnInit, EventEmitter, Output } from '@angular/core'; -import { CommonService } from "src/app/hmg-common/services/common/common.service"; +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 {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', @@ -10,76 +10,125 @@ import { AttendanceTrackingResponse } from 'src/app/hmg-common/services/dashbore styleUrls: ['./home.component.scss'], }) export class HomeComponent implements OnInit { - attendanceTrackingList:any =[]; - cuurentDate:any; + attendanceTrackingList: any = []; + curentDate: any; direction: string; - isCheckOut:boolean= false; + 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 + public cs: CommonService, + public db: DashboredService, + public ts: TranslatorService, + public attendScanService: AttendScanService ) { } ngOnInit() { - this.attendanceTracking(); - this.cuurentDate = new Date(); + this.showAttendanceTracking(); + this.curentDate = new Date(); this.direction = TranslatorService.getCurrentLanguageName(); - this.cuurentDate =this.getHeaderDate(this.cuurentDate); + this.curentDate = this.getHeaderDate(this.curentDate); } - // call services - public attendanceTracking(){ - this.db.getAttendanceTracking(()=> {},this.ts.trPK('general', 'retry')).subscribe( - (result)=>{ - console.log("result: "+result); - this.handleRespondGetAttendanceTracking(result); + 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); + } - 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; - } - } - } + 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; } - 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(); + convertAndAssignTime(data) { + console.log(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(); + console.log('remainingTime: ' + this.remainingTime); + console.log('scheduledTime: ' + this.scheduledTime); + console.log('isCheckedIn: ' + this.isCheckedIn); + } + 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(){ - +openDialog() { this.cs.confirmAlertDialogAttendance( () => { - //to open scan(); - //this.cs.openScan(); - this.AttendScanService.getDeviceLocation(); - }, this.ts.trPK('general', 'ok'), - () => {}, this.ts.trPK('general', 'cancel'), + 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') - + "
"+"
"+ this.ts.trPK('attendance-tracking', 'confirm-alert1') + 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 a3acc824..44dbe250 100644 --- a/Mohem/src/app/hmg-common/hmg-common.module.ts +++ b/Mohem/src/app/hmg-common/hmg-common.module.ts @@ -100,7 +100,7 @@ import {DashboredService} from './services/dashbored/dashbored.service' import {FabButtonComponent} from './ui/fab-button/fab-button.component' import { AttendScanService } from './services/attend-services/attend-scan.service'; import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx'; - +import { NgCircleProgressModule } from 'ng-circle-progress'; @NgModule({ imports: [ CommonModule, @@ -110,7 +110,8 @@ import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx'; HttpClientModule, NgxChartsModule, ListboxModule, - PdfViewerModule + PdfViewerModule, + NgCircleProgressModule.forRoot() ], declarations: [ FabButtonComponent, @@ -228,7 +229,8 @@ import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx'; AccordinCustomComponent, StatsButtonComponent, ServicesButtonComponent, - ConfirmLoginComponent + ConfirmLoginComponent, + NgCircleProgressModule ], providers: [ AttendScanService, 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 index 811e2e55..e6cfd86d 100644 --- 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 @@ -7,8 +7,8 @@ ion-fab-button{ background-size: cover; background-position: top right; border-radius: 50%; - height:110px; - width: 110px; + height:112px; + width: 112px; } .cbookApointmentBtn{ // --background:transparent !important; @@ -114,32 +114,18 @@ button-inner{ } .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; + width: 112px; + height: 112px; position: absolute; - top: 0; - left: 0px; + top: 118%; + left: -10%; right: 0; bottom: 20px; border-radius: 50%; margin: auto; -webkit-transform: scale(1, 1); - transform: scale(1, 1); - } + transform: scale(1, 1); +} .wrapper .circle.pulse { diff --git a/Mohem/src/app/home/home.module.ts b/Mohem/src/app/home/home.module.ts index 781a20ec..3df41b48 100644 --- a/Mohem/src/app/home/home.module.ts +++ b/Mohem/src/app/home/home.module.ts @@ -6,7 +6,7 @@ import { HmgCommonModule } from '../hmg-common/hmg-common.module'; import { IonicModule } from '@ionic/angular'; import { HomePage } from './home.page'; import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx'; -import { NgCircleProgressModule } from 'ng-circle-progress'; + const routes: Routes = [ { path: '', @@ -20,14 +20,12 @@ const routes: Routes = [ FormsModule, IonicModule, HmgCommonModule, - RouterModule.forChild(routes), - // Specify ng-circle-progress as an import - NgCircleProgressModule.forRoot() + RouterModule.forChild(routes) ], declarations: [ HomePage ], - providers:[ + providers: [ BarcodeScanner ] }) diff --git a/Mohem/src/app/home/home.page.html b/Mohem/src/app/home/home.page.html index 8b0f8400..ab687c35 100644 --- a/Mohem/src/app/home/home.page.html +++ b/Mohem/src/app/home/home.page.html @@ -140,38 +140,32 @@ --> - -
+
Time Left Today + [backgroundColor]= "'#094875'" + [percent]="percent" + [radius]="50" + [outerStrokeWidth]="2" + [innerStrokeWidth]="0" + [outerStrokeColor]="'#ffffff'" + [animation]="true" + [animationDuration]="300" + [responsive]="false" + [space]="-4" + [startFromZero]="false" + [title]="displayTime" + titleFontWeight="bold" + [titleColor]="'#ffffff'" + [showUnits]="false" + subtitle="" + [subtitleColor]="'#ffffff'" + [clockwise]="false" + [renderOnClick]="false">
-
- - Monthly Attendance -
- +
+ +
- diff --git a/Mohem/src/app/home/home.page.scss b/Mohem/src/app/home/home.page.scss index 118eda9d..8143cf6e 100644 --- a/Mohem/src/app/home/home.page.scss +++ b/Mohem/src/app/home/home.page.scss @@ -114,32 +114,32 @@ ion-label{ } } -.attendance-timer { - position: fixed; - bottom: 20px; - right: 20px; - z-index: 2; - height: 112px; - width: 112px; - background-color: #094875; - border-radius: 50%; - display: inline-block; - img { - position: absolute; - left: 33%; - top: 8%; - width: 35%; - } - span { - position: absolute; - left: 50%; - top: 70%; - -webkit-transform: translate(-50%, -50%); - transform: translate(-50%, -50%); - color: white; - width: 80%; - text-align: center; - font-size: 11px; - text-transform: uppercase; - } -} +// .attendance-timer { +// position: fixed; +// bottom: 20px; +// right: 20px; +// z-index: 2; +// height: 112px; +// width: 112px; +// background-color: #094875; +// border-radius: 50%; +// display: inline-block; +// img { +// position: absolute; +// left: 33%; +// top: 8%; +// width: 35%; +// } +// span { +// position: absolute; +// left: 50%; +// top: 70%; +// -webkit-transform: translate(-50%, -50%); +// transform: translate(-50%, -50%); +// color: white; +// width: 80%; +// text-align: center; +// font-size: 11px; +// text-transform: uppercase; +// } +// } diff --git a/Mohem/src/app/home/home.page.ts b/Mohem/src/app/home/home.page.ts index 1130fd14..95e58003 100644 --- a/Mohem/src/app/home/home.page.ts +++ b/Mohem/src/app/home/home.page.ts @@ -113,7 +113,7 @@ export class HomePage implements OnInit { public hasFinished = false; public remainingTime: any; public scheduledTime: any; - public isCheckedIn: any; + public isCheckedIn = undefined; public displayTime: any; public menuEntries: any; public percent: any; @@ -442,6 +442,7 @@ export class HomePage implements OnInit { .subscribe((result: Response) => { if (this.common.validResponse(result)) { this.common.presentAlert(this.ts.trPK('home', 'swipeAlertSuccess')); + this.showAttendanceTracking(); } else { this.common.presentAlert(this.ts.trPK('home', 'swipeAlertFailed')); } @@ -477,7 +478,8 @@ export class HomePage implements OnInit { convertInSeconds(time: any) { const hours = parseInt(time[0], 10); const minutes = parseInt(time[1], 10); - const seconds = (hours * 60 * 60) + (minutes * 60); + let seconds = parseInt(time[2], 10); + seconds = seconds + (hours * 60 * 60) + (minutes * 60); return seconds; } @@ -485,14 +487,14 @@ export class HomePage implements OnInit { console.log(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 ? true : false; + this.isCheckedIn = this.remainingTime === this.scheduledTime ? false : true; this.initTimer(); console.log('remainingTime: ' + this.remainingTime); console.log('scheduledTime: ' + this.scheduledTime); console.log('isCheckedIn: ' + this.isCheckedIn); } - showAttendanceTracking() { // spent hours left hours + showAttendanceTracking() { this.DS.getAttendanceTracking() .subscribe((result: AttendanceTrackingResponse) => { if (this.common.validResponse(result)) { const key = 'GetAttendanceTrackingList'; @@ -586,7 +588,7 @@ export class HomePage implements OnInit { }); } - openattentracking(){ + openattentracking() { this.common.openAttenTrackingpage(); } From b9e1a956015473d87c7ea9081646a16ee8d35980 Mon Sep 17 00:00:00 2001 From: "Fatimah.Alshammari" Date: Mon, 3 Feb 2020 11:57:24 +0300 Subject: [PATCH 12/14] Add new profile page & years of experience & Performance appraisal --- Mohem/package-lock.json | 8 + Mohem/package.json | 1 + Mohem/src/app/app.component.html | 4 +- Mohem/src/app/app.component.scss | 51 ++-- Mohem/src/app/app.component.ts | 8 +- Mohem/src/app/hmg-common/hmg-common.module.ts | 10 +- .../models/authenticated-user.ts | 3 + .../services/common/common.service.ts | 10 + .../performance-appraisal.response.ts | 4 +- .../edit-profile/edit-profile.component.html | 77 +++++ .../edit-profile/edit-profile.component.scss | 153 ++++++++++ .../edit-profile.component.spec.ts | 27 ++ .../edit-profile/edit-profile.component.ts | 112 ++++++++ .../src/app/profile/home/home.component.html | 267 +++++++++++------- .../src/app/profile/home/home.component.scss | 131 ++++++++- Mohem/src/app/profile/home/home.component.ts | 11 + .../performance-evaluation.component.html | 77 +++++ .../performance-evaluation.component.scss | 144 ++++++++++ .../performance-evaluation.component.spec.ts | 27 ++ .../performance-evaluation.component.ts | 88 ++++++ .../profile-image.component.scss | 2 +- Mohem/src/app/profile/profile.module.ts | 37 ++- Mohem/src/assets/localization/i18n.json | 17 ++ 23 files changed, 1119 insertions(+), 150 deletions(-) create mode 100644 Mohem/src/app/profile/edit-profile/edit-profile.component.html create mode 100644 Mohem/src/app/profile/edit-profile/edit-profile.component.scss create mode 100644 Mohem/src/app/profile/edit-profile/edit-profile.component.spec.ts create mode 100644 Mohem/src/app/profile/edit-profile/edit-profile.component.ts create mode 100644 Mohem/src/app/profile/performance-evaluation/performance-evaluation.component.html create mode 100644 Mohem/src/app/profile/performance-evaluation/performance-evaluation.component.scss create mode 100644 Mohem/src/app/profile/performance-evaluation/performance-evaluation.component.spec.ts create mode 100644 Mohem/src/app/profile/performance-evaluation/performance-evaluation.component.ts diff --git a/Mohem/package-lock.json b/Mohem/package-lock.json index 7c7d2b6c..24386f83 100644 --- a/Mohem/package-lock.json +++ b/Mohem/package-lock.json @@ -9417,6 +9417,14 @@ "tslib": "^1.9.0" } }, + "ngx-gauge": { + "version": "1.0.0-beta.10", + "resolved": "https://registry.npmjs.org/ngx-gauge/-/ngx-gauge-1.0.0-beta.10.tgz", + "integrity": "sha512-j/YOntC31Pe24Et0wooi1YOmkA11Xw5YzsdBUIvYtvikvO6jwQ5tKwHimP981QAWW3S6/FQ9y94Fd/auJfyGkw==", + "requires": { + "tslib": "^1.9.0" + } + }, "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", diff --git a/Mohem/package.json b/Mohem/package.json index ed651699..75851b44 100755 --- a/Mohem/package.json +++ b/Mohem/package.json @@ -104,6 +104,7 @@ "mx.ferreyra.callnumber": "0.0.2", "ng2-file-upload": "^1.3.0", "ng2-pdf-viewer": "^5.3.2", + "ngx-gauge": "^1.0.0-beta.10", "npm": "^6.13.1", "phonegap-plugin-barcodescanner": "^8.1.0", "phonegap-plugin-multidex": "^1.0.0", diff --git a/Mohem/src/app/app.component.html b/Mohem/src/app/app.component.html index f3b35531..e466e8bb 100644 --- a/Mohem/src/app/app.component.html +++ b/Mohem/src/app/app.component.html @@ -37,10 +37,10 @@ -
+ diff --git a/Mohem/src/app/app.component.scss b/Mohem/src/app/app.component.scss index d7c1c6e7..e2901722 100644 --- a/Mohem/src/app/app.component.scss +++ b/Mohem/src/app/app.component.scss @@ -26,19 +26,7 @@ header --background: white !important; } -// .editIcon{ -// margin-left: 174px !important; -// margin-bottom: -104px !important; -// padding: 6px -3px !important; -// // margin-top: 50px !important; -// background: transparent; -// --background: rgb(235, 232, 232) !important; -// --border-radius: 80% !important; -// // border-color: rgb(211, 208, 208) !important; -// --box-shadow: 3px 0 rgb(194, 191, 191) !important; -// z-index: 3 !important; - -// } + .menubutton{ white-space: normal; @@ -53,15 +41,7 @@ header box-shadow: 3px 0px 7px 0px #c5c2c2; border-radius: 50%; - // box-shadow: 0px 2px 7px 0px #dfe1e3 #7f8c8d; - // white-space: normal; - // color: var(--light); - // text-transform: capitalize; - // min-height: 47px; - // background: transparent; - // font-size: 2rem; - // position: absolute; - // top: 40px; + } .changeIcon{ @@ -72,13 +52,7 @@ header position: relative; color: #7f8c8d; - // background: #c1c1c1; - // width: 40px; - // height: 39px; - // border-radius: 50% !important; - // position: relative; - // left: 51px; - // top:16px; + } .changeImgBtn{ @@ -228,11 +202,7 @@ padding: 6px 24px; .sidebar-menu .header-div { - // background: var(--primary); - // background: -moz-linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%, var(--secondary) 59%, var(--customnavy) 100%); - // background: -webkit-linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%, var(--secondary) 59%, var(--customnavy) 100%); - // background: linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%, var(--secondary) 59%, var(--customnavy) 100%); - // color: var(--light); + text-transform: capitalize; height: 100px; position: relative; @@ -319,4 +289,17 @@ font-weight: bolder !important; color: black !important; font-weight: bolder !important; +} + +.profileImg{ + width: 160px; + height: 160px; + display: -webkit-inline-box; + display: inline-flex; + overflow: hidden; + background: transparent; + border-radius: 70% !important; + position: relative; + top: 7px; + } \ No newline at end of file diff --git a/Mohem/src/app/app.component.ts b/Mohem/src/app/app.component.ts index a1e655df..89f6dd0a 100644 --- a/Mohem/src/app/app.component.ts +++ b/Mohem/src/app/app.component.ts @@ -126,8 +126,13 @@ export class AppComponent implements OnInit, AfterViewInit { this.cs.openLogin(); } + // profile() { + // this.cs.openProfile(); + // this.menu.toggle(); + // } + profile() { - this.cs.openProfile(); + this.cs.openEditProfile(); this.menu.toggle(); } openNotification(){ @@ -150,4 +155,5 @@ export class AppComponent implements OnInit, AfterViewInit { this.menu.toggle(); } + } diff --git a/Mohem/src/app/hmg-common/hmg-common.module.ts b/Mohem/src/app/hmg-common/hmg-common.module.ts index 84e44c4f..518aacce 100644 --- a/Mohem/src/app/hmg-common/hmg-common.module.ts +++ b/Mohem/src/app/hmg-common/hmg-common.module.ts @@ -33,6 +33,7 @@ import { KeysPipe } from './pipes/keys/keys.pipe'; import { SegmentContentComponent } from './ui/segment-content/segment-content.component'; import { GraphComponent } from './ui/graph/graph.component'; import { NgxChartsModule } from '@swimlane/ngx-charts'; + import { ExpandableComponent } from './ui/expandable/expandable.component'; import { ProjectsService } from './services/projects/projects.service'; import { NationalityService } from './services/nationality/nationality.service'; @@ -100,7 +101,8 @@ import {FileUploderProfileComponent} from './ui/file-uploder-profile/file-uplode 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 {DashboredService} from './services/dashbored/dashbored.service'; + import {NgxGaugeModule} from 'ngx-gauge'; @NgModule({ imports: [ CommonModule, @@ -110,7 +112,8 @@ import {DashboredService} from './services/dashbored/dashbored.service' HttpClientModule, NgxChartsModule, ListboxModule, - PdfViewerModule + PdfViewerModule, + NgxGaugeModule ], declarations: [ NumberRangeComponent, @@ -219,7 +222,8 @@ import {DashboredService} from './services/dashbored/dashbored.service' WorkListAttachViewComponent, FileUploderProfileComponent, AccordinTabCustomComponent, - AccordinCustomComponent + AccordinCustomComponent, + NgxGaugeModule ], providers: [ DashboredService, diff --git a/Mohem/src/app/hmg-common/services/authentication/models/authenticated-user.ts b/Mohem/src/app/hmg-common/services/authentication/models/authenticated-user.ts index 76d05310..2438134c 100644 --- a/Mohem/src/app/hmg-common/services/authentication/models/authenticated-user.ts +++ b/Mohem/src/app/hmg-common/services/authentication/models/authenticated-user.ts @@ -78,5 +78,8 @@ MobileNumber:string; LogInTokenID:string; CompanyImageDescription: string; CompanyImageURL: string; +SERVICE_DAYS:Number; +SERVICE_MONTHS:Number; +SERVICE_YEARS:Number; } 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..37aba941 100644 --- a/Mohem/src/app/hmg-common/services/common/common.service.ts +++ b/Mohem/src/app/hmg-common/services/common/common.service.ts @@ -990,6 +990,9 @@ export class CommonService { public openProfile() { this.nav.navigateForward(["/profile/home"]); } + public openEditProfile() { + this.nav.navigateForward(["/profile/editprofile"]); + } public openAccuralPage() { this.nav.navigateForward(["/accrual-balances/home"]); } @@ -1080,6 +1083,13 @@ export class CommonService { public openConfirmLoginPage() { this.nav.navigateForward(["/authentication/confirmLogin"]); } + public openEditprofile() { + this.nav.navigateForward(["/profile/editProfile"]); + } + public openPerformanceevaluation() { + this.nav.navigateForward(["/profile/performanceevaluation"]); + } + public reload(url: string, from: string) { console.log("force reload called from:" + from); diff --git a/Mohem/src/app/hmg-common/services/dashbored/performance-appraisal.response.ts b/Mohem/src/app/hmg-common/services/dashbored/performance-appraisal.response.ts index 9dbe5845..65b4e686 100644 --- a/Mohem/src/app/hmg-common/services/dashbored/performance-appraisal.response.ts +++ b/Mohem/src/app/hmg-common/services/dashbored/performance-appraisal.response.ts @@ -5,5 +5,7 @@ import { Response } from "src/app/hmg-common/services/models/response"; import { PerformanceAppraisalList } from './PerformanceAppraisalList'; export class PerformanceAppraisalResponse extends Response{ -public GetGetPerformanceAppraisalList :PerformanceAppraisalList[]; + public GetPerformanceAppraisalList :PerformanceAppraisalList[]; + public static PERFORMANCE_DATA = "PERFORMANCE_DATA" + } \ No newline at end of file diff --git a/Mohem/src/app/profile/edit-profile/edit-profile.component.html b/Mohem/src/app/profile/edit-profile/edit-profile.component.html new file mode 100644 index 00000000..9163ba2a --- /dev/null +++ b/Mohem/src/app/profile/edit-profile/edit-profile.component.html @@ -0,0 +1,77 @@ + +
+ + + +

{{ts.trPK('userProfile','title')}}

+ +
+ + +
+ + +
+ + +
+

{{User_name_Emp}}

+

{{User_Job_name}}

+
+
+ +
+ + +
+ + + +
+
+ + +
+
+ + +
+
+
+ + +
+
+ + +
+ +
+

Years of Services

+
+ + + + + + + + {{ts.trPK('userProfile','edit-profile')}} + + + + + + + + + + + {{ts.trPK('userProfile','performance-evaluation')}} + + + + +
+
+
\ No newline at end of file diff --git a/Mohem/src/app/profile/edit-profile/edit-profile.component.scss b/Mohem/src/app/profile/edit-profile/edit-profile.component.scss new file mode 100644 index 00000000..651acf4b --- /dev/null +++ b/Mohem/src/app/profile/edit-profile/edit-profile.component.scss @@ -0,0 +1,153 @@ + + +.list-ios { + margin-left: 0; + margin-right: 0; + margin-top: 32px; + margin-bottom: 32px; + background: var(--ion-item-background,var(--ion-background-color,#fff)); +} + +.colorBG{ + --background: #f0efef; + } + .header-div{ + text-transform: capitalize; + background: #22C6B3; + display: block; + position: relative; + height: 160px; + margin-bottom: 60px; + } + + +.profileImg{ + width: 160px; + height: 160px; + display: -webkit-inline-box; + display: inline-flex; + overflow: hidden; + /* background: transparent; */ + border-radius: 78% !important; + position: relative; + top: 34px; + // background: white; + background: transparent; + margin-left: -3px; + +} + +.proTitles { + margin: 0; + padding: 0; + font-size: 16px; + text-align: center; + font-weight: bolder; + color: white; + margin-top: -33px; + } + + .Text { + margin: 0; + padding: 0; + text-align: center; + font-weight: bolder; + color: black; + font-size: 16px; + margin-top: 34px; + margin-bottom: 10px; + text-align: center; + } + + + + ion-thumbnail.menu-thumb{ + width:20px; + height:20px; + // margin-top: 5px !important; + } + + .profile{ + color: black !important; + // font-weight: bolder !important; + + } + + .gridService{ + + // background-color: #094875; + margin-top: 87px; + border-radius: 10px; + margin-bottom: -49px; + margin-left: 14px; + margin-right: 14px; + + } + .columns{ + margin: 10px; + background: #094875; + border-radius: 27px; + padding-left: 30px; + padding-right: 6px; + padding-top: 19px; + padding-bottom: 26px; + } + + + .service{ + font-size: 28px; + // font-weight: bolder; + color: white; + letter-spacing: 1px; + font-weight: bold; + } + .services{ + + font-size: 12px; + color: white; + } + + .list{ + margin-left: 14px; + margin-right: 14px; + border-radius: 10px; + background: white; + border: solid #bebbbb !important; + padding: 2px; + } + .p{ + color: black !important; + font-size: medium; + text-align: center; + border-bottom: rgb(190, 187, 187) solid 1px; + } + .itemline{ + border-bottom: rgb(190, 187, 187) solid 1px; + } + .itemlins{ + border-bottom: rgb(190, 187, 187) solid 1px; + margin-bottom: 209px; + + + } + .empName { + margin: 0; + padding: 0; + text-align: center; + font-weight: bolder; + color: black; + font-size: 16px; + margin-top: 38px; + + } + .empJob{ + + margin: 0; + padding: 0; + text-align: center; + color: black; + font-size: 16px; + margin-top: 4px; + + } + \ No newline at end of file diff --git a/Mohem/src/app/profile/edit-profile/edit-profile.component.spec.ts b/Mohem/src/app/profile/edit-profile/edit-profile.component.spec.ts new file mode 100644 index 00000000..7ef1986f --- /dev/null +++ b/Mohem/src/app/profile/edit-profile/edit-profile.component.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { EditProfileComponent } from './edit-profile.component'; + +describe('EditProfileComponent', () => { + let component: EditProfileComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ EditProfileComponent ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(EditProfileComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/profile/edit-profile/edit-profile.component.ts b/Mohem/src/app/profile/edit-profile/edit-profile.component.ts new file mode 100644 index 00000000..58c888f3 --- /dev/null +++ b/Mohem/src/app/profile/edit-profile/edit-profile.component.ts @@ -0,0 +1,112 @@ +import { Component, OnInit } from '@angular/core'; +import { Platform, Events, MenuController } from "@ionic/angular"; +import { CommonService } from "src/app/hmg-common/services/common/common.service"; +import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service"; +import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service"; +import { AuthenticatedUser } from "src/app/hmg-common/services/authentication/models/authenticated-user"; +import { PerformanceAppraisalResponse } from 'src/app/hmg-common/services/dashbored/performance-appraisal.response'; +import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbored.service'; +import { SharedDataService } from 'src/app/hmg-common/services/shared-data-service/shared-data.service'; +// import { DomSanitizer } from '@angular/platform-browser'; + + +@Component({ + selector: 'app-edit-profile', + templateUrl: './edit-profile.component.html', + styleUrls: ['./edit-profile.component.scss'], +}) +export class EditProfileComponent implements OnInit { + + + User_name_Emp: string = ""; + User_Job_name: string; + + private menu: MenuController; + setImage:any; + // imageSrc: any = "../assets/imgs/profile.png"; + user_image: any = "../assets/imgs/profile.png"; + personalInfo: any; + appraisalArr :any =[]; + public performanceData: any=[]; + public static PERFORMANCE_DATA = 'perAppData'; + + constructor( + public ts: TranslatorService, + public cs: CommonService, + public authService: AuthenticationService, + public DS :DashboredService, + public sharedData: SharedDataService + // private events: Events, + // private sanitizer: DomSanitizer, + + ) + { + // this.events.subscribe("img-change", displayImg => { + // console.log("app compont: "+displayImg); + // this.user_image = this.sanitizer.bypassSecurityTrustUrl("data:Image/*;base64,"+displayImg); + + // }); + + + } + + ngOnInit() { + this.getProfile(); + } + + getProfile() { + console.log("getProfile"); + this.authService + .loadAuthenticatedUser() + .subscribe((user: AuthenticatedUser) => { + if (user) { + this.personalInfo = user; + this.User_name_Emp=this.personalInfo.EMPLOYEE_NAME; + this.User_Job_name=this.personalInfo.JOB_NAME; + this.user_image = user.EMPLOYEE_IMAGE + ? "data:image/png;base64," + user.EMPLOYEE_IMAGE + : "../assets/imgs/profile.png"; + console.log("name: "+ this.personalInfo.EMPLOYEE_NAME); + console.log("user name: "+ user.EMPLOYEE_NAME); + console.log("name: "+ this.personalInfo.JOB_NAME); + console.log("job name: "+ user.JOB_NAME); + + + }}); +} + +openEditprofile(){ + this.cs.openProfile(); +} + +openPerormance(){ + this.showPerformanceAppraisal(); + +} + +showPerformanceAppraisal(){ + this.DS.getPerformanceAppraisal(()=>{ + this.showPerformanceAppraisal(); + }).subscribe((result: PerformanceAppraisalResponse) => { + this.handlePerformanceAppraisalResult(result); + + }); +} + +private handlePerformanceAppraisalResult(result){ + if (this.cs.validResponse(result)) { + if (this.cs.hasData(result.GetPerformanceAppraisalList)) { + this.appraisalArr =result.GetPerformanceAppraisalList; + this.performanceData=[]; + + for(let i=0;i + - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- - - \ No newline at end of file +
+ --> + + + +
+ + + +

{{ts.trPK('userProfile','title')}}

+ + +
+
+ + +
+ + +
+

{{personalInfo.EMPLOYEE_NAME}}

+
+
+ + +
+ +
+ +
+ + +
+ + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+
\ No newline at end of file diff --git a/Mohem/src/app/profile/home/home.component.scss b/Mohem/src/app/profile/home/home.component.scss index 60b11dbc..4be2aac3 100644 --- a/Mohem/src/app/profile/home/home.component.scss +++ b/Mohem/src/app/profile/home/home.component.scss @@ -1,3 +1,132 @@ ion-col.colBold, ion-col.colBold > label{ font-weight:bold; -} \ No newline at end of file +} + +.colorBG{ + --background: #f0efef; + } +.header-div{ + text-transform: capitalize; + background: #22C6B3; + display: block; + position: relative; + height: 160px; + margin-bottom: 60px; + } + +// .profileCont{ +// background-color: #d9d7d7 !important; + + +.menubutton{ + white-space: normal; + color: var(--light); + text-transform: capitalize; + min-height: 39px; + background: #f0ecec; + font-size: 2rem; + position: absolute; + width: 35px !important; + height: 19px; + box-shadow: 3px 0px 7px 0px #c5c2c2; + border-radius: 50%; + + + } + + .changeIcon{ + /* background: #c1c1c1; */ + width: 21px; + /* height: 26px; */ + border-radius: 50% !important; + position: relative; + color: #7f8c8d; + + + } + + .changeImgBtn{ + position: absolute; + top: 80%; + left: 65%; + } +.profileImg{ + width: 160px; + height: 160px; + display: -webkit-inline-box; + display: inline-flex; + overflow: hidden; + // background: transparent; + border-radius: 69% !important; + position: relative; + top: 34px; + // background: white; + background: transparent; +} + + .Text { + margin: 0; + padding: 0; + text-align: center; + font-weight: bolder; + color: black; + font-size: 16px; + margin-top: 34px; + text-align: center; + } + + .line{ + + padding-top: 0px !important; + /* margin-bottom: 0px; */ + /* margin: 0px; */ + border-right: 1px #c5c2c2 solid !important; + line-height: 10px !important; + + } + .proTitles { + margin: 0; + padding: 0; + font-size: 16px; + text-align: center; + font-weight: bolder; + color: white; + margin-top: -33px; + } + + + .profileGrid{ + border: #bebbbb solid 1px; + border-radius: 9px; + padding: 0px; + margin-top: 54px; + margin-left: 10px; + margin-right: 10px; + margin-bottom: 10px; + color: black; + // font-weight: bold; + background: white; + + } + + + + + .lebl{ + + color: black; + font-size: 14px !important; + font-weight: bold !important; + padding-top: 9px; + padding-left: 5px; + + } + .rowBolds{ + color: black !important; + font-size: 14px !important; + /* padding: 6px !important; */ + padding-bottom: 9px; + padding-left: 5px; + padding-top: 4px; + + } \ No newline at end of file diff --git a/Mohem/src/app/profile/home/home.component.ts b/Mohem/src/app/profile/home/home.component.ts index 52e10d4d..2e192b1f 100644 --- a/Mohem/src/app/profile/home/home.component.ts +++ b/Mohem/src/app/profile/home/home.component.ts @@ -14,6 +14,7 @@ export class HomeComponent implements OnInit { personalInfo: any; setImage:any; imageSrc: any = "../assets/imgs/profile.png"; + // user_image: any = "../assets/imgs/profile.png"; constructor( public ts: TranslatorService, public cs: CommonService, @@ -39,11 +40,15 @@ export class HomeComponent implements OnInit { this.getProfile(); } getProfile() { + console.log("getProfile"); this.authService .loadAuthenticatedUser() .subscribe((user: AuthenticatedUser) => { if (user) { this.personalInfo = user; + console.log("name: "+ this.personalInfo.EMPLOYEE_NAME); + console.log("user name: "+ user.EMPLOYEE_NAME); + if(this.cs.getUpdateImage().status){ // this.imageSrc = this.sanitizer.bypassSecurityTrustUrl("data:Image/*;base64,"+this.cs.getUpdateImage().img); this.imageSrc = "data:image/png;base64,"+this.cs.getUpdateImage().img; @@ -60,4 +65,10 @@ export class HomeComponent implements OnInit { } }); } + + + private ChangeImage() { + this.cs.openChangeImagePage(); + } } + diff --git a/Mohem/src/app/profile/performance-evaluation/performance-evaluation.component.html b/Mohem/src/app/profile/performance-evaluation/performance-evaluation.component.html new file mode 100644 index 00000000..6bb094f2 --- /dev/null +++ b/Mohem/src/app/profile/performance-evaluation/performance-evaluation.component.html @@ -0,0 +1,77 @@ + +
+ + + +

{{ts.trPK('userProfile','performance')}}

+ +
+ +
+ + + + + +
+ +

Performance Evaluation

+ +
+ + + + + + + +
+ +
+
+ + + + + +
+
+
+ + +
+
+ + +
+ + +
+
+
+
+
+ + + +
+ +
+ + + +
\ No newline at end of file diff --git a/Mohem/src/app/profile/performance-evaluation/performance-evaluation.component.scss b/Mohem/src/app/profile/performance-evaluation/performance-evaluation.component.scss new file mode 100644 index 00000000..aee2712f --- /dev/null +++ b/Mohem/src/app/profile/performance-evaluation/performance-evaluation.component.scss @@ -0,0 +1,144 @@ + + + +.colorBG{ + --background: #f0efef; + } + .header-div{ + text-transform: capitalize; + background: #22C6B3; + display: block; + position: relative; + height: 160px; + margin-bottom: 60px; + padding-top: 10px; + } + +.btnBack{ + background: var(--customnavy); + white-space: normal; + color: var(--light); + text-transform: capitalize; + min-height: 45px; + margin-top: -8px !important; +} + +.profilediv{ + + margin-left: 337px; +} +.profileImg{ + width: 25px; + height: 24px; + /* display: -webkit-inline-box; */ + /* display: inline-flex; */ + overflow: hidden; + background: transparent; + border-radius: 90% !important; + position: relative; + top: -22px; + // margin-left: 337px; + +} + +.proTitles { + margin: 0; + padding: 0; + font-size: 16px; + text-align: center; + font-weight: bolder; + color: white; + margin-top: -33px; + } + + .grid{ + + background-color: #f9f9f9; + margin-top: 9px; + margin-bottom: 7px !important; + border-radius: 21px; + margin-bottom: 26px; + margin-left: 14px; + margin-right: 14px; + padding-bottom: 1px; + border: solid #d7d4d4 !important; + + } + .Text { + margin: 0; + padding: 0; + text-align: center; + font-weight: bolder; + color: black; + font-size: 16px; + margin-top: 5px; + margin-bottom: 10px; + text-align: center; + margin-left: 74px; + } + + .leftgrid{ + margin-left: 10px; + background: white; + border: solid #d7d4d4; + margin: 7px; + border-radius: 24px; + width: 30% !important; + padding-bottom: 9px; + padding-top: 11px; + padding-left: 10px; +} + +.rightgrid{ + margin-left: 10px; + background: white; + border: solid #d7d4d4; + // margin: 7px; + border-radius: 24px; + width: 30% !important; + padding-bottom: 9px; + padding-top: 11px; + padding-left: 10px; + margin-right: 189px; + +} + +.performancecolor{ + border: solid #bebbbb 1px !important; + border-radius: 13px; + margin-top: 0px !important; + height: 10px; + padding-right: 8px !important; + width: 65px; + margin-bottom: -10px; + +} + +.label{ + + font-size: 13px !important; + margin-top: -7px !important; + font-weight: bold !important; +} + +.labelvalue{ + font-size: 28px !important; + font-weight: bold !important; + margin-top: 7px !important; + margin-left: 72px !important; +} + +.percentage{ + font-size: 15px !important; + margin-top: 15px !important; + +} + +.gauge{ + transform: translate(-24px, -65px); + margin-bottom: -187px; + margin-top: -20px; + +} + + diff --git a/Mohem/src/app/profile/performance-evaluation/performance-evaluation.component.spec.ts b/Mohem/src/app/profile/performance-evaluation/performance-evaluation.component.spec.ts new file mode 100644 index 00000000..3e546087 --- /dev/null +++ b/Mohem/src/app/profile/performance-evaluation/performance-evaluation.component.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { PerformanceEvaluationComponent } from './performance-evaluation.component'; + +describe('PerformanceEvaluationComponent', () => { + let component: PerformanceEvaluationComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ PerformanceEvaluationComponent ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(PerformanceEvaluationComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/profile/performance-evaluation/performance-evaluation.component.ts b/Mohem/src/app/profile/performance-evaluation/performance-evaluation.component.ts new file mode 100644 index 00000000..efc55d7b --- /dev/null +++ b/Mohem/src/app/profile/performance-evaluation/performance-evaluation.component.ts @@ -0,0 +1,88 @@ +import { Component, OnInit, NgModule } from '@angular/core'; +import { Platform, Events, MenuController } from "@ionic/angular"; +import { CommonService } from "src/app/hmg-common/services/common/common.service"; +import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service"; +import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service"; +import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbored.service'; +import { PerformanceAppraisalResponse } from 'src/app/hmg-common/services/dashbored/performance-appraisal.response'; +// import { DomSanitizer } from '@angular/platform-browser'; +// import {NgxGaugeModule} from 'ngx-gauge'; +import { AuthenticatedUser } from "src/app/hmg-common/services/authentication/models/authenticated-user"; + + + +@Component({ + selector: 'app-performance-evaluation', + templateUrl: './performance-evaluation.component.html', + styleUrls: ['./performance-evaluation.component.scss'], +}) +export class PerformanceEvaluationComponent implements OnInit { + personalInfo: any; + user_image: any = "../assets/imgs/profile.png"; + setImage:any; + view: any = [380, 450]; + public performanceData: any=[]; + public length; + + + constructor( public ts: TranslatorService, + public cs: CommonService, + public DS :DashboredService, + public authService: AuthenticationService, + // private events: Events, + // private sanitizer: DomSanitizer, + + ) { + + // this.events.subscribe("img-change", displayImg => { + // console.log("app compont: "+displayImg); + // this.user_image = this.sanitizer.bypassSecurityTrustUrl("data:Image/*;base64,"+displayImg); + + // }); + + + } + + + colorScheme = { + domain: ['#22C6B3', '#094875','#3CB9D5','#1FA269','#0D155E'] + }; + + ngOnInit() { + + this.getProfile(); + + this.performanceData = this.cs.sharedService.getSharedData( + PerformanceAppraisalResponse.PERFORMANCE_DATA, + true + ); + console.log(this.performanceData.length); + //i % 2 == 0 + this.length=this.performanceData.length; + + for(let i=0;i { + if (user) { + this.personalInfo = user; + this.user_image = user.EMPLOYEE_IMAGE + ? "data:image/png;base64," + user.EMPLOYEE_IMAGE + : "../assets/imgs/profile.png"; + + + }}); +} + +} diff --git a/Mohem/src/app/profile/profile-image/profile-image.component.scss b/Mohem/src/app/profile/profile-image/profile-image.component.scss index 3077b04d..c4bcb781 100644 --- a/Mohem/src/app/profile/profile-image/profile-image.component.scss +++ b/Mohem/src/app/profile/profile-image/profile-image.component.scss @@ -32,7 +32,7 @@ width: 234px; background: transparent; border-radius: 50% !important; color:#fff; - background-color: rgba(0,0,0,0.1); +// background-color: rgba(0,0,0,0.1); // box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); img{ diff --git a/Mohem/src/app/profile/profile.module.ts b/Mohem/src/app/profile/profile.module.ts index d18c2b78..c1bd6191 100644 --- a/Mohem/src/app/profile/profile.module.ts +++ b/Mohem/src/app/profile/profile.module.ts @@ -5,10 +5,17 @@ import { Routes, RouterModule } from '@angular/router'; import { HmgCommonModule } from '../hmg-common/hmg-common.module'; import { IonicModule } from '@ionic/angular'; +import { NgxChartsModule } from '@swimlane/ngx-charts'; + + import { ProfilePage } from './profile.page'; import { HomeComponent } from './home/home.component'; +import {EditProfileComponent} from './edit-profile/edit-profile.component'; import {ProfileImageComponent} from './profile-image/profile-image.component' +import {PerformanceEvaluationComponent} from './performance-evaluation/performance-evaluation.component' +import { from } from 'rxjs'; + const routes: Routes = [ { path: '', @@ -29,7 +36,31 @@ const routes: Routes = [ component: ProfileImageComponent } ], - } + + }, + + { + path: '', + component: ProfilePage, + children: [ + { + path: 'editprofile', + component: EditProfileComponent + } + ], + }, + + { + path: '', + component: ProfilePage, + children: [ + { + path: 'performanceevaluation', + component: PerformanceEvaluationComponent + } + ], + }, + ]; @NgModule({ @@ -38,8 +69,10 @@ const routes: Routes = [ FormsModule, IonicModule, HmgCommonModule, + NgxChartsModule, + RouterModule.forChild(routes) ], - declarations: [ProfilePage , HomeComponent,ProfileImageComponent] + declarations: [ProfilePage , HomeComponent,ProfileImageComponent,EditProfileComponent,PerformanceEvaluationComponent] }) export class ProfilePageModule {} diff --git a/Mohem/src/assets/localization/i18n.json b/Mohem/src/assets/localization/i18n.json index 482258ad..847cfcc9 100644 --- a/Mohem/src/assets/localization/i18n.json +++ b/Mohem/src/assets/localization/i18n.json @@ -25,6 +25,7 @@ "en": "Register", "ar": "التسجيل" }, + "sign-out": { "en": "Are you sure you want to Sign Out", "ar": "هل أنت متأكد من إغلاق الحساب" @@ -877,6 +878,18 @@ "en": "My Profile", "ar": "معلوماتي" }, + "edit-profile": { + "en": "Edit Profile", + "ar": "تعديل المعلومات" + }, + "performance-evaluation": { + "en": "Performance Evaluation", + "ar": "تقييم الاداء" + }, + "performance": { + "en": "Performance", + "ar": "الاداء" + }, "changepicture":{ "en":"Change Picture", "ar":"تغيير الصوره" @@ -897,6 +910,10 @@ "en": "Location Name", "ar": "اسم الموقع" }, + "address": { + "en": "Address", + "ar": "العنوان" + }, "payrol": { "en": "Payroll", "ar": "كشف الرواتب" From afc8c99639dd9639c5078b90279683f05888d1de Mon Sep 17 00:00:00 2001 From: "Fatimah.Alshammari" Date: Mon, 10 Feb 2020 16:33:30 +0300 Subject: [PATCH 13/14] add new design to payslip --- Mohem/angular.json | 2 +- Mohem/src/app/app.component.html | 3 +- Mohem/src/app/app.component.ts | 5 + Mohem/src/app/hmg-common/hmg-common.module.ts | 7 +- .../src/app/payslip/home/home.component.html | 642 ++++++++---------- .../src/app/payslip/home/home.component.scss | 240 ++++++- Mohem/src/app/payslip/home/home.component.ts | 125 +++- Mohem/src/app/payslip/payslip.page.ts | 1 + Mohem/src/assets/localization/i18n.json | 20 + Mohem/src/global.scss | 6 + 10 files changed, 664 insertions(+), 387 deletions(-) diff --git a/Mohem/angular.json b/Mohem/angular.json index 42b54182..eb6b8116 100644 --- a/Mohem/angular.json +++ b/Mohem/angular.json @@ -42,7 +42,7 @@ "input": "src/app/app.scss" } ], - "scripts": [], + "scripts": ["node_modules/chart.js/dist/Chart.js"], "es5BrowserSupport": true }, "configurations": { diff --git a/Mohem/src/app/app.component.html b/Mohem/src/app/app.component.html index f3b35531..73b85b95 100644 --- a/Mohem/src/app/app.component.html +++ b/Mohem/src/app/app.component.html @@ -98,7 +98,8 @@
- + + diff --git a/Mohem/src/app/app.component.ts b/Mohem/src/app/app.component.ts index a1e655df..ccfe1c9d 100644 --- a/Mohem/src/app/app.component.ts +++ b/Mohem/src/app/app.component.ts @@ -140,6 +140,11 @@ export class AppComponent implements OnInit, AfterViewInit { this.cs.openChangePassword(); this.menu.toggle(); } + +// openPayslipPage(){ +// this.cs.openPayslipPage(); +// this.menu.toggle(); +// } private changeImage() { this.cs.openChangeImagePage(); diff --git a/Mohem/src/app/hmg-common/hmg-common.module.ts b/Mohem/src/app/hmg-common/hmg-common.module.ts index 44dbe250..40b14ab7 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 {FabButtonComponent} from './ui/fab-button/fab-button.component' import { AttendScanService } from './services/attend-services/attend-scan.service'; import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx'; import { NgCircleProgressModule } from 'ng-circle-progress'; +import { ChartModule } from 'primeng/chart'; @NgModule({ imports: [ CommonModule, @@ -111,7 +112,8 @@ import { NgCircleProgressModule } from 'ng-circle-progress'; NgxChartsModule, ListboxModule, PdfViewerModule, - NgCircleProgressModule.forRoot() + NgCircleProgressModule.forRoot(), + ChartModule ], declarations: [ FabButtonComponent, @@ -230,7 +232,8 @@ import { NgCircleProgressModule } from 'ng-circle-progress'; StatsButtonComponent, ServicesButtonComponent, ConfirmLoginComponent, - NgCircleProgressModule + NgCircleProgressModule, + ChartModule ], providers: [ AttendScanService, diff --git a/Mohem/src/app/payslip/home/home.component.html b/Mohem/src/app/payslip/home/home.component.html index c06b7c72..8a72c56a 100644 --- a/Mohem/src/app/payslip/home/home.component.html +++ b/Mohem/src/app/payslip/home/home.component.html @@ -1,3 +1,6 @@ + + + - - - choose payslip - - {{options.PAYSLIP_CHOICE}} - - - - - +
+ + + +

{{ts.trPK('payslip','monthly-payslip')}}

+ +
+ +
+
+ + - -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - -
- -
- - - - - - - - - +
+ + + + + +

{{ (showPaySlip.PAYSLIP_CHOICE)?.substring(15,23) }}

+ + - - - - - - - - - - + + +
+ + + +
+
-
- - --> - - - -
- + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - +
+ +
+ + + +
+ +

{{GetSummaryOfPaymentList.TOTAL_PAY_AMOUNT}}

+ + + {{ts.trPK('payslip','total')}}
{{ts.trPK('payslip','salary')}}
- - - - - - - - - - + - - - - - -
- - - - - - - - + + +
+
+ + + + + + + + +
+
+ + + - - - - - - - - - - - + + + +
- - - - + + + +
+
+ + + + +
{{ts.trPK('payslip','summary-payment')}}
+ +
+ + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
-
- +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
- +
{{ts.trPK('payslip','earnings')}}
+
+ + + + + + + + + + + + + + + + + + +
+
{{ts.trPK('payslip','deductions')}}
+
+ + + + + + + + + + + + + + + + + + +
+ + + + +
{{ts.trPK('payslip','payment-information')}}
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/Mohem/src/app/payslip/home/home.component.scss b/Mohem/src/app/payslip/home/home.component.scss index 3b9e5d21..7dde3934 100644 --- a/Mohem/src/app/payslip/home/home.component.scss +++ b/Mohem/src/app/payslip/home/home.component.scss @@ -1,9 +1,6 @@ .rowAccordin{ border: none; - - -} - + } .gridAccordin{ margin: 10px; background: #ffffff; @@ -11,9 +8,31 @@ } .colPayslip{ - text-align: center; - color: var(--labelColor); + border-right: 1px solid #cac8c8; + border-bottom-left-radius: -10px !important; + padding-top: 8px; + padding-bottom: 8px; + margin-left: 18px; + font-size: 12px !important; +} +.colPayslips{ + border-bottom-left-radius: -10px !important; + padding-top: 8px; + padding-bottom: 8px; + margin-left: 18px; + font-size: 12px !important; + } + +.label{ + font-size: 15px !important; + text-align: center; + margin-bottom: 1px; +} +.label-bold{ + font-size: 13px !important; + // font-weight: bold !important; + font-family: WorkSans-Bold; } .earingTotH{ text-align: right; @@ -39,3 +58,212 @@ color: var(--red); } + +.colorBG{ + --background: #f0efef; + } + +.header-div { + + background-color: #22C6B3; + text-transform: capitalize; + height: 180px; + position: relative; + display: block; + margin-bottom: -28px; + } + .Title{ + text-align: center; + color: white; + margin-top: -33px; + font-size: 17px; + } + + .Imgdiv{ + padding-top: -38px; + margin-top: -32px; + } + .Imgsrc{ + width: 23px; + height: 24px; + /* display: -webkit-inline-box; */ + /* display: inline-flex; */ + overflow: hidden; + background: transparent; + border-radius: 70% !important; + /* position: relative; */ + top: 7px; + margin-left: 344px !important; + margin-top: -46px; + } + +.p{ + font-weight: bold; + margin-top: -7px; + font-size: 14px; +} + + .slidBtn{ + margin-top: 8px; + margin-left: 10px; + background: transparent; + } + .activeArrow{ + height: 26px; + width: 26px; + color: white; + background: transparent !important; + --background: transparent !important; + + + } +.slidbtn{ + background: transparent; + margin-bottom: -59px; + margin-top: 8px; + margin-left: 65px; +} + .disabledArrow{ + height: 26px; + width: 26px; + color: #908d8d; + background: transparent !important; + --background: transparent !important; + } + + .result-graph{ + font-size: 14px; + margin-left: -48px; + margin-right: 3px; + } + .headerGrid{ + background-color: white !important; + border: 1px solid #cac8c8 !important; + border-radius: 20px !important; + padding-top: 13px; + padding-bottom: 14px; + margin-left: 30px; + margin-right: 32px; + margin-top: -2px; + margin-bottom: 10px; + padding-right: 21px; + + } + .result-text-container { + padding: 0; + margin: 0; + position: absolute; + left: 42%; + top: 50%; + display: block; + text-align: center; + transform: translate(-50%, -50%); + + h2 { + + font-size: 25px; + font-family: WorkSans-Bold; + margin: 0 auto; + line-height: 36px; + + } + + span { + + width: 125px; + display: block; + margin: 0 auto; + font-size: 15px; + font-family: workSans-Regular; + } + } +.green-label{ +font-size: 12px; +margin-top: -13px; +} + +.green-amount{ + font-size: 17px; + font-family: WorkSans-Bold; + margin-top: -3px; +} + +.blue-label{ + font-size: 12px; + margin-top: -13px; + } + + .blue-amount{ + font-size: 17px; + font-family: WorkSans-Bold; + margin-top: -4px; + } + + .grids{ + border-radius: 20px !important; + background: white; + padding-left: 1px; + padding-right: 1px; + margin: 13px; + padding-top: 0px; + padding-bottom: 3px; + padding-left: 13px; + padding-right: 13px; + border: 1px solid #cac8c8; + } + + .header{ + + margin-top: -126px; + } + .bgcolor { + + color: white; + border-top-right-radius: 19px; + border-top-left-radius: 15px; + padding-top: 1; + padding-bottom: 0; + margin-top: 0; + margin-bottom: 0; + /* border-radius: 12px !important; */ + background: #094875; + border-bottom: 1px solid #a7a4a4; + border-top: 1px solid #cac8c8; + margin-left: -13px; + margin-right: -13px; + } + +.rowtable{ + padding-top: 0; + padding-bottom: 0; + margin-top: 0; + margin-bottom: 0; + border-top: 1px solid #cac8c8; + margin-left: -13px; + margin-right: -13px; + +} +.rowtables{ + padding-top: 0; + padding-bottom: 0; + margin-top: 0; + margin-bottom: 0; + margin-left: -13px; + margin-right: -13px; + +} +.col{ + + font-size: 15px; + font-family: WorkSans-Bold; +} +.hrTitle{ + margin-left: 11px !important; + font-size: 15px !important; +} +.date{ + font-size: 15px !important; + margin-left: 58px; + margin-bottom: 12px; + padding-right: 5px; +} \ No newline at end of file diff --git a/Mohem/src/app/payslip/home/home.component.ts b/Mohem/src/app/payslip/home/home.component.ts index 1a387670..6bd1875b 100644 --- a/Mohem/src/app/payslip/home/home.component.ts +++ b/Mohem/src/app/payslip/home/home.component.ts @@ -1,11 +1,14 @@ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, SimpleChanges } from '@angular/core'; import {PayslipService} from '../service/payslip.service' import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; import { CommonService } from 'src/app/hmg-common/services/common/common.service'; import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response'; import { SharedDataService } from 'src/app/hmg-common/services/shared-data-service/shared-data.service'; import { DeductionRequest } from '../model/deductionReq'; -import { IonInfiniteScroll } from '@ionic/angular'; +import { IonInfiniteScroll,IonSlides} from '@ionic/angular'; +import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service"; +import { AuthenticatedUser } from "src/app/hmg-common/services/authentication/models/authenticated-user"; +import { UIChart } from 'primeng/components/chart/chart'; @Component({ selector: 'app-home', @@ -32,16 +35,44 @@ export class HomeComponent implements OnInit { private deductionReq: DeductionRequest; doinfiniteDedReq:any; doinfinitEarReq:any; + personalInfo: any; + setImage:any; + imageSrc: any = "../assets/imgs/profile.png"; + slideView: any; + sliderOne: any; + payslipIndex :any; + data:any; + @ViewChild('slides') slides: IonSlides; + @ViewChild('slideWithNav') slideWithNav: IonSlides; + @ViewChild('chart') chart: UIChart; + slideOptsOne = { + initialSlide: 0, + slidesPerView: 1, + autoplay:true + }; @ViewChild(IonInfiniteScroll) infiniteScroll: IonInfiniteScroll; + public options = { + cutoutPercentage: 80, + tooltips: { enabled: false }, + legend: { display: false }}; + gaugeType = "full"; + // gaugeValue = 11.200; + // gaugeLabel = ""; + constructor( public payslipService:PayslipService, public ts: TranslatorService, public common: CommonService, - public sharedData: SharedDataService + public sharedData: SharedDataService, + public authService: AuthenticationService, + public cs: CommonService, + + ) {} + ngOnInit() { // this.selEmp = this.common.sharedService.getSharedData( // MenuResponse.SHARED_SEL_EMP, @@ -75,7 +106,63 @@ export class HomeComponent implements OnInit { this.getPayslip(); + // this.getProfile(); + } + + + ngOnChanges(changes: SimpleChanges): void { + if (changes.inputData.currentValue) { + // update this.data here + + // then chart is getting updated + setTimeout(() => { + this.chart.reinit(); + }, 100); + } + } + + slideNext(object, slideView) { + if(this.payslipIndex!=0){ + this.payslipIndex=this.payslipIndex-1; + this.showInfo(); + } +} + +slidePrev(object, slideView) { + if(this.payslipIndex { + // if (user) { + // this.personalInfo = user; + // if(this.cs.getUpdateImage().status){ + // // this.imageSrc = this.sanitizer.bypassSecurityTrustUrl("data:Image/*;base64,"+this.cs.getUpdateImage().img); + // this.imageSrc = "data:image/png;base64,"+this.cs.getUpdateImage().img; + // // alert("this.imageSrc"+ this.imageSrc); + // }else{ + // this.imageSrc = user.EMPLOYEE_IMAGE + // ? "data:image/png;base64," + user.EMPLOYEE_IMAGE + // : this.imageSrc; + // console.log("2-"+user); + // } + // } + // else { + // console.log("3-"+user); + // } + // }); + // } + + + + getPayslip(){ // this.selEmp ="13777"; @@ -99,19 +186,21 @@ export class HomeComponent implements OnInit { if (result.GetPayslipList != null) { this.GetPayslipList = result.GetPayslipList; + alert(this.GetPayslipList.length); this.firstPayslip= this.GetPayslipList[0] this.defultSelected=this.firstPayslip.PAYSLIP_CHOICE } this.showPaySlip = this.GetPayslipList[0]; + this.payslipIndex=0; this.getAllPayslipData(this.GetPayslipList[0].ACTION_CONTEXT_ID); } - // showPaymentInfo - showInfo(event){ - console.log(event.detail.value); - const index = parseInt(event.detail.value); - this.showPaySlip =this.GetPayslipList[index]; - this.ActionContextID=this.GetPayslipList[index].ACTION_CONTEXT_ID; + showInfo(){ + + //console.log(event.detail.value); + //const index = parseInt(event.detail.value); + this.showPaySlip =this.GetPayslipList[this.payslipIndex]; + this.ActionContextID=this.GetPayslipList[this.payslipIndex].ACTION_CONTEXT_ID; this.getAllPayslipData(this.ActionContextID); } @@ -140,8 +229,18 @@ export class HomeComponent implements OnInit { this.GetSummaryOfPaymentList = result.GetSummaryOfPaymentList[0]; this.earingTotal = this.GetSummaryOfPaymentList.TOTAL_EARNINGS_AMOUNT; this.deductionTotal = this.GetSummaryOfPaymentList.TOTAL_DEDUCTIONS_AMOUNT; - - } + this.data = { + + labels: ['earingTotal', 'deductionTotal'], + datasets: [ + { data: [this.earingTotal,this.deductionTotal], + backgroundColor: [ + '#22c6b3', + '#094875', ], + borderWidth: 2 + } + ] + }; } } @@ -286,8 +385,6 @@ getDeduction(ActionContextID){ } else { if (this.infiniteScroll) this.infiniteScroll.complete(); } - } //end infiniteScroll - - + } } diff --git a/Mohem/src/app/payslip/payslip.page.ts b/Mohem/src/app/payslip/payslip.page.ts index 15744cfa..f0f43eb8 100644 --- a/Mohem/src/app/payslip/payslip.page.ts +++ b/Mohem/src/app/payslip/payslip.page.ts @@ -6,6 +6,7 @@ import { Component, OnInit } from '@angular/core'; styleUrls: ['./payslip.page.scss'], }) export class PayslipPage implements OnInit { + constructor() { } diff --git a/Mohem/src/assets/localization/i18n.json b/Mohem/src/assets/localization/i18n.json index 9d52c4fd..22123ac2 100644 --- a/Mohem/src/assets/localization/i18n.json +++ b/Mohem/src/assets/localization/i18n.json @@ -2049,6 +2049,10 @@ "en": "payslip", "ar":"كشف الراتب" }, + "monthly-payslip": { + "en": "Monthly Pay Slip", + "ar": "كشف الراتب الشهري" + }, "end-date":{ "en": "Peroid End Date", "ar":" تاريخ بداية الفترة" @@ -2061,6 +2065,10 @@ "en": "Peroid Name", "ar":"اسم الفترة " }, + "salary":{ + "en": "Salary", + "ar":"الراتب" + }, "deductions-Amount":{ "en": "Total Deductions Amount", "ar":"قيمة الخصومات " @@ -2113,6 +2121,18 @@ "en": "Deductions", "ar":"الخصومات " }, + "deductions-key":{ + "en": "DED", + "ar":" " + }, + "earnings-key":{ + "en": "NET", + "ar":" " + }, + "particular":{ + "en": "Particular", + "ar":"الخصائص" + }, "payment-information":{ "en": "Payment Information", "ar":"معلةمات الدفع " diff --git a/Mohem/src/global.scss b/Mohem/src/global.scss index 4421a600..d7f80b69 100644 --- a/Mohem/src/global.scss +++ b/Mohem/src/global.scss @@ -9,5 +9,11 @@ @import '~@ionic/angular/css/text-alignment.css'; @import '~@ionic/angular/css/text-transformation.css'; @import '~@ionic/angular/css/flex-utils.css'; +@import '../node_modules/primeng/resources/themes/nova-light/theme.css'; +@import "../node_modules/primeng/resources/primeng.min.css"; +@import "../node_modules/primeicons/primeicons.css"; @import "theme/styles.scss"; @import "theme/worklist.scss"; + + + From 396241bc83b1c95dce8d4a2aa8b5caee9a6f75ea Mon Sep 17 00:00:00 2001 From: Mohamed Mekawy Date: Tue, 11 Feb 2020 09:00:27 +0300 Subject: [PATCH 14/14] merge emp-profile branch --- Mohem/src/app/home/home.page.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mohem/src/app/home/home.page.ts b/Mohem/src/app/home/home.page.ts index 95e58003..c29c014b 100644 --- a/Mohem/src/app/home/home.page.ts +++ b/Mohem/src/app/home/home.page.ts @@ -593,7 +593,7 @@ export class HomePage implements OnInit { } openProfilePage() { - this.common.openProfile(); + this.common.openEditProfile(); } }