Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
hdastageeri
hft_awado_app
Commits
d4429a26
Commit
d4429a26
authored
Nov 29, 2019
by
Priyanka Upadhye
Browse files
Ent trip API integrated
parent
e758ba22
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/app/hirebike/hirebike.page.html
View file @
d4429a26
...
...
@@ -21,7 +21,7 @@
<div
#mapElement
style=
"width: 100%; height: 100%"
id=
"mapContainer"
></div>
</ion-content>
<ion-footer>
<div
class=
"bike-details-container"
*ngIf=
"!isBikeHired"
>
<div
class=
"bike-details-container"
>
<div
class=
"inner"
>
<div
class=
"button-container"
>
<ion-grid>
...
...
@@ -33,21 +33,13 @@
<ion-col>
Bike Location
</ion-col>
<ion-col>
{{bikeDetails.address}}
</ion-col>
</ion-row>
<ion-row>
<ion-row
*ngIf=
"!isBikeHired"
>
<ion-col>
<ion-button
size=
"medium"
expand=
"block"
(click)=
"startTrip()"
>
Start Trip
</ion-button>
</ion-col>
</ion-row>
</ion-grid>
</div>
</div>
</div>
<div
class=
"problem-container"
*ngIf=
"isBikeHired"
>
<div
class=
"inner"
>
<div
class=
"button-container"
>
<ion-grid>
<ion-row>
<ion-row
*ngIf=
"isBikeHired"
>
<ion-col>
<ion-button
size=
"medium"
expand=
"block"
(click)=
"CancelTrip()"
>
End Trip
</ion-button>
</ion-col>
...
...
@@ -56,4 +48,5 @@
</div>
</div>
</div>
</ion-footer>
\ No newline at end of file
src/app/hirebike/hirebike.page.ts
View file @
d4429a26
...
...
@@ -102,6 +102,7 @@ export class HirebikePage implements OnInit {
bikeApi
.
subscribe
((
resp
)
=>
{
console
.
log
(
'
my data:
'
,
resp
);
this
.
toastService
.
showToast
(
"
Trip Started
"
);
this
.
isBikeHired
=
true
;
},
(
error
)
=>
{
console
.
log
(
error
)
this
.
toastService
.
showToast
(
"
This is ongoing Trip
"
)
...
...
@@ -121,7 +122,7 @@ export class HirebikePage implements OnInit {
this
.
toastService
.
showToast
(
"
Trip Ended!
"
);
},
(
error
)
=>
{
console
.
log
(
error
)
this
.
toastService
.
showToast
(
"
Unavle
to
e
nd
trip
"
)
this
.
toastService
.
showToast
(
"
No Ongong Trip
to
E
nd
"
)
});
});
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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