diff --git a/src/components/coursemanage/lecture.tsx b/src/components/coursemanage/lecture.tsx
index 5bb033f..e4aaf16 100644
--- a/src/components/coursemanage/lecture.tsx
+++ b/src/components/coursemanage/lecture.tsx
@@ -12,13 +12,14 @@ import {
TableCell,
TableRow,
Typography,
- Tooltip
+ Tooltip,
+ Alert
} from '@mui/material';
import * as React from 'react';
import { Assignment } from '../../model/assignment';
import { Lecture } from '../../model/lecture';
import { deleteAssignment } from '../../services/assignments.service';
-import { CreateDialog, EditLectureDialog } from '../util/dialog';
+import { CreateDialog, EditLectureDialog, IEditLectureProps } from '../util/dialog';
import { updateLecture } from '../../services/lectures.service';
import { red, grey } from '@mui/material/colors';
import { enqueueSnackbar } from 'notistack';
@@ -157,6 +158,26 @@ export const LectureComponent = () => {
const [lectureState, setLecture] = React.useState(lecture);
const [assignmentsState, setAssignments] = React.useState(assignments);
+ const [isEditDialogOpen, setEditDialogOpen] = React.useState(false);
+
+ const handleOpenEditDialog = () => {
+ setEditDialogOpen(true);
+ };
+
+
+ const handleUpdateLecture = (updatedLecture) => {
+ updateLecture(updatedLecture).then(
+ (response) => {
+ setLecture(response);
+ },
+ (error) => {
+ enqueueSnackbar(error.message, {
+ variant: 'error',
+ });
+ }
+ );
+ };
+
if (navigation.state === 'loading') {
return (
@@ -186,38 +207,42 @@ export const LectureComponent = () => {
) : null}