fixed moe issues

MOE_MAIN
umasoodch 3 years ago
parent adf9a1cf04
commit c79f494d44

@ -50,9 +50,6 @@
<splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-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-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
<splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" /> <splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
<feature name="SocialSharing">
<param name="android-package" value="nl.xservices.plugins.SocialSharing" />
</feature>
</platform> </platform>
<platform name="ios"> <platform name="ios">
<allow-intent href="itms:*" /> <allow-intent href="itms:*" />
@ -112,29 +109,21 @@
<plugin name="cordova-plugin-whitelist" spec="1.3.3" /> <plugin name="cordova-plugin-whitelist" spec="1.3.3" />
<plugin name="cordova-plugin-statusbar" spec="2.4.2" /> <plugin name="cordova-plugin-statusbar" spec="2.4.2" />
<plugin name="cordova-plugin-splashscreen" spec="5.0.2" /> <plugin name="cordova-plugin-splashscreen" spec="5.0.2" />
<plugin name="cordova-plugin-geolocation" spec="~4.0.1" />
<plugin name="cordova-plugin-datepicker" spec="~0.9.3" /> <plugin name="cordova-plugin-datepicker" spec="~0.9.3" />
<plugin name="cordova-plugin-ionic-webview" spec="4.1.0"> <plugin name="cordova-plugin-ionic-webview" spec="4.1.0">
<variable name="ANDROID_SUPPORT_ANNOTATIONS_VERSION" value="27.+" /> <variable name="ANDROID_SUPPORT_ANNOTATIONS_VERSION" value="27.+" />
</plugin> </plugin>
<plugin name="cordova-sqlite-storage" spec="^3.4.0" /> <plugin name="cordova-sqlite-storage" spec="^3.4.0" />
<plugin name="cordova-plugin-nativestorage" spec="^2.3.2" /> <plugin name="cordova-plugin-nativestorage" spec="^2.3.2" />
<plugin name="cordova-plugin-ble-central" spec="^1.2.4" />
<plugin name="uk.co.workingedge.phonegap.plugin.launchnavigator" spec="^3.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.1.0" />
<plugin name="cordova-plugin-globalization" spec="^1.11.0" /> <plugin name="cordova-plugin-globalization" spec="^1.11.0" />
<plugin name="cordova-plugin-android-permissions" spec="^1.0.2" /> <plugin name="cordova-plugin-android-permissions" spec="^1.0.2" />
<plugin name="cordova-plugin-device" spec="^2.0.3" /> <plugin name="cordova-plugin-device" spec="^2.0.3" />
<plugin name="cordova-plugin-local-notification" spec="^0.9.0-beta.2" /> <plugin name="cordova-plugin-local-notification" spec="^0.9.0-beta.2" />
<plugin name="cordova-plugin-badge" spec="^0.8.8" /> <plugin name="cordova-plugin-badge" spec="^0.8.8" />
<plugin name="cordova.plugins.diagnostic" spec="^5.0.1" /> <plugin name="cordova.plugins.diagnostic" spec="^5.0.1" />
<plugin name="phonegap-plugin-barcodescanner" spec="^8.1.0">
<variable name="ANDROID_SUPPORT_V4_VERSION" value="27.+" />
</plugin>
<plugin name="cordova-plugin-camera" spec="^4.1.0" /> <plugin name="cordova-plugin-camera" spec="^4.1.0" />
<plugin name="cordova-plugin-ionic-keyboard" spec="^2.2.0" /> <plugin name="cordova-plugin-ionic-keyboard" spec="^2.2.0" />
<plugin name="cordova-opentok-android-permissions" spec="^1.0.1" />
<plugin name="cordova-plugin-appavailability" spec="^0.4.2" /> <plugin name="cordova-plugin-appavailability" spec="^0.4.2" />
<plugin name="cordova-plugin-apprate" spec="^1.4.0" /> <plugin name="cordova-plugin-apprate" spec="^1.4.0" />
<plugin name="cordova-plugin-file" spec="^6.0.2" /> <plugin name="cordova-plugin-file" spec="^6.0.2" />

@ -24,11 +24,8 @@
"@ionic-native/android-permissions": "^5.18.0", "@ionic-native/android-permissions": "^5.18.0",
"@ionic-native/app-availability": "^5.18.0", "@ionic-native/app-availability": "^5.18.0",
"@ionic-native/app-rate": "^5.18.0", "@ionic-native/app-rate": "^5.18.0",
"@ionic-native/background-geolocation": "^5.30.0",
"@ionic-native/badge": "^5.18.0", "@ionic-native/badge": "^5.18.0",
"@ionic-native/barcode-scanner": "^5.18.0",
"@ionic-native/base64": "^5.18.0", "@ionic-native/base64": "^5.18.0",
"@ionic-native/ble": "^5.18.0",
"@ionic-native/camera": "^5.18.0", "@ionic-native/camera": "^5.18.0",
"@ionic-native/core": "^5.8.0", "@ionic-native/core": "^5.8.0",
"@ionic-native/date-picker": "^5.10.0", "@ionic-native/date-picker": "^5.10.0",
@ -41,24 +38,17 @@
"@ionic-native/file-picker": "^5.36.0", "@ionic-native/file-picker": "^5.36.0",
"@ionic-native/fingerprint-aio": "^5.18.0", "@ionic-native/fingerprint-aio": "^5.18.0",
"@ionic-native/firebase-x": "^5.34.0", "@ionic-native/firebase-x": "^5.34.0",
"@ionic-native/geolocation": "^5.10.0",
"@ionic-native/globalization": "^5.18.0", "@ionic-native/globalization": "^5.18.0",
"@ionic-native/health": "^5.4.0", "@ionic-native/health": "^5.4.0",
"@ionic-native/in-app-browser": "^5.17.0",
"@ionic-native/keyboard": "^5.17.0", "@ionic-native/keyboard": "^5.17.0",
"@ionic-native/launch-navigator": "^5.17.0", "@ionic-native/launch-navigator": "^5.17.0",
"@ionic-native/local-notifications": "^5.17.0", "@ionic-native/local-notifications": "^5.17.0",
"@ionic-native/native-storage": "^5.17.0", "@ionic-native/native-storage": "^5.17.0",
"@ionic-native/nfc": "^5.30.0",
"@ionic-native/open-native-settings": "^5.14.0", "@ionic-native/open-native-settings": "^5.14.0",
"@ionic-native/sms-retriever": "^5.36.0", "@ionic-native/sms-retriever": "^5.36.0",
"@ionic-native/social-sharing": "^5.34.0",
"@ionic-native/splash-screen": "^5.0.0", "@ionic-native/splash-screen": "^5.0.0",
"@ionic-native/sqlite": "^5.18.0", "@ionic-native/sqlite": "^5.18.0",
"@ionic-native/status-bar": "^5.0.0", "@ionic-native/status-bar": "^5.0.0",
"@ionic-native/themeable-browser": "^5.18.0",
"@ionic-native/wifi-wizard-2": "^5.31.1",
"@ionic-native/zbar": "^5.10.0",
"@ionic/angular": "^4.1.0", "@ionic/angular": "^4.1.0",
"@ng-bootstrap/ng-bootstrap": "^4.2.2", "@ng-bootstrap/ng-bootstrap": "^4.2.2",
"@swimlane/ngx-charts": "^10.1.0", "@swimlane/ngx-charts": "^10.1.0",
@ -69,7 +59,6 @@
"cordova-android": "^8.1.0", "cordova-android": "^8.1.0",
"cordova-android-support-gradle-release": "^3.0.1", "cordova-android-support-gradle-release": "^3.0.1",
"cordova-open-native-settings": "^1.5.2", "cordova-open-native-settings": "^1.5.2",
"cordova-opentok-android-permissions": "^1.0.1",
"cordova-plugin-actionsheet": "^2.3.3", "cordova-plugin-actionsheet": "^2.3.3",
"cordova-plugin-add-swift-support": "^2.0.2", "cordova-plugin-add-swift-support": "^2.0.2",
"cordova-plugin-android-permissions": "^1.0.2", "cordova-plugin-android-permissions": "^1.0.2",
@ -78,7 +67,6 @@
"cordova-plugin-appavailability": "^0.4.2", "cordova-plugin-appavailability": "^0.4.2",
"cordova-plugin-apprate": "^1.4.0", "cordova-plugin-apprate": "^1.4.0",
"cordova-plugin-badge": "^0.8.8", "cordova-plugin-badge": "^0.8.8",
"cordova-plugin-ble-central": "^1.2.4",
"cordova-plugin-camera": "^4.1.0", "cordova-plugin-camera": "^4.1.0",
"cordova-plugin-datepicker": "^0.9.3", "cordova-plugin-datepicker": "^0.9.3",
"cordova-plugin-device": "^2.0.3", "cordova-plugin-device": "^2.0.3",
@ -90,9 +78,7 @@
"cordova-plugin-filepicker": "^1.1.6", "cordova-plugin-filepicker": "^1.1.6",
"cordova-plugin-fingerprint-aio": "^3.0.0", "cordova-plugin-fingerprint-aio": "^3.0.0",
"cordova-plugin-firebasex": "^13.0.0", "cordova-plugin-firebasex": "^13.0.0",
"cordova-plugin-geolocation": "^4.0.2",
"cordova-plugin-globalization": "^1.11.0", "cordova-plugin-globalization": "^1.11.0",
"cordova-plugin-inappbrowser": "^3.1.0",
"cordova-plugin-ionic-keyboard": "^2.2.0", "cordova-plugin-ionic-keyboard": "^2.2.0",
"cordova-plugin-ionic-webview": "^4.1.0", "cordova-plugin-ionic-webview": "^4.1.0",
"cordova-plugin-local-notification": "^0.9.0-beta.2", "cordova-plugin-local-notification": "^0.9.0-beta.2",
@ -100,16 +86,12 @@
"cordova-plugin-sms-retriever-manager": "^1.0.3", "cordova-plugin-sms-retriever-manager": "^1.0.3",
"cordova-plugin-splashscreen": "^5.0.3", "cordova-plugin-splashscreen": "^5.0.3",
"cordova-plugin-statusbar": "^2.4.3", "cordova-plugin-statusbar": "^2.4.3",
"cordova-plugin-themeablebrowser": "^0.2.18",
"cordova-plugin-whitelist": "^1.3.4", "cordova-plugin-whitelist": "^1.3.4",
"cordova-plugin-wifiwizard2": "^3.1.1",
"cordova-plugin-x-socialsharing": "^6.0.3",
"cordova-sqlite-storage": "^3.4.0", "cordova-sqlite-storage": "^3.4.0",
"cordova-support-google-services": "^1.3.2", "cordova-support-google-services": "^1.3.2",
"cordova.plugins.diagnostic": "^5.0.1", "cordova.plugins.diagnostic": "^5.0.1",
"core-js": "^2.5.4", "core-js": "^2.5.4",
"date-fns": "^1.30.1", "date-fns": "^1.30.1",
"es6-promise-plugin": "^4.1.0",
"ionic2-calendar": "^0.5.8", "ionic2-calendar": "^0.5.8",
"ionic4-rating": "^1.0.9", "ionic4-rating": "^1.0.9",
"ng-circle-progress": "^1.5.1", "ng-circle-progress": "^1.5.1",
@ -117,8 +99,6 @@
"ng2-pdf-viewer": "^5.3.2", "ng2-pdf-viewer": "^5.3.2",
"ngx-gauge": "^1.0.0-beta.10", "ngx-gauge": "^1.0.0-beta.10",
"npm": "^6.14.11", "npm": "^6.14.11",
"phonegap-nfc": "^1.2.0",
"phonegap-plugin-barcodescanner": "^8.1.0",
"phonegap-plugin-multidex": "^1.0.0", "phonegap-plugin-multidex": "^1.0.0",
"primeicons": "^1.0.0", "primeicons": "^1.0.0",
"primeng": "^7.1.3", "primeng": "^7.1.3",
@ -145,8 +125,6 @@
"@types/node": "~10.12.0", "@types/node": "~10.12.0",
"codelyzer": "~4.5.0", "codelyzer": "~4.5.0",
"cordova-ios": "^6.2.0", "cordova-ios": "^6.2.0",
"cordova-plugin-wifiwizard2": "^3.1.1",
"es6-promise-plugin": "^4.1.0",
"jasmine-core": "~2.99.1", "jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1", "jasmine-spec-reporter": "~4.2.1",
"karma": "^4.0.1", "karma": "^4.0.1",
@ -173,10 +151,6 @@
"cordova-plugin-badge": {}, "cordova-plugin-badge": {},
"cordova-plugin-ionic-keyboard": {}, "cordova-plugin-ionic-keyboard": {},
"cordova-plugin-datepicker": {}, "cordova-plugin-datepicker": {},
"cordova-plugin-geolocation": {},
"phonegap-plugin-barcodescanner": {
"ANDROID_SUPPORT_V4_VERSION": "27.+"
},
"cordova-plugin-ionic-webview": { "cordova-plugin-ionic-webview": {
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+" "ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
}, },
@ -191,12 +165,8 @@
"cordova-plugin-filepath": {}, "cordova-plugin-filepath": {},
"com-badrit-base64": {}, "com-badrit-base64": {},
"cordova-sqlite-storage": {}, "cordova-sqlite-storage": {},
"cordova-plugin-ble-central": {},
"uk.co.workingedge.phonegap.plugin.launchnavigator": {}, "uk.co.workingedge.phonegap.plugin.launchnavigator": {},
"cordova-plugin-themeablebrowser": {},
"cordova-plugin-inappbrowser": {},
"cordova-plugin-local-notification": {}, "cordova-plugin-local-notification": {},
"cordova-opentok-android-permissions": {},
"cordova-plugin-appavailability": {}, "cordova-plugin-appavailability": {},
"cordova-plugin-apprate": {}, "cordova-plugin-apprate": {},
"cordova-plugin-fingerprint-aio": { "cordova-plugin-fingerprint-aio": {
@ -204,12 +174,6 @@
}, },
"cordova-plugin-androidx": {}, "cordova-plugin-androidx": {},
"cordova-plugin-androidx-adapter": {}, "cordova-plugin-androidx-adapter": {},
"cordova-plugin-background-geolocation": {
"GOOGLE_PLAY_SERVICES_VERSION": "+"
},
"phonegap-nfc": {},
"wifiwizard2": {},
"cordova-plugin-x-socialsharing": {},
"cordova-plugin-firebasex": { "cordova-plugin-firebasex": {
"FIREBASE_ANALYTICS_COLLECTION_ENABLED": "true", "FIREBASE_ANALYTICS_COLLECTION_ENABLED": "true",
"FIREBASE_PERFORMANCE_COLLECTION_ENABLED": "true", "FIREBASE_PERFORMANCE_COLLECTION_ENABLED": "true",
@ -246,8 +210,8 @@
"cordova-plugin-filechooser": {} "cordova-plugin-filechooser": {}
}, },
"platforms": [ "platforms": [
"android", "ios",
"ios" "android"
] ]
} }
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 294 KiB

