Drive search form dropdowns from VALID_MIN/MAX_CONNECTIONS; warn on short transfers

Index page connection time dropdowns now iterate over valid_min_connections
and valid_max_connections passed from the view, so any change to the sets
in app.py is reflected automatically (also adds the missing 45 min option).

Add ⚠️ next to transfer times under 80 minutes in the results table;
store connection_minutes in each trip dict to support the comparison.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Edward Betts 2026-04-04 10:52:32 +01:00
parent 19656f412a
commit e7695a5e49
4 changed files with 11 additions and 4 deletions

View file

@ -144,7 +144,7 @@
<br><span style="font-size:0.75rem;color:#718096">{{ row.ticket_name }}</span>
</td>
<td class="col-transfer" style="padding:0.6rem 0.8rem;color:#4a5568">
{{ row.connection_duration }}
{{ row.connection_duration }}{% if row.connection_minutes < 80 %} {% endif %}
</td>
<td style="padding:0.6rem 0.8rem;font-weight:600">
{{ row.depart_st_pancras }}