Commit 4e014f9d by Alen Jose

july24

parent 4c478b59
......@@ -76,6 +76,10 @@
<splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
<splash height="2732" src="resources/ios/splash/Default@2x~universal~anyany.png" width="2732" />
</platform>
<edit-config file="*-Info.plist" mode="merge" target="NSLocationWhenInUseUsageDescription">
<string>We want your location! Best regards NSA</string>
</edit-config>
<engine name="android" spec="^7.1.0" />
<plugin name="com-sarriaroman-photoviewer" spec="^1.1.18" />
<plugin name="cordova-android-support-gradle-release" spec="^1.4.4">
<variable name="ANDROID_SUPPORT_VERSION" value="27.1.0" />
......@@ -88,14 +92,10 @@
<plugin name="cordova-plugin-ionic-keyboard" spec="^2.0.5" />
<plugin name="cordova-plugin-ionic-webview" spec="^1.1.19" />
<plugin name="cordova-plugin-local-notification" spec="^0.9.0-beta.2" />
<plugin name="cordova-plugin-request-location-accuracy" spec="^2.2.3" />
<plugin name="cordova-plugin-splashscreen" spec="^5.0.2" />
<plugin name="cordova-plugin-statusbar" spec="^2.4.2" />
<plugin name="cordova-plugin-whitelist" spec="^1.3.3" />
<plugin name="cordova-plugin-x-toast" spec="^2.6.2" />
<plugin name="onesignal-cordova-plugin" spec="^2.4.1" />
<engine name="android" spec="latest" />
<edit-config file="*-Info.plist" mode="merge" target="NSLocationWhenInUseUsageDescription">
<string>We want your location! Best regards NSA</string>
</edit-config>
<plugin name="cordova-plugin-request-location-accuracy" spec="^2.2.3" />
</widget>
......@@ -36,7 +36,7 @@ export class MyApp {
initializeApp() {
this.platform.ready().then(() => {
this.statusBar.styleLightContent();
// this.statusBar.styleLightContent();
// this.initOnesignal();
// this.enableLoc()
......@@ -72,9 +72,9 @@ export class MyApp {
this.locSubs.unsubscribe();
})
this.events.subscribe('driver:locOn',_=>{
this.liveLoc();
})
// this.events.subscribe('driver:locOn',_=>{
// this.liveLoc();
// })
this.storage.get('driver_data').then(data => {
if (data != null) {
......
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams,Events } from 'ionic-angular';
import { IonicPage, NavController, NavParams, Events } from 'ionic-angular';
import { Storage } from "@ionic/storage";
import { Myservice } from "../../providers/myservice";
import { dataService } from "../../providers/common.service";
......@@ -10,33 +10,34 @@ import { dataService } from "../../providers/common.service";
templateUrl: 'home.html',
})
export class HomePage {
tab:any;
upcoming:any;
completed:any;
baseurl = this.myservice.base_url
tab: any;
upcoming: any;
completed: any;
baseurl = this.myservice.base_url
constructor(public navCtrl: NavController, public navParams: NavParams, private storage: Storage, private myservice: Myservice, private data: dataService, public events: Events) {
}
ionViewDidEnter(){
ionViewDidEnter() {
this.events.publish('driver:locOn', '');
if (this.navParams.get('id'))
this.navCtrl.push('QuickridePage', { id: this.navParams.get('id'), from: this.navParams.get('from') })
this.myservice.show_loader()
this.storage.get('driver_data').then(data=>{
if(data){
this.myservice.load_post({id:data.id},'getMyRides').subscribe(response=>{
this.myservice.hide_loader()
if(response.status == 'success'){
this.upcoming = response.data.upcoming
this.completed = response.data.completed
}
})
}
})
else {
this.myservice.show_loader()
this.storage.get('driver_data').then(data => {
if (data) {
this.myservice.load_post({ id: data.id }, 'getMyRides').subscribe(response => {
this.myservice.hide_loader()
if (response.status == 'success') {
this.upcoming = response.data.upcoming
this.completed = response.data.completed
}
})
}
})
}
}
ionViewDidLoad() {
......@@ -44,14 +45,14 @@ baseurl = this.myservice.base_url
}
tab_swap(type) {
tab_swap(type) {
this.tab = type;
}
}
rideDetails(data){
// this.data.setrideData(data)
// this.navCtrl.push('RidedetailsPage')
this.navCtrl.setRoot('QuickridePage', { id: '38'})
rideDetails(data) {
this.data.setrideData(data)
this.navCtrl.push('RidedetailsPage')
// this.navCtrl.setRoot('QuickridePage', { id: '38'})
// this.events.publish('driver:locOn','')
}
}
......@@ -81,7 +81,6 @@ export class QuickridePage {
}
})
modal.present();
// this.navCtrl.pop();
}
pick() {
......
......@@ -45,7 +45,6 @@ export class UserlocationPage {
this.menu.swipeEnable(false);
this.getStorage()
var pick = this.details.pickup_latlng.split(',')
......@@ -139,11 +138,11 @@ export class UserlocationPage {
dimage.rotation = heading;
marker.setIcon(dimage);
// if (google.maps.geometry.spherical.computeDistanceBetween(destLoc, driverLoc) < 100) {
if (google.maps.geometry.spherical.computeDistanceBetween(destLoc, driverLoc) < 100) {
This.loc.to = This.details.drop_area
This.loc.from = This.details.pickup_area
This.temp = true
// }
}
This.calculateAndDisplayRoute(directionsService, This.directionsDisplay, destLoc, driverLoc);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment