diff --git a/application/controllers/api/frontend/v1/ClassScheduleApi.php b/application/controllers/api/frontend/v1/ClassScheduleApi.php index dcfd6f50d..58bcd365c 100644 --- a/application/controllers/api/frontend/v1/ClassScheduleApi.php +++ b/application/controllers/api/frontend/v1/ClassScheduleApi.php @@ -36,7 +36,7 @@ class ClassScheduleApi extends FHCAPI_Controller 'createClassTimeSlotsForValidityPeriod' => array('lehre/unterrichtszeiten_gk:r'), 'updateClassTimeSlotsForValidityPeriod' => array('lehre/unterrichtszeiten_gk:r'), 'deleteClassTimeSlotsForValidityPeriod' => array('lehre/unterrichtszeiten_gk:r'), - 'getAllClassScheduleTypes' => array('lehre/unterrichtszeiten_typ:r'), + 'getAllClassScheduleTypes' => array('lehre/unterrichtszeiten_typ:r', 'lehre/unterrichtszeiten_gk:r'), 'createClassTimeSlotType' => array('lehre/unterrichtszeiten_typ:rw'), 'updateClassTimeSlotType' => array('lehre/unterrichtszeiten_typ:rw'), 'deleteClassTimeSlotType' => array('lehre/unterrichtszeiten_typ:rw'), diff --git a/application/controllers/lehre/ClassSchedule.php b/application/controllers/lehre/ClassSchedule.php index f1581acb3..7be273c56 100644 --- a/application/controllers/lehre/ClassSchedule.php +++ b/application/controllers/lehre/ClassSchedule.php @@ -42,6 +42,7 @@ class ClassSchedule extends Auth_Controller { return $this->load->view('lehre/class_schedule/index.php', [ 'permissions' => [ + 'lehre/unterrichtszeiten_typ_r' => $this->permissionlib->isBerechtigt('lehre/unterrichtszeiten_typ', 's'), 'lehre/unterrichtszeiten_typ_w' => $this->permissionlib->isBerechtigt('lehre/unterrichtszeiten_typ', 'suid'), ], ]); diff --git a/public/js/components/ClassSchedule/ClassScheduleCalendarSelector.js b/public/js/components/ClassSchedule/ClassScheduleCalendarSelector.js index 54c06a86b..e3f3db6c6 100644 --- a/public/js/components/ClassSchedule/ClassScheduleCalendarSelector.js +++ b/public/js/components/ClassSchedule/ClassScheduleCalendarSelector.js @@ -1079,7 +1079,10 @@ export default { let dropzoneElementDataNumber = this.getElementDataNumber(closestPartBody); - if (dropzoneElementDataNumber === null || dropzoneElementDataNumber === undefined) { + if ( + dropzoneElementDataNumber === null || + dropzoneElementDataNumber === undefined + ) { return; } @@ -1350,6 +1353,8 @@ export default { this.currentlyEditedOverlayId = null; }, showOverlayClassTimeTypePopover(overlayId) { + if (this.$props.isPreviewMode) return; + let overlayElement = this.getOverlayElementByOverlayId(overlayId); if (!overlayElement) return; @@ -1827,18 +1832,6 @@ export default {