Updated job view and edit
This commit is contained in:
@@ -9,6 +9,9 @@
|
|||||||
.btn-primary {
|
.btn-primary {
|
||||||
@apply bg-hsrm-red hover:bg-hsrm-red-light;
|
@apply bg-hsrm-red hover:bg-hsrm-red-light;
|
||||||
}
|
}
|
||||||
|
.btn-alert {
|
||||||
|
@apply bg-hsrm-red hover:bg-hsrm-red-light;
|
||||||
|
}
|
||||||
.badge {
|
.badge {
|
||||||
@apply text-sm font-medium text-center font-bold rounded-lg uppercase bg-gray-300 bg-opacity-50 px-2 py-1.5 shadow;
|
@apply text-sm font-medium text-center font-bold rounded-lg uppercase bg-gray-300 bg-opacity-50 px-2 py-1.5 shadow;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,33 +18,33 @@
|
|||||||
<%= form.label :costumer_lastname, 'Nachname' %>
|
<%= form.label :costumer_lastname, 'Nachname' %>
|
||||||
<%= form.text_field :costumer_lastname, class: "block shadow-lg rounded-md border border-hsrm-gray outline-none px-3 py-2 mt-2 w-full" %>
|
<%= form.text_field :costumer_lastname, class: "block shadow-lg rounded-md border border-hsrm-gray outline-none px-3 py-2 mt-2 w-full" %>
|
||||||
</div>
|
</div>
|
||||||
<div class="my-5">
|
<div class="my-5 inline">
|
||||||
<%= form.label :intern %>
|
<%= form.check_box :intern, class: "pr-2 h-5 w-5" %>
|
||||||
<%= form.check_box :intern, class: "block mt-2 h-5 w-5" %>
|
<%= form.label :intern, "Interne Umbuchung" %>
|
||||||
</div>
|
</div>
|
||||||
<div class="my-5">
|
<div class="my-5">
|
||||||
<%= form.label :cost_center %>
|
<%= form.label :cost_center, "Kostenstelle/Auftragsnummer" %>
|
||||||
<%= 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" %>
|
<%= 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>
|
||||||
<% if edit_form? %>
|
<% if edit_form? %>
|
||||||
<div class="my-5">
|
<div class="my-5">
|
||||||
<%= form.label :number_of_plans_a0 %>
|
<%= form.label :number_of_plans_a0, "Anzahl A0 Pläne" %>
|
||||||
<%= 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" %>
|
<%= 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>
|
||||||
<div class="my-5">
|
<div class="my-5">
|
||||||
<%= form.label :number_of_plans_a1 %>
|
<%= form.label :number_of_plans_a1, "Anzahl A1 Pläne" %>
|
||||||
<%= 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" %>
|
<%= 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>
|
||||||
<div class="my-5">
|
<div class="my-5">
|
||||||
<%= form.label :number_of_plans_a2 %>
|
<%= form.label :number_of_plans_a2, "Anzahl A2 Pläne" %>
|
||||||
<%= 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" %>
|
<%= 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>
|
||||||
<div class="my-5">
|
<div class="my-5">
|
||||||
<%= form.label :number_of_plans_a3 %>
|
<%= form.label :number_of_plans_a3, "Anzahl A3 Pläne" %>
|
||||||
<%= 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" %>
|
<%= 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>
|
||||||
<div class="my-5">
|
<div class="my-5">
|
||||||
<%= form.label :costum_qm_plan %>
|
<%= form.label :costum_qm_plan, "Quatratmeter noDin" %>
|
||||||
<%= 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" %>
|
<%= 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>
|
||||||
<% else %>
|
<% else %>
|
||||||
|
|||||||
@@ -1,56 +1,50 @@
|
|||||||
<div id="<%= dom_id job %>" class="flex flex-row space-x-4 shadow">
|
<div id="<%= dom_id job %>" class="flex flex-row space-x-4 shadow">
|
||||||
<div>
|
<div>
|
||||||
<embed type="application/pdf" src="<%= url_for(@job.pdf) %>" width="800px" height="1000px" class="" />
|
<embed type="application/pdf" src="<%= url_for(@job.pdf) %>" width="600px" height="800px" class="" />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<p class="my-3">
|
<p class="my-3">
|
||||||
<strong class="mb-1 font-medium">Operator ID:</strong>
|
<strong class="mb-1 font-medium">Operator ID:</strong>
|
||||||
<%= job.operator_id %>
|
|
||||||
<% if job.operator %>
|
<% if job.operator %>
|
||||||
- <%= job.operator.name %> (<%= job.operator.email %>)
|
<%= job.operator_id %> - <%= job.operator.name %> (<%= job.operator.email %>)
|
||||||
<% else %>
|
<% else %>
|
||||||
-
|
-
|
||||||
<% end %>
|
<% end %>
|
||||||
</p>
|
</p>
|
||||||
<p class="my-3">
|
<p class="my-3">
|
||||||
<strong class="mb-1 font-medium">Costumer ID:</strong>
|
<strong class="mb-1 font-medium">Costumer ID:</strong>
|
||||||
<%= job.costumer_id %>
|
|
||||||
<% if job.costumer %>
|
<% if job.costumer %>
|
||||||
- <%= job.costumer.name %> (<%= job.costumer.email %>)
|
<%= job.costumer_id %> - <%= job.costumer.name %> (<%= job.costumer.email %>)
|
||||||
<% else %>
|
<% else %>
|
||||||
-
|
-
|
||||||
<% end %>
|
<% end %>
|
||||||
</p>
|
</p>
|
||||||
<p class="my-3">
|
<p class="my-3">
|
||||||
<strong class="mb-1 font-medium">Operator:</strong>
|
<strong class="mb-1 font-medium">Betreiber:</strong>
|
||||||
<%= "#{job.operator_firstname} #{job.operator_lastname}" %>
|
<%= "#{job.operator_firstname} #{job.operator_lastname}" %>
|
||||||
</p>
|
</p>
|
||||||
<p class="my-3">
|
<p class="my-3">
|
||||||
<strong class="mb-1 font-medium">Costumer:</strong>
|
<strong class="mb-1 font-medium">Auftraggeber:</strong>
|
||||||
<%= "#{job.costumer_firstname} #{job.costumer_lastname}" %>
|
<%= "#{job.costumer_firstname} #{job.costumer_lastname}" %>
|
||||||
</p>
|
</p>
|
||||||
<p class="my-3">
|
<p class="my-3">
|
||||||
<strong class="mb-1 font-medium">Paid:</strong>
|
<strong class="mb-1 font-medium">Aktueller Status:</strong>
|
||||||
<%= icon bool_icon(job.paid), class: "icon" %>
|
<%= %>
|
||||||
</p>
|
</p>
|
||||||
<p class="my-3">
|
<p class="my-3">
|
||||||
<strong class="mb-1 font-medium">Paid at:</strong>
|
<strong class="mb-1 font-medium">Paid at:</strong>
|
||||||
<%= job.paid_at %>
|
<%= job.paid_at %>
|
||||||
</p>
|
</p>
|
||||||
<p class="my-3">
|
|
||||||
<strong class="mb-1 font-medium">Printed:</strong>
|
|
||||||
<%= icon bool_icon(job.printed), class: "icon" %>
|
|
||||||
</p>
|
|
||||||
<p class="my-3">
|
<p class="my-3">
|
||||||
<strong class="mb-1 font-medium">Printed at:</strong>
|
<strong class="mb-1 font-medium">Printed at:</strong>
|
||||||
<%= job.printed_at %>
|
<%= job.printed_at %>
|
||||||
</p>
|
</p>
|
||||||
<p class="my-3">
|
<p class="my-3">
|
||||||
<strong class="mb-1 font-medium">Intern:</strong>
|
<strong class="mb-1 font-medium">Interne Umbuchung:</strong>
|
||||||
<%= icon bool_icon(job.intern), class: "icon" %>
|
<%= icon bool_icon(job.intern), class: "icon" %>
|
||||||
</p>
|
</p>
|
||||||
<p class="my-3">
|
<p class="my-3">
|
||||||
<strong class="mb-1 font-medium">Cost center:</strong>
|
<strong class="mb-1 font-medium">Kostenstelle:</strong>
|
||||||
<%= job.cost_center %>
|
<%= job.cost_center %>
|
||||||
</p>
|
</p>
|
||||||
<p class="my-3">
|
<p class="my-3">
|
||||||
@@ -72,5 +66,10 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</p>
|
</p>
|
||||||
|
<%= link_to "Edit this job", edit_operator_job_path(@job), class: "btn" %>
|
||||||
|
<%= link_to "Back to jobs", operator_jobs_path, class: "btn" %>
|
||||||
|
<div class="inline-block">
|
||||||
|
<%= button_to "Destroy this job", operator_job_path(@job), method: :delete, class: "btn btn-alert inline-block" %>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
<h1 class="text-4xl font-bold">Editing job</h1>
|
|
||||||
<div id="<%= dom_id @job %>" class="flex flex-row space-x-4 shadow">
|
<div id="<%= dom_id @job %>" class="flex flex-row space-x-4 shadow">
|
||||||
<div>
|
<div>
|
||||||
<embed type="application/pdf" src="<%= url_for(@job.pdf) %>" width="800px" height="1000px" class="" />
|
<embed type="application/pdf" src="<%= url_for(@job.pdf) %>#view=Fit" width="700px" height="900px" class="" />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<%= render "form", job: @job %>
|
<%= render "form", job: @job %>
|
||||||
<%= link_to "Show this job", operator_job_path(@job), class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
|
<%= link_to "Show this job", operator_job_path(@job), class: "btn" %>
|
||||||
<%= link_to "Back to jobs", operator_jobs_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
|
<%= link_to "Back to jobs", operator_jobs_path, class: "btn" %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -4,10 +4,5 @@
|
|||||||
<p class="inline-block px-3 py-2 mb-5 font-medium text-green-500 rounded-lg bg-green-50" id="notice"><%= notice %></p>
|
<p class="inline-block px-3 py-2 mb-5 font-medium text-green-500 rounded-lg bg-green-50" id="notice"><%= notice %></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= render @job %>
|
<%= render @job %>
|
||||||
<%= link_to "Edit this job", edit_operator_job_path(@job), class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
|
|
||||||
<%= link_to "Back to jobs", operator_jobs_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
|
|
||||||
<div class="inline-block ml-2">
|
|
||||||
<%= button_to "Destroy this job", operator_job_path(@job), method: :delete, class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 font-medium" %>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user