-
Notifications
You must be signed in to change notification settings - Fork 1
Description
User Story
As a homeowner, I want a single management page where I can view and edit all tags, budget categories, and household item categories so that I can organize my project taxonomy from one central place instead of navigating to separate pages.
Description
Consolidate the management of three entity types — Tags, Budget Categories, and Household Item Categories — into a single unified page. Replace the existing standalone Tags page (/tags) and remove the Budget Categories tab from the Budget sub-navigation. Convert Household Item Categories from a hardcoded TypeScript enum to a database-backed table with full CRUD, pre-seeded with the eight current enum values.
Key business rule: budget lines on household items must always be assigned the "Household Items" budget category implicitly. The user should not be able to select a budget category when adding/editing a household item budget line — it is auto-assigned.
Acceptance Criteria
- AC-1: A new unified management page exists at a single route (e.g.,
/manage) with three sections or tabs: "Tags", "Budget Categories", and "Household Item Categories". Each section displays a list of items and supports create, edit, and delete operations. - AC-2: The sidebar navigation link "Tags" (
/tags) is replaced with a link to the new unified management page. The old/tagsroute redirects to the new page. - AC-3: The "Categories" tab is removed from the Budget sub-navigation. The
/budget/categoriesroute redirects to the budget categories section/tab of the new unified management page. - AC-4: A new database table
household_item_categoriesis created via migration, with columns:id(TEXT PK),name(TEXT UNIQUE NOT NULL),color(TEXT, nullable),sort_order(INTEGER NOT NULL DEFAULT 0),created_at,updated_at. Pre-seeded with the eight current enum values. - AC-5: The
household_items.categorycolumn is converted from a free-text CHECK constraint to a foreign key referencinghousehold_item_categories(id). Existing data is preserved. - AC-6: Full CRUD API endpoints exist for household item categories (GET list, POST create, PATCH update, DELETE with 409 if in use).
- AC-7: The household item categories section on the unified page displays all categories with name and color, supports create/edit/delete.
- AC-8: The
HouseholdItemCategoryTypeScript union type is replaced with a dynamic type since categories are now user-defined. - AC-9: A new pre-seeded budget category "Household Items" (id
bc-household-items) is added via migration. - AC-10: When creating or updating a budget line on a household item, the
budget_category_idis automatically set to "Household Items". User-supplied values are ignored. - AC-11: The budget category selector is removed from the household item budget line create/edit form. "Household Items" is displayed as a read-only label.
- AC-12: Existing household item budget lines with different or NULL
budget_category_idare migrated to referencebc-household-items. - AC-13: All existing Tags management functionality continues to work identically.
- AC-14: All existing Budget Categories management functionality continues to work identically.
- AC-15: Old
TagManagementPageandBudgetCategoriesPagecomponents removed. No orphan pages. - AC-16: Household item create/edit forms populate category dropdown dynamically from
GET /api/household-item-categories. - AC-17: Household item list page category filter populated from API instead of hardcoded enum.
- AC-18: Backward compatibility: all existing data preserved through migration with zero data loss.
Metadata
Metadata
Assignees
Labels
Projects
Status