diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb index 854e375..4ed95df 100755 --- a/app/controllers/dashboard_controller.rb +++ b/app/controllers/dashboard_controller.rb @@ -1,6 +1,7 @@ class DashboardController < ApplicationController def home + @user = current_user end end diff --git a/app/models/paid_time_off.rb b/app/models/paid_time_off.rb index 0a4abe3..f248361 100644 --- a/app/models/paid_time_off.rb +++ b/app/models/paid_time_off.rb @@ -10,5 +10,9 @@ class PaidTimeOff < ActiveRecord::Base def pto_days_remaining self.pto_earned - self.pto_taken end + + def sick_days_taken_percentage + result = self.sick_days_taken.to_f / self.sick_days_earned.to_f * 100.0 + end end diff --git a/app/views/layouts/dashboard/_dashboard_stats.html.erb b/app/views/layouts/dashboard/_dashboard_stats.html.erb index 238d216..eff889e 100755 --- a/app/views/layouts/dashboard/_dashboard_stats.html.erb +++ b/app/views/layouts/dashboard/_dashboard_stats.html.erb @@ -7,32 +7,32 @@