This commit is contained in:
Peter Maquiran
2023-08-11 16:38:23 +01:00
parent 19ddb18148
commit 0671471f59
25 changed files with 400 additions and 195 deletions
+1 -1
View File
@@ -14,7 +14,7 @@
<!-- Toolbar -->
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
<div>
<div [class]="weeksToShow" >
<!-- Calendar is here -->
<div class="calendar-segment-{{profile}}" [class.calendar-segment-pr-force]="SessionStore.user.Profile =='PR'">
+47 -16
View File
@@ -1009,29 +1009,60 @@ $font-size: rem(15);
@media only screen and (min-width: 100px) {
.calendar-title-container {
font-size: 14px;
.week-5 {
.calendar-title-container {
font-size: 14px;
}
.height-75 {
height: 75px;
}
.height-356 {
height: 324px;
}
}
.height-75 {
height: 75px;
}
.height-356 {
height: 324px;
.week-6 {
.calendar-title-container {
font-size: 14px;
}
.height-75 {
height: 75px;
}
.height-356 {
height: 360px;
}
}
}
@media only screen and (min-width: 500px) {
.calendar-title-container {
font-size: 16px;
.week-5 {
.calendar-title-container {
font-size: 16px;
}
.height-75 {
height: 75px;
}
.height-356 {
height: 356px;
}
}
.height-75 {
height: 75px;
.week-6 {
.calendar-title-container {
font-size: 16px;
}
.height-75 {
height: 75px;
}
.height-356 {
height: 395px;
}
}
.height-356 {
height: 356px;
}
}
+30
View File
@@ -287,6 +287,34 @@ export class AgendaPage implements OnInit {
}, 1000)
}
weeksToShow = []
weekToShow() {
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"]
}
}
setCalendarByDefault() {
if(!this.CalendarName) {
@@ -514,6 +542,8 @@ export class AgendaPage implements OnInit {
loadRequestHistory: any = {}
loadRangeEvents(startTime: Date, endTime: Date) {
this.weekToShow()
if(!this.eventService.hasAnyCalendar) {
return false
}