spree-contrib/spree_print_invoice

View on GitHub
app/views/spree/admin/orders/_print_invoice_order_tab_links.html.erb

Summary

Maintainability
Test Coverage
<% if can? :show, Spree::Order %>
  <% if @order && @order.completed_at? %>
    <li data-hook="admin_order_tabs_bookkeeping_documents">
      <%=
        link_to_with_icon 'file.svg',
                          Spree.t(:documents, scope: [:print_invoice]),
                          spree.admin_order_bookkeeping_documents_path(@order),
                          { class: "nav-link #{'active' if current == :documents}" }
      %>
    </li>
  <% end %>
<% end %>