filter tasks by type, allow to overload task edit page and section menu

This commit is contained in:
2018-08-27 10:49:32 +02:00
parent b3b1e0aff5
commit a69b2d7e40
11 changed files with 208 additions and 13 deletions

View File

@@ -127,6 +127,11 @@ class SingleTaskRepository extends \Doctrine\ORM\EntityRepository
$qb->andWhere($qb->expr()->eq('st.circle', ':scope'));
$qb->setParameter('scope', $params['scope']);
}
if (\array_key_exists('types', $params)) {
$qb->andWhere($qb->expr()->in('st.type', ':types'));
$qb->setParameter('types', $params['types']);
}
if (\array_key_exists('date_status', $params) and !empty($params['date_status'])) {
$this->addTypeFilter($qb, $params);
@@ -135,10 +140,6 @@ class SingleTaskRepository extends \Doctrine\ORM\EntityRepository
if (\array_key_exists('is_closed', $params)) {
$qb->andWhere($this->buildIsClosed($qb, !$params['is_closed']));
}
if (\array_key_exists('types', $params) && count($params['types']) > 0) {
$qb->andWhere($qb->expr()->in('st.type', $params['types']));
}
}