fix(admin): repair class, role, and room views
Use the RBAC user endpoint for teacher selection, restore role table columns, correct Ant Design props, and add typed room bed and locker responses.
This commit is contained in:
@@ -286,7 +286,7 @@ const ClassDetailPage: React.FC = () => {
|
||||
|
||||
const openTeacherModal = async () => {
|
||||
try {
|
||||
const res = await api.get('/users') as UserItem[];
|
||||
const res = await api.get('/rbac/users') as UserItem[];
|
||||
setAllUsers(res || []);
|
||||
setTeacherUserId(undefined);
|
||||
setTeacherRole('subject_teacher');
|
||||
@@ -576,7 +576,7 @@ const ClassDetailPage: React.FC = () => {
|
||||
onOk={handleAddTeacher}
|
||||
onCancel={() => setTeacherModalOpen(false)}
|
||||
>
|
||||
<Space orientation="vertical" style={{ width: '100%' }}>
|
||||
<Space direction="vertical" style={{ width: '100%' }}>
|
||||
<Select
|
||||
style={{ width: '100%' }}
|
||||
placeholder="选择教师"
|
||||
|
||||
@@ -42,11 +42,6 @@ interface ClassFormValues {
|
||||
notes?: string;
|
||||
}
|
||||
|
||||
interface ClassQueryParams {
|
||||
status?: string;
|
||||
classType?: string;
|
||||
}
|
||||
|
||||
// ---- Constants ----
|
||||
|
||||
const STATUS_MAP: Record<string, { color: string; text: string }> = {
|
||||
|
||||
Reference in New Issue
Block a user