Class: Search::EmployeeReviewPresenter

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

Overview

Presenter: employee review presenter.

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



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

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

#charity_allocationObject



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

def charity_allocation
  h.number_to_currency(r.charity_allocation)
end

#earned_rewardObject



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

def earned_reward
  h.number_to_currency(r.earned_reward)
end

#remaining_rewardObject



32
33
34
# File 'app/presenters/search/employee_review_presenter.rb', line 32

def remaining_reward
  h.number_to_currency(r.remaining_reward)
end

#review_dateObject



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

def review_date
  h.render_date(r.review_date)
end


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

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


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

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