Added counter_cache for user jobs, replaced count with size to use cache.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<h3 class="p-3 text-2xl font-bold">
|
||||
<%= icon(status_icon(status), class: "text-status-#{status} icon icon-nohover") %>
|
||||
<%= status %>
|
||||
<span class="block text-3xl text-right"><%= jobs.count %></span>
|
||||
<span class="block text-3xl text-right"><%= jobs.size %></span>
|
||||
</h3>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<% if jobs.any? %>
|
||||
<%= button_to icon("printer",
|
||||
class: "icon icon-nohover size-6 mr-2",
|
||||
title: "Drucken") + "Nächsten Druckauftrag starten (" + jobs.count.to_s + ")", operator_job_path(jobs.first),
|
||||
title: "Drucken") + "Nächsten Druckauftrag starten (" + jobs.size.to_s + ")", operator_job_path(jobs.first),
|
||||
params: { :job => { status: :printing} },
|
||||
method: :patch,
|
||||
form_class: "btn bg-green-400 text-black" %>
|
||||
|
||||
Reference in New Issue
Block a user