1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-24 07:39:39 +02:00

Vehicle view (#1117)

This commit is contained in:
Zach Gollwitzer 2024-08-23 09:33:42 -04:00 committed by GitHub
parent e856691c86
commit 359bceb58e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 259 additions and 8 deletions

View file

@ -29,6 +29,8 @@ module AccountsHelper
case account.accountable_type
when "Property"
properties_path
when "Vehicle"
vehicles_path
else
accounts_path
end
@ -38,6 +40,8 @@ module AccountsHelper
case account.accountable_type
when "Property"
property_path(account)
when "Vehicle"
vehicle_path(account)
else
account_path(account)
end
@ -51,7 +55,7 @@ module AccountsHelper
transactions_tab = { key: "transactions", label: t("accounts.show.transactions"), path: account_path(account, tab: "transactions"), route: account_transactions_path(account) }
trades_tab = { key: "trades", label: t("accounts.show.trades"), path: account_path(account, tab: "trades"), route: account_trades_path(account) }
return [ overview_tab, value_tab ] if account.property?
return [ overview_tab, value_tab ] if account.property? || account.vehicle?
return [ holdings_tab, cash_tab, trades_tab ] if account.investment?
[ value_tab, transactions_tab ]