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
+21 -5
View File
@@ -39,6 +39,7 @@ export class ProfilePage implements OnInit {
taskExist = true;
taskNotExist = false;
isloading = false;
profilePicture = "";
SessionStore = SessionStore;
@@ -53,7 +54,8 @@ export class ProfilePage implements OnInit {
public ThemeService: ThemeService,
private notificationService: NotificationsService,
private processesService: ProcessesService,
private eventsService: EventsService
private eventsService: EventsService,
private storageService: StorageService,
) {
@@ -62,18 +64,18 @@ export class ProfilePage implements OnInit {
this.logoutOut = true
});
this.eventTriger.getObservable().subscribe((event) => {
/* this.eventTriger.getObservable().subscribe((event) => {
if (event.notification == "recive") {
this.getNotificationData();
} else if (event.notification == "deleted") {
console.log('header', event.notification)
this.getNotificationData();
}
});
}); */
this.notificationService.notificationReceived.subscribe(() => {
/* this.notificationService.notificationReceived.subscribe(() => {
this.getNotificationData();
});
}); */
setTimeout(() => {
this.hideImage = true
@@ -83,9 +85,19 @@ export class ProfilePage implements OnInit {
ngOnInit() {
this.getNotificationData();
this.getProfilpicture();
}
getProfilpicture() {
this.storageService.get(this.SessionStore.user.RoleID.toString()).then((picture) => {
console.log(picture)
this.profilePicture = picture
}).catch((error ) => {
this.profilePicture = "";
})
}
close() {
this.modalController.dismiss();
@@ -102,6 +114,8 @@ export class ProfilePage implements OnInit {
//if(keyExist) {
await this.storageservice.get("Notifications").then((value) => {
console.log('Getnotifications 111', value)
this.DataArray = []
value.forEach((element, i) => {
console.log('Getnotifications', element, i)
@@ -207,11 +221,13 @@ export class ProfilePage implements OnInit {
if (Service === "agenda" && Object === "event-list") {
this.isloading = true
this.processesService.GetTask(IdObject).subscribe((task) => {
console.log('evento exist')
this.zone.run(() => this.router.navigate(['/home/agenda/event-list/approve-event', IdObject, 'agenda']));
this.deleteNotification(index);
this.isloading = false
}, (error) => {
console.log('evento não existe')
this.notificationdata[i].read = true;
this.isloading = false
})