Files
Toiminnanohjaus/app/Modules/Jobs/Application/Contracts/CustomerJobQueries.php
T
petriandClaude Opus 5.5 7f3b6dff78 Add customer job Kanban board
Phase 1, item 6:
- New page /jobs/board: one column per Kanban status (archived left
  out), one card per job with number, name, customer, priority and due
  date. Filters for my jobs (default), priority and service unit;
  subcontractors see only their own cards and cannot move them.
- Cards move by dragging (Livewire wire:sort across column groups) or
  with each card's status select, which works with the keyboard. Moves
  go through ChangeJobStatus, so they are recorded in the job history;
  the result is announced and focus returns to the moved card.
- Billing statuses only for management and the job's biller: the
  jobs.set-billing-status gate now takes the biller's user id.
- Column links with counts at the top; columns wrap with the screen
  width, so there is no sideways scrolling.
- CustomerJobQueries::board() and the biller on job summaries.
- Menu link and a link from the job list; spec and CLAUDE.md updated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-23 19:15:54 +02:00

55 lines
1.5 KiB
PHP

<?php
declare(strict_types=1);
namespace App\Modules\Jobs\Application\Contracts;
use App\Modules\Jobs\Application\DTOs\CustomerJobDetails;
use App\Modules\Jobs\Application\DTOs\CustomerJobSummary;
use App\Modules\Jobs\Application\DTOs\JobChangeEntry;
use App\Modules\Jobs\Application\DTOs\JobListFilter;
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
/**
* Read side of customer jobs, for the job pages and other modules (tasks,
* time entries, billing).
*/
interface CustomerJobQueries
{
/**
* Jobs by due date (none last), then newest first.
*
* @return LengthAwarePaginator<int, CustomerJobSummary>
*/
public function paginate(JobListFilter $filter, int $perPage = 25): LengthAwarePaginator;
/**
* The Kanban board: every Kanban status (archived left out) with its
* jobs by due date, empty statuses included.
*
* @return array<string, list<CustomerJobSummary>>
*/
public function board(JobListFilter $filter, int $limitPerStatus = 100): array;
public function findDetails(int $id): ?CustomerJobDetails;
/**
* The job's history, newest first.
*
* @return list<JobChangeEntry>
*/
public function changes(int $jobId): array;
/**
* Stored tag names that contain the term, for suggestions.
*
* @return list<string>
*/
public function tagSuggestions(string $term = '', int $limit = 20): array;
/**
* Whether the user is a named member of the job in any role.
*/
public function isMember(int $jobId, int $userId): bool;
}