mirror of
https://github.com/System-End/theseus.git
synced 2026-04-19 22:15:09 +00:00
printed??
This commit is contained in:
parent
e606cdef08
commit
62cc208dd0
1 changed files with 3 additions and 2 deletions
|
|
@ -125,12 +125,13 @@
|
|||
<%= render 'shared/instant_print_window', url: rails_blob_path(@batch.pdf_label, disposition: 'inline') unless @batch.letters.all?(&:mailed?) %>
|
||||
<% if @batch.processed? %>
|
||||
<div class="mt-4">
|
||||
<% if @batch.letters.any? && @batch.letters.all?(&:pending?) %>
|
||||
<% printable_letters = @batch.letters.select(&:may_mark_printed?) %>
|
||||
<% if printable_letters.any? %>
|
||||
<%= button_to mark_printed_letter_batch_path(@batch), method: :post, class: "btn btn-block success mb-2", id: 'mark_printed' 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="M17 17h2a2 2 0 002-2v-4a2 2 0 00-2-2H5a2 2 0 00-2 2v4a2 2 0 002 2h2m2 4h6a2 2 0 002-2v-4a2 2 0 00-2-2H9a2 2 0 00-2 2v4a2 2 0 002 2zm8-12V5a2 2 0 00-2-2H9a2 2 0 00-2 2v4h10z"/>
|
||||
</svg>
|
||||
Mark All Printed
|
||||
<%= printable_letters.size == @batch.letters.size ? "Mark all printed" : "Mark #{printable_letters.size} pending letters printed" %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% mailable_letters = @batch.letters.select(&:may_mark_mailed?) %>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue