solidusio/solidus

[Admin] Refactor "accounts/show" view into a separate component

rainerdema opened this issue · 2 comments

In relation to this comment, it has been suggested that the "account/show" view could be refactored into a separate component.

The goal of this issue is to create a new component, accounts/show, that will encapsulate the existing functionality of the "account/show" view.

The resulting implementation should allow the "account/show" view to be rendered as follows:

# admin/app/views/solidus_admin/accounts/show.html.erb
<%= render component('accounts/show').new(
      email: current_solidus_admin_user.email,
      logout_path: solidus_admin_logout_path,
      logout_method: solidus_admin_logout_method,
    )
%>

@rainerdema I changed the account link to point toward the legacy edit user link, I think we can postpone this until we have designs, wdyt?

We'll tackle the account section later, for now we turned the page into a redirect to admin_user_edit_path