feat: implement Year Review feature with session management, item categorization, and real-time collaboration
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 6m7s

This commit is contained in:
Julien Froidefond
2025-12-16 08:55:13 +01:00
parent 48ff86fb5f
commit 56a9c2c3be
21 changed files with 2480 additions and 50 deletions

View File

@@ -298,3 +298,120 @@ export const MOTIVATOR_BY_TYPE: Record<MotivatorType, MotivatorConfig> = MOTIVAT
},
{} as Record<MotivatorType, MotivatorConfig>
);
// ============================================
// Year Review - Type Definitions
// ============================================
export type YearReviewCategory =
| 'ACHIEVEMENTS' // Réalisations / Accomplissements
| 'CHALLENGES' // Défis / Difficultés rencontrées
| 'LEARNINGS' // Apprentissages / Compétences développées
| 'GOALS' // Objectifs pour l'année suivante
| 'MOMENTS'; // Moments forts / Moments difficiles
export interface YearReviewItem {
id: string;
content: string;
category: YearReviewCategory;
order: number;
sessionId: string;
createdAt: Date;
updatedAt: Date;
}
export interface YearReviewSession {
id: string;
title: string;
participant: string;
year: number;
userId: string;
items: YearReviewItem[];
createdAt: Date;
updatedAt: Date;
}
export interface CreateYearReviewSessionInput {
title: string;
participant: string;
year: number;
}
export interface UpdateYearReviewSessionInput {
title?: string;
participant?: string;
year?: number;
}
export interface CreateYearReviewItemInput {
content: string;
category: YearReviewCategory;
order?: number;
}
export interface UpdateYearReviewItemInput {
content?: string;
category?: YearReviewCategory;
order?: number;
}
// ============================================
// Year Review - UI Config
// ============================================
export interface YearReviewSectionConfig {
category: YearReviewCategory;
title: string;
icon: string;
description: string;
color: string;
}
export const YEAR_REVIEW_SECTIONS: YearReviewSectionConfig[] = [
{
category: 'ACHIEVEMENTS',
title: 'Réalisations',
icon: '🏆',
description: 'Ce que vous avez accompli cette année',
color: '#22c55e', // green
},
{
category: 'CHALLENGES',
title: 'Défis',
icon: '⚔️',
description: 'Les difficultés que vous avez rencontrées',
color: '#ef4444', // red
},
{
category: 'LEARNINGS',
title: 'Apprentissages',
icon: '📚',
description: 'Ce que vous avez appris et développé',
color: '#3b82f6', // blue
},
{
category: 'GOALS',
title: 'Objectifs',
icon: '🎯',
description: 'Ce que vous souhaitez accomplir l\'année prochaine',
color: '#8b5cf6', // purple
},
{
category: 'MOMENTS',
title: 'Moments',
icon: '⭐',
description: 'Les moments forts et marquants de l\'année',
color: '#f59e0b', // amber
},
];
export const YEAR_REVIEW_BY_CATEGORY: Record<
YearReviewCategory,
YearReviewSectionConfig
> = YEAR_REVIEW_SECTIONS.reduce(
(acc, config) => {
acc[config.category] = config;
return acc;
},
{} as Record<YearReviewCategory, YearReviewSectionConfig>
);