diff --git a/ui/src/app/calendar/helpers/selected-room.component.ts b/ui/src/app/calendar/helpers/selected-room.component.ts
index 1068f674e..8042df42e 100644
--- a/ui/src/app/calendar/helpers/selected-room.component.ts
+++ b/ui/src/app/calendar/helpers/selected-room.component.ts
@@ -37,11 +37,11 @@ import { OrderByPipe } from 'src/app/shared/sorting/order-by.pipe';
}
- @if (maintenancePeriods.length > 0) {
+ @if (thisWeeksMaintenancePeriods().length > 0) {
{{ 'i18n_maintenance_periods' | translate }}:
- @for (period of maintenancePeriods | orderBy: 'startsAt'; track period.id) {
+ @for (period of thisWeeksMaintenancePeriods() | orderBy: 'startsAt'; track period.id) {
{{ period.startsAt | date: 'dd.MM.yyyy HH:mm' }} -
{{ period.endsAt | date: 'dd.MM.yyyy HH:mm' }}
@@ -50,6 +50,10 @@ import { OrderByPipe } from 'src/app/shared/sorting/order-by.pipe';
}
+ } @else {
+
+
{{ 'i18n_no_maintenance_periods_this_week' | translate }}
+
}
@if (exceptionHours().length > 0) {
@@ -62,11 +66,15 @@ import { OrderByPipe } from 'src/app/shared/sorting/order-by.pipe';
ngbPopover="{{ eh.description | translate }}"
popoverTitle="{{ 'i18n_instructions' | translate }}"
>
- {{ eh.start }} - {{ eh.end }}
+ {{ eh.start }} - {{ eh.end }} {{ eh.description + '' | translate }}
}
+ } @else {
+
+
{{ 'i18n_no_exceptions_this_week' | translate }}
+
}
@if (getRoomInstructions()) {
@@ -92,6 +100,7 @@ export class SelectedRoomComponent implements OnInit, OnChanges {
openingHours = signal([]);
exceptionHours = signal<(ExceptionWorkingHours & { start: string; end: string; description: string })[]>([]);
+ showAllMaintenancePeriods = false;
constructor(
private translate: TranslateService,
@@ -123,6 +132,13 @@ export class SelectedRoomComponent implements OnInit, OnChanges {
getRoomAccessibility = () =>
this.room.accessibilities ? this.room.accessibilities.map((a) => a.name).join(', ') : '';
+ thisWeeksMaintenancePeriods() {
+ const mp = [...this.maintenancePeriods];
+ return mp.filter((p) => {
+ const start = DateTime.fromISO(p.startsAt);
+ return start >= this.viewStart && start < this.viewStart.plus({ week: 1 });
+ });
+ }
private init() {
this.openingHours.set(this.Calendar.processOpeningHours(this.room));
this.exceptionHours.set(
diff --git a/ui/src/assets/i18n/en.json b/ui/src/assets/i18n/en.json
index 5ff4c08d7..d5c40e2d4 100644
--- a/ui/src/assets/i18n/en.json
+++ b/ui/src/assets/i18n/en.json
@@ -1179,5 +1179,7 @@
"i18n_unsaved_changes": "Unsaved changes",
"i18n_type_to_start_search": "Type to start search",
"i18n_datepicker": "Datepicker",
- "i18n_move_question": "Change the order of the exam sections by dragging"
+ "i18n_move_question": "Change the order of the exam sections by dragging",
+ "i18n_no_maintenance_periods_this_week": "No service breaks this week",
+ "i18n_no_exceptions_this_week": "No exceptions this week"
}
diff --git a/ui/src/assets/i18n/fi.json b/ui/src/assets/i18n/fi.json
index 3051dc19f..aecfe3107 100644
--- a/ui/src/assets/i18n/fi.json
+++ b/ui/src/assets/i18n/fi.json
@@ -105,7 +105,7 @@
"i18n_exams": "Tentit",
"i18n_student_exams": "Muut saman opintojakson tentit",
"i18n_exams_to_be_reviewed": "Tenttivastaukset",
- "i18n_exception_datetimes": "Poikkeusaukioloajat",
+ "i18n_exception_datetimes": "Poikkeukset aukioloaikoihin",
"i18n_exception_time": "Poikkeusaukioloaika",
"i18n_exit_feedback": "Poistu palautteesta",
"i18n_exit_preview": "Poistu esikatselusta",
@@ -189,7 +189,7 @@
"i18n_room_campus": "Kampus",
"i18n_room_code": "Huonekoodi",
"i18n_room_contact_person": "Yhteyshenkilö",
- "i18n_room_default_working_hours": "Oletusaukioloaika",
+ "i18n_room_default_working_hours": "Aukioloaika",
"i18n_room_guidance": "Tilaohjeet",
"i18n_room_out_of_service": "Tila on pois käytöstä",
"i18n_room_videorecordings_url": "Linkki videotallenteisiin",
@@ -898,7 +898,7 @@
"i18n_exam_rooms_administration": "Tenttitilojen ylläpito",
"i18n_exam_all_rooms": "Kaikki tenttitilat",
"i18n_exam_machine_softwares": "Tarvittavat ohjelmistot",
- "i18n_openinghours_exception_datetimes": "Aukioloajat ja poikkeusaukioloajat",
+ "i18n_openinghours_exception_datetimes": "Aukioloajat ja Poikkeukset aukioloaikoihin",
"i18n_error_ip_address_exists_for_room": "IP-osoite on jo käytössä",
"i18n_exam_materials": "Valitse tentittävät aihealueet",
"i18n_exam_material_description": "Tenttimateriaali/sisältö, johon aihealueen kysymykset perustuvat",
@@ -1179,5 +1179,7 @@
"i18n_unsaved_changes": "Tallentamattomia muutoksia",
"i18n_type_to_start_search": "Kirjoita aloittaaksesi haku",
"i18n_datepicker": "Päivämäärävalitsin",
- "i18n_move_question": "Vaihda kysymysten järjestystä raahaamalla tästä"
+ "i18n_move_question": "Vaihda kysymysten järjestystä raahaamalla tästä",
+ "i18n_no_maintenance_periods_this_week": "Ei huoltokatkoja tällä viikolla",
+ "i18n_no_exceptions_this_week": "Ei poikkeusaukioloaikoja tällä viikolla"
}
diff --git a/ui/src/assets/i18n/sv.json b/ui/src/assets/i18n/sv.json
index 3aa032ef3..9f99c3a02 100644
--- a/ui/src/assets/i18n/sv.json
+++ b/ui/src/assets/i18n/sv.json
@@ -1179,5 +1179,7 @@
"i18n_unsaved_changes": "Osparade ändringar",
"i18n_type_to_start_search": "Skriv för att börja söka",
"i18n_datepicker": "Välj datum",
- "i18n_move_question": "Ändra ordningsföljden på frågorna genom att dra"
+ "i18n_move_question": "Ändra ordningsföljden på frågorna genom att dra",
+ "i18n_no_maintenance_periods_this_week": "Inga avvikande öppettider denna vecka",
+ "i18n_no_exceptions_this_week": "Inga avvikande öppettider denna vecka"
}