performance

This commit is contained in:
Peter Maquiran
2023-06-11 20:17:10 +01:00
parent e6fc2f19f2
commit 2688b1e012
37 changed files with 543 additions and 257 deletions
@@ -7,6 +7,7 @@ import { EmendMessageModalPage } from '../emend-message-modal/emend-message-moda
import { ThemeService } from 'src/app/services/theme.service'
import { RouteService } from 'src/app/services/route.service';
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
import { TaskService } from 'src/app/services/task.service'
@Component({
@@ -27,7 +28,8 @@ export class EventActionsPopoverPage implements OnInit {
private toastService: ToastService,
private RouteService: RouteService,
private httpErrorHandle: HttpErrorHandle,
public ThemeService: ThemeService) {
public ThemeService: ThemeService,
public TaskService: TaskService) {
this.serialNumber = this.navParams.get('serialNumber');
this.instanceId = this.navParams.get('InstanceId');
this.activityInstanceName = this.navParams.get('InstanceId');
@@ -58,7 +60,7 @@ export class EventActionsPopoverPage implements OnInit {
const loader = this.toastService.loading()
try {
await this.processes.PostTaskAction(body).toPromise()
this.TaskService.loadEventosParaAprovacao()
this.httpErrorHandle.httpsSucessMessagge('Evento aprovação')
this.goBack();
} catch (error) {
@@ -77,7 +79,7 @@ export class EventActionsPopoverPage implements OnInit {
const loader = this.toastService.loading()
try {
await this.processes.PostTaskAction(body).toPromise()
this.TaskService.loadEventosParaAprovacao()
this.httpErrorHandle.httpsSucessMessagge('Rever')
this.goBack();
} catch (error) {
@@ -121,6 +123,7 @@ export class EventActionsPopoverPage implements OnInit {
try {
await this.processes.PostTaskAction(body).toPromise();
this.httpErrorHandle.httpsSucessMessagge('Rever')
this.TaskService.loadEventosParaAprovacao()
this.goBack();
} catch (error) {
this.httpErrorHandle.httpStatusHandle(error)
@@ -145,6 +148,7 @@ export class EventActionsPopoverPage implements OnInit {
const loader = this.toastService.loading();
try {
await this.processes.PostTaskAction(body).toPromise();
this.TaskService.loadEventosParaAprovacao()
this.httpErrorHandle.httpsSucessMessagge('Rejeitar')
this.goBack();
} catch (error) {
+1 -1
View File
@@ -26,7 +26,7 @@
<div class="main-content justify-center d-flex height-100">
<div class="box-container width-100 d-flex mx-20" style="padding: 0px;overflow: hidden;">
<ion-progress-bar type="indeterminate" *ngIf="loadingAllTask"></ion-progress-bar>
<ion-progress-bar type="indeterminate" *ngIf="loadingAllTask || TaskService.showLoader"></ion-progress-bar>
<div class="px-20 pb-20">
<p class="time ion-text-left ">{{customDate}}</p>
<div class="wrap d-flex float-left">
+19 -7
View File
@@ -72,6 +72,10 @@ export class EventsPage implements OnInit {
searchSubject: string = '';
AllProcess = []
ordinance: string = 'old'
listSubscription : {
delete(): void;
}
constructor(
private eventService: EventsService,
@@ -87,12 +91,7 @@ export class EventsPage implements OnInit {
private changeProfileService: ChangeProfileService,
public TaskService: TaskService
) {
this.loadAllTask();
window['zipPhoneCallback'] = function (zipphone) {
var frame = document.getElementById('home-iframe');
if(frame) {
@@ -101,18 +100,30 @@ export class EventsPage implements OnInit {
}
this.changeProfileService.registerCallback(() => {
this.listToPresent = [];
this.listToPresentexpediente = []
})
this.TaskService.registerCallback({
}
ngAfterViewInit(): void {
this.loadAllTask();
this.listSubscription = this.TaskService.registerCallback({
id: import.meta.url,
funx:() => {
this.dynamicSearch()
}
})
this.dynamicSearch()
}
ngOnDestroy() {
this.listSubscription.delete()
}
ngOnInit() {
@@ -170,6 +181,7 @@ export class EventsPage implements OnInit {
async loadAllTask() {
this.loadingAllTask = true
await this.TaskService.LoadTask()
this.dynamicSearch()
this.loadingAllTask = false
}
@@ -403,7 +403,7 @@ export class DespachoPrPage implements OnInit {
}
this.TaskService.loadDiplomas()
// this.goBack();
this.goBack();
}
});
}
@@ -1,17 +1,16 @@
import { Component, OnInit } from '@angular/core';
import { AnimationController, ModalController, PopoverController } from '@ionic/angular';
import { ModalController, PopoverController } from '@ionic/angular';
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
import { ProcessesService } from 'src/app/services/processes.service';
import { momentG } from 'src/plugin/momentG';
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
import { ActivatedRoute, Router } from '@angular/router';
import { ActivatedRoute } from '@angular/router';
import { BookMeetingModalPage } from '../../expediente/book-meeting-modal/book-meeting-modal.page';
import { DeplomaOptionsPage } from 'src/app/shared/popover/deploma-options/deploma-options.page';
import { ToastService } from 'src/app/services/toast.service';
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
import { Platform } from '@ionic/angular';
import { SqliteService } from 'src/app/services/sqlite.service';
import { BackgroundService } from 'src/app/services/background.service';
import { ThemeService } from 'src/app/services/theme.service'
import { RouteService } from 'src/app/services/route.service';
@@ -47,15 +46,10 @@ export class DiplomaPage implements OnInit {
private processes: ProcessesService,
public popoverController: PopoverController,
private modalController: ModalController,
private iab: InAppBrowser,
private activatedRoute: ActivatedRoute,
private router: Router,
private animationController: AnimationController,
private toastService: ToastService,
private RouteService: RouteService,
private sqliteservice: SqliteService,
private backgroundservice: BackgroundService,
private platform: Platform,
public ThemeService: ThemeService,
private httpErrorHandle: HttpErrorHandle,
private despachoService: DespachoService,
@@ -1,8 +1,8 @@
import { Component, OnDestroy, OnInit } from '@angular/core';
import { ActivatedRoute, NavigationStart, Router } from '@angular/router';
import { ProcessesService } from 'src/app/services/processes.service';
import { BackgroundService } from 'src/app/services/background.service';
import { ThemeService } from 'src/app/services/theme.service'
import { PermissionService } from 'src/app/services/permission.service';
import { DeplomasStore } from 'src/app/store/deplomas.service';
import { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe';
@@ -39,6 +39,7 @@ export class DiplomasPage implements OnInit, OnDestroy {
private router: Router,
private activatedRoute: ActivatedRoute,
private backgroundservice: BackgroundService,
public ThemeService: ThemeService,
public p: PermissionService,
public TaskService: TaskService,
private RouteService: RouteService,
@@ -1,6 +1,6 @@
import { Component, OnInit, Input, EventEmitter, Output } from '@angular/core';
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
import { AnimationController, MenuController, ModalController, PopoverController } from '@ionic/angular';
import { MenuController, ModalController, PopoverController } from '@ionic/angular';
import { Event } from 'src/app/models/event.model';
import { ProcessesService } from 'src/app/services/processes.service';
import { EmendMessageModalPage } from 'src/app/pages/agenda/emend-message-modal/emend-message-modal.page';
@@ -9,13 +9,10 @@ import { EditEventToApproveComponent } from 'src/app/shared/gabinete-digital/edi
import { ToastService } from 'src/app/services/toast.service';
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
import { SqliteService } from '../../../../services/sqlite.service';
import { BackgroundService } from '../../../../services/background.service';
import { Platform } from '@ionic/angular';
import { ThemeService } from 'src/app/services/theme.service'
import { OfflineManagerService } from 'src/app/services/offline-manager.service';
import { RouteService } from 'src/app/services/route.service';
import { Storage } from '@ionic/storage';
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
import { TaskService } from 'src/app/services/task.service'
@@ -55,12 +52,9 @@ export class ApproveEventPage implements OnInit {
private menu: MenuController,
private toastService: ToastService,
private RouteService: RouteService,
private sqliteservice: SqliteService,
private platform: Platform,
private backgroundservice: BackgroundService,
public ThemeService: ThemeService,
private offlineManager: OfflineManagerService,
private storage: Storage,
private httpErrorHandle: HttpErrorHandle,
public TaskService: TaskService
) {
@@ -55,7 +55,7 @@
</div>
</div>
<button title="Atualizar" *ngIf="hideRefreshBtn && TaskService.loadCount" class="btn-no-color btn-refresh" (click)="doRefresh($event)">
<button title="Atualizar" *ngIf="hideRefreshBtn && TaskService.loadCount" class="btn-no-color btn-refresh" (click)="doRefreshAside($event)">
<ion-icon class="title-icon font-awesome" name="reload-circle"></ion-icon>
</button>
<div *ngIf="!hideRefreshBtn" class="title-icons">
@@ -260,7 +260,7 @@
<!-- This is the box view -->
<div *ngSwitchCase="'boxview'" class="aside d-flex flex-wrap width-100 height-100">
<div *ngIf="TaskService.loadCount" class="center-box">
<!-- List -->
<div *ngIf="hideInMobile" (click)="openAllProcessesPage()" [class.active]="selectedElement == 'allProcessesTag'" class="box-hover exp-card d-flex flex-column" >
<div class="d-flex justify-center">
@@ -273,12 +273,11 @@
<span class="new-task-count" *ngIf="TaskService.new == 1">{{ TaskService.new }} correspondência novas</span>
</p>
<p class="text-center exp-card-content" > {{ AllProcess.length }}
<span class="title1" *ngIf="AllProcess.length == 0">Documento</span>
<span class="title1" *ngIf="AllProcess.length == 1">Documento</span>
<span class="title1" *ngIf="AllProcess.length > 1">Documentos</span>
<span class="title1" *ngIf="AllProcess.length == 0">correspondência</span>
<span class="title1" *ngIf="AllProcess.length == 1">correspondência</span>
<span class="title1" *ngIf="AllProcess.length > 1">correspondências</span>
</p>
</div>
<!-- List -->
<div *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks, p.permissionList.Gabinete.pr_tasks])" (click)="openDespachosPrPage(); selectedElement='showDespachosPr'" [class.active]="selectedElement == 'showDespachosPr'" class="box-hover exp-card-long width-100 d-flex flex-column justify-center">
<div class="center-div">
@@ -301,9 +300,9 @@
<span class="new-task-count" *ngIf="TaskService.despachoprstore.newList.length ==1">{{ TaskService.despachoprstore.newList.length}} correspondência nova </span>
</p>
<p class="text-center exp-card-content"> {{ TaskService.despachoprstore.count }}
<span class="title1" *ngIf="TaskService.despachoprstore.count == 0">Documento</span>
<span class="title1" *ngIf="TaskService.despachoprstore.count == 1">Documento</span>
<span class="title1" *ngIf="TaskService.despachoprstore.count > 1">Documentos</span>
<span class="title1" *ngIf="TaskService.despachoprstore.count == 0">correspondência</span>
<span class="title1" *ngIf="TaskService.despachoprstore.count == 1">correspondência</span>
<span class="title1" *ngIf="TaskService.despachoprstore.count > 1">correspondências</span>
</p>
</div>
</div>
@@ -326,9 +325,9 @@
<span class="new-task-count" *ngIf="TaskService.deplomasStore.diplomasAssinadoListNewCount.length ==1">{{ TaskService.deplomasStore.diplomasAssinadoListNewCount.length}} correspondência nova</span>
</p>
<p class="text-center exp-card-content"> {{ TaskService.deplomasStore.countDiplomasAssinadoListCount }}
<span class="title1" *ngIf="TaskService.deplomasStore.countDiplomasAssinadoListCount == 0">Documento</span>
<span class="title1" *ngIf="TaskService.deplomasStore.countDiplomasAssinadoListCount == 1">Documento</span>
<span class="title1" *ngIf="TaskService.deplomasStore.countDiplomasAssinadoListCount > 1">Documentos</span>
<span class="title1" *ngIf="TaskService.deplomasStore.countDiplomasAssinadoListCount == 0">correspondência</span>
<span class="title1" *ngIf="TaskService.deplomasStore.countDiplomasAssinadoListCount == 1">correspondência</span>
<span class="title1" *ngIf="TaskService.deplomasStore.countDiplomasAssinadoListCount > 1">correspondências</span>
</div>
@@ -348,9 +347,9 @@
</p>
<p class="text-center exp-card-content">
{{ TaskService.deplomasStore.diplomasParaAssinartCount }}
<span class="title1" *ngIf="TaskService.deplomasStore.diplomasParaAssinartCount == 0">Documento</span>
<span class="title1" *ngIf="TaskService.deplomasStore.diplomasParaAssinartCount == 1">Documento</span>
<span class="title1" *ngIf="TaskService.deplomasStore.diplomasParaAssinartCount > 1">Documentos</span>
<span class="title1" *ngIf="TaskService.deplomasStore.diplomasParaAssinartCount == 0">correspondência</span>
<span class="title1" *ngIf="TaskService.deplomasStore.diplomasParaAssinartCount == 1">correspondência</span>
<span class="title1" *ngIf="TaskService.deplomasStore.diplomasParaAssinartCount > 1">correspondências</span>
</p>
</div>
@@ -369,9 +368,9 @@
<!-- <p class="text-center exp-card-title " *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])">Diplomas por Assinar PR</p> -->
<p class="text-center exp-card-content">
{{ TaskService.deplomasStore.deplomasReviewCount }}
<span class="title1" *ngIf="TaskService.deplomasStore.deplomasReviewCount == 0">Documento</span>
<span class="title1" *ngIf="TaskService.deplomasStore.deplomasReviewCount == 1">Documento</span>
<span class="title1" *ngIf="TaskService.deplomasStore.deplomasReviewCount > 1">Documentos</span>
<span class="title1" *ngIf="TaskService.deplomasStore.deplomasReviewCount == 0">correspondência</span>
<span class="title1" *ngIf="TaskService.deplomasStore.deplomasReviewCount == 1">correspondência</span>
<span class="title1" *ngIf="TaskService.deplomasStore.deplomasReviewCount > 1">correspondências</span>
</p>
</div>
@@ -391,9 +390,9 @@
</p>
<p class="text-center exp-card-content">
{{ TaskService.deplomasStore.diplomasParaAssinartCount }}
<span class="title1" *ngIf="TaskService.deplomasStore.diplomasParaAssinartCount == 0">Documento</span>
<span class="title1" *ngIf="TaskService.deplomasStore.diplomasParaAssinartCount == 1">Documento</span>
<span class="title1" *ngIf="TaskService.deplomasStore.diplomasParaAssinartCount > 1">Documentos</span>
<span class="title1" *ngIf="TaskService.deplomasStore.diplomasParaAssinartCount == 0">correspondência</span>
<span class="title1" *ngIf="TaskService.deplomasStore.diplomasParaAssinartCount == 1">correspondência</span>
<span class="title1" *ngIf="TaskService.deplomasStore.diplomasParaAssinartCount > 1">correspondências</span>
</p>
</div>
@@ -415,9 +414,9 @@
</p>
<p class="text-center exp-card-content">
{{ TaskService.deplomasStore.DiplomaGerarList.length }}
<span class="title1" *ngIf="TaskService.deplomasStore.DiplomaGerarList.length == 0">Documento</span>
<span class="title1" *ngIf="TaskService.deplomasStore.DiplomaGerarList.length == 1">Documento</span>
<span class="title1" *ngIf="TaskService.deplomasStore.DiplomaGerarList.length > 1">Documentos</span>
<span class="title1" *ngIf="TaskService.deplomasStore.DiplomaGerarList.length == 0">correspondência</span>
<span class="title1" *ngIf="TaskService.deplomasStore.DiplomaGerarList.length == 1">correspondência</span>
<span class="title1" *ngIf="TaskService.deplomasStore.DiplomaGerarList.length > 1">correspondências</span>
</p>
</div>
@@ -433,14 +432,15 @@
</p>
<p class="text-center exp-card-content">
{{TaskService.eventoaprovacaostore.countAll}}
<span class="title1" *ngIf="TaskService.eventoaprovacaostore.countAll == 0">Documento</span>
<span class="title1" *ngIf="TaskService.eventoaprovacaostore.countAll == 1">Documento</span>
<span class="title1" *ngIf="TaskService.eventoaprovacaostore.countAll > 1">Documentos</span>
<span class="title1" *ngIf="TaskService.eventoaprovacaostore.countAll == 0">correspondência</span>
<span class="title1" *ngIf="TaskService.eventoaprovacaostore.countAll == 1">correspondência</span>
<span class="title1" *ngIf="TaskService.eventoaprovacaostore.countAll > 1">correspondências</span>
</p>
</div>
<!-- List -->
<div (click)="openExpedientListPage(); selectedElement='Correspondence'" [class.active]="selectedElement == 'Correspondence'" class="box-hover exp-card d-flex flex-column justify-center">
{{ selectedElement }}
<div (click)="openExpedientListPage(); selectedElement='Correspondence'" [class.active]="selectedElement == 'Correspondence' || selectedElement == 'Expediente Presidente'" class="box-hover exp-card d-flex flex-column justify-center">
<div class="d-flex justify-center">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-correspondencia.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement != 'Correspondence'" src="assets/images/theme/gov/icons-correspondencia.svg"></ion-icon>
@@ -456,9 +456,9 @@
<p class="text-center exp-card-content">
{{TaskService.expedientegbstore.count}}
<span class="title1" *ngIf="TaskService.expedientegbstore.count == 0">Documento</span>
<span class="title1" *ngIf="TaskService.expedientegbstore.count == 1">Documento</span>
<span class="title1" *ngIf="TaskService.expedientegbstore.count > 1">Documentos</span>
<span class="title1" *ngIf="TaskService.expedientegbstore.count == 0">correspondência</span>
<span class="title1" *ngIf="TaskService.expedientegbstore.count == 1">correspondência</span>
<span class="title1" *ngIf="TaskService.expedientegbstore.count > 1">correspondências</span>
</p>
</div>
@@ -478,9 +478,9 @@
</p>
<p class="text-center exp-card-content">
{{TaskService.despachoStore.count}}
<span class="title1" *ngIf="TaskService.despachoStore.count == 0">Documento</span>
<span class="title1" *ngIf="TaskService.despachoStore.count == 1">Documento</span>
<span class="title1" *ngIf="TaskService.despachoStore.count > 1">Documentos</span>
<span class="title1" *ngIf="TaskService.despachoStore.count == 0">correspondência</span>
<span class="title1" *ngIf="TaskService.despachoStore.count == 1">correspondência</span>
<span class="title1" *ngIf="TaskService.despachoStore.count > 1">correspondências</span>
</p>
</div>
@@ -508,9 +508,9 @@
</p>
<p class="text-center exp-card-content">
{{TaskService.pedidosstore.countparecer}}
<span class="title1" *ngIf="TaskService.pedidosstore.countparecer == 0">Documento</span>
<span class="title1" *ngIf="TaskService.pedidosstore.countparecer == 1">Documento</span>
<span class="title1" *ngIf="TaskService.pedidosstore.countparecer > 1">Documentos</span>
<span class="title1" *ngIf="TaskService.pedidosstore.countparecer == 0">correspondência</span>
<span class="title1" *ngIf="TaskService.pedidosstore.countparecer == 1">correspondência</span>
<span class="title1" *ngIf="TaskService.pedidosstore.countparecer > 1">correspondências</span>
</p>
</div>
@@ -531,9 +531,9 @@
</p>
<p class="text-center exp-card-content">
{{ TaskService.pedidosstore.countdeferimento}}
<span class="title1" *ngIf="TaskService.pedidosstore.countdeferimento == 0">Documento</span>
<span class="title1" *ngIf="TaskService.pedidosstore.countdeferimento == 1">Documento</span>
<span class="title1" *ngIf="TaskService.pedidosstore.countdeferimento > 1">Documentos</span>
<span class="title1" *ngIf="TaskService.pedidosstore.countdeferimento == 0">correspondência</span>
<span class="title1" *ngIf="TaskService.pedidosstore.countdeferimento == 1">correspondência</span>
<span class="title1" *ngIf="TaskService.pedidosstore.countdeferimento > 1">correspondências</span>
</p>
</div>
@@ -559,9 +559,9 @@
<p class="text-center exp-card-content">
<span class="number">{{TaskService.pendentesstore.count}} </span>
<span class="title1" *ngIf="TaskService.pendentesstore.count == 0">Documento</span>
<span class="title1" *ngIf="TaskService.pendentesstore.count == 1">Documento</span>
<span class="title1" *ngIf="TaskService.pendentesstore.count > 1">Documentos</span>
<span class="title1" *ngIf="TaskService.pendentesstore.count == 0">correspondência</span>
<span class="title1" *ngIf="TaskService.pendentesstore.count == 1">correspondência</span>
<span class="title1" *ngIf="TaskService.pendentesstore.count > 1">correspondências</span>
</div>
@@ -665,21 +665,21 @@
<!-- Aside right -->
<div class="aside-content d-none flex-column height-100">
<app-empty-container [texto]="emptyTextDescription" [style.display]="showEmptyContainer ? 'flex' : 'none'" class="height-100 flex-column"></app-empty-container>
<app-all-processes [profile]="profile" class=" height-100 flex-column" [style.display]="showAllProcesses ? 'flex' : 'none'" ></app-all-processes>
<app-events-to-approve [profile]="'MDGPR'" [style.display]="showEventsToApprove ? 'flex' : 'none'" class=" height-100 flex-column"></app-events-to-approve>
<app-empty-container [texto]="emptyTextDescription" *ngIf="showEmptyContainer" [style.display]="showEmptyContainer ? 'flex' : 'none'" class="height-100 flex-column"></app-empty-container>
<app-all-processes [profile]="profile" class=" height-100 flex-column" *ngIf="showAllProcesses" [style.display]="showAllProcesses ? 'flex' : 'none'" ></app-all-processes>
<app-events-to-approve [profile]="'MDGPR'" *ngIf="showEventsToApprove" [style.display]="showEventsToApprove ? 'flex' : 'none'" class=" height-100 flex-column"></app-events-to-approve>
<app-expedients [profile]="profile" class=" height-100 flex-column" [style.display]="showExpedients ? 'flex' : 'none'" ></app-expedients>
<app-pedidos [profile]="profile" [segment]="segment" [serialNumber]="serialNumber" class=" height-100 flex-column" [style.display]="showPedidos ? 'flex' : 'none'"></app-pedidos>
<app-despachos [profile]="profile" class="height-100 flex-column" [style.display]="showDespachos ? 'flex' : 'none'" ></app-despachos>
<app-despachos-pr [profile]="profile" class=" height-100 flex-column" [style.display]="showDespachosPr ? 'flex' : 'none'" ></app-despachos-pr>
<app-pendentes [profile]="profile" class=" height-100 flex-column" [style.display]="showPendentes ? 'flex' : 'none'" ></app-pendentes>
<app-diplomas (openExpedientDetail)="openExpedientesPrPage($event)" [profile]="profile" [segment]="segment" class=" height-100 flex-column" [style.display]="showDiplomas ? 'flex' : 'none'"></app-diplomas>
<app-diplomas-assinar class=" height-100 flex-column" [style.display]="showDiplomasAssinar ? 'flex' : 'none'"></app-diplomas-assinar>
<app-expedientes-pr [profile]="profile" class=" height-100 flex-column" [style.display]="showExpedientesPr ? 'flex' : 'none'" ></app-expedientes-pr>
<app-signed-diploma [profile]="profile" class=" height-100 flex-column" [style.display]="showSignedDiploma ? 'flex' : 'none'" ></app-signed-diploma>
<app-expedients [profile]="profile" class=" height-100 flex-column" *ngIf="showExpedients" [style.display]="showExpedients ? 'flex' : 'none'" ></app-expedients>
<app-pedidos [profile]="profile" [segment]="segment" [serialNumber]="serialNumber" class=" height-100 flex-column" *ngIf="showPedidos" [style.display]="showPedidos ? 'flex' : 'none'"></app-pedidos>
<app-despachos [profile]="profile" class="height-100 flex-column" *ngIf="showDespachos" [style.display]="showDespachos ? 'flex' : 'none'" ></app-despachos>
<app-despachos-pr [profile]="profile" class=" height-100 flex-column" *ngIf="showDespachosPr" [style.display]="showDespachosPr ? 'flex' : 'none'" ></app-despachos-pr>
<app-pendentes [profile]="profile" class=" height-100 flex-column" *ngIf="showPendentes" [style.display]="showPendentes ? 'flex' : 'none'" ></app-pendentes>
<app-diplomas (openExpedientDetail)="openExpedientesPrPage($event)" [profile]="profile" [segment]="segment" class=" height-100 flex-column" *ngIf="showDiplomas" [style.display]="showDiplomas ? 'flex' : 'none'"></app-diplomas>
<app-diplomas-assinar class=" height-100 flex-column" *ngIf="showDiplomasAssinar" [style.display]="showDiplomasAssinar ? 'flex' : 'none'"></app-diplomas-assinar>
<app-expedientes-pr [profile]="profile" class=" height-100 flex-column" *ngIf="showExpedientesPr" [style.display]="showExpedientesPr ? 'flex' : 'none'" ></app-expedientes-pr>
<app-signed-diploma [profile]="profile" class=" height-100 flex-column" *ngIf="showSignedDiploma" [style.display]="showSignedDiploma ? 'flex' : 'none'" ></app-signed-diploma>
<app-diplomas-gerars [profile]="profile" class="height-100 flex-column" [style.display]="showDiplomasGerar ? 'flex' : 'none'"></app-diplomas-gerars>
<app-diplomas-gerars [profile]="profile" class="height-100 flex-column" *ngIf="showDiplomasGerar" [style.display]="showDiplomasGerar ? 'flex' : 'none'"></app-diplomas-gerars>
</div>
</div>
</ion-content>
@@ -111,49 +111,21 @@ export class GabineteDigitalPage implements OnInit {
) {
window.onresize = (event) => {
// if not mobile remove all component
if (window.innerWidth < 701) {
this.modalController.dismiss();
this.hideRefreshBtn = false;
this.hideInMobile = false;
this.segmentVista = "listview";
}
else {
this.hideRefreshBtn = true;
this.hideInMobile = true;
this.segmentVista = "boxview";
}
}
this.checkRoutes();
// fix with many timeout
setTimeout(() => {
this.dynamicSearch()
}, 2000)
// setTimeout(() => {
// this.dynamicSearch()
// }, 4000)
setTimeout(() => {
this.dynamicSearch()
}, 6000)
setTimeout(() => {
this.dynamicSearch()
}, 10000)
setTimeout(() => {
this.dynamicSearch()
}, 14000)
setTimeout(() => {
this.dynamicSearch()
}, 18000)
setTimeout(() => {
this.dynamicSearch()
this.TaskService.registerCallback({
id: import.meta.url,
funx:() => {
this.dynamicSearch()
}
})
}, 20000)
}
@@ -223,9 +195,34 @@ export class GabineteDigitalPage implements OnInit {
this.segmentVista = "boxview"
}
this.LoadCounts();
this.checkFilter();
this.hideRefreshButton();
}
ngAfterViewInit(): void {
// We can access the TestComponent now that this portion of the view tree has been initiated.
const element = this.scroll.nativeElement
this.scroll.nativeElement.addEventListener("scroll", (e)=> {
this.changeTab()
});
(async () => {
await this.loadAllProcesses()
this.TaskService.registerCallback({
id: import.meta.url,
funx:() => {
this.dynamicSearch()
}
})
})();
this.checkFilter();
this.checkRoutes();
this.dynamicSearch()
const pathname = '/home/gabinete-digital'
this.router.events.forEach((event) => {
if (event instanceof NavigationEnd && event.url.includes(pathname) && !event.url.includes('/home/gabinete-digital/')) {
@@ -241,22 +238,14 @@ export class GabineteDigitalPage implements OnInit {
// this.LoadCounts();
this.checkFilter()
}
this.mobile()
}
})
}
});
this.checkRoutes()
this.hideRefreshButton();
}
ngAfterViewInit(): void {
// We can access the TestComponent now that this portion of the view tree has been initiated.
const element = this.scroll.nativeElement
this.scroll.nativeElement.addEventListener("scroll", (e)=> {
this.changeTab()
});
}
functionTimer1 = null;
@@ -292,9 +281,6 @@ export class GabineteDigitalPage implements OnInit {
}
async loadAllProcesses() {
this.LoadCounts();
}
goto(url) {
@@ -353,18 +339,7 @@ export class GabineteDigitalPage implements OnInit {
}
hideRefreshButton() {
window.onresize = (event) => {
if (window.innerWidth < 701) {
this.hideRefreshBtn = false;
this.hideInMobile = false;
this.segmentVista = "listview";
}
else {
this.hideRefreshBtn = true;
this.hideInMobile = true;
this.segmentVista = "boxview";
}
}
console.log(this.router.url)
if (window.innerWidth < 701) {
this.hideRefreshBtn = false;
this.hideInMobile = false;
@@ -377,6 +352,15 @@ export class GabineteDigitalPage implements OnInit {
}
}
mobile() {
console.log(this.router.url)
if (window.innerWidth < 701 && this.router.url.includes('filter=')) {
this.hideRefreshBtn = false;
this.hideInMobile = false;
this.segmentVista = "listview";
}
}
checkRoutes() {
this.closeAllDesktopComponents();
@@ -417,11 +401,13 @@ export class GabineteDigitalPage implements OnInit {
}
else if (this.router.url == '/home/gabinete-digital?despachospr=true') {
this.openDespachosPrPage('');
this.selectedElement = 'DispatchesPr'
this.selectedElement = 'showDespachosPr'
}
else if (this.router.url == '/home/gabinete-digital?diplomas=true') {
else if (this.router.url == '/home/gabinete-digital?diplomas=assinados') {
this.openDiplomasPage('assinados');
}
else if (this.router.url == '/home/gabinete-digital?diplomas=validar') {
this.openDiplomasPage('validar');
this.selectedElement = 'DiplomasPorValidar';
}
else if (this.router.url == '/home/gabinete-digital?diplomasassinar=true') {
this.openDiplomasAssinarPage();
@@ -464,17 +450,26 @@ export class GabineteDigitalPage implements OnInit {
return Object.keys(this.loadProcess)
}
async LoadCounts() {
async loadAllProcesses() {
// this.skeletonLoader = true
await this.TaskService.LoadTask()
this.dynamicSearch()
// this.skeletonLoader = false
}
doRefreshAside() {
window['gabinete-aside-refresh']()
setTimeout(() => {
this.loadAllProcesses();
}, 1000)
}
doRefresh(event) {
this.LoadCounts();
this.loadAllProcesses();
if (event) {
setTimeout(() => {
@@ -634,9 +629,11 @@ export class GabineteDigitalPage implements OnInit {
let navigationExtras: NavigationExtras;
if (segment == 'validar') {
navigationExtras = { queryParams: { "validar": true, } };
navigationExtras = { queryParams: { "diplomas": 'validar', } };
this.selectedElement = 'DiplomasPorValidar';
} else if (segment == 'assinados') {
navigationExtras = { queryParams: { "assinados": true, } };
this.selectedElement = 'DiplomasAssinados';
navigationExtras = { queryParams: { "diplomas": 'assinados', } };
}
this.segment = segment;
@@ -646,10 +643,10 @@ export class GabineteDigitalPage implements OnInit {
}
else {
this.closeAllDesktopComponents();
this.segment = segment;
let navigationExtras: NavigationExtras = { queryParams: { "diplomas": true, } };
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
this.showDiplomas = true;
setTimeout(() => {
this.showDiplomas = true;
}, 10)
}
}
@@ -267,6 +267,7 @@ export class PedidoPage implements OnInit {
if (res['data'] == 'close') {
this.goBack()
}
this.TaskService.loadPedidos();
}))
+13 -1
View File
@@ -17,6 +17,7 @@ import { EventsService } from './events.service';
import { SortService } from './functions/sort.service';
import { customTask } from '../models/dailyworktask.model';
import { Router } from '@angular/router';
import { v4 as uuidv4 } from 'uuid'
@Injectable({
providedIn: 'root'
@@ -75,10 +76,21 @@ export class TaskService {
this.updateAllProcess();
this.updateCount()
this.runCallback();
document.addEventListener('resume', function () {
this.loadAllTask();
});
}
registerCallback({funx, id}) {
registerCallback({funx, id = uuidv4()}) {
this.callbacks[id] = { funx, id}
return {
delete: ()=> {
delete this.callbacks[id]
}
}
}
runCallback() {
@@ -29,47 +29,42 @@ export class AllProcessesPage implements OnInit {
AllProcess = []
ordinance: string = 'old'
listSubscription : {
delete(): void;
}
constructor(
private router: Router,
public ThemeService: ThemeService,
public TaskService: TaskService,
private route: ActivatedRoute
) {}
ngOnInit() {
// this.updateAllProcess()
this.checkFilter();
}
this.router.events.forEach((event) => {
if (event instanceof NavigationEnd && event.url.includes('/home/gabinete-digital')) {
// this.refreshing();
this.checkFilter();
}
});
ngAfterViewInit(): void {
setTimeout(() => {
// this.miniSearch.addAll(this.TaskService.AllProcess)
// window['miniSearch'] = this.miniSearch
this.TaskService.registerCallback({
id: import.meta.url,
funx:() => {
this.dynamicSearch()
}
})
}, 10)
this.TaskService.registerCallback({
this.listSubscription = this.TaskService.registerCallback({
id: import.meta.url,
funx:() => {
this.dynamicSearch()
}
})
this.dynamicSearch();
}
ngOnDestroy() {
this.listSubscription.delete()
}
openSearch() {
// this.dynamicSearch()
}
@@ -33,7 +33,7 @@ export class DespachosPrPage implements OnInit {
listSubscription : {
delete(): void;
}
routerSubscription;
constructor (
private router: Router,
@@ -54,15 +54,29 @@ constructor (
funx:() => {
this.dynamicSearch()
this.LoadList()
}
})
this.routerSubscription = this.router.events.subscribe((event) => {
if (event instanceof NavigationStart &&
event.url.startsWith('/home/gabinete-digital?despachospr=true')) {
if(window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {
this.refreshing()
} else {
this.LoadList()
}
}
});
window['gabinete-aside-refresh'] = () => {
this.LoadList()
}
}
ngOnDestroy() {
this.listSubscription.delete()
this.routerSubscription?.unsubscribe();
}
changeFilterName(filterName) {
@@ -1,6 +1,6 @@
import { Component, OnInit } from '@angular/core';
import { customTask } from '../../../models/dailyworktask.model';
import { NavigationStart, Router } from '@angular/router';
import { NavigationEnd, NavigationStart, Router, } from '@angular/router';
import { DespachoService } from 'src/app/Rules/despacho.service';
import { TaskService } from 'src/app/services/task.service';
import { ThemeService } from 'src/app/services/theme.service'
@@ -20,6 +20,12 @@ export class DespachosPage implements OnInit {
hideSearchBtn: boolean = false;
ordinance: string = 'old'
listSubscription : {
delete(): void;
}
routerSubscription;
constructor (
private router: Router,
private despachoRule: DespachoService,
@@ -29,26 +35,34 @@ export class DespachosPage implements OnInit {
ngOnInit() {
// this.LoadList();
this.LoadList()
this.router.events.forEach((event) => {
this.listSubscription = this.TaskService.despachoStore.registerCallback({
id: import.meta.url,
funx:() => {
this.dynamicSearch()
}
})
this.dynamicSearch();
this.routerSubscription = this.router.events.subscribe((event) => {
if (event instanceof NavigationStart && event.url.startsWith('/home/gabinete-digital?despachos=true')) {
this.LoadList()
}
});
this.TaskService.despachoStore.registerCallback({
id: import.meta.url,
funx:() => {
window['gabinete-aside-refresh'] = () => {
this.LoadList()
}
this.list = this.TaskService.despachoStore.list.filter(task => this.TaskService.filter(task, this.filterName))
}
})
this.dynamicSearch();
}
ngOnDestroy() {
console.log('destroy')
this.listSubscription.delete()
this.routerSubscription?.unsubscribe();
}
reorderList(orderBy: string) {
@@ -28,28 +28,51 @@ export class DiplomasAssinarPage implements OnInit {
hideSearchBtn: boolean = false;
ordinance: string = 'old'
listSubscription : {
delete(): void;
}
routerSubscription;
constructor(
private processes:ProcessesService,
private router: Router,
private sortService: SortService,
public ThemeService: ThemeService,
public TaskService: TaskService
) {}
ngOnInit() {
// this.LoadList()
this.dynamicSearch()
this.LoadList()
this.router.events.forEach((event) => {
this.listSubscription = this.deplomasStore.registerCallback({
id: import.meta.url,
funx:() => {
this.dynamicSearch()
}
})
this.routerSubscription = this.router.events.subscribe((event) => {
if (event instanceof NavigationStart && '/home/gabinete-digital?diplomasassinar=true'.startsWith(event.url)) {
this.LoadList()
}
});
window['gabinete-aside-refresh'] = () => {
this.LoadList()
}
this.dynamicSearch()
}
ngOnDestroy() {
this.listSubscription.delete()
this.routerSubscription?.unsubscribe();
}
reorderList(orderBy: string) {
@@ -1,10 +1,8 @@
import { Component, OnInit } from '@angular/core';
import { NavigationStart, Router } from '@angular/router';
import { customTask, DailyWorkTask } from '../../../models/dailyworktask.model';
import { ProcessesService } from 'src/app/services/processes.service';
import { DailyWorkTask } from '../../../models/dailyworktask.model';
import { DeplomasStore } from 'src/app/store/deplomas.service';
import { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe';
import { SortService } from 'src/app/services/functions/sort.service';
import { ThemeService } from 'src/app/services/theme.service'
import { TaskService } from 'src/app/services/task.service'
@@ -29,17 +27,35 @@ export class DiplomasGerarPage implements OnInit {
hideSearchBtn: boolean = false;
ordinance: string = 'old'
listSubscription : {
delete(): void;
}
routerSubscription;
constructor(
private processes:ProcessesService,
private router: Router,
private sortService: SortService,
public ThemeService: ThemeService,
public TaskService: TaskService
) {}
ngOnInit() {
this.router.events.forEach((event) => {
this.LoadList()
this.dynamicSearch()
this.listSubscription = this.deplomasStore.registerCallback({
id: import.meta.url,
funx:() => {
this.dynamicSearch()
}
})
this.routerSubscription = this.router.events.subscribe((event) => {
if (event instanceof NavigationStart && '/home/gabinete-digital/?gerarDiplomas=true'.startsWith(event.url)) {
if(window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {
this.LoadList()
@@ -51,8 +67,16 @@ export class DiplomasGerarPage implements OnInit {
}
});
window['gabinete-aside-refresh'] = () => {
this.LoadList()
}
}
ngOnDestroy() {
this.listSubscription.delete()
this.routerSubscription?.unsubscribe();
}
goToDiploma(serialNumber:any){
@@ -1,11 +1,9 @@
import { Component, Input, OnInit } from '@angular/core';
import { NavigationStart, Router } from '@angular/router';
import { DailyWorkTask } from '../../../models/dailyworktask.model';
import { ProcessesService } from 'src/app/services/processes.service';
import { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe';
import { DeplomasStore } from 'src/app/store/deplomas.service';
import { ThemeService } from 'src/app/services/theme.service'
import { SortService } from 'src/app/services/functions/sort.service';
import { PermissionService } from 'src/app/services/permission.service';
import { TaskService } from 'src/app/services/task.service'
@@ -36,22 +34,33 @@ export class DiplomasPage implements OnInit {
listDiplomasAssinadosPR = []
hideSearchBtn: boolean = false;
ordinance: string = 'old'
listSubscription : {
delete(): void;
}
routerSubscription;
constructor(
private processes:ProcessesService,
private router: Router,
public ThemeService: ThemeService,
private sortService: SortService,
public p: PermissionService,
public TaskService: TaskService
) {}
ngOnInit() {
// update list
// this.LoadList()
this.router.events.forEach((event) => {
if (event instanceof NavigationStart && '/home/gabinete-digital?diplomas=true'.startsWith(event.url)) {
this.LoadList()
this.listSubscription = this.deplomasStore.registerCallback({
id: import.meta.url,
funx:() => {
this.dynamicSearch()
}
})
this.routerSubscription = this.router.events.subscribe((event) => {
if (event instanceof NavigationStart && ( '/home/gabinete-digital?diplomas=validar'.startsWith(event.url) || '/home/gabinete-digital?diplomas=validar'.startsWith(event.url)) ) {
if(window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {
this.LoadList()
} else {
@@ -59,11 +68,19 @@ export class DiplomasPage implements OnInit {
}
}
});
window['gabinete-aside-refresh'] = () => {
this.LoadList()
}
this.dynamicSearch();
}
ngOnDestroy() {
this.listSubscription.delete()
this.routerSubscription?.unsubscribe();
}
reorderList(orderBy: string) {
@@ -4,7 +4,6 @@ import { EventPerson } from 'src/app/models/eventperson.model';
import { ProcessesService } from 'src/app/services/processes.service';
import { ModalController } from '@ionic/angular';
import { NavigationStart, Router } from '@angular/router';
import { AuthService } from 'src/app/services/auth.service';
import { EventoAprovacaoStore } from 'src/app/store/eventoaprovacao-store.service';
import { SortService } from 'src/app/services/functions/sort.service';
import { Storage } from '@ionic/storage';
@@ -44,12 +43,16 @@ export class EventsToApprovePage implements OnInit {
list = []
hideSearchBtn: boolean = false;
ordinance: string = 'old'
listSubscription : {
delete(): void;
}
routerSubscription;
constructor(
private processes:ProcessesService,
private modalController: ModalController,
private router: Router,
private userAuth: AuthService,
private sortService: SortService,
private storage: Storage,
public eventService: EventsService,
@@ -66,10 +69,18 @@ export class EventsToApprovePage implements OnInit {
this.segment = this.eventService.calendarNamesAry[0].OwnerUserId
}
}
this.LoadToApproveEvents()
// this.LoadToApproveEvents();
this.listSubscription = this.eventoaprovacaostore.registerCallback({
id: import.meta.url,
funx:() => {
this.router.events.forEach((event) => {
this.dynamicSearch()
}
})
this.routerSubscription = this.router.events.subscribe((event) => {
if (event instanceof NavigationStart &&
'/home/gabinete-digital?eventos=true'.startsWith(event.url)) {
@@ -80,10 +91,20 @@ export class EventsToApprovePage implements OnInit {
}
}
});
window['gabinete-aside-refresh'] = () => {
this.LoadToApproveEvents()
}
this.dynamicSearch()
this.dynamicSearch();
}
ngOnDestroy() {
this.listSubscription.delete()
this.routerSubscription?.unsubscribe();
}
reorderList(orderBy: string) {
@@ -36,6 +36,13 @@ export class ExpedientesPrPage implements OnInit {
@Output() openExpedientDetail:EventEmitter<any> = new EventEmitter<any>();
listSubscription : {
delete(): void;
}
routerSubscription;
constructor(
private processes:ProcessesService,
private router: Router,
@@ -48,9 +55,19 @@ export class ExpedientesPrPage implements OnInit {
ngOnInit() {
// this.LoadList()
this.LoadList()
this.router.events.forEach((event) => {
this.listSubscription = this.expedienteGdStore.registerCallback({
id: import.meta.url,
funx:() => {
this.dynamicSearch()
}
})
this.routerSubscription = this.router.events.subscribe((event) => {
if (event instanceof NavigationStart &&
event.url.startsWith('/home/gabinete-digital?expedientespr=true') ||
event instanceof NavigationStart &&
@@ -59,17 +76,21 @@ export class ExpedientesPrPage implements OnInit {
event.url.startsWith('/home/gabinete-digital?expedientes=true' )) {
if(window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {
this.refreshing()
this.LoadList()
} else {
this.LoadList()
}
}
});
this.dynamicSearch()
this.dynamicSearch();
}
ngOnDestroy() {
this.listSubscription.delete()
this.routerSubscription?.unsubscribe();
}
reorderList(orderBy: string) {
@@ -30,13 +30,18 @@ export class ExpedientsPage implements OnInit {
list = []
hideSearchBtn: boolean = false;
ordinance: string = 'old'
listSubscription : {
delete(): void;
}
routerSubscription;
constructor(
private processes: ProcessesService,
private router: Router,
public ThemeService: ThemeService,
private sortService: SortService,
private storage: Storage,
private eventTriger: EventTrigger,
public TaskService: TaskService
) {
@@ -53,20 +58,39 @@ export class ExpedientsPage implements OnInit {
ngOnInit() {
//Inicializar segment
this.segment = "expedientes";
// this.LoadList()
this.LoadList()
this.router.events.forEach((event) => {
this.listSubscription = this.expedientegbstore.registerCallback({
id: import.meta.url,
funx:() => {
this.dynamicSearch()
}
})
this.routerSubscription = this.router.events.subscribe((event) => {
if (event instanceof NavigationStart &&
event.url.startsWith('/home/gabinete-digital?expedientes=true')) {
this.LoadList()
}
});
this.dynamicSearch()
window['gabinete-aside-refresh'] = () => {
this.LoadList()
}
this.dynamicSearch();
}
ngOnDestroy() {
this.listSubscription.delete()
this.routerSubscription?.unsubscribe();
}
reorderList(orderBy: string) {
@@ -48,6 +48,13 @@ export class PedidosPage implements OnInit {
hideSearchBtn: boolean = false;
ordinance: string = 'old'
listSubscription : {
delete(): void;
}
routerSubscription;
constructor(
private router: Router,
private processes:ProcessesService,
@@ -61,7 +68,18 @@ export class PedidosPage implements OnInit {
ngOnInit() {
this.router.events.forEach((event) => {
this.LoadList()
this.listSubscription = this.pedidosstore.registerCallback({
id: import.meta.url,
funx:() => {
this.dynamicSearch()
}
})
this.dynamicSearch();
this.routerSubscription = this.router.events.subscribe((event) => {
if(event instanceof NavigationStart && '/home/gabinete-digital?parecer=true'.startsWith(event.url) ||
event instanceof NavigationStart && '/home/gabinete-digital?deferimento=true'.startsWith(event.url) ||
event instanceof NavigationStart && '/home/gabinete-digital?pedidos=true'.startsWith(event.url)
@@ -76,11 +94,16 @@ export class PedidosPage implements OnInit {
}
});
this.dynamicSearch()
window['gabinete-aside-refresh'] = () => {
this.LoadList()
}
}
ngOnDestroy() {
this.listSubscription.delete()
this.routerSubscription?.unsubscribe();
}
reorderList(orderBy: string) {
@@ -35,20 +35,36 @@ export class PendentesPage implements OnInit {
hideSearchBtn: boolean = false;
ordinance: string = 'old'
listSubscription : {
delete(): void;
}
routerSubscription;
constructor(
private processes:ProcessesService,
private router: Router,
private sortService: SortService,
private storage: Storage,
public TaskService: TaskService,
public ThemeService: ThemeService
) {
public ThemeService: ThemeService) {
this.loggeduser = SessionStore.user;
}
ngOnInit() {
this.router.events.forEach((event) => {
this.LoadList()
this.listSubscription = this.pendentesstore.registerCallback({
id: import.meta.url,
funx:() => {
this.dynamicSearch()
}
})
this.dynamicSearch();
this.routerSubscription = this.router.events.subscribe((event) => {
if (event instanceof NavigationStart &&
event.url.startsWith('/home/gabinete-digital?pendentes=true')) {
if(window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {
@@ -60,7 +76,16 @@ export class PendentesPage implements OnInit {
});
this.dynamicSearch()
window['gabinete-aside-refresh'] = () => {
this.LoadList()
}
}
ngOnDestroy() {
this.listSubscription.delete()
this.routerSubscription?.unsubscribe();
}
reorderList(orderBy: string) {
@@ -11,6 +11,7 @@ import { CreateProcessPage } from 'src/app/modals/create-process/create-process.
import { AttachmentList } from 'src/app/models/Excludetask';
import { DespachoService } from 'src/app/Rules/despacho.service';
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
import { TaskService } from 'src/app/services/task.service'
@Component({
selector: 'app-deploma-options',
@@ -35,7 +36,8 @@ export class DeplomaOptionsPage implements OnInit {
private RouteService: RouteService,
public p: PermissionService,
private despachoService: DespachoService,
private httpErroHandle: HttpErrorHandle) {
private httpErroHandle: HttpErrorHandle,
public TaskService: TaskService) {
this.serialNumber = this.navParams.get('serialNumber');
this.task = this.navParams.get('task');
this.fulltask = this.navParams.get('fulltask');
@@ -319,6 +321,7 @@ export class DeplomaOptionsPage implements OnInit {
goBack() {
this.RouteService.goBack()
this.TaskService.loadDiplomas()
}
@@ -399,6 +399,7 @@ export class DespachosPrOptionsPage implements OnInit {
goBack() {
this.RouteService.goBack();
this.TaskService.loadDiplomas()
}
cancle() {
@@ -9,6 +9,8 @@ import { DelegarPage } from 'src/app/modals/delegar/delegar.page';
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
import { BookMeetingModalPage } from 'src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page';
import { customTask, fullTask } from 'src/app/models/dailyworktask.model';
import { RouteService } from 'src/app/services/route.service';
import { TaskService } from 'src/app/services/task.service'
@Component({
selector: 'app-diplomas-gerar-options',
@@ -30,6 +32,8 @@ export class DiplomasGerarOptionsPage implements OnInit {
private despachoService: DespachoService,
private navParams: NavParams,
private router: Router,
private RouteService: RouteService,
public TaskService: TaskService
) { }
ngOnInit() {
@@ -178,7 +182,8 @@ export class DiplomasGerarOptionsPage implements OnInit {
goBack() {
this.popoverController.dismiss();
this.router.navigate(['/home/gabinete-digital/diplomas-gerar']);
this.RouteService.goBack();
this.TaskService.loadDespachos();
}
}
@@ -15,6 +15,7 @@ import { RouteService } from 'src/app/services/route.service';
import { PermissionService } from 'src/app/services/permission.service';
import { SessionStore } from 'src/app/store/session.service';
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
import { TaskService } from 'src/app/services/task.service'
@Component({
selector: 'app-opts-expediente-pr',
@@ -51,7 +52,8 @@ export class OptsExpedientePrPage implements OnInit {
private RouteService: RouteService,
public ThemeService: ThemeService,
public p: PermissionService,
private httpErrorHandle: HttpErrorHandle
private httpErrorHandle: HttpErrorHandle,
public TaskService: TaskService
) {
@@ -333,6 +335,7 @@ export class OptsExpedientePrPage implements OnInit {
goBack() {
this.RouteService.goBack()
this.TaskService.loadExpedientes()
}
getAttachments(serialNumber){
@@ -89,6 +89,7 @@ export class OptsExpedientePage implements OnInit {
}
goBack() {
this.TaskService.loadExpedientes()
this.RouteService.goBack()
}
+9 -1
View File
@@ -2,6 +2,7 @@ import { Injectable } from '@angular/core';
import { localstoreService } from './localstore.service'
import { AES, enc, SHA1 } from 'crypto-js'
import { momentG } from 'src/plugin/momentG';
import { v4 as uuidv4 } from 'uuid'
@Injectable({
providedIn: 'root'
})
@@ -66,8 +67,15 @@ export class DeplomasService {
}
registerCallback({funx, id}) {
registerCallback({funx, id = uuidv4()}) {
this.callbacks[id] = { funx, id}
return {
delete: ()=> {
delete this.callbacks[id]
}
}
}
runCallback() {
+10 -1
View File
@@ -4,6 +4,8 @@ import { SHA1 } from 'crypto-js'
import { customTask } from '../models/dailyworktask.model';
import { ObjectQueryService } from '../services/object-query.service';
import { momentG } from 'src/plugin/momentG';
import { v4 as uuidv4 } from 'uuid'
@Injectable({
providedIn: 'root'
})
@@ -41,8 +43,15 @@ export class DespachoStoreService {
}
registerCallback({funx, id}) {
registerCallback({funx, id = uuidv4()}) {
this.callbacks[id] = { funx, id}
return {
delete: ()=> {
delete this.callbacks[id]
}
}
}
+9 -1
View File
@@ -2,6 +2,7 @@ import { Injectable } from '@angular/core';
import { localstoreService } from './localstore.service'
import { AES, enc, SHA1 } from 'crypto-js'
import { momentG } from 'src/plugin/momentG';
import { v4 as uuidv4 } from 'uuid'
@Injectable({
providedIn: 'root'
@@ -34,8 +35,15 @@ constructor() {
}
registerCallback({funx, id}) {
registerCallback({funx, id = uuidv4()}) {
this.callbacks[id] = { funx, id}
return {
delete: ()=> {
delete this.callbacks[id]
}
}
}
runCallback() {
@@ -4,6 +4,7 @@ import { AES, enc, SHA1 } from 'crypto-js'
import { isArray } from 'ionic-angular/umd/util/util';
import { EventoApprovePipe } from 'src/app/pipes/evento-approve.pipe'
import { momentG } from 'src/plugin/momentG';
import { v4 as uuidv4 } from 'uuid'
@Injectable({
providedIn: 'root'
@@ -49,8 +50,15 @@ export class EventoaprovacaoStoreService {
}
registerCallback({funx, id}) {
registerCallback({funx, id = uuidv4()}) {
this.callbacks[id] = { funx, id}
return {
delete: ()=> {
delete this.callbacks[id]
}
}
}
runCallback() {
+9 -1
View File
@@ -3,6 +3,7 @@ import { localstoreService } from './localstore.service'
import { SHA1 } from 'crypto-js'
import { ExpedienteTask } from '../models/dailyworktask.model';
import { momentG } from 'src/plugin/momentG';
import { v4 as uuidv4 } from 'uuid'
@Injectable({
providedIn: 'root'
@@ -38,8 +39,15 @@ export class ExpedientegdStoreService {
}
registerCallback({funx, id}) {
registerCallback({funx, id = uuidv4()}) {
this.callbacks[id] = { funx, id}
return {
delete: ()=> {
delete this.callbacks[id]
}
}
}
runCallback() {
+10 -1
View File
@@ -2,6 +2,7 @@ import { Injectable } from '@angular/core';
import { localstoreService } from './localstore.service'
import { AES, enc, SHA1 } from 'crypto-js'
import { momentG } from 'src/plugin/momentG';
import { v4 as uuidv4 } from 'uuid'
@Injectable({
providedIn: 'root'
@@ -47,10 +48,18 @@ export class PedidosStoreService {
}
registerCallback({funx, id}) {
registerCallback({funx, id = uuidv4()}) {
this.callbacks[id] = { funx, id}
return {
delete: ()=> {
delete this.callbacks[id]
}
}
}
runCallback() {
for (const [key, value] of Object.entries(this.callbacks)) {
value.funx()
+9 -2
View File
@@ -2,7 +2,7 @@ import { Injectable } from '@angular/core';
import { localstoreService } from './localstore.service'
import { AES, enc, SHA1 } from 'crypto-js'
import { momentG } from 'src/plugin/momentG';
import { v4 as uuidv4 } from 'uuid'
@Injectable({
providedIn: 'root'
})
@@ -38,8 +38,15 @@ export class PendestesStoreService {
}
registerCallback({funx, id}) {
registerCallback({funx, id = uuidv4()}) {
this.callbacks[id] = { funx, id}
return {
delete: ()=> {
delete this.callbacks[id]
}
}
}
runCallback() {
+2 -2
View File
@@ -1,6 +1,6 @@
import { Environment } from './../app/models/envarioment'
import { oaprProd } from './suport/oapr'
import { doneITProd } from './suport/doneIt'
import { DevDev } from './suport/dev'
export const environment: Environment = doneITProd;
export const environment: Environment = DevDev;
+2 -2
View File
@@ -9,7 +9,7 @@ export const oaprProd: Environment = {
apiWsChatUrl: 'wss://gd-chat.oapr.gov.ao/websocket',
logoLabel: 'Presidente da República',
despachoLabel: 'Presidencial',
despachoLabel2: 'Despachos Presidenciais',
despachoLabel2: 'Despachos Presidênciais',
production: false,
domain: 'oapr.gov.ao',
defaultuser: '',
@@ -21,7 +21,7 @@ export const oaprProd: Environment = {
agendaVP: 'Agenda do MD',
PR: 'PR',
VP: '',
dispatchPR: 'Despachos Presidenciais',
dispatchPR: 'Despachos Presidênciais',
sentryUrl: 'https://9920cc36f1d740b987426ee8d80cf588@o4504340905525248.ingest.sentry.io/4504340946419712'
};
File diff suppressed because one or more lines are too long