mirror of
https://github.com/System-End/theseus.git
synced 2026-04-19 16:38:18 +00:00
add thing
This commit is contained in:
parent
734c9abcdb
commit
6c4a23a035
1 changed files with 11 additions and 0 deletions
|
|
@ -15,6 +15,17 @@
|
|||
</div>
|
||||
<div>Tags: <%= render 'shared/tags', tags: batch.tags %></div>
|
||||
</div>
|
||||
<% state_counts = batch.letters.group(:aasm_state).count %>
|
||||
<% if state_counts.any? %>
|
||||
<div class="flex gap-3 text-sm text-gray-600 mb-2">
|
||||
<% %w[pending printed mailed received].each do |state| %>
|
||||
<% count = state_counts[state] || 0 %>
|
||||
<% if count > 0 %>
|
||||
<span><%= count %> <%= state %></span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="mt-4 flex gap-2">
|
||||
<%= link_to letter_batch_path(batch), class: "btn btn-sm btn-icon", title: "View batch details" do %>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue