diff --git a/src/Entity/Assignment.php b/src/Entity/Assignment.php index 16ea32c..232c843 100644 --- a/src/Entity/Assignment.php +++ b/src/Entity/Assignment.php @@ -463,4 +463,21 @@ class Assignment implements BlameableEntityInterface, TimestampableEntityInterfa return $this; } + + public function isStaffed(): bool + { + return $this->availableDispositions === $this->dispositions->count(); + } + + public function isPartlyStaffed(): bool + { + return $this->availableDispositions > $this->dispositions->count() + && 0 === $this->applications->count(); + } + + public function isInProgress(): bool + { + return $this->availableDispositions > $this->dispositions->count() + && 0 < $this->applications->count(); + } } diff --git a/templates/administrative/assignment/index.html.twig b/templates/administrative/assignment/index.html.twig index 878b6bd..b485e9a 100644 --- a/templates/administrative/assignment/index.html.twig +++ b/templates/administrative/assignment/index.html.twig @@ -62,13 +62,32 @@ {% for assignment in pagination %}