Class: Renalware::Letters::CompletedBatchesController

Inherits:
BaseController show all
Includes:
Concerns::Pageable
Defined in:
app/controllers/renalware/letters/completed_batches_controller.rb

Instance Method Summary collapse

Methods inherited from BaseController

#patient

Methods inherited from BaseController

#patient

Instance Method Details

#createObject



17
18
19
20
21
# File 'app/controllers/renalware/letters/completed_batches_controller.rb', line 17

def create
  batch = find_and_authorize_batch
  Printing::CompleteBatch.new(user: current_user, batch: batch).call
  render layout: false, locals: { batch: batch }
end

#newObject

Renders a modal asking the user if they want to complete (ie mark as printed) the batch.



12
13
14
15
# File 'app/controllers/renalware/letters/completed_batches_controller.rb', line 12

def new
  batch = find_and_authorize_batch
  render layout: false, locals: { batch: batch }
end