Added sort function in admin/jobs index
This commit is contained in:
@@ -6,22 +6,21 @@
|
||||
</span>
|
||||
<% end %>
|
||||
</td>
|
||||
<td class="p-2 py-3 text-center">
|
||||
<% if job.pdf.attached? && job.pdf.previewable? %>
|
||||
<%= link_to job.pdf, target: "_blank", target: "_top" do %>
|
||||
<span class="badge badge-hover">
|
||||
<%= icon("eye", class:"icon") %>
|
||||
</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<td class="p-2 py-3">
|
||||
<%= link_to job.costumer_firstname, admin_user_path(job.costumer), target: "_top" %>
|
||||
</td>
|
||||
<td class="p-2 py-3">
|
||||
<%= link_to job.costumer_fullname, admin_user_path(job.costumer), target: "_top" %>
|
||||
<%= link_to job.costumer_lastname, admin_user_path(job.costumer), target: "_top" %>
|
||||
</td>
|
||||
<td class="p-2 py-3">
|
||||
<% if job.pdf.attached? %>
|
||||
<%#= link_to job.pdf.filename, rails_blob_path(job.pdf, disposition: "attachment") %>
|
||||
<%= link_to truncate(job.pdf.filename.to_s, length: 45), job.pdf, download:true, target: "_top" %>
|
||||
<% if job.pdf.previewable? %>
|
||||
<%= link_to job.pdf, target: "_blank", target: "_top" do %>
|
||||
<span class="badge badge-hover mr-1"><%= icon("eye", class:"icon text-hsrm-gray size-6 inline") %></span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%= link_to job.pdf, download:true, target: "_top" do %>
|
||||
<span class="badge badge-hover">
|
||||
<%= icon("document-arrow-down", class: "text-hsrm-gray size-6 inline", title: "Download") %>
|
||||
@@ -32,20 +31,20 @@
|
||||
</td>
|
||||
<% Job::AVAILABLE_PAGE_FORMATS.each do |din| %>
|
||||
<td class="p-1 py-3">
|
||||
<span class="badge">
|
||||
<%= job.public_send("number_of_plans_#{din}") if job.respond_to? "number_of_plans_#{din}" %>
|
||||
</span>
|
||||
<%= job.public_send("number_of_plans_#{din}") if job.respond_to? "number_of_plans_#{din}" %>
|
||||
</td>
|
||||
<% end %>
|
||||
<td class="p-2 py-3 text-right">
|
||||
<span class="badge">
|
||||
<%= number_with_delimiter job.costum_qm_plan.round(2) %> m²
|
||||
</span>
|
||||
<%= number_with_delimiter job.costum_qm_plan.round(2) %> m²
|
||||
</td>
|
||||
<td class="w-24 p-2 py-3 text-right">
|
||||
<span class="badge">
|
||||
<%= number_to_currency job.cost, locale: :de %>
|
||||
</span>
|
||||
<%= number_to_currency job.cost, locale: :de %>
|
||||
</td>
|
||||
<td class="p-2 py-3 text-center">
|
||||
<%= l job.created_at.localtime.to_date %>
|
||||
</td>
|
||||
<td class="p-2 py-3 text-center">
|
||||
<%= l job.paid_at.localtime.to_date if job.paid_at %>
|
||||
</td>
|
||||
<td class="p-2 py-3">
|
||||
<span class="badge badge-status text-status-<%= job.status.to_sym %> bg-status-<%= job.status %>-light">
|
||||
|
||||
Reference in New Issue
Block a user