feat(portal-shell): 教师域考试管理页面迁移(P2)
按 ARCHITECTURE.md §9.1/§10 P2 要求,迁移教师域 exams 模块: - 列表页 /shell/teacher/exams(ListPageShell + URL 状态 + 客户端二次筛选) - 详情页 /shell/teacher/exams/[id](DetailPageShell + 真实 exam(id) 查询) - 新建页 /shell/teacher/exams/new(FormPageShell + MSW 兜底) - 纯函数 transformations.ts + 19 个 vitest 单测 - @contract-pending:exams(classId) 列表查询、createExam mutation 走 MSW - 三态 UI(loading/error/empty)+ 路由级 loading.tsx/error.tsx - i18n:zh-CN/en 双语补全,无硬编码中文 - MSW handlers 支持 variables 透传 §11.3 DoD 验收: - lint: 0 errors(4 个 __generated__ 预存警告) - typecheck: 0 errors - test: 250/250 passed(含 19 个新增 transformations 测试) - lint:tokens: 0 errors
This commit is contained in:
@@ -146,7 +146,71 @@
|
||||
"title": "Classes"
|
||||
},
|
||||
"exams": {
|
||||
"title": "Exams"
|
||||
"title": "Exams",
|
||||
"list": {
|
||||
"title": "Exams",
|
||||
"description": "View and manage all exams",
|
||||
"new": "New Exam",
|
||||
"searchPlaceholder": "Search exam name...",
|
||||
"statusFilter": "Filter by status",
|
||||
"statusAll": "All statuses",
|
||||
"statusDraft": "Draft",
|
||||
"statusPublished": "Published",
|
||||
"statusInProgress": "In Progress",
|
||||
"statusScored": "Completed",
|
||||
"total": "{count} total",
|
||||
"colName": "Name",
|
||||
"colStatus": "Status",
|
||||
"colExamDate": "Exam Date",
|
||||
"colDuration": "Duration",
|
||||
"colTotalScore": "Total Score",
|
||||
"colActions": "Actions",
|
||||
"viewDetail": "View Detail →",
|
||||
"mswNotice": "List query contract is pending, please ensure NEXT_PUBLIC_MSW=1 is enabled.",
|
||||
"unitScore": "pts"
|
||||
},
|
||||
"detail": {
|
||||
"title": "Exam Detail",
|
||||
"edit": "Edit",
|
||||
"notFound": "Exam not found, may have been deleted",
|
||||
"createdAtPrefix": "Created on {date}",
|
||||
"sectionBasic": "Basic Info",
|
||||
"sectionStatus": "Status Info",
|
||||
"fieldTitle": "Title",
|
||||
"fieldDescription": "Description",
|
||||
"fieldExamDate": "Exam Date",
|
||||
"fieldDuration": "Duration",
|
||||
"fieldTotalScore": "Total Score",
|
||||
"fieldClassId": "Class ID",
|
||||
"fieldSubjectId": "Subject ID",
|
||||
"fieldCurrentStatus": "Current Status",
|
||||
"fieldStatusChangedAt": "Status Changed At",
|
||||
"fieldStatusChangedBy": "Status Changed By",
|
||||
"fieldCreatedBy": "Created By",
|
||||
"fieldCreatedAt": "Created At",
|
||||
"fieldUpdatedAt": "Updated At",
|
||||
"unitScore": "pts"
|
||||
},
|
||||
"new": {
|
||||
"title": "New Exam",
|
||||
"description": "Fill in exam basic information",
|
||||
"submit": "Create Exam",
|
||||
"success": "Exam created successfully",
|
||||
"error": "Creation failed",
|
||||
"classId": "Class ID",
|
||||
"subjectId": "Subject ID",
|
||||
"titleLabel": "Title",
|
||||
"titlePlaceholder": "e.g. 2026 Spring Midterm",
|
||||
"descriptionLabel": "Description",
|
||||
"descriptionPlaceholder": "Exam scope, notes, etc.",
|
||||
"examDate": "Exam Date",
|
||||
"duration": "Duration (minutes)",
|
||||
"totalScore": "Total Score",
|
||||
"errorClassRequired": "Please fill in Class ID",
|
||||
"errorTitleRequired": "Please fill in exam title",
|
||||
"errorDateRequired": "Please select exam date",
|
||||
"contractPending": "Create exam contract is @contract-pending, currently backed by MSW. Will switch to real submission once backend mutation is ready."
|
||||
}
|
||||
},
|
||||
"homework": {
|
||||
"title": "Homework"
|
||||
|
||||
Reference in New Issue
Block a user