This commit is contained in:
Marek Lenczewski
2026-03-30 23:08:24 +02:00
parent 2f96caaa23
commit 7b58e68ecb
31 changed files with 637 additions and 431 deletions

View File

@@ -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()