66 lines
2.4 KiB
PHP
66 lines
2.4 KiB
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Controller;
|
||
|
|
|
||
|
|
use App\Entity\Account;
|
||
|
|
use App\Entity\AccountResetPasswordRequest;
|
||
|
|
use App\Entity\Contrats;
|
||
|
|
use App\Entity\ContratsPayments;
|
||
|
|
use App\Entity\Customer;
|
||
|
|
use App\Entity\CustomerAddress;
|
||
|
|
use App\Form\RequestPasswordConfirmType;
|
||
|
|
use App\Form\RequestPasswordRequestType;
|
||
|
|
use App\Logger\AppLogger;
|
||
|
|
use App\Repository\ContratsRepository;
|
||
|
|
use App\Repository\CustomerAddressRepository;
|
||
|
|
use App\Repository\CustomerRepository;
|
||
|
|
use App\Service\Mailer\Mailer;
|
||
|
|
use App\Service\Pdf\ContratPdfService;
|
||
|
|
use App\Service\Pdf\PlPdf;
|
||
|
|
use App\Service\ResetPassword\Event\ResetPasswordConfirmEvent;
|
||
|
|
use App\Service\ResetPassword\Event\ResetPasswordEvent;
|
||
|
|
use App\Service\Signature\Client;
|
||
|
|
use Doctrine\ORM\EntityManagerInterface;
|
||
|
|
use Google\Service\Directory\UserAddress;
|
||
|
|
use Symfony\Bundle\SecurityBundle\Security;
|
||
|
|
use KnpU\OAuth2ClientBundle\Client\ClientRegistry;
|
||
|
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||
|
|
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||
|
|
use Symfony\Component\HttpFoundation\File\UploadedFile;
|
||
|
|
use Symfony\Component\HttpFoundation\JsonResponse;
|
||
|
|
use Symfony\Component\HttpFoundation\RedirectResponse;
|
||
|
|
use Symfony\Component\HttpFoundation\Request;
|
||
|
|
use Symfony\Component\HttpFoundation\Response;
|
||
|
|
use Symfony\Component\HttpFoundation\ResponseHeaderBag;
|
||
|
|
use Symfony\Component\HttpKernel\KernelInterface;
|
||
|
|
use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface;
|
||
|
|
use Symfony\Component\Routing\Attribute\Route;
|
||
|
|
use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
|
||
|
|
use Symfony\Contracts\HttpClient\HttpClientInterface;
|
||
|
|
use Vich\UploaderBundle\Templating\Helper\UploaderHelper;
|
||
|
|
|
||
|
|
|
||
|
|
class EtlController extends AbstractController
|
||
|
|
{
|
||
|
|
#[Route('/etl', name: 'etl_home')]
|
||
|
|
public function eltHome(AuthenticationUtils $authenticationUtils): Response
|
||
|
|
{
|
||
|
|
if(!$this->getUser())
|
||
|
|
return $this->redirectToRoute('etl_login');
|
||
|
|
}
|
||
|
|
#[Route('/etl/connexion', name: 'etl_login')]
|
||
|
|
public function eltLogin(AuthenticationUtils $authenticationUtils): Response
|
||
|
|
{
|
||
|
|
return $this->render('etl/login.twig',[
|
||
|
|
'last_username' => $authenticationUtils->getLastUsername(),
|
||
|
|
'error' => $authenticationUtils->getLastAuthenticationError()
|
||
|
|
|
||
|
|
]);
|
||
|
|
}
|
||
|
|
#[Route('/etl/logout', name: 'etl_logout')]
|
||
|
|
public function eltLogout(): Response
|
||
|
|
{
|
||
|
|
return $this->redirectToRoute('etl_home');
|
||
|
|
}
|
||
|
|
}
|