# Conflicts:
#	Mohem/src/app/authentication/login/login.component.ts
production
haroon amjad 7 years ago
commit 83ef5b6b50

@ -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>

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"
]
}
}

@ -0,0 +1 @@
to add ios - ionic cordova platform add ios

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="io.ionic.starter" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<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>
@ -82,8 +82,38 @@
</platform>
<plugin name="cordova-plugin-whitelist" spec="1.3.3" />
<plugin name="cordova-plugin-statusbar" spec="2.4.2" />
<plugin name="cordova-plugin-device" spec="2.0.2" />
<plugin name="cordova-plugin-splashscreen" spec="5.0.2" />
<plugin name="cordova-plugin-ionic-webview" spec="^4.0.0" />
<plugin name="cordova-plugin-ionic-keyboard" spec="^2.0.5" />
<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>

@ -0,0 +1 @@
to add ios - ionic cordova platform add ios

@ -0,0 +1,40 @@
{
"project_info": {
"project_number": "608631731238",
"firebase_url": "https://mohemm-cs.firebaseio.com",
"project_id": "mohemm-cs",
"storage_bucket": "mohemm-cs.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:608631731238:android:3a8384007f8700ec",
"android_client_info": {
"package_name": "com.cloudsolutions.mohemm"
}
},
"oauth_client": [
{
"client_id": "608631731238-83a5qndedia496ssa6ekkd3db5jo8khr.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyB5zpz9vC2NOxsU1dPr0TK0dVaMY5D4Mjg"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "608631731238-83a5qndedia496ssa6ekkd3db5jo8khr.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
}

@ -0,0 +1,164 @@
@echo start installing required native and 3rd party plugins
@echo to update angular -> npm install -g @angular/cli
@echo to update ionic -> npm install -g ionic
@echo add browser, android , ios platforms commit non required
@echo to add browser -> call ionic cordova platform add browser
@echo to add ios -> call ionic cordova platform add ios
call ionic cordova platform add android
@echo copying android FCM google servcie file
call cp ./google-services.json ./platforms/android/
call npm i @angular/animations
call npm i @swimlane/ngx-charts --save
@echo primeng framework [angular]
call npm install primeng --save
call npm install primeicons --save
@echo add css links for primeng in global.scss
@echo @import "../node_modules/primeng/resources/themes/nova-light/theme.css";
@echo @import "../node_modules/primeng/resources/primeng.min.css";
@echo @import "../node_modules/primeicons/primeicons.css";
@echo install chartjs as dependency for primeng chartjs
call npm install chart.js --save
@echo add reference in [angular.json] in [scripts] array add (node_modules/chart.js/dist/Chart.js)
@echo calendar https://mattlewis92.github.io/angular-calendar/#/kitchen-sink
call npm install --save @ng-bootstrap/ng-bootstrap
call npm install --save angular-calendar date-fns
@echo install android support gradle release because of barcode scanner to install missing android attributes
call ionic cordova plugin add cordova-android-support-gradle-release --fetch
@echo push notifications
call ionic cordova plugin add phonegap-plugin-push --variable GOOGLE_PLAY_SERVICES_VERSION="16.0.0" --variable FCM_VERSION="15.0.0"
call npm install @ionic-native/push
@echo sqlite storage
call ionic cordova plugin add cordova-sqlite-storage
call npm install @ionic-native/sqlite
@echo native storage
call ionic cordova plugin add cordova-plugin-nativestorage
call npm install @ionic-native/native-storage
@echo bluetooth ble centeral //check interface assets/js/bletooth.js
call ionic cordova plugin add cordova-plugin-ble-central
call npm install @ionic-native/ble
@echo launch navigator
@echo warning : for now we stick with launch navigator 3 since 5 has issue
REM call ionic cordova plugin add uk.co.workingedge.phonegap.plugin.launchnavigator --variable GOOGLE_API_KEY_FOR_ANDROID="AIzaSyC-XbzwGMyAVCnspof0cqiO4iLfKmeEYVA"
call ionic cordova plugin add uk.co.workingedge.phonegap.plugin.launchnavigator@3
call npm install @ionic-native/launch-navigator
@echo themeablebrowser
call ionic cordova plugin add cordova-plugin-themeablebrowser
call npm install @ionic-native/themeable-browser
@echo in app browser
call ionic cordova plugin add cordova-plugin-inappbrowser
call npm install @ionic-native/in-app-browser
@echo globalization
call ionic cordova plugin add cordova-plugin-globalization
call npm install @ionic-native/globalization
@echo android permissions plugin
call ionic cordova plugin add cordova-plugin-android-permissions
call npm install @ionic-native/android-permissions
@echo sms reader https://www.npmjs.com/package/cordova-plugin-sms-receive
call npm i cordova-plugin-sms-receive
call cordova plugin add cordova-plugin-sms-receive
@echo device information
call ionic cordova plugin add cordova-plugin-device
call npm install @ionic-native/device
@echo local notifications
call ionic cordova plugin add cordova-plugin-local-notification
call npm install @ionic-native/local-notifications
@echo call phone number
call ionic cordova plugin add call-number
call npm install @ionic-native/call-number
@echo badge
call ionic cordova plugin add cordova-plugin-badge
call npm install @ionic-native/badge
@echo biometric features
call ionic cordova plugin add cordova-plugin-fingerprint-aio --variable FACEID_USAGE_DESCRIPTION="User Authentication"
call npm install @ionic-native/fingerprint-aio
@echo install diagnostic
call ionic cordova plugin add cordova.plugins.diagnostic
call npm install @ionic-native/diagnostic
@echo install background-geolocation
call ionic cordova plugin add cordova-plugin-mauron85-background-geolocation@alpha --variable GOOGLE_PLAY_SERVICES_VERSION="16.0.0"
call npm install @ionic-native/background-geolocation
@echo install barcode plugin
call ionic cordova plugin add phonegap-plugin-barcodescanner
call npm install @ionic-native/barcode-scanner
@echo install camera plugin
call ionic cordova plugin add cordova-plugin-camera
call npm install @ionic-native/camera
@echo install keyboard plugin
call ionic cordova plugin add cordova-plugin-ionic-keyboard
call npm install @ionic-native/keyboard
@echo install opentok required permissions
call ionic cordova plugin add cordova-opentok-android-permissions
@echo install health plugin
call ionic cordova plugin add cordova-plugin-health --variable HEALTH_READ_PERMISSION="App needs read access to read heart rate" --variable HEALTH_WRITE_PERMISSION="App needs write access for heart rate" --variable GMS_VERSION="16.0.1"
call npm install @ionic-native/health
@echo install App Availability Plugin
call ionic cordova plugin add cordova-plugin-appavailability
call npm install @ionic-native/app-availability
@echo install rate plugin
call ionic cordova plugin add cordova-plugin-apprate
call npm install @ionic-native/app-rate
@echo reinitializing git repository
@echo git init
@echo git remote add origin https://enas_yaghi@hmg.git.cloudforge.com/patientappionic.git
@echo git push -f origin master
@echo update project from package.js change if necessary
@echo to install all dependencies in package.json
@echo npm cache clean --force
@echo exact version -> npm install --save --save-exact react
@echo latest versions based on package.json rules -> npm install
@echo to build or serve for (( production ))
@echo export NODE_OPTIONS=--max-old-space-size=4096
@echo ionic cordova build android --release --aot --minifyjs --optimizejs --minifycss
@echo ionic cordova build ios --release --aot --minifyjs --optimizejs --minifycss

@ -0,0 +1,167 @@
#!/bin/sh
echo start installing required native and 3rd party plugins
echo to update angular -> npm install -g @angular/cli
echo to update ionic -> npm install -g ionic
echo add browser, android , ios platforms commit non required
echo to add browser -> call ionic cordova platform add browser
echo to add ios -> call ionic cordova platform add ios
ionic cordova platform add android
echo copying android FCM google servcie file
cp ./google-services.json ./platforms/android/
npm i @angular/animations
npm i @swimlane/ngx-charts --save
echo primeng framework [angular]
npm install primeng --save
npm install primeicons --save
echo add css links for primeng in global.scss
echo @import "../node_modules/primeng/resources/themes/nova-light/theme.css";
echo @import "../node_modules/primeng/resources/primeng.min.css";
echo @import "../node_modules/primeicons/primeicons.css";
echo install chartjs as dependency for primeng chartjs
npm install chart.js --save
# echo add reference in [angular.json] in [scripts] array add (node_modules/chart.js/dist/Chart.js)
echo calendar https://mattlewis92.github.io/angular-calendar/#/kitchen-sink
npm install --save @ng-bootstrap/ng-bootstrap
npm install --save angular-calendar date-fns
echo install android support gradle release because of barcode scanner to install missing android attributes
ionic cordova plugin add cordova-android-support-gradle-release --fetch
echo push notifications
ionic cordova plugin add phonegap-plugin-push --variable GOOGLE_PLAY_SERVICES_VERSION="16.0.0" --variable FCM_VERSION="15.0.0"
npm install @ionic-native/push
echo sqlite storage
ionic cordova plugin add cordova-sqlite-storage
npm install @ionic-native/sqlite
echo native storage
ionic cordova plugin add cordova-plugin-nativestorage
npm install @ionic-native/native-storage
echo bluetooth ble centeral //check interface assets/js/bletooth.js
ionic cordova plugin add cordova-plugin-ble-central
npm install @ionic-native/ble
echo launch navigator
echo warning : for now we stick with launch navigator 3 since 5 has issue
# call ionic cordova plugin add uk.co.workingedge.phonegap.plugin.launchnavigator --variable GOOGLE_API_KEY_FOR_ANDROID="AIzaSyC-XbzwGMyAVCnspof0cqiO4iLfKmeEYVA"
ionic cordova plugin add uk.co.workingedge.phonegap.plugin.launchnavigator@3
npm install @ionic-native/launch-navigator
echo themeablebrowser
ionic cordova plugin add cordova-plugin-themeablebrowser
npm install @ionic-native/themeable-browser
echo in app browser
ionic cordova plugin add cordova-plugin-inappbrowser
npm install @ionic-native/in-app-browser
echo globalization
ionic cordova plugin add cordova-plugin-globalization
npm install @ionic-native/globalization
echo android permissions plugin
ionic cordova plugin add cordova-plugin-android-permissions
npm install @ionic-native/android-permissions
echo sms reader https://www.npmjs.com/package/cordova-plugin-sms-receive
npm i cordova-plugin-sms-receive
cordova plugin add cordova-plugin-sms-receive
echo device information§
ionic cordova plugin add cordova-plugin-device
npm install @ionic-native/device
echo local notifications
ionic cordova plugin add cordova-plugin-local-notification
npm install @ionic-native/local-notifications
echo call phone number
ionic cordova plugin add call-number
npm install @ionic-native/call-number
echo badge
ionic cordova plugin add cordova-plugin-badge
npm install @ionic-native/badge
echo biometric features
ionic cordova plugin add cordova-plugin-fingerprint-aio --variable FACEID_USAGE_DESCRIPTION="User Authentication"
npm install @ionic-native/fingerprint-aio
echo install diagnostic
ionic cordova plugin add cordova.plugins.diagnostic
npm install @ionic-native/diagnostic
echo install background-geolocation
ionic cordova plugin add cordova-plugin-mauron85-background-geolocation@alpha --variable GOOGLE_PLAY_SERVICES_VERSION="16.0.0"
npm install @ionic-native/background-geolocation
echo install barcode plugin
ionic cordova plugin add phonegap-plugin-barcodescanner
npm install @ionic-native/barcode-scanner
echo install camera plugin
ionic cordova plugin add cordova-plugin-camera
npm install @ionic-native/camera
echo install keyboard plugin
ionic cordova plugin add cordova-plugin-ionic-keyboard
npm install @ionic-native/keyboard
echo install opentok required permissions
ionic cordova plugin add cordova-opentok-android-permissions
echo install health plugin
ionic cordova plugin add cordova-plugin-health --variable HEALTH_READ_PERMISSION="App needs read access to read heart rate" --variable HEALTH_WRITE_PERMISSION="App needs write access for heart rate" --variable GMS_VERSION="16.0.1"
npm install @ionic-native/health
echo install App Availability Plugin
ionic cordova plugin add cordova-plugin-appavailability
npm install @ionic-native/app-availability
echo install rate plugin
ionic cordova plugin add cordova-plugin-apprate
npm install @ionic-native/app-rate
echo reinitializing git repository
echo git init
echo git remote add origin https://enas_yaghi@hmg.git.cloudforge.com/patientappionic.git
echo git push -f origin master
echo update project from package.js change if necessary
echo to install all dependencies in package.json
echo npm cache clean --force
echo exact version -> npm install --save --save-exact react
echo latest versions based on package.json rules -> npm install
echo to build or serve for (( production ))
echo export NODE_OPTIONS=--max-old-space-size=4096
echo ionic serve --prod -> for serving in production
echo ionic cordova build android --release --aot --minifyjs --optimizejs --minifycss
echo ionic cordova build ios --release --aot --minifyjs --optimizejs --minifycss

@ -0,0 +1 @@
latest versions based on package.json rules - install

@ -0,0 +1,40 @@
{
"project_info": {
"project_number": "608631731238",
"firebase_url": "https://mohemm-cs.firebaseio.com",
"project_id": "mohemm-cs",
"storage_bucket": "mohemm-cs.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:608631731238:android:3a8384007f8700ec",
"android_client_info": {
"package_name": "com.cloudsolutions.mohemm"
}
},
"oauth_client": [
{
"client_id": "608631731238-83a5qndedia496ssa6ekkd3db5jo8khr.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyB5zpz9vC2NOxsU1dPr0TK0dVaMY5D4Mjg"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "608631731238-83a5qndedia496ssa6ekkd3db5jo8khr.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
}

@ -0,0 +1,156 @@
@echo start installing required native and 3rd party plugins
@echo to update angular -> npm install -g @angular/cli
@echo to update ionic -> npm install -g ionic
@echo add browser, android , ios platforms commit non required
@echo to add browser -> call ionic cordova platform add browser
@echo to add ios -> call ionic cordova platform add ios
call ionic cordova platform add android
@echo copying android FCM google servcie file
call cp ./google-services.json ./platforms/android/
call npm i @angular/animations
call npm i @swimlane/ngx-charts --save
@echo primeng framework [angular]
call npm install primeng --save
call npm install primeicons --save
@echo add css links for primeng in global.scss
@echo @import "../node_modules/primeng/resources/themes/nova-light/theme.css";
@echo @import "../node_modules/primeng/resources/primeng.min.css";
@echo @import "../node_modules/primeicons/primeicons.css";
@echo install chartjs as dependency for primeng chartjs
call npm install chart.js --save
@echo add reference in [angular.json] in [scripts] array add (node_modules/chart.js/dist/Chart.js)
@echo calendar https://mattlewis92.github.io/angular-calendar/#/kitchen-sink
call npm install --save @ng-bootstrap/ng-bootstrap
call npm install --save angular-calendar date-fns
@echo install android support gradle release because of barcode scanner to install missing android attributes
call ionic cordova plugin add cordova-android-support-gradle-release --fetch
@echo push notifications
call ionic cordova plugin add phonegap-plugin-push --variable GOOGLE_PLAY_SERVICES_VERSION="16.0.0" --variable FCM_VERSION="15.0.0"
call npm install @ionic-native/push
@echo sqlite storage
call ionic cordova plugin add cordova-sqlite-storage
call npm install @ionic-native/sqlite
@echo native storage
call ionic cordova plugin add cordova-plugin-nativestorage
call npm install @ionic-native/native-storage
@echo bluetooth ble centeral //check interface assets/js/bletooth.js
call ionic cordova plugin add cordova-plugin-ble-central
call npm install @ionic-native/ble
@echo launch navigator
@echo warning : for now we stick with launch navigator 3 since 5 has issue
REM call ionic cordova plugin add uk.co.workingedge.phonegap.plugin.launchnavigator --variable GOOGLE_API_KEY_FOR_ANDROID="AIzaSyC-XbzwGMyAVCnspof0cqiO4iLfKmeEYVA"
call ionic cordova plugin add uk.co.workingedge.phonegap.plugin.launchnavigator@3
call npm install @ionic-native/launch-navigator
@echo themeablebrowser
call ionic cordova plugin add cordova-plugin-themeablebrowser
call npm install @ionic-native/themeable-browser
@echo in app browser
call ionic cordova plugin add cordova-plugin-inappbrowser
call npm install @ionic-native/in-app-browser
@echo globalization
call ionic cordova plugin add cordova-plugin-globalization
call npm install @ionic-native/globalization
@echo android permissions plugin
call ionic cordova plugin add cordova-plugin-android-permissions
call npm install @ionic-native/android-permissions
@echo sms reader https://www.npmjs.com/package/cordova-plugin-sms-receive
call npm i cordova-plugin-sms-receive
call cordova plugin add cordova-plugin-sms-receive
@echo device information
call ionic cordova plugin add cordova-plugin-device
call npm install @ionic-native/device
@echo local notifications
call ionic cordova plugin add cordova-plugin-local-notification
call npm install @ionic-native/local-notifications
@echo call phone number
call ionic cordova plugin add call-number
call npm install @ionic-native/call-number
@echo badge
call ionic cordova plugin add cordova-plugin-badge
call npm install @ionic-native/badge
@echo biometric features
call ionic cordova plugin add cordova-plugin-fingerprint-aio --variable FACEID_USAGE_DESCRIPTION="User Authentication"
call npm install @ionic-native/fingerprint-aio
@echo install diagnostic
call ionic cordova plugin add cordova.plugins.diagnostic
call npm install @ionic-native/diagnostic
@echo install barcode plugin
call ionic cordova plugin add phonegap-plugin-barcodescanner
call npm install @ionic-native/barcode-scanner
@echo install camera plugin
call ionic cordova plugin add cordova-plugin-camera
call npm install @ionic-native/camera
@echo install keyboard plugin
call ionic cordova plugin add cordova-plugin-ionic-keyboard
call npm install @ionic-native/keyboard
@echo install opentok required permissions
call ionic cordova plugin add cordova-opentok-android-permissions
@echo install App Availability Plugin
call ionic cordova plugin add cordova-plugin-appavailability
call npm install @ionic-native/app-availability
@echo install rate plugin
call ionic cordova plugin add cordova-plugin-apprate
call npm install @ionic-native/app-rate
@echo reinitializing git repository
@echo git init
@echo git remote add origin https://enas_yaghi@hmg.git.cloudforge.com/patientappionic.git
@echo git push -f origin master
@echo update project from package.js change if necessary
@echo to install all dependencies in package.json
@echo npm cache clean --force
@echo exact version -> npm install --save --save-exact react
@echo latest versions based on package.json rules -> npm install
@echo to build or serve for (( production ))
@echo export NODE_OPTIONS=--max-old-space-size=4096
@echo ionic cordova build android --release --aot --minifyjs --optimizejs --minifycss
@echo ionic cordova build ios --release --aot --minifyjs --optimizejs --minifycss

@ -1,5 +1,7 @@
{
"name": "Mohem",
"integrations": {},
"integrations": {
"cordova": {}
},
"type": "angular"
}

@ -0,0 +1 @@
latest versions based on package.json rules - install

File diff suppressed because it is too large Load Diff

@ -21,53 +21,57 @@
"@angular/platform-browser": "^7.2.2",
"@angular/platform-browser-dynamic": "^7.2.2",
"@angular/router": "^7.2.2",
"@ionic-native/android-permissions": "^5.4.0",
"@ionic-native/app-availability": "^5.4.0",
"@ionic-native/app-rate": "^5.5.1",
"@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.4.0",
"@ionic-native/ble": "^5.4.0",
"@ionic-native/call-number": "^5.4.0",
"@ionic-native/camera": "^5.4.0",
"@ionic-native/core": "^5.0.0",
"@ionic-native/device": "^5.4.0",
"@ionic-native/diagnostic": "^5.4.0",
"@ionic-native/fingerprint-aio": "^5.4.0",
"@ionic-native/globalization": "^5.4.0",
"@ionic-native/in-app-browser": "^5.5.1",
"@ionic-native/keyboard": "^5.4.0",
"@ionic-native/launch-navigator": "^5.4.0",
"@ionic-native/local-notifications": "^5.4.0",
"@ionic-native/native-storage": "^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.5.1",
"@ionic-native/sqlite": "^5.8.0",
"@ionic-native/status-bar": "^5.0.0",
"@ionic-native/themeable-browser": "^5.5.1",
"@ionic-native/themeable-browser": "^5.8.0",
"@ionic/angular": "^4.1.0",
"@ng-bootstrap/ng-bootstrap": "^4.1.2",
"@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-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-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-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-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",
@ -75,18 +79,19 @@
"cordova-plugin-sms-receive": "^1.0.2",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-themeablebrowser": "^0.2.17",
"cordova-plugin-themeablebrowser": "^0.2.18",
"cordova-plugin-whitelist": "^1.3.3",
"cordova-sms-plugin": "1.0.0",
"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",
"moment": "^2.24.0",
"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.2",
"primeng": "^7.1.3",
"run": "1.4.0",
"rxjs": "~6.3.3",
"uk.co.workingedge.phonegap.plugin.launchnavigator": "^3.2.2",
@ -128,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": {},
@ -142,14 +159,24 @@
"cordova-plugin-fingerprint-aio": {
"FACEID_USAGE_DESCRIPTION": "User Authentication"
},
"cordova.plugins.diagnostic": {
"ANDROID_SUPPORT_VERSION": "28.+"
},
"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": {}
@ -160,4 +187,4 @@
"android"
]
}
}
}

@ -0,0 +1,8 @@
These are Cordova resources. You can replace icon.png and splash.png and run
`ionic cordova resources` to generate custom icons and splash screens for your
app. See `ionic cordova resources --help` for details.
Cordova reference documentation:
- Icons: https://cordova.apache.org/docs/en/latest/config_ref/images.html
- Splash Screens: https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-splashscreen/

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain>localhost</domain>
</domain-config>
</network-security-config>

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 818 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

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

@ -8,9 +8,10 @@ const routes: Routes = [
data: { preload: true, delay: 1000 }
},
{ path: 'home', loadChildren: './home/home.module#HomePageModule' },
{ path: 'sms-page', loadChildren: './authentication/sms-page/sms-page.module#SmsPagePageModule' },
{ path: 'profile', loadChildren: './profile/profile.module#ProfilePageModule' },
{ path: 'vacation-rule', loadChildren: './vacation-rule/vacation-rule.module#VacationRulePageModule' }
{ path: 'vacation-rule', loadChildren: './vacation-rule/vacation-rule.module#VacationRulePageModule' },
{ path: 'accrual-balances', loadChildren: './accrual-balances/accrual-balances.module#AccrualBalancesPageModule' }

@ -1,64 +1,63 @@
<!-- <ion-nav [root]="rootPage" #mycontent swipeBackEnabled="false"></ion-nav> -->
<!-- (ionWillOpen)="menuOpened(true)" -->
<ion-app [dir]="direction">
<ion-split-pane>
<ion-menu [side]=" direction === 'rtl' ? 'end' : 'start'" [swipeGesture]="false" >
<ion-content class="sidebar-menu" >
<div class="header-div">
<div class="centerDiv">
<p class="TxtPlace">{{ts.trPK('home','hello')}}, {{User_name_Emp}}</p>
<div> <img src="{{user_image}}" class="profileImg" ></div>
</div>
</div>
<ion-menu [side]=" direction === 'rtl' ? 'end' : 'start'" [swipeGesture]="false">
<ion-content class="sidebar-menu">
<div class="header-div">
<div class="centerDiv">
<p class="TxtPlace">{{ts.trPK('home','hello')}}, {{User_name_Emp}}</p>
<div> <img src="{{user_image}}" class="profileImg"></div>
</div>
</div>
<ion-list>
<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>
<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> -->
</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>
<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-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-router-outlet main></ion-router-outlet>
<ion-router-outlet main></ion-router-outlet>
</ion-split-pane>

@ -111,4 +111,5 @@ export class AppComponent implements OnInit, AfterViewInit {
this.cs.openProfile();
this.menu.toggle();
}
}

@ -17,8 +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 { SmsPagePage } from './sms-page/sms-page.page';
import { SmsPageComponent } from './sms-page/sms-page.page';
import { CheckUserComponent } from './check-user/check-user.component';
import { ChangePasswordComponent } from './change-password/change-password.component';
@ -41,11 +42,15 @@ const routes: Routes = [
},
{
path: 'smspage',
component: SmsPagePage
component: SmsPageComponent
},
{
path: 'checkuser',
component: CheckUserComponent
},
{
path: 'changepassowrd',
component: ChangePasswordComponent
}
]
}
@ -70,8 +75,9 @@ const routes: Routes = [
LoginComponent,
ForgotComponent,
AgreementComponent,
SmsPagePage,
CheckUserComponent
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();
}
});
}
}

@ -12,7 +12,7 @@ import { LoginRequest } from 'src/app/hmg-common/services/authentication/models/
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',
@ -77,7 +77,7 @@ export class CheckUserComponent implements OnInit {
console.log(result);
this.loginData.LogInTokenID = result.LogInTokenID;
this.loginData.P_USER_NAME = this.P_USER_NAME;
this.sharedData.setSharedData(this.loginData, "logindata");
this.sharedData.setSharedData(this.loginData, AuthenticationService.LOGIN_DATA);
this.sharedData.setSharedData(true,Password.IS_FORGET_PSW);
this.cs.stopLoading();
this.cs.openSMSPage();

@ -6,11 +6,10 @@ 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 { InternationalMobileComponent } from 'src/app/hmg-common/ui/mobile-number/international-mobile/international-mobile.component';
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',
@ -22,7 +21,6 @@ export class ForgotComponent implements OnInit {
public P_NEW_PASSWORD: string;
public P_Confirm_NEW_PASSWORD : string;
public P_USER_NAME : string;
@ViewChild(InternationalMobileComponent) internationlMobile: InternationalMobileComponent;
constructor(
public cs: CommonService,
public authService: AuthenticationService,
@ -58,7 +56,7 @@ export class ForgotComponent implements OnInit {
}
public forgotpassword(){
const data = this.sharedData.getSharedData("logindata", false);
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;

@ -12,6 +12,8 @@ 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';
@Component({
selector: "login",
@ -33,6 +35,7 @@ export class LoginComponent implements OnInit, OnDestroy {
private isMobileFingerPrint: boolean;
private FingerPrintPatientIdentificationID: string;
private loginData = new LoginModel();
constructor(
public cs: CommonService,
public authService: AuthenticationService,
@ -85,16 +88,28 @@ export class LoginComponent implements OnInit, OnDestroy {
request.P_PASSWORD = this.password;
console.log(request);
this.authService
.login(request, () => { }, this.ts.trPK("general", "ok"))
.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(result);
console.log("success");
this.cs.stopLoading();
if (this.cs.validResponse(result)) {
this.loginData.LogInTokenID = result.LogInTokenID;
this.loginData.MobileNumber = result.MemberLoginList.P_MOBILE_NUMBER;
this.sharedData.setSharedData(this.loginData, "logindata");
this.cs.stopLoading();
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();
// }
});
}
@ -102,8 +117,73 @@ export class LoginComponent implements OnInit, OnDestroy {
this.smsService.stopSMSMonitoring();
}
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 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();
}});
}
}

@ -3,6 +3,7 @@ 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;

@ -1,26 +0,0 @@
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 { SmsPagePage } from './sms-page.page';
const routes: Routes = [
{
path: '',
component: SmsPagePage
}
];
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
RouterModule.forChild(routes)
],
declarations: [SmsPagePage]
})
export class SmsPagePageModule {}

