mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
merge
This commit is contained in:
@@ -291,34 +291,37 @@ export class AgendaPage implements OnInit {
|
||||
}, 1000)
|
||||
}
|
||||
|
||||
weeksToShow = []
|
||||
height = '75px'
|
||||
|
||||
weekToShow() {
|
||||
|
||||
setTimeout(() => {
|
||||
let num = 0;
|
||||
try {
|
||||
let weekNum = 0;
|
||||
|
||||
function Week(a) {
|
||||
for(let b of a.querySelectorAll('td')) {
|
||||
if(!b.className.includes('text-muted')) {
|
||||
num++;
|
||||
return true
|
||||
function Week(a) {
|
||||
for(let b of a.querySelectorAll('td')) {
|
||||
if(!b.className.includes('text-muted')) {
|
||||
weekNum++;
|
||||
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"]
|
||||
}
|
||||
const dayBoxHeight = document.querySelector('.monthview-container .swiper-container .swiper-slide-active table tbody tr td').clientHeight
|
||||
const weeks = document.querySelectorAll('.monthview-container .swiper-container .swiper-slide-active table tbody tr');
|
||||
|
||||
for (let week of weeks as any ){
|
||||
Week(week)
|
||||
}
|
||||
|
||||
this.showCalendar = true
|
||||
this.height = (weekNum * dayBoxHeight) +'px'
|
||||
} catch (e) {
|
||||
setTimeout(()=> {
|
||||
this.weekToShow()
|
||||
}, 100)
|
||||
}
|
||||
}, 250)
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user