();
+ weeks = computed(() => this.computeWeeksFrom(this.firstDayOfCurrentMonth()));
getEventsOf(day: Dayjs): CalendarEvent[] {
const key = day.format('YYYY-MM-DD');
return this.eventMap().get(key) ?? [];
}
- openPopover(event: CalendarEvent, popover: NgbPopover) {
- if (this.selectedEvent() === event) {
- this.closePopover();
- return;
- }
- this.selectedEvent.set(event);
- this.popover?.close();
- this.popover = popover;
- popover.open();
- }
-
- closePopover() {
- this.popover?.close();
- this.popover = undefined;
- this.selectedEvent.set(undefined);
- }
-
/**
* Computes all weeks overlapping with the month of the parameter.
*
diff --git a/src/main/webapp/app/core/calendar/desktop/overview/calendar-desktop-overview.component.html b/src/main/webapp/app/core/calendar/desktop/overview/calendar-desktop-overview.component.html
index 9559f3004e35..02675d0a5cc6 100644
--- a/src/main/webapp/app/core/calendar/desktop/overview/calendar-desktop-overview.component.html
+++ b/src/main/webapp/app/core/calendar/desktop/overview/calendar-desktop-overview.component.html
@@ -2,57 +2,69 @@
- @if (presentation() === 'month') {
+ @if (selectedPresentation() === 'month') {
} @else {
diff --git a/src/main/webapp/app/core/calendar/desktop/overview/calendar-desktop-overview.component.scss b/src/main/webapp/app/core/calendar/desktop/overview/calendar-desktop-overview.component.scss
index df1ff20392a6..112248e5858c 100644
--- a/src/main/webapp/app/core/calendar/desktop/overview/calendar-desktop-overview.component.scss
+++ b/src/main/webapp/app/core/calendar/desktop/overview/calendar-desktop-overview.component.scss
@@ -13,6 +13,49 @@
flex: 1;
height: 100%;
}
+
+ .chips-section {
+ display: flex;
+ gap: 0.375rem;
+ min-width: 6rem;
+
+ .chip {
+ display: flex;
+ align-items: center;
+ gap: 0.25rem;
+ box-sizing: border-box;
+ padding: 0.125rem 0.35rem;
+ border-radius: 0.25rem;
+ background: var(--body-bg);
+ font-size: 0.75rem;
+
+ .remove-button {
+ all: unset;
+ }
+ }
+
+ .exam-chip {
+ background-color: var(--pastel-teal);
+ }
+
+ .lecture-chip {
+ background-color: var(--pastel-blue);
+ }
+
+ .tutorial-chip {
+ background-color: var(--pastel-purple);
+ }
+
+ .exercise-chip {
+ background-color: var(--pastel-cyan);
+ }
+
+ .legend-circle {
+ width: 0.75rem;
+ height: 0.75rem;
+ border-radius: 0.25rem;
+ }
+ }
}
.calendar-presentation-container {
diff --git a/src/main/webapp/app/core/calendar/desktop/overview/calendar-desktop-overview.component.spec.ts b/src/main/webapp/app/core/calendar/desktop/overview/calendar-desktop-overview.component.spec.ts
index ae52c920bcce..63cfcf7a3576 100644
--- a/src/main/webapp/app/core/calendar/desktop/overview/calendar-desktop-overview.component.spec.ts
+++ b/src/main/webapp/app/core/calendar/desktop/overview/calendar-desktop-overview.component.spec.ts
@@ -12,13 +12,12 @@ import { CalendarEvent } from 'app/core/calendar/shared/entities/calendar-event.
import { CalendarDesktopWeekPresentationComponent } from 'app/core/calendar/desktop/week-presentation/calendar-desktop-week-presentation.component';
import { CalendarDesktopMonthPresentationComponent } from 'app/core/calendar/desktop/month-presentation/calendar-desktop-month-presentation.component';
import { CalendarSubscriptionPopoverComponent } from 'app/core/calendar/shared/calendar-subscription-popover/calendar-subscription-popover.component';
-import { CalendarEventFilterComponent } from 'app/core/calendar/shared/calendar-event-filter/calendar-event-filter.component';
-import { CalendarEventDetailPopoverComponent } from 'app/core/calendar/shared/calendar-event-detail-popover/calendar-event-detail-popover.component';
import { CalendarDayBadgeComponent } from 'app/core/calendar/shared/calendar-day-badge/calendar-day-badge.component';
import { CalendarDesktopOverviewComponent } from './calendar-desktop-overview.component';
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
import { MockTranslateService } from 'test/helpers/mocks/service/mock-translate.service';
import { provideNoopAnimations } from '@angular/platform-browser/animations';
+import { CalendarEventFilterOption } from 'app/core/calendar/shared/util/calendar-util';
describe('CalendarDesktopOverviewComponent', () => {
let component: CalendarDesktopOverviewComponent;
@@ -29,6 +28,12 @@ describe('CalendarDesktopOverviewComponent', () => {
loadEventsForCurrentMonth: jest.fn().mockReturnValue(of([])),
subscriptionToken: signal('testToken'),
loadSubscriptionToken: jest.fn().mockReturnValue(of([])),
+ includedEventFilterOptions: signal([
+ CalendarEventFilterOption.LectureEvents,
+ CalendarEventFilterOption.ExerciseEvents,
+ CalendarEventFilterOption.TutorialEvents,
+ CalendarEventFilterOption.ExamEvents,
+ ]),
};
const activatedRouteMock = {
@@ -40,12 +45,7 @@ describe('CalendarDesktopOverviewComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [CalendarDesktopOverviewComponent, CalendarDesktopWeekPresentationComponent, CalendarDesktopMonthPresentationComponent, FaIconComponent],
- declarations: [
- MockComponent(CalendarEventDetailPopoverComponent),
- MockComponent(CalendarDayBadgeComponent),
- MockPipe(ArtemisTranslatePipe),
- MockComponent(CalendarEventFilterComponent),
- ],
+ declarations: [MockComponent(CalendarDayBadgeComponent), MockPipe(ArtemisTranslatePipe)],
providers: [
{ provide: CalendarService, useValue: calendarServiceMock },
{ provide: ActivatedRoute, useValue: activatedRouteMock },
@@ -71,14 +71,12 @@ describe('CalendarDesktopOverviewComponent', () => {
const previousButton = fixture.debugElement.query(By.css('#previous-button')).nativeElement;
const nextButton = fixture.debugElement.query(By.css('#next-button')).nativeElement;
- const weekButton = fixture.debugElement.query(By.css('#week-button')).nativeElement;
- const monthButton = fixture.debugElement.query(By.css('#month-button')).nativeElement;
+ const selectButton = fixture.debugElement.query(By.css('#presentation-select-button'));
expect(previousButton).toBeTruthy();
expect(nextButton).toBeTruthy();
- expect(weekButton).toBeTruthy();
- expect(monthButton).toBeTruthy();
+ expect(selectButton).toBeTruthy();
- expect(component.presentation()).toBe('month');
+ expect(component.selectedPresentation()).toBe('month');
expect(fixture.debugElement.query(By.css('jhi-calendar-desktop-month-presentation'))).toBeTruthy();
expect(fixture.debugElement.query(By.css('jhi-calendar-desktop-week-presentation'))).toBeFalsy();
@@ -100,9 +98,9 @@ describe('CalendarDesktopOverviewComponent', () => {
expect(firstDayOfCurrentMonth.isSame(expectedFirstDayOfCurrentMonth, 'day')).toBeTrue();
expect(firstDayOfCurrentWeek.isSame(expectedFirstDayOfCurrentWeek, 'day')).toBeTrue();
- weekButton.click();
+ component.selectedPresentation.set('week');
fixture.detectChanges();
- expect(component.presentation()).toBe('week');
+ expect(component.selectedPresentation()).toBe('week');
expect(fixture.debugElement.query(By.css('jhi-calendar-desktop-week-presentation'))).toBeTruthy();
expect(fixture.debugElement.query(By.css('jhi-calendar-desktop-month-presentation'))).toBeFalsy();
@@ -159,7 +157,7 @@ describe('CalendarDesktopOverviewComponent', () => {
component.firstDayOfCurrentMonth.set(october.startOf('month'));
component.firstDayOfCurrentWeek.set(october.startOf('isoWeek'));
- component.presentation.set('month');
+ component.selectedPresentation.set('month');
fixture.detectChanges();
const heading = () => fixture.debugElement.query(By.css('.h3')).nativeElement.textContent.trim();
@@ -176,8 +174,7 @@ describe('CalendarDesktopOverviewComponent', () => {
fixture.detectChanges();
expect(heading()).toBe('October 2025');
- const weekButton = fixture.debugElement.query(By.css('#week-button')).nativeElement;
- weekButton.click();
+ component.selectedPresentation.set('week');
fixture.detectChanges();
expect(heading()).toContain('September | October 2025');
diff --git a/src/main/webapp/app/core/calendar/desktop/overview/calendar-desktop-overview.component.ts b/src/main/webapp/app/core/calendar/desktop/overview/calendar-desktop-overview.component.ts
index d5fcf4e5baf5..f71b19203693 100644
--- a/src/main/webapp/app/core/calendar/desktop/overview/calendar-desktop-overview.component.ts
+++ b/src/main/webapp/app/core/calendar/desktop/overview/calendar-desktop-overview.component.ts
@@ -1,77 +1,118 @@
-import { Component, OnDestroy, OnInit, inject, signal } from '@angular/core';
+import { Component, OnInit, computed, effect, inject, signal } from '@angular/core';
+import { toSignal } from '@angular/core/rxjs-interop';
+import { map } from 'rxjs/operators';
import { ActivatedRoute } from '@angular/router';
-import { Subscription } from 'rxjs';
-import { NgClass } from '@angular/common';
import { finalize } from 'rxjs/operators';
import dayjs, { Dayjs } from 'dayjs/esm';
import 'dayjs/esm/locale/en';
import 'dayjs/esm/locale/de';
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
-import { faChevronLeft, faChevronRight } from '@fortawesome/free-solid-svg-icons';
+import { faChevronLeft, faChevronRight, faXmark } from '@fortawesome/free-solid-svg-icons';
import { TranslateService } from '@ngx-translate/core';
import { TranslateDirective } from 'app/shared/language/translate.directive';
import { CalendarDesktopMonthPresentationComponent } from 'app/core/calendar/desktop/month-presentation/calendar-desktop-month-presentation.component';
import { CalendarDesktopWeekPresentationComponent } from 'app/core/calendar/desktop/week-presentation/calendar-desktop-week-presentation.component';
import { CalendarService } from 'app/core/calendar/shared/service/calendar.service';
-import { CalendarEventFilterComponent, CalendarEventFilterComponentVariant } from 'app/core/calendar/shared/calendar-event-filter/calendar-event-filter.component';
import { CalendarSubscriptionPopoverComponent } from 'app/core/calendar/shared/calendar-subscription-popover/calendar-subscription-popover.component';
+import { SelectButtonModule } from 'primeng/selectbutton';
+import { FormsModule } from '@angular/forms';
+import { ButtonModule } from 'primeng/button';
+import { ButtonGroupModule } from 'primeng/buttongroup';
+import { MultiSelectModule } from 'primeng/multiselect';
+import { CalendarEventFilterOption } from 'app/core/calendar/shared/util/calendar-util';
+
+interface CalendarEventFilterOptionAndMetadata {
+ option: CalendarEventFilterOption;
+ name: string;
+ colorClassName: string;
+}
@Component({
selector: 'jhi-calendar-desktop-overview',
imports: [
CalendarDesktopMonthPresentationComponent,
CalendarDesktopWeekPresentationComponent,
- CalendarEventFilterComponent,
- NgClass,
FaIconComponent,
TranslateDirective,
CalendarSubscriptionPopoverComponent,
+ SelectButtonModule,
+ FormsModule,
+ ButtonModule,
+ ButtonGroupModule,
+ MultiSelectModule,
],
templateUrl: './calendar-desktop-overview.component.html',
styleUrl: './calendar-desktop-overview.component.scss',
})
-export class CalendarDesktopOverviewComponent implements OnInit, OnDestroy {
+export class CalendarDesktopOverviewComponent implements OnInit {
+ private static readonly FILTER_OPTION_NAME_KEY_MAP: Record = {
+ exerciseEvents: 'artemisApp.calendar.filterOption.exercises',
+ lectureEvents: 'artemisApp.calendar.filterOption.lectures',
+ tutorialEvents: 'artemisApp.calendar.filterOption.tutorials',
+ examEvents: 'artemisApp.calendar.filterOption.exams',
+ };
+ private static readonly FILTER_OPTION_COLOR_CLASS_MAP: Record = {
+ exerciseEvents: 'exercise-chip',
+ lectureEvents: 'lecture-chip',
+ tutorialEvents: 'tutorial-chip',
+ examEvents: 'exam-chip',
+ };
+
private calendarService = inject(CalendarService);
private translateService = inject(TranslateService);
private activatedRoute = inject(ActivatedRoute);
- private activatedRouteSubscription?: Subscription;
- private currentLocaleSubscription?: Subscription;
- private currentLocale = signal(this.translateService.currentLang);
+ private currentLocale = toSignal(this.translateService.onLangChange.pipe(map((event) => event.lang)), { initialValue: this.translateService.currentLang });
- readonly CalendarEventFilterComponentVariant = CalendarEventFilterComponentVariant;
- readonly faChevronRight = faChevronRight;
- readonly faChevronLeft = faChevronLeft;
+ protected readonly faChevronRight = faChevronRight;
+ protected readonly faChevronLeft = faChevronLeft;
+ protected readonly faXmark = faXmark;
- presentation = signal<'week' | 'month'>('month');
+ selectedPresentation = signal<'week' | 'month'>('month');
+ presentationOptions = computed<{ label: string; value: 'week' | 'month' }[]>(() => {
+ this.currentLocale();
+ return this.buildPresentationOptions();
+ });
+ filterComponentPlaceholder = computed(() => {
+ this.currentLocale();
+ return this.translateService.instant('artemisApp.calendar.filterComponentPlaceholder');
+ });
+ selectedFilterOptions = computed(() => {
+ this.currentLocale();
+ return this.computeSelectedFilterOptions(this.calendarService.includedEventFilterOptions());
+ });
+ filterOptions = computed(() => {
+ this.currentLocale();
+ return this.buildFilterOptions();
+ });
firstDayOfCurrentMonth = signal(dayjs().startOf('month'));
firstDayOfCurrentWeek = signal(dayjs().startOf('isoWeek'));
- isLoading = signal(false);
calendarSubscriptionToken = this.calendarService.subscriptionToken;
- currentCourseId = signal(undefined);
-
- ngOnInit(): void {
- this.currentLocaleSubscription = this.translateService.onLangChange.subscribe((event) => {
- this.currentLocale.set(event.lang);
- });
+ isLoading = signal(false);
+ currentCourseId = toSignal(
+ this.activatedRoute.parent!.paramMap.pipe(
+ map((params) => {
+ const id = params.get('courseId');
+ return id ? +id : undefined;
+ }),
+ ),
+ { initialValue: undefined },
+ );
- this.activatedRouteSubscription = this.activatedRoute.parent?.paramMap.subscribe((parameterMap) => {
- const courseIdParameter = parameterMap.get('courseId');
- if (courseIdParameter) {
- this.currentCourseId.set(+courseIdParameter);
+ constructor() {
+ effect(() => {
+ const courseId = this.currentCourseId();
+ if (courseId) {
this.loadEventsForCurrentMonth();
}
});
-
- this.calendarService.loadSubscriptionToken().subscribe();
}
- ngOnDestroy() {
- this.currentLocaleSubscription?.unsubscribe();
- this.activatedRouteSubscription?.unsubscribe();
+ ngOnInit(): void {
+ this.calendarService.loadSubscriptionToken().subscribe();
}
goToPrevious(): void {
- if (this.presentation() === 'week') {
+ if (this.selectedPresentation() === 'week') {
this.firstDayOfCurrentWeek.update((current) => current.subtract(1, 'week'));
const firstDayOfCurrentWeek = this.firstDayOfCurrentWeek();
const firstDayOfCurrentMonth = this.firstDayOfCurrentMonth();
@@ -86,7 +127,7 @@ export class CalendarDesktopOverviewComponent implements OnInit, OnDestroy {
}
goToNext(): void {
- if (this.presentation() === 'week') {
+ if (this.selectedPresentation() === 'week') {
this.firstDayOfCurrentWeek.update((current) => current.add(1, 'week'));
const endOfCurrentWeek = this.firstDayOfCurrentWeek().endOf('isoWeek');
const endOfCurrentMonth = this.firstDayOfCurrentMonth().endOf('month');
@@ -108,7 +149,7 @@ export class CalendarDesktopOverviewComponent implements OnInit, OnDestroy {
getMonthDescription(): string {
const currentLocale = this.currentLocale();
- if (this.presentation() === 'month') {
+ if (this.selectedPresentation() === 'month') {
return this.firstDayOfCurrentMonth().locale(currentLocale).format('MMMM YYYY');
} else {
const firstDayOfCurrentWeek = this.firstDayOfCurrentWeek().locale(currentLocale);
@@ -121,6 +162,23 @@ export class CalendarDesktopOverviewComponent implements OnInit, OnDestroy {
}
}
+ onSelectionOptionsChange(newSelectedOptionsAndMetadata: CalendarEventFilterOptionAndMetadata[]): void {
+ const options = newSelectedOptionsAndMetadata.map((optionAndMetadata) => optionAndMetadata.option);
+ this.calendarService.includedEventFilterOptions.set(options);
+ }
+
+ removeOption(option: CalendarEventFilterOption): void {
+ this.calendarService.includedEventFilterOptions.update((currentOptions) => currentOptions.filter((otherOption) => otherOption !== option));
+ }
+
+ private addMetadataTo(option: CalendarEventFilterOption): CalendarEventFilterOptionAndMetadata {
+ return {
+ option: option,
+ name: this.translateService.instant(CalendarDesktopOverviewComponent.FILTER_OPTION_NAME_KEY_MAP[option]),
+ colorClassName: CalendarDesktopOverviewComponent.FILTER_OPTION_COLOR_CLASS_MAP[option],
+ };
+ }
+
private loadEventsForCurrentMonth(): void {
const courseId = this.currentCourseId();
if (!courseId) return;
@@ -130,4 +188,30 @@ export class CalendarDesktopOverviewComponent implements OnInit, OnDestroy {
.pipe(finalize(() => this.isLoading.set(false)))
.subscribe();
}
+
+ private buildPresentationOptions() {
+ return [
+ {
+ label: this.translateService.instant('artemisApp.calendar.weekButtonLabel'),
+ value: 'week' as const,
+ },
+ {
+ label: this.translateService.instant('artemisApp.calendar.monthButtonLabel'),
+ value: 'month' as const,
+ },
+ ];
+ }
+
+ private computeSelectedFilterOptions(includedOptions: CalendarEventFilterOption[]): CalendarEventFilterOptionAndMetadata[] {
+ return includedOptions.map((option) => this.addMetadataTo(option));
+ }
+
+ private buildFilterOptions(): CalendarEventFilterOptionAndMetadata[] {
+ return [
+ this.addMetadataTo(CalendarEventFilterOption.LectureEvents),
+ this.addMetadataTo(CalendarEventFilterOption.ExamEvents),
+ this.addMetadataTo(CalendarEventFilterOption.ExerciseEvents),
+ this.addMetadataTo(CalendarEventFilterOption.TutorialEvents),
+ ];
+ }
}
diff --git a/src/main/webapp/app/core/calendar/desktop/week-presentation/calendar-desktop-week-presentation.component.html b/src/main/webapp/app/core/calendar/desktop/week-presentation/calendar-desktop-week-presentation.component.html
index 4ef7f72fa34d..30eca754b058 100644
--- a/src/main/webapp/app/core/calendar/desktop/week-presentation/calendar-desktop-week-presentation.component.html
+++ b/src/main/webapp/app/core/calendar/desktop/week-presentation/calendar-desktop-week-presentation.component.html
@@ -10,7 +10,7 @@
}
-
diff --git a/src/main/webapp/app/core/calendar/desktop/week-presentation/calendar-desktop-week-presentation.component.spec.ts b/src/main/webapp/app/core/calendar/desktop/week-presentation/calendar-desktop-week-presentation.component.spec.ts
index aa6f1510499c..9857cb003435 100644
--- a/src/main/webapp/app/core/calendar/desktop/week-presentation/calendar-desktop-week-presentation.component.spec.ts
+++ b/src/main/webapp/app/core/calendar/desktop/week-presentation/calendar-desktop-week-presentation.component.spec.ts
@@ -9,7 +9,6 @@ import { TranslateDirective } from 'app/shared/language/translate.directive';
import { ArtemisTranslatePipe } from 'app/shared/pipes/artemis-translate.pipe';
describe('CalendarDesktopWeekPresentationComponent', () => {
- let component: CalendarDesktopWeekPresentationComponent;
let fixture: ComponentFixture;
const startOfMonday = dayjs('2025-05-05');
@@ -26,7 +25,6 @@ describe('CalendarDesktopWeekPresentationComponent', () => {
}).compileComponents();
fixture = TestBed.createComponent(CalendarDesktopWeekPresentationComponent);
- component = fixture.componentInstance;
fixture.componentRef.setInput('firstDayOfCurrentWeek', startOfMonday);
fixture.detectChanges();
@@ -36,16 +34,4 @@ describe('CalendarDesktopWeekPresentationComponent', () => {
const dayInfoElements = fixture.debugElement.queryAll(By.css('.day-info'));
expect(dayInfoElements).toHaveLength(7);
});
-
- it('should apply "no-scroll" class only when isEventSelected is true', () => {
- const scrollContainer = fixture.debugElement.query(By.css('.scroll-container'));
- expect(scrollContainer).toBeTruthy();
-
- expect(component.isEventSelected()).toBeFalse();
- expect(scrollContainer.nativeElement.classList).not.toContain('no-scroll');
-
- component.isEventSelected.set(true);
- fixture.detectChanges();
- expect(scrollContainer.nativeElement.classList).toContain('no-scroll');
- });
});
diff --git a/src/main/webapp/app/core/calendar/desktop/week-presentation/calendar-desktop-week-presentation.component.ts b/src/main/webapp/app/core/calendar/desktop/week-presentation/calendar-desktop-week-presentation.component.ts
index 23979a96a15d..458d742c30c9 100644
--- a/src/main/webapp/app/core/calendar/desktop/week-presentation/calendar-desktop-week-presentation.component.ts
+++ b/src/main/webapp/app/core/calendar/desktop/week-presentation/calendar-desktop-week-presentation.component.ts
@@ -1,4 +1,4 @@
-import { AfterViewInit, Component, ElementRef, computed, input, signal, viewChild } from '@angular/core';
+import { AfterViewInit, Component, ElementRef, computed, input, viewChild } from '@angular/core';
import { Dayjs } from 'dayjs/esm';
import { ArtemisTranslatePipe } from 'app/shared/pipes/artemis-translate.pipe';
import * as utils from 'app/core/calendar/shared/util/calendar-util';
@@ -16,7 +16,6 @@ export class CalendarDesktopWeekPresentationComponent implements AfterViewInit {
private static readonly INITIAL_SCROLL_POSITION =
CalendarDesktopWeekPresentationComponent.INITIAL_SCROLL_HOURS_AFTER_MIDNIGHT * CalendarEventsPerDaySectionComponent.HOUR_HEIGHT_IN_PIXEL;
firstDayOfCurrentWeek = input.required();
- isEventSelected = signal(false);
scrollContainer = viewChild('scrollContainer');
weekDays = computed(() => this.computeWeekDaysFrom(this.firstDayOfCurrentWeek()));
diff --git a/src/main/webapp/app/core/calendar/mobile/day-presentation/calendar-mobile-day-presentation.component.html b/src/main/webapp/app/core/calendar/mobile/day-presentation/calendar-mobile-day-presentation.component.html
index 004ddee42946..28211fd4d338 100644
--- a/src/main/webapp/app/core/calendar/mobile/day-presentation/calendar-mobile-day-presentation.component.html
+++ b/src/main/webapp/app/core/calendar/mobile/day-presentation/calendar-mobile-day-presentation.component.html
@@ -4,7 +4,7 @@
}
-
diff --git a/src/main/webapp/app/core/calendar/mobile/day-presentation/calendar-mobile-day-presentation.component.spec.ts b/src/main/webapp/app/core/calendar/mobile/day-presentation/calendar-mobile-day-presentation.component.spec.ts
index 75ec38bf45bb..e2e7a9c1ac12 100644
--- a/src/main/webapp/app/core/calendar/mobile/day-presentation/calendar-mobile-day-presentation.component.spec.ts
+++ b/src/main/webapp/app/core/calendar/mobile/day-presentation/calendar-mobile-day-presentation.component.spec.ts
@@ -45,20 +45,4 @@ describe('CalendarMobileDayPresentation', () => {
expect(nonSelectedDayBadge.isSelectedDay()).toBeFalse();
}
});
-
- it('should apply no-scroll class when isEventSelected is true', () => {
- component.isEventSelected.set(true);
- fixture.detectChanges();
-
- const scrollContainerElement = fixture.nativeElement.querySelector('.scroll-container');
- expect(scrollContainerElement.classList).toContain('no-scroll');
- });
-
- it('should update isEventSelected signal when child emits true', () => {
- const eventsSectionComponent = ngMocks.findInstance(CalendarEventsPerDaySectionComponent);
- eventsSectionComponent.isEventSelected.emit(true);
- fixture.detectChanges();
-
- expect(component.isEventSelected()).toBeTrue();
- });
});
diff --git a/src/main/webapp/app/core/calendar/mobile/day-presentation/calendar-mobile-day-presentation.component.ts b/src/main/webapp/app/core/calendar/mobile/day-presentation/calendar-mobile-day-presentation.component.ts
index 851104555294..7365462442a5 100644
--- a/src/main/webapp/app/core/calendar/mobile/day-presentation/calendar-mobile-day-presentation.component.ts
+++ b/src/main/webapp/app/core/calendar/mobile/day-presentation/calendar-mobile-day-presentation.component.ts
@@ -1,4 +1,4 @@
-import { AfterViewInit, Component, ElementRef, computed, input, signal, viewChild } from '@angular/core';
+import { AfterViewInit, Component, ElementRef, computed, input, viewChild } from '@angular/core';
import { CalendarDayBadgeComponent } from 'app/core/calendar/shared/calendar-day-badge/calendar-day-badge.component';
import { Dayjs } from 'dayjs/esm';
import * as utils from 'app/core/calendar/shared/util/calendar-util';
@@ -20,7 +20,6 @@ export class CalendarMobileDayPresentationComponent implements AfterViewInit {
private scrollContainer = viewChild('scrollContainer');
selectedDate = input.required();
- isEventSelected = signal(false);
weekDays = computed(() => {
const selectedDate = this.selectedDate();
const dates = utils.getDatesInWeekOf(selectedDate);
diff --git a/src/main/webapp/app/core/calendar/mobile/overview/calendar-mobile-overview.component.html b/src/main/webapp/app/core/calendar/mobile/overview/calendar-mobile-overview.component.html
index e7f96c37f7fd..239abdfa3147 100644
--- a/src/main/webapp/app/core/calendar/mobile/overview/calendar-mobile-overview.component.html
+++ b/src/main/webapp/app/core/calendar/mobile/overview/calendar-mobile-overview.component.html
@@ -1,24 +1,25 @@