feat: enhance AchievementCard and ManagerSummaryService logic

- Added logic to differentiate between regular achievements and todos in `AchievementCard`, changing background color accordingly.
- Updated todos count display to only show for non-todo achievements, improving clarity.
- Refactored `ManagerSummaryService` to remove outdated filters and allow unlimited display of accomplishments and challenges, enhancing data visibility.
- Simplified priority handling by including 'urgent' as a high priority, ensuring better task categorization.
This commit is contained in:
Julien Froidefond
2025-09-29 22:37:00 +02:00
parent 1d7c2b5e1a
commit c647725536
2 changed files with 14 additions and 75 deletions

View File

@@ -34,9 +34,14 @@ export function AchievementCard({
maxTags = 2,
className = ''
}: AchievementCardProps) {
// Détecter si c'est un todo (ID commence par "todo-")
const isTodo = achievement.id.startsWith('todo-');
return (
<div className={`relative border border-[var(--border)] rounded-lg p-3 transition-all duration-200 group ${className}`} style={{
backgroundColor: 'color-mix(in srgb, var(--success) 5%, var(--card))'
backgroundColor: isTodo
? 'color-mix(in srgb, var(--accent) 8%, var(--card))'
: 'color-mix(in srgb, var(--success) 5%, var(--card))'
}}>
{/* Barre colorée gauche */}
<div className="absolute left-0 top-0 bottom-0 w-1 bg-green-500 rounded-l-lg"></div>
@@ -81,8 +86,8 @@ export function AchievementCard({
</p>
)}
{/* Count de todos */}
{achievement.todosCount !== undefined && achievement.todosCount > 0 && (
{/* Count de todos - seulement pour les tâches, pas pour les todos standalone */}
{!isTodo && 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>