2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-08-14 15:41:10 +00:00

Merge branch 'master' into part-import

This commit is contained in:
Matthias Mair
2021-06-26 23:58:41 +02:00
committed by GitHub
77 changed files with 10989 additions and 8160 deletions

View File

@@ -138,7 +138,7 @@
<hr>
<h4>{% trans 'Stock Pricing' %}<i class="fas fa-info-circle" title="Shows the purchase prices of stock for this part.
The part single price is the current purchase price for that supplier part."></i></h4>
{% if price_history|length > 1 %}
{% if price_history|length > 0 %}
<div style="max-width: 99%; min-height: 300px">
<canvas id="StockPriceChart"></canvas>
</div>

View File

@@ -239,11 +239,19 @@
enableDragAndDrop(
'#part-thumb',
"{% url 'part-image-upload' part.id %}",
"{% url 'api-part-detail' part.id %}",
{
label: 'image',
method: 'PATCH',
success: function(data, status, xhr) {
location.reload();
// If image / thumbnail data present, live update
if (data.image) {
$('#part-image').attr('src', data.image);
} else {
// Otherwise, reload the page
location.reload();
}
}
}
);