mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Refactor "used in" page
This commit is contained in:
parent
e7c7bdcd00
commit
e38d740bbc
@ -238,6 +238,22 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='panel panel-default panel-inventree panel-hidden' id='panel-used-in'>
|
||||
<div class='panel-heading'>
|
||||
<h4>{% trans "Assemblies" %}</h4>
|
||||
</div>
|
||||
<div class='panel-content'>
|
||||
<div id='assembly-button-toolbar'>
|
||||
<div class='filter-list' id='filter-list-usedin'>
|
||||
<!-- Empty div (will be filled out with avilable BOM filters) -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="table table-striped table-condensed" id='used-table' data-toolbar='#assembly-button-toolbar'>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='panel panel-default panel-inventree panel-hidden' id='panel-build-orders'>
|
||||
<div class='panel-heading'>
|
||||
<h4>{% trans "Part Builds" %}</h4>
|
||||
@ -294,6 +310,16 @@
|
||||
{% block js_ready %}
|
||||
{{ block.super }}
|
||||
|
||||
loadPartTable('#used-table',
|
||||
'{% url "api-part-list" %}',
|
||||
{
|
||||
params: {
|
||||
uses: {{ part.pk }},
|
||||
},
|
||||
filterTarget: '#filter-list-usedin',
|
||||
}
|
||||
);
|
||||
|
||||
// Load the BOM table data
|
||||
loadBomTable($("#bom-table"), {
|
||||
editable: {{ editing_enabled }},
|
||||
|
@ -1,39 +0,0 @@
|
||||
{% extends "part/part_base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block menubar %}
|
||||
{% include 'part/navbar.html' with tab='used' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block heading %}
|
||||
{% trans "Assemblies" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block details %}
|
||||
|
||||
<div id='button-toolbar'>
|
||||
<div class='filter-list' id='filter-list-usedin'>
|
||||
<!-- Empty div (will be filled out with avilable BOM filters) -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="table table-striped table-condensed" id='used-table' data-toolbar='#button-toolbar'>
|
||||
</table>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block js_ready %}
|
||||
{{ block.super }}
|
||||
|
||||
loadPartTable('#used-table',
|
||||
'{% url "api-part-list" %}',
|
||||
{
|
||||
params: {
|
||||
uses: {{ part.pk }},
|
||||
},
|
||||
filterTarget: '#filter-list-usedin',
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
{% endblock %}
|
@ -48,8 +48,6 @@ part_detail_urls = [
|
||||
url(r'^bom-duplicate/?', views.BomDuplicate.as_view(), name='duplicate-bom'),
|
||||
|
||||
url(r'^allocation/?', views.PartDetail.as_view(template_name='part/allocation.html'), name='part-allocation'),
|
||||
url(r'^bom/?', views.PartDetail.as_view(template_name='part/bom.html'), name='part-bom'),
|
||||
url(r'^used/?', views.PartDetail.as_view(template_name='part/used_in.html'), name='part-used-in'),
|
||||
url(r'^prices/', views.PartPricingView.as_view(template_name='part/prices.html'), name='part-prices'),
|
||||
url(r'^track/?', views.PartDetail.as_view(template_name='part/track.html'), name='part-track'),
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user