修正總分語細項不統一的問題
This commit is contained in:
@@ -263,7 +263,7 @@ export async function POST(request: NextRequest) {
|
||||
score: score,
|
||||
max_score: maxScore,
|
||||
weight: criteriaItem.weight,
|
||||
weighted_score: (score / maxScore) * criteriaItem.weight,
|
||||
weighted_score: (score / maxScore) * (criteriaItem.weight / 100),
|
||||
percentage: (score / maxScore) * 100
|
||||
};
|
||||
|
||||
@@ -274,7 +274,7 @@ export async function POST(request: NextRequest) {
|
||||
score: score,
|
||||
max_score: maxScore,
|
||||
weight: criteriaItem.weight,
|
||||
weighted_score: (score / maxScore) * criteriaItem.weight,
|
||||
weighted_score: (score / maxScore) * (criteriaItem.weight / 100),
|
||||
percentage: (score / maxScore) * 100
|
||||
});
|
||||
|
||||
|
@@ -85,7 +85,7 @@ export async function GET(
|
||||
overview: {
|
||||
excellentItems: evaluationWithDetails.excellent_items || 0,
|
||||
improvementItems: evaluationWithDetails.improvement_items || 0,
|
||||
overallPerformance: Number(evaluationWithDetails.overall_score) || 0
|
||||
overallPerformance: Math.round(Number(evaluationWithDetails.overall_score) || 0)
|
||||
},
|
||||
improvementSuggestions: {
|
||||
overallSuggestions: feedbackByType.overall[0]?.content || '無詳細分析',
|
||||
|
@@ -109,7 +109,7 @@ export async function GET(
|
||||
overview: {
|
||||
excellentItems: evaluationWithDetails.excellent_items || 0,
|
||||
improvementItems: evaluationWithDetails.improvement_items || 0,
|
||||
overallPerformance: Number(evaluationWithDetails.overall_score) || 0
|
||||
overallPerformance: Math.round(Number(evaluationWithDetails.overall_score) || 0)
|
||||
},
|
||||
detailedAnalysis: {
|
||||
summary: feedbackByType.overall[0]?.content || '無詳細分析',
|
||||
|
Reference in New Issue
Block a user