mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
Fix SocialWorkTypeFilter: allow null value in date, and avoid vuejs module ExportFormActionGoal to override the export form content
This commit is contained in:
@@ -206,6 +206,7 @@ class ListAccompanyingPeriodWorkAssociatePersonOnAccompanyingPeriod implements L
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
|
||||
{
|
||||
$centers = array_map(static fn ($el) => $el['center'], $acl);
|
||||
$calcDate = $data['calc_date'] ?? new RollingDate(RollingDate::T_TODAY);
|
||||
|
||||
$qb = $this->entityManager->createQueryBuilder();
|
||||
|
||||
@@ -220,7 +221,7 @@ class ListAccompanyingPeriodWorkAssociatePersonOnAccompanyingPeriod implements L
|
||||
->andWhere('acppart.startDate != acppart.endDate OR acppart.endDate IS NULL')
|
||||
// get participants at the given date
|
||||
->andWhere('acppart.startDate <= :calc_date AND (acppart.endDate > :calc_date OR acppart.endDate IS NULL)')
|
||||
->setParameter('calc_date', $this->rollingDateConverter->convert($data['calc_date']));
|
||||
->setParameter('calc_date', $this->rollingDateConverter->convert($calcDate));
|
||||
|
||||
if ($this->filterStatsByCenters) {
|
||||
$qb
|
||||
@@ -236,7 +237,7 @@ class ListAccompanyingPeriodWorkAssociatePersonOnAccompanyingPeriod implements L
|
||||
|
||||
AccompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb);
|
||||
|
||||
$this->addSelectClauses($qb, $this->rollingDateConverter->convert($data['calc_date']));
|
||||
$this->addSelectClauses($qb, $this->rollingDateConverter->convert($calcDate));
|
||||
|
||||
return $qb;
|
||||
}
|
||||
|
@@ -206,6 +206,7 @@ class ListAccompanyingPeriodWorkAssociatePersonOnWork implements ListInterface,
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
|
||||
{
|
||||
$centers = array_map(static fn ($el) => $el['center'], $acl);
|
||||
$calcDate = $data['calc_date'] ?? new RollingDate(RollingDate::T_TODAY);
|
||||
|
||||
$qb = $this->entityManager->createQueryBuilder();
|
||||
|
||||
@@ -231,7 +232,7 @@ class ListAccompanyingPeriodWorkAssociatePersonOnWork implements ListInterface,
|
||||
|
||||
AccompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb);
|
||||
|
||||
$this->addSelectClauses($qb, $this->rollingDateConverter->convert($data['calc_date']));
|
||||
$this->addSelectClauses($qb, $this->rollingDateConverter->convert($calcDate));
|
||||
|
||||
return $qb;
|
||||
}
|
||||
|
@@ -144,6 +144,9 @@ class SocialWorkTypeFilter implements FilterInterface
|
||||
$ids = [];
|
||||
|
||||
foreach ($asIterable as $value) {
|
||||
if (null === $value) {
|
||||
continue;
|
||||
}
|
||||
$ids[] = $value->getId();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user