mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
save
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
</ion-label>
|
||||
|
||||
<div class="next-meeting">
|
||||
<div class="meeting-time">{{hoursMinutes}}</div>
|
||||
<div class="meeting-time">{{currentHoursMinutes | date: 'HH:mm'}}</div>
|
||||
<div class="meeting-description"> "{{currentEvent}}"</div>
|
||||
</div>
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
<ul>
|
||||
<li *ngFor = "let task of taskslist"
|
||||
(click)="viewExpedientDetail(task.SerialNumber)">
|
||||
<!-- [routerLink]="['/home/gabinete-digital/expediente',task.SerialNumber]" -->
|
||||
[routerLink]="['/home/gabinete-digital/expediente',task.SerialNumber]"
|
||||
>
|
||||
<div class="d-flex">
|
||||
<div class="schedule-date">
|
||||
|
||||
@@ -26,7 +26,6 @@ import { ExpedienteDetailPage } from '../gabinete-digital/expediente/expediente-
|
||||
export class EventsPage implements OnInit {
|
||||
/* Get current system date */
|
||||
today = new Date();
|
||||
todayEnd = new Date();
|
||||
|
||||
months = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"];
|
||||
days = ["Domingo", "Segunda-feira", "Terça-feira", "Quarta-feira", "Quinta-feira", "Sexta-feira", "Sábado"];
|
||||
@@ -54,7 +53,7 @@ export class EventsPage implements OnInit {
|
||||
|
||||
customText = false;
|
||||
totalEvent=0;
|
||||
currentHoursMinutes: String;
|
||||
currentHoursMinutes: Date;
|
||||
|
||||
showLoader: boolean;
|
||||
|
||||
@@ -69,16 +68,9 @@ export class EventsPage implements OnInit {
|
||||
private authService: AuthService,
|
||||
private processes:ProcessesService) {
|
||||
this.prEventList = null;
|
||||
|
||||
// update hours and minutes
|
||||
setInterval(()=> {
|
||||
this.currentHoursMinutes = formatDate(new Date(), 'HH:MM', 'pt');
|
||||
}, 1000);
|
||||
|
||||
// list
|
||||
this.LoadList();
|
||||
|
||||
this.todayEnd = new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate(), 23, 59, 59);
|
||||
|
||||
}
|
||||
|
||||
@@ -94,22 +86,6 @@ export class EventsPage implements OnInit {
|
||||
this.profile = "mdgpr";
|
||||
console.log(this.profile);
|
||||
|
||||
// set event list
|
||||
/* if(this.profile == "mdgpr"){
|
||||
this.eventService.getAllMdEvents(formatDate(new Date(), 'yyyy-MM-dd HH:mm:ss', 'pt'), formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 23:59:59').subscribe(res => {
|
||||
this.eventsList = res;
|
||||
console.log(this.eventsList);
|
||||
this.totalEvent = this.eventsList.length;
|
||||
});
|
||||
}
|
||||
else{
|
||||
this.eventService.getAllPrEvents(formatDate(new Date(), 'yyyy-MM-dd HH:mm:ss', 'pt'), formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 23:59:59').subscribe(res => {
|
||||
this.eventsList = res;
|
||||
this.totalEvent = this.eventsList.length;
|
||||
});
|
||||
|
||||
} */
|
||||
|
||||
this.storageService.get(AuthConnstants.USER).then(res=>{
|
||||
console.log(res);
|
||||
});
|
||||
@@ -139,7 +115,7 @@ export class EventsPage implements OnInit {
|
||||
|
||||
RefreshEvents(){
|
||||
this.showLoader = true;
|
||||
|
||||
|
||||
let date = new Date();
|
||||
date.setMonth(date.getMonth() + 1);
|
||||
let start = date.getFullYear()+"-"+ date.getMonth()+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()+ ":"+date.getSeconds();
|
||||
@@ -154,18 +130,24 @@ export class EventsPage implements OnInit {
|
||||
|
||||
if(res.length > 0){
|
||||
this.currentEvent = res[0].Subject;
|
||||
this.currentHoursMinutes = res[0].StartDate;
|
||||
}
|
||||
|
||||
this.totalEvent = this.eventsList.length;
|
||||
this.showLoader = false;
|
||||
});
|
||||
}else{
|
||||
this.eventService.getAllPrEvents(this.today.toLocaleString(), this.todayEnd.toLocaleString()).subscribe(res => {
|
||||
this.eventService.getAllPrEvents(start, end).subscribe(res => {
|
||||
this.eventsList = res;
|
||||
console.log(this.eventsList);
|
||||
console.log(res)
|
||||
console.log(res[0])
|
||||
this.currentEvent = res[0].Subject;
|
||||
console.log(res);
|
||||
console.log(res[0]);
|
||||
|
||||
if(res.length > 0){
|
||||
this.currentEvent = res[0].Subject;
|
||||
this.currentHoursMinutes = res[0].StartDate;
|
||||
}
|
||||
|
||||
this.totalEvent = this.eventsList.length;
|
||||
this.showLoader = false;
|
||||
});
|
||||
@@ -174,12 +156,12 @@ export class EventsPage implements OnInit {
|
||||
break;
|
||||
case "Pessoal":
|
||||
if(this.profile == "mdgpr"){
|
||||
this.eventService.getAllMdEvents(this.today.toLocaleString(), this.todayEnd.toLocaleString()).subscribe(res => {
|
||||
this.eventService.getAllMdEvents(start, end).subscribe(res => {
|
||||
this.personaleventsList = res.filter(data => data.CalendarName == "Pessoal");
|
||||
this.showLoader = false;
|
||||
});
|
||||
}else{
|
||||
this.eventService.getAllPrEvents(this.today.toLocaleString(), this.todayEnd.toLocaleString()).subscribe(res => {
|
||||
this.eventService.getAllPrEvents(start, end).subscribe(res => {
|
||||
this.personaleventsList = res.filter(data => data.CalendarName == "Pessoal");
|
||||
this.showLoader = false;
|
||||
});
|
||||
@@ -188,12 +170,12 @@ export class EventsPage implements OnInit {
|
||||
break;
|
||||
case "Oficial":
|
||||
if(this.profile == "mdgpr"){
|
||||
this.eventService.getAllMdEvents(this.today.toLocaleString(), this.todayEnd.toLocaleString()).subscribe(res => {
|
||||
this.eventService.getAllMdEvents(start, end).subscribe(res => {
|
||||
this.officialeventsList = res.filter(data => data.CalendarName == "Oficial");;
|
||||
this.showLoader = false;
|
||||
});
|
||||
}else{
|
||||
this.eventService.getAllPrEvents(this.today.toLocaleString(), this.todayEnd.toLocaleString()).subscribe(res => {
|
||||
this.eventService.getAllPrEvents(start, end).subscribe(res => {
|
||||
this.officialeventsList = res.filter(data => data.CalendarName == "Oficial");;
|
||||
this.showLoader = false;
|
||||
});
|
||||
@@ -263,16 +245,6 @@ export class EventsPage implements OnInit {
|
||||
return await modal.present();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @returns time in format HH:MM
|
||||
*/
|
||||
get hoursMinutes():String {
|
||||
|
||||
return this.currentHoursMinutes;
|
||||
|
||||
}
|
||||
|
||||
LoadList()
|
||||
{
|
||||
this.processes.GetTasksList("Expediente", false).subscribe(result => {
|
||||
|
||||
Reference in New Issue
Block a user