fix: properly forward return urls where missing

This commit is contained in:
Björn Fromme
2026-08-11 14:34:46 +02:00
parent 102e1c1c3c
commit 48cd2d6b67
27 changed files with 194 additions and 24 deletions
@@ -55,6 +55,7 @@ class DuplicateController extends AbstractController
return $this->redirectToRoute('app_administrative_assignment_edit', [
'uuid' => $copy->getUuid(),
'r' => $request->query->get('r'),
]);
}
@@ -38,6 +38,7 @@ class BusProNetSyncToggleController extends AbstractController
return new HxRedirectResponse($this->generateUrl('app_administrative_assignment_detail', [
'uuid' => $disposition->getAssignment()->getUuid(),
'r' => $request->query->get('r'),
]));
}
}
@@ -55,6 +55,7 @@ class CallOffController extends AbstractController
return new HxRedirectResponse($this->generateUrl('app_administrative_assignment_detail', [
'uuid' => $assignment->getUuid(),
'r' => $request->query->get('r'),
]));
}
@@ -61,6 +61,7 @@ class DocumentUploadController extends AbstractController
return new HxRedirectResponse($this->generateUrl('app_administrative_assignment_detail', [
'uuid' => $disposition->getAssignment()->getUuid(),
'r' => $request->query->get('r'),
]));
}
@@ -38,6 +38,7 @@ class SpecialAgreementsController extends AbstractController
return new HxRedirectResponse($this->generateUrl('app_administrative_assignment_detail', [
'uuid' => $disposition->getAssignment()->getUuid(),
'r' => $request->query->get('r'),
]));
}
@@ -24,7 +24,13 @@ class InfoController extends AbstractController
#[IsGranted(new Expression('is_granted("ROLE_ADMINISTRATIVE") or is_granted("ROLE_HOUSE_MANAGER")'))]
public function index(Teamer $teamer, Request $request): Response
{
$returnUrl = $this->getReturnUrl($request, 'app_administrative_assignment_index');
// House managers reach this modal but not the administrative overviews,
// so their fallback has to stay inside their own area.
$defaultReturnUrlRoute = $this->isGranted('ROLE_ADMINISTRATIVE')
? 'app_administrative_assignment_index'
: 'app_house_manager_index';
$returnUrl = $this->getReturnUrl($request, $defaultReturnUrlRoute);
$recentDispositions = $this->dispositionRepository->findRecentDispositionsByTeamer($teamer);