After

Width:  |  Height:  |  Size: 285 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 KiB

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 763 KiB

After

Width:  |  Height:  |  Size: 743 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 MiB

After

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 324 KiB

After

Width:  |  Height:  |  Size: 307 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 KiB

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 813 KiB

After

Width:  |  Height:  |  Size: 786 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 MiB

After

Width:  |  Height:  |  Size: 2.3 MiB

@ -8,16 +8,16 @@ import { StatusBar } from '@ionic-native/status-bar/ngx';
import { AppComponent } from './app.component'; import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routing.module'; import { AppRoutingModule } from './app-routing.module';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { ZBar } from '@ionic-native/zbar/ngx'; // import { ZBar } from '@ionic-native/zbar/ngx';
import { Geolocation } from '@ionic-native/geolocation/ngx'; // import { Geolocation } from '@ionic-native/geolocation/ngx';
import {Camera, CameraOptions, PictureSourceType} from '@ionic-native/Camera/ngx'; import {Camera, CameraOptions, PictureSourceType} from '@ionic-native/Camera/ngx';
import { FilePath } from '@ionic-native/file-path/ngx'; import { FilePath } from '@ionic-native/file-path/ngx';
import { File } from '@ionic-native/file/ngx'; import { File } from '@ionic-native/file/ngx';
import { Base64 } from '@ionic-native/base64/ngx'; import { Base64 } from '@ionic-native/base64/ngx';
import { FirebaseX } from '@ionic-native/firebase-x/ngx'; import { FirebaseX } from '@ionic-native/firebase-x/ngx';
import { NgCalendarModule } from 'ionic2-calendar'; import { NgCalendarModule } from 'ionic2-calendar';
import { NFC, Ndef} from "@ionic-native/nfc/ngx" // import { NFC, Ndef} from "@ionic-native/nfc/ngx"
import { WifiWizard2 } from "@ionic-native/wifi-wizard-2/ngx"; // import { WifiWizard2 } from "@ionic-native/wifi-wizard-2/ngx";
import { DigitalIdComponent } from './authentication/digital-id/digital-id.component'; import { DigitalIdComponent } from './authentication/digital-id/digital-id.component';
import { BusinessCardComponent } from './authentication/business-card/business-card.component'; import { BusinessCardComponent } from './authentication/business-card/business-card.component';
import { AppUpdateComponent } from './authentication/app-update/app-update.component'; import { AppUpdateComponent } from './authentication/app-update/app-update.component';
@ -38,17 +38,17 @@ import { AppUpdateComponent } from './authentication/app-update/app-update.compo
providers: [ providers: [
StatusBar, StatusBar,
SplashScreen, SplashScreen,
ZBar, // ZBar,
Geolocation, // Geolocation,
Camera, Camera,
File, File,
FilePath, FilePath,
Base64, Base64,
FirebaseX, FirebaseX,
{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy }, { provide: RouteReuseStrategy, useClass: IonicRouteStrategy },
NFC, // NFC,
Ndef, // Ndef,
WifiWizard2 // WifiWizard2
], ],
bootstrap: [AppComponent] bootstrap: [AppComponent]
}) })

@ -1,6 +1,6 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { Geolocation } from '@ionic-native/geolocation/ngx'; // import { Geolocation } from '@ionic-native/geolocation/ngx';
import { ZBar, ZBarOptions } from '@ionic-native/zbar/ngx'; // import { ZBar, ZBarOptions } from '@ionic-native/zbar/ngx';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
@ -11,28 +11,28 @@ import { TranslatorService } from 'src/app/hmg-common/services/translator/transl
}) })
export class HomeComponent implements OnInit { export class HomeComponent implements OnInit {
zbarOptions: any; // zbarOptions: any;
scannedResult: any; scannedResult: any;
lat: any; lat: any;
longt: any; longt: any;
constructor(public ts: TranslatorService, private zbar: ZBar, private geolocation: Geolocation) { constructor(public ts: TranslatorService) {
this.zbarOptions = { // this.zbarOptions = {
flash: 'off', // flash: 'off',
drawSight: false // drawSight: false
}; // };
console.log('your currnt location is'); console.log('your currnt location is');
this.geolocation.getCurrentPosition().then((resp) => { // this.geolocation.getCurrentPosition().then((resp) => {
// resp.coords.latitude // // resp.coords.latitude
// resp.coords.longitude // // resp.coords.longitude
// console.log("Loc 2"); // // console.log("Loc 2");
console.log(resp.coords.latitude); // console.log(resp.coords.latitude);
console.log(resp.coords.longitude); // console.log(resp.coords.longitude);
this.lat = resp.coords.latitude; // this.lat = resp.coords.latitude;
this.longt = resp.coords.longitude; // this.longt = resp.coords.longitude;
}).catch((error) => { // }).catch((error) => {
console.log('Error getting location', error); // console.log('Error getting location', error);
}); // });
this.scanCode(); this.scanCode();
} }
@ -43,13 +43,13 @@ export class HomeComponent implements OnInit {
} }
scanCode() { scanCode() {
this.zbar.scan(this.zbarOptions) // this.zbar.scan(this.zbarOptions)
.then(result => { // .then(result => {
console.log(result); // Scanned code // console.log(result); // Scanned code
this.scannedResult = result; // this.scannedResult = result;
}) // })
.catch(error => { // .catch(error => {
alert(error); // Error message // alert(error); // Error message
}); // });
} }
} }

