diff --git a/InvenTree/build/templates/build/allocate.html b/InvenTree/build/templates/build/allocate.html index 201e7a48ed..725e612947 100644 --- a/InvenTree/build/templates/build/allocate.html +++ b/InvenTree/build/templates/build/allocate.html @@ -13,8 +13,9 @@ InvenTree | Allocate Parts
- + {% if 0 %}{% endif %} +
@@ -317,21 +318,7 @@ InvenTree | Allocate Parts ], }); - {% if editing %} - - {% for bom_item in bom_items.all %} - - loadAllocationTable( - $("#allocate-table-id-{{ bom_item.sub_part.id }}"), - {{ bom_item.sub_part.id }}, - "{{ bom_item.sub_part.full_name }}", - "{% url 'api-build-item-list' %}?build={{ build.id }}&part={{ bom_item.sub_part.id }}", - {% multiply build.quantity bom_item.quantity %}, - $("#new-item-{{ bom_item.sub_part.id }}") - ); - - {% endfor %} - + {% if 0 %} $("#auto-allocate-build").on('click', function() { launchModalForm( "{% url 'build-auto-allocate' build.id %}", @@ -340,8 +327,9 @@ InvenTree | Allocate Parts } ); }); + {% endif %} - $('#unallocate-build').on('click', function() { + $('#btn-unallocate').on('click', function() { launchModalForm( "{% url 'build-unallocate' build.id %}", { @@ -350,15 +338,6 @@ InvenTree | Allocate Parts ); }); - {% else %} - - $("#build-list").inventreeTable({ - }); - - $("#btn-allocate").click(function() { - location.href = "{% url 'build-allocate' build.id %}?edit=1"; - }); - $("#btn-order-parts").click(function() { launchModalForm("/order/purchase-order/order-parts/", { data: { @@ -367,6 +346,4 @@ InvenTree | Allocate Parts }); }); - {% endif %} - {% endblock %} diff --git a/InvenTree/build/templates/build/allocate_edit.html b/InvenTree/build/templates/build/allocate_edit.html deleted file mode 100644 index ca6990ee00..0000000000 --- a/InvenTree/build/templates/build/allocate_edit.html +++ /dev/null @@ -1,34 +0,0 @@ -{% load i18n %} -{% load inventree_extras %} - -
-

{% trans "Allocate Stock to Build" %}

-
-
-
-
- - -
-
-
-
- -
-
-

{% trans "Part" %}

-
-
-

{% trans "Available" %}

-
-
-

{% trans "Required" %}

-
-
-

{% trans "Allocated" %}

-
-
- -{% for bom_item in bom_items.all %} -{% include "build/allocation_item.html" with item=bom_item build=build collapse_id=bom_item.id %} -{% endfor %} diff --git a/InvenTree/build/templates/build/allocation_item.html b/InvenTree/build/templates/build/allocation_item.html deleted file mode 100644 index 0492e44280..0000000000 --- a/InvenTree/build/templates/build/allocation_item.html +++ /dev/null @@ -1,34 +0,0 @@ -{% extends "collapse.html" %} - -{% load static %} -{% load inventree_extras %} - -{% block collapse_panel_setup %}class='panel part-allocation' id='allocation-panel-{{ item.sub_part.id }}'{% endblock %} - -{% block collapse_title %} - {% include "hover_image.html" with image=item.sub_part.image hover=false %} -
- {{ item.sub_part.full_name }} - {{ item.sub_part.description }} -
-{% endblock %} - -{% block collapse_heading %} -
- {% decimal item.sub_part.total_stock %} -
-
- {% multiply build.quantity item.quantity %}{% if item.overage %} (+ {{ item.overage }}){% endif %} -
-
- {% part_allocation_count build item.sub_part %} -
- -
-
-{% endblock %} - -{% block collapse_content %} - -
-{% endblock %} \ No newline at end of file