Module: Hcp::Statused
Overview
Extends a record Housecall Pro moves through a workflow.
Constant Summary collapse
- STATUSES =
Housecall Pro narrows a list by one set of words and answers with another, so a caller who filters by :in_progress reads :in_progress back rather than 'in progress'.
{ 'needs scheduling' => :unscheduled, 'scheduled' => :scheduled, 'in progress' => :in_progress, 'complete rated' => :completed, 'complete unrated' => :completed, 'user canceled' => :canceled, 'pro canceled' => :canceled, }
Instance Method Summary collapse
-
#rated? ⇒ Boolean
A rating is not a status, so it reads beside one rather than inside it.
-
#work_status ⇒ Symbol?
Where Housecall Pro files the record in its own workflow.
Instance Method Details
#rated? ⇒ Boolean
A rating is not a status, so it reads beside one rather than inside it.
21 |
# File 'lib/hcp/concerns/statused.rb', line 21 def rated? = @node['work_status'] == 'complete rated' |
#work_status ⇒ Symbol?
Returns where Housecall Pro files the record in its own workflow.
17 |
# File 'lib/hcp/concerns/statused.rb', line 17 def work_status = STATUSES[@node['work_status']] |