Skip to content

Commit

Permalink
[TASK] Reduce pagebrowser items in company list view
Browse files Browse the repository at this point in the history
by setting a limit of 750 companies. This is the same amount as for lead list.
  • Loading branch information
einpraegsam committed Feb 16, 2024
1 parent 202f7de commit 8e16965
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Classes/Domain/Repository/CompanyRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
declare(strict_types=1);
namespace In2code\Lux\Domain\Repository;

use Doctrine\DBAL\Driver\Exception as ExceptionDbalDriver;
use Doctrine\DBAL\Exception as ExceptionDbal;
use Exception;
use In2code\Lux\Domain\Model\Company;
Expand All @@ -24,11 +23,11 @@ class CompanyRepository extends AbstractRepository

/**
* @param FilterDto $filter
* @param int $limit
* @return array
* @throws ExceptionDbal
* @throws ExceptionDbalDriver
*/
public function findByFilter(FilterDto $filter): array
public function findByFilter(FilterDto $filter, int $limit = 750): array
{
$sql = 'select c.uid,sum(v.scoring) companyscoring'
. ' from ' . Company::TABLE_NAME . ' c'
Expand All @@ -42,6 +41,7 @@ public function findByFilter(FilterDto $filter): array
$sql .= ' group by c.uid';
$sql .= $this->extendWhereClauseWithFilterCompanyscoring($filter);
$sql .= ' order by companyscoring desc';
$sql .= ' limit ' . $limit;
$connection = DatabaseUtility::getConnectionForTable(Company::TABLE_NAME);
$results = $connection->executeQuery($sql)->fetchAllKeyValue();

Expand Down

0 comments on commit 8e16965

Please sign in to comment.