mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Merge branch 'master' of github.com:inventree/InvenTree into part_main_details
This commit is contained in:
commit
86f3f56a60
@ -781,8 +781,8 @@ input[type="submit"] {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.sidenav .list-group-item.active {
|
.sidenav .list-group-item.active {
|
||||||
background-color: #b3a997;
|
background-color: #c6d4ea;
|
||||||
border-color: #ccc;
|
border: 2px #aab solid;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The side navigation menu */
|
/* The side navigation menu */
|
||||||
|
@ -187,7 +187,11 @@ $('#new-po-line').click(function() {
|
|||||||
quantity: {},
|
quantity: {},
|
||||||
reference: {},
|
reference: {},
|
||||||
purchase_price: {},
|
purchase_price: {},
|
||||||
purchase_price_currency: {},
|
purchase_price_currency: {
|
||||||
|
{% if order.supplier.currency %}
|
||||||
|
value: '{{ order.supplier.currency }}',
|
||||||
|
{% endif %}
|
||||||
|
},
|
||||||
destination: {},
|
destination: {},
|
||||||
notes: {},
|
notes: {},
|
||||||
},
|
},
|
||||||
@ -324,9 +328,9 @@ $("#po-table").inventreeTable({
|
|||||||
title: '{% trans "MPN" %}',
|
title: '{% trans "MPN" %}',
|
||||||
formatter: function(value, row, index, field) {
|
formatter: function(value, row, index, field) {
|
||||||
if (row.supplier_part_detail && row.supplier_part_detail.manufacturer_part) {
|
if (row.supplier_part_detail && row.supplier_part_detail.manufacturer_part) {
|
||||||
return renderLink(value, `/manufacturer-part/${row.supplier_part_detail.manufacturer_part.pk}/`);
|
return renderLink(value, `/manufacturer-part/${row.supplier_part_detail.manufacturer_part}/`);
|
||||||
} else {
|
} else {
|
||||||
return "";
|
return "-";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -223,30 +223,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class='panel panel-default panel-inventree panel-hidden' id='panel-part-suppliers'>
|
|
||||||
<div class='panel-heading'>
|
|
||||||
<h4>{% trans "Part Suppliers" %}</h4>
|
|
||||||
</div>
|
|
||||||
<div class='panel-content'>
|
|
||||||
<div id='supplier-button-toolbar'>
|
|
||||||
<div class='btn-group'>
|
|
||||||
<button class="btn btn-success" id='supplier-create'>
|
|
||||||
<span class='fas fa-plus-circle'></span> {% trans "New Supplier Part" %}
|
|
||||||
</button>
|
|
||||||
<div id='opt-dropdown' class="btn-group">
|
|
||||||
<button id='supplier-part-options' class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">{% trans "Options" %}<span class="caret"></span></button>
|
|
||||||
<ul class="dropdown-menu">
|
|
||||||
<li><a href='#' id='supplier-part-delete' title='{% trans "Delete supplier parts" %}'>{% trans "Delete" %}</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<table class="table table-striped table-condensed" id='supplier-table' data-toolbar='#supplier-button-toolbar'>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class='panel panel-default panel-inventree panel-hidden' id='panel-bom'>
|
<div class='panel panel-default panel-inventree panel-hidden' id='panel-bom'>
|
||||||
<div class='panel-heading'>
|
<div class='panel-heading'>
|
||||||
<h4>{% trans "Bill of Materials" %}</h4>
|
<h4>{% trans "Bill of Materials" %}</h4>
|
||||||
@ -302,7 +278,29 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class='panel panel-default panel-inventree panel-hidden' id='panel-part-manufacturers'>
|
<div class='panel panel-default panel-inventree panel-hidden' id='panel-suppliers'>
|
||||||
|
<div class='panel-heading'>
|
||||||
|
<h4>{% trans "Part Suppliers" %}</h4>
|
||||||
|
</div>
|
||||||
|
<div class='panel-content'>
|
||||||
|
<div id='supplier-button-toolbar'>
|
||||||
|
<div class='btn-group'>
|
||||||
|
<button class="btn btn-success" id='supplier-create'>
|
||||||
|
<span class='fas fa-plus-circle'></span> {% trans "New Supplier Part" %}
|
||||||
|
</button>
|
||||||
|
<div id='opt-dropdown' class="btn-group">
|
||||||
|
<button id='supplier-part-options' class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">{% trans "Options" %}<span class="caret"></span></button>
|
||||||
|
<ul class="dropdown-menu">
|
||||||
|
<li><a href='#' id='supplier-part-delete' title='{% trans "Delete supplier parts" %}'>{% trans "Delete" %}</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<table class="table table-striped table-condensed" id='supplier-part-table' data-toolbar='#supplier-button-toolbar'>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class='panel-heading'>
|
<div class='panel-heading'>
|
||||||
<h4>{% trans "Part Manufacturers" %}</h4>
|
<h4>{% trans "Part Manufacturers" %}</h4>
|
||||||
</div>
|
</div>
|
||||||
@ -321,7 +319,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<table class='table table-condensed table-striped' id='manufacturer-table' data-toolbar='#manufacturer-button-toolbar'></table>
|
<table class='table table-condensed table-striped' id='manufacturer-part-table' data-toolbar='#manufacturer-button-toolbar'></table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -828,7 +826,7 @@
|
|||||||
|
|
||||||
$("#supplier-part-delete").click(function() {
|
$("#supplier-part-delete").click(function() {
|
||||||
|
|
||||||
var selections = $("#supplier-table").bootstrapTable("getSelections");
|
var selections = $("#supplier-part-table").bootstrapTable("getSelections");
|
||||||
|
|
||||||
var parts = [];
|
var parts = [];
|
||||||
|
|
||||||
@ -845,7 +843,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
loadSupplierPartTable(
|
loadSupplierPartTable(
|
||||||
"#supplier-table",
|
"#supplier-part-table",
|
||||||
"{% url 'api-supplier-part-list' %}",
|
"{% url 'api-supplier-part-list' %}",
|
||||||
{
|
{
|
||||||
params: {
|
params: {
|
||||||
@ -857,10 +855,10 @@
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
linkButtonsToSelection($("#supplier-table"), ['#supplier-part-options']);
|
linkButtonsToSelection($("#supplier-part-table"), ['#supplier-part-options']);
|
||||||
|
|
||||||
loadManufacturerPartTable(
|
loadManufacturerPartTable(
|
||||||
'#manufacturer-table',
|
'#manufacturer-part-table',
|
||||||
"{% url 'api-manufacturer-part-list' %}",
|
"{% url 'api-manufacturer-part-list' %}",
|
||||||
{
|
{
|
||||||
params: {
|
params: {
|
||||||
@ -871,15 +869,15 @@
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
linkButtonsToSelection($("#manufacturer-table"), ['#manufacturer-part-options']);
|
linkButtonsToSelection($("#manufacturer-part-table"), ['#manufacturer-part-options']);
|
||||||
|
|
||||||
$("#manufacturer-part-delete").click(function() {
|
$("#manufacturer-part-delete").click(function() {
|
||||||
|
|
||||||
var selections = $("#manufacturer-table").bootstrapTable("getSelections");
|
var selections = $("#manufacturer-part-table").bootstrapTable("getSelections");
|
||||||
|
|
||||||
deleteManufacturerParts(selections, {
|
deleteManufacturerParts(selections, {
|
||||||
onSuccess: function() {
|
onSuccess: function() {
|
||||||
$("#manufacturer-table").bootstrapTable("refresh");
|
$("#manufacturer-part-table").bootstrapTable("refresh");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -900,7 +898,7 @@
|
|||||||
method: 'POST',
|
method: 'POST',
|
||||||
title: '{% trans "Add Manufacturer Part" %}',
|
title: '{% trans "Add Manufacturer Part" %}',
|
||||||
onSuccess: function() {
|
onSuccess: function() {
|
||||||
$("#manufacturer-table").bootstrapTable("refresh");
|
$("#manufacturer-part-table").bootstrapTable("refresh");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -63,17 +63,11 @@
|
|||||||
</li>
|
</li>
|
||||||
{% if part.purchaseable and roles.purchase_order.view %}
|
{% if part.purchaseable and roles.purchase_order.view %}
|
||||||
<li class='list-group-item' title='{% trans "Suppliers" %}'>
|
<li class='list-group-item' title='{% trans "Suppliers" %}'>
|
||||||
<a href='#' id='select-part-suppliers' class='nav-toggle'>
|
<a href='#' id='select-suppliers' class='nav-toggle'>
|
||||||
<span class='menu-tab-icon fas fa-building sidebar-icon'></span>
|
<span class='menu-tab-icon fas fa-building sidebar-icon'></span>
|
||||||
{% trans "Suppliers" %}
|
{% trans "Suppliers" %}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class='list-group-item' title='{% trans "Manufacturers" %}'>
|
|
||||||
<a href='#' id='select-part-manufacturers' class='nav-toggle'>
|
|
||||||
<span class='menu-tab-icon fas fa-tools sidebar-icon'></span>
|
|
||||||
{% trans "Manufacturers" %}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li class='list-group-item' title='{% trans "Purchase Orders" %}'>
|
<li class='list-group-item' title='{% trans "Purchase Orders" %}'>
|
||||||
<a href='#' id='select-purchase-orders' class='nav-toggle'>
|
<a href='#' id='select-purchase-orders' class='nav-toggle'>
|
||||||
<span class='menu-tab-icon fas fa-shopping-cart sidebar-icon'></span>
|
<span class='menu-tab-icon fas fa-shopping-cart sidebar-icon'></span>
|
||||||
|
@ -539,7 +539,7 @@ function loadSupplierPartTable(table, url, options) {
|
|||||||
title: '{% trans "MPN" %}',
|
title: '{% trans "MPN" %}',
|
||||||
formatter: function(value, row, index, field) {
|
formatter: function(value, row, index, field) {
|
||||||
if (value && row.manufacturer_part) {
|
if (value && row.manufacturer_part) {
|
||||||
return renderLink(value, `/manufacturer-part/${row.manufacturer_part.pk}/`);
|
return renderLink(value, `/manufacturer-part/${row.manufacturer_part}/`);
|
||||||
} else {
|
} else {
|
||||||
return "-";
|
return "-";
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
<!-- CSS -->
|
<!-- CSS -->
|
||||||
<link rel="stylesheet" href="{% static 'css/bootstrap_3.3.7_css_bootstrap.min.css' %}">
|
<link rel="stylesheet" href="{% static 'css/bootstrap_3.3.7_css_bootstrap.min.css' %}">
|
||||||
<link rel="stylesheet" href="{% static 'select2/css/select2.css' %}">
|
<link rel="stylesheet" href="{% static 'select2/css/select2.css' %}">
|
||||||
<link rel="stylesheet" href="{% static 'select2/css/inventree.css' %}">
|
<link rel="stylesheet" href="{% static 'css/inventree.css' %}">
|
||||||
<link rel="stylesheet" href="{% static 'fontawesome/css/brands.css' %}">
|
<link rel="stylesheet" href="{% static 'fontawesome/css/brands.css' %}">
|
||||||
<link rel="stylesheet" href="{% static 'fontawesome/css/solid.css' %}">
|
<link rel="stylesheet" href="{% static 'fontawesome/css/solid.css' %}">
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user