feat(crm): Ajoute les contrôleurs et les vues pour les devis, contrats et factures.

This commit is contained in:
Serreau Jovann
2026-01-16 14:32:20 +01:00
parent 6e60c9d4b3
commit 7e7a10f5b6
7 changed files with 85 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
<?php
namespace App\Controller\Dashboard;
use App\Logger\AppLogger;
use App\Repository\AccountRepository;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;
class ContratsController extends AbstractController
{
/**
* Liste des administrateurs
*/
#[Route(path: '/crm/contrats', name: 'app_crm_contrats', options: ['sitemap' => false], methods: ['GET'])]
public function contrats(AccountRepository $accountRepository, AppLogger $appLogger): Response
{
$appLogger->record('VIEW', 'Consultation de la liste des contrats');
return $this->render('dashboard/contrats/list.twig',[
'contrats' => [],
]);
}
}

View File

@@ -0,0 +1,26 @@
<?php
namespace App\Controller\Dashboard;
use App\Logger\AppLogger;
use App\Repository\AccountRepository;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;
class DevisController extends AbstractController
{
/**
* Liste des administrateurs
*/
#[Route(path: '/crm/devis', name: 'app_crm_devis', options: ['sitemap' => false], methods: ['GET'])]
public function devis(AccountRepository $accountRepository, AppLogger $appLogger): Response
{
$appLogger->record('VIEW', 'Consultation de la liste des devis');
return $this->render('dashboard/devis/list.twig',[
'devis' => [],
]);
}
}

View File

@@ -0,0 +1,26 @@
<?php
namespace App\Controller\Dashboard;
use App\Logger\AppLogger;
use App\Repository\AccountRepository;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;
class FactureController extends AbstractController
{
/**
* Liste des administrateurs
*/
#[Route(path: '/crm/facture', name: 'app_crm_facture', options: ['sitemap' => false], methods: ['GET'])]
public function contrats(AccountRepository $accountRepository, AppLogger $appLogger): Response
{
$appLogger->record('VIEW', 'Consultation de la liste des facture');
return $this->render('dashboard/contrats/facture.twig',[
'factures' => [],
]);
}
}

View File

@@ -42,6 +42,9 @@
{{ menu.nav_link(path('app_crm'), 'Dashboard', '<path d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"></path>', 'app_crm') }}
{{ menu.nav_link(path('app_crm_product'), 'Produits', '<path d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"></path>', 'app_clients') }}
{{ menu.nav_link(path('app_crm_contrats'), 'Contrat de location', '<path d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"></path>', 'app_clients') }}
{{ menu.nav_link(path('app_crm_facture'), 'Facture', '<path d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"></path>', 'app_clients') }}
{{ menu.nav_link(path('app_crm_devis'), 'Devis', '<path d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"></path>', 'app_clients') }}
{{ menu.nav_link(path('app_crm_customer'), 'Clients', '<path d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"></path>', 'app_clients') }}
</div>
</div>

View File

@@ -0,0 +1 @@
{% extends 'dashboard/base.twig' %}

View File

@@ -0,0 +1 @@
{% extends 'dashboard/base.twig' %}

View File

@@ -0,0 +1 @@
{% extends 'dashboard/base.twig' %}