Feature: [export][action] Filter 'active' action: which does not have an end date

This commit is contained in:
Julien Fastré 2022-11-02 14:39:36 +01:00
parent b42e1a9a05
commit 2ee362bfd5
3 changed files with 9 additions and 5 deletions

View File

@ -23,9 +23,9 @@ class CurrentActionFilter implements FilterInterface
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
public function alterQuery(QueryBuilder $qb, $data): void
{
$qb->andWhere('acpw.startDate IS NULL');
$qb->andWhere('acpw.endDate IS NULL');
}
public function applyOn(): string
@ -33,7 +33,7 @@ class CurrentActionFilter implements FilterInterface
return Declarations::SOCIAL_WORK_ACTION_TYPE;
}
public function buildForm(FormBuilderInterface $builder)
public function buildForm(FormBuilderInterface $builder): void
{
//no form
}

View File

@ -38,6 +38,10 @@ services:
- { name: chill.export_filter, alias: social_work_actions_treatingagent_filter }
Chill\PersonBundle\Export\Filter\SocialWorkFilters\CurrentActionFilter:
autowire: true
autoconfigure: true
tags:
- { name: chill.export_filter, alias: social_work_actions_current_filter }
## AGGREGATORS
chill.person.export.aggregator_action_type:
@ -89,4 +93,4 @@ services:
tags:
- { name: chill.export_aggregator, alias: social_work_actions_goal_result_aggregator }
Chill\PersonBundle\Export\Aggregator\SocialWorkAggregators\CurrentActionAggregator:
Chill\PersonBundle\Export\Aggregator\SocialWorkAggregators\CurrentActionAggregator:

View File

@ -578,7 +578,7 @@ Filter by creator job: Filtrer les parcours par métier du créateur
Group by creator job: Grouper les parcours par métier du créateur
Filter by current actions: Filtrer les actions en cours
Filtered by current action: Filtré les actions en cours
Filtered by current action: 'Filtré: uniquement les actions en cours (sans date de fin)'
Group by current actions: Grouper les actions en cours
Current action: Actions en cours
Not current action: Actions terminées