feat: update package dependencies and integrate Recharts

- Changed project name from "towercontrol-temp" to "towercontrol" in package-lock.json and package.json.
- Added Recharts library for data visualization in the dashboard.
- Updated TODO.md to reflect completion of analytics and metrics integration tasks.
- Enhanced RecentTasks component to utilize TaskPriority type for better type safety.
- Minor layout adjustments in RecentTasks for improved UI.
This commit is contained in:
Julien Froidefond
2025-09-18 12:48:06 +02:00
parent d38053b4dc
commit 3c7f5ca2fa
12 changed files with 1253 additions and 13 deletions

View File

@@ -6,6 +6,7 @@ import { TagDisplay } from '@/components/ui/TagDisplay';
import { Badge } from '@/components/ui/Badge';
import { useTasksContext } from '@/contexts/TasksContext';
import { getPriorityConfig, getPriorityColorHex } from '@/lib/status-config';
import { TaskPriority } from '@/lib/types';
import Link from 'next/link';
interface RecentTasksProps {
@@ -40,7 +41,7 @@ export function RecentTasks({ tasks }: RecentTasksProps) {
const getPriorityStyle = (priority: string) => {
try {
const config = getPriorityConfig(priority as any);
const config = getPriorityConfig(priority as TaskPriority);
const hexColor = getPriorityColorHex(config.color);
return { color: hexColor };
} catch {
@@ -49,7 +50,7 @@ export function RecentTasks({ tasks }: RecentTasksProps) {
};
return (
<Card className="p-6">
<Card className="p-6 mt-8">
<div className="flex items-center justify-between mb-4">
<h3 className="text-lg font-semibold">Tâches Récentes</h3>
<Link href="/kanban">
@@ -103,7 +104,7 @@ export function RecentTasks({ tasks }: RecentTasksProps) {
>
{(() => {
try {
return getPriorityConfig(task.priority as any).label;
return getPriorityConfig(task.priority as TaskPriority).label;
} catch {
return task.priority;
}