mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
fix eventos
This commit is contained in:
@@ -7,6 +7,7 @@ import { LoginUserRespose } from 'src/app/models/user.model';
|
||||
import { SortService } from 'src/app/services/functions/sort.service';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
import { EventoAprovacaoStore } from 'src/app/store/eventoaprovacao-store.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-event-list',
|
||||
@@ -26,6 +27,7 @@ export class EventListPage implements OnInit {
|
||||
serialnumber:string;
|
||||
loggeduser: LoginUserRespose;
|
||||
segment:string;
|
||||
eventoaprovacaostore = EventoAprovacaoStore;
|
||||
|
||||
@Input() profile:string;
|
||||
@Input() showComponent:string;
|
||||
@@ -79,6 +81,7 @@ export class EventListPage implements OnInit {
|
||||
|
||||
try {
|
||||
if(this.segment == 'MDGPR') {
|
||||
const segment = this.segment
|
||||
let mdEventsOficial = await this.processes.GetTasksList('Agenda Oficial MDGPR', false).toPromise();
|
||||
let mdEventsPessoal = await this.processes.GetTasksList('Agenda Pessoal MDGPR', false).toPromise();
|
||||
|
||||
@@ -87,8 +90,11 @@ export class EventListPage implements OnInit {
|
||||
this.eventsMDGPRList = this.sortService.sortArrayByDate(allEvents).reverse();
|
||||
}
|
||||
this.showLoader = false;
|
||||
|
||||
this.eventoaprovacaostore.save(segment, this.eventsMDGPRList)
|
||||
}
|
||||
else if(this.segment == 'PR') {
|
||||
const segment = this.segment
|
||||
let prEventsOficial = await this.processes.GetTasksList('Agenda Oficial PR,Agenda Pessoal PR', false).toPromise();
|
||||
let allEvents = prEventsOficial
|
||||
|
||||
@@ -96,6 +102,8 @@ export class EventListPage implements OnInit {
|
||||
this.eventsPRList = this.sortService.sortArrayByDate(allEvents).reverse();
|
||||
}
|
||||
this.showLoader = false;
|
||||
|
||||
this.eventoaprovacaostore.save(segment, this.eventsMDGPRList)
|
||||
} else {
|
||||
let genericEvents = await this.processes.GetTasksList('Agendar Evento', false).toPromise();
|
||||
if(genericEvents.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user