This commit is contained in:
Peter Maquiran
2022-04-06 14:55:14 +01:00
44 changed files with 430 additions and 292 deletions
+6 -1
View File
@@ -2,6 +2,7 @@ import { Injectable } from '@angular/core';
import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, UrlTree, Router } from '@angular/router'; import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, UrlTree, Router } from '@angular/router';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { AuthService } from '../services/auth.service'; import { AuthService } from '../services/auth.service';
import { PermissionService } from '../services/permission.service';
import { LocalstoreService } from '../store/localstore.service'; import { LocalstoreService } from '../store/localstore.service';
import { SessionStore } from '../store/session.service'; import { SessionStore } from '../store/session.service';
@@ -13,6 +14,7 @@ export class AuthGuard implements CanActivate {
private router:Router, private router:Router,
private localstoreService: LocalstoreService, private localstoreService: LocalstoreService,
private authService: AuthService, private authService: AuthService,
public p: PermissionService,
){} ){}
canActivate( canActivate(
@@ -29,7 +31,10 @@ export class AuthGuard implements CanActivate {
this.router.navigate(['/']); this.router.navigate(['/']);
return false return false
} else { } else {
this.authService.loginChat(); if(this.p.userPermission(this.p.permissionList.Chat.access) == true){
this.authService.loginChat();
}
return true; return true;
} }
} }
+1 -1
View File
@@ -50,7 +50,7 @@ export class AddNotePage implements OnInit {
component: SearchPage, component: SearchPage,
cssClass: 'modal-width-100-width-background modal', cssClass: 'modal-width-100-width-background modal',
componentProps: { componentProps: {
type: 'AccoesPresidenciais & ArquivoDespachoElect', typety: 'AccoesPresidenciais & ArquivoDespachoElect',
showSearchInput: true, showSearchInput: true,
select: true select: true
} }
@@ -1,9 +1,9 @@
export class ActionsPermission{ export class ActionsPermission{
access = 534; access = 534;
create = 535; create = 535;
remove = 536; delete = 536;
edit = 537; edit = 537;
createPost = 538; createPost = 538;
removePost = 539; deletePost = 539;
editPost = 540; editPost = 540;
} }
+44 -40
View File
@@ -1,42 +1,46 @@
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router'; import { Routes, RouterModule } from '@angular/router';
import { AgendaPage } from './agenda.page'; import { AgendaPage } from './agenda.page';
const routes: Routes = [ const routes: Routes = [
{ {
path: '', path: '',
component: AgendaPage component: AgendaPage
}, },
{ {
path: 'approve-event-modal', path: 'approve-event-modal',
loadChildren: () => import('../gabinete-digital/event-list/approve-event-modal/approve-event-modal.module').then( m => m.ApproveEventModalPageModule) loadChildren: () => import('../gabinete-digital/event-list/approve-event-modal/approve-event-modal.module').then( m => m.ApproveEventModalPageModule)
}, },
{ {
path: 'event-actions-popover', path: 'event-actions-popover',
loadChildren: () => import('./event-actions-popover/event-actions-popover.module').then( m => m.EventActionsPopoverPageModule) loadChildren: () => import('./event-actions-popover/event-actions-popover.module').then( m => m.EventActionsPopoverPageModule)
}, },
{ {
path: 'emend-message-modal', path: 'emend-message-modal',
loadChildren: () => import('./emend-message-modal/emend-message-modal.module').then( m => m.EmendMessageModalPageModule) loadChildren: () => import('./emend-message-modal/emend-message-modal.module').then( m => m.EmendMessageModalPageModule)
}, },
{ {
path: 'new-event', path: 'new-event',
loadChildren: () => import('./new-event/new-event.module').then( m => m.NewEventPageModule) loadChildren: () => import('./new-event/new-event.module').then( m => m.NewEventPageModule)
}, },
{ {
path: 'edit-event', path: 'edit-event',
loadChildren: () => import('./edit-event/edit-event.module').then( m => m.EditEventPageModule) loadChildren: () => import('./edit-event/edit-event.module').then( m => m.EditEventPageModule)
}, },
{ {
path: 'view-event', path: 'view-event',
loadChildren: () => import('./view-event/view-event.module').then( m => m.ViewEventPageModule) loadChildren: () => import('./view-event/view-event.module').then( m => m.ViewEventPageModule)
},
{
path: 'evandre',
loadChildren: () => import('./evandre/evandre.module').then( m => m.EvandrePageModule) loadChildren: () => import('./evandre/evandre.module').then( m => m.EvandrePageModule)
} }
];
@NgModule({ ];
imports: [RouterModule.forChild(routes)],
exports: [RouterModule], @NgModule({
}) imports: [RouterModule.forChild(routes)],
export class AgendaPageRoutingModule {} exports: [RouterModule],
})
@@ -0,0 +1,17 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { EvandrePage } from './evandre.page';
const routes: Routes = [
{
path: '',
component: EvandrePage
}
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
})
export class EvandrePageRoutingModule {}
@@ -0,0 +1,20 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { IonicModule } from '@ionic/angular';
import { EvandrePageRoutingModule } from './evandre-routing.module';
import { EvandrePage } from './evandre.page';
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
EvandrePageRoutingModule
],
declarations: [EvandrePage]
})
export class EvandrePageModule {}
@@ -0,0 +1,9 @@
<ion-header>
<ion-toolbar>
<ion-title>evandre</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
</ion-content>
@@ -0,0 +1,24 @@
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { IonicModule } from '@ionic/angular';
import { EvandrePage } from './evandre.page';
describe('EvandrePage', () => {
let component: EvandrePage;
let fixture: ComponentFixture<EvandrePage>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ EvandrePage ],
imports: [IonicModule.forRoot()]
}).compileComponents();
fixture = TestBed.createComponent(EvandrePage);
component = fixture.componentInstance;
fixture.detectChanges();
}));
it('should create', () => {
expect(component).toBeTruthy();
});
});
@@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-evandre',
templateUrl: './evandre.page.html',
styleUrls: ['./evandre.page.scss'],
})
export class EvandrePage implements OnInit {
constructor() { }
ngOnInit() {
}
}
@@ -79,25 +79,25 @@
<div *ngIf="task" class="aside-right flex-column height-100 overflow-y-auto"> <div *ngIf="task" class="aside-right flex-column height-100 overflow-y-auto">
<div class="buttons px-20" *ngIf="task.activityInstanceName == 'Tarefa de Despacho'"> <div class="buttons px-20" *ngIf="task.activityInstanceName == 'Tarefa de Despacho'">
<div class="option-desc"> <div>Responder ao PR</div> </div> <div *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" class="option-desc"> <div>Responder ao PR</div> </div>
<button (click)="openAddNoteModal('Executado')" class="btn-cancel mb-0" style="margin-bottom: 0px !important;" shape="round" >Executado</button> <button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="openAddNoteModal('Executado')" class="btn-cancel mb-0" style="margin-bottom: 0px !important;" shape="round" >Executado</button>
<!-- <div class="solid"></div> --> <!-- <div class="solid"></div> -->
<div class="option-desc">Reencaminhar para Área jurídica</div> <div *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" class="option-desc">Reencaminhar para Área jurídica</div>
<button (click)="openAddNoteModal('Gerar Diploma')" class="btn-cancel" style="margin-bottom: 0px !important;" shape="round" >Gerar Diploma </button> <button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="openAddNoteModal('Gerar Diploma')" class="btn-cancel" style="margin-bottom: 0px !important;" shape="round" >Gerar Diploma </button>
<!-- <div class="solid"></div> --> <!-- <div class="solid"></div> -->
<div class="option-desc">Outras opções</div> <div *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" class="option-desc">Outras opções</div>
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button> <button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button> <button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button> <button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button> <button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
<!-- <div class="solid"></div> --> <!-- <div class="solid"></div> -->
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button> <button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks]) && task.Status != 'Pending'" (click)="sendExpedienteToPending()" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
</div> </div>
<div class="buttons px-20" *ngIf="task.activityInstanceName == 'Concluir Despacho'"> <div class="buttons px-20" *ngIf="task.activityInstanceName == 'Concluir Despacho'">
<button (click)="openAddNoteModal('Concluido')" class="btn-cancel" shape="round" >Marcar como Concluído</button> <button *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])" (click)="openAddNoteModal('Concluido')" class="btn-cancel" shape="round" >Marcar como Concluído</button>
<button (click)="openAddNoteModal('Reexecução')" class="btn-cancel" shape="round" >Enviar para Reexecução</button> <button *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])" (click)="openAddNoteModal('Reexecução')" class="btn-cancel" shape="round" >Enviar para Reexecução</button>
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button> <button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button> <button *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks]) && task.Status != 'Pending'" (click)="sendExpedienteToPending()" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
</div> </div>
</div> </div>
@@ -24,6 +24,7 @@ import { SqliteService } from 'src/app/services/sqlite.service';
import { BackgroundService } from 'src/app/services/background.service'; import { BackgroundService } from 'src/app/services/background.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'; import { RouteService } from 'src/app/services/route.service';
import { PermissionService } from 'src/app/services/permission.service';
@Component({ @Component({
selector: 'app-despacho-pr', selector: 'app-despacho-pr',
@@ -45,7 +46,8 @@ export class DespachoPrPage implements OnInit {
intervenientes: any; intervenientes: any;
cc: any = []; cc: any = [];
constructor(private activateRoute: ActivatedRoute, constructor(
private activateRoute: ActivatedRoute,
private processes: ProcessesService, private processes: ProcessesService,
private iab: InAppBrowser, private iab: InAppBrowser,
private attachmentsService: AttachmentsService, private attachmentsService: AttachmentsService,
@@ -62,7 +64,8 @@ export class DespachoPrPage implements OnInit {
private backgroundservice: BackgroundService, private backgroundservice: BackgroundService,
private platform: Platform, private platform: Platform,
public ThemeService: ThemeService, public ThemeService: ThemeService,
private RouteService: RouteService private RouteService: RouteService,
public p: PermissionService,
) { ) {
this.activatedRoute.paramMap.subscribe(params => { this.activatedRoute.paramMap.subscribe(params => {
if (params["params"].SerialNumber) { if (params["params"].SerialNumber) {
@@ -14,7 +14,7 @@
<div class="middle d-flex align-center flex-grow-1"> <div class="middle d-flex align-center flex-grow-1">
<ion-label class="title">{{ task.Folio}}</ion-label> <ion-label class="title">{{ task.Folio}}</ion-label>
</div> </div>
<div class="div-icon" (click)="openOptions()"> <div class="div-icon" (click)="openOptions()" *ngIf="p.userPermission([p.permissionList.Agenda.access])">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-menu.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-menu.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-menu.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-menu.svg"></ion-icon>
</div> </div>
@@ -96,7 +96,7 @@
<div class="solid"></div> <div class="solid"></div>
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button> <button (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button> <button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button> <button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
<div class="solid"></div> <div class="solid"></div>
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button> <button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
</div> </div>
@@ -106,7 +106,7 @@
<div class="solid"></div> <div class="solid"></div>
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button> <button (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button> <button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button> <button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
<div class="solid"></div> <div class="solid"></div>
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button> <button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
</div> </div>
@@ -115,7 +115,7 @@
<div class="solid"></div> <div class="solid"></div>
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button> <button (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button> <button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button> <button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
<div class="solid"></div> <div class="solid"></div>
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button> <button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
<button (click)="openAddNoteModal('Reexecução')" class="btn-cancel" shape="round" >Enviar para Reexecução</button> <button (click)="openAddNoteModal('Reexecução')" class="btn-cancel" shape="round" >Enviar para Reexecução</button>
@@ -63,7 +63,7 @@ export class DespachoPage implements OnInit {
private sqliteservice: SqliteService, private sqliteservice: SqliteService,
private platform: Platform, private platform: Platform,
private backgroundservice: BackgroundService, private backgroundservice: BackgroundService,
public ThemeService: ThemeService public ThemeService: ThemeService,
) { ) {
@@ -90,26 +90,26 @@
</div> </div>
</div> </div>
<div *ngIf="task && !p.userRole(['PR'])" class="aside-right flex-column height-100 overflow-y-auto"> <div class="aside-right flex-column height-100 overflow-y-auto">
<div class="buttons"> <div class="buttons">
<div class="option-desc"> <div>Enviar para o PR</div> </div> <div *ngIf="!p.userPermission([p.permissionList.Gabinete.pr_tasks])" class="option-desc"> <div>Enviar para o PR</div> </div>
<button (click)="openAddNoteModal('Aprovar')" class="btn-cancel" shape="round" >Avaliação Superior</button> <button *ngIf="!p.userPermission([p.permissionList.Gabinete.pr_tasks])" (click)="openAddNoteModal('Aprovar')" class="btn-cancel" shape="round" >Avaliação Superior</button>
<div class="option-desc"> <div>Solicitar revisão</div> </div> <div *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" class="option-desc"> <div>Solicitar revisão</div> </div>
<button (click)="openAddNoteModal('Revisão')" class="btn-cancel" shape="round" >Mandar para Revisão</button> <button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="openAddNoteModal('Revisão')" class="btn-cancel" shape="round" >Mandar para Revisão</button>
<div class="option-desc"> <div>Outras opções</div> </div> <div *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks]) || p.userPermission([p.permissionList.Gabinete.pr_tasks])" class="option-desc"> <div>Outras opções</div> </div>
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button> <button (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button> <button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
<button *ngIf="!p.userRole(['PR'])" (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button> <button (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button> <button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
<button *ngIf="!p.userRole(['PR'])" (click)="attachDocument()" class="btn-cancel" shape="round" >Anexar Documentos</button> <button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="attachDocument()" class="btn-cancel" shape="round" >Anexar Documentos</button>
<button (click)="distartExpedientModal('descartar')" class="btn-cancel" shape="round" >Descartar</button> <button (click)="distartExpedientModal('descartar')" class="btn-cancel" shape="round" >Descartar</button>
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" full class="btn-cancel" shape="round" >Enviar para pendentes</button> <button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" full class="btn-cancel" shape="round" >Enviar para pendentes</button>
<button (click)="openNewGroupPage()" class="btn-cancel" shape="round" >Iniciar Conversa</button> <button *ngIf="p.userPermission([p.permissionList.Chat.access])" (click)="openNewGroupPage()" class="btn-cancel" shape="round" >Iniciar Conversa</button>
<div class="solid"></div> <div class="solid"></div>
</div> </div>
</div> </div>
<div *ngIf="task && p.userRole(['PR'])" class="aside-right flex-column height-100 overflow-y-auto"> <!-- <div *ngIf="task && p.userRole(['PR'])" class="aside-right flex-column height-100 overflow-y-auto">
<div class="buttons"> <div class="buttons">
<button (click)="openExpedientActionsModal('0', fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button> <button (click)="openExpedientActionsModal('0', fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
@@ -123,7 +123,7 @@
<button hidden class="btn-cancel" shape="round" >Delegar</button> <button hidden class="btn-cancel" shape="round" >Delegar</button>
</div> </div>
</div> </div> -->
</div> </div>
</ion-content> </ion-content>
@@ -101,7 +101,7 @@
<p class="text-center exp-card-content">{{ allProcessesList.length }} <span class="title1">Documentos</span></p> <p class="text-center exp-card-content">{{ allProcessesList.length }} <span class="title1">Documentos</span></p>
</div> </div>
<div (click)="openEventsToApprovePage();selectedElement='approval'" [class.active]="selectedElement == 'approval'" class="box-hover exp-card d-flex flex-column" *ngIf="loggeduser.Profile == 'MDGPR'" > <div *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="openEventsToApprovePage();selectedElement='approval'" [class.active]="selectedElement == 'approval'" class="box-hover exp-card d-flex flex-column">
<div class="d-flex justify-center"> <div class="d-flex justify-center">
<ion-icon src="assets/images/icons-agenda.svg"></ion-icon> <ion-icon src="assets/images/icons-agenda.svg"></ion-icon>
</div> </div>
@@ -128,24 +128,24 @@
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement == 'Pending'" src="assets/images/theme/gov/icons-expediente-pendente-hover.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement == 'Pending'" src="assets/images/theme/gov/icons-expediente-pendente-hover.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' && selectedElement != 'Pending'" src="assets/images/theme/gov/icons-expediente-pendente.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' && selectedElement != 'Pending'" src="assets/images/theme/gov/icons-expediente-pendente.svg"></ion-icon>
</div> </div>
<p *ngIf="loggeduser.Profile == 'MDGPR'" class="text-center exp-card-title ">Pendentes</p> <p *ngIf="!p.userPermission([p.permissionList.Gabinete.pr_tasks])" class="text-center exp-card-title ">Pendentes</p>
<p *ngIf="loggeduser.Profile == 'PR'" class="text-center exp-card-title ">Meus Pendentes</p> <p *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])" class="text-center exp-card-title ">Meus Pendentes</p>
<p class="text-center exp-card-content"><span class="number">{{pendentesstore.count}} </span> <span class="title1">Documentos</span></p> <p class="text-center exp-card-content"><span class="number">{{pendentesstore.count}} </span> <span class="title1">Documentos</span></p>
</div> </div>
<div *ngIf="loggeduser.Profile == 'PR'" (click)="openDespachosPrPage(); selectedElement='DispatchesPr'" [class.active]="selectedElement == 'DispatchesPr'" class="box-hover exp-card d-md-flex flex-column justify-center" > <div *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks]) || p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="openDespachosPrPage(); selectedElement='DispatchesPr'" [class.active]="selectedElement == 'DispatchesPr'" class="box-hover exp-card d-md-flex flex-column justify-center" >
<div class="d-flex justify-center"> <div class="d-flex justify-center">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-despachos-presidente.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-despachos-presidente.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement != 'DispatchesPr'" src="assets/images/theme/gov/icons-despachos-presidente.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement != 'DispatchesPr'" src="assets/images/theme/gov/icons-despachos-presidente.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement == 'DispatchesPr'" src="assets/images/theme/gov/icons-despachos-presidente-hover.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement == 'DispatchesPr'" src="assets/images/theme/gov/icons-despachos-presidente-hover.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' && selectedElement != 'DispatchesPr'" src="assets/images/theme/gov/icons-despachos-presidente.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' && selectedElement != 'DispatchesPr'" src="assets/images/theme/gov/icons-despachos-presidente.svg"></ion-icon>
</div> </div>
<p class="text-center exp-card-title " *ngIf="loggeduser.Profile == 'MDGPR'">Despacho do Presidente da República</p> <p class="text-center exp-card-title " *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])">Despacho do Presidente da República</p>
<p class="text-center exp-card-title " *ngIf="loggeduser.Profile == 'PR'">Despachos criados por mim</p> <p class="text-center exp-card-title " *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])">Despachos criados por mim</p>
<p class="text-center exp-card-content">{{ despachoprstore.count }} <span class="title1">Documentos</span> </p> <p class="text-center exp-card-content">{{ despachoprstore.count }} <span class="title1">Documentos</span> </p>
</div> </div>
<div [class.active]="selectedElement == 'Dispatches'" class="box-hover exp-card d-flex flex-column justify-center" (click)="openDespachosPage(); selectedElement='Dispatches'" *ngIf="loggeduser.Profile == 'MDGPR'"> <div *ngIf="!p.userPermission([p.permissionList.Gabinete.pr_tasks])" [class.active]="selectedElement == 'Dispatches'" class="box-hover exp-card d-flex flex-column justify-center" (click)="openDespachosPage(); selectedElement='Dispatches'">
<div class="d-flex justify-center"> <div class="d-flex justify-center">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-despachos-presidente.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-despachos-presidente.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement != 'Dispatches'" src="assets/images/theme/gov/icons-despachos-presidente.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement != 'Dispatches'" src="assets/images/theme/gov/icons-despachos-presidente.svg"></ion-icon>
@@ -163,8 +163,8 @@
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement == 'RequestsForOpinion'" src="assets/images/theme/gov/icons-expediente-parecer-hover.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement == 'RequestsForOpinion'" src="assets/images/theme/gov/icons-expediente-parecer-hover.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' && selectedElement != 'RequestsForOpinion' " src="assets/images/theme/gov/icons-expediente-parecer.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' && selectedElement != 'RequestsForOpinion' " src="assets/images/theme/gov/icons-expediente-parecer.svg"></ion-icon>
</div> </div>
<p *ngIf="loggeduser.Profile == 'MDGPR'" class="text-center exp-card-title ">Pedidos de Parecer</p> <p *ngIf="!p.userPermission([p.permissionList.Gabinete.pr_tasks])" class="text-center exp-card-title ">Pedidos de Parecer</p>
<p *ngIf="loggeduser.Profile == 'PR'" class="text-center exp-card-title ">Pedidos de Parecer solicitados por mim</p> <p *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])" class="text-center exp-card-title ">Pedidos de Parecer solicitados por mim</p>
<p class="text-center exp-card-content">{{pedidosstore.countparecer}} <span class="title1">Documentos</span></p> <p class="text-center exp-card-content">{{pedidosstore.countparecer}} <span class="title1">Documentos</span></p>
</div> </div>
@@ -193,7 +193,7 @@
</div> </div>
</div> --> </div> -->
<div *ngIf="loggeduser.Profile == 'MDGPR'" (click)="openDespachosPrPage(); selectedElement='showDespachosPr'" [class.active]="selectedElement == 'showDespachosPr'" class="box-hover exp-card-long width-100 d-flex flex-column justify-center"> <div *ngIf="p.userPermission([p.permissionList.Gabinete.md_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"> <div class="center-div">
<div class="exp-card-icon"> <div class="exp-card-icon">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-despachos-presidente.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-despachos-presidente.svg"></ion-icon>
@@ -208,31 +208,31 @@
</div> </div>
</div> </div>
<div *ngIf="loggeduser.Profile == 'MDGPR'" (click)="openDiplomasPage('validar'); selectedElement='DiplomasPorValidar'" [class.active]="selectedElement == 'DiplomasPorValidar'" class="box-hover exp-card d-flex flex-column justify-center"> <div *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="openDiplomasPage('validar'); selectedElement='DiplomasPorValidar'" [class.active]="selectedElement == 'DiplomasPorValidar'" class="box-hover exp-card d-flex flex-column justify-center">
<div class="d-flex justify-center"> <div class="d-flex justify-center">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-expediente-diploma.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-expediente-diploma.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement != 'DiplomasPorValidar' " src="assets/images/theme/gov/icons-expediente-diploma.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement != 'DiplomasPorValidar' " src="assets/images/theme/gov/icons-expediente-diploma.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement == 'DiplomasPorValidar' " src="assets/images/theme/gov/icons-expediente-diploma-hover.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement == 'DiplomasPorValidar' " src="assets/images/theme/gov/icons-expediente-diploma-hover.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' && selectedElement != 'DiplomasPorValidar' " src="assets/images/theme/gov/icons-expediente-diploma.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' && selectedElement != 'DiplomasPorValidar' " src="assets/images/theme/gov/icons-expediente-diploma.svg"></ion-icon>
</div> </div>
<p class="text-center exp-card-title " *ngIf="loggeduser.Profile == 'MDGPR' ">Diplomas por Validar</p> <p class="text-center exp-card-title " *ngIf="!p.userPermission([p.permissionList.Gabinete.pr_tasks])">Diplomas por Validar</p>
<p class="text-center exp-card-title " *ngIf="loggeduser.Profile == 'PR'">Diplomas por Assinar</p> <p class="text-center exp-card-title " *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])">Diplomas por Assinar</p>
<p class="text-center exp-card-content">{{ deplomasStore.deplomasReviewCount }} <span class="title1">Documentos</span> </p> <p class="text-center exp-card-content">{{ deplomasStore.deplomasReviewCount }} <span class="title1">Documentos</span> </p>
</div> </div>
<div *ngIf="loggeduser.Profile == 'MDGPR'" (click)="openDiplomasPage('assinados'); selectedElement='DiplomasAssinados'" [class.active]="selectedElement == 'DiplomasAssinados'" class="box-hover exp-card d-flex flex-column justify-center"> <div (click)="openDiplomasPage('assinados'); selectedElement='DiplomasAssinados'" [class.active]="selectedElement == 'DiplomasAssinados'" class="box-hover exp-card d-flex flex-column justify-center">
<div class="d-flex justify-center"> <div class="d-flex justify-center">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-diplomas-assinados-presidente.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-diplomas-assinados-presidente.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement != 'DiplomasAssinados'" src="assets/images/theme/gov/icons-diplomas-assinados-presidente.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement != 'DiplomasAssinados'" src="assets/images/theme/gov/icons-diplomas-assinados-presidente.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement == 'DiplomasAssinados'" src="assets/images/theme/gov/icons-diplomas-assinados-presidente-hover.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement == 'DiplomasAssinados'" src="assets/images/theme/gov/icons-diplomas-assinados-presidente-hover.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' && selectedElement != 'DiplomasAssinados'" src="assets/images/theme/gov/icons-diplomas-assinados-presidente.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' && selectedElement != 'DiplomasAssinados'" src="assets/images/theme/gov/icons-diplomas-assinados-presidente.svg"></ion-icon>
</div> </div>
<p class="text-center exp-card-title " *ngIf="loggeduser.Profile == 'MDGPR'">Diplomas assinados PR</p> <p class="text-center exp-card-title " *ngIf="!p.userPermission([p.permissionList.Gabinete.pr_tasks])">Diplomas assinados PR</p>
<p class="text-center exp-card-title " *ngIf="loggeduser.Profile == 'PR'" >Diplomas</p> <p class="text-center exp-card-title " *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])" >Diplomas</p>
<p class="text-center exp-card-content">{{ deplomasStore.countDiplomasAssinadoListCount }} <span class="title1">Documentos</span></p> <p class="text-center exp-card-content">{{ deplomasStore.countDiplomasAssinadoListCount }} <span class="title1">Documentos</span></p>
</div> </div>
<div *ngIf="loggeduser.Profile == 'PR'" (click)="openDiplomasAssinarPage(); selectedElement='DiplomasAssinar'" [class.active]="selectedElement == 'DiplomasAssinar'" class="box-hover exp-card d-flex flex-column justify-center"> <div *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])" (click)="openDiplomasAssinarPage(); selectedElement='DiplomasAssinar'" [class.active]="selectedElement == 'DiplomasAssinar'" class="box-hover exp-card d-flex flex-column justify-center">
<div class="d-flex justify-center"> <div class="d-flex justify-center">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-expediente-diploma.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-expediente-diploma.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement != 'DiplomasAssinar' " src="assets/images/theme/gov/icons-expediente-diploma.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement != 'DiplomasAssinar' " src="assets/images/theme/gov/icons-expediente-diploma.svg"></ion-icon>
@@ -128,7 +128,6 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
private activatedRoute: ActivatedRoute, private activatedRoute: ActivatedRoute,
private router: Router, private router: Router,
authService: AuthService, authService: AuthService,
public p: PermissionService,
public waitForDomService: WaitForDomService, public waitForDomService: WaitForDomService,
//private notificationsService: NotificationsService, //private notificationsService: NotificationsService,
private despachoRule: DespachoService, private despachoRule: DespachoService,
@@ -139,7 +138,8 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
public ThemeService: ThemeService, public ThemeService: ThemeService,
private sortService: SortService, private sortService: SortService,
private dataService: DataService, private dataService: DataService,
private storage: Storage private storage: Storage,
public p: PermissionService,
) { ) {
this.loggeduser = authService.ValidatedUser; this.loggeduser = authService.ValidatedUser;
@@ -89,7 +89,7 @@
<button *ngIf="p.userRole(['MDGPR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button> <button *ngIf="p.userRole(['MDGPR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
<button *ngIf="p.userRole(['PR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button> <button *ngIf="p.userRole(['PR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
<button *ngIf="loggeduser.Profile == 'MDGPR'" (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button> <button *ngIf="loggeduser.Profile == 'MDGPR'" (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button> <button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button> <button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
</div> </div>
<div class="buttons" *ngIf="task.activityInstanceName == 'Reapreciar Deferimento'"> <div class="buttons" *ngIf="task.activityInstanceName == 'Reapreciar Deferimento'">
@@ -99,7 +99,7 @@
<button *ngIf="p.userRole(['MDGPR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button> <button *ngIf="p.userRole(['MDGPR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
<button *ngIf="p.userRole(['PR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button> <button *ngIf="p.userRole(['PR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
<button *ngIf="loggeduser.Profile == 'MDGPR'" (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button> <button *ngIf="loggeduser.Profile == 'MDGPR'" (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button> <button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button> <button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
</div> </div>
<div class="buttons" *ngIf="task.activityInstanceName == 'Concluir Deferimento'"> <div class="buttons" *ngIf="task.activityInstanceName == 'Concluir Deferimento'">
@@ -110,14 +110,14 @@
<button *ngIf="p.userRole(['PR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button> <button *ngIf="p.userRole(['PR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
<button hidden (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button> <button hidden (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
<button (click)="openAddNoteModal('Solicitar Reapreciação')" class="btn-cancel" shape="round" >Solicitar Reapreciação</button> <button (click)="openAddNoteModal('Solicitar Reapreciação')" class="btn-cancel" shape="round" >Solicitar Reapreciação</button>
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button> <button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button> <button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
</div> </div>
</div> </div>
<div *ngIf="task.WorkflowName == 'Pedido de Parecer' || task.WorkflowName == 'Pedido de Parecer do Presidente'"> <div *ngIf="task.WorkflowName == 'Pedido de Parecer' || task.WorkflowName == 'Pedido de Parecer do Presidente'">
<div class="buttons" *ngIf="task.activityInstanceName == 'Tarefa de Parecer'"> <div class="buttons" *ngIf="task.activityInstanceName == 'Tarefa de Parecer'">
<button (click)="openDarParecer(task)" class="btn-cancel" shape="round" >Dar o meu Parecer</button> <button (click)="openDarParecer(task)" class="btn-cancel" shape="round" >Dar o meu Parecer</button>
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button> <button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
<button *ngIf="task.WorkflowName == 'Pedido de Parecer do Presidente'" (click)="openForwardModal(task)" class="btn-cancel" shape="round" >Reencaminhar</button> <button *ngIf="task.WorkflowName == 'Pedido de Parecer do Presidente'" (click)="openForwardModal(task)" class="btn-cancel" shape="round" >Reencaminhar</button>
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button> <button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
</div> </div>
@@ -127,7 +127,7 @@
<button *ngIf="p.userRole(['PR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button> <button *ngIf="p.userRole(['PR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button> <button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
<button *ngIf="loggeduser.Profile == 'MDGPR'" (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button> <button *ngIf="loggeduser.Profile == 'MDGPR'" (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button> <button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button> <button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
</div> </div>
<div *ngIf="task.WorkflowName == 'Pedido de Parecer do Presidente'" class="buttons"> <div *ngIf="task.WorkflowName == 'Pedido de Parecer do Presidente'" class="buttons">
+8 -1
View File
@@ -8,6 +8,7 @@ import { AlertController } from '@ionic/angular';
import { NotificationsService } from 'src/app/services/notifications.service'; import { NotificationsService } from 'src/app/services/notifications.service';
import { SessionStore } from 'src/app/store/session.service'; import { SessionStore } from 'src/app/store/session.service';
import { ThemeService } from 'src/app/services/theme.service'; import { ThemeService } from 'src/app/services/theme.service';
import { PermissionService } from 'src/app/services/permission.service';
@Component({ @Component({
selector: 'app-inactivity', selector: 'app-inactivity',
@@ -31,6 +32,7 @@ export class InactivityPage implements OnInit {
private toastService: ToastService, private toastService: ToastService,
public alertController: AlertController, public alertController: AlertController,
public ThemeService: ThemeService, public ThemeService: ThemeService,
public p: PermissionService,
) {} ) {}
loop = false loop = false
@@ -115,10 +117,15 @@ export class InactivityPage implements OnInit {
if (attempt) { if (attempt) {
// if current attemp is equal to the current user // if current attemp is equal to the current user
if (attempt.UserId == SessionStore.user.UserId) { if (attempt.UserId == SessionStore.user.UserId) {
await this.authService.SetSession(attempt, this.userattempt); await this.authService.SetSession(attempt, this.userattempt);
this.authService.loginChat();
if(this.p.userPermission(this.p.permissionList.Chat.access)){
this.authService.loginChat();
}
this.getToken(); this.getToken();
SessionStore.setInativity(true) SessionStore.setInativity(true)
+20 -8
View File
@@ -44,7 +44,7 @@ export class LoginPage implements OnInit {
private changeProfileService: ChangeProfileService, private changeProfileService: ChangeProfileService,
public ThemeService: ThemeService, public ThemeService: ThemeService,
private storageservice: StorageService, private storageservice: StorageService,
public permissionService: PermissionService, public p: PermissionService,
) {} ) {}
ngOnInit() { ngOnInit() {
@@ -104,11 +104,20 @@ export class LoginPage implements OnInit {
// login to API successfully // login to API successfully
if (attempt) { if (attempt) {
if (attempt.UserId == SessionStore.user.UserId) { if (attempt.UserId == SessionStore.user.UserId) {
await this.authService.SetSession(attempt, this.userattempt); await this.authService.SetSession(attempt, this.userattempt);
await this.authService.loginChat();
await this.authService.loginToChatWs(); console.log(this.p.userPermission(this.permissionList.Chat.access));
if(this.p.userPermission(this.permissionList.Chat.access)){
alert('RC IN')
await this.authService.loginChat();
await this.authService.loginToChatWs();
}
this.getToken(); this.getToken();
SessionStore.setInativity(true); SessionStore.setInativity(true);
@@ -124,8 +133,11 @@ export class LoginPage implements OnInit {
this.changeProfileService.run(); this.changeProfileService.run();
await this.authService.loginChat(); if(this.p.userPermission(this.permissionList.Chat.access)){
await this.authService.loginToChatWs(); await this.authService.loginChat();
await this.authService.loginToChatWs();
}
this.getToken(); this.getToken();
this.router.navigateByUrl('/pin', { replaceUrl: true }); this.router.navigateByUrl('/pin', { replaceUrl: true });
@@ -149,13 +161,13 @@ export class LoginPage implements OnInit {
if(pathName) { if(pathName) {
this.router.navigate([pathName]); this.router.navigate([pathName]);
} else { } else {
if(this.permissionService.userPermission(this.permissionList.Agenda.access) || this.permissionService.userPermission(this.permissionList.Gabinete.access)){ if(this.p.userPermission(this.permissionList.Agenda.access) || this.p.userPermission(this.permissionList.Gabinete.access)){
this.router.navigate(['/home/events']); this.router.navigate(['/home/events']);
} }
else if(this.permissionService.userPermission(this.permissionList.Chat.access) && this.permissionService.userPermission(this.permissionList.Actions.access)){ else if(this.p.userPermission(this.permissionList.Chat.access) && this.p.userPermission(this.permissionList.Actions.access)){
this.router.navigate(['/home/chat']); this.router.navigate(['/home/chat']);
} }
else if(this.permissionService.userPermission(this.permissionList.Actions.access)){ else if(this.p.userPermission(this.permissionList.Actions.access)){
this.router.navigate(['/home/publications']); this.router.navigate(['/home/publications']);
} }
} }
@@ -56,12 +56,12 @@
</ion-content> </ion-content>
<ion-footer> <ion-footer>
<ion-toolbar class="footer-toolbar"> <ion-toolbar class="footer-toolbar">
<ion-buttons slot="start"> <ion-buttons *ngIf="p.userPermission([p.permissionList.Actions.deletePost])" slot="start">
<button class="btn-delete" fill="clear" color="#ffe0e0" (click)="deletePost()"> <button class="btn-delete" fill="clear" color="#ffe0e0" (click)="deletePost()">
<ion-label>Eliminar</ion-label> <ion-label>Eliminar</ion-label>
</button> </button>
</ion-buttons> </ion-buttons>
<ion-buttons slot="end"> <ion-buttons *ngIf="p.userPermission([p.permissionList.Actions.editPost])" slot="end">
<button class="btn-ok" fill="clear" color="#fff" (click)="editPost('3')"> <button class="btn-ok" fill="clear" color="#fff" (click)="editPost('3')">
<ion-label>Editar</ion-label> <ion-label>Editar</ion-label>
</button> </button>
@@ -10,6 +10,7 @@ import { SqliteService } from 'src/app/services/sqlite.service';
import { BackgroundService } from 'src/app/services/background.service'; import { BackgroundService } from 'src/app/services/background.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'; import { RouteService } from 'src/app/services/route.service';
import { PermissionService } from 'src/app/services/permission.service';
@Component({ @Component({
selector: 'app-publication-detail', selector: 'app-publication-detail',
@@ -31,7 +32,8 @@ export class PublicationDetailPage implements OnInit {
private RouteService: RouteService, private RouteService: RouteService,
private sqliteservice: SqliteService, private sqliteservice: SqliteService,
private backgroundservice: BackgroundService, private backgroundservice: BackgroundService,
public ThemeService: ThemeService ) { public ThemeService: ThemeService,
public p:PermissionService ) {
this.publicationId = this.navParams.get('publicationId'); this.publicationId = this.navParams.get('publicationId');
/* this.folderId = this.navParams.get('folderIdId'); */ /* this.folderId = this.navParams.get('folderIdId'); */
@@ -25,7 +25,7 @@
<ion-label class="title ">Acções Presidenciais</ion-label> <ion-label class="title ">Acções Presidenciais</ion-label>
</div> </div>
<div class="div-icon"> <div class="div-icon">
<button title="Adicionar nova ação presidencial" class="btn-no-color" (click)="AddPublicationFolder()"> <button *ngIf="p.userPermission([p.permissionList.Actions.create])" title="Adicionar nova ação presidencial" class="btn-no-color" (click)="AddPublicationFolder()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="icon-only" src='assets/images/icons-add.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="icon-only" src='assets/images/icons-add.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="icon-only" src='assets/images/theme/gov/icons-add.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="icon-only" src='assets/images/theme/gov/icons-add.svg'></ion-icon>
</button> </button>
@@ -92,14 +92,14 @@
</div> </div>
</ion-item> </ion-item>
<ion-item-options class="members-options" side="end"> <ion-item-options class="members-options" side="end">
<ion-item-option class="edit-option" (click)="editAction(evento.ProcessId)"> <ion-item-option *ngIf="p.userPermission([p.permissionList.Actions.edit])" class="edit-option" (click)="editAction(evento.ProcessId)">
<button class="btn-no-color"> <button class="btn-no-color">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="edit" slot="end" src="assets/images/icons-edit.svg" ></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="edit" slot="end" src="assets/images/icons-edit.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="edit" slot="end" src="assets/images/theme/gov/icons-edit.svg" ></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="edit" slot="end" src="assets/images/theme/gov/icons-edit.svg" ></ion-icon>
</button> </button>
</ion-item-option> </ion-item-option>
<ion-item-option class="delete-option" (click)="deleteAction(evento.ProcessId)"> <ion-item-option *ngIf="p.userPermission([p.permissionList.Actions.delete])" class="delete-option" (click)="deleteAction(evento.ProcessId)">
<button class="btn-no-color"> <button class="btn-no-color">
<ion-icon class="delete" name="trash-sharp"></ion-icon> <ion-icon class="delete" name="trash-sharp"></ion-icon>
</button> </button>
@@ -15,6 +15,7 @@ import { SqliteService } from 'src/app/services/sqlite.service';
import { BackgroundService } from 'src/app/services/background.service'; import { BackgroundService } from 'src/app/services/background.service';
import { ThemeService } from 'src/app/services/theme.service' import { ThemeService } from 'src/app/services/theme.service'
import { Storage } from '@ionic/storage'; import { Storage } from '@ionic/storage';
import { PermissionService } from 'src/app/services/permission.service';
@Component({ @Component({
@@ -68,7 +69,8 @@ export class PublicationsPage implements OnInit {
private backgroundservice: BackgroundService, private backgroundservice: BackgroundService,
private platform: Platform, private platform: Platform,
public ThemeService: ThemeService, public ThemeService: ThemeService,
private storage: Storage private storage: Storage,
public p: PermissionService,
) { ) {
this.months = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"]; this.months = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"];
@@ -61,12 +61,12 @@
<ion-footer> <ion-footer>
<ion-toolbar class="footer-toolbar"> <ion-toolbar class="footer-toolbar">
<ion-buttons slot="start"> <ion-buttons *ngIf="p.userPermission([p.permissionList.Actions.deletePost])" slot="start">
<button class="btn-delete" fill="clear" color="#ffe0e0" (click)="deletePost()"> <button class="btn-delete" fill="clear" color="#ffe0e0" (click)="deletePost()">
<ion-label>Eliminar</ion-label> <ion-label>Eliminar</ion-label>
</button> </button>
</ion-buttons> </ion-buttons>
<ion-buttons slot="end"> <ion-buttons *ngIf="p.userPermission([p.permissionList.Actions.editPost])" slot="end">
<button class="btn-ok" fill="clear" color="#fff" (click)="editPost('3')"> <button class="btn-ok" fill="clear" color="#fff" (click)="editPost('3')">
<ion-label>Editar</ion-label> <ion-label>Editar</ion-label>
</button> </button>
@@ -10,6 +10,7 @@ import { Location } from '@angular/common';
import { ThemeService } from 'src/app/services/theme.service' import { ThemeService } from 'src/app/services/theme.service'
import { ViewMediaPage } from 'src/app/modals/view-media/view-media.page'; import { ViewMediaPage } from 'src/app/modals/view-media/view-media.page';
import { RouteService } from 'src/app/services/route.service'; import { RouteService } from 'src/app/services/route.service';
import { PermissionService } from 'src/app/services/permission.service';
@Component({ @Component({
selector: 'app-publication-detail', selector: 'app-publication-detail',
@@ -31,7 +32,8 @@ export class PublicationDetailPage implements OnInit {
private activatedRoute: ActivatedRoute, private activatedRoute: ActivatedRoute,
private router: Router, private router: Router,
private RouteService: RouteService, private RouteService: RouteService,
public ThemeService: ThemeService public ThemeService: ThemeService,
public p:PermissionService,
) { ) {
this.activatedRoute.paramMap.subscribe(params => { this.activatedRoute.paramMap.subscribe(params => {
@@ -15,7 +15,7 @@
<p class="item-content-detail">{{item.Detail}}</p> <p class="item-content-detail">{{item.Detail}}</p>
<p class="item-content-date">{{item.DateBegin | date: 'dd-MM-yy | HH:mm'}}</p> <p class="item-content-date">{{item.DateBegin | date: 'dd-MM-yy | HH:mm'}}</p>
</div> </div>
<div class="actions-icon cursor-pointer" (click)="AddPublication('2',item.ProcessId)"> <div *ngIf="p.userPermission([p.permissionList.Actions.createPost])" class="actions-icon cursor-pointer" (click)="AddPublication('2',item.ProcessId)">
<!-- <ion-icon (click)="AddPublication('1',item.ProcessId)" slot="end" src='assets/images/icons-add-photo.svg'></ion-icon> --> <!-- <ion-icon (click)="AddPublication('1',item.ProcessId)" slot="end" src='assets/images/icons-add-photo.svg'></ion-icon> -->
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-add.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-add.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-add.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-add.svg'></ion-icon>
@@ -33,7 +33,9 @@
</ion-refresher> --> </ion-refresher> -->
<div class="main-container background-white height-100 overflow-y-auto"> <div class="main-container background-white height-100 overflow-y-auto">
<ion-content> <ion-content>
<ion-card *ngFor="let publication of getpublication let i = index"> <ion-card *ngFor="let publication of getpublication let i = index"
(click)="goToPublicationDetail(publication.DocumentId)"
>
<ion-card-content> <ion-card-content>
<div class="post-img"> <div class="post-img">
<img [lazyLoad]="publication.FileBase64"> <img [lazyLoad]="publication.FileBase64">
@@ -57,10 +59,10 @@
*ngFor="let publication of getpublication" *ngFor="let publication of getpublication"
(click)="goToPublicationDetail(publication.DocumentId)" (click)="goToPublicationDetail(publication.DocumentId)"
> >
<div class="post-img"> <div class="post-img">
<img [defaultImage]=defaultImage [lazyLoad]="publication.FileBase64"> <img [defaultImage]=defaultImage [lazyLoad]="publication.FileBase64">
<ng-template #imageLoaded> <ng-template #imageLoaded>
<div *ngIf="publication.FileBase64.length > 30" class="post-img"> <div *ngIf="publication.FileBase64.length > 30" class="post-img">
<img [defaultImage]=defaultImage [lazyLoad]="publication.FileBase64"> <img [defaultImage]=defaultImage [lazyLoad]="publication.FileBase64">
@@ -12,6 +12,7 @@ import { BackgroundService } from 'src/app/services/background.service';
import { ThemeService } from 'src/app/services/theme.service' import { ThemeService } from 'src/app/services/theme.service'
import { forkJoin } from 'rxjs'; import { forkJoin } from 'rxjs';
import { ToastService } from 'src/app/services/toast.service'; import { ToastService } from 'src/app/services/toast.service';
import { PermissionService } from 'src/app/services/permission.service';
@Component({ @Component({
selector: 'app-view-publications', selector: 'app-view-publications',
@@ -42,7 +43,8 @@ export class ViewPublicationsPage implements OnInit {
private sqliteservice: SqliteService, private sqliteservice: SqliteService,
private backgroundservice: BackgroundService, private backgroundservice: BackgroundService,
public ThemeService: ThemeService, public ThemeService: ThemeService,
private toastService: ToastService,) { private toastService: ToastService,
public p: PermissionService,) {
this.item = new PublicationFolder(); this.item = new PublicationFolder();
this.activatedRoute.paramMap.subscribe(params => { this.activatedRoute.paramMap.subscribe(params => {
@@ -259,7 +261,7 @@ export class ViewPublicationsPage implements OnInit {
publicationArray.push(publicationlis); publicationArray.push(publicationlis);
}); });
this.publicationList = publicationArray; this.publicationList = publicationArray;
}) })
} }
+6 -4
View File
@@ -19,6 +19,7 @@ import { AttachmentsService } from 'src/app/services/attachments.service';
import { RoomService } from './chat/room.service'; import { RoomService } from './chat/room.service';
import { Storage } from '@ionic/storage'; import { Storage } from '@ionic/storage';
import { InitialsService } from './functions/initials.service'; import { InitialsService } from './functions/initials.service';
import { PermissionService } from './permission.service';
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
@@ -46,16 +47,17 @@ export class AuthService {
private processesService: ProcessesService, private processesService: ProcessesService,
private AttachmentsService: AttachmentsService, private AttachmentsService: AttachmentsService,
private storage: Storage, private storage: Storage,
private initialsService: InitialsService ) { private initialsService: InitialsService,
public p: PermissionService, ) {
this.headers = new HttpHeaders(); this.headers = new HttpHeaders();
if (SessionStore.exist) { if (SessionStore.exist) {
this.ValidatedUser = SessionStore.user this.ValidatedUser = SessionStore.user
// console.log('login', SessionStore.user.RochetChatUser, SessionStore.user.Password) if(this.p.userPermission(this.p.permissionList.Chat.access) == true ){
this.loginToChatWs() this.loginToChatWs()
}
} }
if (localStorage.getItem("userChat") != null) { if (localStorage.getItem("userChat") != null) {
+103 -103
View File
@@ -86,86 +86,86 @@ export class NotificationsService {
} }
requestPermissions() { requestPermissions() {
// PushNotifications.requestPermissions().then(result => { PushNotifications.requestPermissions().then(result => {
// if (result.receive === 'granted') { if (result.receive === 'granted') {
// // Register with Apple / Google to receive push via APNS/FCM // Register with Apple / Google to receive push via APNS/FCM
// PushNotifications.register(); PushNotifications.register();
// } else { } else {
// // Show some error // Show some error
// } }
// }); });
} }
getAndpostToken(username) { getAndpostToken(username) {
// if (this.platform.is('desktop') || this.platform.is('mobileweb')) { if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
// console.log('Notifications not supported') console.log('Notifications not supported')
// } else { } else {
// const geturl = environment.apiURL + 'notifications/token'; const geturl = environment.apiURL + 'notifications/token';
// PushNotifications.addListener('registration', PushNotifications.addListener('registration',
// (token: Token) => { (token: Token) => {
// console.log('token: ', token.value) console.log('token: ', token.value)
// this.storageService.store(username, token.value); this.storageService.store(username, token.value);
// this.storageService.get(username).then(value => { this.storageService.get(username).then(value => {
// console.log('STORAGE TOKEN', value) console.log('STORAGE TOKEN', value)
// this.storageService.get(AuthConnstants.USER).then(res => { this.storageService.get(AuthConnstants.USER).then(res => {
// console.log('USERID', res); console.log('USERID', res);
// const headers = { 'Authorization': SessionStore.user.BasicAuthKey }; const headers = { 'Authorization': SessionStore.user.BasicAuthKey };
// const body = { const body = {
// UserId: res.UserId, UserId: res.UserId,
// TokenId: token.value, TokenId: token.value,
// Status: 1, Status: 1,
// Service: 1 Service: 1
// }; };
// this.http.post<Tokenn>(`${geturl}`, body, { headers }).subscribe(data => { this.http.post<Tokenn>(`${geturl}`, body, { headers }).subscribe(data => {
// console.log('TOKEN USER MIDLE', data); console.log('TOKEN USER MIDLE', data);
// }, (error) => { }, (error) => {
// console.log('Post token to backend', error) console.log('Post token to backend', error)
// }) })
// }); });
// }); });
// } }
// ); );
// } }
} }
registrationError() { registrationError() {
// PushNotifications.addListener('registrationError', PushNotifications.addListener('registrationError',
// (error: any) => { (error: any) => {
// console.log('Error on registration: ' + JSON.stringify(error)); console.log('Error on registration: ' + JSON.stringify(error));
// } }
// ); );
} }
onReciveForeground() { onReciveForeground() {
// PushNotifications.addListener('pushNotificationReceived', PushNotifications.addListener('pushNotificationReceived',
// (notification: PushNotificationSchema) => { (notification: PushNotificationSchema) => {
// console.log('Push received: ' + JSON.stringify(notification)); console.log('Push received: ' + JSON.stringify(notification));
// this.DataArray.push(notification) this.DataArray.push(notification)
// console.log("On ReceiveNotification", this.DataArray) console.log("On ReceiveNotification", this.DataArray)
// this.storageService.store("Notifications", this.DataArray) this.storageService.store("Notifications", this.DataArray)
// this.eventtrigger.publishSomeData({ this.eventtrigger.publishSomeData({
// notification: "recive" notification: "recive"
// }) })
// } }
// ); );
} }
onReciveBackground() { onReciveBackground() {
// PushNotifications.addListener('pushNotificationActionPerformed', PushNotifications.addListener('pushNotificationActionPerformed',
// (notification: ActionPerformed) => { (notification: ActionPerformed) => {
// console.log('Push action performed: ' + JSON.stringify(notification)); console.log('Push action performed: ' + JSON.stringify(notification));
// /* this.DataArray.push(notification.notification) /* this.DataArray.push(notification.notification)
// console.log("On ReceiveNotification", this.DataArray) console.log("On ReceiveNotification", this.DataArray)
// this.storageService.store("Notifications", this.DataArray) this.storageService.store("Notifications", this.DataArray)
// this.eventtrigger.publishSomeData({ this.eventtrigger.publishSomeData({
// notification: "recive" notification: "recive"
// }) */ }) */
// this.notificatinsRoutes(notification) this.notificatinsRoutes(notification)
// } }
// ); );
} }
tempClearArray() { tempClearArray() {
@@ -175,51 +175,51 @@ export class NotificationsService {
notificatinsRoutes = (notification) => { notificatinsRoutes = (notification) => {
// console.log('Push action performed 2222: ' + JSON.stringify(notification.data)); console.log('Push action performed 2222: ' + JSON.stringify(notification.data));
// if (notification.notification.data.Service === "agenda" && notification.notification.data.IdObject.length > 10) { if (notification.notification.data.Service === "agenda" && notification.notification.data.IdObject.length > 10) {
// console.log("Id Lenght", notification.notification.data.IdObject.length) console.log("Id Lenght", notification.notification.data.IdObject.length)
// this.zone.run(() => this.router.navigate(['/home/agenda', notification.notification.data.IdObject, 'agenda'])); this.zone.run(() => this.router.navigate(['/home/agenda', notification.notification.data.IdObject, 'agenda']));
// } }
// else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "expediente") { else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "expediente") {
// this.zone.run(() => this.router.navigate(['/home/gabinete-digital/expediente', notification.notification.data.IdObject, 'gabinete-digital'])); this.zone.run(() => this.router.navigate(['/home/gabinete-digital/expediente', notification.notification.data.IdObject, 'gabinete-digital']));
// } }
// else if (notification.notification.data.Service === "agenda" && notification.notification.data.Object === "event-list") { else if (notification.notification.data.Service === "agenda" && notification.notification.data.Object === "event-list") {
// //this.zone.run(() => this.router.navigate(['/home/gabinete-digital/event-list/approve-event',IdObject, 'agenda'])); //this.zone.run(() => this.router.navigate(['/home/gabinete-digital/event-list/approve-event',IdObject, 'agenda']));
// this.zone.run(() => this.router.navigate(['/home/agenda/event-list/approve-event', notification.notification.data.IdObject, 'agenda'])); this.zone.run(() => this.router.navigate(['/home/agenda/event-list/approve-event', notification.notification.data.IdObject, 'agenda']));
// } else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "despachos") { } else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "despachos") {
// this.zone.run(() => this.router.navigate(['/home/gabinete-digital/despachos', notification.notification.data.IdObject, 'gabinete-digital'], { replaceUrl: true })); this.zone.run(() => this.router.navigate(['/home/gabinete-digital/despachos', notification.notification.data.IdObject, 'gabinete-digital'], { replaceUrl: true }));
// } }
// else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "parecer") { else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "parecer") {
// this.zone.run(() => this.router.navigate(['/home/gabinete-digital/pedidos', notification.notification.data.IdObject, 'gabinete-digital'])); this.zone.run(() => this.router.navigate(['/home/gabinete-digital/pedidos', notification.notification.data.IdObject, 'gabinete-digital']));
// } }
// else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "deferimento") { else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "deferimento") {
// this.zone.run(() => this.router.navigate(['/home/gabinete-digital/pedidos', notification.notification.data.IdObject, 'gabinete-digital'])); this.zone.run(() => this.router.navigate(['/home/gabinete-digital/pedidos', notification.notification.data.IdObject, 'gabinete-digital']));
// } }
// else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "despachos-pr") { else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "despachos-pr") {
// this.zone.run(() => this.router.navigate(['/home/gabinete-digital/despachos-pr', notification.notification.data.IdObject, 'gabinete-digital'])); this.zone.run(() => this.router.navigate(['/home/gabinete-digital/despachos-pr', notification.notification.data.IdObject, 'gabinete-digital']));
// } }
// else if (notification.notification.data.Service === "accoes" && notification.notification.data.Object === "accao") { else if (notification.notification.data.Service === "accoes" && notification.notification.data.Object === "accao") {
// this.zone.run(() => this.router.navigate(['/home/publications', notification.notification.data.IdObject])); this.zone.run(() => this.router.navigate(['/home/publications', notification.notification.data.IdObject]));
// } }
// else if (notification.notification.data.Service === "accoes" && notification.notification.data.Object === "publicacao") { else if (notification.notification.data.Service === "accoes" && notification.notification.data.Object === "publicacao") {
// this.zone.run(() => this.router.navigate(['/home/publications/view-publications', notification.notification.data.FolderId, notification.data.IdObject])); this.zone.run(() => this.router.navigate(['/home/publications/view-publications', notification.notification.data.FolderId, notification.data.IdObject]));
// } }
// else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "diplomas") { else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "diplomas") {
// this.zone.run(() => this.router.navigate(['/home/gabinete-digital/diplomas', notification.notification.data.IdObject, 'gabinete-digital'])); this.zone.run(() => this.router.navigate(['/home/gabinete-digital/diplomas', notification.notification.data.IdObject, 'gabinete-digital']));
// } }
// else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "diplomas-assinar") { else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "diplomas-assinar") {
// this.zone.run(() => this.router.navigate(['/home/gabinete-digital/diplomas-assinar', notification.notification.data.IdObject, 'gabinete-digital'])); this.zone.run(() => this.router.navigate(['/home/gabinete-digital/diplomas-assinar', notification.notification.data.IdObject, 'gabinete-digital']));
// } }
// else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "expedientes-pr") { else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "expedientes-pr") {
// this.zone.run(() => this.router.navigate(['/home/gabinete-digital/expedientes-pr', notification.notification.data.IdObject, 'gabinete-digital'])); this.zone.run(() => this.router.navigate(['/home/gabinete-digital/expedientes-pr', notification.notification.data.IdObject, 'gabinete-digital']));
// } }
} }
+2
View File
@@ -1,4 +1,5 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { PermissionList } from '../models/permission/permissionList';
import { SessionStore } from '../store/session.service'; import { SessionStore } from '../store/session.service';
@Injectable({ @Injectable({
@@ -6,6 +7,7 @@ import { SessionStore } from '../store/session.service';
}) })
export class PermissionService { export class PermissionService {
permissionList = new PermissionList();
SessionStore = SessionStore SessionStore = SessionStore
constructor() { } constructor() { }
@@ -156,9 +156,6 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
} }
ngOnInit() { ngOnInit() {
console.log(this.roomId);
this.loggedUser = this.loggedUserChat;
this.loggedUser=this.loggedUserChat; this.loggedUser=this.loggedUserChat;
setTimeout(() => { setTimeout(() => {
this.getRoomInfo(); this.getRoomInfo();
@@ -168,7 +165,6 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
VoiceRecorder.requestAudioRecordingPermission(); VoiceRecorder.requestAudioRecordingPermission();
this.deleteRecording(); this.deleteRecording();
this.loadFiles(); this.loadFiles();
} }
showDateDuration(start: any) { showDateDuration(start: any) {
@@ -8,6 +8,7 @@ import { ProcessesService } from 'src/app/services/processes.service';
import { ToastService } from 'src/app/services/toast.service'; import { ToastService } from 'src/app/services/toast.service';
import { Location } from '@angular/common'; import { Location } from '@angular/common';
import { RouteService } from 'src/app/services/route.service'; import { RouteService } from 'src/app/services/route.service';
import { PermissionService } from 'src/app/services/permission.service';
@Component({ @Component({
selector: 'app-deploma-options', selector: 'app-deploma-options',
@@ -23,7 +24,8 @@ export class DeplomaOptionsPage implements OnInit {
fulltask: any fulltask: any
constructor(public popoverController: PopoverController, constructor(
public popoverController: PopoverController,
private modalController: ModalController, private modalController: ModalController,
private activatedRoute: ActivatedRoute, private activatedRoute: ActivatedRoute,
private processes: ProcessesService, private processes: ProcessesService,
@@ -31,7 +33,8 @@ export class DeplomaOptionsPage implements OnInit {
private toastService: ToastService, private toastService: ToastService,
private router: Router, private router: Router,
private deplomaService: DeplomaService, private deplomaService: DeplomaService,
private RouteService: RouteService) { private RouteService: RouteService,
public p: PermissionService,) {
this.serialNumber = this.navParams.get('serialNumber'); this.serialNumber = this.navParams.get('serialNumber');
this.task = this.navParams.get('task'); this.task = this.navParams.get('task');
this.fulltask = this.navParams.get('fulltask'); this.fulltask = this.navParams.get('fulltask');
@@ -138,7 +141,7 @@ export class DeplomaOptionsPage implements OnInit {
modal.onDidDismiss(); modal.onDidDismiss();
} }
async askSignature(note:string, documents:any) { async askSignature(note:string, documents:any) {
let body = { let body = {
"serialNumber": this.serialNumber, "serialNumber": this.serialNumber,
@@ -162,7 +165,7 @@ export class DeplomaOptionsPage implements OnInit {
loader.remove() loader.remove()
} }
} }
async sign(note:string, documents:any) { async sign(note:string, documents:any) {
@@ -28,7 +28,7 @@
<div class="flex-grow-1"> <div class="flex-grow-1">
<button (click)="openAddNoteModal('Concluido')" class="btn-cancel" shape="round" >Marcar como Concluído</button> <button (click)="openAddNoteModal('Concluido')" class="btn-cancel" shape="round" >Marcar como Concluído</button>
<button (click)="openAddNoteModal('Reexecução')" class="btn-cancel" shape="round" >Enviar para Reexecução</button> <button (click)="openAddNoteModal('Reexecução')" class="btn-cancel" shape="round" >Enviar para Reexecução</button>
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button> <button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button> <button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
</div> </div>
</div> </div>
@@ -40,7 +40,7 @@
<div class="solid"></div> <div class="solid"></div>
<button (click)="openTaskProcessModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button> <button (click)="openTaskProcessModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
<button (click)="openTaskProcessModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button> <button (click)="openTaskProcessModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button> <button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
<div class="solid"></div> <div class="solid"></div>
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button> <button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
</div> </div>
@@ -51,7 +51,7 @@
<div class="solid"></div> <div class="solid"></div>
<button (click)="openTaskProcessModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button> <button (click)="openTaskProcessModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
<button (click)="openTaskProcessModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button> <button (click)="openTaskProcessModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button> <button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
<div class="solid"></div> <div class="solid"></div>
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button> <button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
</div> </div>
@@ -60,7 +60,7 @@
<div class="solid"></div> <div class="solid"></div>
<button (click)="openTaskProcessModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button> <button (click)="openTaskProcessModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
<button (click)="openTaskProcessModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button> <button (click)="openTaskProcessModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button> <button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
<div class="solid"></div> <div class="solid"></div>
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button> <button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
<button (click)="openAddNoteModal('Reexecução')" class="btn-cancel" shape="round" >Enviar para Reexecução</button> <button (click)="openAddNoteModal('Reexecução')" class="btn-cancel" shape="round" >Enviar para Reexecução</button>
@@ -9,27 +9,27 @@
<div class="width-100"> <div class="width-100">
<div *ngIf="task && !p.userRole(['PR'])" class="d-flex width-100"> <div *ngIf="task && !p.userRole(['PR'])" class="d-flex width-100">
<div class="flex-grow-1 width-50 pr-10"> <div class="flex-grow-1 width-50 pr-10">
<button class="btn-cancel desk" shape="round"> Responder ao PR </button> <button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" class="btn-cancel desk" shape="round"> Responder ao PR </button>
<button (click)="openAddNoteModal('Executado')" class="btn-cancel" shape="round" >Executado</button> <button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="openAddNoteModal('Executado')" class="btn-cancel" shape="round" >Executado</button>
<button class="btn-cancel desk" shape="round"> Reencaminhar para Área jurídica </button> <button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" class="btn-cancel desk" shape="round"> Reencaminhar para Área jurídica </button>
<button (click)="openAddNoteModal('Gerar Diploma')" class="btn-cancel" shape="round" >Gerar Diploma</button> <button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="openAddNoteModal('Gerar Diploma')" class="btn-cancel" shape="round" >Gerar Diploma</button>
<button class="btn-cancel desk" shape="round"> Outras opções </button> <button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" class="btn-cancel desk" shape="round"> Outras opções </button>
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button> <button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
</div> </div>
<div class="flex-grow-1 width-50 pl-10"> <div class="flex-grow-1 width-50 pl-10">
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button> <button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
<!-- <button *ngIf="!p.userRole(['PR'])" (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button> --> <!-- <button *ngIf="!p.userRole(['PR'])" (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button> -->
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button> <button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" full class="btn-cancel" shape="round" >Enviar para pendentes</button> <button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks]) && task.Status != 'Pending'" (click)="sendExpedienteToPending()" full class="btn-cancel" shape="round" >Enviar para pendentes</button>
<button (click)="cancle()" full class="btn-cancel" shape="round" >Cancelar</button> <button (click)="cancle()" full class="btn-cancel" shape="round" >Cancelar</button>
</div> </div>
</div> </div>
<div *ngIf="task && p.userRole(['PR'])" class="d-flex width-100"> <div *ngIf="task && p.userRole(['PR'])" class="d-flex width-100">
<div class="flex-grow-1"> <div class="flex-grow-1">
<button (click)="openAddNoteModal('Concluido')" class="btn-cancel" shape="round" >Marcar como Concluído</button> <button *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])" (click)="openAddNoteModal('Concluido')" class="btn-cancel" shape="round" >Marcar como Concluído</button>
<button (click)="openAddNoteModal('Reexecução')" class="btn-cancel" shape="round" >Enviar para Reexecução</button> <button *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])" (click)="openAddNoteModal('Reexecução')" class="btn-cancel" shape="round" >Enviar para Reexecução</button>
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button> <button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button> <button *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks]) && task.Status != 'Pending'" (click)="sendExpedienteToPending()" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
<button (click)="cancle()" full class="btn-cancel" shape="round" >Cancelar</button> <button (click)="cancle()" full class="btn-cancel" shape="round" >Cancelar</button>
</div> </div>
</div> </div>
@@ -8,7 +8,7 @@
</div> </div>
<div *ngIf="task"> <div *ngIf="task">
<div *ngIf="loggeduser.Profile =='MDGPR' " class="buttons"> <div *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" class="buttons">
<button (click)="openAddNoteModal('Aprovar')" class="btn-cancel" shape="round" >Aprovar</button> <button (click)="openAddNoteModal('Aprovar')" class="btn-cancel" shape="round" >Aprovar</button>
<button (click)="openAddNoteModal('Revisão')" class="btn-cancel" shape="round" >Mandar para Revisão</button> <button (click)="openAddNoteModal('Revisão')" class="btn-cancel" shape="round" >Mandar para Revisão</button>
<div class="solid"></div> <div class="solid"></div>
@@ -17,7 +17,7 @@
<button hidden class="btn-cancel" shape="round" >Delegar</button> <button hidden class="btn-cancel" shape="round" >Delegar</button>
<button (click)="attachDocument()" class="btn-cancel" shape="round" >Anexar Documento</button> <button (click)="attachDocument()" class="btn-cancel" shape="round" >Anexar Documento</button>
</div> </div>
<div *ngIf="loggeduser.Profile =='PR' " class="buttons"> <div *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])" class="buttons">
<button (click)="openExpedientActionsModal('0', fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button> <button (click)="openExpedientActionsModal('0', fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
<button (click)="distartExpedientModal('descartar')" full class="btn-cancel" shape="round" >Descartar</button> <button (click)="distartExpedientModal('descartar')" full class="btn-cancel" shape="round" >Descartar</button>
<div class="solid"></div> <div class="solid"></div>
@@ -15,6 +15,7 @@ import { ToastService } from 'src/app/services/toast.service';
import { Location } from '@angular/common' import { Location } from '@angular/common'
import { ThemeService } from 'src/app/services/theme.service' import { ThemeService } from 'src/app/services/theme.service'
import { RouteService } from 'src/app/services/route.service'; import { RouteService } from 'src/app/services/route.service';
import { PermissionService } from 'src/app/services/permission.service';
@Component({ @Component({
selector: 'app-opts-expediente-pr', selector: 'app-opts-expediente-pr',
@@ -51,7 +52,8 @@ export class OptsExpedientePrPage implements OnInit {
private animationController: AnimationController, private animationController: AnimationController,
private toastService: ToastService, private toastService: ToastService,
private RouteService: RouteService, private RouteService: RouteService,
public ThemeService: ThemeService public ThemeService: ThemeService,
public p: PermissionService,
) { ) {
@@ -6,27 +6,27 @@
</button> </button>
</div> </div>
<div class="width-100"> <div class="width-100">
<div *ngIf="task && !p.userRole(['PR'])" class="d-flex width-100"> <div class="d-flex width-100">
<div class="flex-grow-1"> <div class="flex-grow-1">
<button class="btn-cancel desk" shape="round"> Enviar para o PR </button> <button *ngIf="!p.userPermission([p.permissionList.Gabinete.pr_tasks])" class="btn-cancel desk" shape="round"> Enviar para o PR </button>
<button (click)="openAddNoteModal('Aprovar')" class="btn-cancel" shape="round" >Avaliação Superior</button> <button *ngIf="!p.userPermission([p.permissionList.Gabinete.pr_tasks])" (click)="openAddNoteModal('Aprovar')" class="btn-cancel" shape="round" >Avaliação Superior</button>
<button class="btn-cancel desk" shape="round"> Solicitar revisão </button> <button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" class="btn-cancel desk" shape="round"> Solicitar revisão </button>
<button (click)="openAddNoteModal('Revisão')" class="btn-cancel" shape="round" >Mandar para Revisão</button> <button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="openAddNoteModal('Revisão')" class="btn-cancel" shape="round" >Mandar para Revisão</button>
<button class="btn-cancel desk" shape="round">Outras opções </button> <button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks]) || p.userPermission([p.permissionList.Gabinete.pr_tasks])" class="btn-cancel desk" shape="round">Outras opções </button>
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button> <button (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
<button (click)="close()" full class="btn-cancel" shape="round" >Cancelar</button> <button (click)="close()" full class="btn-cancel" shape="round" >Cancelar</button>
</div> </div>
<div class="flex-grow-1"> <div class="flex-grow-1">
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button> <button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
<button *ngIf="!p.userRole(['PR'])" (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button> <button (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
<button (click)="openBookMeetingModal()" class="btn-cancel" shape="round" >Marcar Reunião</button> <button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal()" class="btn-cancel" shape="round" >Marcar Reunião</button>
<button *ngIf="!p.userRole(['PR'])" (click)="attachDocument()" class="btn-cancel" shape="round" >Anexar Documentos</button> <button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="attachDocument()" class="btn-cancel" shape="round" >Anexar Documentos</button>
<button (click)="distartExpedientModal('descartar')" class="btn-cancel" shape="round" >Descartar</button> <button (click)="distartExpedientModal('descartar')" class="btn-cancel" shape="round" >Descartar</button>
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" full class="btn-cancel" shape="round" >Enviar para pendentes</button> <button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" full class="btn-cancel" shape="round" >Enviar para pendentes</button>
<button (click)="openNewGroupPage()" class="btn-cancel" shape="round" >Iniciar Conversa</button> <button *ngIf="p.userPermission([p.permissionList.Chat.access])" (click)="openNewGroupPage()" class="btn-cancel" shape="round" >Iniciar Conversa</button>
</div> </div>
</div> </div>
<div *ngIf="task && p.userRole(['PR'])" class="d-flex width-100"> <!-- <div *ngIf="task && p.userRole(['PR'])" class="d-flex width-100">
<div class="flex-grow-1"> <div class="flex-grow-1">
<button (click)="openExpedientActionsModal('0', fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button> <button (click)="openExpedientActionsModal('0', fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
<button (click)="distartExpedientModal('descartar')" class="btn-cancel" shape="round" >Descartar</button> <button (click)="distartExpedientModal('descartar')" class="btn-cancel" shape="round" >Descartar</button>
@@ -38,7 +38,7 @@
<button hidden class="btn-cancel" shape="round" >Delegar</button> <button hidden class="btn-cancel" shape="round" >Delegar</button>
<button (click)="openNewGroupPage()" class="btn-cancel" shape="round" >Iniciar Conversa</button> <button (click)="openNewGroupPage()" class="btn-cancel" shape="round" >Iniciar Conversa</button>
</div> </div>
</div> </div> -->
<div class="solid"></div> <div class="solid"></div>
<button (click)="close()" full class="btn-cancel" shape="round" >Cancelar</button> <button (click)="close()" full class="btn-cancel" shape="round" >Cancelar</button>
@@ -7,7 +7,7 @@
<button *ngIf="!p.userRole(['PR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button> <button *ngIf="!p.userRole(['PR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
<button *ngIf="p.userRole(['PR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button> <button *ngIf="p.userRole(['PR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
<button *ngIf="!p.userRole(['PR'])" (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button> <button *ngIf="!p.userRole(['PR'])" (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button> <button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button> <button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
<button (click)="cancel()" class="btn-cancel" shape="round" >Cancelar</button> <button (click)="cancel()" class="btn-cancel" shape="round" >Cancelar</button>
</div> </div>
@@ -18,7 +18,7 @@
<button *ngIf="!p.userRole(['PR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button> <button *ngIf="!p.userRole(['PR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
<button *ngIf="p.userRole(['PR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button> <button *ngIf="p.userRole(['PR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
<button *ngIf="!p.userRole(['PR'])" (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button> <button *ngIf="!p.userRole(['PR'])" (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button> <button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button> <button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
<button (click)="cancel()" class="btn-cancel" shape="round" >Cancelar</button> <button (click)="cancel()" class="btn-cancel" shape="round" >Cancelar</button>
</div> </div>
@@ -30,7 +30,7 @@
<button *ngIf="p.userRole(['PR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button> <button *ngIf="p.userRole(['PR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
<!-- <button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button> --> <!-- <button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button> -->
<button (click)="openAddNoteModal('Solicitar Reapreciação')" class="btn-cancel" shape="round" >Solicitar Reapreciação</button> <button (click)="openAddNoteModal('Solicitar Reapreciação')" class="btn-cancel" shape="round" >Solicitar Reapreciação</button>
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button> <button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button> <button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
<button (click)="cancel()" class="btn-cancel" shape="round" >Cancelar</button> <button (click)="cancel()" class="btn-cancel" shape="round" >Cancelar</button>
</div> </div>
@@ -39,8 +39,8 @@
<div *ngIf="task.WorkflowName == 'Pedido de Parecer' || task.WorkflowName == 'Pedido de Parecer do Presidente' "> <div *ngIf="task.WorkflowName == 'Pedido de Parecer' || task.WorkflowName == 'Pedido de Parecer do Presidente' ">
<div class="buttons" *ngIf="task.activityInstanceName == 'Tarefa de Parecer'"> <div class="buttons" *ngIf="task.activityInstanceName == 'Tarefa de Parecer'">
<button (click)="openDarParecer(task)" class="btn-cancel" shape="round" >Dar o meu Parecer</button> <button (click)="openDarParecer(task)" class="btn-cancel" shape="round" >Dar o meu Parecer</button>
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button> <button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button> <button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button> <button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
<button (click)="openNewGroupPage()" class="btn-cancel" shape="round" *ngIf="task.WorkflowName == 'Pedido de Parecer do Presidente'">Iniciar Conversa</button> <button (click)="openNewGroupPage()" class="btn-cancel" shape="round" *ngIf="task.WorkflowName == 'Pedido de Parecer do Presidente'">Iniciar Conversa</button>
<button (click)="cancel()" class="btn-cancel" shape="round" >Cancelar</button> <button (click)="cancel()" class="btn-cancel" shape="round" >Cancelar</button>
@@ -51,7 +51,7 @@
<button *ngIf="p.userRole(['PR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button> <button *ngIf="p.userRole(['PR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button> <button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
<button *ngIf="!p.userRole(['PR'])" (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button> <button *ngIf="!p.userRole(['PR'])" (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button> <button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button> <button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
<button (click)="cancel()" class="btn-cancel" shape="round" >Cancelar</button> <button (click)="cancel()" class="btn-cancel" shape="round" >Cancelar</button>
</div> </div>
@@ -56,12 +56,12 @@
</ion-content> </ion-content>
<ion-footer> <ion-footer>
<ion-toolbar class="footer-toolbar width-md-100 px-md-20"> <ion-toolbar class="footer-toolbar width-md-100 px-md-20">
<ion-buttons slot="start"> <ion-buttons *ngIf="p.userPermission([p.permissionList.Actions.deletePost])" slot="start">
<button class="btn-delete" fill="clear" color="#ffe0e0" (click)="deletePost()"> <button class="btn-delete" fill="clear" color="#ffe0e0" (click)="deletePost()">
<ion-label>Eliminar</ion-label> <ion-label>Eliminar</ion-label>
</button> </button>
</ion-buttons> </ion-buttons>
<ion-buttons slot="end"> <ion-buttons *ngIf="p.userPermission([p.permissionList.Actions.editPost])" slot="end">
<button class="btn-ok" fill="clear" color="#fff" (click)="editPost('3')"> <button class="btn-ok" fill="clear" color="#fff" (click)="editPost('3')">
<ion-label>Editar</ion-label> <ion-label>Editar</ion-label>
</button> </button>
@@ -9,6 +9,7 @@ import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.p
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page'; import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
import { ThemeService } from 'src/app/services/theme.service' import { ThemeService } from 'src/app/services/theme.service'
import { ViewMediaPage } from 'src/app/modals/view-media/view-media.page'; import { ViewMediaPage } from 'src/app/modals/view-media/view-media.page';
import { PermissionService } from 'src/app/services/permission.service';
@Component({ @Component({
selector: 'app-publication-detail-shared', selector: 'app-publication-detail-shared',
@@ -31,7 +32,8 @@ export class PublicationDetailPage implements OnInit {
private publications:PublicationsService, private publications:PublicationsService,
private animationController: AnimationController, private animationController: AnimationController,
private toastService: ToastService, private toastService: ToastService,
public ThemeService: ThemeService public ThemeService: ThemeService,
public p:PermissionService,
) { ) {
/* this.folderId = this.navParams.get('folderIdId'); */ /* this.folderId = this.navParams.get('folderIdId'); */
@@ -11,11 +11,11 @@
<div class="actions-icon"> <div class="actions-icon">
<!-- <ion-icon (click)="AddPublication('1',item.ProcessId)" slot="end" src='assets/images/icons-add-photo.svg'></ion-icon> --> <!-- <ion-icon (click)="AddPublication('1',item.ProcessId)" slot="end" src='assets/images/icons-add-photo.svg'></ion-icon> -->
<button class="btn-no-color" (click)="openEditPublication(item.ProcessId)"> <button *ngIf="p.userPermission([p.permissionList.Actions.editPost])" class="btn-no-color" (click)="openEditPublication(item.ProcessId)">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="edit" slot="end" src="assets/images/icons-edit.svg" ></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="edit" slot="end" src="assets/images/icons-edit.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="edit" slot="end" src="assets/images/theme/gov/icons-edit.svg" ></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="edit" slot="end" src="assets/images/theme/gov/icons-edit.svg" ></ion-icon>
</button> </button>
<button class="btn-no-color" (click)="deletePublication(item.ProcessId)"> <button *ngIf="p.userPermission([p.permissionList.Actions.deletePost])" class="btn-no-color" (click)="deletePublication(item.ProcessId)">
<ion-icon class="delete" src='assets/images/theme/gov/icons-delete.svg'></ion-icon> <ion-icon class="delete" src='assets/images/theme/gov/icons-delete.svg'></ion-icon>
</button> </button>
<button class="btn-no-color cursor-pointer" (click)="doRefresh($event)"> <button class="btn-no-color cursor-pointer" (click)="doRefresh($event)">
@@ -40,7 +40,8 @@
</ion-refresher> </ion-refresher>
<div class="main-container px-20"> <div class="main-container px-20">
<ion-content> <ion-content>
<ion-card *ngFor="let publication of publicationList let i = index"> <ion-card *ngFor="let publication of publicationList let i = index"
(click)="viewPublicationDetail(publication.DocumentId)">
<ion-card-content> <ion-card-content>
<div class="post-img"> <div class="post-img">
<img [lazyLoad]="publication.FileBase64"> <img [lazyLoad]="publication.FileBase64">
@@ -88,7 +89,7 @@
</ion-list> --> </ion-list> -->
</div> </div>
<!-- fab placed to the bottom end --> <!-- fab placed to the bottom end -->
<ion-fab vertical="bottom" horizontal="end"> <ion-fab *ngIf="p.userPermission([p.permissionList.Actions.create])" vertical="bottom" horizontal="end">
<ion-fab-button title="Nova Publicação" (click)="AddPublication('2',item.ProcessId)"> <ion-fab-button title="Nova Publicação" (click)="AddPublication('2',item.ProcessId)">
<ion-icon name="add"></ion-icon> <ion-icon name="add"></ion-icon>
</ion-fab-button> </ion-fab-button>
@@ -11,6 +11,7 @@ import { ThemeService } from 'src/app/services/theme.service'
import { ToastService } from 'src/app/services/toast.service'; import { ToastService } from 'src/app/services/toast.service';
import { EditActionPage } from 'src/app/pages/publications/edit-action/edit-action.page'; import { EditActionPage } from 'src/app/pages/publications/edit-action/edit-action.page';
import { Storage } from '@ionic/storage'; import { Storage } from '@ionic/storage';
import { PermissionService } from 'src/app/services/permission.service';
@Component({ @Component({
selector: 'app-view-publications', selector: 'app-view-publications',
@@ -43,7 +44,8 @@ export class ViewPublicationsPage implements OnInit {
private publications: PublicationsService, private publications: PublicationsService,
public ThemeService: ThemeService, public ThemeService: ThemeService,
private toastService: ToastService, private toastService: ToastService,
private storage: Storage private storage: Storage,
public p:PermissionService,
) { ) {
this.item = new PublicationFolder(); this.item = new PublicationFolder();
} }
@@ -69,7 +71,7 @@ export class ViewPublicationsPage implements OnInit {
//setTimeout(()=>{ //setTimeout(()=>{
this.getPublicationDetail(); this.getPublicationDetail();
this.getPublicationsIds(); this.getPublicationsIds();
//}, 100) //}, 100)
+6 -4
View File
@@ -22,11 +22,13 @@
export const environment = { export const environment = {
production: false, production: false,
//apiURL: 'https://gabinetedigital.dyndns.info/GabineteDigital.Services/V5/api/', //apiURL: 'https://gabinetedigital.dyndns.info/GabineteDigital.Services/V5/api/',
apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/V5/api/',
apiChatUrl: 'https://gabinetedigitalchat.dyndns.info/api/v1/', apiChatUrl: 'https://gabinetedigitalchat.dyndns.info/api/v1/',
apiWsChatUrl: 'wss://gabinetedigitalchat.dyndns.info/websocket', apiWsChatUrl: 'wss://gabinetedigitalchat.dyndns.info/websocket',
//apiChatUrl: 'https://www.tabularium.pt/api/v1/',
//apiWsChatUrl: 'wss://www.tabularium.pt/websocket', apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/V5/api/',
/* apiChatUrl: 'https://www.tabularium.pt/api/v1/',
apiWsChatUrl: 'wss://www.tabularium.pt/websocket', */
/* apiChatUrl: 'http://chat.gabinetedigital.local:3000/api/v1/', */
domain: 'gabinetedigital.local', //gabinetedigital.local domain: 'gabinetedigital.local', //gabinetedigital.local
defaultuser: 'paulo.pinto@gabinetedigital.local',//paulo.pinto paulo.pinto@gabinetedigital.local defaultuser: 'paulo.pinto@gabinetedigital.local',//paulo.pinto paulo.pinto@gabinetedigital.local
defaultuserpwd: 'tabteste@006', //tabteste@006, defaultuserpwd: 'tabteste@006', //tabteste@006,