diff --git a/.changes/unreleased/Feature-20231116-115315.yaml b/.changes/unreleased/Feature-20231116-115315.yaml new file mode 100644 index 000000000..c63dec5f8 --- /dev/null +++ b/.changes/unreleased/Feature-20231116-115315.yaml @@ -0,0 +1,6 @@ +kind: Feature +body: 'Export: in filter "Filter accompanying period work (social action) by type, + goal and result", order the items alphabetically or with the defined order' +time: 2023-11-16T11:53:15.32989153+01:00 +custom: + Issue: "161" diff --git a/.changes/unreleased/Fixed-20231116-142207.yaml b/.changes/unreleased/Fixed-20231116-142207.yaml new file mode 100644 index 000000000..9f3d927ef --- /dev/null +++ b/.changes/unreleased/Fixed-20231116-142207.yaml @@ -0,0 +1,6 @@ +kind: Fixed +body: 'Export: on filter "action by type goals, and results", restore the fields when + editing a saved export' +time: 2023-11-16T14:22:07.968973002+01:00 +custom: + Issue: "141" diff --git a/.changes/unreleased/Fixed-20231123-144502.yaml b/.changes/unreleased/Fixed-20231123-144502.yaml new file mode 100644 index 000000000..b48617823 --- /dev/null +++ b/.changes/unreleased/Fixed-20231123-144502.yaml @@ -0,0 +1,5 @@ +kind: Fixed +body: 'Export: fix the list of accompanying period work, when the "calc date" is null' +time: 2023-11-23T14:45:02.839510554+01:00 +custom: + Issue: "219" diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriodWorkAssociatePersonOnAccompanyingPeriod.php b/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriodWorkAssociatePersonOnAccompanyingPeriod.php index 49b21ef69..585df6586 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriodWorkAssociatePersonOnAccompanyingPeriod.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriodWorkAssociatePersonOnAccompanyingPeriod.php @@ -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; } diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriodWorkAssociatePersonOnWork.php b/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriodWorkAssociatePersonOnWork.php index 4e68d5341..fbde42263 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriodWorkAssociatePersonOnWork.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriodWorkAssociatePersonOnWork.php @@ -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; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/SocialWorkTypeFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/SocialWorkTypeFilter.php index 3476bc33e..c84ed7f40 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/SocialWorkTypeFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/SocialWorkTypeFilter.php @@ -144,6 +144,9 @@ class SocialWorkTypeFilter implements FilterInterface $ids = []; foreach ($asIterable as $value) { + if (null === $value) { + continue; + } $ids[] = $value->getId(); } diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/ExportFormActionGoalResult/App.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/ExportFormActionGoalResult/App.vue index 322ee3750..3b23ab0ad 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/ExportFormActionGoalResult/App.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/ExportFormActionGoalResult/App.vue @@ -1,5 +1,4 @@