Merge pull request #7265 from andrewpbrett/freeze-adjustments

Don't allow edits to adjustments for canceled orders
This commit is contained in:
Andy Brett
2021-04-06 10:56:27 -07:00
committed by GitHub
3 changed files with 20 additions and 4 deletions

View File

@@ -17,6 +17,7 @@
%td.align-center.label= adjustment.label
%td.align-center.amount= adjustment.display_amount.to_html
%td.align-center.included-tax= adjustment.display_included_tax.to_html
%td.actions
= link_to_edit adjustment, no_text: true
= link_to_delete adjustment, no_text: true
- unless @order.canceled?
%td.actions
= link_to_edit adjustment, no_text: true
= link_to_delete adjustment, no_text: true

View File

@@ -6,7 +6,8 @@
= t(:adjustments)
- content_for :page_actions do
%li= button_link_to t(:new_adjustment), new_admin_order_adjustment_url(@order), :icon => 'icon-plus'
- unless @order.canceled?
%li= button_link_to t(:new_adjustment), new_admin_order_adjustment_url(@order), :icon => 'icon-plus'
= render partial: 'spree/admin/shared/order_links'
%li= button_link_to t(:back_to_orders_list), admin_orders_path, :icon => 'icon-arrow-left'