Nils-Johan Gynther
2edd6d003d
feat(import): store and manage image URL in session storage during recipe import
2026-04-22 21:55:24 +02:00
Nils-Johan Gynther
37472f6c43
refactor: remove unused load function and related logic in PantryView component
2026-04-22 18:54:04 +02:00
Nils-Johan Gynther
2acf66e4c4
feat: enhance pantry management with new features and UI improvements
2026-04-21 16:09:33 +02:00
Nils-Johan Gynther
c57f4bde19
feat: integrate authFetch for API calls in InventoryView and PantryView, and add pantry route with authentication
2026-04-21 14:49:20 +02:00
Nils-Johan Gynther
81b63b3fdb
feat: implement inventory and pantry management views with CRUD functionality and user-friendly interfaces
2026-04-21 14:43:18 +02:00
Nils-Johan Gynther
83722123d2
feat: enhance error handling with user-friendly messages and improve response parsing
2026-04-21 13:38:59 +02:00
Nils-Johan Gynther
87eab4d0ca
feat: add functionality for managing deleted products, including restoration and permanent deletion
2026-04-21 13:30:44 +02:00
Nils-Johan Gynther
5345b9e55e
feat: implement unit conversion utilities and centralize unit definitions for consistency across frontend and backend
2026-04-21 10:51:07 +02:00
Nils-Johan Gynther
8e9b90028f
docs: update TEKNISK_BESKRIVNING.md to reflect changes in authentication middleware and role-based access control; remove obsolete middleware.ts file
2026-04-21 10:30:30 +02:00
Nils-Johan Gynther
e370062b5c
feat: enhance CORS configuration and implement throttling for API endpoints; add admin role checks in controllers
2026-04-21 08:17:44 +02:00
Nils-Johan Gynther
7748ad311f
feat: implement security headers and rate limiting; update environment variables and documentation
2026-04-21 08:06:21 +02:00
Nils-Johan Gynther
c1d51c771e
feat: add helmet middleware for security and implement Content Security Policy in Next.js configuration
2026-04-21 07:44:04 +02:00
Nils-Johan Gynther
01d1bd2639
fix: lagg till SessionProvider i root layout sa useSession() fungerar
2026-04-19 21:55:22 +02:00
Nils-Johan Gynther
0f71d2569b
fix: force-dynamic pa write-sidan + saker useSession i useAuthFetch
2026-04-19 21:50:41 +02:00
Nils-Johan Gynther
8ab807aba2
fix: ta bort middleware.ts (Next.js 16 anvander proxy.ts), uppdatera matcher
2026-04-19 21:49:15 +02:00
Nils-Johan Gynther
b4d9e3dd5f
refactor: useAuthFetch-hook för automatisk JWT-header i klientanrop
2026-04-19 21:48:13 +02:00
Nils-Johan Gynther
92d0b066f1
fix: skicka Authorization-header i klientens direktanrop till /api/recipes
...
Caddy routar /api/recipes* direkt till NestJS (bypassing Next.js).
Klient-komponenter maste lagga till JWT-token sjalva via useSession().
Pavaerkade filer:
- RecipeDetailClient.tsx (PATCH, DELETE, POST image)
- ImportRecipePage.tsx (POST /api/recipes)
- WriteRecipePage.tsx (POST /api/recipes)
2026-04-19 21:46:09 +02:00
Nils-Johan Gynther
b34f141967
fix: withAuth standalone fallback om request.auth saknar accessToken
2026-04-19 21:25:36 +02:00
Nils-Johan Gynther
ff0859a7b1
debug: lägg till withAuth-loggning + middleware matcher för /api
2026-04-19 21:24:53 +02:00
Nils-Johan Gynther
487cbea443
fix: ta bort NextRequest-typning i profile/route.ts withAuth handler
2026-04-19 21:14:41 +02:00
Nils-Johan Gynther
0946617edb
fix: ta bort extra } i recipe-preview-proxy/route.ts
2026-04-19 21:13:40 +02:00
Nils-Johan Gynther
722440b9b5
fix: konvertera alla API route handlers till withAuth wrapper
...
Ersätter getAuthHeaders() + auth() standalone med withAuth() wrapper
i alla route handlers. Auth() standalone fungerar inte korrekt i
Next.js 16 + NextAuth beta.28 pga async cookies() kompatibilitet.
withAuth() använder auth() i wrapper-form sa att request.auth
populeras direkt av NextAuth.
Pavaerkade filer: 27 route handlers + ny lib/with-auth.ts
2026-04-19 21:11:14 +02:00
Nils-Johan Gynther
390e979cdb
feat(RecipeDetailClient): update inventory preview section and button labels for clarity
2026-04-19 20:28:04 +02:00
Nils-Johan Gynther
ee7bb8a397
fix: remove old matplan route after rename to matsedel
2026-04-19 20:10:30 +02:00
Nils-Johan Gynther
a0eaef2992
fix(ForslagTab): correct relative import path for auth-headers
2026-04-19 20:09:23 +02:00
Nils-Johan Gynther
31b7da82cd
feat(Navigation): update navigation links and rename 'Matplan' to 'Matsedel'
...
feat(matsedel): add MealPlanClient and page for meal planning
feat(profil): add AI and suggestion tabs for admin users
2026-04-19 20:06:33 +02:00
Nils-Johan Gynther
7e296acb60
feat(ReceiptImportClient): add modal for enlarged receipt preview and improve file selection interaction
2026-04-19 19:49:22 +02:00
Nils-Johan Gynther
645741669a
fix(ReceiptImportClient): remove extra comma in selectedCategoryId assignment
2026-04-19 19:40:00 +02:00
Nils-Johan Gynther
afe89439c1
feat(api): update category fetch requests to include tree structure
2026-04-19 19:38:49 +02:00
Nils-Johan Gynther
43fb31d0b9
fix(EditProductForm): prevent unnecessary flattening of empty child nodes
2026-04-19 19:32:14 +02:00
Nils-Johan Gynther
6e297403d6
feat(products): update event handling for product list refresh on creation and reset actions
2026-04-19 19:25:02 +02:00
Nils-Johan Gynther
a7680b40af
feat(product): trigger product list refresh on product creation event
2026-04-19 19:22:46 +02:00
Nils-Johan Gynther
829b7a80fc
feat(api): add PATCH endpoint for updating product status with authentication
2026-04-19 19:15:54 +02:00
Nils-Johan Gynther
151a7e335d
feat(inventory): update form submission to use async function in InventoryConsumeForm and InventoryEditForm
2026-04-19 19:12:05 +02:00
Nils-Johan Gynther
6f24aee18d
feat(api): implement new API routes for bulk category updates, inventory consumption, and product management with authentication
2026-04-19 19:11:09 +02:00
Nils-Johan Gynther
1ae9b336d8
feat(api): implement bulk categorization and suggestion endpoints with authentication
...
refactor(actions): remove unused imports and console logs from product actions
refactor(EditProductForm): update category suggestion logic to use new API endpoint
2026-04-19 19:04:04 +02:00
Nils-Johan Gynther
e0836cd269
feat(actions): enhance updateProductWithTags function with additional fields for canonicalName and category
2026-04-19 18:58:22 +02:00
Nils-Johan Gynther
b8475cdffe
fix(actions): correct console log formatting in updateProductWithTags function
2026-04-19 18:56:44 +02:00
Nils-Johan Gynther
051fb11714
feat(api): implement PATCH and DELETE routes for product management with error handling and logging
2026-04-19 18:31:19 +02:00
Nils-Johan Gynther
f12e673af5
refactor(DatabsTab): remove unnecessary product fetching and pass empty props to components
2026-04-19 18:23:36 +02:00
Nils-Johan Gynther
e9b5de4407
feat(admin): refactor product management components for improved state handling and data fetching
2026-04-19 18:22:43 +02:00
Nils-Johan Gynther
f12d881395
feat(api): add create and update product routes with authentication
...
refactor(admin): integrate router refresh after product updates in forms
fix(imports): update fetch paths for product creation and update in ReceiptImportClient
2026-04-19 18:12:29 +02:00
Nils-Johan Gynther
90b02c4690
feat(product): implement updateProductWithTags function for updating product and tags
2026-04-19 17:52:43 +02:00
Nils-Johan Gynther
4250b8d2bc
fix(imports): update import path for auth module in products-create and products-update routes
2026-04-19 17:38:20 +02:00
Nils-Johan Gynther
be6529f021
refactor(route): update parameter handling in PATCH function for improved readability
2026-04-19 17:37:10 +02:00
Nils-Johan Gynther
2a412406e2
fix(imports): update import path for auth module in product create and update routes
2026-04-19 17:36:11 +02:00
Nils-Johan Gynther
c970a5805f
refactor(auth): replace import path for getAuthHeaders with auth function in product routes
2026-04-19 17:34:34 +02:00
Nils-Johan Gynther
16703bb8eb
fix(imports): correct import path for getAuthHeaders in product create and update routes
2026-04-19 17:33:39 +02:00
Nils-Johan Gynther
4bf5733c76
feat(api): implement product creation and category update endpoints
2026-04-19 17:32:55 +02:00
Nils-Johan Gynther
81a8390bb7
refactor(actions): enhance error handling and ensure serializability in product actions
2026-04-19 17:30:18 +02:00