Feature: Add a list export for evaluation, actions and household

This commit is contained in:
2023-01-26 14:22:30 +00:00
committed by Julien Fastré
parent 9ada19ef23
commit e54c2ca712
24 changed files with 1323 additions and 50 deletions

View File

@@ -0,0 +1,36 @@
<?php
declare(strict_types=1);
/*
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\MainBundle\Export\Helper;
/**
* This class provides support to transform aggregates datas in correct format string into column of exports.
*/
class AggregateStringHelper
{
public function getLabelMulti(string $key, array $values, string $header)
{
return static function ($value) use ($header) {
if ('_header' === $value) {
return $header;
}
if (null === $value || '' === $value) {
return '';
}
return implode(
'|',
json_decode($value, true)
);
};
}
}

View File

@@ -45,9 +45,9 @@ class UserHelper
public function getLabelMulti($key, array $values, string $header): callable
{
return function ($value) {
return function ($value) use ($header) {
if ('_header' === $value) {
return 'users name';
return $header;
}
if (null === $value) {

View File

@@ -260,11 +260,11 @@
{% block pick_rolling_date_widget %}
<div data-rolling-date="{{ form.vars['uniqid'] }}" class="row">
<div class="roll-wrapper col-sm-6">
<div class="roll-wrapper">
{{ form_widget(form.roll, { 'attr': { 'data-roll-picker': 'data-roll-picker'}}) }}
{{ form_errors(form.roll) }}
</div>
<div class="fixed-wrapper col-sm-6">
<div class="fixed-wrapper">
{{ form_widget(form.fixedDate) }}
{{ form_errors(form.fixedDate) }}
</div>