This commit is contained in:
2024-12-24 17:29:37 +01:00
parent e0aa499940
commit 4c08435bd8
115 changed files with 3613 additions and 152 deletions

View File

@ -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,
]);
}
}