mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-24 23:59:40 +02:00
Add accounts management list (#522)
* Add accounts management * Normalize i18n file * Get turbo streams working * Ignore disabled accounts in calculations * Add empty state
This commit is contained in:
parent
0e77bab00b
commit
ad7136cb63
12 changed files with 164 additions and 25 deletions
5
db/migrate/20240306193345_add_is_active_to_account.rb
Normal file
5
db/migrate/20240306193345_add_is_active_to_account.rb
Normal file
|
@ -0,0 +1,5 @@
|
|||
class AddIsActiveToAccount < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
add_column :accounts, :is_active, :boolean, default: true, null: false
|
||||
end
|
||||
end
|
5
db/schema.rb
generated
5
db/schema.rb
generated
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[7.2].define(version: 2024_03_02_145715) do
|
||||
ActiveRecord::Schema[7.2].define(version: 2024_03_06_193345) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "pgcrypto"
|
||||
enable_extension "plpgsql"
|
||||
|
@ -79,7 +79,8 @@ ActiveRecord::Schema[7.2].define(version: 2024_03_02_145715) do
|
|||
t.decimal "converted_balance", precision: 19, scale: 4, default: "0.0"
|
||||
t.string "converted_currency", default: "USD"
|
||||
t.string "status", default: "OK"
|
||||
t.virtual "classification", type: :string, as: "\nCASE\n WHEN ((accountable_type)::text = ANY ((ARRAY['Account::Loan'::character varying, 'Account::Credit'::character varying, 'Account::OtherLiability'::character varying])::text[])) THEN 'liability'::text\n ELSE 'asset'::text\nEND", stored: true
|
||||
t.virtual "classification", type: :string, as: "\nCASE\n WHEN ((accountable_type)::text = ANY (ARRAY[('Account::Loan'::character varying)::text, ('Account::Credit'::character varying)::text, ('Account::OtherLiability'::character varying)::text])) THEN 'liability'::text\n ELSE 'asset'::text\nEND", stored: true
|
||||
t.boolean "is_active", default: true, null: false
|
||||
t.index ["accountable_type"], name: "index_accounts_on_accountable_type"
|
||||
t.index ["family_id"], name: "index_accounts_on_family_id"
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue