added search modal for timesheet export (#2728)

This commit is contained in:
Kevin Papst
2021-08-24 19:01:48 +02:00
committed by GitHub
parent f6a82ba119
commit f743503705
40 changed files with 526 additions and 186 deletions

View File

@@ -25,6 +25,7 @@ use App\Repository\Loader\TimesheetLoader;
use App\Repository\Paginator\LoaderPaginator;
use App\Repository\Paginator\PaginatorInterface;
use App\Repository\Query\TimesheetQuery;
use App\Repository\Result\TimesheetResult;
use DateInterval;
use DateTime;
use Doctrine\DBAL\Types\Types;
@@ -749,7 +750,7 @@ class TimesheetRepository extends EntityRepository
* Especially the following question is still un-answered!
*
* Should a teamlead:
* 1 . see all records of his team-members, even if they recorded times for projects invisible to him
* 1. see all records of his team-members, even if they recorded times for projects invisible to him
* 2. only see records for projects which can be accessed by hom (current situation)
*/
private function addPermissionCriteria(QueryBuilder $qb, ?User $user = null, array $teams = []): bool
@@ -835,6 +836,13 @@ class TimesheetRepository extends EntityRepository
return $this->getHydratedResultsByQuery($qb, $fullyHydrated);
}
public function getTimesheetResult(TimesheetQuery $query): TimesheetResult
{
$qb = $this->getQueryBuilderForQuery($query);
return new TimesheetResult($qb);
}
/**
* @param QueryBuilder $qb
* @param bool $fullyHydrated