feat(classes): optimize teacher dashboard ui and implement grade management
This commit is contained in:
@@ -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
|
||||
? {
|
||||
|
||||
Reference in New Issue
Block a user