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
* Introduce ActiveStorage
* Add active storage related service gems
* Update storage.yml
* Install image processing gem
- sudo apt-get install libvips (required dependency)
* Set default active storage service
* Add profile image to user model
* Amend form to allow profile images to be saved, introduce stimulus controller.
* Purge image when form is blank
* Update markup/stimulus controller
* Add test for profile image uplaods
* Add profile image validation
* Use rails guide gem versions
* Use correct ERB syntax and make all storage options configurable
* Ensure form submits when user clears profile image
* Add profile image thumbnail method
* Extract profile image to a partial
* Updates env.example and storage.yml
* Fix bug with double form save
* Add profile image to the sidenav
* Update production config
* Fix ERB formatting
* normalize en.yml
* Handle non-square images
* Use pre-processing on thumbnail variant
* Resovle gemfile.lock issues
* Rubocop style changes
---------
Signed-off-by: Christian <47796704+crobbo@users.noreply.github.com>
Co-authored-by: Christian Robinson <christian@robbo.dev>
* Add setting fields to model
* Allow to configure SMTP settings
* Normalize locales
* Cleanup locales
* Remove 'coming soon'
* fix test
* Reset credentials
* Reset development config
* Check smtp spelling
* Use post instead of get method
* TLS ENV variable is more descriptive
* Rework application mailer
* Follow rails convention for mailer action params
* Reset schema.rb to main
* Test WIP
* Add test for controller and mailer
* Move tests from controller to model
* Custom error message if settings are not all present
* Comment smtp config in development env
* Add default tls enabled value
* Rubocop
* Fix controller test
* Reset credentials
* Normalize locales
* Test
* fix test
* Fix application mailer test that fails randomly
* Error flash message instead of notice
* Rework application mailer tests
* Generate time series for rolling 30 day sum of income and spending
* Highlight accounts with most income and spending in the last 30 days
* Aggregate chips after 3 top accounts in insight card
* Refactor aggregation filter
I think this is easier to read and understand whats happening at a
glance
* Refactor and tidy
* Use family currency for insight cards
* Further reduce risk of sql injection
* Fix lint
* Refactor rolling total queries
* Add test for transaction snapshot
* Reindent TimeSeries classes
* Fix spacing in time series tests
* Remove trend tests where current is nil
I think if we've gotten this far with a nil value for current, there's a data integrity problem.
If we allow this, we'll have to be very defensive in our code. Best to raise and fix early.
* Reindent Money class
* Refactor TimeSeries artifacts
* Use as_json in TimeSeries
* Bring back tests for trends where current is nil
* Bring back trend test
* Correctly enumerate trend test
* Use favorable_direction for trend_styles helper
* Make trend public in TimeSeries::Value
* Allow nil current values in trends
I think I might've gotten it wrong before, nils might appear in trends if values are unavailable for snapshots
* Clean up TimeSeries::Trend
* Skip trend values same class validations if any values are nil
* Refactor Money
* Remove object parsing in TimeSeries::Value
We're only every passing hashes
* Refactor trendline chart controller into a time series chart controller
* Replace trendline controller
* Implement empty state
* Port line-chart controller into time-series-chart
* Split out methods
* Group similar time series chart functionality
* Fix indicator color
* Fix empty state in time series chart
* Replace line-chart controller with time-series-chart controller
* Draw empty time series chart if less than 2 data points
* Fix favorable direction serialization
* Handle integers as well as money
* Fix favorable direction serialization
* Replace chart types with optional elements
* Prevent double-renders when displaying turbo caches of time series charts
* Remove ambiguities between time series and series data
* Improve time series chart property names
* Clean up tooltip template
* Match tooltip designs
* Apply trendline gradient
* Implement trendline split behavior
* Use same stroke width on all trend lines
* Sort time series data by date
* Support percentages
* Use data color for guideline circles
* Revert "Use data color for guideline circles"
This reverts commit f239a1e00f.
* Use expected defaults for time series chart
* Include day in time-series chart x-axis labels
* favorableDirection -> favorable_direction
* data -> datum where appropriate
* Hide change data in tooltip for percentages
* Reindent TimeSeries classes
* Fix spacing in time series tests
* Remove trend tests where current is nil
I think if we've gotten this far with a nil value for current, there's a data integrity problem.
If we allow this, we'll have to be very defensive in our code. Best to raise and fix early.
* Reindent Money class
* Refactor TimeSeries artifacts
* Use as_json in TimeSeries
* Bring back tests for trends where current is nil
* Bring back trend test
* Correctly enumerate trend test
* Use favorable_direction for trend_styles helper
* Make trend public in TimeSeries::Value
* Allow nil current values in trends
I think I might've gotten it wrong before, nils might appear in trends if values are unavailable for snapshots
* Clean up TimeSeries::Trend
* Skip trend values same class validations if any values are nil
* Refactor Money
* Remove object parsing in TimeSeries::Value
We're only every passing hashes
* Add last_sync_date to accounts table
* Always sync Account after Valuation or Transaction creation, update, or deletion.
Skip sync if user clicks "sync" button without changing anything
* Sync user accounts daily based on last_login_at
* Add transaction filtering by category
* Link label to checkbox
* Keep the dropdown open when clicked to allow tab change
* Show the badge with color and name when filter is applied
* Reduce color height
* Add ability to delete Account
Issue #571
* Fix ActiveJob::DeserializationError in AccountSyncJob when an account doesn't exists
* Use custom confirm modal for account deletion
* Revert "Fix ActiveJob::DeserializationError in AccountSyncJob when an account doesn't exists"
This reverts commit 8dbf634819.
* Rough sketch of implementation
* Consolidate auto submit controller
* Store ransack params in session
* Improve how summary is calculated for txns
* Implement filters UI
* Implement Synth as an exchange rate provider
* Add assertions to provider interface test
* Assert the correct provider error is raised
* Remove unnecessary parens
* Support all currencies, handle outside DB
* Remove currencies from seed
* Fix account balance namespace
* Set default currency on authentication
* Cache currency instances
* Implement multi-currency syncs with tests
* Series fallback, passing tests
* Fix conflicts
* Make value group concrete class that works with currency values
* Fix migration conflict
* Update tests to expect multi-currency results
* Update account list to use group method
* Namespace updates
* Fetch unknown exchange rates from API
* Fix date range bug
* Ensure demo data works without external API
* Enforce cascades only at DB level
* feat: add crypto account type to demo data
* fix: set currency to BTC, revert schema migration change and fix tests
* fix: update dates in time_series tests
* Clean up time series models
* Add value group rollup class for summarizing hierarchical data
* Integrate new classes
* Update UI to use new patterns
* Update D3 charts to expect new data format
* Clean up account model
* More cleanup
* Money improvements
* Use new money fields
* Remove invalid fixture data to avoid orphaned accountables
* Update time series to work better with collections
* Fix tests and UI bugs
* Adds basic validations for required fields
Also deletes a few extraneous .keep files
Does not add the family_id required field for user, since that breaks the basic test setup
* Restore keep files to this branch
* Remove Credit model and validate models behind ids
* Restore concerns .keep
* Handle Turbo updates with tabs
Fixes #491
* Add Filterable concern for controllers
* Add trendline chart
* Extract common UI to partials
* Series refactor
* Put placeholders for calculations in
* Add classification generated column to account
* Add basic net worth calculation
* Add net worth tests
* Get net worth graph working
* Fix lint errors
* Implement asset grouping query
* Make trends and series more intuitive
* Fully functional dashboard
* Remove logging