Sfoglia il codice sorgente

Correctif index ticket

develop
Fabien Normand 3 anni fa
parent
commit
0bdcd33538
5 ha cambiato i file con 10 aggiunte e 9 eliminazioni
  1. +4
    -3
      Controller/AbstractAdminController.php
  2. +1
    -1
      Field/Filter/Ticket/TicketEmailFilter.php
  3. +1
    -1
      Field/Filter/Ticket/TicketFirstnameFilter.php
  4. +1
    -1
      Field/Filter/Ticket/TicketLastnameFilter.php
  5. +3
    -3
      Repository/Ticket/TicketRepositoryQuery.php

+ 4
- 3
Controller/AbstractAdminController.php Vedi File

@@ -478,6 +478,7 @@ abstract class AbstractAdminController extends EaAbstractCrudController
$this->buildEditActions($actions);
$this->buildDetailActions($actions);
$this->buildNewActions($actions);

$this->handleTranslatableEntityActions($actions);
$this->handleSortableEntityActions($actions);
$this->handleTreeEntityActions($actions);
@@ -633,7 +634,7 @@ abstract class AbstractAdminController extends EaAbstractCrudController

$this->actionUpdate(
$actions,
Crud::PAGE_EDIT,
Crud::PAGE_NEW,
ActionDefinition::SAVE_AND_RETURN,
[
'add_class' => 'float-right',
@@ -644,7 +645,7 @@ abstract class AbstractAdminController extends EaAbstractCrudController

$this->actionUpdate(
$actions,
Crud::PAGE_EDIT,
Crud::PAGE_NEW,
ActionDefinition::INDEX,
[
'icon' => 'chevron-left',
@@ -655,7 +656,7 @@ abstract class AbstractAdminController extends EaAbstractCrudController

$this->actionUpdate(
$actions,
Crud::PAGE_EDIT,
Crud::PAGE_NEW,
ActionDefinition::SAVE_AND_ADD_ANOTHER,
[
'class' => 'btn btn-info float-right',

+ 1
- 1
Field/Filter/Ticket/TicketEmailFilter.php Vedi File

@@ -31,7 +31,7 @@ class TicketEmailFilter extends AssociationFilter
public function applyFilter(RepositoryQueryInterface $repositoryQuery, FieldDto $fieldDto, $filteredValue = null)
{
if ($filteredValue !== null) {
$repositoryQuery->filterByEmail($filteredValue);
$repositoryQuery->filterByEmail('%'.$filteredValue.'%');
}
}


+ 1
- 1
Field/Filter/Ticket/TicketFirstnameFilter.php Vedi File

@@ -31,7 +31,7 @@ class TicketFirstnameFilter extends AssociationFilter
public function applyFilter(RepositoryQueryInterface $repositoryQuery, FieldDto $fieldDto, $filteredValue = null)
{
if ($filteredValue !== null) {
$repositoryQuery->filterByFirstname($filteredValue);
$repositoryQuery->filterByFirstname('%'.$filteredValue.'%');
}
}


+ 1
- 1
Field/Filter/Ticket/TicketLastnameFilter.php Vedi File

@@ -31,7 +31,7 @@ class TicketLastnameFilter extends AssociationFilter
public function applyFilter(RepositoryQueryInterface $repositoryQuery, FieldDto $fieldDto, $filteredValue = null)
{
if ($filteredValue !== null) {
$repositoryQuery->filterByLastname($filteredValue);
$repositoryQuery->filterByLastname('%'.$filteredValue.'%');
}
}


+ 3
- 3
Repository/Ticket/TicketRepositoryQuery.php Vedi File

@@ -47,7 +47,7 @@ class TicketRepositoryQuery extends AbstractRepositoryQuery implements TicketRep

return $this
->andWhere('.visitorFirstname LIKE :firstname OR u.firstname LIKE :firstname')
->setParameter('firstname', '%'.$firstname.'%');
->setParameter('firstname', $firstname);
}

public function filterByLastname(string $lastname)
@@ -56,7 +56,7 @@ class TicketRepositoryQuery extends AbstractRepositoryQuery implements TicketRep

return $this
->andWhere('.visitorLastname LIKE :lastname OR u.lastname LIKE :lastname')
->setParameter('lastname', '%'.$lastname.'%');
->setParameter('lastname', $lastname);
}

public function filterByEmail(string $email)
@@ -65,7 +65,7 @@ class TicketRepositoryQuery extends AbstractRepositoryQuery implements TicketRep

return $this
->andWhere('.visitorEmail LIKE :email OR u.email LIKE :email')
->setParameter('email', '%'.$email.'%');
->setParameter('email', $email);
}

public function selectCount(): self

Loading…
Annulla
Salva