Compare commits

...

51 Commits

Author SHA1 Message Date
Fatimah.Alshammari e37311f726 edit translation 6 years ago
Fatimah.Alshammari 573941941f edit monthly attendance 6 years ago
Fatimah.Alshammari 32e33e655b edit style 6 years ago
Fatimah.Alshammari 2a71811ca2 edit monthley attendance 6 years ago
enadhilal 2f55272c91 new-time-card 6 years ago
enadhilal a2acf0dcbd update monthly-attendance 6 years ago
Mohamed Mekawy 594e875156 add open time card function 6 years ago
Mohamed Mekawy a09bac4b6e Merge remote-tracking branch 'origin/timecard' into new-time-card 6 years ago
enadhilal f3fdc1454f monthly-attendance design 6 years ago
umasoodch f7002f3eae completed dashboard and attendance timer work 6 years ago
umasoodch ecbdf62c74 merged and resolved conflicts 6 years ago
umasoodch dcf6bd5d79 no message 6 years ago
ashwaq 9b58f9e9e0 add 6 years ago
ashwaq 4fe49bdb18 add attend scan service + fix design alert 6 years ago
umasoodch 884e518971 Merge branch 'master-newdesign' into home
# Conflicts:
#	Mohem/src/app/hmg-common/hmg-common.module.ts
6 years ago
umasoodch d1fbd34330 added logic for attendance 6 years ago
ashwaq 6d3dd907a6 fix attend-tracking 6 years ago
ashwaq 81504b0491 fix merge conflit 6 years ago
ashwaq 5df30f114b add attend-tracking 6 years ago
Mohamed Mekawy 5b7e435a31 fix login type issue 6 years ago
umasoodch a8f9640f68 added remaining services for dashboard 6 years ago
umasoodch ffc3bca0a6 added navigation at home page 6 years ago
umasoodch c7decd88a0 fixed home ts file 6 years ago
umasoodch 1c62b10486 merged master-newdesign with home branch and resolved all conflicts 6 years ago
umasoodch 11432b633e timer added according to the shift hours 6 years ago
umasoodch c955a19ae8 pushed timer code 6 years ago
ashwaq c069ae5282 Merge branch 'master-newdesign' of https://hmg.git.cloudforge.com/mohemmionic5 into login 6 years ago
ashwaq f23d6e7bf4 fix login localstorge 6 years ago
Fatimah.Alshammari ab30d50808 Merge branch 'master-newdesign' into side-menu 6 years ago
Fatimah.Alshammari cb1aad91f9 edit side menue new design 6 years ago
ashwaq 7779a2ed61 fix conflict 6 years ago
Mohamed Mekawy e90be39807 edit code 6 years ago
ashwaq a670c06790 fix design 6 years ago
ashwaq e6642a29e8 fix conflit 6 years ago
Mohamed Mekawy a6fe8c183a merdge dashbored services to new design 6 years ago
Mohamed Mekawy 213648a9ed Merge branch 'master-newdesign' of https://hmg.git.cloudforge.com/mohemmionic5 into Dashbored 6 years ago
ashwaq 335758fbd0 add login design 6 years ago
umasoodch fd663493e6 fixed plugin firebase issue 6 years ago
umasoodch 338205b305 Removed onw signal and added firebasex plugin 6 years ago
umasoodch 4c5153c69d Merge branch 'master' into firebasex 6 years ago
umasoodch 9218d02195 Merge branch 'master' into firebasex
# Conflicts:
#	Mohem/package.json
6 years ago
umasoodch 3c637df2d5 Merge branch 'master' into timecard 6 years ago
umasoodch 5c7a30f308 added firebase token instead of one signal 6 years ago
umasoodch 8dc3f5a57e Merge branch 'master' into timecard
# Conflicts:
#	Mohem/src/theme/styles.scss
6 years ago
umasoodch 976961e9ee completed time card module 6 years ago
Fatimah.Alshammari 13df9b7b75 add dachboard services 6 years ago
Fatimah.Alshammari d5407c8f90 add dachboard services 6 years ago
ashwaq 7456ab6e0a add dashbored services 6 years ago
ashwaq 4bdc08b42d add dashbored 6 years ago
umasoodch e01c73a092 completed functionality of time card module 6 years ago
umasoodch 167973cedb added time card detail and its summary 6 years ago

