-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
19 Coordinator View for Specific Reviewer (#104)
* movement and initialisation of review page viewed by the coordinator * individual reviewer page summary for coordinator * lint fixes
- Loading branch information
Showing
3 changed files
with
63 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
51 changes: 51 additions & 0 deletions
51
frontend/pages/course-evaluation/[id]/review/[reviewId].tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import React from 'react'; | ||
import { getReviewStepsWithState } from '@/components/utils/reviews'; | ||
import BodyCard from '@/components/utils/BodyCard'; | ||
import useCourseReview from '@/components/hooks/useCourseReview'; | ||
import useCourseEvaluation from '@/components/hooks/useCourseEvaluation'; | ||
import ReviewSummarySubmissionContent from '@/components/Reviewer/Submit/ReviewSummarySubmissionContent'; | ||
import { userDisplayName } from '@/components/utils/generic'; | ||
import Card from '@mui/material/Card'; | ||
import CardContent from '@mui/material/CardContent'; | ||
import CardHeader from '@mui/material/CardHeader'; | ||
import Container from '@mui/material/Container'; | ||
import CardActions from '@mui/material/CardActions'; | ||
import Button from '@mui/material/Button'; | ||
import { useRouter } from 'next/router'; | ||
import NavigateBeforeIcon from '@mui/icons-material/NavigateBefore'; | ||
|
||
const Summary = () => { | ||
const { courseReview } = useCourseReview(false); | ||
const { courseEvaluation } = useCourseEvaluation(); | ||
const router = useRouter(); | ||
|
||
const allSteps = getReviewStepsWithState(courseReview); | ||
|
||
return ( | ||
<BodyCard> | ||
<Container maxWidth="xl" sx={{ mt: 2, mb: 2 }}> | ||
<Button | ||
startIcon={<NavigateBeforeIcon />} | ||
onClick={() => { | ||
router.push(`/course-evaluation/${courseEvaluation.id}`); | ||
}} | ||
> | ||
Back to Course Evaluation | ||
</Button> | ||
<Card> | ||
<CardHeader title={`Review by: ${userDisplayName(courseReview.reviewer)}`} /> | ||
<CardContent> Below is the summary of what the reviewer has put in.</CardContent> | ||
<CardActions /> | ||
</Card> | ||
</Container> | ||
<ReviewSummarySubmissionContent | ||
allSteps={allSteps} | ||
courseReview={courseReview} | ||
courseEvaluation={courseEvaluation} | ||
isReadOnly | ||
/> | ||
</BodyCard> | ||
); | ||
}; | ||
|
||
export default Summary; |