From da32d5916104b1f4e81c0b5396de66a53ab7e896 Mon Sep 17 00:00:00 2001 From: 3dtours Date: Wed, 17 Jun 2026 21:53:46 +0700 Subject: [PATCH] =?UTF-8?q?feat:=20nh=E1=BA=A5n=20n=C3=BAt=20toggle=20stat?= =?UTF-8?q?us=20full=20b=E1=BA=A3n=20=C4=91=E1=BB=93,=20nh=E1=BA=A5n=20n?= =?UTF-8?q?=C3=BAt=20b=E1=BA=A3n=20=C4=91=E1=BB=93=20th=C3=AC=20giao=20di?= =?UTF-8?q?=E1=BB=87n=20c=C5=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/pages/TourDetailPage.tsx | 115 ++++++++++++++++++++++---- 1 file changed, 98 insertions(+), 17 deletions(-) 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 && (