mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-02 20:15:22 +02:00
Add inline category selection (#541)
* Implement inline category selection * Add turbo frame to refresh updated transaction * Improve styles * Fix category assignment * Reorganize code * Revert event propagation * Remove unused frames * Make only the transaction name clickable * Add custom scrollbar class
This commit is contained in:
parent
2c3752668a
commit
2c257a2a4b
13 changed files with 177 additions and 205 deletions
|
@ -5,14 +5,14 @@ class Transaction::Category < ApplicationRecord
|
|||
before_update :clear_internal_category, if: :name_changed?
|
||||
|
||||
DEFAULT_CATEGORIES = [
|
||||
{ internal_category: "income", color: "#fd7f6f" },
|
||||
{ internal_category: "food_and_drink", color: "#7eb0d5" },
|
||||
{ internal_category: "entertainment", color: "#b2e061" },
|
||||
{ internal_category: "personal_care", color: "#bd7ebe" },
|
||||
{ internal_category: "general_services", color: "#ffb55a" },
|
||||
{ internal_category: "auto_and_transport", color: "#ffee65" },
|
||||
{ internal_category: "rent_and_utilities", color: "#beb9db" },
|
||||
{ internal_category: "home_improvement", color: "#fdcce5" }
|
||||
{ internal_category: "income", color: "#e99537" },
|
||||
{ internal_category: "food_and_drink", color: "#4da568" },
|
||||
{ internal_category: "entertainment", color: "#6471eb" },
|
||||
{ internal_category: "personal_care", color: "#db5a54" },
|
||||
{ internal_category: "general_services", color: "#df4e92" },
|
||||
{ internal_category: "auto_and_transport", color: "#c44fe9" },
|
||||
{ internal_category: "rent_and_utilities", color: "#eb5429" },
|
||||
{ internal_category: "home_improvement", color: "#61c9ea" }
|
||||
]
|
||||
|
||||
def self.ransackable_attributes(auth_object = nil)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue