profile picture done

This commit is contained in:
Eudes Inácio
2023-08-29 16:05:32 +01:00
64 changed files with 519 additions and 289 deletions
+13 -1
View File
@@ -38,6 +38,7 @@ export class HeaderPage implements OnInit {
showProfileModal = false
permissionList = new PermissionList();
notificationCount: number = 0;
profilePicture = "";
constructor(
@@ -52,7 +53,8 @@ export class HeaderPage implements OnInit {
private eventTriger: EventTrigger,
public ActiveTabService: ActiveTabService,
private notificationService: NotificationsService,
private cdRef: ChangeDetectorRef
private cdRef: ChangeDetectorRef,
private storageService: StorageService,
) {
this.loggeduser = SessionStore.user;
router.events.subscribe((val) => {
@@ -76,9 +78,19 @@ export class HeaderPage implements OnInit {
async ngOnInit() {
this.hideSearch();
this.notificationLengthData();
this.getProfilpicture();
}
getProfilpicture() {
this.storageService.get(this.SessionStore.user.RoleID.toString()).then((picture) => {
console.log(picture)
this.profilePicture = picture
}).catch((error ) => {
this.profilePicture = "";
})
}
updateReciveNotification() {
this.eventTriger.getObservable().subscribe((event) => {
if (event.notification == "recive") {