Feat: Add even more guards
This commit is contained in:
@@ -69,6 +69,16 @@ class DispositionWorkflowGuardSubscriber implements EventSubscriberInterface
|
|||||||
$destination = $assignment->getDestination();
|
$destination = $assignment->getDestination();
|
||||||
$today = new \DateTimeImmutable();
|
$today = new \DateTimeImmutable();
|
||||||
|
|
||||||
|
$contractDocument = $disposition->getDocumentByType(Upload::TYPE_CONTRACT);
|
||||||
|
|
||||||
|
if (null === $contractDocument || Upload::STATUS_CHECKED !== $contractDocument->getStatus()) {
|
||||||
|
$message = $this
|
||||||
|
->translator
|
||||||
|
->trans('message.upload_invoice.contract_missing_or_not_checked')
|
||||||
|
;
|
||||||
|
$event->setBlocked(true, $message);
|
||||||
|
}
|
||||||
|
|
||||||
$earliestDate = $destination->getDateFrom();
|
$earliestDate = $destination->getDateFrom();
|
||||||
|
|
||||||
if ($earliestDate > $today) {
|
if ($earliestDate > $today) {
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ message:
|
|||||||
upload_contract:
|
upload_contract:
|
||||||
too_late: 'Die Frist für den Upload des Honorarvertrages ist abgelaufen (%date_from% - %date_to%). Bitte wende dich an deinen Ansprechpartner.'
|
too_late: 'Die Frist für den Upload des Honorarvertrages ist abgelaufen (%date_from% - %date_to%). Bitte wende dich an deinen Ansprechpartner.'
|
||||||
upload_invoice:
|
upload_invoice:
|
||||||
|
contract_missing_or_not_checked: 'Der Honorarvertrag wurde noch nicht hochgeladen oder ist noch nicht geprüft worden.'
|
||||||
too_early: 'Du kannst deine Honorarnote mit Beginn deines Einsatzes ab dem %date% einreichen.'
|
too_early: 'Du kannst deine Honorarnote mit Beginn deines Einsatzes ab dem %date% einreichen.'
|
||||||
too_late: 'Du hättest deine Honorarnote bis zum %date% einreichen müssen. Bitte wende dich an deinen Ansprechpartner.'
|
too_late: 'Du hättest deine Honorarnote bis zum %date% einreichen müssen. Bitte wende dich an deinen Ansprechpartner.'
|
||||||
confirm_invoice:
|
confirm_invoice:
|
||||||
|
|||||||
Reference in New Issue
Block a user