Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
UX improvements for return authorizations & refund reasons screens
Damian Legawiecb13b081a4e2b
diff --git a/admin/app/views/spree/admin/refund_reasons/index.html.erb b/admin/app/views/spree/admin/refund_reasons/index.html.erbindex ee06f19980..9610170b3e 100644--- a/admin/app/views/spree/admin/refund_reasons/index.html.erb+++ b/admin/app/views/spree/admin/refund_reasons/index.html.erb@@ -11,21 +11,25 @@<tr data-hook="named_types_header"><th><%= Spree.t(:name) %></th><th><%= Spree.t(:status) %></th>+ <th><%= Spree.t(:mutable) %></th><th></th></tr></thead><tbody id="<%= plural_resource_name(Spree::RefundReason).to_s.parameterize.underscore %>"><% @collection.each do |refund_reason| %><tr id="<%= spree_dom_id refund_reason %>">- <td class="align-center">+ <td class="w-40 align-center"><%= refund_reason.name %></td>- <td class="align-center">+ <td class="w-20 align-center"><%= active_badge(refund_reason.active, label: Spree.t(refund_reason.active? ? :active : :inactive)) %></td>- <td class="actions">+ <td class="w-10 align-center">+ <%= active_badge(refund_reason.mutable) %>+ </td>+ <td class="actions w-10"><% if refund_reason.mutable? %>- <%= link_to_edit(refund_reason, no_text: true) if can? :edit, refund_reason %>+ <%= link_to_edit(refund_reason, no_text: true, data: { row_link_target: :link }) if can? :edit, refund_reason %><% end %></td></tr>diff --git a/admin/app/views/spree/admin/return_authorization_reasons/index.html.erb b/admin/app/views/spree/admin/return_authorization_reasons/index.html.erbindex 18f0a4e182..f5587f9f41 100644--- a/admin/app/views/spree/admin/return_authorization_reasons/index.html.erb+++ b/admin/app/views/spree/admin/return_authorization_reasons/index.html.erb@@ -16,16 +16,16 @@</thead><tbody id="<%= plural_resource_name(Spree::ReturnAuthorizationReason).to_s.parameterize.underscore %>"><% @collection.each do |return_authorization_reason| %>- <tr id="<%= spree_dom_id return_authorization_reason %>" data-hook="named_type_row">- <td class="align-center">+ <tr id="<%= spree_dom_id return_authorization_reason %>" data-controller="row-link">+ <td class="w-40 align-center cursor-pointer" data-action="click->row-link#openLink"><%= return_authorization_reason.name %></td>- <td class="align-center">+ <td class="w-20 align-center cursor-pointer" data-action="click->row-link#openLink"><%= active_badge(return_authorization_reason.active, label: Spree.t(return_authorization_reason.active? ? :active : :inactive)) %></td>- <td class="actions">+ <td class="actions w-10"><% if return_authorization_reason.mutable? %>- <%= link_to_edit(return_authorization_reason, no_text: true) if can? :edit, return_authorization_reason %>+ <%= link_to_edit(return_authorization_reason, no_text: true, data: { row_link_target: :link }) if can? :edit, return_authorization_reason %><% end %></td></tr>