feat(shopping): custom categories - add, rename, delete and reorder (#26)

- New DB table shopping_categories (migration v5) seeds 9 default
  categories with Lucide icons and sort_order
- Backend CRUD routes: GET/POST/PUT/DELETE /shopping/categories
  plus PATCH /shopping/categories/reorder
- Category validation now uses DB instead of hardcoded constant;
  items of deleted category are moved to the next available one
- Frontend shopping page loads categories from API, dropdown and
  grouping reflect custom order dynamically
- Settings -> Shopping section: list categories with up/down buttons,
  click-to-rename, delete with confirmation; add new categories inline
- i18n keys added in de/en/sv/it
This commit is contained in:
Ulas
2026-04-05 17:24:06 +02:00
parent 517e4454d0
commit 2dc8984c3e
11 changed files with 545 additions and 56 deletions
+13
View File
@@ -455,6 +455,19 @@
"settings": {
"title": "Inställningar",
"sectionDesign": "Utseende",
"sectionShopping": "Inköp",
"shoppingCategoriesLabel": "Inköpskategorier",
"shoppingCategoriesHint": "Lägg till, byt namn, ta bort eller sortera om kategorier.",
"shoppingCategoryPlaceholder": "Ny kategori…",
"shoppingCategoryRenameHint": "Klicka för att byta namn",
"shoppingCategoryRenamePrompt": "Nytt kategorinamn:",
"shoppingCategoryMoveUp": "Flytta kategori uppåt",
"shoppingCategoryMoveDown": "Flytta kategori nedåt",
"shoppingCategoryDelete": "Ta bort kategori",
"shoppingCategoryDeleteConfirm": "Ta bort kategorin \"{{name}}\"? Befintliga artiklar flyttas till nästa kategori.",
"shoppingCategoryAdded": "Kategori tillagd.",
"shoppingCategoryRenamed": "Kategori omdöpt.",
"shoppingCategoryDeleted": "Kategori borttagen.",
"sectionAccount": "Mitt konto",
"sectionCalendarSync": "Kalendersynkronisering",
"sectionFamily": "Familjemedlemmar",