1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-02 20:15:22 +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

@ -2,9 +2,7 @@ class Import::RowsController < ApplicationController
before_action :set_import_row
def update
@row.assign_attributes(row_params)
@row.save!(validate: false)
@row.sync_mappings
@row.update_and_sync(row_params)
redirect_to import_row_path(@row.import, @row)
end

View file

@ -12,7 +12,7 @@ class Import::UploadsController < ApplicationController
@import.assign_attributes(raw_file_str: csv_str, col_sep: upload_params[:col_sep])
@import.save!(validate: false)
redirect_to import_configuration_path(@import), notice: "CSV uploaded successfully."
redirect_to import_configuration_path(@import, template_hint: true), notice: "CSV uploaded successfully."
else
flash.now[:alert] = "Must be valid CSV with headers and at least one row of data"