feat: reduce number of rating stars to 5
This commit is contained in:
@@ -17,7 +17,7 @@ class FeedbackRatingsType extends AbstractType
|
|||||||
foreach ($ratings as $index => $rating) {
|
foreach ($ratings as $index => $rating) {
|
||||||
$builder->add('rating_'.$index, ChoiceType::class, [
|
$builder->add('rating_'.$index, ChoiceType::class, [
|
||||||
'label' => $rating,
|
'label' => $rating,
|
||||||
'choices' => array_combine(range(1, 6), range(1,6)),
|
'choices' => array_combine(range(1, 5), range(1,5)),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{% set averageRating = teamer.averageRating %}
|
{% set averageRating = teamer.averageRating %}
|
||||||
<div class="inline-flex items-center"{% if teamer.averageRating %}{{ stimulus_controller('tooltip', { content: averageRating|format_rating|raw, placement: 'top' }) }}{% endif %}>
|
<div class="inline-flex items-center"{% if teamer.averageRating %}{{ stimulus_controller('tooltip', { content: averageRating|format_rating|raw, placement: 'top' }) }}{% endif %}>
|
||||||
{% for grade in range(1, 6) %}
|
{% for grade in range(1, 5) %}
|
||||||
{{ icon('star', html_classes('w-3 h-3', { 'text-gray-200': averageRating < grade * 100, 'text-primary': averageRating >= grade * 100 })) }}
|
{{ icon('star', html_classes('w-4 h-4', { 'text-gray-200': averageRating < grade * 100, 'text-primary': averageRating >= grade * 100 })) }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
Reference in New Issue
Block a user