<%= turbo_frame_tag dom_id(@account, "holdings") do %>
<%= tag.h2 t(".holdings"), class: "font-medium text-lg" %> <%= link_to new_trade_path(account_id: @account.id), id: dom_id(@account, "new_trade"), data: { turbo_frame: :modal }, class: "flex gap-1 font-medium items-center bg-gray-50 theme-dark:bg-gray-700 hover:bg-gray-100 theme-dark:hover:bg-gray-600 text-primary p-2 rounded-lg" do %> <%= icon("plus", color: "current") %> <%= tag.span t(".new_holding"), class: "text-sm" %> <% end %>
<%= tag.p t(".name"), class: "col-span-4" %> <%= tag.p t(".weight"), class: "col-span-2 justify-self-end" %> <%= tag.p t(".average_cost"), class: "col-span-2 justify-self-end" %> <%= tag.p t(".holdings"), class: "col-span-2 justify-self-end" %> <%= tag.p t(".return"), class: "col-span-2 justify-self-end" %>
<%= render "holdings/cash", account: @account %> <%= render "shared/ruler" %> <% if @account.current_holdings.any? %> <%= render partial: "holdings/holding", collection: @account.current_holdings, spacer_template: "shared/ruler" %> <% end %>
<% end %>