Skip to content

armgit / spree

Public Imported from GitHub
0

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.

Admin: Zones & Tax Categories UX improvements

Damian Legawiecdbd5472f8551
diff --git a/admin/app/views/spree/admin/tax_categories/_tax_category.html.erb b/admin/app/views/spree/admin/tax_categories/_tax_category.html.erb
index 5d84919c8f..ae36b1232b 100644
--- a/admin/app/views/spree/admin/tax_categories/_tax_category.html.erb
+++ b/admin/app/views/spree/admin/tax_categories/_tax_category.html.erb
@@ -1,9 +1,13 @@
<tr id="<%= spree_dom_id tax_category %>" data-controller="row-link" class="cursor-pointer">
- <td data-action="click->row-link#openLink"><%= tax_category.name %></td>
- <td data-action="click->row-link#openLink"><%= tax_category.tax_code %></td>
- <td data-action="click->row-link#openLink"><%= tax_category.description %></td>
- <td data-action="click->row-link#openLink"><%= active_badge(tax_category.is_default?) %></td>
- <td class="actions">
+ <td class="w-20" data-action="click->row-link#openLink"><%= tax_category.name %></td>
+ <td class="w-20" data-action="click->row-link#openLink">
+ <% if tax_category.tax_code.present? %>
+ <code><%= tax_category.tax_code %></code>
+ <% end %>
+ </td>
+ <td class="w-40" data-action="click->row-link#openLink"><%= tax_category.description %></td>
+ <td class="w-10" data-action="click->row-link#openLink"><%= active_badge(tax_category.is_default?) %></td>
+ <td class="w-10 actions">
<%= link_to_edit(tax_category, data: { row_link_target: :link }) if can? :edit, tax_category %>
</td>
</tr>
diff --git a/admin/app/views/spree/admin/zones/index.html.erb b/admin/app/views/spree/admin/zones/index.html.erb
index e98569d581..fcbe57381c 100644
--- a/admin/app/views/spree/admin/zones/index.html.erb
+++ b/admin/app/views/spree/admin/zones/index.html.erb
@@ -1,19 +1,14 @@
-<%= content_for(:title) do %>
- Markets
-<% end %>
-
-
<%= content_for(:page_title) do %>
- Markets
+ <%= Spree.t(:zones) %>
<% end %>
<% content_for :page_actions do %>
- <%= button_link_to Spree.t(:new_market), new_object_url, class: "btn-primary", icon: 'plus', id: 'admin_new_zone_link' %>
+ <%= button_link_to Spree.t(:new_zone), new_object_url, class: "btn-primary", icon: 'plus' %>
<% end if can? :create, Spree::Zone %>
<% content_for :page_alerts do %>
<div class="alert alert-info">
- Markets are geographical groupings, they represent collections of either states or countries.
+ Zones are geographical groupings, they represent collections of either states or countries.
</div>
<% end %>
@@ -33,10 +28,10 @@
<tbody>
<% @zones.each do |zone| %>
<tr id="<%= spree_dom_id zone %>" class="cursor-pointer" data-controller="row-link">
- <td data-action="click->row-link#openLink"><%= zone.name %></td>
- <td data-action="click->row-link#openLink"><%= zone.description %></td>
- <td data-action="click->row-link#openLink"><%= active_badge(zone.default_tax?) %></td>
- <td class="actions">
+ <td class="w-25" data-action="click->row-link#openLink"><%= zone.name %></td>
+ <td class="w-40 text-muted text-wrap" data-action="click->row-link#openLink"><%= zone.description %></td>
+ <td class="w-10" data-action="click->row-link#openLink"><%= active_badge(zone.default_tax?) %></td>
+ <td class="w-10 actions">
<%= link_to_edit(zone, data: { row_link_target: :link }) if can? :edit, zone %>
</td>
</tr>