Commit 77be41c1 by Julien Jorry

FluxController factorisation + add transfert/transactions missing + fix add cotisation + other fixs

parent e5c4d0a6
...@@ -2091,3 +2091,6 @@ ...@@ -2091,3 +2091,6 @@
margin-left: auto !important; margin-left: auto !important;
} }
} }
.main-header .sidebar-toggle:before {
content: '' !important;
}
\ No newline at end of file
...@@ -43,7 +43,34 @@ sonata_admin: ...@@ -43,7 +43,34 @@ sonata_admin:
# button_list: '@SonataAdmin/Button/list_button.html.twig' # button_list: '@SonataAdmin/Button/list_button.html.twig'
# button_show: '@SonataAdmin/Button/show_button.html.twig' # button_show: '@SonataAdmin/Button/show_button.html.twig'
assets: assets:
extra_stylesheets: ['build/admin.css'] stylesheets:
# The default stylesheet list:
- bundles/sonatacore/vendor/bootstrap/dist/css/bootstrap.min.css
# - bundles/sonatacore/vendor/components-font-awesome/css/font-awesome.min.css
- fontawesome/css/fontawesome.min.css
- fontawesome/css/solid.css
- fontawesome/css/brands.css
# - public/fontawesome/css/v4-shims.css
- bundles/sonatacore/vendor/ionicons/css/ionicons.min.css
- bundles/sonataadmin/vendor/admin-lte/dist/css/AdminLTE.min.css
- bundles/sonataadmin/vendor/admin-lte/dist/css/skins/skin-black.min.css
- bundles/sonataadmin/vendor/iCheck/skins/square/blue.css
- bundles/sonatacore/vendor/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css
- bundles/sonataadmin/vendor/jqueryui/themes/base/jquery-ui.css
- bundles/sonatacore/vendor/select2/select2.css
- bundles/sonatacore/vendor/select2-bootstrap-css/select2-bootstrap.min.css
- bundles/sonataadmin/vendor/x-editable/dist/bootstrap3-editable/css/bootstrap-editable.css
- bundles/sonataadmin/css/styles.css
- bundles/sonataadmin/css/layout.css
- bundles/sonataadmin/css/tree.css
- bundles/sonataadmin/css/colors.css
extra_stylesheets:
- build/admin.css
# javascript paths to add to the page in addition to the list above
extra_javascripts:
# - fontawesome/js/all.js
# - public/fontawesome/js/v4-shims.js
dashboard: dashboard:
# DASHBOARD de l'admin # DASHBOARD de l'admin
# #
...@@ -155,7 +182,7 @@ sonata_admin: ...@@ -155,7 +182,7 @@ sonata_admin:
keep_open: false keep_open: false
label: Prestataires label: Prestataires
label_catalogue: SonataAdminBundle label_catalogue: SonataAdminBundle
icon: '<i class="fa fa-user-circle-o"></i>' icon: '<i class="fa fa-user-tie"></i>'
items: items:
- admin.prestataire.gerer - admin.prestataire.gerer
- admin.prestataire.cotisations - admin.prestataire.cotisations
...@@ -164,7 +191,7 @@ sonata_admin: ...@@ -164,7 +191,7 @@ sonata_admin:
on_top: true on_top: true
label: Groupes locaux label: Groupes locaux
label_catalogue: SonataAdminBundle label_catalogue: SonataAdminBundle
icon: '<i class="fa fa-bandcamp"></i>' icon: '<i class="fa fa-chess-rook"></i>'
items: items:
- admin.groupe.gerer - admin.groupe.gerer
sonata.admin.group.comptoir: sonata.admin.group.comptoir:
...@@ -187,7 +214,7 @@ sonata_admin: ...@@ -187,7 +214,7 @@ sonata_admin:
on_top: true on_top: true
label: "News" label: "News"
label_catalogue: SonataAdminBundle label_catalogue: SonataAdminBundle
icon: '<i class="fa fa-bars"></i>' icon: '<i class="fa fa-newspaper"></i>'
items: items:
- admin.news.gerer - admin.news.gerer
sonata.admin.group.document: sonata.admin.group.document:
...@@ -195,7 +222,7 @@ sonata_admin: ...@@ -195,7 +222,7 @@ sonata_admin:
on_top: true on_top: true
label: "Documents" label: "Documents"
label_catalogue: SonataAdminBundle label_catalogue: SonataAdminBundle
icon: '<i class="fa fa-file-text"></i>' icon: '<i class="fa fa-file"></i>'
items: items:
- admin.document.gerer - admin.document.gerer
sonata.admin.group.page: sonata.admin.group.page:
...@@ -203,7 +230,7 @@ sonata_admin: ...@@ -203,7 +230,7 @@ sonata_admin:
on_top: true on_top: true
label: "Pages" label: "Pages"
label_catalogue: SonataAdminBundle label_catalogue: SonataAdminBundle
icon: '<i class="fa fa-newspaper-o"></i>' icon: '<i class="fa fa-pager"></i>'
items: items:
- admin.page.gerer - admin.page.gerer
sonata.admin.group.rubrique: sonata.admin.group.rubrique:
...@@ -234,7 +261,7 @@ sonata_admin: ...@@ -234,7 +261,7 @@ sonata_admin:
keep_open: false keep_open: false
label: "Flux" label: "Flux"
label_catalogue: SonataAdminBundle label_catalogue: SonataAdminBundle
icon: '<i class="fa fa-euro"></i>' icon: '<i class="fa fa-euro-sign"></i>'
items: items:
- admin.flux.gerer - admin.flux.gerer
- admin.all.cotisations - admin.all.cotisations
......
...@@ -90,7 +90,7 @@ class CotisationAdherentAdmin extends CotisationAdmin ...@@ -90,7 +90,7 @@ class CotisationAdherentAdmin extends CotisationAdmin
->add('expediteur', EntityType::class, array( ->add('expediteur', EntityType::class, array(
'label' => 'Expéditeur', 'label' => 'Expéditeur',
'class' => Adherent::class, 'class' => Adherent::class,
'choices' => $this->getConfigurationPool()->getContainer()->get('doctrine')->getRepository(Adherent::class)->findBy(array('enabled' => true), array('lastname'=> 'ASC')), 'choices' => $this->getConfigurationPool()->getContainer()->get('doctrine')->getRepository(Adherent::class)->findBy(array('enabled' => true), array('user'=> 'ASC')),
'placeholder' => 'Choisir un adhérent', 'placeholder' => 'Choisir un adhérent',
'required' => true, 'required' => true,
)) ))
......
...@@ -29,6 +29,7 @@ use Symfony\Component\Form\Extension\Core\Type\CheckboxType; ...@@ -29,6 +29,7 @@ use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType; use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\Extension\Core\Type\CollectionType; use Symfony\Component\Form\Extension\Core\Type\CollectionType;
use Symfony\Component\Form\Extension\Core\Type\DateType; use Symfony\Component\Form\Extension\Core\Type\DateType;
use Symfony\Component\Form\Extension\Core\Type\MoneyType;
use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormEvent; use Symfony\Component\Form\FormEvent;
use Symfony\Component\Form\FormEvents; use Symfony\Component\Form\FormEvents;
...@@ -265,7 +266,7 @@ class PrestataireAdmin extends AbstractAdmin ...@@ -265,7 +266,7 @@ class PrestataireAdmin extends AbstractAdmin
$formMapper $formMapper
->with('Cotisation', ['class' => 'col-md-5']) ->with('Cotisation', ['class' => 'col-md-5'])
->add('user.cotisations.last.cotisationInfos.annee', TextType::class, array('label' => 'Année', 'data' => $now->format('Y'))) ->add('user.cotisations.last.cotisationInfos.annee', TextType::class, array('label' => 'Année', 'data' => $now->format('Y')))
->add('user.cotisations.last.montant', TextType::class, array( ->add('user.cotisations.last.montant', MoneyType::class, array(
'label' => 'Montant', 'label' => 'Montant',
'data' => $this->getConfigurationPool()->getContainer()->getParameter('cotisation_montant') 'data' => $this->getConfigurationPool()->getContainer()->getParameter('cotisation_montant')
)) ))
......
...@@ -21,9 +21,7 @@ class GroupAdmin extends BaseGroupAdmin ...@@ -21,9 +21,7 @@ class GroupAdmin extends BaseGroupAdmin
protected function configureRoutes(RouteCollection $collection) protected function configureRoutes(RouteCollection $collection)
{ {
$subject = $this->getSubject(); $subject = $this->getSubject();
if (!empty($subject) && !($subject->isGranted('ROLE_SUPER_ADMIN') || $subject->isGranted('ROLE_ADMIN_SIEGE'))) { $collection->clearExcept('list');
$collection->clearExcept('list');
}
} }
public function getBatchActions() public function getBatchActions()
......
...@@ -2,25 +2,27 @@ ...@@ -2,25 +2,27 @@
namespace App\Controller; namespace App\Controller;
use App\Entity\TransactionAdherentPrestataire; use Doctrine\ORM\EntityManagerInterface;
use App\Form\Type\TransactionAdherentPrestataireFormType;
use Nelmio\ApiDocBundle\Annotation\Security;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Form;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Translation\TranslatorInterface;
/** /**
* *
* Types de transfert : (Les transferts dans la structure sont les flux de billets détenus par les opérateurs.) * Types de transfert : (Les transferts dans la structure sont les flux de billets détenus par les opérateurs.)
* *
* - SIEGE => GROUPES LOCAUX (Transfert du siège au groupe) * - SIEGE => GROUPES LOCAUX (Transfert du siège au groupe)
* - GROUPE => SIEGE (Transfert du groupe au siège)
* - GROUPES LOCAUX => COMPTOIRS (Transfert du groupe au comptoir) * - GROUPES LOCAUX => COMPTOIRS (Transfert du groupe au comptoir)
* - COMPTOIRS => GROUPES LOCAUX (Transfert du comptoir au groupe) * - COMPTOIRS => GROUPES LOCAUX (Transfert du comptoir au groupe)
* - COMPTOIRS => ADHERENTS (Diffusion de monnaie papier auprès des adhérents) * - COMPTOIRS => ADHERENTS (Diffusion de monnaie papier auprès des adhérents)
* - COMPTOIRS => PRESTATAIRES (Diffusion de monnaie papier auprès des prestataires) * - COMPTOIRS => PRESTATAIRES (Diffusion de monnaie papier auprès des prestataires)
* - PRESTATAIRES => COMPTOIRS (Reconversion) * - PRESTATAIRES => COMPTOIRS (Reconversion)
* *
*
* Types de transaction : * Types de transaction :
* *
* - PRESTATAIRES => ADHERENTS (Virement vers un adherent) * - PRESTATAIRES => ADHERENTS (Virement vers un adherent)
...@@ -30,29 +32,37 @@ use Symfony\Component\Routing\Annotation\Route; ...@@ -30,29 +32,37 @@ use Symfony\Component\Routing\Annotation\Route;
*/ */
class FluxController extends AbstractController class FluxController extends AbstractController
{ {
// /** protected $translator;
// * @Route("/flux/transaction/adherent/prestataire", name="transactionAdherentPrestataire")
// */
// public function transactionAdherentPrestataireAction(Request $request)
// {
// $em = $this->getDoctrine()->getManager();
// $entity = new TransactionAdherentPrestataire();
// $entity->setOperateur($this->getUser());
// $form = $this->createForm(TransactionAdherentPrestataireFormType::class, $entity);
// $form->handleRequest($request);
// $data = $form->getData(); public function __construct(EntityManagerInterface $em, TranslatorInterface $translator)
// dump($data); {
$this->em = $em;
$this->translator = $translator;
}
// if ($form->isSubmitted() && $form->isValid()) { protected function manageFluxForm(Request $request, Form $form, $compte, $success, $title)
// //TODO : terminer fonction ;) {
// $em->persist($data); $form->handleRequest($request);
// $em->flush(); if ($form->isSubmitted() && $form->isValid()) {
// } $data = $form->getData();
$this->em->persist($data);
$this->em->flush();
$this->addFlash(
'success',
$success
);
$referer = $request->headers->get('referer');
if ($referer && !$request->isXmlHttpRequest()) {
return $this->redirect($referer);
} elseif (!$request->isXmlHttpRequest()) {
return new Response('', Response::HTTP_BAD_REQUEST);
}
}
// return $this->render('flux/transactionAdherentPrestataire.html.twig', [ return $this->render('flux/transaction.html.twig', [
// 'form' => $form->createView(), 'form' => $form->createView(),
// ]); 'compte' => $compte,
// } 'title' => $title
]);
}
} }
...@@ -21,7 +21,7 @@ use Symfony\Component\HttpFoundation\Response; ...@@ -21,7 +21,7 @@ use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Translation\TranslatorInterface; use Symfony\Component\Translation\TranslatorInterface;
class UserAdherentController extends AbstractController class UserAdherentController extends FluxController
{ {
protected $em; protected $em;
protected $translator; protected $translator;
...@@ -69,29 +69,13 @@ class UserAdherentController extends AbstractController ...@@ -69,29 +69,13 @@ class UserAdherentController extends AbstractController
$entity->setOperateur($this->getUser()); $entity->setOperateur($this->getUser());
$entity->setExpediteur($this->getUser()->getAdherent()); $entity->setExpediteur($this->getUser()->getAdherent());
$form = $this->createForm(TransactionAdherentPrestataireFormType::class, $entity); $form = $this->createForm(TransactionAdherentPrestataireFormType::class, $entity);
$form->handleRequest($request); return $this->manageFluxForm(
$request,
if ($form->isSubmitted() && $form->isValid()) { $form,
$data = $form->getData(); $this->getUser()->getAdherent()->getCompte(),
$this->em->persist($data); $this->translator->trans('Transaction à un prestataire bien effectuée !'),
$this->em->flush(); $this->translator->trans('Transaction à un prestataire')
$this->addFlash( );
'success',
$this->translator->trans('Transaction bien effectuée !')
);
$referer = $request->headers->get('referer');
if ($referer && !$request->isXmlHttpRequest()) {
return $this->redirect($referer);
} elseif (!$request->isXmlHttpRequest()) {
return new Response('', Response::HTTP_BAD_REQUEST);
}
}
return $this->render('flux/transaction.html.twig', [
'form' => $form->createView(),
'compte' => $this->getUser()->getAdherent()->getCompte(),
'title' => $this->translator->trans('Transaction à un prestataire')
]);
} }
/** /**
...@@ -107,28 +91,12 @@ class UserAdherentController extends AbstractController ...@@ -107,28 +91,12 @@ class UserAdherentController extends AbstractController
$entity->setOperateur($this->getUser()); $entity->setOperateur($this->getUser());
$entity->setExpediteur($this->getUser()->getAdherent()); $entity->setExpediteur($this->getUser()->getAdherent());
$form = $this->createForm(TransactionAdherentAdherentFormType::class, $entity); $form = $this->createForm(TransactionAdherentAdherentFormType::class, $entity);
$form->handleRequest($request); return $this->manageFluxForm(
$request,
if ($form->isSubmitted() && $form->isValid()) { $form,
$data = $form->getData(); $this->getUser()->getAdherent()->getCompte(),
$this->em->persist($data); $this->translator->trans('Transaction à un adhérent bien effectuée !'),
$this->em->flush(); $this->translator->trans('Transaction à un adhérent')
$this->addFlash( );
'success',
$this->translator->trans('Transaction bien effectuée !')
);
$referer = $request->headers->get('referer');
if ($referer && !$request->isXmlHttpRequest()) {
return $this->redirect($referer);
} elseif (!$request->isXmlHttpRequest()) {
return new Response('', Response::HTTP_BAD_REQUEST);
}
}
return $this->render('flux/transaction.html.twig', [
'form' => $form->createView(),
'compte' => $this->getUser()->getAdherent()->getCompte(),
'title' => $this->translator->trans('Transaction à un adhérent')
]);
} }
} }
...@@ -8,6 +8,7 @@ use App\Entity\Geoloc; ...@@ -8,6 +8,7 @@ use App\Entity\Geoloc;
use App\Entity\Groupe; use App\Entity\Groupe;
use App\Entity\TransactionAdherentPrestataire; use App\Entity\TransactionAdherentPrestataire;
use App\Entity\TransfertComptoirAdherent; use App\Entity\TransfertComptoirAdherent;
use App\Entity\TransfertComptoirPrestataire;
use App\Entity\TransfertPrestataireComptoir; use App\Entity\TransfertPrestataireComptoir;
use App\Entity\Usergroup; use App\Entity\Usergroup;
use App\Form\Type\AdherentInfosFormType; use App\Form\Type\AdherentInfosFormType;
...@@ -15,26 +16,18 @@ use App\Form\Type\AdhererFormType; ...@@ -15,26 +16,18 @@ use App\Form\Type\AdhererFormType;
use App\Form\Type\GroupeInfosFormType; use App\Form\Type\GroupeInfosFormType;
use App\Form\Type\TransactionAdherentPrestataireFormType; use App\Form\Type\TransactionAdherentPrestataireFormType;
use App\Form\Type\TransfertComptoirAdherentFormType; use App\Form\Type\TransfertComptoirAdherentFormType;
use App\Form\Type\TransfertComptoirPrestataireFormType;
use App\Form\Type\TransfertPrestataireComptoirFormType; use App\Form\Type\TransfertPrestataireComptoirFormType;
use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
use FOS\UserBundle\Model\UserManagerInterface; use FOS\UserBundle\Model\UserManagerInterface;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Translation\TranslatorInterface; use Symfony\Component\Translation\TranslatorInterface;
class UserComptoirController extends AbstractController class UserComptoirController extends FluxController
{ {
protected $translator;
public function __construct(EntityManagerInterface $em, TranslatorInterface $translator)
{
$this->em = $em;
$this->translator = $translator;
}
/** /**
* @Route("/user/comptoir/infos", name="comptoir_infos") * @Route("/user/comptoir/infos", name="comptoir_infos")
* @IsGranted("ROLE_COMPTOIR") * @IsGranted("ROLE_COMPTOIR")
...@@ -72,29 +65,31 @@ class UserComptoirController extends AbstractController ...@@ -72,29 +65,31 @@ class UserComptoirController extends AbstractController
$entity = new TransfertComptoirAdherent(); $entity = new TransfertComptoirAdherent();
$entity->setOperateur($this->getUser()); $entity->setOperateur($this->getUser());
$form = $this->createForm(TransfertComptoirAdherentFormType::class, $entity); $form = $this->createForm(TransfertComptoirAdherentFormType::class, $entity);
$form->handleRequest($request); return $this->manageFluxForm(
$request,
if ($form->isSubmitted() && $form->isValid()) { $form,
$data = $form->getData(); $this->getUser()->getComptoirsgere()->getCompte(),
$this->em->persist($data); $this->translator->trans('Transfert à un adhérent bien effectuée !'),
$this->em->flush(); $this->translator->trans('Transfert à un adhérent')
$this->addFlash( );
'success', }
$this->translator->trans('Transfert bien effectuée !')
);
$referer = $request->headers->get('referer');
if ($referer && !$request->isXmlHttpRequest()) {
return $this->redirect($referer);
} elseif (!$request->isXmlHttpRequest()) {
return new Response('', Response::HTTP_BAD_REQUEST);
}
}
return $this->render('flux/transaction.html.twig', [ /**
'form' => $form->createView(), * @Route("/user/comptoir/transfert/prestataire/", name="transfertComptoirPrestataire")
'compte' => $this->getUser()->getComptoirsgere()->getCompte(), * @IsGranted("ROLE_COMPTOIR")
'title' => $this->translator->trans('Transfert à un adhérent') */
]); public function transfertComptoirPrestataireAction(Request $request)
{
$entity = new TransfertComptoirPrestataire();
$entity->setOperateur($this->getUser());
$form = $this->createForm(TransfertComptoirPrestataireFormType::class, $entity);
return $this->manageFluxForm(
$request,
$form,
$this->getUser()->getComptoirsgere()->getCompte(),
$this->translator->trans('Transfert à un prestataire bien effectuée !'),
$this->translator->trans('Transfert à un prestataire')
);
} }
/** /**
...@@ -106,28 +101,12 @@ class UserComptoirController extends AbstractController ...@@ -106,28 +101,12 @@ class UserComptoirController extends AbstractController
$entity = new TransfertPrestataireComptoir(); $entity = new TransfertPrestataireComptoir();
$entity->setOperateur($this->getUser()); $entity->setOperateur($this->getUser());
$form = $this->createForm(TransfertPrestataireComptoirFormType::class, $entity); $form = $this->createForm(TransfertPrestataireComptoirFormType::class, $entity);
$form->handleRequest($request); return $this->manageFluxForm(
$request,
if ($form->isSubmitted() && $form->isValid()) { $form,
$data = $form->getData(); $this->getUser()->getComptoirsgere()->getCompte(),
$this->em->persist($data); $this->translator->trans('Reconversion bien effectuée !'),
$this->em->flush(); $this->translator->trans("Reconversion d'un prestataire")
$this->addFlash( );
'success',
$this->translator->trans('Reconversion bien effectuée !')
);
$referer = $request->headers->get('referer');
if ($referer && !$request->isXmlHttpRequest()) {
return $this->redirect($referer);
} elseif (!$request->isXmlHttpRequest()) {
return new Response('', Response::HTTP_BAD_REQUEST);
}
}
return $this->render('flux/transaction.html.twig', [
'form' => $form->createView(),
'compte' => $this->getUser()->getComptoirsgere()->getCompte(),
'title' => $this->translator->trans("Reconversion d'un prestataire")
]);
} }
} }
...@@ -24,17 +24,8 @@ use Symfony\Component\HttpFoundation\Response; ...@@ -24,17 +24,8 @@ use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Translation\TranslatorInterface; use Symfony\Component\Translation\TranslatorInterface;
class UserGestionnaireGroupeController extends AbstractController class UserGestionnaireGroupeController extends FluxController
{ {
protected $em;
protected $translator;
public function __construct(EntityManagerInterface $em, TranslatorInterface $translator)
{
$this->em = $em;
$this->translator = $translator;
}
/** /**
* @Route("/user/groupe/infos", name="groupe_infos") * @Route("/user/groupe/infos", name="groupe_infos")
* @Security("is_granted('ROLE_GESTION_GROUPE') or is_granted('ROLE_CONTACT')") * @Security("is_granted('ROLE_GESTION_GROUPE') or is_granted('ROLE_CONTACT')")
...@@ -72,28 +63,12 @@ class UserGestionnaireGroupeController extends AbstractController ...@@ -72,28 +63,12 @@ class UserGestionnaireGroupeController extends AbstractController
$entity = new TransfertGroupeComptoir(); $entity = new TransfertGroupeComptoir();
$entity->setOperateur($this->getUser()); $entity->setOperateur($this->getUser());
$form = $this->createForm(TransfertGroupeComptoirFormType::class, $entity); $form = $this->createForm(TransfertGroupeComptoirFormType::class, $entity);
$form->handleRequest($request); return $this->manageFluxForm(
$request,
if ($form->isSubmitted() && $form->isValid()) { $form,
$data = $form->getData(); $this->getUser()->getGroupesgere()->getCompte(),
$this->em->persist($data); $this->translator->trans('Transfert bien effectué !'),
$this->em->flush(); $this->translator->trans('Transfert à un comptoir')
$this->addFlash( );
'success',
$this->translator->trans('Transfert bien effectuée !')
);
$referer = $request->headers->get('referer');
if ($referer && !$request->isXmlHttpRequest()) {
return $this->redirect($referer);
} elseif (!$request->isXmlHttpRequest()) {
return new Response('', Response::HTTP_BAD_REQUEST);
}
}
return $this->render('flux/transaction.html.twig', [
'form' => $form->createView(),
'compte' => $this->getUser()->getGroupesgere()->getCompte(),
'title' => $this->translator->trans('Transfert à un comptoir')
]);
} }
} }
...@@ -18,17 +18,8 @@ use Symfony\Component\HttpFoundation\Request; ...@@ -18,17 +18,8 @@ use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Translation\TranslatorInterface; use Symfony\Component\Translation\TranslatorInterface;
class UserPrestataireController extends AbstractController class UserPrestataireController extends FluxController
{ {
private $em;
private $translator;
public function __construct(EntityManagerInterface $em, TranslatorInterface $translator)
{
$this->em = $em;
$this->translator = $translator;
}
/** /**
* @Route("/prestataireinfos", name="prestataire_infos") * @Route("/prestataireinfos", name="prestataire_infos")
* @IsGranted("ROLE_PRESTATAIRE") * @IsGranted("ROLE_PRESTATAIRE")
...@@ -100,29 +91,13 @@ class UserPrestataireController extends AbstractController ...@@ -100,29 +91,13 @@ class UserPrestataireController extends AbstractController
$entity->setOperateur($this->getUser()); $entity->setOperateur($this->getUser());
$entity->setExpediteur($this->getUser()->getPrestataire()); $entity->setExpediteur($this->getUser()->getPrestataire());
$form = $this->createForm('App\Form\Type\TransactionPrestataire'.ucwords($type).'FormType', $entity); $form = $this->createForm('App\Form\Type\TransactionPrestataire'.ucwords($type).'FormType', $entity);
$form->handleRequest($request); return $this->manageFluxForm(
$request,
if ($form->isSubmitted() && $form->isValid()) { $form,
$data = $form->getData(); $this->getUser()->getPrestataire()->getCompte(),
$this->em->persist($data); $this->translator->trans('Transaction bien effectuée !'),
$this->em->flush(); $this->translator->trans('Transaction à un ').$type
$this->addFlash( );
'success',
$this->translator->trans('Transaction bien effectuée !')
);
$referer = $request->headers->get('referer');
if ($referer && !$request->isXmlHttpRequest()) {
return $this->redirect($referer);
} elseif (!$request->isXmlHttpRequest()) {
return new Response('', Response::HTTP_BAD_REQUEST);
}
}
return $this->render('flux/transaction.html.twig', [
'form' => $form->createView(),
'compte' => $this->getUser()->getPrestataire()->getCompte(),
'title' => $this->translator->trans('Transaction à un ').$type
]);
} }
...@@ -136,28 +111,12 @@ class UserPrestataireController extends AbstractController ...@@ -136,28 +111,12 @@ class UserPrestataireController extends AbstractController
$entity->setOperateur($this->getUser()); $entity->setOperateur($this->getUser());
$entity->setExpediteur($this->getUser()->getPrestataire()); $entity->setExpediteur($this->getUser()->getPrestataire());
$form = $this->createForm(TransfertPrestataireSiegeFormType::class, $entity); $form = $this->createForm(TransfertPrestataireSiegeFormType::class, $entity);
$form->handleRequest($request); return $this->manageFluxForm(
$request,
if ($form->isSubmitted() && $form->isValid()) { $form,
$data = $form->getData(); $this->getUser()->getPrestataire()->getCompte(),
$this->em->persist($data); $this->translator->trans('Reconversion envoyée, elle sera validée lorsque le virement sera effectué !'),
$this->em->flush(); $this->translator->trans('Reconversion de monnaie au siège')
$this->addFlash( );
'success',
$this->translator->trans('Reconversion envoyée, elle sera validée lorsque le virement sera effectué !')
);
$referer = $request->headers->get('referer');
if ($referer && !$request->isXmlHttpRequest()) {
return $this->redirect($referer);
} elseif (!$request->isXmlHttpRequest()) {
return new Response('', Response::HTTP_BAD_REQUEST);
}
}
return $this->render('flux/transaction.html.twig', [
'form' => $form->createView(),
'compte' => $this->getUser()->getPrestataire()->getCompte(),
'title' => $this->translator->trans('Reconversion de monnaie au siège')
]);
} }
} }
...@@ -29,17 +29,8 @@ use Symfony\Component\HttpFoundation\Response; ...@@ -29,17 +29,8 @@ use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Translation\TranslatorInterface; use Symfony\Component\Translation\TranslatorInterface;
class UserSiegeController extends AbstractController class UserSiegeController extends FluxController
{ {
protected $em;
protected $translator;
public function __construct(EntityManagerInterface $em, TranslatorInterface $translator)
{
$this->em = $em;
$this->translator = $translator;
}
// /** // /**
// * @Route("/user/siege/infos", name="groupe_infos") // * @Route("/user/siege/infos", name="groupe_infos")
// * @Security("is_granted('ROLE_AMIN_SIEGE') or is_granted('ROLE_SUPER_ADMIN')") // * @Security("is_granted('ROLE_AMIN_SIEGE') or is_granted('ROLE_SUPER_ADMIN')")
...@@ -77,29 +68,13 @@ class UserSiegeController extends AbstractController ...@@ -77,29 +68,13 @@ class UserSiegeController extends AbstractController
$entity = new TransfertSiegeGroupe(); $entity = new TransfertSiegeGroupe();
$entity->setOperateur($this->getUser()); $entity->setOperateur($this->getUser());
$form = $this->createForm(TransfertSiegeGroupeFormType::class, $entity); $form = $this->createForm(TransfertSiegeGroupeFormType::class, $entity);
$form->handleRequest($request); return $this->manageFluxForm(
$request,
if ($form->isSubmitted() && $form->isValid()) { $form,
$data = $form->getData(); $this->em->getRepository(Siege::class)->findOneById(1)->getCompte(),
$this->em->persist($data); $this->translator->trans('Transfert bien effectué !'),
$this->em->flush(); $this->translator->trans('Transaction à un groupe')
$this->addFlash( );
'success',
$this->translator->trans('Transfert bien effectuée !')
);
$referer = $request->headers->get('referer');
if ($referer && !$request->isXmlHttpRequest()) {
return $this->redirect($referer);
} elseif (!$request->isXmlHttpRequest()) {
return new Response('', Response::HTTP_BAD_REQUEST);
}
}
return $this->render('flux/transaction.html.twig', [
'form' => $form->createView(),
'compte' => $this->em->getRepository(Siege::class)->findOneById(1)->getCompte(),
'title' => $this->translator->trans('Transfert à un groupe')
]);
} }
/** /**
...@@ -111,28 +86,12 @@ class UserSiegeController extends AbstractController ...@@ -111,28 +86,12 @@ class UserSiegeController extends AbstractController
$entity = new TransfertGroupeSiege(); $entity = new TransfertGroupeSiege();
$entity->setOperateur($this->getUser()); $entity->setOperateur($this->getUser());
$form = $this->createForm(TransfertGroupeSiegeFormType::class, $entity); $form = $this->createForm(TransfertGroupeSiegeFormType::class, $entity);
$form->handleRequest($request); return $this->manageFluxForm(
$request,
if ($form->isSubmitted() && $form->isValid()) { $form,
$data = $form->getData(); $this->em->getRepository(Siege::class)->findOneById(1)->getCompte(),
$this->em->persist($data); $this->translator->trans('Transfert bien effectué !'),
$this->em->flush(); $this->translator->trans('Transaction du groupe au siège')
$this->addFlash( );
'success',
$this->translator->trans('Transfert bien effectuée !')
);
$referer = $request->headers->get('referer');
if ($referer && !$request->isXmlHttpRequest()) {
return $this->redirect($referer);
} elseif (!$request->isXmlHttpRequest()) {
return new Response('', Response::HTTP_BAD_REQUEST);
}
}
return $this->render('flux/transaction.html.twig', [
'form' => $form->createView(),
'compte' => $this->em->getRepository(Siege::class)->findOneById(1)->getCompte(),
'title' => $this->translator->trans('Transfert du groupe au siège')
]);
} }
} }
...@@ -32,7 +32,7 @@ class Adherent ...@@ -32,7 +32,7 @@ class Adherent
/** /**
* @var User * @var User
* *
* @ORM\OneToOne(targetEntity="User", cascade={"all"}, mappedBy="adherent", fetch="EAGER") * @ORM\OneToOne(targetEntity="User", cascade={"all"}, mappedBy="adherent", fetch="LAZY")
*/ */
protected $user; protected $user;
......
...@@ -268,4 +268,27 @@ abstract class Flux ...@@ -268,4 +268,27 @@ abstract class Flux
} }
} }
} }
public function toHtmlArray(): string
{
if (empty($this->getDestinataire()) || empty($this->getExpediteur()) || empty($this->getMontant())) {
return "[FLUX] Visualisation impossible ! Destinataire / Expéditeur et/ou montant manquant(s) !";
}
$return = '<tr>';
$return .= '<td>'.$this->getCreatedAt()->format('d/m/Y H:i').'</td>';
$return .= '<td>'.ucwords($this->getParenttype()).'</td>';
$return .= '<td>'.$this->getExpediteur().'</td>';
$return .= '<td>'.$this->getDestinataire().'</td>';
$return .= '<td>'.$this->getMontant().'&euro;</td>';
$return .= '</tr>';
return $return;
}
public function __toString(): string
{
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().'&euro;';
}
} }
...@@ -23,7 +23,7 @@ class TransactionPrestataireAdherentFormType extends TransactionFormType ...@@ -23,7 +23,7 @@ class TransactionPrestataireAdherentFormType extends TransactionFormType
)) ))
->add('destinataire', EntityType::class, array( ->add('destinataire', EntityType::class, array(
'class' => Adherent::class, 'class' => Adherent::class,
'choices' => $this->em->getRepository(Adherent::class)->findBy(array('enabled' => true)), 'choices' => $this->em->getRepository(Adherent::class)->findOrderByName(),
'placeholder' => 'Adherent', 'placeholder' => 'Adherent',
'required' => true, 'required' => true,
'label' => 'Adherent :', 'label' => 'Adherent :',
......
...@@ -23,7 +23,7 @@ class TransfertComptoirAdherentFormType extends TransfertFormType ...@@ -23,7 +23,7 @@ class TransfertComptoirAdherentFormType extends TransfertFormType
)) ))
->add('destinataire', EntityType::class, array( ->add('destinataire', EntityType::class, array(
'class' => Adherent::class, 'class' => Adherent::class,
'choices' => $this->em->getRepository(Adherent::class)->findBy(array('enabled' => true)), // 'choices' => $this->em->getRepository(Adherent::class)->findOrderByName(),
'placeholder' => 'Adherent', 'placeholder' => 'Adherent',
'required' => true, 'required' => true,
'label' => 'Adherent :', 'label' => 'Adherent :',
......
...@@ -22,6 +22,22 @@ class AdherentRepository extends ServiceEntityRepository ...@@ -22,6 +22,22 @@ class AdherentRepository extends ServiceEntityRepository
/** /**
* @return Adherent[] Returns an array of Adherent objects * @return Adherent[] Returns an array of Adherent objects
*/ */
public function findOrderByName()
{
$qb = $this->createQueryBuilder('p');
return $qb
->leftjoin('p.user', 'u')
->where('p.enabled = :enabled')
->setParameter('enabled', true)
->orderBy('u.lastname', 'ASC')
->getQuery()
->getResult()
;
}
/**
* @return Adherent[] Returns an array of Adherent objects
*/
public function findbyExclude(Adherent $adherent) public function findbyExclude(Adherent $adherent)
{ {
$qb = $this->createQueryBuilder('p'); $qb = $this->createQueryBuilder('p');
......
...@@ -9,10 +9,21 @@ ...@@ -9,10 +9,21 @@
{% block blocksubtitle %} {% block blocksubtitle %}
{% endblock blocksubtitle %} {% endblock blocksubtitle %}
{% block blockcontent %} {% block blockcontent %}
<ul class='list-group'> <table class="table">
<thead>
<tr>
<th scope="col">Date</th>
<th scope="col">Type</th>
<th scope="col">Expediteur</th>
<th scope="col">Destinataire</th>
<th scope="col">Montant</th>
</tr>
</thead>
<tbody>
{% for flux in fluxs %} {% for flux in fluxs %}
<li class="list-group-item">{{flux.parenttype|capitalize}} à {{flux.destinataire}} {{flux.montant}}&euro; (payée le {{flux.createdAt|date('d-m-Y')}})</li> {{flux.toHtmlArray()|raw}}
{% endfor %} {% endfor %}
</ul> </tbody>
</table>
{% endblock blockcontent %} {% endblock blockcontent %}
{% endif %} {% endif %}
\ No newline at end of file
...@@ -4,37 +4,37 @@ ...@@ -4,37 +4,37 @@
{% if is_granted('ROLE_PREVIOUS_ADMIN') %} {% if is_granted('ROLE_PREVIOUS_ADMIN') %}
<div class='w-100 text-center mb-2'> <div class='w-100 text-center mb-2'>
<a class='btn btn-xs m-1 btn-primary' href='{{path(routeName, [], true)}}?_switch_user=_exit'> <a class='btn btn-xs m-1 btn-primary' href='{{path(routeName, [], true)}}?_switch_user=_exit'>
RETOUR SUPER ADMIN {{ 'RETOUR SUPER ADMIN'|trans }}
</a> </a>
</div> </div>
{% else %} {% else %}
<div class='mb-2'> <div class='mb-2'>
<a class='btn btn-xs m-1 btn-primary' href='{{path('index', [], true)}}?_switch_user=user_prestataire'> <a class='btn btn-xs m-1 btn-primary' href='{{path('index', [], true)}}?_switch_user=user_prestataire'>
PRESTATAIRE {{ 'PRESTATAIRE'|trans }}
</a> </a>
<a class='btn btn-xs m-1 btn-primary' href='{{path('index', [], true)}}?_switch_user=user_adherent'> <a class='btn btn-xs m-1 btn-primary' href='{{path('index', [], true)}}?_switch_user=user_adherent'>
ADHERENT {{ 'ADHERENT'|trans }}
</a> </a>
<a class='btn btn-xs m-1 btn-primary' href='{{path(routeName, [], true)}}?_switch_user=user_adminsiege'> <a class='btn btn-xs m-1 btn-primary' href='{{path(routeName, [], true)}}?_switch_user=user_adminsiege'>
ADMIN SIEGE {{ 'ADMIN SIEGE'|trans }}
</a> </a>
<a class='btn btn-xs m-1 btn-primary' href='{{path(routeName, [], true)}}?_switch_user=user_comptoir'> <a class='btn btn-xs m-1 btn-primary' href='{{path(routeName, [], true)}}?_switch_user=user_comptoir'>
COMPTOIR {{ 'COMPTOIR'|trans }}
</a> </a>
<a class='btn btn-xs m-1 btn-primary' href='{{path(routeName, [], true)}}?_switch_user=user_gestiongroupe'> <a class='btn btn-xs m-1 btn-primary' href='{{path(routeName, [], true)}}?_switch_user=user_gestiongroupe'>
GESTION GROUPE {{ 'GESTION GROUPE'|trans }}
</a> </a>
<a class='btn btn-xs m-1 btn-primary' href='{{path(routeName, [], true)}}?_switch_user=user_contact'> <a class='btn btn-xs m-1 btn-primary' href='{{path(routeName, [], true)}}?_switch_user=user_contact'>
CONTACT {{ 'CONTACT'|trans }}
</a> </a>
<a class='btn btn-xs m-1 btn-primary' href='{{path(routeName, [], true)}}?_switch_user=user_tresorier'> <a class='btn btn-xs m-1 btn-primary' href='{{path(routeName, [], true)}}?_switch_user=user_tresorier'>
TRESORIER {{ 'TRESORIER'|trans }}
</a> </a>
<a class='btn btn-xs m-1 btn-primary' href='{{path(routeName, [], true)}}?_switch_user=user_controleur'> <a class='btn btn-xs m-1 btn-primary' href='{{path(routeName, [], true)}}?_switch_user=user_controleur'>
CONTROLEUR {{ 'CONTROLEUR'|trans }}
</a> </a>
<a class='btn btn-xs m-1 btn-primary' href='{{path(routeName, [], true)}}?_switch_user=user_redacteur'> <a class='btn btn-xs m-1 btn-primary' href='{{path(routeName, [], true)}}?_switch_user=user_redacteur'>
REDACTEUR {{ 'REDACTEUR'|trans }}
</a> </a>
</div> </div>
{% endif %} {% endif %}
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
{# ACTIONS PRINCIPALES POUR CHAQUE UTILISATEUR CONNECTE #} {# ACTIONS PRINCIPALES POUR CHAQUE UTILISATEUR CONNECTE #}
<div id="accordion"> <div id="accordion">
{% if is_granted('ROLE_ADMIN_SIEGE') %} {% if is_granted('ROLE_ADMIN_SIEGE') %}
{% set siege = getSiege() %} {% set siege = getSiege() %}
{% set compte = siege.getCompte() %} {% set compte = siege.getCompte() %}
{% set soldelabel = 'Solde du siège'|trans %} {% set soldelabel = 'Solde du siège'|trans %}
...@@ -51,10 +52,14 @@ ...@@ -51,10 +52,14 @@
{% include 'block/userpassword.html.twig' %} {% include 'block/userpassword.html.twig' %}
{% include 'siege/block/transfert_siegegroupe.html.twig' %} {% include 'siege/block/transfert_siegegroupe.html.twig' %}
{% include 'siege/block/transfert_groupesiege.html.twig' %} {% include 'siege/block/transfert_groupesiege.html.twig' %}
{% elseif is_granted('ROLE_REDACTEUR') %} {% elseif is_granted('ROLE_REDACTEUR') %}
{% include 'block/userinfos.html.twig' %} {% include 'block/userinfos.html.twig' %}
{% include 'block/userpassword.html.twig' %} {% include 'block/userpassword.html.twig' %}
{% elseif is_granted('ROLE_TRESORIER') %} {% elseif is_granted('ROLE_TRESORIER') %}
{% set siege = getSiege() %} {% set siege = getSiege() %}
{% set compte = siege.getCompte() %} {% set compte = siege.getCompte() %}
{% set soldelabel = 'Solde du siège'|trans %} {% set soldelabel = 'Solde du siège'|trans %}
...@@ -62,9 +67,13 @@ ...@@ -62,9 +67,13 @@
{% include 'block/userinfos.html.twig' %} {% include 'block/userinfos.html.twig' %}
{% include 'block/userpassword.html.twig' %} {% include 'block/userpassword.html.twig' %}
{# {% include 'block/soldegroupes.html.twig' %} #} {# {% include 'block/soldegroupes.html.twig' %} #}
{% elseif is_granted('ROLE_CONTROLEUR') %} {% elseif is_granted('ROLE_CONTROLEUR') %}
{% include 'block/userinfos.html.twig' %} {% include 'block/userinfos.html.twig' %}
{% elseif is_granted('ROLE_GESTION_GROUPE') %} {% elseif is_granted('ROLE_GESTION_GROUPE') %}
{% if app.user.groupesgere != null %} {% if app.user.groupesgere != null %}
{% set compte = app.user.groupesgere.compte %} {% set compte = app.user.groupesgere.compte %}
{% set soldelabel = 'Solde du groupe'|trans %} {% set soldelabel = 'Solde du groupe'|trans %}
...@@ -75,7 +84,9 @@ ...@@ -75,7 +84,9 @@
{% include 'block/userpassword.html.twig' %} {% include 'block/userpassword.html.twig' %}
{% include 'block/transactions.html.twig' %} {% include 'block/transactions.html.twig' %}
{% include 'groupe/block/transaction_comptoir.html.twig' %} {% include 'groupe/block/transaction_comptoir.html.twig' %}
{% elseif is_granted('ROLE_COMPTOIR') %} {% elseif is_granted('ROLE_COMPTOIR') %}
{% if app.user.comptoirsgere != null %} {% if app.user.comptoirsgere != null %}
{% set compte = app.user.comptoirsgere.compte %} {% set compte = app.user.comptoirsgere.compte %}
{% set soldelabel = 'Solde du comptoir "'|trans ~ app.user.comptoirsgere ~ '"' %} {% set soldelabel = 'Solde du comptoir "'|trans ~ app.user.comptoirsgere ~ '"' %}
...@@ -86,8 +97,11 @@ ...@@ -86,8 +97,11 @@
{% include 'block/userpassword.html.twig' %} {% include 'block/userpassword.html.twig' %}
{% include 'block/transactions.html.twig' %} {% include 'block/transactions.html.twig' %}
{% include 'comptoir/block/transaction_adherent.html.twig' %} {% include 'comptoir/block/transaction_adherent.html.twig' %}
{% include 'comptoir/block/transaction_prestataire.html.twig' %}
{% include 'comptoir/block/reconversion.html.twig' %} {% include 'comptoir/block/reconversion.html.twig' %}
{% elseif is_granted('ROLE_CONTACT') %} {% elseif is_granted('ROLE_CONTACT') %}
{% if app.user.groupesgere != null %} {% if app.user.groupesgere != null %}
{% set compte = app.user.groupesgere.compte %} {% set compte = app.user.groupesgere.compte %}
{% set soldelabel = 'Solde du groupe'|trans %} {% set soldelabel = 'Solde du groupe'|trans %}
...@@ -97,14 +111,18 @@ ...@@ -97,14 +111,18 @@
{% include 'block/userinfos.html.twig' %} {% include 'block/userinfos.html.twig' %}
{% include 'block/userpassword.html.twig' %} {% include 'block/userpassword.html.twig' %}
{% include 'block/transactions.html.twig' %} {% include 'block/transactions.html.twig' %}
{% elseif is_granted('ROLE_SUPER_ADMIN') %} {% elseif is_granted('ROLE_SUPER_ADMIN') %}
{% set siege = getSiege() %} {% set siege = getSiege() %}
{% set compte = siege.getCompte() %} {% set compte = siege.getCompte() %}
{% set soldelabel = 'Solde du siège'|trans %} {% set soldelabel = 'Solde du siège'|trans %}
{% include 'block/solde.html.twig' with {'compte': compte, 'soldelabel': soldelabel} %} {% include 'block/solde.html.twig' with {'compte': compte, 'soldelabel': soldelabel} %}
{% include 'block/userinfos.html.twig' %} {% include 'block/userinfos.html.twig' %}
{% include 'block/userpassword.html.twig' %} {% include 'block/userpassword.html.twig' %}
{% elseif is_granted('ROLE_PRESTATAIRE') %} {% elseif is_granted('ROLE_PRESTATAIRE') %}
{% include 'presta/block/solde.html.twig' %} {% include 'presta/block/solde.html.twig' %}
{% include 'presta/block/infos.html.twig' %} {% include 'presta/block/infos.html.twig' %}
{% include 'block/userinfos.html.twig' %} {% include 'block/userinfos.html.twig' %}
...@@ -115,7 +133,9 @@ ...@@ -115,7 +133,9 @@
{% include 'presta/block/transaction_presta.html.twig' %} {% include 'presta/block/transaction_presta.html.twig' %}
{% include 'presta/block/transaction_adherent.html.twig' %} {% include 'presta/block/transaction_adherent.html.twig' %}
{% include 'presta/block/reconversion.html.twig' %} {% include 'presta/block/reconversion.html.twig' %}
{% elseif is_granted('ROLE_ADHERENT') %} {% elseif is_granted('ROLE_ADHERENT') %}
{% include 'adherent/block/solde.html.twig' %} {% include 'adherent/block/solde.html.twig' %}
{% include 'adherent/block/infos.html.twig' %} {% include 'adherent/block/infos.html.twig' %}
{% include 'block/userpassword.html.twig' %} {% include 'block/userpassword.html.twig' %}
...@@ -123,6 +143,7 @@ ...@@ -123,6 +143,7 @@
{% include 'block/transactions.html.twig' %} {% include 'block/transactions.html.twig' %}
{% include 'adherent/block/transaction_presta.html.twig' %} {% include 'adherent/block/transaction_presta.html.twig' %}
{% include 'adherent/block/transaction_adherent.html.twig' %} {% include 'adherent/block/transaction_adherent.html.twig' %}
{% else %} {% else %}
{% include 'presta/block/carte.html.twig' with {'title': 'Situer les Prestataires'|trans}%} {% include 'presta/block/carte.html.twig' with {'title': 'Situer les Prestataires'|trans}%}
{% endif %} {% endif %}
......
...@@ -152,6 +152,7 @@ Modified for MLC from Sonata package. ...@@ -152,6 +152,7 @@ Modified for MLC from Sonata package.
<a href="#" class="sidebar-toggle" data-toggle="offcanvas" <a href="#" class="sidebar-toggle" data-toggle="offcanvas"
role="button" title="{{ 'toggle_navigation'|trans({}, 'SonataAdminBundle') }}"> role="button" title="{{ 'toggle_navigation'|trans({}, 'SonataAdminBundle') }}">
<i class="fa fa-bars"></i>
<span class="sr-only">{{ 'toggle_navigation'|trans({}, 'SonataAdminBundle') }}</span> <span class="sr-only">{{ 'toggle_navigation'|trans({}, 'SonataAdminBundle') }}</span>
</a> </a>
......
{% extends 'block/onetransaction.html.twig' %}
{% block blocktitle %}
<i class="fa fa-exchange-alt mr-4"></i> {{'Virement vers un prestataire'|trans}}
{% endblock blocktitle %}
{% block blockcontent %}
{% set form = getTransfertComptoirToXForm(app.user, 'prestataire') %}
{{ parent() }}
{% endblock blockcontent %}
\ No newline at end of file
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