diff --git a/frontend/src/pages/TourDetailPage.tsx b/frontend/src/pages/TourDetailPage.tsx index 6b6506d..3f513fb 100644 --- a/frontend/src/pages/TourDetailPage.tsx +++ b/frontend/src/pages/TourDetailPage.tsx @@ -363,6 +363,7 @@ export const TourDetailPage = ({ const [activeTab, setActiveTab] = useState<'plan' | 'expense' | 'photo' | 'settings'>('plan'); const [viewMode, setViewMode] = useState<'map' | 'timeline'>('timeline'); const [isAddLocationOpen, setIsAddLocationOpen] = useState(false); + const [isMapFullscreen, setIsMapFullscreen] = useState(false); const [isAddMemberOpen, setIsAddMemberOpen] = useState(false); const [isAddPhotoOpen, setIsAddPhotoOpen] = useState(false); const [isStartPointAction, setIsStartPointAction] = useState(false); @@ -749,9 +750,9 @@ export const TourDetailPage = ({ }, [routes, selectedRouteIndex]); const handleNavigateToLocation = (location: any) => { - setViewMode('map'); setMapCenter([location.latitude, location.longitude]); setLocateTrigger(prev => prev + 1); + setIsMapFullscreen(true); notify({ title: 'Bắt đầu chỉ đường', @@ -1393,19 +1394,10 @@ export const TourDetailPage = ({ onNavigate={handleNavigateToLocation} /> ) : ( -
- {/* Nút X để quay lại từ chế độ bản đồ toàn màn hình */} - - +
{/* Search Bar Overlay - Thanh tìm kiếm địa điểm trên bản đồ lộ trình */} {!isPublicView && ( -
+
0 && ( -
+
- - {selectedRouteInfo.label} + + {selectedRouteInfo.label}
-
+
{selectedRouteInfo.distance} km - + {selectedRouteInfo.duration}
@@ -2100,6 +2092,95 @@ export const TourDetailPage = ({
)} + {/* Fullscreen Map Overlay - Hiển thị khi click vào nút trạng thái/chỉ đường */} + {isMapFullscreen && ( +
+ {/* Nút X để quay lại */} + + + {/* Transparent Top Bar Label - Glassmorphism style */} + {selectedRouteInfo && drivingRoute.length > 0 && ( +
+
+ + {selectedRouteInfo.label} +
+
+ {selectedRouteInfo.distance} km + + {selectedRouteInfo.duration} +
+
+ )} + + + + + + + + {userLocation && ( + + )} + + {routes.length > 0 ? ( + routes.map((r, i) => ( + [c[1], c[0]])} + color={i === selectedRouteIndex ? "#2563eb" : "#94a3b8"} + weight={i === selectedRouteIndex ? 6 : 4} + opacity={i === selectedRouteIndex ? 1 : 0.4} + /> + )) + ) : allLocations.length > 1 && ( + [l.latitude, l.longitude]) as any} color="#3b82f6" weight={3} dashArray="5, 10" /> + )} + + {allLocations.map((loc: any, index: number) => { + const isStart = startPoint && startPoint.id === loc.id; + const isEnd = endPoint && endPoint.id === loc.id; + return ( + + +
{loc.name}
+
+
+ ); + })} +
+ + {/* Overlay điều khiển trên bản đồ toàn màn hình */} +
+ + + {isMapControlsOpen && ( +
+ + + +
+ )} +
+
+ )} + {/* Add Member Modal */} {currentTour && (