Compare commits

...

131 Commits

Author SHA1 Message Date
Mohamed Mekawy 3651f5a04a edit math floor 6 years ago
enadhilal 8d1ad091e9 add image and fix text and chaneg the BG color for any page did not have data 6 years ago
Mohamed Mekawy c6409c4620 Merge branch 'home' into master-newdesign 6 years ago
Mohamed Mekawy 8f9ef27ee1 add my team to side menu & handle accural balance in absence page 6 years ago
ashwaq 4a0ca75f6d fix login 6 years ago
Mohamed Mekawy 0928d55171 edit home last login way 6 years ago
Mohamed Mekawy afed126eaf edit my team icon 6 years ago
Mohamed Mekawy 024ed04baf merge master-newdesign 6 years ago
Mohamed Mekawy b0b76cd5e0 add vacation rule icon 6 years ago
umasoodch 1aa290f627 fixed attendance issue 6 years ago
Mohamed Mekawy ae3a2e4995 merge master-newdesign 6 years ago
umasoodch f1157f48f6 fixed timecard module 6 years ago
Mohamed Mekawy 5557f7d3ba add vacation rule to service list 6 years ago
Mohamed Mekawy 8c55d3995a edit time input 6 years ago
Mohamed Mekawy c3339148ed fix my team request for employee list 6 years ago
Mohamed Mekawy 1f044cfb3e Merge branch 'master-newdesign' into work-list 6 years ago
Mohamed Mekawy 5d41967ed7 edit login token 6 years ago
umasoodch 7ed63baf68 added myteam navigation 6 years ago
umasoodch 561db9109f Merge branch 'master-newdesign' into myteam
# Conflicts:
#	Mohem/package-lock.json
#	Mohem/package.json
#	Mohem/src/app/eit/home/home.component.html
#	Mohem/src/app/hmg-common/hmg-common.module.ts
#	Mohem/src/app/home/home.page.ts
#	Mohem/src/app/notification/home/home.component.html
#	Mohem/src/theme/styles.scss
6 years ago
ashwaq fee59fb259 fix 6 years ago
ashwaq a4ad4e9d49 fix static value 6 years ago
ashwaq e7e9ec7b63 fix conflict 6 years ago
ashwaq 527ee02627 add get login last info 6 years ago
Mohamed Mekawy dd7cf45685 edit design 6 years ago
umasoodch 69ea2637d6 my-team attendance issues resolved 6 years ago
Mohamed Mekawy f781cd8eae Merge branch 'master-newdesign' into accural-balance 6 years ago
Mohamed Mekawy a694396f82 add click to status button & add icon to service buttons & fix issues 6 years ago
Fatimah.Alshammari c1e72539de edit ticketbalance &absense home &payslip header 6 years ago
Mohamed Mekawy 08c8ea71b1 Merge branch 'master-newdesign' into home 6 years ago
Mohamed Mekawy 05387d81d4 merge master-newdesign 6 years ago
Mohamed Mekawy 70fd9e5ebc edit ticket balance design 6 years ago
Mohamed Mekawy 5fcde27564 merge master-newdesign 6 years ago
Fatimah.Alshammari d2940a70d0 add ticket balance 6 years ago
Mohamed Mekawy c37d469ea7 add new design for EIT & Absence subpage 6 years ago
ashwaq 18dabcb13e add vacation rule 6 years ago
enadhilal 1f50906684 make segment active when first open & fixing skip function 6 years ago
Fatimah.Alshammari e71dd383da finish leave balance chart 6 years ago
umasoodch bf825662a9 fixed attendance tracking and removed unnecessary code 6 years ago
Mohamed Mekawy d1d3a307b7 finish replacement modal 6 years ago
umasoodch 05ea5e349f fixed tslint issues 6 years ago
umasoodch 8f83946c48 Merge branch 'itg-new-design' into work-list
# Conflicts:
#	Mohem/src/app/notification/home/home.component.html
#	Mohem/src/app/notification/home/home.component.scss
#	Mohem/src/app/notification/home/home.component.ts
6 years ago
umasoodch 0e17984b20 fixed conflict issues 6 years ago
umasoodch 14e1c27591 added item-type in search 6 years ago
Fatimah.Alshammari e37311f726 edit translation 6 years ago
Mohamed Mekawy 6385c93e56 edit background color 6 years ago
Mohamed Mekawy e3cdfa31eb finish submit absence request 6 years ago
Mohamed Mekawy 721066c859 finish absence history page 6 years ago
Mohamed Mekawy 69db29931f finish absence confirmation page & add absence submit modal 6 years ago
Mohamed Mekawy 2ee9d51f7e finish Eit new design 6 years ago
enadhilal a3109bc0a8 create and design ITG form 6 years ago
Mohamed Mekawy 4d6167d6e8 finish confirmation page 6 years ago
umasoodch 55f5b391e1 Merge branch 'new-time-card' into myteam 6 years ago
umasoodch 7ecc3e5048 removed unnecessary code 6 years ago
Fatimah.Alshammari 573941941f edit monthly attendance 6 years ago
umasoodch a78477c192 fixed attendance tracking issue 6 years ago
Mohamed Mekawy c85a5ef82a design confirmation page 6 years ago
Mohamed Mekawy 2b5265243e add history&RequestPage 6 years ago
umasoodch a9128c93e2 completed my-team 6 years ago
umasoodch 4bf4d4fc24 fixed merging conflicts 6 years ago
enadhilal b27f976bc9 push to merge with worklist work 6 years ago
Fatimah.Alshammari 32e33e655b edit style 6 years ago
umasoodch 7406d6f990 completed my-team except attendance one 6 years ago
Fatimah.Alshammari 2a71811ca2 edit monthley attendance 6 years ago
ashwaq 2c5c0599d8 fix conflict worklist 6 years ago
ashwaq 93f973022c fix conflict 6 years ago
ashwaq 838e7cf99b add worklist+ fix conflict 6 years ago
ashwaq eb9413edb9 add worklist fix conflict 6 years ago
ashwaq ece6e45d97 add worklist new design 6 years ago
umasoodch 93e59d2618 added about data for team member 6 years ago
umasoodch 6eeca7479d my team new design componentes created 6 years ago
umasoodch 5208584999 added worklist filters logic 6 years ago
enadhilal 2f55272c91 new-time-card 6 years ago
umasoodch 96971a6b68 resolved conflict issues with master branch 6 years ago
umasoodch 09afc19dbb fixed multiple swipe alert issue 6 years ago
Mohamed Mekawy f316629cb0 merge master-newdesign branch 6 years ago
Mohamed Mekawy 396241bc83 merge emp-profile branch 6 years ago
umasoodch 7bd0701d75 fixed design issues for attendance tracking 6 years ago
Fatimah.Alshammari afc8c99639 add new design to payslip 6 years ago
umasoodch 9177721b59 completed worklist task 6 years ago
Mohamed Mekawy 52d9e04dac merge master-newdesign with emp-profile 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
Fatimah.Alshammari b9e1a95601 Add new profile page & years of experience & Performance appraisal 6 years ago
enadhilal f3fdc1454f monthly-attendance design 6 years ago
umasoodch d2fac5c4d5 added header for worklist 6 years ago
umasoodch e629aab07a merged and fixed all the conflicting issues and also removed unnecessary code 6 years ago
umasoodch 86e96c11d0 added search modal and its CSS 6 years ago
umasoodch 2e6dd95004 completed work list ui part 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"
}
],
"scripts": [],
"scripts": ["node_modules/chart.js/dist/Chart.js"],
"es5BrowserSupport": true
},
"configurations": {

@ -1,5 +1,5 @@
<?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>
<description>An awesome Ionic/Cordova app.</description>
<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="call-number" spec="^1.0.1" />
<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-plugin-nativestorage" spec="^2.3.2" />
<plugin name="cordova-plugin-ble-central" spec="^1.2.2" />

@ -1,5 +1,5 @@
<?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>
<description>an app created by cloud Solutions</description>
<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.+" />
</plugin>
<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-plugin-nativestorage" spec="^2.3.2" />
<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-filepath" spec="^1.5.6" />
<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">
<variable name="FACEID_USAGE_DESCRIPTION" value="User Authentication" />
</plugin>

@ -1,35 +1,42 @@
{
"project_info": {
"project_number": "608631731238",
"firebase_url": "https://mohemm-cs.firebaseio.com",
"project_id": "mohemm-cs",
"storage_bucket": "mohemm-cs.appspot.com"
"project_number": "679409052782",
"firebase_url": "https://mohemm-dce93.firebaseio.com",
"project_id": "mohemm-dce93",
"storage_bucket": "mohemm-dce93.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:608631731238:android:3a8384007f8700ec",
"mobilesdk_app_id": "1:679409052782:android:dba155ac0859d7fea78a7f",
"android_client_info": {
"package_name": "com.cloudsolutions.mohemm"
"package_name": "hmg.cloudSolutions.mohem"
}
},
"oauth_client": [
{
"client_id": "608631731238-83a5qndedia496ssa6ekkd3db5jo8khr.apps.googleusercontent.com",
"client_id": "679409052782-mtd6d8rjltucnm9uatn6g7et08sm6lbv.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyB5zpz9vC2NOxsU1dPr0TK0dVaMY5D4Mjg"
"current_key": "AIzaSyDgWjuSBIKGghWxYg_KGBRIZTi-O_UA8mU"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "608631731238-83a5qndedia496ssa6ekkd3db5jo8khr.apps.googleusercontent.com",
"client_id": "679409052782-mtd6d8rjltucnm9uatn6g7et08sm6lbv.apps.googleusercontent.com",
"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
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
call ionic cordova plugin add cordova-sqlite-storage
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
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
ionic cordova plugin add cordova-sqlite-storage
npm install @ionic-native/sqlite

@ -1,35 +1,42 @@
{
"project_info": {
"project_number": "448880075189",
"firebase_url": "https://al-habib-mohemm.firebaseio.com",
"project_id": "al-habib-mohemm",
"storage_bucket": "al-habib-mohemm.appspot.com"
"project_number": "679409052782",
"firebase_url": "https://mohemm-dce93.firebaseio.com",
"project_id": "mohemm-dce93",
"storage_bucket": "mohemm-dce93.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:448880075189:android:5bb4821d515a826d88b9fc",
"mobilesdk_app_id": "1:679409052782:android:dba155ac0859d7fea78a7f",
"android_client_info": {
"package_name": "com.cloudsolutions.alhabibmohemm"
"package_name": "hmg.cloudSolutions.mohem"
}
},
"oauth_client": [
{
"client_id": "448880075189-49hc2l78pr9hsmr9p3k7j411r40diej8.apps.googleusercontent.com",
"client_id": "679409052782-mtd6d8rjltucnm9uatn6g7et08sm6lbv.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyC8nrli7eyuRNow8nF-QHvDMOxqUkj6fEw"
"current_key": "AIzaSyDgWjuSBIKGghWxYg_KGBRIZTi-O_UA8mU"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "448880075189-49hc2l78pr9hsmr9p3k7j411r40diej8.apps.googleusercontent.com",
"client_id": "679409052782-mtd6d8rjltucnm9uatn6g7et08sm6lbv.apps.googleusercontent.com",
"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
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
call ionic cordova plugin add cordova-sqlite-storage
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 npm install @ionic-native/base64
@echo install OneSignal plugin
call ionic cordova plugin add onesignal-cordova-plugin
call npm install @ionic-native/onesignal
@echo install Firebasex plugin
call ionic cordova plugin add cordova-plugin-firebasex
call npm install @ionic-native/firebase-x
@echo reinitializing git repository
@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
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
ionic cordova plugin add cordova-sqlite-storage
npm install @ionic-native/sqlite

4033
Mohem/package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -21,38 +21,37 @@
"@angular/platform-browser": "^7.2.2",
"@angular/platform-browser-dynamic": "^7.2.2",
"@angular/router": "^7.2.2",
"@ionic-native/android-permissions": "^5.17.0",
"@ionic-native/app-availability": "^5.17.0",
"@ionic-native/app-rate": "^5.17.0",
"@ionic-native/android-permissions": "^5.18.0",
"@ionic-native/app-availability": "^5.18.0",
"@ionic-native/app-rate": "^5.18.0",
"@ionic-native/background-geolocation": "^5.4.0",
"@ionic-native/badge": "^5.17.0",
"@ionic-native/barcode-scanner": "^5.17.0",
"@ionic-native/base64": "^5.17.0",
"@ionic-native/ble": "^5.17.0",
"@ionic-native/call-number": "^5.17.0",
"@ionic-native/camera": "^5.17.0",
"@ionic-native/badge": "^5.18.0",
"@ionic-native/barcode-scanner": "^5.18.0",
"@ionic-native/base64": "^5.18.0",
"@ionic-native/ble": "^5.18.0",
"@ionic-native/call-number": "^5.18.0",
"@ionic-native/camera": "^5.18.0",
"@ionic-native/core": "^5.8.0",
"@ionic-native/date-picker": "^5.10.0",
"@ionic-native/device": "^5.17.0",
"@ionic-native/diagnostic": "^5.17.0",
"@ionic-native/file": "^5.17.0",
"@ionic-native/file-path": "^5.17.0",
"@ionic-native/fingerprint-aio": "^5.17.1",
"@ionic-native/device": "^5.18.0",
"@ionic-native/diagnostic": "^5.18.0",
"@ionic-native/file": "^5.18.0",
"@ionic-native/file-path": "^5.18.0",
"@ionic-native/fingerprint-aio": "^5.18.0",
"@ionic-native/firebase-x": "^5.21.5",
"@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/in-app-browser": "^5.17.0",
"@ionic-native/keyboard": "^5.17.0",
"@ionic-native/launch-navigator": "^5.17.0",
"@ionic-native/local-notifications": "^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/push": "^5.17.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/themeable-browser": "^5.17.0",
"@ionic-native/themeable-browser": "^5.18.0",
"@ionic-native/zbar": "^5.10.0",
"@ionic/angular": "^4.1.0",
"@ng-bootstrap/ng-bootstrap": "^4.2.2",
@ -62,7 +61,7 @@
"call-number": "~0.0.2",
"chart.js": "^2.9.3",
"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-browser": "5.0.4",
"cordova-ios": "4.5.5",
@ -71,6 +70,8 @@
"cordova-plugin-actionsheet": "^2.3.3",
"cordova-plugin-add-swift-support": "^2.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-apprate": "^1.4.0",
"cordova-plugin-badge": "^0.8.8",
@ -82,6 +83,7 @@
"cordova-plugin-file": "^6.0.2",
"cordova-plugin-filepath": "^1.5.6",
"cordova-plugin-fingerprint-aio": "^3.0.0",
"cordova-plugin-firebasex": "^7.0.2",
"cordova-plugin-geolocation": "^4.0.2",
"cordova-plugin-globalization": "^1.11.0",
"cordova-plugin-inappbrowser": "^3.1.0",
@ -99,18 +101,20 @@
"cordova.plugins.diagnostic": "^5.0.1",
"core-js": "^2.5.4",
"date-fns": "^1.30.1",
"ionic2-calendar": "^0.5.8",
"mx.ferreyra.callnumber": "0.0.2",
"ng-circle-progress": "^1.5.1",
"ng2-file-upload": "^1.3.0",
"ng2-pdf-viewer": "^5.3.2",
"npm": "^6.13.1",
"onesignal-cordova-plugin": "^2.7.0",
"ngx-gauge": "^1.0.0-beta.10",
"npm": "^6.13.7",
"phonegap-plugin-barcodescanner": "^8.1.0",
"phonegap-plugin-multidex": "^1.0.0",
"phonegap-plugin-push": "^2.3.0",
"primeicons": "^1.0.0",
"primeng": "^7.1.3",
"run": "1.4.0",
"rxjs": "~6.3.3",
"tslib": "^1.10.0",
"uk.co.workingedge.phonegap.plugin.launchnavigator": "^3.2.2",
"xlsx": "^0.14.3",
"zone.js": "~0.8.29"
@ -136,10 +140,11 @@
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~1.1.2",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.4.0",
"node-sass": "^4.13.1",
"protractor": "^5.4.3",
"ts-node": "~8.0.0",
"tslint": "~5.12.0",
"typescript": "~3.1.6"
"typescript": "3.1.6"
},
"description": "An Ionic project",
"cordova": {
@ -162,17 +167,19 @@
"cordova-plugin-ionic-webview": {
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
},
"cordova-android-support-gradle-release": {},
"cordova.plugins.diagnostic": {},
"cordova-android-support-gradle-release": {
"ANDROID_SUPPORT_VERSION": "27.+"
},
"cordova.plugins.diagnostic": {
"ANDROID_SUPPORT_VERSION": "28.+"
},
"cordova-open-native-settings": {},
"cordova-plugin-camera": {},
"cordova-plugin-camera": {
"ANDROID_SUPPORT_V4_VERSION": "27.+"
},
"cordova-plugin-file": {},
"cordova-plugin-filepath": {},
"com-badrit-base64": {},
"phonegap-plugin-push": {
"GOOGLE_PLAY_SERVICES_VERSION": "16.0.0",
"FCM_VERSION": "15.0.0"
},
"cordova-sqlite-storage": {},
"cordova-plugin-ble-central": {},
"uk.co.workingedge.phonegap.plugin.launchnavigator": {},
@ -184,10 +191,10 @@
"cordova-opentok-android-permissions": {},
"cordova-plugin-appavailability": {},
"cordova-plugin-apprate": {},
"onesignal-cordova-plugin": {},
"cordova-plugin-fingerprint-aio": {
"FACEID_USAGE_DESCRIPTION": "User Authentication"
}
},
"cordova-plugin-firebasex": {}
},
"platforms": [
"browser",
@ -195,4 +202,4 @@
"android"
]
}
}
}

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,6 +1,6 @@
<ion-header >
<ion-toolbar class="header-toolbar">
<ion-toolbar class="header-toolbar-new">
<ion-title color="light"> {{ts.trPK('submitAbsenceConfirm','submitAbsenceConfirm')}}</ion-title>
<ion-buttons slot="start">
<nav-buttons></nav-buttons>
@ -11,7 +11,137 @@
<ion-content>
<ion-card>
<!-------------------------------Start New design ---------------------------------------->
<ion-grid>
<ion-row style="margin-top: 20px;margin-left: 12px;">
<ion-col>
<div size="10" class="approvalTitle">{{'general, addAttach' | translate}}</div>
</ion-col>
<ion-col style="padding-left: 7%;" size="2">
<div class="fileDiv">
<input end class="inputfile" style="margin-top: 10px;z-index: 99999;position: absolute;opacity: 0;" type="file" ng2FileSelect [uploader]="uploader"
(change)="onFileSelected($event)" />
<label end for="file" class="attachLable">
<ion-icon style="font-size: 22px;" name="add"></ion-icon>
</label></div>
</ion-col>
</ion-row>
<ion-item class="attachmentDiv" *ngIf="attachListOver?.length == 0">
<ion-img style="height: 26px;width:100%;margin-top:12px" src="../assets/imgs/attach-icon.png"></ion-img>
<ion-label style="margin-top: -24px;" position="floating" class="boldTxtNav">{{ 'general, notAttch' | translate}}</ion-label>
</ion-item>
</ion-grid>
<ion-grid class="attachmentDiv" *ngIf="attachListOver?.length > 0">
<div *ngFor="let attachList of attachListOver ; let i = index">
<ion-row>
<ion-col size="1">
<ion-label style="color: black !important;">
{{attachList.AttachmentID +1 }} .
</ion-label>
</ion-col>
<ion-col style="text-align: left;" size="10">
<ion-label style="color: blue !important;" (click)="OpenAttachFiles(attachList.P_FILE_DATA,attachList.P_FILE_CONTENT_TYPE)">
{{attachList.P_FILE_NAME }}
</ion-label>
</ion-col>
<ion-col size="1">
<!-- <button float-end class="attachImgBtn"
(click)="OpenAttachFiles(attachList.P_FILE_DATA,attachList.P_FILE_CONTENT_TYPE)">
<img class="attachImg" src="../assets/imgs/view.png">
</button> -->
<button float-end [disabled]="attachList.isSuccess" class="attachImgBtn removeLable"
(click)="removeFile(attachList)">
<ion-icon style="font-size:22px;margin-left:-7px;margin-top:-2px;" name="close"></ion-icon>
</button>
</ion-col>
</ion-row>
</div>
</ion-grid>
<ion-grid *ngIf="attachmentRes?.length > 0">
<div *ngFor="let attachRes of attachmentRes">
<ion-row>
<ion-col col-8>
<div> <img float-start class="attachImg" src="../assets/imgs/file.png">
</div>
<ion-label>
{{attachRes.FILE_NAME }} </ion-label>
</ion-col>
<ion-col col-4>
<button float-end class="attachImgBtn"
(click)="OpenAttachFiles(attachRes.FILE_DATA,attachRes.FILE_CONTENT_TYPE)">
<img class="attachImg" src="../assets/imgs/view.png">
</button>
<button float-end [disabled]="!isResubmitEIT" class="attachImgBtn" (click)="delelteFile(attachRes)"><img
class="attachImg" src="../assets/imgs/deletegray.png"></button>
</ion-col>
<!-- <button [disabled]="!isResubmitEIT" class="iconButton" (click)="addAttachment(false,attachRes)"><img
class="imgSize" src="../assets/imgs/editIcon.png"></button>
<button (click)="delelteFile(attachRes)" class="iconButton" [disabled]="!isResubmitEIT"><img
class="imgSize" src="../assets/imgs/cancel.png"></button> -->
</ion-row>
</div>
</ion-grid>
<ion-grid class="">
<div class="approvalTitle">{{'confirmAddEit, comment' | translate}}</div>
<ion-item class="submitNote" lines="none">
<!-- <ion-label position="floating" class="boldTxtNav">{{'confirmAddEit, comment' | translate}}</ion-label> -->
<ion-textarea type="text" [(ngModel)]="absComments"></ion-textarea>
</ion-item>
</ion-grid>
<ion-grid class="approvalList">
<div class="approvalTitle">{{'confirmAddEit, approverList' | translate}}</div>
<div class="noDataDiv" *ngIf="approversList?.length == 0">
<p>{{ 'general, empty' | translate}}</p>
</div>
<div style="background-color: white;border-radius: 32px;border: 1px solid #c8c4c4;" *ngIf="approversList?.length > 0">
<ion-list class="notification-list ">
<div class="timeline">
<ion-item style="padding-left: 4%;" *ngFor="let employee of approversList">
<div class="timeline-item" slot="start">
<div class="timeline-thumb timeline-icon">
<img *ngIf="employee.EMPLOYEE_IMAGE" class="empImge"
[src]="'data:image/png;base64,'+employee.EMPLOYEE_IMAGE">
<img *ngIf="employee.EMPLOYEE_IMAGE == null" class="empImge"
src="../assets/imgs/profile.png"> </div>
</div>
<ion-col>
<ion-label style="color:black !important ;font-weight: bold;padding-top: 0%;">
{{employee.APPROVER}}
</ion-label>
<ion-label style="color:black !important ;padding-top: 4%;">
{{employee.POSITION_TITLE}}
</ion-label>
</ion-col>
<div class="line"></div>
</ion-item>
</div>
</ion-list>
</div>
</ion-grid>
<!-------------------------------End New design ---------------------------------------->
<!-- <ion-card>
<ion-card-header class="boxHdr">
<div class="hrTitle"> {{ts.trPK('confirmAddEit','approverList')}}</div>
</ion-card-header>
@ -123,14 +253,14 @@
</ion-grid>
</ion-card-content>
</ion-card>
</ion-card> -->
</div>
<!-- </div> -->
</ion-content>
<ion-footer>
<div class="centerDiv">
<ion-button color="customnavy" (click)="startAbApproval()">{{ts.trPK('confirmAddEit','start')}}</ion-button>
<ion-button class="confirmEitOkButton" (click)="openSubmitModal()">{{ts.trPK('confirmAddEit','start')}}</ion-button>
</div>
</ion-footer>

@ -28,4 +28,246 @@ ion-card-content.confirm-details{
}
.confirm-details label{
font-size: 13px;
}
}
/****************** NEW Design ***************************************/
.footer-button {
border-radius: 2px;
padding: 0 1.1em;
min-height: 45px;
min-width: 200px;
}
.Header {
font-weight: bold;
color: #1a586d !important;
font-size: 10px;
}
.tbData {
font-size: 10px;
}
.btnBack {
background: transparent;
float: right;
}
.attachmentDiv{
background: #ffffff;
height: auto;
text-align: center;
padding-top: 1px;
margin: 10px;
border-radius: 15px;
border: 1px solid grey;
}
.noDataDiv{
background: #ffffff;
height: 11%;
text-align: center;
padding-top: 1px;
border-radius: 10px;
margin: 10px;
border-radius: 5px;
}
.submitNote{
background: #ffffff;
height: 80px;
padding-top: 1px;
margin: 10px;
border-radius: 15px;
border: 1px solid grey;
}
.approvalList{
--background: #f0efef;
height: auto;
text-align: center;
padding-top: 1px;
border-radius: 10px;
margin: 10px;
border-radius: 5px;
}
/************************New Design**********************************/
.notification-list{
background: none;
background: none;
border-radius: 32px;
ion-item{
// margin-top: 5px;
// margin-bottom: 5px;
background-color: transparent;
.item-date{
width: 100%;
font-size: 16px;
font-weight: bold;
text-align: start;
padding: 0;
margin: 0;
position: absolute;
left: 0;
top: 12%;
}
ion-label , [item-end]{
white-space: normal;
font-size: 14px;
padding-top: 15%;
// :root[dir="ltr"]{
// margin-left: 10px;
// }
// :root[dir="rtl"]{
// margin-right: 10px;
// }
}
}
}
.timeline {
position: relative;
margin: 15px 0 0 0;
// border-bottom: solid 1px var(--cusgray);
}
.timeline:before {
content: '';
position: inherit !important;
top: 0;
bottom: 0;
width: 4px;
// background: #e4e4e4;
z-index: 1;
left: 35px;
/* margin-left: -10px; */
/* z-index: 1; */
}
.timeline .timeline-thumb {
border-radius: 500px;
width: 70px !important;
z-index: 2;
position: absolute;
left: 0px;
// :root[dir="ltr"]{
// left: 37px;
// }
// :root[dir="rtl"]{
// right: 37px;
// }
float: right;
top: 9px;
}
.timeline .timeline-thumb.timeline-icon {
height: 70px;
// text-align: center;
// color: white;
// border: 5px solid #CBD0D3;
// transform: scale(0.2);
}
.timeline .timeline-item {
width: 40px;
}
.timeline .timeline-stats {
position: relative;
font-size: 12px;
color: var(--darkgray);
}
.empImge{
border-radius: 50%;
width:100%;
height: 100%;
border: #dedede solid 1px;
}
.empImgeRep {
border-radius: 50% !important;
width: 80px;
height: 80px;
border: #dedede solid 1px;
}
.line{
padding-bottom:87px;
}
.attachLable{
position: absolute;
top: 0px;
z-index: 0;
background: #30b8c6;
color: #fff;
border-radius: 50%;
border: 0px;
width: 24px;
height: 24px;
text-align: center;
font-size: 5px;
}
.removeLable{
top: 0px;
z-index: 0;
background: #d8252d;
color: #fff;
border-radius: 50%;
border: 0px;
width: 20px;
height: 20px;
text-align: center;
font-size: 5px;
}
.note-modal {
// width: 90%;
// height: 50%;
// top: 20%;
// left: 5%;
// right: 5%;
// bottom: 5%;
background: rgba(0, 0, 0, 0.5) !important;
padding: 30% 10% !important;
--height: 12cm !important;
// --width: 80% !important;
--border-radius:20px;
}
.header-toolbar-new{
--background: #22c6b3;
}
.confirmEitOkButton{
white-space: normal !important;
text-transform: capitalize !important;
min-height: 45px !important;
min-width: 5px !important;
margin: 8px !important;
--background: #22c6b3;
width: 80% !important;
color: white!important;
border-radius: 16px !important;
}

@ -13,7 +13,8 @@ import { ConfirmAddEitService } from '../service/confirm-add-eit-service';
import { AbsenceNotificatonBodyResponse } from '../models/AbsenceNotificationBodyRes';
import { AbsenceAttachmentComponent } from '../absence-attachment/absence-attachment.component';
import { WorkListAttachViewComponent } from 'src/app/notification/work-list-attach-view/work-list-attach-view.component';
import { FileUploader } from 'ng2-file-upload';
import { SubmitAbsenceModalComponent } from '../submit-absence-modal/submit-absence-modal.component';
@Component({
selector: "app-absence-confirm",
templateUrl: "./absence-confirm.component.html",
@ -38,6 +39,9 @@ export class AbsenceConfirmComponent implements OnInit {
attachReqObj: WorkListButtonRequest = new WorkListButtonRequest();
private isResubmitAbs: boolean = false;
private isSubmitBtnClicked: boolean;
filterAllowedType: any = ['application/pdf', 'image/jpeg', 'image/png', 'text/plain', 'image/jpg', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'];
constructor(
public common: CommonService,
public ts: TranslatorService,
@ -225,6 +229,41 @@ export class AbsenceConfirmComponent implements OnInit {
}
/*****submit modal********/
async openSubmitModal() {
this.common.sharedService.setSharedData( this.attachListOver, 'submitAbsAttachmentList');
this.common.sharedService.setSharedData(this.absComments, 'absComments');
const modal = await this.modalCtrl.create({
component: SubmitAbsenceModalComponent,
backdropDismiss: false,
});
modal.cssClass = 'note-modal';
modal.onDidDismiss()
.then((data) => {
console.log(data.data);
if (data.data == "cancel" || data.data == undefined) {
return;
} else {
this.startAbApproval();
}
});
return await modal.present();
}
removeFile(objectitem) {
if (this.attachListOver) {
@ -324,4 +363,96 @@ export class AbsenceConfirmComponent implements OnInit {
if (this.P_TransactionID && this.isSubmitBtnClicked == false)
this.cancelAbProcess();
}
/*******************Add attchement Functions*************/
public uploader: FileUploader = new FileUploader({
allowedMimeType: ['application/pdf', 'image/jpeg', 'image/png', 'text/plain', 'image/jpg', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'],
maxFileSize: 10 * 1024 * 1024,
formatDataFunctionIsAsync: true,
formatDataFunction: async (item) => {
return new Promise((resolve, reject) => {
resolve({
name: item._file.name,
length: item._file.size,
contentType: item._file.type,
date: new Date()
});
});
}
});
onFileSelected(input) {
// this.uploader.onWhenAddingFileFailed = function (item: any, filter: any, options: any){
if (!(this.filterAllowedType.indexOf(input.target.files[0].type) > -1)) {
let msg: string = "";
msg = this.ts.trPK("general", "notSupport");
this.common.presentAlert(msg);
return
} // todo: show alert that you tried uploading wrong files
else {
const file = input.target.files[0];
// console.log(file);
//var encoded = Base64.encode(file);
this.getBase64(file).then(
data => this.pushObject(data, file.name, file.type)
);
// }
// };
}
}
getBase64(file) {
return new Promise((resolve, reject) => {
const reader = new FileReader();
reader.readAsDataURL(file);
reader.onload = () => resolve(reader.result);
reader.onerror = error => reject(error);
});
}
pushObject(fileData, name, type) {
console.log("before push: "+ this.index);
//this.attachListOver.length++;
try {
let array = name.split('.');
let attachType: string = array[array.length - 1];
this.attachListOver.push(
{
AttachmentID: this.attachListOver.length,
P_FILE_CONTENT_TYPE: attachType,//type.split('/')[1],
P_FILE_DATA: fileData.split(',')[1],
P_FILE_NAME: name,//.split('.')[0],
P_TRANSACTION_ID: this.P_TransactionID
})
} catch (e) {
}
//console.log("after push: "+ this.index);
// return this.addAttachRequest
}
}

@ -0,0 +1,132 @@
<ion-header>
<ion-toolbar>
<!-- class="header-toolbar" <nav-buttons></nav-buttons> -->
<ion-title color="dark">{{ 'replacementRoll, title' | translate}}</ion-title>
</ion-toolbar>
</ion-header>
<ion-content >
<ion-list syle="margin-bottom:2px !important" [hidden]="isAnswer==true">
<ion-item>
<ion-label class="boldTxtNav">{{'replacementRoll, searchBy' | translate}}</ion-label>
<ion-select okText='{{"general, ok" | translate }}' cancelText='{{"general, cancel" | translate }}'
[(ngModel)]="searchBy">
<ion-select-option value="1" selected="true">{{'addAttach, name' | translate}}</ion-select-option>
<ion-select-option value="2">{{'login, username' | translate}}</ion-select-option>
<ion-select-option value="3">{{'general, email' | translate}}</ion-select-option>
</ion-select>
</ion-item>
<ion-item lines="none">
<ion-button class="filterBtn" button-type="clear" (click)="getreplacmentemployee()" item-end>
<ion-icon slot="icon-only" color="white" name="search"></ion-icon>
</ion-button>
<ion-input class="filterInput" [(ngModel)]="inputSearch" placeholder='{{"general, search" | translate}}'></ion-input>
<!-- <button ion-button icon-only (click)="getreplacmentemployee()" clear type="button" item-end>
<ion-icon name="search"></ion-icon>
</button> -->
</ion-item>
<!-- <ion-item>
<ion-label>
{{selEmpName}}
</ion-label>
</ion-item> -->
<!-- <div class="centerDiv">
<button ion-button (click)="closePage()">{{'general.save' | translate}}</button>
</div> -->
</ion-list>
<!-- <div class="noteInput">
<ion-label [hidden]="isAnswer==false" class="boldTxtNav" padding>{{"replacementRoll, question" | translate}} :
{{pQuestion}} ?</ion-label>
<ion-label [hidden]="isAnswer==false" class="boldTxtNav" padding>{{"replacementRoll, answer" | translate}}
</ion-label>
<ion-label [hidden]="isAnswer==true" class="boldTxtNav" padding>{{"replacementRoll, enterNote" | translate}}
</ion-label>
<ion-item>
<ion-textarea [(ngModel)]="userNote"></ion-textarea>
</ion-item>
</div> -->
<ion-item [hidden]="isAnswer==true">
<!-- <ion-list *ngIf="ReplacementList"> -->
<!-- <ion-list *ngIf="ReplacementList">
-->
<!-- <ion-radio-group mode="md" [(ngModel)]="selEmp"> -->
<!-- <ion-grid fixed>
<ion-row justify-content-end>
<ion-col [ngClass]="{'activated': (active == i),'deactivated': (active != i)}" (click)="select(employee,i)"
*ngFor="let employee of demoeAttach;let i=index;"
size-xs="6" size-sm="6" size-md="6" size-lg="6" align-self-stretch>
<div class="profileImageDiv"> <img class="profileImage" src="../assets/imgs/profile.png"></div>
<div *ngIf="active == i" class="selIEmpDiv"> <img class="selIEmpImage" src="../assets/imgs/green.png"></div>
<br/>
<div class="repContentDiv">
<ion-label style="color:var(--dark) !important">
<span style="font-weight: bold !important">{{employee.EMPLOYEE_DISPLAY_NAME}}</span>
<br>{{employee.USER_NAME}}<br>
{{employee.EMAIL_ADDRESS}}</ion-label>
</div>
</ion-col>
</ion-row>
</ion-grid> -->
<!-- </ion-radio-group> -->
<!--
</ion-list> -->
<div class="square-container">
<div (click)="select(employee,i)" *ngFor="let employee of ReplacementList;let i=index;" class="square">
<div class="profileImageDiv">
<!-- <img class="profileImage" src="../assets/imgs/profile.png"> -->
<img *ngIf="employee.EMPLOYEE_IMAGE" class="empImgeRep" [src]="'data:image/png;base64,'+employee.EMPLOYEE_IMAGE">
<img *ngIf="employee.EMPLOYEE_IMAGE == null" class="empImgeRep" src="../assets/imgs/profile.png">
</div>
<div *ngIf="active == i" class="selIEmpDiv">
<img class="selIEmpImage" src="../assets/imgs/green.png">
</div>
<div [ngClass]="{'activated': (active == i),'deactivated': (active != i)}"
class="content">
<ion-label>
<span style="font-weight: bold !important">{{employee.EMPLOYEE_DISPLAY_NAME}}</span>
<br>{{employee.USER_NAME}}<br>
{{employee.EMAIL_ADDRESS}}
</ion-label>
</div>
</div>
</div>
</ion-item>
<ion-infinite-scroll (ionInfinite)="doInfinite($event)">
<ion-infinite-scroll-content></ion-infinite-scroll-content>
</ion-infinite-scroll>
</ion-content>
<ion-footer>
<div class="centerDiv">
<ion-button class="footer-button" style="background: var(--newgreen)!important;border-radius: 10px; --background: transparent; " ion-button (click)="submitAction()">
{{'general, submit' | translate}}</ion-button>
<ion-button class="footer-button" style="background: var(--darkblue)!important;border-radius: 10px; --background: transparent; " ion-button (click)="closeModal()">
{{'general, cancel' | translate}}</ion-button>
</div>
</ion-footer>

@ -0,0 +1,121 @@
button.item-button.button.button-md.button-clear.button-clear-md {
background-color: transparent;
}
.footer-button {
border-radius: 3px;
padding: 0 1.1em;
min-height: 45px;
min-width: 200px;
}
// ion-item {
// margin-top: 5%;
// margin-right: 7%;
// width: 100%;
// }
.ionItem{
border: #e4e4e4 solid;
/* margin: 6px; */
/* padding: 11px; */
height: 85px;
width: 164px;
border-radius: 5px;
text-align: center;
}
.profileImageDiv{
text-align: center;
margin-bottom: -27px;
z-index: 3;
position: relative;
top: 0;
}
.profileImage{
width:60px !important;
// margin-left: -25px;
// margin-right: 22px;
}
.activated{
border: #209a83 0.02cm solid ;
}
.deactivated{ border: #e4e4e4 0.02cm solid;
}
.repContentDiv{
text-align: center;
width: 85%;
font-size: 14px;
border: #e4e4e4 solid;
border-radius: 5px;
padding: 20px 8px 8px 8px;
margin-top: -9px;
margin-right: -35px
}
.selIEmpDiv{
text-align: right;
margin-bottom: -26px;
margin-right: 0px;
z-index: 3;
position: relative;
top: 0;
}
.selIEmpImage{
width:22px !important
}
.noteInput{
border: solid var(--gray) 1px;
border-radius: 15px;
margin: 8px 17px 0px 17px;
padding: 10px 2px 10px 2px;
}
.filterInput{
border: solid var(--gray) 1px;
border-radius: 21px;
padding-left: 10px !important;
}
.filterBtn{
background: var(--newgreen);
--background: var (--newgreen);
border-radius: 50%;
height: 60px;
width: 60px;
}
*{
box-sizing: border-box;
}
.square-container{
// padding: 8px;
width:100%;
}
.square{
// width:calc(100% / 2);
width:50%;
float:left;
position: relative;
// padding-bottom: calc(100% / 2);
}
.square .content{
width: calc(100% - 16px) !important;
height: calc(100% - 16px) !important;
margin: 8px;
padding: 16px;
// position: absolute;
color: white;
border-radius: 9px;
text-align: center;
// background-color: #0095ff;
// box-shadow: 0 2px 5px rgba(0, 0, 0, 0.26);
}

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

@ -0,0 +1,342 @@
import { ModalController } from '@ionic/angular';
import { Component, OnInit } from '@angular/core';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { WorKListReplacmentEmployeeResponse } from 'src/app/notification/models/ReplacmentEmployeeRes';
import { WorkListReplacmentEmployeeRequest } from 'src/app/notification/models/ReplacmentEmployeeReq';
import { WorkListActionRequest } from 'src/app/notification/models/NotificationActionReq';
import { WorklistMainService } from 'src/app/notification/service/work-list.main.service';
import { ViewReplacementModalComponent } from 'src/app/notification/view-replacement-modal/view-replacement-modal.component';
import { WorklistService } from 'src/app/notification/service/worklist.service';
@Component({
selector: 'app-absence-replacement-list',
templateUrl: './absence-replacement-list.component.html',
styleUrls: ['./absence-replacement-list.component.scss'],
})
export class AbsenceReplacementListComponent implements OnInit {
P_SEARCH_EMPLOYEE_DISPLAY_NAME: string = "";
P_SEARCH_EMAIL_ADDRESS: string = "";
getPassActionMode: any;
selectedValue: any;
inputSearch: any;
selEmpName: any;
selectedUserInf: any;
userNote: any;
getPassNotificationDetails: any;
isAnswer: boolean = false;
pQuestion: string = "";
selEmp: any;
P_PAGE_NUM: number;
P_PAGE_LIMIT: number;
ReplacementList: any = [];
searchBy: string = "";
IsReachEnd: boolean = false;
ReplacmentListRes: WorKListReplacmentEmployeeResponse;
private WorkListReplacmentEmployeeObj: WorkListReplacmentEmployeeRequest = new WorkListReplacmentEmployeeRequest();
private WorkListActionObj: WorkListActionRequest;
getpassResAttr: any = [];
active: any;
demoeAttach:any=[];
constructor(public worklistService: WorklistService, private cs: CommonService, private ts: TranslatorService, public workListMainService: WorklistMainService, public modalCtrl: ModalController) {
this.P_PAGE_NUM = 1;
this.P_PAGE_LIMIT = 50;
// this.getPassActionMode = this.cs.sharedService.getSharedData('passActionMode', false);
// this.getPassNotificationDetails = this.cs.sharedService.getSharedData('passNotificationInfo', false);
// this.getpassResAttr = this.cs.sharedService.getSharedData('passResAttr', false);
// this.pQuestion = this.cs.sharedService.getSharedData('pQuestion', false);
// if (this.getPassActionMode == "ANSWER_INFO") {
// this.isAnswer = true;
// }
this.WorkListReplacmentEmployeeObj.P_PAGE_NUM = this.P_PAGE_NUM;
this.WorkListReplacmentEmployeeObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
// this.WorkListActionObj = new WorkListActionRequest();
// this.WorkListActionObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;//26919060;
// this.WorkListActionObj.P_FORWARD_TO_USER_NAME = "";
// this.WorkListActionObj.P_ACTION_MODE = "";
// this.WorkListActionObj.P_COMMENTS = "";
// this.WorkListActionObj.RespondAttributeList =[];// this.getpassResAttr;
// this.WorkListActionObj.P_APPROVER_INDEX = null;
}
ngOnInit() {
this.demoeAttach = [{
USER_NAME: '18888',
EMPLOYEE_DISPLAY_NAME: "AAA fgfhfhfhf hyutyututut ",
EMAIL_ADDRESS: "test@yuyuu.hjj",
},
{
USER_NAME: '18888',
EMPLOYEE_DISPLAY_NAME: "AAA fgfhfhfhf hyutyututut ",
EMAIL_ADDRESS: "test@yuyuu.hjj"
},
{
USER_NAME: '18888',
EMPLOYEE_DISPLAY_NAME: "AAA fgfhfhfhf hyutyututut ",
EMAIL_ADDRESS: "test@yuyuu.hjj"
},
{
USER_NAME: '18888',
EMPLOYEE_DISPLAY_NAME: "AAA fgfhfhfhf hyutyututut ",
EMAIL_ADDRESS: "test@yuyuu.hjj"
}
];
}
getreplacmentemployee() {
this.ReplacementList = [];
this.IsReachEnd = false;
this.P_PAGE_NUM = 1;
if (this.inputSearch) {
switch (this.searchBy) {
case '1': {
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME = this.inputSearch;
this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME = "";
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS = "";
break;
}
case '2': {
this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME = this.inputSearch;
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME = "";
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS = "";
break;
}
case '3': {
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS = this.inputSearch;
this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME = "";
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME = "";
break;
}
default: {
this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME = "";
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME = "";
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS = "";
break;
}
}
} else {
this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME = "";
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME = "";
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS = "";
}
// if(this.selectedValue =="1"){
// this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME=this.inputSearch;
// this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME="";
// this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS="";
// }
// else if(this.selectedValue =="2"){
// this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME="";
// this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME=this.inputSearch;
// this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS="";
// }
// else if(this.selectedValue =="3"){
// this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME="";
// this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME="";
// this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS=this.inputSearch;
// }
this.worklistService.getReplacmentEmployeeList(this.WorkListReplacmentEmployeeObj).
subscribe((result: WorKListReplacmentEmployeeResponse) => {
this.handleWorkListReplacmentEmployeeResult(result);
});
}//End replacment Employee
handleWorkListReplacmentEmployeeResult(result) {
if (this.cs.validResponse(result)) {
// this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA);
if (this.cs.hasData(result.ReplacementList)) {
//this.ReplacmentListRes =result.ReplacementList;
this.ReplacementList = result.ReplacementList;
this.P_PAGE_NUM++;
let lastItemIndex = this.ReplacementList.length - 1;
if (result.ReplacementList[lastItemIndex]) {
let lastitem = result.ReplacementList[lastItemIndex];
if (lastitem.NO_OF_ROWS == lastitem.ROW_NUM) {
this.IsReachEnd = true;
} else {
this.IsReachEnd = false;
}
}
} else {
let msg: string = this.ts.trPK('general', 'noResult');
this.cs.presentAlert(msg);
}
// if(result.ReplacementList.length == 0){
// }
// else if(result.ReplacementList != null)
// {
// this.ReplacmentListRes =result.ReplacementList;
// //open modal
// this.openModale(this.ReplacmentListRes);
// } // if result == null
} // valid it
}
getValueSelected(Value) {
this.selectedValue = Value;
}
select(selectEmp,index){
console.log(selectEmp.EMPLOYEE_DISPLAY_NAME);
this.selEmp=selectEmp
this.active=index;
}
clear() {
this.selEmpName = "";
this.selectedUserInf = null;
}
async openModale(ReplacmentListRes) {
const modal = await this.modalCtrl.create({
component: ViewReplacementModalComponent
});
modal.onDidDismiss()
.then((data) => {
if (data == "cancel" || data == "undefined") {
//this.selEmpName="";
return;
} else {
this.selectedUserInf = data;
this.selEmpName = this.selectedUserInf.EMPLOYEE_DISPLAY_NAME;
}
});
return await modal.present();
}
submitAction() {
this.selEmp
if( this.selEmp){
let data = this.selEmp;
this.modalCtrl.dismiss(data);
}else{
let msg: string = this.ts.trPK("replacementRoll", "msg");
this.cs.showErrorMessageDialog(() => {
}, this.ts.trPK('general', 'ok'), msg);
return false;
}
// if (this.selEmp && this.isAnswer == false) {
// // this.selectedUserInf = this.ReplacementList[this.selEmp];
// this.selectedUserInf = this.selEmp;
// console.log("selEmp "+ this.selEmp.USER_NAME);
// if (this.selectedUserInf && this.selectedUserInf.USER_NAME) {
// console.log("userInfo "+this.selectedUserInf.USER_NAME);
// if (this.userNote) {
// this.WorkListActionObj.P_FORWARD_TO_USER_NAME = this.selectedUserInf.USER_NAME;
// this.WorkListActionObj.P_ACTION_MODE = this.getPassActionMode;
// this.WorkListActionObj.P_COMMENTS = this.userNote;// response Attr
// this.workListMainService.actionButton(this.WorkListActionObj).
// subscribe((result: any) => {
// this.handleApplayActionResult(result);
// });
// } else {
// let msg: string = this.ts.trPK("replacementRoll", "enterNote");
// this.cs.showErrorMessageDialog(() => {
// }, this.ts.trPK('general', 'ok'), msg);
// }
// } else {
// let msg: string = this.ts.trPK("replacementRoll", "msg");
// this.cs.showErrorMessageDialog(() => {
// }, this.ts.trPK('general', 'ok'), msg);
// }
// } else if (this.isAnswer == true) {
// if (this.userNote) {
// this.WorkListActionObj.P_FORWARD_TO_USER_NAME = null;
// this.WorkListActionObj.P_ACTION_MODE = this.getPassActionMode;
// this.WorkListActionObj.P_COMMENTS = this.userNote;// response Attr
// this.workListMainService.actionButton(this.WorkListActionObj).
// subscribe((result: any) => {
// this.handleApplayActionResult(result);
// });
// } else {
// let msg: string = this.ts.trPK("replacementRoll", "enterNote");
// this.cs.showErrorMessageDialog(() => {
// }, this.ts.trPK('general', 'ok'), msg);
// }
// } else {
// let msg: string = this.ts.trPK("replacementRoll", "msg");
// this.cs.showErrorMessageDialog(() => {
// }, this.ts.trPK('general', 'ok'), msg);
// }
}
doInfinite(infiniteScroll) {
if (!this.IsReachEnd) {
//const request =new WorkListActionRequest();
// request.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME=this.P_SEARCH_USER_NAME;
// request.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME=this.P_SEARCH_EMPLOYEE_DISPLAY_NAME;
// request.P_SEARCH_EMAIL_ADDRESS=this.P_SEARCH_EMAIL_ADDRESS;
this.WorkListReplacmentEmployeeObj.P_PAGE_NUM = this.P_PAGE_NUM;
this.WorkListReplacmentEmployeeObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
// request.P_SELECTED_EMPLOYEE_NUMBER=this.selEmp;
this.worklistService.getReplacmentEmployeeList(this.WorkListReplacmentEmployeeObj).
subscribe((result: any) => {
if (this.cs.validResponse(result)) {
if (this.cs.hasData(result.ReplacementList)) {
this.P_PAGE_NUM++;
result.ReplacementList.forEach(vr => {
if (vr.ROW_NUM == vr.NO_OF_ROWS) {
this.IsReachEnd = true;
}
else {
this.IsReachEnd = false;
}
this.ReplacementList.push(vr);
// this.pro.GetVacationRulesList.push(vr);
});
} else {
this.IsReachEnd = true;
}
}
//this.P_PAGE_NUM++;
if (infiniteScroll)
infiniteScroll.target.complete();
// console.log(resFlag);
}, (Error) => console.log(Error), () => infiniteScroll.target.complete());
} else {
if (infiniteScroll)
infiniteScroll.target.complete();
}
}
closeModal() {
this.modalCtrl.dismiss();
}
}

@ -20,6 +20,10 @@ import { AbsenceAttachmentComponent } from "./absence-attachment/absence-attachm
import { AddAttachService } from "./service/add-attach-service";
import { WorkListAttachViewComponent } from "src/app/notification/work-list-attach-view/work-list-attach-view.component";
import { ViewAttachmentsComponent } from './view-attachments/view-attachments.component';
import { SubmitAbsenceModalComponent } from './submit-absence-modal/submit-absence-modal.component';
import { AbsenceReplacementListComponent } from './absence-replacement-list/absence-replacement-list.component';
import { WorklistService } from 'src/app/notification/service/worklist.service';
import { WorklistMainService } from 'src/app/notification/service/work-list.main.service';
const routes: Routes = [
{
path: "",
@ -52,6 +56,14 @@ const routes: Routes = [
{
path:'view-attachements',
component:ViewAttachmentsComponent
},
{
path:'absence-submit-modal',
component:SubmitAbsenceModalComponent
},
{
path:'absence-replacment-modal',
component:AbsenceReplacementListComponent
}
]
}
@ -73,7 +85,9 @@ const routes: Routes = [
SubmitAbConfirmService,
DatePicker,
ConfirmAddEitService,
AddAttachService
AddAttachService,
WorklistService,
WorklistMainService
],
declarations: [
AbsencePage,
@ -81,7 +95,9 @@ const routes: Routes = [
SubmitAbsenceComponent,
AbsenceConfirmComponent,
AbsenceAttachmentComponent,
ViewAttachmentsComponent
ViewAttachmentsComponent,
SubmitAbsenceModalComponent,
AbsenceReplacementListComponent
]
})
export class AbsencePageModule {}

@ -1,23 +1,154 @@
<ion-header >
<ion-toolbar class="header-toolbar">
<ion-toolbar class="header-toolbar-new">
<ion-title color="light">{{ts.trPK('absenceList','absenceList')}}</ion-title>
<ion-buttons slot="start">
<nav-buttons></nav-buttons>
</ion-buttons>
<ion-buttons slot="end">
<!-- <ion-buttons slot="end">
<button class="headerBtn" (click)="AccrualBalances()">
<img class="headerImg" src="../assets/imgs/accubalance.png">
</button>
</ion-buttons>
</ion-buttons> -->
</ion-toolbar>
</ion-header>
<ion-content padding>
<ion-content class="colorBG">
<!-- colorBG -->
<div class="contentEit" style="background: #f3f1f1;">
<div class="header-div">
<!-- <ion-buttons slot="end">
<button class="headerBtn" (click)="AccrualBalances()">
<img class="headerImg" src="../assets/imgs/accubalance.png">
</button>
</ion-buttons> -->
<!-- <ion-buttons slot="start">
<ion-back-button color="light" class="btnBack" defaultHref="/home"></ion-back-button>
</ion-buttons>
<p class="Title">{{ts.trPK('absenceList','absenceList')}}</p> -->
</div>
<div class="">
<div >
<ion-grid class="headerGrid">
<div style="color: black;">
<div class="result-graph">
<div >
<!-- <ion-item> -->
<!-- <ion-label class="datelabel">{{request.P_EFFECTIVE_DATE}}</ion-label> -->
<ion-datetime [(ngModel)]="Sdate" class="datetime" displayFormat="DD MMMM YYYY" placeholder="DD MMMM YYYY"
(ionChange)="getAccrualBalance()"></ion-datetime>
<ion-icon class="iconCalendar" ios="ios-calendar" md="md-calendar"></ion-icon>
<!-- </ion-item> -->
</div>
<div style=" border-bottom: 1px solid #a7a4a4; margin-bottom: 12px;
margin-top: -10px; margin-right: -9px;"></div>
<div class="result-text-container">
<h2>{{totalnumber}}</h2>
<!-- <h2>{{accrualNet + accrualUsed + accrualYearly}}</h2> -->
<span>{{ts.trPK('absenceList','totalNumber')}}</span>
</div>
<p-chart #chart class="today-graph" type="doughnut" [data]="data" [options]="options"></p-chart>
</div>
<div style="position: relative;
left: 82%;
bottom: 128px;
color: black;
background-color: #DDB017;
width: 13%;
height: 6px;">
<ion-col>
<ion-row>
<label class="green-label">{{ts.trPK('absenceList','accrualNet')}}</label>
</ion-row>
<ion-row>
<label class="green-amount">{{accrualNet}}</label>
</ion-row>
</ion-col>
</div>
<div style="position: relative;
left: 59%;
bottom: 131px;
color: black;
background-color: #094875;
width: 13%;
height: 6px;">
<ion-col>
<ion-row>
<label class="blue-label">{{ts.trPK('absenceList','accrualUsed')}}</label>
</ion-row>
<ion-row>
<label class="blue-amount" for="">{{accrualUsed}}</label>
</ion-row>
</ion-col>
</div>
<div style="position: relative;
left: 82%;
bottom: 80px;
color: black;
background-color: #CB3232;
width: 13%;
height: 6px;">
<ion-col>
<ion-row>
<label class="blue-label">{{ts.trPK('absenceList','accrualYearly')}}</label>
</ion-row>
<ion-row>
<label class="blue-amount" for="">{{accrualYearly}}</label>
</ion-row>
</ion-col>
</div>
<!-- <div style="position: relative;
left: 59%;
bottom: 73px;
color: black;
background-color: #094875;
width: 16%;
height: 6px;">
<ion-col>
<ion-row>
<label class="blue-label">text</label>
</ion-row>
<ion-row> -->
<!-- <label class="blue-amount" for="">{{getleaveAccrualBalance.ACCRUAL_YEARLY_ENTITLEMENT}}</label> -->
<!-- </ion-row>
</ion-col>
</div> -->
</div>
</ion-grid>
</div>
</div>
<!-- /////////////////////////////////////////////////////////up -->
<!-- <ion-content padding> -->
<div class="no-dataDiv" *ngIf="!GetAbsenceTransactionList || GetAbsenceTransactionList.length <= 0" >
<ion-row>
<img class="empty-data" src="../assets/imgs/noData.png"/>
<img class="empty-data" src="../assets/imgs/box.png"/>
</ion-row>
@ -25,92 +156,104 @@
</div>
<div *ngIf="GetAbsenceTransactionList && GetAbsenceTransactionList.length > 0 ">
<ion-card *ngFor="let item of GetAbsenceTransactionList; let i=index;">
<div *ngFor="let item of GetAbsenceTransactionList; let i=index;">
<ion-card-header class="boxHdr">
<!-- <ion-card-header class="boxHdr">
<div class="hrTitle">{{ts.trPK('absenceList','absHeader')}}</div>
<img class="imgSize" src="../assets/imgs/attachment.png" *ngIf="item.ATTACHMENT_EXIST=='Y'" (click)="AttachmentDocuments(item.ABSENCE_ATTENDANCE_ID)">
</ion-card-header>
<ion-card-content>
<ion-grid>
</ion-card-header> -->
<ion-grid class="grids">
<div>
<ion-row>
<ion-col class="colBold">
<label for="">{{ts.trPK('absenceList','startDate')}} </label>
</ion-col>
<ion-col>
<label for=""> {{item.START_DATE}}</label>
<label style="color:#094875;font-weight: bold;" class="label" for="">{{ts.trPK('absenceList','startDate')}} </label>
<br>
<label class="label" style="color:black;" for=""> {{item.START_DATE}}</label>
<br>
<hr style="background-color: grey;height: 1px">
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold">
<label for="">{{ts.trPK('absenceList','endDate')}}</label>
</ion-col>
<ion-col>
<label for=""> {{item.END_DATE}}</label>
</ion-col>
<label style="color:#094875;font-weight: bold;" class="label" for="">{{ts.trPK('absenceList','endDate')}}</label>
<br>
<label class="label" style="color:black;" for=""> {{item.END_DATE}}</label>
<br>
<hr style="background-color: grey;height: 1px">
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold">
<label for="">{{ts.trPK('absenceList','absenceType')}} </label>
</ion-col>
<ion-col>
<label for="">{{item.ABSENCE_TYPE}}</label>
<label style="color:#094875;font-weight: bold;" class="label" for="">{{ts.trPK('absenceList','absenceType')}} </label>
<br>
<label class="label" style="color:black;" for="">{{item.ABSENCE_TYPE}}</label>
<br>
<hr style="background-color: grey;height: 1px">
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold">
<label for="">{{ts.trPK('absenceList','absenceCategory')}}</label>
</ion-col>
<ion-col>
<label for="">{{item.ABSENCE_CATEGORY}}</label>
<label style="color:#094875;font-weight: bold;" class="label" for="">{{ts.trPK('absenceList','absenceCategory')}}</label>
<br>
<label class="label" style="color:black;" for="">{{item.ABSENCE_CATEGORY}}</label>
<br>
<hr style="background-color: grey;height: 1px">
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold">
<label for="">{{ts.trPK('absenceList','days')}}</label>
</ion-col>
<ion-col>
<label for="">{{item.ABSENCE_DAYS}}</label>
<label style="color:#094875;font-weight: bold;" class="label" for="">{{ts.trPK('absenceList','days')}}</label>
<br>
<label class="label" style="color:black;" for="">{{item.ABSENCE_DAYS}}</label>
<br>
<hr style="background-color: grey;height: 1px">
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold">
<label for="">{{ts.trPK('absenceList','hours')}}</label>
</ion-col>
<ion-col>
<label for="">{{item.ABSENCE_HOURS}}</label>
<label style="color:#094875;font-weight: bold;" class="label" for="">{{ts.trPK('absenceList','hours')}}</label>
<br>
<label class="label" style="color:black;" for="">{{item.ABSENCE_HOURS}}</label>
<br>
<hr style="background-color: grey;height: 1px">
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold">
<label for="">{{ts.trPK('absenceList','approvalStatus')}}</label>
</ion-col>
<ion-col>
<label for="">{{item.APPROVAL_STATUS}}</label>
<label style="color:#094875;font-weight: bold;" for="">{{ts.trPK('absenceList','approvalStatus')}}</label>
<br>
<label class="label" style="color:black;" for="">{{item.APPROVAL_STATUS}}</label>
<br>
<hr style="background-color: grey;height: 1px">
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold">
<label for="">{{ts.trPK('absenceList','absenceStatus')}}</label>
</ion-col>
<ion-col>
<label for="">{{item.ABSENCE_STATUS}}</label>
<label style="color:#094875;font-weight: bold;" for="">{{ts.trPK('absenceList','absenceStatus')}}</label>
<br>
<label class="label" style="color:black;" for="">{{item.ABSENCE_STATUS}}</label>
<br>
<hr style="background-color: grey;height: 1px">
</ion-col>
</ion-row>
</div>
</ion-grid>
</ion-card-content>
</ion-card>
</div>
</div>
<ion-infinite-scroll (ionInfinite)="doInfinite($event)">
<ion-infinite-scroll-content></ion-infinite-scroll-content>
</ion-infinite-scroll>
<ion-icon class="addClass" name="add" (click)="createAbsence()"></ion-icon>
</div>
</ion-content>
<ion-footer>
<!-- <ion-footer>
<div class="centerDiv">
<ion-button color="customnavy" class="gridBtn" (click)="createAbsence()">{{ts.trPK('absenceList','createAbs')}}</ion-button>
</div>
</ion-footer>
</ion-footer> -->

@ -7,3 +7,212 @@
height:20px;
width:20px;
}
.addClass{
background-color: #094875;
width: 80px;
height: 80px;
right: 8%;
position: fixed;
color: white;
bottom: 20%;
border-radius: 50%;
z-index: 999;
-webkit-box-shadow: 2px -1px 13px 0px rgba(0,0,0,0.59);
-moz-box-shadow: 2px -1px 13px 0px rgba(0,0,0,0.59);
box-shadow: 2px -1px 13px 0px rgba(0,0,0,0.59);
}
.grids{
border-radius: 20px !important;
background: white;
padding-left: 1px;
padding-right: 1px;
margin: 13px;
padding-top: 0px;
padding-bottom: 3px;
padding-left: 13px;
padding-right: 13px;
border: 1px solid #cac8c8;
margin-bottom: 10% !important;
}
.bgcolor {
color: white;
border-top-right-radius: 19px;
border-top-left-radius: 15px;
padding-top: 1;
padding-bottom: 0;
margin-top: 0;
margin-bottom: 0;
/* border-radius: 12px !important; */
background: #094875;
border-bottom: 1px solid #a7a4a4;
border-top: 1px solid #cac8c8;
margin-left: -13px;
margin-right: -13px;
}
.header-div {
background-color: #22C6B3;
text-transform: capitalize;
height: 160px;
/* position: relative; */
/* display: block; */
margin-bottom: -28px;
}
.header-toolbar-new{
--background: #22c6b3;
}
.hrClass{
border-width: 0;
box-sizing: content-box;
border-bottom: 1px solid #e6e6e6;
background: #fff !important;
height: 1px;
}
//////////////////////////////////////////////down
.colorBG{
--background: #f0efef;
}
.Title{
text-align: center;
color: white;
margin-top: -33px;
font-size: 17px;
}
.result-graph{
font-size: 14px;
margin-left: -48px;
margin-right: 3px;
margin-bottom: -30px;
}
.datetime{
// text-align: center;
// font-family: WorkSans-Bold;
// margin-left: 111px;
text-align: center;
font-family: WorkSans-Bold;
margin-left: 47px;
margin-top: -19px;
}
.datelabel{
margin-left: 150px;
color: black !important;
font-family: WorkSans-Bold;
}
.iconCalendar{
// margin-left: -241px;
// margin-top: 5px;
margin-left: 30px !important;
width: 22% !important;
height: 26px !important;
margin-top: -69px !important;
margin-bottom: 20px !important;
}
.today-graph{
// display:block !important;
// height: 150px !important;
// width: 300 !important;
// margin-left: -70px !important;
display: block !important;
height: 196px;
width: 385px;
padding-left: 51px;
// padding-top: 29px;
margin-left: -70px !important;
}
.headerGrid{
background-color: white !important;
border: 1px solid #cac8c8 !important;
border-radius: 20px !important;
padding-top: 28px;
padding-bottom: 14px;
margin-left: 13px;
margin-right: 13px;
margin-top: -136px;
margin-bottom: 10px;
}
.header{
margin-top: -126px;
}
.result-text-container {
padding: 0;
margin: 0;
position: absolute;
left: 31%;
top: 23%;
display: block;
text-align: center;
transform: translate(-50%, -50%);
h2 {
font-size: 25px;
font-family: WorkSans-Bold;
margin: 0 auto;
// margin-top: 289px;
line-height: 36px;
}
span {
width: 125px;
display: block;
margin: 0 auto;
font-size: 12px;
// margin-top: 289px;
font-family: workSans-Regular;
}
}
.green-label{
font-size: 12px;
margin-top: -13px;
}
.green-amount{
font-size: 17px;
font-family: WorkSans-Bold;
margin-top: -3px;
}
.blue-label{
font-size: 12px;
margin-top: -13px;
}
.blue-amount{
font-size: 17px;
font-family: WorkSans-Bold;
margin-top: -4px;
}
.contentEit:before {
position: absolute;
content: "";
// background: #22c6b3;
height: 140px;
width: 100%;
left: 0;
top: 0px;
z-index: 1;
}

@ -6,6 +6,9 @@ import { MenuService } from "src/app/hmg-common/services/menu/menuservice.servic
import { AbsenceAttahcmentResponse } from "../models/abs.attach.response";
import { AbsenceListService } from "../service/service.service";
import { IonInfiniteScroll } from "@ionic/angular";
import { AccrualService } from 'src/app/accrual-balances/services/accrual.service';
import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service';
import { AuthenticatedUser } from 'src/app/hmg-common/services/authentication/models/authenticated-user';
@Component({
selector: "app-home",
@ -13,6 +16,7 @@ import { IonInfiniteScroll } from "@ionic/angular";
styleUrls: ["./home.component.scss"]
})
export class HomeComponent implements OnInit {
[x: string]: any;
@ViewChild(IonInfiniteScroll) infiniteScroll: IonInfiniteScroll;
P_PAGE_NUM: number;
P_PAGE_LIMIT: number;
@ -21,14 +25,57 @@ export class HomeComponent implements OnInit {
selEmp: string = "";
respID: number;
selMenu: MenuResponse;
leaveAccrualBalance: any;
data: any;
accrualNet: any;
getleaveAccrualBalance: any;
accrualUsed: any;
accrualYearly: any;
effectiveDate: any;
Sdate: any;
emp_no: any;
balance: any;
ACCRUAL_NET_ENTITLEMENT: any;
ACCRUAL_USED_ENTITLEMENT: any;
ACCRUAL_YEARLY_ENTITLEMENT: any;
totalnumber: any;
public options = {
cutoutPercentage: 80,
tooltips: { enabled: false },
legend: { display: false }};
gaugeType = "full";
// gaugeValue = 11.200;
// gaugeLabel = "";
constructor(
public common: CommonService,
public ts: TranslatorService,
public menuService: MenuService,
public absService: AbsenceListService
) {}
public absService: AbsenceListService,
public accrualService: AccrualService,
public authService: AuthenticationService
) {
// this.userData =this.common.sharedService.getSharedData(AuthenticatedUser.SHARED_DATA,false);
}
ngOnInit() {
this.Sdate = new Date().toISOString();
this.getUserDetails();
}
private getUserDetails(){
this.authService.loadAuthenticatedUser().subscribe((user: AuthenticatedUser) => {
if (user) {
// this.emp_no=user.EMPLOYEE_NUMBER;
// this.getAccrualBalance();
}
});
this.P_PAGE_LIMIT = 50;
this.P_PAGE_NUM = 1;
this.selMenu = this.common.sharedService.getSharedData(
@ -43,13 +90,42 @@ export class HomeComponent implements OnInit {
MenuResponse.SHARED_SEL_RESP_ID,
false
);
this.leaveAccrualBalance = this.common.sharedService.getSharedData('leaveAccrualBalance', false);
console.log("this.leaveAccrualBalance>>>>>>>>>>" + this.leaveAccrualBalance.ACCRUAL_NET_ENTITLEMENT);
/***
ACCRUAL_NET_ENTITLEMENT: 24.59
ACCRUAL_USED_ENTITLEMENT: 0
ACCRUAL_YEARLY_ENTITLEMENT: 50.4*/
this.accrualNet = this.leaveAccrualBalance.ACCRUAL_NET_ENTITLEMENT;
this.accrualUsed = this.leaveAccrualBalance.ACCRUAL_USED_ENTITLEMENT;
this.accrualYearly = this.leaveAccrualBalance.ACCRUAL_YEARLY_ENTITLEMENT;
this.totalnumber= this.accrualNet + this.accrualUsed + this.accrualYearly;
this.totalnumber= this.totalnumber.toFixed(3);
this.request = this.common.sharedService.getSharedData('leaveAccrualBalanceDate', false);
console.log("this.request" + this.request.P_EFFECTIVE_DATE);
this.effectiveDate = this.request.P_EFFECTIVE_DATE;
this.data = {
// labels: ['earingTotal', 'deductionTotal'],
datasets: [
{ data: [this.accrualNet,this.accrualUsed,this.accrualYearly],
backgroundColor: [
'#DDB017',
'#094875',
'#CB3232',],
borderWidth: 2
}
]
};
this.getAbsenceTransaction();
}
AccrualBalances() {
AccrualBalances() {
this.common.openAccuralPage();
}
AttachmentDocuments(id) {
AttachmentDocuments(id) {
const request = {
P_ABSENCE_ATTENDANCE_ID: id
};
@ -77,7 +153,7 @@ export class HomeComponent implements OnInit {
//this.GetAbsenceTransactionList =result.GetAbsenceTransactionList;
}
}
getAbsenceTransaction() {
getAbsenceTransaction() {
this.IsReachEnd = false;
const request = {
P_SELECTED_EMPLOYEE_NUMBER: this.selEmp,
@ -91,7 +167,7 @@ export class HomeComponent implements OnInit {
});
}
private handleAbsListResult(result) {
handleAbsListResult(result) {
if (this.common.validResponse(result)) {
if (this.common.hasData(result.GetAbsenceTransactionList)) {
this.GetAbsenceTransactionList = result.GetAbsenceTransactionList;
@ -108,7 +184,7 @@ export class HomeComponent implements OnInit {
}
}
}
doInfinite(infiniteScroll) {
doInfinite() {
if (!this.IsReachEnd) {
//this.P_PAGE_NUM++;
const request = {
@ -148,7 +224,54 @@ export class HomeComponent implements OnInit {
}
}
}
createAbsence() {
createAbsence() {
this.common.openSubmitAbsencePage();
}
///////////////////////////////////////////////////////////////
getAccrualBalance() {
if (this.Sdate) {
let today = new Date(this.Sdate);
let day = today.getDate();
let month = today.getMonth() + 1;
let year = today.getFullYear();
let todayDate = month + '/' + day + '/' + year;
let effectiveDate = todayDate;
const request = {
P_SELECTED_EMPLOYEE_NUMBER: this.selEmp,
P_EFFECTIVE_DATE: effectiveDate
};
this.accrualService
.getAccrualBalances(request)
.subscribe((result: any) => {
this.handleAccrualResult(result);
});
}
}
handleAccrualResult(result) {
if (this.common.validResponse(result)) {
this.balance = result.GetAccrualBalancesList;
}
if(this.balance){
this.accrualNet = this.balance[0].ACCRUAL_NET_ENTITLEMENT;
this.accrualUsed = this.balance[0].ACCRUAL_USED_ENTITLEMENT;
this.accrualYearly = this.balance[0].ACCRUAL_YEARLY_ENTITLEMENT;
this.totalnumber= this.accrualNet + this.accrualUsed + this.accrualYearly;
this.totalnumber= this.totalnumber.toFixed(3);
this.data = {
// labels: ['earingTotal', 'deductionTotal'],
datasets: [
{ data: [this.accrualNet,this.accrualUsed,this.accrualYearly],
backgroundColor: [
'#DDB017',
'#094875',
'#CB3232',],
borderWidth: 2
}
]
};
}
}
}

@ -0,0 +1,39 @@
<ion-content padding>
<!--
<ion-col col-1
style="margin-right: -22px;margin-top: -10px;">
<ion-button class="closeIcon" (click)="closeModal()">
<img src="../assets/imgs/close.png">
</ion-button>
</ion-col> -->
<h2><div class="Header">Confirmation</div></h2>
<div>
<div *ngIf="submitAbsAttachmentList.length==0" class="labelcheck" lines="none" style="text-align: center;">
No Attachment
</div>
<div *ngIf="absComments==''" class="labelcheck" style="text-align: center;margin-bottom: 5px;padding-bottom: 16px;">
No Note
</div>
</div>
<ion-footer style="border-top: 2px solid grey !important;">
<ion-row class="rowBtn">
<ion-label class="labelRadio">Are you sure you want to submit</ion-label>
<ion-button class="submitOkButton" (click)="OkBtnModal()"> {{ts.trPK('general','ok')}}
</ion-button>
</ion-row>
<ion-row class="rowBtn">
<ion-button class="submitCancelButton" (click)="closeModal()"> {{ts.trPK('general','cancel')}}
</ion-button>
</ion-row>
</ion-footer>
</ion-content>

@ -0,0 +1,53 @@
.rowBtn{
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}
.Header{
color: black !important;
font-size: 25px !important;
font-weight: bold !important;;
margin: 0;
text-align: center;
margin-bottom: 20px;
}
.labelRadio{
color: black !important;
font-weight: bold !important;
padding-bottom: 20px;
}
.labelcheck{
color: red !important;
font-weight: bold !important;
margin-bottom: 10px;
}
.submitOkButton{
white-space: normal !important;
text-transform: capitalize !important;
min-height: 45px !important;
min-width: 5px !important;
margin: 8px !important;
--background:: #22c6b3;
width: 100% !important;
color: white!important;
border-radius: 16px !important;
}
.submitCancelButton{
white-space: normal !important;
text-transform: capitalize !important;
min-height: 45px !important;
min-width: 5px !important;
margin: 8px !important;
--background:: #094875;
width: 100% !important;
color: white!important;
border-radius: 16px !important;
}

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

@ -0,0 +1,36 @@
import { Component, OnInit } from '@angular/core';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { ModalController } from '@ionic/angular';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
@Component({
selector: 'app-submit-absence-modal',
templateUrl: './submit-absence-modal.component.html',
styleUrls: ['./submit-absence-modal.component.scss'],
})
export class SubmitAbsenceModalComponent implements OnInit {
submitAbsAttachmentList :any =[];
absComments: string;
constructor( private ts: TranslatorService,private modalCtrl: ModalController, private cs: CommonService){
this.submitAbsAttachmentList = this.cs.sharedService.getSharedData('submitAbsAttachmentList', false);
this.absComments = this.cs.sharedService.getSharedData('absComments', false);
}
ngOnInit() {
console.log("modal");
//this.actionBtns = this.cs.sharedService.getSharedData("passActionMore" , false);
console.log("modal");
}
closeModal() {
this.modalCtrl.dismiss();
}
OkBtnModal() {
let data = "ok";
this.modalCtrl.dismiss(data);
}
}

@ -1,5 +1,5 @@
<ion-header >
<ion-toolbar class="header-toolbar">
<ion-toolbar class="header-toolbar-new">
<ion-title color="light"> {{ts.trPK('submitAbsence','submitAbsence')}}</ion-title>
<ion-buttons slot="start">
<nav-buttons></nav-buttons>
@ -8,37 +8,36 @@
</ion-header>
<ion-content padding>
<ion-item>
<ion-label class="colBold requiredClass">{{ts.trPK('submitAbsence','absenceType')}} </ion-label>
<ion-item class='dynamicField'>
<ion-label position='floating' class="colBold requiredClass">{{ts.trPK('submitAbsence','absenceType')}} </ion-label>
<ion-select (ionChange)="calcDay()" okText="{{ts.trPK('general','ok')}}" cancelText="{{ts.trPK('general','cancel')}}" [(ngModel)]="absenceType" (ionChange)="onTypeAbsenceChange()" required>
<!-- let item of AbsenceType; let i=index; -->
<ion-select-option value= "{{item.ABSENCE_ATTENDANCE_TYPE_ID}}" *ngFor="let item of absenceTypeList; let i=index;">{{item.ABSENCE_ATTENDANCE_TYPE_NAME}} </ion-select-option>
</ion-select>
</ion-item>
<ion-item>
<ion-label class="colBold requiredClass">{{ts.trPK('submitAbsence','startDate')}} </ion-label>
<ion-item class='dynamicField'>
<ion-label position='floating' class="colBold requiredClass">{{ts.trPK('submitAbsence','startDate')}} </ion-label>
<ion-datetime (ionChange)="calcDay()" [(ngModel)]="startDate" min="1900" max="2100" displayFormat="MMM/DD/YYYY" placeholder="MM/DD/YYYY" required></ion-datetime>
</ion-item>
<ion-item *ngIf="hoursOrDay!='D'">
<ion-label class="colBold requiredClass">{{ts.trPK('submitAbsence','startTime')}} </ion-label>
<ion-item *ngIf="hoursOrDay!='D'" class='dynamicField'>
<ion-label position='floating' class="colBold requiredClass">{{ts.trPK('submitAbsence','startTime')}} </ion-label>
<ion-datetime displayFormat="HH:mm" [(ngModel)]="startTime" required></ion-datetime>
</ion-item>
<ion-item>
<ion-label class="colBold requiredClass">{{ts.trPK('submitAbsence','endDate')}}</ion-label>
<ion-item class='dynamicField'>
<ion-label position='floating' class="colBold requiredClass">{{ts.trPK('submitAbsence','endDate')}}</ion-label>
<ion-datetime (ionChange)="calcDay()" [(ngModel)]="endDate" min="1900" max="2100" displayFormat="MMM/DD/YYYY" placeholder="MM/DD/YYYY" required ></ion-datetime>
</ion-item>
<ion-item *ngIf="hoursOrDay!='D'">
<ion-label class="colBold requiredClass">{{ts.trPK('submitAbsence','endTime')}}</ion-label>
<ion-item *ngIf="hoursOrDay!='D'" class='dynamicField'>
<ion-label position='floating' class="colBold requiredClass">{{ts.trPK('submitAbsence','endTime')}}</ion-label>
<ion-datetime displayFormat="HH:mm" [(ngModel)]="endTime" required></ion-datetime>
</ion-item>
<ion-item>
<ion-item class='dynamicField'>
<ion-label class="colBold" >{{ts.trPK('submitAbsence','totalDays')}} </ion-label>
<ion-label end style="text-align: center;">{{totalDays}}</ion-label>
</ion-item>
<ion-item>
<ion-item class='dynamicField'>
<ion-input placeholder="{{ts.trPK('searchForReplacment','searchForReplacment')}}" type="text" [(ngModel)]="employeeSel">
</ion-input>
<button ion-button class="search-button" icon-only (click)="SearchReplacment()" clear type="button" item-end >
@ -46,8 +45,8 @@
</button>
</ion-item>
<ion-item>
<ion-label class="colBold">{{ts.trPK('submitAbsence','comments')}}</ion-label>
<ion-item class='dynamicField'>
<ion-label position='floating' class="colBold">{{ts.trPK('submitAbsence','comments')}}</ion-label>
<ion-textarea [(ngModel)]="absComments"></ion-textarea>
</ion-item>
<div id="dynamic-abs-container" >
@ -55,6 +54,6 @@
</ion-content>
<ion-footer>
<div class="centerDiv">
<ion-button color="customnavy" (click)="validateAbcenseTransaction()">{{ts.trPK('general','next')}}</ion-button>
<ion-button class="confirmEitOkButton" (click)="validateAbcenseTransaction()">{{ts.trPK('general','next')}}</ion-button>
</div>
</ion-footer>

@ -3,3 +3,21 @@
font-size: 25px;
color: #7F8C8D;
}
.header-toolbar-new{
--background: #22c6b3;
}
.confirmEitOkButton{
white-space: normal !important;
text-transform: capitalize !important;
min-height: 45px !important;
min-width: 5px !important;
margin: 8px !important;
--background: #22c6b3;
width: 80% !important;
color: white!important;
border-radius: 16px !important;
}

@ -26,6 +26,7 @@ import * as moment from "moment";
import {ReplacementListComponent} from "../../vacation-rule/replacement-list/replacement-list.component";
import {ReplacmentResponse} from "../models/replacment-response";
import { AbsenceResponse } from '../models/absence.response';
import { AbsenceReplacementListComponent } from '../absence-replacement-list/absence-replacement-list.component';
@Component({
selector: "app-submit-absence",
templateUrl: "./submit-absence.component.html",
@ -230,12 +231,13 @@ export class SubmitAbsenceComponent implements OnInit {
async SearchReplacment() {
const modal = await this.modalCtrl.create({
component: ReplacementListComponent
component: AbsenceReplacementListComponent,
backdropDismiss: false
});
modal.cssClass = 'replaceRoll-modal';
modal.onDidDismiss()
.then((data) => {
const user = data.data.empData;
const user = data.data;
console.log(data)
console.log(user);
if (data) {

@ -1,6 +1,6 @@
<ion-header >
<ion-toolbar class="header-toolbar">
<ion-toolbar class="header-toolbar-new">
<ion-title color="light"> {{ts.trPK('absenceList','attach')}}</ion-title>
<ion-buttons slot="start">
<nav-buttons></nav-buttons>

@ -0,0 +1,3 @@
.header-toolbar-new{
--background: #22c6b3;
}

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

@ -1,13 +1,13 @@
import { Injectable } from "@angular/core";
import { Observable } from "rxjs";
import { ConnectorService } from "src/app/hmg-common/services/connector/connector.service";
import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service";
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { ConnectorService } from 'src/app/hmg-common/services/connector/connector.service';
import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service';
@Injectable({
providedIn: "root"
providedIn: 'root'
})
export class AccrualService {
public static GET_ACCRUAL_BALANCE =
"Services/ERP.svc/REST/GET_ACCRUAL_BALANCES";
'Services/ERP.svc/REST/GET_ACCRUAL_BALANCES';
constructor(
public con: ConnectorService,
public authService: AuthenticationService

@ -1,32 +1,33 @@
import { NgModule } from '@angular/core';
import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
import { NgModule } from '@angular/core';
import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
const routes: Routes = [
{ path: '', redirectTo: 'authentication/login', pathMatch: 'full' },
{
path: 'authentication', loadChildren: './authentication/authentication.module#AuthenticationPageModule'},
{ path: 'home', loadChildren: './home/home.module#HomePageModule' },
{ path: 'profile', loadChildren: './profile/profile.module#ProfilePageModule' },
{ path: 'vacation-rule', loadChildren: './vacation-rule/vacation-rule.module#VacationRulePageModule' },
{ path: 'accrual-balances', loadChildren: './accrual-balances/accrual-balances.module#AccrualBalancesPageModule' },
{ path: 'my-team', loadChildren: './my-team/my-team.module#MyTeamPageModule' },
{ path: 'attendance', loadChildren: './attendance/attendance.module#AttendancePageModule' },
{ path: 'eit', loadChildren: './eit/eit.module#EITPageModule' },
{ path: 'absence', loadChildren: './absence/absence.module#AbsencePageModule' },
{ path: 'notification', loadChildren: './notification/notification.module#NotificationPageModule' },
{ path: 'my-specialist', loadChildren: './my-specialist/my-specialist.module#MySpecialistPageModule' },
{ path: 'my-subordinate', loadChildren: './my-subordinate/my-subordinate.module#MySubordinatePageModule' },
{ path: 'time-card', loadChildren: './time-card/time-card.module#TimeCardPageModule' },
{ path: 'payslip', loadChildren: './payslip/payslip.module#PayslipPageModule' }, { path: 'attendance-tracking', loadChildren: './attendance-tracking/attendance-tracking.module#AttendanceTrackingPageModule' }
const routes: Routes = [
{ path: '', redirectTo: 'authentication/login', pathMatch: 'full' },
{
path: 'authentication', loadChildren: './authentication/authentication.module#AuthenticationPageModule'},
{ path: 'home', loadChildren: './home/home.module#HomePageModule' },
{ path: 'profile', loadChildren: './profile/profile.module#ProfilePageModule' },
{ path: 'vacation-rule', loadChildren: './vacation-rule/vacation-rule.module#VacationRulePageModule' },
{ path: 'accrual-balances', loadChildren: './accrual-balances/accrual-balances.module#AccrualBalancesPageModule' },
{ path: 'my-team', loadChildren: './my-team/my-team.module#MyTeamPageModule' },
{ path: 'attendance', loadChildren: './attendance/attendance.module#AttendancePageModule' },
{ path: 'eit', loadChildren: './eit/eit.module#EITPageModule' },
{ path: 'absence', loadChildren: './absence/absence.module#AbsencePageModule' },
{ path: 'notification', loadChildren: './notification/notification.module#NotificationPageModule' },
{ path: 'my-specialist', loadChildren: './my-specialist/my-specialist.module#MySpecialistPageModule' },
{ path: 'my-subordinate', loadChildren: './my-subordinate/my-subordinate.module#MySubordinatePageModule' },
{ path: 'time-card', loadChildren: './time-card/time-card.module#TimeCardPageModule' },
{ path: 'payslip', loadChildren: './payslip/payslip.module#PayslipPageModule' }
];
@NgModule({
imports: [
/*RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules}),*/
RouterModule.forRoot(routes),
],
exports: [RouterModule]
})
export class AppRoutingModule { }
];
@NgModule({
imports: [
/*RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules}),*/
RouterModule.forRoot(routes),
],
exports: [RouterModule]
})
export class AppRoutingModule { }

@ -1,25 +1,110 @@
<!-- <ion-nav [root]="rootPage" #mycontent swipeBackEnabled="false"></ion-nav> -->
<!-- (ionWillOpen)="menuOpened(true)" -->
<ion-app [dir]="direction">
<ion-split-pane>
<ion-menu [side]=" direction === 'rtl' ? 'end' : 'start'" [swipeGesture]="false">
<ion-content class="sidebar-menu">
<div class="header-div">
<div class="centerDiv">
<p class="TxtPlace">{{ts.trPK('home','hello')}}, {{User_name_Emp}}</p>
<!-- <div> <img src="{{user_image}}" class="profileImg"></div> -->
<div><img class="menuImg" [src]="user_image"></div>
<div>
<ion-button class="closeIcon" (click)="closeMenu()">
<img style= "height: 18px !important;" src="../assets/imgs/close_menu_icon.png "></ion-button>
</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>
<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">
<img width="30" src="../assets/imgs/bell.png" item-left>
<img width="30" src="../assets/imgs/signout.png" item-left>
</ion-thumbnail>
<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-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-label>
@ -29,15 +114,24 @@
</button> -->
</ion-item>
<ion-item (click)="profile()">
<ion-item [hidden]="TeamFlag!='true'" (click)="openMyTeamPage()">
<ion-thumbnail slot="start" class="menu-thumb">
<img width="30" src="../assets/imgs/username.png" item-left>
<img style= "height: 14px !important;" src="../assets/imgs/my_team_icon.png" item-left>
</ion-thumbnail>
<ion-label class="profile">
{{ts.trPK('myTeam','myTeam-header')}}
</ion-label>
</ion-item>
<!-- <ion-item (click)="profile()">
<ion-thumbnail slot="start" class="menu-thumb">
<img width="30" src="../assets/imgs/profile_icon.png" item-left>
</ion-thumbnail>
<ion-label>
{{ts.trPK('userProfile','title')}}
</ion-label>
</ion-item>
<ion-item (click)="logout();">
</ion-item> -->
<!-- <ion-item (click)="logout();">
<ion-thumbnail slot="start" class="menu-thumb">
@ -47,7 +141,7 @@
{{ts.trPK('home','logout')}}
</ion-label>
</ion-item>
</ion-item> -->
</ion-list>
<div class="" style="text-align:center">
@ -55,7 +149,7 @@
<p class="companyTxt">{{CompanyImageDescription}}</p>
</div>
<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>
</div>
</ion-content>

@ -8,9 +8,86 @@ header
.content-ios:not([no-bounce])>.scroll-content::before {
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;
}
.menubutton{
white-space: normal;
color: var(--light);
text-transform: capitalize;
min-height: 39px;
background: #f0ecec;
font-size: 2rem;
position: absolute;
width: 35px !important;
height: 19px;
box-shadow: 3px 0px 7px 0px #c5c2c2;
border-radius: 50%;
}
.changeIcon{
/* background: #c1c1c1; */
width: 21px;
/* height: 26px; */
border-radius: 50% !important;
position: relative;
color: #7f8c8d;
}
.changeImgBtn{
// 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{
width: 80px;
height: 80px;
width: 105px !important;
height: 105px !important;
margin-left: 90px !important;
display: inline-flex;
overflow: hidden;
background: transparent;
@ -122,17 +199,15 @@ header
margin-left: 0.2cm;
}
.sidebar-menu .header-div {
background: var(--primary);
background: -moz-linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%, var(--secondary) 59%, var(--customnavy) 100%);
background: -webkit-linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%, var(--secondary) 59%, var(--customnavy) 100%);
background: linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%, var(--secondary) 59%, var(--customnavy) 100%);
color: var(--light);
text-transform: capitalize;
height: 120px;
height: 100px;
position: relative;
display: block;
margin-bottom: 40px;
margin-bottom: -28px;
}
.list-md .item-block .item-inner,
@ -154,8 +229,20 @@ button.menu-item.item.item-block.item-ios {
.TxtPlace {
margin: 0;
padding: 40px 0 10px 0;
padding: 0;
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 {
@ -189,6 +276,30 @@ button.menu-item.item.item-block.item-ios {
text-align: center;
}
ion-thumbnail.menu-thumb{
width:30px;
height:30px;
width:20px;
height:20px;
// margin-top: 5px !important;
}
.changepassword{
color: black !important;
font-weight: bolder !important;
}
.profile{
color: black !important;
font-weight: bolder !important;
}
.profileImg{
width: 160px;
height: 160px;
display: -webkit-inline-box;
display: inline-flex;
overflow: hidden;
background: transparent;
border-radius: 70% !important;
position: relative;
top: 7px;
}

@ -28,6 +28,12 @@ export class AppComponent implements OnInit, AfterViewInit {
companyUrl: string = "../assets/imgs/CS.png";
companyDesc: string = "Powered By Cloud Solutions";
public direction = "ltr";
User_Job_name: string;
requestGetLoginInfo: {
DeviceType: string; DeviceToken: string; //this.deviceToken
};
user: boolean;
TeamFlag :string = "false";
constructor(
public ts: TranslatorService,
private cs: CommonService,
@ -38,8 +44,7 @@ export class AppComponent implements OnInit, AfterViewInit {
private menu: MenuController,
private authService: AuthenticationService,
private sanitizer: DomSanitizer,
public pushService: PushService,
public pushService: PushService
) {
this.events.subscribe("img-change", displayImg => {
console.log("app compont: "+displayImg);
@ -51,11 +56,12 @@ export class AppComponent implements OnInit, AfterViewInit {
}
ngOnInit() {
this.initializeApp();
}
ngAfterViewInit() {}
initializeApp() {
this.start = false;
this.menu.enable(false)
this.lazyLoadingService.monitorLazyLoading(15, true);
this.platform.ready().then(() => {
this.ts.loadResources(() => {
@ -71,8 +77,8 @@ export class AppComponent implements OnInit, AfterViewInit {
}
private startReceivingPushService() {
console.log("platform.ready")
this.pushService.startReceiving();
}
subscribeEvents() {
this.events.subscribe("setMenu", () => {
@ -91,6 +97,8 @@ export class AppComponent implements OnInit, AfterViewInit {
this.user_image = user.EMPLOYEE_IMAGE
? "data:image/png;base64," + user.EMPLOYEE_IMAGE
: "../assets/imgs/profile.png";
this.User_Job_name=user.JOB_NAME;
console.log(user);
} else {
console.log(user);
@ -100,6 +108,11 @@ export class AppComponent implements OnInit, AfterViewInit {
this.events.subscribe("getNotCount", badge => {
this.notBadge = badge;
});
this.events.subscribe('myTeamFlag', myTeamFlag => {
this.TeamFlag = myTeamFlag;
});
console.log("this.TeamFlag>>>>>>>>>"+ this.TeamFlag);
}
private initializeDirection() {
this.direction = TranslatorService.getCurrentDirection();
@ -125,8 +138,19 @@ export class AppComponent implements OnInit, AfterViewInit {
this.cs.openLogin();
}
openMyTeamPage() {
this.menu.toggle();
this.cs.openMyTeamPage();
}
// profile() {
// this.cs.openProfile();
// this.menu.toggle();
// }
profile() {
this.cs.openProfile();
this.cs.openEditProfile();
this.menu.toggle();
}
openNotification(){
@ -135,4 +159,25 @@ export class AppComponent implements OnInit, AfterViewInit {
this.menu.toggle();
}
openChangePassword(){
this.cs.openChangePassword();
this.menu.toggle();
}
// openPayslipPage(){
// this.cs.openPayslipPage();
// 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 { SplashScreen } from '@ionic-native/splash-screen/ngx';
import { StatusBar } from '@ionic-native/status-bar/ngx';
import { OneSignal } from '@ionic-native/onesignal/ngx';
import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routing.module';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { ZBar } from '@ionic-native/zbar/ngx';
import { Geolocation } from '@ionic-native/geolocation/ngx';
import {Camera,CameraOptions,PictureSourceType} from'@ionic-native/Camera/ngx';
import { FilePath } from "@ionic-native/file-path/ngx";
import { File } from "@ionic-native/file/ngx";
import { Base64 } from "@ionic-native/base64/ngx";
import {Camera, CameraOptions, PictureSourceType} from '@ionic-native/Camera/ngx';
import { FilePath } from '@ionic-native/file-path/ngx';
import { File } from '@ionic-native/file/ngx';
import { Base64 } from '@ionic-native/base64/ngx';
import { FirebaseX } from '@ionic-native/firebase-x/ngx';
import { NgCalendarModule } from 'ionic2-calendar';
@NgModule({
declarations: [AppComponent],
entryComponents: [],
@ -26,7 +28,8 @@ import { Base64 } from "@ionic-native/base64/ngx";
hardwareBackButton: true,
}),
AppRoutingModule,
HmgCommonModule
HmgCommonModule,
NgCalendarModule
],
providers: [
StatusBar,
@ -37,7 +40,7 @@ import { Base64 } from "@ionic-native/base64/ngx";
File,
FilePath,
Base64,
OneSignal,
FirebaseX,
{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy }
],
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,89 @@
<!-- <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-header>
<ion-toolbar class="header-toolbar-new">
<ion-buttons slot="start">
<nav-buttons backLink="/home"></nav-buttons>
</ion-buttons>
<ion-title>Attendance Tracking</ion-title>
</ion-toolbar>
</ion-header> -->
<ion-content>
<div class="back-button-container">
<nav-buttons backLink="/home"></nav-buttons>
</div>
<div class="timer-chart">
<ion-label class="shift-title" style="font-weight: bold; font-size: 20px;"> {{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-col [size]="12" class="colBorder" style="border-right: none;">
<ion-label class="shift-title">{{ts.trPK('attendance-tracking','shift-time')}}</ion-label>
<ion-label class="shift-text shift-title">{{attendanceTrackingList.P_SHT_NAME}} </ion-label>
</ion-col>
</ion-row>
<ion-row class="rowBorder">
<ion-col [size]="6" class="colBorder">
<ion-label class="shift-title"> {{ts.trPK('attendance-tracking','check-in')}}</ion-label>
<ion-label class="shift-text shift-title">08:00</ion-label>
</ion-col>
<ion-col [size]="6" class="colBorder">
<ion-label class="shift-title"> {{ts.trPK('attendance-tracking','check-out')}}</ion-label>
<ion-label class="shift-text shift-title">08:00 </ion-label>
</ion-col>
</ion-row>
<ion-row style="text-align: center">
<ion-col [size]="6" class="colBorder">
<ion-label class="shift-title"> {{ts.trPK('attendance-tracking','late-in')}}</ion-label>
<ion-label class="shift-text shift-title">08:00 </ion-label>
</ion-col>
<ion-col [size]="6" class="colBorder">
<ion-label class="shift-title"> {{ts.trPK('attendance-tracking','regular')}}</ion-label>
<ion-label class="shift-text shift-title">{{attendanceTrackingList.P_SCHEDULED_HOURS | slice:0:-3}} </ion-label>
</ion-col>
</ion-row>
</ion-grid>
</div>
</ion-content>

@ -0,0 +1,68 @@
ion-content {
font-family: WorkSans-Regular;
}
ion-grid {
padding:30px 15px;
}
.timer-chart{
background: #094773;
text-align: center;
line-height: .7cm;
}
.tracking-content{
background: #053c63;
min-height: 50%;
}
.rowBorder{
text-align: center;
border-bottom: var(--lightblue) solid 1px;
}
.shift-text{
font-size: 36px;
line-height: 36px;
display: block;
}
.shift-title{
width: 100%;
text-align: center;
color: white !important;
}
.stopicon{
width: 50px;
height: 39px;
color: #053c63;
}
.divstopBtn{
text-align: center;
}
.stopBtn{
height: 89px;
width: 89px;
background-color: var(--lightblue) !important;
border-radius: 50%;
display: inline-block;
margin-top: -40px;
border: solid 5px #053c63;
}
.colBorder{
padding: 20px 0px;
text-align: center;
}
.colBorder:nth-child(1){
border-right: var(--lightblue) solid 1px;
}
.fixed-shift-timer{
margin-top: -50px;
margin-bottom: -10px;
}
.back-button-container{
background: #094773;
}

@ -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,141 @@
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';
import { SharedDataService } from '../../hmg-common/services/shared-data-service/shared-data.service';
import { AuthenticatedUser } from 'src/app/hmg-common/services/authentication/models/authenticated-user';
@Component({
selector: 'app-home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.scss'],
})
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;
public spentHours: any;
public userData = this.sharedData.getSharedData(AuthenticatedUser.SHARED_DATA, false);
constructor(
public cs: CommonService,
public db: DashboredService,
public ts: TranslatorService,
public attendScanService: AttendScanService,
public sharedData: SharedDataService
) { }
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) {
this.remainingTime = this.convertInSeconds(data.P_REMAINING_HOURS.split(':'));
this.scheduledTime = this.convertInSeconds(data.P_SCHEDULED_HOURS.split(':'));
this.spentHours = this.convertInSeconds(data.P_SPENT_HOURS.split(':'));
this.isCheckedIn = this.spentHours === 0 ? false : true;
if (this.isCheckedIn) {
this.initTimer();
}
}
showAttendanceTracking() {
const request = {
P_SELECTED_EMPLOYEE_NUMBER: this.userData.EMPLOYEE_NUMBER
};
this.db.getAttendanceTracking(request).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 { HomeComponent } from './home/home.component';
import {MonthlyAttendanceComponent} from './monthly-attendance/monthly-attendance.component';
import { HmgCommonModule } from '../hmg-common/hmg-common.module';
const routes: Routes = [
{
@ -16,6 +18,10 @@ const routes: Routes = [
{
path: 'home',
component: HomeComponent
},
{
path: 'monthlyAttendance',
component: MonthlyAttendanceComponent
}
]
}
@ -26,8 +32,9 @@ const routes: Routes = [
CommonModule,
FormsModule,
IonicModule,
HmgCommonModule,
RouterModule.forChild(routes)
],
declarations: [AttendancePage, HomeComponent]
declarations: [AttendancePage, HomeComponent, MonthlyAttendanceComponent]
})
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 { ChangePasswordComponent } from './change-password/change-password.component';
import {ConfirmLoginComponent} from '../authentication/confirm-login/confirm-login.component'
import {WelcomeComponent} from '../authentication/welcome/welcome.component'
const routes: Routes = [
{
@ -51,6 +51,10 @@ const routes: Routes = [
{
path: 'confirmLogin',
component: ConfirmLoginComponent
},
{
path: 'welcom',
component: WelcomeComponent
}
]
}
@ -77,7 +81,8 @@ const routes: Routes = [
SmsPageComponent,
CheckUserComponent,
ChangePasswordComponent,
ConfirmLoginComponent
// ConfirmLoginComponent,
WelcomeComponent
],
providers:[
FingerprintAIO,

@ -1,5 +1,5 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<ion-toolbar class="header-toolbar-new">
<ion-buttons slot="start">
<ion-back-button color="light" class="btnBack" defaultHref="/home"></ion-back-button>
</ion-buttons>
@ -12,23 +12,37 @@
<ion-content padding>
<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 />
<!-- <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>
<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 />
<!-- <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">
</ion-input>
</ion-item>
<ion-item>
<img class="item-icon" src="assets/imgs/password.png" item-start />
<ion-item class="item-input-login" >
<img class="item-icon" src="assets/imgs/password.png" item-start />
<!-- <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">
</ion-input>
</ion-item>
@ -40,6 +54,6 @@
</ion-content>
<ion-footer>
<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>
</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_OLD_PASSWORD : string;
public P_USER_NAME : string;
public logo = "assets/icon/login/lock.png";
userData: any = {};
public isExpiredPwd: boolean = false;
constructor(

@ -8,10 +8,27 @@
</ion-header>
<ion-content padding>
<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 />
<ion-label>{{ts.trPK('login','username')}}</ion-label>
<ion-input required type="text" [(ngModel)]="P_USER_NAME">
<ion-label>{{ts.trPK('login','check-user-text1')}}</ion-label>
<ion-input class="login-input" required type="text" [(ngModel)]="P_USER_NAME">
</ion-input>
</ion-item>
</ion-grid>
@ -19,6 +36,6 @@
</ion-content>
<ion-footer>
<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>
</ion-footer>

@ -4,4 +4,38 @@
.btnBack{
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 {
public P_USER_NAME : string;
private loginData = new LoginModel();
public logo = "assets/icon/login/lock.png";
@ViewChild(InternationalMobileComponent) internationlMobile: InternationalMobileComponent;
constructor(public cs: CommonService,
public authService: AuthenticationService,
@ -77,6 +78,7 @@ export class CheckUserComponent implements OnInit {
console.log(result);
this.loginData.LogInTokenID = result.LogInTokenID;
this.loginData.P_USER_NAME = this.P_USER_NAME;
// this.loginData.EMPLOYEE_NAME=result.MemberLoginList[0].EMPLOYEE_NAME;
this.sharedData.setSharedData(this.loginData, AuthenticationService.LOGIN_DATA);
this.sharedData.setSharedData(true,Password.IS_FORGET_PSW);
this.cs.stopLoading();

@ -1,5 +1,5 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<ion-header *ngIf="!accessFromOutSide">
<ion-toolbar class="header-toolbar-new">
<ion-buttons slot="start">
<ion-back-button color="light" class="btnBack" ></ion-back-button>
</ion-buttons>
@ -9,20 +9,31 @@
<ion-content padding>
<ion-grid>
<ion-content [scrollEvents]="true"
[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">
<img [src]="logo" class="logo" />
</ion-col>
</ion-row>
<ion-row class="description">
<ion-col size="12">
<ion-row class="description" *ngIf="!accessFromOutSide">
<ion-col size="12">
<!-- <type-writer *ngIf="onlySMSBox" [text]="'login,verify-login-with' | translate" class="description"
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"
color="primary" fontSize="0.55cm" lineHeight="1cm" fontSize="0.55cm"></type-writer>
-->
@ -32,19 +43,32 @@
</ion-col>
</ion-row>
<page-trailer [small]="true"></page-trailer>
<ion-row [dir]="direction" class="zoomIn">
<ng-container *ngFor="let buttonsGroup of buttons">
<ion-row [ngClass]=" accessFromOutSide ? 'rowOutside' : ''" [dir]="direction" class="zoomIn">
<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">
<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"
*ngIf="button.visible">
*ngIf="button.visible"
[buttonClass]="button.buttonClass" [pClass]="button.pClass">
</app-button>
</ion-col>
</ng-container>
</ng-container>
</ion-row>
<page-trailer [small]="true"></page-trailer>
</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";
@ -27,6 +27,9 @@ import { SMSCheckResponse } from "src/app/hmg-common/services/authentication/mod
import { PushService } from 'src/app/hmg-common/services/push/push.service';
import { Platform } from '@ionic/angular';
import { CheckUserAuthenticationResponse } from 'src/app/hmg-common/services/authentication/models/check-user-auth.response';
import { LoginModel } from '../models/LoginModel';
import * as moment from "moment";
@ -44,7 +47,7 @@ import { Platform } from '@ionic/angular';
export class ConfirmLoginComponent implements OnInit {
public logo = "assets/imgs/CS.png";
public logo = "assets/icon/login/password.png";
public buttons:any=[];
@ -52,7 +55,7 @@ export class ConfirmLoginComponent implements OnInit {
onlySMSBox: any = true;
loginData:any;
public loginData = new LoginModel();
selectedOption: any;
@ -62,7 +65,14 @@ export class ConfirmLoginComponent implements OnInit {
deviceToken:any;
@Input() accessFromOutSide = false;
@Input() visible = true;
username: any;
password:any;
loginType: any;
empname: string;
lastLoginDate: string;
user_name: string;
constructor(
@ -87,14 +97,15 @@ export class ConfirmLoginComponent implements OnInit {
) {
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
@ -108,6 +119,9 @@ export class ConfirmLoginComponent implements OnInit {
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 +135,9 @@ export class ConfirmLoginComponent implements OnInit {
this.checkIfAvailable();
//**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();
@ -214,7 +229,10 @@ export class ConfirmLoginComponent implements OnInit {
disabled: this.isFaceorFinger === "finger" || this.isFaceorFinger === "biometric" ? false : true,
visible: this.onlySMSBox
visible: this.onlySMSBox,
buttonClass: 'buttonClassWhite',
pClass: 'pClassMyFileIconBlack',
class: 'nationalIdIcon',
},
@ -232,7 +250,10 @@ export class ConfirmLoginComponent implements OnInit {
disabled: this.isFaceorFinger === "face" ? false : true,
visible: this.onlySMSBox
visible: this.onlySMSBox,
buttonClass: 'buttonClassWhite',
pClass: 'pClassMyFileIconBlack',
class: 'nationalIdIcon',
},
@ -248,7 +269,10 @@ export class ConfirmLoginComponent implements OnInit {
value: 4,
visible: true
visible: true,
buttonClass: 'buttonClassWhite',
pClass: 'pClassMyFileIconBlack',
class: 'nationalIdIcon',
},
@ -264,7 +288,10 @@ export class ConfirmLoginComponent implements OnInit {
value: 1,
visible: true
visible: true,
buttonClass: 'buttonClassWhite',
pClass: 'pClassMyFileIconBlack',
class: 'nationalIdIcon',
}
@ -278,6 +305,7 @@ export class ConfirmLoginComponent implements OnInit {
confirm(el: any) {
console.log("confirm:"+ el );
this.selectedOption = this.selectedOption && !this.onlySMSBox ? this.selectedOption : el.value;
@ -286,13 +314,15 @@ export class ConfirmLoginComponent implements OnInit {
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);
break;
case 2:
localStorage.setItem("login-type",el.value);
console.log(el.value);
@ -303,6 +333,7 @@ export class ConfirmLoginComponent implements OnInit {
break;
case 3:
localStorage.setItem("login-type",el.value);
console.log(el.value);
@ -316,6 +347,7 @@ export class ConfirmLoginComponent implements OnInit {
console.log(el.value);
localStorage.setItem("login-type",el.value);
this.loginWithWhatsapp(el);
@ -335,7 +367,7 @@ export class ConfirmLoginComponent implements OnInit {
AuthenticationService.LAST_LOGIN
);
}
@ -460,7 +492,7 @@ export class ConfirmLoginComponent implements OnInit {
this.cs.sharedService.setSharedData({
MobileNumber: this.loginData.mobileNumber,
MobileNumber: this.loginData.MobileNumber,
loginType: this.selectedOption
@ -602,23 +634,26 @@ export class ConfirmLoginComponent implements OnInit {
// this.deviceToken= this.cs.sharedService.getSharedData(AuthenticationService.DEVICE_TOKEN, false);
let request = new GetLoginInfoRequest();
let request ={
DeviceType: this.cs.getDeviceType(),
DeviceToken:this.deviceToken
this.authService.setPublicFields(request);
} ;
request.MobileNumber = this.loginData.MobileNumber;
// this.authService.setPublicFields(request);
request.P_USER_NAME=this.loginData.P_USER_NAME;
// request.MobileNumber = this.loginData.MobileNumber;
request.UserName=this.loginData.P_USER_NAME;
// request.P_USER_NAME=this.loginData.P_USER_NAME;
request.LogInTokenID =this.loginData.LogInTokenID;
// request.UserName=this.loginData.P_USER_NAME;
request.CompanyID =1;//cs=1 , HMG=2
// request.LogInTokenID =this.loginData.LogInTokenID;
request.DeviceType= this.cs.getDeviceType();
// request.CompanyID =1;//cs=1 , HMG=2
request.DeviceToken=this.deviceToken;
@ -636,7 +671,7 @@ export class ConfirmLoginComponent implements OnInit {
private getMobileInfo(request: GetLoginInfoRequest) {
private getMobileInfo(request: any) {
console.log("2");
@ -646,12 +681,12 @@ export class ConfirmLoginComponent implements OnInit {
console.log("authService.getLoginInfo");
if(result.Mohemm_GetPatientID_List.length > 0){
if(result.Mohemm_GetMobileLoginInfoList.length > 0){
if ( result.Mohemm_GetPatientID_List[0].LoginType == 2 || result.Mohemm_GetPatientID_List[0].LoginType == 3) {
if ( result.Mohemm_GetMobileLoginInfoList[0].LoginType == 2 || result.Mohemm_GetMobileLoginInfoList[0].LoginType == 3) {
this.loginTokenID = result.LogInTokenID;
//send silent sms
this.checkSMS();
} else {
@ -712,11 +747,18 @@ export class ConfirmLoginComponent implements OnInit {
this.authService.setAuthenticatedUser(result).subscribe(() => {
console.log("insert");
localStorage.setItem("emp-name",result.MemberInformationList[0].EMPLOYEE_NAME);
console.log("empnmae: "+ localStorage.getItem("emp-name"));
this.user_name=result.MemberInformationList[0].EMPLOYEE_NAME;
//get date and time of last login
let currDateTime = moment().format('MMM DD , YYYY HH:mm')
localStorage.setItem("login-at",currDateTime);
if (this.platform.is("cordova")) {
this.insertMobileLogin();
}
this.cs.openHome();
@ -751,12 +793,13 @@ export class ConfirmLoginComponent implements OnInit {
request.DeviceType= this.cs.getDeviceType();
request.DeviceToken=this.deviceToken;
request.DeviceToken=this.deviceToken;//"5ca8a69cf1804db55264c349edffb99b9d63acd9fa9b6b18956bcb2ad3f2ba36";//this.deviceToken;
//request.TokenID=
request.LoginType=this.selectedOption;
request.EmployeeName=this.user_name;
this.authService
@ -785,6 +828,80 @@ 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);
// console.log("result.MemberLoginList.EMPLOYEE_NAME "+ result.MemberInformationList[0].EMPLOYEE_NAME);
this.loginData.LogInTokenID = result.LogInTokenID;
this.loginData.MobileNumber = result.MemberLoginList.P_MOBILE_NUMBER;
this.loginData.P_USER_NAME = this.username;
this.loginData.EmployeeName = this.user_name;
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
}

@ -1,5 +1,5 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<ion-toolbar class="header-toolbar-new">
<ion-buttons slot="start">
<ion-back-button color="light" class="btnBack" ></ion-back-button>
</ion-buttons>
@ -10,20 +10,30 @@
<ion-content padding>
<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 />
<ion-label>{{'changePassword,newPassword' | translate}}</ion-label>
<ion-input required type="password"
<ion-input class="login-input" required type="password"
[(ngModel)]="P_NEW_PASSWORD">
</ion-input>
</ion-item>
<ion-item>
<ion-item class="item-input-login">
<img class="item-icon" src="assets/imgs/password.png" item-start />
<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">
</ion-input>
</ion-item>
@ -35,6 +45,6 @@
</ion-content>
<ion-footer>
<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>
</ion-footer>

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

@ -1,28 +1,57 @@
<ion-content padding>
<ion-grid class="customGrid">
<ion-row>
<!-- <ion-row>
<ion-col class="colPad">
<img class="centerDiv" src="../assets/imgs/CS.png" />
<img class="centerDiv" src="../assets/imgs/header.png" />
</ion-col>
</ion-row> -->
<ion-row *ngIf="!user">
<div class="content">
<div class="first-circle"></div>
<div class="middle-circle"></div>
<div class="last-circle"></div>
</div>
</ion-row>
<ion-row *ngIf="user ">
<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-col>
<ion-col *ngIf="!user">
<P class="pageTitle text-caps">{{ts.trPK('login','login')}}</P>
</ion-col>
</ion-row>
</ion-grid>
<ion-item>
<div *ngIf="!user">
<ion-item class="item-input-login">
<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-item>
<ion-item>
<ion-item class="item-input-login">
<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>
<button ion-button clear class="forgetText" type="button" (click)="forgetPasswordPage()" item-right >
{{ts.trPK('login','forgot-password')}}
</button>
</ion-item>
<ion-item>
<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>
</div>
</div>
<!-- div login-->
<!-- <div *ngIf="welcomeBack"> -->
<welcome-login (onLogin)="login()" (loginWithUser)="loginWithUser()" *ngIf="user ">
</welcome-login>
<!-- </div> -->
</ion-content>
<ion-footer>
<ion-footer *ngIf="!user">
<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>
<br />
<div class="centerDiv">
<!-- <div class="centerDiv">
<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>

@ -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 { 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 { PushService } from 'src/app/hmg-common/services/push/push.service';
@Component({
selector: "login",
@ -39,6 +40,15 @@ export class LoginComponent implements OnInit, OnDestroy {
private isMobileFingerPrint: boolean;
private FingerPrintPatientIdentificationID: string;
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";
deviceToken: any="";
user: boolean =false;
DeviceType: string;
requestGetLoginInfo:any;
constructor(
public cs: CommonService,
@ -52,19 +62,66 @@ export class LoginComponent implements OnInit, OnDestroy {
public device: Device,
public splash: SplashScreen,
public sharedData: SharedDataService,
public plt: Platform
public plt: Platform,
public pushService: PushService
) { }
ngOnInit() {
// this.deviceToken= this.cs.sharedService.getSharedData(AuthenticationService.DEVICE_TOKEN, false);
// console.log("get deviceToken login"+ this.deviceToken)
this.deviceToken= localStorage.getItem('devicyeToken');
console.log("let deviceToken" + this.deviceToken);
if (this.deviceToken) {
console.log('login enabled first time: ' + this.deviceToken);
} else {
console.log("no deviceToken" );
this.pushService.startReceiving();
setTimeout(() => {
this.deviceToken= localStorage.getItem('deviceToken');
console.log('login enabled second time: ' + this.deviceToken);
}, 1000);
}
setTimeout(() => {
this.getLastLoginInfo();
},5000);
//here will delete below part and depdding on user (response from getMobileInfo)
this.username = localStorage.getItem("user");
this.password = localStorage.getItem("password");
let remember = localStorage.getItem("remember");
this.password = localStorage.getItem("password"); //****//
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 }
//here will be check on user if exite then s part and depdding on user (response from getMobileInfo)
if(this.user){
// this.loginDiv=false;
// this.welcomeBack=true;
}else{
// this.user=true;
// this.welcomeBack=false;
}
// alert("user>>" + this.username);
// alert("pass>>>" + this.password);
// alert("remember>>>" + this.remeberMe);
/// call getLoginInfo
}
ngOnDestroy(): void {
@ -91,24 +148,42 @@ export class LoginComponent implements OnInit, OnDestroy {
public addValue(e): void {
// console.log(e.currentTarget.checked);
this.remeberMe = e.currentTarget.checked;
this.remeberMe = true;//e.currentTarget.checked;
this.remeberMyInfo();
}
public remeberMyInfo() {
if (this.remeberMe) {
// if (this.remeberMe) {
if(this.username){localStorage.setItem("user", this.username);}
if(this.password){localStorage.setItem("password", this.password);}
localStorage.setItem("remember", "true");
} else {
localStorage.setItem("user", "");
localStorage.setItem("password", "");
localStorage.setItem("remember", "false");
}
// } else {
// localStorage.setItem("user", "");
// localStorage.setItem("password", "");
// localStorage.setItem("remember", "false");
// }
}
public onLogin() {
this.checkAppUpdated();
console.log("onLogin");
// this.checkAppUpdated();
// this.checkUserAuthentication();
this.deviceToken = localStorage.getItem('deviceToken');
console.log("let deviceToken" + this.deviceToken);
if (this.deviceToken) {
console.log('login enabled first time: ' + this.deviceToken);
this.checkAppUpdated();
} else {
console.log("no deviceToken" );
this.pushService.startReceiving();
setTimeout(() => {
this.deviceToken = localStorage.getItem('deviceToken');
this.checkAppUpdated();
console.log('login enabled second time: ' + this.deviceToken);
}, 1000);
}
}
public checkAppUpdated() {
@ -141,6 +216,10 @@ export class LoginComponent implements OnInit, OnDestroy {
private checkUserAuthentication() {
console.log("debug Here!!");
console.log(this.username);
console.log(this.language);
console.log(this.password);
this.cs.startLoading();
const request = new LoginRequest();
request.P_USER_NAME = this.username;
@ -158,14 +237,19 @@ export class LoginComponent implements OnInit, OnDestroy {
console.log("success");
this.cs.stopLoading();
if (this.cs.validResponse(result)) {
// alert("result.MemberLoginList.EMPLOYEE_NAME :" + result.MemberLoginList[0].EMPLOYEE_NAME);
this.loginData.LogInTokenID = result.LogInTokenID;
this.loginData.MobileNumber = result.MemberLoginList.P_MOBILE_NUMBER;
this.loginData.P_USER_NAME = this.username;
// this.loginData.EMPLOYEE_NAME =result.MemberLoginList[0].EMPLOYEE_NAME;
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
// }
} else {
@ -241,6 +325,8 @@ export class LoginComponent implements OnInit, OnDestroy {
console.log(result);
this.loginData.LogInTokenID = result.LogInTokenID;
this.loginData.P_USER_NAME = this.username;
// this.loginData.EmployeeName =result.MemberLoginList[0].EMPLOYEE_NAME;
this.cs.sharedService.setSharedData(this.loginData.P_USER_NAME, LoginRequest.SHARED_DATA);
this.sharedData.setSharedData(this.loginData, AuthenticationService.LOGIN_DATA);
this.sharedData.setSharedData(true, Password.IS_FORGET_PSW);
@ -250,4 +336,47 @@ export class LoginComponent implements OnInit, OnDestroy {
});
}
login() {
console.log("login emit");
console.log("login");
// this.checkUserAuthentication();
//this.loginDiv=true;
this.user=false;
}
loginWithUser() {
console.log("loginWithUser")
this.cs.openConfirmLoginPage();
}
///
getLastLoginInfo(){
this.requestGetLoginInfo= {
DeviceType:this.cs.getDeviceType(),
DeviceToken:this.deviceToken//"5ca8a69cf1804db55264c349edffb99b9d63acd9fa9b6b18956bcb2ad3f2ba36"//this.deviceToken
}
this.authService.getLoginInfo(this.requestGetLoginInfo,() => {}, this.ts.trPK('general', 'ok')).subscribe(res => {
if (this.cs.validResponse(res)) {
if(res.Mohemm_GetMobileLoginInfoList.length > 0){
this.cs.sharedService.setSharedData(
// res.Patient_SELECTDeviceIMEIbyIMEIList[0],
res.Mohemm_GetMobileLoginInfoList[0],
AuthenticationService.IMEI_USER_DATA
);
this.user = true;
}
else{
this.user=false
}
}
});
}
}

@ -3,4 +3,7 @@ export class LoginModel {
activationCode: string;
P_USER_NAME: string;
MobileNumber: string;
EMPLOYEE_DISPLAY_NAME: string;
EMPLOYEE_NAME:string;
EmployeeName:string;
}

@ -1,5 +1,5 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<ion-toolbar class="header-toolbar-new">
<ion-buttons slot="start">
<ion-back-button color="light" class="btnBack" ></ion-back-button>
</ion-buttons>
@ -10,13 +10,19 @@
<ion-content padding>
<ion-grid>
<ion-row>
<ion-col class="colPad">
<ion-img class="centerDiv" src="../assets/imgs/CS.png"></ion-img>
<ion-col [size]="4">
<img [src]="logo" class="logo" />
<!-- <ion-img class="centerDiv" src="../assets/imgs/CS.png"></ion-img> -->
</ion-col>
</ion-row>
<br/>
<br/>
<ion-row>
<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-row>
</ion-grid>
@ -25,15 +31,34 @@
<div>
<h1 text-center>{{displayTime}}</h1>
<br/><br/>
<ion-item>
<!-- <ion-label>{{'verificationcode,verificationcode' | translate}}</ion-label> -->
<!-- <img class="item-icon" src="assets/imgs/password.png" item-start /> -->
<!-- <ion-item>
//<ion-label>{{'verificationcode,verificationcode' | translate}}</ion-label>
// <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-item>
</div>
</ion-item> -->
<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-footer>
<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>
</ion-footer>

@ -18,4 +18,51 @@ h1{
span{
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;
}
}

@ -22,6 +22,7 @@ import { SMSCheckResponse } from "src/app/hmg-common/services/authentication/mod
import { Password } from "../models/password";
import { GetLoginInfoRequest } from 'src/app/hmg-common/services/authentication/models/get-login-info.request';
import * as moment from "moment";
@ -75,6 +76,13 @@ export class SmsPageComponent implements OnInit {
public loginTypeData:any;
public logo = "assets/icon/login/password.png";
public smc_code: any = [];
code: any;
user_name: string;
constructor(
public navCtrl: NavController,
@ -131,7 +139,7 @@ export class SmsPageComponent implements OnInit {
this.loginTypeData= this.common.sharedService.getSharedData(SMSCheckRequest.SHARED_DATA, false);
console.log("loginType :"+this.loginTypeData.loginType);
// console.log("loginType :"+this.loginTypeData.loginType);
@ -258,16 +266,17 @@ export class SmsPageComponent implements OnInit {
}
checkVerificationCode() {
this.code=this.smc_code.join('');
if (this.count < 3) {
if (
this.activationCode == undefined ||
this.code == undefined ||
this.activationCode == null ||
this.code == null ||
this.activationCode == ""
this.code == ""
) {
@ -282,7 +291,7 @@ export class SmsPageComponent implements OnInit {
this.checkForgetPwdSMS();
} else {
console.log("checkSMS");
this.checkSMS();
}
@ -304,7 +313,7 @@ export class SmsPageComponent implements OnInit {
public checkSMS() {
// alert("checkSMS in page")
console.log("code" + this.code);
const data = this.sharedData.getSharedData(AuthenticationService.LOGIN_DATA, false);
const request = new SMSCheckRequest();
@ -313,7 +322,7 @@ export class SmsPageComponent implements OnInit {
request.LogInTokenID = data.LogInTokenID;
request.activationCode = this.activationCode;
request.activationCode = this.code; //code;this.activationCode;
request.P_USER_NAME = data.P_USER_NAME;
@ -336,15 +345,23 @@ export class SmsPageComponent implements OnInit {
this.authService.setAuthenticatedUser(result).subscribe(() => {
//call insert Mobile Login
console.log("insert");
localStorage.setItem("emp-name",result.MemberInformationList[0].EMPLOYEE_NAME);
console.log("empnmae: "+ localStorage.getItem("emp-name"));
// localStorage.setItem("login-at", new Date().toISOString());
this.user_name=result.MemberInformationList[0].EMPLOYEE_NAME;
//get date and time of last login
let currDateTime = moment().format('MMM DD , YYYY HH:mm')
localStorage.setItem("login-at",currDateTime);
if (this.platform.is("cordova")) {
// localStorage.setItem("full-name", result.P_USER_NAME);
this.insertMobileLogin();
}
this.common.openHome();
@ -361,7 +378,7 @@ export class SmsPageComponent implements OnInit {
public insertMobileLogin(){
// alert("insertMobileLogin");
console.log("loginData" + this.loginData);
let request = new GetLoginInfoRequest();
@ -379,10 +396,12 @@ export class SmsPageComponent implements OnInit {
request.DeviceType= this.common.getDeviceType();
request.DeviceToken=this.deviceToken;
request.DeviceToken=this.deviceToken;//"5ca8a69cf1804db55264c349edffb99b9d63acd9fa9b6b18956bcb2ad3f2ba36";//this.deviceToken;
request.LoginType=this.loginTypeData.loginType;
request.EmployeeName=this.user_name;
this.authService
.insertMobileLoginInfo(
@ -417,7 +436,7 @@ console.log("successful insertMobileLogin" );
request.LogInTokenID = data.LogInTokenID;
request.activationCode = this.activationCode;
request.activationCode =this.code;// this.activationCode;
request.P_USER_NAME = data.P_USER_NAME;
@ -458,5 +477,58 @@ 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;
let sibPre =t.previousElementSibling;
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 ==="") {
sibPre.setFocus()}
else{
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() {}
}

@ -1,5 +1,5 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<ion-toolbar class="header-toolbar-new">
<ion-buttons slot="start">
<nav-buttons backLink=""></nav-buttons>
<!-- <ion-back-button color="light" class="btnBack" defaultHref="/eit/eit-list/" ></ion-back-button> -->
@ -22,7 +22,7 @@
<ion-footer>
<div class="centerDiv">
<ion-button class="footer-button" color="customnavy" ion-button (click)="validateEITTransaction()">
<ion-button class="addEitOkButton" color="customnavy" ion-button (click)="validateEITTransaction()">
{{'vacation-rule, next-label' | translate}}</ion-button>
</div>
</ion-footer>

@ -11,7 +11,7 @@ ion-label {
.daynamicForm-Label {
font-size: 16px;
color: var(--customnavy) !important;
color: #a2a5a6 !important;
display: block;
overflow: hidden;
-webkit-flex: 1;
@ -20,4 +20,20 @@ ion-label {
white-space: normal;
padding: 5px 0px;
margin: 10px auto;
padding-left: 10px;
}
.header-toolbar-new{
--background: #22c6b3;
}
.addEitOkButton{
white-space: normal !important;
text-transform: capitalize !important;
min-height: 45px !important;
min-width: 5px !important;
margin: 8px !important;
background-color: #22c6b3;
width: 80% !important;
color: white!important;
border-radius: 16px !important;
}

@ -1,19 +1,139 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<ion-toolbar class="header-toolbar-new">
<nav-buttons></nav-buttons>
<ion-title color="light">{{headerTitle}}</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
<!-------------------------------Start New design ---------------------------------------->
<ion-grid>
<ion-row style="margin-top: 20px;margin-left: 12px;">
<ion-col>
<div size="10" class="approvalTitle">{{'general, addAttach' | translate}}</div>
</ion-col>
<ion-col style="padding-left: 7%;" size="2">
<div class="fileDiv">
<input end class="inputfile" style="margin-top: 10px;z-index: 99999;position: absolute;opacity: 0;" type="file" ng2FileSelect [uploader]="uploader"
(change)="onFileSelected($event)" />
<label end for="file" class="attachLable">
<ion-icon style="font-size: 22px;" name="add"></ion-icon>
</label></div>
</ion-col>
</ion-row>
<ion-item class="attachmentDiv" *ngIf="attachListOver?.length == 0">
<ion-img style="height: 26px;width:100%;margin-top:12px" src="../assets/imgs/attach-icon.png"></ion-img>
<ion-label style="margin-top: -24px;" position="floating" class="boldTxtNav">{{ 'general, notAttch' | translate}}</ion-label>
</ion-item>
</ion-grid>
<ion-grid class="attachmentDiv" *ngIf="attachListOver?.length > 0">
<div *ngFor="let attachList of attachListOver ; let i = index">
<ion-row>
<ion-col size="1">
<ion-label style="color: black !important;">
{{attachList.AttachmentID +1 }} .
</ion-label>
</ion-col>
<ion-col style="text-align: left;" size="10">
<ion-label style="color: blue !important;" (click)="OpenAttachFiles(attachList.P_FILE_DATA,attachList.P_FILE_CONTENT_TYPE)">
{{attachList.P_FILE_NAME }}
</ion-label>
</ion-col>
<ion-col size="1">
<!-- <button float-end class="attachImgBtn"
(click)="OpenAttachFiles(attachList.P_FILE_DATA,attachList.P_FILE_CONTENT_TYPE)">
<img class="attachImg" src="../assets/imgs/view.png">
</button> -->
<button float-end [disabled]="attachList.isSuccess" class="attachImgBtn removeLable"
(click)="removeFile(attachList)">
<ion-icon style="font-size:22px;margin-left:-7px;margin-top:-2px;" name="close"></ion-icon>
</button>
</ion-col>
</ion-row>
</div>
</ion-grid>
<ion-grid *ngIf="attachmentRes?.length > 0">
<div *ngFor="let attachRes of attachmentRes">
<ion-row>
<ion-col col-8>
<div> <img float-start class="attachImg" src="../assets/imgs/file.png">
</div>
<ion-label>
{{attachRes.FILE_NAME }} </ion-label>
</ion-col>
<ion-col col-4>
<button float-end class="attachImgBtn"
(click)="OpenAttachFiles(attachRes.FILE_DATA,attachRes.FILE_CONTENT_TYPE)">
<img class="attachImg" src="../assets/imgs/view.png">
</button>
<button float-end [disabled]="!isResubmitEIT" class="attachImgBtn" (click)="delelteFile(attachRes)"><img
class="attachImg" src="../assets/imgs/deletegray.png"></button>
</ion-col>
<!-- <button [disabled]="!isResubmitEIT" class="iconButton" (click)="addAttachment(false,attachRes)"><img
class="imgSize" src="../assets/imgs/editIcon.png"></button>
<button (click)="delelteFile(attachRes)" class="iconButton" [disabled]="!isResubmitEIT"><img
class="imgSize" src="../assets/imgs/cancel.png"></button> -->
</ion-row>
</div>
</ion-grid>
<ion-card>
<ion-grid class="">
<div class="approvalTitle">{{'confirmAddEit, comment' | translate}}</div>
<ion-item class="submitNote" lines="none">
<!-- <ion-label position="floating" class="boldTxtNav">{{'confirmAddEit, comment' | translate}}</ion-label> -->
<ion-textarea type="text" [(ngModel)]="eitComments"></ion-textarea>
</ion-item>
</ion-grid>
<ion-grid class="approvalList">
<div class="approvalTitle">{{'confirmAddEit, approverList' | translate}}</div>
<div class="noDataDiv" *ngIf="approversList?.length == 0">
<p>{{ 'general, empty' | translate}}</p>
</div>
<div style="background-color: white;border-radius: 32px;border: 1px solid #c8c4c4;" *ngIf="approversList?.length > 0">
<ion-list class="notification-list ">
<div class="timeline">
<ion-item style="padding-left: 4%;" *ngFor="let employee of approversList">
<div class="timeline-item" slot="start">
<div class="timeline-thumb timeline-icon">
<img *ngIf="employee.EMPLOYEE_IMAGE" class="empImge"
[src]="'data:image/png;base64,'+employee.EMPLOYEE_IMAGE">
<img *ngIf="employee.EMPLOYEE_IMAGE == null" class="empImge"
src="../assets/imgs/profile.png"> </div>
</div>
<ion-col>
<ion-label style="color:black !important ;font-weight: bold;padding-top: 0%;">
{{employee.APPROVER}}
</ion-label>
<ion-label style="color:black !important ;padding-top: 4%;">
{{employee.POSITION_TITLE}}
</ion-label>
</ion-col>
<div class="line"></div>
</ion-item>
</div>
</ion-list>
</div>
</ion-grid>
<!-------------------------------End New design ---------------------------------------->
<!-- <ion-card>
<ion-card-header class="boxHdr">
<div class="hrTitle">{{'confirmAddEit, approverList' | translate}}</div>
</ion-card-header>
<ion-card-content>
<!-- <ion-item class="itemAH" > -->
<ion-grid no-padding class=" gridAH" *ngIf="approversList?.length > 0">
<ion-row class="rowAH titleH" nowrap>
<ion-col size="1">
@ -32,14 +152,10 @@
<ion-label class="Header" for="">{{'confirmAddEit, status' | translate}}</ion-label>
</ion-col>
</ion-row>
<!-- </ion-grid>
</ion-item> -->
<!-- <ion-list *ngIf="approversList?.length > 0"> -->
<!-- <ion-item class="itemAH" *ngFor="let item of approversList" >
<ion-grid class=" gridAH"> -->
<ion-row class="rowAH" *ngFor="let item of approversList" nowrap>
<ion-col size="1">
<ion-label class="tbData" for="">{{item.APPROVER_ORDER_NUMBER}}</ion-label>
@ -58,9 +174,7 @@
</ion-col>
</ion-row>
</ion-grid>
<!-- </ion-item>
</ion-list> -->
</ion-card-content>
</ion-card>
@ -69,44 +183,7 @@
<ion-textarea type="text" [(ngModel)]="eitComments"></ion-textarea>
</ion-item>
<!-- <div padding *ngIf="attachmentRes?.length > 0 || attachListOver?.length > 0">
<p class="boldTxt"> {{"absenceList.attachList" | translate}}</p>
</div>
<div *ngIf="attachListOver?.length > 0">
<ion-row *ngFor="let attachList of attachListOver ; let i = index">
<ion-col col-8 (click)="OpenAttachFiles(attachList.P_FILE_DATA,attachList.P_FILE_CONTENT_TYPE)">
{{ attachList.P_FILE_NAME }}</ion-col>
<ion-col col-4>
<button [disabled]="attachList.isSuccess" class="iconButton" (click)="removeFile(attachList)"><img
class="imgSize" src="../assets/imgs/cancel.png"></button>
</ion-col>
</ion-row>
</div> -->
<!-- <div *ngIf="attachmentRes?.length > 0">
<ion-row *ngFor="let attachRes of attachmentRes">
<ion-col col-8 (click)="OpenAttachFiles(attachRes.FILE_DATA,attachRes.FILE_CONTENT_TYPE)">
{{ attachRes.FILE_NAME }}</ion-col>
<ion-col col-4>
<button [disabled]="!isResubmitEIT" class="iconButton" (click)="addAttachment(false,attachRes)"><img
class="imgSize" src="../assets/imgs/editIcon.png"></button>
<button (click)="delelteFile(attachRes)" class="iconButton" [disabled]="!isResubmitEIT"><img
class="imgSize" src="../assets/imgs/cancel.png"></button>
</ion-col>
</ion-row>
</div> -->
<div>
<ion-card>
@ -169,24 +246,21 @@
</ion-col>
<!-- <button [disabled]="!isResubmitEIT" class="iconButton" (click)="addAttachment(false,attachRes)"><img
class="imgSize" src="../assets/imgs/editIcon.png"></button>
<button (click)="delelteFile(attachRes)" class="iconButton" [disabled]="!isResubmitEIT"><img
class="imgSize" src="../assets/imgs/cancel.png"></button> -->
</ion-row>
</div>
</ion-grid>
</ion-card-content>
</ion-card>
</ion-card> -->
</div>
</ion-content>
<ion-footer>
<div class="centerDiv">
<ion-button class="footer-button" color="customnavy" ion-button (click)="startEitApproval()">
<ion-button class="confirmEitOkButton" color="customnavy" ion-button (click)="openSubmitModal()">
{{ (isDelete ? 'general, delete' : 'general, submit') | translate }}</ion-button>
</div>
</ion-footer>

@ -24,3 +24,220 @@
background: transparent;
float: right;
}
.attachmentDiv{
background: #ffffff;
height: auto;
text-align: center;
padding-top: 1px;
margin: 10px;
border-radius: 15px;
border: 1px solid grey;
}
.noDataDiv{
background: #ffffff;
height: 11%;
text-align: center;
padding-top: 1px;
border-radius: 10px;
margin: 10px;
border-radius: 5px;
}
.submitNote{
background: #ffffff;
height: 80px;
padding-top: 1px;
margin: 10px;
border-radius: 15px;
border: 1px solid grey;
}
.approvalList{
--background: #f0efef;
height: auto;
text-align: center;
padding-top: 1px;
border-radius: 10px;
margin: 10px;
border-radius: 5px;
}
/************************New Design**********************************/
.notification-list{
background: none;
background: none;
border-radius: 32px;
ion-item{
// margin-top: 5px;
// margin-bottom: 5px;
background-color: transparent;
.item-date{
width: 100%;
font-size: 16px;
font-weight: bold;
text-align: start;
padding: 0;
margin: 0;
position: absolute;
left: 0;
top: 12%;
}
ion-label , [item-end]{
white-space: normal;
font-size: 14px;
padding-top: 15%;
// :root[dir="ltr"]{
// margin-left: 10px;
// }
// :root[dir="rtl"]{
// margin-right: 10px;
// }
}
}
}
.timeline {
position: relative;
margin: 15px 0 0 0;
// border-bottom: solid 1px var(--cusgray);
}
.timeline:before {
content: '';
position: inherit !important;
top: 0;
bottom: 0;
width: 4px;
// background: #e4e4e4;
z-index: 1;
left: 35px;
/* margin-left: -10px; */
/* z-index: 1; */
}
.timeline .timeline-thumb {
border-radius: 500px;
width: 70px !important;
z-index: 2;
position: absolute;
left: 0px;
// :root[dir="ltr"]{
// left: 37px;
// }
// :root[dir="rtl"]{
// right: 37px;
// }
float: right;
top: 9px;
}
.timeline .timeline-thumb.timeline-icon {
height: 70px;
// text-align: center;
// color: white;
// border: 5px solid #CBD0D3;
// transform: scale(0.2);
}
.timeline .timeline-item {
width: 40px;
}
.timeline .timeline-stats {
position: relative;
font-size: 12px;
color: var(--darkgray);
}
.empImge{
border-radius: 50%;
width:100%;
height: 100%;
border: #dedede solid 1px;
}
.empImgeRep {
border-radius: 50% !important;
width: 80px;
height: 80px;
border: #dedede solid 1px;
}
.line{
padding-bottom:87px;
}
.attachLable{
position: absolute;
top: 0px;
z-index: 0;
background: #30b8c6;
color: #fff;
border-radius: 50%;
border: 0px;
width: 24px;
height: 24px;
text-align: center;
font-size: 5px;
}
.removeLable{
top: 0px;
z-index: 0;
background: #d8252d;
color: #fff;
border-radius: 50%;
border: 0px;
width: 20px;
height: 20px;
text-align: center;
font-size: 5px;
}
.note-modal {
// width: 90%;
// height: 50%;
// top: 20%;
// left: 5%;
// right: 5%;
// bottom: 5%;
background: rgba(0, 0, 0, 0.5) !important;
padding: 30% 10% !important;
--height: 12cm !important;
// --width: 80% !important;
--border-radius:20px;
}
.header-toolbar-new{
--background: #22c6b3;
}
.confirmEitOkButton{
white-space: normal !important;
text-transform: capitalize !important;
min-height: 45px !important;
min-width: 5px !important;
margin: 8px !important;
background-color: #22c6b3;
width: 80% !important;
color: white!important;
border-radius: 16px !important;
}

@ -12,6 +12,8 @@ import { CommonService } from 'src/app/hmg-common/services/common/common.service
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { EitService } from '../services/eit.service';
import { AddEitResponse } from '../models/add.eit.response';
import { FileUploader } from 'ng2-file-upload';
import { SubmitEitModalComponent } from '../submit-eit-modal/submit-eit-modal.component';
@Component({
selector: 'app-confirm-add-eit',
@ -46,6 +48,20 @@ export class ConfirmAddEitComponent implements OnInit {
isSubmitBtnClicked: boolean;
isDelete: boolean = false;
/***Add Attchment Vars */
isUpload: boolean = false;
inQueue: boolean = false;
addAttachmentListReq: any;
attachmentID: number = 0;
addAttachRequest: any = [];
fileData: any;
fileType: any;
dirPage: any;
TransactionID: any;
indexLastObj: any = 0;
filterAllowedType: any = ['application/pdf', 'image/jpeg', 'image/png', 'text/plain', 'image/jpg', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'];
constructor(public modalController: ModalController, public cs: CommonService, private ts: TranslatorService, private eitService: EitService) {
this.isSubmitBtnClicked = false;
this.eitRequest = new EitRequest();
@ -277,6 +293,37 @@ export class ConfirmAddEitComponent implements OnInit {
return await modal.present();
}
/*****submit modal********/
async openSubmitModal() {
this.cs.sharedService.setSharedData( this.attachListOver, 'submitAttachmentList');
this.cs.sharedService.setSharedData(this.eitComments, 'eitComments');
const modal = await this.modalController.create({
component: SubmitEitModalComponent,
backdropDismiss: false,
});
modal.cssClass = 'note-modal';
modal.onDidDismiss()
.then((data) => {
console.log(data.data);
if (data.data == "cancel" || data.data == undefined) {
return;
} else {
this.startEitApproval();
}
});
return await modal.present();
}
removeFile(objectitem) {
@ -413,4 +460,100 @@ export class ConfirmAddEitComponent implements OnInit {
this.cancelEitProcess();
}
/*******************Add attchement Functions*************/
public uploader: FileUploader = new FileUploader({
allowedMimeType: ['application/pdf', 'image/jpeg', 'image/png', 'text/plain', 'image/jpg', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'],
maxFileSize: 10 * 1024 * 1024,
formatDataFunctionIsAsync: true,
formatDataFunction: async (item) => {
return new Promise((resolve, reject) => {
resolve({
name: item._file.name,
length: item._file.size,
contentType: item._file.type,
date: new Date()
});
});
}
});
onFileSelected(input) {
// this.uploader.onWhenAddingFileFailed = function (item: any, filter: any, options: any){
if (!(this.filterAllowedType.indexOf(input.target.files[0].type) > -1)) {
let msg: string = "";
msg = this.ts.trPK("general", "notSupport");
this.cs.presentAlert(msg);
return
} // todo: show alert that you tried uploading wrong files
else {
const file = input.target.files[0];
// console.log(file);
//var encoded = Base64.encode(file);
this.getBase64(file).then(
data => this.pushObject(data, file.name, file.type)
);
// }
// };
}
}
getBase64(file) {
return new Promise((resolve, reject) => {
const reader = new FileReader();
reader.readAsDataURL(file);
reader.onload = () => resolve(reader.result);
reader.onerror = error => reject(error);
});
}
pushObject(fileData, name, type) {
console.log("before push: "+ this.index);
//this.attachListOver.length++;
try {
let array = name.split('.');
let attachType: string = array[array.length - 1];
this.attachListOver.push(
{
AttachmentID: this.attachListOver.length,
P_FILE_CONTENT_TYPE: attachType,//type.split('/')[1],
P_FILE_DATA: fileData.split(',')[1],
P_FILE_NAME: name,//.split('.')[0],
P_TRANSACTION_ID: this.P_TransactionID
})
} catch (e) {
}
//console.log("after push: "+ this.index);
// return this.addAttachRequest
}
// removeFile(objectitem) {
// let objIndex1 = this.uploader.queue.findIndex(item => item == objectitem);
// this.uploader.queue.splice(objIndex1, 1);
// let objIndex = this.addAttachRequest.findIndex(item => item.AttachmentID == objectitem.AttachmentID);
// this.addAttachRequest.splice(objIndex, 1);
// // this.addAttachRequest =this.addAttachRequest.filter(item => item.AttachmentID !== objectitem.AttachmentID);
// }
}

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

Loading…
Cancel
Save