-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #144 from nhsengland/develop
Release 1.15.0 of the innovation service
- Loading branch information
Showing
59 changed files
with
1,524 additions
and
334 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ import { ActivatedRoute } from '@angular/router'; | |
import { CoreComponent } from '@app/base'; | ||
import { AlertType, LinkType } from '@app/base/models'; | ||
import { RoutingHelper } from '@modules/core'; | ||
import { ServiceUsersService } from '../../../services/service-users.service'; | ||
|
||
@Component({ | ||
selector: 'app-admin-pages-admin-users-info', | ||
|
@@ -25,21 +26,45 @@ export class PageAdminUsersInfoComponent extends CoreComponent implements OnInit | |
|
||
constructor( | ||
private activatedRoute: ActivatedRoute, | ||
private serviceUsersService: ServiceUsersService | ||
) { | ||
super(); | ||
this.setPageTitle('Admin User information'); | ||
this.user = { id: this.activatedRoute.snapshot.params.userId, name: RoutingHelper.getRouteData(this.activatedRoute).user.displayName }; | ||
|
||
switch (this.activatedRoute.snapshot.queryParams.alert) { | ||
case 'adminCreationSuccess': | ||
this.alert = { | ||
type: 'SUCCESS', | ||
title: 'Admin created successfully', | ||
// message: 'Your suggestions were saved and notifications sent.' | ||
}; | ||
break; | ||
default: | ||
break; | ||
} | ||
} | ||
|
||
ngOnInit(): void { | ||
|
||
this.sections.userInfo = [ | ||
{ label: 'Name', value: 'Admin' }, | ||
{ label: 'Type', value: 'Admin' }, | ||
{ label: 'Email address', value: '[email protected]' } | ||
]; | ||
this.setPageStatus('READY'); | ||
this.serviceUsersService.getUserFullInfo(this.user.id).subscribe( | ||
response => { | ||
this.sections.userInfo = [ | ||
{ label: 'Name', value: response.displayName }, | ||
{ label: 'Type', value: response.type }, | ||
{ label: 'Email address', value: response.email } | ||
]; | ||
this.setPageStatus('READY'); | ||
}, | ||
error => { | ||
this.setPageStatus('ERROR'); | ||
this.alert = { | ||
type: 'ERROR', | ||
title: 'Unable to fetch the necessary information', | ||
message: 'Please try again or contact us for further help' | ||
}; | ||
} | ||
); | ||
|
||
} | ||
|
||
} |
Oops, something went wrong.