fix: include comment in notification email on document rejection
closes #869bppd0e
This commit is contained in:
@@ -67,7 +67,7 @@ class CheckController extends AbstractController
|
|||||||
case Upload::STATUS_REJECTED:
|
case Upload::STATUS_REJECTED:
|
||||||
$this->rejectDocument($document, $formData->getComment());
|
$this->rejectDocument($document, $formData->getComment());
|
||||||
$this->eventDispatcher->dispatch(
|
$this->eventDispatcher->dispatch(
|
||||||
new DocumentRejectedEvent($formData),
|
new DocumentRejectedEvent($document),
|
||||||
DocumentRejectedEvent::NAME
|
DocumentRejectedEvent::NAME
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
namespace App\Event;
|
namespace App\Event;
|
||||||
|
|
||||||
use App\Entity\Upload;
|
use App\Entity\Upload;
|
||||||
use App\Model\DocumentCheckDto;
|
|
||||||
use Symfony\Contracts\EventDispatcher\Event;
|
use Symfony\Contracts\EventDispatcher\Event;
|
||||||
|
|
||||||
class DocumentRejectedEvent extends Event
|
class DocumentRejectedEvent extends Event
|
||||||
@@ -13,10 +12,10 @@ class DocumentRejectedEvent extends Event
|
|||||||
private Upload $document;
|
private Upload $document;
|
||||||
private ?string $comment;
|
private ?string $comment;
|
||||||
|
|
||||||
public function __construct(DocumentCheckDto $documentCheckDto)
|
public function __construct(Upload $document)
|
||||||
{
|
{
|
||||||
$this->document = $documentCheckDto->getUpload();
|
$this->document = $document;
|
||||||
$this->comment = $documentCheckDto->getComment();
|
$this->comment = $document->getComment();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getDocument(): Upload
|
public function getDocument(): Upload
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 702 KiB |
Reference in New Issue
Block a user