Prepare Specs UI for Windows review

This commit is contained in:
Alex
2026-10-10 11:30:27 +00:00
parent 6e6035c789
commit 25511870ff
68 changed files with 1931 additions and 1070 deletions
+8 -2
View File
@@ -42,11 +42,17 @@
<td>{{ resource.module.name if resource.module else 'N/A' }}</td>
<td>{{ resource.quantity }}</td>
<td>
{% set allocated = resource.resource_allocations|sum(attribute='quantity', default=0) %}
{% set allocated = 0 %}
{% for allocation in resource.resource_allocations %}
{% set allocated = allocated + allocation.quantity %}
{% endfor %}
{{ allocated }}
</td>
<td>
{% set allocated = resource.resource_allocations|sum(attribute='quantity', default=0) %}
{% set allocated = 0 %}
{% for allocation in resource.resource_allocations %}
{% set allocated = allocated + allocation.quantity %}
{% endfor %}
{% set remaining = resource.quantity - allocated %}
<span class="badge {% if remaining <= 0 %}bg-danger{% elif remaining < 100 %}bg-warning{% else %}bg-success{% endif %}">
{{ remaining }}