Added user model and fixed reference in migration

This commit is contained in:
2024-07-31 06:48:43 +02:00
parent ceafe1fe69
commit d322ba1a83
11 changed files with 98 additions and 75 deletions

View File

@@ -1,7 +1,11 @@
<%= form_with(model: job, class: "contents") do |form| %>
<% if job.errors.any? %>
<div id="error_explanation" class="bg-red-50 text-red-500 px-3 py-2 font-medium rounded-lg mt-3">
<h2><%= pluralize(job.errors.count, "error") %> prohibited this job from being saved:</h2>
<div
id="error_explanation"
class="bg-red-50 text-red-500 px-3 py-2 font-medium rounded-lg mt-3"
>
<h2><%= pluralize(job.errors.count, "error") %>
prohibited this job from being saved:</h2>
<ul>
<% job.errors.each do |error| %>
@@ -11,44 +15,18 @@
</div>
<% end %>
<div class="my-5">
<%= form.label :operator_id_id %>
<%= form.text_field :operator_id_id, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
</div>
<div class="my-5">
<%= form.label :costumer_id_id %>
<%= form.text_field :costumer_id_id, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
</div>
<div class="my-5">
<%= form.label :operator_firstname %>
<%= form.text_field :operator_firstname, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
</div>
<div class="my-5">
<%= form.label :operator_lastname %>
<%= form.text_field :operator_lastname, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
</div>
<div class="my-5">
<%= form.label :costumer_firstname %>
<%= form.text_field :costumer_firstname, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
<%= form.text_field :costumer_firstname,
class:
"block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
</div>
<div class="my-5">
<%= form.label :costumer_lastname %>
<%= form.text_field :costumer_lastname, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
</div>
<div class="my-5">
<%= form.label :paid %>
<%= form.check_box :paid, class: "block mt-2 h-5 w-5" %>
</div>
<div class="my-5">
<%= form.label :printed_at %>
<%= form.datetime_field :printed_at, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
<%= form.text_field :costumer_lastname,
class:
"block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
</div>
<div class="my-5">
@@ -58,35 +36,41 @@
<div class="my-5">
<%= form.label :cost_center %>
<%= form.text_field :cost_center, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
<%= form.text_field :cost_center,
class:
"block shadow rounded-md border border-gray-400 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 rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
<%= form.number_field :number_of_plans_a0,
class:
"block shadow rounded-md border border-gray-400 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 rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
<%= form.number_field :number_of_plans_a1,
class:
"block shadow rounded-md border border-gray-400 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 rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
<%= form.number_field :number_of_plans_a2,
class:
"block shadow rounded-md border border-gray-400 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 rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
</div>
<div class="my-5">
<%= form.label :costum_qm_plan %>
<%= form.text_field :costum_qm_plan, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
<%= form.number_field :number_of_plans_a3,
class:
"block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
</div>
<div class="inline">
<%= form.submit class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
<%= form.submit class:
"rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
</div>
<% end %>