102 lines
4.4 KiB
Plaintext
102 lines
4.4 KiB
Plaintext
<div id="<%= dom_id job %>" class="flex flex-row space-x-4 shadow">
|
|
<div>
|
|
<embed type="application/pdf" src="<%= url_for(@job.pdf) %>" width="600px" height="800px" class="" />
|
|
</div>
|
|
<div>
|
|
<p class="my-3">
|
|
<strong class="mb-1 font-medium">Costumer ID:</strong>
|
|
<% if job.costumer %>
|
|
<%= link_to_if allowed_to?(:show?, job.costumer, namespace: :Admin), "#{job.costumer_id} - #{job.costumer.name} (#{job.costumer.email})", admin_user_path(job.costumer) %>
|
|
<% else %>
|
|
-
|
|
<% end %>
|
|
</p>
|
|
<p class="my-3">
|
|
<strong class="mb-1 font-medium">Creator ID:</strong>
|
|
<% if job.creator %>
|
|
<%= link_to_if allowed_to?(:show?, job.creator, namespace: :Admin, ), "#{job.creator_id} - #{job.creator.name} (#{job.creator.email})", admin_user_path(job.creator) %>
|
|
<% else %>
|
|
-
|
|
<% end %>
|
|
</p>
|
|
<p class="my-3">
|
|
<strong class="mb-1 font-medium">Operator ID:</strong>
|
|
<% if job.operator %>
|
|
<%= link_to_if allowed_to?(:show?, job.operator, namespace: :Admin), "#{job.operator_id} - #{job.operator.name} (#{job.operator.email})", admin_user_path(job.operator) %>
|
|
<% else %>
|
|
-
|
|
<% end %>
|
|
</p>
|
|
<p class="my-3">
|
|
<strong class="mb-1 font-medium">Cashier ID:</strong>
|
|
<% if job.cashier %>
|
|
<%= link_to_if allowed_to?(:show?, job.cashier, namespace: :Admin), "#{job.cashier_id} - #{job.cashier.name} (#{job.cashier.email})", admin_user_path(job.cashier) %>
|
|
<% else %>
|
|
-
|
|
<% end %>
|
|
</p>
|
|
<p class="my-3">
|
|
<strong class="mb-1 font-medium">Kunde:</strong>
|
|
<%= link_to_if job.costumer && allowed_to?(:show? , job.costumer, namespace: :Admin), "#{job.costumer_firstname} #{job.costumer_lastname}", ( job.costumer ? admin_user_path(job.costumer) : "" ) %>
|
|
</p>
|
|
<p class="my-3">
|
|
<strong class="mb-1 font-medium">Operator:</strong>
|
|
<%= link_to_if job.operator && allowed_to?(:show, job.operator, namespace: :Admin), "#{job.operator_firstname} #{job.operator_lastname}", ( job.operator ? admin_users_path(job.operator) : "" )%>
|
|
</p>
|
|
<p class="my-3">
|
|
<strong class="mb-1 font-medium">Kassierer:</strong>
|
|
<%= link_to_if job.cashier && allowed_to?(:show, job.cashier, namespace: :Admin), "#{job.cashier_firstname} #{job.cashier_lastname}", ( job.cashier ? admin_users_path(job.cashier) : "" ) %>
|
|
</p>
|
|
<p class="my-3">
|
|
<strong class="mb-1 font-medium">Erstellt durch Operator:</strong>
|
|
<%= icon bool_icon(job.created_by_operator), class: "icon #{job.created_by_operator ? "text-green-600" : "text-red-600"}" %>
|
|
</p>
|
|
<p class="my-3">
|
|
<strong class="mb-1 font-medium">Aktueller Status:</strong>
|
|
<span class="badge badge-status inline text-status-<%= job.status.to_sym %> bg-status-<%= job.status %>-light">
|
|
<%= job.status %>
|
|
</span>
|
|
</p>
|
|
<p class="my-3">
|
|
<strong class="mb-1 font-medium">Paid at:</strong>
|
|
<%= job.paid_at %>
|
|
</p>
|
|
<p class="my-3">
|
|
<strong class="mb-1 font-medium">Printed at:</strong>
|
|
<%= job.printed_at %>
|
|
</p>
|
|
<p class="my-3">
|
|
<strong class="mb-1 font-medium">Interne Umbuchung:</strong>
|
|
<%= icon bool_icon(job.intern), class: "icon #{job.intern ? "text-green-600" : "text-red-600"}" %>
|
|
</p>
|
|
<p class="my-3">
|
|
<strong class="mb-1 font-medium">Kostenstelle:</strong>
|
|
<%= job.cost_center %>
|
|
</p>
|
|
<p class="my-3">
|
|
<strong class="block mb-1 font-medium">Plans:
|
|
<table class="text-center">
|
|
<tr class="p-2 bg-gray-300">
|
|
<th class="p-2">a0</th>
|
|
<th class="p-2">a1</th>
|
|
<th class="p-2">a2</th>
|
|
<th class="p-2">a3</th>
|
|
<th class="p-2">costum</td>
|
|
</tr>
|
|
<tr>
|
|
<td><%= job.number_of_plans_a0 %></td>
|
|
<td><%= job.number_of_plans_a1 %></td>
|
|
<td><%= job.number_of_plans_a2 %></td>
|
|
<td><%= job.number_of_plans_a3 %></td>
|
|
<td><%= job.costum_qm_plan %> qm</td>
|
|
</tr>
|
|
</table>
|
|
</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>
|