Commit caf35aa1 by Félicie

adherent cotisation and prestataire table

parent 6bf0e0ca
...@@ -691,60 +691,100 @@ class PrestataireAdmin extends AbstractAdmin ...@@ -691,60 +691,100 @@ class PrestataireAdmin extends AbstractAdmin
]; ];
} }
} }
$listMapper // listmappers for each environment (pro & tav_env)
->addIdentifier('raisonAndIdmlc', 'html', [ if (!$this->getConfigurationPool()->getContainer()->getParameter('tav_env')) {
'label' => 'Raison', $listMapper
]) ->addIdentifier('raisonAndIdmlc', 'html', [
->add('groupe', null, [ 'label' => 'Raison',
'label' => 'Groupe', ])
'sortable' => true, ->add('groupe', null, [
'sort_field_mapping' => ['fieldName' => 'name'], 'label' => 'Groupe',
'sort_parent_association_mappings' => [['fieldName' => 'groupe']], 'sortable' => true,
]) 'sort_field_mapping' => ['fieldName' => 'name'],
// ->addIdentifier('users', null, array('label' => 'Gestionnaires')) 'sort_parent_association_mappings' => [['fieldName' => 'groupe']],
->add('rubriques', null) ])
->add('etats', null, [ // ->addIdentifier('users', null, array('label' => 'Gestionnaires'))
'label' => 'Tags', ->add('rubriques', null)
// 'editable' => true, ->add('etats', null, [
// 'class' => EtatPrestataire::class, 'label' => 'Tags',
// 'multiple' => true, // 'editable' => true,
// // 'required' => false, // 'class' => EtatPrestataire::class,
// // 'by_reference' => false, // 'multiple' => true,
// 'choices' => $this->getConfigurationPool()->getContainer()->get('doctrine')->getRepository(EtatPrestataire::class)->findBy(array('enabled' => true)) // // 'required' => false,
]) // // 'by_reference' => false,
->add( // 'choices' => $this->getConfigurationPool()->getContainer()->get('doctrine')->getRepository(EtatPrestataire::class)->findBy(array('enabled' => true))
'cotisation', ])
null, ->add(
[ 'cotisation',
'label' => 'Cotisation à jour', null,
'template' => '@kohinos/bundles/SonataAdminBundle/CRUD/list_presta_cotisation.html.twig', [
] 'label' => 'Cotisation à jour',
) 'template' => '@kohinos/bundles/SonataAdminBundle/CRUD/list_presta_cotisation.html.twig',
->add('users', null, [ ]
'label' => 'Gestionnaires [Cotisation à jour]',
'template' => '@kohinos/bundles/SonataAdminBundle/CRUD/list_presta_gestionnaires.html.twig', )
]) ->add('users', null, [
->add('enabled', null, [ 'label' => 'Gestionnaires [Cotisation à jour]',
'label' => 'Activé', 'template' => '@kohinos/bundles/SonataAdminBundle/CRUD/list_presta_gestionnaires.html.twig',
'editable' => true, ])
]) ->add('enabled', null, [
->add('acceptemlc', null, [ 'label' => 'Activé',
'label' => 'Accepte e-mlc', 'editable' => true,
'editable' => true, ])
]) ->add('acceptemlc', null, [
->add('createdAt', 'date', [ 'label' => 'Accepte e-mlc',
'pattern' => 'dd/MM/YYYY HH:mm', 'editable' => true,
'label' => 'Crée le', ])
]) ->add('createdAt', 'date', [
->add('updatedAt', 'date', [ 'pattern' => 'dd/MM/YYYY HH:mm',
'pattern' => 'dd/MM/YYYY HH:mm', 'label' => 'Crée le',
'label' => 'Mis à jour le', ])
]) ->add('updatedAt', 'date', [
// You may also specify the actions you want to be displayed in the list 'pattern' => 'dd/MM/YYYY HH:mm',
->add('_action', null, [ 'label' => 'Mis à jour le',
'actions' => $actions, ])
]) // You may also specify the actions you want to be displayed in the list
; ->add('_action', null, [
'actions' => $actions,
])
;
} else {
$listMapper
->addIdentifier('raisonAndIdmlc', 'html', [
'label' => 'Raison',
])
->add('groupe', null, [
'label' => 'Groupe',
'sortable' => true,
'sort_field_mapping' => ['fieldName' => 'name'],
'sort_parent_association_mappings' => [['fieldName' => 'groupe']],
])
->add('rubriques', null)
->add('etats', null, [
'label' => 'Tags',
])
->add('enabled', null, [
'label' => 'Activé',
'editable' => true,
])
->add('acceptemlc', null, [
'label' => 'Accepte e-mlc',
'editable' => true,
])
->add('createdAt', 'date', [
'pattern' => 'dd/MM/YYYY HH:mm',
'label' => 'Crée le',
])
->add('updatedAt', 'date', [
'pattern' => 'dd/MM/YYYY HH:mm',
'label' => 'Mis à jour le',
])
// You may also specify the actions you want to be displayed in the list
->add('_action', null, [
'actions' => $actions,
])
;
}
} }
protected function configureRoutes(RouteCollection $collection) protected function configureRoutes(RouteCollection $collection)
......
{% if false == isCotisationValid(app.user) %} {% if false and not tav_env == isCotisationValid(app.user) %}
<div class='text-danger mb-3'>{{ 'Si vous souhaitez utiliser les fonctionnalités de votre compte, vous devez avoir une cotisation valide !'|trans }}</div> <div class='text-danger mb-3'>{{ 'Si vous souhaitez utiliser les fonctionnalités de votre compte, vous devez avoir une cotisation valide !'|trans }}</div>
{% endif %} {% endif %}
......
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