2024-06-20 08:15:09 -04:00
|
|
|
module CategoriesHelper
|
|
|
|
def null_category
|
|
|
|
Category.new \
|
|
|
|
name: "Uncategorized",
|
|
|
|
color: Category::UNCATEGORIZED_COLOR
|
|
|
|
end
|
2024-10-25 15:37:05 +02:00
|
|
|
|
2025-01-07 09:41:24 -05:00
|
|
|
def transfer_category
|
|
|
|
Category.new \
|
|
|
|
name: "⇄ Transfer",
|
|
|
|
color: Category::TRANSFER_COLOR
|
|
|
|
end
|
|
|
|
|
|
|
|
def payment_category
|
|
|
|
Category.new \
|
|
|
|
name: "→ Payment",
|
|
|
|
color: Category::PAYMENT_COLOR
|
|
|
|
end
|
|
|
|
|
|
|
|
def trade_category
|
|
|
|
Category.new \
|
|
|
|
name: "Trade",
|
|
|
|
color: Category::TRADE_COLOR
|
|
|
|
end
|
|
|
|
|
2024-10-25 15:37:05 +02:00
|
|
|
def family_categories
|
|
|
|
[ null_category ].concat(Current.family.categories.alphabetically)
|
|
|
|
end
|
2024-06-20 08:15:09 -04:00
|
|
|
end
|