Record used material on tasks and suggest workflow steps' default materials

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
2026-11-26 16:28:16 +02:00
co-authored by Claude Sonnet 5.5
parent 30132deb0e
commit bca1eed166
41 changed files with 1521 additions and 19 deletions
@@ -7,6 +7,7 @@ namespace App\Modules\Inventory\Application\Contracts;
use App\Modules\Inventory\Application\DTOs\StockGroupSummary;
use App\Modules\Inventory\Application\DTOs\StockItemSummary;
use App\Modules\Inventory\Application\DTOs\StockMovementSummary;
use App\Modules\Inventory\Application\DTOs\TaskMaterialSuggestion;
/**
* Reads stock items, groups and movements. Other modules (machines, quick
@@ -44,6 +45,19 @@ interface StockQueries
public function findMovement(int $id): ?StockMovementSummary;
/**
* Material recorded on a task: its use, write-offs and their reversals,
* newest first. The balance after each is not set (0).
*
* @return list<StockMovementSummary>
*/
public function taskMovements(int $taskId): array;
/**
* @return list<TaskMaterialSuggestion>
*/
public function taskSuggestions(int $taskId): array;
/**
* The private-disk path of the item's image or its thumbnail.
*/
@@ -0,0 +1,23 @@
<?php
declare(strict_types=1);
namespace App\Modules\Inventory\Application\Contracts;
use App\Modules\Inventory\Application\DTOs\StockTaskContext;
/**
* Inventory's view of job tasks, read from the Jobs and Catalog modules.
*/
interface StockTasks
{
public function context(int $taskId): ?StockTaskContext;
/**
* Labels such as "2026-0005 Messuvideo – Tulostus" by task id.
*
* @param list<int> $taskIds
* @return array<int, string>
*/
public function labels(array $taskIds): array;
}