feat(classes): optimize teacher dashboard ui and implement grade management

This commit is contained in:
SpecialX
2026-01-14 13:59:11 +08:00
parent ade8d4346c
commit 9bfc621d3f
104 changed files with 12793 additions and 2309 deletions

View File

@@ -76,7 +76,7 @@ export const getQuestions = cache(async ({
offset: offset,
orderBy: [desc(questions.createdAt)],
with: {
questionsToKnowledgePoints: {
knowledgePoints: {
with: {
knowledgePoint: true,
},
@@ -95,7 +95,7 @@ export const getQuestions = cache(async ({
return {
data: rows.map((row) => {
const knowledgePoints =
row.questionsToKnowledgePoints?.map((rel) => rel.knowledgePoint) ?? [];
row.knowledgePoints?.map((rel) => rel.knowledgePoint) ?? [];
const author = row.author
? {