diff --git a/src/app/services/agenda/list-box.service.ts b/src/app/services/agenda/list-box.service.ts index 91e8f8054..8ba5d9203 100644 --- a/src/app/services/agenda/list-box.service.ts +++ b/src/app/services/agenda/list-box.service.ts @@ -263,6 +263,10 @@ export class ListBoxService { limite.setDate(limite.getDate() + 10) limite.setHours(0) + selectedDate.setHours(0); + selectedDate.setMinutes(0); + selectedDate.setSeconds(0); + return (selectedDate.getTime() <= new Date(event.start).getTime() || selectedDate.getTime() <= new Date(event.end).getTime()) && (limite.getTime() >= new Date(event.start).getTime() || limite.getTime() >= new Date(event.end).getTime()) } diff --git a/src/app/shared/header/header.page.ts b/src/app/shared/header/header.page.ts index a1e6ce649..f3755cdd9 100644 --- a/src/app/shared/header/header.page.ts +++ b/src/app/shared/header/header.page.ts @@ -102,12 +102,12 @@ export class HeaderPage implements OnInit { getProfilpicture() { - if(this.SessionStore.user.UserPhoto) { + if (this.SessionStore.user.UserPhoto) { this.attachmentService.getUserProfilePhoto(this.SessionStore.user.UserPhoto).subscribe((base) => { this.storageService.store(this.SessionStore.user.RoleID.toString(), 'data:image/jpeg;base64,' + base).then((value) => { this.profilePicture = 'data:image/jpeg;base64,' + base; - + console.log('picture saved') }).catch((error) => { console.log('picture not saved') @@ -269,7 +269,7 @@ export class HeaderPage implements OnInit { modal.onDidDismiss().then(() => { this.notificationLengthData() - this.getProfilpicture() + this.getProfilePictureSorage() this.showProfileModal = false }) @@ -314,4 +314,13 @@ export class HeaderPage implements OnInit { } + getProfilePictureSorage() { + this.storageService.get(this.SessionStore.user.RoleID.toString()).then((picture) => { + /* console.log(picture) */ + this.profilePicture = picture + }).catch((error) => { + this.profilePicture = ""; + }) + } + }