fixed: do not show disabled jobs in list of jobs from the api

This commit is contained in:
2022-07-11 16:20:48 +02:00
parent 692c2bdac0
commit c69af351cc
2 changed files with 27 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Chill\MainBundle\Controller;
use Chill\MainBundle\CRUD\Controller\ApiController;
use Symfony\Component\HttpFoundation\Request;
class UserJobApiController extends ApiController
{
protected function customizeQuery(string $action, Request $request, $query): void
{
if ('_index' === $action) {
$query->andWhere($query->expr()->eq('e.active', "'TRUE'"));
}
}
}