mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-17 04:25:42 +00:00
Adds "required parts" tab to build view
This commit is contained in:
@ -1,9 +1,10 @@
|
||||
{% extends "build/build_base.html" %}
|
||||
{% load static %}
|
||||
{% load i18n %}
|
||||
{% block details %}
|
||||
{% load status_codes %}
|
||||
|
||||
{% block details %}
|
||||
|
||||
{% include "build/tabs.html" with tab='details' %}
|
||||
|
||||
<h4>{% trans "Build Details" %}</h4>
|
||||
|
28
InvenTree/build/templates/build/parts.html
Normal file
28
InvenTree/build/templates/build/parts.html
Normal file
@ -0,0 +1,28 @@
|
||||
{% extends "build/build_base.html" %}
|
||||
{% load static %}
|
||||
{% load i18n %}
|
||||
{% load status_codes %}
|
||||
|
||||
{% block details %}
|
||||
|
||||
{% include "build/tabs.html" with tab='parts' %}
|
||||
|
||||
<h4>{% trans "Build Parts" %}</h4>
|
||||
<hr>
|
||||
|
||||
<table class='table table-striped table-condensed' id='parts-table'></table>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block js_ready %}
|
||||
|
||||
{{ block.super }}
|
||||
|
||||
loadBuildPartsTable($('#parts-table'), {
|
||||
part: {{ build.part.pk }},
|
||||
build: {{ build.pk }},
|
||||
build_quantity: {{ build.quantity }},
|
||||
build_remaining: {{ build.remaining }},
|
||||
});
|
||||
|
||||
{% endblock %}
|
@ -5,16 +5,22 @@
|
||||
<a href="{% url 'build-detail' build.id %}">{% trans "Details" %}</a>
|
||||
</li>
|
||||
{% if build.active %}
|
||||
<li {% if tab == 'parts' %} class='active'{% endif %}>
|
||||
<a href='{% url "build-parts" build.id %}'>
|
||||
{% trans "Required Parts" %}
|
||||
<span class='badge'>{{ build.part.bom_count }}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li{% if tab == 'allocate' %} class='active'{% endif %}>
|
||||
<a href="{% url 'build-allocate' build.id %}">
|
||||
{% trans "Incomplete" %}
|
||||
{% trans "In Progress" %}
|
||||
<span class='badge'>{{ build.incomplete_outputs.count }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li{% if tab == 'output' %} class='active'{% endif %}>
|
||||
<a href="{% url 'build-output' build.id %}">
|
||||
{% trans "Build Outputs" %}
|
||||
{% trans "Completed Outputs" %}
|
||||
<span class='badge'>{{ build.output_count }}</span>
|
||||
</a>
|
||||
</li>
|
||||
|
@ -20,6 +20,7 @@ build_detail_urls = [
|
||||
|
||||
url(r'^notes/', views.BuildNotes.as_view(), name='build-notes'),
|
||||
|
||||
url(r'^parts/', views.BuildDetail.as_view(template_name='build/parts.html'), name='build-parts'),
|
||||
url(r'^attachments/', views.BuildDetail.as_view(template_name='build/attachments.html'), name='build-attachments'),
|
||||
url(r'^output/', views.BuildDetail.as_view(template_name='build/build_output.html'), name='build-output'),
|
||||
|
||||
|
Reference in New Issue
Block a user