diff --git a/frontend-admin/src/screens/delivery/DashboardScreen.tsx b/frontend-admin/src/screens/delivery/DashboardScreen.tsx index 58adfcef..43d02fe3 100644 --- a/frontend-admin/src/screens/delivery/DashboardScreen.tsx +++ b/frontend-admin/src/screens/delivery/DashboardScreen.tsx @@ -48,6 +48,7 @@ import TomTomMap, { TomTomMapRef, TomTomMarker, } from "../../components/TomTomMap"; +import DetailsModal from "../../components/ui/Modal"; import { setupDeliveryNotificationChannel, registerForPushNotificationsAsync, @@ -72,6 +73,9 @@ const STATUS_LABELS: Record = { interface EnrichedDelivery extends DeliveryItem { clientName?: string; clientPhone?: string; + clientUsername?: string; + clientNom?: string; + clientPrenom?: string; items?: Array<{ produit: string; quantite: number; prix: number }>; } @@ -108,6 +112,7 @@ export default function DashboardScreen() { // Notifications const [unreadNotifCount, setUnreadNotifCount] = useState(0); + const [detailsDelivery, setDetailsDelivery] = useState(null); const pushTokenRef = useRef(null); const STATUS_COLORS: Record = useMemo( @@ -240,6 +245,9 @@ export default function DashboardScreen() { ? `${client.prenom || ""} ${client.nom}`.trim() : client?.username || undefined, clientPhone: client?.telephone || undefined, + clientUsername: client?.username || undefined, + clientNom: client?.nom || undefined, + clientPrenom: client?.prenom || undefined, items: detail.delivery?.items || (d as any).items || @@ -641,12 +649,21 @@ export default function DashboardScreen() { )} + setDetailsDelivery(item)} + activeOpacity={0.7} + > + + Détails + + {(item.status === "pending" || item.status === "assigned") && (