This commit is contained in:
Peter Maquiran
2023-08-14 10:17:05 +01:00
parent 2645d1e081
commit cd4fda997c
5 changed files with 36 additions and 30 deletions
+23 -20
View File
@@ -290,29 +290,32 @@ export class AgendaPage implements OnInit {
weeksToShow = []
weekToShow() {
let num = 0;
function Week(a) {
for(let b of a.querySelectorAll('td')) {
if(!b.className.includes('text-muted')) {
num++;
return true
setTimeout(() => {
let num = 0;
function Week(a) {
for(let b of a.querySelectorAll('td')) {
if(!b.className.includes('text-muted')) {
num++;
return true
}
}
}
}
for (let a of document.querySelectorAll('.monthview-container .swiper-container .swiper-slide-active table tbody tr') as any ){
Week(a)
}
if(num <= 5) {
this.weeksToShow = ["week-5"]
} else {
this.weeksToShow = ["week-6"]
}
for (let a of document.querySelectorAll('.monthview-container .swiper-container .swiper-slide-active table tbody tr') as any ){
Week(a)
}
if(num <= 5) {
this.weeksToShow = ["week-5"]
} else {
this.weeksToShow = ["week-6"]
}
}, 250)
}