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:
@@ -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>
|
||||
)}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user