mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
improve
This commit is contained in:
@@ -20,15 +20,15 @@
|
|||||||
|
|
||||||
<!-- <ion-content class="main " ng-controller="AppController"> -->
|
<!-- <ion-content class="main " ng-controller="AppController"> -->
|
||||||
<ion-content 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-content>
|
</ion-refresher-content>
|
||||||
</ion-refresher>
|
</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 class="conteiner-box px-20 height-100" ng-swipe-up="swipe($event)">
|
||||||
<div *ngIf="p.userPermission([p.permissionList.Agenda.access])" class="schedule height-100">
|
<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="schedule-header">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<ion-icon class="icon" slot="end" src="assets/images/icons-default-agenda.svg" ></ion-icon>
|
<ion-icon class="icon" slot="end" src="assets/images/icons-default-agenda.svg" ></ion-icon>
|
||||||
@@ -89,6 +89,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="p.userPermission([p.permissionList.Gabinete.access])" class="schedule height-100">
|
<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="schedule-header">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<ion-icon class="icon" slot="end" src="assets/images/icons-correspondencias.svg"></ion-icon>
|
<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;
|
loggeduser: LoginUserRespose;
|
||||||
sessoStore = SessionStore;
|
sessoStore = SessionStore;
|
||||||
|
|
||||||
|
showAgendaLoader = false
|
||||||
|
showCorrespondenciasLoader = false
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private eventService: EventsService,
|
private eventService: EventsService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
@@ -107,9 +110,6 @@ export class EventsPage implements OnInit {
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
this.segment = "Combinada";
|
|
||||||
this.profile = "mdgpr";
|
|
||||||
|
|
||||||
this.showGreeting();
|
this.showGreeting();
|
||||||
|
|
||||||
this.router.events.forEach((event) => {
|
this.router.events.forEach((event) => {
|
||||||
@@ -137,14 +137,13 @@ export class EventsPage implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
doRefresh(event) {
|
doRefresh() {
|
||||||
this.RefreshEvents();
|
this.RefreshEvents();
|
||||||
this.LoadList();
|
this.LoadList();
|
||||||
event.target.complete();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onSegmentChange() {
|
onSegmentChange() {
|
||||||
this.RefreshEvents();
|
this.doRefresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -152,19 +151,21 @@ export class EventsPage implements OnInit {
|
|||||||
|
|
||||||
this.currentEvent = "";
|
this.currentEvent = "";
|
||||||
this.showLoader = true;
|
this.showLoader = true;
|
||||||
|
this.showAgendaLoader = true;
|
||||||
|
|
||||||
let date = new Date();
|
let date = new Date();
|
||||||
let month = date.getMonth() + 1;
|
let month = date.getMonth() + 1;
|
||||||
let start = date.getFullYear() + "-" + month + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
|
let start = date.getFullYear() + "-" + month + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
|
||||||
let end = date.getFullYear() + "-" + month + "-" + date.getDate() + " 23:59:59";
|
let end = date.getFullYear() + "-" + month + "-" + date.getDate() + " 23:59:59";
|
||||||
if(SessionStore.user) {
|
if(SessionStore.user) {
|
||||||
console.log('im here')
|
|
||||||
let onwEvent:any = await this.eventService.getAllOwnEvents(start, end).catch((error) => {
|
let onwEvent:any = await this.eventService.getAllOwnEvents(start, end).catch((error) => {
|
||||||
|
this.showAgendaLoader = false;
|
||||||
console.error(error)
|
console.error(error)
|
||||||
})
|
})
|
||||||
this.listToPresent = onwEvent;
|
this.listToPresent = onwEvent;
|
||||||
this.totalEvent = onwEvent.length;
|
this.totalEvent = onwEvent.length;
|
||||||
this.showLoader = false;
|
this.showLoader = false;
|
||||||
|
this.showAgendaLoader = false;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -401,18 +402,18 @@ export class EventsPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
LoadList() {
|
LoadList() {
|
||||||
|
this.showCorrespondenciasLoader = true
|
||||||
this.processes.GetTaskListExpediente(false).subscribe(result => {
|
this.processes.GetTaskListExpediente(false).subscribe(result => {
|
||||||
//
|
|
||||||
this.addProcessToDb(result);
|
this.addProcessToDb(result);
|
||||||
|
|
||||||
let ExpedienteTask = result.map(e => this.expedienteTaskPipe.transform(e))
|
let ExpedienteTask = result.map(e => this.expedienteTaskPipe.transform(e))
|
||||||
|
|
||||||
this.listToPresentexpediente = ExpedienteTask;
|
this.listToPresentexpediente = ExpedienteTask;
|
||||||
|
|
||||||
this.showLoader = false;
|
this.showCorrespondenciasLoader = false
|
||||||
}, ((error) => {
|
}, ((error) => {
|
||||||
|
|
||||||
this.showLoader = false;
|
this.showCorrespondenciasLoader = false
|
||||||
//
|
//
|
||||||
this.getEventsFromLocalDb();
|
this.getEventsFromLocalDb();
|
||||||
}));
|
}));
|
||||||
|
|||||||
Reference in New Issue
Block a user