Module: Solidstats::ProductivityHelper

Defined in:
app/helpers/solidstats/productivity_helper.rb

Instance Method Summary collapse

Instance Method Details

#todo_priority_class(type) ⇒ Object



27
28
29
30
31
32
33
34
35
36
# File 'app/helpers/solidstats/productivity_helper.rb', line 27

def todo_priority_class(type)
  case type.to_s.downcase
  when "bug" then "priority-high"
  when "fixme" then "priority-high"
  when "hack" then "priority-medium"
  when "todo" then "priority-low"
  when "note" then "priority-low"
  else "priority-low"
  end
end

#todo_type_color(type) ⇒ Object



5
6
7
8
9
10
11
12
13
14
# File 'app/helpers/solidstats/productivity_helper.rb', line 5

def todo_type_color(type)
  case type.to_s.downcase
  when "todo" then "primary"
  when "fixme" then "error"
  when "hack" then "warning"
  when "note" then "info"
  when "bug" then "error"
  else "neutral"
  end
end

#todo_type_icon(type) ⇒ Object



16
17
18
19
20
21
22
23
24
25
# File 'app/helpers/solidstats/productivity_helper.rb', line 16

def todo_type_icon(type)
  case type.to_s.downcase
  when "todo" then "📝"
  when "fixme" then "🔧"
  when "hack" then "⚠️"
  when "note" then "📋"
  when "bug" then "🐛"
  else "📌"
  end
end