fix: use correct rating values for filtering

This commit is contained in:
Björn Fromme
2024-10-28 17:01:59 +01:00
parent 2df2d70375
commit 8c4754774b
+10 -2
View File
@@ -4,7 +4,7 @@ namespace App\Form;
use App\Model\FeedbackFilterDto;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\NumberType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
@@ -27,9 +27,17 @@ class FeedbackFilterType extends AbstractType
'label' => 'Zeitraum bis',
'required' => false,
])
->add('averageRating', NumberType::class, [
->add('averageRating', ChoiceType::class, [
'label' => 'durschnittliche Bewertung mindestens',
'required' => false,
'placeholder' => 'nicht filtern',
'choices' => [
'1 *' => 100,
'2 **' => 200,
'3 ***' => 300,
'4 ****' => 400,
'5 *****' => 500,
],
])
->add('apply', SubmitType::class, [
'label' => 'filtern',