Loading src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts +0 −2 Original line number Diff line number Diff line Loading @@ -214,7 +214,6 @@ export class EditIndividualsComponent implements OnInit { } ) } // this.updateGeographicSite(); } refreshIndividual(updatedIndividual: Individual) { Loading @@ -223,7 +222,6 @@ export class EditIndividualsComponent implements OnInit { if(this.testbedProvider) { this.retrieveGeographicSite() } console.log("TODO-Retrieve Geographic Site info as well")//TODO } retrieveGeographicSite(){ Loading src/app/shared/components/redirect/redirect.component.ts +1 −23 Original line number Diff line number Diff line Loading @@ -17,46 +17,24 @@ export class RedirectComponent implements OnInit { ) { } ngOnInit() { // this.authService.fetchIndividualInfo(); let isTestbedProvider = false; if(this.authService != null && this.authService.portalUserJWT !=null) { for(var val of this.authService.portalUserJWT.realm_access.roles){ if (val ==='TESTBED_PROVIDER') { isTestbedProvider=true } }} //TODO insert redirection logic const activePortal = localStorage.getItem('active_portal') if (activePortal === 'services') { if (isTestbedProvider){ this.router.navigate(['services', 'individual_update']) } else { // this.router.navigate(['services', 'services_marketplace']) this.router.navigate(['services', 'individual_update']) } } else if (activePortal === 'resources') { this.router.navigate(['resources', 'resource_catalogs']) } else if (activePortal === 'testing') { if (isTestbedProvider){ this.router.navigate(['testing', 'individual_update']) } else { this.router.navigate(['testing', 'service_test_specs']) } } else if (activePortal === 'products') { if (isTestbedProvider){ this.router.navigate(['products', 'individual_update']) } else { this.router.navigate(['products', 'marketplace']) } } else { Loading src/app/shared/services/auth.service.ts +11 −23 Original line number Diff line number Diff line Loading @@ -126,18 +126,6 @@ export class AuthService { ) } public fetchIndividualInfo() { // this.portalUserJWT = decode(this.getAccessToken()) this.individualService.retrieveIndividual({id:'myuser'}).subscribe( data => { this.portalUser = data }, error => { console.error(error) // this.toast.error('An error occurred fetching user information') // this.logout() } ) } public login() { this.oauthService.initCodeFlow() } Loading Loading
src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts +0 −2 Original line number Diff line number Diff line Loading @@ -214,7 +214,6 @@ export class EditIndividualsComponent implements OnInit { } ) } // this.updateGeographicSite(); } refreshIndividual(updatedIndividual: Individual) { Loading @@ -223,7 +222,6 @@ export class EditIndividualsComponent implements OnInit { if(this.testbedProvider) { this.retrieveGeographicSite() } console.log("TODO-Retrieve Geographic Site info as well")//TODO } retrieveGeographicSite(){ Loading
src/app/shared/components/redirect/redirect.component.ts +1 −23 Original line number Diff line number Diff line Loading @@ -17,46 +17,24 @@ export class RedirectComponent implements OnInit { ) { } ngOnInit() { // this.authService.fetchIndividualInfo(); let isTestbedProvider = false; if(this.authService != null && this.authService.portalUserJWT !=null) { for(var val of this.authService.portalUserJWT.realm_access.roles){ if (val ==='TESTBED_PROVIDER') { isTestbedProvider=true } }} //TODO insert redirection logic const activePortal = localStorage.getItem('active_portal') if (activePortal === 'services') { if (isTestbedProvider){ this.router.navigate(['services', 'individual_update']) } else { // this.router.navigate(['services', 'services_marketplace']) this.router.navigate(['services', 'individual_update']) } } else if (activePortal === 'resources') { this.router.navigate(['resources', 'resource_catalogs']) } else if (activePortal === 'testing') { if (isTestbedProvider){ this.router.navigate(['testing', 'individual_update']) } else { this.router.navigate(['testing', 'service_test_specs']) } } else if (activePortal === 'products') { if (isTestbedProvider){ this.router.navigate(['products', 'individual_update']) } else { this.router.navigate(['products', 'marketplace']) } } else { Loading
src/app/shared/services/auth.service.ts +11 −23 Original line number Diff line number Diff line Loading @@ -126,18 +126,6 @@ export class AuthService { ) } public fetchIndividualInfo() { // this.portalUserJWT = decode(this.getAccessToken()) this.individualService.retrieveIndividual({id:'myuser'}).subscribe( data => { this.portalUser = data }, error => { console.error(error) // this.toast.error('An error occurred fetching user information') // this.logout() } ) } public login() { this.oauthService.initCodeFlow() } Loading