Checkpoint: Corrections apportées :
1. Bug décalage horaire dans le formulaire d'édition des séquences - Correction de la fonction safeFormatDate pour utiliser les méthodes locales (getHours, getMinutes) au lieu des méthodes UTC - Les heures saisies (ex: 9h00) s'affichent maintenant correctement dans le formulaire d'édition 2. Ajout du menu de navigation sur la page Import Excel - Intégration du DashboardLayout wrapper dans AdminImportExcel.tsx - Le menu latéral s'affiche maintenant correctement sur cette page 3. Déplacement du menu "Import Excel" - Déplacé du bloc GESTION vers le bloc CONFIGURATION dans le menu de navigation - Positionné après "Utilisateurs" et avant "Rappels" pour une meilleure organisation
This commit is contained in:
@@ -41,13 +41,13 @@ const menuSections = [
|
|||||||
{ icon: Calendar, label: "Séquences", path: "/admin/sequences" },
|
{ icon: Calendar, label: "Séquences", path: "/admin/sequences" },
|
||||||
{ icon: CalendarDays, label: "Calendrier", path: "/admin/calendrier" },
|
{ icon: CalendarDays, label: "Calendrier", path: "/admin/calendrier" },
|
||||||
{ icon: Users, label: "Apprenants", path: "/admin/apprenants" },
|
{ icon: Users, label: "Apprenants", path: "/admin/apprenants" },
|
||||||
{ icon: FileSpreadsheet, label: "Import Excel", path: "/admin/import-excel" },
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Configuration",
|
title: "Configuration",
|
||||||
items: [
|
items: [
|
||||||
{ icon: UserCog, label: "Utilisateurs", path: "/admin/users" },
|
{ icon: UserCog, label: "Utilisateurs", path: "/admin/users" },
|
||||||
|
{ icon: FileSpreadsheet, label: "Import Excel", path: "/admin/import-excel" },
|
||||||
{ icon: Bell, label: "Rappels", path: "/admin/rappels" },
|
{ icon: Bell, label: "Rappels", path: "/admin/rappels" },
|
||||||
{ icon: Mail, label: "Templates d'emails", path: "/admin/email-templates" },
|
{ icon: Mail, label: "Templates d'emails", path: "/admin/email-templates" },
|
||||||
{ icon: Settings, label: "Configuration SMTP", path: "/admin/email-config" },
|
{ icon: Settings, label: "Configuration SMTP", path: "/admin/email-config" },
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { trpc } from "@/lib/trpc";
|
import { trpc } from "@/lib/trpc";
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
|
import DashboardLayout from "@/components/DashboardLayout";
|
||||||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
|
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
|
||||||
import { Alert, AlertDescription } from "@/components/ui/alert";
|
import { Alert, AlertDescription } from "@/components/ui/alert";
|
||||||
import { Badge } from "@/components/ui/badge";
|
import { Badge } from "@/components/ui/badge";
|
||||||
@@ -107,6 +108,7 @@ export default function AdminImportExcel() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<DashboardLayout>
|
||||||
<div className="container mx-auto py-8">
|
<div className="container mx-auto py-8">
|
||||||
<div className="mb-8">
|
<div className="mb-8">
|
||||||
<h1 className="text-3xl font-bold mb-2">Import Excel - Formations et Séquences</h1>
|
<h1 className="text-3xl font-bold mb-2">Import Excel - Formations et Séquences</h1>
|
||||||
@@ -326,5 +328,6 @@ export default function AdminImportExcel() {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
</DashboardLayout>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -106,12 +106,13 @@ export default function AdminSequences() {
|
|||||||
try {
|
try {
|
||||||
// Si c'est un objet Date JavaScript
|
// Si c'est un objet Date JavaScript
|
||||||
if (dateValue instanceof Date) {
|
if (dateValue instanceof Date) {
|
||||||
// Utiliser les méthodes UTC pour éviter le décalage horaire
|
// MySQL stocke les dates en heure locale (pas UTC)
|
||||||
const year = dateValue.getUTCFullYear();
|
// Donc on utilise les méthodes locales pour extraire les valeurs
|
||||||
const month = String(dateValue.getUTCMonth() + 1).padStart(2, '0');
|
const year = dateValue.getFullYear();
|
||||||
const day = String(dateValue.getUTCDate()).padStart(2, '0');
|
const month = String(dateValue.getMonth() + 1).padStart(2, '0');
|
||||||
const hours = String(dateValue.getUTCHours()).padStart(2, '0');
|
const day = String(dateValue.getDate()).padStart(2, '0');
|
||||||
const minutes = String(dateValue.getUTCMinutes()).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}`;
|
return `${year}-${month}-${day}T${hours}:${minutes}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
16
todo.md
16
todo.md
@@ -691,3 +691,19 @@
|
|||||||
- [x] Vérifier la gestion des fuseaux horaires dans le formulaire
|
- [x] Vérifier la gestion des fuseaux horaires dans le formulaire
|
||||||
- [x] Corriger la conversion des dates/heures (UTC pour affichage et envoi)
|
- [x] Corriger la conversion des dates/heures (UTC pour affichage et envoi)
|
||||||
- [x] Tester la saisie et l'affichage des heures
|
- [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
|
||||||
|
|||||||
Reference in New Issue
Block a user