%# Redesigned Portfolio Page %>
Trading is currently disabled for your classroom.
You cannot place buy or sell orders at this time. Please contact your teacher for more information.
| Current Holdings | Qty. | Last Price | Change | Total Return | |
|---|---|---|---|---|---|
|
<% if File.exist?("app/assets/images/#{logo_path}") %>
<%= image_tag asset_path(logo_path),
class: "w-10 h-10 rounded-lg flex-shrink-0",
alt: "#{position.stock_ticker} logo",
loading: "lazy" %>
<% end %>
<%= position.stock_ticker %>
|
<%= shares %> | <%= number_to_currency(price) %> | <% if change_amount >= 0 %>+<% end %> <%= number_to_currency(change_amount) %> | <% if total_return_amount >= 0 %>+<% end %> <%= number_to_currency(total_return_amount) %> | <% if current_user.student? %> <%= link_to "Trade", stocks_path, class: "inline-flex items-center justify-center rounded-full bg-sky-800 text-white px-6 py-2 text-xs sm:text-sm font-medium shadow hover:bg-sky-700 focus:outline-none focus:ring-2 focus:ring-sky-500 focus:ring-offset-1 transition-colors" %> <% else %> Trade <% end %> |