Added acces rules for jobs, operator/jobs and admin/dashboard view, including lazy loading for cancel button in broadcasts
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
class Operator::JobsController < ApplicationController
|
||||
before_action :set_job, only: %i[show edit update destroy increment_page decrement_page]
|
||||
before_action :set_job_lists, only: %i[index]
|
||||
before_action :authorize!
|
||||
|
||||
# GET /jobs or /jobs.json
|
||||
def index
|
||||
@@ -133,7 +134,7 @@ class Operator::JobsController < ApplicationController
|
||||
end
|
||||
|
||||
def broadcast_update_job
|
||||
Turbo::StreamsChannel.broadcast_replace_later_to "jobs", target: @job, partial: "jobs/job_tr", locals: { job: @job }
|
||||
Turbo::StreamsChannel.broadcast_replace_later_to "jobs", target: @job, partial: "jobs/job_tr", locals: { job: @job }
|
||||
if @status_changed
|
||||
Turbo::StreamsChannel.broadcast_remove_to "operator_jobs", target: @job
|
||||
broadcast_update_status_cards_and_start_next_job_button
|
||||
|
||||
Reference in New Issue
Block a user