mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-25 20:46:48 +00:00
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:
@@ -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')
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user