feat: refactor staffing status assignment and filtering

This commit is contained in:
Björn Fromme
2024-07-16 17:34:50 +02:00
parent fa9c68c463
commit 5dd2f79c2d
14 changed files with 128 additions and 52 deletions
@@ -68,15 +68,15 @@
{% if assignment.status == 'draft' %}
{{ icon('edit', 'w-4 h-4') }}
{% else %}
{% if assignment.staffed %}
{% if assignment.staffingStatus == constant('App\\Entity\\Assignment::STATUS_STAFFED') %}
<svg viewBox="0 0 5 5" class="h-4 w-4 fill-current text-green-500">
<circle cx="3" cy="3" r="2" />
</svg>
{% elseif assignment.partlyStaffed %}
{% elseif assignment.staffingStatus == constant('App\\Entity\\Assignment::STATUS_PARTLY_STAFFED') %}
<svg viewBox="0 0 5 5" class="h-4 w-4 fill-current text-yellow-500">
<circle cx="3" cy="3" r="2" />
</svg>
{% elseif assignment.staffing %}
{% elseif assignment.staffingStatus == constant('App\\Entity\\Assignment::STATUS_STAFFING') %}
<svg viewBox="0 0 5 5" class="h-4 w-4 fill-current text-blue-500">
<circle cx="3" cy="3" r="2" />
</svg>
@@ -128,7 +128,7 @@
{% if is_granted('ROLE_ADMIN') %}
<td>
<a href="{{ path('app_administrative_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}" class="flex items-center space-x-2">
<span>{{ assignment.validApplications|length }}</span>
<span>{{ assignment.applications|length }}</span>
</a>
</td>
{% endif %}