Class: Presenters::SubmissionPlatePresenter
- Inherits:
-
PlatePresenter
- Object
- PlatePresenter
- Presenters::SubmissionPlatePresenter
- Includes:
- StateChangeless, Presenters::Statemachine::DoesNotAllowLibraryPassing, Presenters::Statemachine::Submission
- Defined in:
- app/models/presenters/submission_plate_presenter.rb
Overview
The SubmissionPlatePresenter is used when plates enter the process with no assigned pipeline. It presents the user with a selection of workflows, and allows them to generate corresponding Sequencescape submissions. Once these submissions are passed, the plate behaves like a standard stock plate.
Submission options are defined by the submission_options config in the purposes/*.yml file. Structure is: <button text>:
template_name: <submission template name>
request_options:
<request_option_key>: <request_option_value>
...
Instance Method Summary collapse
- #control_state_change ⇒ Object included from StateChangeless
- #default_state_change ⇒ Object included from StateChangeless
- #each_submission_option ⇒ Object
- #pending_submissions? ⇒ Boolean
- #submissions ⇒ Object
Instance Method Details
#control_state_change ⇒ Object Originally defined in module StateChangeless
#default_state_change ⇒ Object Originally defined in module StateChangeless
#each_submission_option ⇒ Object
35 36 37 38 39 40 41 42 |
# File 'app/models/presenters/submission_plate_presenter.rb', line 35 def each_submission_option purpose_config..each do |, | = .to_hash [:asset_groups] = asset_groups [:labware_barcode] = labware..human yield , SequencescapeSubmission.new() end end |
#pending_submissions? ⇒ Boolean
44 45 46 |
# File 'app/models/presenters/submission_plate_presenter.rb', line 44 def pending_submissions? submissions.any? { |submission| submission.building_in_progress?(ready_buffer: 20.seconds) } end |
#submissions ⇒ Object
48 49 50 |
# File 'app/models/presenters/submission_plate_presenter.rb', line 48 def submissions labware.direct_submissions end |