mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Add "overdue sales orders" to index page
This commit is contained in:
parent
c34196538b
commit
8e13a7b470
@ -29,6 +29,7 @@ InvenTree | {% trans "Index" %}
|
||||
{% endif %}
|
||||
{% if roles.sales_order.view %}
|
||||
{% include "InvenTree/so_outstanding.html" with collapse_id="so_outstanding" %}
|
||||
{% include "InvenTree/so_overdue.html" with collapse_id="so_overdue" %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
@ -112,6 +113,14 @@ loadSalesOrderTable("#so-outstanding-table", {
|
||||
},
|
||||
});
|
||||
|
||||
loadSalesOrderTable("#so-overdue-table", {
|
||||
url: "{% url 'api-so-list' %}",
|
||||
params: {
|
||||
overdue: true,
|
||||
customer_detail: true,
|
||||
}
|
||||
});
|
||||
|
||||
$("#latest-parts-table").on('load-success.bs.table', function() {
|
||||
var count = $("#latest-parts-table").bootstrapTable('getData').length;
|
||||
|
||||
@ -166,4 +175,10 @@ $("#so-outstanding-table").on('load-success.bs.table', function() {
|
||||
$("#so-outstanding-count").html(count);
|
||||
});
|
||||
|
||||
$("#so-overdue-table").on('load-success.bs.table', function() {
|
||||
var count = $("#so-overdue-table").bootstrapTable('getData').length;
|
||||
|
||||
$("#so-overdue-count").html(count);
|
||||
});
|
||||
|
||||
{% endblock %}
|
15
InvenTree/templates/InvenTree/so_overdue.html
Normal file
15
InvenTree/templates/InvenTree/so_overdue.html
Normal file
@ -0,0 +1,15 @@
|
||||
{% extends "collapse_index.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block collapse_title %}
|
||||
<span class='fas fa-calendar-times icon-header'></span>
|
||||
{% trans "Overdue Sales Orders" %}<span class='badge' id='so-overdue-count'><span class='fas fa-spin fa-spinner'></span></span>
|
||||
{% endblock %}
|
||||
|
||||
{% block collapse_content %}
|
||||
|
||||
<table class='table table-striped table-condensed' id='so-overdue-table'>
|
||||
</table>
|
||||
|
||||
{% endblock %}
|
Loading…
Reference in New Issue
Block a user