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]>
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Modules\Dashboard\Application\DTOs;
|
||||
|
||||
/**
|
||||
* The management panel of the home page on a day:
|
||||
*
|
||||
* - to do: hours waiting for approval by person, done jobs waiting for
|
||||
* billing, the open billing draft, unclosed cash days and the value of
|
||||
* unbilled hours;
|
||||
* - this month so far against the same days of the previous month;
|
||||
* - the jobs by status, late jobs and late tasks (the oldest of them);
|
||||
* - everyone's workload this week and next (Mondays given).
|
||||
*/
|
||||
final readonly class ManagementOverview
|
||||
{
|
||||
/**
|
||||
* @param list<PendingApproval> $pendingApprovals
|
||||
* @param list<string> $unclosedCashDays
|
||||
* @param array<string, int> $jobCounts
|
||||
* @param list<WorkTask> $oldestOverdueTasks
|
||||
* @param list<PersonLoad> $workloads
|
||||
*/
|
||||
public function __construct(
|
||||
public array $pendingApprovals,
|
||||
public int $doneJobCount,
|
||||
public ?int $draftExportId,
|
||||
public array $unclosedCashDays,
|
||||
public int $unbilledValueCents,
|
||||
public string $monthFrom,
|
||||
public string $monthTo,
|
||||
public string $previousFrom,
|
||||
public string $previousTo,
|
||||
public PeriodFigures $month,
|
||||
public PeriodFigures $previousMonth,
|
||||
public array $jobCounts,
|
||||
public int $overdueJobCount,
|
||||
public int $overdueTaskCount,
|
||||
public array $oldestOverdueTasks,
|
||||
public string $thisMonday,
|
||||
public string $nextMonday,
|
||||
public array $workloads,
|
||||
) {}
|
||||
}
|
||||
Reference in New Issue
Block a user