feat: display teamers' average ratings in several locations
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
{% set averageRating = teamer.averageRating %}
|
||||
<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) %}
|
||||
{{ icon('star', html_classes('w-3 h-3', { 'text-gray-200': averageRating < grade * 100, 'text-primary': averageRating >= grade * 100 })) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
@@ -134,6 +134,7 @@
|
||||
<span>{{ disposition.teamer }}</span>
|
||||
{{ icon('info', 'w-4 h-4') }}
|
||||
</button>
|
||||
{% include '_partials/_rating_stars.html.twig' with { 'teamer': disposition.teamer } %}
|
||||
</td>
|
||||
<td>
|
||||
{{ disposition.remarks|nl2br|default('-') }}
|
||||
|
||||
@@ -59,15 +59,18 @@
|
||||
{% for teamer in pagination %}
|
||||
<tr>
|
||||
<td>
|
||||
{% if teamer.photo %}
|
||||
<img src="{{ asset(teamer.photo.filename | imagine_filter('profile')) }}"
|
||||
class="w-12 h-auto rounded-full"
|
||||
alt="{{ teamer.firstName }}">
|
||||
{% else %}
|
||||
<div class="flex flex-col items-center justify-center w-12 h-12 border-2 border-gray-200 rounded-full">
|
||||
{{ icon('user', 'w-10 h-10 text-gray-200') }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="flex flex-col items-center space-y-2">
|
||||
{% if teamer.photo %}
|
||||
<img src="{{ asset(teamer.photo.filename | imagine_filter('profile')) }}"
|
||||
class="w-12 h-auto rounded-full"
|
||||
alt="{{ teamer.firstName }}">
|
||||
{% else %}
|
||||
<div class="flex flex-col items-center justify-center w-12 h-12 border-2 border-gray-200 rounded-full">
|
||||
{{ icon('user', 'w-10 h-10 text-gray-200') }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% include '_partials/_rating_stars.html.twig' with { 'teamer': teamer } %}
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ path('app_admin_teamer_profile', { 'uuid': teamer.uuid }) }}">
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
<div>
|
||||
<div class="flex flex-col space-y-4">
|
||||
{% if teamer.photo %}
|
||||
<img src="{{ asset(teamer.photo.filename | imagine_filter('profile')) }}"
|
||||
class="w-32 h-auto border-2 border-primary"
|
||||
@@ -39,5 +39,6 @@
|
||||
{{ icon('user', 'w-32 h-32 text-gray-200') }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% include '_partials/_rating_stars.html.twig' with { 'teamer': teamer } %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user