summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Command/work.pm
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2025-06-15 19:35:02 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2025-06-15 19:35:02 +0200
commit1c05afba7ab215e119e896a4405a2d4328a5414b (patch)
treed6cb879dd2a237c3447c622020398d2ad2e61076 /lib/Travelynx/Command/work.pm
parent786a4d6a212118946083908c77e9d0df7933e931 (diff)
EFA: handle arrival being cancelled after checkin
Diffstat (limited to 'lib/Travelynx/Command/work.pm')
-rw-r--r--lib/Travelynx/Command/work.pm19
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/Travelynx/Command/work.pm b/lib/Travelynx/Command/work.pm
index 877184d..60417b1 100644
--- a/lib/Travelynx/Command/work.pm
+++ b/lib/Travelynx/Command/work.pm
@@ -229,7 +229,12 @@ sub run {
);
}
- if ( $found_arr and $found_arr->rt_arr ) {
+ if (
+ $found_arr
+ and
+ ( $found_arr->rt_arr or $found_arr->is_cancelled )
+ )
+ {
$self->app->in_transit->update_arrival_efa(
uid => $uid,
journey => $journey,
@@ -239,6 +244,18 @@ sub run {
trip_id => $train_id,
);
}
+ if ( $found_arr and $found_arr->is_cancelled ) {
+
+ # check out (adds a cancelled journey and resets journey state
+ # to destination selection)
+ $self->app->checkout_p(
+ station => $arr,
+ force => 0,
+ dep_eva => $dep,
+ arr_eva => $arr,
+ uid => $uid
+ )->wait;
+ }
}
)->catch(
sub {