@ -15,11 +15,12 @@ import { Password } from "../models/password";
templateUrl: "./sms-page.page.html",
styleUrls: ["./sms-page.page.scss"]
})
export class SmsPagePage implements OnInit {
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;
@ -48,6 +49,8 @@ export class SmsPagePage implements OnInit {
this.startTimer();
this.isForgetPwd =
this.sharedData.getSharedData(Password.IS_FORGET_PSW) || false;
this.isExpiredPwd =
this.sharedData.getSharedData(Password.IS_EXPIRED_PSW) || false;
}
initTimer() {
@ -125,12 +128,14 @@ export class SmsPagePage implements OnInit {
}
public checkSMS() {
const data = this.sharedData.getSharedData("logindata", false);
const data = this.sharedData.getSharedData(AuthenticationService.LOGIN_DATA, false);
const request = new SMSCheckRequest();
(request.LogInTokenID = data.LogInTokenID),
(request.activationCode = this.activationCode);
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) => {
@ -144,12 +149,14 @@ export class SmsPagePage implements OnInit {
}
public checkForgetPwdSMS() {
const data = this.sharedData.getSharedData("logindata", false);
const data = this.sharedData.getSharedData(AuthenticationService.LOGIN_DATA, false);
const request = new SMSCheckRequest();
(request.LogInTokenID = data.LogInTokenID),
(request.activationCode = this.activationCode);
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"))
@ -157,7 +164,13 @@ export class SmsPagePage implements OnInit {
console.log(result);
if (this.common.validResponse(result)) {
console.log(result);
this.common.openForgotPassword();
if (this.isForgetPwd) {
this.common.openForgotPassword();
}
if(this.isExpiredPwd) {
this.sharedData.setSharedData(true,Password.IS_EXPIRED_PSW);
this.common.openChangePassword();
}
}
});
}

@ -62,12 +62,13 @@ export class AuthenticationService {
/*user checking methods */
public static userChecking = 'Services/ERP.svc/REST/Get_BasicUserInformation';
public static changePasswordForget ='Services/ERP.svc/REST/ChangePassword_Forget';
public static changePassword ='Services/ERP.svc/REST/ChangePassword_FromActiveSession';
public static expiredPassword = 'Services/ERP.svc/REST/ChangePassword_Expired';
public static LOGIN_EVENT = 'user-login-event';
public static FAMILY_LOGIN_EVENT = 'family-login-event';
public static AUTHENTICATED_USER_KEY = 'save-authenticated-user';
public static LOGIN_DATA="logindata";
// private static user: AuthenticatedUser;
@ -201,7 +202,7 @@ export class AuthenticationService {
* @param result check activation code result
*/
public setAuthenticatedUser(
result: CheckActivationCodeResponse
result: SMSCheckResponse
): Observable<boolean> {
return Observable.create(observer => {
this.loadAuthenticatedUser().subscribe(
@ -230,17 +231,17 @@ export class AuthenticationService {
this.publishUserChangeEvent();
}
public setAuthenticatedMemberFamilyUser(result: CheckActivationCodeResponse) {
const authUser = new AuthenticatedUser();
AuthenticationService.requireRelogin = false;
this.startIdleMonitoring();
const user = this.updateAuthenticatedUser(result, authUser);
// public setAuthenticatedMemberFamilyUser(result: CheckActivationCodeResponse) {
// const authUser = new AuthenticatedUser();
// AuthenticationService.requireRelogin = false;
// this.startIdleMonitoring();
// const user = this.updateAuthenticatedUser(result, authUser);
// user["hello"]= "ok";
/* we store in hd without token but with token in memory*/
AuthenticationService.user = user;
this.publishFamilyMemeberUserChangeEvent();
}
// // user["hello"]= "ok";
// /* we store in hd without token but with token in memory*/
// AuthenticationService.user = user;
// this.publishFamilyMemeberUserChangeEvent();
// }
public updateLoggedInUser(newUser: AuthenticatedUser): Observable<boolean> {
return Observable.create(observer => {
@ -297,7 +298,7 @@ export class AuthenticationService {
*update new authenticated user from previously stored and loaded user
*/
private updateAuthenticatedUser(
result: CheckActivationCodeResponse,
result: SMSCheckResponse,
loadedUser: AuthenticatedUser
): AuthenticatedUser {
const user = result.MemberInformationList[0];
@ -307,7 +308,7 @@ export class AuthenticationService {
user.CompanyImageDescription=result.CompanyImageDescription;
user.CompanyImageURL=result.CompanyImageURL;
user.LogInTokenID = this.cs.sharedService.getSharedData(
"logindata"
AuthenticationService.LOGIN_DATA
).LogInTokenID;
return user;
}
@ -406,7 +407,7 @@ export class AuthenticationService {
// this.getAuthenticatedUser()
//commented for now will uncomment when we are going to deploy on the device;
//observer.next(null);
observer.next(AuthenticationService.user);
observer.next(this.getAuthenticatedUser());
observer.complete();
}
);
@ -422,7 +423,11 @@ export class AuthenticationService {
return AuthenticationService.user;
}
*/
if(AuthenticationService.user){
return AuthenticationService.user;
}else{
this.cs.openLogin();
}
}
@ -491,6 +496,19 @@ export class AuthenticationService {
return this.con.post(AuthenticationService.changePasswordForget, request, onError, errorLabel);
}
public submitChangePassword(request: ForgetPassword, onError: any, errorLabel: string)
: Observable<CheckUserAuthenticationResponse> {
this.setPublicFields(request);
this.authenticateRequest(request);
return this.con.post(AuthenticationService.changePassword, request, onError, errorLabel);
}
public submitExpiredPassword(request: ForgetPassword, onError: any, errorLabel: string)
: Observable<CheckUserAuthenticationResponse> {
this.setPublicFields(request);
return this.con.post(AuthenticationService.expiredPassword, request, onError, errorLabel);
}
public sendSMSForForgotFileNumber(request: CheckUserAuthenticationRequest, onError: any, errorLabel: string)
: Observable<CheckUserAuthenticationResponse> {

@ -13,4 +13,5 @@ export class CheckActivationCodeResponse extends Response {
CompanyImageURL: string;
MemberInformationList:AuthenticatedUser[];
}

@ -13,4 +13,5 @@ export class SMSCheckResponse extends Response {
public CompanyImageDescription:string;
public CompanyImageURL:string;
public EMPLOYEE_MOBILE_NUMBER:string;
}

@ -887,15 +887,20 @@ export class CommonService {
*/
public openHome() {
this.nav.navigateForward(["/home"]);
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();

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

Loading…
Cancel
Save