This commit is contained in:
tiago.kayaya
2021-05-21 11:09:24 +01:00
6 changed files with 45 additions and 21 deletions
+3 -3
View File
@@ -538,7 +538,7 @@ export class AgendaPage implements OnInit {
//this.eventSource=[]; //this.eventSource=[];
if(this.loggeduser.Profile == 'MDGPR' ) { if(this.profile == "mdgpr" && this.loggeduser.Profile == 'MDGPR' ) {
this.eventService.getAllMdEvents( momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59') ).subscribe( this.eventService.getAllMdEvents( momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59') ).subscribe(
response => { response => {
@@ -627,7 +627,7 @@ export class AgendaPage implements OnInit {
case "Pessoal": case "Pessoal":
//Inicializa o array eventSource //Inicializa o array eventSource
if(this.loggeduser.Profile == 'MDGPR') { if(this.profile == "mdgpr" && this.loggeduser.Profile == 'MDGPR') {
this.eventService.getAllMdEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).subscribe(response => { this.eventService.getAllMdEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).subscribe(response => {
this.eventSource=[]; this.eventSource=[];
@@ -703,7 +703,7 @@ export class AgendaPage implements OnInit {
//Inicializa o array eventSource //Inicializa o array eventSource
this.eventsListOficial = []; this.eventsListOficial = [];
if(this.loggeduser.Profile == 'MDGPR') { if(this.profile == "mdgpr" && this.loggeduser.Profile == 'MDGPR') {
this.eventService.getAllMdEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).subscribe(res => { this.eventService.getAllMdEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).subscribe(res => {
this.eventSource=[]; this.eventSource=[];
this.eventsListOficial = res.filter(data => data.CalendarName == "Oficial"); this.eventsListOficial = res.filter(data => data.CalendarName == "Oficial");
+9 -3
View File
@@ -18,6 +18,7 @@ import { ExpedienteDetailPage } from '../gabinete-digital/expediente/expediente-
import { EventEditPage } from './edit-event/edit-event.component'; import { EventEditPage } from './edit-event/edit-event.component';
import { GabineteDigitalPage } from '../gabinete-digital/gabinete-digital.page'; import { GabineteDigitalPage } from '../gabinete-digital/gabinete-digital.page';
import { EditEventPage } from '../agenda/edit-event/edit-event.page'; import { EditEventPage } from '../agenda/edit-event/edit-event.page';
import { User } from 'src/app/models/user.model';
@Component({ @Component({
selector: 'app-events', selector: 'app-events',
@@ -63,6 +64,8 @@ export class EventsPage implements OnInit {
@Output() openExpedientListPage:EventEmitter<any> = new EventEmitter<any>(); @Output() openExpedientListPage:EventEmitter<any> = new EventEmitter<any>();
loggeduser: User;
constructor(private eventService: EventsService, constructor(private eventService: EventsService,
private router: Router, private router: Router,
private storageService:StorageService, private storageService:StorageService,
@@ -72,6 +75,9 @@ export class EventsPage implements OnInit {
private processes:ProcessesService, private processes:ProcessesService,
/* private gabineteService: GabineteDigitalPage, */ /* private gabineteService: GabineteDigitalPage, */
private modalController:ModalController) { private modalController:ModalController) {
this.loggeduser = authService.ValidatedUser;
this.prEventList = null; this.prEventList = null;
// list // list
@@ -127,7 +133,7 @@ export class EventsPage implements OnInit {
switch (this.segment) switch (this.segment)
{ {
case "Combinada": case "Combinada":
if(this.profile == "mdgpr"){ if(this.loggeduser.Profile == 'MDGPR'){
this.eventService.getAllMdEvents(start, end).subscribe(res => { this.eventService.getAllMdEvents(start, end).subscribe(res => {
this.eventsList = res; this.eventsList = res;
@@ -158,7 +164,7 @@ export class EventsPage implements OnInit {
break; break;
case "Pessoal": case "Pessoal":
if(this.profile == "mdgpr"){ if(this.loggeduser.Profile == 'MDGPR'){
this.eventService.getAllMdEvents(start, end).subscribe(res => { this.eventService.getAllMdEvents(start, end).subscribe(res => {
this.personaleventsList = res.filter(data => data.CalendarName == "Pessoal"); this.personaleventsList = res.filter(data => data.CalendarName == "Pessoal");
this.showLoader = false; this.showLoader = false;
@@ -172,7 +178,7 @@ export class EventsPage implements OnInit {
break; break;
case "Oficial": case "Oficial":
if(this.profile == "mdgpr"){ if(this.loggeduser.Profile == 'MDGPR'){
this.eventService.getAllMdEvents(start, end).subscribe(res => { this.eventService.getAllMdEvents(start, end).subscribe(res => {
this.officialeventsList = res.filter(data => data.CalendarName == "Oficial");; this.officialeventsList = res.filter(data => data.CalendarName == "Oficial");;
this.showLoader = false; this.showLoader = false;
@@ -1,5 +1,4 @@
<ion-header class="ion-no-border"> <ion-header>
<app-btn-modal-dismiss></app-btn-modal-dismiss>
<div class="title"> <div class="title">
<div class="thetitle"><ion-label >Despachos</ion-label></div> <div class="thetitle"><ion-label >Despachos</ion-label></div>
<div class="theicon"> <div class="theicon">
@@ -23,7 +22,7 @@
<div *ngIf="despachoList"> <div *ngIf="despachoList">
<ion-list> <ion-list>
<ion-item <ion-item
class="expediente ion-no-padding" class="expediente ion-no-padding cursor-pointer"
*ngFor = "let task of despachoList; let i = index" *ngFor = "let task of despachoList; let i = index"
(click)="viewExpedientDetail(task.SerialNumber)" (click)="viewExpedientDetail(task.SerialNumber)"
> >
@@ -37,7 +36,7 @@
<ion-label>{{task.Senders}}</ion-label> <ion-label>{{task.Senders}}</ion-label>
</div> </div>
<div class="exp-workflow"> <div class="exp-workflow">
<span class="label">{{task.WorkflowName}}</span> <span class="label">{{task.activityInstanceName}}</span>
</div> </div>
<div class="exp-icon d-flex align-center"> <div class="exp-icon d-flex align-center">
<ion-icon src="assets/images/icons-expediente-attachment.svg"></ion-icon> <ion-icon src="assets/images/icons-expediente-attachment.svg"></ion-icon>
@@ -57,7 +56,7 @@
</div> </div>
</div> </div>
<div *ngIf="!despachoList"> <div *ngIf="despachoList.length < 1">
<ion-list> <ion-list>
<ion-item> <ion-item>
@@ -175,3 +175,16 @@ ion-item{
float: right; float: right;
margin-right: 10px; margin-right: 10px;
} }
.exp-workflow{
float: left;
margin-left: 15px;
.label{
border-radius: 20px;
background: #ffb703;
font-size: 12px;
float: right;
padding: 2.5px 13.5px 2.5px 13.5px;
color: #fff;
}
}
@@ -46,7 +46,7 @@
<p class="text-center exp-card-content"><span class="number">{{count_total_pending}} </span> <span class="title1">Documentos</span></p> <p class="text-center exp-card-content"><span class="number">{{count_total_pending}} </span> <span class="title1">Documentos</span></p>
</div> </div>
<div [class.active]="selectedElement == 'Dispatches'" class="exp-card d-flex flex-column justify-center" (click)="openDespachosPage(); selectedElement='Dispatches'"> <div [class.active]="selectedElement == 'Dispatches'" class="exp-card d-flex flex-column justify-center" (click)="openDespachosPage(); selectedElement='Dispatches'" *ngIf="loggeduser.Profile == 'MDGPR'">
<div class="d-flex justify-center"> <div class="d-flex justify-center">
<ion-icon src="assets/images/icons-despachos-presidente.svg"></ion-icon> <ion-icon src="assets/images/icons-despachos-presidente.svg"></ion-icon>
</div> </div>
@@ -78,11 +78,12 @@
<p class="text-center exp-card-content"><span class="number">-</span> <span class="title1">Documentos</span></p> <p class="text-center exp-card-content"><span class="number">-</span> <span class="title1">Documentos</span></p>
</div> </div>
<div (click)="openDespachosPrPage(); selectedElement='DispatchesPr'" [class.active]="selectedElement == 'DispatchesPr'" class="exp-card d-md-flex d-none flex-column justify-center" *ngIf="loggeduser.Profile == 'MDGPR'"> <div (click)="openDespachosPrPage(); selectedElement='DispatchesPr'" [class.active]="selectedElement == 'DispatchesPr'" class="exp-card d-md-flex d-none flex-column justify-center" >
<div class="d-flex justify-center"> <div class="d-flex justify-center">
<ion-icon src="assets/images/icons-despachos-presidente.svg"></ion-icon> <ion-icon src="assets/images/icons-despachos-presidente.svg"></ion-icon>
</div> </div>
<p class="text-center exp-card-title ">Despacho do Presidente da República</p> <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="loggeduser.Profile == 'PR'">Despacho</p>
<p class="text-center exp-card-content"><span class="number">{{ count_de_pr }}</span> <span class="title1">Documentos</span> </p> <p class="text-center exp-card-content"><span class="number">{{ count_de_pr }}</span> <span class="title1">Documentos</span> </p>
</div> </div>
@@ -98,7 +99,7 @@
</div> </div>
</div> </div>
<div (click)="openDespachosPrPage(); selectedElement='showDespachosPr'" [class.active]="selectedElement == 'showDespachosPr'" class="exp-card-long width-100" *ngIf="loggeduser.Profile == 'MDGPR'"> <div (click)="openDespachosPrPage(); selectedElement='showDespachosPr'" [class.active]="selectedElement == 'showDespachosPr'" class="exp-card-long width-100" >
<div class="center-div"> <div class="center-div">
<div class="exp-card-icon"> <div class="exp-card-icon">
<ion-icon src="assets/images/icons-despachos-presidente.svg"></ion-icon> <ion-icon src="assets/images/icons-despachos-presidente.svg"></ion-icon>
@@ -15,6 +15,7 @@ import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discar
import { AuthService } from 'src/app/services/auth.service'; import { AuthService } from 'src/app/services/auth.service';
import { DespachoPage } from 'src/app/pages/gabinete-digital/despachos/despacho/despacho.page'; import { DespachoPage } from 'src/app/pages/gabinete-digital/despachos/despacho/despacho.page';
import { DespachoPrPage } from 'src/app/pages/gabinete-digital/despachos-pr/despacho-pr/despacho-pr.page'; import { DespachoPrPage } from 'src/app/pages/gabinete-digital/despachos-pr/despacho-pr/despacho-pr.page';
import { User } from 'src/app/models/user.model';
@Component({ @Component({
selector: 'app-despachos-pr', selector: 'app-despachos-pr',
@@ -45,13 +46,17 @@ loadedAttachments:any;
dicIndex = 0; dicIndex = 0;
inicial = false inicial = false
loggeduser: User;
constructor ( constructor (
private processes:ProcessesService, private processes:ProcessesService,
private modalController: ModalController, private modalController: ModalController,
private alertService: AlertService, private alertService: AlertService,
private authService: AuthService, private authService: AuthService,
) { ) {
this.profile = 'mdgpr'; this.profile = 'mdgpr';
this.loggeduser = authService.ValidatedUser;
} }
ngOnInit() { ngOnInit() {