2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-08-14 07:31:10 +00:00

UI improvements

This commit is contained in:
Oliver
2018-04-16 23:09:45 +10:00
parent b6b4189c49
commit a67d5b58db
16 changed files with 213 additions and 23 deletions

View File

@@ -12,7 +12,6 @@ Deletion title goes here
<p><b>This is a permanent action and cannot be undone.</b></p>
{% block del_body %}
Deletion body goes here
{% endblock %}
<form action="" method="post">{% csrf_token %}

View File

@@ -4,18 +4,22 @@
{% include 'part/tabs.html' with tab='bom' %}
<h3>Bill of Materials</h3>
<table class="table table-striped">
<tr>
<th>Part</th>
<th>Description</th>
<th>Quantity</th>
<th>Edit</th>
</tr>
{% for bom_item in part.bom_items.all %}
{% with sub_part=bom_item.sub_part %}
<tr>
<td><a href="{% url 'part-detail' sub_part.id %}">{{ sub_part.name }}</a></td>
<td>{{ sub_part.description }}</td>
<td>{{ bom_item.quantity }}<span class='badge'>{{ bom_item.sub_part.available_stock }}</span></td>
<td>{{ bom_item.quantity }}</span></td>
<td><a href="{% url 'bom-item-detail' bom_item.id %}">Edit</a></td>
</tr>
{% endwith %}
{% endfor %}

View File

@@ -0,0 +1,13 @@
{% extends "part/part_base.html" %}
{% block details %}
{% include 'part/tabs.html' with tab='build' %}
<h3>Build Part</h3>
TODO
<br><br>
You can build {{ part.can_build }} of this part with current stock.
{% endblock %}

View File

@@ -4,9 +4,11 @@
{% include 'part/tabs.html' with tab='detail' %}
<h3>Part Details</h3>
<table class='table table-striped'>
<tr>
<td>Name</td>
<td>Part name</td>
<td>{{ part.name }}</td>
</tr>
<tr>
@@ -37,6 +39,12 @@
<td>Purchaseable</td>
<td>{{ part.purchaseable }}</td>
</tr>
{% if part.minimum_stock > 0 %}
<tr>
<td>Minimum Stock</td>
<td>{{ part.minimum_stock }}</td>
</tr>
{% endif %}
</table>
<div class='container-fluid'>

View File

@@ -4,6 +4,8 @@
{% include 'part/tabs.html' with tab='stock' %}
<h3>Part Stock</h3>
<table class="table table-striped">
<tr>
<th>Link</th>

View File

@@ -4,6 +4,8 @@
{% include 'part/tabs.html' with tab='suppliers' %}
<h3>Part Suppliers</h3>
<table class="table table-striped">
<tr>
<th>SKU</th>

View File

@@ -2,7 +2,7 @@
<li{% ifequal tab 'detail' %} class="active"{% endifequal %}><a href="{% url 'part-detail' part.id %}">Details</a></li>
{% if part.buildable %}
<li{% ifequal tab 'bom' %} class="active"{% endifequal %}><a href="{% url 'part-bom' part.id %}">BOM<span class="badge">{{ part.bom_count }}</span></a></li>
<li{% ifequal tab 'build' %} class "active"{% endifequal %}><a href="#">Build<span class='badge'>{{ part.can_build }}</span></a></li>
<li{% ifequal tab 'build' %} class="active"{% endifequal %}><a href="{% url 'part-build' part.id %}">Build<span class='badge'>{{ part.can_build }}</span></a></li>
{% endif %}
{% if part.used_in_count > 0 %}
<li{% ifequal tab 'used' %} class="active"{% endifequal %}><a href="{% url 'part-used-in' part.id %}">Used In{% if part.used_in_count > 0 %}<span class="badge">{{ part.used_in_count }}</span>{% endif %}</a></li>

View File

@@ -4,6 +4,8 @@
{% include 'part/tabs.html' with tab='used' %}
<h3>Used In</h3>
<table class="table table-striped">
<tr>
<th>Part</th>