link 2 exam
This commit is contained in:
@@ -15,6 +15,7 @@ import { useAppSelector } from '../../__data__/store'
|
||||
import { isTeacher } from '../../utils/user'
|
||||
import { PopulatedCourse } from '../../__data__/model'
|
||||
import { api } from '../../__data__/api/api'
|
||||
import { LinkIcon } from '@chakra-ui/icons'
|
||||
|
||||
type CourseDetailsProps = {
|
||||
populatedCourse: PopulatedCourse;
|
||||
@@ -28,7 +29,16 @@ export const CourseDetails = ({ populatedCourse }: CourseDetailsProps) => {
|
||||
return (
|
||||
<>
|
||||
<Heading as="h3" mt={4} mb={3} size="lg">
|
||||
Экзамен:
|
||||
Экзамен: {exam?.name} {exam && <Tooltip label="Начать экзамен" fontSize="12px" top="16px">
|
||||
<Button
|
||||
leftIcon={<LinkIcon />}
|
||||
as={'a'}
|
||||
colorScheme="blue"
|
||||
href={`/exam/${populatedCourse.id}/${exam.id}`}
|
||||
>
|
||||
Открыть
|
||||
</Button>
|
||||
</Tooltip>}
|
||||
</Heading>
|
||||
{!Boolean(exam) && (
|
||||
<>
|
||||
@@ -36,7 +46,7 @@ export const CourseDetails = ({ populatedCourse }: CourseDetailsProps) => {
|
||||
Не задан
|
||||
</Heading>
|
||||
<Box mt={10}>
|
||||
<Tooltip label="Детали" fontSize="12px" top="16px">
|
||||
<Tooltip label="Создать экзамен с жюри" fontSize="12px" top="16px">
|
||||
<Button
|
||||
colorScheme="blue"
|
||||
mt={["16px", 0]}
|
||||
|
||||
@@ -190,7 +190,7 @@ export const CoursesList = () => {
|
||||
<VStack as="ul" align="stretch">
|
||||
{data?.body?.map((c) => (
|
||||
<CourseCard
|
||||
key={c._id}
|
||||
key={c.id}
|
||||
course={c}
|
||||
/>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user