Class: WorkOrder
Overview
A work order groups requests together based on submission and asset providing a unified interface for external applications. It is likely that its behaviour will be extended in future
Defined Under Namespace
Classes: Factory
Instance Method Summary
collapse
alias_association, convert_labware_to_receptacle_for, find_by_id_or_name, find_by_id_or_name!
Methods included from Squishify
extended
Instance Method Details
#at_risk ⇒ Object
37
38
39
|
# File 'app/models/work_order.rb', line 37
def at_risk
example_request.customer_accepts_responsibility
end
|
#at_risk=(risk) ⇒ Object
41
42
43
44
45
46
|
# File 'app/models/work_order.rb', line 41
def at_risk=(risk)
requests.each do |request|
request.customer_accepts_responsibility = risk
request.save!
end
end
|
#options=(new_options) ⇒ Object
48
49
50
51
52
53
|
# File 'app/models/work_order.rb', line 48
def options=(new_options)
requests.each do |request|
request.request_metadata_attributes = new_options
request.save!
end
end
|
#quantity_units ⇒ Object
Will hopefully be variable in the future
21
22
23
|
# File 'app/models/work_order.rb', line 21
def quantity_units
'flowcells'
end
|
#quantity_value ⇒ Object
25
26
27
|
# File 'app/models/work_order.rb', line 25
def quantity_value
requests.count
end
|
#state=(new_state) ⇒ Object
29
30
31
32
33
34
35
|
# File 'app/models/work_order.rb', line 29
def state=(new_state)
super
requests.each do |request|
request.state = new_state
request.save!
end
end
|