Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove resend button on the orders edit page #5893

Merged
merged 2 commits into from Aug 31, 2020
Merged

Remove resend button on the orders edit page #5893

merged 2 commits into from Aug 31, 2020

Conversation

arku
Copy link
Contributor

@arku arku commented Aug 11, 2020

What? Why?

Fixes #5850

  • Removes as the resend button link as it already exists on the Actions dropdown.
  • Also fixes the translation missing: en.order_email_resent issue

Changelog Category: Removed

What should we test?

Log in as an admin and go to an order's edit page. There shouldn't be a Resend button on the right.

Screenshot

image

Copy link
Contributor

@Matt-Yorkley Matt-Yorkley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Copy link
Member

@mkllnk mkllnk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! 💐

@filipefurtad0 filipefurtad0 self-assigned this Aug 26, 2020
@filipefurtad0 filipefurtad0 added the pr-staged-uk staging.openfoodnetwork.org.uk label Aug 26, 2020
@filipefurtad0
Copy link
Contributor

filipefurtad0 commented Aug 26, 2020

Hi @arku!
Welcome 🎉

This looks great,

Before the PR:
image

After the PR:
image

I also triggered the [Resend] email, to check if the update on the "translation missing: en.order_email_resent" issue caused any troubles, but it looks good; translations should now be able to appear on this email.

So, this looks ready to go! - however, I noticed to have performed the test with conflicts to be resolved. I'm sending to ready to go but adding the feedback label, just to have a quick second look, after this is ok - pinging the reviewers @Matt-Yorkley and @mkllnk - Thanks!

@filipefurtad0 filipefurtad0 added feedback-needed and removed pr-staged-uk staging.openfoodnetwork.org.uk labels Aug 26, 2020
@sauloperez
Copy link
Contributor

I solved the conflict but as expected I can't push to your fork @arku. Can you fix it yourself? I believe app/views/spree/admin/orders/edit.html.haml should have the following contents

= csrf_meta_tags
- content_for :page_actions do
  - if can?(:fire, @order)
    %li= event_links
  = render partial: 'spree/admin/shared/order_links'
  - if can?(:admin, Spree::Order)
    %li= button_link_to t(:back_to_orders_list), admin_orders_path, :icon => 'icon-arrow-left'

= render partial: "spree/admin/shared/order_page_title"
= render partial: "spree/admin/shared/order_tabs", locals: { current: 'Order Details' }

%div{"data-hook" => "admin_order_edit_header"}
  -# Suppress errors when manually creating a new order - needs to proceed to edit page
  -# without having line items (which otherwise gives a validation error)
  - unless params["suppress_error_msg"]
    = render partial: "spree/shared/error_messages", :locals => { :target => @order }

  = admin_inject_shops(module: 'admin.orders')
  = admin_inject_order_cycles
  %div{"ng-app" => "admin.orders", "ng-controller" => "orderCtrl", "ofn-distributor-id" => @order.distributor_id, "ofn-order-cycle-id" => @order.order_cycle_id}

    = render :partial => 'add_product' if can?(:update, @order)

    - if @order.line_items.empty?
      .no-objects-found
        = Spree.t(:your_order_is_empty_add_product)

    %div{"data-hook" => "admin_order_edit_form"}
      = render :partial => 'form', :locals => { :order => @order }

@arku
Copy link
Contributor Author

arku commented Aug 30, 2020

@filipefurtad0 @sauloperez Done 🙂

@mkllnk mkllnk merged commit a029a86 into openfoodfoundation:master Aug 31, 2020
@arku arku deleted the chore/resend-button-removal branch September 7, 2020 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove obsolete "Resend" button (edit order page)
5 participants