@ -42,7 +42,7 @@
"input": "src/app/app.scss" "input": "src/app/app.scss"
} }
], ],
"scripts": [], "scripts": ["node_modules/chart.js/dist/Chart.js"],
"es5BrowserSupport": true "es5BrowserSupport": true
}, },
"configurations": { "configurations": {

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?> <?xml version='1.0' encoding='utf-8'?>
<widget id="com.cloudsolutions.mohemm" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <widget id="hmg.cloudSolutions.mohem" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>MyApp</name> <name>MyApp</name>
<description>An awesome Ionic/Cordova app.</description> <description>An awesome Ionic/Cordova app.</description>
<author email="hi@ionicframework.com" href="http://ionicframework.com/">Ionic Framework Team</author> <author email="hi@ionicframework.com" href="http://ionicframework.com/">Ionic Framework Team</author>
@ -86,10 +86,6 @@
<plugin name="cordova-plugin-ionic-webview" spec="^4.0.0" /> <plugin name="cordova-plugin-ionic-webview" spec="^4.0.0" />
<plugin name="call-number" spec="^1.0.1" /> <plugin name="call-number" spec="^1.0.1" />
<plugin name="cordova-android-support-gradle-release" spec="^2.1.0" /> <plugin name="cordova-android-support-gradle-release" spec="^2.1.0" />
<plugin name="phonegap-plugin-push" spec="2.2.3">
<variable name="GOOGLE_PLAY_SERVICES_VERSION" value="16.0.0" />
<variable name="FCM_VERSION" value="15.0.0" />
</plugin>
<plugin name="cordova-sqlite-storage" spec="^3.2.0" /> <plugin name="cordova-sqlite-storage" spec="^3.2.0" />
<plugin name="cordova-plugin-nativestorage" spec="^2.3.2" /> <plugin name="cordova-plugin-nativestorage" spec="^2.3.2" />
<plugin name="cordova-plugin-ble-central" spec="^1.2.2" /> <plugin name="cordova-plugin-ble-central" spec="^1.2.2" />

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?> <?xml version='1.0' encoding='utf-8'?>
<widget id="com.cloudsolutions.alhabibmohemm" version="1.4" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <widget id="hmg.cloudSolutions.mohem" version="1.4" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>MOHEMM</name> <name>MOHEMM</name>
<description>an app created by cloud Solutions</description> <description>an app created by cloud Solutions</description>
<author email="eservicescs@cloudsolution-sa.com" href="http://cloudsolution-sa.com">HMG</author> <author email="eservicescs@cloudsolution-sa.com" href="http://cloudsolution-sa.com">HMG</author>
@ -95,10 +95,6 @@
<variable name="ANDROID_SUPPORT_ANNOTATIONS_VERSION" value="27.+" /> <variable name="ANDROID_SUPPORT_ANNOTATIONS_VERSION" value="27.+" />
</plugin> </plugin>
<plugin name="cordova-android-support-gradle-release" spec="^3.0.1" /> <plugin name="cordova-android-support-gradle-release" spec="^3.0.1" />
<plugin name="phonegap-plugin-push" spec="^2.3.0">
<variable name="GOOGLE_PLAY_SERVICES_VERSION" value="16.0.0" />
<variable name="FCM_VERSION" value="15.0.0" />
</plugin>
<plugin name="cordova-sqlite-storage" spec="^3.4.0" /> <plugin name="cordova-sqlite-storage" spec="^3.4.0" />
<plugin name="cordova-plugin-nativestorage" spec="^2.3.2" /> <plugin name="cordova-plugin-nativestorage" spec="^2.3.2" />
<plugin name="cordova-plugin-ble-central" spec="^1.2.4" /> <plugin name="cordova-plugin-ble-central" spec="^1.2.4" />
@ -124,7 +120,6 @@
<plugin name="cordova-plugin-file" spec="^6.0.2" /> <plugin name="cordova-plugin-file" spec="^6.0.2" />
<plugin name="cordova-plugin-filepath" spec="^1.5.6" /> <plugin name="cordova-plugin-filepath" spec="^1.5.6" />
<plugin name="com-badrit-base64" spec="^0.2.0" /> <plugin name="com-badrit-base64" spec="^0.2.0" />
<plugin name="onesignal-cordova-plugin" spec="^2.7.0" />
<plugin name="cordova-plugin-fingerprint-aio" spec="^3.0.0"> <plugin name="cordova-plugin-fingerprint-aio" spec="^3.0.0">
<variable name="FACEID_USAGE_DESCRIPTION" value="User Authentication" /> <variable name="FACEID_USAGE_DESCRIPTION" value="User Authentication" />
</plugin> </plugin>

@ -1,35 +1,42 @@
{ {
"project_info": { "project_info": {
"project_number": "608631731238", "project_number": "679409052782",
"firebase_url": "https://mohemm-cs.firebaseio.com", "firebase_url": "https://mohemm-dce93.firebaseio.com",
"project_id": "mohemm-cs", "project_id": "mohemm-dce93",
"storage_bucket": "mohemm-cs.appspot.com" "storage_bucket": "mohemm-dce93.appspot.com"
}, },
"client": [ "client": [
{ {
"client_info": { "client_info": {
"mobilesdk_app_id": "1:608631731238:android:3a8384007f8700ec", "mobilesdk_app_id": "1:679409052782:android:dba155ac0859d7fea78a7f",
"android_client_info": { "android_client_info": {
"package_name": "com.cloudsolutions.mohemm" "package_name": "hmg.cloudSolutions.mohem"
} }
}, },
"oauth_client": [ "oauth_client": [
{ {
"client_id": "608631731238-83a5qndedia496ssa6ekkd3db5jo8khr.apps.googleusercontent.com", "client_id": "679409052782-mtd6d8rjltucnm9uatn6g7et08sm6lbv.apps.googleusercontent.com",
"client_type": 3 "client_type": 3
} }
], ],
"api_key": [ "api_key": [
{ {
"current_key": "AIzaSyB5zpz9vC2NOxsU1dPr0TK0dVaMY5D4Mjg" "current_key": "AIzaSyDgWjuSBIKGghWxYg_KGBRIZTi-O_UA8mU"
} }
], ],
"services": { "services": {
"appinvite_service": { "appinvite_service": {
"other_platform_oauth_client": [ "other_platform_oauth_client": [
{ {
"client_id": "608631731238-83a5qndedia496ssa6ekkd3db5jo8khr.apps.googleusercontent.com", "client_id": "679409052782-mtd6d8rjltucnm9uatn6g7et08sm6lbv.apps.googleusercontent.com",
"client_type": 3 "client_type": 3
},
{
"client_id": "679409052782-3teqf8vdh9e1suvnhddj3pgmna7vg5rt.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "com.cloudsolutions.mohemm"
}
} }
] ]
} }

@ -38,11 +38,6 @@ call npm install --save angular-calendar date-fns
@echo install android support gradle release because of barcode scanner to install missing android attributes @echo install android support gradle release because of barcode scanner to install missing android attributes
call ionic cordova plugin add cordova-android-support-gradle-release --fetch call ionic cordova plugin add cordova-android-support-gradle-release --fetch
@echo push notifications
call ionic cordova plugin add phonegap-plugin-push --variable GOOGLE_PLAY_SERVICES_VERSION="16.0.0" --variable FCM_VERSION="15.0.0"
call npm install @ionic-native/push
@echo sqlite storage @echo sqlite storage
call ionic cordova plugin add cordova-sqlite-storage call ionic cordova plugin add cordova-sqlite-storage
call npm install @ionic-native/sqlite call npm install @ionic-native/sqlite

@ -39,12 +39,6 @@ echo calendar https://mattlewis92.github.io/angular-calendar/#/kitchen-sink
echo install android support gradle release because of barcode scanner to install missing android attributes echo install android support gradle release because of barcode scanner to install missing android attributes
ionic cordova plugin add cordova-android-support-gradle-release --fetch ionic cordova plugin add cordova-android-support-gradle-release --fetch
echo push notifications
ionic cordova plugin add phonegap-plugin-push --variable GOOGLE_PLAY_SERVICES_VERSION="16.0.0" --variable FCM_VERSION="15.0.0"
npm install @ionic-native/push
echo sqlite storage echo sqlite storage
ionic cordova plugin add cordova-sqlite-storage ionic cordova plugin add cordova-sqlite-storage
npm install @ionic-native/sqlite npm install @ionic-native/sqlite

@ -1,35 +1,42 @@
{ {
"project_info": { "project_info": {
"project_number": "448880075189", "project_number": "679409052782",
"firebase_url": "https://al-habib-mohemm.firebaseio.com", "firebase_url": "https://mohemm-dce93.firebaseio.com",
"project_id": "al-habib-mohemm", "project_id": "mohemm-dce93",
"storage_bucket": "al-habib-mohemm.appspot.com" "storage_bucket": "mohemm-dce93.appspot.com"
}, },
"client": [ "client": [
{ {
"client_info": { "client_info": {
"mobilesdk_app_id": "1:448880075189:android:5bb4821d515a826d88b9fc", "mobilesdk_app_id": "1:679409052782:android:dba155ac0859d7fea78a7f",
"android_client_info": { "android_client_info": {
"package_name": "com.cloudsolutions.alhabibmohemm" "package_name": "hmg.cloudSolutions.mohem"
} }
}, },
"oauth_client": [ "oauth_client": [
{ {
"client_id": "448880075189-49hc2l78pr9hsmr9p3k7j411r40diej8.apps.googleusercontent.com", "client_id": "679409052782-mtd6d8rjltucnm9uatn6g7et08sm6lbv.apps.googleusercontent.com",
"client_type": 3 "client_type": 3
} }
], ],
"api_key": [ "api_key": [
{ {
"current_key": "AIzaSyC8nrli7eyuRNow8nF-QHvDMOxqUkj6fEw" "current_key": "AIzaSyDgWjuSBIKGghWxYg_KGBRIZTi-O_UA8mU"
} }
], ],
"services": { "services": {
"appinvite_service": { "appinvite_service": {
"other_platform_oauth_client": [ "other_platform_oauth_client": [
{ {
"client_id": "448880075189-49hc2l78pr9hsmr9p3k7j411r40diej8.apps.googleusercontent.com", "client_id": "679409052782-mtd6d8rjltucnm9uatn6g7et08sm6lbv.apps.googleusercontent.com",
"client_type": 3 "client_type": 3
},
{
"client_id": "679409052782-3teqf8vdh9e1suvnhddj3pgmna7vg5rt.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "com.cloudsolutions.mohemm"
}
} }
] ]
} }

@ -38,11 +38,6 @@ call npm install --save angular-calendar date-fns
@echo install android support gradle release because of barcode scanner to install missing android attributes @echo install android support gradle release because of barcode scanner to install missing android attributes
call ionic cordova plugin add cordova-android-support-gradle-release --fetch call ionic cordova plugin add cordova-android-support-gradle-release --fetch
@echo push notifications
call ionic cordova plugin add phonegap-plugin-push --variable GOOGLE_PLAY_SERVICES_VERSION="16.0.0" --variable FCM_VERSION="15.0.0"
call npm install @ionic-native/push
@echo sqlite storage @echo sqlite storage
call ionic cordova plugin add cordova-sqlite-storage call ionic cordova plugin add cordova-sqlite-storage
call npm install @ionic-native/sqlite call npm install @ionic-native/sqlite
@ -149,9 +144,9 @@ call npm install @ionic-native/file-path
call ionic cordova plugin add com-badrit-base64 call ionic cordova plugin add com-badrit-base64
call npm install @ionic-native/base64 call npm install @ionic-native/base64
@echo install OneSignal plugin @echo install Firebasex plugin
call ionic cordova plugin add onesignal-cordova-plugin call ionic cordova plugin add cordova-plugin-firebasex
call npm install @ionic-native/onesignal call npm install @ionic-native/firebase-x
@echo reinitializing git repository @echo reinitializing git repository
@echo git init @echo git init

@ -40,11 +40,6 @@ echo install android support gradle release because of barcode scanner to insta
ionic cordova plugin add cordova-android-support-gradle-release --fetch ionic cordova plugin add cordova-android-support-gradle-release --fetch
echo push notifications
ionic cordova plugin add phonegap-plugin-push --variable GOOGLE_PLAY_SERVICES_VERSION="16.0.0" --variable FCM_VERSION="15.0.0"
npm install @ionic-native/push
echo sqlite storage echo sqlite storage
ionic cordova plugin add cordova-sqlite-storage ionic cordova plugin add cordova-sqlite-storage
npm install @ionic-native/sqlite npm install @ionic-native/sqlite

3883
Mohem/package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -21,38 +21,38 @@
"@angular/platform-browser": "^7.2.2", "@angular/platform-browser": "^7.2.2",
"@angular/platform-browser-dynamic": "^7.2.2", "@angular/platform-browser-dynamic": "^7.2.2",
"@angular/router": "^7.2.2", "@angular/router": "^7.2.2",
"@ionic-native/android-permissions": "^5.17.0", "@ionic-native/android-permissions": "^5.18.0",
"@ionic-native/app-availability": "^5.17.0", "@ionic-native/app-availability": "^5.18.0",
"@ionic-native/app-rate": "^5.17.0", "@ionic-native/app-rate": "^5.18.0",
"@ionic-native/background-geolocation": "^5.4.0", "@ionic-native/background-geolocation": "^5.4.0",
"@ionic-native/badge": "^5.17.0", "@ionic-native/badge": "^5.18.0",
"@ionic-native/barcode-scanner": "^5.17.0", "@ionic-native/barcode-scanner": "^5.18.0",
"@ionic-native/base64": "^5.17.0", "@ionic-native/base64": "^5.18.0",
"@ionic-native/ble": "^5.17.0", "@ionic-native/ble": "^5.18.0",
"@ionic-native/call-number": "^5.17.0", "@ionic-native/call-number": "^5.18.0",
"@ionic-native/camera": "^5.17.0", "@ionic-native/camera": "^5.18.0",
"@ionic-native/core": "^5.8.0", "@ionic-native/core": "^5.8.0",
"@ionic-native/date-picker": "^5.10.0", "@ionic-native/date-picker": "^5.10.0",
"@ionic-native/device": "^5.17.0", "@ionic-native/device": "^5.18.0",
"@ionic-native/diagnostic": "^5.17.0", "@ionic-native/diagnostic": "^5.18.0",
"@ionic-native/file": "^5.17.0", "@ionic-native/file": "^5.18.0",
"@ionic-native/file-path": "^5.17.0", "@ionic-native/file-path": "^5.18.0",
"@ionic-native/fingerprint-aio": "^5.17.1", "@ionic-native/fingerprint-aio": "^5.18.0",
"@ionic-native/firebase-x": "^5.19.1",
"@ionic-native/geolocation": "^5.10.0", "@ionic-native/geolocation": "^5.10.0",
"@ionic-native/globalization": "^5.17.0", "@ionic-native/globalization": "^5.18.0",
"@ionic-native/health": "^5.4.0", "@ionic-native/health": "^5.4.0",
"@ionic-native/in-app-browser": "^5.17.0", "@ionic-native/in-app-browser": "^5.17.0",
"@ionic-native/keyboard": "^5.17.0", "@ionic-native/keyboard": "^5.17.0",
"@ionic-native/launch-navigator": "^5.17.0", "@ionic-native/launch-navigator": "^5.17.0",
"@ionic-native/local-notifications": "^5.17.0", "@ionic-native/local-notifications": "^5.17.0",
"@ionic-native/native-storage": "^5.17.0", "@ionic-native/native-storage": "^5.17.0",
"@ionic-native/onesignal": "^5.19.0",
"@ionic-native/open-native-settings": "^5.14.0", "@ionic-native/open-native-settings": "^5.14.0",
"@ionic-native/push": "^5.17.0",
"@ionic-native/splash-screen": "^5.0.0", "@ionic-native/splash-screen": "^5.0.0",
"@ionic-native/sqlite": "^5.17.0", "@ionic-native/sqlite": "^5.18.0",
"@ionic-native/status-bar": "^5.0.0", "@ionic-native/status-bar": "^5.0.0",
"@ionic-native/themeable-browser": "^5.17.0", "@ionic-native/themeable-browser": "^5.18.0",
"@ionic-native/vibration": "^5.19.1",
"@ionic-native/zbar": "^5.10.0", "@ionic-native/zbar": "^5.10.0",
"@ionic/angular": "^4.1.0", "@ionic/angular": "^4.1.0",
"@ng-bootstrap/ng-bootstrap": "^4.2.2", "@ng-bootstrap/ng-bootstrap": "^4.2.2",
@ -62,7 +62,7 @@
"call-number": "~0.0.2", "call-number": "~0.0.2",
"chart.js": "^2.9.3", "chart.js": "^2.9.3",
"com-badrit-base64": "^0.2.0", "com-badrit-base64": "^0.2.0",
"cordova-android": "8.1.0", "cordova-android": "^8.1.0",
"cordova-android-support-gradle-release": "^3.0.1", "cordova-android-support-gradle-release": "^3.0.1",
"cordova-browser": "5.0.4", "cordova-browser": "5.0.4",
"cordova-ios": "4.5.5", "cordova-ios": "4.5.5",
@ -71,6 +71,8 @@
"cordova-plugin-actionsheet": "^2.3.3", "cordova-plugin-actionsheet": "^2.3.3",
"cordova-plugin-add-swift-support": "^2.0.2", "cordova-plugin-add-swift-support": "^2.0.2",
"cordova-plugin-android-permissions": "^1.0.2", "cordova-plugin-android-permissions": "^1.0.2",
"cordova-plugin-androidx": "^1.0.2",
"cordova-plugin-androidx-adapter": "^1.1.0",
"cordova-plugin-appavailability": "^0.4.2", "cordova-plugin-appavailability": "^0.4.2",
"cordova-plugin-apprate": "^1.4.0", "cordova-plugin-apprate": "^1.4.0",
"cordova-plugin-badge": "^0.8.8", "cordova-plugin-badge": "^0.8.8",
@ -82,6 +84,7 @@
"cordova-plugin-file": "^6.0.2", "cordova-plugin-file": "^6.0.2",
"cordova-plugin-filepath": "^1.5.6", "cordova-plugin-filepath": "^1.5.6",
"cordova-plugin-fingerprint-aio": "^3.0.0", "cordova-plugin-fingerprint-aio": "^3.0.0",
"cordova-plugin-firebasex": "^7.0.1",
"cordova-plugin-geolocation": "^4.0.2", "cordova-plugin-geolocation": "^4.0.2",
"cordova-plugin-globalization": "^1.11.0", "cordova-plugin-globalization": "^1.11.0",
"cordova-plugin-inappbrowser": "^3.1.0", "cordova-plugin-inappbrowser": "^3.1.0",
@ -93,24 +96,27 @@
"cordova-plugin-splashscreen": "^5.0.3", "cordova-plugin-splashscreen": "^5.0.3",
"cordova-plugin-statusbar": "^2.4.3", "cordova-plugin-statusbar": "^2.4.3",
"cordova-plugin-themeablebrowser": "^0.2.18", "cordova-plugin-themeablebrowser": "^0.2.18",
"cordova-plugin-vibration": "^3.1.1",
"cordova-plugin-whitelist": "^1.3.4", "cordova-plugin-whitelist": "^1.3.4",
"cordova-sqlite-storage": "^3.4.0", "cordova-sqlite-storage": "^3.4.0",
"cordova-support-google-services": "^1.3.2", "cordova-support-google-services": "^1.3.2",
"cordova.plugins.diagnostic": "^5.0.1", "cordova.plugins.diagnostic": "^5.0.1",
"core-js": "^2.5.4", "core-js": "^2.5.4",
"date-fns": "^1.30.1", "date-fns": "^1.30.1",
"ionic2-calendar": "^0.5.8",
"mx.ferreyra.callnumber": "0.0.2", "mx.ferreyra.callnumber": "0.0.2",
"ng-circle-progress": "^1.5.1",
"ng2-file-upload": "^1.3.0", "ng2-file-upload": "^1.3.0",
"ng2-pdf-viewer": "^5.3.2", "ng2-pdf-viewer": "^5.3.2",
"ngx-gauge": "^1.0.0-beta.10",
"npm": "^6.13.1", "npm": "^6.13.1",
"onesignal-cordova-plugin": "^2.7.0",
"phonegap-plugin-barcodescanner": "^8.1.0", "phonegap-plugin-barcodescanner": "^8.1.0",
"phonegap-plugin-multidex": "^1.0.0", "phonegap-plugin-multidex": "^1.0.0",
"phonegap-plugin-push": "^2.3.0",
"primeicons": "^1.0.0", "primeicons": "^1.0.0",
"primeng": "^7.1.3", "primeng": "^7.1.3",
"run": "1.4.0", "run": "1.4.0",
"rxjs": "~6.3.3", "rxjs": "~6.3.3",
"tslib": "^1.10.0",
"uk.co.workingedge.phonegap.plugin.launchnavigator": "^3.2.2", "uk.co.workingedge.phonegap.plugin.launchnavigator": "^3.2.2",
"xlsx": "^0.14.3", "xlsx": "^0.14.3",
"zone.js": "~0.8.29" "zone.js": "~0.8.29"
@ -136,6 +142,7 @@
"karma-coverage-istanbul-reporter": "~2.0.1", "karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~1.1.2", "karma-jasmine": "~1.1.2",
"karma-jasmine-html-reporter": "^0.2.2", "karma-jasmine-html-reporter": "^0.2.2",
"node-sass": "^4.13.0",
"protractor": "~5.4.0", "protractor": "~5.4.0",
"ts-node": "~8.0.0", "ts-node": "~8.0.0",
"tslint": "~5.12.0", "tslint": "~5.12.0",
@ -162,17 +169,19 @@
"cordova-plugin-ionic-webview": { "cordova-plugin-ionic-webview": {
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+" "ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
}, },
"cordova-android-support-gradle-release": {}, "cordova-android-support-gradle-release": {
"cordova.plugins.diagnostic": {}, "ANDROID_SUPPORT_VERSION": "27.+"
},
"cordova.plugins.diagnostic": {
"ANDROID_SUPPORT_VERSION": "28.+"
},
"cordova-open-native-settings": {}, "cordova-open-native-settings": {},
"cordova-plugin-camera": {}, "cordova-plugin-camera": {
"ANDROID_SUPPORT_V4_VERSION": "27.+"
},
"cordova-plugin-file": {}, "cordova-plugin-file": {},
"cordova-plugin-filepath": {}, "cordova-plugin-filepath": {},
"com-badrit-base64": {}, "com-badrit-base64": {},
"phonegap-plugin-push": {
"GOOGLE_PLAY_SERVICES_VERSION": "16.0.0",
"FCM_VERSION": "15.0.0"
},
"cordova-sqlite-storage": {}, "cordova-sqlite-storage": {},
"cordova-plugin-ble-central": {}, "cordova-plugin-ble-central": {},
"uk.co.workingedge.phonegap.plugin.launchnavigator": {}, "uk.co.workingedge.phonegap.plugin.launchnavigator": {},
@ -184,10 +193,11 @@
"cordova-opentok-android-permissions": {}, "cordova-opentok-android-permissions": {},
"cordova-plugin-appavailability": {}, "cordova-plugin-appavailability": {},
"cordova-plugin-apprate": {}, "cordova-plugin-apprate": {},
"onesignal-cordova-plugin": {},
"cordova-plugin-fingerprint-aio": { "cordova-plugin-fingerprint-aio": {
"FACEID_USAGE_DESCRIPTION": "User Authentication" "FACEID_USAGE_DESCRIPTION": "User Authentication"
} },
"cordova-plugin-firebasex": {},
"cordova-plugin-vibration": {}
}, },
"platforms": [ "platforms": [
"browser", "browser",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 KiB

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 161 KiB

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 KiB

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 KiB

After

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 175 KiB

After

Width:  |  Height:  |  Size: 200 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 210 KiB

After

Width:  |  Height:  |  Size: 132 KiB

@ -1,13 +1,13 @@
import { Component, OnInit } from "@angular/core"; import { Component, OnInit } from '@angular/core';
import { CommonService } from "src/app/hmg-common/services/common/common.service"; import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service"; import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service"; import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service';
import { AccrualService } from "../services/accrual.service"; import { AccrualService } from '../services/accrual.service';
import { AuthenticatedUser } from "src/app/hmg-common/services/authentication/models/authenticated-user"; import { AuthenticatedUser } from 'src/app/hmg-common/services/authentication/models/authenticated-user';
@Component({ @Component({
selector: "app-home", selector: 'app-home',
templateUrl: "./home.component.html", templateUrl: './home.component.html',
styleUrls: ["./home.component.scss"] styleUrls: ['./home.component.scss']
}) })
export class HomeComponent implements OnInit { export class HomeComponent implements OnInit {
Sdate: any; Sdate: any;
@ -39,7 +39,7 @@ export class HomeComponent implements OnInit {
let day = today.getDate(); let day = today.getDate();
let month = today.getMonth() + 1; let month = today.getMonth() + 1;
let year = today.getFullYear(); let year = today.getFullYear();
let todayDate = month + "/" + day + "/" + year; let todayDate = month + '/' + day + '/' + year;
let effectiveDate = todayDate; let effectiveDate = todayDate;
const request = { const request = {
P_SELECTED_EMPLOYEE_NUMBER: this.emp_no, P_SELECTED_EMPLOYEE_NUMBER: this.emp_no,

@ -1,32 +1,33 @@
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { PreloadAllModules, RouterModule, Routes } from '@angular/router'; 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' },
{ @NgModule({
path: 'authentication', loadChildren: './authentication/authentication.module#AuthenticationPageModule'}, imports: [
{ path: 'home', loadChildren: './home/home.module#HomePageModule' }, /*RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules}),*/
{ path: 'profile', loadChildren: './profile/profile.module#ProfilePageModule' }, RouterModule.forRoot(routes),
{ path: 'vacation-rule', loadChildren: './vacation-rule/vacation-rule.module#VacationRulePageModule' }, ],
{ path: 'accrual-balances', loadChildren: './accrual-balances/accrual-balances.module#AccrualBalancesPageModule' }, exports: [RouterModule]
{ path: 'my-team', loadChildren: './my-team/my-team.module#MyTeamPageModule' }, })
{ path: 'attendance', loadChildren: './attendance/attendance.module#AttendancePageModule' }, export class AppRoutingModule { }
{ 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 { }

@ -1,25 +1,109 @@
<!-- <ion-nav [root]="rootPage" #mycontent swipeBackEnabled="false"></ion-nav> --> <!-- <ion-nav [root]="rootPage" #mycontent swipeBackEnabled="false"></ion-nav> -->
<!-- (ionWillOpen)="menuOpened(true)" --> <!-- (ionWillOpen)="menuOpened(true)" -->
<ion-app [dir]="direction"> <ion-app [dir]="direction">
<ion-split-pane> <ion-split-pane>
<ion-menu [side]=" direction === 'rtl' ? 'end' : 'start'" [swipeGesture]="false"> <ion-menu [side]=" direction === 'rtl' ? 'end' : 'start'" [swipeGesture]="false">
<ion-content class="sidebar-menu"> <ion-content class="sidebar-menu">
<div class="header-div"> <div class="header-div">
<div class="centerDiv"> <div>
<p class="TxtPlace">{{ts.trPK('home','hello')}}, {{User_name_Emp}}</p> <ion-button class="closeIcon" (click)="closeMenu()">
<!-- <div> <img src="{{user_image}}" class="profileImg"></div> --> <img style= "height: 18px !important;" src="../assets/imgs/close_menu_icon.png "></ion-button>
<div><img class="menuImg" [src]="user_image"></div>
</div>
<div style="border-bottom: rgb(190, 186, 186) solid 1px;" >
<img class="mohemmLogo" src="../assets/imgs/menu_mohemm_logo.png" ></div>
<hr>
</div>
<div class="centerDiv homeBox" (click)="openPersonalInfo()">
<div class="profileDiv">
<!-- <ion-img class="profileImg" src="{{user_image}}"></ion-img> -->
<img class="profileImg" [src]="user_image">
<p class="TxtPlace">{{User_name_Emp}}</p>
<p class="TxtPlaces"> {{User_Job_name}}</p>
</div> </div>
</div> </div>
<ion-list>
<ion-item (click)="openNotification()">
<div class="changeImgBtn">
<button ion-button icon-only menuToggle class="menubutton" (click)="changeImage()">
<ion-icon (click)="changeImage();" class="changeIcon" name="md-create"></ion-icon></button>
</div>
<!-- <div class="changeImgBtn">
<ion-button class="editIcon" (click)="changeImage()">
<img style= "height: 13px !important;" src="../assets/imgs/edit_icon.png ">
</ion-button>
<img class="menuImg" [src]="user_image"></div> -->
<!-- <div class="centerDiv">
<p class="TxtPlace">{{ts.trPK('home')}}, {{User_name_Emp}}</p>
//<div> <img src="{{user_image}}" class="profileImg"></div>
//<div><img class="menuImg" [src]="user_image"></div>
<p class="TxtPlaces">{{ts.trPK('home')}}, {{User_Job_name}}</p>
</div> -->
<div style="border-bottom: rgb(190, 187, 187) solid 1px;" >
<button class="logout" ion-button (click)="logout();" > {{ts.trPK('home','logout')}}</button>
</div>
<!-- <div>
<ion-item (click)="logout();">
<ion-thumbnail slot="start" class="menu-thumb"> <ion-thumbnail slot="start" class="menu-thumb">
<img width="30" src="../assets/imgs/bell.png" item-left> <img width="30" src="../assets/imgs/signout.png" item-left>
</ion-thumbnail> </ion-thumbnail>
<ion-label> <ion-label>
{{ts.trPK('home','worklist')}} {{ts.trPK('home','logout')}}
</ion-label>
</ion-item>
</div> -->
<br>
<ion-list>
<ion-item (click)="profile()">
<ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 24px !important;" src="../assets/imgs/profile_icon.png" item-left>
</ion-thumbnail>
<ion-label class="profile">
{{ts.trPK('userProfile','title')}}
</ion-label>
</ion-item>
<ion-item (click)="openChangePassword()">
<ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 25px !important;" src="../assets/imgs/lock_icon.png" item-left>
</ion-thumbnail>
<ion-label class="changepassword" >
{{ts.trPK('login','changepassword')}}
<ion-badge [ngClass]=" direction === 'rtl' ? 'end-badge' : 'start-badge'" slot="end" color="danger" class="main-badge">{{notBadge}}</ion-badge> <ion-badge [ngClass]=" direction === 'rtl' ? 'end-badge' : 'start-badge'" slot="end" color="danger" class="main-badge">{{notBadge}}</ion-badge>
</ion-label> </ion-label>
@ -29,15 +113,15 @@
</button> --> </button> -->
</ion-item> </ion-item>
<ion-item (click)="profile()"> <!-- <ion-item (click)="profile()">
<ion-thumbnail slot="start" class="menu-thumb"> <ion-thumbnail slot="start" class="menu-thumb">
<img width="30" src="../assets/imgs/username.png" item-left> <img width="30" src="../assets/imgs/profile_icon.png" item-left>
</ion-thumbnail> </ion-thumbnail>
<ion-label> <ion-label>
{{ts.trPK('userProfile','title')}} {{ts.trPK('userProfile','title')}}
</ion-label> </ion-label>
</ion-item> </ion-item> -->
<ion-item (click)="logout();"> <!-- <ion-item (click)="logout();">
<ion-thumbnail slot="start" class="menu-thumb"> <ion-thumbnail slot="start" class="menu-thumb">
@ -47,7 +131,7 @@
{{ts.trPK('home','logout')}} {{ts.trPK('home','logout')}}
</ion-label> </ion-label>
</ion-item> </ion-item> -->
</ion-list> </ion-list>
<div class="" style="text-align:center"> <div class="" style="text-align:center">
@ -55,7 +139,7 @@
<p class="companyTxt">{{CompanyImageDescription}}</p> <p class="companyTxt">{{CompanyImageDescription}}</p>
</div> </div>
<div class="menuFooter"> <div class="menuFooter">
<div> <img src="../assets/imgs/CS.png" class="CompanyImg"></div> <!-- <div> <img src="../assets/imgs/CS.png" class="CompanyImg"></div> -->
<p class="companyTxt">{{companyDesc}}</p> <p class="companyTxt">{{companyDesc}}</p>
</div> </div>
</ion-content> </ion-content>

@ -8,9 +8,112 @@ header
.content-ios:not([no-bounce])>.scroll-content::before { .content-ios:not([no-bounce])>.scroll-content::before {
bottom: 0; bottom: 0;
} }
.mohemmLogo{
max-width: 46% !important;
border: 0 !important;
margin-left: 70px !important;
margin-top: -24px !important;
margin-bottom: 11px;
}
.closeIcon{
height: 10px !important;
margin-left: 255px !important;
margin-top: 0px !important;
background: transparent;
--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;
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%;
// 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{
/* background: #c1c1c1; */
width: 21px;
/* height: 26px; */
border-radius: 50% !important;
position: relative;
color: #7f8c8d;
// background: #c1c1c1;
// width: 40px;
// height: 39px;
// border-radius: 50% !important;
// position: relative;
// left: 51px;
// top:16px;
}
.changeImgBtn{
// margin: 0;
position: absolute;
top: 18%;
left: 68%;
// -ms-transform: translate(-50%, -50%);
// transform: translate(-50%, -50%);
}
.logout{
background-color:#22C6B3;
border: none;
color:white;
// padding: 20px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 12px;
margin-left: 120px !important;
margin-top: 15px !important;
margin-bottom: 20px !important;
border-radius: 30px;
// width: 40px;
height: 26px;
padding: 6px 24px;
}
.menuImg{ .menuImg{
width: 80px; width: 105px !important;
height: 80px; height: 105px !important;
margin-left: 90px !important;
display: inline-flex; display: inline-flex;
overflow: hidden; overflow: hidden;
background: transparent; background: transparent;
@ -122,17 +225,19 @@ header
margin-left: 0.2cm; margin-left: 0.2cm;
} }
.sidebar-menu .header-div { .sidebar-menu .header-div {
background: var(--primary); // background: var(--primary);
background: -moz-linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%, var(--secondary) 59%, var(--customnavy) 100%); // 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: -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%); // background: linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%, var(--secondary) 59%, var(--customnavy) 100%);
color: var(--light); // color: var(--light);
text-transform: capitalize; text-transform: capitalize;
height: 120px; height: 100px;
position: relative; position: relative;
display: block; display: block;
margin-bottom: 40px; margin-bottom: -28px;
} }
.list-md .item-block .item-inner, .list-md .item-block .item-inner,
@ -154,8 +259,20 @@ button.menu-item.item.item-block.item-ios {
.TxtPlace { .TxtPlace {
margin: 0; margin: 0;
padding: 40px 0 10px 0; padding: 0;
text-align: center; text-align: center;
font-weight: bolder;
color: black;
font-size: 16px;
}
.TxtPlaces{
margin: 0;
padding: 0;
text-align: center;
font-weight: bolder;
font-size: 14px;
color: darkgray;
} }
.menuFooter { .menuFooter {
@ -189,6 +306,17 @@ button.menu-item.item.item-block.item-ios {
text-align: center; text-align: center;
} }
ion-thumbnail.menu-thumb{ ion-thumbnail.menu-thumb{
width:30px; width:20px;
height:30px; height:20px;
// margin-top: 5px !important;
}
.changepassword{
color: black !important;
font-weight: bolder !important;
}
.profile{
color: black !important;
font-weight: bolder !important;
} }

@ -28,6 +28,7 @@ export class AppComponent implements OnInit, AfterViewInit {
companyUrl: string = "../assets/imgs/CS.png"; companyUrl: string = "../assets/imgs/CS.png";
companyDesc: string = "Powered By Cloud Solutions"; companyDesc: string = "Powered By Cloud Solutions";
public direction = "ltr"; public direction = "ltr";
User_Job_name: string;
constructor( constructor(
public ts: TranslatorService, public ts: TranslatorService,
private cs: CommonService, private cs: CommonService,
@ -38,8 +39,7 @@ export class AppComponent implements OnInit, AfterViewInit {
private menu: MenuController, private menu: MenuController,
private authService: AuthenticationService, private authService: AuthenticationService,
private sanitizer: DomSanitizer, private sanitizer: DomSanitizer,
public pushService: PushService, public pushService: PushService
) { ) {
this.events.subscribe("img-change", displayImg => { this.events.subscribe("img-change", displayImg => {
console.log("app compont: "+displayImg); console.log("app compont: "+displayImg);
@ -72,7 +72,6 @@ export class AppComponent implements OnInit, AfterViewInit {
private startReceivingPushService() { private startReceivingPushService() {
this.pushService.startReceiving(); this.pushService.startReceiving();
} }
subscribeEvents() { subscribeEvents() {
this.events.subscribe("setMenu", () => { this.events.subscribe("setMenu", () => {
@ -91,6 +90,8 @@ export class AppComponent implements OnInit, AfterViewInit {
this.user_image = user.EMPLOYEE_IMAGE this.user_image = user.EMPLOYEE_IMAGE
? "data:image/png;base64," + user.EMPLOYEE_IMAGE ? "data:image/png;base64," + user.EMPLOYEE_IMAGE
: "../assets/imgs/profile.png"; : "../assets/imgs/profile.png";
this.User_Job_name=user.JOB_NAME;
console.log(user); console.log(user);
} else { } else {
console.log(user); console.log(user);
@ -135,4 +136,18 @@ export class AppComponent implements OnInit, AfterViewInit {
this.menu.toggle(); this.menu.toggle();
} }
openChangePassword(){
this.cs.openChangePassword();
this.menu.toggle();
}
private changeImage() {
this.cs.openChangeImagePage();
this.menu.toggle();
}
closeMenu(){
this.menu.toggle();
}
} }

@ -5,17 +5,19 @@ import { HmgCommonModule } from './hmg-common/hmg-common.module';
import { IonicModule, IonicRouteStrategy } from '@ionic/angular'; import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
import { SplashScreen } from '@ionic-native/splash-screen/ngx'; import { SplashScreen } from '@ionic-native/splash-screen/ngx';
import { StatusBar } from '@ionic-native/status-bar/ngx'; import { StatusBar } from '@ionic-native/status-bar/ngx';
import { OneSignal } from '@ionic-native/onesignal/ngx';
import { AppComponent } from './app.component'; import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routing.module'; import { AppRoutingModule } from './app-routing.module';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { ZBar } from '@ionic-native/zbar/ngx'; import { ZBar } from '@ionic-native/zbar/ngx';
import { Geolocation } from '@ionic-native/geolocation/ngx'; import { Geolocation } from '@ionic-native/geolocation/ngx';
import {Camera,CameraOptions,PictureSourceType} from'@ionic-native/Camera/ngx'; import {Camera, CameraOptions, PictureSourceType} from '@ionic-native/Camera/ngx';
import { FilePath } from "@ionic-native/file-path/ngx"; import { FilePath } from '@ionic-native/file-path/ngx';
import { File } from "@ionic-native/file/ngx"; import { File } from '@ionic-native/file/ngx';
import { Base64 } from "@ionic-native/base64/ngx"; import { Base64 } from '@ionic-native/base64/ngx';
import { FirebaseX } from '@ionic-native/firebase-x/ngx';
import { NgCalendarModule } from 'ionic2-calendar';
@NgModule({ @NgModule({
declarations: [AppComponent], declarations: [AppComponent],
entryComponents: [], entryComponents: [],
@ -26,7 +28,8 @@ import { Base64 } from "@ionic-native/base64/ngx";
hardwareBackButton: true, hardwareBackButton: true,
}), }),
AppRoutingModule, AppRoutingModule,
HmgCommonModule HmgCommonModule,
NgCalendarModule
], ],
providers: [ providers: [
StatusBar, StatusBar,
@ -37,7 +40,7 @@ import { Base64 } from "@ionic-native/base64/ngx";
File, File,
FilePath, FilePath,
Base64, Base64,
OneSignal, FirebaseX,
{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy } { provide: RouteReuseStrategy, useClass: IonicRouteStrategy }
], ],
bootstrap: [AppComponent] bootstrap: [AppComponent]

@ -0,0 +1,38 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { Routes, RouterModule } from '@angular/router';
import { IonicModule } from '@ionic/angular';
import { AttendanceTrackingPage } from './attendance-tracking.page';
import {HomeComponent} from './home/home.component'
import { HmgCommonModule } from "./../hmg-common/hmg-common.module";
const routes: Routes = [
{
path: '',
component: AttendanceTrackingPage,
children:[
{
path: 'home',
component:HomeComponent
}
]
},
];
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
HmgCommonModule,
RouterModule.forChild(routes)
],
declarations: [AttendanceTrackingPage,HomeComponent]
})
export class AttendanceTrackingPageModule {}

@ -0,0 +1,3 @@
<ion-content>
<ion-router-outlet></ion-router-outlet>
</ion-content>

@ -0,0 +1,27 @@
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { AttendanceTrackingPage } from './attendance-tracking.page';
describe('AttendanceTrackingPage', () => {
let component: AttendanceTrackingPage;
let fixture: ComponentFixture<AttendanceTrackingPage>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ AttendanceTrackingPage ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(AttendanceTrackingPage);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-attendance-tracking',
templateUrl: './attendance-tracking.page.html',
styleUrls: ['./attendance-tracking.page.scss'],
})
export class AttendanceTrackingPage implements OnInit {
constructor() { }
ngOnInit() {
}
}

@ -0,0 +1,79 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<ion-title color="light">Attendance Tracking </ion-title>
<ion-buttons slot="start">
<nav-buttons></nav-buttons>
</ion-buttons>
</ion-toolbar>
</ion-header>
<ion-content>
<div class="timer-chart">
<ion-label class="shift-title" style="font-weight: bold"> {{curentDate}}</ion-label><br/>
<ion-label class="shift-title"> {{ts.trPK('attendance-tracking','today-time-left')}}</ion-label>
<div class="fixed-shift-timer">
<circle-progress
[titleFontSize]= '3'
[percent]="percent"
[radius]="8"
[outerStrokeWidth]="0.25"
[innerStrokeWidth]="0.25"
[outerStrokeColor]="'#3cb9d5'"
[innerStrokeColor]="'rgba(0,0,0,0.3)'"
[animation]="true"
[animationDuration]="300"
[responsive]="true"
[space]="-0.25"
[startFromZero]="false"
[title]="displayTime"
titleFontWeight="bold"
[titleColor]="'#ffffff'"
[showUnits]="false"
[showSubtitle]="false"
[subtitleColor]="'#ffffff'"
[clockwise]="false"
[renderOnClick]="false">
</circle-progress>
</div>
</div>
<div *ngIf="attendanceTrackingList" class="tracking-content">
<div class="divstopBtn">
<button *ngIf="isCheckedIn"(click)="openDialog();" class="stopBtn" ion-button>
<ion-icon class="stopicon" name="pause"></ion-icon>
</button>
</div>
<ion-grid>
<ion-row class="rowBorder">
<ion-label class="shift-title">{{ts.trPK('attendance-tracking','shift-time')}}</ion-label>
<br /><br />
<ion-label class="shift-text shift-title">{{attendanceTrackingList.P_SHT_NAME}} </ion-label>
</ion-row>
<ion-row class="rowBorder">
<ion-col class="colBorder">
<ion-label class="shift-title"> {{ts.trPK('attendance-tracking','check-in')}}</ion-label>
<br /><br />
<ion-label class="shift-text shift-title">08:00</ion-label>
</ion-col>
<ion-col>
<ion-label class="shift-title"> {{ts.trPK('attendance-tracking','check-out')}}</ion-label>
<br /><br />
<ion-label class="shift-text shift-title">08:00 </ion-label>
</ion-col>
</ion-row>
<ion-row style="text-align: center">
<ion-col class="colBorder">
<ion-label class="shift-title"> {{ts.trPK('attendance-tracking','late-in')}}</ion-label>
<br /><br />
<ion-label class="shift-text shift-title">08:00 </ion-label>
</ion-col>
<ion-col>
<ion-label class="shift-title"> {{ts.trPK('attendance-tracking','regular')}}</ion-label>
<br /><br />
<ion-label class="shift-text shift-title">{{attendanceTrackingList.P_SCHEDULED_HOURS}} </ion-label>
</ion-col>
</ion-row>
</ion-grid>
</div>
</ion-content>

@ -0,0 +1,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;
}

@ -0,0 +1,27 @@
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { HomeComponent } from './home.component';
describe('HomeComponent', () => {
let component: HomeComponent;
let fixture: ComponentFixture<HomeComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ HomeComponent ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(HomeComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,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')
+ '<br/>' + '<br/>' + this.ts.trPK('attendance-tracking', 'confirm-alert1')
+ this.ts.trPK('attendance-tracking', 'confirm-alert2')
);
}
}

@ -7,6 +7,8 @@ import { IonicModule } from '@ionic/angular';
import { AttendancePage } from './attendance.page'; import { AttendancePage } from './attendance.page';
import { HomeComponent } from './home/home.component'; import { HomeComponent } from './home/home.component';
import {MonthlyAttendanceComponent} from './monthly-attendance/monthly-attendance.component';
import { HmgCommonModule } from '../hmg-common/hmg-common.module';
const routes: Routes = [ const routes: Routes = [
{ {
@ -16,6 +18,10 @@ const routes: Routes = [
{ {
path: 'home', path: 'home',
component: HomeComponent component: HomeComponent
},
{
path: 'monthlyAttendance',
component: MonthlyAttendanceComponent
} }
] ]
} }
@ -26,8 +32,9 @@ const routes: Routes = [
CommonModule, CommonModule,
FormsModule, FormsModule,
IonicModule, IonicModule,
HmgCommonModule,
RouterModule.forChild(routes) RouterModule.forChild(routes)
], ],
declarations: [AttendancePage, HomeComponent] declarations: [AttendancePage, HomeComponent, MonthlyAttendanceComponent]
}) })
export class AttendancePageModule {} export class AttendancePageModule {}

@ -0,0 +1,113 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<ion-buttons slot="start">
<ion-back-button color="light" class="btnBack" defaultHref="/home"></ion-back-button>
</ion-buttons>
<ion-title color="light">{{ts.trPK('attendance','attendance')}}</ion-title>
</ion-toolbar>
</ion-header>
<ion-content class="colorBG">
<div class="header-div">
<div class="header-div">
<p style="position: absolute; left: 40%; bottom: 65%;">{{currentMonth}}</p>
<ion-slides>
<ion-slide>
<ion-grid class="headerGrid">
<div style="color: black;">
<!-- <ngx-gauge
[type]="gaugeType"
[value]="gaugeValue"
[label]="gaugeLabel">
</ngx-gauge> -->
<div class="result-graph">
<div class="request-heading">
<span>Open Request Analysis</span>
</div>
<div class="result-text-container">
<h2>287</h2>
<span>TOTAL <br> OPEN REQUEST</span>
</div>
<p-chart class="today-graph" type="doughnut" [data]="data" [options]="options"></p-chart>
</div>
<div style="position: relative;
left: 79%;
bottom: 35px;
color: black;
background-color: #22c6b3;
width: 20%; height: 6px;">
</div>
<div style="position: relative;
left: 79%;
bottom: 20px;
color: black;
background-color: #094875;
width: 20%; height: 6px;">
</div>
</div>
</ion-grid>
</ion-slide>
</ion-slides>
</div>
</div>
<div style="margin-top: 45%;">
<ion-grid>
<ion-row>
<ion-col>
<ion-grid class="labelGrid">
<ion-row>
<ion-col>
<label style="font-size: 13px;">SCHEDULE</label>
</ion-col>
<ion-col>
<h2 style="margin-left: 45%; font-size: 25px;">23</h2>
</ion-col>
</ion-row>
</ion-grid>
</ion-col>
<ion-col>
<ion-grid class="labelGrid">
<ion-row>
<ion-col>
<label style="font-size: 12px;">OFF DAYS</label>
</ion-col>
<ion-col>
<h2 style="margin-left: 45%; font-size: 25px;">08</h2>
</ion-col>
</ion-row>
</ion-grid>
</ion-col>
<ion-col>
<ion-grid class="labelGrid">
<label style="font-size: 13px;">NON ANALYZED</label>
<h2 style="margin-left: 45%; font-size: 25px;">01</h2>
</ion-grid>
</ion-col>
<ion-col>
<ion-grid class="labelGrid">
<label style="font-size: 13px;">SHORTAGE HOURS</label>
<h2 style="margin-left: 45%; font-size: 25px;">03</h2>
</ion-grid>
</ion-col>
</ion-row>
</ion-grid>
</div>
<div >
<ion-grid class="bodyGrid">
<app-circle-calendar></app-circle-calendar>
</ion-grid>
</div>
</ion-content>

@ -0,0 +1,242 @@
.colorBG {
--background: #f0efef;
}
.header-div {
background: #22c6b3;
color: var(--light);
text-transform: capitalize;
display: block;
position: relative;
height: 210px;
margin-bottom: 60px;
}
.chart-modal .modal-Wrapper {
--background: rgb(116, 108, 108) !important;
--border-color:white!important ;
width: 85%!important ;
height: 40px !important ;
}
.navbar{
font-size: 10px !important;
--background: #22C6B3 !important;
color: aliceblue !important;
// margin-top: 10px !important;
}
.menu{
// margin-left:330px !important;
margin-top: 0px !important;
font-size: 35px !important;
background: #22C6B3;
color: aliceblue;
margin-left: 0px !important;
}
.person{
margin-left:100px !important;
margin-top: 0px !important;
font-size: 23px !important;
background: #22C6B3 !important;
color: aliceblue !important;
}
.grid{
margin-bottom: 550px !important;
margin-top: 20px !important;
margin-left: 15px !important;
margin-right: 15px !important;
background-color:white !important;
border-radius: 20px !important;
height: 250px !important;
}
.headerGrid{
margin-bottom: 550px !important;
margin-top: 80px !important;
margin-left: 15px !important;
margin-right: 15px !important;
background-color:white !important;
border-radius: 20px !important;
height: 250px !important;
}
.bodyGrid{
margin-bottom: 550px !important;
margin-top: 20px !important;
margin-left: 15px !important;
margin-right: 15px !important;
background-color:white !important;
border-radius: 20px !important;
height: 270px !important;
}
.labelGrid{
margin-top: -30px !important;
background-color:white !important;
border-radius: 20px !important;
height: 100px !important;
}
.ionSliders{
margin: 0px !important;
padding: 0px !important;
}
.ionSlide{
margin-top: 5px !important;
margin-left: 190px !important;
color: black !important;
}
.dateLable{
margin-left: 90px !important;
color: black !important;
font-size: small !important;
margin-top: 15px !important;
}
// h1{
// font-size: 15px !important;
// text-align: center !important;
// }
.arrowDropright{
margin-left:100px !important;
font-size: 20px !important;
color: rgb(168, 165, 165) !important;
margin-top: 15px !important;
}
.arrowDropleft{
font-size: 20px !important;
margin-left: 10px !important;
margin-top: 15px !important;
color: rgb(116, 108, 108) !important;
}
.ionLable{
font-size: 10px !important;
}
.number{
font-size: 18px !important;
font-weight: bolder !important;
color: black !important;
}
.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: #22C6B3;
// background: linear-gradient(90deg, #85C48D 0%, #85C48D 13%, #2BB5C6 98%, #2BB5C6 100%);
color:var(--light);
text-transform: capitalize;
display: block;
position: relative;
height: 210px;
margin-bottom:60px;
// border-radius: 0px 0px 70px 70px;
}
.request-heading {
span {
text-align: center;
display: block;
padding-top: 8px;
font-family: workSans-Regular;
}
}
.result-graph {
position: relative;
background: white;
margin-right: 20px;
margin-left: 20px;
margin-top: 20px;
padding-bottom: 20px;
border-radius: 20px;
}
.result-text-container {
padding: 0;
margin: 0;
position: absolute;
left: 50%;
top: 50%;
display: block;
text-align: center;
transform: translate(-50%, -50%);
h2 {
font-size: 38px;
font-family: WorkSans-Bold;
margin: 0 auto;
line-height: 36px;
}
span {
width: 125px;
display: block;
margin: 0 auto;
font-size: 12px;
font-family: workSans-Regular;
}
}

@ -0,0 +1,27 @@
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { MonthlyAttendanceComponent } from './monthly-attendance.component';
describe('MonthlyAttendanceComponent', () => {
let component: MonthlyAttendanceComponent;
let fixture: ComponentFixture<MonthlyAttendanceComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ MonthlyAttendanceComponent ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(MonthlyAttendanceComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,101 @@
import { Component, OnInit } from '@angular/core';
import { CommonService } from '../../hmg-common/services/common/common.service';
import { TranslatorService } from '../../hmg-common/services/translator/translator.service';
import { SharedDataService } from '../../hmg-common/services/shared-data-service/shared-data.service';
import { GetSubordinatesAttdStatusRequest } from 'src/app/hmg-common/services/dashbored/models/GetSubordinatesAttdStatusRequest';
import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbored.service';
import { GetSubordinatesAttdStatusResponse } from 'src/app/hmg-common/services/dashbored/models/GetSubordinatesAttdStatusResponse';
@Component({
selector: 'app-monthly-attendance',
templateUrl: './monthly-attendance.component.html',
styleUrls: ['./monthly-attendance.component.scss'],
})
export class MonthlyAttendanceComponent implements OnInit {
constructor(
private cs: CommonService,
public ts: TranslatorService,
public sharedData: SharedDataService,
public DS: DashboredService) { }
gaugeType = 'full';
gaugeValue = 28.3;
gaugeLabel = 'Days';
// gaugeAppendText = "km/hr";
currentMonth: any;
todayYear: any;
todayMonth: any;
public options = {
cutoutPercentage: 80,
tooltips: { enabled: false },
legend: { display: false }
};
public data = {
datasets: [
{
data: [120, 50],
backgroundColor: [
'#22c6b3',
'#094875',
],
borderWidth: 2
}]
};
ngOnInit() { }
ionViewWillEnter() {
this.currentMonth = this.sharedData.getSharedData("currentMonth");
console.log(this.currentMonth);
let day = this.currentMonth.split(" ");
this.todayMonth =day[0];
this.todayYear = day[1];
this.todayYear = parseInt(this.todayYear);
console.log("MONTH: " +this.todayMonth);
console.log("YEAR: " +this.todayYear);
this.getSubordinatesAttStatus()
}
getSubordinatesAttStatus() {
let request: GetSubordinatesAttdStatusRequest = new GetSubordinatesAttdStatusRequest();
// request.P_SCHEDULE_DATE_FROM = "/Date(1578603600000+0300)/"; //test
// request.P_SCHEDULE_DATE_TO = "/Date(1576011600000+0300)/";//test
console.log(this.currentMonth);
request.SearchMonth = this.todayMonth;
request.SearchYear = 2019//this.todayYear;
this.DS.getSubordinatesAttStatus(request, () => { console.log("Error "); }).subscribe((result: GetSubordinatesAttdStatusResponse) => {
if (this.cs.validResponse(result)) {
console.log("response");
console.log(result);
}
});
}
x(){
console.log("ENAD CHANge")
}
}

@ -21,7 +21,7 @@ import { SmsPageComponent } from './sms-page/sms-page.page';
import { CheckUserComponent } from './check-user/check-user.component'; import { CheckUserComponent } from './check-user/check-user.component';
import { ChangePasswordComponent } from './change-password/change-password.component'; import { ChangePasswordComponent } from './change-password/change-password.component';
import {ConfirmLoginComponent} from '../authentication/confirm-login/confirm-login.component' import {ConfirmLoginComponent} from '../authentication/confirm-login/confirm-login.component'
import {WelcomeComponent} from '../authentication/welcome/welcome.component'
const routes: Routes = [ const routes: Routes = [
{ {
@ -51,6 +51,10 @@ const routes: Routes = [
{ {
path: 'confirmLogin', path: 'confirmLogin',
component: ConfirmLoginComponent component: ConfirmLoginComponent
},
{
path: 'welcom',
component: WelcomeComponent
} }
] ]
} }
@ -77,7 +81,8 @@ const routes: Routes = [
SmsPageComponent, SmsPageComponent,
CheckUserComponent, CheckUserComponent,
ChangePasswordComponent, ChangePasswordComponent,
ConfirmLoginComponent // ConfirmLoginComponent,
WelcomeComponent
], ],
providers:[ providers:[
FingerprintAIO, FingerprintAIO,

@ -12,23 +12,37 @@
<ion-content padding> <ion-content padding>
<ion-grid> <ion-grid>
<ion-item>
<ion-row >
<ion-col [size]="4">
<img [src]="logo" class="logoHeader" />
</ion-col>
</ion-row>
<br/>
<br/>
<p class="headerTxt" color="light" > {{'changePassword,changePassword' | translate}}</p>
<ion-item class="item-input-login" >
<img class="item-icon" src="assets/imgs/password.png" item-start /> <img class="item-icon" src="assets/imgs/password.png" item-start />
<!-- <ion-label>{{'changePassword,currentPassword' | translate}}</ion-label> --> <!-- <ion-label>{{'changePassword,currentPassword' | translate}}</ion-label> -->
<ion-input required type="password" placeholder="{{ts.trPK('changePassword','currentPassword')}}"[(ngModel)]="P_OLD_PASSWORD"></ion-input> <ion-input class="login-input" required type="password" placeholder="{{ts.trPK('changePassword','currentPassword')}}"[(ngModel)]="P_OLD_PASSWORD"></ion-input>
</ion-item> </ion-item>
<ion-item> <p class="headerTxt" color="light" > {{'changePassword,newPassword' | translate}}</p>
<ion-item class="item-input-login" >
<img class="item-icon" src="assets/imgs/password.png" item-start /> <img class="item-icon" src="assets/imgs/password.png" item-start />
<!-- <ion-label>{{'changePassword,newPassword' | translate}}</ion-label> --> <!-- <ion-label>{{'changePassword,newPassword' | translate}}</ion-label> -->
<ion-input required type="password" placeholder="{{ts.trPK('changePassword','newPassword')}}" <ion-input class="login-input" required type="password" placeholder="{{ts.trPK('changePassword','newPassword')}}"
[(ngModel)]="P_NEW_PASSWORD"> [(ngModel)]="P_NEW_PASSWORD">
</ion-input> </ion-input>
</ion-item> </ion-item>
<ion-item> <ion-item class="item-input-login" >
<img class="item-icon" src="assets/imgs/password.png" item-start /> <img class="item-icon" src="assets/imgs/password.png" item-start />
<!-- <ion-label>{{'changePassword,confirmPassword' | translate}}</ion-label> --> <!-- <ion-label>{{'changePassword,confirmPassword' | translate}}</ion-label> -->
<ion-input required type="password" placeholder="{{ts.trPK('changePassword','confirmPassword')}}" <ion-input class="login-input" required type="password" placeholder="{{ts.trPK('changePassword','confirmPassword')}}"
[(ngModel)]="P_Confirm_NEW_PASSWORD"> [(ngModel)]="P_Confirm_NEW_PASSWORD">
</ion-input> </ion-input>
</ion-item> </ion-item>
@ -40,6 +54,6 @@
</ion-content> </ion-content>
<ion-footer> <ion-footer>
<div class="centerDiv"> <div class="centerDiv">
<ion-button color="customnavy" ion-button (click)="submit()">{{ts.trPK('login','changepassword')}}</ion-button> <ion-button class="button-login" ion-button (click)="submit()">{{ts.trPK('login','changepassword')}}</ion-button>
</div> </div>
</ion-footer> </ion-footer>

@ -0,0 +1,31 @@
.login-input {
border: none;
}
.item-input{
--min-height: 1.0cm !important;
--border-radius: 12px;
--ion-color-base: white !important;
// --background: color: var(--darkgray) !important;
// background: #7f8c8d !important;
border-radius: 33px;
--border: solid #9999992b !important;
border: solid #9999992b !important;
margin-bottom :12px;
margin-left: 12px;
margin-right: 12px;
}
.button-login{
--background: var(--newgreen) !important;
background: var(--newgreen) !important;
white-space: normal;
color: var(--light);
text-transform: capitalize;
min-height: 1.0cm;
--border-radius: 33px !important;
border-radius: 33px !important;
--min-height: 1.6cm !important;
width: 315px;
}

@ -24,7 +24,8 @@ export class ChangePasswordComponent implements OnInit {
public P_Confirm_NEW_PASSWORD : string; public P_Confirm_NEW_PASSWORD : string;
public P_OLD_PASSWORD : string; public P_OLD_PASSWORD : string;
public P_USER_NAME : string; public P_USER_NAME : string;
public logo = "assets/icon/login/lock.png";
userData: any = {}; userData: any = {};
public isExpiredPwd: boolean = false; public isExpiredPwd: boolean = false;
constructor( constructor(

@ -8,10 +8,27 @@
</ion-header> </ion-header>
<ion-content padding> <ion-content padding>
<ion-grid> <ion-grid>
<ion-item>
<ion-row >
<ion-col [size]="4">
<img [src]="logo" class="logoHeader" />
</ion-col>
</ion-row>
<br/>
<br/>
<ion-row>
<ion-col>
<p class="leftDiv">{{ts.trPK('login','check-user-text1')}}<span class="boldTxtNav">{{ts.trPK('login','check-user-text2')}}</span> {{ts.trPK('login','check-user-text3')}}</p>
</ion-col>
</ion-row>
<ion-item class="item-input-login">
<img class="item-icon" src="assets/imgs/username.png" item-start /> <img class="item-icon" src="assets/imgs/username.png" item-start />
<ion-label>{{ts.trPK('login','username')}}</ion-label> <ion-label>{{ts.trPK('login','check-user-text1')}}</ion-label>
<ion-input required type="text" [(ngModel)]="P_USER_NAME"> <ion-input class="login-input" required type="text" [(ngModel)]="P_USER_NAME">
</ion-input> </ion-input>
</ion-item> </ion-item>
</ion-grid> </ion-grid>
@ -19,6 +36,6 @@
</ion-content> </ion-content>
<ion-footer> <ion-footer>
<div class="centerDiv"> <div class="centerDiv">
<ion-button color="customnavy" ion-button (click)=" userCheck()">{{ts.trPK('login','changepassword')}}</ion-button> <ion-button class="button-login" ion-button (click)=" userCheck()">{{ts.trPK('login','changepassword')}}</ion-button>
</div> </div>
</ion-footer> </ion-footer>

@ -4,4 +4,38 @@
.btnBack{ .btnBack{
background: transparent; background: transparent;
} }
///////////////////////////////////////////////////////////
.login-input {
border: none;
}
.item-input{
--min-height: 1.0cm !important;
--border-radius: 12px;
--ion-color-base: white !important;
// --background: color: var(--darkgray) !important;
// background: #7f8c8d !important;
border-radius: 33px;
--border: solid #9999992b !important;
border: solid #9999992b !important;
margin-bottom :12px;
margin-left: 12px;
margin-right: 12px;
}
.button-login{
--background: var(--newgreen) !important;
background: var(--newgreen) !important;
white-space: normal;
color: var(--light);
text-transform: capitalize;
min-height: 1.0cm;
--border-radius: 33px !important;
border-radius: 33px !important;
--min-height: 1.6cm !important;
width: 315px;
}
///////////////////////////////////////////

@ -21,7 +21,8 @@ import {LoginComponent} from 'src/app/authentication/login/login.component';
export class CheckUserComponent implements OnInit { export class CheckUserComponent implements OnInit {
public P_USER_NAME : string; public P_USER_NAME : string;
private loginData = new LoginModel(); private loginData = new LoginModel();
public logo = "assets/icon/login/lock.png";
@ViewChild(InternationalMobileComponent) internationlMobile: InternationalMobileComponent; @ViewChild(InternationalMobileComponent) internationlMobile: InternationalMobileComponent;
constructor(public cs: CommonService, constructor(public cs: CommonService,
public authService: AuthenticationService, public authService: AuthenticationService,

@ -1,4 +1,4 @@
<ion-header> <ion-header *ngIf="!accessFromOutSide">
<ion-toolbar class="header-toolbar"> <ion-toolbar class="header-toolbar">
<ion-buttons slot="start"> <ion-buttons slot="start">
<ion-back-button color="light" class="btnBack" ></ion-back-button> <ion-back-button color="light" class="btnBack" ></ion-back-button>
@ -9,20 +9,28 @@
<ion-content padding> <ion-content [scrollEvents]="true"
<ion-grid> [ngClass]="{'content-class':accessFromOutSide, 'ion-padding': !accessFromOutSide}" has-bouncing="false" forceOverscroll="false" scrollY="false" class="ion-no-padding">
<ion-grid class="ion-justify-content-center">
<ion-row class="ion-justify-content-center"> <ion-row *ngIf="!accessFromOutSide">
<ion-col [size]="4"> <ion-col [size]="4">
<img [src]="logo" class="logo" /> <img [src]="logo" class="logo" />
</ion-col> </ion-col>
</ion-row> </ion-row>
<ion-row class="description"> <ion-row class="description" *ngIf="!accessFromOutSide">
<ion-col size="12"> <ion-col size="12">
<!-- <type-writer *ngIf="onlySMSBox" [text]="'login,verify-login-with' | translate" class="description" <!-- <type-writer *ngIf="onlySMSBox" [text]="'login,verify-login-with' | translate" class="description"
color="primary" fontSize="0.55cm" lineHeight="1cm" fontSize="0.55cm"></type-writer> color="primary" fontSize="0.55cm" lineHeight="1cm" fontSize="0.55cm"></type-writer>
--> -->
<div *ngIf="onlySMSBox"><p>{{ts.trPK('login','verify-login-with')}}</p></div> <ion-row>
<ion-col [size]="12">
<!-- <img [src]="logo" class="loginLogo" />
<h1 class="heading1">{{welcome}} </h1> -->
<!-- <p class="text1" style="margin-bottom: -8px;font-weight: bold;font-size: 22px;">{{ts.trPK('login','Verify-text')}} </p> -->
<p class="text1" style="font-size: 28px;margin-bottom: 0px" >{{empname}}</p>
</ion-col>
</ion-row> <div *ngIf="onlySMSBox"><p>{{ts.trPK('login','verify-login-with')}}</p></div>
<!-- <type-writer *ngIf="!onlySMSBox" [text]="'login, verify-fingerprint' | translate" class="description" <!-- <type-writer *ngIf="!onlySMSBox" [text]="'login, verify-fingerprint' | translate" class="description"
color="primary" fontSize="0.55cm" lineHeight="1cm" fontSize="0.55cm"></type-writer> color="primary" fontSize="0.55cm" lineHeight="1cm" fontSize="0.55cm"></type-writer>
--> -->
@ -32,19 +40,32 @@
</ion-col> </ion-col>
</ion-row> </ion-row>
<page-trailer [small]="true"></page-trailer>
<ion-row [dir]="direction" class="zoomIn"> <ion-row [ngClass]=" accessFromOutSide ? 'rowOutside' : ''" [dir]="direction" class="zoomIn">
<ng-container *ngFor="let buttonsGroup of buttons">
<ng-container *ngFor="let buttonsGroup of buttons">
<ng-container *ngFor="let button of buttonsGroup">
<ion-col [size]="accessFromOutSide ? 12 : 6" *ngIf="button.visible">
<!-- <ng-container *ngFor="let buttonsGroup of buttons">
<ion-col *ngFor="let button of buttonsGroup" [size]="6"> <ion-col *ngFor="let button of buttonsGroup" [size]="6">
<app-button (click)="confirm(button)" [title]="button.title | translate " [icon]="button.icon" <ion-col [size]="accessFromOutSide ? 12 : 6" *ngIf="button.visible"> -->
<app-button (click)="checkAccess(button)" [title]="button.title | translate " [icon]="button.icon"
[settings]="button.settings" [strong]="button.txt" [class]="button.class" [disabled]="button.disabled" [settings]="button.settings" [strong]="button.txt" [class]="button.class" [disabled]="button.disabled"
*ngIf="button.visible"> *ngIf="button.visible"
[buttonClass]="button.buttonClass" [pClass]="button.pClass">
</app-button> </app-button>
</ion-col> </ion-col>
</ng-container> </ng-container>
</ng-container>
</ion-row> </ion-row>
<page-trailer [small]="true"></page-trailer>
</ion-grid> </ion-grid>
</ion-content> </ion-content>

@ -0,0 +1,10 @@
.content-class {
height: 25vh;
}
.rowOutside{
// margin-top: -37px;
}

@ -1,4 +1,4 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit, Input } from '@angular/core';
import {ButtonSettings} from "src/app/hmg-common/ui/button/models/button-settingsl"; import {ButtonSettings} from "src/app/hmg-common/ui/button/models/button-settingsl";
@ -27,6 +27,8 @@ import { SMSCheckResponse } from "src/app/hmg-common/services/authentication/mod
import { PushService } from 'src/app/hmg-common/services/push/push.service'; import { PushService } from 'src/app/hmg-common/services/push/push.service';
import { Platform } from '@ionic/angular'; import { Platform } from '@ionic/angular';
import { CheckUserAuthenticationResponse } from 'src/app/hmg-common/services/authentication/models/check-user-auth.response';
import { LoginModel } from '../models/LoginModel';
@ -44,7 +46,7 @@ import { Platform } from '@ionic/angular';
export class ConfirmLoginComponent implements OnInit { export class ConfirmLoginComponent implements OnInit {
public logo = "assets/imgs/CS.png"; public logo = "assets/icon/login/password.png";
public buttons:any=[]; public buttons:any=[];
@ -52,7 +54,7 @@ export class ConfirmLoginComponent implements OnInit {
onlySMSBox: any = true; onlySMSBox: any = true;
loginData:any; public loginData = new LoginModel();
selectedOption: any; selectedOption: any;
@ -62,7 +64,12 @@ export class ConfirmLoginComponent implements OnInit {
deviceToken:any; deviceToken:any;
@Input() accessFromOutSide = false;
@Input() visible = true;
username: any;
password:any;
loginType: any;
empname: string;
constructor( constructor(
@ -87,14 +94,15 @@ export class ConfirmLoginComponent implements OnInit {
) { ) {
this.loginData= this.sharedData.getSharedData(AuthenticationService.LOGIN_DATA, false); this.loginData= this.sharedData.getSharedData(AuthenticationService.LOGIN_DATA, false);
console.log(this.loginData); console.log("logindata: "+this.loginData);
this.deviceToken= this.cs.sharedService.getSharedData(AuthenticationService.DEVICE_TOKEN, false); this.deviceToken= this.cs.sharedService.getSharedData(AuthenticationService.DEVICE_TOKEN, false);
console.log("deviceToken :"+this.deviceToken); console.log("deviceToken :"+this.deviceToken);
//if device token undefind //if device token undefind
@ -108,7 +116,9 @@ export class ConfirmLoginComponent implements OnInit {
this.lastLogin = this.cs.sharedService.getSharedData(AuthenticationService.LAST_LOGIN, false); this.lastLogin = this.cs.sharedService.getSharedData(AuthenticationService.LAST_LOGIN, false);
this.username = localStorage.getItem("user");
this.password = localStorage.getItem("password");
this.empname = localStorage.getItem("emp-name");
} }
@ -121,8 +131,9 @@ export class ConfirmLoginComponent implements OnInit {
this.checkIfAvailable(); this.checkIfAvailable();
//**getSharedData of IMEI_USER_DATA and REGISTER_DATA_FOR_LOGIIN to set defult value **// //**getSharedData of IMEI_USER_DATA and REGISTER_DATA_FOR_LOGIIN to set defult value **//
this.username = localStorage.getItem("user");
this.password = localStorage.getItem("password");
this.empname = localStorage.getItem("emp-name");
// this.setDefault(); // this.setDefault();
@ -214,7 +225,10 @@ export class ConfirmLoginComponent implements OnInit {
disabled: this.isFaceorFinger === "finger" || this.isFaceorFinger === "biometric" ? false : true, disabled: this.isFaceorFinger === "finger" || this.isFaceorFinger === "biometric" ? false : true,
visible: this.onlySMSBox visible: this.onlySMSBox,
buttonClass: 'buttonClassWhite',
pClass: 'pClassMyFileIconBlack',
class: 'nationalIdIcon',
}, },
@ -232,7 +246,10 @@ export class ConfirmLoginComponent implements OnInit {
disabled: this.isFaceorFinger === "face" ? false : true, disabled: this.isFaceorFinger === "face" ? false : true,
visible: this.onlySMSBox visible: this.onlySMSBox,
buttonClass: 'buttonClassWhite',
pClass: 'pClassMyFileIconBlack',
class: 'nationalIdIcon',
}, },
@ -248,7 +265,10 @@ export class ConfirmLoginComponent implements OnInit {
value: 4, value: 4,
visible: true visible: true,
buttonClass: 'buttonClassWhite',
pClass: 'pClassMyFileIconBlack',
class: 'nationalIdIcon',
}, },
@ -264,7 +284,10 @@ export class ConfirmLoginComponent implements OnInit {
value: 1, value: 1,
visible: true visible: true,
buttonClass: 'buttonClassWhite',
pClass: 'pClassMyFileIconBlack',
class: 'nationalIdIcon',
} }
@ -278,6 +301,7 @@ export class ConfirmLoginComponent implements OnInit {
confirm(el: any) { confirm(el: any) {
console.log("confirm:"+ el ); console.log("confirm:"+ el );
this.selectedOption = this.selectedOption && !this.onlySMSBox ? this.selectedOption : el.value; this.selectedOption = this.selectedOption && !this.onlySMSBox ? this.selectedOption : el.value;
@ -286,13 +310,15 @@ export class ConfirmLoginComponent implements OnInit {
case 1: case 1:
console.log(el.value); console.log(el.value);
localStorage.setItem("login-type",el.value);
console.log("login-type: "+ localStorage.getItem("login-type"))
this.loginWithSMS(el); this.loginWithSMS(el);
break; break;
case 2: case 2:
localStorage.setItem("login-type",el.value);
console.log(el.value); console.log(el.value);
@ -303,6 +329,7 @@ export class ConfirmLoginComponent implements OnInit {
break; break;
case 3: case 3:
localStorage.setItem("login-type",el.value);
console.log(el.value); console.log(el.value);
@ -316,6 +343,7 @@ export class ConfirmLoginComponent implements OnInit {
console.log(el.value); console.log(el.value);
localStorage.setItem("login-type",el.value);
this.loginWithWhatsapp(el); this.loginWithWhatsapp(el);
@ -335,7 +363,7 @@ export class ConfirmLoginComponent implements OnInit {
AuthenticationService.LAST_LOGIN AuthenticationService.LAST_LOGIN
); );
} }
@ -460,7 +488,7 @@ export class ConfirmLoginComponent implements OnInit {
this.cs.sharedService.setSharedData({ this.cs.sharedService.setSharedData({
MobileNumber: this.loginData.mobileNumber, MobileNumber: this.loginData.MobileNumber,
loginType: this.selectedOption loginType: this.selectedOption
@ -651,7 +679,7 @@ export class ConfirmLoginComponent implements OnInit {
if ( result.Mohemm_GetPatientID_List[0].LoginType == 2 || result.Mohemm_GetPatientID_List[0].LoginType == 3) { if ( result.Mohemm_GetPatientID_List[0].LoginType == 2 || result.Mohemm_GetPatientID_List[0].LoginType == 3) {
this.loginTokenID = result.LogInTokenID; this.loginTokenID = result.LogInTokenID;
//send silent sms
this.checkSMS(); this.checkSMS();
} else { } else {
@ -712,11 +740,13 @@ export class ConfirmLoginComponent implements OnInit {
this.authService.setAuthenticatedUser(result).subscribe(() => { this.authService.setAuthenticatedUser(result).subscribe(() => {
console.log("insert"); console.log("insert");
localStorage.setItem("emp-name",result.MemberInformationList[0].EMPLOYEE_NAME);
console.log("empnmae: "+ localStorage.getItem("emp-name"));
if (this.platform.is("cordova")) { if (this.platform.is("cordova")) {
this.insertMobileLogin(); this.insertMobileLogin();
} }
this.cs.openHome(); this.cs.openHome();
@ -785,6 +815,77 @@ console.log("succssful insertMobileLoginInfo" );
} }
//do silent login
private checkUserAuthentication() {
console.log("debug Here!!");
this.cs.startLoading();
const request = new LoginRequest();
request.P_USER_NAME = this.username;
request.P_LANGUAGE = "US";//this.language;
request.P_PASSWORD = this.password;
console.log(request);
this.authService
.login(request, () => {
console.log("error here");
//console.log(result.MessageStatus);
//this.sharedData.setSharedData(true, Password.IS_EXPIRED_PSW);
//this.userCheck();
}, this.ts.trPK("general", "ok"))
.subscribe((result: CheckUserAuthenticationResponse) => {
console.log("success");
this.cs.stopLoading();
if (this.cs.validResponse(result)) {
console.log("result.LogInTokenID "+ result.LogInTokenID);
console.log("this.loginData before "+ this.loginData);
this.loginData = new LoginModel();
console.log("this.loginData after "+ this.loginData);
this.loginData.LogInTokenID = result.LogInTokenID;
this.loginData.MobileNumber = result.MemberLoginList.P_MOBILE_NUMBER;
this.loginData.P_USER_NAME = this.username;
this.sharedData.setSharedData(this.loginData, AuthenticationService.LOGIN_DATA);
this.cs.sharedService.setSharedData(this.loginData.P_USER_NAME, LoginRequest.SHARED_DATA);
//this.remeberMyInfo();
//this.cs.openSMSPage(); phase#1 one type of OTP
// if(!this.welcomeBack){
//this.cs.openConfirmLoginPage();//phase#2 add 4 types for OTP
// }
this.confirm(this.loginType);
} else {
console.log("result.IsPasswordExpired");
console.log(result.IsPasswordExpired);
if (result.IsPasswordExpired) {
// alert("dont forget to handelpresentPasswordExpiredDialog() ");
// this.presentPasswordExpiredDialog(); *****
}
}
});
}
checkAccess(el:any){
let data = this.sharedData.getSharedData(AuthenticationService.LOGIN_DATA, false);
this.loginType=el;
if(this.accessFromOutSide){
// alert("this.accessFromOutSide" + this.accessFromOutSide);
this.checkUserAuthentication();
}
else{
// alert("this.accessFromOutSide" + this.accessFromOutSide);
if(!data == undefined ){
// alert("data.LogInTokenID" + data.LogInTokenID);
this.confirm(this.loginType);
}
else{
this.checkUserAuthentication();
}
}
}//end checkAccess
} }

@ -10,20 +10,30 @@
<ion-content padding> <ion-content padding>
<ion-grid> <ion-grid>
<ion-item>
<ion-row>
<ion-col [size]="4">
<img [src]="logo" class="logoHeader" />
</ion-col>
</ion-row>
<br/>
<br/>
<ion-item class="item-input-login">
<img class="item-icon" src="assets/imgs/password.png" item-start /> <img class="item-icon" src="assets/imgs/password.png" item-start />
<ion-label>{{'changePassword,newPassword' | translate}}</ion-label> <ion-label>{{'changePassword,newPassword' | translate}}</ion-label>
<ion-input required type="password" <ion-input class="login-input" required type="password"
[(ngModel)]="P_NEW_PASSWORD"> [(ngModel)]="P_NEW_PASSWORD">
</ion-input> </ion-input>
</ion-item> </ion-item>
<ion-item> <ion-item class="item-input-login">
<img class="item-icon" src="assets/imgs/password.png" item-start /> <img class="item-icon" src="assets/imgs/password.png" item-start />
<ion-label>{{'changePassword,confirmPassword' | translate}}</ion-label> <ion-label>{{'changePassword,confirmPassword' | translate}}</ion-label>
<ion-input required type="password" <ion-input class="login-input" required type="password"
[(ngModel)]="P_Confirm_NEW_PASSWORD"> [(ngModel)]="P_Confirm_NEW_PASSWORD">
</ion-input> </ion-input>
</ion-item> </ion-item>
@ -35,6 +45,6 @@
</ion-content> </ion-content>
<ion-footer> <ion-footer>
<div class="centerDiv"> <div class="centerDiv">
<ion-button color="customnavy" ion-button (click)=" forgotpassword()">{{ts.trPK('login','changepassword')}}</ion-button> <ion-button class="button-login" ion-button (click)=" forgotpassword()">{{ts.trPK('login','changepassword')}}</ion-button>
</div> </div>
</ion-footer> </ion-footer>

@ -21,6 +21,8 @@ export class ForgotComponent implements OnInit {
public P_NEW_PASSWORD: string; public P_NEW_PASSWORD: string;
public P_Confirm_NEW_PASSWORD : string; public P_Confirm_NEW_PASSWORD : string;
public P_USER_NAME : string; public P_USER_NAME : string;
public logo = "assets/icon/login/lock.png";
constructor( constructor(
public cs: CommonService, public cs: CommonService,
public authService: AuthenticationService, public authService: AuthenticationService,

@ -1,28 +1,57 @@
<ion-content padding> <ion-content padding>
<ion-grid class="customGrid"> <ion-grid class="customGrid">
<ion-row> <!-- <ion-row>
<ion-col class="colPad"> <ion-col class="colPad">
<img class="centerDiv" src="../assets/imgs/CS.png" /> <img class="centerDiv" src="../assets/imgs/header.png" />
</ion-col> </ion-col>
</ion-row> -->
<ion-row *ngIf="loginDiv">
<div class="content">
<div class="first-circle"></div>
<div class="middle-circle"></div>
<div class="last-circle"></div>
</div>
</ion-row> </ion-row>
<ion-row *ngIf="welcomeBack ">
<ion-col [size]="4">
<img [src]="logo" class="logo" />
<!-- <ion-img class="centerDiv" src="../assets/imgs/CS.png"></ion-img> -->
</ion-col>
</ion-row>
<ion-row> <ion-row>
<ion-col> <ion-col *ngIf="loginDiv">
<P class="pageTitle text-caps">{{ts.trPK('login','login')}}</P> <P class="pageTitle text-caps">{{ts.trPK('login','login')}}</P>
</ion-col> </ion-col>
</ion-row> </ion-row>
</ion-grid> </ion-grid>
<div *ngIf="loginDiv">
<ion-item> <ion-item class="item-input-login">
<img class="item-icon" src="assets/imgs/username.png" item-start /> <img class="item-icon" src="assets/imgs/username.png" item-start />
<ion-input required type="text" [(ngModel)]="username" placeholder="{{ts.trPK('login','username')}}"> <ion-input class="login-input" required type="text" [(ngModel)]="username" placeholder="{{ts.trPK('login','username')}}">
</ion-input> </ion-input>
</ion-item> </ion-item>
<ion-item> <ion-item class="item-input-login">
<img class="item-icon" src="assets/imgs/password.png" item-start /> <img class="item-icon" src="assets/imgs/password.png" item-start />
<ion-input required type="password" [(ngModel)]="password" placeholder="{{ts.trPK('login','password')}}"> <ion-input class="login-input" required type="password" [(ngModel)]="password" placeholder="{{ts.trPK('login','password')}}">
</ion-input> </ion-input>
<button ion-button clear class="forgetText" type="button" (click)="forgetPasswordPage()" item-right >
{{ts.trPK('login','forgot-password')}}
</button>
</ion-item> </ion-item>
<ion-item> <ion-item>
<ion-label>{{ts.trPK('login','remeber-me')}}</ion-label> <ion-label>{{ts.trPK('login','remeber-me')}}</ion-label>
@ -39,13 +68,33 @@
<button disabled class="gridBtn arTxt" ion-button (click)="changeLanguage()" style="background: #dcdcdc !important;color: #ccc6c6 !important;margin: 1px;width: 49%">عربي</button> <button disabled class="gridBtn arTxt" ion-button (click)="changeLanguage()" style="background: #dcdcdc !important;color: #ccc6c6 !important;margin: 1px;width: 49%">عربي</button>
</div> </div>
</div>
<!-- div login-->
<!-- <div *ngIf="welcomeBack"> -->
<welcome-login (onLogin)="login()" (loginWithUser)="loginWithUser()" *ngIf="welcomeBack ">
</welcome-login>
<!-- </div> -->
</ion-content> </ion-content>
<ion-footer> <ion-footer *ngIf="loginDiv">
<div class="centerDiv"> <div class="centerDiv">
<ion-button color="customnavy" (click)="onLogin()">{{ts.trPK('login','login')}}</ion-button> <ion-button class="button-login" (click)="onLogin()">{{ts.trPK('login','login')}}</ion-button>
</div> </div>
<br /> <br />
<div class="centerDiv"> <!-- <div class="centerDiv">
<a (click)="forgetPasswordPage()">{{ts.trPK('login','forgot-password')}}</a> <a (click)="forgetPasswordPage()">{{ts.trPK('login','forgot-password')}}</a>
</div> </div> -->
<ion-row>
<ion-col class="colPad">
<img class="centerDiv logoFotor" src="../assets/imgs/CSLogo.png" />
</ion-col>
</ion-row>
</ion-footer> </ion-footer>

@ -110,3 +110,121 @@ img.centerDiv {
} }
.login-input {
border: none;
}
.item-input{
--min-height: 1.0cm !important;
--border-radius: 12px;
--ion-color-base: white !important;
// --background: color: var(--darkgray) !important;
// background: #7f8c8d !important;
border-radius: 33px;
--border: solid #9999992b !important;
border: solid #9999992b !important;
margin-bottom :12px;
margin-left: 12px;
margin-right: 12px;
}
.button-login{
--background: var(--newgreen) !important;
background: var(--newgreen) !important;
white-space: normal;
color: var(--light);
text-transform: capitalize;
min-height: 1.0cm;
--border-radius: 33px !important;
border-radius: 33px !important;
--min-height: 1.6cm !important;
width: 315px;
}
.content {
width: 500px;
margin-left: auto;
margin-right: auto;
}
.first-circle {
background: var(--newgreen) !important;
border-radius: 50%;
height: 292px;
width: 288px;
float: left;
margin-left: -55px;
margin-top: -140px;
}
.middle-circle {
position: relative;
background:var(--darkblue) !important;
border-radius: 50%;
height: 160px;
width: 170px;
margin: -115px 0px 0px 179px;
}
.last-circle {
position: inherit;
background: var(--lightblue) !important;
border-radius: 50%;
height: 166px;
width: 140px;
margin: -147px 0px 0px 274px;
}
.logoFotor {
width: 45px !important;
height: 45px !important;
}
.welcomeText{
justify-content: center;
align-items: center;
text-align: left;
font-size: 26px;
font-weight: bold;
color: #f2f2f2;
margin-top: 178px;
margin-left: 48px;
}
.forgetText{
background: transparent;
color: var(--darkblue) !important;
}
@media only screen and (max-width: 980px) {
.content{width:100%;}
}
.circle1{
width: 15%;
padding-top: 15%;
margin:0 42%;
background-color: black;
border-radius: 50%;
display:inline-block;
}
.circle2{
width: 15%;
padding-top: 15%;
margin-left: 20%;
background-color:darkred;
border-radius: 50%;
display:inline-block;
margin-top:20px;
}
.circle3{
width: 15%;
padding-top: 15%;
margin-left: 26%;
background-color:gold;
border-radius: 50%;
display:inline-block;
margin-top:20px;
margin-right: 15%;
}

@ -15,6 +15,7 @@ import { LoginRequest } from "src/app/hmg-common/services/authentication/models/
import { Password } from '../models/password'; import { Password } from '../models/password';
import { CheckUserAuthenticationRequest } from 'src/app/hmg-common/services/authentication/models/check-user-auth.request'; import { CheckUserAuthenticationRequest } from 'src/app/hmg-common/services/authentication/models/check-user-auth.request';
import { CheckAppVersionResponse } from 'src/app/hmg-common/services/authentication/models/check-app-version.response'; import { CheckAppVersionResponse } from 'src/app/hmg-common/services/authentication/models/check-app-version.response';
import { PushService } from 'src/app/hmg-common/services/push/push.service';
@Component({ @Component({
selector: "login", selector: "login",
@ -39,6 +40,12 @@ export class LoginComponent implements OnInit, OnDestroy {
private isMobileFingerPrint: boolean; private isMobileFingerPrint: boolean;
private FingerPrintPatientIdentificationID: string; private FingerPrintPatientIdentificationID: string;
private loginData = new LoginModel(); private loginData = new LoginModel();
private empname:any;
private logintype:any;
public loginDiv:boolean =true;
public welcomeBack:boolean =false;
public logo = "assets/icon/login/password.png";
constructor( constructor(
public cs: CommonService, public cs: CommonService,
@ -52,15 +59,26 @@ export class LoginComponent implements OnInit, OnDestroy {
public device: Device, public device: Device,
public splash: SplashScreen, public splash: SplashScreen,
public sharedData: SharedDataService, public sharedData: SharedDataService,
public plt: Platform public plt: Platform,
public pushService: PushService
) { } ) { }
ngOnInit() { ngOnInit() {
this.username = localStorage.getItem("user"); this.username = localStorage.getItem("user");
this.password = localStorage.getItem("password"); this.password = localStorage.getItem("password");
let remember = localStorage.getItem("remember"); let remember = localStorage.getItem("remember");
this.empname= localStorage.getItem("emp-name");
this.logintype= localStorage.getItem("login-type");
if (remember == "true") { this.remeberMe = true } else { this.remeberMe = false } if (remember == "true") { this.remeberMe = true } else { this.remeberMe = false }
if(this.username || this.empname){
this.loginDiv=false;
this.welcomeBack=true;
}else{
this.loginDiv=true;
this.welcomeBack=false;
}
// alert("user>>" + this.username); // alert("user>>" + this.username);
// alert("pass>>>" + this.password); // alert("pass>>>" + this.password);
// alert("remember>>>" + this.remeberMe); // alert("remember>>>" + this.remeberMe);
@ -91,24 +109,38 @@ export class LoginComponent implements OnInit, OnDestroy {
public addValue(e): void { public addValue(e): void {
// console.log(e.currentTarget.checked); // console.log(e.currentTarget.checked);
this.remeberMe = e.currentTarget.checked; this.remeberMe = true;//e.currentTarget.checked;
this.remeberMyInfo(); this.remeberMyInfo();
} }
public remeberMyInfo() { public remeberMyInfo() {
if (this.remeberMe) { // if (this.remeberMe) {
if(this.username){localStorage.setItem("user", this.username);} if(this.username){localStorage.setItem("user", this.username);}
if(this.password){localStorage.setItem("password", this.password);} if(this.password){localStorage.setItem("password", this.password);}
localStorage.setItem("remember", "true"); localStorage.setItem("remember", "true");
} else { // } else {
localStorage.setItem("user", ""); // localStorage.setItem("user", "");
localStorage.setItem("password", ""); // localStorage.setItem("password", "");
localStorage.setItem("remember", "false"); // localStorage.setItem("remember", "false");
} // }
} }
public onLogin() { public onLogin() {
this.checkAppUpdated(); // console.log("onLogin");
// this.checkAppUpdated();
// this.checkUserAuthentication(); // this.checkUserAuthentication();
let deviceToken = localStorage.getItem('deviceToken');
if (deviceToken) {
console.log('login enabled first time: ' + deviceToken);
this.checkAppUpdated();
} else {
this.pushService.startReceiving();
setTimeout(() => {
deviceToken = localStorage.getItem('deviceToken');
this.checkAppUpdated();
console.log('login enabled second time: ' + deviceToken);
}, 1000);
}
} }
public checkAppUpdated() { public checkAppUpdated() {
@ -141,6 +173,10 @@ export class LoginComponent implements OnInit, OnDestroy {
private checkUserAuthentication() { private checkUserAuthentication() {
console.log("debug Here!!"); console.log("debug Here!!");
console.log(this.username);
console.log(this.language);
console.log(this.password);
this.cs.startLoading(); this.cs.startLoading();
const request = new LoginRequest(); const request = new LoginRequest();
request.P_USER_NAME = this.username; request.P_USER_NAME = this.username;
@ -165,7 +201,9 @@ export class LoginComponent implements OnInit, OnDestroy {
this.cs.sharedService.setSharedData(this.loginData.P_USER_NAME, LoginRequest.SHARED_DATA); this.cs.sharedService.setSharedData(this.loginData.P_USER_NAME, LoginRequest.SHARED_DATA);
this.remeberMyInfo(); this.remeberMyInfo();
//this.cs.openSMSPage(); phase#1 one type of OTP //this.cs.openSMSPage(); phase#1 one type of OTP
// if(!this.welcomeBack){
this.cs.openConfirmLoginPage();//phase#2 add 4 types for OTP this.cs.openConfirmLoginPage();//phase#2 add 4 types for OTP
// }
} else { } else {
@ -250,4 +288,18 @@ export class LoginComponent implements OnInit, OnDestroy {
}); });
} }
login() {
console.log("login emit");
console.log("login");
// this.checkUserAuthentication();
this.loginDiv=true;
this.welcomeBack=false;
}
loginWithUser() {
console.log("loginWithUser")
this.cs.openConfirmLoginPage();
}
} }

@ -10,13 +10,19 @@
<ion-content padding> <ion-content padding>
<ion-grid> <ion-grid>
<ion-row> <ion-row>
<ion-col class="colPad"> <ion-col [size]="4">
<ion-img class="centerDiv" src="../assets/imgs/CS.png"></ion-img> <img [src]="logo" class="logo" />
<!-- <ion-img class="centerDiv" src="../assets/imgs/CS.png"></ion-img> -->
</ion-col> </ion-col>
</ion-row> </ion-row>
<br/>
<br/>
<ion-row> <ion-row>
<ion-col> <ion-col>
<p class="centerDiv">{{'verificationcode,title' | translate}}<span class="boldTxtNav">{{'verificationcode,verificationcode' | translate}}</span> {{'verificationcode,by' | translate}}<span class="boldTxtNav">{{'verificationcode,sms' | translate}}</span>{{'verificationcode,instruct' | translate}}<span class="boldTxtNav">{{'general,submit' | translate}}</span></p> <p class="headerTxt" > {{'verificationcode,verificationcode' | translate}}</p>
<br/>
<p class="leftDiv">{{'verificationcode,title' | translate}}<span class="boldTxtNav">{{'verificationcode,verificationcode' | translate}}</span> {{'verificationcode,by' | translate}}<span class="boldTxtNav">{{'verificationcode,sms' | translate}}</span>{{'verificationcode,instruct' | translate}}<span class="boldTxtNav">{{'general,submit' | translate}}</span></p>
</ion-col> </ion-col>
</ion-row> </ion-row>
</ion-grid> </ion-grid>
@ -25,15 +31,34 @@
<div> <div>
<h1 text-center>{{displayTime}}</h1> <h1 text-center>{{displayTime}}</h1>
<br/><br/> <br/><br/>
<ion-item> <!-- <ion-item>
<!-- <ion-label>{{'verificationcode,verificationcode' | translate}}</ion-label> --> //<ion-label>{{'verificationcode,verificationcode' | translate}}</ion-label>
<!-- <img class="item-icon" src="assets/imgs/password.png" item-start /> --> // <img class="item-icon" src="assets/imgs/password.png" item-start />
<ion-input required type="tel" maxlength="4" (keyup)="checkOTPLength()" placeholder="{{translate.trPK('verificationcode','verificationcode')}}" [(ngModel)]="activationCode"></ion-input> <ion-input required type="tel" maxlength="4" (keyup)="checkOTPLength()" placeholder="{{translate.trPK('verificationcode','verificationcode')}}" [(ngModel)]="activationCode"></ion-input>
</ion-item> </ion-item> -->
</div>
<ion-row class="sms_code" dir="ltr">
<ion-col [size]="12">
<ion-input type="tel" [(ngModel)]="smc_code[0]" maxLength="1" size="1" min="0" max="9" pattern="[0-9]{1}"
inputmode="tel" (ionInput)="goToNextInput($event)" (ionChange)="onChange()" #ref autofocus="true">
</ion-input>
<ion-input type="tel" [(ngModel)]="smc_code[1]" maxLength="1" size="1" min="0" max="9" pattern="[0-9]{1}"
inputmode="tel" (ionInput)="goToNextInput($event)" (ionChange)="onChange()"></ion-input>
<ion-input type="tel" [(ngModel)]="smc_code[2]" maxLength="1" size="1" min="0" max="9" pattern="[0-9]{1}"
inputmode="tel" (ionInput)="goToNextInput($event)" (ionChange)="onChange()"></ion-input>
<ion-input type="tel" [(ngModel)]="smc_code[3]" maxLength="1" size="1" min="0" max="9" pattern="[0-9]{1}"
inputmode="tel" (ionInput)="goToNextInput($event)" (ionChange)="onChange()"></ion-input>
</ion-col>
</ion-row>
</div>
</ion-content> </ion-content>
<ion-footer> <ion-footer>
<div class="centerDiv"> <div class="centerDiv">
<ion-button color="customnavy" ion-button (click)="checkVerificationCode()">{{'general,submit' | translate}}</ion-button> <ion-button class="button-login" ion-button (click)="checkVerificationCode()">{{'general,submit' | translate}}</ion-button>
</div> </div>
</ion-footer> </ion-footer>

@ -18,4 +18,51 @@ h1{
span{ span{
font-weight: bold; font-weight: bold;
} }
.button-login{
--background: var(--newgreen) !important;
background: var(--newgreen) !important;
white-space: normal;
color: var(--light);
text-transform: capitalize;
min-height: 1.0cm;
--border-radius: 33px !important;
border-radius: 33px !important;
--min-height: 1.6cm !important;
width: 315px;
}
.leftDiv {
margin: auto;
text-align: left;
display: block;
}
.sms_code{
margin: 0px;
text-align: center;
}
ion-input {
margin: 0 5px;
text-align: center;
line-height: 0;
font-size: 32px;
//border: solid 1px #ccc;
border: solid 0.01cm #000000;
//box-shadow: 0 0 5px #ccc inset;
outline: none;
width: 20%;
transition: all .2s ease-in-out;
border-radius: 3px;
display: inline-block;
&:focus {
border-color:var(--ion-color-secondary) !important;
box-shadow: 0 0 5px var(--ion-color-secondary) !important inset;
}
&::selection {
background: transparent;
}
}

@ -75,6 +75,12 @@ export class SmsPageComponent implements OnInit {
public loginTypeData:any; public loginTypeData:any;
public logo = "assets/icon/login/password.png";
public smc_code: any = [];
code: any;
constructor( constructor(
public navCtrl: NavController, public navCtrl: NavController,
@ -131,7 +137,7 @@ export class SmsPageComponent implements OnInit {
this.loginTypeData= this.common.sharedService.getSharedData(SMSCheckRequest.SHARED_DATA, false); this.loginTypeData= this.common.sharedService.getSharedData(SMSCheckRequest.SHARED_DATA, false);
console.log("loginType :"+this.loginTypeData.loginType); // console.log("loginType :"+this.loginTypeData.loginType);
@ -258,16 +264,17 @@ export class SmsPageComponent implements OnInit {
} }
checkVerificationCode() { checkVerificationCode() {
this.code=this.smc_code.join('');
if (this.count < 3) { if (this.count < 3) {
if ( if (
this.activationCode == undefined || this.code == undefined ||
this.activationCode == null || this.code == null ||
this.activationCode == "" this.code == ""
) { ) {
@ -282,7 +289,7 @@ export class SmsPageComponent implements OnInit {
this.checkForgetPwdSMS(); this.checkForgetPwdSMS();
} else { } else {
console.log("checkSMS");
this.checkSMS(); this.checkSMS();
} }
@ -304,7 +311,7 @@ export class SmsPageComponent implements OnInit {
public checkSMS() { public checkSMS() {
// alert("checkSMS in page") // alert("checkSMS in page")
console.log("code" + this.code);
const data = this.sharedData.getSharedData(AuthenticationService.LOGIN_DATA, false); const data = this.sharedData.getSharedData(AuthenticationService.LOGIN_DATA, false);
const request = new SMSCheckRequest(); const request = new SMSCheckRequest();
@ -313,7 +320,7 @@ export class SmsPageComponent implements OnInit {
request.LogInTokenID = data.LogInTokenID; request.LogInTokenID = data.LogInTokenID;
request.activationCode = this.activationCode; request.activationCode = this.code; //code;this.activationCode;
request.P_USER_NAME = data.P_USER_NAME; request.P_USER_NAME = data.P_USER_NAME;
@ -336,15 +343,17 @@ export class SmsPageComponent implements OnInit {
this.authService.setAuthenticatedUser(result).subscribe(() => { this.authService.setAuthenticatedUser(result).subscribe(() => {
//call insert Mobile Login //call insert Mobile Login
console.log("insert");
localStorage.setItem("emp-name",result.MemberInformationList[0].EMPLOYEE_NAME);
console.log("empnmae: "+ localStorage.getItem("emp-name"));
if (this.platform.is("cordova")) { if (this.platform.is("cordova")) {
// localStorage.setItem("full-name", result.P_USER_NAME);
this.insertMobileLogin(); this.insertMobileLogin();
} }
this.common.openHome(); this.common.openHome();
@ -417,7 +426,7 @@ console.log("successful insertMobileLogin" );
request.LogInTokenID = data.LogInTokenID; request.LogInTokenID = data.LogInTokenID;
request.activationCode = this.activationCode; request.activationCode =this.code;// this.activationCode;
request.P_USER_NAME = data.P_USER_NAME; request.P_USER_NAME = data.P_USER_NAME;
@ -457,6 +466,53 @@ console.log("successful insertMobileLogin" );
}); });
}
onChange() {
const filtered = this.smc_code.filter(function (el) {
if (el) {
return el;
}
});
if (filtered.length === 4) {
//this.validate();
console.log("validate");
this.checkVerificationCode();
}
}
goToNextInput(e) {
// let value = e.target.value;
// if (value.length === 1) {
const key = e.which;
const t = e.target;
let sib = t.nextElementSibling;
if (key !== 9 && (key < 48 || key > 57)) {
if (key === 8 || key === 46) {
return true;
} else {
e.preventDefault();
return false;
}
}
if (key === 9) {
return true;
}
if (sib) {
//sib = document.querySelector('input');
if (e.target.value) {
sib.setFocus();
}
}
// } else {
// e.target.value = value.substring(0, value.length - 1);
// }
} }
} }

@ -0,0 +1,27 @@
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { WelcomeComponent } from './welcome.component';
describe('WelcomeComponent', () => {
let component: WelcomeComponent;
let fixture: ComponentFixture<WelcomeComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ WelcomeComponent ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(WelcomeComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,14 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-welcome',
templateUrl: './welcome.component.html',
styleUrls: ['./welcome.component.scss'],
})
export class WelcomeComponent implements OnInit {
constructor() { }
ngOnInit() {}
}

@ -21,7 +21,6 @@
<div [ngClass]="{'selectedDiv': selectedMenu == i,'notSelected': selectedMenu != i }"> <div [ngClass]="{'selectedDiv': selectedMenu == i,'notSelected': selectedMenu != i }">
<ion-text> <ion-text>
<b>{{menuItem.PROMPT}}</b> <b>{{menuItem.PROMPT}}</b>
</ion-text> </ion-text>
</div> </div>
<!-- Child Pages --> <!-- Child Pages -->
@ -30,7 +29,7 @@
(click)="openPage(subPage)"> (click)="openPage(subPage)">
<ion-row> <ion-row>
<ion-col size="12" class="menu-name"><span ion-text color="color2">&nbsp;{{subPage.PROMPT}}</span> <ion-col size="12" class="menu-name"><span ion-text color="color2">&nbsp;{{subPage.PROMPT}}</span>
</ion-col> </ion-col>
</ion-row> </ion-row>
</ion-item> </ion-item>
</ion-list> </ion-list>

@ -20,7 +20,7 @@ export class HomeComponent implements OnInit {
constructor(private cs: CommonService, private ts: TranslatorService) { constructor(private cs: CommonService, private ts: TranslatorService) {
this.menu = this.cs.sharedService.getSharedData('menuEntries', false); this.menu = this.cs.sharedService.getSharedData('menuEntries', false);
this.selMenu = this.cs.sharedService.getSharedData(MenuResponse.SHARED_DATA, 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; 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) { openPage(page, index) {
// Reset the content nav to have just this page // Reset the content nav to have just this page
// we wouldn't want the back button to show in this scenario // 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); this.goToRequest(page);
} else { } else {
if (this.selectedMenu == 0) { if (this.selectedMenu === 0) {
this.selectedMenu = -1; this.selectedMenu = -1;
} else if (this.selectedMenu != -1) { } else if (this.selectedMenu !== -1) {
this.selectedMenu = -1; this.selectedMenu = -1;
} else { } else {
this.selectedMenu = index; this.selectedMenu = index;
@ -47,14 +47,17 @@ export class HomeComponent implements OnInit {
selMenu = this.cs.sharedService.getSharedData(MenuResponse.SHARED_DATA, false); selMenu = this.cs.sharedService.getSharedData(MenuResponse.SHARED_DATA, false);
selMenu.GetMenuEntriesList = menuEntry; selMenu.GetMenuEntriesList = menuEntry;
this.cs.sharedService.setSharedData(selMenu, MenuResponse.SHARED_DATA); this.cs.sharedService.setSharedData(selMenu, MenuResponse.SHARED_DATA);
if (menuEntry.REQUEST_TYPE == 'ABSENCE') { if (menuEntry.REQUEST_TYPE === 'ABSENCE') {
this.cs.openAbsencePage(); this.cs.openAbsencePage();
} else if (menuEntry.REQUEST_TYPE == 'EIT') { } else if (menuEntry.REQUEST_TYPE === 'EIT') {
this.cs.openEitListPage(); this.cs.openEitListPage();
} }
if (menuEntry.REQUEST_TYPE =='PAYSLIP'){ if (menuEntry.REQUEST_TYPE === 'PAYSLIP'){
this.cs.openPayslipPage(); this.cs.openPayslipPage();
} }
if (menuEntry.REQUEST_TYPE === 'TIME_CARD') {
this.cs.openTimeCardPage();
}
} }
} }

@ -0,0 +1,8 @@
import { FeedbackDirective } from './feedback.directive';
describe('FeedbackDirective', () => {
it('should create an instance', () => {
const directive = new FeedbackDirective();
expect(directive).toBeTruthy();
});
});

@ -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();
}
}

@ -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();
});
});

@ -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) {
}
}
}

@ -42,19 +42,14 @@ import { NativeStorage } from '@ionic-native/native-storage/ngx';
import { ProgressLoadingService } from './ui/progressLoading/progress-loading.service'; import { ProgressLoadingService } from './ui/progressLoading/progress-loading.service';
import { BarChartComponent } from './ui/bar-chart/bar-chart.component'; import { BarChartComponent } from './ui/bar-chart/bar-chart.component';
import { DonutChartComponent } from './ui/donut-chart/donut-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 { EmailComponent } from './ui/email/email.component';
import { Badge } from '@ionic-native/badge/ngx'; import { Badge } from '@ionic-native/badge/ngx';
// import { Push } from '@ionic-native/push/ngx';
import { PushService } from './services/push/push.service'; import { PushService } from './services/push/push.service';
import { LifeCycleService } from './services/life-cycle/life-cycle.service'; import { LifeCycleService } from './services/life-cycle/life-cycle.service';
import { HmgBrowserService } from './services/hmg-browser/hmg-browser.service'; import { HmgBrowserService } from './services/hmg-browser/hmg-browser.service';
import { GuidService } from './services/guid/guid.service'; import { GuidService } from './services/guid/guid.service';
import { TabsBarComponent } from './ui/tabs-bar/tabs-bar.component'; import { TabsBarComponent } from './ui/tabs-bar/tabs-bar.component';
import { PageTrailerComponent } from './ui/spacer/page-trailer/page-trailer.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 { ButtonComponent } from './ui/button/button.component';
import { ToolbarButtonComponent } from './ui/toolbar-button/toolbar-button.component'; import { ToolbarButtonComponent } from './ui/toolbar-button/toolbar-button.component';
import { ListboxModule } from 'primeng/listbox'; import { ListboxModule } from 'primeng/listbox';
@ -82,24 +77,35 @@ import { Diagnostic } from '@ionic-native/diagnostic/ngx';
import { DetailButtonComponent } from './ui/detail-button/detail-button.component'; import { DetailButtonComponent } from './ui/detail-button/detail-button.component';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { HeaderButtonComponent } from './ui/header-button/header-button.component'; 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 { AppRate } from '@ionic-native/app-rate/ngx';
import { RatingService } from './services/rating/rating.service'; import { RatingService } from './services/rating/rating.service';
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx'; import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
import { RateService } from './services/rate/rate.service'; 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 { MenuService } from './services/menu/menuservice.service';
import { ReplacementListComponent } from '../vacation-rule/replacement-list/replacement-list.component'; import { ReplacementListComponent } from '../vacation-rule/replacement-list/replacement-list.component';
import { FileSelectDirective } from 'ng2-file-upload'; 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 { 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 {File} from '@ionic-native/file/ngx';
import {FileUploderProfileComponent} from './ui/file-uploder-profile/file-uploder-profile.component' import {FileUploderProfileComponent} from './ui/file-uploder-profile/file-uploder-profile.component'
import { OpenNativeSettings } from '@ionic-native/open-native-settings/ngx'; import { OpenNativeSettings } from '@ionic-native/open-native-settings/ngx';
import { AccordinCustomComponent } from './ui/accordin-custom/accordin-custom.component'; import { AccordinCustomComponent } from './ui/accordin-custom/accordin-custom.component';
import { AccordinTabCustomComponent} from './ui/accordin-custom/accordin-tab-custom/accordin-tab-custom.component' import { AccordinTabCustomComponent} from './ui/accordin-custom/accordin-tab-custom/accordin-tab-custom.component'
import { StatsButtonComponent } from './ui/stats-button/stats-button.component';
import { ServicesButtonComponent } from './ui/services-button/services-button.component';
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 {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 { CircleCalendarComponent } from './ui/circle-calendar/circle-calendar.component';
import { NgCalendarModule } from 'ionic2-calendar';
import { NgxGaugeModule } from 'ngx-gauge';
import { DateInfoModalComponent } from './ui/circle-calendar/date-info-modal/date-info-modal.component';
import { ChartModule } from 'primeng/chart';
@NgModule({ @NgModule({
imports: [ imports: [
CommonModule, CommonModule,
@ -109,9 +115,15 @@ import { AccordinTabCustomComponent} from './ui/accordin-custom/accordin-tab-cus
HttpClientModule, HttpClientModule,
NgxChartsModule, NgxChartsModule,
ListboxModule, ListboxModule,
PdfViewerModule PdfViewerModule,
NgCircleProgressModule.forRoot(),
NgCalendarModule,
NgxGaugeModule,
ChartModule
], ],
declarations: [ declarations: [
FabButtonComponent,
WelcomeComponent,
NumberRangeComponent, NumberRangeComponent,
SSpacerComponent, SSpacerComponent,
MSpacerComponent, MSpacerComponent,
@ -165,9 +177,18 @@ import { AccordinTabCustomComponent} from './ui/accordin-custom/accordin-tab-cus
WorkListAttachViewComponent, WorkListAttachViewComponent,
FileUploderProfileComponent, FileUploderProfileComponent,
AccordinTabCustomComponent, AccordinTabCustomComponent,
AccordinCustomComponent AccordinCustomComponent,
StatsButtonComponent,
ServicesButtonComponent,
ConfirmLoginComponent,
ConfirmLoginComponent,
CircleCalendarComponent,
DateInfoModalComponent
], ],
exports: [ exports: [
FabButtonComponent,
WelcomeComponent,
NumberRangeComponent, NumberRangeComponent,
SSpacerComponent, SSpacerComponent,
MSpacerComponent, MSpacerComponent,
@ -212,15 +233,27 @@ import { AccordinTabCustomComponent} from './ui/accordin-custom/accordin-tab-cus
EmptyDataComponent, EmptyDataComponent,
DetailButtonComponent, DetailButtonComponent,
HeaderButtonComponent, HeaderButtonComponent,
//PaymentComponent,
ReplacementListComponent, ReplacementListComponent,
FileSelectDirective, FileSelectDirective,
WorkListAttachViewComponent, WorkListAttachViewComponent,
FileUploderProfileComponent, FileUploderProfileComponent,
AccordinTabCustomComponent, AccordinTabCustomComponent,
AccordinCustomComponent AccordinCustomComponent,
StatsButtonComponent,
ServicesButtonComponent,
ConfirmLoginComponent,
NgCircleProgressModule,
ConfirmLoginComponent,
CircleCalendarComponent,
DateInfoModalComponent,
NgCalendarModule,
NgxGaugeModule,
ChartModule
], ],
providers: [ providers: [
AttendScanService,
DashboredService,
ConnectorService, ConnectorService,
TranslatorService, TranslatorService,
Globalization, Globalization,
@ -234,14 +267,10 @@ import { AccordinTabCustomComponent} from './ui/accordin-custom/accordin-tab-cus
NativeStorage, NativeStorage,
ProgressLoadingService, ProgressLoadingService,
PushService, PushService,
//UserLocalNotificationService,
//LocalNotifications,
Badge, Badge,
LifeCycleService, LifeCycleService,
HmgBrowserService, HmgBrowserService,
GuidService, GuidService,
// BackgroundGeolocation,
//GeofencingService,
Keyboard, Keyboard,
KeyboardService, KeyboardService,
Diagnostic, Diagnostic,
@ -250,17 +279,17 @@ import { AccordinTabCustomComponent} from './ui/accordin-custom/accordin-tab-cus
HMGPreloadingStrategy, HMGPreloadingStrategy,
HMGPreloadingStrategyLoading, HMGPreloadingStrategyLoading,
Diagnostic, Diagnostic,
// CallNumber,
AppRate, AppRate,
RatingService, RatingService,
InAppBrowser, InAppBrowser,
RateService, RateService,
Camera, Camera,
File, File,
//PaymentService,
MenuService, MenuService,
OpenNativeSettings OpenNativeSettings,
] BarcodeScanner,
],
entryComponents: [DateInfoModalComponent],
}) })
export class HmgCommonModule { } export class HmgCommonModule { }

@ -0,0 +1,12 @@
import { TestBed } from '@angular/core/testing';
import { AttendScanService } from './attend-scan.service';
describe('AttendScanService', () => {
beforeEach(() => TestBed.configureTestingModule({}));
it('should be created', () => {
const service: AttendScanService = TestBed.get(AttendScanService);
expect(service).toBeTruthy();
});
});

@ -0,0 +1,123 @@
import { Injectable } from '@angular/core';
// import { DevicePermissionsService } from '../device-permissions/device-permissions.service';
import { DomSanitizer } from '@angular/platform-browser';
import { SharedDataService } from '../shared-data-service/shared-data.service';
import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';
import { AttendanceService } from 'src/app/home/services/attendance.services';
import { ZBar } from '@ionic-native/zbar/ngx';
import { Geolocation } from "@ionic-native/geolocation/ngx";
import { attendanceSwipeScannerRequest } from 'src/app/home/models/attendanceSwipe.Request';
import { AuthenticatedUser } from '../authentication/models/authenticated-user';
import { CommonService } from '../common/common.service';
import { TranslatorService } from '../translator/translator.service';
import { Response } from "src/app/hmg-common/services/models/response";
import { Camera, CameraOptions,PictureSourceType} from "@ionic-native/Camera/ngx";
import { DevicePermissionsService } from '../../services/device-permissions/device-permissions.service'
import { Device } from "@ionic-native/device/ngx";
@Injectable({
providedIn: 'root'
})
export class AttendScanService {
location: boolean;
camera: boolean;
lat: any;
longt: any;
deviceID: string;
scannedResult: any;
userData: any = {};
constructor(private device: Device,
private zbar: ZBar,
private geolocation: Geolocation,
private attendance_service: AttendanceService,
private barcodeScanner: BarcodeScanner,
private cameraController: Camera,
public sharedData: SharedDataService,
private sanitizer: DomSanitizer,
private permissions: DevicePermissionsService,
public common:CommonService,
public ts: TranslatorService,) {
this.userData =this.common.sharedService.getSharedData(AuthenticatedUser.SHARED_DATA,false);
}
public getDeviceLocation() {
let isVirtual = this.device.isVirtual;
if(isVirtual==true){
alert("emulater>>>>>>>"+isVirtual);
alert("You are using virtual device");
return false;
}
this.permissions.requestLocationAutherization().then(granted => {
this.location = granted as boolean;
if (this.location) {
this.geolocation
.getCurrentPosition({ maximumAge: 3000, timeout: 10000, enableHighAccuracy: true })
.then(resp => {
// console.log(resp.coords.latitude);
// console.log(resp.coords.longitude);
this.lat = resp.coords.latitude;
this.longt = resp.coords.longitude;
this.attendance();
})
.catch(error => {
console.log("Error getting location", error);
});
} else {
return false;
}
});
}
public attendance() {
this.permissions.requestCameraAutherization().then(granted => {
this.camera = granted as boolean;
if (this.camera) {
this.scanCode();
}
}
);
}
public scanCode() {
this.barcodeScanner.scan().then(barcodeData => {
console.log('Barcode data', barcodeData);
// let strResult = JSON.parse(barcodeData);
// console.log(strResult.QRValue);
this.scannedResult = barcodeData;
this.deviceID = this.device.uuid;
this.swipeAttendance();
}).catch(err => {
console.log('Error', err);
});
}
public swipeAttendance() {
let request: attendanceSwipeScannerRequest = new attendanceSwipeScannerRequest();
request.Latitude = this.lat;
request.Longitude = this.longt;
request.QRValue = this.scannedResult.text;
request.UID = this.deviceID;
request.UserName = this.userData.EMPLOYEE_NUMBER;
console.log("request");
console.log(JSON.stringify(request));
this.attendance_service
.attendanceSwipeScanner(request, () => {
console.log("Error inside in swipe attendance");
})
.subscribe((result: Response) => {
if (this.common.validResponse(result)) {
console.log("response");
console.log(result);
this.common.presentAlert(this.ts.trPK("home", "swipeAlertSuccess"));
} else {
this.common.presentAlert(this.ts.trPK("home", "swipeAlertFailed"));
}
});
}
}

@ -16,5 +16,6 @@ export class SMSCheckResponse extends Response {
public CompanyImageDescription:string; public CompanyImageDescription:string;
public CompanyImageURL:string; public CompanyImageURL:string;
public EMPLOYEE_MOBILE_NUMBER:string; public EMPLOYEE_MOBILE_NUMBER:string;
public EMPLOYEE_NAME:string;
} }

@ -112,6 +112,64 @@ export class CommonService {
this.nav.pop(); 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 { public round(value: number, decimal: number): string {
const valueStr = value.toString(); const valueStr = value.toString();
const dotIndex = valueStr.indexOf("."); 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() { public clearAllAlerts() {
// custom solutions because of async issue // custom solutions because of async issue
const alerts = document.getElementsByTagName("ion-alert"); const alerts = document.getElementsByTagName("ion-alert");
@ -969,6 +1072,10 @@ export class CommonService {
/* /*
open calls open calls
*/ */
public openAttenTrackingpage(){
this.nav.navigateForward(["/attendance-tracking/home"]);
}
public openEitListPage() { public openEitListPage() {
this.nav.navigateForward(["/eit/eit-list"]); this.nav.navigateForward(["/eit/eit-list"]);
} }
@ -1071,6 +1178,9 @@ export class CommonService {
public openPayslipPage() { public openPayslipPage() {
this.nav.navigateForward(["/payslip/home"]); this.nav.navigateForward(["/payslip/home"]);
} }
public openTimeCardPage() {
this.nav.navigateForward(["/time-card/time-card-details"]);
}
public openEarningsPage() { public openEarningsPage() {
this.nav.navigateForward(["/payslip/Earnings"]); this.nav.navigateForward(["/payslip/Earnings"]);
} }
@ -1081,6 +1191,10 @@ export class CommonService {
this.nav.navigateForward(["/authentication/confirmLogin"]); this.nav.navigateForward(["/authentication/confirmLogin"]);
} }
public navigatePage(path) {
this.nav.navigateForward([path]);
}
public reload(url: string, from: string) { public reload(url: string, from: string) {
console.log("force reload called from:" + from); console.log("force reload called from:" + from);
// window.location.reload(); // window.location.reload();

@ -0,0 +1,10 @@
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;
}

@ -0,0 +1,5 @@
export class OpenMissingSwipesList {
public P_OPEN_MISSING_SWIPES: number;
public P_RETURN_STATUS: string;
public P_RETURN_MSG: string;
}

@ -0,0 +1,4 @@
export class OrganizationsSalariesList{
public ORGANIZATION_NAME :string;
public ORGANIZATIONS_SALARIES : number;
}

@ -0,0 +1,6 @@
export class PerformanceAppraisalList{
public APPRAISAL_SCORE :string;
public APPRAISAL_YEAR : number;
}

@ -0,0 +1,8 @@
import { Response } from 'src/app/hmg-common/services/models/response';
import { AttendanceTrackingList } from './AttensanceTrackingList';
export class AttendanceTrackingResponse extends Response {
public GetGetAttendanceTrackingList: AttendanceTrackingList[];
}

@ -0,0 +1,12 @@
import { TestBed } from '@angular/core/testing';
import { DashboredService } from './dashbored.service';
describe('DashboredService', () => {
beforeEach(() => TestBed.configureTestingModule({}));
it('should be created', () => {
const service: DashboredService = TestBed.get(DashboredService);
expect(service).toBeTruthy();
});
});

@ -0,0 +1,99 @@
import { Injectable } from '@angular/core';
import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service';
import { ConnectorService } from 'src/app/hmg-common/services/connector/connector.service';
import { Observable } from 'rxjs';
import { Request } from 'src/app/hmg-common/services/models/request';
import { OrganizationSalariesResponse } from './organization-salaries.response';
import { OpenMissingSwipesResponse } from './open-missing-swipes.response';
import { PerformanceAppraisalResponse } from './performance-appraisal.response';
import {AttendanceTrackingResponse} from './attendance-tracking.response'
import {OpenPeriodDatesResponse} from '../../services/dashbored/models/openPeriodDatesResponse'
import {GetSubordinatesLeavesRequest} from './models/GetSubordinatesLeavesRequest';
import {GetSubordinatesLeavesResponse} from './models/GetSubordinatesLeavesResponse';
import {GetSubordinatesAttdStatusRequest} from './models/GetSubordinatesAttdStatusRequest';
import {GetSubordinatesAttdStatusResponse} from './models/GetSubordinatesAttdStatusResponse';
import {GetOpenNotificationsResponse} from './models/GetOpenNotificationsResponse'
@Injectable({
providedIn: 'root'
})
export class DashboredService {
public static organizationSalariesUrl = 'Services/ERP.svc/REST/GET_ORGANIZATIONS_SALARIES';
public static openMissingSwipesUrl = 'Services/ERP.svc/REST/GET_OPEN_MISSING_SWIPES';
public static performanceappraisalUrl = 'Services/ERP.svc/REST/GET_Performance_Appraisal';
public static attendancetrackingUrl = 'Services/ERP.svc/REST/GET_Attendance_Tracking';
public static getOpenPeriodDates = 'Services/ERP.svc/REST/GET_OPEN_PERIOD_DATES';
public static getOpenNotifications = 'Services/ERP.svc/REST/GET_OPEN_NOTIFICATIONS';
public static getSubordinatesLeaves = 'Services/ERP.svc/REST/GET_SUBORDINATES_LEAVES';
public static getSubordinatesAttStatus = 'Services/ERP.svc/REST/GET_SUBORDINATES_ATTD_STATUS';
constructor(
public con: ConnectorService,
public authService: AuthenticationService,
) { }
public getOrganizationSalaries(onError ?: any ,oerrorLable ?: any): Observable<OrganizationSalariesResponse>{
const request = new Request();
this.authService.authenticateRequest(request);
return this.con.post(
DashboredService.organizationSalariesUrl,
request,
onError,
oerrorLable
);}
public getOpenMissingSwipes(onError ?: any, oerrorLable ?: any): Observable<OpenMissingSwipesResponse> {
const request = new Request();
this.authService.authenticateRequest(request);
return this.con.post(
DashboredService.openMissingSwipesUrl,
request,
onError,
oerrorLable
);
}
public getPerformanceAppraisal(onError ?: any ,oerrorLable ?: any): Observable<PerformanceAppraisalResponse>{
const request = new Request();
this.authService.authenticateRequest(request);
return this.con.post(
DashboredService.performanceappraisalUrl,
request,
onError,
oerrorLable
);
}
public getAttendanceTracking(onError ?: any ,oerrorLable ?: any): Observable<AttendanceTrackingResponse>{
const request = new Request();
this.authService.authenticateRequest(request);
return this.con.post(
DashboredService.attendancetrackingUrl,
request,
onError,
oerrorLable
);
}
public getOpenPeriodDates( onError?: any, errorLabel?: string): Observable<OpenPeriodDatesResponse> {
const request = new Request();
this.authService.authenticateRequest(request);
return this.con.post(DashboredService.getOpenPeriodDates, request, onError, errorLabel);
}
public getOpenNotifications( onError?: any, errorLabel?: string): Observable<GetOpenNotificationsResponse> {
const request = new Request();
this.authService.authenticateRequest(request);
return this.con.post(DashboredService.getOpenNotifications, request, onError, errorLabel);
}
public getSubordinatesLeaves( req: GetSubordinatesLeavesRequest,onError?: any, errorLabel?: string): Observable<GetSubordinatesLeavesResponse> {
this.authService.authenticateRequest(req);
return this.con.post(DashboredService.getSubordinatesLeaves, req, onError, errorLabel);
}
public getSubordinatesAttStatus( req: GetSubordinatesAttdStatusRequest, onError?: any, errorLabel?: string): Observable<GetSubordinatesAttdStatusResponse> {
this.authService.authenticateRequest(req);
return this.con.post(DashboredService.getSubordinatesAttStatus, req, onError, errorLabel);
}
}

@ -0,0 +1,6 @@
export class GetOpenNotificationsList {
public ITEM_TYPE: number;
public ITEM_TYPE_DISPLAY_NAME: number;
public OPEN_NTF_NUMBER: number;
public P_OPEN_NTF_NUMBER: number;
}

@ -0,0 +1,7 @@
import { GetOpenNotificationsList } from './GetOpenNotificationsList';
import { Response } from '../../../services/models/response'
export class GetOpenNotificationsResponse extends Response {
public GetOpenNotificationsList: GetOpenNotificationsList [];
}

@ -0,0 +1,16 @@
export class GetSubordinatesAttdStatusList
{
public NUMBER_OF_EMPLOYEES: number;
public LATE_IN:number;
public EARLY_OUT:number;
public ON_TIME:number;
public ABSENCE:number;
}

@ -0,0 +1,10 @@
import { Request } from '../../../services/models/request'
export class GetSubordinatesAttdStatusRequest extends Request{
//public static SHARED_DATA = '';
public P_SCHEDULE_DATE_FROM: any;
public P_SCHEDULE_DATE_TO: any;
public SearchMonth: string;
public SearchYear: number;
}

@ -0,0 +1,7 @@
import { GetSubordinatesAttdStatusList } from './GetSubordinatesAttdStatusList';
import { Response } from '../../../services/models/response'
export class GetSubordinatesAttdStatusResponse extends Response {
public GetSubordinatesAttdStatusList: GetSubordinatesAttdStatusList [];
}

@ -0,0 +1,35 @@
export class GetSubordinatesLeavesList
{
public LVL: number;
public EMPLOYEE_NUMBER:String;
public EMPLOYEE_NAME:String;
public ORGANIZATION_ID:number;
public ORGANIZATION_NAME:String
public SUPERVISOR_NUMBER:String;
public SUPERVISOR_NAME:String;
public SUPERVISOR_ORGANIZATION_ID:number;
public SUPERVISOR_ORGANIZATION_NAME:String;
public EVENT_DATE:any;//DATE;
public LEAVE_TYPE:String;
public DATE_START:any;//DATE;
public DATE_END:any;//DATE;
public ABSENCE_ATTENDANCE_TYPE_NAME:String;
public CALENDAR_ENTRY_DESC:String;
public STATUS:String;
}

@ -0,0 +1,8 @@
import { Request } from '../../../services/models/request'
export class GetSubordinatesLeavesRequest extends Request{
//public static SHARED_DATA = '';
public P_DATE_FROM :any;
public P_DATE_TO :any;
}

@ -0,0 +1,7 @@
import { GetSubordinatesLeavesList } from './GetSubordinatesLeavesList';
import { Response } from '../../../services/models/response'
export class GetSubordinatesLeavesResponse extends Response {
public GetSubordinatesLeavesList: GetSubordinatesLeavesList [];
}

@ -0,0 +1,7 @@
export class OpenPeriodDatesList {
public P_CLOSING_PERIOD_DATE: any;
public P_PERIOD_END_DATE: any;
public P_PERIOD_START_DATE: any;
public P_RETURN_MSG: string;
public P_RETURN_STATUS: string;
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save