From ec7392303d33fc84e51a7367b5b97749f44e7a93 Mon Sep 17 00:00:00 2001 From: eeintech Date: Thu, 19 Aug 2021 10:47:46 -0400 Subject: [PATCH] Fixed company templates --- .../company/templates/company/detail.html | 86 ++++++++++--------- .../templates/company/manufacturer_part.html | 4 +- InvenTree/part/templates/part/category.html | 2 +- InvenTree/part/templates/part/detail.html | 4 +- 4 files changed, 49 insertions(+), 47 deletions(-) diff --git a/InvenTree/company/templates/company/detail.html b/InvenTree/company/templates/company/detail.html index 884ec6e8de..806d7f6441 100644 --- a/InvenTree/company/templates/company/detail.html +++ b/InvenTree/company/templates/company/detail.html @@ -24,19 +24,17 @@ {% endif %}
- + +
@@ -59,27 +57,25 @@ {% if roles.purchase_order.change %}
-
+
{% if roles.purchase_order.add %} - {% endif %} -
- -
+
+ + +
@@ -87,7 +83,7 @@
{% endif %} - +
@@ -274,6 +270,10 @@ {% if company.is_manufacturer %} + function reloadManufacturerPartTable() { + $('#manufacturer-part-table').bootstrapTable('refresh'); + } + $("#manufacturer-part-create").click(function () { createManufacturerPart({ @@ -285,7 +285,7 @@ }); loadManufacturerPartTable( - "#part-table", + "#manufacturer-part-table", "{% url 'api-manufacturer-part-list' %}", { params: { @@ -296,20 +296,20 @@ } ); - linkButtonsToSelection($("#manufacturer-table"), ['#table-options']); + linkButtonsToSelection($("#manufacturer-part-table"), ['#manufacturer-table-options']); - $("#multi-part-delete").click(function() { - var selections = $("#part-table").bootstrapTable("getSelections"); + $("#multi-manufacturer-part-delete").click(function() { + var selections = $("#manufacturer-part-table").bootstrapTable("getSelections"); deleteManufacturerParts(selections, { onSuccess: function() { - $("#part-table").bootstrapTable("refresh"); + $("#manufacturer-part-table").bootstrapTable("refresh"); } }); }); - $("#multi-part-order").click(function() { - var selections = $("#part-table").bootstrapTable("getSelections"); + $("#multi-manufacturer-part-order").click(function() { + var selections = $("#manufacturer-part-table").bootstrapTable("getSelections"); var parts = []; @@ -353,9 +353,9 @@ } ); - {% endif %} + linkButtonsToSelection($("#supplier-part-table"), ['#supplier-table-options']); - $("#multi-part-delete").click(function() { + $("#multi-supplier-part-delete").click(function() { var selections = $("#supplier-part-table").bootstrapTable("getSelections"); var requests = []; @@ -379,8 +379,8 @@ ); }); - $("#multi-part-order").click(function() { - var selections = $("#part-table").bootstrapTable("getSelections"); + $("#multi-supplier-part-order").click(function() { + var selections = $("#supplier-part-table").bootstrapTable("getSelections"); var parts = []; @@ -395,6 +395,8 @@ }); }); + {% endif %} + attachNavCallbacks({ name: 'company', default: 'company-stock' diff --git a/InvenTree/company/templates/company/manufacturer_part.html b/InvenTree/company/templates/company/manufacturer_part.html index 4623eb3a07..cc2dd68840 100644 --- a/InvenTree/company/templates/company/manufacturer_part.html +++ b/InvenTree/company/templates/company/manufacturer_part.html @@ -109,7 +109,7 @@ src="{% static 'img/blank_image.png' %}" {% trans "New Supplier Part" %}
- + @@ -133,7 +133,7 @@ src="{% static 'img/blank_image.png' %}" {% trans "New Parameter" %}
- + diff --git a/InvenTree/part/templates/part/category.html b/InvenTree/part/templates/part/category.html index 44e3ee0daa..21c5d0061e 100644 --- a/InvenTree/part/templates/part/category.html +++ b/InvenTree/part/templates/part/category.html @@ -132,7 +132,7 @@ {% endif %}
- +