diff --git a/frontend/src/components/ItineraryTimeline.tsx b/frontend/src/components/ItineraryTimeline.tsx
index b2ab74d..08e5db1 100644
--- a/frontend/src/components/ItineraryTimeline.tsx
+++ b/frontend/src/components/ItineraryTimeline.tsx
@@ -42,12 +42,14 @@ export const ItineraryTimeline = ({
onAddLocation,
onEditLocation,
onQuickNote,
+ onNavigate,
onSuccess,
isPublicView = false
}: {
onAddLocation?: (legId: string, isStart?: boolean, isEnd?: boolean) => void,
onEditLocation?: (location: any) => void,
onQuickNote?: (name: string) => void,
+ onNavigate?: (location: any) => void,
onSuccess?: () => void,
isPublicView?: boolean
}) => {
@@ -113,9 +115,10 @@ export const ItineraryTimeline = ({
endDate: ''
});
- const toggleComplete = async (locationId: string) => {
- // Gọi API PATCH /api/v1/locations/:id để cập nhật trạng thái
- console.log("Toggle status for location:", locationId);
+ const handleStatusClick = (location: any) => {
+ if (onNavigate) {
+ onNavigate(location);
+ }
};
const handleAddLeg = async () => {
@@ -371,7 +374,7 @@ export const ItineraryTimeline = ({
{/* Timeline Node */}