mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Do not display evaluation from closed accompanying period on homepage
This commit is contained in:
parent
8516e89c9c
commit
ab6feef371
6
.changes/unreleased/Fixed-20240416-161817.yaml
Normal file
6
.changes/unreleased/Fixed-20240416-161817.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
kind: Fixed
|
||||||
|
body: Fix broken link in homepage when a evaluation from a closed acc period was present
|
||||||
|
in the homepage widget
|
||||||
|
time: 2024-04-16T16:18:17.888645172+02:00
|
||||||
|
custom:
|
||||||
|
Issue: "270"
|
@ -12,6 +12,7 @@ declare(strict_types=1);
|
|||||||
namespace Chill\PersonBundle\Repository\AccompanyingPeriod;
|
namespace Chill\PersonBundle\Repository\AccompanyingPeriod;
|
||||||
|
|
||||||
use Chill\MainBundle\Entity\User;
|
use Chill\MainBundle\Entity\User;
|
||||||
|
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||||
use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork;
|
use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork;
|
||||||
use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluation;
|
use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluation;
|
||||||
use Doctrine\ORM\EntityManagerInterface;
|
use Doctrine\ORM\EntityManagerInterface;
|
||||||
@ -88,6 +89,7 @@ class AccompanyingPeriodWorkEvaluationRepository implements ObjectRepository
|
|||||||
->where(
|
->where(
|
||||||
$qb->expr()->andX(
|
$qb->expr()->andX(
|
||||||
$qb->expr()->isNull('e.endDate'),
|
$qb->expr()->isNull('e.endDate'),
|
||||||
|
$qb->expr()->neq('period.step', ':closed'),
|
||||||
$qb->expr()->gte(':now', $qb->expr()->diff('e.maxDate', 'e.warningInterval')),
|
$qb->expr()->gte(':now', $qb->expr()->diff('e.maxDate', 'e.warningInterval')),
|
||||||
$qb->expr()->orX(
|
$qb->expr()->orX(
|
||||||
$qb->expr()->eq('period.user', ':user'),
|
$qb->expr()->eq('period.user', ':user'),
|
||||||
@ -100,6 +102,7 @@ class AccompanyingPeriodWorkEvaluationRepository implements ObjectRepository
|
|||||||
->setParameters([
|
->setParameters([
|
||||||
'user' => $user,
|
'user' => $user,
|
||||||
'now' => new \DateTimeImmutable('now'),
|
'now' => new \DateTimeImmutable('now'),
|
||||||
|
'closed' => AccompanyingPeriod::STEP_CLOSED,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return $qb;
|
return $qb;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user