mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-12 01:37:40 +02:00
Improve visibility of more calendar events with expanded display
Add debug logs to CalendarGrid component to identify why hidden events are not displaying. Replit-Commit-Author: Agent Replit-Commit-Session-Id: cc2d271b-82f0-4d6a-9302-a0b067ffb429 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/cc2d271b-82f0-4d6a-9302-a0b067ffb429/LqoCbHa
This commit is contained in:
1 parent
e1c6492ca5
commit
be1873c414
1 file changed
+17
-1
@@ -94,12 +94,23 @@ function CalendarItem({ item, type, onItemClick }: { item: any, type: 'order' |
|
||||
);
|
||||
}
|
||||
|
||||
// Composant pour gérer l'overflow avec popover
|
||||
// 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 totalItems = dayOrders.length + dayDeliveries.length;
|
||||
|
||||
// Debug logs pour production
|
||||
if (totalItems > 0) {
|
||||
console.log('🔍 DayItemsContainer:', {
|
||||
orders: dayOrders.length,
|
||||
deliveries: dayDeliveries.length,
|
||||
totalItems,
|
||||
MAX_VISIBLE_ITEMS,
|
||||
shouldShowButton: totalItems > MAX_VISIBLE_ITEMS
|
||||
});
|
||||
}
|
||||
|
||||
if (totalItems === 0) return null;
|
||||
|
||||
// Combiner tous les éléments avec leur type
|
||||
@@ -110,6 +121,11 @@ function DayItemsContainer({ dayOrders, dayDeliveries, onItemClick }: { dayOrder
|
||||
|
||||
const visibleItems = allItems.slice(0, MAX_VISIBLE_ITEMS);
|
||||
const hiddenCount = Math.max(0, totalItems - MAX_VISIBLE_ITEMS);
|
||||
|
||||
// Debug supplémentaire
|
||||
if (hiddenCount > 0) {
|
||||
console.log('✅ Button "+X autres" should appear:', hiddenCount);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="space-y-1.5">
|
||||
|
||||
Reference in new issue
Block a user