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é */}
+