File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,10 +5,10 @@ import { useCourseOverviewQuery } from '../../generated/graphql';
55import moment from 'moment' ;
66
77const overviewStyle =
8- 'flex flex-col m-auto bg-white w-11/12 md:w-10/12 lg:w-9/12 xl:w-7/12 shadow-xl mt-8' ;
8+ 'flex flex-col m-auto bg-green w-11/12 md:w-10/12 lg:w-9/12 xl:w-7/12 mt-8 h-1/3 md:h-2/4 lg:h-2/3 xl:h-3/4 ' ;
99const headerStyle =
1010 'flex bg-green shadow-md p-4 justify-center text-white text-md sm:text-lg md:text-xl' ;
11- const historyStyle = 'flex flex-row flex-wrap justify-start w-full' ;
11+ const historyStyle = 'flex flex-row flex-wrap justify-start bg-white w-full h-full overflow-scroll ' ;
1212
1313const Overview : React . FC = ( ) => {
1414 const courseId = Number ( useParams ( ) . courseId ) ;
@@ -28,8 +28,8 @@ const Overview: React.FC = () => {
2828 return (
2929 < div >
3030 < div className = { overviewStyle } >
31- < article className = 'flex flex-col justify-center' >
32- < p className = 'm-auto text-xl' > Attendance</ p >
31+ < article className = 'flex flex-col justify-center p-2 h-full ' >
32+ < p className = 'm-auto text-xl text-white pb-2 ' > Attendance</ p >
3333 < section className = { historyStyle } >
3434 { ! ! sessions &&
3535 sessions . map ( ( session ) => {
Original file line number Diff line number Diff line change @@ -5,22 +5,22 @@ import StudentsList from '../ClassView/StudentsList';
55
66// const listStyle = 'flex flex-col justify-start items-start';
77
8- const btnStyle = "bg-green text-white p-4 shadow-md " ;
8+ const btnStyle = "flex bg-green text-white p-4 shadow-lg m-auto my-8 " ;
99
1010const SessionHistory : React . FC = ( ) => {
1111 const courseId = Number ( useParams ( ) . courseId ) ;
1212
1313 return (
1414 < div >
1515 { /* button back to overview */ }
16- < footer className = "flex justify-center" >
17- < Link to = { `/homepage/classes/${ courseId } /history` } >
18- < button className = { btnStyle } > Back to history overview</ button >
19- </ Link >
16+ < footer className = "flex justify-center my-4" >
2017 </ footer >
2118 { /* student list for this session */ }
2219 < StudentsList courseId = { courseId } />
2320 { /* TODO: each student is clickable to get individual attendance */ }
21+ < Link to = { `/homepage/classes/${ courseId } /history` } >
22+ < button className = { btnStyle } > Back to history overview</ button >
23+ </ Link >
2424 </ div >
2525 ) ;
2626} ;
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ const ClassView: React.FC = () => {
3232
3333 if ( course && courseId ) {
3434 return (
35- < section className = "h-screen flex flex-col justify-start w-3/4" >
35+ < section className = "h-screen flex flex-col justify-start w-3/4 h-full " >
3636 < div className = { headerStyle } >
3737 < h1 className = "font-bold" > { course . name ?. toUpperCase ( ) } </ h1 >
3838 < Link to = "/homepage" >
Original file line number Diff line number Diff line change @@ -18,13 +18,12 @@ const StudentElementHistory: React.FC<Props> = ({
1818
1919 return (
2020 < div
21- className = "flex justify-center place-items-center h-10"
21+ className = "flex place-items-center h-10"
2222 onClick = { ( ) =>
2323 navigate ( `/homepage/classes/${ courseId } /student/${ studentId } ` )
2424 }
2525 >
26- < h3 > { lastname } </ h3 >
27- < h3 > { name } </ h3 >
26+ < h3 className = "mx-4" > { lastname } { name } </ h3 >
2827 </ div >
2928 ) ;
3029} ;
Original file line number Diff line number Diff line change 1- import React from 'react' ;
1+ // @ts -nocheck
2+
3+ import React , { useState } from 'react' ;
24import { useDispatch } from 'react-redux' ;
35import { setHistory , setSelected } from '../../store/actions' ;
46import CourseType from '../../Types/course' ;
@@ -14,6 +16,7 @@ const Course: React.FC<{ course: CourseType }> = ({ course }) => {
1416 dispatch ( setHistory ( true ) ) ;
1517 dispatch ( setSelected ( course ) ) ;
1618 } ;
19+
1720 return (
1821 < div className = { courseStyle } onClick = { handleClick } >
1922 < p className = 'flex justify-center border-b-2 w-1/4 pb-4' > { course . name } </ p >
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ const Homepage: React.FC = () => {
1010 return (
1111 < div >
1212 < Navbar user = { user } />
13- < main className = "flex flex-row justify-start w-full" >
13+ < main className = "flex flex-row justify-start w-full h-screen " >
1414 < Sidemenu />
1515 < Outlet />
1616 </ main >
You can’t perform that action at this time.
0 commit comments