Files
Toiminnanohjaus/app/Modules/Jobs/Application/Contracts/JobOverviewQueries.php
T
petriandClaude Sonnet 5.5 487a7d34ba Replace the demo home page with a dashboard
Everyone sees their open tasks on an agenda, their open jobs, this
week's hours and quick links. Admin and management also get a lazily
loaded management panel: things to do, the month so far against the
previous month, jobs and late work, and everyone's workload.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-25 09:20:02 +02:00

56 lines
1.4 KiB
PHP

<?php
declare(strict_types=1);
namespace App\Modules\Jobs\Application\Contracts;
use App\Modules\Jobs\Application\DTOs\CustomerJobSummary;
use App\Modules\Jobs\Application\DTOs\OpenTask;
/**
* Jobs and tasks summed up for the home page. Days are Y-m-d. Tasks of the
* quick sale jobs are left out: they only hold quick sale hours.
*/
interface JobOverviewQueries
{
/**
* Open tasks the user is the assignee or a member of, by due date (none
* last), then planned start.
*
* @return list<OpenTask>
*/
public function openTasksOf(int $userId): array;
/**
* The user's own jobs (5.6) that are still open (before done), by due
* date (none last), then newest first.
*
* @return list<CustomerJobSummary>
*/
public function openJobsOf(int $userId): array;
/**
* Jobs by Kanban status key (archived left out), every status included.
*
* @return array<string, int>
*/
public function jobCountsByStatus(): array;
/**
* Open jobs (before done) whose due date is before the day.
*/
public function overdueJobCount(string $today): int;
/**
* Open tasks whose due date is before the day.
*/
public function overdueTaskCount(string $today): int;
/**
* The open tasks that have been late the longest.
*
* @return list<OpenTask>
*/
public function oldestOverdueTasks(string $today, int $limit): array;
}