svg
This commit is contained in:
@ -2,18 +2,24 @@
|
||||
|
||||
namespace App\Controller;
|
||||
|
||||
use App\Repository\AccountingRepository;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Attribute\Route;
|
||||
|
||||
class HomeController extends AbstractController
|
||||
{
|
||||
#[Route('/', name: 'app_home')]
|
||||
public function home(): Response
|
||||
public function home(Request $request, AccountingRepository $accountingRepository): Response
|
||||
{
|
||||
$company = $request->getSession()->get('company');
|
||||
$accountings = $accountingRepository->findBy(['company' => $company, 'category' => 'actif'], ['num01' => 'ASC', 'num02' => 'ASC']);
|
||||
|
||||
return $this->render('home/home.html.twig', [
|
||||
'usemenu' => true,
|
||||
'usesidebar' => false,
|
||||
'accountings' => $accountings,
|
||||
]);
|
||||
}
|
||||
|
||||
@ -25,4 +31,13 @@ class HomeController extends AbstractController
|
||||
'usesidebar' => true,
|
||||
]);
|
||||
}
|
||||
|
||||
#[Route('/user/nocompany', name: 'app_user_nocompany')]
|
||||
public function nocompany(): Response
|
||||
{
|
||||
return $this->render('home/nocompany.html.twig', [
|
||||
'usemenu' => true,
|
||||
'usesidebar' => false,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user