feat: refactor staffing status assignment and filtering

This commit is contained in:
Björn Fromme committed 2024-07-16 17:34:50 +02:00
1 parent fa9c68c463
commit 5dd2f79c2d
14 files changed
+128 -52

No files matched your search

@@ -26,6 +26,9 @@ class DeleteController extends AbstractController
$this->entityManager->remove($application);
$this->entityManager->flush();
$application->getAssignment()->updateStaffingStatus();
$this->entityManager->flush();
$this->addFlash('success', 'Die Bewerbung wurde gelöscht');
$this->logger->info('Delete application', [
'destination' => (string) $application->getAssignment()->getDestination(),
@@ -39,6 +39,10 @@ class DisposeController extends AbstractController
$this->entityManager->remove($application);
$this->entityManager->flush();
// Update staffing status of related assignment
$disposition->getAssignment()->updateStaffingStatus();
$this->entityManager->flush();
$this->eventDispatcher->dispatch(new DispositionCreatedEvent($disposition), DispositionCreatedEvent::NAME);
$this->addFlash('success', 'Teamer:in wurde eingeteilt');
@@ -54,6 +54,10 @@ class DeleteController extends AbstractController
$this->entityManager->remove($disposition);
$this->entityManager->flush();
// Update staffing status of related assignment
$disposition->getAssignment()->updateStaffingStatus();
$this->entityManager->flush();
return new HxRedirectResponse($this->generateUrl('app_administrative_assignment_detail', [
'uuid' => $disposition->getAssignment()->getUuid(),
]));