{% extends "part/part_base.html" %} {% load static %} {% block css %} {% endblock %} {% block details %} {% include 'part/tabs.html' with tab='bom' %}

Bill of Materials

{% for bom_item in part.bom_items.all %} {% with sub_part=bom_item.sub_part %} {% endwith %} {% endfor %}
Part Description Quantity
{{ sub_part.name }} {{ sub_part.description }} {{ bom_item.quantity }}
{% endblock %} {% block js_load %} {% endblock %} {% block js_ready %} $('#bom-table').footable(); $('#bom-table').on('click', '.delete-row-button', function () { var button = $(this); launchDeleteForm("#modal-delete", button.attr('url'), { reload: true }); }); $('#bom-table').on('click', '.edit-row-button', function () { var button = $(this); launchModalForm("#modal-form", button.attr('url')); }); $("#new-bom-item").click(function () { launchModalForm("#modal-form", "{% url 'bom-item-create' %}", { reload: true, data: { parent: {{ part.id }} } }); }); {% endblock %}