1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-29 18:19:39 +02:00

Remove manual merchant management (rules will replace)

This commit is contained in:
Zach Gollwitzer 2025-04-02 17:48:34 -04:00
parent f07940bf45
commit 83dcbd9ff0
44 changed files with 123 additions and 386 deletions

View file

@ -1,7 +1,7 @@
class Account::TransactionsController < ApplicationController
include EntryableResource
permitted_entryable_attributes :id, :category_id, :merchant_id, { tag_ids: [] }
permitted_entryable_attributes :id, :category_id, { tag_ids: [] }
def bulk_delete
destroyed = Current.family.entries.destroy_by(id: bulk_delete_params[:entry_ids])
@ -27,11 +27,11 @@ class Account::TransactionsController < ApplicationController
end
def bulk_update_params
params.require(:bulk_update).permit(:date, :notes, :category_id, :merchant_id, entry_ids: [])
params.require(:bulk_update).permit(:date, :notes, :category_id, entry_ids: [])
end
def search_params
params.fetch(:q, {})
.permit(:start_date, :end_date, :search, :amount, :amount_operator, accounts: [], account_ids: [], categories: [], merchants: [], types: [], tags: [])
.permit(:start_date, :end_date, :search, :amount, :amount_operator, accounts: [], account_ids: [], categories: [], types: [], tags: [])
end
end