feat: refactor staffing status assignment and filtering
This commit is contained in:
@@ -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(),
|
||||
]));
|
||||
|
||||
@@ -36,7 +36,6 @@ class IndexController extends AbstractController
|
||||
$request->query->getInt('page', 1),
|
||||
10,
|
||||
[
|
||||
'wrap-queries' => true, // Required for query with 'having' clause
|
||||
'defaultSortFieldName' => 'destination.dateFrom',
|
||||
'defaultSortDirection' => 'desc',
|
||||
]
|
||||
|
||||
@@ -46,6 +46,9 @@ class CheckController extends AbstractController
|
||||
switch ($formData->getStatus()) {
|
||||
case Upload::STATUS_CHECKED:
|
||||
$this->confirmDocument($document, 'confirm_contract', Upload::STATUS_CHECKED, $formData);
|
||||
// Contract confirmed: Update staffing status of related assignment
|
||||
$document->getDisposition()->getAssignment()->updateStaffingStatus();
|
||||
$this->entityManager->flush();
|
||||
break;
|
||||
case Upload::STATUS_PAID:
|
||||
$this->confirmDocument($document, 'confirm_invoice', Upload::STATUS_PAID, $formData);
|
||||
|
||||
@@ -39,6 +39,10 @@ class CreateController extends AbstractController
|
||||
$this->entityManager->persist($application);
|
||||
$this->entityManager->flush();
|
||||
|
||||
// Update staffing status of related assignment
|
||||
$assignment->updateStaffingStatus();
|
||||
$this->entityManager->flush();
|
||||
|
||||
$this->addFlash('success', 'Deine Bewerbung wurde entgegengenommen');
|
||||
$this->logger->info('Create application', [
|
||||
'teamer_id' => $teamer->getId(),
|
||||
|
||||
@@ -37,6 +37,10 @@ class WithdrawController extends AbstractController
|
||||
$this->entityManager->remove($application);
|
||||
$this->entityManager->flush();
|
||||
|
||||
// Update staffing status of related assignment
|
||||
$assignment->updateStaffingStatus();
|
||||
$this->entityManager->flush();
|
||||
|
||||
$this->logger->info('Withdraw application', [
|
||||
'teamer_id' => $teamer->getId(),
|
||||
'teamer_name' => (string) $teamer,
|
||||
|
||||
Reference in New Issue
Block a user