Files
Toiminnanohjaus/tests/Fakes/FakeTaskQueries.php
T
petriandClaude Opus 5.5 6332ff0fa9 Rebuild the Kanban board after the prototype, with the job editor and quick intake dialog
- Toolbar: whose board (own, a person, a service line, all), pipeline
  views (daily, sales, full), urgent and late filters with a live count,
  normal and compact density, and the quick intake button.
- Columns side by side with horizontal scrolling on desktop, stacked on
  phones; each user's own column colours and order, the urgent column's
  threshold menu, and the continuing jobs column.
- Cards in customer colours: job cards with their tasks checked off inside
  the card (the status select is gone), continuing job cards with the next
  period, PIN and quick add, and pinned task cards. Dragging moves and
  orders cards; the keyboard opens the job editor from the card title.
- Job editor dialog: every job detail, tasks with checklists and
  templates, quick hours (TimeTracking) and expenses (Expenses), history.
- The quick intake form also adds a contact person, initial status and
  priority, and opens as a dialog on the board.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-30 06:33:28 +02:00

59 lines
1.5 KiB
PHP

<?php
namespace Tests\Fakes;
use App\Modules\Jobs\Application\Contracts\TaskQueries;
use App\Modules\Jobs\Application\DTOs\BookableTask;
use App\Modules\Jobs\Application\DTOs\TaskSummary;
use App\Modules\Jobs\Domain\Enums\JobStatus;
use App\Modules\Jobs\Domain\Enums\TaskStatus;
/**
* Tasks for unit tests of other modules, as time is recorded on them.
*/
class FakeTaskQueries implements TaskQueries
{
/** @var array<int, BookableTask> */
public array $tasks = [];
public function addTask(int $taskId, int $jobId = 1, JobStatus $jobStatus = JobStatus::Order, int $workTypeId = 7): void
{
$this->tasks[$taskId] = new BookableTask($taskId, $jobId, '2026-0001', 'Kampanja', 'Tehtävä '.$taskId, $workTypeId, 'graafinen työ', $jobStatus, TaskStatus::Waiting);
}
public function pinnedTaskIds(int $jobId): array
{
return [];
}
public function tasksOf(int $jobId): array
{
return [];
}
public function findTask(int $jobId, int $taskId): ?TaskSummary
{
return null;
}
public function bookableTask(int $taskId): ?BookableTask
{
return $this->tasks[$taskId] ?? null;
}
public function bookableTasks(array $taskIds): array
{
return array_values(array_intersect_key($this->tasks, array_flip($taskIds)));
}
public function assignedOpenTaskIds(int $userId): array
{
return [];
}
public function searchBookableTasks(string $term, ?int $onlyMemberUserId = null, int $limit = 8): array
{
return [];
}
}