mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-10-30 18:58:39 -04:00
Blue while growing, green while harvesting, amber when late, red when very late, grey when finished. The track is now neutral grey so every colour reads against it. Planting#progress_state decides, and the garden cards, planting progress and timeline bars use it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
12 lines
642 B
Plaintext
12 lines
642 B
Plaintext
- if planting.active && planting.annual? && planting.percentage_grown.present?
|
|
.progress
|
|
.progress-bar{class: "progress-bar--#{planting.progress_state}", "aria-valuemax" => "100", "aria-valuemin" => "0", "aria-valuenow" => planting.percentage_grown, role: "progressbar", style: "width: #{planting.percentage_grown}%"}
|
|
|
|
.float-start #{sprintf '%.0f', planting.percentage_grown}%
|
|
|
|
- unless planting.finish_predicted_at.blank?
|
|
.float-end
|
|
-# = planting.finish_predicted_at.strftime(Date::DATE_FORMATS[:ymd])
|
|
= I18n.t('date.abbr_month_names')[planting.finish_predicted_at.month]
|
|
= planting.finish_predicted_at.year
|