mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-24 15:49:39 +02:00
Feature: Add the ability to "revert" a CSV import (#1814)
* Allow reverting imports * Fix tests * Add currency column to all imports * Don't auto-enrich demo account
This commit is contained in:
parent
60925bd16c
commit
536c82f2aa
17 changed files with 125 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
|||
class ImportsController < ApplicationController
|
||||
before_action :set_import, only: %i[show publish destroy]
|
||||
before_action :set_import, only: %i[show publish destroy revert]
|
||||
|
||||
def publish
|
||||
@import.publish_later
|
||||
|
@ -31,6 +31,11 @@ class ImportsController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
def revert
|
||||
@import.revert_later
|
||||
redirect_to imports_path, notice: "Import is reverting in the background."
|
||||
end
|
||||
|
||||
def destroy
|
||||
@import.destroy
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue