Files
Toiminnanohjaus/app/Modules/Dashboard/Application/DTOs/ManagementOverview.php
T

50 lines
1.7 KiB
PHP

<?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
* @param list<array{machineId: int, machine: string, item: string}> $lateMaintenance
*/
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,
public array $lateMaintenance = [],
public int $stockItemsToOrder = 0,
) {}
}