Add checklists to tasks on the job page
Tasks get an ordered checklist (spec 8.2, phase 3): items are checked done with who and when recorded, also by subcontractors attached to the job; others add, rename, reorder and remove items. Items go with their task. The spec gets a phase 3 chapter (18.1), and open questions move to chapter 19. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Modules\Jobs\Domain\Contracts;
|
||||
|
||||
use App\Modules\Jobs\Domain\Entities\ChecklistItem;
|
||||
use App\Modules\Jobs\Domain\Enums\MoveDirection;
|
||||
|
||||
interface ChecklistItemRepository
|
||||
{
|
||||
/**
|
||||
* Null when the item does not exist or belongs to another task.
|
||||
*/
|
||||
public function findForTask(int $taskId, int $itemId): ?ChecklistItem;
|
||||
|
||||
/**
|
||||
* The item next to the given one in the task's order, or null at the end.
|
||||
*/
|
||||
public function neighbour(ChecklistItem $item, MoveDirection $direction): ?ChecklistItem;
|
||||
|
||||
public function nextSortOrder(int $taskId): int;
|
||||
|
||||
public function save(ChecklistItem $item): ChecklistItem;
|
||||
|
||||
public function delete(ChecklistItem $item): void;
|
||||
}
|
||||
Reference in New Issue
Block a user