Commit 19bb52a8 by Julien Jorry

Fix error date cotisation + remove bouton switch user + fix page list

parent be1ee842
......@@ -15,9 +15,11 @@ use Sonata\AdminBundle\Show\ShowMapper;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\Extension\Core\Type\DateTimeType;
use Symfony\Component\Form\Extension\Core\Type\DateType;
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
use Symfony\Component\Form\Extension\Core\Type\MoneyType;
use Symfony\Component\Intl\DateFormatter\IntlDateFormatter;
use Symfony\Component\Security\Core\Security;
/**
......@@ -96,17 +98,19 @@ class CotisationAdmin extends AbstractAdmin
}
$formMapper->end()
->with('Date', ['class' => 'col-md-4'])
->add('cotisationInfos.debut', DateType::class, array(
->add('cotisationInfos.debut', DateTimeType::class, array(
'label' => 'Date de début',
'widget' => 'single_text',
'html5' => false,
'attr' => ['class' => 'js-datepicker'],
// 'html5' => false,
'date_format' => IntlDateFormatter::SHORT,
// 'attr' => ['class' => 'js-datepicker'],
))
->add('cotisationInfos.fin', DateType::class, array(
->add('cotisationInfos.fin', DateTimeType::class, array(
'label' => 'Date de fin',
'widget' => 'single_text',
'html5' => false,
'attr' => ['class' => 'js-datepicker'],
// 'html5' => false,
'date_format' => IntlDateFormatter::SHORT,
// 'attr' => ['class' => 'js-datepicker'],
))
->end()
;
......
......@@ -297,6 +297,6 @@ abstract class Flux
if (empty($this->getDestinataire()) || empty($this->getExpediteur()) || empty($this->getMontant())) {
return "[FLUX] Visualisation impossible ! Destinataire / Expéditeur et/ou montant manquant(s) !";
}
return $this->getCreatedAt()->format('d/m/Y H:i').' | '.ucwords($this->getParenttype()).' : '.$this->getDestinataire().' => '.$this->getExpediteur().' ; '.$this->getMontant().'€';
return ($this->getCreatedAt()?$this->getCreatedAt()->format('d/m/Y H:i').' | ':'').ucwords($this->getParenttype()).' : '.$this->getDestinataire().' => '.$this->getExpediteur().' ; '.$this->getMontant().'€';
}
}
{# UNIQUEMENT POUR LES TESTS #}
{% if app.environment == 'dev' and is_granted('ROLE_USER') %}
{#% if app.environment == 'dev' and is_granted('ROLE_USER') %}
{% set routeName = routeName|default('index')%}
{% if is_granted('ROLE_PREVIOUS_ADMIN') %}
<div class='w-100 text-center mb-2'>
......@@ -24,18 +24,6 @@
<a class='btn btn-xs m-1 btn-primary' href='{{path(routeName, [], true)}}?_switch_user=user_gestiongroupe'>
{{ 'GESTION GROUPE'|trans }}
</a>
{# <span class="dropdown">
<a href="#" class='btn btn-xs m-1 btn-primary dropdown-toggle' id="dropdownMenuButton" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
{{ 'GESTION GROUPE'|trans }}
</a>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
{% for groupe in getAllGroupes() %}
{% for user in groupe.gestionnaires %}
<a class="dropdown-item" href="{{path(routeName, [], true)}}?_switch_user='{{user.username}}">{{groupe}} ({{user}})</a>
{% endfor %}
{% endfor %}
</div>
</span> #}
<a class='btn btn-xs m-1 btn-primary' href='{{path(routeName, [], true)}}?_switch_user=user_contact'>
{{ 'CONTACT'|trans }}
</a>
......@@ -50,7 +38,7 @@
</a>
</div>
{% endif %}
{% endif %}
{% endif %#}
{# ACTIONS PRINCIPALES POUR CHAQUE UTILISATEUR CONNECTE #}
<div id="accordion">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment