Many Changes: Rename privacy_policy, fixed seed.rb, fixed status in migration file, created new job for operator
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
<%= form.file_field :pdf, accept: "application/pdf", class: "block shadow-lg rounded-md border border-hsrm-gray outline-none px-3 py-2 mt-2 w-full" %>
|
||||
</div>
|
||||
<div>
|
||||
<%= form.check_box :privacy_policy_accepted, class: "mt-2 h-5 w-5" %> <%= form.label :privacy_policy_accepted, "Datenschutzerklärung akzeptiert", class: "p-2" %>
|
||||
<%= form.check_box :privacy_policy, class: "mt-2 h-5 w-5" %> <%= form.label :privacy_policy, "Datenschutzerklärung akzeptiert", class: "p-2" %>
|
||||
</div>
|
||||
<div class="inline">
|
||||
<%= form.submit "Plottauftrag abschicken", class: "py-2 px-3 bg-hsrm-red hover:bg-hsrm-red-light shadow-lg text-white inline-block font-medium cursor-pointer" %>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%= form_with(model: job, url: operator_job_path(job), method: "patch", class: "contents") do |form| %>
|
||||
<%= form_with(model: [:operator, job], class: "contents") do |form| %>
|
||||
<% if job.errors.any? %>
|
||||
<div id="error_explanation" class="px-3 py-2 mt-3 font-medium text-red-500 border-l rounded-lg shadow-lg bg-red-50 border-red" >
|
||||
<h2><%= pluralize(job.errors.count, "error") %>
|
||||
@@ -26,34 +26,34 @@
|
||||
<%= form.label :cost_center %>
|
||||
<%= form.text_field :cost_center, class: "block shadow-lg rounded-md border border-hsrm-gray outline-none px-3 py-2 mt-2 w-full" %>
|
||||
</div>
|
||||
<div class="my-5">
|
||||
<%= form.label :number_of_plans_a0 %>
|
||||
<%= form.number_field :number_of_plans_a0, class: "block shadow-lg rounded-md border border-hsrm-gray outline-none px-3 py-2 mt-2 w-full" %>
|
||||
</div>
|
||||
<div class="my-5">
|
||||
<%= form.label :number_of_plans_a1 %>
|
||||
<%= form.number_field :number_of_plans_a1, class: "block shadow-lg rounded-md border border-hsrm-gray outline-none px-3 py-2 mt-2 w-full" %>
|
||||
</div>
|
||||
<div class="my-5">
|
||||
<%= form.label :number_of_plans_a2 %>
|
||||
<%= form.number_field :number_of_plans_a2, class: "block shadow-lg rounded-md border border-hsrm-gray outline-none px-3 py-2 mt-2 w-full" %>
|
||||
</div>
|
||||
<div class="my-5">
|
||||
<%= form.label :number_of_plans_a3 %>
|
||||
<%= form.number_field :number_of_plans_a3, class: "block shadow-lg rounded-md border border-hsrm-gray outline-none px-3 py-2 mt-2 w-full" %>
|
||||
</div>
|
||||
<div class="my-5">
|
||||
<%= form.label :costum_qm_plan %>
|
||||
<%= form.number_field :costum_qm_plan, in: 0..20.0, step: 0.01 ,class: "block shadow-lg rounded-md border border-hsrm-gray outline-none px-3 py-2 mt-2 w-full" %>
|
||||
</div>
|
||||
<!-- <div>
|
||||
<%= form.label :pdf, "Plan auswählen (PDF-Format)" %>
|
||||
<%= form.file_field :pdf, accept: "application/pdf", class: "block shadow-lg rounded-md border border-hsrm-gray outline-none px-3 py-2 mt-2 w-full" %>
|
||||
</div> -->
|
||||
<div>
|
||||
<%= form.check_box :privacy_policy_accepted, class: "mt-2 h-5 w-5" %> <%= form.label :privacy_policy_accepted, "Datenschutzerklärung akzeptiert", class: "p-2" %>
|
||||
</div>
|
||||
<% if edit_form? %>
|
||||
<div class="my-5">
|
||||
<%= form.label :number_of_plans_a0 %>
|
||||
<%= form.number_field :number_of_plans_a0, class: "block shadow-lg rounded-md border border-hsrm-gray outline-none px-3 py-2 mt-2 w-full" %>
|
||||
</div>
|
||||
<div class="my-5">
|
||||
<%= form.label :number_of_plans_a1 %>
|
||||
<%= form.number_field :number_of_plans_a1, class: "block shadow-lg rounded-md border border-hsrm-gray outline-none px-3 py-2 mt-2 w-full" %>
|
||||
</div>
|
||||
<div class="my-5">
|
||||
<%= form.label :number_of_plans_a2 %>
|
||||
<%= form.number_field :number_of_plans_a2, class: "block shadow-lg rounded-md border border-hsrm-gray outline-none px-3 py-2 mt-2 w-full" %>
|
||||
</div>
|
||||
<div class="my-5">
|
||||
<%= form.label :number_of_plans_a3 %>
|
||||
<%= form.number_field :number_of_plans_a3, class: "block shadow-lg rounded-md border border-hsrm-gray outline-none px-3 py-2 mt-2 w-full" %>
|
||||
</div>
|
||||
<div class="my-5">
|
||||
<%= form.label :costum_qm_plan %>
|
||||
<%= form.number_field :costum_qm_plan, in: 0..20.0, step: 0.01 ,class: "block shadow-lg rounded-md border border-hsrm-gray outline-none px-3 py-2 mt-2 w-full" %>
|
||||
</div>
|
||||
<% else %>
|
||||
<div>
|
||||
<%= form.label :pdf, "Plan auswählen (PDF-Format)" %>
|
||||
<%= form.file_field :pdf, accept: "application/pdf", class: "block shadow-lg rounded-md border border-hsrm-gray outline-none px-3 py-2 mt-2 w-full" %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="inline">
|
||||
<%= form.submit "Plottauftrag abschicken", class: "py-2 px-3 bg-hsrm-red hover:bg-hsrm-red-light shadow-lg text-white inline-block font-medium cursor-pointer" %>
|
||||
<%= form.submit edit_form? && "Speichern" || "Druckauftrag anlegen", class: "py-2 px-3 bg-hsrm-red hover:bg-hsrm-red-light shadow-lg text-white inline-block font-medium cursor-pointer" %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -15,7 +15,12 @@
|
||||
<%= icon(status_icon(:printing), class: "icon") %>
|
||||
Printing
|
||||
</h1>
|
||||
<%= render partial: 'start_next_job_btn', locals: { jobs: @openjobs } %>
|
||||
<div class="flex gap-2">
|
||||
<div id="start_manual_job_btn">
|
||||
<%= link_to icon("printer", class: "icon icon-nohover size-6 mr-2", title: "Nächsten Druckauftrag starten") + "Druckauftrag erstellen" , new_operator_job_path, class: "btn block bg-green-400 text-black" %>
|
||||
</div>
|
||||
<%= render partial: 'start_next_job_btn', locals: { jobs: @openjobs } %>
|
||||
</div>
|
||||
</div>
|
||||
<%# render partial: "job_card", collection: @printingjobs, as: :job %>
|
||||
<div class="min-w-full overflow-auto shadow-lg">
|
||||
|
||||
5
app/views/operator/jobs/new.html.erb
Normal file
5
app/views/operator/jobs/new.html.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
<div class="mx-auto md:w-2/3 w-full">
|
||||
<h1 class="font-bold text-4xl">Druckauftrag erstellen</h1>
|
||||
<%= render "form", job: @job %>
|
||||
<%= link_to "Zurück zur Übersicht", operator_jobs_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
|
||||
</div>
|
||||
Reference in New Issue
Block a user