configure app plugin
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"
|
||||
]
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -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();
|
||||
});
|
||||
});
|
||||
@ -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;
|
||||
}
|
||||
@ -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();
|
||||
}});
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,2 @@
|
||||
|
||||
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -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;
|
||||
}
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
}
|
||||
@ -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,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>
|
||||
@ -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…
Reference in New Issue