mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Added outstanding purchase and sales orders views to homepage
This commit is contained in:
parent
3d597cc3c3
commit
945c3c214d
@ -3,7 +3,7 @@
|
|||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
{% block collapse_title %}
|
{% block collapse_title %}
|
||||||
<span class='fas fa-times-circle icon-header'></span>
|
<span class='fas fa-cogs icon-header'></span>
|
||||||
{% trans "Pending Builds" %}<span class='badge' id='build-pending-count'>0</span>
|
{% trans "Pending Builds" %}<span class='badge' id='build-pending-count'>0</span>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
@ -12,25 +12,35 @@ InvenTree | Index
|
|||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
{% include "InvenTree/latest_parts.html" with collapse_id="latest_parts" %}
|
{% include "InvenTree/latest_parts.html" with collapse_id="latest_parts" %}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-6">
|
|
||||||
{% include "InvenTree/bom_invalid.html" with collapse_id="bom_invalid" %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
{% include "InvenTree/starred_parts.html" with collapse_id="starred" %}
|
{% include "InvenTree/starred_parts.html" with collapse_id="starred" %}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-6">
|
|
||||||
{% include "InvenTree/low_stock.html" with collapse_id="order" %}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
{% include "InvenTree/bom_invalid.html" with collapse_id="bom_invalid" %}
|
||||||
|
</div>
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
{% include "InvenTree/build_pending.html" with collapse_id="build_pending" %}
|
{% include "InvenTree/build_pending.html" with collapse_id="build_pending" %}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
|
{% include "InvenTree/low_stock.html" with collapse_id="order" %}
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
{% include "InvenTree/po_outstanding.html" with collapse_id="po_outstanding" %}
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
{% include "InvenTree/so_outstanding.html" with collapse_id="so_outstanding" %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -76,6 +86,22 @@ loadBuildTable("#build-pending-table", {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
loadPurchaseOrderTable("#po-outstanding-table", {
|
||||||
|
url: "{% url 'api-po-list' %}",
|
||||||
|
params: {
|
||||||
|
"supplier_detail": true,
|
||||||
|
"oustanding": true,
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
loadSalesOrderTable("#so-outstanding-table", {
|
||||||
|
url: "{% url 'api-so-list' %}",
|
||||||
|
params: {
|
||||||
|
"customer_detail": true,
|
||||||
|
"oustanding": true,
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
$("#bom-invalid-table").on('load-success.bs.table', function() {
|
$("#bom-invalid-table").on('load-success.bs.table', function() {
|
||||||
var count = $("#bom-invalid-table").bootstrapTable('getData').length;
|
var count = $("#bom-invalid-table").bootstrapTable('getData').length;
|
||||||
|
|
||||||
@ -107,5 +133,16 @@ $("#build-pending-table").on('load-success.bs.table', function() {
|
|||||||
$("#build-pending-count").html(count);
|
$("#build-pending-count").html(count);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("#po-outstanding-table").on('load-success.bs.table', function() {
|
||||||
|
var count = $("#po-outstanding-table").bootstrapTable('getData').length;
|
||||||
|
|
||||||
|
$("#po-outstanding-count").html(count);
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#so-outstanding-table").on('load-success.bs.table', function() {
|
||||||
|
var count = $("#so-outstanding-table").bootstrapTable('getData').length;
|
||||||
|
|
||||||
|
$("#so-outstanding-count").html(count);
|
||||||
|
});
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
Loading…
Reference in New Issue
Block a user