Add requeue action for printer jobs
This commit is contained in:
parent
3a25a50d8d
commit
754099999e
5 changed files with 15 additions and 1 deletions
|
|
@ -30,6 +30,14 @@ class PrinterJobsController < ApplicationController
|
|||
@job = PrinterJob.find(params[:id])
|
||||
end
|
||||
|
||||
def requeue
|
||||
job = PrinterJob.find(params[:id])
|
||||
job = PrinterJob.create! order: job.order, document: job.document, created_by: current_user
|
||||
job.add_update! 'requeued'
|
||||
PrinterChannel.broadcast_unfinished
|
||||
redirect_to printer_jobs_path, notice: t('.notice')
|
||||
end
|
||||
|
||||
def document
|
||||
job = PrinterJob.find(params[:id])
|
||||
send_order_pdf job.order, job.document
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue