added fake location and chnaged color theme as well

enad-Q1-HMG
umasoodch 5 years ago
parent 09b133a394
commit 9128f4a524

@ -107,7 +107,7 @@
<splash height="1125" src="resources/ios/splash/Default-Landscape-2436h.png" width="2436" /> <splash height="1125" src="resources/ios/splash/Default-Landscape-2436h.png" width="2436" />
</platform> </platform>
<platform name="android"> <platform name="android">
<preference name="android-minSdkVersion" value="19" /> <preference name="android-minSdkVersion" value="21" />
<preference name="android-targetSdkVersion" value="28" /> <preference name="android-targetSdkVersion" value="28" />
</platform> </platform>
<plugin name="cordova-plugin-whitelist" spec="1.3.3" /> <plugin name="cordova-plugin-whitelist" spec="1.3.3" />

@ -24,7 +24,7 @@
"@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.4.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/barcode-scanner": "^5.18.0",
"@ionic-native/base64": "^5.18.0", "@ionic-native/base64": "^5.18.0",
@ -161,7 +161,9 @@
"cordova-plugin-badge": {}, "cordova-plugin-badge": {},
"cordova-plugin-ionic-keyboard": {}, "cordova-plugin-ionic-keyboard": {},
"cordova-plugin-datepicker": {}, "cordova-plugin-datepicker": {},
"cordova-plugin-geolocation": {}, "cordova-plugin-geolocation": {
"GPS_REQUIRED": "true"
},
"phonegap-plugin-barcodescanner": { "phonegap-plugin-barcodescanner": {
"ANDROID_SUPPORT_V4_VERSION": "27.+" "ANDROID_SUPPORT_V4_VERSION": "27.+"
}, },
@ -193,20 +195,38 @@
"call-number": {}, "call-number": {},
"cordova-opentok-android-permissions": {}, "cordova-opentok-android-permissions": {},
"cordova-plugin-appavailability": {}, "cordova-plugin-appavailability": {},
"cordova-plugin-apprate": {}, "cordova-plugin-apprate": {
"PLAY_CORE_VERSION": "1.+"
},
"cordova-plugin-fingerprint-aio": { "cordova-plugin-fingerprint-aio": {
"FACEID_USAGE_DESCRIPTION": "User Authentication" "FACEID_USAGE_DESCRIPTION": "User Authentication"
}, },
"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",
"FIREBASE_CRASHLYTICS_COLLECTION_ENABLED": "true" "FIREBASE_CRASHLYTICS_COLLECTION_ENABLED": "true",
"ANDROID_ICON_ACCENT": "#FF00FFFF",
"ANDROID_PLAY_SERVICES_TAGMANAGER_VERSION": "17.0.0",
"ANDROID_PLAY_SERVICES_AUTH_VERSION": "17.0.0",
"ANDROID_FIREBASE_ANALYTICS_VERSION": "17.2.1",
"ANDROID_FIREBASE_MESSAGING_VERSION": "20.0.0",
"ANDROID_FIREBASE_CONFIG_VERSION": "19.0.3",
"ANDROID_FIREBASE_PERF_VERSION": "19.0.1",
"ANDROID_FIREBASE_AUTH_VERSION": "19.1.0",
"ANDROID_FIREBASE_INAPPMESSAGING_VERSION": "19.0.3",
"ANDROID_FIREBASE_FIRESTORE_VERSION": "21.4.0",
"ANDROID_CRASHLYTICS_VERSION": "2.10.1",
"ANDROID_CRASHLYTICS_NDK_VERSION": "2.1.1",
"ANDROID_GSON_VERSION": "2.8.6"
},
"cordova-plugin-background-geolocation": {
"GOOGLE_PLAY_SERVICES_VERSION": "+"
} }
}, },
"platforms": [ "platforms": [
"browser", "browser",
"android", "ios",
"ios" "android"
] ]
} }
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 KiB

After

Width:  |  Height:  |  Size: 28 KiB

@ -1 +0,0 @@
1f488bbf4678f14e62f8bb82d7e4b0be

Binary file not shown.

Before

