mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
Feature: Add a list export for evaluation, actions and household
This commit is contained in:
@@ -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)
|
||||
);
|
||||
};
|
||||
}
|
||||
}
|
@@ -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) {
|
||||
|
@@ -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>
|
||||
|
Reference in New Issue
Block a user