fix: retain pagination and sorting when navigating using submenu
This commit is contained in:
@@ -51,7 +51,9 @@ class DeleteController extends AbstractController
|
||||
'teamer_name' => (string) $teamer,
|
||||
]);
|
||||
|
||||
$redirectUrl = $this->getReturnUrl($request, 'app_admin_teamer_profile', ['uuid' => $teamer->getUuid()]);
|
||||
$redirectUrl = $this->getReturnUrl($request, 'app_admin_teamer_profile', [
|
||||
'uuid' => $teamer->getUuid(),
|
||||
]);
|
||||
|
||||
return new HxRedirectResponse($redirectUrl);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Controller\Admin\Teamer\TrainingAttendance;
|
||||
|
||||
use App\Controller\Traits\ReturnUrlTrait;
|
||||
use App\Entity\JobProfile;
|
||||
use App\Entity\Teamer;
|
||||
use App\Entity\Training;
|
||||
@@ -19,6 +20,8 @@ use Symfony\Component\Security\Http\Attribute\IsGranted;
|
||||
|
||||
class CreateController extends AbstractController
|
||||
{
|
||||
use ReturnUrlTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $entityManager,
|
||||
private readonly LoggerInterface $logger
|
||||
@@ -67,7 +70,9 @@ class CreateController extends AbstractController
|
||||
'training_name' => $training->getName(),
|
||||
]);
|
||||
|
||||
$redirectUrl = $this->generateUrl('app_admin_teamer_skills', ['uuid' => $teamer->getUuid()]);
|
||||
$redirectUrl = $this->getReturnUrl($request, 'app_admin_teamer_skills', [
|
||||
'uuid' => $teamer->getUuid(),
|
||||
]);
|
||||
|
||||
return new HxRedirectResponse($redirectUrl);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Controller\Admin\Teamer\TrainingAttendance;
|
||||
|
||||
use App\Controller\Traits\ReturnUrlTrait;
|
||||
use App\Entity\TrainingAttendance;
|
||||
use App\Htmx\HxRedirectResponse;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
@@ -14,6 +15,8 @@ use Symfony\Component\Security\Http\Attribute\IsGranted;
|
||||
|
||||
class DeleteController extends AbstractController
|
||||
{
|
||||
use ReturnUrlTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $entityManager,
|
||||
private readonly LoggerInterface $logger
|
||||
@@ -39,9 +42,11 @@ class DeleteController extends AbstractController
|
||||
'training_name' => $attendance->getTraining()->getName(),
|
||||
]);
|
||||
|
||||
return new HxRedirectResponse($this->generateUrl('app_admin_teamer_skills', [
|
||||
$returnUrl = $this->getReturnUrl($request, 'app_admin_teamer_skills', [
|
||||
'uuid' => $teamer->getUuid(),
|
||||
]));
|
||||
]);
|
||||
|
||||
return new HxRedirectResponse($returnUrl);
|
||||
}
|
||||
|
||||
return $this->render('admin/teamer/training_attendance/modal_delete.html.twig', [
|
||||
|
||||
Reference in New Issue
Block a user