feat: filter assignments by assignment status
This commit is contained in:
@@ -25,6 +25,10 @@ class Assignment implements BlameableEntityInterface, TimestampableEntityInterfa
|
||||
public const STATUS_OPEN = 'open';
|
||||
public const STATUS_CLOSED = 'closed';
|
||||
|
||||
public const STATUS_STAFFED = 'staffed';
|
||||
public const STATUS_PARTLY_STAFFED = 'partly_staffed';
|
||||
public const STATUS_STAFFING = 'staffing';
|
||||
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column]
|
||||
@@ -475,9 +479,8 @@ class Assignment implements BlameableEntityInterface, TimestampableEntityInterfa
|
||||
&& 0 === $this->applications->count();
|
||||
}
|
||||
|
||||
public function isInProgress(): bool
|
||||
public function isStaffing(): bool
|
||||
{
|
||||
return $this->availableDispositions > $this->dispositions->count()
|
||||
&& 0 < $this->applications->count();
|
||||
return 0 === $this->dispositions->count() && 0 < $this->applications->count();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user