From 9e26aabce69f9238ba0fe20c25ca3088dda8147d Mon Sep 17 00:00:00 2001 From: 3dtours Date: Tue, 16 Jun 2026 10:36:38 +0700 Subject: [PATCH] =?UTF-8?q?S=E1=BB=ADa=20l=E1=BB=97i=20hi=E1=BB=83n=20th?= =?UTF-8?q?=E1=BB=8B=20chi=20ph=C3=AD=20=E1=BB=9F=20=C4=91i=E1=BB=83m=20c?= =?UTF-8?q?=E1=BB=A7a=20ch=E1=BA=B7ng?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/AddLocationModal.tsx | 6 +++++- frontend/src/components/ItineraryTimeline.tsx | 19 ++++++++++++++----- 2 files changed, 19 insertions(+), 6 deletions(-) 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}