Spaces:
Running
Running
Update pages/ScoreList.tsx
Browse files- pages/ScoreList.tsx +9 -1
pages/ScoreList.tsx
CHANGED
|
@@ -4,6 +4,8 @@ import { api } from '../services/api';
|
|
| 4 |
import { Score, Student, Subject, ClassInfo, ExamStatus, Exam, SystemConfig } from '../types';
|
| 5 |
import { Loader2, Plus, Trash2, Award, FileSpreadsheet, X, Upload, Edit, Save, Calendar, Filter, ChevronLeft, ChevronRight } from 'lucide-react';
|
| 6 |
|
|
|
|
|
|
|
| 7 |
const localSortGrades = (a: string, b: string) => {
|
| 8 |
const order: Record<string, number> = { '一年级': 1, '二年级': 2, '三年级': 3, '四年级': 4, '五年级': 5, '六年级': 6, '初一': 7, '七年级': 7, '初二': 8, '八年级': 8, '初三': 9, '九年级': 9, '高一': 10, '高二': 11, '高三': 12 };
|
| 9 |
return (order[a] || 99) - (order[b] || 99);
|
|
@@ -222,7 +224,7 @@ export const ScoreList: React.FC = () => {
|
|
| 222 |
// Unique Exam Names for Filter (Filtered by subject potentially, but simpler to show all known for now)
|
| 223 |
const uniqueExamNames = Array.from(new Set(scores.filter(s => s.courseName === activeSubject).map(s => s.examName || s.type)));
|
| 224 |
|
| 225 |
-
|
| 226 |
<div className="space-y-6">
|
| 227 |
{/* ... Header and Filters ... */}
|
| 228 |
<div className="bg-white rounded-xl shadow-sm border border-gray-100 overflow-hidden flex flex-col min-h-[600px]">
|
|
@@ -477,4 +479,10 @@ export const ScoreList: React.FC = () => {
|
|
| 477 |
)}
|
| 478 |
</div>
|
| 479 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 480 |
};
|
|
|
|
| 4 |
import { Score, Student, Subject, ClassInfo, ExamStatus, Exam, SystemConfig } from '../types';
|
| 5 |
import { Loader2, Plus, Trash2, Award, FileSpreadsheet, X, Upload, Edit, Save, Calendar, Filter, ChevronLeft, ChevronRight } from 'lucide-react';
|
| 6 |
|
| 7 |
+
import { SensitiveContentProtection } from '../components/SensitiveContentProtection';
|
| 8 |
+
|
| 9 |
const localSortGrades = (a: string, b: string) => {
|
| 10 |
const order: Record<string, number> = { '一年级': 1, '二年级': 2, '三年级': 3, '四年级': 4, '五年级': 5, '六年级': 6, '初一': 7, '七年级': 7, '初二': 8, '八年级': 8, '初三': 9, '九年级': 9, '高一': 10, '高二': 11, '高三': 12 };
|
| 11 |
return (order[a] || 99) - (order[b] || 99);
|
|
|
|
| 224 |
// Unique Exam Names for Filter (Filtered by subject potentially, but simpler to show all known for now)
|
| 225 |
const uniqueExamNames = Array.from(new Set(scores.filter(s => s.courseName === activeSubject).map(s => s.examName || s.type)));
|
| 226 |
|
| 227 |
+
const content = (
|
| 228 |
<div className="space-y-6">
|
| 229 |
{/* ... Header and Filters ... */}
|
| 230 |
<div className="bg-white rounded-xl shadow-sm border border-gray-100 overflow-hidden flex flex-col min-h-[600px]">
|
|
|
|
| 479 |
)}
|
| 480 |
</div>
|
| 481 |
);
|
| 482 |
+
|
| 483 |
+
return (
|
| 484 |
+
<SensitiveContentProtection enabled={currentUser?.role === 'TEACHER' || currentUser?.role === 'PRINCIPAL'}>
|
| 485 |
+
{content}
|
| 486 |
+
</SensitiveContentProtection>
|
| 487 |
+
);
|
| 488 |
};
|