2023-11-16 20:23:09 +00:00
|
|
|
module JobsHelper
|
2023-11-27 08:55:57 +00:00
|
|
|
def total_progress_bar(job)
|
|
|
|
progress_bar(job.done_ratio,
|
|
|
|
legend: "#{job.done_ratio}%
|
|
|
|
(#{l_hours_short(job.total_time_logged)}/#{l_hours_short(job.total_time_budget)})",
|
|
|
|
class: "progress")
|
|
|
|
end
|
|
|
|
|
|
|
|
def progress_bar_for(budget)
|
|
|
|
progress_bar(budget.job.done_ratio_for(budget.activity),
|
|
|
|
legend: "#{budget.job.done_ratio_for(budget.activity)}%
|
|
|
|
(#{l_hours_short(budget.job.total_time_logged_for(budget.activity))}/#{l_hours_short(budget.hours)})",
|
|
|
|
class: "progress")
|
|
|
|
end
|
2023-11-16 20:23:09 +00:00
|
|
|
end
|