Lots of refactor with auth guards and functional customer routing

This commit is contained in:
piratefinn 2017-08-31 18:44:17 +01:00
parent 52fbda7157
commit 24037e0454
13 changed files with 143 additions and 1017 deletions

View file

@ -37,6 +37,7 @@ export class AccountEditComponent implements OnInit {
full_name : ['', [Validators.required]],
display_name : ['', [Validators.required]],
});
this.accountType = localStorage.getItem('usertype');
}
ngOnInit(): void {
@ -59,7 +60,6 @@ export class AccountEditComponent implements OnInit {
display_name: result.display_name,
});
this.api.setUserInfo( result.email, result.display_name );
this.accountType = ( result.name == null ? 'customer' : 'organisation' );
},
error => {
console.log( error._body );