Save the timestamp of the last mail to supplier and confirm resending it

This commit is contained in:
Patrick Gansterer 2017-10-11 15:53:58 +02:00
parent 9a3ab1458e
commit f509f85327
6 changed files with 13 additions and 2 deletions

View file

@ -87,7 +87,9 @@
= link_to t('.stock_order'), new_group_order_path(:order_id => @order.id, :stock_order => true), class: 'btn'
= link_to t('ui.edit'), edit_order_path(@order), class: 'btn'
- elsif not @order.closed? and not @order.stockit?
= link_to t('.send_to_supplier'), send_result_to_supplier_order_path(@order), method: :post, class: 'btn btn-primary'
= link_to t('.send_to_supplier'), send_result_to_supplier_order_path(@order), method: :post,
class: "btn#{' btn-primary' unless @order.last_sent_mail}",
data: {confirm: @order.last_sent_mail && t('.confirm_send_to_supplier', when: format_time(@order.last_sent_mail)) }
= receive_button @order
- unless @order.closed?
= link_to t('ui.delete'), @order, data: {confirm: t('.confirm_delete')}, method: :delete,