Move big statistics to a partial
This commit is contained in:
parent
1eff57d3ac
commit
3af4dd5aac
6 changed files with 41 additions and 98 deletions
|
|
@ -30,6 +30,16 @@ module FormatHelper
|
|||
end
|
||||
end
|
||||
|
||||
def variant_from_delta(delta, reverse: false)
|
||||
if delta.to_i.positive?
|
||||
reverse ? 'warning' : 'success'
|
||||
elsif delta.to_i.negative?
|
||||
reverse ? 'success' : 'warning'
|
||||
else
|
||||
'info'
|
||||
end
|
||||
end
|
||||
|
||||
def target_progress_color(progress)
|
||||
progress = progress.to_i
|
||||
result =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue