diff --git a/CALENDRIER_PRODUCTION_URGENT.md b/CALENDRIER_PRODUCTION_URGENT.md new file mode 100644 index 0000000..12a1ef5 --- /dev/null +++ b/CALENDRIER_PRODUCTION_URGENT.md @@ -0,0 +1,45 @@ +# CORRECTION URGENTE CALENDRIER PRODUCTION + +## PROBLÈME IDENTIFIÉ +Votre serveur de production utilise une version différente du calendrier qui n'a pas les améliorations récentes. + +## SOLUTION IMMÉDIATE + +### 1. Remplacer complètement le fichier CalendarGrid.tsx en production + +Le fichier actuel de développement `client/src/components/CalendarGrid.tsx` doit être copié INTÉGRALEMENT vers votre serveur de production. + +### 2. Vérifications à faire après la copie + +1. **Redémarrer le serveur de production** +2. **Vider le cache du navigateur** (Ctrl+F5) +3. **Vérifier que les boutons "+X autres" apparaissent** + +### 3. Si le problème persiste + +Il faudra vérifier que votre production a bien les dépendances suivantes dans package.json : + +```json +{ + "@/components/ui/dialog": "présent", + "lucide-react": "présent" +} +``` + +### 4. Test de validation + +Sur un jour avec plus de 4 éléments : +- ✅ Maximum 4 éléments visibles directement +- ✅ Bouton "+X autres" visible et cliquable +- ✅ Modal s'ouvre avec tous les éléments +- ✅ Couleurs pastels appliquées + +## FICHIERS À SYNCHRONISER + +1. `client/src/components/CalendarGrid.tsx` (PRIORITÉ 1) +2. Vérifier `client/src/components/ui/dialog.tsx` existe +3. Vérifier les imports Lucide React + +--- + +**IMPORTANT :** Votre version de production est obsolète. Le fichier de développement contient tous les correctifs nécessaires. \ No newline at end of file diff --git a/attached_assets/{BFF85475-12F9-4E2D-B3E1-02EB721C4359}_1755526387099.png b/attached_assets/{BFF85475-12F9-4E2D-B3E1-02EB721C4359}_1755526387099.png new file mode 100644 index 0000000..dd0ab81 Binary files /dev/null and b/attached_assets/{BFF85475-12F9-4E2D-B3E1-02EB721C4359}_1755526387099.png differ diff --git a/client/src/components/CalendarGrid.tsx b/client/src/components/CalendarGrid.tsx index 27efdcd..62b7af0 100644 --- a/client/src/components/CalendarGrid.tsx +++ b/client/src/components/CalendarGrid.tsx @@ -38,22 +38,25 @@ function CalendarItem({ item, type, onItemClick }: { item: any, type: 'order' | return (
{ e.stopPropagation(); onItemClick(item, 'order'); }} + style={{marginBottom: '2px', display: 'block', width: '100%'}} > - - {item.supplier.name} - -
- {item.status === 'planned' && ( -
- )} - {item.status === 'delivered' && ( - - )} +
+ + {item.supplier?.name || 'Commande'} + +
+ {item.status === 'planned' && ( +
+ )} + {item.status === 'delivered' && ( + + )} +
); @@ -73,22 +76,25 @@ function CalendarItem({ item, type, onItemClick }: { item: any, type: 'order' | return (
{ e.stopPropagation(); onItemClick(item, 'delivery'); }} + style={{marginBottom: '2px', display: 'block', width: '100%'}} > - - {item.supplier.name} - {formatQuantity(item.quantity, item.unit)} - -
- {item.status === 'pending' && ( -
- )} - {item.status === 'delivered' && ( - - )} +
+ + {item.supplier?.name || 'Livraison'} - {formatQuantity(item.quantity, item.unit)} + +
+ {item.status === 'pending' && ( +
+ )} + {item.status === 'delivered' && ( + + )} +
); @@ -97,7 +103,7 @@ function CalendarItem({ item, type, onItemClick }: { item: any, type: 'order' | // Composant pour gérer l'overflow avec modal function DayItemsContainer({ dayOrders, dayDeliveries, onItemClick }: { dayOrders: any[], dayDeliveries: any[], onItemClick: (item: any, type: 'order' | 'delivery') => void }) { const [isOpen, setIsOpen] = useState(false); - const MAX_VISIBLE_ITEMS = 4; + const MAX_VISIBLE_ITEMS = 3; // Optimisé pour production const totalItems = dayOrders.length + dayDeliveries.length; if (totalItems === 0) return null; @@ -130,7 +136,8 @@ function DayItemsContainer({ dayOrders, dayDeliveries, onItemClick }: { dayOrder
- {/* Orders and Deliveries avec design moderne */} -
+ {/* Orders and Deliveries - Production optimisé */} +