07.03.2026 çalışan rota paylaşımlı

This commit is contained in:
Flatlogic Bot 2026-03-06 21:15:50 +00:00
parent 52bee4ac5d
commit 342070c5fa
3 changed files with 15 additions and 15 deletions

View File

@ -20,7 +20,7 @@ export const BudgetSelector = memo(({ selectedId, onSelect }: BudgetSelectorProp
key={option.id}
className={cn(
'h-1.5 flex-1 rounded-full transition-all duration-300',
i <= selectedIndex ? option.dot : 'bg-gray-100'
i <= selectedIndex ? option.bg : 'bg-gray-100'
)}
animate={{ scaleX: i <= selectedIndex ? 1 : 0.6 }}
transition={{ duration: 0.3, delay: i * 0.05 }}
@ -46,7 +46,7 @@ export const BudgetSelector = memo(({ selectedId, onSelect }: BudgetSelectorProp
className={cn(
'relative group flex items-center gap-4 px-5 py-4 rounded-2xl border-2 text-left transition-all duration-200 w-full overflow-hidden',
isSelected
? `${option.activeBorder} ${option.activeBg} shadow-md`
? `${option.border} ${option.bg} shadow-md`
: 'border-gray-100 bg-gray-50/60 hover:border-gray-200 hover:bg-white hover:shadow-sm'
)}
>
@ -57,8 +57,8 @@ export const BudgetSelector = memo(({ selectedId, onSelect }: BudgetSelectorProp
key={i}
className={cn(
'w-1.5 h-1.5 rounded-full transition-all duration-200',
i < option.tier
? isSelected ? option.dot : 'bg-gray-300'
i < 3
? isSelected ? option.bg : 'bg-gray-300'
: 'bg-gray-100'
)}
/>
@ -69,7 +69,7 @@ export const BudgetSelector = memo(({ selectedId, onSelect }: BudgetSelectorProp
<div className={cn(
'w-11 h-11 rounded-xl flex items-center justify-center transition-all duration-200 shrink-0',
isSelected
? `${option.activeBg} ${option.color} border-2 ${option.activeBorder}`
? `${option.bg} ${option.text} border-2 ${option.border}`
: 'bg-white text-gray-400 border border-gray-100 shadow-sm'
)}>
<Icon className="h-5 w-5" />
@ -79,7 +79,7 @@ export const BudgetSelector = memo(({ selectedId, onSelect }: BudgetSelectorProp
<div className="flex-1 min-w-0 pr-12">
<p className={cn(
'text-sm font-black uppercase tracking-wider',
isSelected ? option.color : 'text-gray-700'
isSelected ? option.text : 'text-gray-700'
)}>
{option.label}
</p>
@ -91,9 +91,9 @@ export const BudgetSelector = memo(({ selectedId, onSelect }: BudgetSelectorProp
{/* Price range */}
<div className={cn(
'absolute bottom-3 right-4 text-[10px] font-bold tracking-wide transition-colors',
isSelected ? option.color : 'text-gray-300'
isSelected ? option.text : 'text-gray-300'
)}>
{option.range}
{option.description}
</div>
</motion.button>
);

View File

@ -32,7 +32,7 @@ interface PlaceDetail {
opening_hours?: string[] | null;
why_visit: string[];
tips: string[];
reviews: { author: string; rating: number; text: string; time: string }[];
reviews: { author: string; rating: number | undefined; text: string; time: string }[];
}
interface SelectedPOI {
@ -122,13 +122,13 @@ export function TripMap({ itinerary, activePlaceId, onMarkerClick, onAddPlace }:
tips.push((poi as any).personal_tip);
}
const reviewTips = (place.reviews || [])
.filter(r => r.rating >= 4 && r.text?.length > 30)
.filter(r => (r.rating ?? 0) >= 4 && r.text?.length > 30)
.slice(0, tips.length > 0 ? 1 : 2)
.map(r => `"${r.text.slice(0, 120).trim()}…"`);
tips.push(...reviewTips);
// summary: editorial_summary sadece Türkçe ise göster, değilse boş bırak
const rawSummary = place.editorial_summary?.overview || '';
const rawSummary = (place as any).editorial_summary?.overview || '';
const isTurkish = /[çğışöüÇĞİŞÖÜ]/.test(rawSummary) || !/[a-zA-Z]{4,}/.test(rawSummary);
const summary = isTurkish ? rawSummary : '';
@ -569,14 +569,14 @@ export function TripMap({ itinerary, activePlaceId, onMarkerClick, onAddPlace }:
)}
{/* Çalışma saatleri */}
{placeDetail.opening_hours?.length > 0 && (
{(placeDetail.opening_hours?.length ?? 0) > 0 && (
<div className="space-y-2">
<h4 className="text-[11px] font-black text-gray-900 uppercase tracking-widest flex items-center gap-1.5">
<Clock className="h-3.5 w-3.5 text-blue-500" />
Çalışma Saatleri
</h4>
<div className="space-y-1">
{placeDetail.opening_hours.map((h, i) => (
{(placeDetail.opening_hours ?? []).map((h, i) => (
<p key={i} className="text-[11px] text-gray-500">{h}</p>
))}
</div>
@ -607,7 +607,7 @@ export function TripMap({ itinerary, activePlaceId, onMarkerClick, onAddPlace }:
<div className="flex items-center gap-0.5">
{[1,2,3,4,5].map(s => (
<Star key={s}
className={cn('h-3 w-3', s <= review.rating
className={cn('h-3 w-3', s <= (review.rating ?? 0)
? 'fill-amber-400 text-amber-400'
: 'text-gray-200 fill-gray-200'
)}

View File

@ -155,7 +155,7 @@ const PlannerPage = () => {
try {
const startDate = format(data.dateRange.from, 'yyyy-MM-dd');
const endDate = format(data.dateRange.to, 'yyyy-MM-dd');
const result = await retryWithBackoff(
const result: any = await retryWithBackoff(
() => withTimeout(
api.generateItinerary({
startDate,