mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 13:26:08 +00:00
agendas order
This commit is contained in:
@@ -1031,7 +1031,7 @@ $font-size: rem(15);
|
||||
}
|
||||
|
||||
.height-356 {
|
||||
height: 360px;
|
||||
height: 369px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -66,7 +66,6 @@
|
||||
<!-- <span *ngIf="SessionStore.user.Profile == 'PR' ">PR</span>
|
||||
<span *ngIf="SessionStore.user.Profile == 'MDGPR' ">MDGPR</span>
|
||||
<span *ngIf="SessionStore.user.Profile != 'MDGPR' && SessionStore.user.Profile != 'PR' ">Minha agenda</span> -->
|
||||
|
||||
Minha agenda
|
||||
</div>
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars.Role == 'Presidente da República'"> {{ environment.agendaPR}} </div>
|
||||
@@ -74,12 +73,20 @@
|
||||
<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 ">
|
||||
<ion-segment-button [class.d-none]="!eventService.HasMdGPR" *ngFor="let calendars of eventService.calendarNamesAryOnlyMD; 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.calendarNamesAryNoPrNMD; 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>
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import { NgxImageCompressService } from "ngx-image-compress";
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
import { PublicationFolderService } from 'src/app/store/publication-folder.service';
|
||||
|
||||
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
const IMAGE_DIR = 'stored-images';
|
||||
|
||||
interface LocalFile {
|
||||
@@ -90,7 +90,8 @@ export class NewPublicationPage implements OnInit {
|
||||
private loadingCtrl: LoadingController,
|
||||
public imageCompress: NgxImageCompressService,
|
||||
private httpErrorHandle: HttpErrorHandle,
|
||||
public PublicationFolderService: PublicationFolderService
|
||||
public PublicationFolderService: PublicationFolderService,
|
||||
private RouteService: RouteService,
|
||||
) {
|
||||
|
||||
this.publicationType = this.navParams.get('publicationType');
|
||||
@@ -231,7 +232,7 @@ export class NewPublicationPage implements OnInit {
|
||||
this.httpErrorHandle.httpsSucessMessagge('Publicação Editada')
|
||||
console.log({response})
|
||||
|
||||
this.close();
|
||||
this.RouteService.goBack()
|
||||
} catch (error) {
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
@@ -260,7 +261,7 @@ export class NewPublicationPage implements OnInit {
|
||||
this.httpErrorHandle.httpsSucessMessagge('Criar publicação')
|
||||
console.log({response})
|
||||
|
||||
this.close();
|
||||
this.RouteService.goBack()
|
||||
} catch (error) {
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
@@ -286,7 +287,7 @@ export class NewPublicationPage implements OnInit {
|
||||
const response = await this.publications.UpdatePublication(this.publication.ProcessId, this.publication).toPromise()
|
||||
this.httpErrorHandle.httpsSucessMessagge('Publicação Editada')
|
||||
console.log({response})
|
||||
this.close();
|
||||
this.RouteService.goBack()
|
||||
} catch (error) {
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
|
||||
@@ -51,6 +51,8 @@ export class EventsService {
|
||||
|
||||
calendarNamesAry = []
|
||||
calendarNamesAryNoPr = []
|
||||
calendarNamesAryNoPrNMD = []
|
||||
calendarNamesAryOnlyMD = []
|
||||
calendarNamesAryReverse = []
|
||||
calendarNamesAryPR = []
|
||||
|
||||
@@ -60,6 +62,8 @@ export class EventsService {
|
||||
|
||||
myCalendarNames = {}
|
||||
hasAnyCalendar = false
|
||||
|
||||
HasMdGPR = false
|
||||
|
||||
onCalendarFinishLoad = new Subscribe({execute : false, deleteOnExecute: true})
|
||||
|
||||
@@ -108,6 +112,10 @@ export class EventsService {
|
||||
this.calendarNamesAryNoPr = []
|
||||
this.calendarNamesAryPR = []
|
||||
|
||||
|
||||
this.calendarNamesAryNoPrNMD = []
|
||||
this.calendarNamesAryOnlyMD = []
|
||||
|
||||
this.hasSharedCalendar = false
|
||||
this.hasSharedOficial = false
|
||||
this.hasSharedPessoal = false
|
||||
@@ -115,6 +123,8 @@ export class EventsService {
|
||||
this.hasOwnCalendar = false
|
||||
this.hasOwnOficial = false
|
||||
this.hasOwnPessoal = false
|
||||
this.HasMdGPR = false
|
||||
|
||||
|
||||
if (SessionStore.user) {
|
||||
if (SessionStore.user.Profile == 'MDGPR') {
|
||||
@@ -308,6 +318,22 @@ export class EventsService {
|
||||
|
||||
}
|
||||
|
||||
this.calendarNamesAryNoPrNMD = this.calendarNamesAryNoPr.filter((e)=> {
|
||||
return e.Role != 'Ministro e Director do Gabinete do PR' && e.Role != 'Presidente da República'
|
||||
})
|
||||
|
||||
this.calendarNamesAryOnlyMD = this.calendarNamesAryNoPr.filter((e)=> {
|
||||
return e.Role == 'Ministro e Director do Gabinete do PR'
|
||||
})
|
||||
|
||||
|
||||
this.HasMdGPR = this.calendarNamesAryNoPr.find( (e)=> {
|
||||
if(e.Role == 'Ministro e Director do Gabinete do PR') {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
})
|
||||
|
||||
|
||||
if(SessionStore.user.OwnerCalendars.length == 0 && SessionStore.user.SharedCalendars.length == 0) {
|
||||
this.hasAnyCalendar = false
|
||||
|
||||
@@ -18,12 +18,19 @@
|
||||
<span *ngIf="SessionStore.user.Profile != 'MDGPR' && SessionStore.user.Profile != 'PR' ">Minha agenda</span> -->
|
||||
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 ">
|
||||
<ion-segment-button [class.d-none]="!eventService.HasMdGPR" *ngFor="let calendars of eventService.calendarNamesAryOnlyMD; 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.calendarNamesAryNoPrNMD; 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,6 +91,8 @@ export class EventListPage implements OnInit {
|
||||
return new Date(e).toDateString()
|
||||
}
|
||||
|
||||
|
||||
|
||||
async LoadToApproveEvents() {
|
||||
|
||||
|
||||
|
||||
@@ -69,12 +69,20 @@
|
||||
<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 ">
|
||||
<ion-segment-button [class.d-none]="!eventService.HasMdGPR" *ngFor="let calendars of eventService.calendarNamesAryOnlyMD; 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.calendarNamesAryNoPrNMD; 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>
|
||||
</div>
|
||||
|
||||
@@ -151,6 +151,8 @@ export class EventsToApprovePage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
openSearch() {
|
||||
this.dynamicSearch()
|
||||
}
|
||||
@@ -229,8 +231,8 @@ export class EventsToApprovePage implements OnInit {
|
||||
if (event) {
|
||||
setTimeout(() => {
|
||||
try {
|
||||
event?.target?.complete();
|
||||
} catch(error) {}
|
||||
event?.target?.complete();
|
||||
} catch(error) {}
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user