Class: Search::ServiceJobPresenter
- Inherits:
-
BasePresenter
show all
- Includes:
- Presenters::Timeable
- Defined in:
- app/presenters/search/service_job_presenter.rb
Overview
Presenter: service job presenter.
Instance Attribute Summary
#current_account, #options, #url_helper
Instance Method Summary
collapse
#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
#business_phone ⇒ Object
26
27
28
|
# File 'app/presenters/search/service_job_presenter.rb', line 26
def business_phone
h.number_to_phone(r.business_phone)
end
|
#cell_phone ⇒ Object
22
23
24
|
# File 'app/presenters/search/service_job_presenter.rb', line 22
def cell_phone
h.number_to_phone(r.cell_phone)
end
|
#completed_on ⇒ Object
34
35
36
|
# File 'app/presenters/search/service_job_presenter.rb', line 34
def completed_on
h.render_date(r.completed_on)
end
|
#customer_link ⇒ Object
8
9
10
11
12
|
# File 'app/presenters/search/service_job_presenter.rb', line 8
def customer_link
return unless r.has_columns?(:customer_full_name, :customer_id)
h.link_to r.customer_full_name, h.customer_path(r.customer_id)
end
|
#distance ⇒ Object
14
15
16
|
# File 'app/presenters/search/service_job_presenter.rb', line 14
def distance
"#{r.distance.to_f.round(2)} mi."
end
|
#home_phone ⇒ Object
18
19
20
|
# File 'app/presenters/search/service_job_presenter.rb', line 18
def home_phone
h.number_to_phone(r.home_phone)
end
|
#job_date ⇒ Object
30
31
32
|
# File 'app/presenters/search/service_job_presenter.rb', line 30
def job_date
h.render_date(r.job_date)
end
|