<% if notice.present? %>

<%= notice %>

<% end %> <% if current_user.student? && !current_user.classroom&.trading_enabled? %>

Trading is currently disabled for your classroom.

You cannot place buy or sell orders at this time. Please contact your teacher for more information.

<% end %>

Trading Floor

<% if policy(Stock).show_holdings? || (current_user.present? && current_user.student?) %>
<%= render 'shared/earnings_to_invest_card' %>
<% end %>
<%= render "stocks/stocks_table", title: "Active Stocks", stocks: @stocks.active %> <%= render "stocks/stocks_table", title: "Archived Stocks", stocks: @stocks.archived %>