Fixed job number to work with broadcast in jobs#index

This commit is contained in:
2025-07-23 15:52:55 +02:00
parent e1c6a90830
commit a01ac2203e
5 changed files with 24 additions and 5 deletions

View File

@@ -1,7 +1,7 @@
class JobsController < ApplicationController
skip_before_action :authenticate_user!, only: [ :index, :cancel_button ]
skip_before_action :authenticate_user!, only: [ :index, :cancel_button, :badge ]
skip_before_action :verified_user!, only: [ :index ]
skip_verify_authorized only: [ :index, :new, :create, :cancel_button ]
skip_verify_authorized only: [ :index, :new, :create, :cancel_button, :badge]
# GET /jobs or /jobs.json
def index
@@ -53,6 +53,12 @@ class JobsController < ApplicationController
render partial: "jobs/cancel_button", locals: { job: @job }
end
def badge
@job = Job.find(params[:id])
render partial: "jobs/badge", locals: { job: @job }
end
private
def broadcast_update_status_cards_and_start_next_job_button