Skip to content

Commit

Permalink
shipping info
Browse files Browse the repository at this point in the history
  • Loading branch information
michelson committed Aug 12, 2024
1 parent 177c0c9 commit 05ca1e3
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/tracks_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def track_bulk_params
:enable_label,
:step,
audio: [], tracks_attributes: [
:audio, :cover, :title, :tags, :description
:audio, :cover, :title, :description, :private, tags: []
]
)
end
Expand Down
30 changes: 30 additions & 0 deletions app/views/sales/product_show.erb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,36 @@
</dd>
</div>

<% if @product_item.shipping_address.present? %>
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
<dt class="text-sm font-medium text-muted">Shipping Address</dt>
<dd class="mt-1 text-sm text-default sm:mt-0 sm:col-span-2">
<ul class="border border-subtle rounded-md divide-y divide-subtle">

<li class="pl-3 pr-4 py-3 flex items-center justify-between text-sm">
<div class="w-0 flex-1 flex items-center">
<span class="ml-2 flex-1 w-0 truncate">
Name: <%= @product_item.shipping_name %>
</span>
</div>
</li>

<% @product_item.shipping_address.each do |key, value| %>
<% if value.present? %>
<li class="pl-3 pr-4 py-3 flex items-center justify-between text-sm">
<div class="w-0 flex-1 flex items-center">
<span class="ml-2 flex-1 w-0 truncate">
<%= key.titleize %>: <%= value %>
</span>
</div>
</li>
<% end %>
<% end %>
</ul>
</dd>
</div>
<% end %>

<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
<dt class="text-sm font-medium text-muted">Payment Status</dt>
<dd class="mt-1 text-sm text-default sm:mt-0 sm:col-span-2">
Expand Down

0 comments on commit 05ca1e3

Please sign in to comment.