Add search model icons

This commit is contained in:
2021-02-11 14:31:43 +01:00
parent d28e88de30
commit 1586c672f1
5 changed files with 94 additions and 31 deletions
+32 -29
View File
@@ -55,21 +55,6 @@ export class AgendaPage implements OnInit {
showCalendar: boolean;
calendarHeight: string;
// timeline
monthList = [
{ name: 'Janeiro', id: 'Jan' },
{ name: 'Fevereiro', id: 'Feb' },
{ name: 'Março', id: 'Mar' },
{ name: 'Abril', id: 'Apr' },
{ name: 'Maio', id: 'May' },
{ name: 'Junho', id: 'June' },
{ name: 'Julho', id: 'July' },
{ name: 'Agosto', id: 'Aug' },
{ name: 'Setembro', id: 'Sept' },
{ name: 'Outubro', id: 'Oct' },
{ name: 'Novembro', id: 'Nov' },
{ name: 'Dezembro', id: 'Dec' }
]
// for timeline
events: CalendarEvent[] = [];
@@ -285,7 +270,11 @@ export class AgendaPage implements OnInit {
const scrollContainer = shadowRoot.querySelector('main');
try {
scrollContainer.scrollTop = timelineMarker['offsetTop'] - ((scrollContainer.offsetHeight/2) - 60);
scrollContainer.scroll({
top: timelineMarker['offsetTop'] - ((scrollContainer.offsetHeight/2) - 60),
left: 0,
behavior: 'smooth'
})
} catch (error) {
//
}
@@ -415,6 +404,9 @@ export class AgendaPage implements OnInit {
if(this.profile == "mdgpr"){
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.eventSource=[];
this.eventsList = response;
// loop
this.eventsList.forEach((element, eventIndex) => {
@@ -446,6 +438,9 @@ export class AgendaPage implements OnInit {
else{
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.eventSource=[];
this.eventsList = response;
this.eventsList.forEach((element, eventIndex) => {
this.eventSource.push({
@@ -478,23 +473,29 @@ export class AgendaPage implements OnInit {
this.eventSource=[];
if(this.profile == "mdgpr"){
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({
title: element.Subject,
startTime: new Date(element.StartDate),
endTime: new Date(element.EndDate),
allDay: false,
event: element
});
this.eventSource=[];
this.eventsListPessoal = response.filter(data => data.CalendarName == "Pessoal");
this.eventsListPessoal.forEach(element => {
this.eventSource.push({
title: element.Subject,
startTime: new Date(element.StartDate),
endTime: new Date(element.EndDate),
allDay: false,
event: element
});
this.myCal.update();
this.myCal.loadEvents();
this.showLoader = false;
});
this.myCal.update();
this.myCal.loadEvents();
this.showLoader = false;
});
}
else{
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.eventSource=[];
this.eventsListPessoal = response.filter(data => data.CalendarName == "Pessoal");
this.eventsListPessoal.forEach(element => {
this.eventSource.push({
@@ -517,7 +518,8 @@ export class AgendaPage implements OnInit {
this.eventSource=[];
if(this.profile == "mdgpr"){
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.eventSource=[];
this.eventsListOficial = res.filter(data => data.CalendarName == "Oficial");
this.eventsListOficial.forEach(element => {
this.eventSource.push({
title: element.Subject,
@@ -533,6 +535,7 @@ export class AgendaPage implements OnInit {
});
}else{
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.eventSource=[];
this.eventsListOficial = res.filter(data => data.CalendarName == "Oficial");
this.eventsListOficial.forEach(element => {
this.eventSource.push({