Skip to content

Commit 9bfdb4e

Browse files
committed
Make "See all" a link to filtered transactions
1 parent 49b3d65 commit 9bfdb4e

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

app/views/budgets/_budget.html.erb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,12 @@
7373
<div class="flex justify-between items-baseline mb-4">
7474
<h3 class="color-gray-900 font-bold">Latest Spending</h3>
7575
<div class="flex justify-between items-baseline gap-3">
76-
<span class="color-gray-500 text-sm hover:underline cursor-pointer">See all</span>
76+
<%= link_to "See all",
77+
transactions_path(category: budget.category),
78+
class: "color-gray-500 text-sm hover:underline cursor-pointer",
79+
data: {
80+
"turbo-frame": "_top",
81+
} %>
7782
<span>
7883
<%= inline_svg_tag "icon-caret-right.svg", class: "inline-block size-3" %>
7984
</span>

app/views/budgets/index.html.erb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
id="notice"
2121
><%= notice %></p>
2222
<% end %>
23+
24+
<article class="bg-white rounded-lg px-5 py-7 space-y-5">
25+
26+
</article>
2327

2428
<div>
2529
<turbo-frame id="budgets" class="grid grid-cols-1 lg:grid-cols-2 gap-6">

0 commit comments

Comments
 (0)