From dc46232dd7972fcb2c4e5d5ad4c1086d0cea06d9 Mon Sep 17 00:00:00 2001 From: Julien Froidefond Date: Mon, 29 Sep 2025 22:04:38 +0200 Subject: [PATCH] style: refactor layout and enhance card UI in WeeklyManager - Updated `WeeklyManagerPage` layout to use a `
` tag for better semantic structure. - Refined `ManagerWeeklySummary` component to display narrative and metrics side by side, improving visual organization. - Enhanced `AchievementCard` and `ChallengeCard` styles for better color differentiation and user experience. - Adjusted spacing and grid layouts for improved responsiveness and clarity in the UI. --- src/app/weekly-manager/page.tsx | 16 +- .../dashboard/ManagerWeeklySummary.tsx | 228 ++++++++++-------- src/components/ui/AchievementCard.tsx | 4 +- src/components/ui/ChallengeCard.tsx | 4 +- 4 files changed, 143 insertions(+), 109 deletions(-) diff --git a/src/app/weekly-manager/page.tsx b/src/app/weekly-manager/page.tsx index 715a37f..7883be0 100644 --- a/src/app/weekly-manager/page.tsx +++ b/src/app/weekly-manager/page.tsx @@ -19,15 +19,13 @@ export default async function WeeklyManagerPage() {
-
-
- -
-
+
+ +
); } diff --git a/src/components/dashboard/ManagerWeeklySummary.tsx b/src/components/dashboard/ManagerWeeklySummary.tsx index 933fad2..7f80715 100644 --- a/src/components/dashboard/ManagerWeeklySummary.tsx +++ b/src/components/dashboard/ManagerWeeklySummary.tsx @@ -4,7 +4,6 @@ import { useState } from 'react'; import { ManagerSummary } from '@/services/analytics/manager-summary'; import { Card, CardHeader, CardContent } from '@/components/ui/Card'; import { Button } from '@/components/ui/Button'; -import { MetricCard } from '@/components/ui/MetricCard'; import { Tabs, TabItem } from '@/components/ui/Tabs'; import { AchievementCard } from '@/components/ui/AchievementCard'; import { ChallengeCard } from '@/components/ui/ChallengeCard'; @@ -73,76 +72,80 @@ export default function ManagerWeeklySummary({ initialSummary }: ManagerWeeklySu {/* Vue Executive / Narrative */} {activeView === 'narrative' && (
- {/* Résumé narratif */} - - -

- 📊 Résumé de la semaine -

-
- -
-

🎯 Points clés accomplis

-

{summary.narrative.weekHighlight}

-
- -
-

⚡ Défis traités

-

{summary.narrative.mainChallenges}

-
- -
-

🔮 Focus 7 prochains jours

-

{summary.narrative.nextWeekFocus}

-
-
-
+ {/* Section principale : Résumé + Métriques côte à côte */} +
+ {/* Résumé narratif */} + + +

+ 📊 Résumé de la semaine +

+
+ +
+

🎯 Points clés accomplis

+

{summary.narrative.weekHighlight}

+
+ +
+

⚡ Défis traités

+

{summary.narrative.mainChallenges}

+
+ +
+

🔮 Focus 7 prochains jours

+

{summary.narrative.nextWeekFocus}

+
+
+
- {/* Métriques rapides */} - - -

📈 Métriques en bref

-
- -
- - - - - a.impact === 'high').length} - subtitle={`/ ${summary.keyAccomplishments.length} accomplissements`} - color="warning" - /> - - c.priority === 'high').length} - subtitle={`/ ${summary.upcomingChallenges.length} enjeux`} - color="destructive" - /> -
-
-
+ {/* Métriques rapides */} + + +

📈 Métriques en bref

+
+ +
+
+
{summary.metrics.totalTasksCompleted}
+
Tâches complétées
+
dont {summary.metrics.highPriorityTasksCompleted} priorité haute
+
+ +
+
{summary.metrics.totalCheckboxesCompleted}
+
Todos complétés
+
dont {summary.metrics.meetingCheckboxesCompleted} meetings
+
+ +
+
{summary.keyAccomplishments.filter(a => a.impact === 'high').length}
+
Items à fort impact
+
/ {summary.keyAccomplishments.length} accomplissements
+
+ +
+
{summary.upcomingChallenges.filter(c => c.priority === 'high').length}
+
Priorités critiques
+
/ {summary.upcomingChallenges.length} enjeux
+
+
+
+
+
{/* Top accomplissements */} - - -

🏆 Top accomplissements

+ + +

+ 🏆 Top accomplissements +

-
+
{summary.keyAccomplishments.length === 0 ? (

Aucun accomplissement significatif trouvé cette semaine.

@@ -165,12 +168,17 @@ export default function ManagerWeeklySummary({ initialSummary }: ManagerWeeklySu {/* Top challenges */} - - -

🎯 Top enjeux à venir

+ + +

+ 🎯 Top enjeux à venir +

-
+
{summary.upcomingChallenges.length === 0 ? (

Aucun enjeu prioritaire trouvé.

@@ -196,52 +204,76 @@ export default function ManagerWeeklySummary({ initialSummary }: ManagerWeeklySu {/* Vue détaillée des accomplissements */} {activeView === 'accomplishments' && ( - +

✅ Accomplissements des 7 derniers jours

{summary.keyAccomplishments.length} accomplissements significatifs • {summary.metrics.totalTasksCompleted} tâches • {summary.metrics.totalCheckboxesCompleted} todos complétés

- -
- {summary.keyAccomplishments.map((accomplishment, index) => ( - - ))} -
+ + {summary.keyAccomplishments.length === 0 ? ( +
+
📭
+

Aucun accomplissement significatif trouvé cette semaine.

+

Ajoutez des tâches avec priorité haute/medium ou des meetings.

+
+ ) : ( +
+ {summary.keyAccomplishments.map((accomplishment, index) => ( + + ))} +
+ )}
)} {/* Vue détaillée des challenges */} {activeView === 'challenges' && ( - +

🎯 Enjeux et défis à venir

{summary.upcomingChallenges.length} défis identifiés • {summary.upcomingChallenges.filter(c => c.priority === 'high').length} priorité haute • {summary.upcomingChallenges.filter(c => c.blockers.length > 0).length} avec blockers

- -
- {summary.upcomingChallenges.map((challenge, index) => ( - - ))} -
+ + {summary.upcomingChallenges.length === 0 ? ( +
+
🎯
+

Aucun enjeu prioritaire trouvé.

+

Ajoutez des tâches non complétées avec priorité haute/medium.

+
+ ) : ( +
+ {summary.upcomingChallenges.map((challenge, index) => ( + + ))} +
+ )}
)} diff --git a/src/components/ui/AchievementCard.tsx b/src/components/ui/AchievementCard.tsx index e068378..065be58 100644 --- a/src/components/ui/AchievementCard.tsx +++ b/src/components/ui/AchievementCard.tsx @@ -35,7 +35,9 @@ export function AchievementCard({ className = '' }: AchievementCardProps) { return ( -
+
{/* Barre colorée gauche */}
diff --git a/src/components/ui/ChallengeCard.tsx b/src/components/ui/ChallengeCard.tsx index 6b6b312..a0392c0 100644 --- a/src/components/ui/ChallengeCard.tsx +++ b/src/components/ui/ChallengeCard.tsx @@ -35,7 +35,9 @@ export function ChallengeCard({ className = '' }: ChallengeCardProps) { return ( -
+
{/* Barre colorée gauche */}