Added sort function in admin/jobs index
This commit is contained in:
@@ -1,22 +1,27 @@
|
||||
<%= turbo_frame_tag "admin_jobs" do %>
|
||||
<div>
|
||||
<h1 class="font-bold text-4xl py-4 text-hsrm-gray">Alle Druckaufträge</h1>
|
||||
<%== pagy_nav(@pagy) %>
|
||||
<div class="flex justify-between items-center">
|
||||
<%== pagy_nav(@pagy) %>
|
||||
<%== pagy_info(@pagy, item_name: "Users") %>
|
||||
</div>
|
||||
<div class="min-w-full overflow-auto shadow-lg pt-2">
|
||||
<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>
|
||||
<th class="w-1 p-2 py-3 text-center text-nowrap"><%= sort_link(@q, :id, "ID", ) %></th>
|
||||
<th class="min-w-24 p-2 py-3 text-left"><%= sort_link(@q, :costumer_firstname, "Vorname") %></th>
|
||||
<th class="min-w-24 p-2 py-3 text-left"><%= sort_link(@q, :costumer_lastname, "Nachname") %></th>
|
||||
<th class="p-2 py-3 text-left"><%= sort_link(@q, :pdf_blob_filename, "PDF") %></th>
|
||||
<th class="w-1 p-1 py-3 text-left text-nowrap"><%= sort_link(@q, :number_of_plans_a0, "A0") %></th>
|
||||
<th class="w-1 p-1 py-3 text-left text-nowrap"><%= sort_link(@q, :number_of_plans_a1, "A1") %></th>
|
||||
<th class="w-1 p-1 py-3 text-left text-nowrap"><%= sort_link(@q, :number_of_plans_a2, "A2") %></th>
|
||||
<th class="w-1 p-1 py-3 text-left text-nowrap"><%= sort_link(@q, :number_of_plans_a3, "A3") %></th>
|
||||
<th class="w-1 p-2 py-3 text-center text-nowrap"><%= sort_link(@q, :costum_qm_plan, "no DIN") %></th>
|
||||
<th class="w-1 p-2 py-3 text-center"><%= sort_link(@q, :cost, "Kosten") %></th>
|
||||
<th class="w-1 p-2 py-3 text-center text-nowrap"><%= sort_link(@q, :created_at, "Erstellt am") %></th>
|
||||
<th class="w-1 p-2 py-3 text-center text-nowrap"><%= sort_link(@q, :created_at, "Bezahlt am") %></th>
|
||||
<th class="w-1 p-2 py-3 text-center"><%= sort_link(@q, :status, "Status") %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id='jobs' class="divide-y divivde-gray-300">
|
||||
@@ -24,6 +29,9 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<%== pagy_nav(@pagy) %>
|
||||
<div class="flex justify-between items-center">
|
||||
<%== pagy_nav(@pagy) %>
|
||||
<%== pagy_info(@pagy, item_name: "Users") %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user