feat: display assignments' dispositions and applications status in list

This commit is contained in:
Björn Fromme
2024-02-28 09:51:23 +01:00
parent 28c7f83f47
commit 63b78ef616
2 changed files with 43 additions and 7 deletions
+17
View File
@@ -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();
}
}