From 45077a00295f63536f28e10b3b6453f731bd3fd6 Mon Sep 17 00:00:00 2001 From: AJ Date: Sun, 12 Oct 2025 03:58:56 -0400 Subject: [PATCH] Add autocomplete dropdowns for category and merchant in CategoryMappings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Improved UX for adding/editing category mappings: **Backend Changes:** - Added AvailableCategories list (distinct categories from existing mappings) - Added AvailableMerchants list (all merchants from Merchants table) - Updated LoadDataAsync() to populate both lists **UI Changes:** - Replaced plain text input with HTML5 datalist for Category field - Replaced plain text input with HTML5 datalist for Merchant field - Both fields support autocomplete while allowing new values - Added "required" attribute to Category field for validation - Added helper text to guide users - Removed custom JavaScript dropdown logic (now using native datalist) **Benefits:** - Consistent category naming (autocomplete suggests existing categories) - Consistent merchant naming (autocomplete suggests existing merchants) - Better UX with native browser autocomplete behavior - Still allows creating new categories/merchants on the fly - Cleaner, simpler code without custom dropdown implementation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- MoneyMap/Pages/CategoryMappings.cshtml | 98 +++++------------------ MoneyMap/Pages/CategoryMappings.cshtml.cs | 14 ++++ 2 files changed, 32 insertions(+), 80 deletions(-) diff --git a/MoneyMap/Pages/CategoryMappings.cshtml b/MoneyMap/Pages/CategoryMappings.cshtml index ec891f4..a975a1f 100644 --- a/MoneyMap/Pages/CategoryMappings.cshtml +++ b/MoneyMap/Pages/CategoryMappings.cshtml @@ -157,20 +157,25 @@ else