- <%= 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" %>
-
+
+
+ <%= 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" %>
+
+ <%= 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 %>
+ <% if @account.current_holdings.any? %>
+ <%= render partial: "holdings/holding",
+ collection: @account.current_holdings,
+ spacer_template: "shared/ruler" %>
+ <% end %>
+
diff --git a/app/views/trades/_trade.html.erb b/app/views/trades/_trade.html.erb
index ff5ab18cb..30a38226b 100644
--- a/app/views/trades/_trade.html.erb
+++ b/app/views/trades/_trade.html.erb
@@ -7,19 +7,30 @@
text-sm font-medium p-4">
<%= check_box_tag dom_id(entry, "selection"),
- class: "checkbox checkbox--light",
- data: { id: entry.id, "bulk-select-target": "row", action: "bulk-select#toggleRowSelection" } %>
+ class: "checkbox checkbox--light hidden lg:block",
+ data: {
+ id: entry.id,
+ "bulk-select-target": "row",
+ action: "bulk-select#toggleRowSelection",
+ checkbox_toggle_target: "selectionEntry"
+ } %>
- <%= tag.div class: ["flex items-center gap-2"] do %>
- <%= render DS::FilledIcon.new(
- variant: :text,
- text: entry.name,
- size: "sm",
- rounded: true
- ) %>
+ <%= tag.div class: ["flex items-center gap-2 min-w-0"] do %>
+
+ <%= render DS::FilledIcon.new(
+ variant: :text,
+ text: entry.name,
+ size: "sm",
+ rounded: true
+ ) %>
+
-
+
+ <%= render "categories/badge_mobile", category: trade.category || trade_category %>
+
+
+
<%= link_to entry.name,
entry_path(entry),
data: { turbo_frame: "drawer", turbo_prefetch: false },
@@ -29,11 +40,11 @@
-
+
<%= render "categories/badge", category: trade.category || trade_category %>
-
+
<%= content_tag :p,
format_money(-entry.amount_money),
class: ["text-green-600": entry.amount.negative?] %>