From 5bf75fa36ff8f2dea14cb421333b994497b503ea Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Thu, 19 Apr 2018 13:45:47 +1200 Subject: [PATCH] Only show finish prediction badges if we have enough data --- app/views/plantings/_badges.html.haml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/app/views/plantings/_badges.html.haml b/app/views/plantings/_badges.html.haml index a665b2a75..a2ab4afec 100644 --- a/app/views/plantings/_badges.html.haml +++ b/app/views/plantings/_badges.html.haml @@ -1,12 +1,13 @@ // Finish times -- if planting.zombie? - %span.badge.badge-danger zombie -- elsif planting.living_past_predicted_finished? - -- else - %span.badge.badge-light - = days_from_now_to_finished(planting) - days until finished +- if planting.finished_is_predicatable? + - if planting.zombie? + %span.badge.badge-danger zombie + - elsif planting.should_be_finished? + %span.badge.badge-light days past finished + - else + %span.badge.badge-light + = days_from_now_to_finished(planting) + days until finished // Harvest times - if planting.harvest_time?