summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Controller/Passengerrights.pm
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-09-20 19:28:33 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2024-09-20 19:28:33 +0200
commit515754b9b7778f270ceb3e7cfc9e16176ae3795a (patch)
tree947f0239cfab525e72701f31baae99e72f149030 /lib/Travelynx/Controller/Passengerrights.pm
parentfbc21f45c86704eda8de21ad62b63e935d702d93 (diff)
passenger rights: show departures with delay ≥ 20 minutes as well2.8.40
This is a quick workaround until I have finally reviewed #116
Diffstat (limited to 'lib/Travelynx/Controller/Passengerrights.pm')
-rw-r--r--lib/Travelynx/Controller/Passengerrights.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Travelynx/Controller/Passengerrights.pm b/lib/Travelynx/Controller/Passengerrights.pm
index d80f1ae..5759d2e 100644
--- a/lib/Travelynx/Controller/Passengerrights.pm
+++ b/lib/Travelynx/Controller/Passengerrights.pm
@@ -121,6 +121,8 @@ sub list_candidates {
}
}
+ my @abo_journeys
+ = grep { $_->{delay} >= 20 and $_->{delay} < 60 } @journeys;
@journeys = grep { $_->{delay} >= 60 or $_->{connection_missed} } @journeys;
my @cancelled = $self->journeys->get(
@@ -154,8 +156,9 @@ sub list_candidates {
$self->respond_to(
json => { json => [@journeys] },
any => {
- template => 'passengerrights',
- journeys => [@journeys]
+ template => 'passengerrights',
+ journeys => [@journeys],
+ abo_journeys => [@abo_journeys]
}
);
}