diff --git a/ui/src/app/dashboard/staff/teacher/teacher-dashboard.component.html b/ui/src/app/dashboard/staff/teacher/teacher-dashboard.component.html index 377253461..0f63c7121 100644 --- a/ui/src/app/dashboard/staff/teacher/teacher-dashboard.component.html +++ b/ui/src/app/dashboard/staff/teacher/teacher-dashboard.component.html @@ -8,7 +8,7 @@
- + + + +
+ +
+ +
+
+
+ +
-
- - - {{ room.name || 'i18n_no_name' | translate }} - - - - -
- -
- -
-
-
-
-
diff --git a/ui/src/app/facility/rooms/room.component.ts b/ui/src/app/facility/rooms/room.component.ts index 12448db5f..4f4780eee 100644 --- a/ui/src/app/facility/rooms/room.component.ts +++ b/ui/src/app/facility/rooms/room.component.ts @@ -11,7 +11,7 @@ import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { ToastrService } from 'ngx-toastr'; import { AccessibilitySelectorComponent } from 'src/app/facility/accessibility/accessibility-picker.component'; import { AddressComponent } from 'src/app/facility/address/address.component'; -import type { ExamRoom, ExceptionWorkingHours } from 'src/app/reservation/reservation.model'; +import type { ExamRoom } from 'src/app/reservation/reservation.model'; import { PageContentComponent } from 'src/app/shared/components/page-content.component'; import { PageHeaderComponent } from 'src/app/shared/components/page-header.component'; import { AvailabilityComponent } from './availability.component'; @@ -66,37 +66,10 @@ export class RoomComponent implements OnInit { }); } - addExceptions = (exceptions: ExceptionWorkingHours[]) => { - this.roomService.addExceptions([this.room.id], exceptions).then((data) => { - this.room.calendarExceptionEvents = [...this.room.calendarExceptionEvents, ...data]; - }); - }; - - deleteException = (exception: ExceptionWorkingHours) => { - this.roomService.deleteException(this.room.id, exception.id).then(() => { - this.room.calendarExceptionEvents = this.room.calendarExceptionEvents.splice( - this.room.calendarExceptionEvents.indexOf(exception), - 1, - ); - }); - }; - disableRoom = () => { this.roomService.disableRoom(this.room); }; - enableRoom = () => { - this.roomService.enableRoom(this.room); - }; - - validateInputAndUpdateRoom = (event: FocusEvent & { target: HTMLInputElement | HTMLTextAreaElement }) => { - const { name } = event.target; - const ctrl = this.roomForm.controls[name]; - if (ctrl.valid) { - this.updateRoom(); - } - }; - validateAndUpdateRoom = () => { if (this.roomForm.valid) { this.updateRoom(); diff --git a/ui/src/app/facility/rooms/room.service.ts b/ui/src/app/facility/rooms/room.service.ts index 470ae6f89..322aaf75e 100644 --- a/ui/src/app/facility/rooms/room.service.ts +++ b/ui/src/app/facility/rooms/room.service.ts @@ -70,7 +70,6 @@ export class RoomService { }, error: (err) => this.toast.error(err), }), - error: (err) => this.toast.error(err), }); enableRoom = (room: ExamRoom) => diff --git a/ui/src/app/review/listing/speed-review.component.ts b/ui/src/app/review/listing/speed-review.component.ts index 565ffa7e3..09a670825 100644 --- a/ui/src/app/review/listing/speed-review.component.ts +++ b/ui/src/app/review/listing/speed-review.component.ts @@ -185,7 +185,7 @@ export class SpeedReviewComponent implements OnInit { this.toast.success(`${this.translate.instant('i18n_csv_uploaded_successfully')}`); }) .catch(() => { - this.toast.error(`${this.translate.instant('i18n_csv_uploading_failed')}`); + this.toast.info(`${this.translate.instant('i18n_csv_uploading_cancelled')}`); return noop; }); }; diff --git a/ui/src/assets/i18n/en.json b/ui/src/assets/i18n/en.json index 61a2c129c..84b754add 100644 --- a/ui/src/assets/i18n/en.json +++ b/ui/src/assets/i18n/en.json @@ -1188,5 +1188,6 @@ "i18n_exam_not_published": "This exam is not published.", "i18n_show_participants": "Show participants", "i18n_hide_participants": "Hide participants", - "i18n_exam_owner_info": "Exam needs to have at least one examiner." + "i18n_exam_owner_info": "Exam needs to have at least one examiner.", + "i18n_csv_uploading_cancelled": "CSV file upload cancelled" } diff --git a/ui/src/assets/i18n/fi.json b/ui/src/assets/i18n/fi.json index 0edb80c2f..554b26ee7 100644 --- a/ui/src/assets/i18n/fi.json +++ b/ui/src/assets/i18n/fi.json @@ -1188,5 +1188,6 @@ "i18n_exam_not_published": "Tätä tenttiä ei ole julkaistu.", "i18n_show_participants": "Näytä osallistujat", "i18n_hide_participants": "Piilota osallistujat", - "i18n_exam_owner_info": "Tentissä pitää olla vähintään yksi tentaattori." + "i18n_exam_owner_info": "Tentissä pitää olla vähintään yksi tentaattori.", + "i18n_csv_uploading_cancelled": "CSV tiedoston tuonti peruutettu" } diff --git a/ui/src/assets/i18n/sv.json b/ui/src/assets/i18n/sv.json index 2f603f308..95948fc93 100644 --- a/ui/src/assets/i18n/sv.json +++ b/ui/src/assets/i18n/sv.json @@ -1188,5 +1188,6 @@ "i18n_exam_not_published": "Tentamen inte publicerad. SV", "i18n_show_participants": "Visa deltagare", "i18n_hide_participants": "Dölj deltagare", - "i18n_exam_owner_info": "Tentamen behöver minst en bedömare.SV" + "i18n_exam_owner_info": "Tentamen behöver minst en bedömare.SV", + "i18n_csv_uploading_cancelled": "Uppladdning av CSV-fil avbruten" }