fix: reduce number of database queries caused by voter
This commit is contained in:
@@ -57,8 +57,9 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
<div>
|
||||
{% if assignment.applications|length %}
|
||||
{% set application = assignment.applicationByTeamer(teamer) %}
|
||||
{% set application = assignment.applications.first %}
|
||||
{% set disposition = assignment.dispositions.first%}
|
||||
{% if application %}
|
||||
{% if application.status == constant('App\\Entity\\Application::STATUS_REJECTED') %}
|
||||
<a href="{{ path('app_teamer_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}"
|
||||
class="btn btn--small flex items-center space-x-2 bg-gray-100 text-gray-800 hover:bg-gray-50">
|
||||
@@ -72,8 +73,8 @@
|
||||
<span>in Bearbeitung</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% elseif assignment.dispositions|length %}
|
||||
<a href="{{ path('app_teamer_disposition_detail', { 'uuid': assignment.dispositions[0].uuid }) }}"
|
||||
{% elseif disposition %}
|
||||
<a href="{{ path('app_teamer_disposition_detail', { 'uuid': disposition.uuid }) }}"
|
||||
class="btn btn--small flex items-center space-x-2 bg-green-100 text-green-700 hover:bg-green-50">
|
||||
{{ icon('check', 'w-4 h-4 shrink-0') }}
|
||||
<span>eingeteilt</span>
|
||||
@@ -98,4 +99,4 @@
|
||||
{% endfor %}
|
||||
</div>
|
||||
{{ knp_pagination_render(pagination, 'paginator/sliding_boxes.html.twig') }}
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user