diff --git a/client/src/components/DashboardLayout.tsx b/client/src/components/DashboardLayout.tsx
index bcda21f..45664e2 100644
--- a/client/src/components/DashboardLayout.tsx
+++ b/client/src/components/DashboardLayout.tsx
@@ -41,13 +41,13 @@ const menuSections = [
{ icon: Calendar, label: "Séquences", path: "/admin/sequences" },
{ icon: CalendarDays, label: "Calendrier", path: "/admin/calendrier" },
{ icon: Users, label: "Apprenants", path: "/admin/apprenants" },
- { icon: FileSpreadsheet, label: "Import Excel", path: "/admin/import-excel" },
]
},
{
title: "Configuration",
items: [
{ icon: UserCog, label: "Utilisateurs", path: "/admin/users" },
+ { icon: FileSpreadsheet, label: "Import Excel", path: "/admin/import-excel" },
{ icon: Bell, label: "Rappels", path: "/admin/rappels" },
{ icon: Mail, label: "Templates d'emails", path: "/admin/email-templates" },
{ icon: Settings, label: "Configuration SMTP", path: "/admin/email-config" },
diff --git a/client/src/pages/AdminImportExcel.tsx b/client/src/pages/AdminImportExcel.tsx
index 479359c..b486be2 100644
--- a/client/src/pages/AdminImportExcel.tsx
+++ b/client/src/pages/AdminImportExcel.tsx
@@ -1,6 +1,7 @@
import { useState } from "react";
import { trpc } from "@/lib/trpc";
import { Button } from "@/components/ui/button";
+import DashboardLayout from "@/components/DashboardLayout";
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
import { Alert, AlertDescription } from "@/components/ui/alert";
import { Badge } from "@/components/ui/badge";
@@ -107,7 +108,8 @@ export default function AdminImportExcel() {
};
return (
-
+
+
Import Excel - Formations et Séquences
@@ -325,6 +327,7 @@ export default function AdminImportExcel() {
)}
-
+
+
);
-}
+}
\ No newline at end of file
diff --git a/client/src/pages/AdminSequences.tsx b/client/src/pages/AdminSequences.tsx
index bffa9ad..11d6ed8 100644
--- a/client/src/pages/AdminSequences.tsx
+++ b/client/src/pages/AdminSequences.tsx
@@ -106,12 +106,13 @@ export default function AdminSequences() {
try {
// Si c'est un objet Date JavaScript
if (dateValue instanceof Date) {
- // Utiliser les méthodes UTC pour éviter le décalage horaire
- const year = dateValue.getUTCFullYear();
- const month = String(dateValue.getUTCMonth() + 1).padStart(2, '0');
- const day = String(dateValue.getUTCDate()).padStart(2, '0');
- const hours = String(dateValue.getUTCHours()).padStart(2, '0');
- const minutes = String(dateValue.getUTCMinutes()).padStart(2, '0');
+ // MySQL stocke les dates en heure locale (pas UTC)
+ // Donc on utilise les méthodes locales pour extraire les valeurs
+ const year = dateValue.getFullYear();
+ const month = String(dateValue.getMonth() + 1).padStart(2, '0');
+ const day = String(dateValue.getDate()).padStart(2, '0');
+ const hours = String(dateValue.getHours()).padStart(2, '0');
+ const minutes = String(dateValue.getMinutes()).padStart(2, '0');
return `${year}-${month}-${day}T${hours}:${minutes}`;
}
diff --git a/todo.md b/todo.md
index 8bb2ea8..03af6a5 100644
--- a/todo.md
+++ b/todo.md
@@ -691,3 +691,19 @@
- [x] Vérifier la gestion des fuseaux horaires dans le formulaire
- [x] Corriger la conversion des dates/heures (UTC pour affichage et envoi)
- [x] Tester la saisie et l'affichage des heures
+
+## Bug décalage horaire dans formulaire d'édition
+
+- [x] Identifier pourquoi le formulaire affiche -2h (ex: 9h00 → 7h00) (utilisation de méthodes UTC au lieu de locales)
+- [x] Corriger la fonction safeFormatDate (utiliser getHours() au lieu de getUTCHours())
+- [ ] Tester l'édition de séquences
+
+## Bug page d'import Excel sans menu
+
+- [x] Ajouter le DashboardLayout wrapper à la page d'import Excel
+- [x] Vérifier que le menu de navigation s'affiche correctement
+
+## Déplacement menu Import Excel
+
+- [x] Déplacer "Import Excel" du bloc GESTION vers le bloc CONFIGURATION
+- [x] Vérifier l'affichage dans le menu de navigation