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

Add Transaction Merchant management (#686)

* Add basid crud for merchant management

* Tweak UI and add localization

* Fix lint

* Add filtering by merchant

* Add tests

* Add stimulus controller to update avatar in merchant form

* Add line between merchant rows

* Change default merchant color

* Cleanup
This commit is contained in:
Jakub Kottnauer 2024-04-29 21:17:28 +02:00 committed by GitHub
parent 7f491f5064
commit 9549182462
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
27 changed files with 363 additions and 18 deletions

15
db/schema.rb generated
View file

@ -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_04_25_000110) do
ActiveRecord::Schema[7.2].define(version: 2024_04_26_191312) do
# These are extensions that must be enabled in order to support this database
enable_extension "pgcrypto"
enable_extension "plpgsql"
@ -219,6 +219,15 @@ ActiveRecord::Schema[7.2].define(version: 2024_04_25_000110) do
t.index ["family_id"], name: "index_transaction_categories_on_family_id"
end
create_table "transaction_merchants", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
t.string "name", null: false
t.string "color", default: "#e99537", null: false
t.uuid "family_id", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["family_id"], name: "index_transaction_merchants_on_family_id"
end
create_table "transactions", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
t.string "name"
t.date "date", null: false
@ -230,8 +239,10 @@ ActiveRecord::Schema[7.2].define(version: 2024_04_25_000110) do
t.uuid "category_id"
t.boolean "excluded", default: false
t.text "notes"
t.uuid "merchant_id"
t.index ["account_id"], name: "index_transactions_on_account_id"
t.index ["category_id"], name: "index_transactions_on_category_id"
t.index ["merchant_id"], name: "index_transactions_on_merchant_id"
end
create_table "users", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
@ -264,8 +275,10 @@ ActiveRecord::Schema[7.2].define(version: 2024_04_25_000110) do
add_foreign_key "account_balances", "accounts", on_delete: :cascade
add_foreign_key "accounts", "families"
add_foreign_key "transaction_categories", "families"
add_foreign_key "transaction_merchants", "families"
add_foreign_key "transactions", "accounts", on_delete: :cascade
add_foreign_key "transactions", "transaction_categories", column: "category_id", on_delete: :nullify
add_foreign_key "transactions", "transaction_merchants", column: "merchant_id"
add_foreign_key "users", "families"
add_foreign_key "valuations", "accounts", on_delete: :cascade
end