Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
Callmycab-Driverapp
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-Driverapp
Commits
0464b360
Commit
0464b360
authored
Jul 25, 2018
by
Alen Jose
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'alen' into 'master'
july24 See merge request alen/CMC-driver!18
parents
70680685
4e014f9d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
38 deletions
+37
-38
config.xml
config.xml
+5
-5
app.component.ts
src/app/app.component.ts
+4
-4
home.ts
src/pages/home/home.ts
+26
-25
quickride.ts
src/pages/quickride/quickride.ts
+0
-1
userlocation.ts
src/pages/userlocation/userlocation.ts
+2
-3
No files found.
config.xml
View file @
0464b360
...
...
@@ -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>
src/app/app.component.ts
View file @
0464b360
...
...
@@ -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
)
{
...
...
src/pages/home/home.ts
View file @
0464b360
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','')
}
}
src/pages/quickride/quickride.ts
View file @
0464b360
...
...
@@ -81,7 +81,6 @@ export class QuickridePage {
}
})
modal
.
present
();
// this.navCtrl.pop();
}
pick
()
{
...
...
src/pages/userlocation/userlocation.ts
View file @
0464b360
...
...
@@ -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
);
}
...
...
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