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/package-lock.json b/Mohem/package-lock.json
index 7c7d2b6c..2a5976ca 100644
--- a/Mohem/package-lock.json
+++ b/Mohem/package-lock.json
@@ -1216,6 +1216,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",
@@ -4557,6 +4565,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",
@@ -9399,6 +9412,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",
@@ -9417,6 +9438,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..43dc7e46 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,8 +104,10 @@
"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",
+ "ngx-gauge": "^1.0.0-beta.10",
"npm": "^6.13.1",
"phonegap-plugin-barcodescanner": "^8.1.0",
"phonegap-plugin-multidex": "^1.0.0",
@@ -111,6 +115,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,20 +195,8 @@
"cordova-plugin-fingerprint-aio": {
"FACEID_USAGE_DESCRIPTION": "User Authentication"
},
- "cordova-plugin-firebasex": {
- "FIREBASE_ANALYTICS_COLLECTION_ENABLED": "true",
- "FIREBASE_PERFORMANCE_COLLECTION_ENABLED": "true",
- "FIREBASE_CRASHLYTICS_COLLECTION_ENABLED": "true",
- "ANDROID_ICON_ACCENT": "#FF00FFFF",
- "ANDROID_PLAY_SERVICES_TAGMANAGER_VERSION": "17.0.0",
- "ANDROID_FIREBASE_ANALYTICS_VERSION": "17.2.1",
- "ANDROID_FIREBASE_MESSAGING_VERSION": "20.0.0",
- "ANDROID_FIREBASE_CONFIG_VERSION": "19.0.3",
- "ANDROID_FIREBASE_PERF_VERSION": "19.0.1",
- "ANDROID_FIREBASE_AUTH_VERSION": "19.1.0",
- "ANDROID_CRASHLYTICS_VERSION": "2.10.1",
- "ANDROID_CRASHLYTICS_NDK_VERSION": "2.1.1"
- }
+ "cordova-plugin-firebasex": {},
+ "cordova-plugin-vibration": {}
},
"platforms": [
"browser",
@@ -211,4 +204,4 @@
"android"
]
}
-}
+}
\ No newline at end of file
diff --git a/Mohem/src/app/accrual-balances/home/home.component.ts b/Mohem/src/app/accrual-balances/home/home.component.ts
index be5ffba5..d26f4574 100644
--- a/Mohem/src/app/accrual-balances/home/home.component.ts
+++ b/Mohem/src/app/accrual-balances/home/home.component.ts
@@ -1,13 +1,13 @@
-import { Component, OnInit } from "@angular/core";
-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 { AccrualService } from "../services/accrual.service";
-import { AuthenticatedUser } from "src/app/hmg-common/services/authentication/models/authenticated-user";
+import { Component, OnInit } from '@angular/core';
+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 { AccrualService } from '../services/accrual.service';
+import { AuthenticatedUser } from 'src/app/hmg-common/services/authentication/models/authenticated-user';
@Component({
- selector: "app-home",
- templateUrl: "./home.component.html",
- styleUrls: ["./home.component.scss"]
+ selector: 'app-home',
+ templateUrl: './home.component.html',
+ styleUrls: ['./home.component.scss']
})
export class HomeComponent implements OnInit {
Sdate: any;
@@ -39,7 +39,7 @@ export class HomeComponent implements OnInit {
let day = today.getDate();
let month = today.getMonth() + 1;
let year = today.getFullYear();
- let todayDate = month + "/" + day + "/" + year;
+ let todayDate = month + '/' + day + '/' + year;
let effectiveDate = todayDate;
const request = {
P_SELECTED_EMPLOYEE_NUMBER: this.emp_no,
diff --git a/Mohem/src/app/app-routing.module.ts b/Mohem/src/app/app-routing.module.ts
index ef409bfb..4139c84e 100644
--- a/Mohem/src/app/app-routing.module.ts
+++ b/Mohem/src/app/app-routing.module.ts
@@ -1,32 +1,33 @@
-import { NgModule } from '@angular/core';
-import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
+import { NgModule } from '@angular/core';
+import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
+
+
+const routes: Routes = [
+ { path: '', redirectTo: 'authentication/login', pathMatch: 'full' },
+ {
+ path: 'authentication', loadChildren: './authentication/authentication.module#AuthenticationPageModule'},
+ { path: 'home', loadChildren: './home/home.module#HomePageModule' },
+ { path: 'profile', loadChildren: './profile/profile.module#ProfilePageModule' },
+ { path: 'vacation-rule', loadChildren: './vacation-rule/vacation-rule.module#VacationRulePageModule' },
+ { path: 'accrual-balances', loadChildren: './accrual-balances/accrual-balances.module#AccrualBalancesPageModule' },
+ { path: 'my-team', loadChildren: './my-team/my-team.module#MyTeamPageModule' },
+ { path: 'attendance', loadChildren: './attendance/attendance.module#AttendancePageModule' },
+ { path: 'eit', loadChildren: './eit/eit.module#EITPageModule' },
+ { path: 'absence', loadChildren: './absence/absence.module#AbsencePageModule' },
+ { path: 'notification', loadChildren: './notification/notification.module#NotificationPageModule' },
+ { path: 'my-specialist', loadChildren: './my-specialist/my-specialist.module#MySpecialistPageModule' },
+ { path: 'my-subordinate', loadChildren: './my-subordinate/my-subordinate.module#MySubordinatePageModule' },
+ { path: 'time-card', loadChildren: './time-card/time-card.module#TimeCardPageModule' },
+ { path: 'payslip', loadChildren: './payslip/payslip.module#PayslipPageModule' },
{ path: 'attendance-tracking', loadChildren: './attendance-tracking/attendance-tracking.module#AttendanceTrackingPageModule' }
-
-const routes: Routes = [
- { path: '', redirectTo: 'authentication/login', pathMatch: 'full' },
- {
- path: 'authentication', loadChildren: './authentication/authentication.module#AuthenticationPageModule'},
- { path: 'home', loadChildren: './home/home.module#HomePageModule' },
- { path: 'profile', loadChildren: './profile/profile.module#ProfilePageModule' },
- { path: 'vacation-rule', loadChildren: './vacation-rule/vacation-rule.module#VacationRulePageModule' },
- { path: 'accrual-balances', loadChildren: './accrual-balances/accrual-balances.module#AccrualBalancesPageModule' },
- { path: 'my-team', loadChildren: './my-team/my-team.module#MyTeamPageModule' },
- { path: 'attendance', loadChildren: './attendance/attendance.module#AttendancePageModule' },
- { path: 'eit', loadChildren: './eit/eit.module#EITPageModule' },
- { path: 'absence', loadChildren: './absence/absence.module#AbsencePageModule' },
- { path: 'notification', loadChildren: './notification/notification.module#NotificationPageModule' },
- { path: 'my-specialist', loadChildren: './my-specialist/my-specialist.module#MySpecialistPageModule' },
- { path: 'my-subordinate', loadChildren: './my-subordinate/my-subordinate.module#MySubordinatePageModule' },
- { path: 'time-card', loadChildren: './time-card/time-card.module#TimeCardPageModule' },
- { path: 'payslip', loadChildren: './payslip/payslip.module#PayslipPageModule' }
-
-];
-
-@NgModule({
- imports: [
- /*RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules}),*/
- RouterModule.forRoot(routes),
- ],
- exports: [RouterModule]
-})
-export class AppRoutingModule { }
+
+];
+
+@NgModule({
+ imports: [
+ /*RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules}),*/
+ RouterModule.forRoot(routes),
+ ],
+ exports: [RouterModule]
+})
+export class AppRoutingModule { }
diff --git a/Mohem/src/app/app.component.html b/Mohem/src/app/app.component.html
index f3b35531..4a975deb 100644
--- a/Mohem/src/app/app.component.html
+++ b/Mohem/src/app/app.component.html
@@ -37,10 +37,10 @@
-
+
@@ -98,7 +98,8 @@
-
+
+
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..28f84927 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(){
@@ -140,6 +145,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();
@@ -150,4 +160,5 @@ export class AppComponent implements OnInit, AfterViewInit {
this.menu.toggle();
}
+
}
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/attendance-tracking/attendance-tracking.module.ts b/Mohem/src/app/attendance-tracking/attendance-tracking.module.ts
new file mode 100644
index 00000000..b2c2358d
--- /dev/null
+++ b/Mohem/src/app/attendance-tracking/attendance-tracking.module.ts
@@ -0,0 +1,38 @@
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { FormsModule } from '@angular/forms';
+import { Routes, RouterModule } from '@angular/router';
+import { IonicModule } from '@ionic/angular';
+import { AttendanceTrackingPage } from './attendance-tracking.page';
+import {HomeComponent} from './home/home.component'
+import { HmgCommonModule } from "./../hmg-common/hmg-common.module";
+
+const routes: Routes = [
+ {
+ path: '',
+ component: AttendanceTrackingPage,
+ children:[
+ {
+ path: 'home',
+ component:HomeComponent
+ }
+ ]
+},
+
+];
+
+
+
+
+
+@NgModule({
+ imports: [
+ CommonModule,
+ FormsModule,
+ IonicModule,
+ HmgCommonModule,
+ RouterModule.forChild(routes)
+ ],
+ declarations: [AttendanceTrackingPage,HomeComponent]
+})
+export class AttendanceTrackingPageModule {}
diff --git a/Mohem/src/app/attendance-tracking/attendance-tracking.page.html b/Mohem/src/app/attendance-tracking/attendance-tracking.page.html
new file mode 100644
index 00000000..8b172850
--- /dev/null
+++ b/Mohem/src/app/attendance-tracking/attendance-tracking.page.html
@@ -0,0 +1,3 @@
+
+
+
diff --git a/Mohem/src/app/attendance-tracking/attendance-tracking.page.scss b/Mohem/src/app/attendance-tracking/attendance-tracking.page.scss
new file mode 100644
index 00000000..e69de29b
diff --git a/Mohem/src/app/attendance-tracking/attendance-tracking.page.spec.ts b/Mohem/src/app/attendance-tracking/attendance-tracking.page.spec.ts
new file mode 100644
index 00000000..ca11e013
--- /dev/null
+++ b/Mohem/src/app/attendance-tracking/attendance-tracking.page.spec.ts
@@ -0,0 +1,27 @@
+import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { AttendanceTrackingPage } from './attendance-tracking.page';
+
+describe('AttendanceTrackingPage', () => {
+ let component: AttendanceTrackingPage;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ AttendanceTrackingPage ],
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(AttendanceTrackingPage);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/Mohem/src/app/attendance-tracking/attendance-tracking.page.ts b/Mohem/src/app/attendance-tracking/attendance-tracking.page.ts
new file mode 100644
index 00000000..7eff1575
--- /dev/null
+++ b/Mohem/src/app/attendance-tracking/attendance-tracking.page.ts
@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+ selector: 'app-attendance-tracking',
+ templateUrl: './attendance-tracking.page.html',
+ styleUrls: ['./attendance-tracking.page.scss'],
+})
+export class AttendanceTrackingPage implements OnInit {
+
+ constructor() { }
+
+ ngOnInit() {
+ }
+
+}
diff --git a/Mohem/src/app/attendance-tracking/home/home.component.html b/Mohem/src/app/attendance-tracking/home/home.component.html
new file mode 100644
index 00000000..1a28a602
--- /dev/null
+++ b/Mohem/src/app/attendance-tracking/home/home.component.html
@@ -0,0 +1,79 @@
+
+
+
+
+
+
+
+
{{curentDate}}
+
{{ts.trPK('attendance-tracking','today-time-left')}}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ts.trPK('attendance-tracking','shift-time')}}
+
+ {{attendanceTrackingList.P_SHT_NAME}}
+
+
+
+ {{ts.trPK('attendance-tracking','check-in')}}
+
+ 08:00
+
+
+ {{ts.trPK('attendance-tracking','check-out')}}
+
+ 08:00
+
+
+
+
+ {{ts.trPK('attendance-tracking','late-in')}}
+
+ 08:00
+
+
+ {{ts.trPK('attendance-tracking','regular')}}
+
+ {{attendanceTrackingList.P_SCHEDULED_HOURS}}
+
+
+
+
+
\ No newline at end of file
diff --git a/Mohem/src/app/attendance-tracking/home/home.component.scss b/Mohem/src/app/attendance-tracking/home/home.component.scss
new file mode 100644
index 00000000..f09a8a87
--- /dev/null
+++ b/Mohem/src/app/attendance-tracking/home/home.component.scss
@@ -0,0 +1,57 @@
+.timer-chart{
+padding-top:18px;
+background: #094773;
+// height: 50%;
+text-align: center;
+}
+
+.tracking-content{
+background: #053c63;
+height: 50%;
+}
+.rowBorder{
+ text-align: center;
+ border-bottom: var(--lightblue) solid 1px;
+}
+
+.shift-text{
+ // text-align: center;
+ // width: 100%;
+ // color: white !important;
+ margin-bottom: 12px;
+ margin-top: -9px;
+ font-size: 30px;
+}
+.shift-title{
+ width: 100%;
+ text-align: center;
+ color: white !important;
+}
+.stopicon{
+ width: 50px;
+ height: 39px;
+ color: #053c63;
+}
+
+.divstopBtn{
+text-align: center;
+}
+
+.stopBtn{
+ height: 70px;
+ width: 70px;
+ background-color: var(--lightblue) !important;
+ border-radius: 50%;
+ display: inline-block;
+ margin-top: -24px;
+ border: solid 3px #053c63;
+}
+.colBorder{
+ border-right: var(--lightblue) solid 1px;
+}
+
+.fixed-shift-timer{
+ margin-top: -50px;
+ margin-bottom: -30px;
+}
+
diff --git a/Mohem/src/app/attendance-tracking/home/home.component.spec.ts b/Mohem/src/app/attendance-tracking/home/home.component.spec.ts
new file mode 100644
index 00000000..5ec1377b
--- /dev/null
+++ b/Mohem/src/app/attendance-tracking/home/home.component.spec.ts
@@ -0,0 +1,27 @@
+import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { HomeComponent } from './home.component';
+
+describe('HomeComponent', () => {
+ let component: HomeComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ HomeComponent ],
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(HomeComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/Mohem/src/app/attendance-tracking/home/home.component.ts b/Mohem/src/app/attendance-tracking/home/home.component.ts
new file mode 100644
index 00000000..a872b22a
--- /dev/null
+++ b/Mohem/src/app/attendance-tracking/home/home.component.ts
@@ -0,0 +1,134 @@
+import { Component, OnInit, EventEmitter, Output } from '@angular/core';
+import { CommonService } from 'src/app/hmg-common/services/common/common.service';
+import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbored.service';
+import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
+import {AttendScanService} from '../../hmg-common/services/attend-services/attend-scan.service';
+import { AttendanceTrackingResponse } from 'src/app/hmg-common/services/dashbored/attendance-tracking.response';
+@Component({
+ selector: 'app-home',
+ templateUrl: './home.component.html',
+ styleUrls: ['./home.component.scss'],
+})
+export class HomeComponent implements OnInit {
+ attendanceTrackingList: any = [];
+ curentDate: any;
+ direction: string;
+ isCheckOut = false;
+ public runTimer = false;
+ public hasStarted = false;
+ public hasFinished = false;
+ public remainingTime: any;
+ public scheduledTime: any;
+ public isCheckedIn = undefined;
+ public displayTime: any;
+ public percent: any;
+
+ constructor(
+ public cs: CommonService,
+ public db: DashboredService,
+ public ts: TranslatorService,
+ public attendScanService: AttendScanService
+ ) { }
+
+ ngOnInit() {
+ this.showAttendanceTracking();
+ this.curentDate = new Date();
+ this.direction = TranslatorService.getCurrentLanguageName();
+ this.curentDate = this.getHeaderDate(this.curentDate);
+ }
+
+ initTimer() {
+ this.runTimer = false;
+ this.hasStarted = false;
+ this.hasFinished = false;
+ this.percent = 100 - ((this.remainingTime / this.scheduledTime) * 100);
+ this.displayTime = this.getSecondsAsDigitalClock(this.remainingTime);
+ this.startTimer();
+ }
+
+ startTimer() {
+ this.runTimer = true;
+ this.hasStarted = true;
+ this.timerTick();
+ }
+
+ timerTick() {
+ setTimeout(() => {
+ if (!this.runTimer) { return; }
+ this.remainingTime--;
+ this.displayTime = this.getSecondsAsDigitalClock(this.remainingTime);
+ if (this.remainingTime > 0) {
+ const newPercent: any = ((this.remainingTime / this.scheduledTime) * 100).toFixed(2);
+ this.percent = 100 - newPercent;
+ this.timerTick();
+ } else {
+ this.hasFinished = true;
+ }
+ }, 1000);
+ }
+
+ getSecondsAsDigitalClock(inputSeconds: number) {
+ const secNum = parseInt(inputSeconds.toString(), 10); // don't forget the second param
+ const hours = Math.floor(secNum / 3600);
+ const minutes = Math.floor((secNum - (hours * 3600)) / 60);
+ const seconds = secNum - (hours * 3600) - (minutes * 60);
+ let hoursString = '';
+ let minutesString = '';
+ let secondsString = '';
+ hoursString = (hours < 10) ? '0' + hours : hours.toString();
+ minutesString = (minutes < 10) ? '0' + minutes : minutes.toString();
+ secondsString = (seconds < 10) ? '0' + seconds : seconds.toString();
+ return hoursString + ':' + minutesString + ':' + secondsString;
+ }
+
+ convertInSeconds(time: any) {
+ const hours = parseInt(time[0], 10);
+ const minutes = parseInt(time[1], 10);
+ let seconds = parseInt(time[2], 10);
+ seconds = seconds + (hours * 60 * 60) + (minutes * 60);
+ return seconds;
+ }
+
+ convertAndAssignTime(data) {
+ 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() {
+ this.cs.confirmAlertDialogAttendance(
+ () => {
+ this.attendScanService.getDeviceLocation();
+ }, this.ts.trPK('general', 'ok'),
+ () => {}, this.ts.trPK('general', 'cancel'),
+ this.ts.trPK('vacation-rule', 'confirmation'),
+ this.ts.trPK('attendance-tracking', 'confirm-alert3')
+ + '
' + '
' + this.ts.trPK('attendance-tracking', 'confirm-alert1')
+ + this.ts.trPK('attendance-tracking', 'confirm-alert2')
+ );
+}
+}
diff --git a/Mohem/src/app/eit/home/home.component.ts b/Mohem/src/app/eit/home/home.component.ts
index 686b5c0d..75909a97 100644
--- a/Mohem/src/app/eit/home/home.component.ts
+++ b/Mohem/src/app/eit/home/home.component.ts
@@ -20,7 +20,7 @@ export class HomeComponent implements OnInit {
constructor(private cs: CommonService, private ts: TranslatorService) {
this.menu = this.cs.sharedService.getSharedData('menuEntries', false);
this.selMenu = this.cs.sharedService.getSharedData(MenuResponse.SHARED_DATA, false);
- let title: string = this.ts.trPK('eit', 'my-requests');
+ const title: string = this.ts.trPK('eit', 'my-requests');
this.headerTitle = this.selMenu.List_Menu.MENU_NAME ? this.selMenu.List_Menu.MENU_NAME : title;
}
@@ -29,12 +29,12 @@ export class HomeComponent implements OnInit {
openPage(page, index) {
// Reset the content nav to have just this page
// we wouldn't want the back button to show in this scenario
- if (page.children.length == 0) {
+ if (page.children.length === 0) {
this.goToRequest(page);
} else {
- if (this.selectedMenu == 0) {
+ if (this.selectedMenu === 0) {
this.selectedMenu = -1;
- } else if (this.selectedMenu != -1) {
+ } else if (this.selectedMenu !== -1) {
this.selectedMenu = -1;
} else {
this.selectedMenu = index;
@@ -47,12 +47,12 @@ export class HomeComponent implements OnInit {
selMenu = this.cs.sharedService.getSharedData(MenuResponse.SHARED_DATA, false);
selMenu.GetMenuEntriesList = menuEntry;
this.cs.sharedService.setSharedData(selMenu, MenuResponse.SHARED_DATA);
- if (menuEntry.REQUEST_TYPE == 'ABSENCE') {
+ if (menuEntry.REQUEST_TYPE === 'ABSENCE') {
this.cs.openAbsencePage();
- } else if (menuEntry.REQUEST_TYPE == 'EIT') {
+ } else if (menuEntry.REQUEST_TYPE === 'EIT') {
this.cs.openEitListPage();
}
- if (menuEntry.REQUEST_TYPE =='PAYSLIP'){
+ if (menuEntry.REQUEST_TYPE === 'PAYSLIP'){
this.cs.openPayslipPage();
}
}
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 18f7e8c0..d5c1499d 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';
@@ -42,19 +43,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,28 +78,32 @@ 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{ConfirmLoginComponent} from '../authentication/confirm-login/confirm-login.component'
-import{WelcomeComponent} from './ui/welcome-login/welcome.component'
-import {DashboredService} from './services/dashbored/dashbored.service'
-// import {TurncatePipe} from '../pipes/turncate/turncate.pipe'
+import { AccordinTabCustomComponent} from './ui/accordin-custom/accordin-tab-custom/accordin-tab-custom.component'
+import {DashboredService} from './services/dashbored/dashbored.service';
+import {NgxGaugeModule} from 'ngx-gauge';
+import { StatsButtonComponent } from './ui/stats-button/stats-button.component';
+import { ServicesButtonComponent } from './ui/services-button/services-button.component';
+import {ConfirmLoginComponent} from '../authentication/confirm-login/confirm-login.component'
+import {WelcomeComponent} from './ui/welcome-login/welcome.component'
+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,
@@ -113,9 +113,13 @@ import {DashboredService} from './services/dashbored/dashbored.service'
HttpClientModule,
NgxChartsModule,
ListboxModule,
- PdfViewerModule
+ PdfViewerModule,
+ NgCircleProgressModule.forRoot(),
+ ChartModule,
+ NgxGaugeModule
],
declarations: [
+ FabButtonComponent,
WelcomeComponent,
NumberRangeComponent,
SSpacerComponent,
@@ -172,10 +176,12 @@ import {DashboredService} from './services/dashbored/dashbored.service'
FileUploderProfileComponent,
AccordinTabCustomComponent,
AccordinCustomComponent,
+ StatsButtonComponent,
+ ServicesButtonComponent,
ConfirmLoginComponent
-
],
exports: [
+ FabButtonComponent,
WelcomeComponent,
NumberRangeComponent,
SSpacerComponent,
@@ -222,17 +228,21 @@ import {DashboredService} from './services/dashbored/dashbored.service'
EmptyDataComponent,
DetailButtonComponent,
HeaderButtonComponent,
- //PaymentComponent,
ReplacementListComponent,
FileSelectDirective,
WorkListAttachViewComponent,
FileUploderProfileComponent,
AccordinTabCustomComponent,
AccordinCustomComponent,
- ConfirmLoginComponent
-
+ NgxGaugeModule,
+ StatsButtonComponent,
+ ServicesButtonComponent,
+ ConfirmLoginComponent,
+ NgCircleProgressModule,
+ ChartModule
],
providers: [
+ AttendScanService,
DashboredService,
ConnectorService,
TranslatorService,
@@ -247,14 +257,10 @@ import {DashboredService} from './services/dashbored/dashbored.service'
NativeStorage,
ProgressLoadingService,
PushService,
- //UserLocalNotificationService,
- //LocalNotifications,
Badge,
LifeCycleService,
HmgBrowserService,
GuidService,
- // BackgroundGeolocation,
- //GeofencingService,
Keyboard,
KeyboardService,
Diagnostic,
@@ -263,16 +269,16 @@ import {DashboredService} from './services/dashbored/dashbored.service'
HMGPreloadingStrategy,
HMGPreloadingStrategyLoading,
Diagnostic,
- // CallNumber,
AppRate,
RatingService,
InAppBrowser,
RateService,
Camera,
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/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 165833a2..dc65e9a3 100644
--- a/Mohem/src/app/hmg-common/services/common/common.service.ts
+++ b/Mohem/src/app/hmg-common/services/common/common.service.ts
@@ -112,6 +112,64 @@ export class CommonService {
this.nav.pop();
}
+ public getMonthName(value: number): string {
+ switch (value) {
+ case 1:
+ return "January";
+ case 2:
+ return "February";
+ case 3:
+ return "March";
+ case 4:
+ return "April";
+ case 5:
+ return "May";
+ case 6:
+ return "June";
+ case 7:
+ return "July";
+ case 8:
+ return "August";
+ case 9:
+ return "September";
+ case 10:
+ return "October";
+ case 11:
+ return "November";
+ case 12:
+ return "December";
+ }
+}
+
+public getMonthNameAr(value: number): string {
+ switch (value) {
+ case 1:
+ return "يناير";
+ case 2:
+ return " فبراير";
+ case 3:
+ return "مارس";
+ case 4:
+ return "أبريل";
+ case 5:
+ return "مايو";
+ case 6:
+ return "يونيو";
+ case 7:
+ return "يوليو";
+ case 8:
+ return "أغسطس";
+ case 9:
+ return "سبتمبر";
+ case 10:
+ return " اكتوبر";
+ case 11:
+ return " نوفمبر";
+ case 12:
+ return "ديسمبر";
+ }
+}
+
public round(value: number, decimal: number): string {
const valueStr = value.toString();
const dotIndex = valueStr.indexOf(".");
@@ -453,6 +511,51 @@ export class CommonService {
}
+ async confirmAlertDialogAttendance(
+ onAccept: any,
+ acceptLabel: string,
+ onCancel: any,
+ cancelLabel: string,
+ title: string,
+ message: string
+ ) {
+ this.clearAllAlerts();
+ const alert = await this.alertControllerIonic.create({
+ header: this.ts.trPK("general", "confirm"),
+ message: message,
+ buttons: [
+ {
+ text: cancelLabel,
+ role: "cancel",
+ cssClass: "checkOutCancelBtn",
+ handler: () => {
+ if (onCancel) {
+ onCancel();
+ }
+ this.alertControllerIonic.dismiss();
+ }
+ },
+ {
+ text: acceptLabel,
+ role: "Confirm",
+
+ cssClass: "checkOutOkBtn",
+
+ handler: () => {
+
+ if (onAccept) {
+ onAccept();
+ }
+ this.alertControllerIonic.dismiss();
+ }
+ }
+ ]
+ });
+ // this.alerts.push(alert);
+ await alert.present();
+ }
+
+
public clearAllAlerts() {
// custom solutions because of async issue
const alerts = document.getElementsByTagName("ion-alert");
@@ -969,6 +1072,10 @@ export class CommonService {
/*
open calls
*/
+ public openAttenTrackingpage(){
+ this.nav.navigateForward(["/attendance-tracking/home"]);
+
+ }
public openEitListPage() {
this.nav.navigateForward(["/eit/eit-list"]);
}
@@ -990,6 +1097,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 +1190,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/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/OpenMissingSwipesList.ts b/Mohem/src/app/hmg-common/services/dashbored/OpenMissingSwipesList.ts
index 8b433128..33afe932 100644
--- a/Mohem/src/app/hmg-common/services/dashbored/OpenMissingSwipesList.ts
+++ b/Mohem/src/app/hmg-common/services/dashbored/OpenMissingSwipesList.ts
@@ -1,9 +1,5 @@
-
-
-export class OpenMissingSwipesList{
- public OPEN_MISSING_SWIPES :number;
- public RETURN_STATUS : string;
- public RETURN_MSG : string;
-
+export class OpenMissingSwipesList {
+ public P_OPEN_MISSING_SWIPES: number;
+ public P_RETURN_STATUS: string;
+ public P_RETURN_MSG: string;
}
-
\ No newline at end of file
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/services/dashbored/dashbored.service.ts b/Mohem/src/app/hmg-common/services/dashbored/dashbored.service.ts
index deeffdad..21fc550f 100644
--- a/Mohem/src/app/hmg-common/services/dashbored/dashbored.service.ts
+++ b/Mohem/src/app/hmg-common/services/dashbored/dashbored.service.ts
@@ -1,8 +1,8 @@
import { Injectable } from '@angular/core';
-import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service";
-import { ConnectorService } from "src/app/hmg-common/services/connector/connector.service";
+import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service';
+import { ConnectorService } from 'src/app/hmg-common/services/connector/connector.service';
import { Observable } from 'rxjs';
-import { Request } from "src/app/hmg-common/services/models/request";
+import { Request } from 'src/app/hmg-common/services/models/request';
import { OrganizationSalariesResponse } from './organization-salaries.response';
import { OpenMissingSwipesResponse } from './open-missing-swipes.response';
import { PerformanceAppraisalResponse } from './performance-appraisal.response';
@@ -19,10 +19,10 @@ import {GetOpenNotificationsResponse} from './models/GetOpenNotificationsRespons
providedIn: 'root'
})
export class DashboredService {
- public static organizationSalariesUrl="Services/ERP.svc/REST/GET_ORGANIZATIONS_SALARIES"
- public static openmissingswipesUrl="Services/ERP.svc/REST/GET_OPEN_MISSING_SWIPES"
- public static performanceappraisalUrl="Services/ERP.svc/REST/GET_Performance_Appraisal"
- public static attendancetrackingUrl="Services/ERP.svc/REST/GET_Attendance_Tracking"
+ public static organizationSalariesUrl = 'Services/ERP.svc/REST/GET_ORGANIZATIONS_SALARIES';
+ public static openMissingSwipesUrl = 'Services/ERP.svc/REST/GET_OPEN_MISSING_SWIPES';
+ public static performanceappraisalUrl = 'Services/ERP.svc/REST/GET_Performance_Appraisal';
+ public static attendancetrackingUrl = 'Services/ERP.svc/REST/GET_Attendance_Tracking';
public static getOpenPeriodDates = 'Services/ERP.svc/REST/GET_OPEN_PERIOD_DATES';
public static getOpenNotifications = 'Services/ERP.svc/REST/GET_OPEN_NOTIFICATIONS';
@@ -34,7 +34,7 @@ export class DashboredService {
public authService: AuthenticationService,
) { }
- public getOrganizationSalaries(onError ?:any ,oerrorLable ?:any):Observable{
+ public getOrganizationSalaries(onError ?: any ,oerrorLable ?: any): Observable{
const request = new Request();
this.authService.authenticateRequest(request);
return this.con.post(
@@ -44,11 +44,11 @@ export class DashboredService {
oerrorLable
);}
- public getOpenMissingSwipes(onError ?:any ,oerrorLable ?:any):Observable{
+ public getOpenMissingSwipes(onError ?: any, oerrorLable ?: any): Observable {
const request = new Request();
this.authService.authenticateRequest(request);
return this.con.post(
- DashboredService.openmissingswipesUrl,
+ DashboredService.openMissingSwipesUrl,
request,
onError,
oerrorLable
@@ -56,7 +56,7 @@ export class DashboredService {
}
- public getPerformanceAppraisal(onError ?:any ,oerrorLable ?:any):Observable{
+ public getPerformanceAppraisal(onError ?: any ,oerrorLable ?: any): Observable{
const request = new Request();
this.authService.authenticateRequest(request);
return this.con.post(
@@ -66,7 +66,7 @@ export class DashboredService {
oerrorLable
);
}
-public getAttendanceTracking(onError ?:any ,oerrorLable ?:any):Observable{
+public getAttendanceTracking(onError ?: any ,oerrorLable ?: any): Observable{
const request = new Request();
this.authService.authenticateRequest(request);
return this.con.post(
@@ -86,11 +86,11 @@ public getAttendanceTracking(onError ?:any ,oerrorLable ?:any):Observable {
+ public getSubordinatesLeaves( req: GetSubordinatesLeavesRequest,onError?: any, errorLabel?: string): Observable {
this.authService.authenticateRequest(req);
return this.con.post(DashboredService.getSubordinatesLeaves, req, onError, errorLabel);
}
- public getSubordinatesAttStatus( req:GetSubordinatesAttdStatusRequest, onError?: any, errorLabel?: string): Observable {
+ public getSubordinatesAttStatus( req: GetSubordinatesAttdStatusRequest, onError?: any, errorLabel?: string): Observable {
this.authService.authenticateRequest(req);
return this.con.post(DashboredService.getSubordinatesAttStatus, req, onError, errorLabel);
}
diff --git a/Mohem/src/app/hmg-common/services/dashbored/models/GetOpenNotificationsList.ts b/Mohem/src/app/hmg-common/services/dashbored/models/GetOpenNotificationsList.ts
index baef1032..e2730ac6 100644
--- a/Mohem/src/app/hmg-common/services/dashbored/models/GetOpenNotificationsList.ts
+++ b/Mohem/src/app/hmg-common/services/dashbored/models/GetOpenNotificationsList.ts
@@ -1,11 +1,6 @@
-export class GetOpenNotificationsList
-
-{
-public ITEM_TYPE: number;
-
-public ITEM_TYPE_DISPLAY_NAME:number;
-
-public OPEN_NTF_NUMBER:number;
-
-
-}
\ No newline at end of file
+export class GetOpenNotificationsList {
+ public ITEM_TYPE: number;
+ public ITEM_TYPE_DISPLAY_NAME: number;
+ public OPEN_NTF_NUMBER: number;
+ public P_OPEN_NTF_NUMBER: number;
+}
diff --git a/Mohem/src/app/hmg-common/services/dashbored/open-missing-swipes.response.ts b/Mohem/src/app/hmg-common/services/dashbored/open-missing-swipes.response.ts
index 63945935..8fd977a1 100644
--- a/Mohem/src/app/hmg-common/services/dashbored/open-missing-swipes.response.ts
+++ b/Mohem/src/app/hmg-common/services/dashbored/open-missing-swipes.response.ts
@@ -2,7 +2,7 @@
import { Response } from "src/app/hmg-common/services/models/response";
import { OpenMissingSwipesList } from './OpenMissingSwipesList';
-
- export class OpenMissingSwipesResponse extends Response{
-public GetGetOpenMissingSwipesList : OpenMissingSwipesList[];
- }
\ No newline at end of file
+
+export class OpenMissingSwipesResponse extends Response{
+ public GetGetOpenMissingSwipesList: OpenMissingSwipesList[];
+}
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/hmg-common/ui/fab-button/fab-button.component.html b/Mohem/src/app/hmg-common/ui/fab-button/fab-button.component.html
new file mode 100644
index 00000000..8e405be4
--- /dev/null
+++ b/Mohem/src/app/hmg-common/ui/fab-button/fab-button.component.html
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+ {{ 'attendance-tracking,title' | translate }}
+
+
+
+
+
\ No newline at end of file
diff --git a/Mohem/src/app/hmg-common/ui/fab-button/fab-button.component.scss b/Mohem/src/app/hmg-common/ui/fab-button/fab-button.component.scss
new file mode 100644
index 00000000..e6cfd86d
--- /dev/null
+++ b/Mohem/src/app/hmg-common/ui/fab-button/fab-button.component.scss
@@ -0,0 +1,219 @@
+
+
+////////////////////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:112px;
+ width: 112px;
+}
+.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: 112px;
+ height: 112px;
+ position: absolute;
+ top: 118%;
+ left: -10%;
+ 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/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 @@
+
\ 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 @@
+
\ 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..d2cfa8ae
--- /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: 30px;
+ 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..3df41b48 100644
--- a/Mohem/src/app/home/home.module.ts
+++ b/Mohem/src/app/home/home.module.ts
@@ -25,7 +25,7 @@ const routes: 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 fe151468..ab687c35 100644
--- a/Mohem/src/app/home/home.page.html
+++ b/Mohem/src/app/home/home.page.html
@@ -1,117 +1,171 @@
-
-
-
+
+
+ Monthly Attendance
+ View your Monthly Time Sheet
+
+ View Detail
+
+
+
+
+
+
+
+ {{menuItem.PROMPT}}
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
+ -->
+
+
-
+
+
+
+ Time Left Today
+
+
+
+
diff --git a/Mohem/src/app/home/home.page.scss b/Mohem/src/app/home/home.page.scss
index 280c4b4a..8143cf6e 100644
--- a/Mohem/src/app/home/home.page.scss
+++ b/Mohem/src/app/home/home.page.scss
@@ -1,153 +1,145 @@
-.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;
- 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;
+.header-toolbar-new{
+ --background: #22c6b3;
+}
+.profile-image-container{
position: relative;
- height: 210px;
- margin-bottom:60px;
- border-radius: 0px 0px 70px 70px;
- }
-
- .dash-header{
- text-align: center;
- margin: 16px 0 0 0;
-
- }
-
- .TxtPlace {
- margin: 0;
- padding: 50px 0 10px 0;
+ 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;
+ top: 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;
+ padding-bottom: 130px;
+}
+.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;
+}
+.fixed-shift-timer{
+ position: fixed;
+ bottom: 20px;
+ right: 20px;
+ z-index: 2;
+ span.subTitle {
+ position: absolute;
+ left: 50%;
+ top: 62%;
+ 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 dee4f44b..c29c014b 100644
--- a/Mohem/src/app/home/home.page.ts
+++ b/Mohem/src/app/home/home.page.ts
@@ -1,28 +1,24 @@
-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} 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';
import { DashboredService } from '../hmg-common/services/dashbored/dashbored.service';
@@ -33,19 +29,19 @@ import { AttendanceTrackingResponse } from '../hmg-common/services/dashbored/att
import { OpenPeriodDatesResponse } from '../hmg-common/services/dashbored/models/openPeriodDatesResponse';
import {GetSubordinatesAttdStatusRequest} from '../hmg-common/services/dashbored/models/GetSubordinatesAttdStatusRequest';
import {GetSubordinatesLeavesRequest} from '../hmg-common/services/dashbored/models/GetSubordinatesLeavesRequest'
-import {GetOpenNotificationsResponse}from '../hmg-common/services/dashbored/models/GetOpenNotificationsResponse'
-import {GetSubordinatesAttdStatusResponse}from '../hmg-common/services/dashbored/models/GetSubordinatesAttdStatusResponse'
-import {GetSubordinatesLeavesResponse}from '../hmg-common/services/dashbored/models/GetSubordinatesLeavesResponse'
-
+import {GetOpenNotificationsResponse} from '../hmg-common/services/dashbored/models/GetOpenNotificationsResponse'
+import {GetSubordinatesAttdStatusResponse} from '../hmg-common/services/dashbored/models/GetSubordinatesAttdStatusResponse'
+import {GetSubordinatesLeavesResponse} from '../hmg-common/services/dashbored/models/GetSubordinatesLeavesResponse'
+import { AccrualService } from '../accrual-balances/services/accrual.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";
+ userImage: any = '../assets/imgs/profile.png';
menuList: any = [];
zbarOptions: any;
scannedResult: any;
@@ -53,11 +49,75 @@ export class HomePage implements OnInit {
lat: any;
longt: any;
deviceID: string;
- public maxFileSize =10 * 1024 * 1024;
- public fileUploder :FileUploaderComponent;
- // public fileUploderProfile:FileUploderProfileComponent
+ public maxFileSize = 10 * 1024 * 1024;
+ public fileUploder: FileUploaderComponent;
location: boolean;
- camera: boolean
+ camera: boolean;
+ public statsButtons = [
+ {
+ title: 'Work List',
+ statsValue: 0,
+ 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: 0,
+ icon: 'assets/icon/new-design/missing_swipe.png'
+ },
+ {
+ title: 'Leave Balance',
+ statsValue: 0,
+ icon: 'assets/icon/new-design/leave_balance.png'
+ },
+ {
+ title: 'Ticket Balance',
+ statsValue: 0,
+ 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 runTimer = false;
+ public hasStarted = false;
+ public hasFinished = false;
+ public remainingTime: any;
+ public scheduledTime: any;
+ public isCheckedIn = undefined;
+ public displayTime: any;
+ public menuEntries: any;
+ public percent: any;
+
constructor(
public ts: TranslatorService,
public menu: MenuController,
@@ -68,68 +128,98 @@ export class HomePage implements OnInit {
private device: Device,
private zbar: ZBar,
private geolocation: Geolocation,
- private attendance_service: AttendanceService,
+ private attendanceService: AttendanceService,
private eitService: EitService,
private barcodeScanner: BarcodeScanner,
public actionSheetCtrl: ActionSheetController,
private cameraController: Camera,
public sharedData: SharedDataService,
private sanitizer: DomSanitizer,
- //private transfer: Transfer,
- private file: File,
- //private filePath: FilePath
+ private file: File,
private permissions: DevicePermissionsService,
- public DS :DashboredService
-
+ public DS: DashboredService,
+ public accrualService: AccrualService
) {
- 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.userImage = this.sanitizer.bypassSecurityTrustUrl('data:Image/*;base64,' + displayImg);
+ console.log('html saved img: ' + this.userImage);
});
}
-
ngOnInit() {
this.getUserDetails();
- this.getMenu();
- this.setServicesPrivilage();
- this.getCount();
+ // this.getCount();
+ // this.events.subscribe('getNotCount', badge => {
+ // this.notBadge = badge;
+ // });
+ }
-
- this.events.subscribe("getNotCount", badge => {
- this.notBadge = badge;
- });
+ initTimer() {
+ this.runTimer = false;
+ this.hasStarted = false;
+ this.hasFinished = false;
+ this.percent = 100 - ((this.remainingTime / this.scheduledTime) * 100);
+ this.displayTime = this.getSecondsAsDigitalClock(this.remainingTime);
+ this.startTimer();
+ }
+
+ startTimer() {
+ this.runTimer = true;
+ this.hasStarted = true;
+ this.timerTick();
+ }
+
+ timerTick() {
+ setTimeout(() => {
+ if (!this.runTimer) { return; }
+ this.remainingTime--;
+ this.displayTime = this.getSecondsAsDigitalClock(this.remainingTime);
+ if (this.remainingTime > 0) {
+ const newPercent: any = ((this.remainingTime / this.scheduledTime) * 100).toFixed(2);
+ this.percent = 100 - newPercent;
+ this.timerTick();
+ } else {
+ this.hasFinished = true;
+ }
+ }, 1000);
+ }
+
+ getSecondsAsDigitalClock(inputSeconds: number) {
+ const secNum = parseInt(inputSeconds.toString(), 10); // don't forget the second param
+ const hours = Math.floor(secNum / 3600);
+ const minutes = Math.floor((secNum - (hours * 3600)) / 60);
+ const seconds = secNum - (hours * 3600) - (minutes * 60);
+ let hoursString = '';
+ let minutesString = '';
+ let secondsString = '';
+ hoursString = (hours < 10) ? '0' + hours : hours.toString();
+ minutesString = (minutes < 10) ? '0' + minutes : minutes.toString();
+ secondsString = (seconds < 10) ? '0' + seconds : seconds.toString();
+ return hoursString + ':' + minutesString + ':' + secondsString;
}
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) {
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);
+ console.log('Error getting location', error);
});
-
} else {
return false;
}
@@ -137,15 +227,16 @@ 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)"
+ for (const servicePrivilage of AuthenticationService.servicePrivilage) {
+ if (servicePrivilage.Previlege === false) {
+ document.getElementById(servicePrivilage.ServiceName).setAttribute('disabled', 'disabled');
+ document.getElementById(servicePrivilage.ServiceName).style.filter = 'grayscale(1)';
}
+ }
}
- getCount() {
+
+ // getCount() {
// const req: any = {};
// this.menuService.getNotificationCount(req).subscribe((result: any) => {
// if (this.common.validResponse(result)) {
@@ -157,323 +248,354 @@ export class HomePage implements OnInit {
// this.events.publish("getNotCount", this.notBadge);
// }
// });
- }
- // ionViewDidLoad() {
- // this.geolocation
- // .getCurrentPosition()
- // .then(resp => {
- // // resp.coords.latitude
- // // resp.coords.longitude
- // console.log(resp.coords.latitude);
- // console.log(resp.coords.longitude);
- // })
- // .catch(error => {
- // console.log("Error getting location", error);
- // });
- // this.geolocation.getCurrentPosition().then((resp) => {
- // // resp.coords.latitude
- // // resp.coords.longitude
- // console.log(resp.coords.latitude);
- // console.log(resp.coords.longitude);
- // }).catch((error) => {
- // console.log('Error getting location', error);
- // });
// }
ionViewDidLoad() {
- this.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() {
this.menu.toggle();
}
+
private getUserDetails() {
+
this.authService
.loadAuthenticatedUser()
.subscribe((user: AuthenticatedUser) => {
if (user) {
- this.events.publish("setMenu");
+ this.events.publish('setMenu');
this.userData = user;
- //set User Info
this.sharedData.setSharedData(this.userData, AuthenticatedUser.SHARED_DATA);
- this.user_image = user.EMPLOYEE_IMAGE
- ? "data:image/png;base64," + user.EMPLOYEE_IMAGE
- : this.user_image;
- console.log(user);
+ this.userImage = user.EMPLOYEE_IMAGE ? 'data:image/png;base64,' + user.EMPLOYEE_IMAGE : this.userImage;
+ this.callDashboardServices();
} else {
console.log(user);
}
});
- }
- public Vacation_Rule() {
- this.common.navigateForward("/vacation-rule/home");
- }
- private getMenu() {
- this.menuService.getMenu().subscribe((result: MenuResponse) => {
- this.handleMenuResult(result);
- });
- }
- private handleMenuResult(result) {
- if (this.common.validResponse(result)) {
- if (this.common.hasData(result.List_Menu)) {
- console.log("list menu");
- this.menuList = result.List_Menu;
+ }
+
+ callDashboardServices() {
+ this.getMenu();
+ this.setServicesPrivilage();
+ this.openNotificationsDashbored();
+ this.showOpenMissingSwipes();
+ this.showAttendanceTracking();
+ this.getAccrualBalance();
+ }
+
+ public Vacation_Rule() {
+ this.common.navigateForward('/vacation-rule/home');
+ }
+
+ private getMenu() {
+ this.menuService.getMenu().subscribe((result: MenuResponse) => {
+ this.handleMenuResult(result);
+ });
+ }
+
+ private handleMenuResult(result) {
+ if (this.common.validResponse(result)) {
+ if (this.common.hasData(result.List_Menu)) {
+ console.log('list menu');
+ this.menuList = result.List_Menu;
+ this.getMenuDetails();
+ }
}
}
- }
- private accrualBalance() {
- this.common.openAccuralPage();
- }
- private changeImage() {
- this.common.openChangeImagePage();
- }
+ private accrualBalance() {
+ this.common.openAccuralPage();
+ }
- public getMeunDetails(index) {
- let item = this.menuList[index];
- let selMenu: MenuResponse = new MenuResponse();
- selMenu.List_Menu = item;
- selMenu.userid = this.userData.EMPLOYEE_NUMBER;
- 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 {
+ private changeImage() {
+ this.common.openChangeImagePage();
+ }
+
+ 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);
+ this.common.sharedService.setSharedData(selMenu, MenuResponse.SHARED_DATA);
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 = {};
- let selEmpNo: string = null;
- let nationality: string = null;
- request.P_SELECTED_RESP_ID = -999;
- if (item.MENU_TYPE == "S") {
- request.P_SELECTED_RESP_ID = item.RESP_ID;
- } else {
- selEmpNo = this.common.sharedService.getSharedData(
- LoginRequest.SHARED_DATA,
+ getMenuEntries(item) {
+ const request: any = {};
+ let selEmpNo: string = null;
+ let nationality: string = null;
+ request.P_SELECTED_RESP_ID = -999;
+ if (item.MENU_TYPE === 'S') {
+ request.P_SELECTED_RESP_ID = item.RESP_ID;
+ } else {
+ selEmpNo = this.common.sharedService.getSharedData(
+ LoginRequest.SHARED_DATA,
+ false
+ );
+ }
+ nationality = this.common.sharedService.getSharedData(
+ LoginRequest.NATIONALITY_CODE,
false
);
- }
- nationality = this.common.sharedService.getSharedData(
- LoginRequest.NATIONALITY_CODE,
- false
- );
- 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");
- this.common.sharedService.setSharedData(
- selEmpNo,
- MenuResponse.SHARED_SEL_EMP
- );
- this.common.sharedService.setSharedData(
- request.P_SELECTED_RESP_ID,
- MenuResponse.SHARED_SEL_RESP_ID
- );
-
- this.eitService
- .getMenuEntries(request)
- .subscribe((result: MenuResponse) => {
- this.handleMenuEntiresResult(result);
- });
- }
+ 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');
+ this.common.sharedService.setSharedData(
+ selEmpNo,
+ MenuResponse.SHARED_SEL_EMP
+ );
+ this.common.sharedService.setSharedData(
+ request.P_SELECTED_RESP_ID,
+ MenuResponse.SHARED_SEL_RESP_ID
+ );
- sortMenuEntires(list) {
- let tree = this.common.list_to_tree(list);
- this.common.sharedService.setSharedData(tree, "menuEntries");
- // this.common.navigateForward("/eit/homepage");
- this.common.openEITPage();
- }
+ this.eitService
+ .getMenuEntries(request)
+ .subscribe((result: MenuResponse) => {
+ this.handleMenuEntiresResult(result);
+ });
+ }
- private handleMenuEntiresResult(result) {
- if (this.common.validResponse(result)) {
- if (this.common.hasData(result.GetMenuEntriesList)) {
- this.sortMenuEntires(result.GetMenuEntriesList);
- }
+ sortMenuEntires(list) {
+ 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();
}
- }
- private Change_password() {
- this.common.openChangePassword();
- }
- private openPayslip() {
- this.common.openPayslipPage();
- }
- private attendance() {
- // this.zbarOptions = {
- // flash: "off",
- // drawSight: false
- // };
- //console.log("your currnt location is");
- //console.log("Loc");
- this.permissions.requestCameraAutherization().then(granted => {
- this.camera = granted as boolean;
- if (this.camera) {
- this.scanCode();
+ private handleMenuEntiresResult(result) {
+ if (this.common.validResponse(result)) {
+ if (this.common.hasData(result.GetMenuEntriesList)) {
+ this.sortMenuEntires(result.GetMenuEntriesList);
}
}
- );
- }
+ }
- scanCode() {
- // this.zbar
- // .scan(this.zbarOptions)
- // .then(result => {
- // console.log(result); // Scanned code
- // let strResult = JSON.parse(result);
- // console.log(strResult.QRValue);
- // this.scannedResult = result;
- // this.deviceID = this.device.uuid;
- // this.swipeAttendance();
- // })
- // .catch(error => {
- // alert(error); // Error message
- // });
-
- 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);
- });
- }
+ parentFn($event: string) {
+ console.log($event); // this will output 'hello from child'
+ }
- 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"));
- }
- });
- }
- openPersonalInfo() {
- this.common.openProfile();
- }
+ private Change_password() {
+ this.common.openChangePassword();
+ }
+ private openPayslip() {
+ this.common.openPayslipPage();
+ }
-/*************************************Dashboards Services**********************************************************8 */
+ private attendance() {
+ this.permissions.requestCameraAutherization().then(granted => {
+ this.camera = granted as boolean;
+ if (this.camera) {
+ this.scanCode();
+ }
+ }
+ );
+ }
-showOrganizationSalaries(){
- this.DS.getOrganizationSalaries() .subscribe((result: OrganizationSalariesResponse ) => {
+ scanCode() {
+ this.barcodeScanner.scan().then(barcodeData => {
+ this.scannedResult = barcodeData;
+ this.deviceID = this.device.uuid;
+ this.swipeAttendance();
+ }).catch(err => {
+ console.log('Error', err);
+ });
+ }
- });;
-}
+ swipeAttendance() {
+ 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(JSON.stringify(request));
+ this.attendanceService
+ .attendanceSwipeScanner(request, () => {
+ console.log('Error inside in swipe attendance');
+ })
+ .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'));
+ }
+ });
+ }
-showOpenMissingSwipes(){
- this.DS.getOpenMissingSwipes() .subscribe((result: OpenMissingSwipesResponse) => {
+ openPersonalInfo() {
+ this.common.openProfile();
+ }
- });;
-}
-showPerformanceAppraisal(){
- this.DS.getPerformanceAppraisal() .subscribe((result: PerformanceAppraisalResponse) => {
+/*************************************Dashboards Services**********************************************************8 */
- });
+ showOrganizationSalaries() {
+ this.DS.getOrganizationSalaries() .subscribe((result: OrganizationSalariesResponse ) => {
+ });
+ }
+ showOpenMissingSwipes() {
+ this.DS.getOpenMissingSwipes() .subscribe((result: OpenMissingSwipesResponse) => {
+ if (this.common.validResponse(result)) {
+ const key = 'GetOpenMissingSwipesList';
+ this.statsButtons[2].statsValue = result[key].P_OPEN_MISSING_SWIPES;
+ }
+ });
+ }
-}
+ showPerformanceAppraisal() {
+ this.DS.getPerformanceAppraisal() .subscribe((result: PerformanceAppraisalResponse) => {
+ });
+ }
-showAttendanceTracking(){
- this.DS.getAttendanceTracking() .subscribe((result: AttendanceTrackingResponse) => {
+ convertInSeconds(time: any) {
+ const hours = parseInt(time[0], 10);
+ const minutes = parseInt(time[1], 10);
+ let seconds = parseInt(time[2], 10);
+ seconds = seconds + (hours * 60 * 60) + (minutes * 60);
+ return seconds;
+ }
- });;
-}
+ convertAndAssignTime(data) {
+ 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);
+ }
- openPeriodDateDashbored(){
- this.DS.getOpenPeriodDates( ()=> {console.log("Error ");} ).subscribe((result:OpenPeriodDatesResponse)=>{
+ showAttendanceTracking() {
+ this.DS.getAttendanceTracking() .subscribe((result: AttendanceTrackingResponse) => {
if (this.common.validResponse(result)) {
- console.log("response");
+ const key = 'GetAttendanceTrackingList';
+ this.convertAndAssignTime(result[key]);
}
-
});
-
}
- openNotificationsDashbored(){
- this.DS.getOpenNotifications( ()=> {console.log("Error ");} ).subscribe((result:GetOpenNotificationsResponse)=>{
+ openPeriodDateDashbored() {
+ this.DS.getOpenPeriodDates( () => {console.log('Error '); } ).subscribe((result: OpenPeriodDatesResponse) => {
if (this.common.validResponse(result)) {
- console.log("response");
- console.log(result);
+ console.log('response');
}
-
});
+ }
+ openNotificationsDashbored() { // work list
+ this.DS.getOpenNotifications( () => { console.log('Error '); }).subscribe((result: GetOpenNotificationsResponse) => {
+ if (this.common.validResponse(result)) {
+ const key = 'P_OPEN_NTF_NUMBER';
+ this.statsButtons[0].statsValue = result[key];
+ }
+ });
}
- getSubordinatesLeaves(){
- let request:GetSubordinatesLeavesRequest=new GetSubordinatesLeavesRequest();
- request.P_DATE_FROM="/Date(1578603600000+0300)/"; //test
- request.P_DATE_TO="/Date(1576011600000+0300)/"; //test
-
- this.DS.getSubordinatesLeaves( request,()=> {console.log("Error ");} ).subscribe((result:GetSubordinatesLeavesResponse)=>{
+ getSubordinatesLeaves() {
+ const request: GetSubordinatesLeavesRequest = new GetSubordinatesLeavesRequest();
+ request.P_DATE_FROM = '/Date(1578603600000+0300)/'; // test
+ request.P_DATE_TO = '/Date(1576011600000+0300)/'; // test
+ this.DS.getSubordinatesLeaves( request, () => {console.log('Error '); } ).subscribe((result: GetSubordinatesLeavesResponse) => {
if (this.common.validResponse(result)) {
- console.log("response");
+ console.log('response');
console.log(result);
}
-
});
}
- getSubordinatesAttStatus(){
- let request: GetSubordinatesAttdStatusRequest = new GetSubordinatesAttdStatusRequest();
- request.P_SCHEDULE_DATE_FROM="/Date(1578603600000+0300)/"; //test
- request.P_SCHEDULE_DATE_TO="/Date(1576011600000+0300)/";//test
-
- this.DS.getSubordinatesAttStatus( request,()=> {console.log("Error ");} ).subscribe((result:GetSubordinatesAttdStatusResponse)=>{
+ getSubordinatesAttStatus() {
+ const request: GetSubordinatesAttdStatusRequest = new GetSubordinatesAttdStatusRequest();
+ request.P_SCHEDULE_DATE_FROM = '/Date(1578603600000+0300)/'; // test
+ request.P_SCHEDULE_DATE_TO = '/Date(1576011600000+0300)/'; // test
+ this.DS.getSubordinatesAttStatus( request, () => {console.log('Error '); }).subscribe((result: GetSubordinatesAttdStatusResponse) => {
if (this.common.validResponse(result)) {
- console.log("response");
+ console.log('response');
console.log(result);
}
-
});
+ }
+
+ openPage(subMenu) {
+ let selMenu: MenuResponse = new MenuResponse();
+ selMenu = this.common.sharedService.getSharedData(MenuResponse.SHARED_DATA, false);
+ selMenu.GetMenuEntriesList = subMenu;
+ this.common.sharedService.setSharedData(selMenu, MenuResponse.SHARED_DATA);
+ if (subMenu.REQUEST_TYPE === 'ABSENCE') {
+ this.common.openAbsencePage();
+ } else if (subMenu.REQUEST_TYPE === 'EIT') {
+ this.common.openEitListPage();
+ }
+ if (subMenu.REQUEST_TYPE === 'PAYSLIP') {
+ this.common.openPayslipPage();
+ }
+ }
+ getAccrualBalance() {
+ const today = new Date();
+ const day = today.getDate();
+ const month = today.getMonth() + 1;
+ const year = today.getFullYear();
+ const todayDate = month + '/' + day + '/' + year;
+ const effectiveDate = todayDate;
+ const request = {
+ P_SELECTED_EMPLOYEE_NUMBER: this.userData.EMPLOYEE_NUMBER,
+ P_EFFECTIVE_DATE: effectiveDate
+ };
+ this.accrualService
+ .getAccrualBalances(request)
+ .subscribe((result: any) => {
+ if (this.common.validResponse(result)) {
+ let totalTicketsLeft = 0;
+ for (const accrualBalance of result.GetAccrualBalancesList) {
+ if (accrualBalance.ACCURAL_PLAN_NAME === 'HMG Annual Vacation Accrual Plan') {
+ this.statsButtons[3].statsValue = accrualBalance.ACCRUAL_NET_ENTITLEMENT;
+ } else {
+ totalTicketsLeft = totalTicketsLeft + accrualBalance.ACCRUAL_NET_ENTITLEMENT;
+ }
+ }
+ this.statsButtons[4].statsValue = totalTicketsLeft;
+ }
+ });
}
-
+ openattentracking() {
+ this.common.openAttenTrackingpage();
+ }
+
+ openProfilePage() {
+ this.common.openEditProfile();
+ }
-
}
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}}
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+ {{ (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..7fd9b363 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";
@@ -103,15 +190,16 @@ export class HomeComponent implements OnInit {
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 +228,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 +384,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/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','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
+
+ -->
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ 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 @@
+
+
+
+
+
+
\ 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/icon/new-design/advance_payments.png b/Mohem/src/assets/icon/new-design/advance_payments.png
new file mode 100644
index 00000000..f867e013
Binary files /dev/null and b/Mohem/src/assets/icon/new-design/advance_payments.png differ
diff --git a/Mohem/src/assets/icon/new-design/attendance_button_icon.png b/Mohem/src/assets/icon/new-design/attendance_button_icon.png
new file mode 100644
index 00000000..ef62408c
Binary files /dev/null and b/Mohem/src/assets/icon/new-design/attendance_button_icon.png differ
diff --git a/Mohem/src/assets/icon/new-design/borrowing_passport.png b/Mohem/src/assets/icon/new-design/borrowing_passport.png
new file mode 100644
index 00000000..5c1824ee
Binary files /dev/null and b/Mohem/src/assets/icon/new-design/borrowing_passport.png differ
diff --git a/Mohem/src/assets/icon/new-design/employee_certificate.png b/Mohem/src/assets/icon/new-design/employee_certificate.png
new file mode 100644
index 00000000..e54f21bf
Binary files /dev/null and b/Mohem/src/assets/icon/new-design/employee_certificate.png differ
diff --git a/Mohem/src/assets/icon/new-design/id_badge_request.png b/Mohem/src/assets/icon/new-design/id_badge_request.png
new file mode 100644
index 00000000..2af2dff7
Binary files /dev/null and b/Mohem/src/assets/icon/new-design/id_badge_request.png differ
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 00000000..793d983c
Binary files /dev/null and b/Mohem/src/assets/icon/new-design/it_forms.png differ
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 00000000..c915cc7e
Binary files /dev/null and b/Mohem/src/assets/icon/new-design/leave_balance.png differ
diff --git a/Mohem/src/assets/icon/new-design/leave_management.png b/Mohem/src/assets/icon/new-design/leave_management.png
new file mode 100644
index 00000000..8b32b4ca
Binary files /dev/null and b/Mohem/src/assets/icon/new-design/leave_management.png differ
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 00000000..21196156
Binary files /dev/null and b/Mohem/src/assets/icon/new-design/medical_insurance.png differ
diff --git a/Mohem/src/assets/icon/new-design/missing_swipe.png b/Mohem/src/assets/icon/new-design/missing_swipe.png
new file mode 100644
index 00000000..8f8b3fdc
Binary files /dev/null and b/Mohem/src/assets/icon/new-design/missing_swipe.png differ
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 00000000..7aab9d1e
Binary files /dev/null and b/Mohem/src/assets/icon/new-design/pay_slip.png differ
diff --git a/Mohem/src/assets/icon/new-design/pending_request.png b/Mohem/src/assets/icon/new-design/pending_request.png
new file mode 100644
index 00000000..e427ee6a
Binary files /dev/null and b/Mohem/src/assets/icon/new-design/pending_request.png differ
diff --git a/Mohem/src/assets/icon/new-design/recreational_activities.png b/Mohem/src/assets/icon/new-design/recreational_activities.png
new file mode 100644
index 00000000..26e20956
Binary files /dev/null and b/Mohem/src/assets/icon/new-design/recreational_activities.png differ
diff --git a/Mohem/src/assets/icon/new-design/separation_resignation.png b/Mohem/src/assets/icon/new-design/separation_resignation.png
new file mode 100644
index 00000000..420ab0fe
Binary files /dev/null and b/Mohem/src/assets/icon/new-design/separation_resignation.png differ
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 00000000..f769f41c
Binary files /dev/null and b/Mohem/src/assets/icon/new-design/ticket_balance.png differ
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 00000000..f455ce2e
Binary files /dev/null and b/Mohem/src/assets/icon/new-design/ticket_request.png differ
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 00000000..3e104c70
Binary files /dev/null and b/Mohem/src/assets/icon/new-design/uniform_request.png differ
diff --git a/Mohem/src/assets/icon/new-design/vacation_rules.png b/Mohem/src/assets/icon/new-design/vacation_rules.png
new file mode 100644
index 00000000..ab4d5676
Binary files /dev/null and b/Mohem/src/assets/icon/new-design/vacation_rules.png differ
diff --git a/Mohem/src/assets/icon/new-design/work_list.png b/Mohem/src/assets/icon/new-design/work_list.png
new file mode 100644
index 00000000..6b7b2dd6
Binary files /dev/null and b/Mohem/src/assets/icon/new-design/work_list.png differ
diff --git a/Mohem/src/assets/localization/i18n.json b/Mohem/src/assets/localization/i18n.json
index bb49a900..a13c19c3 100644
--- a/Mohem/src/assets/localization/i18n.json
+++ b/Mohem/src/assets/localization/i18n.json
@@ -33,6 +33,7 @@
"en": "Register",
"ar": "التسجيل"
},
+
"sign-out": {
"en": "Are you sure you want to Sign Out",
"ar": "هل أنت متأكد من إغلاق الحساب"
@@ -925,6 +926,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":"تغيير الصوره"
@@ -945,6 +958,10 @@
"en": "Location Name",
"ar": "اسم الموقع"
},
+ "address": {
+ "en": "Address",
+ "ar": "العنوان"
+ },
"payrol": {
"en": "Payroll",
"ar": "كشف الرواتب"
@@ -2052,6 +2069,10 @@
"en": "payslip",
"ar":"كشف الراتب"
},
+ "monthly-payslip": {
+ "en": "Monthly Pay Slip",
+ "ar": "كشف الراتب الشهري"
+ },
"end-date":{
"en": "Peroid End Date",
"ar":" تاريخ بداية الفترة"
@@ -2064,6 +2085,10 @@
"en": "Peroid Name",
"ar":"اسم الفترة "
},
+ "salary":{
+ "en": "Salary",
+ "ar":"الراتب"
+ },
"deductions-Amount":{
"en": "Total Deductions Amount",
"ar":"قيمة الخصومات "
@@ -2116,6 +2141,18 @@
"en": "Deductions",
"ar":"الخصومات "
},
+ "deductions-key":{
+ "en": "DED",
+ "ar":" "
+ },
+ "earnings-key":{
+ "en": "NET",
+ "ar":" "
+ },
+ "particular":{
+ "en": "Particular",
+ "ar":"الخصائص"
+ },
"payment-information":{
"en": "Payment Information",
"ar":"معلةمات الدفع "
@@ -2134,6 +2171,50 @@
}
},
+ "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"
+ }
+},
"sms": {
"title": {
"en": "SMS",
@@ -2152,4 +2233,9 @@
"ar": "واتس اب"
}
}
+
+
+
+
+
}
\ No newline at end of file
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";
+
+
+
diff --git a/Mohem/src/theme/styles.scss b/Mohem/src/theme/styles.scss
index bf6ea0e7..f1acfe41 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{
@@ -860,6 +861,41 @@ color: var(--dark);
--background:transparent;
}
+.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;
+}
+
.buttonClassWhite {
border-radius: 10px !important;
width: 95% !important;
@@ -1009,3 +1045,42 @@ border:0px
}
+// .swiper-container-horizontal>.swiper-pagination-bullets, .swiper-pagination-custom, .swiper-pagination-fraction {
+// /* bottom: 10px; */
+// 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;
+}
+.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;
+}
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
}
}
+