This commit is contained in:
tiago.kayaya
2021-05-21 11:09:24 +01:00
6 changed files with 45 additions and 21 deletions
+5 -5
View File
@@ -538,8 +538,8 @@ export class AgendaPage implements OnInit {
//this.eventSource=[];
if(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(
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 => {
// calendar
@@ -576,7 +576,7 @@ export class AgendaPage implements OnInit {
this.timelineBoxCorrectHeight(500);
this.centralizeTimeline(500);
});
});
}
else {
@@ -627,7 +627,7 @@ export class AgendaPage implements OnInit {
case "Pessoal":
//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.eventSource=[];
@@ -703,7 +703,7 @@ export class AgendaPage implements OnInit {
//Inicializa o array eventSource
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.eventSource=[];
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 { GabineteDigitalPage } from '../gabinete-digital/gabinete-digital.page';
import { EditEventPage } from '../agenda/edit-event/edit-event.page';
import { User } from 'src/app/models/user.model';
@Component({
selector: 'app-events',
@@ -63,6 +64,8 @@ export class EventsPage implements OnInit {
@Output() openExpedientListPage:EventEmitter<any> = new EventEmitter<any>();
loggeduser: User;
constructor(private eventService: EventsService,
private router: Router,
private storageService:StorageService,
@@ -72,6 +75,9 @@ export class EventsPage implements OnInit {
private processes:ProcessesService,
/* private gabineteService: GabineteDigitalPage, */
private modalController:ModalController) {
this.loggeduser = authService.ValidatedUser;
this.prEventList = null;
// list
@@ -127,7 +133,7 @@ export class EventsPage implements OnInit {
switch (this.segment)
{
case "Combinada":
if(this.profile == "mdgpr"){
if(this.loggeduser.Profile == 'MDGPR'){
this.eventService.getAllMdEvents(start, end).subscribe(res => {
this.eventsList = res;
@@ -158,7 +164,7 @@ export class EventsPage implements OnInit {
break;
case "Pessoal":
if(this.profile == "mdgpr"){
if(this.loggeduser.Profile == 'MDGPR'){
this.eventService.getAllMdEvents(start, end).subscribe(res => {
this.personaleventsList = res.filter(data => data.CalendarName == "Pessoal");
this.showLoader = false;
@@ -172,7 +178,7 @@ export class EventsPage implements OnInit {
break;
case "Oficial":
if(this.profile == "mdgpr"){
if(this.loggeduser.Profile == 'MDGPR'){
this.eventService.getAllMdEvents(start, end).subscribe(res => {
this.officialeventsList = res.filter(data => data.CalendarName == "Oficial");;
this.showLoader = false;
@@ -1,5 +1,4 @@
<ion-header class="ion-no-border">
<app-btn-modal-dismiss></app-btn-modal-dismiss>
<ion-header>
<div class="title">
<div class="thetitle"><ion-label >Despachos</ion-label></div>
<div class="theicon">
@@ -23,13 +22,13 @@
<div *ngIf="despachoList">
<ion-list>
<ion-item
class="expediente ion-no-padding"
class="expediente ion-no-padding cursor-pointer"
*ngFor = "let task of despachoList; let i = index"
(click)="viewExpedientDetail(task.SerialNumber)"
>
<!-- [routerLink]="['/home/gabinete-digital/expediente',task.SerialNumber]" -->
<div class="item width-100">
<div class="exp-top-detail ">
<div class="exp-top-detail">
<div class="exp-date">
<ion-label>{{ task.CreateDate | date: 'dd-MM-yy' }}</ion-label>
</div>
@@ -37,7 +36,7 @@
<ion-label>{{task.Senders}}</ion-label>
</div>
<div class="exp-workflow">
<span class="label">{{task.WorkflowName}}</span>
<span class="label">{{task.activityInstanceName}}</span>
</div>
<div class="exp-icon d-flex align-center">
<ion-icon src="assets/images/icons-expediente-attachment.svg"></ion-icon>
@@ -57,7 +56,7 @@
</div>
</div>
<div *ngIf="!despachoList">
<div *ngIf="despachoList.length < 1">
<ion-list>
<ion-item>
@@ -10,11 +10,11 @@
color:#000;
overflow: auto;
.thetitle{
.thetitle {
width: fit-content;
float: left;
}
.theicon{
.theicon {
width: fit-content;
float: right;
}
@@ -167,11 +167,24 @@ ion-item{
margin: 2.5px 0 2.5px 71px;
float: left;
}
.div-logo img{
.div-logo img {
width: 100%;
}
.div-profile{
font-size: 45px;
float: right;
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>
</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">
<ion-icon src="assets/images/icons-despachos-presidente.svg"></ion-icon>
</div>
@@ -78,11 +78,12 @@
<p class="text-center exp-card-content"><span class="number">-</span> <span class="title1">Documentos</span></p>
</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">
<ion-icon src="assets/images/icons-despachos-presidente.svg"></ion-icon>
</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>
</div>
@@ -98,7 +99,7 @@
</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="exp-card-icon">
<ion-icon src="assets/images/icons-despachos-presidente.svg"></ion-icon>