mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
improve
This commit is contained in:
@@ -65,6 +65,9 @@ export class EventsPage implements OnInit {
|
||||
loggeduser: LoginUserRespose;
|
||||
sessoStore = SessionStore;
|
||||
|
||||
showAgendaLoader = false
|
||||
showCorrespondenciasLoader = false
|
||||
|
||||
constructor(
|
||||
private eventService: EventsService,
|
||||
private router: Router,
|
||||
@@ -107,9 +110,6 @@ export class EventsPage implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.segment = "Combinada";
|
||||
this.profile = "mdgpr";
|
||||
|
||||
this.showGreeting();
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
@@ -137,14 +137,13 @@ export class EventsPage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
doRefresh(event) {
|
||||
doRefresh() {
|
||||
this.RefreshEvents();
|
||||
this.LoadList();
|
||||
event.target.complete();
|
||||
}
|
||||
|
||||
onSegmentChange() {
|
||||
this.RefreshEvents();
|
||||
this.doRefresh();
|
||||
}
|
||||
|
||||
|
||||
@@ -152,19 +151,21 @@ export class EventsPage implements OnInit {
|
||||
|
||||
this.currentEvent = "";
|
||||
this.showLoader = true;
|
||||
this.showAgendaLoader = true;
|
||||
|
||||
let date = new Date();
|
||||
let month = date.getMonth() + 1;
|
||||
let start = date.getFullYear() + "-" + month + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
|
||||
let end = date.getFullYear() + "-" + month + "-" + date.getDate() + " 23:59:59";
|
||||
if(SessionStore.user) {
|
||||
console.log('im here')
|
||||
let onwEvent:any = await this.eventService.getAllOwnEvents(start, end).catch((error) => {
|
||||
this.showAgendaLoader = false;
|
||||
console.error(error)
|
||||
})
|
||||
this.listToPresent = onwEvent;
|
||||
this.totalEvent = onwEvent.length;
|
||||
this.showLoader = false;
|
||||
this.showAgendaLoader = false;
|
||||
} else {
|
||||
|
||||
}
|
||||
@@ -401,18 +402,18 @@ export class EventsPage implements OnInit {
|
||||
}
|
||||
|
||||
LoadList() {
|
||||
this.showCorrespondenciasLoader = true
|
||||
this.processes.GetTaskListExpediente(false).subscribe(result => {
|
||||
//
|
||||
this.addProcessToDb(result);
|
||||
|
||||
let ExpedienteTask = result.map(e => this.expedienteTaskPipe.transform(e))
|
||||
|
||||
this.listToPresentexpediente = ExpedienteTask;
|
||||
|
||||
this.showLoader = false;
|
||||
this.showCorrespondenciasLoader = false
|
||||
}, ((error) => {
|
||||
|
||||
this.showLoader = false;
|
||||
this.showCorrespondenciasLoader = false
|
||||
//
|
||||
this.getEventsFromLocalDb();
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user