Skip to content
Snippets Groups Projects
Unverified Commit c0754f9e authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

departure board: do not allow new checkins prior to arrival of current checkin

This check is already present in the backend; now the frontend knows about it
too.
parent 13277ad7
No related branches found
No related tags found
No related merge requests found
...@@ -14,7 +14,13 @@ ...@@ -14,7 +14,13 @@
<div class="card-content"> <div class="card-content">
<span class="card-title">Aktuell eingecheckt</span> <span class="card-title">Aktuell eingecheckt</span>
<p>In <%= $user_status->{train_type} %> <%= $user_status->{train_no} %> <p>In <%= $user_status->{train_type} %> <%= $user_status->{train_no} %>
ab <%= $user_status->{dep_name} %></p> % if ( $user_status->{arr_name}) {
von <%= $user_status->{dep_name} %> nach <%= $user_status->{arr_name} %>
% }
% else {
ab <%= $user_status->{dep_name} %>
% }
</p>
</div> </div>
<div class="card-action"> <div class="card-action">
% if ($can_check_out) { % if ($can_check_out) {
...@@ -69,11 +75,20 @@ ...@@ -69,11 +75,20 @@
Alle Abfahrten – Alle Abfahrten –
% } % }
% if ($user_status->{checked_in} and not $can_check_out) { % if ($user_status->{checked_in} and not $can_check_out) {
Diese Station liegt nicht auf der Route deines aktuellen Checkins. Diese Station liegt nicht auf der Route deines <a href="/">aktuellen Checkins</a>.
Falls du aktuell nicht mit <b><%= $user_status->{train_type} %> <%= $user_status->{train_no} %></b> unterwegs bist, kannst du den Checkin rückgängig machen. Falls du aktuell nicht mit <b><%= $user_status->{train_type} %> <%= $user_status->{train_no} %></b> unterwegs bist, kannst du den Checkin rückgängig machen.
Falls es sich bei <b><%= $station %></b> um einen nicht in den Echtzeitdaten abgebildeten Zusatzhalt handelt, kannst du hier auchecken. Falls es sich bei <b><%= $station %></b> um einen nicht in den Echtzeitdaten abgebildeten Zusatzhalt handelt, kannst du hier auchecken.
Da travelynx nicht weiß, welcher der beiden Fälle zutrifft, sind bis dahin keine neuen Checkins möglich. Da travelynx nicht weiß, welcher der beiden Fälle zutrifft, sind bis dahin keine neuen Checkins möglich.
% } % }
% elsif ($user_status->{checked_in} and not $user_status->{arr_eva}) {
Du bist bereits eingecheckt und hast noch kein Fahrtziel angegeben.
Bitte <a href="/">wähle zunächst ein Ziel</a>.
Neue Checkins sind erst nach Ankunft der aktuellen Fahrt möglich.
% }
% elsif ($user_status->{checked_in} and $user_status->{arrival_countdown} > 0) {
Deine aktuelle Fahrt ist <a href="/">noch unterwegs</a>.
Ein neuer Checkin ist erst nach Ankunft am ausgewählten Ziel möglich.
% }
% elsif (@{$results}) { % elsif (@{$results}) {
Zug auswählen zum Einchecken. Zug auswählen zum Einchecken.
% } % }
...@@ -82,7 +97,7 @@ ...@@ -82,7 +97,7 @@
und maximal 120 Minuten nach Abfahrt möglich. und maximal 120 Minuten nach Abfahrt möglich.
% } % }
</p> </p>
% if (not ($user_status->{checked_in} and not $can_check_out)) { % if (not $user_status->{checked_in} or ($can_check_out and $user_status->{arr_eva} and $user_status->{arrival_countdown} <= 0)) {
% if ($hafas) { % if ($hafas) {
%= include '_departures_hafas', results => $results; %= include '_departures_hafas', results => $results;
% } % }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment