mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-23 15:19:38 +02:00
Rework account views and addition flow (#1324)
* Move accountable partials * Split accountables into separate view partials * Fix test * Add form to permitted partials * Fix failing system tests * Update new account modal views * New sync algorithm implementation * Update account system test assertions to match new behavior * Fix off by 1 date error * Revert new balance sync algorithm * Add missing account overviews
This commit is contained in:
parent
c7c281073f
commit
e8e100e1d8
88 changed files with 763 additions and 526 deletions
|
@ -1,10 +0,0 @@
|
|||
class Account::LogosController < ApplicationController
|
||||
def show
|
||||
@account = Current.family.accounts.find(params[:account_id])
|
||||
render_placeholder
|
||||
end
|
||||
|
||||
def render_placeholder
|
||||
render formats: :svg
|
||||
end
|
||||
end
|
|
@ -23,11 +23,8 @@ class AccountsController < ApplicationController
|
|||
end
|
||||
|
||||
def new
|
||||
@account = Account.new(
|
||||
accountable: Accountable.from_type(params[:type])&.new,
|
||||
currency: Current.family.currency
|
||||
)
|
||||
|
||||
@account = Account.new(currency: Current.family.currency)
|
||||
@account.accountable = Accountable.from_type(params[:type])&.new if params[:type].present?
|
||||
@account.accountable.address = Address.new if @account.accountable.is_a?(Property)
|
||||
|
||||
if params[:institution_id]
|
||||
|
@ -36,8 +33,6 @@ class AccountsController < ApplicationController
|
|||
end
|
||||
|
||||
def show
|
||||
@series = @account.series(period: @period)
|
||||
@trend = @series.trend
|
||||
end
|
||||
|
||||
def edit
|
||||
|
@ -57,6 +52,7 @@ class AccountsController < ApplicationController
|
|||
start_date: account_params[:start_date],
|
||||
start_balance: account_params[:start_balance]
|
||||
@account.sync_later
|
||||
|
||||
redirect_back_or_to account_path(@account), notice: t(".success")
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue