Commit 16872361 by Félicie

show added

parent 8e14715a
......@@ -26,6 +26,7 @@ use Sonata\AdminBundle\Datagrid\ListMapper;
use Sonata\AdminBundle\Datagrid\ProxyQueryInterface;
use Sonata\AdminBundle\Form\FormMapper;
use Sonata\AdminBundle\Route\RouteCollection;
use Sonata\AdminBundle\Show\ShowMapper;
use Sonata\DoctrineORMAdminBundle\Datagrid\OrderByToSelectWalker;
use Sonata\DoctrineORMAdminBundle\Filter\CallbackFilter;
use Sonata\Form\Type\DateTimeRangePickerType;
......@@ -118,6 +119,19 @@ class AdherentAdmin extends AbstractAdmin
]);
}
protected function configureShowFields(ShowMapper $showMapper): void
{
if ($this->getConfigurationPool()->getContainer()->getParameter('tav_env')) {
$adherent = $this->getSubject();
$balance = $adherent->getEmlcAccount()->getBalance();
$showMapper
->with('Solde', ['class' => 'col-md-12'])
->add('Solde : ' . $balance, TextType::class)
->end()
;
}
}
/**
* {@inheritdoc}
*/
......
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