Remove obsolete connection template context

This commit is contained in:
Edward Betts 2026-05-27 00:27:16 +01:00
parent 1c230ce0d6
commit 5272956050
9 changed files with 423 additions and 229 deletions

View file

@ -342,7 +342,7 @@
tr.row-selectable:hover:not(.row-selected) { filter: brightness(0.97); }
/* Journey flow arrow between column headers */
.results-table thead th.flow-step { position: relative; padding-right: 1.4rem; }
.results-table thead th.flow-step { position: sticky; padding-right: 1.4rem; }
.results-table thead th.flow-step::after {
content: '';
position: absolute; right: 0.2rem; top: 50%; transform: translateY(-50%);

View file

@ -1,6 +1,8 @@
{% extends "base.html" %}
{% block content %}
<style>
.form-row[hidden] { display: none !important; }
/* ── Calendar ───────────────────────────────────────────────────── */
.cal-wrap { margin-top: .5rem; }
@ -127,10 +129,10 @@
<input type="hidden" id="return_date" name="">
</div>
<div class="form-row">
<div class="form-row" id="outbound-connection-fields">
<div class="form-group">
<label for="min_connection" class="field-label">
Minimum connection time (Paddington &rarr; St&nbsp;Pancras)
Minimum outbound connection (Paddington &rarr; St&nbsp;Pancras)
</label>
<select id="min_connection" name="min_connection" class="form-control">
{% for mins in valid_min_connections %}
@ -138,14 +140,29 @@
{% endfor %}
</select>
</div>
</div>
<div class="form-row" id="back-connection-fields" hidden>
<div class="form-group">
<label for="max_connection" class="field-label">
Maximum connection time (Paddington &rarr; St&nbsp;Pancras)
<label for="min_connection_back" class="field-label">
Minimum back connection (St&nbsp;Pancras &rarr; Paddington)
</label>
<select id="max_connection" name="max_connection" class="form-control">
{% for mins in valid_max_connections %}
<option value="{{ mins }}" {% if mins == default_max_connection %}selected{% endif %}>{{ mins }} min</option>
<select id="min_connection_back" class="form-control" disabled>
{% for mins in valid_inbound_min_connections %}
<option value="{{ mins }}" {% if mins == default_inbound_min_connection %}selected{% endif %}>{{ mins }} min</option>
{% endfor %}
</select>
</div>
</div>
<div class="form-row" id="return-connection-fields" hidden>
<div class="form-group">
<label for="min_connection_in" class="field-label">
Minimum return-leg connection (St&nbsp;Pancras &rarr; Paddington)
</label>
<select id="min_connection_in" class="form-control" disabled>
{% for mins in valid_inbound_return_min_connections %}
<option value="{{ mins }}" {% if mins == default_inbound_min_connection %}selected{% endif %}>{{ mins }} min</option>
{% endfor %}
</select>
</div>
@ -207,6 +224,28 @@
}
}
function setConnectionSelect(id, enabled, name) {
var el = document.getElementById(id);
if (!el) return;
el.disabled = !enabled;
el.name = enabled ? name : '';
}
function syncConnectionFields() {
var selected = document.querySelector('input[name="journey_type"]:checked');
var journeyType = selected ? selected.value : 'outbound';
var isBack = journeyType === 'inbound';
var isRet = journeyType === 'return';
document.getElementById('outbound-connection-fields').hidden = isBack;
document.getElementById('back-connection-fields').hidden = !isBack;
document.getElementById('return-connection-fields').hidden = !isRet;
setConnectionSelect('min_connection', !isBack, 'min_connection');
setConnectionSelect('min_connection_back', isBack, 'min_connection_back');
setConnectionSelect('min_connection_in', isRet, 'min_connection_in');
}
/* ── day click ───────────────────────────────────────────────────── */
function onDayClick(d) {
@ -448,6 +487,7 @@
retPhase = false;
}
syncInputs();
syncConnectionFields();
render();
});
});
@ -475,6 +515,7 @@
retPhase = isReturn && outDate !== null;
syncInputs();
syncConnectionFields();
render();
}());
</script>

View file

@ -57,38 +57,47 @@
{% endfor %}
</div>
</div>
{% set connection_direction = 'St Pancras → Paddington' if journey_type == 'inbound' else 'Paddington → St Pancras' %}
{% if journey_type != 'return' %}
<div class="filter-row">
<div>
<label for="min_conn_select" class="filter-label">Min connection:</label>
<label for="min_conn_select" class="filter-label">Min connection ({{ connection_direction }}):</label>
<select id="min_conn_select" onchange="applyConnectionFilter()" class="select-inline">
{% for mins in valid_min_connections %}
<option value="{{ mins }}" {% if mins == min_connection %}selected{% endif %}>{{ mins }} min</option>
{% endfor %}
</select>
</div>
<div>
<label for="max_conn_select" class="filter-label">Max connection:</label>
<select id="max_conn_select" onchange="applyConnectionFilter()" class="select-inline">
{% for mins in valid_max_connections %}
<option value="{{ mins }}" {% if mins == max_connection %}selected{% endif %}>{{ mins }} min</option>
{% endfor %}
</select>
</div>
</div>
{% endif %}
{% if journey_type == 'return' %}
{% for section in sections %}
<div class="filter-row" style="margin-top:0.5rem">
<div class="filter-row" style="margin-top:0.5rem;gap:0.75rem">
<span class="filter-label" style="min-width:5.5rem">{{ 'Outbound' if section.direction == 'outbound' else 'Return' }}:</span>
{% if section.direction == 'inbound' %}
<div>
<label for="min_conn_in_select" class="filter-label">Min connection:</label>
<select id="min_conn_in_select" onchange="applyConnectionFilter()" class="select-inline">
{% for mins in valid_inbound_return_min_connections %}
<option value="{{ mins }}" {% if mins == inbound_min_connection %}selected{% endif %}>{{ mins }} min</option>
{% endfor %}
</select>
<span class="filter-label">ES:</span>
<div class="btn-group">
<button type="button" class="btn-group-option {% if es_classes[section.id] == 'standard' %}active{% endif %}" data-section="{{ section.id }}" data-es-class="standard" onclick="setEsClass('standard', '{{ section.id }}')">Standard</button>
<button type="button" class="btn-group-option {% if es_classes[section.id] == 'plus' %}active{% endif %}" data-section="{{ section.id }}" data-es-class="plus" onclick="setEsClass('plus', '{{ section.id }}')">Standard Premier</button>
</div>
</div>
<div>
{% if section.direction == 'inbound' %}
<label for="min_conn_in_select" class="filter-label">Min connection:</label>
<select id="min_conn_in_select" onchange="applyConnectionFilter()" class="select-inline">
{% for mins in valid_inbound_return_min_connections %}
<option value="{{ mins }}" {% if mins == inbound_min_connection %}selected{% endif %}>{{ mins }} min</option>
{% endfor %}
</select>
{% else %}
<label for="min_conn_select" class="filter-label">Min connection:</label>
<select id="min_conn_select" onchange="applyConnectionFilter()" class="select-inline">
{% for mins in valid_min_connections %}
<option value="{{ mins }}" {% if mins == min_connection %}selected{% endif %}>{{ mins }} min</option>
{% endfor %}
</select>
{% endif %}
</div>
{% endif %}
<div>
<span class="filter-label">NR:</span>
<div class="btn-group">
@ -97,13 +106,6 @@
<button type="button" class="btn-group-option {% if nr_classes[section.id] == 'advance_1st' %}active{% endif %}" data-section="{{ section.id }}" data-nr-class="advance_1st" onclick="setNrClass('advance_1st', '{{ section.id }}')">Advance 1st</button>
</div>
</div>
<div>
<span class="filter-label">Eurostar:</span>
<div class="btn-group">
<button type="button" class="btn-group-option {% if es_classes[section.id] == 'standard' %}active{% endif %}" data-section="{{ section.id }}" data-es-class="standard" onclick="setEsClass('standard', '{{ section.id }}')">Standard</button>
<button type="button" class="btn-group-option {% if es_classes[section.id] == 'plus' %}active{% endif %}" data-section="{{ section.id }}" data-es-class="plus" onclick="setEsClass('plus', '{{ section.id }}')">Standard Premier</button>
</div>
</div>
</div>
{% endfor %}
<div style="font-size:0.82rem;color:#718096;margin-top:0.4rem">
@ -126,7 +128,7 @@
<span id="advance-loading" style="display:none"><span class="spinner spinner-inline" aria-hidden="true"></span>Loading advance fares</span>
</div>
<div>
<span class="filter-label">Eurostar:</span>
<span class="filter-label">ES:</span>
<span id="es-type-select" style="display:none"></span>
<div class="btn-group">
<button type="button" class="btn-group-option {% if es_classes[section.id] == 'standard' %}active{% endif %}" data-section="{{ section.id }}" data-es-class="standard" onclick="setEsClass('standard', '{{ section.id }}')">Standard</button>
@ -136,26 +138,25 @@
</div>
{% endif %}
<script>
const RESULTS_BASE = '{{ results_base_url }}';
const DEFAULT_MIN_CONN = {{ default_min_connection }};
const DEFAULT_MAX_CONN = {{ default_max_connection }};
const DEFAULT_MIN_CONN_IN = {{ default_inbound_min_connection }};
let TRIP_FARES = {{ trip_fares_json | safe }};
let ADVANCE_FARES = {{ advance_fares_json | safe }};
const WALKON_CACHED_FARES = {{ walkon_cached_fares_json | safe }};
let WALKON_API_URLS = {{ walkon_api_urls_json | safe }};
let ADVANCE_API_URLS = {{ advance_api_urls_json | safe }};
let ADVANCE_STREAM_URLS = {{ advance_stream_urls_json | safe }};
const TIMETABLE_REFRESH_URL = {{ timetable_refresh_url|tojson }};
const HAS_PROVISIONAL_TIMETABLE = {{ 'true' if provisional_timetable else 'false' }};
let eurostarRefreshPending = HAS_PROVISIONAL_TIMETABLE && !!TIMETABLE_REFRESH_URL && !!window.EventSource;
let cachedAdvanceFares = ADVANCE_FARES;
let currentNrClasses = {{ nr_classes_json | safe }};
let currentEsClasses = {{ es_classes_json | safe }};
const SECTION_DIRECTIONS = {{ section_directions_json | safe }};
let advanceLoadingSections = {};
let walkonLoadingSections = {};
let selectedRowKeys = {};
var RESULTS_BASE = '{{ results_base_url }}';
var DEFAULT_MIN_CONN = {{ default_min_connection }};
var DEFAULT_MIN_CONN_IN = {{ default_inbound_min_connection }};
var TRIP_FARES = {{ trip_fares_json | safe }};
var ADVANCE_FARES = {{ advance_fares_json | safe }};
var WALKON_CACHED_FARES = {{ walkon_cached_fares_json | safe }};
var WALKON_API_URLS = {{ walkon_api_urls_json | safe }};
var ADVANCE_API_URLS = {{ advance_api_urls_json | safe }};
var ADVANCE_STREAM_URLS = {{ advance_stream_urls_json | safe }};
var TIMETABLE_REFRESH_URL = {{ timetable_refresh_url|tojson }};
var HAS_PROVISIONAL_TIMETABLE = {{ 'true' if provisional_timetable else 'false' }};
var eurostarRefreshPending = HAS_PROVISIONAL_TIMETABLE && !!TIMETABLE_REFRESH_URL && !!window.EventSource;
var cachedAdvanceFares = ADVANCE_FARES;
var currentNrClasses = {{ nr_classes_json | safe }};
var currentEsClasses = {{ es_classes_json | safe }};
var SECTION_DIRECTIONS = {{ section_directions_json | safe }};
var advanceLoadingSections = {};
var walkonLoadingSections = {};
var selectedRowKeys = {};
function updateAdvanceLoadingStatus() {
var loading = Object.keys(advanceLoadingSections).some(function(sectionId) {
@ -167,10 +168,8 @@
function buildUrl() {
var min = parseInt(document.getElementById('min_conn_select').value);
var max = parseInt(document.getElementById('max_conn_select').value);
var params = [];
if (min !== DEFAULT_MIN_CONN) params.push('min_connection=' + min);
if (max !== DEFAULT_MAX_CONN) params.push('max_connection=' + max);
var minInEl = document.getElementById('min_conn_in_select');
if (minInEl) {
var minIn = parseInt(minInEl.value);
@ -260,10 +259,19 @@
for (var rowKey in TRIP_FARES) {
var row = TRIP_FARES[rowKey];
if (rowKey !== key && row.eurostar_key !== key) continue;
if (prices[key].es_standard) row.es_standard = prices[key].es_standard;
if (prices[key].es_standard_status !== undefined) row.es_standard_status = prices[key].es_standard_status;
if (prices[key].es_plus) row.es_plus = prices[key].es_plus;
if (prices[key].es_plus_status !== undefined) row.es_plus_status = prices[key].es_plus_status;
var price = prices[key];
if (price.es_standard) {
row.es_standard = price.es_standard;
row.es_standard_status = price.es_standard_status;
} else if (!row.es_standard && price.es_standard_status !== undefined) {
row.es_standard_status = price.es_standard_status;
}
if (price.es_plus) {
row.es_plus = price.es_plus;
row.es_plus_status = price.es_plus_status;
} else if (!row.es_plus && price.es_plus_status !== undefined) {
row.es_plus_status = price.es_plus_status;
}
}
}
}
@ -450,7 +458,7 @@
totalSpan.innerHTML = '';
} else if (!nrFare) {
totalSpan.innerHTML = '<span class="text-xs text-muted" title="National Rail fare data is not available for this service">NR fare not available</span>';
} else if (eurostarRefreshPending) {
} else if (eurostarRefreshPending && !row.es_standard_status && !row.es_plus_status) {
totalSpan.innerHTML = '<span class="text-xs text-muted" title="Checking exact Eurostar data for this service">Checking Eurostar price</span>';
} else {
totalSpan.innerHTML = '<span class="text-xs text-muted" title="' + eurostarMissingTitle(row, esClass) + ' Check eurostar.com.">' + eurostarMissingText(row, esClass) + '</span>';

View file

@ -81,7 +81,7 @@
{% if row.headcode or row.arrive_platform %}
<br><span class="text-xs text-muted mobile-hide">{{ row.headcode }}{% if row.headcode and row.arrive_platform %} &middot; {% endif %}{% if row.arrive_platform %}Plat {{ row.arrive_platform }}{% endif %}</span>
{% endif %}
<span class="fare-line nr-walkon">{% if row.ticket_price is not none %}<span class="text-sm font-bold">£{{ "%.2f"|format(row.ticket_price) }}</span>{% endif %}</span>
<span class="fare-line nr-walkon">{% if row.ticket_price is not none %}<span class="text-sm font-bold">£{{ "%.2f"|format(row.ticket_price) }}</span>{% if row.ticket_name %} <span class="text-xs text-muted">{{ row.ticket_name }}</span>{% endif %}{% endif %}</span>
<span class="fare-line nr-advance-std"></span>
<span class="fare-line nr-advance-1st"></span>
</td>
@ -92,7 +92,7 @@
{% if row.headcode or row.arrive_platform %}
<br><span class="text-xs text-muted mobile-hide">{{ row.headcode }}{% if row.headcode and row.arrive_platform %} &middot; {% endif %}{% if row.arrive_platform %}Plat {{ row.arrive_platform }}{% endif %}</span>
{% endif %}
<span class="fare-line nr-walkon">{% if row.ticket_price is not none %}<span class="text-sm font-bold">£{{ "%.2f"|format(row.ticket_price) }}</span>{% endif %}</span>
<span class="fare-line nr-walkon">{% if row.ticket_price is not none %}<span class="text-sm font-bold">£{{ "%.2f"|format(row.ticket_price) }}</span>{% if row.ticket_name %} <span class="text-xs text-muted">{{ row.ticket_name }}</span>{% endif %}{% endif %}</span>
<span class="fare-line nr-advance-std"></span>
<span class="fare-line nr-advance-1st"></span>
<span class="text-xs text-muted mobile-conn">then {{ row.connection_duration }} to Eurostar{% if row.connection_minutes < 80 %} {% endif %}</span>
@ -129,7 +129,16 @@
{% else %}
<span class="text-blue">{{ row.total_duration }}</span>
{% endif %}
<br><span class="total-price"></span>
{% set nr_class = nr_classes.get(section.id, 'walkon') %}
{% set es_class = es_classes.get(section.id, 'standard') %}
{% set circle_fare = (row.circle_services[0].fare if row.circle_services else 0) %}
{% set selected_es_price = row.eurostar_plus_price if es_class == 'plus' else row.eurostar_price %}
{% if nr_class == 'walkon' and row.ticket_price is not none and selected_es_price is not none %}
{% set initial_total = row.ticket_price + selected_es_price + circle_fare %}
<br><span class="total-price"><span class="text-sm text-green" style="font-weight:700">£{{ "%.2f"|format(initial_total) }}</span></span>
{% else %}
<br><span class="total-price"></span>
{% endif %}
</td>
{% else %}
<td>

View file

@ -57,38 +57,47 @@
{% endfor %}
</div>
</div>
{% set connection_direction = 'St Pancras → Paddington' if journey_type == 'inbound' else 'Paddington → St Pancras' %}
{% if journey_type != 'return' %}
<div class="filter-row">
<div>
<label for="min_conn_select" class="filter-label">Min connection:</label>
<label for="min_conn_select" class="filter-label">Min connection ({{ connection_direction }}):</label>
<select id="min_conn_select" onchange="applyConnectionFilter()" class="select-inline">
{% for mins in valid_min_connections %}
<option value="{{ mins }}" {% if mins == min_connection %}selected{% endif %}>{{ mins }} min</option>
{% endfor %}
</select>
</div>
<div>
<label for="max_conn_select" class="filter-label">Max connection:</label>
<select id="max_conn_select" onchange="applyConnectionFilter()" class="select-inline">
{% for mins in valid_max_connections %}
<option value="{{ mins }}" {% if mins == max_connection %}selected{% endif %}>{{ mins }} min</option>
{% endfor %}
</select>
</div>
</div>
{% endif %}
{% if journey_type == 'return' %}
{% for section in sections %}
<div class="filter-row" style="margin-top:0.5rem">
<div class="filter-row" style="margin-top:0.5rem;gap:0.75rem">
<span class="filter-label" style="min-width:5.5rem">{{ 'Outbound' if section.direction == 'outbound' else 'Return' }}:</span>
{% if section.direction == 'inbound' %}
<div>
<label for="min_conn_in_select" class="filter-label">Min connection:</label>
<select id="min_conn_in_select" onchange="applyConnectionFilter()" class="select-inline">
{% for mins in valid_inbound_return_min_connections %}
<option value="{{ mins }}" {% if mins == inbound_min_connection %}selected{% endif %}>{{ mins }} min</option>
{% endfor %}
</select>
<span class="filter-label">ES:</span>
<div class="btn-group">
<button type="button" class="btn-group-option {% if es_classes[section.id] == 'standard' %}active{% endif %}" data-section="{{ section.id }}" data-es-class="standard" onclick="setEsClass('standard', '{{ section.id }}')">Standard</button>
<button type="button" class="btn-group-option {% if es_classes[section.id] == 'plus' %}active{% endif %}" data-section="{{ section.id }}" data-es-class="plus" onclick="setEsClass('plus', '{{ section.id }}')">Standard Premier</button>
</div>
</div>
<div>
{% if section.direction == 'inbound' %}
<label for="min_conn_in_select" class="filter-label">Min connection:</label>
<select id="min_conn_in_select" onchange="applyConnectionFilter()" class="select-inline">
{% for mins in valid_inbound_return_min_connections %}
<option value="{{ mins }}" {% if mins == inbound_min_connection %}selected{% endif %}>{{ mins }} min</option>
{% endfor %}
</select>
{% else %}
<label for="min_conn_select" class="filter-label">Min connection:</label>
<select id="min_conn_select" onchange="applyConnectionFilter()" class="select-inline">
{% for mins in valid_min_connections %}
<option value="{{ mins }}" {% if mins == min_connection %}selected{% endif %}>{{ mins }} min</option>
{% endfor %}
</select>
{% endif %}
</div>
{% endif %}
<div>
<span class="filter-label">NR:</span>
<div class="btn-group">
@ -97,13 +106,6 @@
<button type="button" class="btn-group-option {% if nr_classes[section.id] == 'advance_1st' %}active{% endif %}" data-section="{{ section.id }}" data-nr-class="advance_1st" onclick="setNrClass('advance_1st', '{{ section.id }}')">Advance 1st</button>
</div>
</div>
<div>
<span class="filter-label">Eurostar:</span>
<div class="btn-group">
<button type="button" class="btn-group-option {% if es_classes[section.id] == 'standard' %}active{% endif %}" data-section="{{ section.id }}" data-es-class="standard" onclick="setEsClass('standard', '{{ section.id }}')">Standard</button>
<button type="button" class="btn-group-option {% if es_classes[section.id] == 'plus' %}active{% endif %}" data-section="{{ section.id }}" data-es-class="plus" onclick="setEsClass('plus', '{{ section.id }}')">Standard Premier</button>
</div>
</div>
</div>
{% endfor %}
<div style="font-size:0.82rem;color:#718096;margin-top:0.4rem">
@ -126,7 +128,7 @@
<span id="advance-loading" style="display:none"><span class="spinner spinner-inline" aria-hidden="true"></span>Loading advance fares</span>
</div>
<div>
<span class="filter-label">Eurostar:</span>
<span class="filter-label">ES:</span>
<span id="es-type-select" style="display:none"></span>
<div class="btn-group">
<button type="button" class="btn-group-option {% if es_classes[section.id] == 'standard' %}active{% endif %}" data-section="{{ section.id }}" data-es-class="standard" onclick="setEsClass('standard', '{{ section.id }}')">Standard</button>
@ -136,26 +138,25 @@
</div>
{% endif %}
<script>
const RESULTS_BASE = '{{ results_base_url }}';
const DEFAULT_MIN_CONN = {{ default_min_connection }};
const DEFAULT_MAX_CONN = {{ default_max_connection }};
const DEFAULT_MIN_CONN_IN = {{ default_inbound_min_connection }};
let TRIP_FARES = {};
let ADVANCE_FARES = null;
let WALKON_CACHED_FARES = {};
let WALKON_API_URLS = {};
let ADVANCE_API_URLS = {};
let ADVANCE_STREAM_URLS = {};
let TIMETABLE_REFRESH_URL = null;
let HAS_PROVISIONAL_TIMETABLE = false;
let eurostarRefreshPending = false;
let cachedAdvanceFares = null;
let currentNrClasses = {{ nr_classes_json | safe }};
let currentEsClasses = {{ es_classes_json | safe }};
const SECTION_DIRECTIONS = {{ section_directions_json | safe }};
let advanceLoadingSections = {};
let walkonLoadingSections = {};
let selectedRowKeys = {};
var RESULTS_BASE = '{{ results_base_url }}';
var DEFAULT_MIN_CONN = {{ default_min_connection }};
var DEFAULT_MIN_CONN_IN = {{ default_inbound_min_connection }};
var TRIP_FARES = {};
var ADVANCE_FARES = null;
var WALKON_CACHED_FARES = {};
var WALKON_API_URLS = {};
var ADVANCE_API_URLS = {};
var ADVANCE_STREAM_URLS = {};
var TIMETABLE_REFRESH_URL = null;
var HAS_PROVISIONAL_TIMETABLE = false;
var eurostarRefreshPending = false;
var cachedAdvanceFares = null;
var currentNrClasses = {{ nr_classes_json | safe }};
var currentEsClasses = {{ es_classes_json | safe }};
var SECTION_DIRECTIONS = {{ section_directions_json | safe }};
var advanceLoadingSections = {};
var walkonLoadingSections = {};
var selectedRowKeys = {};
function updateAdvanceLoadingStatus() {
var loading = Object.keys(advanceLoadingSections).some(function(sectionId) {
@ -167,10 +168,8 @@
function buildUrl() {
var min = parseInt(document.getElementById('min_conn_select').value);
var max = parseInt(document.getElementById('max_conn_select').value);
var params = [];
if (min !== DEFAULT_MIN_CONN) params.push('min_connection=' + min);
if (max !== DEFAULT_MAX_CONN) params.push('max_connection=' + max);
var minInEl = document.getElementById('min_conn_in_select');
if (minInEl) {
var minIn = parseInt(minInEl.value);
@ -260,10 +259,19 @@
for (var rowKey in TRIP_FARES) {
var row = TRIP_FARES[rowKey];
if (rowKey !== key && row.eurostar_key !== key) continue;
if (prices[key].es_standard) row.es_standard = prices[key].es_standard;
if (prices[key].es_standard_status !== undefined) row.es_standard_status = prices[key].es_standard_status;
if (prices[key].es_plus) row.es_plus = prices[key].es_plus;
if (prices[key].es_plus_status !== undefined) row.es_plus_status = prices[key].es_plus_status;
var price = prices[key];
if (price.es_standard) {
row.es_standard = price.es_standard;
row.es_standard_status = price.es_standard_status;
} else if (!row.es_standard && price.es_standard_status !== undefined) {
row.es_standard_status = price.es_standard_status;
}
if (price.es_plus) {
row.es_plus = price.es_plus;
row.es_plus_status = price.es_plus_status;
} else if (!row.es_plus && price.es_plus_status !== undefined) {
row.es_plus_status = price.es_plus_status;
}
}
}
}
@ -450,7 +458,7 @@
totalSpan.innerHTML = '';
} else if (!nrFare) {
totalSpan.innerHTML = '<span class="text-xs text-muted" title="National Rail fare data is not available for this service">NR fare not available</span>';
} else if (eurostarRefreshPending) {
} else if (eurostarRefreshPending && !row.es_standard_status && !row.es_plus_status) {
totalSpan.innerHTML = '<span class="text-xs text-muted" title="Checking exact Eurostar data for this service">Checking Eurostar price</span>';
} else {
totalSpan.innerHTML = '<span class="text-xs text-muted" title="' + eurostarMissingTitle(row, esClass) + ' Check eurostar.com.">' + eurostarMissingText(row, esClass) + '</span>';