Fix: Adopt current document status in form
This commit is contained in:
@@ -61,7 +61,10 @@ class CheckController extends AbstractController
|
||||
$this->rejectDocument($document, $formData->getComment());
|
||||
$this->eventDispatcher->dispatch(new DocumentRejectedEvent($formData), DocumentRejectedEvent::NAME);
|
||||
default:
|
||||
$document->setStatus($formData->getStatus());
|
||||
$document
|
||||
->setStatus($formData->getStatus())
|
||||
->setComment($formData->getComment())
|
||||
;
|
||||
$this->entityManager->flush();
|
||||
$this->addFlash('success', 'Der Status wurde aktualisiert');
|
||||
$this->logger->info('Update document status', [
|
||||
|
||||
@@ -8,11 +8,12 @@ class DocumentCheckDto
|
||||
{
|
||||
private Upload $upload;
|
||||
private ?string $status = null;
|
||||
private ?string $comment = null;
|
||||
private ?string $comment;
|
||||
|
||||
public function __construct(Upload $upload)
|
||||
{
|
||||
$this->upload = $upload;
|
||||
$this->comment = $upload->getComment();
|
||||
}
|
||||
|
||||
public function getUpload(): Upload
|
||||
|
||||
Reference in New Issue
Block a user