Add flash messages and convert to use Breadcrumb class

This commit is contained in:
2024-12-10 12:21:55 -05:00
parent bcbd0575b6
commit 94a7a324a1
2 changed files with 14 additions and 8 deletions

View File

@ -3,6 +3,7 @@
namespace App\Controller;
use App\Entity\User;
use App\Libs\Breadcrumb;
use App\Libs\NavList;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
@ -21,7 +22,7 @@ class StaffController extends AbstractController
$this->navLinks = NavList::LIST;
}
#[Route('/staff-dashboard', name: 'staff')]
#[Route('/staff-dashboard', name: 'app_staff_dashboard')]
public function staffDashboard(#[CurrentUser()] User $user): Response
{
$this->navLinks['staff_dashboard'] = 'nav-link text-white active bg-gradient-dark';
@ -32,7 +33,7 @@ class StaffController extends AbstractController
$this->navLinks,
[
'breadcrumbs' => [
'Staff Dashboard'
new Breadcrumb('', 'Staff Dashboard')
],
'notifications' => $user->retrieveUnreadNotifications(),
]