This commit is contained in:
@@ -42,6 +42,7 @@ interface ClassStudent {
|
||||
interface ClassTeacher {
|
||||
id: number;
|
||||
userId: number;
|
||||
name: string | null;
|
||||
username: string;
|
||||
roleType: string;
|
||||
subject: string | null;
|
||||
@@ -360,7 +361,7 @@ const ClassDetailPage: React.FC = () => {
|
||||
];
|
||||
|
||||
const teacherColumns: ColumnsType<ClassTeacher> = [
|
||||
{ title: '姓名', dataIndex: 'username' },
|
||||
{ title: '姓名', dataIndex: 'name', render: (name: string | null) => name || '-' },
|
||||
{
|
||||
title: '角色',
|
||||
dataIndex: 'roleType',
|
||||
@@ -509,7 +510,7 @@ const ClassDetailPage: React.FC = () => {
|
||||
{detail.studentCount}/{detail.maxStudents || '-'}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="班主任">
|
||||
{teachers.find((t) => t.roleType === 'head_teacher')?.username || '-'}
|
||||
{teachers.find((t) => t.roleType === 'head_teacher')?.name || '-'}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="备注">{detail.notes || '-'}</Descriptions.Item>
|
||||
</Descriptions>
|
||||
|
||||
Reference in New Issue
Block a user