mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Merge remote-tracking branch 'inventree/master'
This commit is contained in:
commit
a6a58b299b
@ -107,8 +107,6 @@ $.fn.inventreeTable = function(options) {
|
||||
|
||||
function customGroupSorter(sortName, sortOrder, sortData) {
|
||||
|
||||
console.log('got here');
|
||||
|
||||
var order = sortOrder === 'desc' ? -1 : 1;
|
||||
|
||||
sortData.sort(function(a, b) {
|
||||
|
@ -111,10 +111,6 @@ src="{% static 'img/blank_image.png' %}"
|
||||
</table>
|
||||
{% endblock %}
|
||||
|
||||
{% block js_load %}
|
||||
<script type='text/javascript' src="{% static 'script/inventree/stock.js' %}"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block js_ready %}
|
||||
|
||||
$("#build-edit").click(function () {
|
||||
|
@ -14,11 +14,6 @@
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block js_load %}
|
||||
{{ block.super }}
|
||||
<script type='text/javascript' src="{% static 'script/inventree/stock.js' %}"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block js_ready %}
|
||||
{{ block.super }}
|
||||
|
||||
|
@ -103,6 +103,9 @@ class PartBriefSerializer(InvenTreeModelSerializer):
|
||||
model = Part
|
||||
fields = [
|
||||
'pk',
|
||||
'IPN',
|
||||
'name',
|
||||
'revision',
|
||||
'full_name',
|
||||
'description',
|
||||
'thumbnail',
|
||||
|
@ -26,12 +26,6 @@ InvenTree | {% trans "Part List" %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block js_load %}
|
||||
{{ block.super }}
|
||||
<script type='text/javascript' src="{% static 'script/inventree/part.js' %}"></script>
|
||||
<script type='text/javascript' src="{% static 'script/inventree/stock.js' %}"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block js_ready %}
|
||||
{{ block.super }}
|
||||
|
||||
|
@ -22,11 +22,6 @@ InvenTree | Stock
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block js_load %}
|
||||
{{ block.super }}
|
||||
<script type='text/javascript' src="{% static 'script/inventree/stock.js' %}"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block js_ready %}
|
||||
{{ block.super }}
|
||||
loadTree("{% url 'api-stock-tree' %}",
|
||||
|
@ -262,6 +262,7 @@ function loadStockTable(table, options) {
|
||||
customSort: customGroupSorter,
|
||||
groupBy: true,
|
||||
original: original,
|
||||
showColumns: true,
|
||||
groupByField: options.groupByField || 'part',
|
||||
groupByFormatter: function(field, id, data) {
|
||||
|
||||
@ -273,6 +274,9 @@ function loadStockTable(table, options) {
|
||||
|
||||
return imageHoverIcon(row.part_detail.thumbnail) + name + ' <i>(' + data.length + ' items)</i>';
|
||||
}
|
||||
else if (field == 'IPN') {
|
||||
return row.part_detail.IPN;
|
||||
}
|
||||
else if (field == 'part_description') {
|
||||
return row.part_detail.description;
|
||||
}
|
||||
@ -403,6 +407,15 @@ function loadStockTable(table, options) {
|
||||
field: 'pk',
|
||||
title: 'ID',
|
||||
visible: false,
|
||||
switchable: false,
|
||||
},
|
||||
{
|
||||
field: 'IPN',
|
||||
title: 'IPN',
|
||||
sortable: true,
|
||||
formatter: function(value, row, index, field) {
|
||||
return row.part_detail.IPN;
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'part_name',
|
||||
|
@ -1,5 +1,5 @@
|
||||
wheel>=0.34.2 # Wheel
|
||||
Django==3.0.5 # Django package
|
||||
Django==3.0.7 # Django package
|
||||
pillow==6.2.2 # Image manipulation
|
||||
djangorestframework==3.10.3 # DRF framework
|
||||
django-dbbackup==3.3.0 # Database backup / restore functionality
|
||||
|
Loading…
Reference in New Issue
Block a user