mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-02 20:15:22 +02:00
Account Activity View + Account Forms (#1406)
* Remove balance mode, sketch out refactor * Activity view checkpoint * Entry partials, checkpoint * Finish txn partial * Give entries context when editing for different turbo responses * Calculate change of balance for each entry * Account tabs consolidation * Translations, linting, brakeman updates * Account actions concern * Finalize forms, get account system tests passing * Get tests passing * Lint, rubocop, schema updates * Improve routing and stream responses * Fix broken routes * Add import option for adding accounts * Fix system test * Fix test specificity * Fix sparklines * Improve account redirects
This commit is contained in:
parent
12e4f1067d
commit
65db49273c
216 changed files with 2043 additions and 1620 deletions
|
@ -34,6 +34,7 @@ class Demo::Generator
|
|||
create_investment_account!
|
||||
create_house_and_mortgage!
|
||||
create_car_and_loan!
|
||||
create_other_accounts!
|
||||
|
||||
puts "accounts created"
|
||||
puts "Demo data loaded successfully!"
|
||||
|
@ -50,7 +51,7 @@ class Demo::Generator
|
|||
family = Family.find_by(id: family_id)
|
||||
family.destroy! if family
|
||||
|
||||
Family.create!(id: family_id, name: "Demo Family").tap(&:reload)
|
||||
Family.create!(id: family_id, name: "Demo Family", stripe_subscription_status: "active").tap(&:reload)
|
||||
end
|
||||
|
||||
def clear_data!
|
||||
|
@ -273,6 +274,20 @@ class Demo::Generator
|
|||
currency: "USD"
|
||||
end
|
||||
|
||||
def create_other_accounts!
|
||||
family.accounts.create! \
|
||||
accountable: OtherAsset.new,
|
||||
name: "Other Asset",
|
||||
balance: 10000,
|
||||
currency: "USD"
|
||||
|
||||
family.accounts.create! \
|
||||
accountable: OtherLiability.new,
|
||||
name: "Other Liability",
|
||||
balance: 5000,
|
||||
currency: "USD"
|
||||
end
|
||||
|
||||
def create_transaction!(attributes = {})
|
||||
entry_attributes = attributes.except(:category, :tags, :merchant)
|
||||
transaction_attributes = attributes.slice(:category, :tags, :merchant)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue