mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
Merge branch '111_exports_suite' into calendar/finalization
This commit is contained in:
@@ -40,9 +40,11 @@ final class AgentAggregator implements AggregatorInterface
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
$qb->join('cal.user', 'u');
|
||||
if (!in_array('caluser', $qb->getAllAliases(), true)) {
|
||||
$qb->join('cal.user', 'caluser');
|
||||
}
|
||||
|
||||
$qb->addSelect('u.id AS agent_aggregator');
|
||||
$qb->addSelect('caluser.id AS agent_aggregator');
|
||||
|
||||
$groupBy = $qb->getDQLPart('groupBy');
|
||||
|
||||
|
@@ -41,7 +41,9 @@ class CancelReasonAggregator implements AggregatorInterface
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
// TODO: still needs to take into account appointments without a cancel reason somehow
|
||||
$qb->join('cal.cancelReason', 'cr');
|
||||
if (!in_array('calcancel', $qb->getAllAliases(), true)) {
|
||||
$qb->join('cal.cancelReason', 'calcancel');
|
||||
}
|
||||
|
||||
$qb->addSelect('IDENTITY(cal.cancelReason) as cancel_reason_aggregator');
|
||||
|
||||
|
@@ -40,9 +40,11 @@ final class JobAggregator implements AggregatorInterface
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
$qb->join('cal.user', 'u');
|
||||
if (!in_array('caluser', $qb->getAllAliases(), true)) {
|
||||
$qb->join('cal.user', 'caluser');
|
||||
}
|
||||
|
||||
$qb->addSelect('IDENTITY(u.userJob) as job_aggregator');
|
||||
$qb->addSelect('IDENTITY(caluser.userJob) as job_aggregator');
|
||||
|
||||
$groupBy = $qb->getDQLPart('groupBy');
|
||||
|
||||
|
@@ -36,7 +36,9 @@ final class LocationAggregator implements AggregatorInterface
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
$qb->join('cal.location', 'l');
|
||||
if (!in_array('calloc', $qb->getAllAliases(), true)) {
|
||||
$qb->join('cal.location', 'calloc');
|
||||
}
|
||||
$qb->addSelect('IDENTITY(cal.location) as location_aggregator');
|
||||
|
||||
$groupBy = $qb->getDQLPart('groupBy');
|
||||
|
@@ -40,9 +40,11 @@ final class LocationTypeAggregator implements AggregatorInterface
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
$qb->join('cal.location', 'l');
|
||||
if (!in_array('calloc', $qb->getAllAliases(), true)) {
|
||||
$qb->join('cal.location', 'calloc');
|
||||
}
|
||||
|
||||
$qb->addSelect('IDENTITY(l.locationType) as location_type_aggregator');
|
||||
$qb->addSelect('IDENTITY(calloc.locationType) as location_type_aggregator');
|
||||
|
||||
$groupBy = $qb->getDQLPart('groupBy');
|
||||
|
||||
|
@@ -40,9 +40,11 @@ final class ScopeAggregator implements AggregatorInterface
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
$qb->join('cal.user', 'u');
|
||||
if (!in_array('caluser', $qb->getAllAliases(), true)) {
|
||||
$qb->join('cal.user', 'caluser');
|
||||
}
|
||||
|
||||
$qb->addSelect('IDENTITY(u.mainScope) as scope_aggregator');
|
||||
$qb->addSelect('IDENTITY(caluser.mainScope) as scope_aggregator');
|
||||
|
||||
$groupBy = $qb->getDQLPart('groupBy');
|
||||
|
||||
|
@@ -42,10 +42,12 @@ class JobFilter implements FilterInterface
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
$qb->join('cal.user', 'u');
|
||||
if (!in_array('caluser', $qb->getAllAliases(), true)) {
|
||||
$qb->join('cal.user', 'caluser');
|
||||
}
|
||||
|
||||
$where = $qb->getDQLPart('where');
|
||||
$clause = $qb->expr()->in('u.userJob', ':job');
|
||||
$clause = $qb->expr()->in('caluser.userJob', ':job');
|
||||
|
||||
if ($where instanceof Andx) {
|
||||
$where->add($clause);
|
||||
|
@@ -42,10 +42,12 @@ class ScopeFilter implements FilterInterface
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
$qb->join('cal.user', 'u');
|
||||
if (!in_array('caluser', $qb->getAllAliases(), true)) {
|
||||
$qb->join('cal.user', 'caluser');
|
||||
}
|
||||
|
||||
$where = $qb->getDQLPart('where');
|
||||
$clause = $qb->expr()->in('u.mainScope', ':scope');
|
||||
$clause = $qb->expr()->in('caluser.mainScope', ':scope');
|
||||
|
||||
if ($where instanceof Andx) {
|
||||
$where->add($clause);
|
||||
|
Reference in New Issue
Block a user