Skip to content

Commit 44f885b

Browse files
committed
[wip] Add orders/show/shipment component
1 parent 093ca3b commit 44f885b

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

admin/app/components/solidus_admin/orders/show/shipment/component.html.erb

+16-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
<section class="border-gray-100 border-t w-full first-of-type:border-t-0 p-6">
66
<h2>
77
<span class="text-xl">
8-
#<%= @index %>: <%= @shipment.number %> from <%= @shipment.stock_location.name %> <%= render component('ui/badge').new(name: @shipment.state.titleize) %>
8+
<%= t('.title', index: @index, number: @shipment.number, location: @shipment.stock_location.name) %>
9+
<%= render component('ui/badge').new(name: @shipment.state.titleize) %>
910
</span>
1011
</h2>
1112
</section>
@@ -16,10 +17,20 @@
1617
<table class="table-auto w-full">
1718
<thead>
1819
<tr>
19-
<th class="text-left body-small-bold text-gray-800 bg-gray-15 px-6 py-3 leading-none"><%= t(".product") %></th>
20-
<th class="text-left body-small-bold text-gray-800 bg-gray-15 px-6 py-3 leading-none w-16"><%= t(".quantity") %></th>
21-
<th class="text-left body-small-bold text-gray-800 bg-gray-15 px-6 py-3 leading-none w-16 whitespace-nowrap"><%= t(".total") %></th>
22-
<th class="text-left body-small-bold text-gray-800 bg-gray-15 px-6 py-3 leading-none w-16"><span class="sr-only"><%= t(".actions") %></span></th>
20+
<th class="text-left body-small-bold text-gray-800 bg-gray-15 px-6 py-3 leading-none">
21+
<%= t(".product") %>
22+
</th>
23+
<th class="text-left body-small-bold text-gray-800 bg-gray-15 px-6 py-3 leading-none w-16">
24+
<%= t(".quantity") %>
25+
</th>
26+
<th class="text-left body-small-bold text-gray-800 bg-gray-15 px-6 py-3 leading-none w-16 whitespace-nowrap">
27+
<%= t(".total") %>
28+
</th>
29+
<th class="text-left body-small-bold text-gray-800 bg-gray-15 px-6 py-3 leading-none w-16">
30+
<span class="sr-only">
31+
<%= t(".actions") %>
32+
</span>
33+
</th>
2334
</tr>
2435
</thead>
2536
<tbody>

admin/app/components/solidus_admin/orders/show/shipment/component.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
en:
2+
title: "#%{index}: %{number} from %{location}"
23
product: Product
34
quantity: Quantity
45
total: Total Price

0 commit comments

Comments
 (0)