Files
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

53 lines
1.3 KiB
PHP

<?php
declare(strict_types=1);
namespace App\Modules\Dashboard\Application\Contracts;
use App\Modules\Dashboard\Application\DTOs\WorkJob;
use App\Modules\Dashboard\Application\DTOs\WorkTask;
/**
* Jobs, tasks and their bookings, from the Jobs module. Days are Y-m-d;
* lateness is decided by the Dashboard, so isLate is false here.
*/
interface DashboardWork
{
/**
* @return list<WorkTask>
*/
public function openTasksOf(int $userId): array;
/**
* @return list<WorkJob>
*/
public function openJobsOf(int $userId): array;
/**
* @return array<string, int> Kanban status key => jobs.
*/
public function jobCountsByStatus(): array;
public function overdueJobCount(string $today): int;
public function overdueTaskCount(string $today): int;
/**
* @return list<WorkTask>
*/
public function oldestOverdueTasks(string $today, int $limit): array;
/**
* The daily maximum a person's tasks may book, in minutes.
*/
public function dailyCapacityMinutes(): int;
/**
* Minutes the open tasks book per person in the days.
*
* @param list<int> $userIds
* @return array<int, int>
*/
public function bookedMinutes(array $userIds, string $from, string $to): array;
}