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

CSV Transaction Imports (#708)

Introduces a basic CSV import module for bulk-importing account transactions.

Changes include:

- User can load a CSV
- User can configure the column mappings for a CSV
- Imported CSV shows invalid cells
- User can clean up their data directly in the UI
- User can see a preview of the import rows and confirm import
- Layout refactor + Import nav stepper
- System test stability improvements
This commit is contained in:
Zach Gollwitzer 2024-05-17 09:09:32 -04:00 committed by GitHub
parent 3d9ff3ad2a
commit 45ae4a9737
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
71 changed files with 1657 additions and 117 deletions

View file

@ -62,4 +62,6 @@ Rails.application.configure do
# Raise error when a before_action's only/except options reference missing actions
config.action_controller.raise_on_missing_callback_actions = true
config.autoload_paths += %w[ test/support ]
end

View file

@ -0,0 +1,95 @@
---
en:
imports:
clean:
clean_and_edit: Clean and edit your data
clean_description: Edit your transactions in the table below. Click on any cell
to change the date, name, category, or amount.
clean_import: Clean import
invalid_csv: Please load a CSV first
configure:
configure_description: Select the columns that match the necessary data fields,
so that the columns in your CSV can be correctly mapped with our format.
configure_subtitle: Setup your CSV file
configure_title: Configure import
confirm_accept: Change mappings
confirm_body: Changing your mappings may erase any edits you have made to the
CSV so far.
confirm_title: Are you sure?
invalid_csv: Please load a CSV first
next: Next
confirm:
confirm_description: Preview your transactions below and check to see if there
are any changes that are required.
confirm_subtitle: Confirm your transactions
confirm_title: Confirm import
invalid_data: You have invalid data, please fix before continuing
create:
import_created: Import created
destroy:
import_destroyed: Import destroyed
edit:
description_text: Importing transactions can only be done for one account at
a time. You will need to go through this process again for other accounts.
edit_title: Edit import
header_text: Select the account your transactions will belong to
empty:
message: No imports to show
new: New Import
form:
account: Account
next: Next
select_account: Select account
import:
complete: Complete
completed_on: Completed on %{datetime}
delete: Delete
edit: Edit
failed: Failed
in_progress: In progress
label: 'Import for: %{account}'
started_on: Started on %{datetime}
uploading: Processing rows
index:
imports: Imports
new: New import
title: Imports
load:
confirm_accept: Yep, start over!
confirm_body: This will reset your import. Any changes you have made to the
CSV will be erased.
confirm_title: Are you sure?
description: Create a spreadsheet or upload an exported CSV from your financial
institution.
instructions: Your CSV should have the following columns and formats for the
best import experience.
load_title: Load import
next: Next
requirement1: Dates must be in ISO 8601 format (YYYY-MM-DD)
requirement2: Negative transaction is an "outflow" (expense), positive is an
"inflow" (income)
subtitle: Import your transactions
load_csv:
import_loaded: Import CSV loaded
new:
description_text: Importing transactions can only be done for one account at
a time. You will need to go through this process again for other accounts.
header_text: Select the account your transactions will belong to
publish:
import_published: Import has started in the background
invalid_data: Your import is invalid
type_selector:
description: You can manually import transactions from CSVs or from other financial
apps like Mint, Empower (formerly Personal Capital) or Apple Card.
import_from_apple: Import from Apple Card
import_from_csv: New import from CSV
import_from_empower: Import from Empower
import_from_mint: Import from Mint
import_transactions: Import transactions
resume_latest_import: Resume latest import
soon: Soon
sources: Sources
update:
import_updated: Import updated
update_mappings:
column_mappings_saved: Column mappings saved

View file

@ -55,6 +55,7 @@ en:
categories_label: Categories
feedback_label: Feedback
general_section_title: General
imports_label: Imports
invite_label: Invite friends
merchants_label: Merchants
notifications_label: Notifications

View file

@ -57,6 +57,8 @@ en:
transfer: Transfer
index:
edit_categories: Edit categories
edit_imports: Edit imports
import: Import
merchants:
create:
success: New merchant created successfully

View file

@ -21,8 +21,24 @@ Rails.application.routes.draw do
resource :security, only: %i[show update]
end
resources :imports, except: :show do
member do
get "load"
patch "load" => "imports#load_csv"
get "configure"
patch "configure" => "imports#update_mappings"
get "clean"
patch "clean" => "imports#update_csv"
get "confirm"
patch "confirm" => "imports#publish"
end
end
resources :transactions do
match "search" => "transactions#search", on: :collection, via: [ :get, :post ], as: :search
match "search" => "transactions#search", on: :collection, via: %i[ get post ], as: :search
collection do
scope module: :transactions do