Warenwirtschaft: OPT-1 Quick Wins + Entwicklungsplan V6.0

- N+1-Fix Ausschussliste: user.account eager laden (StockDisposalController@index)
- Composite-Indizes stock_entries(entry_type,status,ingredient_id/packaging_item_id) für InventoryService-Aggregationen
- Ungenutzten Eager-Load producedByUser aus ProductionRepository::listForIndex entfernt
- ExampleTest auf assertRedirect umgestellt (Suite 100% grün: 155 Tests)
- Query-Count-Regressionstest für die Ausschussliste
- Plan V6.0 (Code-Verifikation, OPT-Block, geklärte Kundenfragen)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Kevin Adametz 2026-07-06 09:54:24 +00:00
parent e53201f229
commit 65f949dd7a
6 changed files with 240 additions and 5 deletions

View file

@ -24,7 +24,7 @@ class StockDisposalController extends Controller
public function index(Request $request): View
{
$query = StockDisposal::query()
->with(['ingredient', 'packagingItem', 'location', 'stockEntry', 'user'])
->with(['ingredient', 'packagingItem', 'location', 'stockEntry', 'user.account'])
->latest('disposed_at')
->latest('id');