Remove associated adjustments radio button

Removes the 'Associated Adjustment Closed' options from the order edit
page (/admin/orders/XXXXX/edit).
This commit is contained in:
Arthur Vieira
2022-05-19 16:03:23 -03:00
parent b7cf397e15
commit 0fb9cc0f2a
2 changed files with 12 additions and 12 deletions

View File

@@ -40,18 +40,6 @@
= label_tag 'selected_shipping_rate_id', Spree.t(:shipping_method)
= select_tag :selected_shipping_rate_id, options_for_select(shipment.shipping_rates.backend.map { |sr| ["#{sr.name} #{sr.display_price}", sr.id] }, shipment.selected_shipping_rate_id), { :class => 'select2 fullwidth', :data => { 'shipment-number' => shipment.number } }
- if shipment.fee_adjustment&.closed?
%div.field.omega.four.columns
%label
= Spree.t(:associated_adjustment_closed)
%ul
%li
= radio_button_tag :open_adjustment, 'yes', false, :data => { 'shipment-number' => shipment.number }
= "Yes"
%li
= radio_button_tag :open_adjustment, 'no', true, :data => {'shipment-number' => shipment.number }
= "No"
%td.actions
- if can? :update, shipment
= link_to '', '', :class => 'save-method icon_link icon-ok no-text with-tip', :data => { 'shipment-number' => shipment.number, :action => 'save' }, title: I18n.t('actions.save')

View File

@@ -59,6 +59,12 @@ describe "spree/admin/orders/edit.html.haml" do
text: out_of_stock_line_item.variant.display_name
end
end
it "doesn't display closed associated adjustments" do
render
expect(rendered).to_not have_content "Associated adjustment closed"
end
end
context "when order is incomplete" do
@@ -93,5 +99,11 @@ describe "spree/admin/orders/edit.html.haml" do
expect(rendered).to_not have_content "Out of Stock"
end
end
it "doesn't display closed associated adjustments" do
render
expect(rendered).to_not have_content "Associated adjustment closed"
end
end
end