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
63f87f70
Commit
63f87f70
authored
Jan 06, 2020
by
Priyanka Upadhye
Browse files
created settings menu
parent
29659628
Changes
8
Hide whitespace changes
Inline
Side-by-side
src/app/app-routing.module.ts
View file @
63f87f70
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
)
},
{
path
:
'
hirebike
'
,
loadChildren
:
()
=>
import
(
'
./hirebike/hirebike.module
'
).
then
(
m
=>
m
.
HirebikePageModule
)
},
{
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
)
},
{
path
:
'
reset-password
'
,
loadChildren
:
()
=>
import
(
'
./reset-password/reset-password.module
'
).
then
(
m
=>
m
.
ResetPasswordPageModule
)
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
)
},
{
path
:
'
hirebike
'
,
loadChildren
:
()
=>
import
(
'
./hirebike/hirebike.module
'
).
then
(
m
=>
m
.
HirebikePageModule
)
},
{
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
)
},
{
path
:
'
reset-password
'
,
loadChildren
:
()
=>
import
(
'
./auth/reset-password/reset-password.module
'
).
then
(
m
=>
m
.
ResetPasswordPageModule
)
},
{
path
:
'
settings
'
,
loadChildren
:
()
=>
import
(
'
./settings/settings.module
'
).
then
(
m
=>
m
.
SettingsPageModule
)
}
];
@
NgModule
({
imports
:
[
RouterModule
.
forRoot
(
routes
,
{
preloadingStrategy
:
PreloadAllModules
})
],
exports
:
[
RouterModule
]
})
export
class
AppRoutingModule
{}
];
@
NgModule
({
imports
:
[
RouterModule
.
forRoot
(
routes
,
{
preloadingStrategy
:
PreloadAllModules
})
],
exports
:
[
RouterModule
]
})
export
class
AppRoutingModule
{}
...
...
src/app/app.component.ts
View file @
63f87f70
...
...
@@ -48,6 +48,11 @@ export class AppComponent {
url
:
'
/help-line
'
,
icon
:
'
call
'
},
{
title
:
'
Settings
'
,
url
:
'
/settings
'
,
icon
:
'
settings
'
},
{
title
:
'
Logout
'
,
url
:
'
/login
'
,
...
...
src/app/
re
set
-password/reset-password
-routing.module.ts
→
src/app/set
tings/settings
-routing.module.ts
View file @
63f87f70
import
{
NgModule
}
from
'
@angular/core
'
;
import
{
Routes
,
RouterModule
}
from
'
@angular/router
'
;
import
{
ResetPassword
Page
}
from
'
./
re
set
-password
.page
'
;
import
{
Settings
Page
}
from
'
./set
tings
.page
'
;
const
routes
:
Routes
=
[
{
path
:
''
,
component
:
ResetPassword
Page
component
:
Settings
Page
}
];
...
...
@@ -14,4 +14,4 @@ const routes: Routes = [
imports
:
[
RouterModule
.
forChild
(
routes
)],
exports
:
[
RouterModule
],
})
export
class
ResetPassword
PageRoutingModule
{}
export
class
Settings
PageRoutingModule
{}
src/app/
re
set
-password/reset-password
.module.ts
→
src/app/set
tings/settings
.module.ts
View file @
63f87f70
...
...
@@ -4,17 +4,17 @@ import { FormsModule } from '@angular/forms';
import
{
IonicModule
}
from
'
@ionic/angular
'
;
import
{
ResetPassword
PageRoutingModule
}
from
'
./
re
set
-password
-routing.module
'
;
import
{
Settings
PageRoutingModule
}
from
'
./set
tings
-routing.module
'
;
import
{
ResetPassword
Page
}
from
'
./
re
set
-password
.page
'
;
import
{
Settings
Page
}
from
'
./set
tings
.page
'
;
@
NgModule
({
imports
:
[
CommonModule
,
FormsModule
,
IonicModule
,
ResetPassword
PageRoutingModule
Settings
PageRoutingModule
],
declarations
:
[
ResetPassword
Page
]
declarations
:
[
Settings
Page
]
})
export
class
ResetPassword
PageModule
{}
export
class
Settings
PageModule
{}
src/app/settings/settings.page.html
0 → 100644
View file @
63f87f70
<ion-header>
<ion-toolbar
color=
"awPrimary"
>
<ion-buttons
slot=
"start"
>
<ion-menu-button></ion-menu-button>
</ion-buttons>
<ion-title
slot=
"start"
>
Settings
</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
<ion-item
(click)=
"ChangePassword()"
>
<ion-label>
Change Password
</ion-label>
</ion-item>
<ion-item
(click)=
"DeactivateUser()"
>
<ion-label>
Deactivate Account
</ion-label>
</ion-item>
</ion-content>
src/app/
re
set
-password/reset-password
.page.scss
→
src/app/set
tings/settings
.page.scss
View file @
63f87f70
File moved
src/app/
re
set
-password/reset-password
.page.spec.ts
→
src/app/set
tings/settings
.page.spec.ts
View file @
63f87f70
import
{
async
,
ComponentFixture
,
TestBed
}
from
'
@angular/core/testing
'
;
import
{
IonicModule
}
from
'
@ionic/angular
'
;
import
{
ResetPassword
Page
}
from
'
./
re
set
-password
.page
'
;
import
{
Settings
Page
}
from
'
./set
tings
.page
'
;
describe
(
'
ResetPassword
Page
'
,
()
=>
{
let
component
:
ResetPassword
Page
;
let
fixture
:
ComponentFixture
<
ResetPassword
Page
>
;
describe
(
'
Settings
Page
'
,
()
=>
{
let
component
:
Settings
Page
;
let
fixture
:
ComponentFixture
<
Settings
Page
>
;
beforeEach
(
async
(()
=>
{
TestBed
.
configureTestingModule
({
declarations
:
[
ResetPassword
Page
],
declarations
:
[
Settings
Page
],
imports
:
[
IonicModule
.
forRoot
()]
}).
compileComponents
();
fixture
=
TestBed
.
createComponent
(
ResetPassword
Page
);
fixture
=
TestBed
.
createComponent
(
Settings
Page
);
component
=
fixture
.
componentInstance
;
fixture
.
detectChanges
();
}));
...
...
src/app/settings/settings.page.ts
0 → 100644
View file @
63f87f70
import
{
Component
,
OnInit
}
from
'
@angular/core
'
;
import
{
Router
,
LoadChildrenCallback
}
from
'
@angular/router
'
;
import
{
ToastService
}
from
'
../services/toast.service
'
;
@
Component
({
selector
:
'
app-settings
'
,
templateUrl
:
'
./settings.page.html
'
,
styleUrls
:
[
'
./settings.page.scss
'
],
})
export
class
SettingsPage
implements
OnInit
{
constructor
(
private
router
:
Router
,
private
toastService
:
ToastService
)
{
}
ngOnInit
()
{
}
ChangePassword
()
{
this
.
router
.
navigateByUrl
(
'
/reset-password
'
);
}
DeactivateUser
(){
this
.
toastService
.
showToast
(
"
Account Deactivated Sucessfully
"
);
this
.
router
.
navigateByUrl
(
'
/logout
'
);
}
}
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