feat: reset application status to 'new' as admin

This commit is contained in:
Björn Fromme
2025-01-24 17:21:42 +01:00
parent b27fd086ff
commit 89118308e3
2 changed files with 8 additions and 0 deletions
@@ -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(