This commit is contained in:
Peter Maquiran
2023-08-24 22:19:40 +01:00
parent 7302918ed8
commit f3f84ed475
7 changed files with 79 additions and 59 deletions
+26 -23
View File
@@ -14,11 +14,11 @@
<!-- Toolbar --> <!-- Toolbar -->
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar> <ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
<div [class]="weeksToShow" > <div class="weeksToShow">
<!-- Calendar is here --> <!-- Calendar is here -->
<div class="calendar-segment-{{profile}}" [class.calendar-segment-pr-force]="SessionStore.user.Profile =='PR'"> <div class="calendar-segment-{{profile}}" [class.calendar-segment-pr-force]="SessionStore.user.Profile =='PR'">
<div class="calendar-container" [class]="calendarHeight"> <div class="calendar-container" class="calendarHeight" >
<ion-row class="ion-justify-content-between calendar-tool-tip"> <ion-row class="ion-justify-content-between calendar-tool-tip">
<ion-row class="ion-align-items-center first-row"> <ion-row class="ion-align-items-center first-row">
@@ -140,25 +140,28 @@
</thead> </thead>
</table> </table>
<calendar <div class="calendar-conteiner-height overflow-hidden" [style.height]="height">
class="calendar-component" <calendar
[eventSource]="listToPresent" class="calendar-component"
[calendarMode]="calendar.mode" [eventSource]="listToPresent"
[currentDate]="calendar.currentDate" [calendarMode]="calendar.mode"
(onEventSelected)="onEventSelected($event)" [currentDate]="calendar.currentDate"
(onTitleChanged)="onViewTitleChanged($event)" (onEventSelected)="onEventSelected($event)"
(onRangeChanged)="onRangeChanged($event)" (onTitleChanged)="onViewTitleChanged($event)"
(onCurrentDateChanged)="onCurrentChanged($event)" (onRangeChanged)="onRangeChanged($event)"
queryMode="remote" (onCurrentDateChanged)="onCurrentChanged($event)"
startHour="6" queryMode="remote"
endHour="20" startHour="6"
step="30" endHour="20"
startingDayMonth="1" step="30"
noEventsLabel="Sem Eventos" startingDayMonth="1"
allDayLabel="Todo o dia" noEventsLabel="Sem Eventos"
[monthviewDisplayEventTemplate]="template" allDayLabel="Todo o dia"
> [monthviewDisplayEventTemplate]="template"
</calendar> >
</calendar>
</div>
<!-- Adding a customized ng-template --> <!-- Adding a customized ng-template -->
<ng-template #template let-view="view" let-row="row" let-col="col"> <ng-template #template let-view="view" let-row="row" let-col="col">
@@ -183,12 +186,12 @@
<div class="calendar-title-container px-20 d-flex"> <div class="calendar-title-container px-20 d-flex">
<ion-row class="timeline-date align-center pr-10"> <ion-row class="timeline-date align-center pr-10">
<button class="no-color" *ngIf="showCalendar" (click)="calendarHeight=['height-75'];showCalendar=false"> <button class="no-color" *ngIf="showCalendar" (click)="height='0px';showCalendar=false">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="collaps font-25" src="assets/images/icons-collaps-up.svg" ></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="collaps font-25" src="assets/images/icons-collaps-up.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="collaps font-25" src="assets/images/theme/gov/icons-collaps-up.svg" ></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="collaps font-25" src="assets/images/theme/gov/icons-collaps-up.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="collaps font-25" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-collaps-up.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="collaps font-25" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-collaps-up.svg"></ion-icon>
</button> </button>
<button class="no-color" *ngIf="!showCalendar" (click)="calendarHeight=['height-356'];showCalendar=true"> <button class="no-color" *ngIf="!showCalendar" (click)="weekToShow();showCalendar=true">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="collaps font-25" src="assets/images/icons-collaps-down.svg" ></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="collaps font-25" src="assets/images/icons-collaps-down.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="collaps font-25" src="assets/images/theme/gov/icons-collaps-down.svg" ></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="collaps font-25" src="assets/images/theme/gov/icons-collaps-down.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="collaps font-25" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-collaps-down.svg" ></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="collaps font-25" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-collaps-down.svg" ></ion-icon>
+12 -2
View File
@@ -242,7 +242,7 @@ label{
color: #e16817; color: #e16817;
} }
td.monthview-primary-with-event { td.monthview-primary-with-event {
background-color: red !important; background-color: white !important;
} }
.header-title{ .header-title{
font-family: Roboto; font-family: Roboto;
@@ -1031,7 +1031,7 @@ $font-size: rem(15);
} }
.height-356 { .height-356 {
height: 369px; height: 360px;
} }
} }
@@ -1066,3 +1066,13 @@ $font-size: rem(15);
} }
.calendar-conteiner-height {
height: 100%;
transition: 0.5s;
animation: 0.5s;
-webkit-transition: 0.5s;
-moz-transition: 0.5s;
-ms-transition: 0.5s;
-o-transition: 0.5s;
-webkit-animation: 0.5s;
}
+22 -19
View File
@@ -291,34 +291,37 @@ export class AgendaPage implements OnInit {
}, 1000) }, 1000)
} }
weeksToShow = [] height = '75px'
weekToShow() { weekToShow() {
setTimeout(() => { setTimeout(() => {
let num = 0; try {
let weekNum = 0;
function Week(a) { function Week(a) {
for(let b of a.querySelectorAll('td')) { for(let b of a.querySelectorAll('td')) {
if(!b.className.includes('text-muted')) { if(!b.className.includes('text-muted')) {
num++; weekNum++;
return true 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"] const dayBoxHeight = document.querySelector('.monthview-container .swiper-container .swiper-slide-active table tbody tr td').clientHeight
} else { const weeks = document.querySelectorAll('.monthview-container .swiper-container .swiper-slide-active table tbody tr');
this.weeksToShow = ["week-6"]
}
for (let week of weeks as any ){
Week(week)
}
this.showCalendar = true
this.height = (weekNum * dayBoxHeight) +'px'
} catch (e) {
setTimeout(()=> {
this.weekToShow()
}, 100)
}
}, 250) }, 250)
} }
+2 -6
View File
@@ -72,8 +72,6 @@ export class ListBoxService {
endTime: event.end endTime: event.end
}) })
const day = this.dateService.getDay(event.start) const day = this.dateService.getDay(event.start)
event['manyDays'] = !this.dateService.isSameDate(event.start, event.end) event['manyDays'] = !this.dateService.isSameDate(event.start, event.end)
@@ -89,11 +87,10 @@ export class ListBoxService {
if (this.dateService.notSameDate(startDate, endDate)) { if (this.dateService.notSameDate(startDate, endDate)) {
if (diffDays <= 150 ) {
if (diffDays <= 150 && !event.event.IsAllDayEvent ) {
if (diffDays >= 1) { if (diffDays >= 1) {
const StartEvent = this.transForm(event, {startMany: true, endMany: false, middle: false}) const StartEvent = this.transForm(event, {startMany: true, endMany: false, middle: false})
if(this.CanPush(event, selectedDate)) days[day].push(StartEvent) if(this.CanPush(event, selectedDate)) days[day].push(StartEvent)
@@ -138,7 +135,6 @@ export class ListBoxService {
if(this.CanPush(event, selectedDate)) days[day].push(event) if(this.CanPush(event, selectedDate)) days[day].push(event)
} }
} else { } else {
if(this.CanPush(event, selectedDate)) days[day].push(event) if(this.CanPush(event, selectedDate)) days[day].push(event)
} }
} else { } else {
+9
View File
@@ -698,4 +698,13 @@ export class MessageService {
} catch (error) {} } catch (error) {}
} }
UIdata() {
this.incomingFromCurrentUser = this.u.username!= SessionStore.user.UserName
this.hasMessage = this.msg !=''
}
incomingFromCurrentUser = false
hasMessage = false
} }
-1
View File
@@ -257,7 +257,6 @@ td.monthview-secondary-with-event, td.monthview-secondary-with-event[_ngcontent-
} */ } */
.calendar-container{ .calendar-container{
height: 333px;
z-index: 10; z-index: 10;
transition: 0.5s; transition: 0.5s;
overflow-y: hidden; overflow-y: hidden;
File diff suppressed because one or more lines are too long