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