mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
get events to aprove solved
This commit is contained in:
@@ -76,5 +76,29 @@
|
||||
</div>
|
||||
</div>
|
||||
</ion-list>
|
||||
<ion-list class="width-100" *ngSwitchCase="'Unknown'">
|
||||
<div class="width-100" *ngIf="eventsGenericList">
|
||||
<div
|
||||
class="item ion-no-padding width-100 cursor-pointer"
|
||||
*ngFor="let event of eventsGenericList"
|
||||
(click)="openApproveModal(event.serialNumber, event)"
|
||||
>
|
||||
<div class="event-pr-{{event.workflowInstanceDataFields.Agenda}} width-100">
|
||||
<div class="approve-event-time">
|
||||
<p>{{event.workflowInstanceDataFields.StartDate | date: 'HH:mm'}}</p>
|
||||
<p>{{event.workflowInstanceDataFields.EndDate | date: 'HH:mm'}}</p>
|
||||
</div>
|
||||
<div class="approve-event-detail">
|
||||
<p *ngIf="toDateString(event.workflowInstanceDataFields.StartDate) != toDateString(event.workflowInstanceDataFields.EndDate)">{{event.workflowInstanceDataFields.StartDate | date: 'd/M/yy' }} - {{ event.workflowInstanceDataFields.EndDate | date: 'dd/M/yy'}} | {{event.workflowInstanceDataFields.Location}}</p>
|
||||
<p *ngIf="toDateString(event.workflowInstanceDataFields.StartDate) == toDateString(event.workflowInstanceDataFields.EndDate)">{{event.workflowInstanceDataFields.StartDate | date: 'd/M/yy' }} | {{event.workflowInstanceDataFields.Location}}</p>
|
||||
<h3>{{event.workflowInstanceDataFields.Subject}}</h3>
|
||||
<div *ngIf="event.activityInstanceName">
|
||||
<div class="label-event-type"> {{ event.activityInstanceName }} </div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ion-list>
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
@@ -18,6 +18,7 @@ export class EventListPage implements OnInit {
|
||||
showLoader: boolean;
|
||||
eventsPRList: any = []
|
||||
eventsMDGPRList: any = []
|
||||
eventsGenericList: any = []
|
||||
eventPerson: EventPerson;
|
||||
eventBody: EventBody;
|
||||
categories: string[];
|
||||
@@ -42,6 +43,9 @@ export class EventListPage implements OnInit {
|
||||
ngOnInit() {
|
||||
|
||||
this.segment = this.loggeduser.Profile;
|
||||
if(this.segment != "PR" && this.segment != "MDGPR") {
|
||||
this.segment = "Unknown";
|
||||
}
|
||||
|
||||
const pathname = window.location.pathname
|
||||
|
||||
@@ -86,6 +90,12 @@ export class EventListPage implements OnInit {
|
||||
this.eventsPRList = this.sortService.sortArrayByDate(allEvents).reverse();
|
||||
}
|
||||
this.showLoader = false;
|
||||
} else {
|
||||
let genericEvents = await this.processes.GetTasksList('Agendar Evento', false).toPromise();
|
||||
if(genericEvents.length > 0) {
|
||||
this.eventsGenericList = this.sortService.sortArrayByDate(genericEvents).reverse();
|
||||
}
|
||||
this.showLoader = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user