configure app plugin

master
mohamed.mekawy 7 years ago
commit 075cf2a01f

@ -1,118 +0,0 @@
{
"prepare_queue": {
"installed": [],
"uninstalled": []
},
"config_munge": {
"files": {}
},
"installed_plugins": {
"call-number": {
"PACKAGE_NAME": "io.ionic.starter"
},
"cordova-android-support-gradle-release": {
"ANDROID_SUPPORT_VERSION": "27.+",
"PACKAGE_NAME": "io.ionic.starter"
},
"cordova-opentok-android-permissions": {
"PACKAGE_NAME": "io.ionic.starter"
},
"cordova-plugin-android-permissions": {
"PACKAGE_NAME": "io.ionic.starter"
},
"cordova-plugin-appavailability": {
"PACKAGE_NAME": "io.ionic.starter"
},
"cordova-plugin-apprate": {
"PACKAGE_NAME": "io.ionic.starter"
},
"cordova-plugin-badge": {
"PACKAGE_NAME": "io.ionic.starter"
},
"cordova-plugin-ble-central": {
"PACKAGE_NAME": "io.ionic.starter"
},
"cordova-plugin-camera": {
"PACKAGE_NAME": "io.ionic.starter"
},
"cordova-plugin-device": {
"PACKAGE_NAME": "io.ionic.starter"
},
"cordova-plugin-fingerprint-aio": {
"PACKAGE_NAME": "io.ionic.starter"
},
"cordova-plugin-globalization": {
"PACKAGE_NAME": "io.ionic.starter"
},
"cordova-plugin-inappbrowser": {
"PACKAGE_NAME": "io.ionic.starter"
},
"cordova-plugin-ionic-keyboard": {
"PACKAGE_NAME": "io.ionic.starter"
},
"cordova-plugin-ionic-webview": {
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+",
"PACKAGE_NAME": "io.ionic.starter"
},
"cordova-plugin-local-notification": {
"PACKAGE_NAME": "io.ionic.starter"
},
"cordova-plugin-mauron85-background-geolocation": {
"GOOGLE_PLAY_SERVICES_VERSION": "16.0.0",
"ANDROID_SUPPORT_LIBRARY_VERSION": "26+",
"ICON": "@mipmap/icon",
"SMALL_ICON": "@mipmap/icon",
"ACCOUNT_NAME": "@string/app_name",
"ACCOUNT_LABEL": "@string/app_name",
"ACCOUNT_TYPE": "$PACKAGE_NAME.account",
"CONTENT_AUTHORITY": "$PACKAGE_NAME",
"PACKAGE_NAME": "io.ionic.starter"
},
"cordova-plugin-nativestorage": {
"PACKAGE_NAME": "io.ionic.starter"
},
"cordova-plugin-sms-receive": {
"PACKAGE_NAME": "io.ionic.starter"
},
"cordova-plugin-splashscreen": {
"PACKAGE_NAME": "io.ionic.starter"
},
"cordova-plugin-statusbar": {
"PACKAGE_NAME": "io.ionic.starter"
},
"cordova-plugin-themeablebrowser": {
"PACKAGE_NAME": "io.ionic.starter"
},
"cordova-plugin-whitelist": {
"PACKAGE_NAME": "io.ionic.starter"
},
"cordova-sms-plugin": {
"PACKAGE_NAME": "io.ionic.starter"
},
"cordova-sqlite-storage": {
"PACKAGE_NAME": "io.ionic.starter"
},
"cordova-support-google-services": {
"PACKAGE_NAME": "io.ionic.starter"
},
"cordova.plugins.diagnostic": {
"ANDROID_SUPPORT_VERSION": "28.+",
"PACKAGE_NAME": "io.ionic.starter"
},
"phonegap-plugin-barcodescanner": {
"ANDROID_SUPPORT_V4_VERSION": "27.+",
"PACKAGE_NAME": "io.ionic.starter"
},
"uk.co.workingedge.phonegap.plugin.launchnavigator": {
"PACKAGE_NAME": "io.ionic.starter"
}
},
"dependent_plugins": {
"cordova-plugin-actionsheet": {
"PACKAGE_NAME": "io.ionic.starter"
},
"cordova-plugin-dialogs": {
"PACKAGE_NAME": "io.ionic.starter"
}
}
}

@ -0,0 +1,119 @@
<?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">
<name>MyApp</name>
<description>An awesome Ionic/Cordova app.</description>
<author email="hi@ionicframework.com" href="http://ionicframework.com/">Ionic Framework Team</author>
<content src="index.html" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<preference name="ScrollEnabled" value="false" />
<preference name="android-minSdkVersion" value="19" />
<preference name="BackupWebStorage" value="none" />
<preference name="SplashMaintainAspectRatio" value="true" />
<preference name="FadeSplashScreenDuration" value="300" />
<preference name="SplashShowOnlyFirstTime" value="false" />
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="3000" />
<platform name="android">
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application" xmlns:android="http://schemas.android.com/apk/res/android">
<application android:networkSecurityConfig="@xml/network_security_config" />
</edit-config>
<resource-file src="resources/android/xml/network_security_config.xml" target="app/src/main/res/xml/network_security_config.xml" />
<allow-intent href="market:*" />
<icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
<icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
<icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
<icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
<icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
<icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
<splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
<splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
<splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
<splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
<splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
<splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
<splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
<splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
<splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
<splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
<splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
<splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
<icon height="57" src="resources/ios/icon/icon.png" width="57" />
<icon height="114" src="resources/ios/icon/icon@2x.png" width="114" />
<icon height="40" src="resources/ios/icon/icon-40.png" width="40" />
<icon height="80" src="resources/ios/icon/icon-40@2x.png" width="80" />
<icon height="120" src="resources/ios/icon/icon-40@3x.png" width="120" />
<icon height="50" src="resources/ios/icon/icon-50.png" width="50" />
<icon height="100" src="resources/ios/icon/icon-50@2x.png" width="100" />
<icon height="60" src="resources/ios/icon/icon-60.png" width="60" />
<icon height="120" src="resources/ios/icon/icon-60@2x.png" width="120" />
<icon height="180" src="resources/ios/icon/icon-60@3x.png" width="180" />
<icon height="72" src="resources/ios/icon/icon-72.png" width="72" />
<icon height="144" src="resources/ios/icon/icon-72@2x.png" width="144" />
<icon height="76" src="resources/ios/icon/icon-76.png" width="76" />
<icon height="152" src="resources/ios/icon/icon-76@2x.png" width="152" />
<icon height="167" src="resources/ios/icon/icon-83.5@2x.png" width="167" />
<icon height="29" src="resources/ios/icon/icon-small.png" width="29" />
<icon height="58" src="resources/ios/icon/icon-small@2x.png" width="58" />
<icon height="87" src="resources/ios/icon/icon-small@3x.png" width="87" />
<icon height="1024" src="resources/ios/icon/icon-1024.png" width="1024" />
<splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" />
<splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
<splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
<splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" />
<splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" />
<splash height="2048" src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732" />
<splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" />
<splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" />
<splash height="2732" src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" />
<splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
<splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" />
<splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
<splash height="2732" src="resources/ios/splash/Default@2x~universal~anyany.png" width="2732" />
</platform>
<plugin name="cordova-plugin-whitelist" spec="1.3.3" />
<plugin name="cordova-plugin-statusbar" spec="2.4.2" />
<plugin name="cordova-plugin-splashscreen" spec="5.0.2" />
<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" />
<plugin name="uk.co.workingedge.phonegap.plugin.launchnavigator" spec="^3.2.2" />
<plugin name="cordova-plugin-themeablebrowser" spec="^0.2.18" />
<plugin name="cordova-plugin-inappbrowser" spec="^3.0.0" />
<plugin name="cordova-plugin-globalization" spec="^1.11.0" />
<plugin name="cordova-plugin-android-permissions" spec="^1.0.0" />
<plugin name="cordova-plugin-sms-receive" spec="^1.0.2" />
<plugin name="cordova-plugin-device" spec="^2.0.2" />
<plugin name="cordova-plugin-local-notification" spec="^0.9.0-beta.2" />
<plugin name="mx.ferreyra.callnumber" spec="0.0.2" />
<plugin name="cordova-plugin-badge" spec="^0.8.8" />
<plugin name="cordova-plugin-fingerprint-aio" spec="^1.7.0">
<variable name="FACEID_USAGE_DESCRIPTION" value="User Authentication" />
</plugin>
<plugin name="cordova.plugins.diagnostic" spec="^4.0.12" />
<plugin name="phonegap-plugin-barcodescanner" spec="^8.1.0" />
<plugin name="cordova-plugin-camera" spec="^4.0.3" />
<plugin name="cordova-plugin-ionic-keyboard" spec="^2.1.3" />
<plugin name="cordova-opentok-android-permissions" spec="^1.0.1" />
<plugin name="cordova-plugin-appavailability" spec="^0.4.2" />
<plugin name="cordova-plugin-apprate" spec="^1.4.0" />
<engine name="browser" spec="5.0.4" />
<engine name="ios" spec="4.5.5" />
<engine name="android" spec="7.1.4" />
</widget>

@ -1,289 +0,0 @@
{
"cordova-plugin-whitelist": {
"source": {
"type": "registry",
"id": "cordova-plugin-whitelist@^1.3.3"
},
"is_top_level": true,
"variables": {}
},
"cordova-plugin-statusbar": {
"source": {
"type": "registry",
"id": "cordova-plugin-statusbar@^2.4.2"
},
"is_top_level": true,
"variables": {}
},
"cordova-plugin-device": {
"source": {
"type": "registry",
"id": "cordova-plugin-device@^2.0.2"
},
"is_top_level": true,
"variables": {}
},
"cordova-plugin-splashscreen": {
"source": {
"type": "registry",
"id": "cordova-plugin-splashscreen@^5.0.2"
},
"is_top_level": true,
"variables": {}
},
"cordova-plugin-ionic-webview": {
"source": {
"type": "registry",
"id": "cordova-plugin-ionic-webview@^3.1.2"
},
"is_top_level": true,
"variables": {
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
}
},
"cordova-plugin-ionic-keyboard": {
"source": {
"type": "registry",
"id": "cordova-plugin-ionic-keyboard@^2.1.3"
},
"is_top_level": true,
"variables": {}
},
"cordova-plugin-mauron85-background-geolocation": {
"source": {
"type": "registry",
"id": "cordova-plugin-mauron85-background-geolocation@alpha"
},
"is_top_level": true,
"variables": {
"GOOGLE_PLAY_SERVICES_VERSION": "16.0.0",
"ANDROID_SUPPORT_LIBRARY_VERSION": "26+",
"ICON": "@mipmap/icon",
"SMALL_ICON": "@mipmap/icon",
"ACCOUNT_NAME": "@string/app_name",
"ACCOUNT_LABEL": "@string/app_name",
"ACCOUNT_TYPE": "$PACKAGE_NAME.account",
"CONTENT_AUTHORITY": "$PACKAGE_NAME"
}
},
"cordova-sqlite-storage": {
"source": {
"type": "registry",
"id": "cordova-sqlite-storage@^3.2.0"
},
"is_top_level": true,
"variables": {}
},
"cordova-plugin-nativestorage": {
"source": {
"type": "registry",
"id": "cordova-plugin-nativestorage@^2.3.2"
},
"is_top_level": true,
"variables": {}
},
"cordova-plugin-ble-central": {
"source": {
"type": "registry",
"id": "cordova-plugin-ble-central@^1.2.2"
},
"is_top_level": true,
"variables": {}
},
"cordova-plugin-compat": {
"source": {
"type": "registry",
"id": "cordova-plugin-compat@^1.2.0"
},
"is_top_level": false,
"variables": {}
},
"uk.co.workingedge.phonegap.plugin.launchnavigator": {
"source": {
"type": "registry",
"id": "uk.co.workingedge.phonegap.plugin.launchnavigator@3"
},
"is_top_level": true,
"variables": {}
},
"cordova-plugin-actionsheet": {
"source": {
"type": "registry",
"id": "cordova-plugin-actionsheet@^2.2.2"
},
"is_top_level": false,
"variables": {}
},
"cordova-plugin-themeablebrowser": {
"source": {
"type": "registry",
"id": "cordova-plugin-themeablebrowser@^0.2.18"
},
"is_top_level": true,
"variables": {}
},
"cordova-plugin-globalization": {
"source": {
"type": "registry",
"id": "cordova-plugin-globalization@^1.11.0"
},
"is_top_level": true,
"variables": {}
},
"cordova-plugin-android-permissions": {
"source": {
"type": "registry",
"id": "cordova-plugin-android-permissions@^1.0.0"
},
"is_top_level": true,
"variables": {}
},
"cordova-plugin-sms-receive": {
"source": {
"type": "registry",
"id": "cordova-plugin-sms-receive@^1.0.2"
},
"is_top_level": true,
"variables": {}
},
"cordova-plugin-local-notification": {
"source": {
"type": "registry",
"id": "cordova-plugin-local-notification@^0.9.0-beta.2"
},
"is_top_level": true,
"variables": {}
},
"cordova-plugin-badge": {
"source": {
"type": "registry",
"id": "cordova-plugin-badge@^0.8.8"
},
"is_top_level": true,
"variables": {}
},
"call-number": {
"source": {
"type": "registry",
"id": "mx.ferreyra.callnumber@0.0.2"
},
"is_top_level": true,
"variables": {}
},
"cordova-plugin-fingerprint-aio": {
"source": {
"type": "registry",
"id": "cordova-plugin-fingerprint-aio@^1.7.0"
},
"is_top_level": true,
"variables": {
"FACEID_USAGE_DESCRIPTION": "User Authentication"
}
},
"cordova.plugins.diagnostic": {
"source": {
"type": "registry",
"id": "cordova.plugins.diagnostic@^4.0.12"
},
"is_top_level": true,
"variables": {
"ANDROID_SUPPORT_VERSION": "28.+"
}
},
"phonegap-plugin-barcodescanner": {
"source": {
"type": "registry",
"id": "phonegap-plugin-barcodescanner@^8.1.0"
},
"is_top_level": true,
"variables": {
"ANDROID_SUPPORT_V4_VERSION": "27.+"
}
},
"cordova-plugin-camera": {
"source": {
"type": "registry",
"id": "cordova-plugin-camera@^4.0.3"
},
"is_top_level": true,
"variables": {}
},
"cordova-android-support-gradle-release": {
"source": {
"type": "registry",
"id": "cordova-android-support-gradle-release@^2.1.0"
},
"is_top_level": true,
"variables": {
"ANDROID_SUPPORT_VERSION": "27.+"
}
},
"cordova-opentok-android-permissions": {
"source": {
"type": "registry",
"id": "cordova-opentok-android-permissions@^1.0.1"
},
"is_top_level": true,
"variables": {}
},
"cordova-plugin-appavailability": {
"source": {
"type": "registry",
"id": "cordova-plugin-appavailability@^0.4.2"
},
"is_top_level": true,
"variables": {}
},
"cordova-support-google-services": {
"source": {
"type": "registry",
"id": "cordova-support-google-services@^1.1.0"
},
"is_top_level": true,
"variables": {}
},
"phonegap-plugin-push": {
"source": {
"type": "registry",
"id": "phonegap-plugin-push@^2.2.3"
},
"is_top_level": true,
"variables": {
"GOOGLE_PLAY_SERVICES_VERSION": "16.0.0",
"FCM_VERSION": "15.0.0",
"ANDROID_SUPPORT_V13_VERSION": "27.+"
}
},
"cordova-plugin-apprate": {
"source": {
"type": "registry",
"id": "cordova-plugin-apprate@^1.4.0"
},
"is_top_level": true,
"variables": {}
},
"cordova-plugin-dialogs": {
"source": {
"type": "registry",
"id": "cordova-plugin-dialogs"
},
"is_top_level": false,
"variables": {}
},
"cordova-plugin-inappbrowser": {
"source": {
"type": "registry",
"id": "cordova-plugin-inappbrowser@^3.0.0"
},
"is_top_level": true,
"variables": {}
},
"cordova-sms-plugin": {
"source": {
"type": "registry",
"id": "cordova-sms-plugin@1.0.0"
},
"is_top_level": true,
"variables": {}
}
}

File diff suppressed because it is too large Load Diff

