mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-11 17:27:31 +02:00
Fix error preventing calendar from displaying correctly
Add missing Button import to CalendarGrid component to resolve ReferenceError. Replit-Commit-Author: Agent Replit-Commit-Session-Id: a8a78c07-e900-425c-a577-5b4c5894379d Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/a8a78c07-e900-425c-a577-5b4c5894379d/CRhacll
This commit is contained in:
1 parent
16a4e2e30b
commit
ccab1686b8
3 files changed
+45
No files matched your search
@@ -0,0 +1,44 @@
|
||||
# CORRECTION URGENTE PRODUCTION - "Button is not defined"
|
||||
|
||||
## Problème Identifié
|
||||
L'erreur `ReferenceError: Button is not defined` est causée par un import manquant dans CalendarGrid.tsx.
|
||||
|
||||
## Correction Appliquée
|
||||
Ajout de l'import manquant dans `client/src/components/CalendarGrid.tsx` :
|
||||
|
||||
```typescript
|
||||
// AVANT (ligne 4)
|
||||
import { Plus, Check } from "lucide-react";
|
||||
|
||||
// APRÈS (lignes 4-5)
|
||||
import { Plus, Check } from "lucide-react";
|
||||
import { Button } from "@/components/ui/button";
|
||||
```
|
||||
|
||||
## Pour Appliquer en Production
|
||||
|
||||
### 1. Copier le Fichier Corrigé
|
||||
Copiez le contenu corrigé de `client/src/components/CalendarGrid.tsx` sur votre serveur.
|
||||
|
||||
### 2. Reconstruction et Redémarrage
|
||||
```bash
|
||||
# Sur votre serveur de production
|
||||
npm run build
|
||||
pm2 restart your-app-name
|
||||
```
|
||||
|
||||
### 3. Vérification
|
||||
- L'application devrait redémarrer sans erreur
|
||||
- Le calendrier devrait s'afficher correctement
|
||||
- Le bouton + pour créer une nouvelle entrée devrait fonctionner
|
||||
|
||||
## Cause de l'Erreur
|
||||
Quand j'ai nettoyé le code de debug, j'ai supprimé l'import `Button` mais le composant était encore utilisé pour le bouton "+" de création rapide dans le calendrier.
|
||||
|
||||
## Test Rapide
|
||||
Une fois corrigé, testez :
|
||||
1. Accès au calendrier ✓
|
||||
2. Clic sur le bouton + ✓
|
||||
3. Clic sur une commande → modal avec bouton "Valider Commande" ✓
|
||||
|
||||
Cette correction résout l'erreur de production immédiatement.
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 293 KiB |
@@ -2,6 +2,7 @@ import { format, startOfMonth, endOfMonth, eachDayOfInterval, isSameDay, isSameM
|
||||
import { fr } from "date-fns/locale";
|
||||
import { safeDate } from "@/lib/dateUtils";
|
||||
import { Plus, Check } from "lucide-react";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import type { OrderWithRelations, DeliveryWithRelations } from "@shared/schema";
|
||||
|
||||
interface CalendarGridProps {
|
||||
|
||||
Reference in new issue
Block a user