Management's reports (spec 13) get their own module that reads the other modules through ports. The first report sums hours by person in a period, narrowed by service unit or customer, with breakdowns, a chart and CSV. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
20 lines
500 B
PHP
20 lines
500 B
PHP
<?php
|
|
|
|
namespace App\Modules\Reports\Infrastructure\Adapters;
|
|
|
|
use App\Modules\Reports\Application\Contracts\ReportPeople;
|
|
use App\Modules\Users\Application\Contracts\UserAccountQueries;
|
|
|
|
/**
|
|
* Users' names for reports through the Users module.
|
|
*/
|
|
class PeopleForReports implements ReportPeople
|
|
{
|
|
public function __construct(private UserAccountQueries $users) {}
|
|
|
|
public function namesByIds(array $ids): array
|
|
{
|
|
return $ids === [] ? [] : $this->users->namesByIds($ids);
|
|
}
|
|
}
|