@ -0,0 +1,190 @@
{
"name": "MOHEM",
"version": "0.0.1",
"author": "Cloud Solutions",
"homepage": "http://www.cloudsolution-sa.com/",
"private": true,
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"dependencies": {
"@angular/animations": "^7.2.15",
"@angular/common": "^7.2.2",
"@angular/core": "^7.2.2",
"@angular/forms": "^7.2.2",
"@angular/http": "^7.2.2",
"@angular/platform-browser": "^7.2.2",
"@angular/platform-browser-dynamic": "^7.2.2",
"@angular/router": "^7.2.2",
"@ionic-native/android-permissions": "^5.8.0",
"@ionic-native/app-availability": "^5.8.0",
"@ionic-native/app-rate": "^5.8.0",
"@ionic-native/background-geolocation": "^5.4.0",
"@ionic-native/badge": "^5.8.0",
"@ionic-native/barcode-scanner": "^5.8.0",
"@ionic-native/ble": "^5.8.0",
"@ionic-native/call-number": "^5.8.0",
"@ionic-native/camera": "^5.8.0",
"@ionic-native/core": "^5.8.0",
"@ionic-native/device": "^5.8.0",
"@ionic-native/diagnostic": "^5.8.0",
"@ionic-native/fingerprint-aio": "^5.8.0",
"@ionic-native/globalization": "^5.8.0",
"@ionic-native/health": "^5.4.0",
"@ionic-native/in-app-browser": "^5.8.0",
"@ionic-native/keyboard": "^5.8.0",
"@ionic-native/launch-navigator": "^5.8.0",
"@ionic-native/local-notifications": "^5.8.0",
"@ionic-native/native-storage": "^5.8.0",
"@ionic-native/push": "^5.8.0",
"@ionic-native/sms": "^5.8.0",
"@ionic-native/splash-screen": "^5.0.0",
"@ionic-native/sqlite": "^5.8.0",
"@ionic-native/status-bar": "^5.0.0",
"@ionic-native/themeable-browser": "^5.8.0",
"@ionic/angular": "^4.1.0",
"@ng-bootstrap/ng-bootstrap": "^4.2.1",
"@swimlane/ngx-charts": "^10.1.0",
"angular-calendar": "^0.26.11",
"call-number": "^1.0.1",
"chart.js": "^2.8.0",
"cordova-android": "7.1.4",
"cordova-android-support-gradle-release": "^2.1.0",
"cordova-browser": "5.0.4",
"cordova-ios": "4.5.5",
"cordova-opentok-android-permissions": "^1.0.1",
"cordova-plugin-actionsheet": "^2.3.3",
"cordova-plugin-add-swift-support": "^2.0.2",
"cordova-plugin-android-permissions": "^1.0.0",
"cordova-plugin-appavailability": "^0.4.2",
"cordova-plugin-apprate": "^1.4.0",
"cordova-plugin-badge": "^0.8.8",
"cordova-plugin-ble-central": "^1.2.2",
"cordova-plugin-camera": "^4.0.3",
"cordova-plugin-compat": "^1.2.0",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-dialogs": "^2.0.1",
"cordova-plugin-fingerprint-aio": "^1.7.0",
"cordova-plugin-globalization": "^1.11.0",
"cordova-plugin-inappbrowser": "^3.0.0",
"cordova-plugin-ionic-keyboard": "^2.1.3",
"cordova-plugin-ionic-webview": "^3.1.2",
"cordova-plugin-local-notification": "^0.9.0-beta.2",
"cordova-plugin-nativestorage": "^2.3.2",
"cordova-plugin-sms-receive": "^1.0.2",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-themeablebrowser": "^0.2.18",
"cordova-plugin-whitelist": "^1.3.3",
"cordova-sms-plugin": "^1.0.0",
"cordova-sqlite-storage": "^3.2.0",
"cordova.plugins.diagnostic": "^4.0.12",
"core-js": "^2.5.4",
"date-fns": "^1.30.1",
"mx.ferreyra.callnumber": "0.0.2",
"phonegap-plugin-barcodescanner": "^8.1.0",
"phonegap-plugin-multidex": "^1.0.0",
"phonegap-plugin-push": "2.2.3",
"primeicons": "^1.0.0",
"primeng": "^7.1.3",
"run": "1.4.0",
"rxjs": "~6.3.3",
"uk.co.workingedge.phonegap.plugin.launchnavigator": "^3.2.2",
"zone.js": "~0.8.29"
},
"devDependencies": {
"@angular-devkit/architect": "~0.12.3",
"@angular-devkit/build-angular": "~0.13.0",
"@angular-devkit/core": "~7.2.3",
"@angular-devkit/schematics": "~7.2.3",
"@angular/cli": "7.3.6",
"@angular/compiler": "~7.2.2",
"@angular/compiler-cli": "~7.2.2",
"@angular/language-service": "~7.2.2",
"@ionic/angular-toolkit": "~1.4.0",
"@types/jasmine": "~2.8.8",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~10.12.0",
"codelyzer": "~4.5.0",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "^4.0.1",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~1.1.2",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.4.0",
"ts-node": "~8.0.0",
"tslint": "~5.12.0",
"typescript": "~3.1.6"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-whitelist": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-webview": {
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
},
"cordova-plugin-mauron85-background-geolocation": {
"GOOGLE_PLAY_SERVICES_VERSION": "16.0.0",
"ANDROID_SUPPORT_LIBRARY_VERSION": "26+",
"ICON": "@mipmap/icon",
"SMALL_ICON": "@mipmap/icon",
"ACCOUNT_NAME": "@string/app_name",
"ACCOUNT_LABEL": "@string/app_name",
"ACCOUNT_TYPE": "$PACKAGE_NAME.account",
"CONTENT_AUTHORITY": "$PACKAGE_NAME",
"ALWAYS_USAGE_DESCRIPTION": "This app always requires location tracking",
"MOTION_USAGE_DESCRIPTION": "This app requires motion detection"
},
"cordova-sqlite-storage": {},
"cordova-plugin-nativestorage": {},
"cordova-plugin-ble-central": {},
"uk.co.workingedge.phonegap.plugin.launchnavigator": {},
"cordova-plugin-themeablebrowser": {},
"cordova-plugin-globalization": {},
"cordova-plugin-android-permissions": {},
"cordova-plugin-sms-receive": {},
"cordova-plugin-local-notification": {},
"mx.ferreyra.callnumber": {},
"cordova-plugin-badge": {},
"cordova-plugin-fingerprint-aio": {
"FACEID_USAGE_DESCRIPTION": "User Authentication"
},
"cordova.plugins.diagnostic": {},
"phonegap-plugin-barcodescanner": {},
"cordova-plugin-camera": {},
"cordova-plugin-ionic-keyboard": {},
"cordova-android-support-gradle-release": {},
"cordova-opentok-android-permissions": {},
"cordova-plugin-health": {
"HEALTH_READ_PERMISSION": "App needs read access to read heart rate",
"HEALTH_WRITE_PERMISSION": "App needs write access for heart rate",
"GMS_VERSION": "16.0.1"
},
"cordova-plugin-appavailability": {},
"call-number": {},
"cordova-support-google-services": {},
"phonegap-plugin-push": {
"GOOGLE_PLAY_SERVICES_VERSION": "16.0.0",
"FCM_VERSION": "15.0.0"
},
"cordova-plugin-apprate": {},
"cordova-plugin-inappbrowser": {},
"cordova-sms-plugin": {}
},
"platforms": [
"browser",
"ios",
"android"
]
}
}

@ -86,7 +86,7 @@
<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">
<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>
@ -115,5 +115,5 @@
<plugin name="cordova-plugin-apprate" spec="^1.4.0" />
<engine name="browser" spec="5.0.4" />
<engine name="ios" spec="4.5.5" />
<engine name="android" spec="^7.1.4" />
<engine name="android" spec="7.1.4" />
</widget>

File diff suppressed because it is too large Load Diff

@ -24,17 +24,18 @@
"@ionic-native/android-permissions": "^5.8.0",
"@ionic-native/app-availability": "^5.8.0",
"@ionic-native/app-rate": "^5.8.0",
"@ionic-native/background-geolocation": "^5.8.0",
"@ionic-native/background-geolocation": "^5.4.0",
"@ionic-native/badge": "^5.8.0",
"@ionic-native/barcode-scanner": "^5.8.0",
"@ionic-native/ble": "^5.8.0",
"@ionic-native/call-number": "^5.8.0",
"@ionic-native/camera": "^5.8.0",
"@ionic-native/core": "^5.0.0",
"@ionic-native/core": "^5.8.0",
"@ionic-native/device": "^5.8.0",
"@ionic-native/diagnostic": "^5.8.0",
"@ionic-native/fingerprint-aio": "^5.8.0",
"@ionic-native/globalization": "^5.8.0",
"@ionic-native/health": "^5.4.0",
"@ionic-native/in-app-browser": "^5.8.0",
"@ionic-native/keyboard": "^5.8.0",
"@ionic-native/launch-navigator": "^5.8.0",
@ -52,7 +53,7 @@
"angular-calendar": "^0.26.11",
"call-number": "^1.0.1",
"chart.js": "^2.8.0",
"cordova-android": "^7.1.4",
"cordova-android": "7.1.4",
"cordova-android-support-gradle-release": "^2.1.0",
"cordova-browser": "5.0.4",
"cordova-ios": "4.5.5",
@ -74,7 +75,6 @@
"cordova-plugin-ionic-keyboard": "^2.1.3",
"cordova-plugin-ionic-webview": "^3.1.2",
"cordova-plugin-local-notification": "^0.9.0-beta.2",
"cordova-plugin-mauron85-background-geolocation": "^3.0.0-alpha.50",
"cordova-plugin-nativestorage": "^2.3.2",
"cordova-plugin-sms-receive": "^1.0.2",
"cordova-plugin-splashscreen": "^5.0.2",
@ -83,14 +83,13 @@
"cordova-plugin-whitelist": "^1.3.3",
"cordova-sms-plugin": "^1.0.0",
"cordova-sqlite-storage": "^3.2.0",
"cordova-support-google-services": "^1.1.0",
"cordova.plugins.diagnostic": "^4.0.12",
"core-js": "^2.5.4",
"date-fns": "^1.30.1",
"mx.ferreyra.callnumber": "0.0.2",
"phonegap-plugin-barcodescanner": "^8.1.0",
"phonegap-plugin-multidex": "^1.0.0",
"phonegap-plugin-push": "^2.2.3",
"phonegap-plugin-push": "2.2.3",
"primeicons": "^1.0.0",
"primeng": "^7.1.3",
"run": "1.4.0",
@ -134,6 +133,18 @@
"cordova-plugin-ionic-webview": {
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
},
"cordova-plugin-mauron85-background-geolocation": {
"GOOGLE_PLAY_SERVICES_VERSION": "16.0.0",
"ANDROID_SUPPORT_LIBRARY_VERSION": "26+",
"ICON": "@mipmap/icon",
"SMALL_ICON": "@mipmap/icon",
"ACCOUNT_NAME": "@string/app_name",
"ACCOUNT_LABEL": "@string/app_name",
"ACCOUNT_TYPE": "$PACKAGE_NAME.account",
"CONTENT_AUTHORITY": "$PACKAGE_NAME",
"ALWAYS_USAGE_DESCRIPTION": "This app always requires location tracking",
"MOTION_USAGE_DESCRIPTION": "This app requires motion detection"
},
"cordova-sqlite-storage": {},
"cordova-plugin-nativestorage": {},
"cordova-plugin-ble-central": {},
@ -154,8 +165,14 @@
"cordova-plugin-ionic-keyboard": {},
"cordova-android-support-gradle-release": {},
"cordova-opentok-android-permissions": {},
"cordova-plugin-health": {
"HEALTH_READ_PERMISSION": "App needs read access to read heart rate",
"HEALTH_WRITE_PERMISSION": "App needs write access for heart rate",
"GMS_VERSION": "16.0.1"
},
"cordova-plugin-appavailability": {},
"call-number": {},
"cordova-support-google-services": {},
"phonegap-plugin-push": {
"GOOGLE_PLAY_SERVICES_VERSION": "16.0.0",
"FCM_VERSION": "15.0.0"

@ -0,0 +1,33 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { Routes, RouterModule } from '@angular/router';
import {AccrualService} from './services/accrual.service';
import { IonicModule } from '@ionic/angular';
import { AccrualBalancesPage } from './accrual-balances.page';
import { HomeComponent } from './home/home.component';
const routes: Routes = [
{
path: '',
component: AccrualBalancesPage,
children: [
{
path: 'home',
component: HomeComponent
}
],
}
];
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
RouterModule.forChild(routes)
],
declarations: [AccrualBalancesPage, HomeComponent],
providers:[AccrualService]
})
export class AccrualBalancesPageModule {}

@ -0,0 +1,7 @@
<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 { AccrualBalancesPage } from './accrual-balances.page';
describe('AccrualBalancesPage', () => {
let component: AccrualBalancesPage;
let fixture: ComponentFixture<AccrualBalancesPage>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ AccrualBalancesPage ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(AccrualBalancesPage);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

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

@ -0,0 +1,31 @@
<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('accrualBalances','accrualBalances')}}</ion-title>
</ion-toolbar>
</ion-header>
<ion-content padding>
<div class="tipsPadding" [innerHTML]="ts.trPK('accrualBalances','tip')"></div>
<ion-item>
<ion-label>{{ts.trPK('accrualBalances','selectDate')}}</ion-label>
<ion-datetime [(ngModel)]="Sdate" min="1900" max="2100" displayFormat="MMM/DD/YYYY " placeholder="MM/DD/YYYY"
(ionChange)="getAccrualBalance()"></ion-datetime>
</ion-item>
<ul>
<li *ngFor="let data of balance; let i=index">
<ion-card no-shadow text-center >
<div class="content-line accuralBox">
<div class="accuralImage"><img src="../assets/imgs/accrual.png" /></div>
<div class="accuralTxt"> <p class="balanceVal boldTxt"> {{data.ACCRUAL_NET_ENTITLEMENT}} </p>
<p class="balanceTxt">{{data.ACCURAL_PLAN_NAME}}</p></div>
</div>
</ion-card>
</li>
</ul>
</ion-content>

@ -0,0 +1,89 @@
ul{
padding: 0px;
margin: 0px;
li{
ion-card ,.card-md,.card-ios{
position: relative;
box-shadow: none;
-webkit-box-shadow:none;
-moz-box-shadow: none;
border: 2px solid var(--gray);
margin: auto !important;
color: var(--darkgray);
border-radius: 10px !important;
}
}
}
li:nth-child(3n-1),
li:nth-child(3n){
display: inline-block;
width: calc(50% - 0px);
div {
display: flex;
align-items: center;
flex-direction: column;
p.balanceVal{
color:var(--secondary);
font-size: 20px;
}
img {
width: 90px;
margin: auto;
}
.accuralImage{
min-height: auto;
margin-top:60px;
}
.boldTxt{position:absolute; left:0px;top:20px; width:100%;}
p.balanceTxt{
font-size: 16px;
padding: 5px;
}
}
}
li:nth-child(3n+1){
display: flex;
align-items: center;
justify-content: center;
height: 140px;
overflow: visible;
div.content-line {
p.balanceVal{
color:var(--secondary);
font-size: 20px;
}
img {
width: 100px;
margin: auto;
}
.accuralImage{
float:left;
width:50%;
}
.accuralTxt{
float:left;
width:50%;
}
p.balanceTxt{
font-size: 16px;
padding: 5px;
}
}
}
.content-line.accuralBox {
position: relative;
}

@ -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,60 @@
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"]
})
export class HomeComponent implements OnInit {
Sdate: any;
emp_no: any;
balance:any;
constructor(
public ts: TranslatorService,
public cs: CommonService,
public accrualService: AccrualService,
public authService:AuthenticationService
) {}
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();
}
});
}
private 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.emp_no,
P_EFFECTIVE_DATE: effectiveDate
};
this.accrualService
.getAccrualBalances(request)
.subscribe((result: any) => {
this.handleAccrualResult(result);
});
}
}
handleAccrualResult(result) {
if (this.cs.validResponse(result)) {
this.balance=result.GetAccrualBalancesList;
}
}
}

@ -0,0 +1,25 @@
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"
})
export class AccrualService {
public static GET_ACCRUAL_BALANCE =
"Services/ERP.svc/REST/GET_ACCRUAL_BALANCES";
constructor(
public con: ConnectorService,
public authService: AuthenticationService
) {}
public getAccrualBalances(balance: any, onError?: any, errorLabel?: string) {
const request = balance;
this.authService.authenticateRequest(request);
return this.con.post(
AccrualService.GET_ACCRUAL_BALANCE,
request,
onError,
errorLabel
);
}
}

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

