From 6c4a23a035378c7e095041458ca2796d10f79ac9 Mon Sep 17 00:00:00 2001 From: 24c02 <163450896+24c02@users.noreply.github.com> Date: Wed, 21 Jan 2026 21:38:35 -0500 Subject: [PATCH] add thing --- app/views/letter/batches/_batches_collection.html.erb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/views/letter/batches/_batches_collection.html.erb b/app/views/letter/batches/_batches_collection.html.erb index 2ec5733..c9dd840 100644 --- a/app/views/letter/batches/_batches_collection.html.erb +++ b/app/views/letter/batches/_batches_collection.html.erb @@ -15,6 +15,17 @@
Tags: <%= render 'shared/tags', tags: batch.tags %>
+ <% state_counts = batch.letters.group(:aasm_state).count %> + <% if state_counts.any? %> +
+ <% %w[pending printed mailed received].each do |state| %> + <% count = state_counts[state] || 0 %> + <% if count > 0 %> + <%= count %> <%= state %> + <% end %> + <% end %> +
+ <% end %>
<%= link_to letter_batch_path(batch), class: "btn btn-sm btn-icon", title: "View batch details" do %>