Added 10 last customer jobs in profile/show

This commit is contained in:
2024-10-03 18:37:02 +02:00
parent 88b5568b2f
commit 350cc2dc78

View File

@@ -49,3 +49,26 @@
<br>
<%= button_to "Log out", Current.session, method: :delete, class: "btn btn-primary" %>
</div>
<h1 class="py-4 text-4xl font-bold text-hsrm-gray">Die letzten 10 Druckaufträge</h1>
<div class="min-w-full overflow-auto shadow-lg">
<table class="w-full py-8 table-auto">
<thead class="font-semibold tracking-wide bg-gray-200 border-b-2 border-gray-300 text text-hsrm-gray">
<tr>
<th class="w-1 p-2 py-3 text-center"> ID </th>
<th class="w-1 p-2 py-3 text-center"> Vorschau </th>
<th class="w-1 p-2 py-3 text-left"> Auftraggeber </th>
<th class="p-2 py-3 text-left"> PDF </th>
<th class="w-1 p-1 py-3 text-left"> A0 </th>
<th class="w-1 p-1 py-3 text-left"> A1 </th>
<th class="w-1 p-1 py-3 text-left"> A2 </th>
<th class="w-1 p-1 py-3 text-left"> A3 </th>
<th class="w-1 p-2 py-3 text-center text-nowrap"> no DIN </th>
<th class="w-1 p-2 py-3 text-center"> Kosten </th>
<th class="w-1 p-2 py-3 text-center"> Status </th>
</tr>
</thead>
<tbody id='jobs' class="divide-y divivde-gray-300">
<%= render partial: "jobs/job_tr", collection: current_user.customer_jobs.order(created_at: :desc).limit(10), as: :job, locals: { no_actions: true } %>
</tbody>
</table>
</div>