Skip to content

Commit

Permalink
Show the correct version for upcoming scheduled releases
Browse files Browse the repository at this point in the history
  • Loading branch information
nid90 committed Nov 22, 2024
1 parent 6106d68 commit f68d4ea
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/components/v2/scheduled_train_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,15 @@
<% if future_release.present? %>
<%= render partial: "scheduled_release/show", locals: {
header: time_text(future_release),
title: train.next_version,
title: next_version,
empty_icon: "v2/calendar.svg",
status: scheduled_release_status(future_release),
box_classes: nil,
footer: time_format(future_release.scheduled_at, only_day: true)
} %>
<%= render partial: "scheduled_release/show", locals: {
header: time_text(future_release),
title: train.next_to_next_version,
title: next_next_version,
empty_icon: "v2/calendar.svg",
status: scheduled_release_status(future_release),
box_classes: "opacity-50",
Expand Down
8 changes: 8 additions & 0 deletions app/components/v2/scheduled_train_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,12 @@ def next_to_next_run_at
return unless future_release
future_release.scheduled_at + train.repeat_duration
end

def next_version
(ongoing_release || train).next_version
end

def next_next_version
(ongoing_release || train).next_to_next_version
end
end

0 comments on commit f68d4ea

Please sign in to comment.