|
@@ -23,11 +23,7 @@ export class InternalPageHeaderComponent implements OnInit {
|
|
|
spinner.show();
|
|
|
}
|
|
|
|
|
|
- dataLoginUser = {
|
|
|
- name: '',
|
|
|
- photo: '',
|
|
|
- id: '',
|
|
|
- }
|
|
|
+ dataLoginUser:any;
|
|
|
|
|
|
currentDate: any = Date.now();
|
|
|
|
|
@@ -40,11 +36,9 @@ export class InternalPageHeaderComponent implements OnInit {
|
|
|
|
|
|
this.authSer.footerData = [];
|
|
|
|
|
|
- if(!this.authSer.isAuthenticated()) {
|
|
|
- const userLoginData = JSON.parse(localStorage.getItem('userData'));
|
|
|
- this.dataLoginUser.name = userLoginData ? userLoginData.name : '';
|
|
|
- this.dataLoginUser.photo = userLoginData ? userLoginData.photo : '';
|
|
|
- this.dataLoginUser.id = userLoginData ? userLoginData.id : null;
|
|
|
+ if(!this.authSer.isAuthenticated()) {
|
|
|
+ console.log('user data internal header', this.authSer.returnUserData());
|
|
|
+ this.dataLoginUser = this.authSer.returnUserData();
|
|
|
}
|
|
|
|
|
|
this.authSer.onGetFooterData('internal').subscribe(
|