Feat: Add status to assignments to control applications
This commit is contained in:
@@ -43,6 +43,11 @@ class AssignmentVoter extends Voter
|
||||
/** @var Assignment $assignment */
|
||||
$assignment = $subject;
|
||||
|
||||
// Only allow applications to open assignments
|
||||
if (Assignment::STATUS_CLOSED === $assignment->getStatus()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Only allow applications on empty slots
|
||||
$availableSlots = (int) $assignment->getAvailableDispositions();
|
||||
if (0 < $availableSlots) {
|
||||
|
||||
Reference in New Issue
Block a user