From e491395d6d5b6f5ba3cb47e59eb63092f688da07 Mon Sep 17 00:00:00 2001 From: gap95 Date: Mon, 16 Dec 2019 23:12:05 +0100 Subject: [PATCH] scrolling added in ride history --- src/app/app-routing.module.ts | 77 ++++++++++++----------- src/app/app.component.ts | 5 ++ src/app/hirebike/hirebike.page.ts | 1 + src/app/ridehistory/ridehistory.page.scss | 2 +- 4 files changed, 48 insertions(+), 37 deletions(-) diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 11aa6fd..15f5180 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -1,28 +1,29 @@ -import { NgModule } from '@angular/core'; -import { PreloadAllModules, RouterModule, Routes } from '@angular/router'; - -const routes: Routes = [ - { - path: '', - redirectTo: 'login', - pathMatch: 'full' - }, - { - path: 'home', - loadChildren: () => import('./home/home.module').then(m => m.HomePageModule) - }, - { - path: 'list', - loadChildren: () => import('./list/list.module').then(m => m.ListPageModule) - }, - { - path: 'login', - loadChildren: () => import('./auth/login/login.module').then( m => m.LoginPageModule) - }, - { - path: 'register', - loadChildren: () => import('./auth/register/register.module').then( m => m.RegisterPageModule) - }, { +import { NgModule } from '@angular/core'; +import { PreloadAllModules, RouterModule, Routes } from '@angular/router'; + +const routes: Routes = [ + { + path: '', + redirectTo: 'login', + pathMatch: 'full' + }, + { + path: 'home', + loadChildren: () => import('./home/home.module').then(m => m.HomePageModule) + }, + { + path: 'list', + loadChildren: () => import('./list/list.module').then(m => m.ListPageModule) + }, + { + path: 'login', + loadChildren: () => import('./auth/login/login.module').then( m => m.LoginPageModule) + }, + { + path: 'register', + loadChildren: () => import('./auth/register/register.module').then( m => m.RegisterPageModule) + }, + { path: 'myreservation', loadChildren: () => import('./myreservation/myreservation.module').then( m => m.MyreservationPageModule) }, @@ -34,6 +35,10 @@ const routes: Routes = [ path: 'ridehistory', loadChildren: () => import('./ridehistory/ridehistory.module').then( m => m.RidehistoryPageModule) }, + { + path: 'feedback', + loadChildren: () => import('./feedback/feedback.module').then( m => m.FeedbackPageModule) +}, { path: 'help-line', loadChildren: () => import('./help-line/help-line.module').then( m => m.HelpLinePageModule) @@ -43,14 +48,14 @@ const routes: Routes = [ loadChildren: () => import('./reset-password/reset-password.module').then( m => m.ResetPasswordPageModule) } - - -]; - -@NgModule({ - imports: [ - RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules }) - ], - exports: [RouterModule] -}) -export class AppRoutingModule {} + + +]; + +@NgModule({ + imports: [ + RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules }) + ], + exports: [RouterModule] +}) +export class AppRoutingModule {} diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 39fccb2..9082ff6 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -38,6 +38,11 @@ export class AppComponent { url: '/ridehistory', icon: 'clipboard' }, + { + title: 'Feedback', + url: '/feedback', + icon: 'clipboard' + }, { title: 'Help', url: '/help-line', diff --git a/src/app/hirebike/hirebike.page.ts b/src/app/hirebike/hirebike.page.ts index 0b8f626..9a32854 100644 --- a/src/app/hirebike/hirebike.page.ts +++ b/src/app/hirebike/hirebike.page.ts @@ -217,6 +217,7 @@ export class HirebikePage implements OnInit { let bikeApi = this.httpClient.get(url, { headers }); bikeApi.subscribe((resp) => { console.log('my data: ', resp); + this.feedbackService.setBikeid(this.bikeDetails.id); this.loadingService.hideLoader(); this.toastService.showToast("Trip Started"); this.isBikeHired = true; diff --git a/src/app/ridehistory/ridehistory.page.scss b/src/app/ridehistory/ridehistory.page.scss index 9a74ed8..1dea37d 100644 --- a/src/app/ridehistory/ridehistory.page.scss +++ b/src/app/ridehistory/ridehistory.page.scss @@ -1,6 +1,6 @@ .ride-list-container{ position: relative; - + overflow-y: scroll; .bike-list-expander{ position: absolute; font-size: 32px; -- GitLab