Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
Callmycab-Userapp
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
kevin
Callmycab-Userapp
Commits
a620aff1
Commit
a620aff1
authored
Jul 23, 2018
by
Alen Jose
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
july23
parent
631b88f0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
23 deletions
+23
-23
map.ts
src/pages/map/map.ts
+3
-3
ridedetail.html
src/pages/ridedetail/ridedetail.html
+0
-1
ridedetail.ts
src/pages/ridedetail/ridedetail.ts
+20
-19
No files found.
src/pages/map/map.ts
View file @
a620aff1
...
...
@@ -93,7 +93,7 @@ export class MapPage {
var
heading
=
google
.
maps
.
geometry
.
spherical
.
computeHeading
(
lastPosn
,
cur
)
dimage
.
rotation
=
heading
;
marker
.
setIcon
(
dimage
);
////
////
This
.
calculateAndDisplayRoute
(
directionsService
,
This
.
directionsDisplay
,
pickLoc
,
driverLoc
);
...
...
@@ -113,9 +113,9 @@ export class MapPage {
zoom
:
15
,
mapTypeId
:
google
.
maps
.
MapTypeId
.
ROADMAP
}
this
.
map
=
new
google
.
maps
.
Map
(
this
.
mapElement
.
nativeElement
,
mapOptions
);
this
.
directionsDisplay
=
new
google
.
maps
.
DirectionsRenderer
({
map
:
this
.
map
,
preserveViewport
:
true
...
...
src/pages/ridedetail/ridedetail.html
View file @
a620aff1
...
...
@@ -8,7 +8,6 @@
</style>
<ion-header
class=
"theme_dark_bg"
>
<button
ion-button
class=
"nav_btn theme_color floatLeft"
(
click
)="
back
()"
>
<ion-icon
name=
"ios-arrow-back"
></ion-icon>
...
...
src/pages/ridedetail/ridedetail.ts
View file @
a620aff1
...
...
@@ -21,8 +21,9 @@ export class RidedetailPage {
count
:
number
=
0
;
loader
:
any
;
driver
:
any
;
bkid
:
any
=
38
;
bkid
:
any
;
drivers
=
[]
temp
:
boolean
=
false
;
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
private
data
:
dataService
,
private
zone
:
NgZone
,
private
myservice
:
Myservice
,
private
storage
:
Storage
,
public
platform
:
Platform
,
public
loadingCtrl
:
LoadingController
,
private
alertCtrl
:
AlertController
)
{
}
...
...
@@ -100,26 +101,26 @@ export class RidedetailPage {
This
.
loader
.
dismissAll
();
This
.
myservice
.
show_alert
(
''
,
'No drivers found'
)
}
else
{
// var bdata = { 'book_date': This.book.date, 'drop_area': This.book.dropArea, 'pickup_area': This.book.pickArea, 'taxi_type': This.book.carDetails.car_type, 'amount': '', 'km': '', 'promocode': This.book.promocode, 'token': This.local.token, 'userid': This.local.id, 'type': 'now', 'drivers': [], 'discount': This.book.discount ? This.book.discount : 0, 'pickup_latlng': this.book.pickLat + ',' + this.book.pickLng, 'drop_latlng': this.book.dropLat + ',' + this.book.dropLng }
else
if
(
This
.
temp
==
false
)
{
var
bdata
=
{
'book_date'
:
This
.
book
.
date
,
'drop_area'
:
This
.
book
.
dropArea
,
'pickup_area'
:
This
.
book
.
pickArea
,
'taxi_type'
:
This
.
book
.
carDetails
.
car_type
,
'amount'
:
''
,
'km'
:
''
,
'promocode'
:
This
.
book
.
promocode
,
'token'
:
This
.
local
.
token
,
'userid'
:
This
.
local
.
id
,
'type'
:
'now'
,
'drivers'
:
[],
'discount'
:
This
.
book
.
discount
?
This
.
book
.
discount
:
0
,
'pickup_latlng'
:
this
.
book
.
pickLat
+
','
+
this
.
book
.
pickLng
,
'drop_latlng'
:
this
.
book
.
dropLat
+
','
+
this
.
book
.
dropLng
}
//
bdata.drivers = This.drivers;
bdata
.
drivers
=
This
.
drivers
;
//
console.log(bdata)
console
.
log
(
bdata
)
//
This.myservice.load_post(bdata, 'book_cab').subscribe(response => {
//
if (response.status == 'success') {
//
This.bkid = response.data
//
This.book.bookingId = This.bkid
//
This.data.setbookingData(This.book);
This
.
myservice
.
load_post
(
bdata
,
'book_cab'
).
subscribe
(
response
=>
{
if
(
response
.
status
==
'success'
)
{
This
.
bkid
=
response
.
data
This
.
book
.
bookingId
=
This
.
bkid
This
.
data
.
setbookingData
(
This
.
book
);
This
.
checkResp
();
// }
// else {
// This.myservice.show_alert('Failed', 'Please try again')
// This.navCtrl.pop()
// }
// })
This
.
temp
=
true
}
else
{
This
.
myservice
.
show_alert
(
'Failed'
,
'Please try again'
)
This
.
navCtrl
.
pop
()
}
})
}
}
...
...
@@ -129,7 +130,7 @@ export class RidedetailPage {
showAlert
()
{
let
alert
=
this
.
alertCtrl
.
create
({
title
:
'No drivers
found
'
,
title
:
'No drivers
are available
'
,
message
:
'Please search again.'
,
buttons
:
[
{
...
...
@@ -149,7 +150,7 @@ export class RidedetailPage {
this
.
findDrivers
()
var
This
=
this
;
setTimeout
(()
=>
{
This
.
myservice
.
load_post
({
taxiType
:
This
.
book
.
carDetails
.
car_type
,
type
:
'now'
,
driversid
:
This
.
drivers
},
'driverPush'
).
subscribe
(
data
=>
{
This
.
myservice
.
load_post
({
taxiType
:
This
.
book
.
carDetails
.
car_type
,
driversid
:
This
.
drivers
,
bookid
:
This
.
bkid
},
'driverPush'
).
subscribe
(
data
=>
{
if
(
data
.
status
==
'success'
)
This
.
checkResp
();
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment