mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
bugs fixed
This commit is contained in:
@@ -10,6 +10,8 @@ import { SessionStore } from 'src/app/store/session.service';
|
||||
import { EventTrigger } from '../../services/eventTrigger.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-profile',
|
||||
@@ -34,6 +36,9 @@ export class ProfilePage implements OnInit {
|
||||
logoutOut = false
|
||||
notificationStatus = '';
|
||||
environment = environment
|
||||
taskExist = true;
|
||||
taskNotExist = false;
|
||||
|
||||
|
||||
SessionStore = SessionStore;
|
||||
constructor(
|
||||
@@ -45,7 +50,9 @@ export class ProfilePage implements OnInit {
|
||||
private platform: Platform,
|
||||
private eventTriger: EventTrigger,
|
||||
public ThemeService: ThemeService,
|
||||
private notificationService: NotificationsService
|
||||
private notificationService: NotificationsService,
|
||||
private processesService: ProcessesService,
|
||||
private eventsService: EventsService
|
||||
) {
|
||||
|
||||
|
||||
@@ -112,7 +119,8 @@ export class ProfilePage implements OnInit {
|
||||
Location: element.data.Location,
|
||||
TypeAgenda: element.data.TypeAgenda,
|
||||
Role: element.data.Role,
|
||||
Status: element.data.Status
|
||||
Status: element.data.Status,
|
||||
read: false,
|
||||
}
|
||||
|
||||
} else if (element.data) {
|
||||
@@ -129,7 +137,8 @@ export class ProfilePage implements OnInit {
|
||||
Location: element.data.Location,
|
||||
TypeAgenda: element.data.TypeAgenda,
|
||||
Role: element.data.Role,
|
||||
Status: element.data.Status
|
||||
Status: element.data.Status,
|
||||
read: false,
|
||||
}
|
||||
|
||||
} else {
|
||||
@@ -147,14 +156,15 @@ export class ProfilePage implements OnInit {
|
||||
dateEnd: element.dateEnd,
|
||||
dateInit: element.dateInit,
|
||||
index: element.index,
|
||||
title: element.title
|
||||
title: element.title,
|
||||
read: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.DataArray.push(notificationObject)
|
||||
});
|
||||
this.notificationdata = this.DataArray
|
||||
this.notificationdata = this.DataArray.reverse();
|
||||
}).catch((error) => {
|
||||
console.error('storage getnotification: ', error)
|
||||
})
|
||||
@@ -173,22 +183,95 @@ export class ProfilePage implements OnInit {
|
||||
return time;
|
||||
}
|
||||
|
||||
notificatinsRoutes = (index, Service, Object, IdObject, FolderId) => {
|
||||
notificatinsRoutes = (index, Service, Object, IdObject, FolderId,i) => {
|
||||
|
||||
console.log(index, i)
|
||||
|
||||
if(Service === "agenda") {
|
||||
this.eventsService.getEvent(IdObject).subscribe((task) => {
|
||||
|
||||
if (Service === "agenda" && IdObject.length > 10) {
|
||||
this.zone.run(() => this.router.navigate(['/home/agenda', IdObject, 'agenda']));
|
||||
|
||||
} else if (Service === "agenda" && Object === "event-list") {
|
||||
//this.zone.run(() => this.router.navigate(['/home/gabinete-digital/event-list/approve-event',IdObject, 'agenda']));
|
||||
this.zone.run(() => this.router.navigate(['/home/agenda/event-list/approve-event', IdObject, 'agenda']));
|
||||
|
||||
}
|
||||
|
||||
this.deleteNotification(index);
|
||||
|
||||
}, (error) => {
|
||||
this.notificationdata[i].read = true;
|
||||
})
|
||||
|
||||
} else if (Service === "gabinete-digital") {
|
||||
|
||||
this.processesService.GetTask(IdObject).subscribe((task) => {
|
||||
|
||||
if (Service === "gabinete-digital" && Object === "expedientes") {
|
||||
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/expediente', IdObject, 'gabinete-digital']));
|
||||
} else if (Service === "gabinete-digital" && Object === "despachos") {
|
||||
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/despachos', IdObject, 'gabinete-digital'], { replaceUrl: true }));
|
||||
}else if (Service === "gabinete-digital" && Object === "parecer") {
|
||||
|
||||
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/pedidos', IdObject, 'gabinete-digital']));
|
||||
}
|
||||
else if (Service === "gabinete-digital" && Object === "deferimento") {
|
||||
|
||||
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/pedidos', IdObject, 'gabinete-digital']));
|
||||
}
|
||||
else if (Service === "gabinete-digital" && Object === "despachos-pr") {
|
||||
|
||||
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/despachos-pr', IdObject, 'gabinete-digital']));
|
||||
}
|
||||
|
||||
this.deleteNotification(index);
|
||||
|
||||
}, (error) => {
|
||||
this.notificationdata[i].read = true;
|
||||
})
|
||||
|
||||
|
||||
if (Service === "agenda" && IdObject.length > 10) {
|
||||
} else if( Service === "accoes") {
|
||||
if (Service === "accoes" && Object === "accao") {
|
||||
this.zone.run(() => this.router.navigate(['/home/publications', IdObject]));
|
||||
this.deleteNotification(index);
|
||||
}
|
||||
else if (Service === "accoes" && Object === "publicacao") {
|
||||
this.zone.run(() => this.router.navigate(['/home/publications/view-publications', FolderId, IdObject]));
|
||||
this.deleteNotification(index);
|
||||
}
|
||||
|
||||
} else if (Service === "chat") {
|
||||
let navigationExtras: NavigationExtras = { queryParams: { "roomId": IdObject, } };
|
||||
this.zone.run(() => this.router.navigate(['/home/chat'], navigationExtras));
|
||||
this.deleteNotification(index);
|
||||
}
|
||||
|
||||
|
||||
/* if (Service === "agenda" && IdObject.length > 10) {
|
||||
this.zone.run(() => this.router.navigate(['/home/agenda', IdObject, 'agenda']));
|
||||
}
|
||||
else if (Service === "gabinete-digital" && Object === "expediente") {
|
||||
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/expediente', IdObject, 'gabinete-digital']));
|
||||
else if (Service === "gabinete-digital" && Object === "expedientes") {
|
||||
this.processesService.GetTask(IdObject).subscribe((task) => {
|
||||
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/expediente', IdObject, 'gabinete-digital']));
|
||||
}, (error) => {
|
||||
this.notificationdata[i].read = true;
|
||||
})
|
||||
}
|
||||
else if (Service === "agenda" && Object === "event-list") {
|
||||
//this.zone.run(() => this.router.navigate(['/home/gabinete-digital/event-list/approve-event',IdObject, 'agenda']));
|
||||
this.zone.run(() => this.router.navigate(['/home/agenda/event-list/approve-event', IdObject, 'agenda']));
|
||||
|
||||
} else if (Service === "gabinete-digital" && Object === "despachos") {
|
||||
this.processesService.GetTask(IdObject).subscribe((task) => {
|
||||
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/despachos', IdObject, 'gabinete-digital'], { replaceUrl: true }));
|
||||
}, (error) => {
|
||||
this.notificationdata[i].read = true;
|
||||
})
|
||||
|
||||
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/despachos', IdObject, 'gabinete-digital'], { replaceUrl: true }));
|
||||
|
||||
}
|
||||
else if (Service === "gabinete-digital" && Object === "parecer") {
|
||||
|
||||
@@ -220,10 +303,10 @@ export class ProfilePage implements OnInit {
|
||||
} else if (Service === "chat") {
|
||||
let navigationExtras: NavigationExtras = { queryParams: { "roomId": IdObject, } };
|
||||
this.zone.run(() => this.router.navigate(['/home/chat'], navigationExtras));
|
||||
}
|
||||
} */
|
||||
|
||||
// this.notificationservice.tempClearArray();
|
||||
this.deleteNotification(index);
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -317,4 +400,13 @@ export class ProfilePage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
keppNotification(index) {
|
||||
this.notificationdata[index].read = false;
|
||||
}
|
||||
|
||||
doNotKeppNotification(index) {
|
||||
this.deleteNotification(index);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user