Pull made

This commit is contained in:
Eudes Inácio
2023-06-10 17:06:45 +01:00
52 changed files with 344 additions and 330 deletions
+3
View File
@@ -83,3 +83,6 @@ migrat/
cypress/videos cypress/videos
*.rar *.rar
src/app/domain
src/app/controller
-3
View File
@@ -122,10 +122,8 @@ export class HomePage implements OnInit {
SessionStore.setUrlBeforeInactivity(pathname) SessionStore.setUrlBeforeInactivity(pathname)
if (this.platform.is('mobileweb')) { if (this.platform.is('mobileweb')) {
// this.router.navigate(['/inactivity']);
window.location.pathname = '/inactivity' window.location.pathname = '/inactivity'
} else { } else {
// this.router.navigate(['/']);
window.location.pathname = '/' window.location.pathname = '/'
} }
} }
@@ -135,7 +133,6 @@ export class HomePage implements OnInit {
} }
goto(url) { goto(url) {
// this.router.navigateByUrl('/home/events', { replaceUrl: true });
this.router.navigate([url], { replaceUrl: true }) this.router.navigate([url], { replaceUrl: true })
} }
@@ -186,7 +186,6 @@ export class CreateProcessPage implements OnInit {
} }
close() { close() {
//this.router.navigate(['/home/gabinete-digital/expediente']);
this.modalController.dismiss(null); this.modalController.dismiss(null);
} }
+23 -1
View File
@@ -47,7 +47,7 @@ models.register({
models: [MessageModel, DeleteMessageModel, attachments] models: [MessageModel, DeleteMessageModel, attachments]
}) })
// acçoes
export class ActionModel extends models.Model{ export class ActionModel extends models.Model{
ProcessId = models.IntegerField({unique: true}) ProcessId = models.IntegerField({unique: true})
Description = models.CharField() Description = models.CharField()
@@ -76,3 +76,25 @@ models.register({
version: 14, version: 14,
models: [PublicationModel, ActionModel] models: [PublicationModel, ActionModel]
}) })
// gabinete
export class DispatchModal extends models.Model{
DateIndex = models.CharField()
DocumentId = models.IntegerField({unique: true})
ProcessId = models.CharField()
Title = models.CharField()
Message = models.CharField()
DatePublication = models.CharField()
OriginalFileName = models.CharField()
FileBase64 = models.CharField()
FileExtension = models.CharField()
OrganicEntityId = models.IntegerField()
}
models.register({
databaseName: 'cabinet'+environment.version.lastCommitNumber + environment.id,
type: 'indexedDB',
version: 14,
models: [DispatchModal]
})
+1 -1
View File
@@ -270,7 +270,7 @@
</ion-row> </ion-row>
<div style="padding-right: 50px" class=" text-black align-center cursor-pointer" (click)="changeSegment('Combinado')" [class.active]="segment == 'Combinado' "> <div style="padding-right: 50px" class=" text-black align-center cursor-pointer" (click)="changeSegment('Combinado')" [class.active]="segment == 'Combinado' ">
Todos Todas
</div> </div>
<div style="padding-right: 50px" class=" text-black align-center cursor-pointer" (click)="changeSegment('Pessoal')" [class.active]="segment == 'Pessoal' "> <div style="padding-right: 50px" class=" text-black align-center cursor-pointer" (click)="changeSegment('Pessoal')" [class.active]="segment == 'Pessoal' ">
Pessoais Pessoais
@@ -5,8 +5,6 @@
</ion-refresher-content> </ion-refresher-content>
</ion-refresher> </ion-refresher>
{{ loadedEvent.HasAttachments | json}}
<div class="main-content d-flex height-100" [className]="isModal ? '_main-content d-flex height-100 ma-0 px-20 pt-30 pb-20 background-white' : 'main-content d-flex height-100'"> <div class="main-content d-flex height-100" [className]="isModal ? '_main-content d-flex height-100 ma-0 px-20 pt-30 pb-20 background-white' : 'main-content d-flex height-100'">
<div class="content d-flex flex-column width-100"> <div class="content d-flex flex-column width-100">
<div class="main-header d-flex"> <div class="main-header d-flex">
+10 -8
View File
@@ -64,7 +64,7 @@
<div class="schedule-header"> <div class="schedule-header">
<div class="title"> <div class="title">
<ion-icon class="icon" slot="end" src="assets/images/icons-default-agenda.svg" ></ion-icon> <ion-icon class="icon" slot="end" src="assets/images/icons-default-agenda.svg" ></ion-icon>
<div class="text">A sua Agenda</div> <div class="text">A sua agenda do dia</div>
</div> </div>
<button title="Ir para a sua Agenda" class="btn-no-color" [routerLink]="['/home/agenda']"> <button title="Ir para a sua Agenda" class="btn-no-color" [routerLink]="['/home/agenda']">
<ion-icon <ion-icon
@@ -96,7 +96,7 @@
<ion-item class="item-hover cursor-pointer" lines="none" *ngFor="let event of listToPresent" <ion-item class="item-hover cursor-pointer" lines="none" *ngFor="let event of listToPresent"
(click)="goToEvent(event)" (click)="goToEvent(event)"
> >
<div class="d-flex content-{{sessoStore.user.Profile}}-{{event.CalendarName}}"> <div class="d-flex event-box-content content-{{sessoStore.user.Profile}}-{{event.CalendarName}}">
<div class="schedule-time"> <div class="schedule-time">
<div *ngIf="!event.IsAllDayEvent" class="time-start">{{event.StartDate | date: 'HH:mm'}}</div> <div *ngIf="!event.IsAllDayEvent" class="time-start">{{event.StartDate | date: 'HH:mm'}}</div>
@@ -109,7 +109,7 @@
<div class="schedule-details"> <div class="schedule-details">
<div class="description">{{event.Subject}}</div> <div class="description">{{event.Subject}}</div>
<div class="location"> <div class="location">
<p>{{event.Location}}</p> {{event.Location}}
</div> </div>
</div> </div>
</div> </div>
@@ -155,16 +155,18 @@
</div> </div>
<div class="content overflow-y-auto flex-grow-1 height-100"> <div class="content overflow-y-auto flex-grow-1 height-100">
<ion-list> <ion-list>
<ion-item class="item-hover cursor-pointer" lines="none" *ngFor = "let task of listToPresentexpediente" <ion-item class="item-hover cursor-pointer" lines="none" *ngFor = "let task of AllProcess"
(click)="goToExpediente(task.SerialNumber)"> (click)="TaskService.goToProcess(task.SerialNumber || task.serialNumber, task.WorkflowName || task.workflowName || task.workflowDisplayName || task.workflowName, task.activityInstanceName)">
<div class="item-exp d-flex"> <div class="item-exp d-flex">
<div class="schedule-date"> <div class="schedule-date">
<div class="time-end">{{task.TaskStartDate | date: 'dd-MM-yy'}}</div> <div class="time-end">{{task.TaskStartDate | date: 'dd-MM-yy'}}</div>
<div class="time-start">{{task.TaskStartDate | date: 'HH:mm'}}</div> <div class="time-start">{{task.TaskStartDate | date: 'HH:mm'}}</div>
</div> </div>
<div class="schedule-details pointer"> <div class="schedule-details pointer">
<div class="description">{{ task.Subject }}</div> <div class="description">{{task.Folio || task.Subject || task.workflowInstanceDataFields.Subject }}</div>
<div class="location">{{ task.Senders }}</div> <div class="location" *ngIf="task.Senders">{{ task.Senders }}</div>
<div class="location" *ngIf="task.workflowInstanceDataFields">{{task.workflowInstanceDataFields.Sender }}</div>
<!-- <div class="location" *ngIf="!task.Senders && !task.workflowInstanceDataFields">{{task.workflowInstanceDataFields.Sender }}</div> -->
</div> </div>
</div> </div>
</ion-item> </ion-item>
@@ -275,7 +277,7 @@
</div> </div>
<div class="content overflow-y-auto flex-grow-1 height-100"> <div class="content overflow-y-auto flex-grow-1 height-100">
<ion-list> <ion-list>
<ion-item class="item-hover cursor-pointer" lines="none" *ngFor = "let task of listToPresentexpediente" <ion-item class="item-hover cursor-pointer" lines="none" *ngFor = "let task of AllProcess"
(click)="goToExpediente(task.SerialNumber)"> (click)="goToExpediente(task.SerialNumber)">
<div class="item-exp d-flex"> <div class="item-exp d-flex">
<div class="schedule-date"> <div class="schedule-date">
+15 -2
View File
@@ -201,6 +201,7 @@ ion-toolbar{
color: var(--subtitle-text-color); color: var(--subtitle-text-color);
font-size: 16px; font-size: 16px;
margin: 0 auto; margin: 0 auto;
min-height: 19px;
} }
.div-botton-middle{ .div-botton-middle{
width: 75%; width: 75%;
@@ -437,7 +438,6 @@ ion-toolbar{
} }
.schedule-date{ .schedule-date{
margin-right: 10px; margin-right: 10px;
width: 22%;
color: #797979 !important; color: #797979 !important;
font-size: 13px; font-size: 13px;
} }
@@ -446,11 +446,13 @@ ion-toolbar{
flex-wrap: wrap; flex-wrap: wrap;
align-items: center; align-items: center;
width: 78%; width: 78%;
min-height: 39px;
align-items: baseline;
.location{ .location{
font-family: Roboto; font-family: Roboto;
font-size: 15px; font-size: 15px;
font-weight: bold;
color: black; color: black;
min-height: 19px;
width: 100%; width: 100%;
} }
@@ -458,6 +460,7 @@ ion-toolbar{
width: 100%; width: 100%;
font-family: Roboto; font-family: Roboto;
font-size: 13px; font-size: 13px;
font-weight: bold;
//color: #0d89d1; //color: #0d89d1;
color: var(--title-text-color) color: var(--title-text-color)
} }
@@ -642,3 +645,13 @@ ion-title{
margin-right: 0px !important; margin-right: 0px !important;
} }
} }
.item-exp {
justify-content: flex-start !important;
}
.event-box-content {
justify-content: flex-start !important;
}
+42
View File
@@ -68,6 +68,13 @@ export class EventsPage implements OnInit {
showCorrespondenciasLoader = false showCorrespondenciasLoader = false
loadingAllTask = false loadingAllTask = false
filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'OverdueTasks' | 'Todos' = 'Não lidos'
showSearch = true;
searchSubject: string = '';
AllProcess = []
ordinance: string = 'old'
constructor( constructor(
private eventService: EventsService, private eventService: EventsService,
private router: Router, private router: Router,
@@ -102,6 +109,13 @@ export class EventsPage implements OnInit {
this.listToPresentexpediente = [] this.listToPresentexpediente = []
}) })
this.TaskService.registerCallback({
id: import.meta.url,
funx:() => {
this.dynamicSearch()
}
})
} }
ngOnInit() { ngOnInit() {
@@ -128,6 +142,34 @@ export class EventsPage implements OnInit {
} }
async dynamicSearch() {
const ordinance = this.ordinance
if(this.showSearch && this.searchSubject) {
const AllProcess = this.TaskService.AllProcess.filter((task) => {
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
subject = subject.toLowerCase();
return subject.includes(this.searchSubject.toLowerCase())
}).filter( task => this.TaskService.filter(task, this.filterName))
if(ordinance == this.ordinance) {
this.AllProcess = this.TaskService.reorderList(this.ordinance, AllProcess)
}
} else {
const AllProcess = this.TaskService.AllProcess
if(ordinance == this.ordinance) {
this.AllProcess = this.TaskService.reorderList(this.ordinance, AllProcess)
.filter( task => this.TaskService.filter(task, this.filterName))
}
}
}
async loadAllTask() { async loadAllTask() {
this.loadingAllTask = true this.loadingAllTask = true
await this.TaskService.LoadTask() await this.TaskService.LoadTask()
@@ -22,6 +22,7 @@ import { SessionStore } from 'src/app/store/session.service';
import { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe'; import { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe';
import { environment } from 'src/environments/environment'; import { environment } from 'src/environments/environment';
import { TaskService } from 'src/app/services/task.service' import { TaskService } from 'src/app/services/task.service'
import { RouteService } from 'src/app/services/route.service';
@Component({ @Component({
selector: 'app-despachos-pr', selector: 'app-despachos-pr',
@@ -75,7 +76,8 @@ export class DespachosPrPage implements OnInit {
private backgroundservice: BackgroundService, private backgroundservice: BackgroundService,
private sortService: SortService, private sortService: SortService,
public ThemeService: ThemeService, public ThemeService: ThemeService,
public TaskService: TaskService public TaskService: TaskService,
private RouteService: RouteService,
) { ) {
this.profile = 'mdgpr'; this.profile = 'mdgpr';
@@ -289,7 +291,7 @@ export class DespachosPrPage implements OnInit {
} }
goBack() { goBack() {
this.router.navigate(['/home/gabinete-digital']); this.RouteService.goBack();
} }
} }
@@ -220,7 +220,7 @@ export class DespachoPage implements OnInit {
await this.despachoService.executado(note, documents, this.serialnumber).toPromise(); await this.despachoService.executado(note, documents, this.serialnumber).toPromise();
this.httpErrorHandle.httpsSucessMessagge('Executado') this.httpErrorHandle.httpsSucessMessagge('Executado')
this.TaskService.loadDespachos(); this.TaskService.loadDespachos();
this.close(); // this.close();
} catch (error) { } catch (error) {
this.httpErrorHandle.httpStatusHandle(error) this.httpErrorHandle.httpStatusHandle(error)
} }
@@ -237,7 +237,7 @@ export class DespachoPage implements OnInit {
await this.despachoService.arquivar(note, documents, this.serialnumber).toPromise() await this.despachoService.arquivar(note, documents, this.serialnumber).toPromise()
this.httpErrorHandle.httpsSucessMessagge('Arquivar') this.httpErrorHandle.httpsSucessMessagge('Arquivar')
this.TaskService.loadDespachos(); this.TaskService.loadDespachos();
this.close(); // this.close();
} catch (error) { } catch (error) {
this.httpErrorHandle.httpStatusHandle(error) this.httpErrorHandle.httpStatusHandle(error)
} }
@@ -264,7 +264,7 @@ export class DespachoPage implements OnInit {
await this.processes.CompleteTask(body).toPromise() await this.processes.CompleteTask(body).toPromise()
this.httpErrorHandle.httpsSucessMessagge('Reexecução') this.httpErrorHandle.httpsSucessMessagge('Reexecução')
this.TaskService.loadDespachos(); this.TaskService.loadDespachos();
this.close(); //this.close();
} catch (error) { } catch (error) {
this.httpErrorHandle.httpStatusHandle(error) this.httpErrorHandle.httpStatusHandle(error)
@@ -292,7 +292,7 @@ export class DespachoPage implements OnInit {
await this.processes.CompleteTask(body).toPromise() await this.processes.CompleteTask(body).toPromise()
this.httpErrorHandle.httpsSucessMessagge('Gerar Diploma') this.httpErrorHandle.httpsSucessMessagge('Gerar Diploma')
this.TaskService.loadDespachos(); this.TaskService.loadDespachos();
this.close(); // this.close();
} catch (error) { } catch (error) {
this.httpErrorHandle.httpStatusHandle(error); this.httpErrorHandle.httpStatusHandle(error);
} finally { } finally {
@@ -496,9 +496,16 @@ export class DespachoPage implements OnInit {
}, },
translucent: true translucent: true
}); });
return await popover.present().then(()=> { await popover.present();
this.TaskService.loadDespachos();
popover.onDidDismiss().then((res)=> {
console.log('res', res.data)
if(res.data == 'back') {
this.goBack();
}
}) })
} }
@@ -29,15 +29,15 @@
</mat-option> </mat-option>
<mat-option value="Novos" > <mat-option value="Novos" >
Novos Novas
</mat-option> </mat-option>
<mat-option value="Lidos" > <mat-option value="Lidos" >
Lidos Lidas
</mat-option> </mat-option>
<mat-option value="Não lidos" > <mat-option value="Não lidos" >
Não lidos Não lidas
</mat-option> </mat-option>
<mat-option value="OverdueTasks"> <mat-option value="OverdueTasks">
@@ -45,7 +45,7 @@
</mat-option> </mat-option>
<mat-option value="Todos" > <mat-option value="Todos" >
Todos Todas
</mat-option> </mat-option>
</mat-select> </mat-select>
@@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core';
import { NavigationStart, Router } from '@angular/router'; import { NavigationStart, Router } from '@angular/router';
import { DespachoService } from 'src/app/Rules/despacho.service'; import { DespachoService } from 'src/app/Rules/despacho.service';
import { DespachoStore } from 'src/app/store/despacho-store.service'; import { DespachoStore } from 'src/app/store/despacho-store.service';
import { RouteService } from 'src/app/services/route.service';
import { SqliteService } from 'src/app/services/sqlite.service'; import { SqliteService } from 'src/app/services/sqlite.service';
import { Platform } from '@ionic/angular'; import { Platform } from '@ionic/angular';
import { BackgroundService } from 'src/app/services/background.service'; import { BackgroundService } from 'src/app/services/background.service';
@@ -32,7 +32,8 @@ export class DespachosPage implements OnInit {
private platform: Platform, private platform: Platform,
private backgroundservice: BackgroundService, private backgroundservice: BackgroundService,
public ThemeService: ThemeService, public ThemeService: ThemeService,
public TaskService: TaskService public TaskService: TaskService,
private RouteService: RouteService,
) {} ) {}
ngOnInit() { ngOnInit() {
@@ -139,11 +140,7 @@ export class DespachosPage implements OnInit {
goBack() { goBack() {
this.router.navigate(['/home/gabinete-digital']); this.RouteService.goBack();
}
goToList() {
this.router.navigate(['/home/gabinete-digital/despachos']);
} }
} }
@@ -23,15 +23,15 @@
</mat-option> </mat-option>
<mat-option value="Novos" > <mat-option value="Novos" >
Novos Novas
</mat-option> </mat-option>
<mat-option value="Lidos" > <mat-option value="Lidos" >
Lidos Lidas
</mat-option> </mat-option>
<mat-option value="Não lidos" > <mat-option value="Não lidos" >
Não lidos Não lidas
</mat-option> </mat-option>
<mat-option value="OverdueTasks"> <mat-option value="OverdueTasks">
@@ -39,7 +39,7 @@
</mat-option> </mat-option>
<mat-option value="Todos" > <mat-option value="Todos" >
Todos Todas
</mat-option> </mat-option>
</mat-select> </mat-select>
@@ -9,6 +9,7 @@ import { SortService } from 'src/app/services/functions/sort.service';
import { ThemeService } from 'src/app/services/theme.service' import { ThemeService } from 'src/app/services/theme.service'
import { DeplomasStore } from 'src/app/store/deplomas.service'; import { DeplomasStore } from 'src/app/store/deplomas.service';
import { TaskService } from 'src/app/services/task.service' import { TaskService } from 'src/app/services/task.service'
import { RouteService } from 'src/app/services/route.service';
@Component({ @Component({
selector: 'app-diplomas-assinar', selector: 'app-diplomas-assinar',
@@ -41,7 +42,8 @@ export class DiplomasAssinarPage implements OnInit {
private router: Router, private router: Router,
private sortService: SortService, private sortService: SortService,
public ThemeService: ThemeService, public ThemeService: ThemeService,
public TaskService: TaskService) { public TaskService: TaskService,
private RouteService: RouteService,) {
} }
ngOnInit() { ngOnInit() {
@@ -126,8 +128,9 @@ export class DiplomasAssinarPage implements OnInit {
} }
goBack() { goBack() {
this.router.navigate(['/home/gabinete-digital']); // this.router.navigate(['/home/gabinete-digital']);
// window.history.back() // window.history.back()
this.RouteService.goBack();
} }
} }
@@ -9,7 +9,7 @@ import { SortService } from 'src/app/services/functions/sort.service';
import { ThemeService } from 'src/app/services/theme.service' import { ThemeService } from 'src/app/services/theme.service'
import { DeplomasStore } from 'src/app/store/deplomas.service'; import { DeplomasStore } from 'src/app/store/deplomas.service';
import { TaskService } from 'src/app/services/task.service' import { TaskService } from 'src/app/services/task.service'
import { RouteService } from 'src/app/services/route.service';
@Component({ @Component({
selector: 'app-diplomas-gerars', selector: 'app-diplomas-gerars',
templateUrl: './diplomas-gerar.page.html', templateUrl: './diplomas-gerar.page.html',
@@ -42,7 +42,8 @@ export class DiplomasGerarPage implements OnInit {
private router: Router, private router: Router,
private sortService: SortService, private sortService: SortService,
public ThemeService: ThemeService, public ThemeService: ThemeService,
public TaskService: TaskService) { public TaskService: TaskService,
private RouteService: RouteService,) {
} }
ngOnInit() { ngOnInit() {
@@ -139,7 +140,7 @@ export class DiplomasGerarPage implements OnInit {
} }
goBack() { goBack() {
this.router.navigate(['/home/gabinete-digital']); this.RouteService.goBack();
// window.history.back() // window.history.back()
} }
} }
@@ -85,31 +85,7 @@ export class DiplomaPage implements OnInit {
goBack() { goBack() {
this.RouteService.goBack(); this.RouteService.goBack();
/* if(this.task.Status == "Pending" && this.caller == 'gabinete-digital'){
if (window.innerWidth < 801) {
this.router.navigate(['/home/gabinete-digital/pendentes']);
}
else {
let navigationExtras: NavigationExtras = {
queryParams: {
"pendentes": true,
}
}
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
}
}
else{
if (window.innerWidth < 801) {
this.router.navigate(['/home/gabinete-digital/diplomas']);
} else {
let navigationExtras: NavigationExtras = {
queryParams: {
'diplomas': true
}
}
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
}
} */
} }
async openOptions(taskAction?: any) { async openOptions(taskAction?: any) {
@@ -11,6 +11,7 @@ import { PermissionService } from 'src/app/services/permission.service';
import { DeplomasStore } from 'src/app/store/deplomas.service'; import { DeplomasStore } from 'src/app/store/deplomas.service';
import { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe'; import { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe';
import { TaskService } from 'src/app/services/task.service' import { TaskService } from 'src/app/services/task.service'
import { RouteService } from 'src/app/services/route.service';
@Component({ @Component({
selector: 'app-diplomas', selector: 'app-diplomas',
@@ -46,7 +47,8 @@ export class DiplomasPage implements OnInit, OnDestroy {
private sortService: SortService, private sortService: SortService,
public ThemeService: ThemeService, public ThemeService: ThemeService,
public p: PermissionService, public p: PermissionService,
public TaskService: TaskService public TaskService: TaskService,
private RouteService: RouteService,
) { ) {
//Inicializar segment //Inicializar segment
@@ -223,8 +225,7 @@ export class DiplomasPage implements OnInit, OnDestroy {
} }
goBack() { goBack() {
this.router.navigate(['/home/gabinete-digital']); this.RouteService.goBack();
// window.history.back()
} }
} }
@@ -71,7 +71,6 @@ export class ApproveEventModalPage implements OnInit {
} }
close(){ close(){
/* this.router.navigate(['/home/gabinete-digital/event-list']); */
this.modalController.dismiss(null); this.modalController.dismiss(null);
} }
@@ -95,16 +95,6 @@ export class ApproveEventPage implements OnInit {
goBack() { goBack() {
this.RouteService.goBack(); this.RouteService.goBack();
/* let navigationExtras: NavigationExtras = {
queryParams: {
"eventos": true,
}
};
if( window.innerWidth < 801) {
this.router.navigate(['/home',this.caller, 'event-list']);
} else {
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
} */
} }
@@ -121,7 +111,6 @@ export class ApproveEventPage implements OnInit {
this.processes.GetTask(this.serialNumber).subscribe(async res => { this.processes.GetTask(this.serialNumber).subscribe(async res => {
this.loadedEvent = res this.loadedEvent = res
console.log('1111=1=1=1=')
this.addProcessToDB(this.loadedEvent) this.addProcessToDB(this.loadedEvent)
try { try {
@@ -31,15 +31,15 @@
</mat-option> </mat-option>
<mat-option value="Novos" > <mat-option value="Novos" >
Novos Novas
</mat-option> </mat-option>
<mat-option value="Lidos" > <mat-option value="Lidos" >
Lidos Lidas
</mat-option> </mat-option>
<mat-option value="Não Lidos" > <mat-option value="Não Lidos" >
Não lidos Não lidas
</mat-option> </mat-option>
@@ -49,7 +49,7 @@
</mat-option> </mat-option>
<mat-option value="Todos" > <mat-option value="Todos" >
Todos Todas
</mat-option> </mat-option>
</mat-select> </mat-select>
@@ -25,6 +25,8 @@ import { ThemeService } from 'src/app/services/theme.service'
import { SessionStore } from 'src/app/store/session.service'; import { SessionStore } from 'src/app/store/session.service';
import { PermissionService } from 'src/app/services/permission.service'; import { PermissionService } from 'src/app/services/permission.service';
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service'; import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
import { RouteService } from 'src/app/services/route.service';
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = { const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
parse: { parse: {
@@ -113,6 +115,7 @@ export class ExpedientTaskModalPage implements OnInit {
public ThemeService: ThemeService, public ThemeService: ThemeService,
public p: PermissionService, public p: PermissionService,
private httpErroHandle: HttpErrorHandle, private httpErroHandle: HttpErrorHandle,
private RouteService: RouteService,
) { ) {
this.loggeduser = SessionStore.user; this.loggeduser = SessionStore.user;
@@ -178,7 +181,7 @@ export class ExpedientTaskModalPage implements OnInit {
} }
close() { close() {
this.router.navigate(['/home/gabinete-digital/expediente']); this.RouteService.goBack();
this.modalController.dismiss(null); this.modalController.dismiss(null);
} }
@@ -32,15 +32,15 @@
</mat-option> </mat-option>
<mat-option value="Novos" > <mat-option value="Novos" >
Novos Novas
</mat-option> </mat-option>
<mat-option value="Lidos" > <mat-option value="Lidos" >
Lidos Lidas
</mat-option> </mat-option>
<mat-option value="Não lidos" > <mat-option value="Não lidos" >
Não lidos Não lidas
</mat-option> </mat-option>
@@ -49,7 +49,7 @@
</mat-option> </mat-option>
<mat-option value="Todos" > <mat-option value="Todos" >
Todos Todas
</mat-option> </mat-option>
@@ -13,7 +13,7 @@ import { Storage } from '@ionic/storage';
import { EventTrigger } from 'src/app/services/eventTrigger.service'; import { EventTrigger } from 'src/app/services/eventTrigger.service';
import { TaskDeadlineService } from 'src/app/services/task-deadline.service' import { TaskDeadlineService } from 'src/app/services/task-deadline.service'
import { TaskService } from 'src/app/services/task.service' import { TaskService } from 'src/app/services/task.service'
import { RouteService } from 'src/app/services/route.service';
@Component({ @Component({
selector: 'app-expediente', selector: 'app-expediente',
templateUrl: './expediente.page.html', templateUrl: './expediente.page.html',
@@ -51,7 +51,8 @@ export class ExpedientePage implements OnInit {
private storage: Storage, private storage: Storage,
private eventTriger: EventTrigger, private eventTriger: EventTrigger,
public TaskDeadlineService: TaskDeadlineService, public TaskDeadlineService: TaskDeadlineService,
public TaskService: TaskService public TaskService: TaskService,
private RouteService: RouteService,
) { ) {
this.eventTriger.getObservable().subscribe((event) => { this.eventTriger.getObservable().subscribe((event) => {
@@ -158,7 +159,7 @@ export class ExpedientePage implements OnInit {
} }
goBack() { goBack() {
this.router.navigate(['/home/gabinete-digital']); this.RouteService.goBack();
} }
goToExpediente(serialNumber: any) { goToExpediente(serialNumber: any) {
@@ -101,41 +101,6 @@ export class ExpedientePrPage implements OnInit {
goBack() { goBack() {
this.TaskService.loadExpedientes() this.TaskService.loadExpedientes()
this.RouteService.goBack(); this.RouteService.goBack();
/* if(this.task.Status == "Pending" && this.caller != 'events'){
if (window.innerWidth <= 800) {
this.router.navigate(['/home/gabinete-digital/pendentes']);
}
else {
let navigationExtras: NavigationExtras = {
queryParams: {
"pendentes": true,
}
}
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
}
}
else{
this.activatedRoute.paramMap.subscribe(params => {
switch (params["params"].caller) {
case 'events':
this.router.navigate(['/home',params["params"].caller]);
break;
case 'gabinete-digital':
let navigationExtras: NavigationExtras = {
queryParams: {
"expedientes-pr": true,
}
}
if( window.innerWidth < 801) {
this.router.navigate(['/home/gabinete-digital/expedientes-pr']);
} else {
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
}
break;
}
});
} */
} }
sendExpedienteToPending() { sendExpedienteToPending() {
@@ -143,7 +143,6 @@ export class ExpedientesPrPage implements OnInit {
} }
goToExpediente({SerialNumber}){ goToExpediente({SerialNumber}){
//this.router.navigate(['/home/gabinete-digital/expedientes-pr',serialNumber,'gabinete-digital']);
this.router.navigate(['/home/gabinete-digital/expediente', SerialNumber, 'gabinete-digital']); this.router.navigate(['/home/gabinete-digital/expediente', SerialNumber, 'gabinete-digital']);
} }
@@ -22,15 +22,15 @@
</mat-option> </mat-option>
<mat-option value="Novos" > <mat-option value="Novos" >
Novos Novas
</mat-option> </mat-option>
<mat-option value="Lidos" > <mat-option value="Lidos" >
Lidos Lidas
</mat-option> </mat-option>
<mat-option value="Não lidos" > <mat-option value="Não lidos" >
Não lidos Não lidas
</mat-option> </mat-option>
<mat-option value="OverdueTasks"> <mat-option value="OverdueTasks">
@@ -38,7 +38,7 @@
</mat-option> </mat-option>
<mat-option value="Todos" > <mat-option value="Todos" >
Todos Todas
</mat-option> </mat-option>
</mat-select> </mat-select>
@@ -114,22 +114,22 @@
<div *ngIf="hideSearchBtn"> <div *ngIf="hideSearchBtn">
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda"> <mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
<mat-select [(value)]="filterName"> <mat-select [(value)]="filterName" (change)="dynamicSearch()">
<mat-option value="Para hoje" > <mat-option value="Para hoje" >
Para hoje Para hoje
</mat-option> </mat-option>
<mat-option value="Novos" > <mat-option value="Novos" >
Novos Novas
</mat-option> </mat-option>
<mat-option value="Lidos" > <mat-option value="Lidos" >
Lidos Lidas
</mat-option> </mat-option>
<mat-option value="Não lidos" > <mat-option value="Não lidos" >
Não lidos Não lidas
</mat-option> </mat-option>
<mat-option value="OverdueTasks"> <mat-option value="OverdueTasks">
@@ -137,7 +137,7 @@
</mat-option> </mat-option>
<mat-option value="Todos" > <mat-option value="Todos" >
Todos Todas
</mat-option> </mat-option>
</mat-select> </mat-select>
@@ -159,7 +159,7 @@
class=" box-hover ion-no-padding cursor-pointer" class=" box-hover ion-no-padding cursor-pointer"
*ngFor = "let task of AllProcess" *ngFor = "let task of AllProcess"
(click)="goToProcess(task.SerialNumber || task.serialNumber, task.WorkflowName || task.workflowName || task.workflowDisplayName || task.workflowName, task.activityInstanceName)"> (click)="goToProcess(task.SerialNumber || task.serialNumber, task.WorkflowName || task.workflowName || task.workflowDisplayName || task.workflowName, task.activityInstanceName)">
<div class="item-wrapper" *ngIf="TaskService.filter(task, filterName)"> <div class="item-wrapper">
<div class="item width-100"> <div class="item width-100">
<div class="item-top-detail"> <div class="item-top-detail">
<div class="item-subject"> <div class="item-subject">
@@ -217,12 +217,14 @@ export class GabineteDigitalPage implements OnInit {
if(ordinance == this.ordinance) { if(ordinance == this.ordinance) {
this.AllProcess = this.TaskService.reorderList(this.ordinance, AllProcess) this.AllProcess = this.TaskService.reorderList(this.ordinance, AllProcess)
.filter( task => this.TaskService.filter(task, this.filterName))
} }
} else { } else {
const AllProcess = this.TaskService.AllProcess const AllProcess = this.TaskService.AllProcess.filter( task => this.TaskService.filter(task, this.filterName))
if(ordinance == this.ordinance) { if(ordinance == this.ordinance) {
this.AllProcess = this.TaskService.reorderList(this.ordinance, AllProcess) this.AllProcess = this.TaskService.reorderList(this.ordinance, AllProcess)
.filter( task => this.TaskService.filter(task, this.filterName))
} }
} }
@@ -260,6 +262,7 @@ export class GabineteDigitalPage implements OnInit {
} }
}); });
this.checkRoutes()
this.hideRefreshButton(); this.hideRefreshButton();
// console.log(' this.scroll', this.scroll) // console.log(' this.scroll', this.scroll)
@@ -388,9 +391,12 @@ export class GabineteDigitalPage implements OnInit {
checkRoutes() { checkRoutes() {
this.closeAllDesktopComponents(); this.closeAllDesktopComponents();
if (this.router.url == 'processes=true') {
// console.log(this.router.url, this.router.url.includes('processes=true'))
// alert('hello')
if (this.router.url.includes('processes=true')) {
this.openAllProcessesPage(); this.openAllProcessesPage();
this.selectedElement = 'allProcessesTag'; this.checkUser()
} }
if (this.router.url == '/home/gabinete-digital?eventos=true') { if (this.router.url == '/home/gabinete-digital?eventos=true') {
this.openEventsToApprovePage(); this.openEventsToApprovePage();
@@ -512,7 +518,7 @@ export class GabineteDigitalPage implements OnInit {
this.router.navigate(['/home/gabinete-digital']); this.router.navigate(['/home/gabinete-digital']);
} }
else { else {
this.router.navigate(['/home/gabinete-digital'], navigationExtras); // this.router.navigate(['/home/gabinete-digital'], navigationExtras);
this.showAllProcesses = true; this.showAllProcesses = true;
this.selectedElement = "allProcessesTag"; this.selectedElement = "allProcessesTag";
} }
@@ -608,40 +608,6 @@ export class PedidoPage implements OnInit {
goBack() { goBack() {
this.RouteService.goBack(); this.RouteService.goBack();
// if(this.task.Status == "Pending" && this.caller == 'gabinete-digital'){
// if (window.innerWidth <= 700) {
// this.router.navigate(['/home/gabinete-digital/pendentes']);
// }
// else {
// let navigationExtras: NavigationExtras;
// if (this.task.activityInstanceName == 'Concluir Deferimento') {
// navigationExtras= { queryParams: {"deferimento": true,}};
// } else if (this.task.activityInstanceName == 'Tarefa de Parecer' ) {
// navigationExtras = { queryParams: {"parecer": true,}};
// }
// this.router.navigate(['/home/gabinete-digital'], navigationExtras);
// }
// }
// else {
// if (window.innerWidth <= 700) {
// this.router.navigate(['/home/gabinete-digital/pedidos']);
// }
// else {
// let navigationExtras: NavigationExtras;
// if (this.task.activityInstanceName == 'Concluir Deferimento') {
// navigationExtras= { queryParams: {"deferimento": true,}};
// } else if (this.task.activityInstanceName == 'Tarefa de Parecer' ) {
// navigationExtras = { queryParams: {"parecer": true,}};
// }
// this.router.navigate(['/home/gabinete-digital'], navigationExtras);
// }
// }
} }
} }
@@ -34,15 +34,15 @@
</mat-option> </mat-option>
<mat-option value="Novos" > <mat-option value="Novos" >
Novos Novas
</mat-option> </mat-option>
<mat-option value="Lidos" > <mat-option value="Lidos" >
Lidos Lidas
</mat-option> </mat-option>
<mat-option value="Não lidos" > <mat-option value="Não lidos" >
Não lidos Não lidas
</mat-option> </mat-option>
<mat-option value="OverdueTasks"> <mat-option value="OverdueTasks">
@@ -51,7 +51,7 @@
<mat-option value="Todos" > <mat-option value="Todos" >
Todos Todas
</mat-option> </mat-option>
@@ -14,6 +14,9 @@ import { SortService } from 'src/app/services/functions/sort.service';
import { ThemeService } from 'src/app/services/theme.service' import { ThemeService } from 'src/app/services/theme.service'
import { TaskService } from 'src/app/services/task.service' import { TaskService } from 'src/app/services/task.service'
import { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe'; import { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe';
import { RouteService } from 'src/app/services/route.service';
@Component({ @Component({
selector: 'app-pedidos', selector: 'app-pedidos',
templateUrl: './pedidos.page.html', templateUrl: './pedidos.page.html',
@@ -62,7 +65,8 @@ export class PedidosPage implements OnInit {
private backgroundservice: BackgroundService, private backgroundservice: BackgroundService,
private platform: Platform, private platform: Platform,
public ThemeService: ThemeService, public ThemeService: ThemeService,
public TaskService: TaskService public TaskService: TaskService,
private RouteService: RouteService,
) { ) {
this.segment = 'parecer'; this.segment = 'parecer';
@@ -138,23 +142,9 @@ export class PedidosPage implements OnInit {
} }
goBack() { goBack() {
this.router.navigate(['/home/gabinete-digital']); this.RouteService.goBack();
} }
/* segmentChanged(ev: any) {
let navigationExtras: NavigationExtras;
if (this.segment == 'deferimento') {
navigationExtras= { queryParams: {"deferimento": true,}};
} else if (this.segment == 'parecer') {
navigationExtras = { queryParams: {"parecer": true,}};
}
this.router.navigate(['/home/gabinete-digital/pedidos'], navigationExtras);
// this.LoadList();
} */
goToPedido(serialNumber: any) { goToPedido(serialNumber: any) {
this.router.navigate(['/home/gabinete-digital/pedidos', serialNumber, 'gabinete-digital']); this.router.navigate(['/home/gabinete-digital/pedidos', serialNumber, 'gabinete-digital']);
@@ -19,7 +19,7 @@ import { SessionStore } from 'src/app/store/session.service';
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service'; import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
import { TaskService } from 'src/app/services/task.service' import { TaskService } from 'src/app/services/task.service'
import { ThemeService } from 'src/app/services/theme.service' import { ThemeService } from 'src/app/services/theme.service'
import { RouteService } from 'src/app/services/route.service';
@Component({ @Component({
selector: 'app-pendentes', selector: 'app-pendentes',
templateUrl: './pendentes.page.html', templateUrl: './pendentes.page.html',
@@ -62,6 +62,7 @@ export class PendentesPage implements OnInit {
private httpErroHandle: HttpErrorHandle, private httpErroHandle: HttpErrorHandle,
public TaskService: TaskService, public TaskService: TaskService,
public ThemeService: ThemeService, public ThemeService: ThemeService,
private RouteService: RouteService,
) { ) {
this.loggeduser = SessionStore.user; this.loggeduser = SessionStore.user;
this.profile = 'mdgpr'; this.profile = 'mdgpr';
@@ -128,7 +129,7 @@ export class PendentesPage implements OnInit {
} }
goBack() { goBack() {
this.router.navigate(['/home/gabinete-digital']); this.RouteService.goBack();
} }
notImplemented() { notImplemented() {
+22
View File
@@ -305,6 +305,28 @@ export class EventsService {
} else { } else {
this.hasAnyCalendar = true this.hasAnyCalendar = true
} }
(() => {
const keys = {}
for (let e of SessionStore.user.OwnerCalendars) {
if(!keys[e.CalendarId]) {
keys[e.CalendarId] = e.CalendarId
} else {
throw(`Calendar ${e.CalendarId} is repeated for user `+ SessionStore.user.FullName);
}
}
for (let e of SessionStore.user.SharedCalendars) {
if(!keys[e.CalendarId]) {
keys[e.CalendarId] = e.CalendarId
} else {
throw(`Calendar ${e.CalendarId} is repeated for user `+ SessionStore.user.FullName);
}
}
})();
} }
} }
+3
View File
@@ -60,6 +60,9 @@ export class ProcessesService {
params = params.set("ProcessName", processname); params = params.set("ProcessName", processname);
params = params.set("OnlyCount", onlycount.toString()); params = params.set("OnlyCount", onlycount.toString());
params = params.set("OnlyCount", onlycount.toString());
params = params.set("pageNum", "1");
params = params.set("pageSize", "500");
let options = { let options = {
headers: this.headers, headers: this.headers,
+51
View File
@@ -16,6 +16,7 @@ import { SessionStore } from 'src/app/store/session.service';
import { EventsService } from './events.service'; import { EventsService } from './events.service';
import { SortService } from './functions/sort.service'; import { SortService } from './functions/sort.service';
import { customTask } from '../models/dailyworktask.model'; import { customTask } from '../models/dailyworktask.model';
import { Router } from '@angular/router';
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
@@ -61,6 +62,7 @@ export class TaskService {
private despachoRule: DespachoService, private despachoRule: DespachoService,
public eventService: EventsService, public eventService: EventsService,
private sortService: SortService, private sortService: SortService,
private router: Router,
) { ) {
window['all-process-gabinete'] = () => { window['all-process-gabinete'] = () => {
@@ -364,4 +366,53 @@ export class TaskService {
} }
} }
goToProcess(serialNumber: string, workflowName: string, activityName: string) {
if (workflowName == 'Despacho') {
if (activityName == 'Tarefa de Despacho' || activityName == 'Concluir Despacho') {
this.router.navigate(['/home/gabinete-digital/despachos', serialNumber, 'gabinete-digital']);
}
}
else if (workflowName == 'Despacho do Presidente da República') {
if (activityName == 'Tarefa de Despacho' || activityName == 'Concluir Despacho') {
this.router.navigate(['/home/gabinete-digital/despachos-pr', serialNumber, 'gabinete-digital']);
}
else if (activityName == 'Revisar Diploma' || activityName == 'Assinar Diploma') {
this.router.navigate(['/home/gabinete-digital/diplomas', serialNumber, 'gabinete-digital']);
}
else if (activityName == 'Diploma Assinado') {
this.router.navigate(['/home/gabinete-digital/diplomas-assinar', serialNumber, 'gabinete-digital']);
} else {
}
}
else if (workflowName == 'Pedido de Parecer' || workflowName == 'Pedido de Deferimento') {
this.router.navigate(['/home/gabinete-digital/pedidos', serialNumber, 'gabinete-digital']);
}
else if (workflowName == 'Expediente') {
this.router.navigate(['/home/gabinete-digital/expediente', serialNumber, 'gabinete-digital']);
}
else if (workflowName == 'Expediente' && SessionStore.user.Profile == 'PR') {
this.router.navigate(['/home/gabinete-digital/expedientes-pr', serialNumber, 'gabinete-digital']);
}
else if (workflowName == "Pedido de Parecer do Presidente") {
this.router.navigate(['/home/gabinete-digital/pedidos', serialNumber, 'gabinete-digital']);
}
/* else if (workflowName == "Expediente") {
this.router.navigate(['/home/gabinete-digital/pedidos',serialNumber,'gabinete-digital']);
} */
else if (workflowName == 'Agenda Pessoal PR' || workflowName == 'Agenda Oficial PR' || workflowName == 'Agenda Oficial MDGPR' || workflowName == 'Agenda Pessoal MDGPR' || activityName == "Aprovar Evento" || workflowName == "Agendar Evento") {
this.router.navigate(['/home/gabinete-digital/event-list/approve-event', serialNumber, 'gabinete-digital']);
}
else {
throw(`${workflowName} && ${activityName} no route`)
}
}
} }
@@ -55,6 +55,10 @@ export class ApproveEventPage implements OnInit {
) { ) {
// Event to approve list // Event to approve list
window['edit-approve-event-desktop'] = ()=> {
this.getTask()
}
} }
toDateString(e) { toDateString(e) {
@@ -168,6 +172,7 @@ export class ApproveEventPage implements OnInit {
}); });
return await popover.present().then(() =>{ return await popover.present().then(() =>{
this.TaskService.loadEventosParaAprovacao() this.TaskService.loadEventosParaAprovacao()
this.getTask()
}) })
} }
@@ -375,14 +375,14 @@ export class EditEventToApprovePage implements OnInit {
if(document['action'] == 'add') { if(document['action'] == 'add') {
delete document.action delete document.action
this.attachmentsService.setEventAttachmentById(document).subscribe(()=>{ this.attachmentsService.setEventAttachmentById(document).subscribe(()=>{
window['edit-approve-event-desktop']()
}, error =>{ }, error =>{
this.toastService.badRequest(); this.toastService.badRequest();
}); });
} else if(document['action'] == 'delete') { } else if(document['action'] == 'delete') {
delete document.action delete document.action
this.attachmentsService.deleteEventAttachmentById(document.Id).subscribe( res=>{ this.attachmentsService.deleteEventAttachmentById(document.Id).subscribe( res=>{
window['edit-approve-event-desktop']()
}, error =>{ }, error =>{
this.toastService.badRequest() this.toastService.badRequest()
}) })
@@ -61,15 +61,15 @@
</mat-option> </mat-option>
<mat-option value="Novos" > <mat-option value="Novos" >
Novos Novas
</mat-option> </mat-option>
<mat-option value="Lidos" > <mat-option value="Lidos" >
Lidos Lidas
</mat-option> </mat-option>
<mat-option value="Não lidos" > <mat-option value="Não lidos" >
Não lidos Não lidas
</mat-option> </mat-option>
<mat-option value="OverdueTasks"> <mat-option value="OverdueTasks">
@@ -77,7 +77,7 @@
</mat-option> </mat-option>
<mat-option value="Todos" > <mat-option value="Todos" >
Todos Todas
</mat-option> </mat-option>
</mat-select> </mat-select>
@@ -58,15 +58,15 @@
</mat-option> </mat-option>
<mat-option value="Novos" > <mat-option value="Novos" >
Novos Novas
</mat-option> </mat-option>
<mat-option value="Lidos" > <mat-option value="Lidos" >
Lidos Lidas
</mat-option> </mat-option>
<mat-option value="Não lidos" > <mat-option value="Não lidos" >
Não lidos Não lidas
</mat-option> </mat-option>
@@ -75,7 +75,7 @@
</mat-option> </mat-option>
<mat-option value="Todos" > <mat-option value="Todos" >
Todos Todas
</mat-option> </mat-option>
@@ -54,15 +54,15 @@
</mat-option> </mat-option>
<mat-option value="Novos" > <mat-option value="Novos" >
Novos Novas
</mat-option> </mat-option>
<mat-option value="Lidos" > <mat-option value="Lidos" >
Lidos Lidas
</mat-option> </mat-option>
<mat-option value="Não lidos" > <mat-option value="Não lidos" >
Não lidos Não lidas
</mat-option> </mat-option>
@@ -71,7 +71,7 @@
</mat-option> </mat-option>
<mat-option value="Todos" > <mat-option value="Todos" >
Todos Todas
</mat-option> </mat-option>
@@ -23,15 +23,15 @@
</mat-option> </mat-option>
<mat-option value="Novos" > <mat-option value="Novos" >
Novos Novas
</mat-option> </mat-option>
<mat-option value="Lidos" > <mat-option value="Lidos" >
Lidos Lidas
</mat-option> </mat-option>
<mat-option value="Não lidos" > <mat-option value="Não lidos" >
Não lidos Não lidas
</mat-option> </mat-option>
@@ -41,7 +41,7 @@
<mat-option value="Todos" > <mat-option value="Todos" >
Todos Todas
</mat-option> </mat-option>
</mat-select> </mat-select>
@@ -52,15 +52,15 @@
</mat-option> </mat-option>
<mat-option value="Novos" > <mat-option value="Novos" >
Novos Novas
</mat-option> </mat-option>
<mat-option value="Lidos" > <mat-option value="Lidos" >
Lidos Lidas
</mat-option> </mat-option>
<mat-option value="Não lidos" > <mat-option value="Não lidos" >
Não lidos Não lidas
</mat-option> </mat-option>
@@ -69,7 +69,7 @@
</mat-option> </mat-option>
<mat-option value="Todos" > <mat-option value="Todos" >
Todos Todas
</mat-option> </mat-option>
@@ -57,15 +57,15 @@
</mat-option> </mat-option>
<mat-option value="Novos" > <mat-option value="Novos" >
Novos Novas
</mat-option> </mat-option>
<mat-option value="Lidos" > <mat-option value="Lidos" >
Lidos Lidas
</mat-option> </mat-option>
<mat-option value="Não lidos" > <mat-option value="Não lidos" >
Não lidos Não lidas
</mat-option> </mat-option>
@@ -74,7 +74,7 @@
</mat-option> </mat-option>
<mat-option value="Todos" > <mat-option value="Todos" >
Todos Todas
</mat-option> </mat-option>
@@ -55,15 +55,15 @@
</mat-option> </mat-option>
<mat-option value="Novos" > <mat-option value="Novos" >
Novos Novas
</mat-option> </mat-option>
<mat-option value="Lidos" > <mat-option value="Lidos" >
Lidos Lidas
</mat-option> </mat-option>
<mat-option value="Não lidos" > <mat-option value="Não lidos" >
Não lidos Não lidas
</mat-option> </mat-option>
@@ -72,7 +72,7 @@
</mat-option> </mat-option>
<mat-option value="Todos" > <mat-option value="Todos" >
Todos Todas
</mat-option> </mat-option>
@@ -56,15 +56,15 @@
</mat-option> </mat-option>
<mat-option value="Novos" > <mat-option value="Novos" >
Novos Novas
</mat-option> </mat-option>
<mat-option value="Lidos" > <mat-option value="Lidos" >
Lidos Lidas
</mat-option> </mat-option>
<mat-option value="Não lidos" > <mat-option value="Não lidos" >
Não lidos Não lidas
</mat-option> </mat-option>
<mat-option value="OverdueTasks"> <mat-option value="OverdueTasks">
@@ -72,7 +72,7 @@
</mat-option> </mat-option>
<mat-option value="Todos" > <mat-option value="Todos" >
Todos Todas
</mat-option> </mat-option>
@@ -60,15 +60,15 @@
</mat-option> </mat-option>
<mat-option value="Novos" > <mat-option value="Novos" >
Novos Novas
</mat-option> </mat-option>
<mat-option value="Lidos" > <mat-option value="Lidos" >
Lidos Lidas
</mat-option> </mat-option>
<mat-option value="Não lidos" > <mat-option value="Não lidos" >
Não lidos Não lidas
</mat-option> </mat-option>
<mat-option value="OverdueTasks"> <mat-option value="OverdueTasks">
@@ -76,7 +76,7 @@
</mat-option> </mat-option>
<mat-option value="Todos" > <mat-option value="Todos" >
Todos Todas
</mat-option> </mat-option>
</mat-select> </mat-select>
@@ -56,15 +56,15 @@
</mat-option> </mat-option>
<mat-option value="Novos" > <mat-option value="Novos" >
Novos Novas
</mat-option> </mat-option>
<mat-option value="Lidos" > <mat-option value="Lidos" >
Lidos Lidas
</mat-option> </mat-option>
<mat-option value="Não lidos" > <mat-option value="Não lidos" >
Não lidos Não lidas
</mat-option> </mat-option>
@@ -73,7 +73,7 @@
</mat-option> </mat-option>
<mat-option value="Todos" > <mat-option value="Todos" >
Todos Todas
</mat-option> </mat-option>
@@ -55,15 +55,15 @@
</mat-option> </mat-option>
<mat-option value="Novos" > <mat-option value="Novos" >
Novos Novas
</mat-option> </mat-option>
<mat-option value="Lidos" > <mat-option value="Lidos" >
Lidos Lidas
</mat-option> </mat-option>
<mat-option value="Não lidos" > <mat-option value="Não lidos" >
Não lidos Não lidas
</mat-option> </mat-option>
@@ -72,7 +72,7 @@
</mat-option> </mat-option>
<mat-option value="Todos" > <mat-option value="Todos" >
Todos Todas
</mat-option> </mat-option>
@@ -47,12 +47,9 @@ export class DespachosOptionsPage implements OnInit {
ngOnInit() { ngOnInit() {
} }
close () {
this.goBack()
}
async openTaskProcessModal(taskAction: any, task: any) { async openTaskProcessModal(taskAction: any, task: any) {
this.popoverController.dismiss();
let classs; let classs;
if( window.innerWidth <= 800){ if( window.innerWidth <= 800){
classs = 'modal modal-desktop' classs = 'modal modal-desktop'
@@ -70,18 +67,17 @@ export class DespachosOptionsPage implements OnInit {
}); });
await modal.present(); await modal.present();
modal.onDidDismiss().then( res => { modal.onDidDismiss().then( res => {
this.goBack(); // this.goBack();
}); });
} }
sendExpedienteToPending() { sendExpedienteToPending() {
const loader = this.toastService.loading() const loader = this.toastService.loading()
this.popoverController.dismiss();
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{ this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{
this.httpErrorHandle.httpsSucessMessagge('Enviar para Pendentes') this.httpErrorHandle.httpsSucessMessagge('Enviar para Pendentes')
loader.remove() loader.remove()
this.close(); this.goBack('back');
},(error)=>{ },(error)=>{
loader.remove() loader.remove()
this.httpErrorHandle.httpStatusHandle(error) this.httpErrorHandle.httpStatusHandle(error)
@@ -89,7 +85,7 @@ export class DespachosOptionsPage implements OnInit {
} }
async distartExpedientModal(){ async distartExpedientModal(){
this.popoverController.dismiss();
const modal = await this.modalController.create({ const modal = await this.modalController.create({
component: DiscartExpedientModalPage, component: DiscartExpedientModalPage,
@@ -105,14 +101,14 @@ export class DespachosOptionsPage implements OnInit {
await modal.present(); await modal.present();
modal.onDidDismiss().then(res=>{ modal.onDidDismiss().then(res=>{
if(res['data']=='close'){ if(res['data']=='close'){
this.close(); this.goBack('back');
} }
}); });
} }
async openBookMeetingModal(task: any) { async openBookMeetingModal(task: any) {
this.popoverController.dismiss();
let classs; let classs;
if( window.innerWidth <= 800){ if( window.innerWidth <= 800){
classs = 'book-meeting-modal modal modal-desktop' classs = 'book-meeting-modal modal modal-desktop'
@@ -128,11 +124,13 @@ export class DespachosOptionsPage implements OnInit {
backdropDismiss: false backdropDismiss: false
}); });
await modal.present(); await modal.present();
modal.onDidDismiss(); modal.onDidDismiss().then(() => {
this.goBack('no');
})
} }
async openDelegarModal(task: any) { async openDelegarModal(task: any) {
this.popoverController.dismiss();
let classs; let classs;
if( window.innerWidth <= 800){ if( window.innerWidth <= 800){
classs = 'book-meeting-modal modal modal-desktop' classs = 'book-meeting-modal modal modal-desktop'
@@ -152,7 +150,7 @@ export class DespachosOptionsPage implements OnInit {
if(res){ if(res){
const data = res.data; const data = res.data;
if(data == 'close') { if(data == 'close') {
this.goBack(); this.goBack('back');
} }
} }
@@ -175,7 +173,7 @@ export class DespachosOptionsPage implements OnInit {
try { try {
await this.processes.CompleteTask(body).toPromise() await this.processes.CompleteTask(body).toPromise()
this.toastService._successMessage() this.toastService._successMessage()
this.close(); this.goBack('back');
} catch (error) { } catch (error) {
if(error.status == 0) { if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão') this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
@@ -191,7 +189,7 @@ export class DespachosOptionsPage implements OnInit {
async openAddNoteModal(actionName:string) { async openAddNoteModal(actionName:string) {
this.popoverController.dismiss();
let classs; let classs;
if( window.innerWidth <= 800){ if( window.innerWidth <= 800){
classs = 'modal modal-desktop' classs = 'modal modal-desktop'
@@ -229,7 +227,7 @@ export class DespachosOptionsPage implements OnInit {
if(actionName == 'Executado') { if(actionName == 'Executado') {
await this.executado(res.data.note, docs); await this.executado(res.data.note, docs);
} }
else if(actionName == 'Arquivar'){ else if(actionName == 'Arquivar') {
await this.arquivar(res.data.note, docs); await this.arquivar(res.data.note, docs);
} }
else if(actionName == 'Gerar Diploma') { else if(actionName == 'Gerar Diploma') {
@@ -241,7 +239,7 @@ export class DespachosOptionsPage implements OnInit {
else if(actionName == 'Reexecução') { else if(actionName == 'Reexecução') {
await this.reexecutar(res.data.note, docs); await this.reexecutar(res.data.note, docs);
} }
this.goBack();
} }
}); });
} }
@@ -262,7 +260,7 @@ export class DespachosOptionsPage implements OnInit {
try { try {
await this.processes.CompleteTask(body).toPromise() await this.processes.CompleteTask(body).toPromise()
this.toastService._successMessage('Processo arquivado') this.toastService._successMessage('Processo arquivado')
this.close(); this.goBack('back');
} catch (error) { } catch (error) {
if(error.status == 0) { if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão') this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
@@ -293,7 +291,7 @@ export class DespachosOptionsPage implements OnInit {
try { try {
await this.processes.CompleteTask(body).toPromise() await this.processes.CompleteTask(body).toPromise()
this.close(); this.goBack('back');
this.toastService._successMessage() this.toastService._successMessage()
} catch(error) { } catch(error) {
if(error.status == 0) { if(error.status == 0) {
@@ -326,7 +324,7 @@ export class DespachosOptionsPage implements OnInit {
try { try {
await this.processes.CompleteTask(body).toPromise() await this.processes.CompleteTask(body).toPromise()
this.toastService._successMessage() this.toastService._successMessage()
this.close(); this.goBack('back');
} catch (error) { } catch (error) {
if(error.status == 0) { if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão') this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
@@ -340,8 +338,8 @@ export class DespachosOptionsPage implements OnInit {
} }
goBack() { goBack(params) {
this.RouteService.goBack(); this.popoverController.dismiss()
} }
} }
@@ -303,7 +303,7 @@ export class DespachosPrOptionsPage implements OnInit {
try { try {
await this.processes.CompleteTask(body).toPromise() await this.processes.CompleteTask(body).toPromise()
this.httpErroHandle.httpsSucessMessagge('Concluir') this.httpErroHandle.httpsSucessMessagge('Concluir Despacho')
this.close(); this.close();
} catch (error) { } catch (error) {
if(error.status == 0) { if(error.status == 0) {
@@ -87,54 +87,7 @@ export class OptsExpedientePage implements OnInit {
} }
goBack() { goBack() {
if(this.task.Status == "Pending" && this.caller != 'events') {
if (window.innerWidth <= 800) {
this.router.navigate(['/home/gabinete-digital/pendentes']);
}
else {
let navigationExtras: NavigationExtras = {
queryParams: {
"pendentes": true,
}
}
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
}
}
else {
this.RouteService.goBack() this.RouteService.goBack()
/* this.activatedRoute.paramMap.subscribe(params => {
switch (params["params"].caller) {
case 'events':
this.router.navigate(['/home',params["params"].caller]);
break;
case 'gabinete-digital':
let navigationExtras: NavigationExtras = {
queryParams: {
"expedientes": true,
}
}
if( window.innerWidth < 801) {
this.router.navigate(['/home/gabinete-digital/expediente']);
} else {
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
}
break;
}
}); */
}
} }
attachDocument(){ attachDocument(){
+6 -6
View File
@@ -1,12 +1,12 @@
export let versionData = { export let versionData = {
"shortSHA": "6b8e4a600", "shortSHA": "ac575c600",
"SHA": "6b8e4a600bb9d03d98cde3b611a4698dd2be69c7", "SHA": "ac575c6001c8ce61b3097ad45c1e83158ae56eb5",
"branch": "feature/gabinete-search", "branch": "feature/gabinete-search",
"lastCommitAuthor": "'Eudes Inácio'", "lastCommitAuthor": "'Eudes Inácio'",
"lastCommitTime": "'Sat Jun 10 10:55:30 2023 +0100'", "lastCommitTime": "'Sat Jun 10 17:04:09 2023 +0100'",
"lastCommitMessage": "Pesquisa avançada fixed", "lastCommitMessage": "Multiples messages when evento to aprove where editedd",
"lastCommitNumber": "4972", "lastCommitNumber": "4974",
"change": "", "change": "",
"changeStatus": "On branch feature/gabinete-search\nYour branch and 'origin/feature/gabinete-search' have diverged,\nand have 13 and 6 different commits each, respectively.\n (use \"git pull\" to merge the remote branch into yours)\n\nAll conflicts fixed but you are still merging.\n (use \"git commit\" to conclude merge)\n\nChanges to be committed:\n\tmodified: src/app/models/beast-orm.ts\n\tmodified: src/app/pages/events/events.page.html\n\tmodified: src/app/pages/search/search.page.scss\n\tmodified: src/app/pages/search/search.page.ts\n\tmodified: src/app/shared/agenda/edit-event-to-approve/edit-event-to-approve.page.ts", "changeStatus": "On branch feature/gabinete-search\nYour branch and 'origin/feature/gabinete-search' have diverged,\nand have 14 and 5 different commits each, respectively.\n (use \"git pull\" to merge the remote branch into yours)\n\nAll conflicts fixed but you are still merging.\n (use \"git commit\" to conclude merge)\n\nChanges to be committed:\n\tmodified: .gitignore\n\tmodified: src/app/home/home.page.ts\n\tmodified: src/app/modals/create-process/create-process.page.ts\n\tmodified: src/app/models/beast-orm.ts\n\tmodified: src/app/pages/agenda/agenda.page.html\n\tmodified: src/app/pages/agenda/view-event/view-event.page.html\n\tmodified: src/app/pages/events/events.page.html\n\tmodified: src/app/pages/events/events.page.scss\n\tmodified: src/app/pages/events/events.page.ts\n\tmodified: src/app/pages/gabinete-digital/despachos-pr/despachos-pr.page.ts\n\tmodified: src/app/pages/gabinete-digital/despachos/despacho/despacho.page.ts\n\tmodified: src/app/pages/gabinete-digital/despachos/despachos.page.html\n\tmodified: src/app/pages/gabinete-digital/despachos/despachos.page.ts\n\tmodified: src/app/pages/gabinete-digital/diplomas-assinar/diplomas-assinar.page.html\n\tmodified: src/app/pages/gabinete-digital/diplomas-assinar/diplomas-assinar.page.ts\n\tmodified: src/app/pages/gabinete-digital/diplomas-gerar/diplomas-gerar.page.ts\n\tmodified: src/app/pages/gabinete-digital/diplomas/diploma/diploma.page.ts\n\tmodified: src/app/pages/gabinete-digital/diplomas/diplomas.page.ts\n\tmodified: src/app/pages/gabinete-digital/event-list/approve-event-modal/approve-event-modal.page.ts\n\tmodified: src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.ts\n\tmodified: src/app/pages/gabinete-digital/event-list/event-list.page.html\n\tmodified: src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.ts\n\tmodified: src/app/pages/gabinete-digital/expediente/expediente.page.html\n\tmodified: src/app/pages/gabinete-digital/expediente/expediente.page.ts\n\tmodified: src/app/pages/gabinete-digital/expedientes-pr/expediente-pr/expediente-pr.page.ts\n\tmodified: src/app/pages/gabinete-digital/expedientes-pr/expedientes-pr.page.ts\n\tmodified: src/app/pages/gabinete-digital/gabinete-digital.page.html\n\tmodified: src/app/pages/gabinete-digital/gabinete-digital.page.ts\n\tmodified: src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts\n\tmodified: src/app/pages/gabinete-digital/pedidos/pedidos.page.html\n\tmodified: src/app/pages/gabinete-digital/pedidos/pedidos.page.ts\n\tmodified: src/app/pages/gabinete-digital/pendentes/pendentes.page.ts\n\tmodified: src/app/services/events.service.ts\n\tmodified: src/app/services/processes.service.ts\n\tmodified: src/app/services/task.service.ts\n\tmodified: src/app/shared/agenda/approve-event/approve-event.page.ts\n\tmodified: src/app/shared/agenda/edit-event-to-approve/edit-event-to-approve.page.ts\n\tmodified: src/app/shared/gabinete-digital/all-processes/all-processes.page.html\n\tmodified: src/app/shared/gabinete-digital/despachos/despachos.page.html\n\tmodified: src/app/shared/gabinete-digital/diplomas-assinar/diplomas-assinar.page.html\n\tmodified: src/app/shared/gabinete-digital/diplomas-gerar/diplomas-gerar.page.html\n\tmodified: src/app/shared/gabinete-digital/diplomas/diplomas.page.html\n\tmodified: src/app/shared/gabinete-digital/events-to-approve/events-to-approve.page.html\n\tmodified: src/app/shared/gabinete-digital/expedientes-pr/expedientes-pr.page.html\n\tmodified: src/app/shared/gabinete-digital/expedients/expedients.page.html\n\tmodified: src/app/shared/gabinete-digital/generic/task-list-header/task-list-header.page.html\n\tmodified: src/app/shared/gabinete-digital/pedidos/pedidos.page.html\n\tmodified: src/app/shared/gabinete-digital/pendentes/pendentes.page.html\n\tmodified: src/app/shared/popover/despachos-options/despachos-options.page.ts\n\tmodified: src/app/shared/popover/despachos-pr-options/despachos-pr-options.page.ts\n\tmodified: src/app/shared/popover/opts-expediente/opts-expediente.page.ts",
"changeAuthor": "eudes.inacio" "changeAuthor": "eudes.inacio"
} }