* Cleaner "variant of" rendering

* cleanup
This commit is contained in:
Oliver 2023-04-04 22:21:29 +10:00 committed by GitHub
parent 1ddc86d6a3
commit 85ff294d0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 24 deletions

View File

@ -98,13 +98,6 @@ src="{% static 'img/blank_image.png' %}"
{% trans "No build outputs have been created for this build order" %}<br>
</div>
{% endif %}
{% if build.sales_order %}
<div class='alert alert-block alert-info'>
{% object_link 'so-detail' build.sales_order.id build.sales_order as link %}
{% blocktrans %}This Build Order is allocated to Sales Order {{link}}{% endblocktrans %}
</div>
{% endif %}
{% if build.parent %}
<div class='alert alert-block alert-info'>
{% object_link 'build-detail' build.parent.id build.parent as link %}
@ -162,7 +155,12 @@ src="{% static 'img/blank_image.png' %}"
</tr>
{% endif %}
<tr>
<td><span class='fas fa-check-circle'></span></td>
<td>
{% if build.completed >= build.quantity %}
<span class='fas fa-check-circle icon-green'></span>
{% else %}
<span class='fa fa-times-circle icon-red'></span>
{% endif %}
<td>{% trans "Completed" %}</td>
<td>{% progress_bar build.completed build.quantity id='build-completed' max_width='150px' %}</td>
</tr>

View File

@ -173,17 +173,16 @@
<td>{{ part.description }}{% include "clip.html"%}</td>
</tr>
</table>
<!-- Part info messages -->
<div class='info-messages'>
{% if part.variant_of %}
<div class='alert alert-info alert-block' style='padding: 10px;'>
{% object_link 'part-detail' part.variant_of.id part.variant_of.full_name as link %}
{% blocktrans %}This part is a variant of {{link}}{% endblocktrans %}
</div>
<tr>
<td><span class='fas fa-sitemap'></span></td>
<td>{% trans "Variant Of" %}</td>
<td>
<a href='{% url "part-detail" part.variant_of.pk %}'>{{ part.variant_of.full_name }}</a>
</td>
</tr>
{% endif %}
</div>
</table>
{% endblock details %}

View File

@ -281,12 +281,6 @@
</div>
{% endif %}
{% if item.hasRequiredTests and not item.passedAllRequiredTests %}
<div class='alert alert-block alert-warning'>
{% trans "This stock item has not passed all required tests" %}
</div>
{% endif %}
{% for allocation in item.get_sales_order_allocations.all %}
<div class='alert alert-block alert-info'>
{% object_link 'so-detail' allocation.line.order.id allocation.line.order as link %}
@ -412,7 +406,7 @@
{% if item.passedAllRequiredTests %}
<span class='fas fa-check-circle float-right icon-green'></span>
{% else %}
<span class='fas fa-times-circle float-right icon-red'></span>
<span class='fas fa-times-circle float-right icon-red' title='{% trans "This stock item has not passed all required tests" %}'></span>
{% endif %}
</td>
</tr>