diff --git a/frontend/src/components/AddLocationModal.tsx b/frontend/src/components/AddLocationModal.tsx index 89b9a8f..13fe966 100644 --- a/frontend/src/components/AddLocationModal.tsx +++ b/frontend/src/components/AddLocationModal.tsx @@ -1,4 +1,5 @@ import React, { useState, useEffect, useRef } from 'react'; +import { format, parseISO } from 'date-fns'; import { X, MapPin, Loader2, Clock, Map as MapIcon } from 'lucide-react'; import { useTourStore } from '@/store/useTourStore.js'; import { MapContainer, TileLayer, Marker, useMapEvents, useMap } from 'react-leaflet'; @@ -274,7 +275,10 @@ export const AddLocationModal = ({ isOpen, onClose, tourId, initialLegId, editin diff --git a/frontend/src/components/ItineraryTimeline.tsx b/frontend/src/components/ItineraryTimeline.tsx index dd2b13c..66863b1 100644 --- a/frontend/src/components/ItineraryTimeline.tsx +++ b/frontend/src/components/ItineraryTimeline.tsx @@ -195,10 +195,19 @@ export const ItineraryTimeline = ({
- - {leg.sequence} - - {leg.note || `Chi tiết Chặng ${leg.sequence}`} + + {leg.sequence} + +
+ {leg.note || `Chi tiết Chặng ${leg.sequence}`} + {leg.startDate && ( + + + {format(parseISO(leg.startDate), 'dd/MM/yyyy')} + {leg.endDate && leg.endDate !== leg.startDate && ` - ${format(parseISO(leg.endDate), 'dd/MM/yyyy')}`} + + )} +
{prevLegLastLoc && (
@@ -334,7 +343,7 @@ export const ItineraryTimeline = ({
- Chi phí: {Number(locationExpense.amount).toLocaleString()}đ ({locationExpense.category}) + Chi phí: {Number(locationExpense.amount).toLocaleString()}đ
{locationExpense.description && (
Dịch vụ: {locationExpense.description}