mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
save
This commit is contained in:
@@ -51,6 +51,10 @@ export class AgendaPage implements OnInit {
|
||||
this.view = view;
|
||||
}
|
||||
|
||||
// calendar
|
||||
showCalendar: boolean;
|
||||
|
||||
// timeline
|
||||
monthList = [
|
||||
{ name: 'Janeiro', id: 'Jan' },
|
||||
{ name: 'Fevereiro', id: 'Feb' },
|
||||
@@ -66,13 +70,12 @@ export class AgendaPage implements OnInit {
|
||||
{ name: 'Dezembro', id: 'Dec' }
|
||||
]
|
||||
|
||||
showTimeline: boolean= false;
|
||||
|
||||
// for timeline
|
||||
events: CalendarEvent[] = [];
|
||||
// timeline filter
|
||||
timelineFilterState: string = 'Todos';
|
||||
showTimelineFilterState: boolean= false;
|
||||
showTimelineFilterState: boolean;
|
||||
showTimeline: boolean;
|
||||
|
||||
/* List of events of our calendar */
|
||||
eventSource = [];
|
||||
@@ -119,11 +122,9 @@ export class AgendaPage implements OnInit {
|
||||
private alertCrontroller: AlertService
|
||||
) {
|
||||
|
||||
|
||||
|
||||
this.showCalendar = true;
|
||||
this.timelineDate = momentG(new Date(),'dd MMMM yyyy');
|
||||
|
||||
|
||||
function setCookie(cname, cvalue, exdays) {
|
||||
var d = new Date();
|
||||
d.setTime(d.getTime() + (exdays*24*60*60*1000));
|
||||
@@ -135,6 +136,8 @@ export class AgendaPage implements OnInit {
|
||||
setCookie('searchModalAPPType','0', 99999999);
|
||||
|
||||
this.showLoader = false;
|
||||
this.showTimelineFilterState = false;
|
||||
this.showTimeline = false;
|
||||
|
||||
}
|
||||
|
||||
@@ -415,9 +418,9 @@ export class AgendaPage implements OnInit {
|
||||
//Inicializa o array eventSource
|
||||
this.eventSource=[];
|
||||
|
||||
|
||||
|
||||
if(this.profile == "mdgpr"){
|
||||
this.eventService.getAllMdEvents(new Date(startTime).toLocaleString(), new Date(endTime).toLocaleString()).subscribe(
|
||||
this.eventService.getAllMdEvents( momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59') ).subscribe(
|
||||
response => {
|
||||
this.eventsList = response;
|
||||
// loop
|
||||
@@ -433,7 +436,7 @@ export class AgendaPage implements OnInit {
|
||||
});
|
||||
});
|
||||
|
||||
// this.timelineFilter(this.timelineFilterState);
|
||||
this.timelineFilter(this.timelineFilterState);
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
@@ -448,7 +451,7 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
}
|
||||
else{
|
||||
this.eventService.getAllPrEvents(new Date(startTime).toLocaleString(), new Date(endTime).toLocaleString()).subscribe(
|
||||
this.eventService.getAllPrEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).subscribe(
|
||||
response => {
|
||||
this.eventsList = response;
|
||||
this.eventsList.forEach((element, eventIndex) => {
|
||||
@@ -463,7 +466,7 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
});
|
||||
|
||||
// this.timelineFilter(this.timelineFilterState);
|
||||
this.timelineFilter(this.timelineFilterState);
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
@@ -481,7 +484,7 @@ export class AgendaPage implements OnInit {
|
||||
//Inicializa o array eventSource
|
||||
this.eventSource=[];
|
||||
if(this.profile == "mdgpr"){
|
||||
this.eventService.getAllMdEvents(new Date(startTime).toLocaleString(), new Date(endTime).toLocaleString()).subscribe(response => {
|
||||
this.eventService.getAllMdEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).subscribe(response => {
|
||||
this.eventsListPessoal = response.filter(data => data.CalendarName == "Pessoal");
|
||||
this.eventsListPessoal.forEach(element => {
|
||||
this.eventSource.push({
|
||||
@@ -498,7 +501,7 @@ export class AgendaPage implements OnInit {
|
||||
});
|
||||
}
|
||||
else{
|
||||
this.eventService.getAllPrEvents(new Date(startTime).toLocaleString(), new Date(endTime).toLocaleString()).subscribe(response => {
|
||||
this.eventService.getAllPrEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).subscribe(response => {
|
||||
this.eventsListPessoal = response.filter(data => data.CalendarName == "Pessoal");
|
||||
this.eventsListPessoal.forEach(element => {
|
||||
this.eventSource.push({
|
||||
@@ -520,7 +523,7 @@ export class AgendaPage implements OnInit {
|
||||
//Inicializa o array eventSource
|
||||
this.eventSource=[];
|
||||
if(this.profile == "mdgpr"){
|
||||
this.eventService.getAllMdEvents(new Date(startTime).toLocaleString(), new Date(endTime).toLocaleString()).subscribe(res => {
|
||||
this.eventService.getAllMdEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).subscribe(res => {
|
||||
this.eventsListOficial = res.filter(data => data.CalendarName == "Oficial");
|
||||
this.eventsListOficial.forEach(element => {
|
||||
this.eventSource.push({
|
||||
@@ -536,7 +539,7 @@ export class AgendaPage implements OnInit {
|
||||
this.showLoader = false;
|
||||
});
|
||||
}else{
|
||||
this.eventService.getAllPrEvents(new Date(startTime).toLocaleString(), new Date(endTime).toLocaleString()).subscribe(res => {
|
||||
this.eventService.getAllPrEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).subscribe(res => {
|
||||
this.eventsListOficial = res.filter(data => data.CalendarName == "Oficial");
|
||||
this.eventsListOficial.forEach(element => {
|
||||
this.eventSource.push({
|
||||
|
||||
Reference in New Issue
Block a user