order event to aprove tabs

This commit is contained in:
Eudes Inácio
2023-06-13 11:49:58 +01:00
7 changed files with 45 additions and 22 deletions
@@ -60,8 +60,13 @@
<!-- <ion-segment-button value="MDGPR"> <!-- <ion-segment-button value="MDGPR">
Minha agenda Minha agenda
</ion-segment-button> --> </ion-segment-button> -->
<ion-segment-button *ngFor="let calendars of eventService.calendarNamesAryPR; let i index" [value]="i === 'Meu calendario' ? 'Meu calendario' : i.OwnerUserId ">
<ion-segment-button *ngFor="let calendars of eventService.calendarNamesAryReverse; let i index" [value]="i === 'Meu calendario' ? 'Meu calendario' : i.OwnerUserId || calendars.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'"> Minha agenda </div>
<div *ngIf="calendars != 'Meu calendario' && calendars.Role == 'Presidente da República'"> {{ environment.agendaPR}} </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'"> {{ environment.agendaVP}} </div>
@@ -212,9 +212,7 @@ export class EventListPage implements OnInit {
}, 1000); }, 1000);
} }
close() {
this.modalController.dismiss(null);
}
goBack() { goBack() {
this.RouteService.goBack() this.RouteService.goBack()
} }
+10 -3
View File
@@ -51,7 +51,9 @@ export class EventsService {
calendarNames = {} calendarNames = {}
calendarNamesAry = [] calendarNamesAry = []
calendarNamesAryNoPr = []
calendarNamesAryReverse = [] calendarNamesAryReverse = []
calendarNamesAryPR = []
calendarNamesType = {} calendarNamesType = {}
calendarRole = [] calendarRole = []
@@ -64,9 +66,7 @@ export class EventsService {
private http: HttpClient, private http: HttpClient,
public user: AuthService, public user: AuthService,
private changeProfileService: ChangeProfileService, private changeProfileService: ChangeProfileService,
private offlinemanager: OfflineManagerService, private offlinemanager: OfflineManagerService) {
private storage: Storage,
private backgroundservice: BackgroundService) {
this.setHeader() this.setHeader()
this.changeProfileService.registerCallback(() => { this.changeProfileService.registerCallback(() => {
@@ -272,6 +272,12 @@ export class EventsService {
this.calendarNamesAry.push(objectShared) this.calendarNamesAry.push(objectShared)
if(e.Role == 'Presidente da República') {
this.calendarNamesAryPR.push(objectShared)
} else {
this.calendarNamesAryNoPr.push(objectShared)
}
this.calendarNamesType[e.FullName] = {} this.calendarNamesType[e.FullName] = {}
} }
@@ -291,6 +297,7 @@ export class EventsService {
if(!this.calendarNamesAry.includes('Meu calendario')) { if(!this.calendarNamesAry.includes('Meu calendario')) {
this.calendarNamesAry.push('Meu calendario') this.calendarNamesAry.push('Meu calendario')
this.calendarNamesAryNoPr.push('Meu calendario')
this.calendarNamesType['Meu calendario'] = {} this.calendarNamesType['Meu calendario'] = {}
} }
@@ -10,7 +10,13 @@
</div> </div>
<ion-toolbar> <ion-toolbar>
<ion-segment [(ngModel)]="segment" (ionChange)="segmentChanged($event)"> <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'"> Minha agenda </div>
<div *ngIf="calendars != 'Meu calendario' && calendars.Role == 'Presidente da República'"> {{ environment.agendaPR}} </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'"> {{ environment.agendaVP}} </div>
@@ -91,10 +91,16 @@
Minha agenda Minha agenda
</ion-segment-button> --> </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'"> Minha agenda </div>
<div *ngIf="calendars != 'Meu calendario' && calendars.Role == 'Presidente da República'"> {{ environment.agendaPR}} </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'"> {{ 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> <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>
</ion-segment> </ion-segment>
@@ -151,6 +151,7 @@ export class EventsToApprovePage implements OnInit {
segmentChanged(ev: any) { segmentChanged(ev: any) {
this.LoadToApproveEvents(); this.LoadToApproveEvents();
this.dynamicSearch()
} }
async LoadToApproveEvents() { async LoadToApproveEvents() {
+6 -6
View File
@@ -1,12 +1,12 @@
export let versionData = { export let versionData = {
"shortSHA": "5cec6d8b7", "shortSHA": "a8c4bccfe",
"SHA": "5cec6d8b76f33d2e625b2fa5f37606d5742d52e6", "SHA": "a8c4bccfedb2866c629c9744da471b0a7ec519e0",
"branch": "feature/gabinete-search", "branch": "feature/gabinete-search",
"lastCommitAuthor": "'Eudes Inácio'", "lastCommitAuthor": "'Eudes Inácio'",
"lastCommitTime": "'Tue Jun 13 11:01:08 2023 +0100'", "lastCommitTime": "'Tue Jun 13 11:47:56 2023 +0100'",
"lastCommitMessage": "changes", "lastCommitMessage": "bug fix by Peter",
"lastCommitNumber": "5013", "lastCommitNumber": "5015",
"change": "", "change": "",
"changeStatus": "On branch feature/gabinete-search\nYour branch and 'origin/feature/gabinete-search' have diverged,\nand have 5 and 2 different commits each, respectively.\n (use \"git pull\" to merge the remote branch into yours)\n\nAll conflicts fixed but you are still merging.\n (use \"git commit\" to conclude merge)\n\nChanges to be committed:\n\tmodified: src/app/app.module.ts\n\tmodified: src/app/pages/gabinete-digital/diplomas/diplomas.page.ts\n\tmodified: src/app/pages/gabinete-digital/gabinete-digital.page.html\n\tmodified: src/app/pages/gabinete-digital/gabinete-digital.page.ts", "changeStatus": "On branch feature/gabinete-search\nYour branch and 'origin/feature/gabinete-search' have diverged,\nand have 6 and 1 different commits each, respectively.\n (use \"git pull\" to merge the remote branch into yours)\n\nAll conflicts fixed but you are still merging.\n (use \"git commit\" to conclude merge)\n\nChanges to be committed:\n\tmodified: src/app/pages/gabinete-digital/event-list/event-list.page.html\n\tmodified: src/app/pages/gabinete-digital/event-list/event-list.page.ts\n\tmodified: src/app/services/events.service.ts\n\tmodified: src/app/shared/agenda/event-list/event-list.page.html\n\tmodified: src/app/shared/gabinete-digital/events-to-approve/events-to-approve.page.html\n\tmodified: src/app/shared/gabinete-digital/events-to-approve/events-to-approve.page.ts",
"changeAuthor": "eudes.inacio" "changeAuthor": "eudes.inacio"
} }