feat: split test detail into employee view and author view

- /tests/:id — employee view, answers shown without correct/incorrect markers
- /tests/:id/edit — author view, correct answers highlighted + edit button (disabled until Sprint 4)
- TestList: add 'Изменить' button linking to author view

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Aleksey Razorvin
2026-03-21 13:13:00 +05:00
parent 4762f86187
commit 4f788a9cf6
4 changed files with 130 additions and 10 deletions
+2 -9
View File
@@ -1,4 +1,4 @@
import { ArrowLeftOutlined, CheckCircleTwoTone, CloseCircleTwoTone, PlayCircleOutlined } from '@ant-design/icons'
import { ArrowLeftOutlined, PlayCircleOutlined } from '@ant-design/icons'
import { useQuery } from '@tanstack/react-query'
import { Button, Card, Descriptions, List, Space, Spin, Tag, Typography } from 'antd'
import { useNavigate, useParams } from 'react-router-dom'
@@ -78,14 +78,7 @@ export default function TestDetail() {
dataSource={question.answers}
renderItem={(answer: Answer) => (
<List.Item style={{ padding: '4px 0' }}>
<Space>
{answer.is_correct ? (
<CheckCircleTwoTone twoToneColor="#52c41a" />
) : (
<CloseCircleTwoTone twoToneColor="#d9d9d9" />
)}
<Text>{answer.text}</Text>
</Space>
<Text>{answer.text}</Text>
</List.Item>
)}
/>