mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-23 15:19:38 +02:00
Add apply button, improve transaction filters (#655)
* Add apply button, improve transaction filters * Remove temp log * Fix lint errors
This commit is contained in:
parent
0277bc94f3
commit
c46662c99f
8 changed files with 89 additions and 49 deletions
|
@ -1,2 +1,20 @@
|
|||
module TransactionsHelper
|
||||
def transaction_filters
|
||||
[
|
||||
{ name: "Account", partial: "account_filter", icon: "layers" },
|
||||
{ name: "Date", partial: "date_filter", icon: "calendar" },
|
||||
{ name: "Type", partial: "type_filter", icon: "shapes" },
|
||||
{ name: "Amount", partial: "amount_filter", icon: "hash" },
|
||||
{ name: "Category", partial: "category_filter", icon: "tag" },
|
||||
{ name: "Merchant", partial: "merchant_filter", icon: "store" }
|
||||
]
|
||||
end
|
||||
|
||||
def transaction_filter_id(filter)
|
||||
"txn-#{filter[:name].downcase}-filter"
|
||||
end
|
||||
|
||||
def transaction_filter_by_name(name)
|
||||
transaction_filters.find { |filter| filter[:name] == name }
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue