Improve aganda

This commit is contained in:
Peter Maquiran
2021-04-14 12:02:43 +01:00
parent 377a29c5f7
commit 8828c319a4
2 changed files with 23 additions and 26 deletions
+21 -18
View File
@@ -863,26 +863,29 @@ export class AgendaPage implements OnInit {
selectFirstEventOfTheDay(){
setTimeout(()=>{
if(this.eventSelectedDate.toLocaleDateString('en-US') != (new Date()).toLocaleDateString('en-US')){
let sortedDate = this.eventSource.sort((a,b) =>{
return (b.startTime) -(a.startTime);
});
let sortedDate = this.eventSource.sort((a,b) =>{
return (b.startTime) -(a.startTime);
});
let filterDate = sortedDate.filter((e) => {
return e.startTime.toLocaleDateString('en-US') == this.eventSelectedDate.toLocaleDateString('en-US');
});
const firstEventStartHours = new Date(filterDate[filterDate.length - 1].startTime).getHours();
const scrollContainer = document.querySelector('.timeline-wrapper');
scrollContainer.scroll({
top: firstEventStartHours*60,
left: 0,
behavior: 'smooth'
})
let filterDate = sortedDate.filter((e) => {
return e.startTime.toLocaleDateString('en-US') == this.eventSelectedDate.toLocaleDateString('en-US');
});
const firstEventStartHours = new Date(filterDate[filterDate.length - 1].startTime).getHours();
const scrollContainer = document.querySelector('.timeline-wrapper');
scrollContainer.scroll({
top: firstEventStartHours*60,
left: 0,
behavior: 'smooth'
})
}
}, 500);
}
@@ -109,12 +109,6 @@ export class ViewEventPage implements OnInit {
async editEventDetail() {
let classs;
if( window.innerWidth <= 800){
classs = 'modal'
} else {
classs = 'modal modal-desktop'
}
const modal = await this.modalController.create({
component: EditEventPage,
@@ -122,7 +116,7 @@ export class ViewEventPage implements OnInit {
eventId: this.loadedEvent.EventId,
profile: this.profile,
},
cssClass: classs,
cssClass: 'modal modal-desktop',
});
}
@@ -131,7 +125,7 @@ export class ViewEventPage implements OnInit {
let classs;
if( window.innerWidth <= 800){
classs = 'modal'
classs = 'modal modal-desktop'
} else {
classs = 'modal modal-desktop showAsideOptions'
}