mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-24 15:49:39 +02:00
Consolidate and simplify account pages (#2462)
* Remove ScrollFocusable * Consolidate and simplify account pages * Lint fixes * Fix tab param initialization * Remove stale files * Remove stale route, make accountable routes clearer
This commit is contained in:
parent
3eea5a9891
commit
8c97c9d31a
41 changed files with 252 additions and 269 deletions
|
@ -150,10 +150,9 @@ Rails.application.routes.draw do
|
|||
end
|
||||
end
|
||||
|
||||
resources :accounts, only: %i[index new], shallow: true do
|
||||
resources :accounts, only: %i[index new show destroy], shallow: true do
|
||||
member do
|
||||
post :sync
|
||||
get :chart
|
||||
get :sparkline
|
||||
patch :toggle_active
|
||||
end
|
||||
|
@ -161,17 +160,13 @@ Rails.application.routes.draw do
|
|||
|
||||
# Convenience routes for polymorphic paths
|
||||
# Example: account_path(Account.new(accountable: Depository.new)) => /depositories/123
|
||||
direct :account do |model, options|
|
||||
route_for model.accountable_name, model, options
|
||||
end
|
||||
|
||||
direct :edit_account do |model, options|
|
||||
route_for "edit_#{model.accountable_name}", model, options
|
||||
end
|
||||
|
||||
resources :depositories, except: :index
|
||||
resources :investments, except: :index
|
||||
resources :properties, except: :index do
|
||||
resources :depositories, only: %i[new create edit update]
|
||||
resources :investments, only: %i[new create edit update]
|
||||
resources :properties, only: %i[new create edit update] do
|
||||
member do
|
||||
get :balances
|
||||
patch :update_balances
|
||||
|
@ -180,12 +175,12 @@ Rails.application.routes.draw do
|
|||
patch :update_address
|
||||
end
|
||||
end
|
||||
resources :vehicles, except: :index
|
||||
resources :credit_cards, except: :index
|
||||
resources :loans, except: :index
|
||||
resources :cryptos, except: :index
|
||||
resources :other_assets, except: :index
|
||||
resources :other_liabilities, except: :index
|
||||
resources :vehicles, only: %i[new create edit update]
|
||||
resources :credit_cards, only: %i[new create edit update]
|
||||
resources :loans, only: %i[new create edit update]
|
||||
resources :cryptos, only: %i[new create edit update]
|
||||
resources :other_assets, only: %i[new create edit update]
|
||||
resources :other_liabilities, only: %i[new create edit update]
|
||||
|
||||
resources :securities, only: :index
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue