mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-02 05:26:45 +00:00
Display inactive parts in part used_in view
This commit is contained in:
parent
322710d603
commit
8637d46981
@ -53,6 +53,7 @@ class PartBriefSerializer(InvenTreeModelSerializer):
|
|||||||
'total_stock',
|
'total_stock',
|
||||||
'available_stock',
|
'available_stock',
|
||||||
'image_url',
|
'image_url',
|
||||||
|
'active',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@ -36,7 +36,13 @@
|
|||||||
field: 'part_detail',
|
field: 'part_detail',
|
||||||
title: 'Part',
|
title: 'Part',
|
||||||
formatter: function(value, row, index, field) {
|
formatter: function(value, row, index, field) {
|
||||||
return imageHoverIcon(row.part_detail.image_url) + renderLink(value.full_name, value.url + 'bom/');
|
var html = imageHoverIcon(row.part_detail.image_url) + renderLink(value.full_name, value.url + 'bom/');
|
||||||
|
|
||||||
|
if (!row.part_detail.active) {
|
||||||
|
html += "<span class='label label-warning' style='float: right;'>INACTIVE</span>";
|
||||||
|
}
|
||||||
|
|
||||||
|
return html;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
{% include "hover_image.html" with image=variant.image hover=True %}
|
{% include "hover_image.html" with image=variant.image hover=True %}
|
||||||
<a href="{% url 'part-detail' variant.id %}">{{ variant.full_name }}</a>
|
<a href="{% url 'part-detail' variant.id %}">{{ variant.full_name }}</a>
|
||||||
{% if not variant.active %}
|
{% if not variant.active %}
|
||||||
<span class='label label-warning' style='float: right;'>Inactive</span>
|
<span class='label label-warning' style='float: right;'>INACTIVE</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
<td>{{ variant.description }}</td>
|
<td>{{ variant.description }}</td>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user