2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-30 12:36:45 +00:00

adding in manufacturer and supplier tables

This commit is contained in:
Matthias 2021-06-23 15:30:04 +02:00
parent 761aa04aba
commit d7d080fb96

View File

@ -136,9 +136,16 @@
<h4>{% trans "Supplier Cost" %}</h4> <h4>{% trans "Supplier Cost" %}</h4>
</div> </div>
<div class='panel-content'> <div class='panel-content'><div class="row">
PLACEHOLDER FOR SUPPLIER COST TABLE <div class="col col-md-6">
</div> <h4>{% trans "Suppliers" %}</h4>
<table class="table table-striped table-condensed" id='supplier-table' data-toolbar='#button-toolbar'></table>
</div>
<div class="col col-md-6">
<h4>{% trans "Manufacturers" %}</h4>
<table class="table table-striped table-condensed" id='manufacturer-table' data-toolbar='#button-toolbar'></table>
</div>
</div></div>
</div> </div>
<div class='panel panel-default panel-inventree'> <div class='panel panel-default panel-inventree'>
@ -243,6 +250,33 @@
{% block js_ready %} {% block js_ready %}
{{ block.super }} {{ block.super }}
loadSupplierPartTable(
"#supplier-table",
"{% url 'api-supplier-part-list' %}",
{
params: {
part: {{ part.id }},
part_detail: false,
supplier_detail: true,
manufacturer_detail: true,
},
}
);
loadManufacturerPartTable(
"#manufacturer-table",
"{% url 'api-manufacturer-part-list' %}",
{
params: {
part: {{ part.id }},
part_detail: false,
manufacturer_detail: true,
},
}
);
// history graphs // history graphs
{% default_currency as currency %} {% default_currency as currency %}
{% if price_history %} {% if price_history %}
@ -405,7 +439,7 @@
}) })
{% endif %} {% endif %}
// Load the BOM table data // Load the BOM table data
loadBomTable($("#bom-table"), { loadBomTable($("#bom-table"), {
editable: {{ editing_enabled }}, editable: {{ editing_enabled }},