fix issues

This commit is contained in:
Peter Maquiran
2023-06-13 20:37:23 +01:00
parent f8f0d39be9
commit f023501d9e
11 changed files with 42 additions and 21 deletions
@@ -77,7 +77,6 @@
</ion-list>
</div>
</div>
<div *ngIf="task" class="aside-right flex-column height-100 overflow-y-auto">
<div class="buttons" *ngIf="task.activityInstanceName == 'Revisar Diploma'">
<button (click)="openAddNoteModal('Solicitar assinatura')" class="btn-cancel" shape="round" >Solicitar assinatura do Presidente</button>
@@ -56,7 +56,7 @@
</mat-form-field>
</div>
<ion-toolbar>
<ion-segment [(ngModel)]="segment" (ionChange)="segmentChanged($event)">
<ion-segment [(ngModel)]="segment" (ionChange)="segmentChanged($event)" class="row-reverse">
<!-- <ion-segment-button value="MDGPR">
Minha agenda
</ion-segment-button> -->
@@ -69,6 +69,12 @@ export class EventListPage implements OnInit {
} else {
this.segment = this.eventService.calendarNamesAry[0].OwnerUserId
}
// select pr by default
// const pr = this.eventService.calendarNamesAry.find( e => e.Role == 'Presidente da República')
// if(pr) {
// this.segment = pr.OwnerUserId
// }
}
const location = window.location
@@ -305,10 +305,10 @@ export class GabineteDigitalPage implements OnInit {
if (activityName == 'Tarefa de Despacho' || activityName == 'Concluir Despacho') {
this.router.navigate(['/home/gabinete-digital/despachos-pr', serialNumber, 'gabinete-digital']);
}
else if (activityName == 'Revisar Diploma' || activityName == 'Assinar Diploma') {
else if (activityName == 'Revisar Diploma' ) {
this.router.navigate(['/home/gabinete-digital/diplomas', serialNumber, 'gabinete-digital']);
}
else if (activityName == 'Diploma Assinado') {
else if (activityName == 'Diploma Assinado' || activityName == 'Assinar Diploma') {
this.router.navigate(['/home/gabinete-digital/diplomas-assinar', serialNumber, 'gabinete-digital']);
} else {
@@ -8,8 +8,8 @@
</button>
</div>
</div>
<ion-toolbar>
<ion-segment [(ngModel)]="segment" (ionChange)="segmentChanged($event)">
<ion-toolbar >
<ion-segment [(ngModel)]="segment" (ionChange)="segmentChanged($event)" class="row-reverse">
<ion-segment-button *ngFor="let calendars of eventService.calendarNamesAryReverse; let i index" [value]="i === 'Meu calendario' ? 'Meu calendario' : i.OwnerUserId ">
<div *ngIf="calendars == 'Meu calendario'"> Minha agenda </div>
<div *ngIf="calendars != 'Meu calendario' && calendars.Role == 'Presidente da República'"> {{ environment.agendaPR}} </div>
@@ -45,13 +45,22 @@ export class EventListPage implements OnInit {
) {
this.loggeduser = SessionStore.user;
if(!this.segment) {
if(this.eventService.calendarNamesAry.includes('Meu calendario')) {
this.segment = 'Meu calendario';
} else {
this.segment = this.eventService.calendarNamesAry[0].OwnerUserId
}
}
ngAfterViewInit(): void {
if(!this.segment) {
if(this.eventService.calendarNamesAry.includes('Meu calendario')) {
this.segment = 'Meu calendario';
} else {
this.segment = this.eventService.calendarNamesAry[0].OwnerUserId
}
// const pr = this.eventService.calendarNamesAry.find( e => e.Role == 'Presidente da República')
// if(pr) {
// this.segment = pr.OwnerUserId
// }
}
}
ngOnInit() {
@@ -1,8 +1,7 @@
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, NavigationEnd, Router } from '@angular/router';
import { NavigationEnd, Router } from '@angular/router';
import { LoginUserRespose } from 'src/app/models/user.model';
import { ThemeService } from 'src/app/services/theme.service'
import { SessionStore } from 'src/app/store/session.service';
import { TaskService } from 'src/app/services/task.service'
/* import MiniSearch from 'minisearch' */
@@ -86,7 +86,7 @@
</div>
<ion-toolbar>
<ion-segment [(ngModel)]="segment" (ionChange)="segmentChanged($event)">
<ion-segment [(ngModel)]="segment" (ionChange)="segmentChanged($event)" class="row-reverse">
<!-- <ion-segment-button value="MDGPR">
Minha agenda
</ion-segment-button> -->
@@ -68,6 +68,11 @@ export class EventsToApprovePage implements OnInit {
} else {
this.segment = this.eventService.calendarNamesAry[0].OwnerUserId
}
// const pr = this.eventService.calendarNamesAry.find( e => e.Role == 'Presidente da República')
// if(pr) {
// this.segment = pr.OwnerUserId
// }
}
this.LoadToApproveEvents()