2024-07-01 10:49:43 -04:00
|
|
|
module TransactionsHelper
|
2024-05-30 20:55:18 -04:00
|
|
|
def transaction_search_filters
|
|
|
|
[
|
2024-09-17 10:38:02 -04:00
|
|
|
{ key: "account_filter", icon: "layers" },
|
|
|
|
{ key: "date_filter", icon: "calendar" },
|
2024-10-04 09:17:48 -04:00
|
|
|
{ key: "type_filter", icon: "tag" },
|
2024-09-17 10:38:02 -04:00
|
|
|
{ key: "amount_filter", icon: "hash" },
|
2024-10-04 09:17:48 -04:00
|
|
|
{ key: "category_filter", icon: "shapes" },
|
|
|
|
{ key: "tag_filter", icon: "tags" },
|
2024-09-17 10:38:02 -04:00
|
|
|
{ key: "merchant_filter", icon: "store" }
|
2024-05-30 20:55:18 -04:00
|
|
|
]
|
|
|
|
end
|
|
|
|
|
|
|
|
def get_transaction_search_filter_partial_path(filter)
|
|
|
|
"transactions/searches/filters/#{filter[:key]}"
|
|
|
|
end
|
|
|
|
|
|
|
|
def get_default_transaction_search_filter
|
|
|
|
transaction_search_filters[0]
|
|
|
|
end
|
|
|
|
end
|