This commit is contained in:
Peter Maquiran
2023-01-03 21:08:49 +01:00
parent f7aae9aa00
commit fcc8bc6b74
20 changed files with 356 additions and 68 deletions
+1 -1
View File
@@ -115,7 +115,7 @@ export class ChatPage implements OnInit {
public ChatSystemService: ChatSystemService,
) {
this.loggedUserChat = SessionStore.user.ChatData['data'];
this.loggedUserChat = SessionStore.user.ChatData?.data;
this.headers = new HttpHeaders();
window.onresize = (event) => {
if (window.innerWidth > 701) {
+4 -2
View File
@@ -243,8 +243,10 @@ export class EventsPage implements OnInit {
this.storage.get('process').then((process: any[] = []) => {
//
const ExpedienteTask = process.map(e => this.expedienteTaskPipe.transform(e))
this.listToPresentexpediente = ExpedienteTask;
if(Array.isArray(process)) {
const ExpedienteTask = process.map(e => this.expedienteTaskPipe.transform(e))
this.listToPresentexpediente = ExpedienteTask;
}
})
this.showLoader = false;
@@ -1,7 +1,7 @@
<ion-header class="ion-no-border">
<app-header></app-header>
</ion-header>
<!-- {{ NotificationsService.active }} -->
<ion-content class="height-100 container-wrapper">
<ion-refresher slot="fixed" (ionRefresh)="doRefresh($event)">
<ion-refresher-content>
@@ -12,7 +12,7 @@
<!-- Aside left -->
<div class="aside-wrapper d-flex flex-column width-md-40 flex-grow-1">
<ion-progress-bar type="indeterminate" *ngIf="getloadKeys.length >= 1"></ion-progress-bar>
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
<div class="title-container">
<div class="title">
<ion-label>Gabinete Digital</ion-label>
@@ -41,7 +41,7 @@ import { DataService } from 'src/app/services/data.service';
import { Storage } from '@ionic/storage';
import { ExpedienteTaskPipe } from 'src/app/pipes/expediente-task.pipe';
import { SessionStore } from 'src/app/store/session.service';
import { NotificationsService } from 'src/app/services/notifications.service'
@Component({
selector: 'app-gabinete-digital',
templateUrl: './gabinete-digital.page.html',
@@ -140,7 +140,8 @@ export class GabineteDigitalPage implements OnInit {
private DeplomasServiceService: DeplomasServiceService,
private AproveEventService: AproveEventService,
private ParecerService: ParecerService,
private DespachoPRService: DespachoPRService
private DespachoPRService: DespachoPRService,
public NotificationsService: NotificationsService
) {
@@ -179,13 +180,16 @@ export class GabineteDigitalPage implements OnInit {
const pathname = window.location.pathname
this.router.events.forEach((event) => {
if (event instanceof NavigationEnd && event.url == pathname) {
this.waitForDomService.selector({
selector: 'app-gabinete-digital ion-content .aside-wrapper',
callback: () => {
this.checkRoutes();
// console.log('FIRST CALL')
this.LoadCounts();
if(this.NotificationsService.active === false) {
this.checkRoutes();
this.LoadCounts();
} else {
this.checkRoutes();
this.LoadCounts();
}
}
})
}
@@ -204,6 +208,73 @@ export class GabineteDigitalPage implements OnInit {
this.backgroundservice.registerBackService('Online', () => {
this.loadAllProcesses();
});
this.NotificationsService.registerCallback(
'despachos',
() => {
this.LoadCounts();
console.log('refresh with notification')
}
)
this.NotificationsService.registerCallback(
'despachos-pr',
() => {
this.LoadCounts();
console.log('refresh with notification')
}
)
this.NotificationsService.registerCallback(
'expediente',
() => {
this.LoadCounts();
console.log('refresh with notification')
}
)
this.NotificationsService.registerCallback(
'gabinete-digital',
() => {
this.LoadCounts();
console.log('refresh with notification')
}
)
this.NotificationsService.registerCallback(
'parecer',
() => {
this.LoadCounts();
console.log('refresh with notification')
}
)
this.NotificationsService.registerCallback(
'deferimento',
() => {
this.LoadCounts();
console.log('refresh with notification')
}
)
this.NotificationsService.registerCallback(
'diplomas-assinar',
() => {
this.LoadCounts();
console.log('refresh with notification')
}
)
this.NotificationsService.registerCallback(
'diplomas',
() => {
this.LoadCounts();
console.log('refresh with notification')
}
)
this.NotificationsService.registerCallback(
'expedientes-pr',
() => {
this.LoadCounts();
console.log('refresh with notification')
}
)
}
async loadAllProcesses() {
@@ -382,7 +453,7 @@ export class GabineteDigitalPage implements OnInit {
else if (activityName == 'Diploma Assinado') {
this.router.navigate(['/home/gabinete-digital/diplomas-assinar', serialNumber, 'gabinete-digital']);
} else {
alert('bug!')
console.log('no route!')
}
}
else if (workflowName == 'Pedido de Parecer' || workflowName == 'Pedido de Deferimento') {