Loads username on login and can edit user details

This commit is contained in:
piratefinn 2017-07-28 19:30:35 +01:00
parent 620282e9ac
commit cc1076332b
9 changed files with 341 additions and 7 deletions

View file

@ -12,6 +12,7 @@ export class FullLayoutComponent implements OnInit {
moneySpentThisMonth: any;
pointsTotal: any;
averageTransactionToday: any;
displayName: any;
constructor(
private api: ApiService,
@ -42,9 +43,12 @@ export class FullLayoutComponent implements OnInit {
this.status.isopen = !this.status.isopen;
}
ngOnInit(): void {}
// getDisplayName function from api didnt work
ngOnInit(): void {
this.displayName = localStorage.getItem('displayname') || 'User';
}
userlogout() {
userLogout() {
console.log('logout clicked');
this.api
.logout()