diff --git a/frontend/src/components/ViewProjectTeaderComponent.tsx b/frontend/src/components/ViewProjectTeaderComponent.tsx index 0ff00a5f..b87c889f 100644 --- a/frontend/src/components/ViewProjectTeaderComponent.tsx +++ b/frontend/src/components/ViewProjectTeaderComponent.tsx @@ -17,18 +17,21 @@ export function ViewProjectTeaderComponent(props: { deadline: Value, setDeadline: React.Dispatch>, // TODO dit aanpassen naar Date of iets anders description: string, setDescription: React.Dispatch>, requiredFiles: string, setRequiredFiles: React.Dispatch>, + otherFilesAllow: boolean, setOtherFilesAllow: React.Dispatch>, + groupProject: boolean, setGroupProject: React.Dispatch> }): JSX.Element { // helpers - const [showCalender, setCalender] = useState(false); - const [showGroup, setGroup] = useState(false); + const [showCalender, setCalender] = useState(props.deadline !== null); + const [showGroup, setGroup] = useState(props.groupProject); const expandDeadline = () => { setCalender(!showCalender); }; - const expandGroup = () => { + const expandGroup = (checked: boolean) => { setGroup(!showGroup); + props.setGroupProject(checked); }; const hours_array = Array.from({length: 24}, (_, index) => index.toString().padStart(2, '0')); @@ -64,7 +67,7 @@ export function ViewProjectTeaderComponent(props: {