Fixed show and edit action for operator/jobs
This commit is contained in:
@@ -44,7 +44,7 @@ class Operator::JobsController < ApplicationController
|
||||
respond_to do |format|
|
||||
if @job.save
|
||||
broadcast_update_job
|
||||
format.turbo_stream
|
||||
format.turbo_stream unless request.referrer.include? "edit"
|
||||
format.html { redirect_to operator_jobs_url, notice: "Job was successfully updated." }
|
||||
else
|
||||
flash[:alert] = "Job was not updated."
|
||||
@@ -115,7 +115,7 @@ class Operator::JobsController < ApplicationController
|
||||
|
||||
# Only allow a list of trusted parameters through.
|
||||
def job_params
|
||||
params.require(:job).permit(:operator_id, :costumer_id, :operator_firstname, :operator_lastname, :costumer_firstname, :costumer_lastname, :status)
|
||||
params.require(:job).permit(:operator_id, :costumer_id, :operator_firstname, :operator_lastname, :costumer_firstname, :costumer_lastname, :status, :privacy_policy_accepted, :intern, :cost_center, :number_of_plans_a0, :number_of_plans_a1, :number_of_plans_a2, :number_of_plans_a3, :costum_qm_plan)
|
||||
end
|
||||
|
||||
# FIXME: Move broadcast to model though i don't think view logic belongs in the model
|
||||
|
||||
Reference in New Issue
Block a user