feat: legend of status colors in assignment overview

This commit is contained in:
Björn Fromme
2024-04-04 14:21:10 +02:00
parent 3266d5dc99
commit ffc33cebc5
2 changed files with 36 additions and 2 deletions
+8 -2
View File
@@ -474,14 +474,20 @@ class Assignment implements BlameableEntityInterface, TimestampableEntityInterfa
return $this->availableDispositions === $this->dispositions->count();
}
public function isUnstaffed(): bool
{
return 0 === $this->dispositions->count();
}
public function isPartlyStaffed(): bool
{
return $this->availableDispositions > $this->dispositions->count()
&& 0 === $this->applications->count();
&& 0 < $this->dispositions->count();
}
public function isStaffing(): bool
{
return 0 === $this->dispositions->count() && 0 < $this->applications->count();
return $this->availableDispositions > $this->dispositions->count()
&& 0 < $this->applications->count();
}
}