Show Eurostar seat availability and no-prices notice
fetch_prices now returns {'price': ..., 'seats': ...} per departure.
Seat count (labelled "N at this price") is shown below the fare — it
reflects price-band depth rather than total remaining seats. A yellow
notice is shown when the API returns journeys but all prices are null
(tickets not yet on sale).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
cd37f0619b
commit
05eec29b7d
4 changed files with 38 additions and 17 deletions
|
|
@ -95,6 +95,11 @@
|
|||
<strong>Warning:</strong> {{ error }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if no_prices_note %}
|
||||
<div style="margin-top:1rem;padding:0.75rem 1rem;background:#fffbeb;border:1px solid #f6e05e;border-radius:4px;color:#744210">
|
||||
{{ no_prices_note }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if trips or unreachable_morning_services %}
|
||||
|
|
@ -164,6 +169,9 @@
|
|||
<td style="padding:0.6rem 0.8rem;white-space:nowrap">
|
||||
{% if row.eurostar_price is not none %}
|
||||
£{{ row.eurostar_price }}
|
||||
{% if row.eurostar_seats is not none %}
|
||||
<br><span style="font-size:0.75rem;color:#718096">{{ row.eurostar_seats }} at this price</span>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<span style="color:#718096">–</span>
|
||||
{% endif %}
|
||||
|
|
@ -197,12 +205,15 @@
|
|||
<td style="padding:0.6rem 0.8rem;white-space:nowrap">
|
||||
{% if row.eurostar_price is not none %}
|
||||
<span style="color:#a0aec0">£{{ row.eurostar_price }}</span>
|
||||
{% if row.eurostar_seats is not none %}
|
||||
<br><span style="font-size:0.75rem;color:#a0aec0">{{ row.eurostar_seats }} at this price</span>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<span style="color:#a0aec0">–</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td style="padding:0.6rem 0.8rem;font-weight:600">
|
||||
<span title="No same-day Bristol connection" style="color:#a0aec0">Too early</span>
|
||||
<span title="No same-day Bristol connection" style="color:#a0aec0;white-space:nowrap">Too early</span>
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue