mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
improve
This commit is contained in:
@@ -20,15 +20,15 @@
|
||||
|
||||
<!-- <ion-content class="main " ng-controller="AppController"> -->
|
||||
<ion-content ng-controller="AppController">
|
||||
<ion-refresher slot="fixed" (ionRefresh)="doRefresh($event)">
|
||||
<ion-refresher slot="fixed" (ionRefresh)="doRefresh()">
|
||||
<ion-refresher-content>
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
|
||||
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
||||
|
||||
<div class="conteiner-box px-20 height-100" ng-swipe-up="swipe($event)">
|
||||
<div *ngIf="p.userPermission([p.permissionList.Agenda.access])" class="schedule height-100">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="showAgendaLoader"></ion-progress-bar>
|
||||
<div class="schedule-header">
|
||||
<div class="title">
|
||||
<ion-icon class="icon" slot="end" src="assets/images/icons-default-agenda.svg" ></ion-icon>
|
||||
@@ -89,6 +89,7 @@
|
||||
</div>
|
||||
|
||||
<div *ngIf="p.userPermission([p.permissionList.Gabinete.access])" class="schedule height-100">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="showCorrespondenciasLoader"></ion-progress-bar>
|
||||
<div class="schedule-header">
|
||||
<div class="title">
|
||||
<ion-icon class="icon" slot="end" src="assets/images/icons-correspondencias.svg"></ion-icon>
|
||||
|
||||
@@ -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