@ -2,9 +2,6 @@
height: 25vh; height: 25vh;
} }
ion-content {
--background: #f5f5f5;
}
.button-digital-id { .button-digital-id {
--background: white !important; --background: white !important;

@ -17,7 +17,7 @@ import { CheckUserAuthenticationResponse } from 'src/app/hmg-common/services/aut
import { LoginModel } from '../models/LoginModel'; import { LoginModel } from '../models/LoginModel';
import * as moment from 'moment'; import * as moment from 'moment';
import { CheckAppVersionResponse } from 'src/app/hmg-common/services/authentication/models/check-app-version.response'; import { CheckAppVersionResponse } from 'src/app/hmg-common/services/authentication/models/check-app-version.response';
import { NFC } from "@ionic-native/nfc/ngx"; // import { NFC } from "@ionic-native/nfc/ngx";
import { DigitalIdComponent } from '../digital-id/digital-id.component'; import { DigitalIdComponent } from '../digital-id/digital-id.component';
import { AppUpdateComponent } from '../app-update/app-update.component'; import { AppUpdateComponent } from '../app-update/app-update.component';
import { Password } from '../models/password'; import { Password } from '../models/password';
@ -69,7 +69,7 @@ export class ConfirmLoginComponent implements OnInit {
public platform: Platform, public platform: Platform,
public modalController: ModalController, public modalController: ModalController,
public alertController: AlertController, public alertController: AlertController,
private nfc: NFC, // private nfc: NFC,
private smsRetriever: SmsRetriever private smsRetriever: SmsRetriever
) { ) {
this.loginData = this.sharedData.getSharedData(AuthenticationService.LOGIN_DATA, false); this.loginData = this.sharedData.getSharedData(AuthenticationService.LOGIN_DATA, false);
@ -353,20 +353,20 @@ export class ConfirmLoginComponent implements OnInit {
} }
async checkNFCStatus() { async checkNFCStatus() {
try { // try {
let nfcStatus = await this.nfc.enabled(); // let nfcStatus = await this.nfc.enabled();
console.log("nfc status >>>>>>>>>>" + nfcStatus); // console.log("nfc status >>>>>>>>>>" + nfcStatus);
this.isNFCAvailable = true; // this.isNFCAvailable = true;
} catch (err) { // } catch (err) {
console.log("Error reading tag", err); // console.log("Error reading tag", err);
if (err === "NO_NFC") { // if (err === "NO_NFC") {
this.isNFCAvailable = false; // this.isNFCAvailable = false;
} else if (err === "NFC_DISABLED") { // } else if (err === "NFC_DISABLED") {
this.isNFCAvailable = true; // this.isNFCAvailable = true;
} else { // } else {
this.isNFCAvailable = false; // this.isNFCAvailable = false;
} // }
} // }
} }
public checkSMS() { public checkSMS() {

@ -24,7 +24,7 @@ import { GetLoginInfoRequest } from 'src/app/hmg-common/services/authentication/
import * as moment from 'moment'; import * as moment from 'moment';
import { NFC } from "@ionic-native/nfc/ngx"; // import { NFC } from "@ionic-native/nfc/ngx";
import { SmsRetriever } from '@ionic-native/sms-retriever/ngx'; import { SmsRetriever } from '@ionic-native/sms-retriever/ngx';
@ -125,7 +125,7 @@ export class SmsPageComponent implements OnInit {
public platform: Platform, public platform: Platform,
private nfc: NFC, // private nfc: NFC,
private smsRetriever: SmsRetriever private smsRetriever: SmsRetriever
@ -367,33 +367,33 @@ export class SmsPageComponent implements OnInit {
async checkNFCStatus() { async checkNFCStatus() {
try { // try {
let nfcStatus = await this.nfc.enabled(); // let nfcStatus = await this.nfc.enabled();
console.log("nfc status >>>>>>>>>>" + nfcStatus); // console.log("nfc status >>>>>>>>>>" + nfcStatus);
this.isNFCAvailable = true; // this.isNFCAvailable = true;
} catch (err) { // } catch (err) {
console.log("Error reading tag", err); // console.log("Error reading tag", err);
if (err === "NO_NFC") { // if (err === "NO_NFC") {
this.isNFCAvailable = false; // this.isNFCAvailable = false;
} else if (err === "NFC_DISABLED") { // } else if (err === "NFC_DISABLED") {
this.isNFCAvailable = true; // this.isNFCAvailable = true;
} else { // } else {
this.isNFCAvailable = false; // this.isNFCAvailable = false;
} // }
} // }
} }

@ -21,7 +21,7 @@ import { TranslatePipe } from './pipes/translate/translate.pipe';
import { DatePipeTransform } from './pipes/date/date.pipe'; import { DatePipeTransform } from './pipes/date/date.pipe';
import { AlertControllerService } from './ui/alert/alert-controller.service'; import { AlertControllerService } from './ui/alert/alert-controller.service';
import { DateTimePipe } from './pipes/date-time/date-time.pipe'; import { DateTimePipe } from './pipes/date-time/date-time.pipe';
import { ThemeableBrowser } from '@ionic-native/themeable-browser/ngx'; // import { ThemeableBrowser } from '@ionic-native/themeable-browser/ngx';
import { LaunchNavigator } from '@ionic-native/launch-navigator/ngx'; import { LaunchNavigator } from '@ionic-native/launch-navigator/ngx';
import { SafeHtmlPipe } from './pipes/safe-html/safe-html.pipe'; import { SafeHtmlPipe } from './pipes/safe-html/safe-html.pipe';
import { BackButtonComponent } from './ui/back-button/back-button.component'; import { BackButtonComponent } from './ui/back-button/back-button.component';
@ -78,7 +78,7 @@ import { RouterModule } from '@angular/router';
import { HeaderButtonComponent } from './ui/header-button/header-button.component'; import { HeaderButtonComponent } from './ui/header-button/header-button.component';
import { AppRate } from '@ionic-native/app-rate/ngx'; import { AppRate } from '@ionic-native/app-rate/ngx';
import { RatingService } from './services/rating/rating.service'; import { RatingService } from './services/rating/rating.service';
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx'; // import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
import { RateService } from './services/rate/rate.service'; import { RateService } from './services/rate/rate.service';
import { MenuService } from './services/menu/menuservice.service'; import { MenuService } from './services/menu/menuservice.service';
import { ReplacementListComponent } from '../vacation-rule/replacement-list/replacement-list.component'; import { ReplacementListComponent } from '../vacation-rule/replacement-list/replacement-list.component';
@ -99,7 +99,7 @@ import { ConfirmLoginComponent } from '../authentication/confirm-login/confirm-l
import { WelcomeComponent } from './ui/welcome-login/welcome.component' import { WelcomeComponent } from './ui/welcome-login/welcome.component'
import { FabButtonComponent } from './ui/fab-button/fab-button.component' import { FabButtonComponent } from './ui/fab-button/fab-button.component'
import { AttendScanService } from './services/attend-services/attend-scan.service'; import { AttendScanService } from './services/attend-services/attend-scan.service';
import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx'; // import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';
import { NgCircleProgressModule } from 'ng-circle-progress'; import { NgCircleProgressModule } from 'ng-circle-progress';
import { CardFilterComponent } from './ui/card-filter/card-filter.component'; import { CardFilterComponent } from './ui/card-filter/card-filter.component';
import { EmployeeInformationComponent } from './ui/employee-information/employee-information.component'; import { EmployeeInformationComponent } from './ui/employee-information/employee-information.component';
@ -108,7 +108,7 @@ import { NgCalendarModule } from 'ionic2-calendar';
import { DateInfoModalComponent } from './ui/circle-calendar/date-info-modal/date-info-modal.component'; import { DateInfoModalComponent } from './ui/circle-calendar/date-info-modal/date-info-modal.component';
import { ChartModule } from 'primeng/chart'; import { ChartModule } from 'primeng/chart';
import { GenericHeaderComponent } from './ui/generic-header/generic-header.component'; import { GenericHeaderComponent } from './ui/generic-header/generic-header.component';
import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx'; // import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx';
import { AttendanceOptionsComponent } from '../home/attendance-options/attendance-options.component'; import { AttendanceOptionsComponent } from '../home/attendance-options/attendance-options.component';
import { CardCalendarComponent } from './ui/card-calendar/card-calendar.component'; import { CardCalendarComponent } from './ui/card-calendar/card-calendar.component';
import { WorklistSettingComponent } from '../notification/worklist-setting/worklist-setting.component'; import { WorklistSettingComponent } from '../notification/worklist-setting/worklist-setting.component';
@ -287,7 +287,7 @@ import { SanitizeHtmlPipe } from '../itemforsale/services/domsafe';
Globalization, Globalization,
SharedDataService, SharedDataService,
AlertControllerService, AlertControllerService,
ThemeableBrowser, // ThemeableBrowser,
LaunchNavigator, LaunchNavigator,
ProjectsService, ProjectsService,
NationalityService, NationalityService,
@ -309,14 +309,14 @@ import { SanitizeHtmlPipe } from '../itemforsale/services/domsafe';
Diagnostic, Diagnostic,
AppRate, AppRate,
RatingService, RatingService,
InAppBrowser, // InAppBrowser,
RateService, RateService,
Camera, Camera,
File, File,
MenuService, MenuService,
OpenNativeSettings, OpenNativeSettings,
BarcodeScanner, // BarcodeScanner,
BackgroundGeolocation, // BackgroundGeolocation,
FileOpener, FileOpener,
FilePath, FilePath,
FileChooser, FileChooser,

@ -1,9 +1,9 @@
import { Injectable } from "@angular/core"; import { Injectable } from "@angular/core";
import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx'; // import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx';
import { CommonService } from "src/app/hmg-common/services/common/common.service"; import { CommonService } from "src/app/hmg-common/services/common/common.service";
import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service"; import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service";
import { DevicePermissionsService } from 'src/app/hmg-common/services/device-permissions/device-permissions.service'; import { DevicePermissionsService } from 'src/app/hmg-common/services/device-permissions/device-permissions.service';
import { Geolocation } from '@ionic-native/geolocation/ngx'; // import { Geolocation } from '@ionic-native/geolocation/ngx';
import { Platform } from "@ionic/angular"; import { Platform } from "@ionic/angular";
declare const cordova: any; declare const cordova: any;
@ -13,10 +13,10 @@ declare const cordova: any;
}) })
export class HMGUtils { export class HMGUtils {
constructor( constructor(
public backgroundGeolocation: BackgroundGeolocation, // public backgroundGeolocation: BackgroundGeolocation,
public common: CommonService, public common: CommonService,
public ts: TranslatorService, public ts: TranslatorService,
private geolocation: Geolocation, // private geolocation: Geolocation,
public platform: Platform, public platform: Platform,
public devicePermissionsService:DevicePermissionsService, public devicePermissionsService:DevicePermissionsService,
) { } ) { }
@ -98,32 +98,32 @@ export class HMGUtils {
} }
private getGMSLocation(callBack: Function) { private getGMSLocation(callBack: Function) {
this.backgroundGeolocation.getCurrentLocation({ timeout: 10000, enableHighAccuracy: true, maximumAge: 3000 }).then((resp) => { // this.backgroundGeolocation.getCurrentLocation({ timeout: 10000, enableHighAccuracy: true, maximumAge: 3000 }).then((resp) => {
if (resp && (resp.latitude && resp.longitude)) { // if (resp && (resp.latitude && resp.longitude)) {
const isFakeLocation = resp.isFromMockProvider || resp.mockLocationsEnabled; // const isFakeLocation = resp.isFromMockProvider || resp.mockLocationsEnabled;
const lat = resp.latitude; // const lat = resp.latitude;
const long = resp.longitude; // const long = resp.longitude;
callBack({"latitude":lat, "longitude":long, "isfake":isFakeLocation}) // callBack({"latitude":lat, "longitude":long, "isfake":isFakeLocation})
} else { // } else {
this.common.presentAlert(this.ts.trPK('home', 'position-error')); // this.common.presentAlert(this.ts.trPK('home', 'position-error'));
} // }
}, (error) => { // }, (error) => {
this.common.presentAlert(this.ts.trPK('home', 'position-error')); // this.common.presentAlert(this.ts.trPK('home', 'position-error'));
}); // });
} }
private getIOSLocation(callBack: Function) { private getIOSLocation(callBack: Function) {
this.geolocation.getCurrentPosition({ maximumAge: 3000, timeout: 10000, enableHighAccuracy: true }).then(resp => { // this.geolocation.getCurrentPosition({ maximumAge: 3000, timeout: 10000, enableHighAccuracy: true }).then(resp => {
if (resp && resp.coords.latitude && resp.coords.longitude) { // if (resp && resp.coords.latitude && resp.coords.longitude) {
const lat = resp.coords.latitude; // const lat = resp.coords.latitude;
const long = resp.coords.longitude; // const long = resp.coords.longitude;
callBack({"latitude":lat, "longitude":long, "isfake":false}) // callBack({"latitude":lat, "longitude":long, "isfake":false})
} else { // } else {
this.common.presentAlert(this.ts.trPK('home', 'position-error')); // this.common.presentAlert(this.ts.trPK('home', 'position-error'));
} // }
}).catch(error => { // }).catch(error => {
this.common.presentAlert(this.ts.trPK('home', 'position-error')); // this.common.presentAlert(this.ts.trPK('home', 'position-error'));
}); // });
} }

@ -2,10 +2,10 @@ import { Injectable } from '@angular/core';
// import { DevicePermissionsService } from '../device-permissions/device-permissions.service'; // import { DevicePermissionsService } from '../device-permissions/device-permissions.service';
import { DomSanitizer } from '@angular/platform-browser'; import { DomSanitizer } from '@angular/platform-browser';
import { SharedDataService } from '../shared-data-service/shared-data.service'; import { SharedDataService } from '../shared-data-service/shared-data.service';
import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx'; // import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';
import { AttendanceService } from 'src/app/home/services/attendance.services'; import { AttendanceService } from 'src/app/home/services/attendance.services';
import { ZBar } from '@ionic-native/zbar/ngx'; // import { ZBar } from '@ionic-native/zbar/ngx';
import { Geolocation } from '@ionic-native/geolocation/ngx'; // import { Geolocation } from '@ionic-native/geolocation/ngx';
import { attendanceSwipeScannerRequest } from 'src/app/home/models/attendanceSwipe.Request'; import { attendanceSwipeScannerRequest } from 'src/app/home/models/attendanceSwipe.Request';
import { AuthenticatedUser } from '../authentication/models/authenticated-user'; import { AuthenticatedUser } from '../authentication/models/authenticated-user';
import { CommonService } from '../common/common.service'; import { CommonService } from '../common/common.service';
@ -14,7 +14,7 @@ import { Response } from 'src/app/hmg-common/services/models/response';
import { Camera, CameraOptions, PictureSourceType} from '@ionic-native/Camera/ngx'; import { Camera, CameraOptions, PictureSourceType} from '@ionic-native/Camera/ngx';
import { DevicePermissionsService } from '../../services/device-permissions/device-permissions.service'; import { DevicePermissionsService } from '../../services/device-permissions/device-permissions.service';
import { Device } from '@ionic-native/device/ngx'; import { Device } from '@ionic-native/device/ngx';
import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx'; // import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx';
import { Platform } from '@ionic/angular'; import { Platform } from '@ionic/angular';
import { ModalController } from '@ionic/angular'; import { ModalController } from '@ionic/angular';
import { FirebaseX } from '@ionic-native/firebase-x/ngx'; import { FirebaseX } from '@ionic-native/firebase-x/ngx';
@ -37,17 +37,17 @@ export class AttendScanService {
public collection = 'CS'; public collection = 'CS';
constructor(private device: Device, constructor(private device: Device,
private zbar: ZBar, // private zbar: ZBar,
private geolocation: Geolocation, // private geolocation: Geolocation,
private attendance_service: AttendanceService, private attendance_service: AttendanceService,
private barcodeScanner: BarcodeScanner, // private barcodeScanner: BarcodeScanner,
private cameraController: Camera, private cameraController: Camera,
public sharedData: SharedDataService, public sharedData: SharedDataService,
private sanitizer: DomSanitizer, private sanitizer: DomSanitizer,
private permissions: DevicePermissionsService, private permissions: DevicePermissionsService,
public common: CommonService, public common: CommonService,
public ts: TranslatorService, public ts: TranslatorService,
public backgroundGeolocation: BackgroundGeolocation, // public backgroundGeolocation: BackgroundGeolocation,
public platform: Platform, public platform: Platform,
public modalController: ModalController, public modalController: ModalController,
public firebasex: FirebaseX, public firebasex: FirebaseX,
@ -135,22 +135,22 @@ export class AttendScanService {
} }
scanCode() { scanCode() {
this.barcodeScanner // this.barcodeScanner
.scan() // .scan()
.then(barcodeData => { // .then(barcodeData => {
if (!barcodeData.cancelled) { // if (!barcodeData.cancelled) {
this.scannedResult = barcodeData; // this.scannedResult = barcodeData;
this.deviceID = this.device.uuid; // this.deviceID = this.device.uuid;
if (this.isFakeLocationUsed) { // if (this.isFakeLocationUsed) {
this.fakeSwipeAttendance(); // this.fakeSwipeAttendance();
} else { // } else {
this.swipeAttendance(); // this.swipeAttendance();
} // }
} // }
}) // })
.catch(err => { // .catch(err => {
console.log('Error', err); // console.log('Error', err);
}); // });
} }
fakeSwipeAttendance() { fakeSwipeAttendance() {

@ -13,7 +13,7 @@ import { AlertControllerService } from '../../ui/alert/alert-controller.service'
//import { Response } from "../models/response"; //import { Response } from "../models/response";
import { Response } from 'src/app/hmg-common/services/models/response'; import { Response } from 'src/app/hmg-common/services/models/response';
import { Location, DatePipe } from '@angular/common'; import { Location, DatePipe } from '@angular/common';
import { ThemeableBrowser } from '@ionic-native/themeable-browser/ngx'; // import { ThemeableBrowser } from '@ionic-native/themeable-browser/ngx';
import { BrowserConfig } from './models/browser-config'; import { BrowserConfig } from './models/browser-config';
import { import {
LaunchNavigator, LaunchNavigator,
@ -26,7 +26,7 @@ import { SharedDataService } from '../shared-data-service/shared-data.service';
import { Badge } from '@ionic-native/badge/ngx'; import { Badge } from '@ionic-native/badge/ngx';
import { LifeCycleService } from '../life-cycle/life-cycle.service'; import { LifeCycleService } from '../life-cycle/life-cycle.service';
import { Diagnostic } from '@ionic-native/diagnostic/ngx'; import { Diagnostic } from '@ionic-native/diagnostic/ngx';
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx'; // import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
@ -105,7 +105,7 @@ export class CommonService {
public toastController: ToastController, public toastController: ToastController,
public alertController: AlertControllerService, public alertController: AlertControllerService,
public alertControllerIonic: AlertController, public alertControllerIonic: AlertController,
public themeableBrowser: ThemeableBrowser, // public themeableBrowser: ThemeableBrowser,
public launchNavigation: LaunchNavigator, public launchNavigation: LaunchNavigator,
public platform: Platform, public platform: Platform,
public device: Device, public device: Device,
@ -113,7 +113,7 @@ export class CommonService {
public badge: Badge, public badge: Badge,
public lifeCycle: LifeCycleService, public lifeCycle: LifeCycleService,
public diagnostic: Diagnostic, public diagnostic: Diagnostic,
public iab: InAppBrowser, // public iab: InAppBrowser,
private menu: MenuController, private menu: MenuController,
) { } ) { }
@ -683,52 +683,52 @@ export class CommonService {
onSuccess?, onSuccess?,
successURLS?: string[] successURLS?: string[]
) { ) {
this.platform.ready().then(() => { // this.platform.ready().then(() => {
const browser = this.iab.create( // const browser = this.iab.create(
url, // url,
'_blank', // '_blank',
'closebuttoncolor=#60686b,hidenavigationbuttons=yes,hideurlbar=yes,zoom=no' // 'closebuttoncolor=#60686b,hidenavigationbuttons=yes,hideurlbar=yes,zoom=no'
); // );
// browser.executeScript(...); // // browser.executeScript(...);
// browser.insertCSS(...); // // browser.insertCSS(...);
browser.on('loaderror').subscribe(event => { // browser.on('loaderror').subscribe(event => {
if (onFaild) { // if (onFaild) {
onFaild(); // onFaild();
} // }
browser.close(); // browser.close();
}); // });
/* // /*
browser.on('loadstop').subscribe(event => { // browser.on('loadstop').subscribe(event => {
// browser.insertCSS({ code: 'body{color: white;}' }); // // browser.insertCSS({ code: 'body{color: white;}' });
if (onSuccess) { // if (onSuccess) {
onSuccess(); // onSuccess();
} // }
}); // });
*/ // */
browser.on('exit').subscribe(event => { // browser.on('exit').subscribe(event => {
if (onExit) { // if (onExit) {
onExit(); // onExit();
} // }
}); // });
browser.on('loadstart').subscribe(event => { // browser.on('loadstart').subscribe(event => {
if (successURLS) { // if (successURLS) {
successURLS.forEach((successURL, index) => { // successURLS.forEach((successURL, index) => {
if (event.url && event.url.indexOf(successURL) >= 0) { // if (event.url && event.url.indexOf(successURL) >= 0) {
// alert('load start found success url'); // // alert('load start found success url');
browser.close(); // browser.close();
if (onSuccess) { // if (onSuccess) {
onSuccess(); // onSuccess();
} // }
} // }
}); // });
} // }
}); // });
}); // });
} }
public imageFromBase64(base64: string) { public imageFromBase64(base64: string) {

@ -1,64 +1,64 @@
import { ThemeableBrowserOptions } from '@ionic-native/themeable-browser/ngx'; // import { ThemeableBrowserOptions } from '@ionic-native/themeable-browser/ngx';
export class BrowserConfig { export class BrowserConfig {
public static OPTIONS: ThemeableBrowserOptions = { // public static OPTIONS: ThemeableBrowserOptions = {
statusbar: { // statusbar: {
color: '#ffffffff' // color: '#ffffffff'
}, // },
toolbar: { // toolbar: {
height: 44, // height: 44,
color: '#f0f0f0ff' // color: '#f0f0f0ff'
}, // },
title: { // title: {
color: '#003264ff', // color: '#003264ff',
showPageTitle: true // showPageTitle: true
}, // },
backButton: { // backButton: {
image: 'back', // image: 'back',
imagePressed: 'back_pressed', // imagePressed: 'back_pressed',
align: 'left', // align: 'left',
event: 'backPressed' // event: 'backPressed'
}, // },
forwardButton: { // forwardButton: {
image: 'forward', // image: 'forward',
imagePressed: 'forward_pressed', // imagePressed: 'forward_pressed',
align: 'left', // align: 'left',
event: 'forwardPressed' // event: 'forwardPressed'
}, // },
closeButton: { // closeButton: {
image: 'close', // image: 'close',
imagePressed: 'close_pressed', // imagePressed: 'close_pressed',
align: 'left', // align: 'left',
event: 'closePressed' // event: 'closePressed'
}, // },
customButtons: [ // customButtons: [
{ // {
image: 'share', // image: 'share',
imagePressed: 'share_pressed', // imagePressed: 'share_pressed',
align: 'right', // align: 'right',
event: 'sharePressed' // event: 'sharePressed'
} // }
], // ],
menu: { // menu: {
image: 'menu', // image: 'menu',
imagePressed: 'menu_pressed', // imagePressed: 'menu_pressed',
title: 'Test', // title: 'Test',
cancel: 'Cancel', // cancel: 'Cancel',
align: 'right', // align: 'right',
items: [ // items: [
{ // {
event: 'helloPressed', // event: 'helloPressed',
label: 'Hello World!' // label: 'Hello World!'
}, // },
{ // {
event: 'testPressed', // event: 'testPressed',
label: 'Test!' // label: 'Test!'
} // }
] // ]
}, // },
backButtonCanClose: true, // backButtonCanClose: true,
clearcache: true, // clearcache: true,
clearsessioncache: true, // clearsessioncache: true,
disallowoverscroll: 'yes' // disallowoverscroll: 'yes'
}; // };
} }

@ -27,7 +27,7 @@ export class ConnectorService {
public static retryTimes = 0; public static retryTimes = 0;
public static timeOut = 180 * 1000; public static timeOut = 180 * 1000;
//public static host = 'https://uat.hmgwebservices.com/'; // public static host = 'https://uat.hmgwebservices.com/';
// public static host = 'https://hmgwebservices.com/'; // public static host = 'https://hmgwebservices.com/';
// public static host = 'http://10.0.50.241:1010/' // MOE vpn // public static host = 'http://10.0.50.241:1010/' // MOE vpn
public static host = 'https://hrmsys.moenergy.gov.sa/' public static host = 'https://hrmsys.moenergy.gov.sa/'

@ -1,74 +1,74 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { ThemeableBrowser, ThemeableBrowserOptions, ThemeableBrowserObject } from '@ionic-native/themeable-browser/ngx'; // import { ThemeableBrowser, ThemeableBrowserOptions, ThemeableBrowserObject } from '@ionic-native/themeable-browser/ngx';
import { Platform } from '@ionic/angular'; import { Platform } from '@ionic/angular';
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
}) })
export class HmgBrowserService { export class HmgBrowserService {
static options: ThemeableBrowserOptions = { // static options: ThemeableBrowserOptions = {
statusbar: { // statusbar: {
color: '#ffffffff' // color: '#ffffffff'
}, // },
toolbar: { // toolbar: {
height: 44, // height: 44,
color: '#f0f0f0ff' // color: '#f0f0f0ff'
}, // },
title: { // title: {
color: '#60686b', // color: '#60686b',
showPageTitle: true // showPageTitle: true
}, // },
backButton: { // backButton: {
image: 'back', // image: 'back',
imagePressed: 'back_pressed', // imagePressed: 'back_pressed',
align: 'left', // align: 'left',
event: 'backPressed' // event: 'backPressed'
}, // },
forwardButton: { // forwardButton: {
image: 'forward', // image: 'forward',
imagePressed: 'forward_pressed', // imagePressed: 'forward_pressed',
align: 'left', // align: 'left',
event: 'forwardPressed' // event: 'forwardPressed'
}, // },
closeButton: { // closeButton: {
image: 'close', // image: 'close',
imagePressed: 'close_pressed', // imagePressed: 'close_pressed',
align: 'left', // align: 'left',
event: 'closePressed' // event: 'closePressed'
}, // },
/* // /*
customButtons: [ // customButtons: [
{ // {
image: 'share', // image: 'share',
imagePressed: 'share_pressed', // imagePressed: 'share_pressed',
align: 'right', // align: 'right',
event: 'sharePressed' // event: 'sharePressed'
} // }
], // ],
menu: { // menu: {
image: 'menu', // image: 'menu',
imagePressed: 'menu_pressed', // imagePressed: 'menu_pressed',
title: 'Test', // title: 'Test',
cancel: 'Cancel', // cancel: 'Cancel',
align: 'right', // align: 'right',
items: [ // items: [
{ // {
event: 'helloPressed', // event: 'helloPressed',
label: 'Hello World!' // label: 'Hello World!'
}, // },
{ // {
event: 'testPressed', // event: 'testPressed',
label: 'Test!' // label: 'Test!'
} // }
] // ]
}, // },
*/ // */
backButtonCanClose: true // backButtonCanClose: true
}; // };
private browser: ThemeableBrowserObject; // private browser: ThemeableBrowserObject;
constructor( constructor(
private themeableBrowser: ThemeableBrowser, // private themeableBrowser: ThemeableBrowser,
private platform: Platform private platform: Platform
) { } ) { }
@ -81,18 +81,18 @@ export class HmgBrowserService {
} }
private registerEvent(eventName: string, event: any) { private registerEvent(eventName: string, event: any) {
if (this.browser) { // if (this.browser) {
this.browser.on(eventName).subscribe((data: any) => { // this.browser.on(eventName).subscribe((data: any) => {
if (event) { // if (event) {
event(); // event();
} // }
}); // });
} // }
} }
public openURLThemable(url: string) { public openURLThemable(url: string) {
this.platform.ready().then(() => { this.platform.ready().then(() => {
this.browser = this.themeableBrowser.create(url, '_blank', HmgBrowserService.options); // this.browser = this.themeableBrowser.create(url, '_blank', HmgBrowserService.options);
}); });
} }

@ -1,4 +1,4 @@
<ion-content has-bouncing="false" class="ion-no-padding" > <ion-content has-bouncing="false" class="ion-no-padding" style="position: inherit !important;">
<ion-grid padding> <ion-grid padding>
<!-- <ion-row> <!-- <ion-row>
<ion-col [size]="12"> <ion-col [size]="12">
@ -13,7 +13,7 @@
<ion-row> <ion-row style="margin-top: 50px;">
<ion-col [size]="12"> <ion-col [size]="12">
<h1 class="heading1">{{welcome}} </h1> <h1 class="heading1">{{welcome}} </h1>
<p *ngIf="!user" class="text1">{{welcome_txt}} </p> <p *ngIf="!user" class="text1">{{welcome_txt}} </p>

@ -67,6 +67,10 @@
line-height: 1.5; line-height: 1.5;
} }
.heading1{
font-size: 26px !important;
}
.button-digital-id{ .button-digital-id{
--background: white !important; --background: white !important;
background: white !important; background: white !important;

@ -1,5 +1,5 @@
import { Component, OnInit, NgZone, VERSION } from "@angular/core"; import { Component, OnInit, NgZone, VERSION } from "@angular/core";
import { NFC } from "@ionic-native/nfc/ngx"; // import { NFC } from "@ionic-native/nfc/ngx";
import { CommonService } from "src/app/hmg-common/services/common/common.service"; import { CommonService } from "src/app/hmg-common/services/common/common.service";
import { Platform } from "@ionic/angular"; import { Platform } from "@ionic/angular";
import { AttendScanService } from "../../hmg-common/services/attend-services/attend-scan.service"; import { AttendScanService } from "../../hmg-common/services/attend-services/attend-scan.service";
@ -13,11 +13,11 @@ import { attendanceSwipeScannerRequest } from "src/app/home/models/attendanceSwi
import { Device } from "@ionic-native/device/ngx"; import { Device } from "@ionic-native/device/ngx";
import { AttendanceService } from "src/app/home/services/attendance.services"; import { AttendanceService } from "src/app/home/services/attendance.services";
import { Response } from "src/app/hmg-common/services/models/response"; import { Response } from "src/app/hmg-common/services/models/response";
import { WifiWizard2 } from "@ionic-native/wifi-wizard-2/ngx"; // import { WifiWizard2 } from "@ionic-native/wifi-wizard-2/ngx";
import { OpenNativeSettings } from '@ionic-native/open-native-settings/ngx'; import { OpenNativeSettings } from '@ionic-native/open-native-settings/ngx';
import { DevicePermissionsService } from 'src/app/hmg-common/services/device-permissions/device-permissions.service'; import { DevicePermissionsService } from 'src/app/hmg-common/services/device-permissions/device-permissions.service';
import { Geolocation } from '@ionic-native/geolocation/ngx'; // import { Geolocation } from '@ionic-native/geolocation/ngx';
import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx'; // import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx';
import { FirebaseX } from '@ionic-native/firebase-x/ngx'; import { FirebaseX } from '@ionic-native/firebase-x/ngx';
import { HMGUtils } from 'src/app/hmg-common/hmg_utils'; import { HMGUtils } from 'src/app/hmg-common/hmg_utils';
@ -53,7 +53,7 @@ export class AttendanceOptionsComponent implements OnInit {
constructor( constructor(
private nfc: NFC, // private nfc: NFC,
public common: CommonService, public common: CommonService,
public platform: Platform, public platform: Platform,
public attendScanService: AttendScanService, public attendScanService: AttendScanService,
@ -62,11 +62,11 @@ export class AttendanceOptionsComponent implements OnInit {
private device: Device, private device: Device,
private attendance_service: AttendanceService, private attendance_service: AttendanceService,
public ngZone: NgZone, public ngZone: NgZone,
private wifiWizard2: WifiWizard2, // private wifiWizard2: WifiWizard2,
private openNativeSettings: OpenNativeSettings, private openNativeSettings: OpenNativeSettings,
private devicePermissionsService:DevicePermissionsService, private devicePermissionsService:DevicePermissionsService,
private geolocation: Geolocation, // private geolocation: Geolocation,
public backgroundGeolocation: BackgroundGeolocation, // public backgroundGeolocation: BackgroundGeolocation,
public hmgUtils: HMGUtils public hmgUtils: HMGUtils
) {} ) {}
@ -88,31 +88,31 @@ export class AttendanceOptionsComponent implements OnInit {
} }
async checkNFCStatus(checkValue: string) { async checkNFCStatus(checkValue: string) {
try { // try {
let nfcStatus = await this.nfc.enabled(); // let nfcStatus = await this.nfc.enabled();
console.log("nfc status >>>>>>>>>>" + nfcStatus); // console.log("nfc status >>>>>>>>>>" + nfcStatus);
if (nfcStatus === "NFC_OK") { // if (nfcStatus === "NFC_OK") {
this.deviceNFC = true; // this.deviceNFC = true;
if (checkValue === "two") { // if (checkValue === "two") {
this.startNFC(); // this.startNFC();
} // }
} // }
if (nfcStatus === null && checkValue === "two") { // if (nfcStatus === null && checkValue === "two") {
this.startNFC(); // this.startNFC();
} // }
} catch (err) { // } catch (err) {
console.log("Error reading tag", err); // console.log("Error reading tag", err);
if (err === "NO_NFC") { // if (err === "NO_NFC") {
this.deviceNFC = false; // this.deviceNFC = false;
} else if (err === "NFC_DISABLED") { // } else if (err === "NFC_DISABLED") {
this.deviceNFC = true; // this.deviceNFC = true;
if (checkValue === "two") { // if (checkValue === "two") {
this.common.presentAlert(this.ts.trPK("general", "nfc-settings")); // this.common.presentAlert(this.ts.trPK("general", "nfc-settings"));
} // }
} else if (checkValue === "two") { // } else if (checkValue === "two") {
this.common.presentAlert(this.ts.trPK("general", "nfc-error")); // this.common.presentAlert(this.ts.trPK("general", "nfc-error"));
} // }
} // }
} }
public setServicesPrivilage() { public setServicesPrivilage() {
@ -154,15 +154,15 @@ export class AttendanceOptionsComponent implements OnInit {
} }
async startIOSNfc() { async startIOSNfc() {
try { // try {
let tag = await this.nfc.scanTag(); // let tag = await this.nfc.scanTag();
console.log(JSON.stringify(tag)); // console.log(JSON.stringify(tag));
const serialNumber = this.nfc.bytesToHexString(tag.id); // const serialNumber = this.nfc.bytesToHexString(tag.id);
this.swipeAttendanceNFC(serialNumber); // this.swipeAttendanceNFC(serialNumber);
} catch (err) { // } catch (err) {
this.common.presentAlert(this.ts.trPK("general", "nfc-error")); // this.common.presentAlert(this.ts.trPK("general", "nfc-error"));
console.log("Error reading tag", err); // console.log("Error reading tag", err);
} // }
} }
public async nfcModal() { public async nfcModal() {
@ -243,38 +243,38 @@ export class AttendanceOptionsComponent implements OnInit {
public async startWifi() { public async startWifi() {
const isAndroid = this.platform.is("android"); const isAndroid = this.platform.is("android");
const isIOS = this.platform.is("ios"); const isIOS = this.platform.is("ios");
const isWifiEnabled = await this.wifiWizard2.isWifiEnabled(); // const isWifiEnabled = await this.wifiWizard2.isWifiEnabled();
const versionType = this.device.version; const versionType = this.device.version;
const versionTypeInt = parseInt(versionType); const versionTypeInt = parseInt(versionType);
console.log('version type: ' + versionType); console.log('version type: ' + versionType);
console.log('version Type: ' + versionTypeInt); console.log('version Type: ' + versionTypeInt);
if(isAndroid && versionTypeInt > 10) { if(isAndroid && versionTypeInt > 10) {
if(!isWifiEnabled){ // if(!isWifiEnabled){
this.showWifiNotEnabled(); // this.showWifiNotEnabled();
return; // return;
} // }
} }
if (isIOS) { if (isIOS) {
if(!isWifiEnabled){ // if(!isWifiEnabled){
this.showWifiNotEnabled(); // this.showWifiNotEnabled();
return; // return;
} // }
} else if(isAndroid) { } else if(isAndroid) {
let locationPermission = await this.devicePermissionsService.requestLocationAutherization(); let locationPermission = await this.devicePermissionsService.requestLocationAutherization();
if (!locationPermission) { if (!locationPermission) {
return; return;
} }
if(!isWifiEnabled){ // if(!isWifiEnabled){
this.wifiWizard2.setWifiEnabled(true).then(()=>{ // this.wifiWizard2.setWifiEnabled(true).then(()=>{
this.startWifi(); // this.startWifi();
}).catch((err) => { // }).catch((err) => {
console.debug(err); // console.debug(err);
}); // });
return; // return;
} // }
} }
// opening wifi dailog if all above conditions are passed (isWifiEnabled == true) // opening wifi dailog if all above conditions are passed (isWifiEnabled == true)
let modal = await this.modalController.create({ let modal = await this.modalController.create({

@ -5,7 +5,7 @@ import { Routes, RouterModule } from '@angular/router';
import { HmgCommonModule } from '../hmg-common/hmg-common.module'; import { HmgCommonModule } from '../hmg-common/hmg-common.module';
import { IonicModule } from '@ionic/angular'; import { IonicModule } from '@ionic/angular';
import { HomePage } from './home.page'; import { HomePage } from './home.page';
import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx'; // import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';
import { WorklistMainService } from '../notification/service/work-list.main.service'; import { WorklistMainService } from '../notification/service/work-list.main.service';
import { AttendanceOptionsComponent } from './attendance-options/attendance-options.component'; import { AttendanceOptionsComponent } from './attendance-options/attendance-options.component';
import { NfcModalComponent } from './nfc-modal/nfc-modal.component'; import { NfcModalComponent } from './nfc-modal/nfc-modal.component';
@ -36,7 +36,7 @@ const routes: Routes = [
WifiModalComponent WifiModalComponent
], ],
providers: [ providers: [
BarcodeScanner, // BarcodeScanner,
WorklistMainService WorklistMainService
], ],
entryComponents: [ entryComponents: [

@ -7,8 +7,8 @@ import { AuthenticatedUser } from 'src/app/hmg-common/services/authentication/mo
import { MenuService } from 'src/app/hmg-common/services/menu/menuservice.service'; import { MenuService } from 'src/app/hmg-common/services/menu/menuservice.service';
import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response'; import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response';
import { CommonService } from 'src/app/hmg-common/services/common/common.service'; import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { Geolocation } from '@ionic-native/geolocation/ngx'; // import { Geolocation } from '@ionic-native/geolocation/ngx';
import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx'; // import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';
import { Device } from '@ionic-native/device/ngx'; import { Device } from '@ionic-native/device/ngx';
import { attendanceSwipeScannerRequest } from './models/attendanceSwipe.Request'; import { attendanceSwipeScannerRequest } from './models/attendanceSwipe.Request';
import { COCRequest } from 'src/app/notification/models/COCRequest'; import { COCRequest } from 'src/app/notification/models/COCRequest';
@ -37,8 +37,8 @@ import { TimeCardService } from '../time-card/service/time-card.service';
import { WorklistMainService } from '../notification/service/work-list.main.service'; import { WorklistMainService } from '../notification/service/work-list.main.service';
import { isThisISOWeek } from 'date-fns'; import { isThisISOWeek } from 'date-fns';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx'; // import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx';
import { NFC, Ndef } from "@ionic-native/nfc/ngx" // import { NFC, Ndef } from "@ionic-native/nfc/ngx"
import { DigitalIdComponent } from '../authentication/digital-id/digital-id.component'; import { DigitalIdComponent } from '../authentication/digital-id/digital-id.component';
import { FirebaseX } from '@ionic-native/firebase-x/ngx'; import { FirebaseX } from '@ionic-native/firebase-x/ngx';
import { BusinessCardComponent } from "src/app/authentication/business-card/business-card.component"; import { BusinessCardComponent } from "src/app/authentication/business-card/business-card.component";
@ -54,7 +54,7 @@ export class HomePage implements OnInit {
userData: any = {}; userData: any = {};
userImage: any = '../assets/imgs/profile.png'; userImage: any = '../assets/imgs/profile.png';
menuList: any = []; menuList: any = [];
zbarOptions: any; // zbarOptions: any;
scannedResult: any; scannedResult: any;
notBadge: any; notBadge: any;
lat: any; lat: any;
@ -144,10 +144,10 @@ export class HomePage implements OnInit {
public common: CommonService, public common: CommonService,
public events: Events, public events: Events,
private device: Device, private device: Device,
private geolocation: Geolocation, // private geolocation: Geolocation,
private attendanceService: AttendanceService, private attendanceService: AttendanceService,
private eitService: EitService, private eitService: EitService,
private barcodeScanner: BarcodeScanner, // private barcodeScanner: BarcodeScanner,
public actionSheetCtrl: ActionSheetController, public actionSheetCtrl: ActionSheetController,
public sharedData: SharedDataService, public sharedData: SharedDataService,
private sanitizer: DomSanitizer, private sanitizer: DomSanitizer,
@ -159,9 +159,9 @@ export class HomePage implements OnInit {
public workListService: WorklistMainService, public workListService: WorklistMainService,
public router: Router, public router: Router,
private platform: Platform, private platform: Platform,
public backgroundGeolocation: BackgroundGeolocation, // public backgroundGeolocation: BackgroundGeolocation,
public modalController: ModalController, public modalController: ModalController,
private nfc: NFC, // private nfc: NFC,
public firebasex: FirebaseX public firebasex: FirebaseX
) { ) {
this.events.subscribe('img-change', displayImg => { this.events.subscribe('img-change', displayImg => {
@ -272,32 +272,32 @@ export class HomePage implements OnInit {
this.location = granted as boolean; this.location = granted as boolean;
if (this.location) { if (this.location) {
if (this.platform.is('android')) { if (this.platform.is('android')) {
this.backgroundGeolocation.getCurrentLocation({ timeout: 10000, enableHighAccuracy: true, maximumAge: 3000 }).then((resp) => { // this.backgroundGeolocation.getCurrentLocation({ timeout: 10000, enableHighAccuracy: true, maximumAge: 3000 }).then((resp) => {
if (resp && (resp.latitude && resp.longitude)) { // if (resp && (resp.latitude && resp.longitude)) {
if (resp.isFromMockProvider || resp.mockLocationsEnabled) { // if (resp.isFromMockProvider || resp.mockLocationsEnabled) {
this.isFakeLocationUsed = true; // this.isFakeLocationUsed = true;
} // }
this.lat = resp.latitude; // this.lat = resp.latitude;
this.longt = resp.longitude; // this.longt = resp.longitude;
this.attendance(); // this.attendance();
} else { // } else {
this.common.presentAlert(this.ts.trPK('home', 'position-error')); // this.common.presentAlert(this.ts.trPK('home', 'position-error'));
} // }
}, (error) => { // }, (error) => {
this.common.presentAlert(this.ts.trPK('home', 'position-error')); // this.common.presentAlert(this.ts.trPK('home', 'position-error'));
}); // });
} else { } else {
this.geolocation.getCurrentPosition({ maximumAge: 3000, timeout: 10000, enableHighAccuracy: true }).then(resp => { // this.geolocation.getCurrentPosition({ maximumAge: 3000, timeout: 10000, enableHighAccuracy: true }).then(resp => {
if (resp && resp.coords.latitude && resp.coords.longitude) { // if (resp && resp.coords.latitude && resp.coords.longitude) {
this.lat = resp.coords.latitude; // this.lat = resp.coords.latitude;
this.longt = resp.coords.longitude; // this.longt = resp.coords.longitude;
this.attendance(); // this.attendance();
} else { // } else {
this.common.presentAlert(this.ts.trPK('home', 'position-error')); // this.common.presentAlert(this.ts.trPK('home', 'position-error'));
} // }
}).catch(error => { // }).catch(error => {
this.common.presentAlert(this.ts.trPK('home', 'position-error')); // this.common.presentAlert(this.ts.trPK('home', 'position-error'));
}); // });
} }
} else { } else {
return false; return false;
@ -551,22 +551,22 @@ export class HomePage implements OnInit {
} }
scanCode() { scanCode() {
this.barcodeScanner // this.barcodeScanner
.scan() // .scan()
.then(barcodeData => { // .then(barcodeData => {
if (!barcodeData.cancelled) { // if (!barcodeData.cancelled) {
this.scannedResult = barcodeData; // this.scannedResult = barcodeData;
this.deviceID = this.device.uuid; // this.deviceID = this.device.uuid;
if (this.isFakeLocationUsed) { // if (this.isFakeLocationUsed) {
this.fakeSwipeAttendance(); // this.fakeSwipeAttendance();
} else { // } else {
this.swipeAttendance(); // this.swipeAttendance();
} // }
} // }
}) // })
.catch(err => { // .catch(err => {
console.log('Error', err); // console.log('Error', err);
}); // });
} }
fakeSwipeAttendance() { fakeSwipeAttendance() {

@ -1,5 +1,5 @@
import { Component, OnInit, NgZone } from '@angular/core'; import { Component, OnInit, NgZone } from '@angular/core';
import { NFC } from "@ionic-native/nfc/ngx" // import { NFC } from "@ionic-native/nfc/ngx"
import { CommonService } from 'src/app/hmg-common/services/common/common.service'; import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import {AttendScanService} from '../../hmg-common/services/attend-services/attend-scan.service'; import {AttendScanService} from '../../hmg-common/services/attend-services/attend-scan.service';
import { attendanceSwipeScannerRequest } from 'src/app/home/models/attendanceSwipe.Request'; import { attendanceSwipeScannerRequest } from 'src/app/home/models/attendanceSwipe.Request';
@ -24,7 +24,7 @@ export class NfcModalComponent implements OnInit {
public longt: number; public longt: number;
constructor( constructor(
private nfc: NFC, // private nfc: NFC,
public common: CommonService, public common: CommonService,
public attendScanService: AttendScanService, public attendScanService: AttendScanService,
private device: Device, private device: Device,
@ -45,15 +45,15 @@ export class NfcModalComponent implements OnInit {
} }
async startAndroidNfc() { async startAndroidNfc() {
let flags = this.nfc.FLAG_READER_NFC_A | this.nfc.FLAG_READER_NFC_V; // let flags = this.nfc.FLAG_READER_NFC_A | this.nfc.FLAG_READER_NFC_V;
this.nfcReader = this.nfc.readerMode(flags).subscribe((tag) => { // this.nfcReader = this.nfc.readerMode(flags).subscribe((tag) => {
const serialNumber = this.nfc.bytesToHexString(tag.id); // const serialNumber = this.nfc.bytesToHexString(tag.id);
this.swipeAttendanceNFC(serialNumber); // this.swipeAttendanceNFC(serialNumber);
}, (error) => { // }, (error) => {
this.modalController.dismiss(); // this.modalController.dismiss();
this.common.presentAlert(this.ts.trPK('general', 'nfc-error')); // this.common.presentAlert(this.ts.trPK('general', 'nfc-error'));
console.log('error =====>>>>>> + + + =' + error); // console.log('error =====>>>>>> + + + =' + error);
}); // });
} }
public swipeAttendanceNFC (nfcSerialCode: any) { public swipeAttendanceNFC (nfcSerialCode: any) {

@ -8,7 +8,7 @@ import { Response } from 'src/app/hmg-common/services/models/response';
import { ModalController } from '@ionic/angular'; import { ModalController } from '@ionic/angular';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { Platform } from "@ionic/angular"; import { Platform } from "@ionic/angular";
import { WifiWizard2 } from "@ionic-native/wifi-wizard-2/ngx"; // import { WifiWizard2 } from "@ionic-native/wifi-wizard-2/ngx";
import { OpenNativeSettings } from '@ionic-native/open-native-settings/ngx'; import { OpenNativeSettings } from '@ionic-native/open-native-settings/ngx';
import { AttendScanService } from "../../hmg-common/services/attend-services/attend-scan.service"; import { AttendScanService } from "../../hmg-common/services/attend-services/attend-scan.service";
@ -42,7 +42,7 @@ export class WifiModalComponent implements OnInit {
public modalController: ModalController, public modalController: ModalController,
public ts: TranslatorService, public ts: TranslatorService,
public ngZone: NgZone, public ngZone: NgZone,
private wifiWizard2: WifiWizard2, // private wifiWizard2: WifiWizard2,
private openNativeSettings: OpenNativeSettings, private openNativeSettings: OpenNativeSettings,
private platform: Platform, private platform: Platform,
public attendScanService: AttendScanService public attendScanService: AttendScanService
@ -58,8 +58,8 @@ export class WifiModalComponent implements OnInit {
async getConnectedBSSID(ssid:string){ async getConnectedBSSID(ssid:string){
let avaialbleSSID = await this.wifiWizard2.getConnectedBSSID(); // let avaialbleSSID = await this.wifiWizard2.getConnectedBSSID();
console.log(avaialbleSSID); // console.log(avaialbleSSID);
} }
async startWifiConnection() { async startWifiConnection() {
@ -67,49 +67,49 @@ export class WifiModalComponent implements OnInit {
const isIOS = this.platform.is("ios"); const isIOS = this.platform.is("ios");
if (isAndroid) { if (isAndroid) {
let isWifiAvailable = await this.isWifiAvailable(this.ssid); // let isWifiAvailable = await this.isWifiAvailable(this.ssid);
console.debug("isWifiAvailable: " + isWifiAvailable); // console.debug("isWifiAvailable: " + isWifiAvailable);
if(isWifiAvailable){ // if(isWifiAvailable){
console.debug("Wifi Credientials: " + this.ssid + " | " + this.password); // console.debug("Wifi Credientials: " + this.ssid + " | " + this.password);
this.wifiWizard2.connect(this.ssid, true, this.password, this.algo).then(async (value) =>{ // this.wifiWizard2.connect(this.ssid, true, this.password, this.algo).then(async (value) =>{
let ssid_ = await this.wifiWizard2.getConnectedSSID(); // let ssid_ = await this.wifiWizard2.getConnectedSSID();
if(ssid_ == this.ssid){ // if(ssid_ == this.ssid){
console.debug("Wifi Connected: Verified Access | " + value + " | " + ssid_); // console.debug("Wifi Connected: Verified Access | " + value + " | " + ssid_);
setTimeout(() => { // setTimeout(() => {
this.swipeAttendanceWifi(ssid_); // this.swipeAttendanceWifi(ssid_);
},2000); // },2000);
}else{ // }else{
this.showErrorInvalidWorkspace(); // this.showErrorInvalidWorkspace();
} // }
}) // })
.catch((err) => { // .catch((err) => {
console.debug(err); // console.debug(err);
this.showErrorForgetWifiConfiguration(); // this.showErrorForgetWifiConfiguration();
}); // });
}else{ // }else{
console.debug("Wifi is not available considered your device is not in range"); // console.debug("Wifi is not available considered your device is not in range");
this.showErrorInvalidWorkspace(); // this.showErrorInvalidWorkspace();
} // }
} else if (isIOS) { } else if (isIOS) {
this.wifiWizard2.iOSConnectNetwork(this.ssid,this.password).then(async (value) => { // this.wifiWizard2.iOSConnectNetwork(this.ssid,this.password).then(async (value) => {
let ssid_ = await this.wifiWizard2.getConnectedSSID(); // let ssid_ = await this.wifiWizard2.getConnectedSSID();
if(ssid_ == this.ssid){ // if(ssid_ == this.ssid){
console.debug("Wifi Connected: Verified Access | " + value + " | " + ssid_); // console.debug("Wifi Connected: Verified Access | " + value + " | " + ssid_);
setTimeout(() => { // setTimeout(() => {
this.swipeAttendanceWifi(ssid_); // this.swipeAttendanceWifi(ssid_);
},6000); // },6000);
}else{ // }else{
this.showErrorInvalidWorkspace(); // this.showErrorInvalidWorkspace();
} // }
}) // })
.catch((err) => { // .catch((err) => {
console.debug(err); // console.debug(err);
this.showErrorInvalidWorkspace(); // this.showErrorInvalidWorkspace();
}); // });
if(this.wifiWizard2.isWifiEnabled){ // if(this.wifiWizard2.isWifiEnabled){
} else{ // } else{
this.showWifiNotEnabled(); // this.showWifiNotEnabled();
} // }
} }
} }
@ -142,13 +142,13 @@ export class WifiModalComponent implements OnInit {
async disconnectWifi() { async disconnectWifi() {
const isAndroid = this.platform.is("android"); const isAndroid = this.platform.is("android");
const isIOS = this.platform.is("ios"); const isIOS = this.platform.is("ios");
if(isAndroid){ // if(isAndroid){
await this.wifiWizard2.disconnect(this.ssid).catch((error)=>{ console.error(error) }); // await this.wifiWizard2.disconnect(this.ssid).catch((error)=>{ console.error(error) });
await this.wifiWizard2.remove(this.ssid).catch((error)=>{ console.error(error) }); // await this.wifiWizard2.remove(this.ssid).catch((error)=>{ console.error(error) });
console.debug("Wifi Removed"); // console.debug("Wifi Removed");
}else if(isIOS){ // }else if(isIOS){
await this.wifiWizard2.iOSDisconnectNetwork(this.ssid); // await this.wifiWizard2.iOSDisconnectNetwork(this.ssid);
} // }
} }
async swipeAttendanceWifi(code:any) { async swipeAttendanceWifi(code:any) {
@ -211,15 +211,15 @@ export class WifiModalComponent implements OnInit {
} }
async isWifiAvailable(ssid:string){ async isWifiAvailable(ssid:string){
let avaialble_wifi = await this.wifiWizard2.scan(); // let avaialble_wifi = await this.wifiWizard2.scan();
let find = avaialble_wifi.find(element => { // let find = avaialble_wifi.find(element => {
return element.SSID == ssid; // return element.SSID == ssid;
}); // });
if (find === undefined) { // if (find === undefined) {
return false; // return false;
} else { // } else {
return find.SSID == ssid; // return find.SSID == ssid;
} // }
} }
} }

@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core';
import { CommonService } from 'src/app/hmg-common/services/common/common.service'; import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { OfferDiscountService } from '../services/service'; import { OfferDiscountService } from '../services/service';
import { SocialSharing } from '@ionic-native/social-sharing/ngx'; // import { SocialSharing } from '@ionic-native/social-sharing/ngx';
import { DomSanitizer } from '@angular/platform-browser'; import { DomSanitizer } from '@angular/platform-browser';
@Component({ @Component({
selector: 'app-offer-details', selector: 'app-offer-details',
@ -13,7 +13,7 @@ export class OfferDetailsComponent implements OnInit {
public details: any; public details: any;
public direction: String; public direction: String;
public related: any; public related: any;
constructor(public ts: TranslatorService, private socialSharing: SocialSharing, public cs: CommonService, public offersService: OfferDiscountService, private sanitizer: DomSanitizer) { } constructor(public ts: TranslatorService, public cs: CommonService, public offersService: OfferDiscountService, private sanitizer: DomSanitizer) { }
ngOnInit() { ngOnInit() {
this.direction = TranslatorService.getCurrentDirection(); this.direction = TranslatorService.getCurrentDirection();
@ -45,9 +45,9 @@ export class OfferDetailsComponent implements OnInit {
subject: this.stripHtml(offerSubject), subject: this.stripHtml(offerSubject),
files: [this.details.Banner_Image] files: [this.details.Banner_Image]
} }
this.socialSharing.shareWithOptions(options).then((result) => { // this.socialSharing.shareWithOptions(options).then((result) => {
console.log(result); // console.log(result);
}) // })
} }
openRelated(item) { openRelated(item) {
this.cs.sharedService.setSharedData(item, OfferDiscountService.selected_offers); this.cs.sharedService.setSharedData(item, OfferDiscountService.selected_offers);

@ -2,7 +2,7 @@ import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms'; import { FormsModule } from '@angular/forms';
import { Routes, RouterModule } from '@angular/router'; import { Routes, RouterModule } from '@angular/router';
import { SocialSharing } from '@ionic-native/social-sharing/ngx'; // import { SocialSharing } from '@ionic-native/social-sharing/ngx';
import { IonicModule } from '@ionic/angular'; import { IonicModule } from '@ionic/angular';
import { OffersdiscountPage } from './offersdiscount.page'; import { OffersdiscountPage } from './offersdiscount.page';
@ -54,7 +54,7 @@ const routes: Routes = [
], ],
declarations: [OffersdiscountPage, HomeComponent, OfferDetailsComponent, FilterComponent, LocationComponent], declarations: [OffersdiscountPage, HomeComponent, OfferDetailsComponent, FilterComponent, LocationComponent],
entryComponents: [FilterComponent], entryComponents: [FilterComponent],
providers: [OfferDiscountService, SocialSharing], providers: [OfferDiscountService],
}) })
export class OffersdiscountPageModule { } export class OffersdiscountPageModule { }

Loading…
Cancel
Save