shipment-viewer/app/views/_shipment.erb
2025-02-07 18:11:57 -05:00

47 lines
No EOL
1.5 KiB
Text
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div class="card">
<h4 style="display: inline-block"><%= shipment.icon %> <%= shipment.title_text %></h4> <span style="float: right"><%= shipment.status_icon %></span>
<hr/>
📝 <i><%= shipment.type_text %></i><br/>
📨 <%= shipment.status_text %>
<% if shipment["Warehouse-Service"] %>
<br>
🚚 <%= shipment["WarehouseService"] %>
<% end %>
<% if shipment.tracking_number %>
<br/>
<% if shipment.tracking_link %>
🔗 <%= external_link(shipment.tracking_number, shipment.tracking_link) %>
<% else %>
🔢 <%= shipment.tracking_number %>
<% end %>
<% end %>
<% if shipment.description %>
<% if shipment.description.is_a? Array %>
<br/><b>🗃 Contents:</b>
<ul>
<% shipment.description.each do |item| %>
<li><%= item %></li>
<% end %>
</ul>
<% else %>
<br/>
🗃️ <b>Description:</b> <%= shipment.description %>
<% end %>
<% end %>
<br/>
<% if @show_ids %>
<br/>
👀 <span class="internal">Airtable: <%= external_link(shipment.source_id, shipment.source_url) %></span>
<% end %>
<br/><span>📅 Created on <%= shipment.date&.[](..9) || '??' %></span>
<% if @internal and shipment.internal_info_partial %>
<% ii = erb shipment.internal_info_partial, locals: { shipment: } %>
<% if ii.present? %>
<br/>
<div class="internal" style="padding: 5px">
<b>🤫 internal info:</b><br/>
<%= ii %>
</div>
<% end %>
<% end %>
</div>