Class: Search::EmployeeReviewPresenter

Inherits:
BasePresenter
  • Object
show all
Includes:
Presenters::Timeable
Defined in:
app/presenters/search/employee_review_presenter.rb

Direct Known Subclasses

EmployeeReviewTextPresenter

Instance Attribute Summary

Attributes inherited from BasePresenter

#current_account, #options, #url_helper

Instance Method Summary collapse

Methods inherited from BasePresenter

#can?, #capture, #concat, #content_tag, #fa_icon, #h, #initialize, #link_to, #number_to_currency, #present, presents, #r, #safe_present, #simple_format, #u

Constructor Details

This class inherits a constructor from BasePresenter

Instance Method Details

#charities_selectedObject



17
18
19
# File 'app/presenters/search/employee_review_presenter.rb', line 17

def charities_selected
  r.charities_selected.join(', ')
end

#charity_allocationObject



25
26
27
# File 'app/presenters/search/employee_review_presenter.rb', line 25

def charity_allocation
  h.number_to_currency(r.charity_allocation)
end

#earned_rewardObject



21
22
23
# File 'app/presenters/search/employee_review_presenter.rb', line 21

def earned_reward
  h.number_to_currency(r.earned_reward)
end

#remaining_rewardObject



29
30
31
# File 'app/presenters/search/employee_review_presenter.rb', line 29

def remaining_reward
  h.number_to_currency(r.remaining_reward)
end

#review_dateObject



13
14
15
# File 'app/presenters/search/employee_review_presenter.rb', line 13

def review_date
  h.render_date(r.review_date)
end


9
10
11
# File 'app/presenters/search/employee_review_presenter.rb', line 9

def review_link
  h.link_to(r.review_name, h.employee_review_path(r.id))
end


5
6
7
# File 'app/presenters/search/employee_review_presenter.rb', line 5

def reviewee_link
  h.link_to(r.reviewee_name, h.employee_path(r.reviewee_employee_id))
end