mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 22:04:23 +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;
|
namespace Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters;
|
||||||
|
|
||||||
use Chill\MainBundle\Export\FilterInterface;
|
use Chill\MainBundle\Export\FilterInterface;
|
||||||
|
use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork;
|
||||||
use Chill\PersonBundle\Export\Declarations;
|
use Chill\PersonBundle\Export\Declarations;
|
||||||
use Doctrine\ORM\QueryBuilder;
|
use Doctrine\ORM\QueryBuilder;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
use function in_array;
|
|
||||||
|
|
||||||
class HasNoActionFilter implements FilterInterface
|
class HasNoActionFilter implements FilterInterface
|
||||||
{
|
{
|
||||||
@ -24,13 +24,9 @@ class HasNoActionFilter implements FilterInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data)
|
public function alterQuery(QueryBuilder $qb, $data): void
|
||||||
{
|
{
|
||||||
if (!in_array('acpw', $qb->getAllAliases(), true)) {
|
$qb->andWhere('NOT EXISTS (SELECT 1 FROM ' . AccompanyingPeriodWork::class . ' work WHERE work.accompanyingPeriod = acp)');
|
||||||
$qb->join('acp.works', 'acpw');
|
|
||||||
}
|
|
||||||
|
|
||||||
$qb->andWhere('COUNT(acp.works) IS NULL');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function applyOn(): string
|
public function applyOn(): string
|
||||||
@ -38,7 +34,7 @@ class HasNoActionFilter implements FilterInterface
|
|||||||
return Declarations::ACP_TYPE;
|
return Declarations::ACP_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
// no form
|
// 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%"
|
"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
|
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
|
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
|
Group by number of actions: Grouper les parcours par nombre d’actions
|
||||||
Filter by creator: Filtrer les parcours par créateur
|
Filter by creator: Filtrer les parcours par créateur
|
||||||
Filter by creator job: Filtrer les parcours par métier du créateur
|
Filter by creator job: Filtrer les parcours par métier du créateur
|
||||||
|
Loading…
x
Reference in New Issue
Block a user