Removed json response
This commit is contained in:
@@ -19,10 +19,8 @@ class JobsController < ApplicationController
|
||||
Turbo::StreamsChannel.broadcast_prepend_later_to "jobs", target: :jobs, partial: "jobs/job_tr",
|
||||
locals: { job: @job }
|
||||
format.html { redirect_to jobs_url }
|
||||
format.json { render :show, status: :created, location: @job }
|
||||
else
|
||||
format.html { render :new, status: :unprocessable_entity }
|
||||
format.json { render json: @job.errors, status: :unprocessable_entity }
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -39,7 +37,6 @@ class JobsController < ApplicationController
|
||||
broadcast_update_job
|
||||
format.turbo_stream
|
||||
format.html { redirect_to jobs_url }
|
||||
format.json { head :no_content }
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ class Operator::JobsController < ApplicationController
|
||||
@paidcanceledjobs = Job.paidcanceled.status_changed_today.order(:status_changed_at)
|
||||
end
|
||||
|
||||
|
||||
# GET /jobs/1 or /jobs/1.json
|
||||
def show; end
|
||||
|
||||
@@ -33,10 +32,8 @@ class Operator::JobsController < ApplicationController
|
||||
Turbo::StreamsChannel.broadcast_prepend_later_to "jobs", target: :jobs, partial: "jobs/job_tr",
|
||||
locals: { job: @job }
|
||||
format.html { redirect_to jobs_url }
|
||||
format.json { render :show, status: :created, location: @job }
|
||||
else
|
||||
format.html { render :new, status: :unprocessable_entity }
|
||||
format.json { render json: @job.errors, status: :unprocessable_entity }
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -47,10 +44,8 @@ class Operator::JobsController < ApplicationController
|
||||
if @job.update(job_params)
|
||||
broadcast_update_job
|
||||
format.html { redirect_to jobs_url, notice: "Job was successfully updated." }
|
||||
format.json { render :show, status: :ok, location: @job }
|
||||
else
|
||||
format.html { render :edit, status: :unprocessable_entity }
|
||||
format.json { render json: @job.errors, status: :unprocessable_entity }
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -66,7 +61,6 @@ class Operator::JobsController < ApplicationController
|
||||
broadcast_update_job
|
||||
format.turbo_stream
|
||||
format.html { redirect_to jobs_url }
|
||||
format.json { head :no_content }
|
||||
end
|
||||
end
|
||||
|
||||
@@ -77,7 +71,6 @@ class Operator::JobsController < ApplicationController
|
||||
respond_to do |format|
|
||||
Turbo::StreamsChannel.broadcast_remove_to "jobs", target: @job
|
||||
format.html { redirect_to jobs_url, notice: "Job was successfully destroyed." }
|
||||
format.json { head :no_content }
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
json.array! @jobs, partial: "jobs/job", as: :job
|
||||
@@ -1,2 +0,0 @@
|
||||
json.extract! job, :id, :operator_id, :costumer_id, :operator_firstname, :operator_lastname, :costumer_firstname, :costumer_lastname, :paid, :printed_at, :intern, :cost_center, :number_of_plans_a0, :number_of_plans_a1, :number_of_plans_a2, :number_of_plans_a3, :costum_qm_plan, :created_at, :updated_at
|
||||
json.url job_url(job, format: :json)
|
||||
@@ -1 +0,0 @@
|
||||
json.partial! "jobs/job", job: @job
|
||||
Reference in New Issue
Block a user