- {/* Header */}
-
-
-
- Back to Classes
-
-
-
-
-
-
{currentClass.name}
-
- {currentClass.subject}
-
-
-
- {currentClass.school_year} β’ {currentClass.academic_term}
-
-
-
- {(isOwner || isTeacher) && (
-
-
-
- Edit
-
- setShowDeleteModal(true)}
- className="inline-flex items-center gap-2 px-4 py-2 bg-red-100 text-red-700 rounded-lg hover:bg-red-200 transition-colors"
- >
-
- Delete
-
-
- )}
-
-
-
- {/* Stats */}
-
-
-
-
-
-
-
-
Timetables
-
{currentClass.timetable_count}
-
-
-
-
-
-
-
-
Students
-
{currentClass.student_count}
-
-
-
-
-
-
-
-
-
-
Teachers
-
{classTeachers.length}
-
-
-
-
-
- {/* Tabs */}
-
-
- setActiveTab('timetables')}
- className={`pb-3 px-1 text-sm font-medium border-b-2 transition-colors ${
- activeTab === 'timetables'
- ? 'border-blue-600 text-blue-600'
- : 'border-transparent text-gray-500 hover:text-gray-700'
- }`}
- >
- Timetables
-
- setActiveTab('students')}
- className={`pb-3 px-1 text-sm font-medium border-b-2 transition-colors ${
- activeTab === 'students'
- ? 'border-blue-600 text-blue-600'
- : 'border-transparent text-gray-500 hover:text-gray-700'
- }`}
- >
- Students ({enrolledStudents.length})
-
- setActiveTab('teachers')}
- className={`pb-3 px-1 text-sm font-medium border-b-2 transition-colors ${
- activeTab === 'teachers'
- ? 'border-blue-600 text-blue-600'
- : 'border-transparent text-gray-500 hover:text-gray-700'
- }`}
- >
- Teachers ({classTeachers.length})
-
-
-
-
- {/* Tab Content */}
-
- {activeTab === 'timetables' && (
-
-
-
Timetables
- {(isOwner || isTeacher) && (
-
-
- Add Timetable
-
- )}
-
-
- {timetables.length === 0 ? (
-
-
-
No timetables yet
-
Create a timetable to start scheduling lessons
-
- ) : (
-
- {timetables.map((timetable) => (
-
-
-
{timetable.name}
-
- {timetable.lesson_count} lessons
- {timetable.is_recurring && ' β’ Recurring'}
-
-
-
-
- ))}
-
- )}
-
- )}
-
- {activeTab === 'students' && (
-
-
Enrolled Students
- {enrolledStudents.length === 0 ? (
-
-
-
No students enrolled
-
Students can request enrollment or be added by teachers
-
- ) : (
-
- {enrolledStudents.map((student) => (
-
-
-
- {student.full_name.charAt(0)}
-
-
-
-
{student.full_name}
-
{student.email}
-
-
- ))}
-
- )}
-
- )}
-
- {activeTab === 'teachers' && (
-
-
Teachers
-
- {classTeachers.map((teacher) => (
-
-
-
- {teacher.full_name.charAt(0)}
-
-
-
-
{teacher.full_name}
-
{teacher.email}
-
- {teacher.is_primary && (
-
- Primary
-
- )}
-
- ))}
-
-
- )}
-
-
- {/* Delete Modal */}
-
setShowDeleteModal(false)}
- title="Delete Class"
- >
-
-
- Are you sure you want to delete "{currentClass.name}"? This action cannot be undone and will remove all timetables, lessons, and whiteboards associated with this class.
-
-
- setShowDeleteModal(false)}
- className="px-4 py-2 text-gray-700 hover:bg-gray-100 rounded-lg transition-colors"
+
+ {/* Header */}
+ }
+ onClick={() => navigate('/classes')}
+ sx={{ mb: 2 }}
>
- Cancel
-
-
- Delete Class
-
-
-
-
-
- );
+ Back to Classes
+
+
+