@ -6,7 +6,15 @@ const routes: Routes = [
{
path: 'authentication', loadChildren: './authentication/authentication.module#AuthenticationPageModule',
data: { preload: true, delay: 1000 }
}
},
{ 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' }
];
@NgModule({

@ -1,82 +1,63 @@
<!-- <ion-nav [root]="rootPage" #mycontent swipeBackEnabled="false"></ion-nav> -->
<!-- (ionWillOpen)="menuOpened(true)" -->
<ion-app [dir]="direction">
<ion-split-pane>
<!-- <ion-menu persistent="true" id="leftMenu" class="menu"
side="left" *ngIf="direction==='ltr'" >
<ion-menu [side]=" direction === 'rtl' ? 'end' : 'start'" [swipeGesture]="false">
<ion-content class="sidebar-menu">
<div class="header-div">
<div class="centerDiv">
<p class="TxtPlace">{{"home.hello" | translate}}, {{User_name_Emp}}</p>
<div> <img src="{{user_image}}" class="profileImg" ></div>
</div>
</div>
<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>
</div>
<ion-list>
<button class="menu-item" ion-item menuClose ion-item (click)="goToWorkListPage()" >
<img width="30" src="../assets/imgs/bell.png" item-left >
{{"home.worklist" | translate }}
<ion-badge item-end>{{notBadge}}</ion-badge>
</button>
<button class="menu-item" ion-item menuClose ion-item (click)="goToProfile()" >
<img width="30" src="../assets/imgs/username.png" item-left >
{{"userProfile.title" | translate }}
</button>
<ion-item>
<ion-thumbnail slot="start" class="menu-thumb">
<img width="30" src="../assets/imgs/bell.png" item-left>
</ion-thumbnail>
<ion-label>
{{ts.trPK('home','worklist')}}
<ion-badge item-end>{{notBadge}}</ion-badge>
</ion-label>
<!-- <button class="menu-item" ion-item menuClose ion-item (click)="goToWorkListPage()" >
<button class="menu-item" ion-item menuClose ion-item (click)="logout()" >
<img width="30" src="../assets/imgs/signout.png" item-left >
{{"home.logout" | translate }}
</button>
</button> -->
</ion-item>
<ion-item (click)="profile()">
<ion-thumbnail slot="start" class="menu-thumb">
<img width="30" src="../assets/imgs/username.png" item-left>
</ion-thumbnail>
<ion-label>
{{ts.trPK('userProfile','title')}}
</ion-label>
</ion-item>
<ion-item (click)="logout();">
<ion-thumbnail slot="start" class="menu-thumb">
<img width="30" src="../assets/imgs/signout.png" item-left>
</ion-thumbnail>
<ion-label>
{{ts.trPK('home','logout')}}
</ion-label>
</ion-item>
</ion-list>
<div class="menuFooter">
<div> <img src="{{companyUrl}}" class="CompanyImg" ></div>
<p class="companyTxt">{{companyDesc}}</p>
</div>
<div> <img src="{{companyUrl}}" class="CompanyImg"></div>
<p class="companyTxt">{{companyDesc}}</p>
</div>
</ion-content>
</ion-menu>
<ion-menu persistent="true" id="rightMenu" class="menu"
side="right" *ngIf="direction==='rtl'" >
<ion-content class="sidebar-menu">
<div class="header-div">
<div class="centerDiv">
<p class="TxtPlace">{{"home.hello" | translate}}, {{User_name_Emp}}</p>
<div> <img src="{{user_image}}" class="profileImg" ></div>
</div>
</div>
<ion-list>
<button class="menu-item" ion-item menuClose ion-item (click)="goToWorkListPage()" >
<img width="30" src="../assets/imgs/bell.png" item-left >
{{"home.worklist" | translate }}
<ion-badge item-end>{{notBadge}}</ion-badge>
</button>
<button class="menu-item" ion-item menuClose ion-item (click)="goToProfile()" >
<img width="30" src="../assets/imgs/username.png" item-left >
{{"userProfile.title" | translate }}
</button>
<button class="menu-item" ion-item menuClose ion-item (click)="logout()" >
<img width="30" src="../assets/imgs/signout.png" item-left >
{{"home.logout" | translate }}
</button>
</ion-list>
<div class="menuFooter">
<div> <img src="{{companyUrl}}" class="CompanyImg" ></div>
<p class="companyTxt">{{companyDesc}}</p>
</div>
</ion-content>
</ion-menu> -->
<ion-router-outlet main></ion-router-outlet>
<ion-router-outlet main></ion-router-outlet>
</ion-split-pane>

@ -0,0 +1,179 @@
/*
header
*/
.menu-header {
height: 2.5cm;
}
.content-ios:not([no-bounce])>.scroll-content::before {
bottom: 0;
}
.menu-header .logo {
position: absolute;
left: 0.6cm;
top: 0.9cm;
width: 1.6cm;
}
.menu-header .background {
height: 1.5cm;
width: 100%;
}
/* title */
.title-v-spacer {
height: 0.7cm;
}
.suliman-title {
margin-left: 0.3cm;
margin-right: 0.3cm;
font-weight: bold;
font-size: 0.5cm;
}
.group-title {
margin-left: 0.4cm;
margin-right: 0.4cm;
font-size: 0.4cm;
}
/*
items
*/
.items-buttons-spacer {
height: 10%;
}
/*
user information
*/
.user-v-spacer {
height: 0.5cm;
}
.user-name-title {
margin-left: 0.3cm;
margin-right: 0.3cm;
font-weight: bold;
}
.file-id-title {
margin-left: 0.4cm;
margin-right: 0.4cm;
}
.social-media-container {
position: absolute !important;
width: 100%;
bottom: 0.2cm;
background-color: white;
}
.icon-spacer {
margin-right: 0.3cm;
margin-left: 0.3cm;
}
/*mobile Landscape */
@media only screen and (min-device-height: 0px) and (max-device-height: 515px) and (orientation: landscape) {
.social-media-container {
display: none;
}
}
.info-container {
overflow-y: scroll;
width: 100%;
position: absolute;
top: 2.6cm;
bottom: 0.2cm;
padding-bottom: 4.5cm;
}
@media only screen and (orientation: landscape) {
.info-container {
padding-bottom: 0.2cm;
}
}
.member {
border-bottom-color: var(--ion-color-medium) !important;
border-bottom-width: 0.02cm;
border-bottom-style: solid;
/* margin-left: 0.4cm; */
}
.selected-member {
border-bottom-color: var(--ion-color-secondary) !important;
border-bottom-width: 0.02cm;
border-bottom-style: solid;
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;
position: relative;
display: block;
margin-bottom: 40px;
}
.list-md .item-block .item-inner,
.list-ios .item-block .item-inner {
border-color: var(--primary);
border-bottom: 0px;
}
.list-md>.item-block:last-child .item-inner,
.list-ios>.item-block:last-child .item-inner {
border-bottom: 0px;
}
button.menu-item.item.item-block.item-md,
button.menu-item.item.item-block.item-ios {
border-bottom: 1px solid var(--cusgray);
color: var(--customnavy);
}
.TxtPlace {
margin: 0;
padding: 40px 0 10px 0;
text-align: center;
}
.menuFooter {
position: fixed;
bottom: 0px;
text-align: center;
margin: auto;
width: 100%;
}
.menuFooter div {
width: 80px;
// height: 80px;
margin: auto;
}
.menuFooter .CompanyImg {
width: 100%;
height: 100%;
}
.companyTxt {
font-size: 12px;
color: var(--customnavy);
text-align: center;
}
ion-thumbnail.menu-thumb{
width:30px;
height:30px;
}

@ -7,6 +7,8 @@ import { AuthenticatedUser } from "./hmg-common/services/authentication/models/a
import { TabsBarComponent } from "./hmg-common/ui/tabs-bar/tabs-bar.component";
import { KeyboardService } from "./hmg-common/services/keyboard/keyboard.service";
import { SMSCheckResponse } from "src/app/hmg-common/services/authentication/models/smscheck.response";
import { LazyLoadingService } from "./hmg-common/services/lazy-loading/lazy-loading.service";
@Component({
@ -20,53 +22,74 @@ export class AppComponent implements OnInit, AfterViewInit {
start: any = false;
menuList: any = [];
User_name_Emp: string = "";
user_image: string = "";
user_image: string = "../assets/imgs/profile.png";
menuSide: string = "left";
notBadge: number;
companyUrl: string = "../assets/imgs/CS.png";
companyDesc: string = "Powered By Cloud Solutions";
public direction = "ltr";
constructor(
public translatorService: TranslatorService,
public ts: TranslatorService,
private cs: CommonService,
private lazyLoadingService: LazyLoadingService,
private platform: Platform,
private events: Events,
private keyboardService: KeyboardService,
private menu: MenuController
private menu: MenuController,
private authService: AuthenticationService
) {}
ngOnInit() {
this.initializeApp();
}
ngAfterViewInit() {}
initializeApp() {
this.start = false;
this.lazyLoadingService.monitorLazyLoading(15, true);
this.platform.ready().then(() => {
this.translatorService.loadResources(() => {
this.ts.loadResources(() => {
this.initializeDirection();
// this.statusBar.styleDefault();
this.start = true;
// this.statusBar.styleDefault();
this.start = true;
this.watchLanguageChangeEvents();
// this.checkIfUserLoggedInBefore();
this.subscribeEvents();
this.keyboardService.watchKeyboard();
});
});
}
subscribeEvents() {
this.events.subscribe("setMenu", () => {
const user = this.authService
.loadAuthenticatedUser()
.subscribe((user: AuthenticatedUser) => {
if (user) {
this.companyUrl = user.CompanyImageURL
? user.CompanyImageURL
: "../assets/imgs/CS.png";
this.companyDesc = user.CompanyImageDescription
? user.CompanyImageDescription
: "Powered By Cloud Solutions";
this.User_name_Emp = user.EMPLOYEE_DISPLAY_NAME;
this.user_image = user.EMPLOYEE_IMAGE
? "data:image/png;base64," + user.EMPLOYEE_IMAGE
: "../assets/imgs/profile.png";
console.log(user);
} else {
console.log(user);
}
});
});
this.events.subscribe("getNotCount", badge => {
this.notBadge = badge;
});
}
private initializeDirection() {
this.direction = TranslatorService.getCurrentDirection();
}
private watchUserLoginChangeEvents() {
this.events.subscribe(
AuthenticationService.LOGIN_EVENT,
(user: AuthenticatedUser, time: Date) => {
// if (user) {
// this.loggedInMainUser = user;
// this.loggedInUser = user;
// this.loadFamilyMembers();
// }
}
(user: AuthenticatedUser, time: Date) => {}
);
}
private watchLanguageChangeEvents() {
@ -78,4 +101,15 @@ export class AppComponent implements OnInit, AfterViewInit {
}, 100);
});
}
logout() {
this.cs.sharedService.clearAll();
this.menu.toggle();
this.cs.openLogin();
}
profile() {
this.cs.openProfile();
this.menu.toggle();
}
}

@ -3,4 +3,14 @@
// Put style rules here that you want to apply to the entire application. These
// styles are for the entire app and not just one component. Additionally, this
// file can hold Sass mixins, functions, and placeholder classes to be imported
// and used throughout the application.
// and used throughout the application.
.alert-radio-label.sc-ion-alert-md,
.alert-radio-label.sc-ion-alert-ios {
white-space: normal;
}
.alert-tappable.sc-ion-alert-md,
.alert-tappable.sc-ion-alert-ios {
height: 50px;
}

@ -33,7 +33,7 @@ export class AgreementComponent implements OnInit {
}, this.ts.trPK('general', 'retry')).subscribe((result: CheckUserAgreementResponse) => {
if (this.cs.validResponse(result)) {
if (result.IsPatientAlreadyAgreed) {
this.auth.setUserAgreed(true);
// this.auth.setUserAgreed(true);
this.cs.openHome();
} else {
this.getUserAgreement();
@ -59,7 +59,7 @@ export class AgreementComponent implements OnInit {
this.onAcceptClicked();
}, this.ts.trPK('general', 'retry')).subscribe((result: GetUserAgreementResponse) => {
if (this.cs.validResponse(result)) {
this.auth.setUserAgreed(true);
//this.auth.setUserAgreed(true);
this.cs.openHome();
}
});

@ -17,6 +17,9 @@ import { SearchableOptionsModule } from '../hmg-common/ui/searchable-select/sear
import { MobileNumberModule } from 'src/app/hmg-common/ui/mobile-number/mobile-number.module';
import { SmsdialogPageModule } from 'src/app/hmg-common/ui/smsdialog/smsdialog.module';
import { SmsPageModule } from 'src/app/hmg-common/ui/sms/sms.module';
import { SmsPageComponent } from './sms-page/sms-page.page';
import { CheckUserComponent } from './check-user/check-user.component';
import { ChangePasswordComponent } from './change-password/change-password.component';
@ -36,6 +39,18 @@ const routes: Routes = [
{
path: 'agreement',
component: AgreementComponent
},
{
path: 'smspage',
component: SmsPageComponent
},
{
path: 'checkuser',
component: CheckUserComponent
},
{
path: 'changepassowrd',
component: ChangePasswordComponent
}
]
}
@ -60,6 +75,9 @@ const routes: Routes = [
LoginComponent,
ForgotComponent,
AgreementComponent,
SmsPageComponent,
CheckUserComponent,
ChangePasswordComponent
],
providers:[
FingerprintAIO,

@ -0,0 +1,47 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<ion-buttons slot="start">
<ion-back-button color="light" class="btnBack" ></ion-back-button>
</ion-buttons>
<ion-title color="light" > {{'changePassword,changePassword' | translate}}</ion-title>
</ion-toolbar>
</ion-header>
<ion-content padding>
<ion-grid>
<ion-item>
<img class="item-icon" src="assets/imgs/password.png" item-start />
<ion-label>{{'changePassword,currentPassword' | translate}}</ion-label>
<ion-input required type="password"
[(ngModel)]="P_OLD_PASSWORD">
</ion-input>
</ion-item>
<ion-item>
<img class="item-icon" src="assets/imgs/password.png" item-start />
<ion-label>{{'changePassword,newPassword' | translate}}</ion-label>
<ion-input required type="password"
[(ngModel)]="P_NEW_PASSWORD">
</ion-input>
</ion-item>
<ion-item>
<img class="item-icon" src="assets/imgs/password.png" item-start />
<ion-label>{{'changePassword,confirmPassword' | translate}}</ion-label>
<ion-input required type="password"
[(ngModel)]="P_Confirm_NEW_PASSWORD">
</ion-input>
</ion-item>
</ion-grid>
<page-trailer [small]="true"></page-trailer>
</ion-content>
<ion-footer>
<div class="centerDiv">
<ion-button color="customnavy" ion-button (click)="submit()">{{ts.trPK('login','changepassword')}}</ion-button>
</div>
</ion-footer>

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

@ -0,0 +1,123 @@
import { Component, OnInit, ViewChild, ChangeDetectorRef, OnDestroy } from '@angular/core';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service';
import { Router } from '@angular/router';
import { AlertController } from '@ionic/angular';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { CheckUserAuthenticationResponse } from 'src/app/hmg-common/services/authentication/models/check-user-auth.response';
import { SmsReaderService } from 'src/app/hmg-common/services/sms/sms-reader.service';
import { ForgetPassword } from '../models/forget.password';
import { LoginModel } from '../models/LoginModel';
import { SharedDataService } from 'src/app/hmg-common/services/shared-data-service/shared-data.service';
import {LoginComponent} from "src/app/authentication/login/login.component";
import { Password } from '../models/password';
import { AuthenticatedUser } from "src/app/hmg-common/services/authentication/models/authenticated-user";
@Component({
selector: 'app-change-password',
templateUrl: './change-password.component.html',
styleUrls: ['./change-password.component.scss'],
})
export class ChangePasswordComponent implements OnInit {
private loginData = new LoginModel();
public P_NEW_PASSWORD: string;
public P_Confirm_NEW_PASSWORD : string;
public P_OLD_PASSWORD : string;
public P_USER_NAME : string;
userData: any = {};
public isExpiredPwd: boolean = false;
constructor(
public cs: CommonService,
public authService: AuthenticationService,
public router: Router,
public alertController: AlertController,
public ts: TranslatorService,
public smsService: SmsReaderService,
public changeDetector: ChangeDetectorRef,
public sharedData: SharedDataService) {
console.log("change password constructor");
}
ngOnInit() {
console.log("change password oninit");
this.isExpiredPwd =
this.sharedData.getSharedData(Password.IS_EXPIRED_PSW) || false;
const data = this.sharedData.getSharedData(AuthenticationService.LOGIN_DATA, false);
this.P_USER_NAME =data.P_USER_NAME;
console.log(this.isExpiredPwd);
console.log(this.P_USER_NAME);
// this.authService
// .loadAuthenticatedUser()
// .subscribe((user: AuthenticatedUser) => {
// if (user) {
// this.userData = user;
// this.P_USER_NAME = user.EMPLOYEE_NUMBER;
// console.log(user);
// } else {
// console.log(user);
// }
// });
}
private checkUserResult: CheckUserAuthenticationResponse;
submit(){
console.log(this.isExpiredPwd);
if(this.isExpiredPwd){
this.expiredPassword();
}else{
this.changePassword();
}
}
public expiredPassword(){
const data = this.sharedData.getSharedData(AuthenticationService.LOGIN_DATA, false);
//this.loginData.P_USER_NAME = this.P_USER_NAME;
let request:Password = new Password();
request.P_OLD_PASSWORD=this.P_OLD_PASSWORD;
request.P_Confirm_NEW_PASSWORD=this.P_NEW_PASSWORD;
request.P_NEW_PASSWORD=this.P_Confirm_NEW_PASSWORD;
request.P_USER_NAME = this.P_USER_NAME;
this.authService.submitExpiredPassword(
request,
() => {
//this.sendSMSForForgotPassword();
}, this.ts.trPK('general', 'ok')).subscribe((result: CheckUserAuthenticationResponse) => {
if (this.cs.validResponse(result)) {
this.checkUserResult = result;
console.log(result);
this.cs.toastPK("changePassword","successChange");
this.sharedData.setSharedData(false,Password.IS_EXPIRED_PSW);
this.cs.openLogin();
}
});
}
public changePassword(){
const data = this.sharedData.getSharedData(AuthenticationService.LOGIN_DATA, false);
//this.loginData.P_USER_NAME = this.P_USER_NAME;
let request:Password = new Password();
request.P_OLD_PASSWORD=this.P_OLD_PASSWORD;
request.P_Confirm_NEW_PASSWORD=this.P_NEW_PASSWORD;
request.P_NEW_PASSWORD=this.P_Confirm_NEW_PASSWORD;
request.P_USER_NAME = this.P_USER_NAME;
this.authService.submitChangePassword(
request,
() => {
//this.sendSMSForForgotPassword();
}, this.ts.trPK('general', 'ok')).subscribe((result: CheckUserAuthenticationResponse) => {
if (this.cs.validResponse(result)) {
this.checkUserResult = result;
console.log(result);
this.cs.toastPK("changePassword","successChange");
this.cs.openHome();
}
});
}
}

@ -0,0 +1,24 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<ion-buttons slot="start">
<ion-back-button color="light" class="btnBack" ></ion-back-button>
</ion-buttons>
<ion-title color="light" > {{'login,forgot-password' | translate}}</ion-title>
</ion-toolbar>
</ion-header>
<ion-content padding>
<ion-grid>
<ion-item>
<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-input>
</ion-item>
</ion-grid>
<page-trailer [small]="true"></page-trailer>
</ion-content>
<ion-footer>
<div class="centerDiv">
<ion-button color="customnavy" ion-button (click)=" userCheck()">{{ts.trPK('login','changepassword')}}</ion-button>
</div>
</ion-footer>

@ -0,0 +1,7 @@
.header-toolbar{
--background: linear-gradient(45deg, #3ac1f1 0%, #19a163 36%, #19a163 59%, #1a586d 100%);
}
.btnBack{
background: transparent;
}

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

@ -0,0 +1,86 @@
import { Component, OnInit, ViewChild, ChangeDetectorRef, OnDestroy } from '@angular/core';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service';
import { Router } from '@angular/router';
import { AlertController } from '@ionic/angular';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { CheckUserAuthenticationRequest } from 'src/app/hmg-common/services/authentication/models/check-user-auth.request';
import { CheckUserAuthenticationResponse } from 'src/app/hmg-common/services/authentication/models/check-user-auth.response';
import { SmsReaderService } from 'src/app/hmg-common/services/sms/sms-reader.service';
import { InternationalMobileComponent } from 'src/app/hmg-common/ui/mobile-number/international-mobile/international-mobile.component';
import { LoginRequest } from 'src/app/hmg-common/services/authentication/models/login.request';
import { SharedDataService } from 'src/app/hmg-common/services/shared-data-service/shared-data.service';
import { Password } from '../models/password';
import { LoginModel } from '../models/LoginModel';
import {LoginComponent} from 'src/app/authentication/login/login.component';
@Component({
selector: 'app-check-user',
templateUrl: './check-user.component.html',
styleUrls: ['./check-user.component.scss'],
})
export class CheckUserComponent implements OnInit {
public P_USER_NAME : string;
private loginData = new LoginModel();
@ViewChild(InternationalMobileComponent) internationlMobile: InternationalMobileComponent;
constructor(public cs: CommonService,
public authService: AuthenticationService,
public router: Router,
public alertController: AlertController,
public ts: TranslatorService,
public smsService: SmsReaderService,
public sharedData: SharedDataService,
public changeDetector: ChangeDetectorRef) { }
ngOnInit() {}
public onForgot() {
this.sendSMSForForgotPassword();
}
public userCheck()
{
this.cs.startLoading();
const request = new CheckUserAuthenticationRequest();
request.P_USER_NAME = this.P_USER_NAME;
this.authService.checkUserAuthentication(
request,
() => {
/* Write code for error */
}, this.ts.trPK('general', 'ok')).subscribe((result: CheckUserAuthenticationResponse) => {
if (this.cs.validResponse(result)) {
this.checkUserResult = result;
this.cs.stopLoading();
this.sendSMSForForgotPassword();
}
});
}
private checkUserResult: CheckUserAuthenticationResponse;
private sendSMSForForgotPassword() {
this.cs.startLoading();
let changePwdObj= new LoginRequest();
changePwdObj.MobileNumber= this.checkUserResult.BasicMemberInformation.P_MOBILE_NUMBER;
changePwdObj.P_USER_NAME=this.P_USER_NAME;
changePwdObj.P_MOBILE_NUMBER=this.checkUserResult.BasicMemberInformation.P_MOBILE_NUMBER;
this.authService.sendPublicSMS(
changePwdObj,
() => {
//this.sendSMSForForgotPassword();
/* Write code for error */
}, this.ts.trPK('general', 'ok')).subscribe((result: CheckUserAuthenticationResponse) => {
if (this.cs.validResponse(result)) {
this.checkUserResult = result;
console.log("2");
console.log(result);
this.loginData.LogInTokenID = result.LogInTokenID;
this.loginData.P_USER_NAME = this.P_USER_NAME;
this.sharedData.setSharedData(this.loginData, AuthenticationService.LOGIN_DATA);
this.sharedData.setSharedData(true,Password.IS_FORGET_PSW);
this.cs.stopLoading();
this.cs.openSMSPage();
}});
}
}

@ -1,20 +1,32 @@
<ion-header>
<nav-buttons ></nav-buttons>
<ion-title>{{'login,forgot-password' | translate}}</ion-title>
<ion-toolbar class="header-toolbar">
<ion-buttons slot="start">
<ion-back-button color="light" class="btnBack" ></ion-back-button>
</ion-buttons>
<ion-title color="light" > {{'login,forgot-password' | translate}}</ion-title>
</ion-toolbar>
</ion-header>
<ion-content padding>
<ion-grid>
<ion-item>
<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-input>
</ion-item>
<ion-item>
<img class="item-icon" src="assets/imgs/password.png" item-start />
<ion-label>{{'changePassword,newPassword' | translate}}</ion-label>
<ion-input required type="password"
[(ngModel)]="P_NEW_PASSWORD">
</ion-input>
</ion-item>
<ion-item>
<img class="item-icon" src="assets/imgs/password.png" item-start />
<ion-label>{{'changePassword,confirmPassword' | translate}}</ion-label>
<ion-input required type="password"
[(ngModel)]="P_Confirm_NEW_PASSWORD">
</ion-input>
</ion-item>
</ion-grid>
<page-trailer [small]="true"></page-trailer>
@ -23,6 +35,6 @@
</ion-content>
<ion-footer>
<div class="centerDiv">
<ion-button color="customnavy" ion-button (click)=" userCheck()">{{ts.trPK('login','username')}}</ion-button>
</div>
<ion-button color="customnavy" ion-button (click)=" forgotpassword()">{{ts.trPK('login','changepassword')}}</ion-button>
</div>
</ion-footer>

@ -4,24 +4,23 @@ import { AuthenticationService } from 'src/app/hmg-common/services/authenticatio
import { Router } from '@angular/router';
import { AlertController } from '@ionic/angular';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { CheckUserAuthenticationRequest } from 'src/app/hmg-common/services/authentication/models/check-user-auth.request';
import { CheckUserAuthenticationResponse } from 'src/app/hmg-common/services/authentication/models/check-user-auth.response';
import { CheckActivationCodeRequest } from 'src/app/hmg-common/services/authentication/models/check-activation-code.request';
import { SmsReaderService } from 'src/app/hmg-common/services/sms/sms-reader.service';
import { ForgotFileIDResponse } from '../../hmg-common/services/authentication/models/forgot-File-ID.response';
import { InternationalMobileComponent } from 'src/app/hmg-common/ui/mobile-number/international-mobile/international-mobile.component';
import { CountryCode } from 'src/app/hmg-common/ui/mobile-number/international-mobile/models/country-code.model';
import { ForgetPassword } from '../models/forget.password';
import { LoginModel } from '../models/LoginModel';
import { SharedDataService } from 'src/app/hmg-common/services/shared-data-service/shared-data.service';
import {LoginComponent} from "src/app/authentication/login/login.component";
@Component({
selector: 'app-forgot',
templateUrl: './forgot.component.html',
styleUrls: ['./forgot.component.scss']
})
export class ForgotComponent implements OnInit,OnDestroy {
export class ForgotComponent implements OnInit {
public countryCode: CountryCode;
@ViewChild(InternationalMobileComponent) internationlMobile: InternationalMobileComponent;
private loginData = new LoginModel();
public P_NEW_PASSWORD: string;
public P_Confirm_NEW_PASSWORD : string;
public P_USER_NAME : string;
constructor(
public cs: CommonService,
public authService: AuthenticationService,
@ -29,87 +28,53 @@ export class ForgotComponent implements OnInit,OnDestroy {
public alertController: AlertController,
public ts: TranslatorService,
public smsService: SmsReaderService,
public changeDetector: ChangeDetectorRef
public changeDetector: ChangeDetectorRef,
public sharedData: SharedDataService
) {
}
ngOnInit() {
}
ngOnDestroy(): void {
this.smsService.stopSMSMonitoring();
}
public onForgot() {
this.sendSMSForForgotPassword();
}
public countryCodeChanged(countryCode: CountryCode) {
this.countryCode = countryCode;
}
public isValidForm() {
return (this.countryCode && this.countryCode.isValid);
}
private checkUserResult: CheckUserAuthenticationResponse;
private sendSMSForForgotPassword() {
const request = new CheckUserAuthenticationRequest();
request.PatientMobileNumber = this.countryCode.number;
request.ZipCode = CountryCode.localCode(this.countryCode.code);
this.authService.sendSMSForForgotFileNumber(
const request = new ForgetPassword();
this.authService.sendForgetPassword(
request,
() => {
this.sendSMSForForgotPassword();
}, this.ts.trPK('general', 'ok')).subscribe((result: CheckUserAuthenticationResponse) => {
if (this.cs.validResponse(result)) {
this.checkUserResult = result;
if (result.isSMSSent) {
this.startReceivingSMS();
this.presentSMSPasswordDialog();
}
}
});
}
private startReceivingSMS() {
this.smsService.startSMSMonitoring((code) => {
this.cs.dismissSMSDialog().subscribe(cleared => {
this.checkActivationCode(code);
});
});
}
public presentSMSPasswordDialog() {
this.cs.presentSMSPasswordDialog(
(code: string) => {
this.checkActivationCode(code);
});
}
private checkActivationCode(readedCode?) {
const request = new CheckActivationCodeRequest();
request.LogInTokenID = this.checkUserResult.LogInTokenID;
request.PatientOutSA = this.checkUserResult.PatientOutSA ? 1 : 0;
request.PatientMobileNumber = this.countryCode.number;
request.ZipCode = CountryCode.localCode(this.countryCode.code);
request.activationCode = readedCode;
this.authService.forgotFileIdActivation(request,
public forgotpassword(){
const data = this.sharedData.getSharedData(AuthenticationService.LOGIN_DATA, false);
this.loginData.P_USER_NAME = this.P_USER_NAME;
let request:ForgetPassword = new ForgetPassword();
request.P_Confirm_NEW_PASSWORD=this.P_NEW_PASSWORD;
request.P_NEW_PASSWORD=this.P_Confirm_NEW_PASSWORD;
request.P_USER_NAME = data.P_USER_NAME;
this.authService.submitForgetPassword(
request,
() => {
this.presentSMSPasswordDialog();
}, this.ts.trPK('general', 'retry')).subscribe((result: ForgotFileIDResponse) => {
//this.sendSMSForForgotPassword();
}, this.ts.trPK('general', 'ok')).subscribe((result: CheckUserAuthenticationResponse) => {
if (this.cs.validResponse(result)) {
this.smsService.stopSMSMonitoring();
this.cs.presentAlert(result.ReturnMessage);
this.checkUserResult = result;
console.log(result);
this.cs.toastPK("changePassword","successChange");
this.cs.openLogin();
}
});
}
}

@ -16,18 +16,18 @@
<ion-item>
<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)]="memberLogin.P_USER_NAME">
<ion-input required type="text" [(ngModel)]="username">
</ion-input>
</ion-item>
<ion-item>
<img class="item-icon" src="assets/imgs/password.png" item-start />
<ion-label>{{ts.trPK('login','password')}}</ion-label>
<ion-input required type="password" [(ngModel)]="memberLogin.P_PASSWORD">
<ion-input required type="password" [(ngModel)]="password">
</ion-input>
</ion-item>
<div class="centerDiv signupDiv" *ngIf="isAppleStore==true">
<div class="centerDiv signupDiv" *ngIf="isAppleStore==false">
<a (click)="signUp()">{{ts.trPK('login','signup')}}</a>
</div>
<div class="gridDiv">
@ -38,7 +38,7 @@
</ion-content>
<ion-footer>
<div class="centerDiv">
<ion-button color="customnavy" (click)="http_call()">{{ts.trPK('login','login')}}</ion-button>
<ion-button color="customnavy" (click)="onLogin()">{{ts.trPK('login','login')}}</ion-button>
</div>
<br/>
<div class="centerDiv">

@ -1,41 +1,41 @@
import { Component, OnInit, ViewChild, ChangeDetectorRef, NgZone, OnDestroy } from '@angular/core';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service';
import { Router } from '@angular/router';
import { AlertController } from '@ionic/angular';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { Component, OnInit, NgZone, OnDestroy } from "@angular/core";
import { CommonService } from "src/app/hmg-common/services/common/common.service";
import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service";
import { Router } from "@angular/router";
import { AlertController } from "@ionic/angular";
import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service";
import { CheckUserAuthenticationResponse } from "src/app/hmg-common/services/authentication/models/check-user-auth.response";
import { SmsReaderService } from "src/app/hmg-common/services/sms/sms-reader.service";
import { FingerprintAIO } from "@ionic-native/fingerprint-aio/ngx";
import { Device } from "@ionic-native/device/ngx";
import { SplashScreen } from "@ionic-native/splash-screen/ngx";
import { SharedDataService } from "src/app/hmg-common/services/shared-data-service/shared-data.service";
import { LoginModel } from "../models/LoginModel";
import { LoginRequest } from "src/app/hmg-common/services/authentication/models/login.request";
import { Password } from '../models/password';
import { CheckUserAuthenticationRequest } from 'src/app/hmg-common/services/authentication/models/check-user-auth.request';
import { CheckUserAuthenticationResponse } from 'src/app/hmg-common/services/authentication/models/check-user-auth.response';
import { CheckActivationCodeRequest } from 'src/app/hmg-common/services/authentication/models/check-activation-code.request';
import { CheckActivationCodeResponse } from 'src/app/hmg-common/services/authentication/models/check-activation-code.response';
import { SmsReaderService } from 'src/app/hmg-common/services/sms/sms-reader.service';
import { AuthenticatedUser } from 'src/app/hmg-common/services/authentication/models/authenticated-user';
import { PATIENT_TYPE } from 'src/app/hmg-common/services/models/patient.type';
import { FingerprintAIO } from '@ionic-native/fingerprint-aio/ngx';
import { GetLoginInfoRequest } from 'src/app/hmg-common/services/authentication/models/get-login-info.request';
import { GetLoginInfoResponse } from 'src/app/hmg-common/services/authentication/models/get-login-info.response';
import { Device } from '@ionic-native/device/ngx';
import { SplashScreen } from '@ionic-native/splash-screen/ngx';
import { CountryCode } from 'src/app/hmg-common/ui/mobile-number/international-mobile/models/country-code.model';
import { SMSService } from 'src/app/hmg-common/ui/sms/service/smsservice';
@Component({
selector: 'login',
templateUrl: './login.component.html',
styleUrls: ['./login.component.scss']
selector: "login",
templateUrl: "./login.component.html",
styleUrls: ["./login.component.scss"]
})
export class LoginComponent implements OnInit, OnDestroy {
appLang:number=1;
isExpired:boolean =false;
isSupportAr:boolean=false;
isAppleStore:boolean=false;
appLang: number = 1;
isExpired: boolean = false;
isSupportAr: boolean = false;
isAppleStore: boolean = false;
memberLogin: any = {};
private currentLang : any;
private password: string;
private language: string;
private username: string;
private currentLang: any = 1;
private patientOutSA: boolean;
private loginTokenID: string;
private isMobileFingerPrint: boolean;
private FingerPrintPatientIdentificationID: string;
private loginData = new LoginModel();
constructor(
public cs: CommonService,
public authService: AuthenticationService,
@ -46,39 +46,25 @@ export class LoginComponent implements OnInit, OnDestroy {
private faio: FingerprintAIO,
public ngZone: NgZone,
public device: Device,
public splash: SplashScreen
) {
}
public splash: SplashScreen,
public sharedData: SharedDataService
) { }
ngOnInit() {
//this.setIdPattern();
setTimeout(() => {
this.checkIfLoggedInBefore();
// this.splash.hide();
}, 100);
this.currentLang = TranslatorService.getCurrentLanguageCode();
}
ngOnInit() { }
ngOnDestroy(): void {
this.backClicked();
}
public changeLanguage(){
public changeLanguage() {
this.ts.switchLanguage();
if (TranslatorService.CURRENT_LANGUAGE == TranslatorService.EN) {
this.language = "US";
} else {
this.language = "AR";
}
this.currentLang = TranslatorService.getCurrentLanguageCode();
console.log(this.currentLang);
}
private checkIfLoggedInBefore() {
this.cs.startLoading();
// check if user logged in before
this.authService.loadAuthenticatedUser().subscribe((user: AuthenticatedUser) => {
if (user) {
this.startBiometricLogin(user);
} else {
this.hideSplashScreen(true);
}
});
}
private forgetPasswordPage(){
private forgetPasswordPage() {
this.cs.openUserForgot();
}
private hideSplashScreen(stopLoading = false) {
@ -87,293 +73,43 @@ export class LoginComponent implements OnInit, OnDestroy {
this.cs.stopLoading();
}
}
private startBiometricLogin(user: AuthenticatedUser) {
this.faio.isAvailable().then((options) => {
this.hideSplashScreen(true);
if (user.biometricEnabled) {
// ask if login with face or finger
this.cs.presentConfirmDialog(
this.ts.trPK('login', options),
() => this.presentBiometricDialog(user),
() => { }
);
} else {
// ask to enable biometric
this.getPermissionToActivateBiometric(user);
}
}, () => {
this.hideSplashScreen(true);
});
}
private getPermissionToActivateBiometric(user: AuthenticatedUser) {
this.cs.presentConfirmDialog(
this.ts.trPK('login', 'enable-biometric'),
() => {
user['biometricEnabled'] = true;
this.authService.updateLoggedInUser(user).subscribe((success: boolean) => {
this.presentBiometricDialog(user);
});
},
() => { }
);
}
/*
activate biometric login for this user
*/
private getMobileInfo(user: AuthenticatedUser) {
this.authService.getLoginInfo(new GetLoginInfoRequest(user), () => {
}, this.ts.trPK('general', 'ok')).subscribe((result: GetLoginInfoResponse) => {
if (this.cs.validResponse(result)) {
if (!result.SMSLoginRequired) {
this.loginTokenID = result.LogInTokenID;
this.patientOutSA = result.PatientOutSA;
this.initializeForAuthentictedUser(user);
// sms for register the biometric
if (result.isSMSSent) {
this.startListeneingForSMS(this.ts.trPK('general', 'enter-sms-enable-biometric'));
} else {
this.checkActivationCode();
}
}
}
});
}
private initializeForAuthentictedUser(user: AuthenticatedUser) {
this.ngZone.run(() => {
this.isMobileFingerPrint = true;
this.FingerPrintPatientIdentificationID = user.IdentificationNo;
this.mobileNumber = user.MobileNumber;
this.zipCode = CountryCode.localCode(user.ZipCode);
});
}
private presentBiometricDialog(user) {
this.faio.show({
clientId: 'Fingerprint Authetnciation',
clientSecret: 'Ate343_9347lajF', // Only necessary for Android
disableBackup: true, // Only for Android(optional)
localizedFallbackTitle: this.ts.trPK('login', 'use-pin'), // Only for iOS
localizedReason: this.ts.trPK('login', 'auth-please') // Only for iOS
}).then((result: any) => {
// this.checkActivationCode();
this.getMobileInfo(user);
}).catch((error: any) => console.log(error));
}
/**
we need holders here since the country code maybe is not loaded yet for automatic login
*/
private mobileNumber: string;
private zipCode: string;
public onLogin() {
this.checkUserAuthentication();
}
public loginWithMyAccount() {
// this.loginWithTamer();
this.loginWithTamer();
}
/*
TODO to be removed later
*/
public loginWithEnas() {
alert('you are doing slient login width enas account ');
const user = new AuthenticatedUser();
user.PatientID = 862616;
user.PatientTypeID = PATIENT_TYPE.PERMANENT;
user.PatientOutSA = false;
user.TokenID = '@dm!n';
user.ProjectID = 0;
user.NationalityID = '2300948375';
user.MobileNo = user.MobileNumber = '554355126';
user.ZipCode = '+966';
user.Address = 'riyadh';
user.FirstName = 'MOHAMED';
user.MiddleName = 'yaghi';
user.LastName = 'mohammed';
user.Age = 30;
user.agreed = true;
const birthDate = new Date();
birthDate.setFullYear(birthDate.getFullYear() - 29);
user.DateofBirth = this.cs.convertISODateToJsonDate(this.cs.getDateISO(birthDate));
user.Email = 'Mohamed.Afifi@cloudsolution-sa.com';
user.PatientName = 'enas yaghi';
this.authService.updateLoggedInUser(user).subscribe(done => {
this.authService.startIdleMonitoring();
this.cs.openHome();
});
}
public loginWithVaccineUser() {
alert('you are doing slient login width vaccine account ');
const user = new AuthenticatedUser();
user.PatientID = 862616; // user with vaccines in dev
user.PatientTypeID = PATIENT_TYPE.PERMANENT;
user.PatientOutSA = false;
user.TokenID = '@dm!n';
user.NationalityID = '2300948375';
user.MobileNo = user.MobileNumber = '554355126';
user.ProjectID = 0;
user.ZipCode = '+966';
user.Address = 'riyadh';
user.FirstName = 'MOHAMED';
user.MiddleName = 'yaghi';
user.LastName = 'mohammed';
user.Age = 30;
user.agreed = true;
const birthDate = new Date();
birthDate.setFullYear(birthDate.getFullYear() - 29);
user.DateofBirth = this.cs.convertISODateToJsonDate(this.cs.getDateISO(birthDate));
user.Email = 'minna.barry@cloudsolution-sa.com';
user.PatientName = 'enas yaghi';
this.authService.updateLoggedInUser(user).subscribe(done => {
this.authService.startIdleMonitoring();
this.cs.openHome();
});
}
public loginWithEyeMeasureUser() {
alert('you are doing slient login width eye measurements user account ');
const user = new AuthenticatedUser();
user.PatientID = 873010;
user.PatientTypeID = PATIENT_TYPE.PERMANENT;
user.PatientOutSA = false;
user.TokenID = '@dm!n';
user.NationalityID = '2302581828';
user.ProjectID = 0;
user.MobileNo = user.MobileNumber = '555333541';
user.ZipCode = '+966';
user.Address = 'riyadh';
user.FirstName = 'eye';
user.MiddleName = 'user';
user.LastName = 'measurment';
user.Age = 30;
user.agreed = true;
const birthDate = new Date();
birthDate.setFullYear(birthDate.getFullYear() - 29);
user.DateofBirth = this.cs.convertISODateToJsonDate(this.cs.getDateISO(birthDate));
user.Email = 'sultan.khan@hmg.local';
user.PatientName = 'eye user';
this.authService.updateLoggedInUser(user).subscribe(done => {
this.authService.startIdleMonitoring();
this.cs.openHome();
});
}
/*
TODO login with mr rwaid
*/
public loginWithRwaid() {
alert('you are doing slient login width mr: rwaid account');
const user = new AuthenticatedUser();
// tamer with eye measurments 1231755
user.PatientID = 1018977;
user.PatientTypeID = PATIENT_TYPE.PERMANENT;
user.ProjectID = 0;
user.PatientOutSA = false;
user.TokenID = '@dm!n';
user.NationalityID = '1001242559';
user.MobileNo = user.MobileNumber = '545156035';
user.ZipCode = '+966';
user.Address = 'riyadh';
user.FirstName = 'rwaid';
user.MiddleName = 'el mallah';
user.LastName = 'mohammed';
user.Age = 30;
user.agreed = true;
const birthDate = new Date();
birthDate.setFullYear(birthDate.getFullYear() - 29);
user.DateofBirth = this.cs.convertISODateToJsonDate(this.cs.getDateISO(birthDate));
user.Email = 'mohamed.afifi@cloudsolution-sa.com';
user.PatientName = 'rwaid al mallah';
this.authService.updateLoggedInUser(user).subscribe(done => {
this.authService.startIdleMonitoring();
this.cs.openHome();
});
}
public loginWithTamer() {
alert('you are doing slient login width tamer account');
const user = new AuthenticatedUser();
user.PatientID = 1231755;
user.PatientTypeID = PATIENT_TYPE.PERMANENT;
user.ProjectID = 0;
user.PatientOutSA = false;
user.TokenID = '@dm!n';
user.NationalityID = '1001242559';
user.MobileNo = user.MobileNumber = '537503378';
user.ZipCode = '+966';
user.Address = 'riyadh';
user.FirstName = 'tamer';
user.MiddleName = 'faneshah';
user.LastName = 'faneshah';
user.Age = 30;
user.agreed = true;
const birthDate = new Date();
birthDate.setFullYear(birthDate.getFullYear() - 29);
user.DateofBirth = this.cs.convertISODateToJsonDate(this.cs.getDateISO(birthDate));
user.Email = 'mohamed.afifi@cloudsolution-sa.com';
user.PatientName = 'tamer fneshah';
this.authService.updateLoggedInUser(user).subscribe(done => {
this.authService.startIdleMonitoring();
this.cs.openHome();
});
}
private startListeneingForSMS(title?: string) {
this.startReceivingSMS();
//this.presentSMSPasswordDialog(title);
}
private checkUserAuthentication() {
const request = new CheckUserAuthenticationRequest();
request.PatientMobileNumber = this.mobileNumber;
request.ZipCode = this.zipCode;
request.isRegister = false;
request.TokenID = '';
this.authService.checkUserAuthentication(
request,
() => {
}, this.ts.trPK('general', 'ok')).subscribe((result: CheckUserAuthenticationResponse) => {
this.cs.startLoading();
const request = new LoginRequest();
request.P_USER_NAME = this.username;
request.P_LANGUAGE = 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)) {
this.loginTokenID = result.LogInTokenID;
this.patientOutSA = result.PatientOutSA;
this.isMobileFingerPrint = false;
this.FingerPrintPatientIdentificationID = '';
if (result.isSMSSent) {
this.startListeneingForSMS();
} else {
this.smsService.stopSMSMonitoring();
this.checkActivationCode();
}
this.loginData.LogInTokenID = result.LogInTokenID;
this.loginData.MobileNumber = result.MemberLoginList.P_MOBILE_NUMBER;
this.loginData.P_USER_NAME=this.username;
this.sharedData.setSharedData(this.loginData, AuthenticationService.LOGIN_DATA);
this.cs.openSMSPage();
}
// console.log("result.IsPasswordExpired");
// console.log(result.IsPasswordExpired);
// if(result.IsPasswordExpired)
// {
// this.presentPasswordExpiredDialog();
// }
});
}
@ -381,103 +117,73 @@ export class LoginComponent implements OnInit, OnDestroy {
this.smsService.stopSMSMonitoring();
}
private startReceivingSMS() {
// this.smsModal.presentModal();
// this.smsService.startSMSMonitoring((code) => {
// this.smsModal.dismiss;
// this.global_code = code;
// SMSService.code = this.global_code;
// this.checkActivationCode(code);
// this.cs.dismissSMSDialog().subscribe(cleared => {
// this.checkActivationCode(code);
// });
// });
}
public presentSMSPasswordDialog(title?: string) {
this.cs.presentSMSPasswordDialog(
(code: string) => {
this.checkActivationCode(code);
}, null, title);
}
private checkActivationCode(readedCode?) {
const request = new CheckActivationCodeRequest();
request.IsMobileFingerPrint = this.isMobileFingerPrint;
request.FingerPrintPatientIdentificationID = this.FingerPrintPatientIdentificationID;
request.LogInTokenID = this.loginTokenID;
request.PatientOutSA = this.patientOutSA ? 1 : 0;
request.activationCode = readedCode || '0000';
request.IsSilentLogin = !readedCode;
request.PatientMobileNumber = this.mobileNumber;
request.ZipCode = this.zipCode;
// request.SearchType = this.loginType;
// if (this.loginType === LoginComponent.IDENTIFCIATION_LOGIN_TYPE) {
// request.PatientIdentificationID = this.id;
// request.PatientID = 0;
// } else {
// request.PatientID = Number(this.id);
// request.PatientIdentificationID = '';
// }
request.isRegister = false;
// this.authService.checkActivationCode(
// request,
// () => {
// //this.presentSMSPasswordDialog();
// this.smsModal.presentModal();
// }, this.ts.trPK('general', 'retry')).subscribe((result: CheckActivationCodeResponse) => {
// if (this.cs.validResponse(result)) {
// if (this.cs.hasData(result.List)) {
// this.smsService.stopSMSMonitoring();
// this.checkIfUserAgreedBefore(result);
// }
// }
// });
}
private checkIfUserAgreedBefore(result: CheckActivationCodeResponse) {
this.authService.setAuthenticatedUser(result).subscribe(() => {
if (this.authService.isAgreedBefore()) {
this.cs.openHome();
} else {
// this.cs.openAgreement();
}
});
}
private checkUserAgreement() {
}
public signOut() {
// this.cs.presentConfirmDialog(this.ts.trPK('login', 'sign-out'),
// () => {
// this.authService.clearUser().subscribe(success => {
// this.id = null;
// if (this.countryCode) {
// this.internationlMobile.setMobileNumber(this.countryCode.code, null);
// }
// });
// });
async presentPasswordExpiredDialog()
{
const alert = await this.alertController.create({
header: this.ts.trPK("general","confirm"),
message: this.ts.trPK("login","password-expired"),
buttons: [
{
text: this.ts.trPK("general","ok"),
handler: () => {
console.log('Confirm Okay');
this.sharedData.setSharedData(true,Password.IS_EXPIRED_PSW);
this.userCheck();
}
}
]
});
await alert.present();
}
public openForgotID() {
this.cs.openUserForgot();
}
public onDismiss()
{
// this.global_code = SMSService.code;
//this.checkActivationCode(this.global_code);
}
public onCancelled()
{
console.log("Modal pop up cancelled");
public userCheck()
{
this.cs.startLoading();
const request = new CheckUserAuthenticationRequest();
request.P_USER_NAME = this.username;
this.authService.checkUserAuthentication(
request,
() => {
/* Write code for error */
}, this.ts.trPK('general', 'ok')).subscribe((result: CheckUserAuthenticationResponse) => {
if (this.cs.validResponse(result)) {
this.checkUserResult = result;
this.cs.stopLoading();
this.sendSMSForForgotPassword();
}
});
}
private checkUserResult: CheckUserAuthenticationResponse;
private sendSMSForForgotPassword() {
this.cs.startLoading();
let changePwdObj= new LoginRequest();
changePwdObj.MobileNumber= this.checkUserResult.BasicMemberInformation.P_MOBILE_NUMBER;
changePwdObj.P_USER_NAME=this.username;
changePwdObj.P_MOBILE_NUMBER=this.checkUserResult.BasicMemberInformation.P_MOBILE_NUMBER;
this.authService.sendPublicSMS(
changePwdObj,
() => {
//this.sendSMSForForgotPassword();
/* Write code for error */
}, this.ts.trPK('general', 'ok')).subscribe((result: CheckUserAuthenticationResponse) => {
if (this.cs.validResponse(result)) {
this.checkUserResult = result;
console.log("2");
console.log(result);
this.loginData.LogInTokenID = result.LogInTokenID;
this.loginData.P_USER_NAME = this.username;
this.sharedData.setSharedData(this.loginData, AuthenticationService.LOGIN_DATA);
this.sharedData.setSharedData(true,Password.IS_FORGET_PSW);
this.cs.stopLoading();
this.cs.openSMSPage();
}});
}
}

@ -0,0 +1,6 @@
export class LoginModel {
LogInTokenID: string;
activationCode: string;
P_USER_NAME: string;
MobileNumber: string;
}

@ -0,0 +1,7 @@
import { Request } from 'src/app/hmg-common/services/models/request';
export class ForgetPassword extends Request {
public static IS_FORGET_PSW:string="is_forget_password";
public P_NEW_PASSWORD: string;
public P_Confirm_NEW_PASSWORD:string;
public P_USER_NAME : string;
}

@ -0,0 +1,11 @@
import { Request } from 'src/app/hmg-common/services/models/request';
export class Password extends Request {
public static IS_FORGET_PSW:string="is_forget_password";
public static IS_EXPIRED_PSW:string="is_expired_password";
public IS_FORGET_PWD:boolean;
public P_NEW_PASSWORD: string;
public P_OLD_PASSWORD:string;
public P_Confirm_NEW_PASSWORD:string;
}

@ -0,0 +1,39 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<ion-buttons slot="start">
<ion-back-button color="light" class="btnBack" ></ion-back-button>
</ion-buttons>
<ion-title color="light" > {{'verificationcode,verificationcode' | translate}}</ion-title>
</ion-toolbar>
</ion-header>
<ion-content padding>
<ion-grid>
<ion-row>
<ion-col class="colPad">
<ion-img class="centerDiv" src="../assets/imgs/CS.png"></ion-img>
</ion-col>
</ion-row>
<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>
</ion-col>
</ion-row>
</ion-grid>
<br/><br/>
<!-- <p style="color: #c0c0c0; margin-left: 32%">{{'verificationcode.verificationcode' | translate}}</p> -->
<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-input required type="tel" [(ngModel)]="activationCode"></ion-input>
</ion-item>
</div>
</ion-content>
<ion-footer>
<div class="centerDiv">
<ion-button color="customnavy" ion-button (click)="checkVerificationCode()">{{'general,submit' | translate}}</ion-button>
</div>
</ion-footer>

@ -0,0 +1,21 @@
.header-toolbar{
--background: linear-gradient(45deg, #3ac1f1 0%, #19a163 36%, #19a163 59%, #1a586d 100%);
}
.btnBack{
background: transparent;
}
ion-img{
width: 180px;
height: 180px;
background:transparent;
}
h1{
font-size: 28px !important;
}
span{
font-weight: bold;
}

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

@ -0,0 +1,177 @@
import { Component, OnInit } from "@angular/core";
import { ElementRef } from "@angular/core";
import { NavController } from "@ionic/angular";
import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service";
import { CommonService } from "src/app/hmg-common/services/common/common.service";
import { SharedDataService } from "src/app/hmg-common/services/shared-data-service/shared-data.service";
import { SMSCheckRequest } from "src/app/hmg-common/services/authentication/models/smscheck.request";
import { LoginModel } from "../models/LoginModel";
import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service";
import { SMSCheckResponse } from "src/app/hmg-common/services/authentication/models/smscheck.response";
import { Password } from "../models/password";
@Component({
selector: "app-sms-page",
templateUrl: "./sms-page.page.html",
styleUrls: ["./sms-page.page.scss"]
})
export class SmsPageComponent implements OnInit {
public static LOGIN_DATA = "LOGIN_DATA";
Channel: number = 0;
activationCode: string;
P_SESSION_ID: number;
P_USER_NAME: string;
timeInSeconds: any;
time: any;
runTimer: any;
hasStarted: any;
hasFinished: any;
remainingTime: any;
displayTime: any;
loginTokenID: string;
public isForgetPwd: boolean = false;
public isExpiredPwd: boolean = false;
public count: number = 0;
private loginData = new LoginModel();
constructor(
public navCtrl: NavController,
public translate: TranslatorService,
public common: CommonService,
private elementRef: ElementRef,
public authService: AuthenticationService,
public sharedData: SharedDataService
) {}
ngOnInit() {
this.count = 0;
this.initTimer();
this.startTimer();
this.isForgetPwd =
this.sharedData.getSharedData(Password.IS_FORGET_PSW) || false;
this.isExpiredPwd =
this.sharedData.getSharedData(Password.IS_EXPIRED_PSW) || false;
}
initTimer() {
// Pomodoro is usually for 25 minutes
if (!this.timeInSeconds) {
this.timeInSeconds = 600;
}
this.time = this.timeInSeconds;
this.runTimer = false;
this.hasStarted = false;
this.hasFinished = false;
this.remainingTime = this.timeInSeconds;
this.displayTime = this.common.getSecondsAsDigitalClock(this.remainingTime);
}
startTimer() {
this.runTimer = true;
this.hasStarted = true;
this.timerTick();
}
pauseTimer() {
this.runTimer = false;
}
resumeTimer() {
this.startTimer();
}
timerTick() {
setTimeout(() => {
if (!this.runTimer) {
return;
}
this.remainingTime--;
this.displayTime = this.common.getSecondsAsDigitalClock(
this.remainingTime
);
if (this.remainingTime > 0) {
this.timerTick();
} else {
this.hasFinished = true;
this.pauseTimer();
this.navCtrl.pop();
}
}, 1000);
}
ionViewWillLeave() {
this.pauseTimer();
}
checkVerificationCode() {
if (this.count < 3) {
if (
this.activationCode == undefined ||
this.activationCode == null ||
this.activationCode == ""
) {
// this.common.showAlert(this.translate.translate('verificationcode.emptyCode'));
} else {
this.count = this.count + 1;
if (this.isForgetPwd || this.isExpiredPwd) {
this.checkForgetPwdSMS();
} else {
this.checkSMS();
}
}
} else {
let msg: string = this.translate.trPK("general", "noOfTriesLogin");
this.common.JustAlertDialog(this.translate.trPK("general", "ok"), msg);
}
}
public checkSMS() {
const data = this.sharedData.getSharedData(AuthenticationService.LOGIN_DATA, false);
const request = new SMSCheckRequest();
request.LogInTokenID = data.LogInTokenID;
request.activationCode = this.activationCode;
request.P_USER_NAME = data.P_USER_NAME;
request.MobileNumber = data.MobileNumber;
this.authService
.checkSMS(request, () => {}, this.translate.trPK("general", "ok"))
.subscribe((result: SMSCheckResponse) => {
console.log(result);
if (this.common.validResponse(result)) {
this.authService.setAuthenticatedUser(result).subscribe(() => {
this.common.openHome();
});
}
});
}
public checkForgetPwdSMS() {
const data = this.sharedData.getSharedData(AuthenticationService.LOGIN_DATA, false);
const request = new SMSCheckRequest();
request.LogInTokenID = data.LogInTokenID;
request.activationCode = this.activationCode;
request.P_USER_NAME = data.P_USER_NAME;
console.log(data.LogInTokenID);
console.log(data.P_USER_NAME);
this.authService
.checkForgetSMS(request, () => {}, this.translate.trPK("general", "ok"))
.subscribe((result: SMSCheckResponse) => {
console.log(result);
if (this.common.validResponse(result)) {
console.log(result);
if (this.isForgetPwd) {
this.common.openForgotPassword();
}
if(this.isExpiredPwd) {
this.sharedData.setSharedData(true,Password.IS_EXPIRED_PSW);
this.common.openChangePassword();
}
}
});
}
}

@ -46,7 +46,7 @@ import { UserLocalNotificationService } from './services/user-local-notification
import { LocalNotifications } from '@ionic-native/local-notifications/ngx';
import { EmailComponent } from './ui/email/email.component';
import { Badge } from '@ionic-native/badge/ngx';
import { Push } from '@ionic-native/push/ngx';
// import { Push } from '@ionic-native/push/ngx';
import { PushService } from './services/push/push.service';
import { LifeCycleService } from './services/life-cycle/life-cycle.service';
import { HmgBrowserService } from './services/hmg-browser/hmg-browser.service';
@ -69,7 +69,6 @@ import { Keyboard } from '@ionic-native/keyboard/ngx';
import { KeyboardService } from './services/keyboard/keyboard.service';
import { DevicePermissionsService } from './services/device-permissions/device-permissions.service';
import { SegmentsComponent } from './ui/segments/segments.component';
import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';
import { AccordionComponent } from './ui/accordion/accordion.component';
import { AccordionTabComponent } from './ui/accordion/accordion-tab/accordion-tab.component';
import { TwoOptionSelectComponent } from './ui/two-option-select/two-option-select.component';
@ -90,6 +89,7 @@ import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
import { RateService } from './services/rate/rate.service';
import { PaymentComponent } from './ui/payment/payment.component';
import { PaymentService } from './ui/payment/service/payment.service';
import { MenuService } from './services/menu/menuservice.service';
@NgModule({
imports: [
CommonModule,
@ -217,7 +217,6 @@ import { PaymentService } from './ui/payment/service/payment.service';
UserLocalNotificationService,
LocalNotifications,
Badge,
Push,
LifeCycleService,
HmgBrowserService,
GuidService,
@ -227,7 +226,6 @@ import { PaymentService } from './ui/payment/service/payment.service';
KeyboardService,
Diagnostic,
DevicePermissionsService,
BarcodeScanner,
LazyLoadingService,
HMGPreloadingStrategy,
HMGPreloadingStrategyLoading,
@ -237,8 +235,8 @@ import { PaymentService } from './ui/payment/service/payment.service';
RatingService,
InAppBrowser,
RateService,
PaymentService
PaymentService,
MenuService
]
})
export class HmgCommonModule { }

@ -2,16 +2,79 @@ import { PatientUserModel } from './PatientUserModel';
import { TestBed } from '@angular/core/testing';
export class AuthenticatedUser extends PatientUserModel {
PatientName: string;
TokenID: string;
MobileNo: string;
Email: string;
PatientOutSA: boolean;
PatientTypeID: number;
agreed: boolean;
IdentificationNo: string;
deviceToken: string;
biometricEnabled: boolean;
ProjectID: number;
familyMember: boolean;
TokenID:string;
ACTUAL_TERMINATION_DATE: string;
ASSIGNMENT_END_DATE: string;
ASSIGNMENT_ID: number;
ASSIGNMENT_NUMBER: string;
ASSIGNMENT_START_DATE: string;
ASSIGNMENT_STATUS_TYPE_ID: number;
ASSIGNMENT_TYPE: string;
BUSINESS_GROUP_ID: number;
BUSINESS_GROUP_NAME: string;
CURRENT_EMPLOYEE_FLAG: string;
EMPLOYEE_DISPLAY_NAME: string;
EMPLOYEE_EMAIL_ADDRESS:string;
EMPLOYEE_IMAGE:string;
EMPLOYEE_MOBILE_NUMBER: string;
EMPLOYEE_NAME:string;
EMPLOYEE_NUMBER: string;
EMPLOYEE_WORK_NUMBER:string;
EMPLOYMENT_CATEGORY: string;
EMPLOYMENT_CATEGORY_MEANING: string;
FREQUENCY: string;
FREQUENCY_MEANING: string;
FROM_ROW_NUM: number;
GRADE_ID: number;
GRADE_NAME: string;
HIRE_DATE: string;
JOB_ID: number;
JOB_NAME: string;
LEDGER_ID: number;
LOCATION_ID: number;
LOCATION_NAME: string;
MANUAL_TIMECARD_FLAG: string;
MANUAL_TIMECARD_MEANING: string;
NATIONALITY_CODE: string;
NATIONALITY_MEANING: string;
NATIONAL_IDENTIFIER:string;
NORMAL_HOURS: string;
NO_OF_ROWS: number;
ORGANIZATION_ID: number;
ORGANIZATION_NAME: string;
PAYROLL_CODE: string;
PAYROLL_ID: number;
PAYROLL_NAME: string;
PERSON_ID: number;
PERSON_TYPE:string;
PERSON_TYPE_ID: number;
PER_INFORMATION_CATEGORY: string;
POSITION_ID: number;
POSITION_NAME: string;
PRIMARY_FLAG: string;
ROW_NUM:number;
SUPERVISOR_ASSIGNMENT_ID: string;
SUPERVISOR_DISPLAY_NAME: string;
SUPERVISOR_EMAIL_ADDRESS: string;
SUPERVISOR_ID: number;
SUPERVISOR_MOBILE_NUMBER: string;
SUPERVISOR_NAME: string;
SUPERVISOR_NUMBER: string;
SUPERVISOR_WORK_NUMBER: string;
SWIPES_EXEMPTED_FLAG: string;
SWIPES_EXEMPTED_MEANING: string;
SYSTEM_PERSON_TYPE: string;
TK_EMAIL_ADDRESS: string;
TK_EMPLOYEE_DISPLAY_NAME: string;
TK_EMPLOYEE_NAME: string;
TK_EMPLOYEE_NUMBER: string;
TK_PERSON_ID: number;
TO_ROW_NUM: number;
UNIT_NUMBER: string;
USER_STATUS: string;
P_SESSION_ID:number;
MobileNumber:string;
LogInTokenID:string;
CompanyImageDescription: string
CompanyImageURL: string
}

@ -0,0 +1,7 @@
export class BasicInfo extends Request{
public P_EMAIL_ADDRESS:string;
public P_MOBILE_NUMBER: string;
public P_RETURN_MSG: string;
public P_RETURN_STATUS: string;
}

@ -3,8 +3,15 @@ import { PatientUserModel } from './PatientUserModel';
import { AuthenticatedUser } from './authenticated-user';
export class CheckActivationCodeResponse extends Response {
List: AuthenticatedUser[];
AuthenticationTokenID: string;
PatientOutSA: boolean;
PatientType: number;
P_SESSION_ID:number;
MobileNumber:string;
LogInTokenID:string;
EMPLOYEE_MOBILE_NUMBER:string;
TokenID:string;
CompanyImageDescription:string;
CompanyImageURL: string;
MemberInformationList:AuthenticatedUser[];
}

@ -1,10 +1,14 @@
import { Request } from '../../models/request';
export class CheckUserAuthenticationRequest extends Request {
PatientIdentificationID: string; // id
PatientMobileNumber: string; // phone number
ZipCode: string;
SearchType: number; // 1 for id , 2 for file no
isRegister: boolean; // false
LogInTokenID?: string;
// PatientIdentificationID: string; // id
// PatientMobileNumber: string; // phone number
// ZipCode: string;
// SearchType: number; // 1 for id , 2 for file no
// isRegister: boolean; // false
// LogInTokenID?: string;
P_USER_NAME:string;
P_LANGUAGE: string;
P_PASSWORD: string;
}

@ -1,4 +1,6 @@
import { Response } from '../../models/response';
import { BasicInfo } from './basic.info';
import { MemberList } from './member.list';
export class CheckUserAuthenticationResponse extends Response {
PatientHasFile: boolean;
@ -10,4 +12,12 @@ export class CheckUserAuthenticationResponse extends Response {
hasFile: boolean;
isSMSSent: boolean;
LogInTokenID: string;
P_EMAIL_ADDRESS : string;
P_MOBILE_NUMBER : string;
P_RETURN_MSG : string;
P_RETURN_STATUS : string;
public IsPasswordExpired: boolean;
//public P_SESSION_ID:string;
public MemberLoginList: MemberList ;
public BasicMemberInformation: BasicInfo;
}

@ -16,11 +16,11 @@ export class GetLoginInfoRequest extends Request {
isRegister: boolean; // false
constructor(user: AuthenticatedUser) {
super();
this.NationalID = user.IdentificationNo;
this.MobileNo = this.PatientMobileNumber = user.MobileNo;
this.DeviceToken = user.deviceToken;
this.PatientID = user.PatientID;
this.ProjectOutSA = user.PatientOutSA ;
// this.NationalID = user.IdentificationNo;
// this.MobileNo = this.PatientMobileNumber = user.MobileNo;
// this.DeviceToken = user.deviceToken;
// this.PatientID = user.PatientID;
// this.ProjectOutSA = user.PatientOutSA ;
this.LoginType = 2;
this.ZipCode = CountryCode.localCode( user.ZipCode);
this.SearchType = 2;

@ -7,6 +7,11 @@ export class LoginRequest extends Request {
SearchType: number; // 1 for iqama 2 for file number
TokenID: string; // ""
ZipCode: string; // "966"
MobileNumber: string;
P_USER_NAME : string;
P_MOBILE_NUMBER : string;
P_PASSWORD : string;
P_LANGUAGE : string;
// isDentalAllowedBackend: false
isRegister: boolean; // false
}

@ -0,0 +1,9 @@
export class MemberList {
public P_EMAIL_ADDRESS:string;
public P_INVALID_LOGIN_MSG: string;
public P_MOBILE_NUMBER: string;
public P_PASSOWRD_EXPIRED: string;
public P_RETURN_MSG: string;
public P_RETURN_STATUS: string;
public P_SESSION_ID: number;
}

@ -0,0 +1,6 @@
import { Request } from '../../models/request';
export class SMSCheckRequest extends Request {
LogInTokenID: string ;
activationCode?: string;
}

@ -0,0 +1,17 @@
import { Response } from '../../models/response';
import { AuthenticatedUser } from './authenticated-user';
export class SMSCheckResponse extends Response {
AuthenticationTokenID: string;
MemberInformationList:AuthenticatedUser[];
public TokenID: string;
public SessionID: string;
public MobileType: string;
public BookedBy?: number;
public P_SESSION_ID: number;
public MobileNumber : string;
public LogInTokenID : string;
public CompanyImageDescription:string;
public CompanyImageURL:string;
public EMPLOYEE_MOBILE_NUMBER:string;
}

@ -120,6 +120,21 @@ export class CommonService {
}
}
getSecondsAsDigitalClock(inputSeconds: number) {
var sec_num = parseInt(inputSeconds.toString(), 10); // don't forget the second param
var hours = Math.floor(sec_num / 3600);
var minutes = Math.floor((sec_num - (hours * 3600)) / 60);
var seconds = sec_num - (hours * 3600) - (minutes * 60);
var hoursString = '';
var minutesString = '';
var secondsString = '';
hoursString = (hours < 10) ? "0" + hours : hours.toString();
minutesString = (minutes < 10) ? "0" + minutes : minutes.toString();
secondsString = (seconds < 10) ? "0" + seconds : seconds.toString();
return minutesString + ':' + secondsString;
}
public toastPK(page: string, key: string) {
this.toast(this.ts.trPK(page, key));
}
@ -233,7 +248,7 @@ export class CommonService {
public userNeedToReLogin() {
this.presentConfirmDialog(this.ts.trPK("general", "relogin"), () => {
//this.openUserLogin();
this.openLogin();
});
}
@ -255,6 +270,26 @@ export class CommonService {
);
}
async JustAlertDialog(acceptLabel: string,
message: string)
{
this.clearAllAlerts();
const alert = await this.alertControllerIonic.create({
header: this.ts.trPK("general", "info"),
message: message,
buttons: [
{
text: acceptLabel,
handler: () => {
this.alertControllerIonic.dismiss();
}
}
]
});
// this.alerts.push(alert);
await alert.present();
}
async confirmAlertDialog(
onAccept: any,
acceptLabel: string,
@ -851,12 +886,21 @@ export class CommonService {
open calls
*/
public static HOME_URL = ["/home", "/home-page"];
public openHome() {
this.alternateNavigate(CommonService.HOME_URL, "home-open", true);
this.nav.navigateRoot(["/home"]);
}
public openForgotPassword() {
this.nav.navigateForward(["/authentication/forgot"]);
}
public openChangePassword() {
this.nav.navigateForward(["/authentication/changepassowrd"]);
}
public openProfile() {
this.nav.navigateForward(["/profile/home"]);
}
public openAccuralPage() {
this.nav.navigateForward(["/accrual-balances/home"]);
}
public reload(url: string, from: string) {
console.log("force reload called from:" + from);
// window.location.reload();
@ -895,9 +939,15 @@ export class CommonService {
}
}
public openLogin() {
this.nav.navigateRoot(["/authentication/login"]);
}
public openUserForgot() {
this.nav.navigateForward(["/authentication/forgot"]);
this.nav.navigateForward(["/authentication/checkuser"]);
}
public openSMSPage() {
this.nav.navigateForward(["/authentication/smspage"]);
}

@ -120,8 +120,9 @@ export class ConnectorService {
this.cs.stopLoading();
if (!this.cs.validResponse(result)) {
// not authorized
console.log(result.MessageStatus);
if (result.ErrorType === 2) {
// this.cs.userNeedToReLogin();
//console.log("error expired");
} else {
this.cs.showErrorMessageDialog(onError, errorLabel, result.ErrorEndUserMessage);
}

@ -54,8 +54,8 @@ export class GeofencingService {
const req = new InsertLocationRequest();
req.PointsID = id;
req.GeoType = type;
req.PatientID = userData.PatientID;
req.PatientOutSA = userData.PatientOutSA;
//req.PatientID = userData.PatientID;
//req.PatientOutSA = userData.PatientOutSA;
this.auth.setPublicFields(req);
this.con.postNoLoad(GeofencingService.loggingUrl, req, () => {
zone.pendingRequest = type; // failed to log, setup pending request
@ -395,9 +395,9 @@ export class GeofencingService {
const user = this.authService.getAuthenticatedUser();
this.turnTrackingOff();
this.cs.presentConfirmDialog(this.ts.trPK('settings', 'enable-geo'), () => {
this.turnTrackingOn(user.PatientID, +user.PatientOutSA);
// this.turnTrackingOn(user.PatientID, +user.PatientOutSA);
}, () => {
this.turnTrackingOn(user.PatientID, +user.PatientOutSA);
// this.turnTrackingOn(user.PatientID, +user.PatientOutSA);
this.turnTrackingOff();
});
}

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

@ -0,0 +1,50 @@
import {Injectable} from '@angular/core';
import {Http, Response, Headers, } from "@angular/http";
import {AuthenticationService} from "../authentication/authentication.service";
import { Observable } from 'rxjs';
import {MenuEntries} from './models/menu-entries.request';
import {Request} from '../models/request';
import {MenuResponse} from './models/menu-response'
import { ConnectorService } from '../connector/connector.service';
@Injectable()
export class MenuService {
public static getMenu ='Services/ERP.svc/REST/GET_MENU';
public static getMenuEntries = 'Services/ERP.svc/REST/GET_MENU_ENTRIES';
public static getMyTeam = 'Services/ERP.svc/REST/GET_EMPLOYEE_SUBORDINATES';
public static getNotCount='Services/ERP.svc/REST/GET_OPEN_NOTIFICATIONS_NUM';
public static disableSession="Services/ERP.svc/REST/DisableSession";
public static detectLanguage='Services/ERP.svc/REST/Get_LanguageAvailable';
constructor(
public authService: AuthenticationService,
public con:ConnectorService
) { }
public getMenu(onError?: any, errorLabel?: string): Observable<MenuResponse> {
const request = new Request();
this.authService.authenticateRequest(request);
return this.con.post(MenuService.getMenu, request, onError, errorLabel);
}
public getMenuEntires(menuEntries:any, onError?: any, errorLabel?: string): Observable<MenuResponse> {
const request = menuEntries;
this.authService.authenticateRequest(request);
return this.con.post(MenuService.getMenuEntries, request, onError, errorLabel);
}
public getNotificationCount(req:any, onError?: any, errorLabel?: string): Observable<any> {
const request = req;
this.authService.authenticateRequest(request);
return this.con.post(MenuService.getNotCount, request, onError, errorLabel);
}
public disableSession(req:any, onError?: any, errorLabel?: string): Observable<any> {
const request = req;
this.authService.authenticateRequest(request);
return this.con.post(MenuService.disableSession, request, onError, errorLabel);
}
public getAppLanguages(req:any, onError?: any, errorLabel?: string): Observable<any> {
const request = req;
this.authService.authenticateRequest(request);
return this.con.post(MenuService.detectLanguage, request, onError, errorLabel);
}
}

@ -0,0 +1,7 @@
export class ListMenu {
public MENU_ID:number;
public MENU_NAME:string;
public MENU_TYPE:string;
public RESP_ID:number;
public SUB_MENU_NAME:string;
}

@ -0,0 +1,6 @@
import { Request } from '../models/request';
export class MenuEntries extends Request {
public P_MENU_TYPE:string;
public P_SELECTED_EMPLOYEE_NUMBER:string;
public P_SELECTED_RESP_ID:number
}

@ -0,0 +1,9 @@
import { ListMenu } from './list.menu';
import { MenuEntry } from './menu.entry';
export class MenuResponse {
public static SHARED_DATA = 'menu_response';
public static SHARED_SEL_EMP= 'sel_empolyee';
public static SHARED_SEL_RESP_ID= 'sel_resp_id';
public List_Menu:ListMenu;
public GetMenuEntriesList:MenuEntry;
}

@ -0,0 +1,13 @@
export class MenuEntry {
public MENU_NAME:string;
public ADD_BUTTON:string;
public DELETE_BUTTON:string;
public UPDATE_BUTTON:string;
public ENTRY_SEQUENCE:number;
public FUNCTION_NAME:string;
public LVL:number;
public MENU_ENTRY_TYPE:string;
public PARENT_MENU_NAME:string;
public PROMPT:string;
public REQUEST_TYPE:string;
}

@ -0,0 +1,18 @@
export class Request {
public P_USER_NAME: string;
public LanguageID: number;
//public IPAdress: string;
public P_SESSION_ID: number;
public VersionID: number;
public Channel: number;
public P_PASSWORD: string;
public P_MOBILE_NUMBER: string;
public P_EMAIL_ADDRESS: string;
public TokenID:string;
public P_NOTIFICATION_ID:number;
public MobileNumber: string;
public UserName:string;
public LogInTokenID:string;
public MobileType:string;
}

@ -1,18 +1,16 @@
export class Request {
public ClinicID: number;
public PatientOutSA: number;
public PatientID: number;
public ProjectID: number;
public LanguageID: number;
public IPAdress: string;
public VersionID: number;
public Channel: number;
public PatientTypeID: number;
public isDentalAllowedBackend: boolean;
public IsIrisPrescription: boolean;
public TokenID: string;
public SessionID: string;
public PatientIdentificationID: string;
public PatientMobileNumber: string;
public MobileType: string;
public BookedBy?: number;
public P_SESSION_ID: number;
public MobileNumber : string;
public LogInTokenID : string;
public P_USER_NAME:string;
public UserName:string;
}

@ -1,5 +1,5 @@
import { Injectable, NgZone } from '@angular/core';
import { Push, PushObject, PushOptions } from '@ionic-native/push/ngx';
// import { Push, PushObject, PushOptions } from '@ionic-native/push/ngx';
import { CommonService } from '../common/common.service';
import { TranslatorService } from '../translator/translator.service';
import { NotificationModel } from './models/notification.model';
@ -26,7 +26,7 @@ export class PushService {
public static CHANNEL_ID = '815750722565';
constructor(
public push: Push,
// public push: Push,
public cs: CommonService,
public ts: TranslatorService,
public sharedService: SharedDataService,
@ -43,58 +43,58 @@ export class PushService {
this.processStartReceiving();
}
private processStartReceiving() {
if (this.cs.isCordova()) {
this.stopNotifications(() => {
this.push.hasPermission()
.then((res: any) => {
if (res.isEnabled) {
this.createChannel();
} else {
this.cs.presentAlert(this.ts.trPK('push', 'no-permiss'));
}
});
});
}
// if (this.cs.isCordova()) {
// this.stopNotifications(() => {
// this.push.hasPermission()
// .then((res: any) => {
// if (res.isEnabled) {
// this.createChannel();
// } else {
// this.cs.presentAlert(this.ts.trPK('push', 'no-permiss'));
// }
// });
// });
// }
}
private createChannel() {
// Create a channel (Android O and above). You'll need to provide the id, description and importance properties.
this.push.createChannel({
id: PushService.CHANNEL_ID,
description: 'HMG push notifications',
importance: 3
}).then(() => {
this.initialize();
});
// this.push.createChannel({
// id: PushService.CHANNEL_ID,
// description: 'HMG push notifications',
// importance: 3
// }).then(() => {
// this.initialize();
// });
}
private initialize() {
const options: PushOptions = {
android: {
senderID: PushService.CHANNEL_ID,
sound: true,
forceShow: true
},
ios: {
alert: true,
badge: true,
sound: true
},
windows: {},
browser: {
pushServiceURL: 'http://push.api.phonegap.com/v1/push'
}
};
const pushObject: PushObject = this.push.init(options);
pushObject.on('notification').subscribe((notification: any) => {
this.processNotification(notification);
});
// const options: PushOptions = {
// android: {
// senderID: PushService.CHANNEL_ID,
// sound: true,
// forceShow: true
// },
// ios: {
// alert: true,
// badge: true,
// sound: true
// },
// windows: {},
// browser: {
// pushServiceURL: 'http://push.api.phonegap.com/v1/push'
// }
// };
// const pushObject: PushObject = this.push.init(options);
// pushObject.on('notification').subscribe((notification: any) => {
// this.processNotification(notification);
// });
pushObject.on('registration').subscribe((data: any) => {
this.registerInBackend(data);
});
// pushObject.on('registration').subscribe((data: any) => {
// this.registerInBackend(data);
// });
pushObject.on('error').subscribe(error => console.error('Error with Push plugin', error));
// pushObject.on('error').subscribe(error => console.error('Error with Push plugin', error));
}
@ -149,11 +149,11 @@ export class PushService {
}
public stopNotifications(done: any) {
// Delete a channel (Android O and above)
if (this.cs.isCordova()) {
this.push.deleteChannel(PushService.CHANNEL_ID).then(() => {
done();
});
}
// if (this.cs.isCordova()) {
// this.push.deleteChannel(PushService.CHANNEL_ID).then(() => {
// done();
// });
// }
}
private registerInBackend(data: any) {
@ -171,12 +171,12 @@ export class PushService {
request.DeviceToken = deviceToken;
request.DeviceType = this.getDeviceType();
const user = this.authService.getAuthenticatedUser();
request.PatientMobileNumber = user.MobileNo;
request.NationalID = user.IdentificationNo;
// request.PatientMobileNumber = user.MobileNo;
//request.NationalID = user.IdentificationNo;
request.Gender = user.Gender;
request.PatientID = user.PatientID;
request.PatientOutSA = user.PatientOutSA ? 1 : 0;
request.LoginType = user.biometricEnabled ? 2 : 1; // 1 sms , 2 touch id
// request.PatientOutSA = user.PatientOutSA ? 1 : 0;
//request.LoginType = user.biometricEnabled ? 2 : 1; // 1 sms , 2 touch id
request.MACAddress = '00:00:00:00:00:00';
return this.con.postNoLoad(PushService.loggedInUserURL, request
, () => { }).subscribe((result: Response) => {

@ -14,7 +14,7 @@ export class TranslatorService {
public static EN = 'en';
public static EN_US = 'en-us';
public static AR = 'ar';
public static CURRENT_LANGUAGE = TranslatorService.AR;
public static CURRENT_LANGUAGE = TranslatorService.EN;
public static CHANGE_EVENT = 'language-changed-event';
private static translations: any;
constructor(
@ -174,7 +174,7 @@ export class TranslatorService {
}
private setCurrentLanguageToDefault() {
TranslatorService.CURRENT_LANGUAGE = TranslatorService.AR;
TranslatorService.CURRENT_LANGUAGE = TranslatorService.EN;
}
public setCurrentLanguage(language: string) {
TranslatorService.CURRENT_LANGUAGE = language;

@ -11,7 +11,7 @@
-->
<ion-button *ngIf="enableBack" (click)="backButtonClicked($event)">
<ion-button style="background: transparent;" *ngIf="enableBack" (click)="backButtonClicked($event)">
<ng-container *ngIf="direction">
<ion-icon slot="icon-only" [name]=" direction == 'ltr' ? 'arrow-back': 'arrow-forward' "></ion-icon>
</ng-container>

@ -73,9 +73,9 @@ export class PaymentService {
private generateURL(amount: number, orderDesc: string, transactionID: string): string {
let form = this.getForm();
const user = this.authService.getAuthenticatedUser();
if (user) {
form = form.replace('EMAIL_VALUE', user.Email || user.EmailAddress);
}
// if (user) {
// form = form.replace('EMAIL_VALUE', user.Email || user.EmailAddress);
// }
form = form.replace('AMOUNT_VALUE', (amount || 0).toString());
form = form.replace('ORDER_DESCRIPTION_VALUE', orderDesc);
form = form.replace('SESSION_ID_VALUE', transactionID);

@ -53,7 +53,7 @@ export class ProgressLoadingService {
const template =
// tslint:disable-next-line:quotemark
"<div class='container' > " +
"<img class='loading-gif' src='assets/icon/progress-loading.gif' >" +
"<img class='loading-gif' src='assets/icon/moving.gif' >" +
" <p class='title' >" + message + "</p>" + "</div>";
return template;

@ -1,51 +1,36 @@
<ion-header>
<ion-toolbar>
<ion-title>{{'sms,title' | translate}}</ion-title>
</ion-toolbar>
<ion-toolbar>
<ion-title>{{'verificationcode.verificationcode' | translate}}</ion-title>
</ion-toolbar>
</ion-header>
<ion-content padding>
<ion-grid>
<!-- identification number / file id -->
<ion-row class="ion-justify-content-center">
<img src="assets/icon/verification-code.png" style="width: 25%;height: 35%;" />
</ion-row>
<ion-row class="ion-justify-content-center" >
<ion-text text-center>
<h6>{{ 'home,verification-code-text'| translate}}</h6>
</ion-text>
<ion-text text-center>
<h6>{{mobile}}</h6>
</ion-text>
</ion-row>
<ion-row class="sms_code">
<ion-col [size]="12">
<ion-label class="input-label" >{{ 'h2o,verification_message' | translate}}</ion-label>
<ion-input class="input_bottom" [placeholder]="'h2o,sms_code' | translate" [(ngModel)]="smc_code" pattern="number"></ion-input>
</ion-col>
</ion-row>
<!-- international mobile number-->
<ion-row class="timer-body" >
<ion-col [size]="9">
<ion-label class="input-label" >{{ 'h2o,validation_message' | translate}}</ion-label>
</ion-col>
<ion-col [size]="3">
<ion-label class="input-label-strong" > {{displayTime}} </ion-label>
</ion-col>
<ion-content padding>
<ion-grid>
<ion-row>
<ion-col class="colPad">
<ion-img class="centerDiv" src="../assets/imgs/CS.png"></ion-img>
</ion-col>
</ion-row>
<ion-row *ngIf="resend" >
<ion-col [size]="8" >
<p> {{'h2o,code_failure' | translate}} </p>
</ion-col>
<ion-col [size]="4" class="resend-coloumn" >
<ion-button (click)="ResendOTP()"> {{'h2o,resend' | translate}} </ion-button>
</ion-col>
</ion-row>
<ion-row class="ion-justify-content-center bottom-grid" >
<ion-col [size]="12" >
<ion-button (click)="validate()" expand="full"> {{'general,submit' | translate}} </ion-button>
</ion-col>
<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>
</ion-col>
</ion-row>
</ion-grid>
</ion-content>
</ion-grid>
<br/><br/>
<!-- <p style="color: #c0c0c0; margin-left: 32%">{{'verificationcode.verificationcode' | translate}}</p> -->
<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-input required type="tel" [(ngModel)]="activationCode"></ion-input>
</ion-item>
</div>
</ion-content>
<ion-footer>
<div class="centerDiv">
<button ion-button (click)="checkVerificationCode()">{{'general.submit' | translate}}</button>
</div>
</ion-footer>

@ -124,11 +124,11 @@ export class TabsBarComponent implements OnInit {
*/
private monitUrlChange() {
this.router.events.subscribe((val) => {
if (val instanceof NavigationEnd) {
if (this.matchesURL(val, CommonService.HOME_URL, TabsBarComponent.home)) {
this.cs.openHome();
}
}
// if (val instanceof NavigationEnd) {
// if (this.matchesURL(val, CommonService.HOME_URL, TabsBarComponent.home)) {
// this.cs.openHome();
// }
// }
});
}

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

@ -0,0 +1,69 @@
<!-- <ion-header no-shadow no-border>
<ion-toolbar>
<nav-buttons [enableMenu]="true" [enableBack]="false" [navigate]="false"></nav-buttons>
<ion-title>home </ion-title>
<ion-badge id="homeBadgeBtn" item-end>{{notBadge}}</ion-badge>
</ion-toolbar>
</ion-header> -->
<ion-content >
<div class="header-div">
<button ion-button icon-only menuToggle class="menubutton" (click)="openMenu()">
<ion-icon name="menu"></ion-icon>
<ion-badge id="homeBadgeBtn" item-end>{{notBadge}}</ion-badge>
</button>
<div class="centerDiv" (click)="openPersonalInfo()">
<p class="TxtPlace">{{ts.trPK('home','hello')}}, {{userData.EMPLOYEE_DISPLAY_NAME}}</p>
<div class="profileDiv"><ion-img class="profileImg" src="{{user_image}}"></ion-img></div>
</div>
</div>
<div>
<div>
<p class="dash-header text-caps">{{ts.trPK('home','dashboard')}}</p>
</div>
<div>
<ion-grid class="cus-grid">
<ion-row>
<ion-col size="6" class="col-grid" *ngFor="let item of menuList; let i=index">
<button ion-button block class="serviceItem" (click)="getMeunDetails(i)">
<img class="serviceItemImg" src="../assets/imgs/{{item.MENU_TYPE}}.png"/>
<p> {{ item.MENU_NAME }} {{item.SUB_MENU_NAME}}</p>
</button>
</ion-col>
<ion-col size="6" class="col-grid">
<button ion-button block class="serviceItem" (click)="attendance()">
<ion-img class="serviceItemImg" src="../assets/imgs/attend.png"></ion-img>
<p>{{ts.trPK('attendance','attendance')}}</p>
</button>
</ion-col>
<ion-col size="6" class="col-grid">
<button ion-button block class="serviceItem" (click)="Vacation_Rule()">
<ion-img class="serviceItemImg" src="../assets/imgs/vacationrule.png"></ion-img>
<p>{{ts.trPK('vacation-rule','vacationRule')}}</p>
</button>
</ion-col>
<ion-col size="6" class="col-grid">
<button ion-button block class="serviceItem" (click)="accrualBalance()">
<ion-img class="serviceItemImg" src="../assets/imgs/accu.png"></ion-img>
<p>{{ts.trPK('absenceList','accrualBalances')}}</p>
</button>
</ion-col>
<ion-col size="6" class="col-grid">
<button ion-button block class="serviceItem" (click)="Change_password()">
<ion-img class="serviceItemImg" src="../assets/imgs/changepass.png"></ion-img>
<p>{{ts.trPK('changePassword','changePassword')}}</p>
</button>
</ion-col>
</ion-row>
<!-- <button class="menu-item" ion-item menuClose ion-item *ngFor="let item of menuList; let i=index" (click)="getMeunDetails(i)" >
<img width="30" src="../assets/imgs/arrownew.png" item-left class="flipImg">
{{ item.MENU_NAME }} {{item.SUB_MENU_NAME}}
</button> -->
</ion-grid>
</div>
</div>
</ion-content>

@ -0,0 +1,93 @@
.button-menutoggle.button-menutoggle-md,button-menutoggle.button-menutoggle-ios,
.bar-buttons.bar-buttons-ios.button.button-ios.button-default.button-default-ios.button-menutoggle.button-menutoggle-ios{
box-shadow: none;
-webkit-box-shadow:none;
-moz-box-shadow: none;
background: transparent !important;
}
.menubutton{
white-space: normal;
color: var(--light);
text-transform: capitalize;
min-height: 47px;
background: transparent;
font-size: 2rem;
}
#homeBadgeBtn{
position: absolute;
top: 2px;
width: 20px;
font-size: 10px;
height: 20px;
padding: 0px;
line-height: 2;
min-width: auto;
min-height: auto;
}
.header-div{
background:var(--primary);
background: -moz-linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%);
background: -webkit-linear-gradient(45deg, (--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%);
background: linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%);
color:var(--light);
text-transform: capitalize;
display: block;
position: relative;
height: 120px;
margin-bottom:60px;
}
.dash-header{
text-align: center;
margin: 16px 0 0 0;
}
.TxtPlace {
margin: 0;
padding: 0 0 10px 0;
text-align: center;
}
.serviceItem {
min-height: 160px !important;
padding: 0;
width:100%;
border: 2px solid #e4e5e7;
background: transparent !important;
color: var(--dark);
p{
margin-top: 0px; margin-bottom:0px;
font-weight: normal;
font-size: 14px;
min-height: 20px;
// white-space: normal;
text-align: center;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
}
span {
display: block;
}
.serviceItemImg {
min-width: 60px !important;
min-height: 70px !important;
width: 80px;
height: 80px;
margin: 10px auto;
background: transparent !important;
}
}
.serviceItem.button,.serviceItem.button-md, .serviceItem.button-ios{
background: transparent !important;
color:var(--dark);
box-shadow: none;
-webkit-box-shadow:none;
-moz-box-shadow: none;
border: 2px solid var(--gray);
min-width: auto;
}

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

@ -0,0 +1,71 @@
import { Component, OnInit } from "@angular/core";
import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service";
import { MenuController,Events } from "@ionic/angular";
import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service";
import { AuthenticatedUser } from "src/app/hmg-common/services/authentication/models/authenticated-user";
import { MenuService } from "src/app/hmg-common/services/menu/menuservice.service";
import { MenuResponse } from "src/app/hmg-common/services/menu/models/menu-response";
import { CommonService } from "src/app/hmg-common/services/common/common.service";
@Component({
selector: "app-home",
templateUrl: "./home.page.html",
styleUrls: ["./home.page.scss"]
})
export class HomePage implements OnInit {
userData: any = {};
user_image: any = "../assets/imgs/profile.png";
menuList: any = [];
constructor(
public ts: TranslatorService,
public menu: MenuController,
public authService: AuthenticationService,
public menuService: MenuService,
public common: CommonService,
public events:Events
) {}
ngOnInit() {
this.getUserDetails();
this.getMenu();
}
private openMenu() {
this.menu.toggle();
}
private getUserDetails() {
this.authService
.loadAuthenticatedUser()
.subscribe((user: AuthenticatedUser) => {
if (user) {
this.events.publish('setMenu');
this.userData = user;
this.user_image = user.EMPLOYEE_IMAGE ? "data:image/png;base64,"+user.EMPLOYEE_IMAGE : this.user_image;
console.log(user);
} else {
console.log(user);
}
});
}
public Vacation_Rule() {
this.common.navigateForward('/vacation-rule/home');
}
private getMenu() {
this.menuService.getMenu().subscribe((result: MenuResponse) => {
this.handleMenuResult(result);
});
}
private handleMenuResult(result) {
if (this.common.validResponse(result)) {
if (this.common.hasData(result.List_Menu)) {
this.menuList = result.List_Menu;
}
}
}
private accrualBalance(){
this.common.openAccuralPage();
}
private Change_password(){
this.common.openChangePassword();
}
}

@ -0,0 +1,111 @@
<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('userProfile','title')}}</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
<ion-card *ngIf="personalInfo">
<ion-card-header class="boxHdr">
<div class="hrTitle">{{personalInfo.EMPLOYEE_NAME}}</div>
</ion-card-header>
<ion-card-content>
<div>
<div class="centerDiv profileDiv">
<!-- <p class="TxtPlace boldTxt">{{User_name_Emp}}</p> -->
<ion-img class="profileImg" [src]="imageSrc"></ion-img>
</div>
<ion-grid class="profile-grid">
<div>
<ion-row>
<ion-col class="colBold" size="5">
<label> {{ts.trPK('userProfile','empNo')}}</label>
</ion-col>
<ion-col size="7">
<label>{{personalInfo.EMPLOYEE_NUMBER}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold" size="5">
<label>{{ts.trPK('userProfile','busG')}}</label>
</ion-col>
<ion-col size="7">
<label>{{personalInfo.BUSINESS_GROUP_NAME}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold" size="5">
<label>{{ts.trPK('userProfile','job')}}</label>
</ion-col>
<ion-col size="7">
<label>{{personalInfo.JOB_NAME}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold" size="5">
<label>{{ts.trPK('userProfile','locName')}}</label>
</ion-col>
<ion-col size="7">
<label>{{personalInfo.LOCATION_NAME}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold" size="5">
<label>{{ts.trPK('userProfile','payrol')}}</label>
</ion-col>
<ion-col size="7">
<label>{{personalInfo.PAYROLL_NAME}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold" size="5">
<label>{{ts.trPK('userProfile','orgEmail')}}</label>
</ion-col>
<ion-col size="7">
<label>{{personalInfo.EMPLOYEE_EMAIL_ADDRESS}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold" size="5">
<label>{{ts.trPK('userProfile','orgName')}} </label>
</ion-col>
<ion-col size="7">
<label>{{personalInfo.ORGANIZATION_NAME}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold" size="5">
<label>{{ts.trPK('userProfile','position')}}</label>
</ion-col>
<ion-col size="7">
<label>{{personalInfo.POSITION_NAME}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold" size="5">
<label>{{ts.trPK('userProfile','grade')}} </label>
</ion-col>
<ion-col size="7">
<label>{{personalInfo.GRADE_NAME}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold" size="5">
<label>{{ts.trPK('userProfile','category')}}</label>
</ion-col>
<ion-col size="7">
<label>{{personalInfo.EMPLOYMENT_CATEGORY_MEANING}}</label>
</ion-col>
</ion-row>
</div>
</ion-grid>
</div>
</ion-card-content>
</ion-card>
</ion-content>

@ -0,0 +1,3 @@
ion-col.colBold, ion-col.colBold > label{
font-weight:bold;
}

@ -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,38 @@
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 { 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 {
personalInfo: any;
imageSrc: string = "../assets/imgs/profile.png";
constructor(
public ts: TranslatorService,
public cs: CommonService,
public authService: AuthenticationService
) {}
ngOnInit() {
this.getProfile();
}
getProfile() {
this.authService
.loadAuthenticatedUser()
.subscribe((user: AuthenticatedUser) => {
if (user) {
this.personalInfo = user;
this.imageSrc = user.EMPLOYEE_IMAGE
? "data:image/png;base64," + user.EMPLOYEE_IMAGE
: this.imageSrc;
console.log(user);
} else {
console.log(user);
}
});
}
}

@ -0,0 +1,32 @@
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 { ProfilePage } from './profile.page';
import { HomeComponent } from './home/home.component';
const routes: Routes = [
{
path: '',
component: ProfilePage,
children: [
{
path: 'home',
component: HomeComponent
}
],
}
];
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
RouterModule.forChild(routes)
],
declarations: [ProfilePage , HomeComponent]
})
export class ProfilePageModule {}

@ -0,0 +1,6 @@
<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 { ProfilePage } from './profile.page';
describe('ProfilePage', () => {
let component: ProfilePage;
let fixture: ComponentFixture<ProfilePage>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ProfilePage ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ProfilePage);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

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

@ -0,0 +1,84 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<nav-buttons></nav-buttons>
<ion-title color="light">{{ 'vacation-rule, create-vacation-rule' | translate}}</ion-title>
</ion-toolbar>
</ion-header>
<ion-content padding no-bounce>
<ion-grid no-padding>
<ul class="cusprogressbar">
<ion-row nowrap>
<ion-col size="4">
<!-- <ul class="cusprogressbar"> -->
<li>{{'vacation-rule, itemType' | translate}}</li>
<!-- </ul> -->
</ion-col>
<ion-col size="4">
<!-- <ul class="cusprogressbar"> -->
<li>{{'vacation-rule, notification-type' | translate}}</li>
<!-- </ul> -->
</ion-col>
<ion-col size="4">
<!-- <ul class="cusprogressbar"> -->
<li class="active">{{'vacation-rule, create-vacation-rule' | translate}}</li>
<!-- </ul> -->
</ion-col>
</ion-row>
</ul>
<ion-row>
<ion-item>
<ion-label class="label">{{'vacation-rule, itemType' | translate}}</ion-label>
<ion-label class="label floatlabel">{{P_ITEM_TYPE_TITLE}} </ion-label>
</ion-item>
<ion-item>
<ion-label class="label">{{'vacation-rule, notification' | translate}} </ion-label>
<ion-label class="label floatlabel">{{Notification_Title}} </ion-label>
</ion-item>
<ion-item class="requiredItem">
<ion-label class="label">{{'vacation-rule, start-date' | translate}}</ion-label>
<ion-datetime [(ngModel)]="Sdate" min="1900" max="2100" displayFormat="MM/DD/YYYY hh:mm:ss A"
placeholder="MM/DD/YYYY hh:mm:ss A" required></ion-datetime>
</ion-item>
<ion-item class="requiredItem">
<ion-label class="label">{{'vacation-rule, end-date' | translate}}</ion-label>
<ion-datetime [(ngModel)]="Edate" min="1900" max="2100" displayFormat="MM/DD/YYYY hh:mm:ss A"
placeholder="MM/DD/YYYY hh:mm:ss A" required></ion-datetime>
</ion-item>
<ion-item lines="none" class="requiredItem">
<ion-label>{{'vacation-rule, message-label' | translate}}</ion-label>
<ion-textarea required [(ngModel)]="msgVal"></ion-textarea>
</ion-item>
<ion-list radio-group [(ngModel)]="notifTypeSel">
<ion-item *ngFor="let assignMode of REASSIGN_val;let i=index">
<ion-label>{{assignMode.RADIO_BUTTON_LABEL}}</ion-label>
<ion-radio value="{{assignMode.RADIO_BUTTON_ACTION}}" [checked]="i==0"></ion-radio>
</ion-item>
<ion-item *ngIf="isDeliver">
<ion-label>{{'createVacationRule.deliver' | translate}}</ion-label>
<ion-radio value="DELIVER"></ion-radio>
</ion-item>
<!-- <ion-item *ngIf="notifTypeSel!='RESPOND'">
<ion-label>{{selEmployeeName}}</ion-label>
<ion-label>{{selEmployeeID}}</ion-label>
</ion-item> -->
<ion-item *ngIf="showForType_Y">
<ion-label>{{'createVacationRule.close' | translate}}</ion-label>
<ion-radio value="CLOSE"></ion-radio>
</ion-item>
<!-- <button *ngIf="notifTypeSel!='RESPOND'" ion-button block (click)="SearchReplacment()">{{'createVacationRule.search' | translate}}</button> -->
<ion-item *ngIf="schemaNotific && showForType_Y == false">
<ion-label>{{'createVacationRule.respond' | translate}}</ion-label>
<ion-radio value="RESPOND"></ion-radio>
</ion-item>
</ion-list>
</ion-row>
</ion-grid>
</ion-content>

@ -0,0 +1,14 @@
li {
width: 100%;
}
.label {
white-space: normal;
font-size: smaller;
}
ion-list,
ion-item {
width: 100%;
margin-right: 7%;
}

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

@ -0,0 +1,107 @@
import { Component, OnInit } from '@angular/core';
import * as moment from 'moment';
import { VacationRuleServiceService } from '../service/vacation-rule-service.service';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { LoginRequest } from 'src/app/hmg-common/services/authentication/models/login.request';
@Component({
selector: 'app-create-vacation-rule',
templateUrl: './create-vacation-rule.component.html',
styleUrls: ['./create-vacation-rule.component.scss'],
})
export class CreateVacationRuleComponent implements OnInit {
P_RESPOND_ATTRIBUTES_TBL: any;
P_ITEM_TYPE_TITLE: any = "";
Notification_Title: any = "";
isDeliver: boolean = false;
showForType_Y: boolean = false;
Resp2_val: any;
Sdate: any;
// startTime: any;
//endTime: any;
Edate: any;
msgVal: any;
selEmployeeName: any;
selEmployeeID: any;
employeeSel: any;
replacmentEmployeeInfo: any;
itemType: any;
notificationType: any;
RespondAttributeList: any;
// vacationRuleRequest: createVacationRequest;
REASSIGN_val: any;
schemaNotific: any;
notifTypeSel: any;
// pAction: any;
isUpdate: boolean = false;
updateData: any;
forwordAtt: any = "";
SelAction: string = "";
hideForwordEmployee: any;
exampleJsonObject: any;
constructor(public vacationRuleService: VacationRuleServiceService, public ts: TranslatorService, public cs: CommonService) {
this.Sdate = moment().format('YYYY-MM-DDTHH:mm:ssZ');
}
ngOnInit() {
this.getNotificationReassign();
}
getNotificationReassign() {
let request: LoginRequest = new LoginRequest();
this.vacationRuleService.notificationReassign(request, () => {
this.getNotificationReassign();
}, this.ts.trPK('general', 'retry')).subscribe((result) => {
console.log(result);
if (this.cs.validResponse(result)) {
console.log(result.GetNotificationReassignModeList);
this.REASSIGN_val = result.GetNotificationReassignModeList;//[0].RADIO_BUTTON_ACTION;
this.notifTypeSel = this.REASSIGN_val[0].RADIO_BUTTON_ACTION;
this.reverseAction();
} else {
this.cs.presentAlert(result.ErrorEndUserMessage);
}
});
}
reverseAction() {
if (this.updateData) {
switch (this.SelAction) {
case 'FORWARD': {
this.notifTypeSel = "DELEGATE";
break;
}
case 'RESPOND': {
this.notifTypeSel = "RESPOND";
break;
}
case 'CLOSE': {
this.notifTypeSel = "CLOSE";
break;
}
case 'NOOP': {
this.notifTypeSel = "DELIVER";
break;
}
case 'TRANSFER': {
this.notifTypeSel = "TRANSFER";
break;
}
default: {
this.notifTypeSel = "";
break;
}
}
}
}
respondAttributes() {
}
}

@ -0,0 +1,78 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<nav-buttons></nav-buttons>
<ion-title color="light">{{ 'vacation-rule, vacationRule' | translate}}</ion-title>
</ion-toolbar>
</ion-header>
<ion-content padding>
<div style="padding: 0 10px;" [innerHTML]='"vacation-rule, tip" | translate'></div>
<ion-card *ngFor="let item of GetVacationRulesList; let i = index;">
<ion-card-header class="boxHdr">
<ion-grid no-padding>
<ion-row class="hrTitle" nowrap>
<ion-col size="8">
<ion-text style="font-size: larger;"><b>{{'vacation-rule, ruleInfo' | translate}}</b></ion-text>
</ion-col>
<ion-col size="2">
<button class="btnBack" ion-button (click)="deleteFunc(i)">
<img class="imgSize" src="../assets/imgs/delete.png"></button>
</ion-col>
<ion-col size="2">
<button class="btnBack" ion-button (click)="updateFunc(i)">
<img class="imgSize" src="../assets/imgs/edit.png"></button>
</ion-col>
</ion-row>
</ion-grid>
</ion-card-header>
<ion-card-content>
<ion-grid>
<div>
<ion-row>
<ion-col class="colBold">
<label for="">{{'vacation-rule, ruleName' | translate}}</label>
</ion-col>
<ion-col>
<label for=""> {{item.RULE_NAME}}</label>
</ion-col>
</ion-row>
</div>
<ion-row>
<ion-col class="colBold">
<label for="">{{'vacation-rule, itemType' | translate}}</label>
</ion-col>
<ion-col>
<label for=""> {{item.ITEM_TYPE_DISPLAY_NAME}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold">
<label for="">{{'vacation-rule, notification' | translate}}</label>
</ion-col>
<ion-col>
<label for=""> {{item.NOTIFICATION_SUBJECT}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold">
<label for="">{{'vacation-rule, status' | translate}}</label>
</ion-col>
<ion-col>
<label for=""> {{item.RULE_STATUS}}</label>
</ion-col>
</ion-row>
</ion-grid>
</ion-card-content>
</ion-card>
</ion-content>
<ion-footer>
<div class="centerDiv">
<ion-button class="footer-button" color="customnavy" ion-button (click)="Vacation_Type()">{{'vacation-rule, createRule' | translate}}</ion-button>
</div>
</ion-footer>

@ -0,0 +1,71 @@
.item-md p,
.item-md ios {
white-space: normal;
}
.col {
white-space: normal;
font-size: 14px;
}
ion-col.colBold {
color: #1a586d;
}
.imgSize {
width: 22px;
height: 22px;
-webkit-box-shadow: none;
box-shadow: none;
}
ion-card-header {
display: block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.header-toolbar {
--background: linear-gradient(45deg, #3ac1f1 0%, #19a163 36%, #19a163 59%, #1a586d 100%);
}
.btnBack {
background: transparent;
float: right;
}
.footer-button {
border-radius: 2px;
padding: 0 1.1em;
min-height: 45px;
min-width: 200px;
}
ion-card-header {
padding: 0px 10px !important;
color: #ffffff !important;
-webkit-border-top-left-radius: 10px;
-webkit-border-top-right-radius: 10px;
-moz-border-radius-topleft: 10px;
-moz-border-radius-topright: 10px;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
background: #acacac;
.hrTitle {
white-space: normal;
padding: 5px;
padding-top: 12px;
width: 100%;
min-height: 45px;
line-height: 1.2;
}
.button,
.button-md,
button-ios {
background: transparent;
box-shadow: none;
-webkit-box-shadow: none;
-moz-box-shadow: none;
min-width: auto;
padding: 0px !important;
margin: 0px 5px !important;
}
}

@ -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,156 @@
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { VacationRuleServiceService } from './../service/vacation-rule-service.service';
import { VacationRuleRequest } from './../model/VacationRuleRequest';
import { Component, OnInit } from '@angular/core';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
@Component({
selector: 'app-home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.scss'],
})
export class HomeComponent implements OnInit {
userName: any;
P_PAGE_NUM: number;
P_PAGE_LIMIT: number;
GetVacationRulesList: any = [];
isUpdate: boolean = false;
IsReachEnd: boolean = false;
RespondAttributeList: any;
constructor(public vacationRuleService: VacationRuleServiceService, public ts: TranslatorService, public cs: CommonService) {
this.P_PAGE_NUM = 1;
this.P_PAGE_LIMIT = 50;
this.GetVacationRulesList = [
{
"ACTION": "FORWARD",
"ACTION_DISPLAY": "Forward",
"BEGIN_DATE": "6/26/2019 2:50:14 PM",
"END_DATE": "6/30/2019 2:50:22 PM",
"FROM_ROW_NUM": 1,
"FYI_FLAG": "Y",
"ITEM_TYPE": "HRSSA",
"ITEM_TYPE_DISPLAY_NAME": "HR",
"MESSAGE": "TEst Rule",
"NOTIFICATION_DISPLAY_NAME": "<All>",
"NOTIFICATION_NAME": "*",
"NOTIFICATION_SUBJECT": "<All>",
"NO_OF_ROWS": 1,
"REPLACEMENT_USER_NAME": "70915",
"ROW_NUM": 1,
"RULE_ID": 7770756,
"RULE_NAME": "Delegate: Al Oulah, Mohammed",
"RULE_STATUS": "Active",
"RULE_TIP_MESSAGE": "",
"TO_ROW_NUM": 1
},
{
"ACTION": "FORWARD",
"ACTION_DISPLAY": "Forward",
"BEGIN_DATE": "6/26/2019 2:50:14 PM",
"END_DATE": "6/30/2019 2:50:22 PM",
"FROM_ROW_NUM": 1,
"FYI_FLAG": "Y",
"ITEM_TYPE": "HRSSA",
"ITEM_TYPE_DISPLAY_NAME": "HR",
"MESSAGE": "TEst Rule",
"NOTIFICATION_DISPLAY_NAME": "<All>",
"NOTIFICATION_NAME": "*",
"NOTIFICATION_SUBJECT": "<All>",
"NO_OF_ROWS": 1,
"REPLACEMENT_USER_NAME": "70915",
"ROW_NUM": 1,
"RULE_ID": 7770756,
"RULE_NAME": "Delegate: Al Oulah, Mohammed",
"RULE_STATUS": "Active",
"RULE_TIP_MESSAGE": "",
"TO_ROW_NUM": 1
},
{
"ACTION": "FORWARD",
"ACTION_DISPLAY": "Forward",
"BEGIN_DATE": "6/26/2019 2:50:14 PM",
"END_DATE": "6/30/2019 2:50:22 PM",
"FROM_ROW_NUM": 1,
"FYI_FLAG": "Y",
"ITEM_TYPE": "HRSSA",
"ITEM_TYPE_DISPLAY_NAME": "HR",
"MESSAGE": "TEst Rule",
"NOTIFICATION_DISPLAY_NAME": "<All>",
"NOTIFICATION_NAME": "*",
"NOTIFICATION_SUBJECT": "<All>",
"NO_OF_ROWS": 1,
"REPLACEMENT_USER_NAME": "70915",
"ROW_NUM": 1,
"RULE_ID": 7770756,
"RULE_NAME": "Delegate: Al Oulah, Mohammed",
"RULE_STATUS": "Active",
"RULE_TIP_MESSAGE": "",
"TO_ROW_NUM": 1
},
{
"ACTION": "FORWARD",
"ACTION_DISPLAY": "Forward",
"BEGIN_DATE": "6/26/2019 2:50:14 PM",
"END_DATE": "6/30/2019 2:50:22 PM",
"FROM_ROW_NUM": 1,
"FYI_FLAG": "Y",
"ITEM_TYPE": "HRSSA",
"ITEM_TYPE_DISPLAY_NAME": "HR",
"MESSAGE": "TEst Rule",
"NOTIFICATION_DISPLAY_NAME": "<All>",
"NOTIFICATION_NAME": "*",
"NOTIFICATION_SUBJECT": "<All>",
"NO_OF_ROWS": 1,
"REPLACEMENT_USER_NAME": "70915",
"ROW_NUM": 1,
"RULE_ID": 7770756,
"RULE_NAME": "Delegate: Al Oulah, Mohammed",
"RULE_STATUS": "Active",
"RULE_TIP_MESSAGE": "",
"TO_ROW_NUM": 1
}
];
}
ngOnInit() {
console.log('OnInit');
this.getVacationRules();
console.log(this.GetVacationRulesList);
}
Vacation_Type() {
this.cs.navigateForward('/vacation-rule/vacation-type');
}
getVacationRules() {
this.P_PAGE_NUM = 1;
this.IsReachEnd = false;
let request: VacationRuleRequest = new VacationRuleRequest();
request.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
request.P_PAGE_NUM = this.P_PAGE_NUM;
this.vacationRuleService.getVacationRule(request, () => {
this.getVacationRules();
}, this.ts.trPK('general', 'retry')).subscribe((result) => {
if (this.cs.validResponse(result)) {
console.log(result);
console.log(JSON.stringify(result));
} else {
this.cs.presentAlert(result.ErrorEndUserMessage);
}
});
}
deleteFunc(i) {
}
updateFunc(i) {
}
}

@ -0,0 +1,7 @@
import { Request } from '../../hmg-common/services/models/request';
export class VacationRuleRequest extends Request {
public static SHARED_DATA = 'vacation-request';
public P_PAGE_NUM: number;
public P_PAGE_LIMIT: number;
}

@ -0,0 +1,8 @@
import { Request } from '../../hmg-common/services/models/request';
export class VacationTypeRequest extends Request{
public static SHARED_DATA = 'login-request';
public static NATIONALITY_CODE="Nationality_Code";
public P_USER_NAME:string;
public P_PASSWORD: string;
}

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

Loading…
Cancel
Save