src/Controller/AuthController.php line 37

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  4. use Symfony\Component\Routing\Annotation\Route;
  5. use Symfony\Component\HttpFoundation\Response;
  6. use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
  7. class AuthController extends AbstractController
  8. {
  9.     /**
  10.      * @Route("", name="home", methods={"GET"})
  11.      * @return Response
  12.      */
  13.     public function home(): Response
  14.     {
  15.         return $this->redirectToRoute('panel');
  16.     }
  17.     /**
  18.      * @Route("/panel", name="panel", methods={"GET"})
  19.      * @return Response
  20.      */
  21.     public function panel(): Response
  22.     {
  23.         return $this->render('panel.html.twig');
  24.     }
  25.     /**
  26.      * @Route("/login", name="panel_login", methods={"GET","POST"})
  27.      * @param AuthenticationUtils $authenticationUtils
  28.      * @return Response
  29.      */
  30.     public function login(AuthenticationUtils $authenticationUtils): Response
  31.     {
  32.         // get the login error if there is one
  33.         $error $authenticationUtils->getLastAuthenticationError();
  34.         // last username entered by the user
  35.         $lastUsername $authenticationUtils->getLastUsername();
  36.         return $this->render('security/login.html.twig', ['last_username' => $lastUsername'error' => $error]);
  37.     }
  38.     /**
  39.      * @Route("/logout", name="panel_logout", methods={"GET"})
  40.      */
  41.     public function logoutAction() { }
  42. }
  43. /*
  44. SELECT AR.id AS ID, FAC.fecha_operacion as FECHA, RB.descripcion AS RUBRO, GR.nom_grupo AS GRUPO, CAT.nombre AS CATEGORIA, MP.nombre as MARCA, AR.codigo as CODIGO, AR.descripcion as DESCRIPCION, AR.precio AS PRECIO_1, AR.precio2 AS PRECIO_2, TA.talle AS TALLE, SUM(FL.importe) AS TOTAL FROM `articulo` AS AR LEFT JOIN factulinea as FL ON FL.articulo_id = AR.id LEFT JOIN rubro as RB ON RB.id = AR.rubro_id LEFT JOIN grupo as GR ON GR.id = AR.grupo_id LEFT JOIN categoria AS CAT ON CAT.id = AR.categoria_id LEFT JOIN marca_producto as MP ON MP.id = AR.marca_id LEFT JOIN talle AS TA ON TA.id = AR.talle_id LEFT JOIN facturas as FAC ON FAC.codfactura = FL.codfactura WHERE FL.importe IS NOT NULL GROUP BY AR.id, FAC.fecha_operacion ORDER BY `FECHA` DESC, `RUBRO` ASC, `GRUPO` ASC, `CATEGORIA` ASC, `MARCA` ASC, `DESCRIPCION` ASC
  45. SELECT AR.id AS ID, RB.descripcion AS RUBRO, GR.nom_grupo AS GRUPO, CAT.nombre AS CATEGORIA, MP.nombre as MARCA, AR.codigo as CODIGO, AR.descripcion as DESCRIPCION, AR.precio AS PRECIO_1, AR.precio2 AS PRECIO_2, TA.talle AS TALLE, SUM(FL.importe) AS TOTAL FROM `articulo` AS AR LEFT JOIN factulinea as FL ON FL.articulo_id = AR.id LEFT JOIN rubro as RB ON RB.id = AR.rubro_id LEFT JOIN grupo as GR ON GR.id = AR.grupo_id LEFT JOIN categoria AS CAT ON CAT.id = AR.categoria_id LEFT JOIN marca_producto as MP ON MP.id = AR.marca_id LEFT JOIN talle AS TA ON TA.id = AR.talle_id LEFT JOIN facturas as FAC ON FAC.codfactura = FL.codfactura WHERE FL.importe IS NOT NULL AND FAC.fecha_operacion >= '2021-06-01' AND FAC.fecha_operacion <= '2021-06-30' GROUP BY AR.id ORDER BY `RUBRO` ASC, `GRUPO` ASC, `CATEGORIA` ASC, `MARCA` ASC, `DESCRIPCION` ASC
  46. SELECT AR.id AS ID, RB.descripcion AS RUBRO, GR.nom_grupo AS GRUPO, CAT.nombre AS CATEGORIA, AR.codigo as CODIGO, AR.descripcion as DESCRIPCION, AR.precio AS PRECIO_1, AR.precio2 AS PRECIO_2, TA.talle AS TALLE, AR.stock AS STOCK FROM `articulo` AS AR LEFT JOIN rubro as RB ON RB.id = AR.rubro_id LEFT JOIN grupo as GR ON GR.id = AR.grupo_id LEFT JOIN categoria AS CAT ON CAT.id = AR.categoria_id LEFT JOIN marca_producto as MP ON MP.id = AR.marca_id LEFT JOIN talle AS TA ON TA.id = AR.talle_id WHERE 1 GROUP BY AR.id ORDER BY `RUBRO` ASC, `GRUPO` ASC, `CATEGORIA` ASC, `DESCRIPCION` ASC
  47. */