PUI: Don't load stock test results for non-trackable part (#7327) (#7337)

(cherry picked from commit e8e64616da)

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
This commit is contained in:
github-actions[bot] 2024-05-26 20:54:45 +10:00 committed by GitHub
parent 1ba0bee1ea
commit 5f4275679d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -233,6 +233,7 @@
{% settings_value "TEST_STATION_DATA" as test_station_fields %} {% settings_value "TEST_STATION_DATA" as test_station_fields %}
{% if item.part.trackable %}
loadStockTestResultsTable( loadStockTestResultsTable(
$("#test-result-table"), { $("#test-result-table"), {
part: {{ item.part.id }}, part: {{ item.part.id }},
@ -248,6 +249,7 @@
url: '{% url "api-stockitem-testreport-list" %}', url: '{% url "api-stockitem-testreport-list" %}',
}); });
}); });
{% endif %}
{% if user.is_staff %} {% if user.is_staff %}
$("#delete-test-results").click(function() { $("#delete-test-results").click(function() {