Commit 18e6946a by Alen Jose

july-13

parent 9522a2c4
......@@ -18,7 +18,7 @@
<preference name="FadeSplashScreenDuration" value="300" />
<preference name="SplashShowOnlyFirstTime" value="false" />
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="3000" />
<preference name="SplashScreenDelay" value="10000" />
<platform name="android">
<allow-intent href="market:*" />
<icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
......@@ -76,20 +76,26 @@
<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>
<engine name="android" spec="^6.3.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" />
</plugin>
<plugin name="cordova-plugin-app-event" spec="^1.2.1" />
<plugin name="cordova-plugin-device" spec="^2.0.2" />
<plugin name="cordova-plugin-file" spec="^6.0.1" />
<plugin name="cordova-plugin-file-opener2" spec="^2.0.19" />
<plugin name="cordova-plugin-file-transfer" spec="^1.7.1" />
<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-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="com-sarriaroman-photoviewer" spec="^1.1.18" />
<plugin name="cordova-plugin-file-opener2" spec="^2.0.19" />
<plugin name="cordova-plugin-file-transfer" spec="^1.7.1" />
<plugin name="cordova-plugin-file" spec="^6.0.1" />
<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>
......@@ -310,11 +310,6 @@
"resolved": "https://registry.npmjs.org/@ionic-native/device/-/device-4.9.0.tgz",
"integrity": "sha512-AnwB6dsgpepfYXe5Ow40Y2E/cGLIF8nq2BAhSULdw1/ANtAAszVQyFGGxbV3bPy4ahi/d2mRRfzerqtYiSw/Vg=="
},
"@ionic-native/document-viewer": {
"version": "4.9.1",
"resolved": "https://registry.npmjs.org/@ionic-native/document-viewer/-/document-viewer-4.9.1.tgz",
"integrity": "sha512-eK7zgGDym8yvgPfnrZ+RJ6/T99ZKT3w1PQzKaR97NbXw5aaGIqdNWG4TZMOLKFIaqrzFrh3+k19AH7y/rJdlyw=="
},
"@ionic-native/file": {
"version": "4.9.1",
"resolved": "https://registry.npmjs.org/@ionic-native/file/-/file-4.9.1.tgz",
......@@ -341,9 +336,9 @@
"integrity": "sha512-4x1gfaqu/1KLHlhcaFCxxCLADZerVyKRxRIPJc6OE2EHNbtvKexbfbpFId4fmJNwgKSU01xojAFPxg+Dz/MEFQ=="
},
"@ionic-native/location-accuracy": {
"version": "4.9.0",
"resolved": "https://registry.npmjs.org/@ionic-native/location-accuracy/-/location-accuracy-4.9.0.tgz",
"integrity": "sha512-ZrWYP29k5HQQOwWrRf4rPuJtqqGAoxAME0ZScsBcpAXioz2WdJhPuioJ9v/XMlwulFfHhdXkMTXMuHjqgTouYg=="
"version": "4.9.1",
"resolved": "https://registry.npmjs.org/@ionic-native/location-accuracy/-/location-accuracy-4.9.1.tgz",
"integrity": "sha512-sh+5PJHJpOb8RsJH3T9s9maIwm1NmPkOnSf9bIZUHsJbK4THYexVFVS+URwJM4tu+dPyv62R+pJCKxTy0l8lRQ=="
},
"@ionic-native/network": {
"version": "4.9.0",
......@@ -496,14 +491,6 @@
"resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz",
"integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU="
},
"android-versions": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/android-versions/-/android-versions-1.3.0.tgz",
"integrity": "sha512-d/i1G16Oaw/T1EvskUA7Oo1vIQVK/0ZlpQgZfYVBwg6v/9FBE3QV66g5N1/bTHpRml8tFLxh+KoTw5DokK9c+A==",
"requires": {
"semver": "5.5.0"
}
},
"angularfire2": {
"version": "5.0.0-rc.11",
"resolved": "https://registry.npmjs.org/angularfire2/-/angularfire2-5.0.0-rc.11.tgz",
......@@ -1400,23 +1387,30 @@
"dev": true
},
"cordova-android": {
"version": "6.3.0",
"resolved": "https://registry.npmjs.org/cordova-android/-/cordova-android-6.3.0.tgz",
"integrity": "sha1-2lQYQz0lx1pZd7QoJEu+Q30BKNI=",
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/cordova-android/-/cordova-android-7.1.0.tgz",
"integrity": "sha1-HNNu57nRm61Q0+mEK3Mf5ZCSTdU=",
"requires": {
"android-versions": "1.3.0",
"cordova-common": "2.1.0",
"cordova-common": "2.2.1",
"elementtree": "0.1.6",
"nopt": "3.0.6",
"properties-parser": "0.2.3",
"q": "1.5.0",
"q": "1.5.1",
"shelljs": "0.5.3"
},
"dependencies": {
"abbrev": {
"version": "1.1.0",
"version": "1.1.1",
"bundled": true
},
"android-versions": {
"version": "1.3.0",
"bundled": true,
"requires": {
"semver": "5.5.0"
}
},
"ansi": {
"version": "0.3.1",
"bundled": true
......@@ -1430,18 +1424,18 @@
"bundled": true
},
"big-integer": {
"version": "1.6.25",
"version": "1.6.26",
"bundled": true
},
"bplist-parser": {
"version": "0.1.1",
"bundled": true,
"requires": {
"big-integer": "1.6.25"
"big-integer": "1.6.26"
}
},
"brace-expansion": {
"version": "1.1.8",
"version": "1.1.11",
"bundled": true,
"requires": {
"balanced-match": "1.0.0",
......@@ -1453,7 +1447,7 @@
"bundled": true
},
"cordova-common": {
"version": "2.1.0",
"version": "2.2.1",
"bundled": true,
"requires": {
"ansi": "0.3.1",
......@@ -1462,10 +1456,10 @@
"elementtree": "0.1.6",
"glob": "5.0.15",
"minimatch": "3.0.4",
"osenv": "0.1.4",
"osenv": "0.1.5",
"plist": "1.2.0",
"q": "1.5.0",
"semver": "5.4.1",
"q": "1.5.1",
"semver": "5.5.0",
"shelljs": "0.5.3",
"underscore": "1.8.3",
"unorm": "1.4.1"
......@@ -1513,14 +1507,14 @@
"version": "3.0.4",
"bundled": true,
"requires": {
"brace-expansion": "1.1.8"
"brace-expansion": "1.1.11"
}
},
"nopt": {
"version": "3.0.6",
"bundled": true,
"requires": {
"abbrev": "1.1.0"
"abbrev": "1.1.1"
}
},
"once": {
......@@ -1539,7 +1533,7 @@
"bundled": true
},
"osenv": {
"version": "0.1.4",
"version": "0.1.5",
"bundled": true,
"requires": {
"os-homedir": "1.0.2",
......@@ -1565,7 +1559,7 @@
"bundled": true
},
"q": {
"version": "1.5.0",
"version": "1.5.1",
"bundled": true
},
"sax": {
......@@ -1573,7 +1567,7 @@
"bundled": true
},
"semver": {
"version": "5.4.1",
"version": "5.5.0",
"bundled": true
},
"shelljs": {
......@@ -1662,11 +1656,21 @@
"resolved": "https://registry.npmjs.org/cordova-plugin-local-notification/-/cordova-plugin-local-notification-0.9.0-beta.2.tgz",
"integrity": "sha512-63n77K1pt8dnbWnNR8QWETi9Glezi1bvNHvHWmGNIOv0xCb0phZnm+Ku49BQ+omwe8Z5voMvrA4I03SYPpv38w=="
},
"cordova-plugin-request-location-accuracy": {
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/cordova-plugin-request-location-accuracy/-/cordova-plugin-request-location-accuracy-2.2.3.tgz",
"integrity": "sha512-cwcG+4sHIU/Vfe1mvEtXh5hfo4k8OEdHo1Rdc9GU0YU/5J/umsBQdHfuBJ7hez59N7lRoUKpKhLhcY8MPBz9Fg=="
},
"cordova-plugin-splashscreen": {
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/cordova-plugin-splashscreen/-/cordova-plugin-splashscreen-5.0.2.tgz",
"integrity": "sha1-dH509W4gHNWFvGLRS8oZ9oZ/8e0="
},
"cordova-plugin-statusbar": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/cordova-plugin-statusbar/-/cordova-plugin-statusbar-2.4.2.tgz",
"integrity": "sha1-/B+9wNjXAzp+jh8ff/FnrJvU+vY="
},
"cordova-plugin-whitelist": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/cordova-plugin-whitelist/-/cordova-plugin-whitelist-1.3.3.tgz",
......@@ -4488,6 +4492,11 @@
"wrappy": "1.0.2"
}
},
"onesignal-cordova-plugin": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/onesignal-cordova-plugin/-/onesignal-cordova-plugin-2.4.1.tgz",
"integrity": "sha512-P4Jiypo5d549LrRWsZE1g5z7cmQMseG6yIayQem+hLRUXlWx7qqOdxTa1oUh5nFxlYon8u6jI5wIybRWxL5YfQ=="
},
"optjs": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/optjs/-/optjs-3.2.2.tgz",
......@@ -5296,7 +5305,8 @@
"semver": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz",
"integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA=="
"integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==",
"dev": true
},
"send": {
"version": "0.16.2",
......
......@@ -23,13 +23,12 @@
"@angular/platform-browser-dynamic": "5.2.11",
"@ionic-native/core": "4.8.0",
"@ionic-native/device": "^4.9.0",
"@ionic-native/document-viewer": "^4.9.1",
"@ionic-native/file": "^4.9.1",
"@ionic-native/file-opener": "^4.9.1",
"@ionic-native/file-transfer": "^4.9.1",
"@ionic-native/geolocation": "^4.9.0",
"@ionic-native/local-notifications": "^4.9.0",
"@ionic-native/location-accuracy": "^4.9.0",
"@ionic-native/location-accuracy": "^4.9.1",
"@ionic-native/network": "^4.9.0",
"@ionic-native/onesignal": "^4.9.0",
"@ionic-native/photo-viewer": "^4.9.1",
......@@ -39,7 +38,7 @@
"@ionic/storage": "2.1.3",
"angularfire2": "^5.0.0-rc.11",
"com-sarriaroman-photoviewer": "^1.1.18",
"cordova-android": "^6.3.0",
"cordova-android": "^7.1.0",
"cordova-android-support-gradle-release": "^1.4.4",
"cordova-plugin-app-event": "^1.2.1",
"cordova-plugin-badge": "^0.8.7",
......@@ -50,12 +49,15 @@
"cordova-plugin-ionic-keyboard": "^2.0.5",
"cordova-plugin-ionic-webview": "^1.1.19",
"cordova-plugin-local-notification": "^0.9.0-beta.2",
"cordova-plugin-request-location-accuracy": "^2.2.3",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-whitelist": "^1.3.3",
"cordova-plugin-x-toast": "^2.6.2",
"firebase": "^5.2.0",
"ionic-angular": "3.9.2",
"ionicons": "3.0.0",
"onesignal-cordova-plugin": "^2.4.1",
"promise-polyfill": "^8.0.0",
"rxjs": "5.5.11",
"sw-toolbox": "3.6.0",
......@@ -82,7 +84,10 @@
"com-sarriaroman-photoviewer": {},
"cordova-plugin-file-opener2": {},
"cordova-plugin-file-transfer": {},
"cordova-plugin-file": {}
"cordova-plugin-file": {},
"onesignal-cordova-plugin": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-request-location-accuracy": {}
},
"platforms": [
"android"
......
......@@ -27,18 +27,18 @@ export class MyApp {
pushId: string
constructor(public platform: Platform, public statusBar: StatusBar, public splashScreen: SplashScreen, private network: Network, private alertCtrl: AlertController, private oneSignal: OneSignal, private locationAccuracy: LocationAccuracy, private storage: Storage, private myservice: Myservice, public events: Events, private localNotifications: LocalNotifications, private data: dataService) {
// , private localNotifications: LocalNotifications
this.initializeApp();
}
initializeApp() {
this.platform.ready().then(() => {
// this.initOnesignal();
this.statusBar.styleDefault();
this.splashScreen.hide();
let disconnectSubscription = this.network.onDisconnect().subscribe(() => {
this.statusBar.styleLightContent();
this.initOnesignal();
this.enableLoc()
this.network.onDisconnect().subscribe(() => {
const alert = this.alertCtrl.create({
title: 'Network Error',
message: 'No Internet Connection',
......@@ -51,13 +51,12 @@ export class MyApp {
}, {
text: 'Cancel',
role: 'cancel'
}
},
]
});
alert.present();
});
// this.enableLoc()
this.events.subscribe('driver:profile', data => {
this.local = data
......@@ -77,6 +76,8 @@ export class MyApp {
this.rootPage = 'LandingPage'
}
})
this.splashScreen.hide();
});
}
......@@ -89,9 +90,12 @@ export class MyApp {
}
checkStatus() {
// this.oneSignal.getIds().then((id) => {
// this.myservice.load_post({deviceid:id.userId,driverid:this.local.id},'updateDeviceid')
// })
this.oneSignal.getIds().then((id) => {
console.log(id.userId)
this.myservice.load_post({deviceid:id.userId,driverid:this.local.id},'updateDeviceid').subscribe(resp=>{
console.log(resp)
})
})
var This = this
var query = firebase.database().ref("drivers/").orderByChild("id").equalTo((this.local.id))
query.once("child_added", function (snapshot) {
......@@ -118,7 +122,7 @@ export class MyApp {
}
})
},20000)
// This.setlocalNotification();
This.setlocalNotification();
}
openPage(page) {
......@@ -154,14 +158,14 @@ export class MyApp {
enableLoc() {
this.locationAccuracy.canRequest().then((canRequest: boolean) => {
if (canRequest) {
// if (canRequest) {
// the accuracy option will be ignored by iOS
this.locationAccuracy.request(this.locationAccuracy.REQUEST_PRIORITY_HIGH_ACCURACY).then(
() => console.log('Request successful'),
error => console.log('Error requesting location permissions', error)
);
}
// }
});
}
......@@ -180,19 +184,13 @@ export class MyApp {
title: 'CMC-Driver',
trigger: { at: new Date(upcoming[i].pickup_date + ' ' +upcoming[i].pickup_time) },
led: 'FF0000',
sound: null,
sound: 'file://assets/sounds/request.mp3',
data: upcoming[i],
vibrate:true,
})
if(i == upcoming.length-1){
this.localNotifications.schedule(arr);
var This = this
setTimeout(() => {
This.localNotifications.getAll().then(data=>{
console.log('1',data)
})
}, 5000);
}
}
}
......
......@@ -72,7 +72,7 @@ firebase.initializeApp(firebaseConfig);
PhotoViewer,
FileOpener,
FileTransfer,
File
File,
]
})
export class AppModule {}
......@@ -43,8 +43,8 @@
.picker-wrapper{background: #ff9000 !important;}
.picker-toolbar{background: #ff9000 !important;}
.picker-md .picker-wrapper{background: #ff9000 !important;}
.picker-md .picker-toolbar{background: #ff9000 !important;}
.single_btn{width: 100% !important}
.txt_cntr{text-align: center}
.clr_wht{color: #fff}
......
......@@ -41,9 +41,9 @@ export class ChangepassPage {
this.myservice.hide_loader()
if (response.status == 'success') {
this.pswdForm.reset();
// this.toast.show(response.message, '2000', 'center').subscribe(toast => {
// console.log(toast);
// });
this.toast.show(response.message, '2000', 'center').subscribe(toast => {
console.log(toast);
});
}
else {
this.pswdForm.reset();
......
......@@ -39,11 +39,9 @@ export class DocupdatePage {
if (this.fileData.fileStatus == '3') {
this.butonName = 'UPDATE'
// document.getElementById("upld_btn").innerText = 'UPDATE'
}
else if (this.fileData.fileStatus == '0') {
this.butonName = 'UPLOAD'
// document.getElementById("upld_btn").innerText = 'UPLOAD'
}
}
})
......@@ -94,14 +92,12 @@ export class DocupdatePage {
view() {
if (this.fileData.image.includes(".pdf")) {
// const options: DocumentViewerOptions = {
// title: ''
// }
console.log(this.baseUrl + this.fileData.image)
const fileTransfer: FileTransferObject = this.transfer.create();
const url = this.baseUrl + this.fileData.image;
fileTransfer.download(url, this.file.dataDirectory + this.title +'.pdf').then((entry) => {
fileTransfer.download(url, this.file.dataDirectory + 'files.pdf').then((entry) => {
console.log('download complete: ' + entry.toURL());
this.fileOpener.open(entry.toURL(), 'application/pdf')
......@@ -109,6 +105,7 @@ export class DocupdatePage {
.catch(e => console.log('Error openening file', e));
}, (error) => {
// handle error
console.log(error)
});
// this.document.viewDocument(this.baseUrl + this.fileData.image, 'application/pdf', options)
}
......
......@@ -30,7 +30,6 @@ baseurl = this.myservice.base_url
if(response.status == 'success'){
this.upcoming = response.data.upcoming
this.completed = response.data.completed
console.log(this.upcoming)
}
})
}
......@@ -38,7 +37,6 @@ baseurl = this.myservice.base_url
}
ionViewDidLoad() {
console.log('ionViewDidLoad HomePage');
this.tab = "active";
}
......
......@@ -97,7 +97,7 @@
<br>
<button ion-button class="primary" (click)="updateProfile()">SAVE</button>
<button ion-button class="changepass_btn" (click)="changepass()">CHANGE PASSWORD</button>
<!-- <button ion-button class="changepass_btn" (click)="changepass()">CHANGE PASSWORD</button> -->
</div>
</form>
</div>
......
......@@ -121,4 +121,9 @@ page-myprofile {
}
.er_req{color:#ff6060;font-size: 15px}
.primary{color: #f7941e}
// over-written
.radio-md .radio-inner{background-color: #f7941e !important;}
.radio-md .radio-checked{border-color:#404041 !important}
}
......@@ -25,8 +25,8 @@ export class MyprofilePage {
maxDate:any;
constructor(public navCtrl: NavController, public navParams: NavParams, private formBuilder: FormBuilder, private http: Http, private orderbyPipe: OrderbyPipe, private myservice: Myservice, private storage: Storage, public events: Events, private toast: Toast) {
this.maxDate = new Date().getFullYear()
console.log(this.maxDate)
this.editForm = this.formBuilder.group({
name: ['', Validators.compose([Validators.required, Validators.minLength(3)])],
......@@ -56,7 +56,6 @@ export class MyprofilePage {
this.local = data;
this.myservice.load_post({id:data.id}, 'getdriverDetails').subscribe(resp => {
if (resp.status == 'success') {
console.log(resp.data)
this.editForm.controls['name'].setValue(resp.data.name)
this.editForm.controls['username'].setValue(resp.data.user_name)
this.editForm.controls['email'].setValue(resp.data.email)
......@@ -117,9 +116,9 @@ export class MyprofilePage {
this.events.publish('driver:profile', this.local);
// this.toast.show(response.message, '2000', 'center').subscribe(toast => {
// console.log(toast);
// });
this.toast.show(response.message, '2000', 'center').subscribe(toast => {
console.log(toast);
});
}
else {
......@@ -128,8 +127,4 @@ export class MyprofilePage {
})
}
changepass(){
this.navCtrl.push("ChangepassPage");
}
}
import { Component, NgZone } from '@angular/core';
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams, Platform } from 'ionic-angular';
import { dataService } from "../../providers/common.service";
import { Myservice } from "../../providers/myservice";
import { Storage } from "@ionic/storage";
import * as firebase from 'firebase';
import { DatePipe } from '@angular/common';
declare var google;
......@@ -22,7 +21,7 @@ export class PaymentPage {
rate = this.data.getrateData();
details:any;
constructor(public navCtrl: NavController, public navParams: NavParams, private data: dataService, private zone: NgZone, private myservice: Myservice, private storage: Storage, public platform: Platform, private datePipe: DatePipe) {
constructor(public navCtrl: NavController, public navParams: NavParams, private data: dataService, private myservice: Myservice, public platform: Platform, private datePipe: DatePipe) {
}
ionViewDidEnter() {
......
......@@ -4,6 +4,7 @@ import { Myservice } from "../../providers/myservice";
import { Storage } from "@ionic/storage";
import { driver } from "../../models/mymodel";
import { dataService } from "../../providers/common.service";
import { Toast } from "@ionic-native/toast";
@IonicPage()
@Component({
......@@ -16,7 +17,7 @@ export class QuickridePage {
local:driver
baseUrl = this.myservice.base_url
constructor(public navCtrl: NavController, public navParams: NavParams, private myservice: Myservice, private storage: Storage, private data: dataService) {
constructor(public navCtrl: NavController, public navParams: NavParams, private myservice: Myservice, private storage: Storage, private data: dataService, private toast:Toast) {
}
ionViewDidEnter() {
......@@ -49,10 +50,13 @@ export class QuickridePage {
accept(){
this.myservice.load_post({ bookingId: this.bookingId,driverId:this.local.id},'rideAccept').subscribe(resp=>{
if(resp.status == 'success'){
this.toast.show(resp.message, '2000', 'center').subscribe(toast => {
console.log(toast);
});
this.navCtrl.pop()
}
else{
this.myservice.show_alert('','Please try again')
this.myservice.show_alert('',resp.message)
}
})
}
......
......@@ -48,7 +48,7 @@ export class SigninPage {
}
else {
this.myservice.hide_loader();
this.myservice.show_alert('', response.message)
this.myservice.show_alert('', response[0].message)
}
})
}
......
......@@ -51,8 +51,8 @@ export class SignupPage {
this.myservice.show_loader()
this.geolocation.getCurrentPosition().then((resp) => {
// this.onesignal.getIds().then((id) => {
this.signupForm.controls['deviceid'].setValue(0/*id.userId*/)
this.onesignal.getIds().then((id) => {
this.signupForm.controls['deviceid'].setValue(/*0*/id.userId)
this.myservice.load_post(this.signupForm.value, 'driver_sign_up').subscribe(response => {
this.myservice.hide_loader()
......@@ -68,7 +68,7 @@ export class SignupPage {
this.myservice.show_alert('', response.message)
}
})
// })
})
}).catch((error) => {
console.log('Error getting location', error);
});
......
......@@ -105,7 +105,7 @@ export class UserlocationPage {
anchor: new google.maps.Point(25, 12)
};
var marker = new google.maps.Marker({
new google.maps.Marker({
position: driverLoc,
map: This.map,
icon: dimage
......@@ -148,7 +148,7 @@ export class UserlocationPage {
this.details.actualPick = new Date().getTime()
this.started = true;
this.temp = false
this.temp = false;
var This = this;
firebase.database().ref("drivers/" + This.pushId + "/").update({ started: true })
......
......@@ -9,16 +9,13 @@ import { AbstractControl, ValidatorFn } from '@angular/forms'
export class Myservice {
// base_url = 'http://techlabz.in/bmd_new/'
base_url = 'http://192.168.140.20/CMC/'
webservice_url = this.base_url + 'web_service/'
base_url:string = 'http://192.168.140.20/CMC/'
webservice_url: string = this.base_url + 'web_service/'
loader: any;
alert: any;
post_url: any;
data: any;
result: any;
msg_push: any;
constructor(public http: Http, public loadingCtrl: LoadingController, public alertCtrl: AlertController, public events: Events) { }
......@@ -66,10 +63,6 @@ export class Myservice {
.map(res => res.json());
}
get_baseurl() {
return this.base_url;
}
checkLimit(min: number, max: number): ValidatorFn {
return (c: AbstractControl): { [key: string]: boolean } | null => {
if (c.value && (isNaN(c.value) || c.value < min || c.value > max)) {
......
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