feat: sort flights by date and add sortable date/price columns
All checks were successful
Deploy / deploy (push) Successful in 36s

- Change API ORDER BY from price/date to date/price (chronological default)
- Add flightSortField/flightSortDir state to ScanDetails
- Make Date and Price sub-table headers clickable with sort icons

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-01 15:27:21 +01:00
parent 3cad8a8447
commit 69c2ddae29
2 changed files with 48 additions and 7 deletions

View File

@@ -1827,7 +1827,7 @@ async def get_scan_flights(
departure_time, arrival_time, price, stops
FROM flights
WHERE scan_id = ? AND destination = ?
ORDER BY price ASC, date ASC
ORDER BY date ASC, price ASC
LIMIT ? OFFSET ?
""", (scan_id, destination.upper(), limit, offset))
else:
@@ -1836,7 +1836,7 @@ async def get_scan_flights(
departure_time, arrival_time, price, stops
FROM flights
WHERE scan_id = ?
ORDER BY price ASC, date ASC
ORDER BY date ASC, price ASC
LIMIT ? OFFSET ?
""", (scan_id, limit, offset))