Width:  |  Height:  |  Size: 189 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 888 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 205 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 233 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 182 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 249 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 194 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 176 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 260 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 254 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 266 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 210 KiB

After

Width:  |  Height:  |  Size: 115 KiB

@ -1 +0,0 @@
b8fbf9d45bfbdf47560d99960bc65188

@ -257,7 +257,7 @@ ion-card-content.confirm-details{
} }
.header-toolbar-new{ .header-toolbar-new{
--background: #22c6b3; --background: #65C399;
} }
.confirmEitOkButton{ .confirmEitOkButton{
@ -266,7 +266,7 @@ ion-card-content.confirm-details{
min-height: 45px !important; min-height: 45px !important;
min-width: 5px !important; min-width: 5px !important;
margin: 8px !important; margin: 8px !important;
--background: #22c6b3; --background: #65C399;
width: 80% !important; width: 80% !important;
color: white!important; color: white!important;
border-radius: 16px !important; border-radius: 16px !important;

@ -57,7 +57,7 @@
.header-div { .header-div {
background-color: #22C6B3; background-color: #65C399;
text-transform: capitalize; text-transform: capitalize;
height: 160px; height: 160px;
/* position: relative; */ /* position: relative; */
@ -66,7 +66,7 @@
} }
.header-toolbar-new{ .header-toolbar-new{
--background: #22c6b3; --background: #65C399;
} }
@ -242,7 +242,7 @@ margin-top: -13px;
.contentEit:before { .contentEit:before {
position: absolute; position: absolute;
content: ""; content: "";
// background: #22c6b3; // background: #65C399;
height: 140px; height: 140px;
width: 100%; width: 100%;
left: 0; left: 0;

@ -32,7 +32,7 @@
min-height: 45px !important; min-height: 45px !important;
min-width: 5px !important; min-width: 5px !important;
margin: 8px !important; margin: 8px !important;
--background:: #22c6b3; --background:: #65C399;
width: 100% !important; width: 100% !important;
color: white!important; color: white!important;
border-radius: 16px !important; border-radius: 16px !important;

@ -5,7 +5,7 @@
} }
.header-toolbar-new{ .header-toolbar-new{
--background: #22c6b3; --background: #65C399;
} }
.confirmEitOkButton{ .confirmEitOkButton{
@ -14,7 +14,7 @@
min-height: 45px !important; min-height: 45px !important;
min-width: 5px !important; min-width: 5px !important;
margin: 8px !important; margin: 8px !important;
--background: #22c6b3; --background: #65C399;
width: 80% !important; width: 80% !important;
color: white!important; color: white!important;
border-radius: 16px !important; border-radius: 16px !important;

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

@ -75,7 +75,7 @@ header
.logout{ .logout{
background-color:#22C6B3; background-color:#65C399;
border: none; border: none;
color:white; color:white;
// padding: 20px; // padding: 20px;
@ -94,7 +94,7 @@ padding: 6px 24px;
} }
.logout-ar{ .logout-ar{
background-color: #22C6B3; background-color: #65C399;
border: none; border: none;
color: white; color: white;
text-align: center; text-align: center;

@ -130,15 +130,11 @@ export class HomeComponent implements OnInit {
openDialog() { openDialog() {
this.cs.confirmAlertDialogAttendance( this.cs.confirmAlertDialogAttendance(() => {
() => {
this.attendScanService.getDeviceLocation(); this.attendScanService.getDeviceLocation();
}, this.ts.trPK('general', 'ok'), }, this.ts.trPK('general', 'ok'),
() => {}, this.ts.trPK('general', 'cancel'), () => {}, this.ts.trPK('general', 'cancel'),
this.ts.trPK('vacation-rule', 'confirmation'), this.ts.trPK('vacation-rule', 'confirmation'),
this.ts.trPK('attendance-tracking', 'confirm-alert3') this.ts.trPK('attendance-tracking', 'confirm-alert1') + this.ts.trPK('attendance-tracking', 'confirm-alert2'));
+ '<br/>' + '<br/>' + this.ts.trPK('attendance-tracking', 'confirm-alert1')
+ this.ts.trPK('attendance-tracking', 'confirm-alert2')
);
} }
} }

@ -44,7 +44,7 @@
left: 79%; left: 79%;
bottom: 35px; bottom: 35px;
color: black; color: black;
background-color: #22c6b3; background-color: #65C399;
width: 20%; height: 6px;"> width: 20%; height: 6px;">
</div> </div>
<div style="position: relative; <div style="position: relative;

@ -2,7 +2,7 @@
--background: #f0efef; --background: #f0efef;
} }
.header-div { .header-div {
background: #22c6b3; background: #65C399;
color: var(--light); color: var(--light);
text-transform: capitalize; text-transform: capitalize;
display: block; display: block;
@ -24,7 +24,7 @@
.navbar{ .navbar{
font-size: 10px !important; font-size: 10px !important;
--background: #22C6B3 !important; --background: #65C399 !important;
color: aliceblue !important; color: aliceblue !important;
// margin-top: 10px !important; // margin-top: 10px !important;
@ -34,7 +34,7 @@
// margin-left:330px !important; // margin-left:330px !important;
margin-top: 0px !important; margin-top: 0px !important;
font-size: 35px !important; font-size: 35px !important;
background: #22C6B3; background: #65C399;
color: aliceblue; color: aliceblue;
margin-left: 0px !important; margin-left: 0px !important;
@ -45,7 +45,7 @@
margin-left:100px !important; margin-left:100px !important;
margin-top: 0px !important; margin-top: 0px !important;
font-size: 23px !important; font-size: 23px !important;
background: #22C6B3 !important; background: #65C399 !important;
color: aliceblue !important; color: aliceblue !important;
} }
@ -139,7 +139,7 @@ height: 250px !important;
background:var(--primary); background:var(--primary);
background: -moz-linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%); 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: -webkit-linear-gradient(45deg, (--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%);
background: #22C6B3; background: #65C399;
// background: linear-gradient(90deg, #85C48D 0%, #85C48D 13%, #2BB5C6 98%, #2BB5C6 100%); // background: linear-gradient(90deg, #85C48D 0%, #85C48D 13%, #2BB5C6 98%, #2BB5C6 100%);
color:var(--light); color:var(--light);
text-transform: capitalize; text-transform: capitalize;

@ -50,7 +50,7 @@ public data = {
backgroundColor: [ backgroundColor: [
'#22c6b3', '#65C399',
'#094875', '#094875',
], ],

@ -25,7 +25,7 @@ ion-label {
.header-toolbar-new{ .header-toolbar-new{
--background: #22c6b3; --background: #65C399;
} }
.addEitOkButton{ .addEitOkButton{
white-space: normal !important; white-space: normal !important;
@ -33,7 +33,7 @@ ion-label {
min-height: 45px !important; min-height: 45px !important;
min-width: 5px !important; min-width: 5px !important;
margin: 8px !important; margin: 8px !important;
background-color: #22c6b3; background-color: #65C399;
width: 80% !important; width: 80% !important;
color: white!important; color: white!important;
border-radius: 16px !important; border-radius: 16px !important;

@ -227,7 +227,7 @@
} }
.header-toolbar-new{ .header-toolbar-new{
--background: #22c6b3; --background: #65C399;
} }
.title{ .title{
margin-top: -37px; margin-top: -37px;
@ -243,7 +243,7 @@
min-height: 45px !important; min-height: 45px !important;
min-width: 5px !important; min-width: 5px !important;
margin: 8px !important; margin: 8px !important;
background-color: #22c6b3; background-color: #65C399;
width: 80% !important; width: 80% !important;
color: white!important; color: white!important;
border-radius: 16px !important; border-radius: 16px !important;

@ -69,7 +69,7 @@ h4 {
.header-div { .header-div {
background-color: #22C6B3; background-color: #65C399;
text-transform: capitalize; text-transform: capitalize;
height: 160px; height: 160px;
// position: relative; // position: relative;
@ -78,7 +78,7 @@ h4 {
} }
.header-toolbar-new{ .header-toolbar-new{
--background: #22c6b3; --background: #65C399;
} }
.addClass{ .addClass{
@ -99,7 +99,7 @@ h4 {
.contentEit:before { .contentEit:before {
position: absolute; position: absolute;
content: ""; content: "";
// background: #22c6b3; // background: #65C399;
height: 140px; height: 140px;
width: 100%; width: 100%;
left: 0; left: 0;
@ -119,7 +119,7 @@ z-index: 1;
.content:before { .content:before {
position: absolute; position: absolute;
content: ""; content: "";
background: #22c6b3; background: #65C399;
height: 140px; height: 140px;
width: 100%; width: 100%;
left: 0; left: 0;
@ -221,7 +221,7 @@ z-index: 1;
} }
.blue-dote{ .blue-dote{
background-color: #22C6B3; background-color: #65C399;
width: 12px; width: 12px;
height: 12px; height: 12px;
border-radius: 50% !important; border-radius: 50% !important;
@ -294,7 +294,7 @@ z-index: 1;
} }
.child-dote{ .child-dote{
background-color: #22C6B3; background-color: #65C399;
width: 15px; width: 15px;
height: 15px; height: 15px;
border-radius: 50% !important; border-radius: 50% !important;
@ -303,7 +303,7 @@ z-index: 1;
margin-right: 5px; margin-right: 5px;
} }
.child-dote-ar{ .child-dote-ar{
background-color: #22C6B3; background-color: #65C399;
width: 15px; width: 15px;
height: 15px; height: 15px;
border-radius: 50% !important; border-radius: 50% !important;

@ -100,7 +100,7 @@ export class EitListComponent implements OnInit {
{ data: [this.accrualNetInfants, this.accrualUNetChild, this.accrualNetAdult], { data: [this.accrualNetInfants, this.accrualUNetChild, this.accrualNetAdult],
backgroundColor: [ backgroundColor: [
'#1FA269', '#1FA269',
'#22C6B3', '#65C399',
'#3CB9D5', ], '#3CB9D5', ],
borderWidth: 2 borderWidth: 2
} }

@ -4,7 +4,7 @@
min-height: 45px !important; min-height: 45px !important;
min-width: 5px !important; min-width: 5px !important;
margin: 8px !important; margin: 8px !important;
background-color: #22c6b3; background-color: #65C399;
width: 80% !important; width: 80% !important;
color: white!important; color: white!important;
border-radius: 16px !important; border-radius: 16px !important;

@ -13,7 +13,7 @@ ion-item.custCollabs.item.item-block.item-ios {
} }
.header-toolbar-new{ .header-toolbar-new{
--background: #22c6b3; --background: #65C399;
} }
ion-item.item.item-block { ion-item.item.item-block {

@ -32,7 +32,7 @@
min-height: 45px !important; min-height: 45px !important;
min-width: 5px !important; min-width: 5px !important;
margin: 8px !important; margin: 8px !important;
--background:: #22c6b3; --background:: #65C399;
width: 100% !important; width: 100% !important;
color: white!important; color: white!important;
border-radius: 16px !important; border-radius: 16px !important;

@ -118,7 +118,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';
@NgModule({ @NgModule({
imports: [ imports: [
CommonModule, CommonModule,
@ -315,7 +315,8 @@ import { GenericHeaderComponent } from './ui/generic-header/generic-header.compo
// PaymentService, // PaymentService,
MenuService, MenuService,
OpenNativeSettings, OpenNativeSettings,
BarcodeScanner BarcodeScanner,
BackgroundGeolocation
], ],
entryComponents: [DateInfoModalComponent], entryComponents: [DateInfoModalComponent],
}) })

@ -14,7 +14,8 @@ 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 { Platform } from '@ionic/angular';
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
@ -37,38 +38,50 @@ export class AttendScanService {
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 platform: Platform ) {
this.userData = this.common.sharedService.getSharedData(AuthenticatedUser.SHARED_DATA, false); this.userData = this.common.sharedService.getSharedData(AuthenticatedUser.SHARED_DATA, false);
} }
public getDeviceLocation() { public getDeviceLocation() {
const isVirtual = this.device.isVirtual; const isVirtual = this.device.isVirtual;
// tslint:disable-next-line: triple-equals if (isVirtual === true) {
if (isVirtual == true) {
alert('emulater>>>>>>>' + isVirtual); alert('emulater>>>>>>>' + isVirtual);
alert('You are using virtual device'); alert('You are using virtual device');
return false; return false;
} }
this.permissions.requestLocationAutherization().then(granted => { this.permissions.requestLocationAutherization().then(granted => {
this.location = granted as boolean; this.location = granted as boolean;
if (this.location) { if (this.location) {
this.geolocation this.backgroundGeolocation.getCurrentLocation({ timeout: 10000, enableHighAccuracy: true, maximumAge: 3000 }).then((resp) => {
.getCurrentPosition({ maximumAge: 3000, timeout: 10000, enableHighAccuracy: true }) if (this.platform.is('android')) {
.then(resp => { if (resp && (resp.latitude && resp.longitude)) {
this.lat = resp.coords.latitude; console.log(resp);
this.longt = resp.coords.longitude; if (resp.isFromMockProvider || resp.mockLocationsEnabled) {
this.common.presentAlert(this.ts.trPK('home', 'fake-location'));
} else {
this.lat = resp.latitude;
this.longt = resp.longitude;
this.attendance(); this.attendance();
}) }
.catch(error => { }
console.log('Error getting location', error); } else {
if (resp && (resp.latitude && resp.longitude)) {
this.lat = resp.latitude;
this.longt = resp.longitude;
this.attendance();
} else {
this.common.presentAlert(this.ts.trPK('home', 'position-error'));
}
}
}, (error) => {
this.common.presentAlert(this.ts.trPK('home', 'position-error'));
}); });
} else { } else {
return false; return false;
} }
}); });
} }
public attendance() { public attendance() {

@ -8,14 +8,14 @@
.navbar{ .navbar{
font-size: 10px !important; font-size: 10px !important;
--background: #22C6B3 !important; --background: #65C399 !important;
color: aliceblue !important; color: aliceblue !important;
} }
.menu { .menu {
margin-top: 0px !important; margin-top: 0px !important;
font-size: 35px !important; font-size: 35px !important;
background: #22C6B3; background: #65C399;
color: aliceblue; color: aliceblue;
margin-left: 0px !important; margin-left: 0px !important;
@ -25,7 +25,7 @@
margin-left:100px !important; margin-left:100px !important;
margin-top: 0px !important; margin-top: 0px !important;
font-size: 23px !important; font-size: 23px !important;
background: #22C6B3 !important; background: #65C399 !important;
color: aliceblue !important; color: aliceblue !important;
} }
@ -92,7 +92,7 @@
background:var(--primary); background:var(--primary);
background: -moz-linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%); 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: -webkit-linear-gradient(45deg, (--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%);
background: #22C6B3; background: #65C399;
// background: linear-gradient(90deg, #85C48D 0%, #85C48D 13%, #2BB5C6 98%, #2BB5C6 100%); // background: linear-gradient(90deg, #85C48D 0%, #85C48D 13%, #2BB5C6 98%, #2BB5C6 100%);
color:var(--light); color:var(--light);
text-transform: capitalize; text-transform: capitalize;

@ -10,8 +10,8 @@
.btnImge{ .btnImge{
// button{ // button{
border-color:transparent !important; border-color:transparent !important;
--background: #22C6B3 !important; --background: #65C399 !important;
background: #22C6B3 !important; background: #65C399 !important;
height: 57px !important; height: 57px !important;
width: 60px !important; width: 60px !important;
@ -21,7 +21,7 @@
} }
//test //test
.changeIcon{ .changeIcon{
background: #22C6B3 !important; background: #65C399 !important;
border-radius: 50% !important; border-radius: 50% !important;
width: 73px; width: 73px;
height: 55px; height: 55px;

@ -22,5 +22,5 @@
line-height: 46px; line-height: 46px;
} }
.header-toolbar-new { .header-toolbar-new {
--background: #22c6b3; --background: #65C399;
} }

@ -4,6 +4,6 @@
ion-menu-button { ion-menu-button {
font-size: 0.8cm; font-size: 0.8cm;
color: white; color: white;
background: #22c6b3; background: #65C399;
margin: 0 auto; margin: 0 auto;
} }

@ -4,7 +4,7 @@ ion-row {
} }
.header-toolbar-new{ .header-toolbar-new{
--background: #22c6b3; --background: #65C399;
} }
.profile-image-container{ .profile-image-container{
position: relative; position: relative;
@ -50,7 +50,7 @@ ion-label{
.contentBg:before { .contentBg:before {
position: absolute; position: absolute;
content: ""; content: "";
background: #22c6b3; background: #65C399;
height: 100px; height: 100px;
width: 100%; width: 100%;
left: 0; left: 0;

@ -36,7 +36,7 @@ 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';
@Component({ @Component({
selector: 'app-home', selector: 'app-home',
templateUrl: './home.page.html', templateUrl: './home.page.html',
@ -151,6 +151,7 @@ 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
) { ) {
this.events.subscribe('img-change', displayImg => { this.events.subscribe('img-change', displayImg => {
this.userImage = this.sanitizer.bypassSecurityTrustUrl( this.userImage = this.sanitizer.bypassSecurityTrustUrl(
@ -165,11 +166,6 @@ export class HomePage implements OnInit {
this.common.openHome(); this.common.openHome();
} }
}); });
// this.getUserDetails();
// this.getCount();
// this.events.subscribe('getNotCount', badge => {
// this.notBadge = badge;
// });
this.direction = TranslatorService.getCurrentLanguageName(); this.direction = TranslatorService.getCurrentLanguageName();
this.myTeamTitle = this.ts.trPK('myTeam', 'myTeam-header'); this.myTeamTitle = this.ts.trPK('myTeam', 'myTeam-header');
this.vacationRuleTitle = this.ts.trPK('vacation-rule', 'vacationRule'); this.vacationRuleTitle = this.ts.trPK('vacation-rule', 'vacationRule');
@ -189,14 +185,6 @@ export class HomePage implements OnInit {
this.getUserDetails(); this.getUserDetails();
} }
// ionViewDidEnter() {
// // tslint:disable-next-line: only-arrow-functions
// document.addEventListener('backbutton', function(e) {
// e.preventDefault();
// e.stopPropagation();
// }, false);
// }
initTimer() { initTimer() {
this.runTimer = false; this.runTimer = false;
this.hasStarted = false; this.hasStarted = false;
@ -256,18 +244,28 @@ export class HomePage implements OnInit {
this.permissions.requestLocationAutherization().then(granted => { this.permissions.requestLocationAutherization().then(granted => {
this.location = granted as boolean; this.location = granted as boolean;
if (this.location) { if (this.location) {
this.geolocation this.backgroundGeolocation.getCurrentLocation({ timeout: 10000, enableHighAccuracy: true, maximumAge: 3000 }).then((resp) => {
.getCurrentPosition({ if (this.platform.is('android')) {
maximumAge: 3000, if (resp && (resp.latitude && resp.longitude)) {
timeout: 10000, console.log(resp);
enableHighAccuracy: true if (resp.isFromMockProvider || resp.mockLocationsEnabled) {
}) this.common.presentAlert(this.ts.trPK('home', 'fake-location'));
.then(resp => { } else {
this.lat = resp.coords.latitude; this.lat = resp.latitude;
this.longt = resp.coords.longitude; this.longt = resp.longitude;
this.attendance(); this.attendance();
}) }
.catch(error => { }
} else {
if (resp && (resp.latitude && resp.longitude)) {
this.lat = resp.latitude;
this.longt = resp.longitude;
this.attendance();
} else {
this.common.presentAlert(this.ts.trPK('home', 'position-error'));
}
}
}, (error) => {
this.common.presentAlert(this.ts.trPK('home', 'position-error')); this.common.presentAlert(this.ts.trPK('home', 'position-error'));
}); });
} else { } else {

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

Loading…
Cancel
Save