mirror of
https://github.com/inventree/InvenTree.git
synced 2025-08-07 12:22:11 +00:00
Add 'to_order' and 'to_build' collapsible panels
This commit is contained in:
@@ -3,9 +3,20 @@
|
||||
{% block content %}
|
||||
<h3>InvenTree</h3>
|
||||
|
||||
<p>Index!</p>
|
||||
{% if to_order %}
|
||||
{% include "InvenTree/parts_to_order.html" with collapse_id="order" %}
|
||||
{% endif %}
|
||||
|
||||
{% if to_build %}
|
||||
{% include "InvenTree/parts_to_build.html" with collapse_id="build" %}
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block js_load %}
|
||||
{{ block.super }}
|
||||
{% endblock %}
|
||||
|
||||
{% block js_ready %}
|
||||
{{ block.super }}
|
||||
{% endblock %}
|
14
InvenTree/templates/InvenTree/parts_to_build.html
Normal file
14
InvenTree/templates/InvenTree/parts_to_build.html
Normal file
@@ -0,0 +1,14 @@
|
||||
{% extends "collapse.html" %}
|
||||
{% block collapse_title %}
|
||||
Parts to Build<span class='badge'>{{ to_build | length }}</span>
|
||||
{% endblock %}
|
||||
|
||||
{% block collapse_heading %}
|
||||
There are {{ to_build | length }} parts which need building.
|
||||
{% endblock %}
|
||||
|
||||
{% block collapse_content %}
|
||||
|
||||
{% include "required_part_table.html" with parts=to_build table_id="to-build-table" %}
|
||||
|
||||
{% endblock %}
|
14
InvenTree/templates/InvenTree/parts_to_order.html
Normal file
14
InvenTree/templates/InvenTree/parts_to_order.html
Normal file
@@ -0,0 +1,14 @@
|
||||
{% extends "collapse.html" %}
|
||||
{% block collapse_title %}
|
||||
Parts to Order<span class='badge'>{{ to_order | length }}</span>
|
||||
{% endblock %}
|
||||
|
||||
{% block collapse_heading %}
|
||||
There are {{ to_order | length }} parts which need to be ordered.
|
||||
{% endblock %}
|
||||
|
||||
{% block collapse_content %}
|
||||
|
||||
{% include "required_part_table.html" with parts=to_order table_id="to-order-table" %}
|
||||
|
||||
{% endblock %}
|
@@ -1,3 +1,5 @@
|
||||
{% block collapse_preamble %}
|
||||
{% endblock %}
|
||||
<div class='panel-group'>
|
||||
<div class='panel panel-default'>
|
||||
<div class='panel panel-heading'>
|
||||
|
18
InvenTree/templates/required_part_table.html
Normal file
18
InvenTree/templates/required_part_table.html
Normal file
@@ -0,0 +1,18 @@
|
||||
<table class='table table-striped table-condensed' id='{{ table_id }}'>
|
||||
<tr>
|
||||
<th>Part</th>
|
||||
<th>Description</th>
|
||||
<th>In Stock</th>
|
||||
<th>Allocated</th>
|
||||
<th>Net Stock</th>
|
||||
</tr>
|
||||
{% for part in parts %}
|
||||
<tr>
|
||||
<td><a href="{% url 'part-detail' part.id %}">{{ part.name }}</a></td>
|
||||
<td>{{ part.description }}</td>
|
||||
<td>{{ part.total_stock }}</td>
|
||||
<td>{{ part.allocation_count }}</td>
|
||||
<td>{{ part.available_stock }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
Reference in New Issue
Block a user