Kanban / timesheet update
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Modules\TimeTracking\Application\DTOs;
|
||||
|
||||
/**
|
||||
* A customer on the time sheet (level 1), in its own colour, with its jobs.
|
||||
*/
|
||||
final readonly class TimesheetCustomerGroup
|
||||
{
|
||||
/**
|
||||
* @param list<TimesheetJobGroup> $jobs
|
||||
*/
|
||||
public function __construct(
|
||||
public int $customerId,
|
||||
public string $name,
|
||||
public ?string $headerColor,
|
||||
public array $jobs,
|
||||
) {}
|
||||
|
||||
public function taskCount(): int
|
||||
{
|
||||
return array_sum(array_map(fn (TimesheetJobGroup $job): int => count($job->rows), $this->jobs));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user