update
This commit is contained in:
@@ -4,6 +4,7 @@ namespace App\Repository;
|
||||
|
||||
use App\Entity\TaskSchema;
|
||||
use App\Enum\TaskSchemaStatus;
|
||||
use App\Enum\TaskSchemaType;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
|
||||
@@ -20,7 +21,7 @@ class TaskSchemaRepository extends ServiceEntityRepository
|
||||
/**
|
||||
* @return TaskSchema[]
|
||||
*/
|
||||
public function findActiveTasksInRange(\DateTimeInterface $from, \DateTimeInterface $to): array
|
||||
public function findActiveSchemasInRange(\DateTimeInterface $from, \DateTimeInterface $to): array
|
||||
{
|
||||
return $this->createQueryBuilder('t')
|
||||
->where('t.status != :excluded')
|
||||
@@ -30,7 +31,7 @@ class TaskSchemaRepository extends ServiceEntityRepository
|
||||
. '(t.taskType != :einzel AND t.startDate <= :to AND (t.endDate IS NULL OR t.endDate >= :from))'
|
||||
)
|
||||
->setParameter('excluded', TaskSchemaStatus::Inactive)
|
||||
->setParameter('einzel', 'einzel')
|
||||
->setParameter('einzel', TaskSchemaType::Single->value)
|
||||
->setParameter('from', $from)
|
||||
->setParameter('to', $to)
|
||||
->getQuery()
|
||||
|
||||
Reference in New Issue
Block a user