feat: reset application status to 'new' as admin
This commit is contained in:
@@ -39,6 +39,13 @@ class StatusController extends AbstractController
|
||||
->setComment($statusDto->getComment())
|
||||
->setCommentVisible($statusDto->isCommentVisible())
|
||||
;
|
||||
// remove potential comment when resetting status to 'new'
|
||||
if (Application::STATUS_NEW === $application->getStatus()) {
|
||||
$application
|
||||
->setComment(null)
|
||||
->setCommentVisible(false)
|
||||
;
|
||||
}
|
||||
$this->entityManager->flush();
|
||||
|
||||
$this->eventDispatcher->dispatch(
|
||||
|
||||
@@ -21,6 +21,7 @@ class ApplicationStatusType extends AbstractType
|
||||
'choices' => [
|
||||
'in Bearbeitung' => Application::STATUS_PENDING,
|
||||
'abgelehnt' => Application::STATUS_REJECTED,
|
||||
'neu' => Application::STATUS_NEW,
|
||||
],
|
||||
])
|
||||
->add('comment', TextareaType::class, [
|
||||
|
||||
Reference in New Issue
Block a user