mirror of
https://github.com/derf/travelynx
synced 2024-11-10 15:04:17 +00:00
fix bugs related to users without past journeys
This commit is contained in:
parent
556bafffcf
commit
47171500b7
2 changed files with 21 additions and 6 deletions
|
@ -3208,8 +3208,12 @@ sub startup {
|
|||
uic => $status->{dep_eva},
|
||||
longitude => undef,
|
||||
latitude => undef,
|
||||
scheduledTime => $status->{sched_departure}->epoch || undef,
|
||||
realTime => $status->{real_departure}->epoch || undef,
|
||||
scheduledTime => $status->{sched_departure}
|
||||
? $status->{sched_departure}->epoch
|
||||
: undef,
|
||||
realTime => $status->{real_departure}
|
||||
? $status->{real_departure}->epoch
|
||||
: undef,
|
||||
},
|
||||
toStation => {
|
||||
ds100 => $status->{arr_ds100},
|
||||
|
@ -3217,8 +3221,12 @@ sub startup {
|
|||
uic => $status->{arr_eva},
|
||||
longitude => undef,
|
||||
latitude => undef,
|
||||
scheduledTime => $status->{sched_arrival}->epoch || undef,
|
||||
realTime => $status->{real_arrival}->epoch || undef,
|
||||
scheduledTime => $status->{sched_arrival}
|
||||
? $status->{sched_arrival}->epoch
|
||||
: undef,
|
||||
realTime => $status->{real_arrival}
|
||||
? $status->{real_arrival}->epoch
|
||||
: undef,
|
||||
},
|
||||
train => {
|
||||
type => $status->{train_type},
|
||||
|
@ -3226,7 +3234,9 @@ sub startup {
|
|||
no => $status->{train_no},
|
||||
id => $status->{train_id},
|
||||
},
|
||||
actionTime => $status->{timestamp}->epoch,
|
||||
actionTime => $status->{timestamp}
|
||||
? $status->{timestamp}->epoch
|
||||
: undef,
|
||||
intermediateStops => [],
|
||||
};
|
||||
|
||||
|
|
|
@ -155,7 +155,12 @@
|
|||
<i class="material-icons small right sync-failed-marker grey-text" style="display: none;">sync_problem</i>
|
||||
<span class="card-title"><%= $name %> ist gerade nicht eingecheckt</span>
|
||||
<p>
|
||||
Zuletzt gesehen in <%= $journey->{arr_name} %>.
|
||||
% if ($journey->{arr_name}) {
|
||||
Zuletzt gesehen in <%= $journey->{arr_name} %>.
|
||||
% }
|
||||
% else {
|
||||
Noch keine Zugfahrten geloggt.
|
||||
% }
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue