2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-20 05:46:34 +00:00

Use the client-side PO table in more places

This commit is contained in:
Oliver Walters
2019-12-09 21:55:00 +11:00
parent a257f94ac0
commit 71c1faf9ff
5 changed files with 79 additions and 59 deletions

View File

@ -14,19 +14,17 @@
</div>
</div>
{% include "order/po_table.html" with orders=part.open_purchase_orders toolbar='#button-bar' %}
<table class='table table-striped table-condensed po-table' id='purchase-order-table' data-toolbar='#button-bar'>
</table>
{% if part.closed_purchase_orders|length > 0 %}
<h4>Closed Orders</h4>
{% include "order/po_table.html" with orders=part.closed_purchase_orders %}
{% endif %}
{% endblock %}
{% block js_ready %}
{{ block.super }}
$("#po-table").inventreeTable({
loadPurchaseOrderTable($("#purchase-order-table"), {
url: "{% url 'api-po-list' %}?part={{ part.id }}",
});
$("#part-order2").click(function() {