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

Account-level import configuration templates (#1946)
Some checks are pending
Publish Docker image / ci (push) Waiting to run
Publish Docker image / Build docker image (push) Blocked by required conditions

* Account-level import configuration templates

* Default import to family's preferred date format
This commit is contained in:
Zach Gollwitzer 2025-03-04 13:10:01 -05:00 committed by GitHub
parent 5b2fa3d707
commit 0544089710
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 108 additions and 43 deletions

View file

@ -30,11 +30,10 @@ class Import::Row < ApplicationRecord
end
end
def sync_mappings
Import::CategoryMapping.sync(import) if import.column_keys.include?(:category)
Import::TagMapping.sync(import) if import.column_keys.include?(:tags)
Import::AccountMapping.sync(import) if import.column_keys.include?(:account)
Import::AccountTypeMapping.sync(import) if import.column_keys.include?(:entity_type)
def update_and_sync(params)
assign_attributes(params)
save!(validate: false)
import.sync_mappings
end
private