diff --git a/attached_assets/{7D92C1BE-2208-4AF2-9BC5-CA2CAC967D45}_1755527809012.png b/attached_assets/{7D92C1BE-2208-4AF2-9BC5-CA2CAC967D45}_1755527809012.png new file mode 100644 index 0000000..8c2b29d Binary files /dev/null and b/attached_assets/{7D92C1BE-2208-4AF2-9BC5-CA2CAC967D45}_1755527809012.png differ diff --git a/client/src/components/CalendarGrid.tsx b/client/src/components/CalendarGrid.tsx index 99d7c9a..bf20a54 100644 --- a/client/src/components/CalendarGrid.tsx +++ b/client/src/components/CalendarGrid.tsx @@ -136,9 +136,11 @@ function DayItemsContainer({ dayOrders, dayDeliveries, onItemClick }: { dayOrder - + @@ -159,16 +161,37 @@ function DayItemsContainer({ dayOrders, dayDeliveries, onItemClick }: { dayOrder {allItems.map((item, index) => (
{ + e.preventDefault(); + e.stopPropagation(); + onItemClick(item, item.itemType); + setIsOpen(false); + }} > - { - onItemClick(clickedItem, type); - setIsOpen(false); - }} - /> +
+
+ {item.supplier?.name || (item.itemType === 'order' ? 'Commande' : 'Livraison')} +
+ {item.itemType === 'delivery' && ( +
+ Quantité: {item.quantity}{item.unit === 'palettes' ? 'P' : 'C'} +
+ )} +
+ Statut: {item.status === 'delivered' ? 'Livré' : item.status === 'planned' ? 'Planifié' : 'En attente'} +
+
))} @@ -418,7 +441,14 @@ export default function CalendarGrid({ ? "bg-white hover:bg-gray-50" : "bg-gray-150" } ${!isCurrentMonth ? 'opacity-50' : ''}`} - onClick={() => onDateClick(date)} + onClick={(e) => { + // Ne pas ouvrir le modal de création si on clique sur le bouton "+X autres" + const target = e.target as HTMLElement; + if (target.closest('button[data-modal-trigger="true"]')) { + return; + } + onDateClick(date); + }} >
{/* Numéro du jour avec design moderne */}