mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Feature: [export] filter accompanying period which has no action - work
This commit is contained in:
parent
24873f0cc2
commit
51ac4e0938
@ -12,10 +12,10 @@ declare(strict_types=1);
|
||||
namespace Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters;
|
||||
|
||||
use Chill\MainBundle\Export\FilterInterface;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork;
|
||||
use Chill\PersonBundle\Export\Declarations;
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use function in_array;
|
||||
|
||||
class HasNoActionFilter implements FilterInterface
|
||||
{
|
||||
@ -24,13 +24,9 @@ class HasNoActionFilter implements FilterInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
if (!in_array('acpw', $qb->getAllAliases(), true)) {
|
||||
$qb->join('acp.works', 'acpw');
|
||||
}
|
||||
|
||||
$qb->andWhere('COUNT(acp.works) IS NULL');
|
||||
$qb->andWhere('NOT EXISTS (SELECT 1 FROM ' . AccompanyingPeriodWork::class . ' work WHERE work.accompanyingPeriod = acp)');
|
||||
}
|
||||
|
||||
public function applyOn(): string
|
||||
@ -38,7 +34,7 @@ class HasNoActionFilter implements FilterInterface
|
||||
return Declarations::ACP_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
// no form
|
||||
}
|
||||
|
@ -569,7 +569,7 @@ Filter by which has no referrer: Filtrer les parcours sans référent
|
||||
"Filtered acp which has no referrer on date: %date%": "Filtré les parcours sans référent à cette date: %date%"
|
||||
Has no referrer on this date: N'a pas de référent à cette date
|
||||
Filter by which has no action: Filtrer les parcours qui n’ont pas d’actions
|
||||
Filtered acp which has no actions: Filtré les parcours qui n'ont pas d'actions
|
||||
Filtered acp which has no actions: 'Filtré: uniquement les parcours qui n''ont pas d''actions'
|
||||
Group by number of actions: Grouper les parcours par nombre d’actions
|
||||
Filter by creator: Filtrer les parcours par créateur
|
||||
Filter by creator job: Filtrer les parcours par métier du créateur
|
||||
|
Loading…
x
Reference in New Issue
Block a user