Query hints & persistent cache for latest approvals (#5176)

This commit is contained in:
Kevin Papst
2024-11-25 21:04:53 +01:00
committed by GitHub
parent 46c4449504
commit f13b81ede7
11 changed files with 162 additions and 81 deletions

View File

@@ -19,6 +19,7 @@ use App\Form\Model\MultiUserTimesheet;
use App\Form\TimesheetAdminEditForm;
use App\Form\TimesheetMultiUserEditForm;
use App\Repository\Query\TimesheetQuery;
use App\Repository\Query\TimesheetQueryHint;
use App\Utils\PageSetup;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Form\FormInterface;
@@ -180,6 +181,7 @@ final class TimesheetTeamController extends TimesheetAbstractController
protected function prepareQuery(TimesheetQuery $query): void
{
$query->setCurrentUser($this->getUser());
$query->addQueryHint(TimesheetQueryHint::USER_PREFERENCES); // e.g. for latest approval
}
protected function getCreateForm(Timesheet $entry): FormInterface