mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Minor fixes
This commit is contained in:
parent
5b2a2a1bc5
commit
b9890d1302
@ -46,14 +46,19 @@ final readonly class WithParticipationBetweenDatesFilter implements FilterInterf
|
||||
|
||||
$qb
|
||||
->andWhere(
|
||||
$qb->expr()->andX(
|
||||
$qb->expr()->exists(
|
||||
"SELECT 1 FROM ".AccompanyingPeriodParticipation::class." {$p}_acp ".
|
||||
"WHERE {$p}_acp.person = person ".
|
||||
"AND OVERLAPSI ({$p}_acp.openingDate, {$p}_acp.closingDate), (:{$p}_date_after), :{$p}_date_before)) = TRUE"),
|
||||
$qb->expr()->exists(
|
||||
'SELECT 1 FROM '.AccompanyingPeriodParticipation::class." {$p}_acpp ".
|
||||
"WHERE {$p}_acpp.person = person ".
|
||||
"AND OVERLAPSI (acpp.startDate, acpp.endDate), (:{$p}_date_after), :{$p}_date_before)) = 'TRUE' ")
|
||||
"AND OVERLAPSI ({$p}_acpp.startDate, {$p}_acpp.endDate), (:{$p}_date_after), :{$p}_date_before)) = TRUE")
|
||||
)
|
||||
)
|
||||
->setParameter("{$p}_date_after", $this->rollingDateConverter->convert($data['date_after']), Types::DATE_IMMUTABLE)
|
||||
->setParameter("{$p}_date_before", $this->rollingDateConverter->convert($data['date_before']), Types::DATE_IMMUTABLE);
|
||||
|
||||
}
|
||||
|
||||
public function applyOn(): string
|
||||
@ -75,7 +80,7 @@ final readonly class WithParticipationBetweenDatesFilter implements FilterInterf
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [
|
||||
'date_after' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START),
|
||||
'date_after' => new RollingDate(RollingDate::T_YEAR_CURRENT_START),
|
||||
'date_before' => new RollingDate(RollingDate::T_TODAY),
|
||||
];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user