Many Changes: Rename privacy_policy, fixed seed.rb, fixed status in migration file, created new job for operator

This commit is contained in:
2024-09-09 14:35:07 +02:00
parent cf8cc196a3
commit c195cd3b22
11 changed files with 59 additions and 44 deletions

View File

@@ -20,6 +20,7 @@ class Operator::JobsController < ApplicationController
# POST /jobs or /jobs.json
def create
@job = Job.new(job_params)
@job.created_by_operator = true
respond_to do |format|
if @job.save
@@ -43,7 +44,6 @@ class Operator::JobsController < ApplicationController
format.html { redirect_to operator_jobs_url, notice: "Job was successfully updated." }
else
flash[:alert] = "Job was not updated."
format.turbo_stream
format.html { render :edit, status: :unprocessable_entity }
end
end
@@ -110,7 +110,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, :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)
params.require(:job).permit(:pdf, :operator_id, :costumer_id, :operator_firstname, :operator_lastname, :costumer_firstname, :costumer_lastname, :status, :privacy_policy, :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