feat: remove unused assignment status, rename 'open' to 'published'
This commit is contained in:
1 parent
4ac8f36589
commit
40a5fcc1fa
6 files changed
+34
-15
No files matched your search
@@ -22,8 +22,7 @@ class Assignment implements BlameableEntityInterface, TimestampableEntityInterfa
|
||||
use SoftDeletableEntity;
|
||||
|
||||
public const STATUS_DRAFT = 'draft';
|
||||
public const STATUS_OPEN = 'open';
|
||||
public const STATUS_CLOSED = 'closed';
|
||||
public const STATUS_PUBLISHED = 'published';
|
||||
|
||||
public const STATUS_STAFFED = 'staffed';
|
||||
public const STATUS_PARTLY_STAFFED = 'partly_staffed';
|
||||
|
||||
@@ -36,8 +36,7 @@ class AssignmentType extends AbstractType
|
||||
'label' => 'Status',
|
||||
'choices' => [
|
||||
'Entwurf' => Assignment::STATUS_DRAFT,
|
||||
'offen' => Assignment::STATUS_OPEN,
|
||||
'geschlossen' => Assignment::STATUS_CLOSED,
|
||||
'veröffentlicht' => Assignment::STATUS_PUBLISHED,
|
||||
],
|
||||
])
|
||||
->add('availableDispositions', IntegerType::class, [
|
||||
|
||||
@@ -286,7 +286,7 @@ class AssignmentRepository extends ServiceEntityRepository
|
||||
$qb->expr()->gt('destination.dateFrom', ':dateFrom')
|
||||
)
|
||||
))
|
||||
->setParameter('status', Assignment::STATUS_OPEN)
|
||||
->setParameter('status', Assignment::STATUS_PUBLISHED)
|
||||
->setParameter('jobProfiles', $teamer->getJobProfiles())
|
||||
->setParameter('teamer', $teamer)
|
||||
->setParameter('dateFrom', new \DateTimeImmutable())
|
||||
|
||||
@@ -47,8 +47,8 @@ class AssignmentVoter extends Voter
|
||||
return $this->security->isGranted('ROLE_ADMINISTRATIVE');
|
||||
}
|
||||
|
||||
// Only allow applications to open assignments
|
||||
if (Assignment::STATUS_CLOSED === $assignment->getStatus()) {
|
||||
// Only allow applications to published assignments
|
||||
if (Assignment::STATUS_DRAFT === $assignment->getStatus()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user