mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
tab organization
This commit is contained in:
@@ -60,12 +60,17 @@
|
||||
<!-- <ion-segment-button value="MDGPR">
|
||||
Minha agenda
|
||||
</ion-segment-button> -->
|
||||
|
||||
<ion-segment-button *ngFor="let calendars of eventService.calendarNamesAryReverse; let i index" [value]="i === 'Meu calendario' ? 'Meu calendario' : i.OwnerUserId || calendars.OwnerUserId">
|
||||
<ion-segment-button *ngFor="let calendars of eventService.calendarNamesAryPR; 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>
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars.Role == 'Ministro e Director do Gabinete do PR'"> {{ environment.agendaVP}} </div>
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars.Role != 'Ministro e Director do Gabinete do PR' && calendars.Role != 'Presidente da República'"> Agenda do {{calendars.Fullname}}</div>
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars.Role != 'Ministro e Director do Gabinete do PR' && calendars.Role != 'Presidente da República'"> Agenda do {{calendars.Fullname}} </div>
|
||||
</ion-segment-button>
|
||||
<ion-segment-button *ngFor="let calendars of eventService.calendarNamesAryNoPr; 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>
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars.Role == 'Ministro e Director do Gabinete do PR'"> {{ environment.agendaVP}} </div>
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars.Role != 'Ministro e Director do Gabinete do PR' && calendars.Role != 'Presidente da República'"> Agenda do {{calendars.Fullname}} </div>
|
||||
</ion-segment-button>
|
||||
</ion-segment>
|
||||
</ion-toolbar>
|
||||
|
||||
@@ -212,9 +212,7 @@ export class EventListPage implements OnInit {
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
close() {
|
||||
this.modalController.dismiss(null);
|
||||
}
|
||||
|
||||
goBack() {
|
||||
this.RouteService.goBack()
|
||||
}
|
||||
|
||||
@@ -51,7 +51,9 @@ export class EventsService {
|
||||
calendarNames = {}
|
||||
|
||||
calendarNamesAry = []
|
||||
calendarNamesAryNoPr = []
|
||||
calendarNamesAryReverse = []
|
||||
calendarNamesAryPR = []
|
||||
|
||||
calendarNamesType = {}
|
||||
calendarRole = []
|
||||
@@ -64,9 +66,7 @@ export class EventsService {
|
||||
private http: HttpClient,
|
||||
public user: AuthService,
|
||||
private changeProfileService: ChangeProfileService,
|
||||
private offlinemanager: OfflineManagerService,
|
||||
private storage: Storage,
|
||||
private backgroundservice: BackgroundService) {
|
||||
private offlinemanager: OfflineManagerService) {
|
||||
|
||||
this.setHeader()
|
||||
this.changeProfileService.registerCallback(() => {
|
||||
@@ -213,8 +213,8 @@ export class EventsService {
|
||||
this.hasOwnPessoal = true
|
||||
|
||||
this.headerOwnPessoal = this.headerOwnPessoal.set('Authorization', SessionStore.user.BasicAuthKey);
|
||||
this.headerOwnPessoal =this.headerOwnPessoal.set('CalendarId', calendar.CalendarId);
|
||||
this.headerOwnPessoal =this.headerOwnPessoal.set('CalendarRoleId', calendar.CalendarRoleId);
|
||||
this.headerOwnPessoal = this.headerOwnPessoal.set('CalendarId', calendar.CalendarId);
|
||||
this.headerOwnPessoal = this.headerOwnPessoal.set('CalendarRoleId', calendar.CalendarRoleId);
|
||||
this.headerOwnPessoal = this.headerOwnPessoal.set('CalendarName', calendar.CalendarName);
|
||||
}
|
||||
}
|
||||
@@ -271,6 +271,12 @@ export class EventsService {
|
||||
}
|
||||
|
||||
this.calendarNamesAry.push(objectShared)
|
||||
|
||||
if(e.Role == 'Presidente da República') {
|
||||
this.calendarNamesAryPR.push(objectShared)
|
||||
} else {
|
||||
this.calendarNamesAryNoPr.push(objectShared)
|
||||
}
|
||||
|
||||
this.calendarNamesType[e.FullName] = {}
|
||||
}
|
||||
@@ -291,6 +297,7 @@ export class EventsService {
|
||||
|
||||
if(!this.calendarNamesAry.includes('Meu calendario')) {
|
||||
this.calendarNamesAry.push('Meu calendario')
|
||||
this.calendarNamesAryNoPr.push('Meu calendario')
|
||||
this.calendarNamesType['Meu calendario'] = {}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,13 @@
|
||||
</div>
|
||||
<ion-toolbar>
|
||||
<ion-segment [(ngModel)]="segment" (ionChange)="segmentChanged($event)">
|
||||
<ion-segment-button *ngFor="let calendars of eventService.calendarNamesAryReverse; let i index" [value]="i === 'Meu calendario' ? 'Meu calendario' : i.OwnerUserId ">
|
||||
<ion-segment-button *ngFor="let calendars of eventService.calendarNamesAryPR; 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>
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars.Role == 'Ministro e Director do Gabinete do PR'"> {{ environment.agendaVP}} </div>
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars.Role != 'Ministro e Director do Gabinete do PR' && calendars.Role != 'Presidente da República'"> Agenda do {{calendars.Fullname}} </div>
|
||||
</ion-segment-button>
|
||||
<ion-segment-button *ngFor="let calendars of eventService.calendarNamesAryNoPr; 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>
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars.Role == 'Ministro e Director do Gabinete do PR'"> {{ environment.agendaVP}} </div>
|
||||
|
||||
@@ -91,11 +91,17 @@
|
||||
Minha agenda
|
||||
</ion-segment-button> -->
|
||||
|
||||
<ion-segment-button *ngFor="let calendars of eventService.calendarNamesAry; let i index" [value]="i === 'Meu calendario' ? 'Meu calendario' : i.OwnerUserId" (ionChange)="dynamicSearch()">
|
||||
<ion-segment-button *ngFor="let calendars of eventService.calendarNamesAryPR; 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>
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars.Role == 'Ministro e Director do Gabinete do PR'"> environment.agendaVP </div>
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars.Role != 'Ministro e Director do Gabinete do PR' && calendars.Role != 'Presidente da República'"> Agenda do {{calendars.Fullname }} </div>
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars.Role == 'Presidente da República'"> {{ environment.agendaPR}} </div>
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars.Role == 'Ministro e Director do Gabinete do PR'"> {{ environment.agendaVP}} </div>
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars.Role != 'Ministro e Director do Gabinete do PR' && calendars.Role != 'Presidente da República'"> Agenda do {{calendars.Fullname}} </div>
|
||||
</ion-segment-button>
|
||||
<ion-segment-button *ngFor="let calendars of eventService.calendarNamesAryNoPr; 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>
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars.Role == 'Ministro e Director do Gabinete do PR'"> {{ environment.agendaVP}} </div>
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars.Role != 'Ministro e Director do Gabinete do PR' && calendars.Role != 'Presidente da República'"> Agenda do {{calendars.Fullname}} </div>
|
||||
</ion-segment-button>
|
||||
</ion-segment>
|
||||
</ion-toolbar>
|
||||
|
||||
@@ -151,6 +151,7 @@ export class EventsToApprovePage implements OnInit {
|
||||
|
||||
segmentChanged(ev: any) {
|
||||
this.LoadToApproveEvents();
|
||||
this.dynamicSearch()
|
||||
}
|
||||
|
||||
async LoadToApproveEvents() {
|
||||
|
||||
Reference in New Issue
Block a user