diff --git a/InvenTree/templates/InvenTree/build_overdue.html b/InvenTree/templates/InvenTree/build_overdue.html new file mode 100644 index 0000000000..9270336de1 --- /dev/null +++ b/InvenTree/templates/InvenTree/build_overdue.html @@ -0,0 +1,15 @@ +{% extends "collapse_index.html" %} + +{% load i18n %} + +{% block collapse_title %} + +{% trans "Overdue Builds" %} +{% endblock %} + +{% block collapse_content %} + + +
+ +{% endblock %} \ No newline at end of file diff --git a/InvenTree/templates/InvenTree/index.html b/InvenTree/templates/InvenTree/index.html index 8e59d51d2b..2f6898788c 100644 --- a/InvenTree/templates/InvenTree/index.html +++ b/InvenTree/templates/InvenTree/index.html @@ -16,6 +16,7 @@ InvenTree | {% trans "Index" %} {% endif %} {% if roles.build.view %} {% include "InvenTree/build_pending.html" with collapse_id="build_pending" %} + {% include "InvenTree/build_overdue.html" with collapse_id="build_overdue" %} {% endif %}
@@ -72,6 +73,15 @@ loadBuildTable("#build-pending-table", { disableFilters: true, }); +loadBuildTable("#build-overdue-table", { + url: "{% url 'api-build-list' %}", + params: { + part_detail: true, + overdue: true, + }, + disableFilters: true, +}); + loadSimplePartTable("#low-stock-table", "{% url 'api-part-list' %}", { params: { low_stock: true, @@ -126,6 +136,12 @@ $("#build-pending-table").on('load-success.bs.table', function() { $("#build-pending-count").html(count); }); +$("#build-overdue-table").on('load-success.bs.table', function() { + var count = $("#build-overdue-table").bootstrapTable('getData').length; + + $("#build-overdue-count").html(count); +}); + $("#low-stock-table").on('load-success.bs.table', function() { var count = $("#low-stock-table").bootstrapTable('getData').length;