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
+16 -13
View File
@@ -864,24 +864,27 @@ export class AgendaPage implements OnInit {
setTimeout(()=>{ setTimeout(()=>{
let sortedDate = this.eventSource.sort((a,b) =>{ if(this.eventSelectedDate.toLocaleDateString('en-US') != (new Date()).toLocaleDateString('en-US')){
return (b.startTime) -(a.startTime); let sortedDate = this.eventSource.sort((a,b) =>{
}); return (b.startTime) -(a.startTime);
});
let filterDate = sortedDate.filter((e) => { let filterDate = sortedDate.filter((e) => {
return e.startTime.toLocaleDateString('en-US') == this.eventSelectedDate.toLocaleDateString('en-US'); return e.startTime.toLocaleDateString('en-US') == this.eventSelectedDate.toLocaleDateString('en-US');
}); });
const firstEventStartHours = new Date(filterDate[filterDate.length - 1].startTime).getHours(); const firstEventStartHours = new Date(filterDate[filterDate.length - 1].startTime).getHours();
const scrollContainer = document.querySelector('.timeline-wrapper'); const scrollContainer = document.querySelector('.timeline-wrapper');
scrollContainer.scroll({ scrollContainer.scroll({
top: firstEventStartHours*60, top: firstEventStartHours*60,
left: 0, left: 0,
behavior: 'smooth' behavior: 'smooth'
}) })
}
}, 500); }, 500);
@@ -109,12 +109,6 @@ export class ViewEventPage implements OnInit {
async editEventDetail() { async editEventDetail() {
let classs;
if( window.innerWidth <= 800){
classs = 'modal'
} else {
classs = 'modal modal-desktop'
}
const modal = await this.modalController.create({ const modal = await this.modalController.create({
component: EditEventPage, component: EditEventPage,
@@ -122,7 +116,7 @@ export class ViewEventPage implements OnInit {
eventId: this.loadedEvent.EventId, eventId: this.loadedEvent.EventId,
profile: this.profile, profile: this.profile,
}, },
cssClass: classs, cssClass: 'modal modal-desktop',
}); });
} }
@@ -131,7 +125,7 @@ export class ViewEventPage implements OnInit {
let classs; let classs;
if( window.innerWidth <= 800){ if( window.innerWidth <= 800){
classs = 'modal' classs = 'modal modal-desktop'
} else { } else {
classs = 'modal modal-desktop showAsideOptions' classs = 'modal modal-desktop showAsideOptions'
} }