```
✨ feat(Admin/Dashboard): Affiche le nombre de candidatures en cours. 🐛 fix(JoinController): Corrige l'envoi de mail et ajoute un état Discord. ✨ feat(JoinController): Ajoute l'état Discord et corrige les templates de mail. ```
This commit is contained in:
@@ -27,6 +27,7 @@ use App\Form\RequestPasswordRequestType;
|
||||
use App\Repository\Ag\MainRepository;
|
||||
use App\Repository\EventRepository;
|
||||
use App\Repository\InviteEPageRepository;
|
||||
use App\Repository\JoinRepository;
|
||||
use App\Repository\MembersCotisationsRepository;
|
||||
use App\Repository\MembersRepository;
|
||||
use App\Repository\ProductsRepository;
|
||||
@@ -66,10 +67,11 @@ class AdminController extends AbstractController
|
||||
{
|
||||
|
||||
#[Route(path: '/admin', name: 'admin_dashboard', options: ['sitemap' => false], methods: ['GET'])]
|
||||
public function adminDashboard(MembersRepository $membersRepository): Response
|
||||
public function adminDashboard(MembersRepository $membersRepository,JoinRepository $joinRepository): Response
|
||||
{
|
||||
return $this->render('admin/dashboard.twig', [
|
||||
'memberCount' => $membersRepository->count(),
|
||||
'joins' => $joinRepository->count(['state'=>'create'])+$joinRepository->count(['state'=>'waiting']),
|
||||
]);
|
||||
}
|
||||
#[Route(path: '/admin/products', name: 'admin_products', options: ['sitemap' => false], methods: ['GET'])]
|
||||
|
||||
@@ -47,7 +47,7 @@ class JoinController extends AbstractController
|
||||
if($form->isSubmitted() && $form->isValid()){
|
||||
$j->setState("create");
|
||||
$j->setCreateAt(new \DateTimeImmutable("now"));
|
||||
|
||||
$j->setIsDiscord(false);
|
||||
$cPdf = new Candidat();
|
||||
$cPdf->setData($j,$entityManager,$kernel);
|
||||
$cPdf->AddPage();
|
||||
@@ -64,7 +64,7 @@ class JoinController extends AbstractController
|
||||
$mailer->send('contact@e-cosplay.fr',
|
||||
'E-Cosplay',
|
||||
'[E-Cosplay] - Nouvelle candidature',
|
||||
'candidat/new.twig',
|
||||
'mails/candidat/new.twig',
|
||||
['joint'=>$j],
|
||||
[new DataPart($content,'candidat.pdf','application/pdf')]
|
||||
);
|
||||
@@ -73,11 +73,11 @@ class JoinController extends AbstractController
|
||||
$mailer->send($j->getEmail(),
|
||||
$j->getSurname()." ".$j->getName(),
|
||||
"[E-Cosplay] - Confirmation de votre candidature",
|
||||
'candidat/confirm.twig',
|
||||
'mails/candidat/confirm.twig',
|
||||
['joint'=>$j],
|
||||
[new DataPart($content,'candidat.pdf','application/pdf')]
|
||||
);
|
||||
return $this->redirectToRoute('app_recruit_comfirmed');
|
||||
return $this->redirectToRoute('app_recruit_confirmed');
|
||||
}
|
||||
return $this->render('join.twig',[
|
||||
'form' => $form->createView(),
|
||||
|
||||
@@ -31,6 +31,24 @@
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bg-gray-800 p-6 rounded-xl shadow-2xl border border-gray-700 hover:border-indigo-500 transition duration-300">
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="text-indigo-400">
|
||||
<svg class="w-8 h-8" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20h5v-2a3 3 0 00-5.356-1.857M9 20H4v-2a3 3 0 015-2.236M9 20v-2a3 3 0 00-5-2.236M9 20h5m-5 0h5M12 4a4 4 0 100 8 4 4 0 000-8z"></path></svg>
|
||||
</div>
|
||||
<p class="text-sm font-medium text-gray-400">
|
||||
Membres de l'association
|
||||
</p>
|
||||
</div>
|
||||
<div class="mt-4">
|
||||
<p class="text-4xl font-extrabold text-white">
|
||||
{{ joins | number_format(0, ',', ' ') }}
|
||||
</p>
|
||||
<p class="text-sm text-gray-500 mt-1">
|
||||
Total des candidatures en cours
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# Carte 2: Commandes en Attente #}
|
||||
<div class="bg-gray-800 p-6 rounded-xl shadow-2xl border border-gray-700 hover:border-red-500 transition duration-300">
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
{{ 'form.header.title'|trans }}
|
||||
</h2>
|
||||
|
||||
{{ form_start(form, {'attr': {'class': 'space-y-8','data-turbo':false}}) }}
|
||||
{{ form_start(form, {'attr': {'class': 'space-y-8'}}) }}
|
||||
|
||||
{# IDENTITÉ #}
|
||||
<div class="grid md:grid-cols-2 gap-6">
|
||||
|
||||
Reference in New Issue
Block a user