correciton requete recherche dans liste des projets
This commit is contained in:
@@ -183,8 +183,8 @@ class ProjectController extends AbstractController
|
|||||||
->from("App:Project","project")
|
->from("App:Project","project")
|
||||||
->from("App:Customer", "customer")
|
->from("App:Customer", "customer")
|
||||||
->where("project.name LIKE :value")
|
->where("project.name LIKE :value")
|
||||||
|
->orWhere("customer.name LIKE :value")
|
||||||
->andWhere("project.customer=customer")
|
->andWhere("project.customer=customer")
|
||||||
->andWhere("customer.name LIKE :value")
|
|
||||||
->setParameter("value", "%".$q."%")
|
->setParameter("value", "%".$q."%")
|
||||||
->orderBy('customer.name');
|
->orderBy('customer.name');
|
||||||
|
|
||||||
|
@@ -65,15 +65,22 @@ class TaskType extends AbstractType
|
|||||||
);
|
);
|
||||||
|
|
||||||
$builder->add('project',
|
$builder->add('project',
|
||||||
EntityType::class, [
|
Select2EntityType::class, [
|
||||||
"label" => "Projet",
|
"label" => "Projet",
|
||||||
"class" => "App:Project",
|
|
||||||
"choice_label" => function ($project) {
|
|
||||||
return $project->getDisplayname();},
|
|
||||||
|
|
||||||
"disabled" => false,
|
"disabled" => false,
|
||||||
"required" => true,
|
"required" => true,
|
||||||
"multiple" => false,
|
"multiple" => false,
|
||||||
|
"remote_route" => "app_project_select",
|
||||||
|
"class" => "App:Project",
|
||||||
|
"primary_key" => "id",
|
||||||
|
"text_property" => "displayname",
|
||||||
|
"minimum_input_length" => 2,
|
||||||
|
"page_limit" => 100,
|
||||||
|
"allow_clear" => true,
|
||||||
|
"delay" => 250,
|
||||||
|
"cache" => false,
|
||||||
|
"cache_timeout" => 60000,
|
||||||
|
"language" => "fr",
|
||||||
"placeholder" => "Selectionner un Projet",
|
"placeholder" => "Selectionner un Projet",
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user