The personal finance app for everyone
Rough-in on account show pages
Josh Pigford4d5d35b277ce
diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rbindex 0dc0d460..e1c4d234 100644--- a/app/controllers/accounts_controller.rb+++ b/app/controllers/accounts_controller.rb@@ -9,6 +9,7 @@ class AccountsController < ApplicationControllerenddef show+ @account = Current.family.accounts.find(params[:id])enddef creatediff --git a/app/views/accounts/_account_list.html.erb b/app/views/accounts/_account_list.html.erbindex 2e73247a..96a33999 100644--- a/app/views/accounts/_account_list.html.erb+++ b/app/views/accounts/_account_list.html.erb@@ -12,7 +12,7 @@</summary><% accounts.each do |account| %>- <div class="flex items-center w-full gap-3 px-2 py-3 mb-1">+ <%= link_to account_path(account), class: "flex items-center w-full gap-3 px-2 py-3 mb-1 hover:bg-[#f2f2f2] rounded-[10px]" do %><div><p class="font-medium"><%= account.name %></p><% if account.subtype %>@@ -20,7 +20,7 @@<% end %></div><p class="ml-auto font-medium"><%= format_currency account.converted_balance %></p>- </div>+ <% end %><% end %><%= link_to new_account_path(step: 'method', type: type.name.demodulize), class: "flex items-center gap-4 px-2 py-3 mb-1 text-[#737373] text-sm font-medium rounded-[10px] hover:bg-[#f2f2f2]", data: { turbo_frame: "modal" } do %>diff --git a/app/views/accounts/show.html.erb b/app/views/accounts/show.html.erbindex 9942d261..fee2bfaf 100644--- a/app/views/accounts/show.html.erb+++ b/app/views/accounts/show.html.erb@@ -1,4 +1,2 @@-<div>- <h1 class="font-bold text-4xl">Accounts#show</h1>- <p>Find me in app/views/accounts/show.html.erb</p>-</div>+<h2 class="text-2xl font-semibold font-display"><%= @account.name %></h2>+diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erbindex 782ae477..f9cb8e4b 100644--- a/app/views/layouts/application.html.erb+++ b/app/views/layouts/application.html.erb@@ -72,7 +72,7 @@<%= t('.accounts') %><% end %><%= link_to new_account_path, class: 'block hover:bg-gray-100 p-2 text-sm font-semibold text-gray-900 flex items-center rounded', title: t('.new_account'), data: { turbo_frame: "modal" } do %>- <%= inline_svg_tag('icon-add.svg', class: 'text-gray-500 fill-current') %>+ <%= lucide_icon("plus", class: "w-5 h-5 text-gray-500") %><% end %></div>