fix: update todosCount checks and refactor key accomplishments extraction
- Changed todosCount checks in AchievementCard and ChallengeCard to ensure proper handling of undefined values. - Updated extractKeyAccomplishments method to be asynchronous and count all related todos using Prisma, improving accuracy in task completion metrics. - Refactored relatedItems and todosCount handling for better clarity and functionality in ManagerSummaryService.
This commit is contained in:
@@ -76,7 +76,7 @@ export function AchievementCard({
|
||||
)}
|
||||
|
||||
{/* Count de todos */}
|
||||
{achievement.todosCount && achievement.todosCount > 0 && (
|
||||
{achievement.todosCount !== undefined && achievement.todosCount > 0 && (
|
||||
<div className="flex items-center gap-1 text-xs text-[var(--muted-foreground)]">
|
||||
<span>📋</span>
|
||||
<span>{achievement.todosCount} todo{achievement.todosCount > 1 ? 's' : ''}</span>
|
||||
|
||||
Reference in New Issue
Block a user