mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
improve
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user