mirror of
https://github.com/System-End/theseus.git
synced 2026-04-19 22:15:09 +00:00
may mark mailed!
This commit is contained in:
parent
3dad3f6c96
commit
e606cdef08
1 changed files with 4 additions and 3 deletions
|
|
@ -133,12 +133,13 @@
|
|||
Mark All Printed
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if @batch.letters.any? && @batch.letters.any?(&:printed?) %>
|
||||
<%= button_to mark_mailed_letter_batch_path(@batch), method: :post, class: "btn btn-block btn-info", data: { confirm: "Are you sure you want to mark all letters as mailed?" } do %>
|
||||
<% mailable_letters = @batch.letters.select(&:may_mark_mailed?) %>
|
||||
<% if mailable_letters.any? %>
|
||||
<%= button_to mark_mailed_letter_batch_path(@batch), method: :post, class: "btn btn-block btn-info", data: { confirm: "Are you sure you want to mark #{mailable_letters.size == @batch.letters.size ? 'all' : 'pending'} letters as mailed?" } do %>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 mr-1" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"/>
|
||||
</svg>
|
||||
Mark All Mailed
|
||||
<%= mailable_letters.size == @batch.letters.size ? "Mark all mailed" : "Mark #{mailable_letters.size} pending letters mailed" %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue