fix: type mismatches and handle nullable values
This commit is contained in:
@@ -56,17 +56,11 @@
|
||||
<td class="px-4 py-3 text-right">{{ stat.providedFeedbacks }}</td>
|
||||
<td class="px-4 py-3 text-right">{{ stat.missingFeedbacks }}</td>
|
||||
<td class="px-4 py-3 text-right">
|
||||
<span class="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium
|
||||
{% if stat.percentageProvided >= 80 %}
|
||||
bg-green-100 text-green-800
|
||||
{% elseif stat.percentageProvided >= 50 %}
|
||||
bg-yellow-100 text-yellow-800
|
||||
{% else %}
|
||||
bg-red-100 text-red-800
|
||||
{% endif %}
|
||||
">
|
||||
{{ stat.percentageProvided|number_format(1, ',', '.') }}%
|
||||
</span>
|
||||
<span class="{{ html_classes('inline-flex items-center px-2 py-0.5 rounded text-xs font-medium', {
|
||||
'bg-green-100 text-green-800': totalPercentage >= 80,
|
||||
'bg-yellow-100 text-yellow-800': totalPercentage >= 50,
|
||||
'bg-red-100 text-red-800': totalPercentage >= 0
|
||||
}) }}">{{ stat.percentageProvided|number_format(1, ',', '.') }}%</span>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
@@ -87,17 +81,11 @@
|
||||
<td class="px-4 py-3 text-right">{{ totalProvided }}</td>
|
||||
<td class="px-4 py-3 text-right">{{ totalMissing }}</td>
|
||||
<td class="px-4 py-3 text-right">
|
||||
<span class="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium
|
||||
{% if totalPercentage >= 80 %}
|
||||
bg-green-100 text-green-800
|
||||
{% elseif totalPercentage >= 50 %}
|
||||
bg-yellow-100 text-yellow-800
|
||||
{% else %}
|
||||
bg-red-100 text-red-800
|
||||
{% endif %}
|
||||
">
|
||||
{{ totalPercentage|number_format(1, ',', '.') }}%
|
||||
</span>
|
||||
<span class="{{ html_classes('inline-flex items-center px-2 py-0.5 rounded text-xs font-medium', {
|
||||
'bg-green-100 text-green-800': totalPercentage >= 80,
|
||||
'bg-yellow-100 text-yellow-800': totalPercentage >= 50,
|
||||
'bg-red-100 text-red-800': totalPercentage >= 0
|
||||
}) }}">{{ totalPercentage|number_format(1, ',', '.') }}%</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
||||
Reference in New Issue
Block a user